content
stringlengths
40
137k
"public <K, V> Cache<K, V> getCache(String cacheName) {\n if (isClosed()) {\n throw new IllegalStateException();\n }\n synchronized (caches) {\n RICache cache = caches.get(cacheName);\n if (cache == null) {\n return null;\n } else {\n Configuration<?, ?> configuration = cache.getConfiguration();\n if (configuration.getKeyType() == null && configuration.getValueType() == null) {\n return (Cache<K, V>) cache;\n } else {\n throw new IllegalArgumentException(\"String_Node_Str\" + cacheName + \"String_Node_Str\" + \"String_Node_Str\" + configuration.getKeyType() + \"String_Node_Str\" + configuration.getValueType() + \"String_Node_Str\" + \"String_Node_Str\");\n }\n }\n }\n}\n"
"public void create() throws ResourceAllocationException {\n PhysicalNetworkTrafficType result = _networkService.addTrafficTypeToPhysicalNetwork(getPhysicalNetworkId(), getTrafficType(), getIsolationMethod(), getXenLabel(), getKvmLabel(), getVmwareLabel(), getSimulatorLabel(), getVlan(), getHypervLabel());\n if (result != null) {\n setEntityId(result.getId());\n setEntityUuid(result.getUuid());\n } else {\n throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, \"String_Node_Str\");\n }\n}\n"
"private void setAppManagerReadDynamicProperties(AppManagerRead appManagerRead) {\n updateManagedClusters(appManagerRead);\n updateVersion(appManagerRead);\n}\n"
"public void onPlayerMove(PlayerMoveEvent event) {\n if (event.isCancelled()) {\n return;\n }\n if (!plugin.isAuthorized(event.getPlayer())) {\n if (!checkGuest(event.getPlayer(), Config.guests_movement)) {\n if (this.plugin.AuthDB_JoinTime.containsKey(event.getPlayer().getName())) {\n long jointime = this.plugin.AuthDB_JoinTime.get(event.getPlayer().getName());\n if (jointime + 3 < Util.timeStamp()) {\n this.plugin.AuthDB_JoinTime.remove(event.getPlayer().getName());\n }\n } else {\n event.getPlayer().teleport(event.getFrom());\n }\n }\n }\n}\n"
"private TableLayoutInfo resolveTableLayoutInfo(TableArea area) {\n assert (parent != null);\n int avaWidth = parent.getMaxAvaWidth() - parent.getCurrentIP();\n int parentMaxWidth = parent.getMaxAvaWidth();\n IStyle style = area.getStyle();\n validateBoxProperty(style);\n int marginWidth = getDimensionValue(style.getProperty(StyleConstants.STYLE_MARGIN_LEFT)) + getDimensionValue(style.getProperty(StyleConstants.STYLE_MARGIN_RIGHT));\n int specifiedWidth = getDimensionValue(tableContent.getWidth(), parentMaxWidth);\n if (specifiedWidth + marginWidth > parentMaxWidth) {\n specifiedWidth = 0;\n }\n boolean isInline = PropertyUtil.isInlineElement(content);\n if (specifiedWidth == 0) {\n if (isInline) {\n if (avaWidth - marginWidth > parentMaxWidth / 4) {\n tableWidth = avaWidth - marginWidth;\n } else {\n tableWidth = parentMaxWidth - marginWidth;\n }\n } else {\n tableWidth = avaWidth - marginWidth;\n }\n return new TableLayoutInfo(handleColummVisibity(columnWidthResolver.resolve(tableWidth, tableWidth)));\n } else {\n if (!isInline) {\n tableWidth = Math.min(specifiedWidth, avaWidth - marginWidth);\n return new TableLayoutInfo(handleColummVisibity(columnWidthResolver.resolve(tableWidth, avaWidth - marginWidth)));\n } else {\n tableWidth = Math.min(specifiedWidth, parentMaxWidth - marginWidth);\n return new TableLayoutInfo(handleColummVisibity(columnWidthResolver.resolve(tableWidth, parentMaxWidth - marginWidth)));\n }\n }\n}\n"
"public Field getField(String name) {\n java.lang.reflect.Field field;\n try {\n field = existing.getDeclaredField(name);\n } catch (NoSuchFieldException e) {\n return null;\n } catch (SecurityException e) {\n return null;\n }\n if (field != null) {\n return new Field(MemberFlags.fromReflection(field), existing(field.getType()), field.getName());\n }\n return null;\n}\n"
"protected FilterResults performFiltering(CharSequence prefix) {\n FilterResults results = new FilterResults();\n String filter = null;\n if (prefix != null && prefix.length() > 0) {\n filter = prefix.toString().toLowerCase(Locale.US);\n }\n synchronized (data) {\n data.clear();\n for (Map<String, String> map : versions) {\n if (filter == null) {\n data.add(map);\n } else {\n for (String value : map.values()) {\n if (value.toLowerCase(Locale.US).contains(filter)) {\n data.add(map);\n break;\n }\n }\n }\n }\n }\n results.count = data.size();\n return results;\n}\n"
"public DiskOfferingVO updateDiskOffering(UpdateDiskOfferingCmd cmd) throws InvalidParameterValueException {\n Long diskOfferingId = cmd.getId();\n String name = cmd.getDiskOfferingName();\n String displayText = cmd.getDisplayText();\n String tags = cmd.getTags();\n DiskOfferingVO diskOffering = _diskOfferingDao.findById(diskOfferingId);\n if (diskOffering == null) {\n throw new InvalidParameterValueException(\"String_Node_Str\" + diskOfferingId);\n }\n boolean updateNeeded = (name != null || displayText != null || tags != null);\n if (!updateNeeded) {\n return _diskOfferingDao.findById(diskOfferingId);\n }\n diskOffering = _diskOfferingDao.createForUpdate(diskOfferingId);\n if (name != null) {\n diskOffering.setName(name);\n }\n if (displayText != null) {\n diskOffering.setDisplayText(displayText);\n }\n if (tags != null) {\n if (tags.trim().isEmpty()) {\n diskOffering.setTagsArray(csvTagsToList(null));\n } else {\n diskOffering.setTagsArray(csvTagsToList(tags));\n }\n }\n if (_diskOfferingDao.update(diskOfferingId, diskOffering)) {\n saveConfigurationEvent(UserContext.current().getUserId(), null, EventTypes.EVENT_DISK_OFFERING_EDIT, \"String_Node_Str\" + diskOffering.getName() + \"String_Node_Str\", \"String_Node_Str\" + diskOffering.getId(), \"String_Node_Str\" + diskOffering.getName(), \"String_Node_Str\" + diskOffering.getDisplayText(), \"String_Node_Str\" + diskOffering.getDiskSize(), \"String_Node_Str\" + diskOffering.getTags());\n return _diskOfferingDao.findById(diskOfferingId);\n } else {\n return null;\n }\n}\n"
"public void execute() {\n IElementParameter dqRuler = node.getElementParameter(\"String_Node_Str\");\n String newQuery = \"String_Node_Str\";\n if (dqRuler != null || !\"String_Node_Str\".equals(dqRuler.getValue())) {\n newQuery = generateNewQueryFromDQRuler(dqRuler);\n if (newQuery == null || \"String_Node_Str\".equals(newQuery)) {\n newQuery = generateNewQuery();\n }\n }\n if (dbNameAndSchemaMap != null) {\n schema = this.dbNameAndSchemaMap.get(this.realTableId);\n }\n String propertyType = (String) node.getPropertyValue(EParameterName.PROPERTY_TYPE.getName());\n boolean isTeradata = false;\n if (dbType != null) {\n isTeradata = dbType.equals(EDatabaseTypeName.TERADATA.getDisplayName());\n }\n if (propertyType != null && !propertyType.equals(EmfComponent.REPOSITORY)) {\n for (IElementParameter param : this.node.getElementParameters()) {\n if (param.getRepositoryValue() != null) {\n if ((!isTeradata && param.getRepositoryValue().equals(\"String_Node_Str\")) || (isTeradata && param.getRepositoryValue().equals(\"String_Node_Str\"))) {\n schema = (String) param.getValue();\n schema = schema.replace(\"String_Node_Str\", \"String_Node_Str\");\n schema = schema.replace(\"String_Node_Str\", \"String_Node_Str\");\n break;\n }\n }\n }\n } else if (schema == null) {\n IElementParameter param = node.getElementParameter(EParameterName.REPOSITORY_PROPERTY_TYPE.getName());\n if (param != null) {\n try {\n IRepositoryViewObject object = DesignerPlugin.getDefault().getRepositoryService().getProxyRepositoryFactory().getLastVersion((String) param.getValue());\n if (object != null) {\n Item item = object.getProperty().getItem();\n if (item != null && item instanceof DatabaseConnectionItem) {\n if (isTeradata) {\n schema = (String) RepositoryToComponentProperty.getValue(((DatabaseConnectionItem) item).getConnection(), \"String_Node_Str\", null);\n } else {\n schema = (String) RepositoryToComponentProperty.getValue(((DatabaseConnectionItem) item).getConnection(), \"String_Node_Str\", null);\n }\n schema = TalendTextUtils.removeQuotes(schema);\n }\n }\n } catch (PersistenceException e) {\n }\n }\n }\n if (conn instanceof DatabaseConnection && conn.isContextMode()) {\n schema = DatabaseConnectionParameterUtil.getContextTrueValue((DatabaseConnection) conn, schema);\n }\n String newQuery = null;\n realTableName = QueryUtil.getTableName(node, newOutputMetadataTable, schema, dbType, realTableName);\n if (realTableName.startsWith(TalendTextUtils.QUOTATION_MARK) && realTableName.endsWith(TalendTextUtils.QUOTATION_MARK) && realTableName.length() > 2) {\n realTableName = realTableName.substring(1, realTableName.length() - 1);\n }\n newQuery = TalendTextUtils.addSQLQuotes(QueryUtil.generateNewQuery(node, newOutputMetadataTable, dbType, schema, realTableName));\n for (IElementParameter param : (List<IElementParameter>) node.getElementParameters()) {\n if (param.getFieldType() == EParameterFieldType.MEMO_SQL) {\n oldValue = node.getPropertyValue(param.getName());\n this.propName = param.getName();\n String sql = null;\n try {\n if (QueryUtil.needFormatSQL(dbType)) {\n sql = fomatQuery(newQuery);\n } else {\n sql = newQuery;\n }\n node.setPropertyValue(param.getName(), sql);\n } catch (Exception e) {\n ExceptionHandler.process(e, Priority.WARN);\n node.setPropertyValue(param.getName(), newQuery);\n }\n param.setRepositoryValueUsed(false);\n }\n }\n node.setPropertyValue(EParameterName.UPDATE_COMPONENTS.getName(), Boolean.TRUE);\n if (this.node instanceof Node) {\n ((Node) this.node).checkAndRefreshNode();\n }\n}\n"
"public void loadApplication() {\n window.setLoaded(false);\n loader = new Loader();\n updater = new Updater();\n Future<?> future = loadExecutor.submit(loader);\n try {\n future.get();\n } catch (ExecutionException e) {\n Throwable cause = e.getCause();\n cause.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n loadExecutor.scheduleAtFixedRate(updater, 0, 10, TimeUnit.MILLISECONDS);\n}\n"
"public static ConnectionStatus testConnection(HDFSConnectionBean connection) {\n ConnectionStatus connectionStatus = new ConnectionStatus();\n connectionStatus.setResult(false);\n String errorMsg = \"String_Node_Str\" + connection.getNameNodeURI() + \"String_Node_Str\";\n Object dfs = null;\n try {\n dfs = getDFS(connection);\n if (dfs != null) {\n connectionStatus.setResult(true);\n connectionStatus.setMessageException(\"String_Node_Str\");\n } else {\n connectionStatus.setMessageException(errorMsg);\n }\n } catch (Exception e) {\n ExceptionHandler.process(e);\n connectionStatus.setMessageException(errorMsg + \"String_Node_Str\" + missJarMsg);\n } finally {\n if (dfs != null) {\n try {\n ReflectionUtils.invokeMethod(dfs, \"String_Node_Str\", new Object[0]);\n } catch (Exception e) {\n }\n }\n }\n return connectionStatus;\n}\n"
"public void rollback(CoinData coinData, Transaction tx) {\n UtxoData utxoData = (UtxoData) coinData;\n if (utxoData == null) {\n return;\n }\n Set<String> addressSet = new HashSet<>();\n if (TxStatusEnum.AGREED.equals(tx.getStatus())) {\n for (UtxoInput input : utxoData.getInputs()) {\n UtxoOutput from = ledgerCacheService.getUtxo(input.getKey());\n if (from != null) {\n if (from.getStatus() == OutPutStatusEnum.UTXO_SPENT) {\n from.setStatus(OutPutStatusEnum.UTXO_CONFIRMED_UNSPENT);\n } else if (from.getStatus() == OutPutStatusEnum.UTXO_CONFIRMED_SPENT) {\n from.setStatus(OutPutStatusEnum.UTXO_CONFIRMED_UNSPENT);\n } else if (from.getStatus() == OutPutStatusEnum.UTXO_UNCONFIRMED_SPENT) {\n from.setStatus(OutPutStatusEnum.UTXO_UNCONFIRMED_UNSPENT);\n }\n addressSet.add(from.getAddress());\n }\n }\n for (int i = utxoData.getOutputs().size() - 1; i >= 0; i--) {\n UtxoOutput output = utxoData.getOutputs().get(i);\n ledgerCacheService.removeUtxo(output.getKey());\n addressSet.add(output.getAddress());\n }\n } else if (tx.getStatus().equals(TxStatusEnum.CONFIRMED)) {\n outputDataService.deleteByHash(tx.getHash().getDigestHex());\n for (int i = utxoData.getOutputs().size() - 1; i >= 0; i--) {\n UtxoOutput output = utxoData.getOutputs().get(i);\n ledgerCacheService.removeUtxo(output.getKey());\n addressSet.add(output.getAddress());\n }\n inputDataService.deleteByHash(tx.getHash().getDigestHex());\n Map<String, Object> keyMap = new HashMap<>();\n for (int i = utxoData.getInputs().size() - 1; i >= 0; i--) {\n UtxoInput input = utxoData.getInputs().get(i);\n keyMap.clear();\n keyMap.put(\"String_Node_Str\", input.getFromHash().getDigestHex());\n keyMap.put(\"String_Node_Str\", input.getFromIndex());\n UtxoOutputPo outputPo = outputDataService.get(keyMap);\n outputPo.setStatus(UtxoOutputPo.USABLE);\n outputDataService.updateStatus(outputPo);\n addressSet.add(outputPo.getAddress());\n UtxoOutput output = UtxoTransferTool.toOutput(outputPo);\n ledgerCacheService.putUtxo(output.getKey(), output);\n }\n relationDataService.deleteRelation(tx.getHash().getDigestHex(), addressSet);\n }\n for (String address : addressSet) {\n UtxoTransactionTool.getInstance().calcBalance(address, false);\n }\n}\n"
"private static Value asSesameValue(Node aNode) {\n Value value = null;\n if (aNode instanceof Resource || aNode instanceof NamedGraph || aNode instanceof TripleNode) {\n value = asSesameResource((URIElement) aNode, valueFactory);\n } else if (aNode instanceof BlankNode) {\n value = sesameFactory.createBNode();\n } else if (aNode instanceof Literal) {\n Literal aLiteral = (Literal) aNode;\n if (aLiteral.getLang() != null && !aLiteral.getLang().trim().isEmpty()) {\n value = sesameFactory.createLiteral(aLiteral.getLexicalForm(), aLiteral.getLang());\n } else if (aLiteral.getDatatype() != null) {\n value = sesameFactory.createLiteral(aLiteral.getLexicalForm(), sesameFactory.createURI(aLiteral.getDatatype().getURI()));\n } else {\n value = sesameFactory.createLiteral(aLiteral.getLexicalForm());\n }\n }\n return value;\n}\n"
"public void onError(RiakResponse response) throws RiakException {\n response.operationComplete();\n waiter.countDown();\n}\n"
"protected void updatePosition(List<List<DoubleSolution>> swarm) {\n for (int i = 0; i < psoIsland.size(); i++) {\n psoIsland.get(i).updatePosition(swarmList.get(i));\n }\n}\n"
"private void defineDatas() {\n datas = new Object[issues.size()][columns.length];\n for (int x = 0; x < issues.size(); x++) {\n RemoteJiraIssue issue = issues.get(x);\n datas[x][0] = issue.getKey();\n datas[x][1] = issue.getSummary();\n datas[x][2] = issue.getStatus();\n datas[x][COLUMN_ACTIONS] = null;\n datas[x][COLUMN_ASSIGN_TO] = issue.getAssignee();\n datas[x][COLUMN_COMMENT] = \"String_Node_Str\";\n }\n}\n"
"public boolean processRequest(RequestEvent requestEvent) {\n ServerTransaction serverTransaction = requestEvent.getServerTransaction();\n SipProvider jainSipProvider = (SipProvider) requestEvent.getSource();\n Request request = requestEvent.getRequest();\n String requestMethod = request.getMethod();\n if (serverTransaction == null) {\n try {\n serverTransaction = SipStackSharing.getOrCreateServerTransaction(requestEvent);\n } catch (TransactionAlreadyExistsException ex) {\n logger.error(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", ex);\n return false;\n } catch (TransactionUnavailableException ex) {\n logger.error(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", ex);\n return false;\n }\n }\n boolean processed = false;\n if (requestMethod.equals(Request.INVITE)) {\n logger.debug(\"String_Node_Str\");\n DialogState dialogState = serverTransaction.getDialog().getState();\n if ((dialogState == null) || dialogState.equals(DialogState.CONFIRMED)) {\n if (logger.isDebugEnabled())\n logger.debug(\"String_Node_Str\" + dialogState);\n processInvite(jainSipProvider, serverTransaction, request);\n processed = true;\n } else {\n logger.error(\"String_Node_Str\" + \"String_Node_Str\");\n }\n } else if (requestMethod.equals(Request.ACK)) {\n processAck(serverTransaction, request);\n processed = true;\n } else if (requestMethod.equals(Request.BYE)) {\n processBye(serverTransaction, request);\n processed = true;\n } else if (requestMethod.equals(Request.CANCEL)) {\n processCancel(serverTransaction, request);\n processed = true;\n } else if (requestMethod.equals(Request.REFER)) {\n logger.debug(\"String_Node_Str\");\n processRefer(serverTransaction, request, jainSipProvider);\n processed = true;\n } else if (requestMethod.equals(Request.NOTIFY)) {\n logger.debug(\"String_Node_Str\");\n processed = processNotify(serverTransaction, request);\n }\n return processed;\n}\n"
"public void setMode(int mode) {\n if (this.mode == mode)\n return;\n int oldMode = this.mode;\n this.mode = mode;\n if (oldMode == AND && mode == OR) {\n if (matcherEditors.isEmpty()) {\n fireMatchNone();\n } else if (matcherEditors.size() > 1) {\n fireRelaxed(rebuildMatcher());\n }\n } else if (oldMode == OR && mode == AND) {\n fireConstrained(rebuildMatcher());\n } else {\n throw new IllegalArgumentException();\n }\n}\n"
"private void clearDirtyFlag() {\n IReportProvider provider = getProvider();\n if (provider != null && getErrorLIine(false) == -1) {\n ModuleHandle oldModel = getModel();\n unhookModelEventManager(oldModel);\n getCommandStack(oldModel).removeCommandStackListener(getCommandStackListener());\n SessionHandleAdapter.getInstance().getMediator(oldModel).removeColleague(this);\n ModuleHandle newModel = provider.getReportModuleHandle(getEditorInput(), true);\n SessionHandleAdapter.getInstance().setReportDesignHandle(newModel);\n UIUtil.processSessionResourceFolder(getEditorInput(), UIUtil.getProjectFromInput(getEditorInput()), newModel);\n SessionHandleAdapter.getInstance().getMediator(newModel).addColleague(this);\n hookModelEventManager(newModel);\n getCommandStack(newModel).addCommandStackListener(getCommandStackListener());\n setIsModified(false);\n getEditor().editorDirtyStateChanged();\n if (isActive() && !isLeaving) {\n getReportEditor().reloadOutlinePage();\n }\n }\n}\n"
"public boolean equals(Object object) {\n return object instanceof Logo && ((Logo) object).getId() == this.getId() && ((Logo) object).getLabel().equals(this.getLabel()) && ((Logo) object).getPath().equals(this.getPath()) && ((Logo) object).isDeleted() == this.isDeleted();\n}\n"
"public boolean checkStatus(GccRemoveReadyPollerObject gccRemoveReadyPollerObject) {\n LOGGER.info(\"String_Node_Str\", gccRemoveReadyPollerObject.getName(), gccRemoveReadyPollerObject.getStack().getId());\n GccTemplate gccTemplate = (GccTemplate) gccRemoveReadyPollerObject.getStack().getTemplate();\n GccCredential gccCredential = (GccCredential) gccRemoveReadyPollerObject.getStack().getCredential();\n try {\n Integer progress = gccRemoveReadyPollerObject.getCompute().zoneOperations().get(gccCredential.getProjectId(), gccTemplate.getGccZone().getValue(), gccRemoveReadyPollerObject.getOperation().getName()).execute().getProgress();\n return (progress.intValue() != FINISHED) ? false : true;\n } catch (GoogleJsonResponseException ex) {\n return exceptionHandler(ex, gccRemoveReadyPollerObject.getName());\n } catch (NullPointerException | IOException e) {\n return false;\n }\n}\n"
"public void updatePlayer(Server server, List<PlayerInfo> list) {\n try {\n Map<String, Entity> entities = new LinkedHashMap<String, Entity>(15);\n int connected = server.getOnlinePlayers();\n for (PlayerInfo playerInfo : list) {\n try {\n Date playerLastUpdate;\n Player player = playerDAO.findByServerAndGuid(server.getKey(), playerInfo.getGuid());\n if (player == null) {\n player = new Player();\n player.setCreated(playerInfo.getUpdated());\n player.setGuid(playerInfo.getGuid());\n player.setLevel(playerInfo.getLevel());\n player.setClientId(playerInfo.getClientId());\n player.setServer(server.getKey());\n player.setBanInfo(null);\n player.setBanInfoUpdated(null);\n playerLastUpdate = playerInfo.getUpdated();\n } else {\n player.setLevel(playerInfo.getLevel());\n if (player.getClientId() == null) {\n player.setClientId(playerInfo.getClientId());\n }\n playerLastUpdate = player.getUpdated();\n }\n if (Events.BAN.equals(playerInfo.getEvent())) {\n BanInfo banInfo = new BanInfo(playerInfo.getExtra());\n player.setBanInfo(banInfo.toString());\n player.setBanInfoUpdated(playerInfo.getUpdated());\n player.setConnected(false);\n connected += -1;\n } else if (Events.CONNECT.equals(playerInfo.getEvent()) || Events.DISCONNECT.equals(playerInfo.getEvent()) || Events.UNBAN.equals(playerInfo.getEvent()) || Events.UPDATE.equals(playerInfo.getEvent())) {\n player.setBanInfo(null);\n player.setBanInfoUpdated(null);\n if (Events.CONNECT.equals(playerInfo.getEvent()) || Events.UPDATE.equals(playerInfo.getEvent())) {\n player.setConnected(true);\n if (Events.CONNECT.equals(playerInfo.getEvent())) {\n connected += 1;\n }\n } else if (Events.DISCONNECT.equals(playerInfo.getEvent())) {\n player.setConnected(false);\n connected += -1;\n }\n } else if (Events.ADDNOTE.equals(playerInfo.getEvent())) {\n player.setNote(playerInfo.getExtra());\n } else if (Events.DELNOTE.equals(playerInfo.getEvent())) {\n player.setNote(null);\n }\n player.setUpdated(playerInfo.getUpdated());\n playerDAO.save(player);\n Alias alias;\n if (aliasEntity != null) {\n alias = new Alias(aliasEntity);\n } else {\n alias = aliasDAO.findByPlayerAndNicknameAndIp(player.getKey(), playerInfo.getName(), playerInfo.getIp());\n }\n if (alias == null) {\n alias = new Alias();\n alias.setCount(1L);\n alias.setCreated(playerInfo.getUpdated());\n alias.setNickname(playerInfo.getName());\n alias.setNgrams(NGrams.ngrams(playerInfo.getName()));\n alias.setPlayer(player.getKey());\n alias.setIp(playerInfo.getIp());\n alias.setServer(server.getKey());\n alias.setUpdated(playerInfo.getUpdated());\n } else {\n if (Events.CONNECT.equals(playerInfo.getEvent())) {\n if (server.getUpdated() == null || server.getUpdated().after(playerLastUpdate)) {\n alias.setCount(alias.getCount() + 1L);\n }\n }\n alias.setUpdated(playerInfo.getUpdated());\n }\n aliasDAO.save(alias, false);\n entities.put(aliasKey, alias.toEntity());\n } catch (Exception e) {\n log.severe(e.getMessage());\n StringWriter w = new StringWriter();\n e.printStackTrace(new PrintWriter(w));\n log.severe(w.getBuffer().toString());\n }\n }\n DatastoreService service = DatastoreServiceFactory.getDatastoreService();\n service.put(entities.values());\n server.setUpdated(new Date());\n if (connected < 0)\n connected = 0;\n server.setOnlinePlayers(connected);\n serverDAO.save(server);\n } catch (Exception e) {\n log.severe(e.getMessage());\n StringWriter w = new StringWriter();\n e.printStackTrace(new PrintWriter(w));\n log.severe(w.getBuffer().toString());\n }\n}\n"
"public Response submitJob(List<Job> jobs) {\n Response response = superSubmitJob(jobs);\n if (!response.isSuccess()) {\n List<Line> lines = new ArrayList<Line>();\n for (Job job : response.getFailedJobs()) {\n String line = JsonUtils.objectToJsonString(job);\n lines.add(new Line(line));\n }\n try {\n if (fileAccessor == null) {\n throw new RuntimeException(\"String_Node_Str\");\n }\n fileAccessor.addLines(lines);\n response.setSuccess(true);\n response.setCode(ResponseCode.FAILED_AND_SAVE_FILE);\n } catch (FileException e) {\n response.setSuccess(false);\n response.setMsg(e.getMessage());\n }\n }\n return response;\n}\n"
"protected double calculateProgress(JobControl jc, JobClient jobClient) throws IOException {\n double prog = 0.0;\n prog += Math.max(jc.getSuccessfulJobList().size(), successJobs.size());\n List<ControlledJob> runnJobs = jc.getRunningJobList();\n for (ControlledJob cjob : runnJobs) {\n prog += progressOfRunningJob(cjob, jobClient);\n }\n return prog;\n}\n"
"public static void loadConfig() {\n configJson = new JsonObject();\n File[] configFiles = configDir.listFiles();\n if (!(configFiles == null)) {\n for (File configFile : configFiles) {\n if (configFile.isFile()) {\n try {\n InputStream inputStream = new FileInputStream(configFile);\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream);\n JsonParser parser = new JsonParser();\n JsonElement jsonElementCurrent = parser.parse(inputStreamReader);\n if (jsonElementCurrent.isJsonObject()) {\n JsonObject jsonObjectCurrent = jsonElementCurrent.getAsJsonObject();\n mergeJson(jsonObjectCurrent);\n } else {\n LogHelper.error(\"String_Node_Str\" + configFile.getName() + \"String_Node_Str\");\n player.addChatComponentMessage(new ChatComponentText(String.format(StatCollector.translateToLocal(\"String_Node_Str\"), configFile.getName())));\n }\n } catch (Exception e) {\n LogHelper.error(\"String_Node_Str\" + configFile.getName() + \"String_Node_Str\" + e.getCause().getMessage());\n }\n }\n }\n }\n System.out.println(configJson);\n LogHelper.info(\"String_Node_Str\");\n}\n"
"public void entryRemoved(EntryEvent event) {\n final ProxyKey proxyKey = (ProxyKey) event.getKey();\n if (proxies.containsKey(proxyKey)) {\n logger.log(Level.FINEST, \"String_Node_Str\" + proxyKey);\n node.clusterService.enqueueAndReturn(new Processable() {\n public void process() {\n destroyProxy(proxyKey);\n }\n });\n}\n"
"public static String getFullMethodString(IJstMethod method, final IJstType ownerType, final boolean optional) {\n return JstDisplayUtils.getFullMethodString(method, ownerType, optional);\n}\n"
"public void loop(int quantity) {\n if (!running()) {\n this.loops = quantity;\n taskID = Bukkit.getScheduler().scheduleSyncRepeatingTask(MyPetApi.getPlugin(), () -> {\n if (locationHolder.isValid()) {\n for (int i = 0; i < framesPerTick; i++) {\n tick(frame, locationHolder.getLocation());\n if (++frame >= length) {\n if (--Animation.this.loops > 0) {\n reset();\n } else {\n stop();\n }\n }\n } else {\n stop();\n }\n }\n }, 0, tickRate);\n }\n}\n"
"Class<?> getSelectedClass(String jar, String jf) {\n if (jf.trim().equals(\"String_Node_Str\")) {\n return null;\n }\n String fn = driver.javaFBPJarFile;\n int j = fn.lastIndexOf(\"String_Node_Str\") + 8;\n String seg = \"String_Node_Str\";\n if (0 <= fn.substring(j, j + 1).compareTo(\"String_Node_Str\"))\n seg = \"String_Node_Str\";\n String owner = \"String_Node_Str\";\n if (0 <= fn.substring(j, j + 3).compareTo(\"String_Node_Str\"))\n owner = \"String_Node_Str\";\n Class<?> cls;\n URLClassLoader classLoader = null;\n try {\n try {\n File jFile = new File(fn);\n URI uri = jFile.toURI();\n URL url = uri.toURL();\n URL[] urls = new URL[] { url };\n classLoader = new URLClassLoader(urls);\n } catch (Exception e) {\n System.err.println(\"String_Node_Str\");\n e.printStackTrace();\n return null;\n }\n Class<?> compClass = classLoader.loadClass(\"String_Node_Str\" + owner + \"String_Node_Str\" + seg + \"String_Node_Str\");\n Class<?> networkClass = classLoader.loadClass(\"String_Node_Str\" + owner + \"String_Node_Str\" + seg + \"String_Node_Str\");\n Class<?> subnetClass = classLoader.loadClass(\"String_Node_Str\" + owner + \"String_Node_Str\" + seg + \"String_Node_Str\");\n int i = jf.lastIndexOf(\"String_Node_Str\");\n if (i != -1)\n jf = jf.substring(0, i);\n jf = jf.replace('/', '.');\n cls = this.classLoader.loadClass(jf);\n if (cls.equals(compClass) || cls.equals(networkClass) || cls.equals(subnetClass)) {\n return null;\n }\n Class cs = cls.getSuperclass();\n if (cs == null || !(cs == compClass || cs == subnetClass)) {\n MyOptionPane.showMessageDialog(driver.frame, \"String_Node_Str\");\n return null;\n }\n boolean mainPresent = true;\n try {\n cls.getMethod(\"String_Node_Str\", String[].class);\n } catch (NoSuchMethodException e) {\n mainPresent = false;\n } catch (SecurityException e2) {\n mainPresent = false;\n }\n if (mainPresent) {\n MyOptionPane.showMessageDialog(driver.frame, \"String_Node_Str\");\n return null;\n } else {\n return cls;\n }\n } catch (ClassNotFoundException e) {\n System.err.println(\"String_Node_Str\");\n e.printStackTrace();\n return null;\n }\n}\n"
"public static void deployAutoscalingPolicy(AutoscalePolicy autoscalePolicyBean) throws RestAPIException {\n log.info(String.format(\"String_Node_Str\", autoscalePolicyBean.getId()));\n AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();\n if (autoscalerServiceClient != null) {\n org.apache.stratos.autoscaler.stub.autoscale.policy.AutoscalePolicy autoscalePolicy = PojoConverter.convertToCCAutoscalerPojo(autoscalePolicyBean);\n try {\n autoscalerServiceClient.deployAutoscalingPolicy(autoscalePolicy);\n } catch (RemoteException e) {\n log.error(e.getMessage(), e);\n throw new RestAPIException(e.getMessage(), e);\n } catch (AutoScalerServiceInvalidPolicyExceptionException e) {\n String message = e.getFaultMessage().getInvalidPolicyException().getMessage();\n log.error(message, e);\n throw new RestAPIException(message, e);\n }\n }\n}\n"
"public ResourceLimitVO updateResourceLimit(Long accountId, Long domainId, Integer typeId, Long max) {\n Account caller = UserContext.current().getCaller();\n if (max == null) {\n max = new Long(Resource.RESOURCE_UNLIMITED);\n } else if (max.longValue() < Resource.RESOURCE_UNLIMITED) {\n throw new InvalidParameterValueException(\"String_Node_Str\");\n }\n ResourceType resourceType = null;\n if (typeId != null) {\n for (ResourceType type : Resource.ResourceType.values()) {\n if (type.getOrdinal() == typeId.intValue()) {\n resourceType = type;\n }\n }\n if (resourceType == null) {\n throw new InvalidParameterValueException(\"String_Node_Str\");\n }\n }\n ResourceOwnerType ownerType = null;\n Long ownerId = null;\n if (accountId != null) {\n Account account = _entityMgr.findById(Account.class, accountId);\n if (account.getType() == Account.ACCOUNT_ID_SYSTEM) {\n throw new InvalidParameterValueException(\"String_Node_Str\");\n }\n if (account.getType() == Account.ACCOUNT_TYPE_PROJECT) {\n _accountMgr.checkAccess(caller, AccessType.ModifyProject, account);\n } else {\n _accountMgr.checkAccess(caller, null, account);\n }\n ownerType = ResourceOwnerType.Account;\n ownerId = accountId;\n } else if (domainId != null) {\n Domain domain = _entityMgr.findById(Domain.class, domainId);\n _accountMgr.checkAccess(caller, domain);\n if ((caller.getDomainId() == domainId.longValue()) && caller.getType() == Account.ACCOUNT_TYPE_DOMAIN_ADMIN || caller.getType() == Account.ACCOUNT_TYPE_RESOURCE_DOMAIN_ADMIN) {\n throw new PermissionDeniedException(\"String_Node_Str\" + domainId + \"String_Node_Str\");\n }\n Long parentDomainId = domain.getParent();\n if (parentDomainId != null) {\n DomainVO parentDomain = _domainDao.findById(parentDomainId);\n long parentMaximum = findCorrectResourceLimitForDomain(parentDomain, resourceType);\n if ((parentMaximum >= 0) && (max.longValue() > parentMaximum)) {\n throw new InvalidParameterValueException(\"String_Node_Str\" + domain.getName() + \"String_Node_Str\" + parentDomain.getId() + \"String_Node_Str\" + parentMaximum + \"String_Node_Str\" + resourceType + \"String_Node_Str\" + parentMaximum);\n }\n }\n ownerType = ResourceOwnerType.Domain;\n ownerId = domainId;\n }\n if (ownerId == null) {\n throw new InvalidParameterValueException(\"String_Node_Str\");\n }\n ResourceLimitVO limit = _resourceLimitDao.findByOwnerIdAndType(ownerId, ownerType, resourceType);\n if (limit != null) {\n _resourceLimitDao.update(limit.getId(), max);\n return _resourceLimitDao.findById(limit.getId());\n } else {\n return _resourceLimitDao.persist(new ResourceLimitVO(resourceType, max, ownerId, ownerType));\n }\n}\n"
"protected void dealText(TextItem element, Module module) {\n dealReportItem(element, module);\n String content = (String) element.getLocalProperty(module, TextItem.CONTENT_PROP);\n if (StringUtil.isBlank(content))\n return;\n List jsExprs = DataBoundColumnUtil.getExpressions(content, element, module);\n DataBoundColumnUtil.handleJavaExpression(jsExprs, element, module, null);\n}\n"
"public E setAndGet(E update) {\n ClientMessage request = AtomicReferenceSetAndGetCodec.encodeRequest(name, toData(update));\n ClientMessage response = invoke(request);\n return toObject(AtomicReferenceSetAndGetCodec.decodeResponse(response).response);\n}\n"
"protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main_activity);\n Toolbar actionBar = (Toolbar) findViewById(R.id.action_bar);\n setSupportActionBar(actionBar);\n syncLogFragment = (SyncLogFragment) getFragmentManager().findFragmentById(R.id.sync_log);\n drawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, actionBar, 0, 0) {\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n getSupportActionBar().setTitle(R.string.app_name);\n invalidateOptionsMenu();\n }\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n getSupportActionBar().setTitle(title);\n invalidateOptionsMenu();\n }\n public void onDrawerSlide(View drawerView, float slideOffset) {\n super.onDrawerSlide(drawerView, slideOffset);\n syncLogFragment.setScaleFactor(1 - slideOffset);\n }\n };\n drawerLayout.setDrawerListener(drawerToggle);\n drawerListAdapter = new FeedListAdapter();\n drawerListView = (ListView) drawerLayout.findViewById(R.id.drawer);\n drawerListView.setAdapter(drawerListAdapter);\n drawerListView.setOnItemClickListener(this);\n getLoaderManager().initLoader(LOADER_FEEDS, null, this);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n getSupportActionBar().setHomeButtonEnabled(true);\n title = getTitle();\n selectDrawerItem(0, -1);\n}\n"
"protected Control createDialogArea(Composite parent) {\n endpoints = Arrays.asList(new String[] { Util.default_endpoint_address });\n parent.getShell().setText(this.title);\n Composite composite = (Composite) super.createDialogArea(parent);\n GridLayout layout = (GridLayout) composite.getLayout();\n layout.numColumns = 2;\n Label endpointsLabel = new Label(composite, SWT.NONE);\n endpointsLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n endpointsLabel.setText(\"String_Node_Str\");\n endpointsCombo = new Combo(composite, SWT.NONE);\n endpointsCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n ((GridData) endpointsCombo.getLayoutData()).widthHint = 400;\n for (Iterator<String> iter = endpoints.iterator(); iter.hasNext(); ) {\n String host = iter.next();\n endpointsCombo.add(host);\n }\n endpointsCombo.select(0);\n authenticationGroup = new Group(composite, SWT.NONE);\n authenticationGroup.setVisible(true);\n authenticationGroup.setText(\"String_Node_Str\");\n authenticationGroup.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));\n authenticationGroup.setLayout(new GridLayout(2, false));\n Label usernameLabel = new Label(authenticationGroup, SWT.NONE);\n usernameLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n usernameLabel.setText(\"String_Node_Str\");\n userText = new Text(authenticationGroup, SWT.BORDER);\n userText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n userText.setDoubleClickEnabled(false);\n Label passwordLabel = new Label(authenticationGroup, SWT.NONE);\n passwordLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n passwordLabel.setText(\"String_Node_Str\");\n passwordText = new Text(authenticationGroup, SWT.PASSWORD | SWT.BORDER);\n passwordText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n savePasswordButton = new Button(authenticationGroup, SWT.CHECK);\n savePasswordButton.setText(\"String_Node_Str\");\n savePasswordButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));\n if (Util.IsEnterPrise()) {\n Label universeLabel = new Label(composite, SWT.NONE);\n universeLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n universeLabel.setText(\"String_Node_Str\");\n universeCombo = new Combo(composite, SWT.NONE);\n universeCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n ((GridData) universeCombo.getLayoutData()).widthHint = 300;\n if (universes != null)\n for (int i = 0; i < universes.size(); i++) {\n String host = universes.get(i).getPk();\n universeCombo.add(host);\n }\n universeCombo.select(0);\n }\n return composite;\n}\n"
"public EMovableType popWeaponForBearer() {\n List<RequestStack> stacks = super.getStacks();\n for (RequestStack stack : stacks) {\n if (stack.getMaterialType() == EMaterialType.BOW || stack.getMaterialType() == EMaterialType.SWORD || stack.getMaterialType() == EMaterialType.SPEAR) {\n if (stack.pop()) {\n return getSoldierType(stack.getMaterialType());\n }\n }\n }\n return null;\n}\n"
"private void resetAllInternalStateLocked(final boolean updateOnlyWhenLocaleChanged) {\n if (!mSystemReady) {\n return;\n }\n final Locale newLocale = mRes.getConfiguration().locale;\n if (!updateOnlyWhenLocaleChanged || (newLocale != null && !newLocale.equals(mLastSystemLocale))) {\n if (!updateOnlyWhenLocaleChanged) {\n hideCurrentInputLocked(0, null);\n mCurMethodId = null;\n unbindCurrentMethodLocked(true, false);\n }\n if (DEBUG) {\n Slog.i(TAG, \"String_Node_Str\" + newLocale);\n }\n mImListManager = new InputMethodAndSubtypeListManager(mContext, this);\n buildInputMethodListLocked(mMethodList, mMethodMap, resetDefaultEnabledIme);\n if (!updateOnlyWhenLocaleChanged) {\n final String selectedImiId = mSettings.getSelectedInputMethod();\n if (TextUtils.isEmpty(selectedImiId)) {\n resetDefaultImeLocked(mContext);\n }\n } else {\n resetDefaultImeLocked(mContext);\n }\n updateFromSettingsLocked(true);\n mLastSystemLocale = newLocale;\n if (!updateOnlyWhenLocaleChanged) {\n try {\n startInputInnerLocked();\n } catch (RuntimeException e) {\n Slog.w(TAG, \"String_Node_Str\", e);\n }\n }\n }\n}\n"
"private static void generateNodeInfo(JobInfo jobInfo, String selectedContextName, boolean statistics, boolean properties, int option, IProgressMonitor progressMonitor, IProcess currentProcess) throws ProcessorException {\n if (option != GENERATE_MAIN_ONLY) {\n List<? extends INode> graphicalNodes = currentProcess.getGeneratingNodes();\n for (INode node : graphicalNodes) {\n String componentName = node.getComponent().getName();\n if ((node != null) && (componentName.equals(\"String_Node_Str\") || componentName.equals(\"String_Node_Str\"))) {\n if (\"String_Node_Str\".equals(componentName)) {\n IElementParameter fromExternal = node.getElementParameter(\"String_Node_Str\");\n Object value = fromExternal.getValue();\n if (value != null && \"String_Node_Str\".equals(value.toString())) {\n continue;\n }\n }\n IElementParameter processIdparam = node.getElementParameter(\"String_Node_Str\");\n String jobIds = (String) processIdparam.getValue();\n String[] jobsArr = jobIds.split(ProcessorUtilities.COMMA);\n for (String jobId : jobsArr) {\n if (StringUtils.isNotEmpty(jobId)) {\n ProcessItem processItem = null;\n String context = (String) node.getElementParameter(\"String_Node_Str\").getValue();\n String version = (String) node.getElementParameter(\"String_Node_Str\").getValue();\n JobInfo subJobInfo = null;\n subJobInfo = new JobInfo(jobId, context, version);\n processItem = ItemCacheManager.getProcessItem(jobId, version);\n if (processItem == null) {\n throw new ProcessorException(\"String_Node_Str\" + currentProcess.getName());\n }\n subJobInfo.setJobVersion(processItem.getProperty().getVersion());\n if (jobInfo.isApplyContextToChildren()) {\n subJobInfo.setApplyContextToChildren(jobInfo.isApplyContextToChildren());\n if (checkIfContextExisted(processItem, selectedContextName)) {\n subJobInfo.setContextName(selectedContextName);\n } else {\n String defaultContext = processItem.getProcess().getDefaultContext();\n node.getElementParameter(\"String_Node_Str\").setValue(defaultContext);\n subJobInfo.setContextName(defaultContext);\n }\n }\n subJobInfo.setFatherJobInfo(jobInfo);\n if (!jobList.contains(subJobInfo)) {\n if (option == GENERATE_WITH_FIRST_CHILD) {\n generateCode(subJobInfo, selectedContextName, statistics, false, properties, GENERATE_MAIN_ONLY, progressMonitor);\n } else {\n generateCode(subJobInfo, selectedContextName, statistics, false, properties, GENERATE_ALL_CHILDS, progressMonitor);\n currentProcess.setNeedRegenerateCode(true);\n }\n }\n LastGenerationInfo.getInstance().getModulesNeededWithSubjobPerJob(jobInfo.getJobId(), jobInfo.getJobVersion()).addAll(LastGenerationInfo.getInstance().getModulesNeededWithSubjobPerJob(subJobInfo.getJobId(), subJobInfo.getJobVersion()));\n LastGenerationInfo.getInstance().getPigudfNeededWithSubjobPerJob(jobInfo.getJobId(), jobInfo.getJobVersion()).addAll(LastGenerationInfo.getInstance().getPigudfNeededWithSubjobPerJob(subJobInfo.getJobId(), subJobInfo.getJobVersion()));\n if (exportAsOSGI) {\n LastGenerationInfo.getInstance().getModulesNeededWithSubjobPerJob(jobInfo.getJobId() + \"String_Node_Str\", jobInfo.getJobVersion()).addAll(LastGenerationInfo.getInstance().getModulesNeededWithSubjobPerJob(subJobInfo.getJobId() + \"String_Node_Str\", subJobInfo.getJobVersion()));\n LastGenerationInfo.getInstance().getPigudfNeededWithSubjobPerJob(jobInfo.getJobId() + \"String_Node_Str\", jobInfo.getJobVersion()).addAll(LastGenerationInfo.getInstance().getPigudfNeededWithSubjobPerJob(subJobInfo.getJobId() + \"String_Node_Str\", subJobInfo.getJobVersion()));\n }\n LastGenerationInfo.getInstance().getRoutinesNeededWithSubjobPerJob(jobInfo.getJobId(), jobInfo.getJobVersion()).addAll(LastGenerationInfo.getInstance().getRoutinesNeededWithSubjobPerJob(subJobInfo.getJobId(), subJobInfo.getJobVersion()));\n LastGenerationInfo.getInstance().getPigudfNeededWithSubjobPerJob(jobInfo.getJobId(), jobInfo.getJobVersion()).addAll(LastGenerationInfo.getInstance().getPigudfNeededWithSubjobPerJob(subJobInfo.getJobId(), subJobInfo.getJobVersion()));\n if (!LastGenerationInfo.getInstance().isUseDynamic(jobInfo.getJobId(), jobInfo.getJobVersion())) {\n LastGenerationInfo.getInstance().setUseDynamic(jobInfo.getJobId(), jobInfo.getJobVersion(), LastGenerationInfo.getInstance().isUseDynamic(subJobInfo.getJobId(), subJobInfo.getJobVersion()));\n }\n }\n }\n }\n }\n }\n}\n"
"public IStatus doAction() {\n try {\n if (page.isDirty()) {\n boolean save = MessageDialog.openConfirm(page.getSite().getShell(), \"String_Node_Str\", \"String_Node_Str\" + page.getXObject().getDisplayName() + \"String_Node_Str\");\n if (save) {\n IEditorPart part = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();\n PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().saveEditor(part, false);\n } else\n return Status.CANCEL_STATUS;\n }\n IStructuredSelection selection = (TreeSelection) page.getTreeViewer().getSelection();\n XSDComponent xSDCom = null;\n if (selection.getFirstElement() instanceof Element) {\n TreePath tPath = ((TreeSelection) selection).getPaths()[0];\n for (int i = 0; i < tPath.getSegmentCount(); i++) {\n if (tPath.getSegment(i) instanceof XSDAnnotation)\n xSDCom = (XSDAnnotation) (tPath.getSegment(i));\n }\n } else\n xSDCom = (XSDComponent) selection.getFirstElement();\n XSDAnnotationsStructure struc = null;\n if (xSDCom != null)\n struc = new XSDAnnotationsStructure(xSDCom);\n if (struc == null || struc.getAnnotation() == null) {\n throw new RuntimeException(\"String_Node_Str\" + xSDCom.getClass().getName());\n }\n sxid = getNewSimpleXpathInputDlg(struc.getForeignKey());\n sxid.setBlockOnOpen(true);\n int ret = sxid.open();\n if (ret == Window.CANCEL) {\n return Status.CANCEL_STATUS;\n }\n String fk = \"String_Node_Str\".equals(sxid.getXpath()) ? null : sxid.getXpath().replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n if (Util.getForeignKeys() != null && fk != null) {\n if (struc.getForeignKey() != null)\n Util.getForeignKeys().remove(Util.getConceptFromPath(struc.getForeignKey()));\n Util.getForeignKeys().add(Util.getConceptFromPath(fk));\n }\n struc.setForeignKey(fk);\n if (struc.hasChanged()) {\n page.refresh();\n page.getTreeViewer().expandToLevel(xSDCom, 2);\n page.markDirty();\n }\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n MessageDialog.openError(page.getSite().getShell(), \"String_Node_Str\", \"String_Node_Str\" + e.getLocalizedMessage());\n return Status.CANCEL_STATUS;\n }\n return Status.OK_STATUS;\n}\n"
"public void onMapReady(GoogleMap googleMap) {\n if (recommendation.getPoiSequence().length > 0) {\n for (Poi poi : recommendation.getPoiSequence()) {\n Marker marker = googleMap.addMarker(new MarkerOptions().position(new LatLng(poi.getLocation().getLatitude(), poi.getLocation().getLongitude())).title(poi.getName()));\n Picasso.with(this).load(poi.getCategories()[0].getIconUrl()).placeholder(R.drawable.ic_generic_category).into(new PicassoMarker(marker, this));\n }\n }\n if (recommendation.getRoutePoints().length > 0) {\n PolylineOptions pathOptions = new PolylineOptions().color(Color.RED);\n for (int index = 0; index < recommendation.getRoutePoints().length; index++) {\n pathOptions.add(new LatLng(recommendation.getRoutePoints()[index].getLatitude(), recommendation.getRoutePoints()[index].getLongitude()));\n }\n googleMap.addPolyline(pathOptions);\n }\n LatLng latLngOrigin = new LatLng(origin.getLatitude(), origin.getLongitude());\n googleMap.addMarker(new MarkerOptions().position(latLngOrigin).title(getString(R.string.current_location)).icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_CYAN)));\n googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLngOrigin, 13f));\n}\n"
"public static String getStatusDescription(Context context, int statusCode) {\n String ret;\n if (statusCode == BluetoothShare.STATUS_PENDING) {\n ret = context.getString(R.string.status_pending);\n } else if (statusCode == BluetoothShare.STATUS_RUNNING) {\n ret = context.getString(R.string.status_running);\n } else if (statusCode == BluetoothShare.STATUS_SUCCESS) {\n ret = context.getString(R.string.status_success);\n } else if (statusCode == BluetoothShare.STATUS_NOT_ACCEPTABLE) {\n ret = context.getString(R.string.status_not_accept);\n } else if (statusCode == BluetoothShare.STATUS_FORBIDDEN) {\n ret = context.getString(R.string.status_forbidden);\n } else if (statusCode == BluetoothShare.STATUS_CANCELED) {\n ret = context.getString(R.string.status_canceled);\n } else if (statusCode == BluetoothShare.STATUS_FILE_ERROR) {\n ret = context.getString(R.string.status_file_error);\n } else if (statusCode == BluetoothShare.STATUS_ERROR_NO_SDCARD) {\n ret = context.getString(R.string.status_no_sd_card);\n } else if (statusCode == BluetoothShare.STATUS_CONNECTION_ERROR) {\n ret = context.getString(R.string.status_connection_error);\n } else if (statusCode == BluetoothShare.STATUS_ERROR_SDCARD_FULL) {\n ret = context.getString(R.string.bt_sm_2_1, deviceName);\n } else if ((statusCode == BluetoothShare.STATUS_BAD_REQUEST) || (statusCode == BluetoothShare.STATUS_LENGTH_REQUIRED) || (statusCode == BluetoothShare.STATUS_PRECONDITION_FAILED) || (statusCode == BluetoothShare.STATUS_UNHANDLED_OBEX_CODE) || (statusCode == BluetoothShare.STATUS_OBEX_DATA_ERROR)) {\n ret = context.getString(R.string.status_protocol_error);\n } else {\n ret = context.getString(R.string.status_unknown_error);\n }\n return ret;\n}\n"
"public AuthenticatedUser authenticateUser(Credentials credentials) throws GuacamoleException {\n RadiusPacket radPack;\n try {\n radPack = radiusService.authenticate(credentials.getUsername(), credentials.getPassword());\n } catch (GuacamoleException e) {\n logger.error(\"String_Node_Str\", e.getMessage());\n logger.debug(\"String_Node_Str\", e);\n radPack = null;\n }\n if (radPack == null) {\n logger.debug(\"String_Node_Str\");\n throw new GuacamoleInvalidCredentialsException(\"String_Node_Str\", CredentialsInfo.USERNAME_PASSWORD);\n } else if (radPack instanceof AccessReject) {\n logger.debug(\"String_Node_Str\");\n throw new GuacamoleInvalidCredentialsException(\"String_Node_Str\", CredentialsInfo.USERNAME_PASSWORD);\n } else if (radPack instanceof AccessChallenge) {\n try {\n String replyMsg = radPack.getAttributeValue(\"String_Node_Str\").toString();\n String radState = radPack.getAttributeValue(\"String_Node_Str\").toString();\n logger.debug(\"String_Node_Str\", replyMsg);\n logger.debug(\"String_Node_Str\", radState);\n Field radiusResponseField = new RadiusChallengeResponseField(credentials.getUsername(), replyMsg, radState);\n CredentialsInfo expectedCredentials = new CredentialsInfo(Collections.singletonList(radiusResponseField));\n throw new GuacamoleInsufficientCredentialsException(\"String_Node_Str\", expectedCredentials);\n } catch (UnknownAttributeException e) {\n logger.error(\"String_Node_Str\");\n logger.debug(\"String_Node_Str\");\n return null;\n }\n } else if (radPack instanceof AccessAccept) {\n try {\n AuthenticatedUser authenticatedUser = authenticatedUserProvider.get();\n authenticatedUser.init(credentials);\n return authenticatedUser;\n } finally {\n radiusService.disconnect();\n }\n } else\n throw new GuacamoleInvalidCredentialsException(\"String_Node_Str\", CredentialsInfo.USERNAME_PASSWORD);\n}\n"
"private void loadBasicInfo() throws EngineException {\n try {\n Object lock = archive.lock(CORE_STREAM);\n try {\n synchronized (lock) {\n RAInputStream in = archive.getStream(CORE_STREAM);\n try {\n DataInputStream di = new DataInputStream(in);\n checkVersion(di);\n if (coreVersion == -1) {\n loadOldBasicInfo(di);\n } else if (coreVersion == 0) {\n loadBasicInfoV0(di);\n } else {\n throw new IOException(\"String_Node_Str\" + coreVersion);\n }\n } finally {\n in.close();\n }\n }\n } finally {\n archive.unlock(lock);\n }\n } catch (IOException ee) {\n close();\n throw new EngineException(MessageConstants.REPORT_DOCUMENT_OPEN_ERROR, ee);\n }\n}\n"
"public Item getInputItem() {\n if (viewObject != null && viewObject.getProperty() != null)\n return viewObject.getProperty().getItem();\n return null;\n}\n"
"public synchronized void drawPlot(Graphics graphics, boolean clearfirst) {\n if (_debug > 7)\n System.out.println(\"String_Node_Str\" + graphics + \"String_Node_Str\" + clearfirst);\n if (graphics == null) {\n System.out.println(\"String_Node_Str\" + \"String_Node_Str\");\n return;\n }\n Rectangle drawRect = bounds();\n graphics.setPaintMode();\n if (clearfirst) {\n graphics.clearRect(0, 0, drawRect.width, drawRect.height);\n }\n if (_debug > 8) {\n System.out.println(\"String_Node_Str\" + drawRect.width + \"String_Node_Str\" + drawRect.height + \"String_Node_Str\" + drawRect.x + \"String_Node_Str\" + drawRect.y);\n graphics.drawRect(0, 0, drawRect.width, drawRect.height);\n }\n if (_errorMsg != null) {\n int fheight = _labelFontMetrics.getHeight() + 2;\n int msgy = fheight;\n graphics.setColor(Color.black);\n for (int i = 0; i < _errorMsg.length; i++) {\n graphics.drawString(_errorMsg[i], 10, msgy);\n msgy += fheight;\n }\n return;\n }\n if (!_xRangeGiven) {\n if (_xBottom > _xTop) {\n _setXRange(0, 0);\n } else {\n _setXRange(_xBottom, _xTop);\n }\n }\n if (!_yRangeGiven) {\n if (_yBottom > _yTop) {\n _setYRange(0, 0);\n } else {\n _setYRange(_yBottom, _yTop);\n }\n }\n int titley = 0;\n int titlefontheight = _titleFontMetrics.getHeight();\n if (_title != null || _yExp != 0) {\n titley = titlefontheight + _topPadding;\n }\n graphics.setFont(_labelfont);\n int labelheight = _labelFontMetrics.getHeight();\n int halflabelheight = labelheight / 2;\n int ySPos = drawRect.height - 5;\n if (_xExp != 0 && _xticks == null) {\n int xSPos = drawRect.width - _rightPadding;\n String superscript = Integer.toString(_xExp);\n xSPos -= _superscriptFontMetrics.stringWidth(superscript);\n graphics.setFont(_superscriptfont);\n graphics.drawString(superscript, xSPos, ySPos - halflabelheight);\n xSPos -= _labelFontMetrics.stringWidth(\"String_Node_Str\");\n graphics.setFont(_labelfont);\n graphics.drawString(\"String_Node_Str\", xSPos, ySPos);\n _bottomPadding = (3 * labelheight) / 2 + 5;\n }\n if (_xlabel != null && _bottomPadding < labelheight + 5) {\n _bottomPadding = titlefontheight + 5;\n }\n _uly = titley + 5;\n _lry = drawRect.height - labelheight - _bottomPadding - 3;\n int height = _lry - _uly;\n _yscale = height / (_yMax - _yMin);\n _ytickscale = height / (_ytickMax - _ytickMin);\n int ny = 2 + height / (labelheight + 10);\n double yStep = _roundUp((_ytickMax - _ytickMin) / (double) ny);\n double yStart = yStep * Math.ceil(_ytickMin / yStep);\n int widesty = 0;\n String[] ylabels = new String[ny];\n int[] ylabwidth = new int[ny];\n int ind = 0;\n if (_yticks == null) {\n int numfracdigits = _numFracDigits(yStep);\n for (double ypos = yStart; ypos <= _ytickMax; ypos += yStep) {\n if (ind >= ny)\n break;\n String yl = _formatNum(ypos, numfracdigits);\n ylabels[ind] = yl;\n int lw = _labelFontMetrics.stringWidth(yl);\n ylabwidth[ind++] = lw;\n if (lw > widesty) {\n widesty = lw;\n }\n }\n } else {\n Enumeration nl = _yticklabels.elements();\n while (nl.hasMoreElements()) {\n String label = (String) nl.nextElement();\n int lw = _labelFontMetrics.stringWidth(label);\n if (lw > widesty) {\n widesty = lw;\n }\n }\n }\n if (_ylabel != null) {\n _ulx = widesty + _labelFontMetrics.stringWidth(\"String_Node_Str\") + _leftPadding;\n } else {\n _ulx = widesty + _leftPadding;\n }\n int legendwidth = _drawLegend(graphics, drawRect.width - _rightPadding, _uly);\n _lrx = drawRect.width - legendwidth - _rightPadding;\n int width = _lrx - _ulx;\n _xscale = width / (_xMax - _xMin);\n _xtickscale = width / (_xtickMax - _xtickMin);\n if (_debug > 8) {\n System.out.println(\"String_Node_Str\" + _ulx + \"String_Node_Str\" + _uly + \"String_Node_Str\" + _lrx + \"String_Node_Str\" + _lry + \"String_Node_Str\" + width + \"String_Node_Str\" + height);\n }\n graphics.setColor(_background);\n graphics.fillRect(_ulx, _uly, width, height);\n graphics.setColor(_foreground);\n graphics.drawRect(_ulx, _uly, width, height);\n int tickLength = 5;\n int xCoord1 = _ulx + tickLength;\n int xCoord2 = _lrx - tickLength;\n if (_yticks == null) {\n ind = 0;\n for (double ypos = yStart; ypos <= _ytickMax; ypos += yStep) {\n if (ind >= ny)\n break;\n int yCoord1 = _lry - (int) ((ypos - _ytickMin) * _ytickscale);\n int offset = 0;\n if (ind > 0)\n offset = halflabelheight;\n graphics.drawLine(_ulx, yCoord1, xCoord1, yCoord1);\n graphics.drawLine(_lrx, yCoord1, xCoord2, yCoord1);\n if (_grid && yCoord1 != _uly && yCoord1 != _lry) {\n graphics.setColor(Color.lightGray);\n graphics.drawLine(xCoord1, yCoord1, xCoord2, yCoord1);\n graphics.setColor(_foreground);\n }\n graphics.drawString(ylabels[ind], _ulx - ylabwidth[ind++] - 4, yCoord1 + offset);\n }\n if (_yExp != 0) {\n graphics.drawString(\"String_Node_Str\", 2, titley);\n graphics.setFont(_superscriptfont);\n graphics.drawString(Integer.toString(_yExp), _labelFontMetrics.stringWidth(\"String_Node_Str\") + 2, titley - halflabelheight);\n graphics.setFont(_labelfont);\n }\n } else {\n Enumeration nt = _yticks.elements();\n Enumeration nl = _yticklabels.elements();\n while (nl.hasMoreElements()) {\n String label = (String) nl.nextElement();\n double ypos = ((Double) (nt.nextElement())).doubleValue();\n if (ypos > _yMax || ypos < _yMin)\n continue;\n int yCoord1 = _lry - (int) ((ypos - _yMin) * _yscale);\n int offset = 0;\n if (ypos < _lry - labelheight)\n offset = halflabelheight;\n graphics.drawLine(_ulx, yCoord1, xCoord1, yCoord1);\n graphics.drawLine(_lrx, yCoord1, xCoord2, yCoord1);\n if (_grid && yCoord1 != _uly && yCoord1 != _lry) {\n graphics.setColor(Color.lightGray);\n graphics.drawLine(xCoord1, yCoord1, xCoord2, yCoord1);\n graphics.setColor(_foreground);\n }\n graphics.drawString(label, _ulx - _labelFontMetrics.stringWidth(label) - 3, yCoord1 + offset);\n }\n }\n int yCoord1 = _uly + tickLength;\n int yCoord2 = _lry - tickLength;\n if (_xticks == null) {\n int nx = 10;\n double xStep = 0.0;\n int numfracdigits = 0;\n int charwidth = _labelFontMetrics.stringWidth(\"String_Node_Str\");\n int count = 0;\n while (count++ <= 10) {\n xStep = _roundUp((_xtickMax - _xtickMin) / (double) nx);\n numfracdigits = _numFracDigits(xStep);\n int intdigits = _numIntDigits(_xtickMax);\n int inttemp = _numIntDigits(_xtickMin);\n if (intdigits < inttemp) {\n intdigits = inttemp;\n }\n int maxlabelwidth = charwidth * (numfracdigits + 2 + intdigits);\n int savenx = nx;\n nx = 2 + width / (maxlabelwidth + 10);\n if (nx - savenx <= 1 || savenx - nx <= 1)\n break;\n }\n xStep = _roundUp((_xtickMax - _xtickMin) / (double) nx);\n numfracdigits = _numFracDigits(xStep);\n double xStart = xStep * Math.ceil(_xtickMin / xStep);\n for (double xpos = xStart; xpos <= _xtickMax; xpos += xStep) {\n String xticklabel = _formatNum(xpos, numfracdigits);\n xCoord1 = _ulx + (int) ((xpos - _xtickMin) * _xtickscale);\n graphics.drawLine(xCoord1, _uly, xCoord1, yCoord1);\n graphics.drawLine(xCoord1, _lry, xCoord1, yCoord2);\n if (_grid && xCoord1 != _ulx && xCoord1 != _lrx) {\n graphics.setColor(Color.lightGray);\n graphics.drawLine(xCoord1, yCoord1, xCoord1, yCoord2);\n graphics.setColor(_foreground);\n }\n int labxpos = xCoord1 - _labelFontMetrics.stringWidth(xticklabel) / 2;\n graphics.drawString(xticklabel, labxpos, _lry + 3 + labelheight);\n }\n } else {\n Enumeration nt = _xticks.elements();\n Enumeration nl = _xticklabels.elements();\n while (nl.hasMoreElements()) {\n String label = (String) nl.nextElement();\n double xpos = ((Double) (nt.nextElement())).doubleValue();\n if (xpos > _xMax || xpos < _xMin)\n continue;\n xCoord1 = _ulx + (int) ((xpos - _xtickMin) * _xtickscale);\n graphics.drawLine(xCoord1, _uly, xCoord1, yCoord1);\n graphics.drawLine(xCoord1, _lry, xCoord1, yCoord2);\n if (_grid && xCoord1 != _ulx && xCoord1 != _lrx) {\n graphics.setColor(Color.lightGray);\n graphics.drawLine(xCoord1, yCoord1, xCoord1, yCoord2);\n graphics.setColor(_foreground);\n }\n int labxpos = xCoord1 - _labelFontMetrics.stringWidth(label) / 2;\n graphics.drawString(label, labxpos, _lry + 3 + labelheight);\n }\n }\n graphics.setColor(_foreground);\n if (_title != null) {\n graphics.setFont(_titlefont);\n int titlex = _ulx + (width - _titleFontMetrics.stringWidth(_title)) / 2;\n graphics.drawString(_title, titlex, titley);\n }\n graphics.setFont(_labelfont);\n if (_xlabel != null) {\n int labelx = _ulx + (width - _labelFontMetrics.stringWidth(_xlabel)) / 2;\n graphics.drawString(_xlabel, labelx, ySPos);\n }\n int charcenter = 2 + _labelFontMetrics.stringWidth(\"String_Node_Str\") / 2;\n int charheight = labelheight;\n if (_ylabel != null) {\n int yl = _ylabel.length();\n int starty = _uly + (_lry - _uly) / 2 - yl * charheight / 2 + charheight;\n for (int i = 0; i < yl; i++) {\n String nchar = _ylabel.substring(i, i + 1);\n int cwidth = _labelFontMetrics.stringWidth(nchar);\n graphics.drawString(nchar, charcenter - cwidth / 2, starty);\n starty += charheight;\n }\n }\n}\n"
"private AuthorityInfo parseAuthority(XmlPullParser parser, int version) {\n AuthorityInfo authority = null;\n int id = -1;\n try {\n id = Integer.parseInt(parser.getAttributeValue(null, \"String_Node_Str\"));\n } catch (NumberFormatException e) {\n Log.e(TAG, \"String_Node_Str\", e);\n } catch (NullPointerException e) {\n Log.e(TAG, \"String_Node_Str\", e);\n }\n if (id >= 0) {\n String accountName = parser.getAttributeValue(null, \"String_Node_Str\");\n String accountType = parser.getAttributeValue(null, \"String_Node_Str\");\n if (accountType == null) {\n accountType = \"String_Node_Str\";\n }\n String authorityName = parser.getAttributeValue(null, \"String_Node_Str\");\n String enabled = parser.getAttributeValue(null, \"String_Node_Str\");\n String syncable = parser.getAttributeValue(null, \"String_Node_Str\");\n authority = mAuthorities.get(id);\n if (DEBUG_FILE)\n Log.v(TAG, \"String_Node_Str\" + accountName + \"String_Node_Str\" + authorityName + \"String_Node_Str\" + enabled + \"String_Node_Str\" + syncable);\n if (authority == null) {\n if (DEBUG_FILE)\n Log.v(TAG, \"String_Node_Str\");\n authority = getOrCreateAuthorityLocked(new Account(accountName, accountType), authorityName, id, false);\n if (version > 0) {\n authority.periodicSyncs.clear();\n }\n }\n if (authority != null) {\n authority.enabled = enabled == null || Boolean.parseBoolean(enabled);\n if (\"String_Node_Str\".equals(syncable)) {\n authority.syncable = -1;\n } else {\n authority.syncable = (syncable == null || Boolean.parseBoolean(syncable)) ? 1 : 0;\n }\n } else {\n Log.w(TAG, \"String_Node_Str\" + accountName + \"String_Node_Str\" + authorityName + \"String_Node_Str\" + enabled + \"String_Node_Str\" + syncable);\n }\n }\n return authority;\n}\n"
"void toValueClick() {\n valueKeyboard.setInputTextView(toValue);\n valueKeyboard.setVisibility(View.VISIBLE);\n valueKeyboard.setEntry(toValue.getText().toString());\n toLayout.setAlpha(Constants.ACTIVE_ALPHA);\n fromLayout.setAlpha(Constants.INACTIVE_ALPHA);\n valueKeyboard.setSpendableValue(BigDecimal.ZERO);\n valueKeyboard.setMaxValue(MAX_BITCOIN_VALUE);\n scrollTo(toLayout.getBottom());\n}\n"
"public byte[] getAddress() {\n if (SettingsManager.instance().getForceIPAddress())\n return SettingsManager.instance().getForcedIPAddress();\n synchronized (Acceptor.class) {\n return _address;\n }\n}\n"
"protected void collectConParameters() {\n collectConFieldContextParameters(isCurrentHadoopVersionSupportYarn());\n collectAuthFieldContextParameters(kerberosBtn.getSelection());\n collectKeyTabContextParameters(kerberosBtn.getSelection() && keytabBtn.getSelection());\n if (useClouderaNaviBtn != null) {\n collectClouderaNavigatorFieldContextParameters(useClouderaNaviBtn.getSelection());\n }\n}\n"
"public static void onPlayerLoggedIn(PlayerEvent.PlayerLoggedInEvent event) {\n PlayerInformation playerInfo = (PlayerInformation) event.player.getCapability(CapabilityPlayerInformation.PLAYER_INFORMATION, null);\n Stats statsCap = (Stats) event.player.getCapability(CapabilityPlayerStats.STATS, null);\n if (playerInfo != null && playerInfo.getPlayerClass() == 0 && statsCap != null && statsCap.getMaxMana() == 0) {\n LootSlashConquer.network.sendTo(new PacketClassGui(), (EntityPlayerMP) event.player);\n statsCap.setMaxMana(100);\n statsCap.setMana(statsCap.getMaxMana());\n statsCap.setManaPerSecond(10);\n statsCap.setHealthPerSecond(1);\n statsCap.setMagicalPower(0);\n statsCap.setCriticalChance(0);\n statsCap.setCriticalDamage(0);\n LootSlashConquer.network.sendTo(new PacketUpdateStats(statsCap), (EntityPlayerMP) event.player);\n } else if (playerInfo != null && statsCap != null && playerInfo.getPlayerClass() > 0) {\n LootSlashConquer.network.sendTo(new PacketUpdateStats(statsCap), (EntityPlayerMP) event.player);\n LootSlashConquer.network.sendTo(new PacketUpdatePlayerInformation(playerInfo), (EntityPlayerMP) event.player);\n }\n}\n"
"public void configure() {\n bindScope(TestSingleton.class, TestScope.SINGLETON);\n CandlepinCache mockedCandlepinCache = mock(CandlepinCache.class);\n when(mockedCandlepinCache.getProductCache()).thenReturn(mock(Cache.class));\n when(mockedCandlepinCache.getStatusCache()).thenReturn(mock(StatusCache.class));\n bind(Configuration.class).toInstance(config);\n bind(CandlepinCache.class).toInstance(mockedCandlepinCache);\n CandlepinRequestScope requestScope = new CandlepinRequestScope();\n bindScope(CandlepinRequestScoped.class, requestScope);\n bindScope(RequestScoped.class, new TestingRequestScope());\n bind(CandlepinRequestScope.class).toInstance(requestScope);\n bind(X509ExtensionUtil.class);\n bind(ConsumerResource.class);\n bind(PoolResource.class);\n bind(EntitlementResource.class);\n bind(OwnerResource.class);\n bind(EnvironmentResource.class);\n bind(SubscriptionResource.class);\n bind(ActivationKeyResource.class);\n bind(ProductServiceAdapter.class).to(DefaultProductServiceAdapter.class);\n bind(ProductResource.class);\n bind(DateSource.class).to(DateSourceForTesting.class).asEagerSingleton();\n bind(Enforcer.class).to(EnforcerForTesting.class);\n bind(SubjectKeyIdentifierWriter.class).to(DefaultSubjectKeyIdentifierWriter.class);\n bind(PKIUtility.class).to(BouncyCastlePKIUtility.class);\n bind(PKIReader.class).to(PKIReaderForTesting.class).asEagerSingleton();\n bind(SubscriptionServiceAdapter.class).to(ImportSubscriptionServiceAdapter.class);\n bind(OwnerServiceAdapter.class).to(DefaultOwnerServiceAdapter.class);\n bind(EntitlementCertServiceAdapter.class).to(StubEntitlementCertServiceAdapter.class);\n bind(ManifestFileService.class).to(DBManifestService.class);\n bind(ContentAccessCertServiceAdapter.class).to(DefaultContentAccessCertServiceAdapter.class);\n bind(ScriptEngineProvider.class);\n bind(JobFactory.class).to(GuiceJobFactory.class);\n bind(JobListener.class).to(PinsetterJobListener.class);\n bind(UserServiceAdapter.class).to(DefaultUserServiceAdapter.class);\n bind(JsRunnerProvider.class).asEagerSingleton();\n bind(JsRunner.class).toProvider(JsRunnerProvider.class);\n bind(PrincipalProvider.class).to(TestPrincipalProvider.class);\n bind(Principal.class).toProvider(TestPrincipalProvider.class);\n bind(EventSink.class).to(NoopEventSinkImpl.class);\n bind(ExportExtensionAdapter.class).to(DefaultExportExtensionAdapter.class);\n bind(ResourceLocatorMap.class);\n bind(StoreFactory.class);\n VerifyAuthorizationFilterFactory amf = new VerifyAuthorizationFilterFactory();\n requestInjection(amf);\n authMethodInterceptor = new TestingInterceptor(amf);\n bind(TestingInterceptor.class).toInstance(authMethodInterceptor);\n bindInterceptor(Matchers.inPackage(Package.getPackage(\"String_Node_Str\")), new HttpMethodMatcher(), authMethodInterceptor);\n bind(CertificateRevocationListTask.class);\n bind(IdentityCertServiceAdapter.class).to(DefaultIdentityCertServiceAdapter.class);\n bind(PoolRules.class);\n bind(CriteriaRules.class);\n bind(PoolManager.class).to(CandlepinPoolManager.class);\n bind(UniqueIdGenerator.class).to(DefaultUniqueIdGenerator.class);\n bind(Function.class).annotatedWith(Names.named(\"String_Node_Str\")).to(ExpiryDateFunction.class).in(Singleton.class);\n bind(ModeManager.class).to(ModeManagerImpl.class).asEagerSingleton();\n bind(TriggerListener.class).to(PinsetterTriggerListener.class);\n}\n"
"public void selectARandomSwitch(String switchAlias) {\n List<Switch> switches = getUnaliasedSwitches();\n Assume.assumeFalse(\"String_Node_Str\", CollectionUtils.isEmpty(switches));\n Switch theSwitch = switches.get(0);\n log.info(\"String_Node_Str\", theSwitch.getDpId());\n topologyUnderTest.addAlias(switchAlias, theSwitch);\n}\n"
"public void onEvent(final IEvent<?> event) {\n if (event.getPayload() instanceof AjaxWizard.NewItemEvent) {\n final T item = ((AjaxWizard.NewItemEvent<T>) event.getPayload()).getItem();\n final AjaxRequestTarget target = ((AjaxWizard.NewItemEvent<T>) event.getPayload()).getTarget();\n if (event.getPayload() instanceof AjaxWizard.NewItemFinishEvent) {\n final T old = getActualItem(item, ListViewPanel.this.listOfItems);\n int indexOf = ListViewPanel.this.listOfItems.size();\n if (old != null) {\n indexOf = ListViewPanel.this.listOfItems.indexOf(old);\n ListViewPanel.this.listOfItems.remove(old);\n }\n }\n target.add(ListViewPanel.this);\n super.onEvent(event);\n } else if (event.getPayload() instanceof ListViewReload) {\n ((ListViewReload) event.getPayload()).getTarget().add(ListViewPanel.this);\n } else {\n super.onEvent(event);\n }\n}\n"
"public static List<Pipeline> createPipelineLatest(Pipeline pipeline, int noOfPipelines) {\n Task firstTask = pipeline.getStages().get(0).getTasks().get(0);\n AbstractProject firstProject = getProject(firstTask);\n List<Pipeline> result = new ArrayList<Pipeline>();\n Iterator it = firstProject.getBuilds().iterator();\n for (int i = 0; i < noOfPipelines && it.hasNext(); i++) {\n AbstractBuild firstBuild = (AbstractBuild) it.next();\n List<Change> changes = getChanges(firstBuild);\n String timestamp = PipelineUtils.formatTimestamp(firstBuild.getTimeInMillis());\n List<Stage> stages = new ArrayList<Stage>();\n for (Stage stage : pipeline.getStages()) {\n List<Task> tasks = new ArrayList<Task>();\n for (Task task : stage.getTasks()) {\n AbstractProject<?, ?> taskProject = getProject(task);\n AbstractBuild currentBuild = match(taskProject.getBuilds(), firstBuild);\n tasks.add(getTask(task, currentBuild));\n }\n stages.add(new Stage(stage.getName(), tasks));\n }\n result.add(new Pipeline(pipeline.getName(), firstBuild.getDisplayName(), changes, timestamp, getTriggeredBy(firstBuild), stages, false));\n }\n return result;\n}\n"
"public void send(EventList events, int retriesLeft) throws Exception {\n if (_subject != null) {\n publish(_subject, events);\n } else {\n if (retriesLeft == -1) {\n retriesLeft = _node.getMaxRetries();\n }\n _executor.execute(new EPNTask(_network, _nodeName, _node, _source, events, retriesLeft, this));\n }\n}\n"
"private void importDataInit(App app) {\n String lang = getLanguage(app);\n if (lang == null) {\n return app;\n }\n importData(app, DIR_INIT);\n app = appRepo.find(app.getId());\n app.setInitDataLoaded(true);\n saveApp(app);\n}\n"
"public void onSuccess(Void arg0) {\n clientFactory.getShellView().getFooterView().showStatus(StatusType.NONE, \"String_Node_Str\" + value + \"String_Node_Str\", 60000);\n reloadCurrentRange();\n}\n"
"private boolean isQuarriableBlock(int bx, int by, int bz) {\n Block block = worldObj.getBlock(bx, by, bz);\n return BlockUtils.canChangeBlock(block, worldObj, bx, by, bz) && BlockUtils.isAnObstructingBlock(block, worldObj, bx, by, bz);\n}\n"
"protected void decode(ChannelHandlerContext ctx, ByteBuf buf, List<Object> list) throws Exception {\n ByteBuf decrypt = buf;\n NetCrypto crypto = this.client.getCryptoModule();\n if (crypto != null) {\n decrypt = ctx.alloc().buffer();\n crypto.decrypt(buf, decrypt);\n }\n int fullLen = rvint(decrypt);\n ByteBuf decompressed;\n if (this.client.doCompression()) {\n int uncompressed = rvint(decrypt);\n if (uncompressed != 0) {\n if (uncompressed < TridentServer.cfg().compressionThresh()) {\n this.client.disconnect(\"String_Node_Str\");\n return;\n }\n decompressed = ctx.alloc().buffer();\n byte[] in = arr(decrypt, fullLen - BigInteger.valueOf(uncompressed).toByteArray().length);\n Inflater inflater = INFLATER.get();\n inflater.setInput(in);\n byte[] buffer = new byte[NetClient.BUFFER_SIZE];\n while (!inflater.finished()) {\n int bytes = inflater.inflate(buffer);\n decompressed.writeBytes(buffer, 0, bytes);\n }\n inflater.reset();\n } else {\n decompressed = decrypt.readBytes(fullLen - OutEncoder.VINT_LEN);\n }\n } else {\n decompressed = decrypt.readBytes(fullLen);\n }\n try {\n int id = rvint(decompressed);\n Class<? extends Packet> cls = PacketRegistry.byId(this.client.getState(), Packet.Bound.SERVER, id);\n PacketIn packet = PacketRegistry.make(cls);\n LOGGER.debug(\"String_Node_Str\" + packet.getClass().getSimpleName());\n packet.read(decompressed, this.client);\n } finally {\n decompressed.release();\n if (decrypt != buf) {\n decrypt.release();\n }\n }\n}\n"
"public final boolean zoomIn() {\n if (bStepFixed) {\n return false;\n }\n if (ChartUtil.mathEqual(0, ((Number) oStep).doubleValue())) {\n return false;\n }\n if ((iType & NUMERICAL) == NUMERICAL) {\n if ((iType & LOGARITHMIC) == LOGARITHMIC) {\n final double dStep = asDouble(oStep).doubleValue();\n if ((Math.log(dStep) / LOG_10) > 1) {\n setStep(new Double(dStep / 10));\n } else {\n int n = iaLogarithmicDeltas.length;\n for (int i = n - 1; i >= 0; i--) {\n if ((int) dStep == iaLogarithmicDeltas[i]) {\n if (i > 0) {\n oStep = new Double(iaLogarithmicDeltas[i - 1]);\n return true;\n } else {\n return false;\n }\n }\n }\n return false;\n }\n } else if ((iType & LINEAR) == LINEAR) {\n double dStep = asDouble(oStep).doubleValue();\n final double oldStep = dStep;\n if (bIntegralZoom) {\n double dPower = (Math.log(dStep) / LOG_10);\n dPower = Math.floor(dPower);\n dPower = Math.pow(10.0, dPower);\n dStep /= dPower;\n dStep = Math.round(dStep);\n int n = iaLinearDeltas.length;\n for (int i = 0; i < n; i++) {\n if ((int) dStep == iaLinearDeltas[i]) {\n if (i > 0) {\n dStep = iaLinearDeltas[i - 1] * dPower;\n } else {\n dPower /= 10;\n dStep = iaLinearDeltas[n - 2] * dPower;\n }\n break;\n }\n }\n if (dStep == oldStep) {\n dStep /= 2;\n }\n oStep = new Double(dStep);\n } else {\n dStep /= 2;\n oStep = new Double(dStep);\n }\n if (((Number) oStep).doubleValue() < dPrecision) {\n oStep = new Double(oldStep);\n return false;\n }\n }\n } else if ((iType & DATE_TIME) == DATE_TIME) {\n int[] ia = null;\n int iStep = asInteger(oStep);\n int iUnit = asInteger(oUnit);\n for (int icu = 0; icu < iaCalendarUnits.length; icu++) {\n if (iUnit == iaCalendarUnits[icu]) {\n ia = iaCalendarDeltas[icu];\n if (ia == null) {\n iStep--;\n if (iStep == 0) {\n oStep = new Integer(iaMonthDeltas[iaMonthDeltas.length - 1]);\n oUnit = new Integer(Calendar.MONTH);\n }\n } else {\n int i = 0;\n for (; i < ia.length; i++) {\n if (ia[i] == iStep) {\n break;\n }\n }\n if (i == 0) {\n if (icu <= iMinUnit) {\n return false;\n }\n ia = iaCalendarDeltas[icu - 1];\n i = ia.length;\n oUnit = new Integer(iaCalendarUnits[icu - 1]);\n }\n oStep = new Integer(ia[i - 1]);\n break;\n }\n }\n }\n }\n return true;\n}\n"
"private void applyMacroBlockLimits(int maxHorizontalBlocks, int maxVerticalBlocks, int maxBlocks, long maxBlocksPerSecond, int blockWidth, int blockHeight, int widthAlignment, int heightAlignment) {\n applyAlignment(widthAlignment, heightAlignment);\n applyBlockLimits(blockWidth, blockHeight, Range.create(1, maxBlocks), Range.create(1L, maxBlocksPerSecond), Range.create(new Rational(1, maxVerticalBlocks), new Rational(maxHorizontalBlocks, 1)));\n mHorizontalBlockRange = mHorizontalBlockRange.intersect(Utils.divUp(minHorizontalBlocks, (mBlockWidth / blockWidth)), maxHorizontalBlocks / (mBlockWidth / blockWidth));\n mVerticalBlockRange = mVerticalBlockRange.intersect(Utils.divUp(minVerticalBlocks, (mBlockHeight / blockHeight)), maxVerticalBlocks / (mBlockHeight / blockHeight));\n}\n"
"public static Request parse(final byte[] bytes) throws ClassNotFoundException, UnsupportedVersionException {\n ByteBuffer buff = ByteBuffer.wrap(bytes);\n final byte ver = buff.get();\n final Version version = Version.get(ver);\n if (version.ordinal() != Version.v1.ordinal() && version.ordinal() != Version.v3.ordinal()) {\n throw new UnsupportedVersionException(\"String_Node_Str\" + version.toString(), UnsupportedVersionException.IncompatibleVersion);\n }\n final byte reserved = buff.get();\n final short flags = buff.getShort();\n final boolean isRequest = (flags & FLAG_REQUEST) > 0;\n final long seq = buff.getLong();\n final int size = buff.getInt();\n final long mgmtId = buff.getLong();\n final long agentId = buff.getLong();\n long via;\n if (version.ordinal() == Version.v1.ordinal()) {\n via = buff.getLong();\n } else {\n via = agentId;\n }\n byte[] command = null;\n int offset = 0;\n if (buff.hasArray()) {\n command = buff.array();\n offset = buff.arrayOffset() + buff.position();\n } else {\n command = new byte[buff.remaining()];\n buff.get(command);\n offset = 0;\n }\n final String content = new String(command, offset, command.length - offset);\n if (isRequest) {\n return new Request(version, seq, agentId, mgmtId, via, flags, content);\n } else {\n return new Response(Version.get(ver), seq, agentId, mgmtId, via, flags, content);\n }\n}\n"
"public void updateRunningAccounts() {\n if (Log.isLoggable(TAG, Log.VERBOSE))\n Log.v(TAG, \"String_Node_Str\");\n Message m = mSyncHandler.obtainMessage(SyncHandler.MESSAGE_ACCOUNTS_UPDATED);\n m.arg1 = resyncAllTargets ? 1 : 0;\n m.sendToTarget();\n}\n"
"public Collection<BaseComponent> getBodyComponents() {\n Part part = getBodyPart();\n List<BaseComponent> baseComponents = new ArrayList<>();\n if (part == null)\n return baseComponents;\n int startPos = form.getPartStartYPos(part.getID());\n int endPos = part.getHeight();\n Iterator<IPersist> it = form.getAllObjects(PositionComparator.XY_PERSIST_COMPARATOR);\n while (it.hasNext()) {\n IPersist persist = it.next();\n if (persist instanceof GraphicalComponent && isTableView && ((GraphicalComponent) persist).getLabelFor() != null)\n continue;\n if (persist instanceof BaseComponent && formElementValidator.isComponentSpecValid((BaseComponent) persist)) {\n Point location = ((BaseComponent) persist).getLocation();\n if (startPos <= location.y && endPos >= location.y) {\n baseComponents.add((BaseComponent) persist);\n }\n }\n }\n return baseComponents;\n}\n"
"private void saveResultIterator(IResultIterator odiResult, int groupLevel, int[] subQueryInfo) throws DataException {\n try {\n boolean isSubQuery = streamManager.isSubquery();\n OutputStream streamForResultClass = null;\n if (isSubQuery == false)\n streamForResultClass = streamManager.getOutStream(DataEngineContext.RESULTCLASS_STREAM);\n OutputStream streamForGroupInfo = streamManager.getOutStream(DataEngineContext.GROUP_INFO_STREAM);\n OutputStream streamForExprValue = null;\n OutputStream streamForRowLen = null;\n if (context.getMode() == DataEngineContext.PRESENTATION_AND_GENERATION) {\n streamForExprValue = streamManager.getOutStream(DataEngineContext.EXPR_VALUE_STREAM);\n streamForRowLen = streamManager.getOutStream(DataEngineContext.ROWLENGTH_INFO_STREAM);\n }\n odiResult.doSave(streamForExprValue, streamForRowLen, streamForResultClass, null, streamForGroupInfo, isSubQuery, RDSave.this.exprNameSet);\n if (streamForExprValue != null) {\n streamForExprValue.close();\n streamForRowLen.close();\n }\n streamForGroupInfo.close();\n if (streamForResultClass != null)\n streamForResultClass.close();\n if (isSubQuery == true && streamManager.hasSubStream(DataEngineContext.SUBQUERY_INFO_STREAM) == false) {\n OutputStream streamForSubQuery = streamManager.getSubOutStream(DataEngineContext.SUBQUERY_INFO_STREAM);\n RDSubQueryUtil.doSave(streamForSubQuery, groupLevel, subQueryInfo);\n streamForSubQuery.close();\n }\n } catch (IOException e) {\n throw new DataException(ResourceConstants.RD_SAVE_ERROR, e, \"String_Node_Str\");\n }\n}\n"
"public Value computeValue(CSSStylableElement elt, CSSEngine engine, int idx, Value value) {\n if (value.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) {\n CSSPrimitiveValue pvalue = (CSSPrimitiveValue) value;\n int primitiveType = pvalue.getPrimitiveType();\n if (primitiveType == CSSPrimitiveValue.CSS_IDENT) {\n String ident = pvalue.getStringValue();\n Value v = (Value) computedValues.get(ident);\n if (v != null) {\n return v;\n }\n if (values.get(ident) == null) {\n throw new InternalError();\n }\n return (Value) engine.getCSSContext().getSystemColor(ident);\n }\n }\n return super.computeValue(elt, engine, idx, value);\n}\n"
"public int hashCode() {\n return Objects.hash(categoryGuid, parentCategoryGuid, relationGuid, description);\n}\n"
"public static ArrayList<ItemStack> getAllPlantFruits(ItemSeeds seed, World world, int x, int y, int z, int gain, int meta) {\n Block plant = getPlant(seed);\n ArrayList<ItemStack> items = new ArrayList<ItemStack>();\n if (plant instanceof BlockModPlant) {\n items.addAll(((BlockModPlant) plant).getFruits());\n } else if (ModIntegration.LoadedMods.chococraft && seed instanceof ItemGysahlSeeds) {\n items.addAll(ChococraftHelper.getFruits());\n } else {\n items = (ArrayList<ItemStack>) getFruitsFromOreDict(seed, meta);\n }\n if (items == null || items.size() == 0) {\n items = getPlantFruits(seed, world, x, y, z, gain, meta);\n }\n return items;\n}\n"
"protected Command getCreateCommand(CreateRequest request) {\n EditPart after;\n if (getLocationFromRequest(request) == null) {\n after = null;\n } else {\n after = getInsertionReference(request);\n }\n Object model = this.getHost().getModel();\n Object newObject = request.getExtendedData().get(DesignerConstants.KEY_NEWOBJECT);\n if (model instanceof CrosstabCellAdapter) {\n int type = getAreaType((CrosstabCellAdapter) model);\n String position = ((CrosstabCellAdapter) model).getPositionType();\n if ((newObject instanceof DimensionHandle || newObject instanceof LevelHandle) && (type == ICrosstabConstants.COLUMN_AXIS_TYPE || type == ICrosstabConstants.ROW_AXIS_TYPE)) {\n Object afterObj = after == null ? null : after.getModel();\n if (newObject instanceof LevelHandle) {\n DimensionHandle dimensionHandle = CrosstabAdaptUtil.getDimensionHandle((LevelHandle) newObject);\n AddDimensionViewHandleCommand command = new AddDimensionViewHandleCommand((CrosstabCellAdapter) model, type, dimensionHandle, afterObj);\n command.setLevelHandles(new LevelHandle[] { (LevelHandle) newObject });\n return command;\n }\n return new AddDimensionViewHandleCommand((CrosstabCellAdapter) model, type, (DimensionHandle) newObject, afterObj);\n } else if (newObject instanceof MeasureHandle && position.equals(ICrosstabCellAdapterFactory.CELL_MEASURE)) {\n Object afterObj = null;\n if (after != null) {\n afterObj = after.getModel();\n }\n return new AddMeasureViewHandleCommand((CrosstabCellAdapter) model, (MeasureHandle) newObject, afterObj);\n } else if (newObject instanceof MeasureGroupHandle && position.equals(ICrosstabCellAdapterFactory.CELL_MEASURE)) {\n List list = new ArrayList();\n list.add(newObject);\n Object afterObj = null;\n if (after != null) {\n afterObj = after.getModel();\n }\n return new AddMultipleMeasureCommand((CrosstabCellAdapter) model, list, afterObj);\n } else if (newObject instanceof Object[] && CrosstabAdaptUtil.canCreateMultipleCommand((Object[]) newObject) && position.equals(ICrosstabCellAdapterFactory.CELL_MEASURE)) {\n List list = new ArrayList();\n Object[] objs = (Object[]) newObject;\n for (int i = 0; i < objs.length; i++) {\n list.add(objs[i]);\n }\n Object afterObj = null;\n if (after != null) {\n afterObj = after.getModel();\n }\n return new AddMultipleMeasureCommand((CrosstabCellAdapter) model, list, afterObj);\n } else if (isLevelHandles(newObject)) {\n Object[] items = (Object[]) newObject;\n LevelHandle[] levelHandles = new LevelHandle[items.length];\n System.arraycopy(items, 0, levelHandles, 0, levelHandles.length);\n Object afterObj = after == null ? null : after.getModel();\n DimensionHandle dimensionHandle = CrosstabAdaptUtil.getDimensionHandle(levelHandles[0]);\n AddDimensionViewHandleCommand command = new AddDimensionViewHandleCommand((CrosstabCellAdapter) model, type, dimensionHandle, afterObj);\n command.setLevelHandles(levelHandles);\n return command;\n } else {\n CrosstabCellCreateCommand command = new CrosstabCellCreateCommand(request.getExtendedData());\n command.setParent(getHost().getModel());\n command.setAfter(after == null ? null : after.getModel());\n return command;\n }\n }\n return super.getCreateCommand(request);\n}\n"
"private String updateVertexLabels(String currentLabel, SchemaTable schemaTable) {\n if (StringUtils.isEmpty(currentLabel) || currentLabel.equals(this.sqlDialect.getBatchNull())) {\n return schemaTable.toString();\n } else if (currentLabel.equals(schemaTable.toString()) || currentLabel.startsWith(schemaTable.toString() + SchemaManager.LABEL_SEPERATOR) || currentLabel.contains(SchemaManager.LABEL_SEPERATOR + schemaTable.toString() + SchemaManager.LABEL_SEPERATOR) || currentLabel.endsWith(schemaTable.toString() + SchemaManager.LABEL_SEPERATOR)) {\n return currentLabel;\n } else {\n return currentLabel + SchemaManager.LABEL_SEPERATOR + schemaTable.toString();\n }\n}\n"
"public Result createSession(HttpClient client, Command command) throws IOException {\n Capabilities desiredCapabilities = (Capabilities) command.getParameters().get(\"String_Node_Str\");\n Capabilities desired = desiredCapabilities == null ? new ImmutableCapabilities() : desiredCapabilities;\n int threshold = (int) Math.min(Runtime.getRuntime().freeMemory() / 10, Integer.MAX_VALUE);\n FileBackedOutputStream os = new FileBackedOutputStream(threshold);\n try {\n CountingOutputStream counter = new CountingOutputStream(os);\n Writer writer = new OutputStreamWriter(counter, UTF_8);\n NewAppiumSessionPayload payload = NewAppiumSessionPayload.create(desired);\n payload.writeTo(writer);\n try (InputStream rawIn = os.asByteSource().openBufferedStream();\n BufferedInputStream contentStream = new BufferedInputStream(rawIn)) {\n Method createSessionMethod = this.getClass().getSuperclass().getDeclaredMethod(\"String_Node_Str\", HttpClient.class, InputStream.class, long.class);\n createSessionMethod.setAccessible(true);\n Optional<Result> result = (Optional<Result>) createSessionMethod.invoke(this, client, contentStream, counter.getCount());\n return result.map(result1 -> {\n Result toReturn = result.get();\n getLogger(ProtocolHandshake.class.getName()).info(format(\"String_Node_Str\", toReturn.getDialect()));\n return toReturn;\n }).orElseThrow(() -> new SessionNotCreatedException(format(\"String_Node_Str\", desired)));\n } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {\n throw new WebDriverException(format(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", HttpClient.class.getSimpleName(), InputStream.class.getSimpleName(), long.class.getSimpleName()), e);\n }\n } finally {\n os.reset();\n }\n}\n"
"public void keyPressed(KeyEvent e) {\n switch(e.getKeyCode()) {\n case KeyEvent.VK_UP:\n break;\n case KeyEvent.VK_DOWN:\n break;\n case KeyEvent.VK_ENTER:\n menu.removeKeyListener(this);\n menu.remove(menu);\n EventConnect.dispatch(new GameEvent(\"String_Node_Str\", new Object[] { stage, \"String_Node_Str\" }));\n break;\n case KeyEvent.VK_ESCAPE:\n menu.removeKeyListener(roleMenuKeyListener);\n menu.addKeyListener(mainMenuKeyListener);\n drawMenu();\n break;\n }\n}\n"
"public void complete(CompleteOperation co) {\n List<String> candidates = new ArrayList<>();\n int offset = completer.complete(cmdCtx, co.getBuffer(), co.getCursor(), candidates);\n co.setOffset(offset);\n co.setCompletionCandidates(candidates);\n String buffer = cmdCtx.getArgumentsString() == null ? co.getBuffer() : ctx.getArgumentsString() + co.getBuffer();\n if (co.getCompletionCandidates().size() == 1 && co.getCompletionCandidates().get(0).getCharacters().startsWith(buffer))\n co.doAppendSeparator(true);\n else\n co.doAppendSeparator(false);\n}\n"
"public String accessToken() {\n synchronized (accessTokenLock) {\n Optional<Validation<AccessToken>> token = waitForTokenAndClearIfExpired();\n if (!token.isPresent()) {\n Log.warn(\"String_Node_Str\");\n beginRefresh();\n token = waitForTokenAndClearIfExpired();\n }\n Validation<AccessToken> tokenValidation = accessToken.get();\n if (tokenValidation.isError()) {\n beginRefresh(false);\n throw tokenValidation.exception();\n }\n AccessToken token = tokenValidation.value();\n if (token.remainingMs().isPresent()) {\n if (token.remainingMs().get() < Defaults.tokenAboutToExpireMs) {\n beginRefresh(true);\n }\n }\n return token.accessToken();\n }\n}\n"
"public void config() {\n MockitoAnnotations.initMocks(this);\n requestStarted = new VRaptorRequestStarted(chain, webRequest, webResponse);\n observer = new RequestHandlerObserver(translator, notFoundHandler, methodNotAllowedHandler, controllerFoundEvent, requestSucceededEvent, interceptorStack, invalidInputHandler);\n}\n"
"private Response executeSseCommand(CommandName commandName, Payload.Inbound inbound, ParameterMap params, String modelETag, Cookie jSessionId) throws WebApplicationException {\n if (RestLogging.restLogger.isLoggable(Level.FINEST)) {\n RestLogging.restLogger.log(Level.FINEST, \"String_Node_Str\", commandName);\n }\n CommandModel model = getCommandModel(commandName);\n checkCommandModelETag(model, modelETag);\n boolean notifyOption = false;\n if (params != null) {\n notifyOption = params.containsKey(\"String_Node_Str\");\n }\n final CommandRunner.CommandInvocation commandInvocation = getCommandRunner().getCommandInvocation(commandName.getScope(), commandName.getName(), new PropsFileActionReporter(), getSubject(), notifyOption);\n if (inbound != null) {\n commandInvocation.inbound(inbound);\n }\n commandInvocation.outbound(new RestPayloadImpl.Outbound(false)).managedJob().parameters(params);\n ResponseBuilder rb = Response.status(HttpURLConnection.HTTP_OK);\n if (isSingleInstanceCommand(model)) {\n rb.cookie(getJSessionCookie(jSessionId));\n }\n rb.entity(SseCommandHelper.invokeAsync(commandInvocation, null));\n return rb.build();\n}\n"
"public void setStackTrace(String stackTrace) {\n this.stackTrace = \"String_Node_Str\" + stackTrace;\n}\n"
"private void delete() {\n try {\n String fullname = getQueueFullName(\"String_Node_Str\", queueName);\n ionic.Msmq.Queue.delete(fullname);\n } catch (MessageQueueException ex1) {\n throw new MessageQueueException(\"String_Node_Str\" + ex1, ex1.hresult);\n }\n}\n"
"private static RequestEntity buildMultiPartEntity(final IContext context, final IMendixObject source, Map<String, String> params) throws IOException, CoreException {\n List<Part> parts = Lists.newArrayList();\n if (Core.isSubClassOf(FileDocument.entityName, source.getType())) {\n String partName = getFileDocumentFileName(context, source);\n if (partName == null || partName.isEmpty())\n throw new IllegalArgumentException(\"String_Node_Str\");\n addFilePart(context, partName, source, parts);\n }\n for (String name : getAssociationsReferingToFileDocs(source.getMetaObject())) {\n IMendixIdentifier subObject = (IMendixIdentifier) source.getValue(context, name);\n params.remove(Utils.getShortMemberName(name));\n if (subObject != null) {\n addFilePart(context, Utils.getShortMemberName(name), Core.retrieveId(context, subObject), parts);\n }\n }\n for (Entry<String, String> e : params.entrySet()) {\n parts.add(new StringPart(e.getKey(), e.getValue(), RestServices.UTF8));\n }\n params.clear();\n return new MultipartRequestEntity(parts.toArray(new Part[0]), new HttpMethodParams());\n}\n"
"public void onErrorResponse(VolleyError error) {\n ArtworkImageView v = reference.get();\n if (v == null) {\n Timber.w(\"String_Node_Str\");\n return;\n }\n if (v.mErrorImageId != 0) {\n v.setImageResource(v.mErrorImageId);\n }\n}\n"
"public void processChild(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord, Attributes atts, XMLDescriptor xmlDescriptor, DatabaseMapping mapping) throws SAXException {\n if (xmlDescriptor == null) {\n DescriptorNotFoundContentHandler handler = new DescriptorNotFoundContentHandler(unmarshalRecord, mapping);\n String qnameString = xPathFragment.getLocalName();\n if (xPathFragment.getPrefix() != null) {\n qnameString = xPathFragment.getPrefix() + XMLConstants.COLON + qnameString;\n }\n handler.startElement(xPathFragment.getNamespaceURI(), xPathFragment.getLocalName(), qnameString, atts);\n XMLReader xmlReader = unmarshalRecord.getXMLReader();\n xmlReader.setContentHandler(handler);\n xmlReader.setLexicalHandler(handler);\n return;\n }\n if (xmlDescriptor.hasInheritance()) {\n unmarshalRecord.setAttributes(atts);\n AbstractSession session = unmarshalRecord.getSession();\n Class classValue = xmlDescriptor.getInheritancePolicy().classFromRow(unmarshalRecord, session);\n if (classValue == null) {\n XPathQName leafElementType = unmarshalRecord.getLeafElementType();\n if (leafElementType != null) {\n Object indicator = xmlDescriptor.getInheritancePolicy().getClassIndicatorMapping().get(leafElementType);\n if (indicator != null) {\n classValue = (Class) indicator;\n }\n }\n }\n if (classValue != null) {\n xmlDescriptor = (XMLDescriptor) unmarshalRecord.getSession().getDescriptor(classValue);\n } else {\n if (Modifier.isAbstract(xmlDescriptor.getJavaClass().getModifiers())) {\n throw DescriptorException.missingClassIndicatorField(unmarshalRecord, xmlDescriptor.getInheritancePolicy().getDescriptor());\n }\n }\n }\n TreeObjectBuilder targetObjectBuilder = (TreeObjectBuilder) xmlDescriptor.getObjectBuilder();\n UnmarshalRecord childRecord = unmarshalRecord.getChildUnmarshalRecord(targetObjectBuilder);\n unmarshalRecord.setChildRecord(childRecord);\n childRecord.setAttributes(atts);\n childRecord.startDocument();\n childRecord.initializeRecord(null);\n childRecord.startElement(xPathFragment.getNamespaceURI(), xPathFragment.getLocalName(), xPathFragment.getShortName(), atts);\n XMLReader xmlReader = unmarshalRecord.getXMLReader();\n xmlReader.setContentHandler(childRecord);\n xmlReader.setLexicalHandler(childRecord);\n}\n"
"public void preInit(FMLPreInitializationEvent event) {\n super.preInit(event);\n NetworkRegistry.instance().registerGuiHandler(this, ZhuYaoGangShao.proxy);\n MinecraftForge.EVENT_BUS.register(this);\n ZhuYaoBase.CONFIGURATION.load();\n blockTurret = new BlockTurret(BLOCK_ID_PREFIX);\n blockPlatform = new BlockTurretPlatform(BLOCK_ID_PREFIX + 1);\n itemAmmo = new ItemAmmo(ITEM_ID_PREFIX + 1);\n itemUpgrades = new ItPaoTaiUpgrades(ITEM_ID_PREFIX + 2);\n ZhuYaoBase.CONFIGURATION.save();\n bulletShell = new ItemStack(itemAmmo, 1, 0);\n conventionalBullet = new ItemStack(itemAmmo, 1, 1);\n railgunBullet = new ItemStack(itemAmmo, 1, 2);\n antimatterBullet = new ItemStack(itemAmmo, 1, 3);\n GameRegistry.registerBlock(blockTurret, ItemBlockTurret.class, \"String_Node_Str\");\n GameRegistry.registerBlock(blockPlatform, \"String_Node_Str\");\n EntityRegistry.registerGlobalEntityID(EJia.class, \"String_Node_Str\", EntityRegistry.findGlobalUniqueEntityId());\n EntityRegistry.registerModEntity(EJia.class, \"String_Node_Str\", ENTITY_ID_PREFIX + 7, this, 50, 5, true);\n EntityRegistry.registerGlobalEntityID(EntityTileDamage.class, \"String_Node_Str\", EntityRegistry.findGlobalUniqueEntityId());\n EntityRegistry.registerModEntity(EntityTileDamage.class, \"String_Node_Str\", ENTITY_ID_PREFIX + 8, this, 50, 5, true);\n ICBMTab.itemStack = new ItemStack(blockTurret);\n proxy.preInit();\n}\n"
"protected Node cloneNode(boolean deep) {\n Node node = new Node(type, textarray, start, end);\n node.parent = parent;\n node.closed = closed;\n node.implicit = implicit;\n node.tag = tag;\n node.element = element;\n if (attributes != null) {\n node.attributes = (AttVal) attributes.clone();\n }\n if (deep) {\n Node child;\n Node newChild;\n for (child = this.content; child != null; child = child.next) {\n newChild = child.cloneNode(deep);\n node.insertNodeAtEnd(newChild);\n }\n }\n return node;\n}\n"
"public void onMessage(Object msg) {\n if (msg != null && msg instanceof JoinInfo) {\n JoinInfo joinInfo = (JoinInfo) msg;\n if (node.address != null && !node.address.equals(joinInfo.address)) {\n boolean validJoinRequest;\n try {\n validJoinRequest = node.validateJoinRequest(joinInfo);\n } catch (Exception e) {\n validJoinRequest = false;\n }\n if (validJoinRequest) {\n if (node.isMaster() && node.isActive() && node.joined()) {\n if (joinInfo.isRequest()) {\n node.multicastService.send(joinInfo.copy(false, node.address, node.getClusterImpl().getMembers().size()));\n }\n } else {\n if (!node.joined() && !joinInfo.isRequest()) {\n if (node.masterAddress == null) {\n final String masterHost = joinInfo.address.getHost();\n if (trustedInterfaces.isEmpty() || AddressUtil.matchAnyInterface(masterHost, trustedInterfaces)) {\n node.masterAddress = new Address(joinInfo.address);\n }\n }\n } else if (joinInfo.isRequest()) {\n Joiner joiner = node.getJoiner();\n if (joiner instanceof MulticastJoiner) {\n MulticastJoiner mjoiner = (MulticastJoiner) joiner;\n mjoiner.onReceivedJoinInfo(joinInfo);\n }\n }\n }\n }\n }\n }\n}\n"
"public WSItemPK putItem(WSPutItem wsPutItem) throws RemoteException {\n try {\n String projection = wsPutItem.getXmlString();\n Element root = Util.parse(projection).getDocumentElement();\n String concept = root.getLocalName();\n DataModelPOJO dataModel = Util.getDataModelCtrlLocal().getDataModel(new DataModelPOJOPK(wsPutItem.getWsDataModelPK().getPk()));\n Document schema = Util.parse(dataModel.getSchema());\n XSDKey conceptKey = com.amalto.core.util.Util.getBusinessConceptKey(schema, concept);\n String[] itemKeyValues = com.amalto.core.util.Util.getKeyValuesFromItem(root, conceptKey);\n if (conceptKey.getFields().length == 1) {\n Element conceptRoot = Util.parse(projection).getDocumentElement();\n if (Util.getNodeList(conceptRoot, \"String_Node_Str\" + concept + \"String_Node_Str\" + conceptKey.getFields()[0]).getLength() == 0) {\n Element rootNS = Util.getRootElement(\"String_Node_Str\", schema.getDocumentElement().getNamespaceURI(), \"String_Node_Str\");\n NodeList complexLists = Util.getNodeList(schema.getDocumentElement(), \"String_Node_Str\", rootNS.getNamespaceURI(), \"String_Node_Str\");\n List<UUIDKey> keys = new ArrayList<UUIDKey>();\n for (int i = 0; i < complexLists.getLength(); i++) {\n Element element = (Element) complexLists.item(i);\n UUIDKey uuidKey = Util.getUUIDKey(element);\n if (uuidKey != null) {\n keys.add(uuidKey);\n if (i == 0) {\n itemKeyValues = new String[] { uuidKey.getUuidValue() };\n }\n }\n }\n if (keys.size() > 0) {\n projection = Util.getProjectXMLString(keys.toArray(new UUIDKey[keys.size()]), projection);\n }\n }\n }\n DataClusterPOJOPK dcpk = new DataClusterPOJOPK(wsPutItem.getWsDataClusterPK().getPk());\n ItemPOJOPK itemPOJOPK = Util.getItemCtrl2Local().putItem(new ItemPOJO(dcpk, concept, itemKeyValues, System.currentTimeMillis(), projection), dataModel);\n if (itemPOJOPK == null)\n return null;\n Util.getDataClusterCtrlLocal().getDataCluster(dcpk).addToVocabulary(projection);\n return new WSItemPK(new WSDataClusterPK(itemPOJOPK.getDataClusterPOJOPK().getUniqueId()), itemPOJOPK.getConceptName(), itemPOJOPK.getIds());\n } catch (XtentisException e) {\n String err = \"String_Node_Str\" + e.getMessage();\n org.apache.log4j.Logger.getLogger(this.getClass()).debug(err, e);\n throw (new RemoteException(e.getLocalizedMessage()));\n } catch (Exception e) {\n String err = \"String_Node_Str\" + e.getMessage();\n org.apache.log4j.Logger.getLogger(this.getClass()).debug(err, e);\n throw new RemoteException((e.getCause() == null ? e.getLocalizedMessage() : e.getCause().getLocalizedMessage()));\n }\n}\n"
"private void addEEOrDeclaredPermissions(ClassLoader cloader, final PermissionCollection pc, final boolean isEEPermission) {\n if (!(cloader instanceof DDPermissionsLoader))\n return;\n final DDPermissionsLoader ddpl = (DDPermissionsLoader) cloader;\n try {\n AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {\n\n public Object run() throws SecurityException {\n if (isEEPermission)\n ddpl.addEEPermissions(pc);\n else\n ddpl.addDeclaredPermissions(pc);\n return null;\n }\n });\n } catch (PrivilegedActionException e) {\n throw (SecurityException) e.getException();\n }\n}\n"
"public LinkedList<WOD> getWODsFromTo(String from, String to) {\n LinkedList<WOD> resultList = new LinkedList<WOD>();\n int start, i = 0;\n int end = 0;\n for (i = 0; i < wods.size(); i++) {\n if (wods.get(i).getYear() == Integer.parseInt(from.substring(4, 8))) {\n if (wods.get(i).getMonth() > Integer.parseInt(from.substring(2, 4))) {\n break;\n } else if (wods.get(i).getMonth() == Integer.parseInt(from.substring(2, 4))) {\n if (wods.get(i).getDay() >= Integer.parseInt(from.substring(0, 2))) {\n break;\n }\n }\n }\n if (wods.get(i).getYear() > Integer.parseInt(from.substring(4, 8))) {\n break;\n }\n }\n start = i;\n for (i = 0; i < wods.size(); i++) {\n if (wods.get(i).getYear() == Integer.parseInt(to.substring(4, 8))) {\n if (wods.get(i).getMonth() > Integer.parseInt(to.substring(2, 4))) {\n break;\n } else if (wods.get(i).getMonth() == Integer.parseInt(to.substring(2, 4))) {\n if (wods.get(i).getDay() >= Integer.parseInt(to.substring(0, 2))) {\n break;\n }\n }\n }\n if (wods.get(i).getYear() > Integer.parseInt(to.substring(4, 8))) {\n break;\n }\n }\n end = i;\n for (i = 0; start <= end; start++) {\n resultList.add(wods.get(start));\n }\n WOD checkFirst = resultList.get(0);\n if (checkFirst.getYear() < Integer.parseInt(from.substring(4, 8))) {\n resultList.clear();\n } else if (checkFirst.getYear() == Integer.parseInt(from.substring(4, 8))) {\n if (checkFirst.getMonth() < Integer.parseInt(from.substring(0, 2))) {\n resultList.clear();\n } else if (checkFirst.getMonth() == Integer.parseInt(from.substring(0, 2))) {\n if (checkFirst.getDay() < Integer.parseInt(from.substring(2, 4))) {\n resultList.clear();\n }\n }\n }\n return resultList;\n}\n"
"public final void initialize(DerivativeFunction derivativeFunction, Time startTime, Time maximumTime, double absoluteTolerance, double relativeTolerance, int inputVariableOrder) {\n initializeDerivativeFunction(derivativeFunction);\n initializeSimulationTime(startTime);\n setQuantizationEventTimeMaximum(maximumTime);\n for (int i = 0; i < _stateCt; i++) {\n setStateValue(i, 0.0);\n setQuantizationTolerance(i, absoluteTolerance, relativeTolerance);\n }\n for (int i = 0; i < getInputVariableCount(); i++) {\n ModelPolynomial input = new ModelPolynomial(inputVariableOrder);\n input.claimWriteAccess();\n input.tMdl = startTime;\n setInputVariableModel(i, input);\n }\n final String failMsg = validate();\n assert (failMsg == null);\n}\n"
"public static void setupTest() throws Exception {\n GCWatcher.init(0.60);\n JavaHome.checkJavaHome();\n LocalFileSystem localFS = FileSystem.getLocal(new Configuration());\n File testDirectory = new File(TMPDIR, \"String_Node_Str\").getAbsoluteFile();\n testDirectory.mkdirs();\n Path directory = new Path(testDirectory.getPath());\n FsPermission dirPermissions = localFS.getFileStatus(directory).getPermission();\n FsAction userAction = dirPermissions.getUserAction();\n FsAction groupAction = dirPermissions.getGroupAction();\n FsAction otherAction = dirPermissions.getOtherAction();\n StringBuilder builder = new StringBuilder();\n builder.append(userAction.ordinal());\n builder.append(groupAction.ordinal());\n builder.append(otherAction.ordinal());\n String dirPermissionNum = builder.toString();\n System.setProperty(\"String_Node_Str\", dirPermissionNum);\n testDirectory.delete();\n miniCluster = new MiniCluster();\n miniCluster.startBlurCluster(new File(testDirectory, \"String_Node_Str\").getAbsolutePath(), 2, 3, true, false);\n TEST_ROOT_DIR = new Path(miniCluster.getFileSystemUri().toString() + \"String_Node_Str\");\n System.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n try {\n fileSystem = TEST_ROOT_DIR.getFileSystem(conf);\n } catch (IOException io) {\n throw new RuntimeException(\"String_Node_Str\", io);\n }\n FileSystem.setDefaultUri(conf, miniCluster.getFileSystemUri());\n miniCluster.startMrMiniCluster();\n conf = miniCluster.getMRConfiguration();\n BufferStore.initNewBuffer(128, 128 * 128);\n}\n"
"private static Map _getOrPutTokens(Receiver[][] getReceivers, Receiver[][] putReceivers, RendezvousDirector director, Object tokens, int flag) throws IllegalActionException, TerminateProcessException {\n boolean isGet = (flag & GET) == GET;\n boolean isPut = (flag & PUT) == PUT;\n boolean isGetConditional = (flag & GET_CONDITIONAL) == GET_CONDITIONAL;\n boolean isPutConditional = (flag & PUT_CONDITIONAL) == PUT_CONDITIONAL;\n boolean isSymmetric = isPut && isGet;\n Map result = null;\n synchronized (director) {\n Thread theThread = Thread.currentThread();\n Token token = tokens instanceof Token ? (Token) tokens : null;\n Token[][] tokenArray = tokens instanceof Token[][] ? (Token[][]) tokens : null;\n boolean cardinalityTest = true;\n if (!isGetConditional && !isPutConditional && getReceivers != null && putReceivers != null && getReceivers.length < putReceivers.length) {\n cardinalityTest = false;\n }\n if (cardinalityTest && isGet) {\n for (int i = 0; i < getReceivers.length; i++) {\n if (getReceivers[i] != null) {\n for (int j = 0; j < getReceivers[i].length; j++) {\n RendezvousReceiver receiver = (RendezvousReceiver) getReceivers[i][j];\n if (receiver != null) {\n receiver._getWaiting = theThread;\n receiver._getReceivers = getReceivers;\n receiver._getConditional = isGetConditional;\n if (isSymmetric) {\n receiver._channelIndex = i;\n receiver._symmetricPutReceivers = putReceivers;\n }\n }\n }\n }\n }\n }\n if (isPut) {\n for (int i = 0; i < putReceivers.length; i++) {\n if (putReceivers[i] != null) {\n for (int j = 0; j < putReceivers[i].length; j++) {\n RendezvousReceiver receiver = (RendezvousReceiver) putReceivers[i][j];\n if (receiver != null) {\n receiver._putWaiting = theThread;\n receiver._putReceivers = putReceivers;\n IOPort port = receiver.getContainer();\n if (isPutConditional) {\n receiver._putConditional = true;\n receiver._token = token == null ? null : port.convert(token);\n } else {\n receiver._putConditional = false;\n try {\n token = tokenArray[i][j];\n } catch (Throwable e) {\n }\n receiver._token = token == null ? null : port.convert(token);\n }\n if (isSymmetric) {\n receiver._symmetricGetReceivers = getReceivers;\n }\n }\n }\n }\n }\n }\n Set rendezvousReceivers;\n if (getReceivers != null) {\n rendezvousReceivers = _receiversReadyToCommit(getReceivers, false);\n } else {\n rendezvousReceivers = _receiversReadyToCommit(putReceivers, true);\n }\n if (rendezvousReceivers == null) {\n director.threadBlocked(theThread, null);\n while (result == null) {\n waitForChange(director);\n result = (Map) _getData(theThread);\n }\n _setData(theThread, null);\n } else {\n _commitRendezvous(rendezvousReceivers, director);\n result = (Map) _setData(theThread, null);\n }\n }\n return result;\n}\n"
"public void testAnotherIntersection() throws DelaunayError {\n ConstrainedMesh mesh = new ConstrainedMesh();\n ArrayList<Edge> edges = new ArrayList<Edge>();\n edges.add(new Edge(3.055669878287226, 73.03246145782423, 0, 43.70557626947108, 35.35995458365234, 0));\n edges.add(new Edge(3.2192640691458885, 98.57692790324268, 0, 19.81947056963683, 13.613537224055394, 0));\n edges.add(new Edge(5.981788531239529, 17.432917460384022, 0, 9.21484373199296, 90.49887456765843, 0));\n edges.add(new Edge(6.399806805909236, 67.72788939942218, 0, 74.23296927832122, 86.61091383261046, 0));\n mesh.setConstraintEdges(edges);\n mesh.forceConstraintIntegrity();\n List<Edge> edgesB = mesh.getConstraintEdges();\n assertTrue(edgesB.size() == 16);\n}\n"
"public void setUp() throws MojoExecutionException, MojoFailureException {\n builder = new Library();\n if (directory != null) {\n builder.setDirectory(directory);\n }\n super.setUp();\n if (outputFile == null) {\n if (output == null) {\n outputFile = new File(build.getDirectory(), build.getFinalName() + \"String_Node_Str\");\n } else {\n outputFile = new File(build.getDirectory(), output);\n }\n }\n builder.setOutput(outputFile);\n if (checkNullOrEmpty(includeClasses) && checkNullOrEmpty(includeFiles) && checkNullOrEmpty(includeNamespaces) && checkNullOrEmpty(includeResourceBundles) && checkNullOrEmpty(includeResourceBundlesArtifact) && checkNullOrEmpty(includeSources) && checkNullOrEmpty(includeStylesheet)) {\n getLog().warn(\"String_Node_Str\");\n includeSources = sourcePaths.clone();\n includeFiles = listAllResources();\n }\n if (!checkNullOrEmpty(includeClasses)) {\n for (String asClass : includeClasses) {\n builder.addComponent(asClass);\n }\n }\n if (!checkNullOrEmpty(includeFiles)) {\n for (String includeFile : includeFiles) {\n if (includeFile == null) {\n throw new MojoFailureException(\"String_Node_Str\");\n }\n File file = MavenUtils.resolveResourceFile(project, includeFile);\n File folder = getResourceFolder(file);\n String relativePath = PathUtil.getRelativePath(folder, file);\n if (relativePath.startsWith(\"String_Node_Str\")) {\n relativePath = file.getName();\n }\n builder.addArchiveFile(relativePath.replace('\\\\', '/'), file);\n }\n }\n if (!checkNullOrEmpty(includeNamespaces)) {\n for (String uri : includeNamespaces) {\n try {\n builder.addComponent(new URI(uri));\n } catch (URISyntaxException e) {\n throw new MojoExecutionException(\"String_Node_Str\" + uri, e);\n }\n }\n }\n if (!checkNullOrEmpty(includeResourceBundles)) {\n for (String rb : includeResourceBundles) {\n builder.addResourceBundle(rb);\n }\n }\n if (!checkNullOrEmpty(includeResourceBundlesArtifact)) {\n for (MavenArtifact mvnArtifact : includeResourceBundlesArtifact) {\n Artifact artifact = artifactFactory.createArtifactWithClassifier(mvnArtifact.getGroupId(), mvnArtifact.getArtifactId(), mvnArtifact.getVersion(), \"String_Node_Str\", \"String_Node_Str\");\n resolveArtifact(artifact, resolver, localRepository, remoteRepositories);\n String bundleFile;\n try {\n bundleFile = FileUtils.readFileToString(artifact.getFile());\n } catch (IOException e) {\n throw new MojoExecutionException(\"String_Node_Str\" + artifact, e);\n }\n String[] bundles = bundleFile.split(\"String_Node_Str\");\n for (String bundle : bundles) {\n builder.addResourceBundle(bundle);\n }\n }\n }\n if (!checkNullOrEmpty(includeSources)) {\n for (File file : includeSources) {\n if (file == null) {\n throw new MojoFailureException(\"String_Node_Str\");\n }\n if (!file.getName().contains(\"String_Node_Str\") && !file.exists()) {\n throw new MojoFailureException(\"String_Node_Str\" + file.getName() + \"String_Node_Str\");\n }\n builder.addComponent(file);\n }\n }\n includeStylesheet();\n computeDigest();\n if (addMavenDescriptor) {\n builder.addArchiveFile(\"String_Node_Str\" + project.getGroupId() + \"String_Node_Str\" + project.getArtifactId() + \"String_Node_Str\", new File(project.getBasedir(), \"String_Node_Str\"));\n }\n}\n"
"private static void fillListOfCatalogs(Connection connection, List<String> catalogNames) throws SQLException {\n if (catalogNames.isEmpty()) {\n ResultSet catalogSet = null;\n if (!(ConnectionUtils.isOdbcOracle(connection) || ConnectionUtils.isOdbcIngres(connection))) {\n catalogSet = getConnectionMetadata(connection).getCatalogs();\n }\n try {\n if (catalogSet != null) {\n while (catalogSet.next()) {\n String catalogName = catalogSet.getString(MetaDataConstants.TABLE_CAT.name());\n if (catalogName != null || !\"String_Node_Str\".equals(catalogName)) {\n catalogNames.add(catalogName);\n }\n }\n }\n } catch (SQLException e) {\n log.warn(\"String_Node_Str\", e);\n } finally {\n if (catalogSet != null) {\n catalogSet.close();\n }\n }\n }\n}\n"
"public void addNewDefinitions(String definitions, String attributeName) {\n if (definitions.trim().length() == 0) {\n return;\n }\n tlaBuffer.append(COMMENT).append(\"String_Node_Str\").append(ATTRIBUTE).append(attributeName).append(CR);\n tlaBuffer.append(definitions).append(CR).append(SEP).append(CR);\n}\n"
"private static String findParameterExp(String script, int fromIndex) {\n int iStart = script.indexOf(ExpressionUtil.PARAMETER_INDICATOR + '[', fromIndex);\n if (iStart < fromIndex) {\n return null;\n }\n int iEnd = script.indexOf(']', iStart);\n if (iEnd < iStart + ExpressionUtil.PARAMETER_INDICATOR.length()) {\n return null;\n }\n return script.substring(iStart, iEnd + 1 + ExpressionUtil.EXPRESSION_VALUE_SUFFIX.length());\n}\n"
"protected Map<String, Object> getDataModel(Set<String> scopes) {\n Map<String, Object> data = new HashMap<String, Object>(getRequest().getAttributes());\n data.put(\"String_Node_Str\", getRequest().getResourceRef().toString());\n Set<String> displayNames = client.getClient().getDisplayName();\n Set<String> displayDescriptions = client.getClient().getDisplayDescription();\n Set<String> allScopes = client.getClient().getAllowedGrantScopes();\n String locale = OAuth2Utils.getLocale(getRequest());\n String displayName = \"String_Node_Str\";\n String displayDescription = \"String_Node_Str\";\n List<String> displayScope = null;\n displayName = getDisplayParameter(locale, displayNames);\n displayDescription = getDisplayParameter(locale, displayDescriptions);\n displayScope = getScopeDescriptionsForLocale(scopes, allScopes, locale);\n data.put(\"String_Node_Str\", displayName);\n data.put(\"String_Node_Str\", displayDescription);\n data.put(\"String_Node_Str\", displayScope);\n return data;\n}\n"
"public static ArrayToken map(FunctionToken function, ArrayToken array) throws IllegalActionException {\n int arity = function.getNumberOfArguments();\n Token[] result = new Token[array.length()];\n if (arity == 1) {\n for (int i = 0; i < array.length(); i++) {\n Token args = (Token) array.getElement(i);\n LinkedList arglist = new LinkedList();\n arglist.add(args);\n result[i] = function.apply(arglist);\n }\n } else if (arity > 1) {\n for (int i = 0; i < array.length(); i++) {\n Token args = (Token) array.getElement(i);\n if (!(args instanceof ArrayToken)) {\n throw new IllegalActionException(\"String_Node_Str\");\n }\n LinkedList arglist = new LinkedList();\n ArrayToken castArgs = (ArrayToken) args;\n if (castArgs.length() != arity) {\n throw new IllegalActionException(\"String_Node_Str\");\n } else {\n for (int j = 0; j < arity; j++) {\n arglist.add(castArgs.getElement(j));\n }\n result[i] = function.apply(arglist);\n }\n }\n } else {\n throw new IllegalActionException(\"String_Node_Str\");\n }\n return new ArrayToken(result);\n}\n"
"public void run() {\n if (mOutputSurface == null) {\n AvLog.d(\"String_Node_Str\");\n return;\n }\n if (mPreviewWidth <= 0 || mPreviewHeight <= 0) {\n Log.e(Aavt.debugTag, \"String_Node_Str\");\n return;\n }\n boolean ret = mShowEGLHelper.createGLESWithSurface(new EGLConfigAttrs(), new EGLContextAttrs(), mOutputSurface);\n if (!ret) {\n Log.e(Aavt.debugTag, \"String_Node_Str\");\n return;\n }\n if (mRenderer == null) {\n mRenderer = new WrapRenderer(null);\n }\n mRenderer.setFlag(WrapRenderer.TYPE_CAMERA);\n mRenderer.create();\n int[] t = new int[1];\n GLES20.glGetIntegerv(GLES20.GL_FRAMEBUFFER_BINDING, t, 0);\n mRenderer.sizeChanged(mPreviewWidth, mPreviewHeight);\n GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, t[0]);\n BaseFilter mShowFilter = new LazyFilter();\n BaseFilter mRecFilter = new LazyFilter();\n MatrixUtils.flip(mShowFilter.getVertexMatrix(), false, true);\n mShowFilter.create();\n mShowFilter.sizeChanged(mPreviewWidth, mPreviewHeight);\n MatrixUtils.getMatrix(mRecFilter.getVertexMatrix(), MatrixUtils.TYPE_CENTERCROP, mPreviewWidth, mPreviewHeight, mOutputWidth, mOutputHeight);\n MatrixUtils.flip(mRecFilter.getVertexMatrix(), false, true);\n mRecFilter.create();\n mRecFilter.sizeChanged(mOutputWidth, mOutputHeight);\n FrameBuffer mEncodeFrameBuffer = new FrameBuffer();\n while (mGLThreadFlag) {\n try {\n mSem.acquire();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n if (mGLThreadFlag) {\n long time = (System.currentTimeMillis() - BASE_TIME) * 1000;\n mInputTexture.updateTexImage();\n mInputTexture.getTransformMatrix(mRenderer.getTextureMatrix());\n synchronized (VIDEO_LOCK) {\n if (isRecordVideoStarted) {\n if (mEGLEncodeSurface == null) {\n mEGLEncodeSurface = mShowEGLHelper.createWindowSurface(mEncodeSurface);\n }\n mShowEGLHelper.makeCurrent(mEGLEncodeSurface);\n mEncodeFrameBuffer.bindFrameBuffer(mPreviewWidth, mPreviewHeight);\n mRenderer.draw(mInputTextureId);\n mEncodeFrameBuffer.unBindFrameBuffer();\n GLES20.glViewport(0, 0, mConfig.getVideoFormat().getInteger(MediaFormat.KEY_WIDTH), mConfig.getVideoFormat().getInteger(MediaFormat.KEY_HEIGHT));\n mRecFilter.draw(mEncodeFrameBuffer.getCacheTextureId());\n mShowEGLHelper.setPresentationTime(mEGLEncodeSurface, time * 1000);\n videoEncodeStep(false);\n mShowEGLHelper.swapBuffers(mEGLEncodeSurface);\n mShowEGLHelper.makeCurrent();\n GLES20.glViewport(0, 0, mPreviewWidth, mPreviewHeight);\n mShowFilter.draw(mEncodeFrameBuffer.getCacheTextureId());\n mShowEGLHelper.setPresentationTime(mShowEGLHelper.getDefaultSurface(), 0);\n mShowEGLHelper.swapBuffers(mShowEGLHelper.getDefaultSurface());\n } else {\n GLES20.glViewport(0, 0, mPreviewWidth, mPreviewHeight);\n mRenderer.draw(mInputTextureId);\n mShowEGLHelper.swapBuffers(mShowEGLHelper.getDefaultSurface());\n }\n }\n }\n }\n mShowEGLHelper.destroyGLES(mShowEGLHelper.getDefaultSurface(), mShowEGLHelper.getDefaultContext());\n}\n"
"protected void executeImpl() throws WebDAVServerException, Exception {\n FileFolderService fileFolderService = getFileFolderService();\n NodeRef rootNodeRef = getRootNodeRef();\n String path = getPath();\n String servletPath = getServletPath();\n FileInfo nodeInfo = null;\n try {\n nodeInfo = getDAVHelper().getNodeForPath(rootNodeRef, path, servletPath);\n } catch (FileNotFoundException e) {\n throw new WebDAVServerException(HttpServletResponse.SC_NOT_FOUND);\n }\n FileInfo realNodeInfo = nodeInfo;\n if (realNodeInfo.isLink()) {\n Path pathToNode = getNodeService().getPath(nodeInfo.getLinkNodeRef());\n if (pathToNode.size() > 2) {\n pathToNode = pathToNode.subPath(2, pathToNode.size() - 1);\n }\n String rootURL = getDAVHelper().getURLForPath(m_request, pathToNode.toDisplayPath(getNodeService(), getPermissionService()), true);\n if (rootURL.endsWith(WebDAVHelper.PathSeperator) == false) {\n rootURL = rootURL + WebDAVHelper.PathSeperator;\n }\n String fname = (String) getNodeService().getProperty(nodeInfo.getLinkNodeRef(), ContentModel.PROP_NAME);\n String webDavUrl = m_request.getServerName() + \"String_Node_Str\" + m_request.getServerPort() + rootURL + WebDAVHelper.encodeURL(fname, m_userAgent);\n StringBuilder urlStr = new StringBuilder();\n urlStr.append(\"String_Node_Str\");\n urlStr.append(\"String_Node_Str\");\n urlStr.append(webDavUrl);\n urlStr.append(\"String_Node_Str\");\n m_response.setHeader(WebDAV.HEADER_CONTENT_TYPE, \"String_Node_Str\");\n m_response.setHeader(WebDAV.HEADER_CONTENT_LENGTH, String.valueOf(urlStr.length()));\n m_response.getWriter().write(urlStr.toString());\n } else if (realNodeInfo.isFolder()) {\n if (!m_returnContent) {\n return;\n }\n m_response.setContentType(\"String_Node_Str\");\n generateDirectoryListing(nodeInfo);\n } else {\n checkPreConditions(realNodeInfo);\n m_response.setHeader(WebDAV.HEADER_ETAG, getDAVHelper().makeQuotedETag(nodeInfo));\n Date modifiedDate = realNodeInfo.getModifiedDate();\n if (modifiedDate != null) {\n long modDate = DefaultTypeConverter.INSTANCE.longValue(modifiedDate);\n m_response.setHeader(WebDAV.HEADER_LAST_MODIFIED, WebDAV.formatHeaderDate(modDate));\n }\n ContentReader reader = fileFolderService.getReader(realNodeInfo.getNodeRef());\n reader = FileContentReader.getSafeContentReader((ContentReader) reader, I18NUtil.getMessage(FileContentReader.MSG_MISSING_CONTENT), realNodeInfo.getNodeRef(), reader);\n if (byteRanges != null && byteRanges.startsWith(RANGE_HEADER_UNIT_SPECIFIER)) {\n HttpRangeProcessor rangeProcessor = new HttpRangeProcessor(getContentService());\n String userAgent = m_request.getHeader(WebDAV.HEADER_USER_AGENT);\n if (m_returnContent) {\n rangeProcessor.processRange(m_response, reader, byteRanges.substring(6), realNodeInfo.getNodeRef(), ContentModel.PROP_CONTENT, reader.getMimetype(), userAgent);\n }\n } else {\n m_response.setHeader(WebDAV.HEADER_CONTENT_LENGTH, Long.toString(reader.getSize()));\n m_response.setHeader(WebDAV.HEADER_CONTENT_TYPE, reader.getMimetype());\n if (m_returnContent) {\n reader.getContent(m_response.getOutputStream());\n }\n }\n }\n}\n"
"private boolean _isUndoableElement(String elementName) {\n if (elementName.equals(\"String_Node_Str\") || elementName.equals(\"String_Node_Str\") || elementName.equals(\"String_Node_Str\") || elementName.equals(\"String_Node_Str\") || elementName.equals(\"String_Node_Str\") || elementName.equals(\"String_Node_Str\") || elementName.equals(\"String_Node_Str\") || elementName.equals(\"String_Node_Str\") || elementName.equals(\"String_Node_Str\") || elementName.equals(\"String_Node_Str\") || elementName.equals(\"String_Node_Str\") || elementName.equals(\"String_Node_Str\") || elementName.equals(\"String_Node_Str\") || elementName.equals(\"String_Node_Str\") || elementName.equals(\"String_Node_Str\")) {\n return true;\n }\n return false;\n}\n"