content
stringlengths 40
137k
|
---|
"private int getAllMeasuerSize() {\n int size = 0;\n for (int i = 0; i < factTable.getMeasureInfo().length; i++) {\n if (factTable.getMeasureInfo()[i].getDataType() == DataType.DOUBLE_TYPE)\n size += 9;\n else if (factTable.getMeasureInfo()[i].getDataType() == DataType.INTEGER_TYPE)\n size += 4;\n else\n return -1;\n }\n return size;\n}\n"
|
"public void clearVisor() {\n display.write(new byte[] { 0x10, 0x00 });\n display.write(trans.transString(DeviceTicket.getWhiteString(20)));\n display.write(new byte[] { 0x10, 0x14 });\n display.write(trans.transString(DeviceTicket.getWhiteString(20)));\n display.flush();\n}\n"
|
"public boolean onPlayerRightClick(EntityPlayer player, int side, Pos hit) {\n if (player.getHeldItem() != null && player.getHeldItem().getItem() == Items.stick) {\n if (Engine.runningAsDev) {\n if (isServer()) {\n player.addChatComponentMessage(new ChatComponentText(\"String_Node_Str\" + getMissile()));\n }\n return true;\n }\n }\n if (getMissile() == null) {\n if (player.getHeldItem() != null && player.getHeldItem().getItem() instanceof IModularMissileItem) {\n if (isServer()) {\n Missile missile = MissileModuleBuilder.INSTANCE.buildMissile(player.getHeldItem());\n if (missile != null) {\n if (canAcceptMissile(missile)) {\n ItemStack copy = player.getHeldItem().copy();\n copy.stackSize = 1;\n this.setInventorySlotContents(0, copy);\n if (!player.capabilities.isCreativeMode) {\n if (player.getHeldItem().stackSize <= 0) {\n player.inventory.setInventorySlotContents(player.inventory.currentItem, null);\n }\n player.inventoryContainer.detectAndSendChanges();\n }\n } else {\n player.addChatComponentMessage(new ChatComponentText(\"String_Node_Str\"));\n }\n } else {\n player.addChatComponentMessage(new ChatComponentText(\"String_Node_Str\"));\n }\n }\n return true;\n }\n if (StandardMissileCrafting.isPartOfRecipe(player.getHeldItem())) {\n if (recipe == null) {\n triggerCraftingMode();\n this.recipe = new StandardMissileCrafting();\n player.addChatComponentMessage(new ChatComponentText(\"String_Node_Str\"));\n }\n ItemStack heldItem = player.getHeldItem();\n if (heldItem != null) {\n if (isServer()) {\n heldItem = heldItem.copy();\n if (recipe.canAddItem(heldItem)) {\n if (!recipe.addItem(heldItem)) {\n if (!recipe.isFinished()) {\n player.addChatComponentMessage(new ChatComponentText(\"String_Node_Str\"));\n } else {\n player.addChatComponentMessage(new ChatComponentText(\"String_Node_Str\"));\n }\n } else if (!InventoryUtility.stacksMatchExact(player.getHeldItem(), heldItem)) {\n if (heldItem.stackSize <= 0) {\n heldItem = null;\n }\n player.inventory.setInventorySlotContents(player.inventory.currentItem, heldItem);\n player.inventoryContainer.detectAndSendChanges();\n sendDescPacket();\n }\n } else {\n player.addChatComponentMessage(recipe.getCurrentRecipeChat());\n }\n return true;\n } else if (Block.getBlockFromItem(player.getHeldItem().getItem()) == null) {\n if (isServer()) {\n player.addChatComponentMessage(recipe.getCurrentRecipeChat());\n }\n return true;\n }\n }\n }\n }\n return false;\n}\n"
|
"public void initParams(Properties options) {\n String val = (String) options.get(JAAS_ENABLED_PARAM);\n if (val != null) {\n remoteLoginEnabled = val.trim().equalsIgnoreCase(\"String_Node_Str\");\n if (!remoteLoginEnabled) {\n System.err.println(\"String_Node_Str\" + JAAS_ENABLED_PARAM + \"String_Node_Str\" + val + \"String_Node_Str\");\n return;\n }\n } else {\n remoteLoginEnabled = true;\n }\n val = (String) options.get(DEBUG_PARAM);\n if (val != null && (!val.equalsIgnoreCase(\"String_Node_Str\"))) {\n debug = true;\n } else {\n debug = false;\n }\n remoteHostName = (String) options.get(REMOTE_LOGIN_HOST_PARAM);\n log(\"String_Node_Str\" + remoteHostName);\n val = (String) options.get(REMOTE_LOGIN_AUTH_SERVICE_PORT_PARAM);\n if (val != null) {\n remoteHostAuthServicePort = Integer.parseInt(val.trim());\n }\n log(\"String_Node_Str\" + remoteHostAuthServicePort);\n val = (String) options.get(SSL_ENABLED_PARAM);\n SSLEnabled = (val != null) && val.trim().equalsIgnoreCase(\"String_Node_Str\");\n log(\"String_Node_Str\" + SSLEnabled);\n if (SSLEnabled) {\n trustStorePath = (String) options.get(SSL_TRUSTSTORE_PATH_PARAM);\n log(\"String_Node_Str\" + trustStorePath);\n if (trustStorePath != null) {\n trustStorePathPassword = (String) options.get(SSL_TRUSTSTORE_PATH_PASSWORD_PARAM);\n if (trustStorePathPassword == null) {\n trustStorePathPassword = \"String_Node_Str\";\n }\n log(\"String_Node_Str\");\n }\n keyStorePath = (String) options.get(SSL_KEYSTORE_PATH_PARAM);\n log(\"String_Node_Str\" + keyStorePath);\n if (keyStorePath != null) {\n keyStorePathPassword = (String) options.get(SSL_KEYSTORE_PATH_PASSWORD_PARAM);\n if (keyStorePathPassword == null) {\n keyStorePathPassword = \"String_Node_Str\";\n }\n log(\"String_Node_Str\" + keyStorePathPassword);\n }\n String certValidationFlag = (String) options.get(SERVER_CERT_VALIDATION_PARAM);\n serverCertValidation = (!(certValidationFlag != null && (\"String_Node_Str\".equalsIgnoreCase(certValidationFlag.trim().toLowerCase()))));\n log(\"String_Node_Str\" + serverCertValidation);\n }\n}\n"
|
"private void createIngestStartedEvent(ModelService model, IndexService index, Map<String, String> sipToAIP, Date startDate) {\n setPreservationEventType(START_TYPE);\n setPreservationSuccessMessage(START_SUCCESS);\n setPreservationFailureMessage(START_FAILURE);\n setPreservationEventDescription(START_DESCRIPTION);\n for (Map.Entry<String, String> entry : aipIdToTransferredResourceId.entrySet()) {\n try {\n AIP aip = model.retrieveAIP(entry.getKey());\n TransferredResource tr = index.retrieve(TransferredResource.class, entry.getValue());\n boolean notify = true;\n PluginHelper.createPluginEvent(this, aip.getId(), model, index, tr, PluginState.SUCCESS, \"String_Node_Str\", notify, startDate);\n } catch (NotFoundException | RequestNotValidException | GenericException | AuthorizationDeniedException | ValidationException | AlreadyExistsException e) {\n LOGGER.warn(\"String_Node_Str\" + e.getMessage(), e);\n }\n }\n}\n"
|
"public String getText(Object obj) {\n if (obj instanceof IRepositoryViewObject) {\n return getText((IRepositoryViewObject) obj);\n }\n if (obj instanceof Property) {\n return getText((Property) obj);\n }\n RepositoryNode node = (RepositoryNode) obj;\n if (node.getType() == ENodeType.REPOSITORY_ELEMENT || node.getType() == ENodeType.SIMPLE_FOLDER) {\n IRepositoryViewObject object = node.getObject();\n String label = \"String_Node_Str\";\n if (!(object instanceof MetadataTableRepositoryObject)) {\n object.getProperty();\n }\n if (object.isModified()) {\n label = \"String_Node_Str\";\n }\n org.talend.core.model.properties.Project mainProject = ProjectManager.getInstance().getCurrentProject().getEmfProject();\n String projectLabel = object.getProjectLabel();\n ERepositoryObjectType repositoryObjectType = object.getRepositoryObjectType();\n if (repositoryObjectType == ERepositoryObjectType.METADATA_CON_QUERY || repositoryObjectType == ERepositoryObjectType.SNIPPETS || repositoryObjectType == ERepositoryObjectType.METADATA_CON_SYNONYM || repositoryObjectType == ERepositoryObjectType.METADATA_CON_TABLE || repositoryObjectType == ERepositoryObjectType.METADATA_CON_VIEW || repositoryObjectType == ERepositoryObjectType.METADATA_CON_CDC || repositoryObjectType == ERepositoryObjectType.METADATA_CON_CDC || repositoryObjectType == ERepositoryObjectType.METADATA_SAP_IDOC || repositoryObjectType == ERepositoryObjectType.METADATA_SAP_FUNCTION || repositoryObjectType == ERepositoryObjectType.METADATA_SALESFORCE_MODULE || repositoryObjectType == ERepositoryObjectType.METADATA_CON_COLUMN) {\n label = label + object.getLabel();\n if (!mainProject.getLabel().equals(projectLabel) && PluginChecker.isRefProjectLoaded()) {\n IReferencedProjectService service = (IReferencedProjectService) GlobalServiceRegister.getDefault().getService(IReferencedProjectService.class);\n if (service != null && service.isMergeRefProject()) {\n label = label + \"String_Node_Str\" + projectLabel + \"String_Node_Str\";\n }\n }\n return label;\n }\n if (repositoryObjectType == ERepositoryObjectType.JOB_DOC || repositoryObjectType == ERepositoryObjectType.JOBLET_DOC || repositoryObjectType == ERepositoryObjectType.valueOf(ERepositoryObjectType.class, \"String_Node_Str\")) {\n object.getProperty();\n if (object.isModified()) {\n label = \"String_Node_Str\";\n }\n }\n label = label + getText(object);\n if (!mainProject.getLabel().equals(projectLabel) && PluginChecker.isRefProjectLoaded()) {\n IReferencedProjectService service = (IReferencedProjectService) GlobalServiceRegister.getDefault().getService(IReferencedProjectService.class);\n if (service != null && service.isMergeRefProject()) {\n label = label + \"String_Node_Str\" + projectLabel + \"String_Node_Str\";\n }\n }\n return label;\n } else {\n String label = node.getLabel();\n return label;\n }\n}\n"
|
"private DepTreebank getData(Alphabet<Label> alphabet, DatasetType dataType, File dataFile, String dataName) throws ParseException, IOException {\n DepTreebank goldTreebank;\n DmvModel goldModel = null;\n if (dataType == DatasetType.PTB || dataType == DatasetType.CONLL_X || dataType == DatasetType.CONLL_2009) {\n log.info(\"String_Node_Str\" + dataName + \"String_Node_Str\" + dataFile);\n goldTreebank = DepTreebankReader.getTreebank(dataFile, dataType, maxSentenceLength, alphabet);\n } else if (dataType == DatasetType.SYNTHETIC) {\n if (synthetic == null) {\n throw new ParseException(\"String_Node_Str\");\n }\n if (synthetic.equals(\"String_Node_Str\")) {\n goldModel = SimpleStaticDmvModel.getTwoPosTagInstance();\n } else if (synthetic.equals(\"String_Node_Str\")) {\n goldModel = SimpleStaticDmvModel.getThreePosTagInstance();\n } else if (synthetic.equals(\"String_Node_Str\")) {\n goldModel = SimpleStaticDmvModel.getAltThreePosTagInstance();\n } else {\n throw new ParseException(\"String_Node_Str\" + synthetic);\n }\n DmvDepTreeGenerator generator = new DmvDepTreeGenerator(goldModel, syntheticSeed);\n goldTreebank = generator.getTreebank(DepTreebankReader.maxNumSentences);\n } else {\n throw new ParseException(\"String_Node_Str\");\n }\n log.info(\"String_Node_Str\" + dataName + \"String_Node_Str\" + goldTreebank.size());\n log.info(\"String_Node_Str\" + dataName + \"String_Node_Str\" + goldTreebank.getNumTokens());\n log.info(\"String_Node_Str\" + dataName + \"String_Node_Str\" + goldTreebank.getNumTypes());\n return goldTreebank;\n}\n"
|
"public ClassLoader getInvocationClassLoader() {\n JndiNameEnvironment componentEnv = compEnvMgr.getCurrentJndiNameEnvironment();\n return getClassLoaderForEnvironment(componentEnv);\n}\n"
|
"public List<MetricDefinition> find(String tenantId, String name, Map<String, String> dimensions, String offset, int limit) throws Exception {\n int startIndex = this.influxV9Utils.startIndex(offset);\n String q = String.format(\"String_Node_Str\" + \"String_Node_Str\", this.influxV9Utils.namePart(name, false), this.influxV9Utils.privateTenantIdPart(tenantId), this.influxV9Utils.privateRegionPart(this.region), this.influxV9Utils.dimPart(dimensions), this.influxV9Utils.limitPart(limit), this.influxV9Utils.offsetPart(startIndex));\n logger.debug(\"String_Node_Str\", q);\n String r = this.influxV9RepoReader.read(q);\n Series series = this.objectMapper.readValue(r, Series.class);\n List<MetricDefinition> metricDefinitionList = metricDefinitionList(series, startIndex);\n logger.debug(\"String_Node_Str\", metricDefinitionList.size());\n return metricDefinitionList;\n}\n"
|
"public void testInvalidMapParameterTypeBadKey() {\n Map<Class, Source> metadataSourceMap = new HashMap<Class, Source>();\n metadataSourceMap.put(JAXBContextFactory.class, new StreamSource());\n Map<String, Map<Class, Source>> properties = new HashMap<String, Map<Class, Source>>();\n properties.put(JAXBContextFactory.ECLIPSELINK_OXM_XML_KEY, metadataSourceMap);\n JAXBContext jaxbContext;\n try {\n JAXBContextFactory.createContext(CONTEXT_PATH, loader, properties);\n } catch (JAXBException e) {\n return;\n } catch (Exception x) {\n }\n fail(\"String_Node_Str\");\n}\n"
|
"private boolean onModifiedTouchEvent(MotionEvent me) {\n int touchX = (int) me.getX() - getPaddingLeft();\n int touchY = (int) me.getY() + mVerticalCorrection - getPaddingTop();\n final int action = me.getAction();\n final long eventTime = me.getEventTime();\n int keyIndex = getKeyIndexAndNearbyCodes(touchX, touchY, null);\n switch(action) {\n case MotionEvent.ACTION_DOWN:\n mAbortKey = false;\n mCurrentKey = keyIndex;\n mDownKey = keyIndex;\n mStartX = touchX;\n mStartY = touchY;\n mDebouncer.startMoveDebouncing(touchX, touchY);\n mDebouncer.startTimeDebouncing(eventTime);\n checkMultiTap(eventTime, keyIndex);\n mKeyboardActionListener.onPress(keyIndex != NOT_A_KEY ? mKeys[keyIndex].codes[0] : 0);\n if (keyIndex >= 0 && mKeys[keyIndex].repeatable) {\n repeatKey(keyIndex);\n mHandler.startKeyRepeatTimer(REPEAT_START_DELAY, keyIndex);\n if (mAbortKey) {\n mHandler.cancelKeyRepeatTimer();\n break;\n }\n }\n if (keyIndex != NOT_A_KEY) {\n mHandler.startLongPressTimer(keyIndex, LONGPRESS_TIMEOUT);\n }\n showPreview(keyIndex);\n break;\n case MotionEvent.ACTION_MOVE:\n if (keyIndex != NOT_A_KEY) {\n if (mCurrentKey == NOT_A_KEY) {\n mDebouncer.updateTimeDebouncing(eventTime);\n mCurrentKey = keyIndex;\n mHandler.startLongPressTimer(keyIndex, LONGPRESS_TIMEOUT);\n } else if (mDebouncer.isMinorMoveBounce(touchX, touchY, keyIndex, mCurrentKey)) {\n mDebouncer.updateTimeDebouncing(eventTime);\n } else {\n resetMultiTap();\n mDebouncer.resetTimeDebouncing(eventTime, mCurrentKey);\n mDebouncer.resetMoveDebouncing();\n mCurrentKey = keyIndex;\n mHandler.startLongPressTimer(keyIndex, LONGPRESS_TIMEOUT);\n }\n } else {\n mHandler.cancelLongPressTimer();\n }\n showPreview(mDebouncer.isMinorTimeBounce() ? mDebouncer.getLastKey() : mCurrentKey);\n break;\n case MotionEvent.ACTION_UP:\n mHandler.cancelKeyTimers();\n mHandler.cancelPopupPreview();\n if (mDebouncer.isMinorMoveBounce(touchX, touchY, keyIndex, mCurrentKey)) {\n mDebouncer.updateTimeDebouncing(eventTime);\n } else {\n resetMultiTap();\n mDebouncer.resetTimeDebouncing(eventTime, mCurrentKey);\n mCurrentKey = keyIndex;\n }\n if (mDebouncer.isMinorTimeBounce()) {\n mCurrentKey = mDebouncer.getLastKey();\n touchX = mDebouncer.getLastCodeX();\n touchY = mDebouncer.getLastCodeY();\n }\n showPreview(NOT_A_KEY);\n if (!wasInKeyRepeat && !mMiniKeyboardOnScreen && !mAbortKey) {\n detectAndSendKey(mCurrentKey, touchX, touchY, eventTime);\n }\n invalidateKey(keyIndex);\n break;\n case MotionEvent.ACTION_CANCEL:\n mHandler.cancelKeyTimers();\n mHandler.cancelPopupPreview();\n dismissPopupKeyboard();\n mAbortKey = true;\n showPreview(NOT_A_KEY);\n invalidateKey(mCurrentKey);\n break;\n }\n mDebouncer.updateMoveDebouncing(touchX, touchY);\n return true;\n}\n"
|
"public void setName(String name) {\n boolean canModify = true;\n List connections;\n if (target != null) {\n connections = target.getIncomingConnections();\n for (int i = 0; i < connections.size(); i++) {\n if (((Connection) connections.get(i)).getName().equals(name)) {\n canModify = false;\n }\n }\n }\n if (canModify) {\n this.name = name;\n if (!lineStyle.equals(EConnectionType.TABLE) && !lineStyle.equals(EConnectionType.ITERATE)) {\n if (isInTypes(lineStyle, EConnectionType.ON_COMPONENT_OK, EConnectionType.ON_COMPONENT_ERROR, EConnectionType.ON_SUBJOB_OK, EConnectionType.ON_SUBJOB_ERROR, EConnectionType.RUN_IF, EConnectionType.ROUTE_WHEN, EConnectionType.ROUTE_CATCH, EConnectionType.STARTS) && source != null && source.getComponent().getName().equals(source.getLabel())) {\n uniqueName = connectorName;\n } else if (!isInTypes(lineStyle, EConnectionType.ON_COMPONENT_OK, EConnectionType.ON_COMPONENT_ERROR, EConnectionType.ON_SUBJOB_OK, EConnectionType.ON_SUBJOB_ERROR, EConnectionType.RUN_IF, EConnectionType.ROUTE_WHEN, EConnectionType.ROUTE_CATCH, EConnectionType.STARTS) || uniqueName == null || !uniqueName.startsWith(lineStyle.getDefaultLinkName())) {\n if (Pattern.matches(\"String_Node_Str\", name)) {\n uniqueName = name;\n } else {\n uniqueName = lineStyle.getDefaultLinkName();\n }\n }\n }\n if (source != null && lineStyle.hasConnectionCategory(IConnectionCategory.FLOW)) {\n if (getSourceNodeConnector().isMultiSchema()) {\n IMetadataTable table = getMetadataTable();\n table.setTableName(name);\n metaName = name;\n }\n }\n if (source != null && (lineStyle == EConnectionType.TABLE)) {\n IMetadataTable table = getMetadataTable();\n table.setLabel(name);\n }\n if (label == null) {\n label = new ConnectionLabel(name, this);\n }\n updateName();\n }\n}\n"
|
"private void exportNodeData(Graph graph) throws IOException {\n stringBuilder.append(\"String_Node_Str\");\n stringBuilder.append(\"String_Node_Str\");\n for (int i = 0; i < attributeModel.getNodeTable().getColumns().length; i++) {\n if (!attributeModel.getNodeTable().getColumns()[i].getTitle().equalsIgnoreCase(\"String_Node_Str\") && !attributeModel.getNodeTable().getColumns()[i].getTitle().equalsIgnoreCase(\"String_Node_Str\")) {\n writer.write(\"String_Node_Str\" + attributeModel.getNodeTable().getColumn(i).getTitle().replace(' ', '_'));\n }\n }\n writer.write(\"String_Node_Str\");\n for (NodeIterator nodeIterator = graph.getNodes().iterator(); nodeIterator.hasNext(); ) {\n Node node = nodeIterator.next();\n writer.write(node.getNodeData().getId());\n for (int i = 0; i < attributeModel.getNodeTable().getColumns().length; i++) {\n if (!attributeModel.getNodeTable().getColumns()[i].getTitle().equalsIgnoreCase(\"String_Node_Str\") && !attributeModel.getNodeTable().getColumns()[i].getTitle().equalsIgnoreCase(\"String_Node_Str\")) {\n if (node.getNodeData().getAttributes().getValue(i) != null) {\n writer.write(\"String_Node_Str\" + node.getNodeData().getAttributes().getValue(i));\n } else {\n writer.write(\"String_Node_Str\" + valueForEmptyAttributes);\n }\n }\n }\n writer.write(\"String_Node_Str\");\n }\n}\n"
|
"public void execute(Environment env, Map args, TemplateModel[] outArgs, final TemplateDirectiveBody body) throws TemplateException, IOException {\n try {\n SimpleTag tag = (SimpleTag) getTagInstance();\n final FreeMarkerPageContext pageContext = PageContextFactory.getCurrentPageContext();\n pageContext.pushWriter(new JspWriterAdapter(env.getOut()));\n try {\n tag.setJspContext(pageContext);\n JspTag parentTag = (JspTag) pageContext.peekTopTag(JspTag.class);\n if (parentTag != null) {\n tag.setParent(parentTag);\n }\n setupTag(tag, args, pageContext.getObjectWrapper());\n if (body != null) {\n tag.setJspBody(new JspFragment() {\n public JspContext getJspContext() {\n return pageContext;\n }\n public void invoke(Writer out) throws JspException, IOException {\n try {\n body.render(out == null ? pageContext.getOut() : out);\n } catch (TemplateException e) {\n throw new JspException(e);\n }\n }\n });\n pageContext.pushTopTag(tag);\n try {\n tag.doTag();\n } finally {\n pageContext.popTopTag();\n }\n } else {\n tag.doTag();\n }\n } finally {\n pageContext.popWriter();\n }\n } catch (TemplateException e) {\n throw e;\n } catch (RuntimeException e) {\n throw e;\n } catch (Exception e) {\n throw new TemplateModelException(\"String_Node_Str\", e);\n }\n}\n"
|
"private void startAsync(String procName, List<Var> waitVars, List<Var> usedVariables, List<Var> keepOpenVars, Arg priority, boolean recursive, TaskMode mode) {\n assert (priority == null || priority.isImmediateInt());\n mode.checkSpawn(execContextStack.peek());\n ArrayList<Var> toPassIn = new ArrayList<Var>();\n HashSet<String> alreadyInSet = new HashSet<String>();\n for (Var v : allUsedVars) {\n toPassIn.add(v);\n alreadyInSet.add(v.name());\n if (v.type().equals(Types.V_BLOB)) {\n throw new STCRuntimeError(\"String_Node_Str\");\n }\n }\n for (Var v : keepOpenVars) {\n if (!alreadyInSet.contains(v.name())) {\n toPassIn.add(v);\n }\n }\n List<String> args = new ArrayList<String>();\n args.add(Turbine.LOCAL_STACK_NAME);\n for (Var v : toPassIn) {\n args.add(prefixVar(v.name()));\n }\n Sequence constructProc = new Sequence();\n String uniqueName = uniqueTCLFunctionName(procName);\n Proc proc = new Proc(uniqueName, usedTclFunctionNames, args, constructProc);\n tree.add(proc);\n boolean useDeepWait = false;\n List<Expression> waitFor = new ArrayList<Expression>();\n for (Var w : waitVars) {\n if (recursive) {\n Type baseType = w.type();\n if (Types.isArray(w.type())) {\n baseType = new ArrayInfo(w.type()).baseType;\n useDeepWait = true;\n }\n if (Types.isScalarFuture(baseType)) {\n } else {\n throw new STCRuntimeError(\"String_Node_Str\" + \"String_Node_Str\" + w.type().typeName());\n }\n }\n Expression waitExpr = getTurbineWaitId(w);\n waitFor.add(waitExpr);\n }\n incrementAllRefs(usedVariables, keepOpenVars);\n setPriority(priority);\n TclList action = buildAction(uniqueName, toPassIn);\n boolean local = execContextStack.peek() == ExecContext.CONTROL;\n if (useDeepWait) {\n int[] depths = new int[waitVars.size()];\n boolean[] isFile = new boolean[waitVars.size()];\n for (int i = 0; i < waitVars.size(); i++) {\n Type waitVarType = waitVars.get(i).type();\n Type baseType;\n if (Types.isArray(waitVarType)) {\n ArrayInfo ai = new ArrayInfo(waitVarType);\n depths[i] = ai.nesting;\n baseType = ai.baseType;\n } else {\n depths[i] = 0;\n baseType = waitVarType;\n }\n isFile[i] = Types.isFile(baseType);\n }\n pointStack.peek().add(Turbine.deepRule(uniqueName, waitFor, depths, isFile, action, mode, local));\n } else {\n pointStack.peek().add(Turbine.rule(uniqueName, waitFor, action, mode, local));\n }\n clearPriority(priority);\n pointStack.push(constructProc);\n ExecContext newExecContext;\n if (mode == TaskMode.LEAF) {\n newExecContext = ExecContext.LEAF;\n } else if (mode == TaskMode.CONTROL) {\n newExecContext = ExecContext.CONTROL;\n } else {\n newExecContext = execContextStack.peek();\n }\n execContextStack.push(newExecContext);\n}\n"
|
"public Type add(final MethodVisitor method, final int programPoint) {\n return Type.INT.add(method, programPoint);\n}\n"
|
"public INDArray broadcast(int[] shape) {\n ensureNotCleanedUp();\n if (Shape.shapeEquals(shape, shape()))\n return this;\n boolean compatible = true;\n int count = shape.length - 1;\n int thisCount = this.shape.length - 1;\n for (int i = shape.length - 1; i > 0; i--) {\n if (count < 0 || thisCount < 0)\n break;\n if (shape[count] != shape()[thisCount] && shape[count] != 1 && shape()[thisCount] != 1) {\n compatible = false;\n break;\n }\n count--;\n thisCount--;\n }\n if (!compatible)\n throw new IllegalArgumentException(\"String_Node_Str\" + Arrays.toString(shape()) + \"String_Node_Str\" + Arrays.toString(shape));\n if (isScalar()) {\n INDArray ret = Nd4j.valueArrayOf(shape, getDouble(0));\n return ret;\n } else if (isColumnVector() && Shape.isMatrix(shape)) {\n INDArray ret = create(shape);\n for (int i = 0; i < ret.columns(); i++) ret.putColumn(i, this.dup());\n return ret;\n } else if (isRowVector()) {\n INDArray ret = Nd4j.create(shape);\n for (int i = 0; i < ret.rows(); i++) ret.putRow(i, this.dup());\n return ret;\n }\n int[] retShape = new int[shape.length];\n for (int i = 0; i < retShape.length; i++) {\n if (shape().length == 1) {\n if (i == 0) {\n if (i < shape().length)\n retShape[i] = Math.max(1, shape[i]);\n else\n retShape[i] = shape[i];\n } else {\n if (i < shape().length)\n retShape[i] = Math.max(shape[i], shape()[i]);\n else\n retShape[i] = shape[i];\n }\n } else {\n if (i < shape().length)\n retShape[i] = Math.max(shape[i], shape()[i]);\n else\n retShape[i] = shape[i];\n }\n }\n INDArray ret = Nd4j.create(retShape);\n INDArray linear = ret.linearView();\n INDArray thisLinear = linearView();\n int bufferIdx = 0;\n for (int i = 0; i < ret.length(); i++) {\n linear.putScalar(i, thisLinear.getDouble(bufferIdx));\n bufferIdx++;\n if (bufferIdx >= length())\n bufferIdx = 0;\n }\n return ret;\n}\n"
|
"private boolean isSupportValidationRuleNode(Node node) {\n boolean hasFlow = false;\n if (node.getComponent() != null && node.getComponent() instanceof AbstractBasicComponent) {\n AbstractBasicComponent component = (AbstractBasicComponent) node.getComponent();\n if (component.useLookup() || component.useMerge() || !component.useSchema(node)) {\n return false;\n }\n if (component.useFlow()) {\n hasFlow = true;\n }\n }\n return hasFlow;\n}\n"
|
"private void finishCooking() {\n if (canCook()) {\n IAlchemicalCauldronRecipe recipe = AlchemicalCauldronCraftingManager.getInstance().findRecipe(getStackInSlot(SLOT_LIQUID), getStackInSlot(SLOT_INGREDIENT));\n if (!isStackInSlot(SLOT_RESULT)) {\n setInventorySlotContents(SLOT_RESULT, recipe.getOutput().copy());\n } else if (getStackInSlot(SLOT_RESULT).isItemEqual(recipe.getOutput())) {\n ItemStackUtil.grow(getStackInSlot(SLOT_RESULT), ItemStackUtil.getCount(recipe.getOutput()));\n }\n if (recipe.isValidLiquidItem(getStackInSlot(SLOT_LIQUID))) {\n decrStackSize(SLOT_LIQUID, 1);\n } else {\n ItemStack fluidContainer = getStackInSlot(SLOT_LIQUID);\n FluidStack s = recipe.isValidFluidItem(fluidContainer);\n if (s != null) {\n IFluidHandlerItem handler = (IFluidHandlerItem) FluidLib.getFluidItemCap(fluidContainer);\n handler.drain(s, true);\n } else {\n VampirismMod.log.w(\"String_Node_Str\", \"String_Node_Str\", recipe, fluidContainer);\n }\n }\n decrStackSize(SLOT_INGREDIENT, 1);\n }\n}\n"
|
"Node discriminate(Chrest model, ListPattern pattern) {\n ListPattern newInformation = pattern.remove(_contents);\n if (newInformation.isEmpty()) {\n if (newInformation.isFinished()) {\n return addTest(model, newInformation);\n } else {\n return this;\n }\n }\n Node retrievedChunk = model.recognise(newInformation);\n if (retrievedChunk == model.getLtmByModality(pattern)) {\n return model.getLtmByModality(newInformation).learnPrimitive(model, newInformation.getFirstItem());\n } else if (retrievedChunk.getImage().isEmpty()) {\n return retrievedChunk.familiarise(model, newInformation);\n } else if (retrievedChunk.getImage().matches(newInformation)) {\n ListPattern testPattern = retrievedChunk.getImage().clone();\n testPattern.setNotFinished();\n return addTest(model, testPattern);\n } else {\n ListPattern firstItem = newInformation.getFirstItem();\n firstItem.setNotFinished();\n return addTest(model, firstItem);\n }\n}\n"
|
"private boolean setupRequest() {\n long version = slave.getVersion();\n while (version < masterVersion) {\n if (slave.hasLog(version)) {\n version++;\n } else {\n break;\n }\n }\n if (version == masterVersion) {\n setStatus(Status.GET_MESSAGE);\n return true;\n }\n if (retries > 20) {\n close();\n }\n if (!acquireWriteBuffer()) {\n retries++;\n return false;\n }\n buffer.put(HeaderConstants.REQUEST_LOG);\n buffer.putLong(version);\n buffer.flip();\n log(\"String_Node_Str\" + version);\n setStatus(Status.SEND_REQUEST);\n retries = 0;\n return true;\n}\n"
|
"public String doPreprocessing(String path) throws IOException {\n File[] files;\n File input = new File(path);\n String outputPath;\n if (input.isDirectory()) {\n files = input.listFiles();\n outputPath = path + System.getProperty(\"String_Node_Str\") + \"String_Node_Str\";\n } else {\n files = new File[1];\n files[0] = input;\n outputPath = input.getParentFile().getAbsolutePath() + System.getProperty(\"String_Node_Str\") + \"String_Node_Str\";\n }\n if (new File(outputPath).mkdir()) {\n System.out.println(\"String_Node_Str\");\n }\n if (options.getStopFile() != null && options.getStopFile() != \"String_Node_Str\" && options.getStopFile().length() > 3) {\n doStopWords = true;\n String currentLine;\n BufferedReader br = new BufferedReader(new FileReader(new File(options.getStopFile())));\n while ((currentLine = br.readLine()) != null) {\n stopWordsSet.add(currentLine.trim().toLowerCase());\n }\n br.close();\n }\n if (options.isDoStemming()) {\n if (options.getStemLang().equals(\"String_Node_Str\")) {\n appendLog(\"String_Node_Str\");\n doLangDetect = true;\n System.out.println(System.getProperty(\"String_Node_Str\"));\n System.out.println(this.getClass().getResource(\"String_Node_Str\").getPath());\n try {\n DetectorFactory.loadProfile(\"String_Node_Str\");\n } catch (com.cybozu.labs.langdetect.LangDetectException ex) {\n System.out.println(\"String_Node_Str\" + ex.getCode());\n }\n } else {\n doLangDetect = false;\n stemmer = stemSelect(options.getStemLang());\n }\n }\n for (File f : files) {\n if (\"String_Node_Str\".equals(f.getName()))\n continue;\n String inputFile = f.getAbsolutePath();\n System.out.println(\"String_Node_Str\" + inputFile);\n if (doLangDetect) {\n try {\n stemmer = findLangStemmer(f);\n } catch (LangDetectException e) {\n e.printStackTrace();\n }\n if (stemmer == null) {\n appendLog(\"String_Node_Str\");\n }\n }\n File iFile = new File(inputFile);\n if (!iFile.exists() || iFile.isDirectory()) {\n System.out.println(\"String_Node_Str\" + iFile.getAbsolutePath());\n appendLog(\"String_Node_Str\" + iFile.getAbsolutePath());\n continue;\n }\n File oFile = new File(outputPath + System.getProperty(\"String_Node_Str\") + f.getName());\n BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(iFile), \"String_Node_Str\"));\n BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(oFile), \"String_Node_Str\"));\n String linear;\n while ((linear = br.readLine()) != null) {\n if (linear != \"String_Node_Str\") {\n if (options.isDoLowercase())\n linear = linear.toLowerCase();\n for (char c : options.getDelimiters().toCharArray()) linear = linear.replace(c, ' ');\n if (doStopWords)\n linear = removeStopWords(linear);\n if (options.isDoStemming())\n linear = stem(linear);\n bw.write(linear + \"String_Node_Str\");\n }\n }\n System.out.println(outputPath + System.getProperty(\"String_Node_Str\") + f.getName());\n br.close();\n bw.close();\n }\n System.out.println(\"String_Node_Str\" + outputPath);\n return outputPath;\n}\n"
|
"private boolean eligibleForAction(NodeRef actionedUponNodeRef) {\n boolean result = false;\n if (nodeService.exists(actionedUponNodeRef) && !freezeService.isFrozen(actionedUponNodeRef) && recordService.isRecord(actionedUponNodeRef) && !recordService.isDeclared(actionedUponNodeRef)) {\n result = true;\n }\n return result;\n}\n"
|
"private Section createTableSectionPartForMapDB(Composite parentComp, String title, SimpleStatIndicator ssIndicator) {\n Section columnSetElementSection = this.createSection(form, parentComp, title, null);\n Composite sectionTableComp = toolkit.createComposite(columnSetElementSection);\n if (ssIndicator.isStoreData()) {\n columnSetElementSection.setExpanded(true);\n columnSetElementSection.setEnabled(true);\n sectionTableComp.setLayoutData(new GridData(GridData.FILL_BOTH));\n sectionTableComp.setLayout(new GridLayout());\n AbstractDB<Object> mapDB = null;\n try {\n mapDB = ssIndicator.getMapDB(StandardDBName.dataSection.name());\n } catch (IOError error) {\n log.warn(error.getMessage(), error);\n }\n Button filterDataBt = new Button(sectionTableComp, SWT.NONE);\n filterDataBt.setText(DefaultMessagesImpl.getString(\"String_Node_Str\"));\n filterDataBt.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false));\n filterDataBt.setEnabled(containAllMatchIndicator() && mapDB != null);\n filterDataBt.addMouseListener(new MouseListener() {\n public void mouseDoubleClick(MouseEvent e) {\n }\n public void mouseDown(MouseEvent e) {\n List<Indicator> indicatorsList = masterPage.analysisItem.getAnalysis().getResults().getIndicators();\n SelectPatternsWizard wizard = new SelectPatternsWizard(indicatorsList);\n wizard.setFilterType(filterType);\n wizard.setOldTableInputList(ColumnSetResultPage.this.tableFilterResult);\n WizardDialog dialog = new WizardDialog(null, wizard);\n dialog.setPageSize(300, 400);\n wizard.setContainer(dialog);\n wizard.setWindowTitle(DefaultMessagesImpl.getString(\"String_Node_Str\"));\n if (WizardDialog.OK == dialog.open()) {\n ColumnSetResultPage.this.tableFilterResult = wizard.getPatternSelectPage().getTableInputList();\n filterType = wizard.getPatternSelectPage().getFilterType();\n columnsElementViewer.refresh();\n }\n }\n public void mouseUp(MouseEvent e) {\n }\n });\n columnsElementViewer = new TableViewer(sectionTableComp, SWT.MULTI | SWT.FULL_SELECTION | SWT.BORDER);\n Table table = columnsElementViewer.getTable();\n table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));\n table.setLinesVisible(true);\n table.setHeaderVisible(true);\n TableSectionViewerProvider provider = new TableSectionViewerProvider();\n columnsElementViewer.setContentProvider(provider);\n columnsElementViewer.addFilter(new PatternDataFilter());\n columnSetElementSection.setClient(sectionTableComp);\n columnSetElementSection.setExpanded(false);\n int pageSize = 100;\n setupTableGridDataLimitedSize(table, pageSize);\n final PageableController controller = new PageableController(MapDBPageConstant.NUMBER_PER_PAGE);\n if (mapDB != null) {\n final IPageLoader<PageResult<Object[]>> pageLoader = new MapDBPageLoader<Object[]>(mapDB);\n controller.addPageChangedListener(PageLoaderStrategyHelper.createLoadPageAndReplaceItemsListener(controller, columnsElementViewer, pageLoader, PageResultContentProvider.getInstance(), null));\n ResultAndNavigationPageGraphicsRenderer resultAndPageButtonsDecorator = new ResultAndNavigationPageGraphicsRenderer(sectionTableComp, SWT.NONE, controller);\n resultAndPageButtonsDecorator.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n }\n createColumns(controller, ssIndicator);\n controller.setCurrentPage(0);\n for (TableColumn column : table.getColumns()) {\n column.pack();\n }\n } else {\n columnSetElementSection.setExpanded(false);\n columnSetElementSection.setEnabled(false);\n }\n return columnSetElementSection;\n}\n"
|
"private void clampHunToTop(AmbientState ambientState, ExpandableNotificationRow row, StackViewState childState) {\n float newTranslation = Math.max(ambientState.getTopPadding() + ambientState.getStackTranslation(), childState.yTranslation);\n childState.height = (int) Math.max(childState.height - (newTranslation - childState.yTranslation), row.getCollapsedHeight());\n childState.yTranslation = newTranslation;\n}\n"
|
"private void setGenericRepositoryValue(GenericConnection connection, INode node, IElementParameter param) {\n if (connection != null) {\n IComponent component = node.getComponent();\n if (component != null && component instanceof AbstractComponent) {\n ((GenericElementParameter) param).getComponentProperties().fromSerialized(connection.getCompProperties());\n }\n }\n}\n"
|
"private void trimDirectiveWhitespacesAndComments(ListIterator<AstStatement> it, int block, ParserContext ctx) {\n boolean trimDirectiveWhitespaces = ctx.isTrimDirectiveWhitespaces();\n boolean trimDirectiveComments = ctx.isTrimDirectiveComments();\n String trimDirectiveCommentsPrefix = ctx.getTrimDirectiveCommentsPrefix();\n String trimDirectiveCommentsSuffix = ctx.getTrimDirectiveCommentsSuffix();\n if (!trimDirectiveWhitespaces && !trimDirectiveComments) {\n return;\n }\n it.reset();\n while (it.has()) {\n AstStatement stmt = it.peek();\n if (!(stmt instanceof AstText)) {\n it.move();\n continue;\n }\n AstText text = (AstText) stmt;\n boolean trimLeft;\n boolean keepLeftNewLine = false;\n if (it.hasPrevious()) {\n trimLeft = isAstDirective(it.peek(-1));\n if (trimLeft) {\n if (!it.hasNext() && block == Tokens.AST_BLOCK_TEMPLATE) {\n keepLeftNewLine = true;\n } else {\n int offset = -1;\n while (it.has(offset)) {\n AstStatement prev = it.peek(offset);\n if (prev instanceof AstText) {\n keepLeftNewLine = ((AstText) prev).getLineStop() == text.getLineStart();\n break;\n }\n offset--;\n }\n }\n }\n } else {\n trimLeft = (block != Tokens.AST_BLOCK_TEMPLATE);\n }\n boolean trimRight;\n if (it.hasNext()) {\n trimRight = (it.peek(1) instanceof AstDirective);\n } else {\n trimRight = (block != Tokens.AST_BLOCK_TEMPLATE);\n }\n if (trimDirectiveComments) {\n text.trimDirectiveComments(trimLeft, trimRight, trimDirectiveCommentsPrefix, trimDirectiveCommentsSuffix);\n }\n if (trimDirectiveWhitespaces) {\n text.trimDirectiveWhitespaces(trimLeft, trimRight, keepLeftNewLine);\n }\n if (!it.hasNext()) {\n if (block == Tokens.AST_BLOCK_TAG || block == Tokens.AST_BLOCK_MACRO) {\n text.trimLastNewLine();\n }\n }\n if (text.isEmpty()) {\n it.remove();\n } else {\n it.move();\n }\n }\n}\n"
|
"public DBObject getFieldsObject() {\n if (fields == null || fields.length == 0)\n return null;\n Map<String, Boolean> fieldsFilter = new HashMap<String, Boolean>();\n for (String field : this.fields) {\n StringBuffer sb = new StringBuffer(field);\n Mapper.validate(clazz, ds.getMapper(), sb, FilterOperator.EQUAL, null, validateName, false);\n field = sb.toString();\n fieldsFilter.put(field, (includeFields));\n }\n return new BasicDBObject(fieldsFilter);\n}\n"
|
"public long getEnergyCapacity(ItemStack itemStack) {\n return energyCost * 10;\n}\n"
|
"protected final int getItemCount() {\n return getListAdapter().getCount();\n}\n"
|
"CrosstabCellHandle addGrandTotal(List<MeasureViewHandle> measureList, List<String> functionList, boolean needTransaction) throws SemanticException {\n if (!isValidParameters(functionList, measureList))\n return null;\n verifyTotalMeasureFunctions(crosstabView.getAxisType(), functionList, measureList);\n PropertyHandle propHandle = crosstabView.getGrandTotalProperty();\n CommandStack stack = null;\n if (needTransaction) {\n stack = crosstabView.getCommandStack();\n stack.startTrans(Messages.getString(\"String_Node_Str\"));\n }\n CrosstabCellHandle totalCell = null;\n try {\n ExtendedItemHandle grandTotal = null;\n if (propHandle.getContentCount() <= 0) {\n grandTotal = CrosstabExtendedItemFactory.createCrosstabCell(crosstabView.getModuleHandle());\n propHandle.add(grandTotal);\n }\n CrosstabReportItemHandle crosstab = crosstabView.getCrosstab();\n if (crosstab != null && measureList != null) {\n boolean isVerticalMeasure = MEASURE_DIRECTION_VERTICAL.equals(crosstab.getMeasureDirection());\n boolean needCheckCounterAxis = ((isVerticalMeasure && crosstabView.getAxisType() == COLUMN_AXIS_TYPE) || (!isVerticalMeasure && crosstabView.getAxisType() == ROW_AXIS_TYPE));\n addMeasureAggregations(crosstabView.getAxisType(), measureList, functionList, needCheckCounterAxis);\n addTotalMeasureHeader(crosstabView.getAxisType(), null, measureList);\n }\n validateCrosstab();\n totalCell = (CrosstabCellHandle) CrosstabUtil.getReportItem(grandTotal);\n } catch (SemanticException e) {\n crosstabView.getLogger().log(Level.INFO, e.getMessage(), e);\n if (needTransaction) {\n stack.rollback();\n }\n throw e;\n }\n if (needTransaction) {\n stack.commit();\n }\n return totalCell;\n}\n"
|
"public void setValue(int index, Object value) {\n if (index == 1) {\n super.setValue(index, value);\n } else if (index == 2) {\n m_ObjectList.clear();\n if (value != null) {\n for (Object item : (Object[]) value) {\n ObjectType type = ObjectType.forValue(((Number) Array.get(item, 0)).intValue());\n int version = ((Number) Array.get(item, 1)).intValue();\n String ln = GXDLMSObject.toLogicalName((byte[]) Array.get(item, 2));\n GXDLMSObject obj = getParent().findByLN(type, ln);\n if (obj == null) {\n obj = gurux.dlms.GXDLMSClient.createObject(type);\n obj.setLogicalName(ln);\n obj.setVersion(version);\n }\n if (obj instanceof IGXDLMSBase) {\n updateAccessRights(obj, (Object[]) Array.get(item, 3));\n m_ObjectList.add(obj);\n }\n }\n }\n } else if (index == 3) {\n if (value != null) {\n ClientSAP = (short) GXCommon.intValue(Array.get(value, 0));\n ServerSAP = (short) GXCommon.intValue(Array.get(value, 1));\n }\n } else if (index == 4) {\n if (value instanceof byte[]) {\n int pos = -1;\n byte[] arr = (byte[]) value;\n if (arr[0] == 0x60) {\n ApplicationContextName.setJointIsoCtt(0);\n ++pos;\n ApplicationContextName.setCountry(0);\n ++pos;\n ApplicationContextName.setCountryName(0);\n ++pos;\n ApplicationContextName.setIdentifiedOrganization(arr[++pos]);\n ApplicationContextName.setDlmsUA(arr[++pos]);\n ApplicationContextName.setApplicationContext(arr[++pos]);\n ApplicationContextName.setContextId(arr[++pos]);\n } else {\n if (arr[++pos] != 2 && arr[++pos] != 7) {\n throw new IllegalArgumentException();\n }\n if (arr[++pos] != 0x11) {\n throw new IllegalArgumentException();\n }\n ApplicationContextName.setJointIsoCtt(arr[++pos]);\n if (arr[++pos] != 0x11) {\n throw new IllegalArgumentException();\n }\n ApplicationContextName.setCountry(arr[++pos]);\n if (arr[++pos] != 0x12) {\n throw new IllegalArgumentException();\n }\n int[] tmp = new int[] { pos };\n ApplicationContextName.setCountryName(GXCommon.getUInt16(arr, tmp));\n pos = tmp[1];\n if (arr[++pos] != 0x11) {\n throw new IllegalArgumentException();\n }\n ApplicationContextName.setIdentifiedOrganization(arr[++pos]);\n if (arr[++pos] != 0x11) {\n throw new IllegalArgumentException();\n }\n ApplicationContextName.setDlmsUA(arr[++pos]);\n if (arr[++pos] != 0x11) {\n throw new IllegalArgumentException();\n }\n ApplicationContextName.setApplicationContext(arr[++pos]);\n if (arr[++pos] != 0x11) {\n throw new IllegalArgumentException();\n }\n ApplicationContextName.setContextId(arr[++pos]);\n }\n } else {\n if (value != null) {\n ApplicationContextName.setJointIsoCtt(((Number) Array.get(value, 0)).intValue());\n ApplicationContextName.setCountry(((Number) Array.get(value, 1)).intValue());\n ApplicationContextName.setCountryName(((Number) Array.get(value, 2)).intValue());\n ApplicationContextName.setIdentifiedOrganization(((Number) Array.get(value, 3)).intValue());\n ApplicationContextName.setDlmsUA(((Number) Array.get(value, 4)).intValue());\n ApplicationContextName.setApplicationContext(((Number) Array.get(value, 5)).intValue());\n ApplicationContextName.setContextId(((Number) Array.get(value, 6)).intValue());\n }\n }\n } else if (index == 5) {\n if (value != null) {\n XDLMSContextInfo.setConformance(Array.get(value, 0).toString());\n XDLMSContextInfo.setMaxReceivePduSize(((Number) Array.get(value, 1)).intValue());\n XDLMSContextInfo.setMaxSendPpuSize(((Number) Array.get(value, 2)).intValue());\n XDLMSContextInfo.setDlmsVersionNumber(((Number) Array.get(value, 3)).intValue());\n XDLMSContextInfo.setQualityOfService(((Number) Array.get(value, 4)).intValue());\n XDLMSContextInfo.setCypheringInfo((byte[]) Array.get(value, 5));\n }\n } else if (index == 6) {\n if (value != null) {\n if (value instanceof byte[]) {\n int pos = -1;\n byte[] arr = (byte[]) value;\n if (arr[0] == 0x60) {\n AuthenticationMechanismMame.setJointIsoCtt(0);\n ++pos;\n AuthenticationMechanismMame.setCountry(0);\n ++pos;\n AuthenticationMechanismMame.setCountryName(0);\n ++pos;\n AuthenticationMechanismMame.setIdentifiedOrganization(arr[++pos]);\n AuthenticationMechanismMame.setDlmsUA(arr[++pos]);\n AuthenticationMechanismMame.setAuthenticationMechanismName(arr[++pos]);\n AuthenticationMechanismMame.setMechanismId(Authentication.forValue(arr[++pos]));\n } else {\n if (arr[++pos] != 2 && arr[++pos] != 7) {\n throw new IllegalArgumentException();\n }\n if (arr[++pos] != 0x11) {\n throw new IllegalArgumentException();\n }\n AuthenticationMechanismMame.setJointIsoCtt(arr[++pos]);\n if (arr[++pos] != 0x11) {\n throw new IllegalArgumentException();\n }\n AuthenticationMechanismMame.setCountry(arr[++pos]);\n if (arr[++pos] != 0x12) {\n throw new IllegalArgumentException();\n }\n int[] tmp = new int[] { pos };\n AuthenticationMechanismMame.setCountryName(GXCommon.getUInt16(arr, tmp));\n pos = tmp[0];\n if (arr[++pos] != 0x11) {\n throw new IllegalArgumentException();\n }\n AuthenticationMechanismMame.setIdentifiedOrganization(arr[++pos]);\n if (arr[++pos] != 0x11) {\n throw new IllegalArgumentException();\n }\n AuthenticationMechanismMame.setDlmsUA(arr[++pos]);\n if (arr[++pos] != 0x11) {\n throw new IllegalArgumentException();\n }\n AuthenticationMechanismMame.setAuthenticationMechanismName(arr[++pos]);\n if (arr[++pos] != 0x11) {\n throw new IllegalArgumentException();\n }\n AuthenticationMechanismMame.setMechanismId(Authentication.forValue(arr[++pos]));\n }\n } else {\n if (value != null) {\n AuthenticationMechanismMame.setJointIsoCtt(((Number) Array.get(value, 0)).intValue());\n AuthenticationMechanismMame.setCountry(((Number) Array.get(value, 1)).intValue());\n AuthenticationMechanismMame.setCountryName(((Number) Array.get(value, 2)).intValue());\n AuthenticationMechanismMame.setIdentifiedOrganization(((Number) Array.get(value, 3)).intValue());\n AuthenticationMechanismMame.setDlmsUA(((Number) Array.get(value, 4)).intValue());\n AuthenticationMechanismMame.setAuthenticationMechanismName(((Number) Array.get(value, 5)).intValue());\n AuthenticationMechanismMame.setMechanismId(Authentication.forValue(((Number) Array.get(value, 6)).intValue()));\n }\n }\n }\n } else if (index == 7) {\n Secret = (byte[]) value;\n } else if (index == 8) {\n if (value == null) {\n setAssociationStatus(AssociationStatus.NonAssociated);\n } else {\n setAssociationStatus(AssociationStatus.values()[((Number) value).intValue()]);\n }\n } else if (index == 9) {\n setSecuritySetupReference(GXDLMSObject.toLogicalName((byte[]) value));\n } else {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n}\n"
|
"public int getClassId() {\n return MultiMapPortableHook.TXN_MM_REMOVE;\n}\n"
|
"private void updateOverview(String target) {\n performanceTableSensitivitySpecificity.setRedraw(false);\n for (final TableItem i : performanceTableSensitivitySpecificity.getItems()) {\n i.dispose();\n }\n performancePerClassTable.setRedraw(true);\n if (!originalRocCurves.containsKey(target)) {\n return;\n }\n List<String> values = new ArrayList<>(originalRocCurves.get(target).keySet());\n Collections.sort(values);\n List<Double> sensitivities = new ArrayList<Double>();\n List<Double> specificities = new ArrayList<Double>();\n List<Double> brierscores = new ArrayList<Double>();\n for (String clazz : values) {\n ROCCurve c;\n if (isOutput) {\n c = rocCurves.get(target).get(clazz);\n } else {\n c = originalRocCurves.get(target).get(clazz);\n }\n TableItem item = new TableItem(performancePerClassTable, SWT.NONE);\n item.setText(0, clazz);\n item.setData(\"String_Node_Str\", c.getSensitivity());\n item.setData(\"String_Node_Str\", c.getSpecificity());\n item.setData(\"String_Node_Str\", c.getBrierScore());\n sensitivities.add(c.getSensitivity());\n specificities.add(c.getSpecificity());\n brierscores.add(c.getBrierScore());\n }\n double[] min = new double[3];\n double[] avg = new double[3];\n double[] max = new double[3];\n for (int i = 0; i < sensitivities.size(); i++) {\n double sensitivity = sensitivities.get(i);\n min[0] = min[0] == 0d ? sensitivity : Math.min(min[0], sensitivity);\n max[0] = Math.max(max[0], sensitivity);\n avg[0] += sensitivity;\n double specificity = specificities.get(i);\n min[1] = min[1] == 0d ? specificity : Math.min(min[1], specificity);\n max[1] = Math.max(max[1], specificity);\n avg[1] += specificity;\n double brierscore = brierscores.get(i);\n min[2] = min[2] == 0d ? brierscore : Math.min(min[2], brierscore);\n max[2] = Math.max(max[2], brierscore);\n avg[2] += brierscore;\n }\n TableItem item = new TableItem(performancePerClassTable, SWT.NONE);\n item.setText(0, Resources.getMessage(\"String_Node_Str\"));\n item.setData(\"String_Node_Str\", min[0]);\n item.setData(\"String_Node_Str\", min[1]);\n item.setData(\"String_Node_Str\", min[2]);\n item = new TableItem(performancePerClassTable, SWT.NONE);\n item.setText(0, Resources.getMessage(\"String_Node_Str\"));\n item.setData(\"String_Node_Str\", avg[0] / values.size());\n item.setData(\"String_Node_Str\", avg[1] / values.size());\n item.setData(\"String_Node_Str\", avg[2] / values.size());\n item = new TableItem(performancePerClassTable, SWT.NONE);\n item.setText(0, Resources.getMessage(\"String_Node_Str\"));\n item.setData(\"String_Node_Str\", max[0]);\n item.setData(\"String_Node_Str\", max[1]);\n item.setData(\"String_Node_Str\", max[2]);\n}\n"
|
"private ImageView createImageView(final File imageFile) {\n ImageView imageView;\n try {\n final Image image = new Image(new FileInputStream(imageFile), 150, 150, true, true);\n imageView = new ImageView(image);\n imageView.setFitWidth(150);\n imageView.setFitHeight(150);\n imageView.setOnMouseClicked(mouseEvent -> {\n if (mouseEvent.getButton().equals(MouseButton.PRIMARY)) {\n ImageView imgView = (ImageView) mouseEvent.getSource();\n if (mouseEvent.getClickCount() == 1) {\n imageClicked1(imgView);\n }\n }\n });\n return imageView;\n } catch (FileNotFoundException ex) {\n LOGGER.debug(\"String_Node_Str\" + ex.getMessage());\n }\n return null;\n}\n"
|
"private void updateTestResult(TestResult testResult, BuildListener listener, APISession api, String testSessionID, List<Item> testCaseList) throws APIException {\n for (Item test : testCaseList) {\n Field testCaseIDFld = null;\n Field containsFld = null;\n try {\n testCaseIDFld = test.getField(testCaseTestNameField);\n containsFld = test.getField(testSuiteContainsField);\n } catch (NoSuchElementException nsee) {\n testCaseIDFld = walkResponse.getWorkItem(test.getId()).getField(testCaseTestNameField);\n containsFld = walkResponse.getWorkItem(test.getId()).getField(testSuiteContainsField);\n }\n if (null != testCaseIDFld && null != testCaseIDFld.getValueAsString()) {\n String testCaseID = testCaseIDFld.getValueAsString();\n String junitTestName = getJUnitID(testCaseID);\n Logger.debug(\"String_Node_Str\" + testCaseID + \"String_Node_Str\" + junitTestName);\n TestResult caseResult = testResult.findCorrespondingResult(junitTestName);\n if (null != caseResult) {\n Logger.debug(\"String_Node_Str\" + junitTestName);\n editTestResult(api, (caseResult.isPassed() ? \"String_Node_Str\" + caseResult.getId() + \"String_Node_Str\" : caseResult.getErrorDetails()), (caseResult.isPassed() ? testPassedVerdictName : testFailedVerdictName), testSessionID, test.getId());\n } else {\n Logger.warn(\"String_Node_Str\" + junitTestName);\n editTestResult(api, \"String_Node_Str\" + getJUnitID(testCaseID) + \"String_Node_Str\", testSkippedVerdictName, testSessionID, test.getId());\n }\n }\n Field containsFld = test.getField(testSuiteContainsField);\n if (null != containsFld && null != containsFld.getList()) {\n updateTestResult(testResult, listener, api, testSessionID, containsFld.getList());\n }\n }\n}\n"
|
"public synchronized void deleteQueues(HttpRequest request, HttpResponder responder, String namespaceId) {\n NamespaceId namespace = new NamespaceId(namespaceId);\n try {\n List<ProgramRecord> flows = lifecycleService.list(validateAndGetNamespace(namespaceId), ProgramType.FLOW);\n for (ProgramRecord flow : flows) {\n String appId = flow.getApp();\n String flowId = flow.getName();\n ProgramId programId = new ProgramId(namespaceId, appId, ProgramType.FLOW, flowId);\n ProgramStatus status = lifecycleService.getProgramStatus(programId);\n if (ProgramStatus.STOPPED != status) {\n responder.sendString(HttpResponseStatus.FORBIDDEN, String.format(\"String_Node_Str\" + \"String_Node_Str\", flowId, appId, namespaceId));\n return;\n }\n }\n queueAdmin.dropAllInNamespace(namespace);\n FlowUtils.deleteFlowPendingMetrics(metricStore, namespaceId, null, null);\n responder.sendStatus(HttpResponseStatus.OK);\n } catch (Exception e) {\n LOG.error(\"String_Node_Str\" + namespace, e);\n responder.sendString(HttpResponseStatus.INTERNAL_SERVER_ERROR, e.getMessage());\n }\n}\n"
|
"public void testUpdateCatalogEntryQuery() throws IOException, URISyntaxException {\n RestConnection conn = new RestConnection();\n assertTrue(conn.login(\"String_Node_Str\", \"String_Node_Str\"));\n URI uri = UriBuilder.fromUri(getContextURI()).path(\"String_Node_Str\").path(entry2.getKey().toString()).build();\n HttpPost method = conn.createPost(uri, MediaType.APPLICATION_JSON);\n conn.addEntity(method, new BasicNameValuePair(\"String_Node_Str\", \"String_Node_Str\"), new BasicNameValuePair(\"String_Node_Str\", \"String_Node_Str\"), new BasicNameValuePair(\"String_Node_Str\", String.valueOf(CatalogEntry.TYPE_NODE)));\n HttpResponse response = conn.execute(method);\n assertEquals(200, response.getStatusLine().getStatusCode());\n CatalogEntryVO vo = conn.parse(response, CatalogEntryVO.class);\n assertNotNull(vo);\n CatalogManager catalogManager = CatalogManager.getInstance();\n CatalogEntry updatedEntry = catalogManager.loadCatalogEntry(entry2);\n assertEquals(\"String_Node_Str\", updatedEntry.getName());\n assertEquals(\"String_Node_Str\", updatedEntry.getDescription());\n conn.shutdown();\n}\n"
|
"public void cancel() throws OdaException {\n try {\n if (this.preStat != null) {\n System.out.println(\"String_Node_Str\");\n this.preStat.cancel();\n }\n } catch (Exception e) {\n }\n try {\n if (this.conn != null) {\n this.conn.close();\n }\n } catch (Exception e) {\n }\n try {\n IConnectionPoolManager manager = ConnectionPoolFactory.getInstance();\n if (manager != null)\n manager.closeConnection(this.conn);\n } catch (Exception e) {\n }\n}\n"
|
"public Sound transform(AbstractFrequencySoundTransformation st, Sound sound) {\n Sound output = st.initSound(sound);\n double freqmax = sound.getSampleRate();\n double threshold = st.getLowThreshold(freqmax);\n int maxlength = st.getWindowLength(freqmax);\n long[] data = sound.getSamples();\n long[] newdata = output.getSamples();\n double[] transformeddata = new double[maxlength];\n FastFourierTransformer fastFourierTransformer = new FastFourierTransformer(DftNormalization.STANDARD);\n for (int i = 0; i < data.length; i += threshold) {\n int length = Math.min(maxlength, data.length - i);\n for (int j = i; j < i + length; j++) {\n transformeddata[j - i] = data[j];\n }\n Complex[] complexArray = fastFourierTransformer.transform(transformeddata, TransformType.FORWARD);\n Spectrum fs = new Spectrum(complexArray, (int) freqmax, sound.getNbBytesPerSample());\n Spectrum result = st.transformFrequencies(fs, i, maxlength, length);\n if (result == null) {\n continue;\n }\n complexArray = fastFourierTransformer.transform(result.getState(), TransformType.INVERSE);\n int k = st.getOffsetFromASimpleLoop(i, freqmax);\n for (int j = 0; j < freqmax; j++) {\n if (i + j + k < newdata.length && newdata[i + j + k] == 0) {\n newdata[i + j + k] = (long) Math.floor(complexArray[j].getReal());\n }\n }\n }\n return output;\n}\n"
|
"LocalMapStatsImpl getLocalMapStats() {\n LocalMapStatsImpl localMapStats = new LocalMapStatsImpl();\n long now = System.currentTimeMillis();\n int ownedEntryCount = 0;\n int backupEntryCount = 0;\n int markedAsRemovedEntryCount = 0;\n int ownedEntryMemoryCost = 0;\n int backupEntryMemoryCost = 0;\n int markedAsRemovedMemoryCost = 0;\n int hits = 0;\n int lockedEntryCount = 0;\n int lockWaitCount = 0;\n ClusterImpl clusterImpl = node.getClusterImpl();\n final Collection<Record> records = mapRecords.values();\n final PartitionServiceImpl partitionService = concurrentMapManager.partitionManager.partitionServiceImpl;\n for (Record record : records) {\n if (!record.isActive() || !record.isValid(now)) {\n markedAsRemovedEntryCount++;\n markedAsRemovedMemoryCost += record.getCost();\n } else {\n PartitionServiceImpl.PartitionProxy partition = partitionService.getPartition(record.getBlockId());\n Member owner = partition.getOwner();\n if (owner != null && !partition.isMigrating()) {\n boolean owned = owner.localMember();\n if (owned) {\n ownedEntryCount += record.valueCount();\n ownedEntryMemoryCost += record.getCost();\n localMapStats.setLastAccessTime(record.getLastAccessTime());\n localMapStats.setLastUpdateTime(record.getLastUpdateTime());\n hits += record.getHits();\n if (record.isLocked()) {\n lockedEntryCount++;\n lockWaitCount += record.getScheduledActionCount();\n }\n } else {\n Member ownerEventual = partition.getEventualOwner();\n boolean backup = false;\n if (ownerEventual != null && !owner.localMember()) {\n int distance = node.getClusterImpl().getDistanceFrom(ownerEventual);\n backup = (distance != -1 && distance <= getBackupCount());\n }\n if (backup && !shouldPurgeRecord(record, now)) {\n backupEntryCount += record.valueCount();\n backupEntryMemoryCost += record.getCost();\n } else {\n markedAsRemovedEntryCount++;\n markedAsRemovedMemoryCost += record.getCost();\n }\n }\n }\n }\n }\n localMapStats.setMarkedAsRemovedEntryCount(zeroOrPositive(markedAsRemovedEntryCount));\n localMapStats.setMarkedAsRemovedMemoryCost(zeroOrPositive(markedAsRemovedMemoryCost));\n localMapStats.setLockWaitCount(zeroOrPositive(lockWaitCount));\n localMapStats.setLockedEntryCount(zeroOrPositive(lockedEntryCount));\n localMapStats.setHits(zeroOrPositive(hits));\n localMapStats.setOwnedEntryCount(zeroOrPositive(ownedEntryCount));\n localMapStats.setBackupEntryCount(zeroOrPositive(backupEntryCount));\n localMapStats.setOwnedEntryMemoryCost(zeroOrPositive(ownedEntryMemoryCost));\n localMapStats.setBackupEntryMemoryCost(zeroOrPositive(backupEntryMemoryCost));\n localMapStats.setLastEvictionTime(zeroOrPositive(clusterImpl.getClusterTimeFor(lastEvictionTime)));\n localMapStats.setCreationTime(zeroOrPositive(clusterImpl.getClusterTimeFor(creationTime)));\n return localMapStats;\n}\n"
|
"private final File locate(String name) {\n String prefix = \"String_Node_Str\";\n File sourceFile = null;\n int idx = 0;\n while (true) {\n if ((idx == 0) && (ToolIO.getUserDir() != null)) {\n sourceFile = new File(ToolIO.getUserDir(), name);\n } else {\n if (isInJar(prefix)) {\n InputStream is = cl.getResourceAsStream(STANDARD_MODULES + name);\n if (is != null) {\n try {\n sourceFile = new File(TMPDIR + File.separator + name);\n sourceFile.deleteOnExit();\n FileOutputStream fos = new FileOutputStream(sourceFile);\n byte[] buf = new byte[1024];\n int len;\n while ((len = is.read(buf)) > 0) {\n fos.write(buf, 0, len);\n }\n fos.close();\n is.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n } else {\n sourceFile = new File(prefix + name);\n }\n }\n if (sourceFile.exists())\n break;\n if (idx >= libraryPaths.length)\n break;\n prefix = libraryPaths[idx++];\n }\n return sourceFile;\n}\n"
|
"public double getCommandedSteeringAngle() {\n int closestIndex = getClosestIndex(wayPoints, pose);\n if (closestIndex == -1) {\n return 17433504;\n }\n double delta = 10 / 100000.0;\n int targetIndex = closestIndex + 2;\n if (targetIndex >= wayPoints.size()) {\n return 0;\n }\n GpsMeasurement targetPoint = wayPoints.get(targetIndex);\n MapMarkerDot destPoint = new MapMarkerDot(targetPoint.getLatitude(), targetPoint.getLongitude());\n AnalyticsPanel.getInstance().getDataPanel().getGpsPanel().setDestinationPoint(destPoint);\n double dLon = targetPoint.getLongitude() - pose.getLongitude();\n double dLat = targetPoint.getLatitude() - pose.getLatitude();\n double desiredHeading = Math.toDegrees(Math.atan2(LocalizerUtil.convertLatToMeters(dLat), LocalizerUtil.convertLonToMeters(dLon)));\n desiredHeading = Util.normalizeAngleDeg(desiredHeading);\n double poseHeading = Util.normalizeAngleDeg(pose.getHeading());\n return Util.normalizeAngleDeg(desiredHeading - poseHeading);\n}\n"
|
"public List<ExpenseLine> getExpenseLineToInvoice(Task task) {\n return (List<ExpenseLine>) ExpenseLine.all().filter(\"String_Node_Str\", task.getId()).fetch();\n}\n"
|
"public void protoContactAdded(ProtoContactEvent evt) {\n final MetaContact metaContact = evt.getNewParent();\n UIContact parentUIContact;\n boolean parentUIContactCreated = false;\n synchronized (metaContact) {\n parentUIContact = MetaContactListSource.getUIContact(metaContact);\n if (parentUIContact == null) {\n parentUIContactCreated = true;\n parentUIContact = MetaContactListSource.createUIContact(metaContact);\n }\n }\n if (parentUIContact != null && parentUIContactCreated) {\n ContactListFilter currentFilter = GuiActivator.getContactList().getCurrentFilter();\n if (currentFilter.isMatching(parentUIContact)) {\n MetaContactGroup parentGroup = metaContact.getParentMetaContactGroup();\n UIGroup uiGroup = null;\n if (!MetaContactListSource.isRootGroup(parentGroup)) {\n synchronized (parentGroup) {\n uiGroup = MetaContactListSource.getUIGroup(parentGroup);\n if (uiGroup == null)\n uiGroup = MetaContactListSource.createUIGroup(parentGroup);\n }\n }\n GuiActivator.getContactList().addContact(parentUIContact, uiGroup, true, true);\n } else\n MetaContactListSource.removeUIContact(metaContact);\n }\n}\n"
|
"protected static int handleValidateTargetCanContainElementHandle(DesignElementHandle targetHandle, DesignElementHandle childHandle, boolean validateContainer) {\n if (targetHandle instanceof CascadingParameterGroupHandle) {\n return childHandle.getContainer() == targetHandle ? CONTAIN_THIS : CONTAIN_NO;\n } else if (targetHandle.canContain(DEUtil.getDefaultSlotID(targetHandle), childHandle)) {\n return CONTAIN_THIS;\n } else if (targetHandle instanceof ParameterGroupHandle && childHandle instanceof ParameterGroupHandle) {\n return CONTAIN_THIS;\n } else if (targetHandle instanceof ReportDesignHandle && childHandle instanceof ThemeHandle) {\n return CONTAIN_THIS;\n } else if (targetHandle.canContain(DEUtil.getDefaultContentName(targetHandle), childHandle)) {\n return CONTAIN_THIS;\n } else if (validateContainer) {\n if (targetHandle.getContainer() == null) {\n return CONTAIN_NO;\n }\n if (targetHandle.getContainerSlotHandle() == null) {\n if (!targetHandle.getContainerPropertyHandle().getDefn().isList()) {\n return CONTAIN_NO;\n }\n } else if (!targetHandle.getContainer().getDefn().getSlot(targetHandle.getContainerSlotHandle().getSlotID()).isMultipleCardinality()) {\n return CONTAIN_NO;\n }\n if (targetHandle.getClass().equals(childHandle.getClass())) {\n return CONTAIN_PARENT;\n }\n if (targetHandle.getContainerSlotHandle() != null) {\n return targetHandle.getContainer().canContain(targetHandle.getContainerSlotHandle().getSlotID(), childHandle) ? CONTAIN_PARENT : CONTAIN_NO;\n }\n return CONTAIN_NO;\n}\n"
|
"protected Long decodeLong(IServiceProperties props, String name) {\n String longAsString = props.getPropertyString(name);\n if (longAsString == null)\n return new Long(0);\n return new Long(longAsString);\n}\n"
|
"public ModelAndView showSummary(String id, Model uiModel, HttpServletRequest request) {\n addDateTimeFormat(uiModel);\n List<String> warningMessage = null;\n List<String> adviceMessage = null;\n Patient patient = allPatients.findByIdAndClinicId(id, loggedInClinic(request));\n if (patient == null)\n return new ModelAndView(\"String_Node_Str\", \"String_Node_Str\", null);\n TreatmentAdvice earliestTreatmentAdvice = allTreatmentAdvices.earliestTreatmentAdvice(id);\n TreatmentAdvice currentTreatmentAdvice = allTreatmentAdvices.currentTreatmentAdvice(id);\n Regimen currentRegimen = patientService.currentRegimen(patient);\n List<PatientEventLog> patientStatusChangeHistory = patientService.getStatusHistory(patient.getId());\n ClinicVisits clinicVisits = allClinicVisits.clinicVisits(patient.getId());\n Double runningAdherencePercentage = getRunningAdherencePercentage(patient);\n List<String> warning = new IncompletePatientDataWarning(patient, allVitalStatistics, allTreatmentAdvices, allLabResults, allClinicVisits).value();\n List<String> patientsWithSameMobileNumber = new UniquePatientMobileNumberWarning(allPatients).findAllMobileNumbersWhichMatchTheGivenNumber(patient.getMobilePhoneNumber(), patient.getPatientId(), patient.getClinic().getName(), PATIENT);\n List<String> patientsClinicWithSameMobileNumber = new UniquePatientMobileNumberWarning(allPatients).findAllMobileNumbersWhichMatchTheGivenNumber(patient.getMobilePhoneNumber(), patient.getPatientId(), patient.getClinic().getName(), CLINIC);\n if (CollectionUtils.isNotEmpty(patientsWithSameMobileNumber)) {\n warningMessage = new ArrayList<>();\n warningMessage.add(PatientController.WARNING_DUPLICATE_PHONE_NUMBERS);\n adviceMessage = new ArrayList<>();\n adviceMessage.add(PatientController.WARNING_DUPLICATE_PHONE_NUMBERS_SUGGESTION);\n }\n uiModel.addAttribute(\"String_Node_Str\", patientsWithSameMobileNumber);\n uiModel.addAttribute(\"String_Node_Str\", patientsClinicWithSameMobileNumber);\n uiModel.addAttribute(\"String_Node_Str\", warningMessage);\n uiModel.addAttribute(\"String_Node_Str\", adviceMessage);\n PatientSummary patientSummary = new PatientSummary(new PatientViewModel(patient), earliestTreatmentAdvice, currentTreatmentAdvice, currentRegimen, clinicVisits, patientStatusChangeHistory, runningAdherencePercentage, warning);\n return new ModelAndView(SUMMARY_VIEW, \"String_Node_Str\", patientSummary);\n}\n"
|
"private void createApplyStaticNatRulesCommands(final List<? extends StaticNatRule> rules, final VirtualRouter router, final Commands cmds, final long guestNetworkId) {\n List<StaticNatRuleTO> rulesTO = new ArrayList<StaticNatRuleTO>();\n if (rules != null) {\n rulesTO = new ArrayList<StaticNatRuleTO>();\n for (final StaticNatRule rule : rules) {\n final IpAddress sourceIp = _networkModel.getIp(rule.getSourceIpAddressId());\n final StaticNatRuleTO ruleTO = new StaticNatRuleTO(rule, null, sourceIp.getAddress().addr(), rule.getDestIpAddress());\n rulesTO.add(ruleTO);\n }\n }\n final SetStaticNatRulesCommand cmd = new SetStaticNatRulesCommand(rulesTO, router.getVpcId());\n cmd.setAccessDetail(NetworkElementCommand.ROUTER_IP, getRouterControlIp(router.getId()));\n cmd.setAccessDetail(NetworkElementCommand.ROUTER_GUEST_IP, getRouterIpInNetwork(guestNetworkId, router.getId()));\n cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME, router.getInstanceName());\n final DataCenterVO dcVo = _dcDao.findById(router.getDataCenterId());\n cmd.setAccessDetail(NetworkElementCommand.ZONE_NETWORK_TYPE, dcVo.getNetworkType().toString());\n cmds.addCommand(cmd);\n}\n"
|
"public static Result parse(String body) throws ParseException {\n Matcher m;\n Result result = new Result();\n m = PATTERN_IMAGE_URL.matcher(body);\n if (m.find()) {\n result.imageUrl = StringUtils.unescapeXml(StringUtils.trim(m.group(1)));\n }\n m = PATTERN_SKIP_HATH_KEY.matcher(body);\n if (m.find()) {\n result.skipHathKey = StringUtils.unescapeXml(StringUtils.trim(m.group(1)));\n }\n m = PATTERN_ORIGIN_IMAGE_URL.matcher(body);\n if (m.find()) {\n result.originImageUrl = StringUtils.unescapeXml(m.group(1)) + \"String_Node_Str\" + StringUtils.unescapeXml(m.group(2));\n }\n if (!TextUtils.isEmpty(result.imageUrl) && !TextUtils.isEmpty(result.skipHathKey)) {\n return result;\n } else {\n throw new ParseException(\"String_Node_Str\", body);\n }\n}\n"
|
"public void run() {\n Thread me = Thread.currentThread();\n try {\n Thread.sleep(pingStartWait);\n } catch (InterruptedException e) {\n return;\n }\n while (!queue.isStopped()) {\n try {\n if (me.isInterrupted())\n break;\n Thread.sleep(keepAlive / 2);\n if (me.isInterrupted())\n break;\n synchronized (pingLock) {\n if (System.currentTimeMillis() >= nextPingTime) {\n waitForPing = true;\n sendIt(ping);\n if (waitForPing) {\n try {\n outputStream.wait(keepAlive / 2);\n } catch (InterruptedException e) {\n }\n }\n if (waitForPing) {\n throw new IOException(getAddressPort() + \"String_Node_Str\");\n }\n }\n }\n } catch (Exception e) {\n if (isClosing) {\n dumpStack(\"String_Node_Str\", e);\n synchronized (Client.this) {\n Client.this.notifyAll();\n }\n } else {\n dumpStack(\"String_Node_Str\", e);\n if (!handler.handleSuspectEvent(new ConnectionEvent(Client.this, e))) {\n handler.handleDisconnectEvent(new DisconnectConnectionEvent(Client.this, e, queue));\n }\n }\n break;\n }\n }\n trace(\"String_Node_Str\");\n}\n"
|
"public Object getValueAt(int arg0, int arg1) {\n switch(arg1) {\n case 0:\n return matches[arg0].getName();\n case 1:\n return matches[arg0].getGameType();\n case 2:\n return matches[arg0].getDeckType();\n case 3:\n return matches[arg0].getPlayers();\n case 4:\n return matches[arg0].getResult();\n case 5:\n if (matches[arg0].getStartTime() != null) {\n return timeFormatter.format(matches[arg0].getStartTime());\n } else {\n return \"String_Node_Str\";\n }\n case 6:\n if (matches[arg0].getEndTime() != null) {\n return timeFormatter.format(matches[arg0].getEndTime());\n } else {\n return \"String_Node_Str\";\n }\n case 7:\n if (matches[arg0].isTournament()) {\n return \"String_Node_Str\";\n } else {\n if (matches[arg0].isReplayAvailable()) {\n return \"String_Node_Str\";\n } else {\n return \"String_Node_Str\";\n }\n }\n case 8:\n return matches[arg0].getGames();\n }\n return \"String_Node_Str\";\n}\n"
|
"public void filter_add(HttpServletRequest req, HttpServletResponse resp, List<Integer> numerics) throws IOException {\n Locale locale = resp.getLocale();\n resp.setContentType(\"String_Node_Str\");\n ServletOutputStream out = resp.getOutputStream();\n Caching.caching_disable_headers(resp);\n TemplateBuilderFactory<MasterTemplateBuilder> masterTplBuilderFactory = TemplateBuilderFactory.getInstance(environment.templateMaster, \"String_Node_Str\", \"String_Node_Str\", MasterTemplateBuilder.class);\n MasterTemplateBuilder masterTplBuilder = masterTplBuilderFactory.getTemplateBuilder();\n StringBuilder sb = new StringBuilder();\n String regex = req.getParameter(\"String_Node_Str\");\n if (regex == null) {\n regex = \"String_Node_Str\";\n }\n String[] removeIndexes = req.getParameterValues(\"String_Node_Str\");\n if (removeIndexes == null) {\n removeIndexes = new String[0];\n }\n String initials = \"String_Node_Str\";\n if (req.getParameter(\"String_Node_Str\") != null) {\n initials = req.getParameter(\"String_Node_Str\");\n } else if (req.getParameter(\"String_Node_Str\") != null) {\n initials = req.getParameter(\"String_Node_Str\");\n }\n if (initials == null) {\n initials = \"String_Node_Str\";\n }\n String script = environment.NAS_GROOVY_SCRIPT;\n if (regex.length() > 0 && !initials.isEmpty()) {\n String[] lines = regex.split(System.getProperty(\"String_Node_Str\"));\n for (String line : lines) {\n if (line.endsWith(System.getProperty(\"String_Node_Str\")) || line.endsWith(\"String_Node_Str\") || line.endsWith(\"String_Node_Str\")) {\n line = line.substring(0, line.length() - 1);\n }\n script += \"String_Node_Str\" + initials + \"String_Node_Str\";\n script += \"String_Node_Str\" + line.replace(\"String_Node_Str\", \"String_Node_Str\") + \"String_Node_Str\";\n }\n }\n if (removeIndexes.length > 0 && !initials.isEmpty()) {\n script += \"String_Node_Str\" + initials + \"String_Node_Str\";\n script += \"String_Node_Str\" + Arrays.toString(removeIndexes) + \"String_Node_Str\";\n }\n script += \"String_Node_Str\";\n long jobId = numerics.get(0);\n Heritrix3JobMonitor h3Job = environment.h3JobMonitorThread.getRunningH3Job(jobId);\n if (h3Job != null && h3Job.isReady()) {\n boolean keepRegexTextArea = false;\n if (req.getParameter(\"String_Node_Str\") != null && removeIndexes.length == 0) {\n sb.append(\"String_Node_Str\");\n }\n if (req.getParameter(\"String_Node_Str\") != null && regex.isEmpty()) {\n sb.append(\"String_Node_Str\");\n }\n if ((req.getParameter(\"String_Node_Str\") != null || req.getParameter(\"String_Node_Str\") != null) && initials.isEmpty()) {\n sb.append(\"String_Node_Str\");\n keepRegexTextArea = true;\n }\n sb.append(\"String_Node_Str\");\n sb.append(\"String_Node_Str\");\n sb.append(\"String_Node_Str\");\n sb.append(\"String_Node_Str\");\n if (keepRegexTextArea) {\n sb.append(regex);\n }\n sb.append(\"String_Node_Str\");\n sb.append(\"String_Node_Str\");\n sb.append(\"String_Node_Str\" + initials + \"String_Node_Str\");\n sb.append(\"String_Node_Str\");\n sb.append(\"String_Node_Str\");\n ScriptResult scriptResult = h3Job.h3wrapper.ExecuteShellScriptInJob(h3Job.jobResult.job.shortName, \"String_Node_Str\", script);\n if (scriptResult != null && scriptResult.script != null && scriptResult.script.htmlOutput != null) {\n sb.append(\"String_Node_Str\");\n sb.append(\"String_Node_Str\");\n sb.append(scriptResult.script.htmlOutput);\n sb.append(\"String_Node_Str\");\n sb.append(\"String_Node_Str\");\n sb.append(\"String_Node_Str\" + initials + \"String_Node_Str\");\n sb.append(\"String_Node_Str\");\n }\n sb.append(\"String_Node_Str\");\n } else {\n sb.append(\"String_Node_Str\");\n sb.append(jobId);\n sb.append(\"String_Node_Str\");\n }\n StringBuilder menuSb = masterTplBuilder.buildMenu(new StringBuilder(), h3Job);\n masterTplBuilder.insertContent(\"String_Node_Str\" + jobId + \"String_Node_Str\", menuSb.toString(), environment.generateLanguageLinks(locale), \"String_Node_Str\" + jobId + \"String_Node_Str\", sb.toString(), \"String_Node_Str\").write(out);\n out.flush();\n out.close();\n}\n"
|
"public void node(Node node, NamespaceResolver namespaceResolver) {\n if (node.getNodeType() == Node.ATTRIBUTE_NODE) {\n Attr attr = (Attr) node;\n String resolverPfx = null;\n if (namespaceResolver != null) {\n resolverPfx = namespaceResolver.resolveNamespaceURI(attr.getNamespaceURI());\n }\n if (resolverPfx != null) {\n attribute(attr.getNamespaceURI(), XMLConstants.EMPTY_STRING, resolverPfx + XMLConstants.COLON + attr.getLocalName(), attr.getNodeValue());\n } else {\n attribute(attr.getNamespaceURI(), XMLConstants.EMPTY_STRING, attr.getName(), attr.getNodeValue());\n if (attr.getNamespaceURI() != null) {\n namespaceDeclaration(attr.getPrefix(), attr.getNamespaceURI());\n }\n }\n } else if (node.getNodeType() == Node.TEXT_NODE) {\n characters(node.getNodeValue());\n } else {\n try {\n FormattedOutputStreamRecordContentHandler handler = new FormattedOutputStreamRecordContentHandler();\n XMLFragmentReader xfragReader = new XMLFragmentReader(namespaceResolver);\n xfragReader.setContentHandler(handler);\n xfragReader.setProperty(XMLConstants.LEXICAL_HANDLER_PROPERTY, handler);\n xfragReader.parse(node);\n } catch (SAXException sex) {\n throw XMLMarshalException.marshalException(sex);\n }\n }\n}\n"
|
"void clearAttributeStates() {\n if (_attributeStates == null) {\n _attributeStates = new HashMap<String, SessionAttributeState>();\n }\n _attributeStates.clear();\n}\n"
|
"private URI getAutodiscoverEndpointUrl(String host) throws Exception {\n URI autodiscoverUrl = null;\n OutParam<URI> outParam = new OutParam<URI>();\n if (this.tryGetAutodiscoverEndpointUrl(host, outParam)) {\n return autodiscoverUrl;\n } else {\n throw new AutodiscoverLocalException(\"String_Node_Str\");\n }\n}\n"
|
"public void dataEngineShutdown() {\n if (session.getNamingRelation() == null) {\n return;\n }\n final int mode = session.getEngineContext().getMode();\n if (mode == DataEngineContext.MODE_GENERATION || mode == DataEngineContext.MODE_UPDATE) {\n try {\n saveNamingRelation(session.getNamingRelation());\n } catch (DataException e1) {\n e1.printStackTrace();\n }\n }\n}\n"
|
"public void testConstructorType9() {\n testTypes(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", \"String_Node_Str\");\n}\n"
|
"public void channelRead(ChannelHandlerContext ctx, Object msg) {\n logger.info(\"String_Node_Str\" + ctx.channel().hashCode());\n MetricBuilder.requestMeter.mark();\n ByteBuf b = (ByteBuf) msg;\n byte[] dd = new byte[b.readableBytes()];\n b.readBytes(dd);\n ctx.fireChannelRead(msg);\n final APNSEvent cc;\n try {\n cc = MessageUtils.asT(APNSEvent.class, (byte[]) msg);\n } catch (IOException e) {\n logger.error(\"String_Node_Str\", e);\n ack(ctx, null);\n return;\n }\n if (cc.typeId.intValue() == ClientType.Android) {\n MetricBuilder.clientAndroidMeter.mark();\n } else if (cc.typeId.intValue() == ClientType.iOS) {\n MetricBuilder.clientIOSMeter.mark();\n }\n if (cc.op.intValue() == Commands.GO_ONLINE) {\n ConnectionKeeper.add(cc.appKey, cc.userId, new Connection(ctx.channel()));\n poolTaskExecutor.submit(new OnNewlyAddThread(cc));\n ack(ctx, cc);\n } else if (cc.op.intValue() == Commands.KEEP_ALIVE) {\n ack(ctx, cc);\n } else if (cc.op.intValue() == Commands.PUSH_ACK) {\n ack(ctx, cc);\n } else if (cc.op.intValue() == Commands.GO_OFFLINE) {\n poolTaskExecutor.submit(new Runnable() {\n public void run() {\n Client c0 = ClientService.instance.findByUserId(cc.userId);\n if (c0 != null) {\n ClientService.instance.updateOnlineTs(c0.getId());\n }\n }\n });\n ctx.close();\n }\n}\n"
|
"public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {\n if (getCurrentObject() == null) {\n initializeRecord(atts);\n }\n if ((null != xPathNode.getXPathFragment() && xPathNode.getXPathFragment().nameIsText()) || xpathNodeIsMixedContent) {\n xpathNodeIsMixedContent = false;\n if (null != xPathNode.getUnmarshalNodeValue()) {\n xPathNode.getUnmarshalNodeValue().endElement(xPathFragment, this);\n if (xPathNode.getParent() != null) {\n xPathNode = xPathNode.getParent();\n }\n }\n }\n if (null == rootElementName && null == rootElementLocalName) {\n rootElementLocalName = localName;\n rootElementName = qName;\n rootElementNamespaceUri = namespaceURI;\n schemaLocation = atts.getValue(XMLConstants.SCHEMA_INSTANCE_URL, XMLConstants.SCHEMA_LOCATION);\n noNamespaceSchemaLocation = atts.getValue(XMLConstants.SCHEMA_INSTANCE_URL, XMLConstants.NO_NS_SCHEMA_LOCATION);\n }\n try {\n if (null != selfRecords) {\n for (int x = 0, selfRecordsSize = selfRecords.size(); x < selfRecordsSize; x++) {\n UnmarshalRecord selfRecord = selfRecords.get(x);\n if (selfRecord == null) {\n getFragmentBuilder().startElement(namespaceURI, localName, qName, atts);\n } else {\n selfRecord.startElement(namespaceURI, localName, qName, atts);\n }\n }\n }\n XPathNode node = getNonAttributeXPathNode(namespaceURI, localName, qName);\n if (null == node) {\n NodeValue parentNodeValue = xPathNode.getUnmarshalNodeValue();\n if ((null == xPathNode.getXPathFragment()) && (parentNodeValue != null)) {\n XPathFragment parentFragment = new XPathFragment();\n if (namespaceURI != null && namespaceURI.length() == 0) {\n parentFragment.setLocalName(qName);\n parentFragment.setNamespaceURI(null);\n } else {\n parentFragment.setLocalName(localName);\n parentFragment.setNamespaceURI(namespaceURI);\n }\n if (parentNodeValue.startElement(parentFragment, this, atts)) {\n levelIndex++;\n } else {\n startUnmappedElement(namespaceURI, localName, qName, atts);\n return;\n }\n } else {\n levelIndex++;\n startUnmappedElement(namespaceURI, localName, qName, atts);\n return;\n }\n } else {\n xPathNode = node;\n unmarshalContext.startElement(this);\n levelIndex++;\n isXsiNil = atts.getIndex(XMLConstants.SCHEMA_INSTANCE_URL, XMLConstants.SCHEMA_NIL_ATTRIBUTE) >= 0;\n NodeValue nodeValue = node.getUnmarshalNodeValue();\n if (null != nodeValue) {\n if (!nodeValue.startElement(xPathFragment, this, atts)) {\n startUnmappedElement(namespaceURI, localName, qName, atts);\n return;\n }\n }\n for (int i = 0, size = atts.getLength(); i < size; i++) {\n String attNamespace = atts.getURI(i);\n String attLocalName = atts.getLocalName(i);\n String value = atts.getValue(i);\n NodeValue attributeNodeValue = null;\n if ((attLocalName == null) || (attLocalName.length() == 0)) {\n String qname = atts.getQName(i);\n if ((qname != null) && (qname.length() > 0)) {\n int idx = qname.indexOf(XMLConstants.COLON);\n if (idx > 0) {\n attLocalName = qname.substring(idx + 1, qname.length());\n String attPrefix = qname.substring(0, idx);\n if (attPrefix.equals(XMLConstants.XMLNS)) {\n attNamespace = XMLConstants.XMLNS_URL;\n }\n } else {\n attLocalName = qname;\n if (attLocalName.equals(XMLConstants.XMLNS)) {\n attNamespace = XMLConstants.XMLNS_URL;\n }\n }\n }\n }\n if (this.selfRecords != null) {\n for (int j = 0; j < selfRecords.size(); j++) {\n UnmarshalRecord nestedRecord = selfRecords.get(j);\n if (nestedRecord != null) {\n attributeNodeValue = nestedRecord.getAttributeChildNodeValue(attNamespace, attLocalName);\n if (attributeNodeValue != null) {\n attributeNodeValue.attribute(nestedRecord, attNamespace, attLocalName, value);\n }\n }\n }\n }\n if (attributeNodeValue == null) {\n attributeNodeValue = this.getAttributeChildNodeValue(attNamespace, attLocalName);\n if (attributeNodeValue != null) {\n attributeNodeValue.attribute(this, attNamespace, attLocalName, value);\n } else {\n if (xPathNode.getAnyAttributeNodeValue() != null) {\n xPathNode.getAnyAttributeNodeValue().attribute(this, attNamespace, attLocalName, value);\n }\n }\n }\n }\n }\n } catch (EclipseLinkException e) {\n if ((null == xmlReader) || (null == xmlReader.getErrorHandler())) {\n throw e;\n } else {\n SAXParseException saxParseException = new SAXParseException(null, null, null, 0, 0, e);\n xmlReader.getErrorHandler().error(saxParseException);\n }\n }\n}\n"
|
"private void generateSnapshot(FetchedFile f, FetchedResource r, StructureDefinition sd) throws Exception {\n boolean changed = false;\n dlog(\"String_Node_Str\" + sd.getUrl());\n ProfileUtilities utils = new ProfileUtilities(context, f.getErrors(), igpkp);\n StructureDefinition base = sd.hasBaseDefinition() ? fetchSnapshotted(sd.getBaseDefinition()) : null;\n utils.setIds(sd, true);\n if (sd.getKind() != StructureDefinitionKind.LOGICAL) {\n if (!sd.hasSnapshot()) {\n dlog(\"String_Node_Str\" + sd.getUrl());\n if (base == null)\n throw new Exception(\"String_Node_Str\" + sd.getBaseDefinition() + \"String_Node_Str\" + sd.getUrl() + \"String_Node_Str\");\n List<String> errors = new ArrayList<String>();\n utils.sortDifferential(base, sd, \"String_Node_Str\" + sd.getUrl(), errors);\n for (String s : errors) f.getErrors().add(new ValidationMessage(Source.ProfileValidator, IssueType.INVALID, sd.getUrl(), s, IssueSeverity.ERROR));\n utils.setIds(sd, true);\n String p = sd.getDifferential().getElement().get(0).getPath();\n if (p.contains(\"String_Node_Str\")) {\n changed = true;\n sd.getDifferential().getElement().add(0, new ElementDefinition().setPath(p.substring(0, p.indexOf(\"String_Node_Str\"))));\n }\n utils.generateSnapshot(base, sd, sd.getUrl(), sd.getName());\n changed = true;\n }\n } else {\n dlog(\"String_Node_Str\" + sd.getUrl());\n if (!sd.hasSnapshot()) {\n utils.populateLogicalSnapshot(sd);\n changed = true;\n }\n }\n validateExpressions(f, sd);\n if (changed || (!r.getElement().hasChild(\"String_Node_Str\") && sd.hasSnapshot()))\n r.setElement(convertToElement(sd));\n r.setSnapshotted(true);\n dlog(\"String_Node_Str\" + sd.getUrl());\n context.seeResource(sd.getUrl(), sd);\n}\n"
|
"public String listRoutes() {\n Set<String> allRoutes = new HashSet<String>();\n for (Map<String, Route> routeEntries : routes.values()) {\n allRoutes.addAll(routeEntries.keySet());\n }\n allRoutes = list(allRoutes);\n Collections.sort(allRoutes);\n StringBuilder sb = new StringBuilder();\n for (String route : allRoutes) {\n for (RouteType routeType : RouteType.all()) {\n Map<String, Route> routesForType = routes.get(routeType);\n if (routesForType.containsKey(route)) {\n sb.append(String.format(routeDisplayFormat, routesForType.get(route)));\n }\n }\n }\n return sb.toString();\n}\n"
|
"public void init(Stage stage) throws ServiceException {\n scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);\n scrollPane.setVbarPolicy(ScrollPane.ScrollBarPolicy.AS_NEEDED);\n tile.setPadding(new Insets(20, 20, 20, 20));\n tile.setHgap(20);\n tile.setVgap(20);\n LOGGER.info(\"String_Node_Str\" + shootingService.searchIsActive().getId());\n List<at.ac.tuwien.sepm.ws16.qse01.entities.Image> listOfImages = imageService.getAllImages(3);\n for (final at.ac.tuwien.sepm.ws16.qse01.entities.Image img : listOfImages) {\n HBox hBox = new HBox();\n hBox.setSpacing(120);\n hBox.setVisible(false);\n hBox.setStyle(\"String_Node_Str\");\n ImageView fullscreen = new ImageView(new Image(\"String_Node_Str\"));\n fullscreen.setFitHeight(30);\n fullscreen.setFitWidth(30);\n fullscreen.setOnMouseClicked(mouseEvent -> {\n ImageView imageView = (ImageView) ((VBox) (((ImageView) mouseEvent.getSource()).getParent().getParent())).getChildren().get(0);\n LOGGER.debug(\"String_Node_Str\" + imageView.getId());\n windowManager.showFullscreenImage(Integer.parseInt(imageView.getId()));\n });\n ImageView delete = new ImageView(getClass().getResource(\"String_Node_Str\").toExternalForm());\n delete.setFitHeight(30);\n delete.setFitWidth(30);\n delete.setOnMouseClicked((MouseEvent mouseEvent) -> {\n LOGGER.debug(\"String_Node_Str\");\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setHeaderText(\"String_Node_Str\");\n alert.setContentText(\"String_Node_Str\");\n alert.initModality(Modality.WINDOW_MODAL);\n alert.initOwner(stage);\n Optional<ButtonType> result = alert.showAndWait();\n if (result.isPresent() && result.get() == ButtonType.OK) {\n ImageView imageView = (ImageView) ((VBox) (((ImageView) mouseEvent.getSource()).getParent().getParent())).getChildren().get(0);\n LOGGER.debug(\"String_Node_Str\" + imageView.getId());\n try {\n imageService.delete(Integer.parseInt(imageView.getId()));\n tile.getChildren().remove(imageView.getParent());\n } catch (ServiceException e) {\n LOGGER.debug(\"String_Node_Str\" + e.getMessage());\n }\n }\n });\n hBox.getChildren().addAll(fullscreen, delete);\n ImageView imageView = null;\n try {\n if (new File(img.getImagepath()).isFile()) {\n imageView = createImageView(new File(img.getImagepath()));\n } else if (new File(System.getProperty(\"String_Node_Str\") + img.getImagepath()).isFile()) {\n img.setImagepath(System.getProperty(\"String_Node_Str\") + img.getImagepath());\n imageService.update(img);\n imageView = createImageView(new File(img.getImagepath()));\n } else {\n LOGGER.debug(\"String_Node_Str\" + img.toString());\n imageService.delete(img.getImageID());\n }\n if (imageView != null) {\n VBox vBox = new VBox();\n LOGGER.debug(\"String_Node_Str\" + img.getImageID());\n imageView.setId(String.valueOf(img.getImageID()));\n imageView.setUserData(img.getImagepath());\n vBox.getChildren().addAll(imageView, hBox);\n tile.getChildren().add(vBox);\n }\n } catch (Exception e) {\n LOGGER.debug(\"String_Node_Str\" + e.getMessage());\n }\n }\n}\n"
|
"public List<TypedNamedEntity> disambiguate(Document document) throws GerbilException {\n String text = document.getText();\n StringBuilder requestBuilder = new StringBuilder();\n requestBuilder.append(\"String_Node_Str\");\n try {\n requestBuilder.append(URLEncoder.encode(document.getText(), \"String_Node_Str\"));\n } catch (UnsupportedEncodingException e) {\n LOGGER.error(\"String_Node_Str\", e);\n throw new GerbilException(\"String_Node_Str\", e, ErrorTypes.UNEXPECTED_EXCEPTION);\n }\n requestBuilder.append(\"String_Node_Str\");\n List<Span> spans = document.getMarkings(Span.class);\n int start;\n for (Span span : spans) {\n start = span.getStartPosition();\n requestBuilder.append(\"String_Node_Str\");\n try {\n requestBuilder.append(URLEncoder.encode(text.substring(start, start + span.getLength()), \"String_Node_Str\"));\n } catch (UnsupportedEncodingException e) {\n LOGGER.error(\"String_Node_Str\", e);\n throw new GerbilException(\"String_Node_Str\", e, ErrorTypes.UNEXPECTED_EXCEPTION);\n }\n requestBuilder.append(\"String_Node_Str\");\n requestBuilder.append(start);\n requestBuilder.append(\"String_Node_Str\");\n }\n requestBuilder.append(\"String_Node_Str\");\n String response = request(requestBuilder.toString(), serviceURL + DISAMBIGUATE_RESOURCE);\n return parseAnnotationResponse(response);\n}\n"
|
"private static String getSQLWhereClauseString(PoiCategoryFilter filter) {\n Collection<PoiCategory> superCategories = filter.getAcceptedSuperCategories();\n if (superCategories.isEmpty()) {\n return \"String_Node_Str\";\n }\n StringBuilder sb = new StringBuilder();\n sb.append(\"String_Node_Str\");\n for (int i = 0; i < intervals.length; i += 2) {\n sb.append(\"String_Node_Str\").append(intervals[i]).append(\"String_Node_Str\").append(intervals[i + 1]);\n if (i != intervals.length - 2) {\n sb.append(\"String_Node_Str\");\n }\n }\n sb.append(')');\n return sb.toString();\n}\n"
|
"public boolean handleDrawEvent(GODrawEvent event) {\n if (!containsPoint(event.getDrawPosition())) {\n return false;\n }\n Action action = getActionForDraw(event);\n if (action != null) {\n MapDrawContext context = minimap.getContext();\n float y = context.getScreen().getHeight() / 2;\n float x = context.getScreen().getWidth() / 2;\n startMapPosition = context.getPositionOnScreen(x, y);\n event.setHandler(new DrawMinimapHandler());\n return true;\n } else {\n return false;\n }\n}\n"
|
"public OpenAPI3RouterFactory addSecurityHandler(String securitySchemaName, Handler handler) {\n securityHandlers.addSecurityRequirement(securitySchemaName, handler);\n return this;\n}\n"
|
"public void addUploadRequest(UploadItem uploadItem) {\n logger.info(\"String_Node_Str\");\n if (uploadItem == null || uploadItem.getFileData() == null || uploadItem.getFileData().getFilePath() == null || uploadItem.getFileData().getFilePath().isEmpty()) {\n logger.info(\"String_Node_Str\");\n return;\n }\n CheckProcess process = new CheckProcess(sessionManager, this, uploadItem);\n executor.execute(process);\n}\n"
|
"private VirtualMachineGuru getVmGuru(VirtualMachine vm) {\n if (vm != null)\n return _vmGurus.get(vm.getType());\n return null;\n}\n"
|
"public String toString() {\n return \"String_Node_Str\" + refinement + \"String_Node_Str\" + local + \"String_Node_Str\" + remote + \"String_Node_Str\";\n}\n"
|
"public boolean containsValue(Object value) {\n return (Boolean) invoke(new ClientReplicatedMapContainsValueRequest(getName(), value));\n}\n"
|
"public Graph transform(Graph g) {\n Node[] nodesOld = g.getNodes();\n boolean[] added = new boolean[nodesOld.length];\n int[] degree = new int[nodesOld.length];\n Random rand = new Random();\n int[] out;\n int maxdeg = nodesOld[this.getMaxDegree(nodesOld, rand)].getDegree();\n if (this.maxDegree < maxdeg) {\n maxdeg = this.maxDegree;\n }\n int[] start = this.getStartIndex(nodesOld, rand);\n HashMap<Integer, Integer> newIndex = new HashMap<Integer, Integer>(Math.min(nodesOld.length, this.include));\n HashMap<Integer, Vector<Integer>> neighs = new HashMap<Integer, Vector<Integer>>(nodesOld.length);\n Vector<Vector<Integer>> inDegree = new Vector<Vector<Integer>>(maxdeg + 1);\n for (int i = 0; i < maxdeg + 1; i++) {\n inDegree.add(new Vector<Integer>());\n }\n int count = start.length;\n Vector<Integer> list;\n for (int i = 0; i < start.length; i++) {\n added[start[i]] = true;\n degree[start[i]] = start.length - 1;\n Vector<Integer> neighbors = new Vector<Integer>();\n for (int k = 0; k < i; k++) {\n neighbors.add(start[k]);\n }\n neighs.put(start[i], neighbors);\n }\n for (int i = 0; i < start.length; i++) {\n if (degree[start[i]] == this.maxDegree) {\n } else {\n out = nodesOld[start[i]].getOutgoingEdges();\n for (int j = 0; j < out.length; j++) {\n if (!added[out[j]] && degree[out[j]] < this.maxDegree) {\n inDegree.get(degree[out[j]]).removeElement(out[j]);\n degree[out[j]]++;\n inDegree.get(degree[out[j]]).add(out[j]);\n }\n }\n }\n }\n while (count < this.include && count < nodesOld.length) {\n int chosen = this.getNext(inDegree, rand);\n if (chosen == -1) {\n break;\n }\n neighs.put(chosen, this.addNode(added, degree, nodesOld[chosen], inDegree, nodesOld));\n count++;\n }\n Node[] nodesNew = new Node[count];\n Edges edges = new Edges(nodesNew, g.computeNumberOfEdges());\n int c = 0;\n for (int i = 0; i < added.length; i++) {\n if (added[i]) {\n nodesNew[c] = nodesOld[i];\n newIndex.put(i, c);\n nodesNew[c].setIndex(c);\n c++;\n }\n }\n c = 0;\n for (int i = 0; i < added.length; i++) {\n if (added[i]) {\n list = neighs.get(i);\n for (int j = 0; j < list.size(); j++) {\n edges.add(c, newIndex.get(list.get(j)));\n edges.add(newIndex.get(list.get(j)), c);\n }\n c++;\n }\n }\n edges.fill();\n g.setNodes(nodesNew);\n return g;\n}\n"
|
"boolean reclaimSomeSurfaceMemoryLocked(WindowStateAnimator winAnimator, String operation, boolean secure) {\n final WindowSurfaceController surfaceController = winAnimator.mSurfaceController;\n boolean leakedSurface = false;\n boolean killedApps = false;\n EventLog.writeEvent(EventLogTags.WM_NO_SURFACE_MEMORY, winAnimator.mWin.toString(), winAnimator.mSession.mPid, operation);\n long callingIdentity = Binder.clearCallingIdentity();\n try {\n Slog.i(TAG_WM, \"String_Node_Str\");\n final int numDisplays = mDisplayContents.size();\n for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {\n final WindowList windows = mDisplayContents.valueAt(displayNdx).getWindowList();\n final int numWindows = windows.size();\n for (int winNdx = 0; winNdx < numWindows; ++winNdx) {\n final WindowState ws = windows.get(winNdx);\n WindowStateAnimator wsa = ws.mWinAnimator;\n if (wsa.mSurfaceController != null) {\n if (!mSessions.contains(wsa.mSession)) {\n Slog.w(TAG_WM, \"String_Node_Str\" + ws + \"String_Node_Str\" + wsa.mSurfaceController + \"String_Node_Str\" + ws.mToken + \"String_Node_Str\" + ws.mSession.mPid + \"String_Node_Str\" + ws.mSession.mUid);\n wsa.destroySurface();\n ws.setHasSurface(false);\n mForceRemoves.add(ws);\n leakedSurface = true;\n } else if (ws.mAppToken != null && ws.mAppToken.clientHidden) {\n Slog.w(TAG_WM, \"String_Node_Str\" + ws + \"String_Node_Str\" + wsa.mSurfaceController + \"String_Node_Str\" + ws.mAppToken + \"String_Node_Str\" + ws.mAppToken.hasSavedSurface());\n if (SHOW_TRANSACTIONS)\n logSurface(ws, \"String_Node_Str\", false);\n wsa.destroySurface();\n ws.setHasSurface(false);\n leakedSurface = true;\n }\n }\n }\n }\n if (!leakedSurface) {\n Slog.w(TAG_WM, \"String_Node_Str\");\n SparseIntArray pidCandidates = new SparseIntArray();\n for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {\n final WindowList windows = mDisplayContents.valueAt(displayNdx).getWindowList();\n final int numWindows = windows.size();\n for (int winNdx = 0; winNdx < numWindows; ++winNdx) {\n final WindowState ws = windows.get(winNdx);\n if (mForceRemoves.contains(ws)) {\n continue;\n }\n WindowStateAnimator wsa = ws.mWinAnimator;\n if (wsa.mSurfaceController != null) {\n pidCandidates.append(wsa.mSession.mPid, wsa.mSession.mPid);\n }\n }\n if (pidCandidates.size() > 0) {\n int[] pids = new int[pidCandidates.size()];\n for (int i = 0; i < pids.length; i++) {\n pids[i] = pidCandidates.keyAt(i);\n }\n try {\n if (mActivityManager.killPids(pids, \"String_Node_Str\", secure)) {\n killedApps = true;\n }\n } catch (RemoteException e) {\n }\n }\n }\n }\n if (leakedSurface || killedApps) {\n Slog.w(TAG_WM, \"String_Node_Str\");\n if (surfaceController != null) {\n if (SHOW_TRANSACTIONS || SHOW_SURFACE_ALLOC)\n logSurface(winAnimator.mWin, \"String_Node_Str\", null);\n surfaceController.destroyInTransaction();\n winAnimator.mWin.setHasSurface(false);\n scheduleRemoveStartingWindowLocked(winAnimator.mWin.mAppToken);\n }\n try {\n winAnimator.mWin.mClient.dispatchGetNewSurface();\n } catch (RemoteException e) {\n }\n }\n } finally {\n Binder.restoreCallingIdentity(callingIdentity);\n }\n return leakedSurface || killedApps;\n}\n"
|
"public synchronized void selectTab(IChatMessageSender messageSender, ITypingMessageSender typingSender, ID localID, ID userID) {\n selectTab(messageSender, typingSender, localID, userID, getLocalName(userID));\n}\n"
|
"private Set<Long> addPredicateString(String theParamName, Set<Long> thePids, List<? extends IQueryParameterType> theList) {\n if (theList == null || theList.isEmpty()) {\n return thePids;\n }\n if (Boolean.TRUE.equals(theList.get(0).getMissing())) {\n return addPredicateParamMissing(thePids, \"String_Node_Str\", theParamName, ResourceIndexedSearchParamString.class);\n }\n CriteriaBuilder builder = myEntityManager.getCriteriaBuilder();\n CriteriaQuery<Long> cq = builder.createQuery(Long.class);\n Root<ResourceIndexedSearchParamString> from = cq.from(ResourceIndexedSearchParamString.class);\n cq.select(from.get(\"String_Node_Str\").as(Long.class));\n List<Predicate> codePredicates = new ArrayList<Predicate>();\n for (IQueryParameterType nextOr : theList) {\n IQueryParameterType theParameter = nextOr;\n if (addPredicateMissingFalseIfPresent(theParamName, from, codePredicates, nextOr)) {\n continue;\n }\n Predicate singleCode = createPredicateString(theParameter, theParamName, builder, from);\n codePredicates.add(singleCode);\n }\n Predicate masterCodePredicate = builder.or(codePredicates.toArray(new Predicate[0]));\n Predicate type = builder.equal(from.get(\"String_Node_Str\"), myResourceName);\n Predicate name = builder.equal(from.get(\"String_Node_Str\"), theParamName);\n if (thePids.size() > 0) {\n Predicate inPids = (from.get(\"String_Node_Str\").in(thePids));\n cq.where(builder.and(type, name, masterCodePredicate, inPids));\n } else {\n cq.where(builder.and(type, name, masterCodePredicate));\n }\n TypedQuery<Long> q = myEntityManager.createQuery(cq);\n return new HashSet<Long>(q.getResultList());\n}\n"
|
"public UndoableEditRef<V, E> createEmptyRef() {\n return new UndoableEditRef<V, E>(pool, graph, graphFeatures, serializer, vertexUndoIdBimap, edgeUndoIdBimap, dataStack, featureStore, nonRefEdits);\n}\n"
|
"public void deleteServiceFunctionPath(RenderedServicePath renderedServicePath) {\n printTraceStart(LOG);\n ClientConfig clientConfig = new DefaultClientConfig();\n Client client = Client.create(clientConfig);\n String sfpURI;\n String restURI;\n List<RenderedServicePathHop> renderedServicePathHopList = renderedServicePath.getRenderedServicePathHop();\n Set<String> sffNameSet = new HashSet<>();\n for (RenderedServicePathHop renderedServicePathHop : renderedServicePathHopList) {\n String sffName = renderedServicePathHop.getServiceFunctionForwarder();\n if (sffNameSet.add(sffName)) {\n Object[] serviceForwarderObj = { sffName };\n Class[] serviceForwarderClass = { String.class };\n SfcProviderServiceForwarderAPI sfcProviderServiceForwarderAPI = SfcProviderServiceForwarderAPI.getRead(serviceForwarderObj, serviceForwarderClass);\n Future<Object> future = ODL_SFC.getExecutor().submit(sfcProviderServiceForwarderAPI);\n ClientResponse deleteClientRemoteResponse = null;\n try {\n ServiceFunctionForwarder serviceFunctionForwarder = (ServiceFunctionForwarder) future.get();\n restURI = serviceFunctionForwarder.getRestUri().getValue();\n sfpURI = restURI + \"String_Node_Str\" + \"String_Node_Str\" + renderedServicePath.getName();\n try {\n deleteClientRemoteResponse = client.resource(sfpURI).type(MediaType.APPLICATION_JSON_TYPE).delete(ClientResponse.class);\n if (deleteClientRemoteResponse.getStatus() >= 300) {\n throw new UniformInterfaceException(sfpURI + \"String_Node_Str\" + HTTP_ERROR_MSG + deleteClientRemoteResponse.getStatus(), deleteClientRemoteResponse);\n }\n } catch (UniformInterfaceException e) {\n LOG.error(\"String_Node_Str\", e.getMessage());\n } catch (ClientHandlerException e) {\n if (e.getCause() instanceof ConnectException) {\n LOG.error(\"String_Node_Str\", sfpURI);\n } else {\n LOG.error(\"String_Node_Str\", e.getMessage());\n }\n } finally {\n if (deleteClientRemoteResponse != null) {\n deleteClientRemoteResponse.close();\n }\n }\n } catch (InterruptedException e) {\n LOG.warn(\"String_Node_Str\", e);\n } catch (ExecutionException e) {\n LOG.warn(\"String_Node_Str\", e);\n }\n }\n }\n printTraceStop(LOG);\n}\n"
|
"private void migrateUserRestrictionsForUser(UserHandle user, ActiveAdmin admin, Set<String> exceptionList) {\n final Bundle origRestrictions = mUserManagerInternal.getBaseUserRestrictions(user.getIdentifier());\n final Bundle newBaseRestrictions = new Bundle();\n final Bundle newOwnerRestrictions = new Bundle();\n for (String key : origRestrictions.keySet()) {\n if (!origRestrictions.getBoolean(key)) {\n continue;\n }\n final boolean canOwnerChange = isDeviceOwner ? UserRestrictionsUtils.canDeviceOwnerChange(key) : UserRestrictionsUtils.canProfileOwnerChange(key, user.getIdentifier());\n if (!canOwnerChange || (exceptionList != null && exceptionList.contains(key))) {\n newBaseRestrictions.putBoolean(key, true);\n } else {\n newOwnerRestrictions.putBoolean(key, true);\n }\n }\n if (VERBOSE_LOG) {\n Log.v(LOG_TAG, \"String_Node_Str\" + origRestrictions);\n Log.v(LOG_TAG, \"String_Node_Str\" + newBaseRestrictions);\n Log.v(LOG_TAG, \"String_Node_Str\" + newOwnerRestrictions);\n }\n mUserManagerInternal.setBaseUserRestrictionsByDpmsForMigration(user.getIdentifier(), newBaseRestrictions);\n if (admin != null) {\n admin.ensureUserRestrictions().clear();\n admin.ensureUserRestrictions().putAll(newOwnerRestrictions);\n } else {\n Slog.w(LOG_TAG, \"String_Node_Str\" + user.getIdentifier());\n }\n saveSettingsLocked(user.getIdentifier());\n}\n"
|
"public String toString() {\n return String.format(\"String_Node_Str\", fluid, amount, tag);\n}\n"
|
"public void run() {\n if (conn == null)\n throw new RuntimeException(\"String_Node_Str\");\n running = true;\n try {\n while (true) {\n Message m = conn.readMessage();\n if (m instanceof InventoryMessage) {\n processInv((InventoryMessage) m);\n } else if (m instanceof Block) {\n processBlock((Block) m);\n } else if (m instanceof AddressMessage) {\n } else {\n log.warn(\"String_Node_Str\", m);\n }\n }\n } catch (IOException e) {\n disconnect();\n if (!running) {\n log.info(\"String_Node_Str\");\n } else {\n e.printStackTrace();\n }\n }\n try {\n conn.shutdown();\n } catch (IOException e) {\n }\n synchronized (this) {\n running = false;\n }\n}\n"
|
"public void mouseDown(MouseEvent e) {\n DataManager dm = getAnalysis().getContext().getConnection();\n if (dm == null) {\n masterPage.doSave(null);\n }\n if (dm != null && dm instanceof Connection) {\n Connection dp = (Connection) dm;\n if (ConnectionUtils.isMdmConnection(dp)) {\n MessageUI.openWarning(DefaultMessagesImpl.getString(\"String_Node_Str\"));\n return;\n }\n }\n IFolder udiProject = ResourceManager.getUDIFolder();\n CheckedTreeSelectionDialog dialog = UDIUtils.createUdiCheckedTreeSelectionDialog(udiProject, meIndicator);\n if (dialog.open() == Window.OK) {\n List<IFile> allSelectedFiles = new ArrayList<IFile>();\n Set<String> allSelectedIndNames = new HashSet<String>();\n for (Object obj : dialog.getResult()) {\n if (obj instanceof IFile) {\n allSelectedFiles.add((IFile) obj);\n IndicatorDefinition udid = IndicatorResourceFileHelper.getInstance().findIndDefinition((IFile) obj);\n if (udid != null) {\n allSelectedIndNames.add(udid.getName());\n }\n }\n }\n Set<String> oldSelectedIndNames = new HashSet<String>();\n for (IndicatorUnit indicatorUnit : meIndicator.getIndicatorUnits()) {\n Indicator indicator = indicatorUnit.getIndicator();\n if (indicator instanceof UserDefIndicator) {\n if (allSelectedIndNames.contains(indicator.getName())) {\n oldSelectedIndNames.add(indicator.getName());\n } else {\n deleteIndicatorItems(meIndicator, indicatorUnit);\n if (!isDirty()) {\n setDirty(true);\n }\n }\n }\n }\n treeItem.removeAll();\n for (IFile file : allSelectedFiles) {\n IndicatorDefinition udid = IndicatorResourceFileHelper.getInstance().findIndDefinition(file);\n if (udid != null && oldSelectedIndNames.contains(udid.getName())) {\n continue;\n }\n IndicatorUnit[] addIndicatorUnits = null;\n try {\n addIndicatorUnits = UDIUtils.createIndicatorUnit(file, meIndicator, getAnalysis());\n } catch (Throwable e1) {\n log.warn(e1, e1);\n }\n if (addIndicatorUnits != null && addIndicatorUnits.length > 0) {\n for (IndicatorUnit unit : addIndicatorUnits) {\n createOneUnit(treeItem, unit);\n }\n if (!isDirty()) {\n setDirty(true);\n }\n }\n }\n treeItem.setExpanded(true);\n masterPage.refreshTheTree(masterPage.getCurrentModelElementIndicators());\n }\n}\n"
|
"void addProtoContact(Contact contact) {\n synchronized (getParentGroupModLock()) {\n if (parentGroup != null)\n parentGroup.lightRemoveMetaContact(this);\n }\n contactsOnline += contact.getPresenceStatus().isOnline() ? 1 : 0;\n this.protoContacts.add(contact);\n defaultContact = null;\n if (this.protoContacts.size() == 1 && (this.displayName == null || this.displayName.trim().length() == 0)) {\n this.displayName = contact.getDisplayName();\n }\n if (parentGroup != null) {\n parentGroup.lightAddMetaContact(this);\n }\n }\n}\n"
|
"private static List<ModuleNeeded> collectModuleNeeded(List<IRepositoryViewObject> routineItems, Set<String> routineIdOrNames, boolean system) {\n List<ModuleNeeded> importNeedsList = new ArrayList<ModuleNeeded>();\n if (org.talend.commons.utils.platform.PluginChecker.isOnlyTopLoaded()) {\n return importNeedsList;\n }\n if (!routineItems.isEmpty()) {\n for (IRepositoryViewObject object : routineItems) {\n if (routineIdOrNames.contains(object.getLabel()) && system || routineIdOrNames.contains(object.getId()) && !system) {\n Item item = object.getProperty().getItem();\n if (item instanceof RoutineItem) {\n RoutineItem routine = (RoutineItem) item;\n importNeedsList.addAll(createModuleNeededFromRoutine(routine));\n }\n }\n }\n }\n if (system) {\n if (GlobalServiceRegister.getDefault().isServiceRegistered(ILibraryManagerUIService.class)) {\n ILibraryManagerUIService libUiService = (ILibraryManagerUIService) GlobalServiceRegister.getDefault().getService(ILibraryManagerUIService.class);\n Set<String> routinesName = new HashSet<>();\n for (IRoutinesProvider routineProvider : libUiService.getRoutinesProviders(ECodeLanguage.JAVA)) {\n for (URL url : routineProvider.getSystemRoutines()) {\n String[] fragments = url.toString().split(\"String_Node_Str\");\n String label = fragments[fragments.length - 1];\n String[] tmp = label.split(\"String_Node_Str\");\n String routineName = tmp[0];\n routinesName.add(routineName);\n }\n for (URL url : routineProvider.getTalendRoutines()) {\n String[] fragments = url.toString().split(\"String_Node_Str\");\n String label = fragments[fragments.length - 1];\n String[] tmp = label.split(\"String_Node_Str\");\n String routineName = tmp[0];\n routinesName.add(routineName);\n }\n }\n Map<String, List<LibraryInfo>> routineAndJars = libUiService.getRoutineAndJars();\n Iterator<Map.Entry<String, List<LibraryInfo>>> iter = routineAndJars.entrySet().iterator();\n while (iter.hasNext()) {\n Map.Entry<String, List<LibraryInfo>> entry = iter.next();\n String routineName = entry.getKey();\n if (!routinesName.contains(routineName)) {\n continue;\n }\n List<LibraryInfo> needJars = entry.getValue();\n for (LibraryInfo jar : needJars) {\n ModuleNeeded toAdd = new ModuleNeeded(\"String_Node_Str\" + routineName, jar.getLibName(), \"String_Node_Str\", true);\n String bundleId = jar.getBundleId();\n if (bundleId != null) {\n String bundleName = null;\n String bundleVersion = null;\n if (bundleId.contains(\"String_Node_Str\")) {\n String[] nameAndVersion = bundleId.split(\"String_Node_Str\");\n bundleName = nameAndVersion[0];\n bundleVersion = nameAndVersion[1];\n } else {\n bundleName = bundleId;\n }\n toAdd.setBundleName(bundleName);\n toAdd.setBundleVersion(bundleVersion);\n }\n importNeedsList.add(toAdd);\n }\n }\n }\n }\n Set<String> dedupModulesList = new HashSet<String>();\n Iterator<ModuleNeeded> it = importNeedsList.iterator();\n while (it.hasNext()) {\n ModuleNeeded module = it.next();\n if (!module.getModuleName().contains(\"String_Node_Str\")) {\n it.remove();\n } else if (dedupModulesList.contains(module.getModuleName())) {\n it.remove();\n } else {\n dedupModulesList.add(module.getModuleName());\n }\n }\n return new ArrayList<ModuleNeeded>(importNeedsList);\n}\n"
|
"public void run() {\n StringBuffer outputBuffer = new StringBuffer();\n try {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n String line = null;\n while ((line = reader.readLine()) != null) {\n outputBuffer.append(line + \"String_Node_Str\");\n logger.trace(line);\n }\n } catch (IOException e) {\n logger.error(\"String_Node_Str\" + e.getMessage(), e);\n }\n output = outputBuffer.toString();\n synchronized (is) {\n is.notify();\n }\n}\n"
|
"public Value divide(Value v) {\n ValueDecimal dec = (ValueDecimal) v;\n if (dec.value.signum() == 0) {\n throw DbException.get(ErrorCode.DIVISION_BY_ZERO_1, getSQL());\n }\n BigDecimal bd = value.divide(dec.value, value.scale() + DIVIDE_SCALE_ADD, BigDecimal.ROUND_HALF_DOWN);\n if (bd.signum() == 0) {\n bd = BigDecimal.ZERO;\n } else if (bd.scale() > 0) {\n if (!bd.unscaledValue().testBit(0)) {\n bd = bd.stripTrailingZeros();\n }\n }\n return ValueDecimal.get(bd);\n}\n"
|
"public ExcerptTailer toStart() throws IOException {\n final long index = queue.firstIndex();\n if (index == -1)\n return this;\n LOG.info(\"String_Node_Str\" + ChronicleQueue.subIndex(index) + \"String_Node_Str\" + ChronicleQueue.cycle(index));\n if (!moveToIndex(index))\n throw new IllegalStateException(\"String_Node_Str\" + cycle);\n return this;\n}\n"
|
"private static DefUseEffect instanceOf(Instruction s) {\n Operand ref = InstanceOf.getRef(s);\n if (ref.isNullConstant()) {\n Move.mutate(s, INT_MOVE, InstanceOf.getClearResult(s), IC(0));\n return DefUseEffect.MOVE_FOLDED;\n } else if (ref.isConstant()) {\n s.operator = INSTANCEOF_NOTNULL;\n return instanceOfNotNull(s);\n } else {\n VM_TypeReference lhsType = InstanceOf.getType(s).getTypeRef();\n VM_TypeReference rhsType = ref.getType();\n byte ans = ClassLoaderProxy.includesType(lhsType, rhsType);\n if (ans == Constants.NO) {\n VM_Type rType = rhsType.peekType();\n if (rType != null && rType.isClassType() && rType.asClass().isFinal()) {\n Move.mutate(s, INT_MOVE, InstanceOf.getClearResult(s), IC(0));\n return DefUseEffect.MOVE_FOLDED;\n } else {\n return DefUseEffect.UNCHANGED;\n }\n } else {\n return DefUseEffect.UNCHANGED;\n }\n }\n}\n"
|
"protected void drawCubic(Canvas c, LineDataSet dataSet, ArrayList<Entry> entries) {\n Transformer trans = mChart.getTransformer(dataSet.getAxisDependency());\n int minx = mMinX;\n int maxx = mMaxX + 2;\n if (maxx > entries.size())\n maxx = entries.size();\n float phaseX = mAnimator.getPhaseX();\n float phaseY = mAnimator.getPhaseY();\n float intensity = dataSet.getCubicIntensity();\n long start = System.currentTimeMillis();\n cubicPath.reset();\n float size = entries.size() * phaseX;\n if (entries.size() > 2) {\n float prevDx = 0f;\n float prevDy = 0f;\n float curDx = 0f;\n float curDy = 0f;\n Entry cur = entries.get(0);\n Entry next = entries.get(1);\n Entry prev = entries.get(0);\n Entry prevPrev = entries.get(0);\n cubicPath.moveTo(cur.getXIndex(), cur.getVal() * phaseY);\n prevDx = (next.getXIndex() - cur.getXIndex()) * intensity;\n prevDy = (next.getVal() - cur.getVal()) * intensity;\n cur = entries.get(1);\n next = entries.get(2);\n curDx = (next.getXIndex() - prev.getXIndex()) * intensity;\n curDy = (next.getVal() - prev.getVal()) * intensity;\n cubicPath.cubicTo(prev.getXIndex() + prevDx, (prev.getVal() + prevDy) * phaseY, cur.getXIndex() - curDx, (cur.getVal() - curDy) * phaseY, cur.getXIndex(), cur.getVal() * phaseY);\n for (int j = 2; j < size - 1; j++) {\n prevPrev = entries.get(j - 2);\n prev = entries.get(j - 1);\n cur = entries.get(j);\n next = entries.get(j + 1);\n prevDx = (cur.getXIndex() - prevPrev.getXIndex()) * intensity;\n prevDy = (cur.getVal() - prevPrev.getVal()) * intensity;\n curDx = (next.getXIndex() - prev.getXIndex()) * intensity;\n curDy = (next.getVal() - prev.getVal()) * intensity;\n cubicPath.cubicTo(prev.getXIndex() + prevDx, (prev.getVal() + prevDy) * phaseY, cur.getXIndex() - curDx, (cur.getVal() - curDy) * phaseY, cur.getXIndex(), cur.getVal() * phaseY);\n }\n if (size > entries.size() - 1) {\n cur = entries.get(entries.size() - 1);\n prev = entries.get(entries.size() - 2);\n prevPrev = entries.get(entries.size() - 3);\n next = cur;\n prevDx = (cur.getXIndex() - prevPrev.getXIndex()) * intensity;\n prevDy = (cur.getVal() - prevPrev.getVal()) * intensity;\n curDx = (next.getXIndex() - prev.getXIndex()) * intensity;\n curDy = (next.getVal() - prev.getVal()) * intensity;\n cubicPath.cubicTo(prev.getXIndex() + prevDx, (prev.getVal() + prevDy) * phaseY, cur.getXIndex() - curDx, (cur.getVal() - curDy) * phaseY, cur.getXIndex(), cur.getVal() * phaseY);\n }\n }\n if (dataSet.isDrawFilledEnabled()) {\n cubicFillPath.reset();\n cubicFillPath.addPath(cubicPath);\n drawCubicFill(mBitmapCanvas, dataSet, cubicFillPath, trans, minx, maxx);\n }\n Log.i(\"String_Node_Str\", \"String_Node_Str\" + (System.currentTimeMillis() - start));\n mRenderPaint.setColor(dataSet.getColor());\n mRenderPaint.setStyle(Paint.Style.STROKE);\n start = System.currentTimeMillis();\n trans.pathValueToPixel(cubicPath);\n Log.i(\"String_Node_Str\", \"String_Node_Str\" + (System.currentTimeMillis() - start));\n start = System.currentTimeMillis();\n mPathCanvas.drawPath(cubicPath, mRenderPaint);\n Log.i(\"String_Node_Str\", \"String_Node_Str\" + (System.currentTimeMillis() - start));\n c.drawBitmap(mPathBitmap, 0, 0, mRenderPaint);\n mRenderPaint.setPathEffect(null);\n}\n"
|
"private void confirmPackage(int idx, String host) {\n PackageTab tab = tabList.get(idx);\n Vector<DownloadLink> linkList = tab.getLinkList();\n int files = linkList.size();\n if (files == 0) {\n return;\n }\n Color c = new Color((int) (Math.random() * 0xffffff));\n c = c.brighter();\n FilePackage fp = new FilePackage();\n fp.setProperty(\"String_Node_Str\", c);\n fp.setName(tab.getPackageName());\n fp.setComment(tab.getComment());\n fp.setPassword(tab.getPassword());\n fp.setExtractAfterDownload(tab.isExtract());\n addToDownloadDirs(tab.getDownloadDirectory(), tab.getPackageName());\n if (JDUtilities.getConfiguration().getBooleanProperty(Configuration.PARAM_USE_PACKETNAME_AS_SUBFOLDER, false)) {\n File file = new File(new File(tab.getDownloadDirectory()), tab.getPackageName());\n if (JDUtilities.getConfiguration().getBooleanProperty(Configuration.PARAM_CREATE_SUBFOLDER_BEFORE_DOWNLOAD, false)) {\n if (!file.exists()) {\n file.mkdirs();\n }\n } else\n fp.setDownloadDirectory(file.getAbsolutePath());\n } else {\n fp.setDownloadDirectory(tab.getDownloadDirectory());\n }\n if (host == null) {\n fp.setDownloadLinks(linkList);\n for (int i = 0; i < files; i++) {\n linkList.elementAt(i).setFilePackage(fp);\n }\n } else {\n Vector<DownloadLink> linkListHost = new Vector<DownloadLink>();\n files = 0;\n for (int i = tab.getLinkList().size() - 1; i >= 0; --i) {\n if (linkList.elementAt(i).getHost().compareTo(host) == 0) {\n DownloadLink link = linkList.remove(i);\n totalLinkList.remove(link);\n linkListHost.add(link);\n link.setFilePackage(fp);\n ++files;\n }\n }\n if (files == 0) {\n return;\n }\n fp.setDownloadLinks(linkListHost);\n tab.setLinkList(linkList);\n }\n parentFrame.fireUIEvent(new UIEvent(this, UIEvent.UI_PACKAGE_GRABBED, fp));\n if (mStartAfterAdding.isSelected())\n parentFrame.fireUIEvent(new UIEvent(this, UIEvent.UI_START_DOWNLOADS, null));\n parentFrame.setDropTargetText(JDLocale.L(\"String_Node_Str\", \"String_Node_Str\") + files);\n}\n"
|
"protected IStatus run(IProgressMonitor monitor) {\n try {\n final Set<Artifact> arts = new HashSet<Artifact>();\n for (Artifact art : artifacts) {\n if (art.isOfType(AtsArtifactTypes.Action)) {\n arts.addAll(ActionManager.getTeams(art));\n } else if (art instanceof AbstractWorkflowArtifact) {\n Artifact parentArt = ((AbstractWorkflowArtifact) art).getParentTeamWorkflow();\n if (parentArt != null) {\n arts.add(parentArt);\n }\n }\n }\n worldComposite.load(worldEditor.getWorldXWidgetActionPage().getCurrentTitleLabel(), arts);\n } catch (OseeCoreException ex) {\n OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);\n }\n return Status.OK_STATUS;\n}\n"
|
"public EconomyResponse depositPlayer(OfflinePlayer player, String worldName, double amount) {\n return depositPlayer(player.getUniqueId().toString(), amount);\n}\n"
|
"protected String getData() {\n openConnection();\n String result = new String();\n try {\n byte[] buffer = new byte[BUFFER_SIZE];\n int count = 0;\n BufferedInputStream bufStream = new BufferedInputStream(stream, BUFFER_SIZE);\n if (bufStream != null)\n while ((count = bufStream.read(buffer)) != -1) result += new String(buffer, 0, count);\n bufStream.close();\n } catch (IOException e) {\n Log.e(getClass().getName(), \"String_Node_Str\" + e.toString());\n if (bannerDownloadListener != null)\n bannerDownloadListener.onBannerLoadFailed(LoadError.DownloadFailed);\n }\n return result;\n}\n"
|
"public View onCreateView2(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.scene_favorites, container, false);\n ContentLayout contentLayout = (ContentLayout) view.findViewById(R.id.content_layout);\n MainActivity activity = getActivity2();\n Assert.assertNotNull(activity);\n mDrawerLayout = (EhDrawerLayout) ViewUtils.$$(activity, R.id.draw_view);\n mRecyclerView = contentLayout.getRecyclerView();\n FastScroller fastScroller = contentLayout.getFastScroller();\n RefreshLayout refreshLayout = contentLayout.getRefreshLayout();\n mSearchBar = (SearchBar) ViewUtils.$$(view, R.id.search_bar);\n mFabLayout = (FabLayout) ViewUtils.$$(view, R.id.fab_layout);\n Context context = getContext2();\n Assert.assertNotNull(context);\n Resources resources = context.getResources();\n int paddingTopSB = resources.getDimensionPixelOffset(R.dimen.gallery_padding_top_search_bar);\n mHelper = new FavoritesHelper();\n mHelper.setEmptyString(resources.getString(R.string.gallery_list_empty_hit));\n contentLayout.setHelper(mHelper);\n contentLayout.getFastScroller().setOnDragHandlerListener(this);\n mAdapter = new FavoritesAdapter(inflater, resources, mRecyclerView, Settings.getListMode());\n mRecyclerView.setSelector(Ripple.generateRippleDrawable(context, false));\n mRecyclerView.setDrawSelectorOnTop(true);\n mRecyclerView.hasFixedSize();\n mRecyclerView.setClipToPadding(false);\n mRecyclerView.setOnItemClickListener(this);\n mRecyclerView.setOnItemLongClickListener(this);\n mRecyclerView.setChoiceMode(EasyRecyclerView.CHOICE_MODE_MULTIPLE_CUSTOM);\n mRecyclerView.setCustomCheckedListener(this);\n fastScroller.setPadding(fastScroller.getPaddingLeft(), fastScroller.getPaddingTop() + paddingTopSB, fastScroller.getPaddingRight(), fastScroller.getPaddingBottom());\n refreshLayout.setHeaderTranslationY(paddingTopSB);\n mLeftDrawable = new DrawerArrowDrawable(context);\n mSearchBar.setLeftDrawable(mLeftDrawable);\n mSearchBar.setRightDrawable(DrawableManager.getDrawable(context, R.drawable.v_magnify_x24));\n mSearchBar.setHelper(this);\n mSearchBar.setAllowEmptySearch(false);\n updateSearchBar();\n mSearchBarMover = new SearchBarMover(this, mSearchBar, mRecyclerView);\n mFabLayout.setExpanded(false, false);\n mFabLayout.setAutoCancel(false);\n mFabLayout.setHidePrimaryFab(true);\n mFabLayout.setOnClickFabListener(this);\n addAboveSnackView(mFabLayout);\n if (mSearchMode) {\n mSearchMode = false;\n enterSearchMode(false);\n }\n if (!mHasFirstRefresh) {\n mHasFirstRefresh = true;\n mHelper.firstRefresh();\n }\n guideCollections();\n return view;\n}\n"
|
"public void storeInBundle(Bundle bundle) {\n super.storeInBundle(bundle);\n bundle.put(BEAM_TARGET, beamTarget);\n bundle.put(BEAM_COOLDOWN, beamCooldown);\n bundle.put(BEAM_CHARGED, beamCharged);\n}\n"
|
"private Error verifyConstraints() {\n ExpectedInvocation lastInvocation = expectationsInReplayOrder.get(replayIndex).invocation;\n Object[] lastArgs = invocationArgumentsInReplayOrder.get(replayIndex);\n return verification.verifyConstraints(lastInvocation, lastArgs, 1, -1);\n}\n"
|
"public boolean remove(short key) {\n int i = binarySearch(0, size, key);\n if (i >= 0) {\n removeAtIndex(i);\n return true;\n }\n return false;\n}\n"
|
"public double[][] learn(double[] x, double[] y) {\n try {\n lambda = Double.parseDouble(lambdaField.getText().trim());\n if (lambda < 0.0) {\n JOptionPane.showMessageDialog(this, \"String_Node_Str\" + lambda, \"String_Node_Str\", JOptionPane.ERROR_MESSAGE);\n return null;\n }\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(this, \"String_Node_Str\" + lambdaField.getText(), \"String_Node_Str\", JOptionPane.ERROR_MESSAGE);\n return null;\n }\n double[][] data = dataset[datasetIndex].toArray(new double[dataset[datasetIndex].size()][]);\n int[] label = dataset[datasetIndex].toArray(new int[dataset[datasetIndex].size()]);\n LogisticRegression logit = new LogisticRegression(data, label, lambda);\n for (int i = 0; i < label.length; i++) {\n pred[i] = logit.predict(data[i]);\n }\n double trainError = error(label, label);\n System.out.format(\"String_Node_Str\", 100 * trainError);\n double[][] z = new double[y.length][x.length];\n for (int i = 0; i < y.length; i++) {\n for (int j = 0; j < x.length; j++) {\n double[] p = { x[j], y[i] };\n z[i][j] = logit.predict(p);\n }\n }\n return z;\n}\n"
|
"private static String extractPathInfo(final HttpServletRequest servletRequest) {\n String pathInfoString;\n final String requestUri = servletRequest.getRequestURI();\n pathInfoString = requestUri;\n int index = requestUri.indexOf(servletRequest.getContextPath());\n if (index >= 0) {\n pathInfoString = pathInfoString.substring(servletRequest.getContextPath().length());\n }\n int indexServletPath = requestUri.indexOf(servletRequest.getServletPath());\n if (indexServletPath >= 0) {\n pathInfoString = pathInfoString.substring(servletRequest.getServletPath().length());\n }\n return pathInfoString;\n}\n"
|
"public boolean onTouchEvent(MotionEvent event) {\n int touchCount = event.getPointerCount();\n switch(event.getAction()) {\n case MotionEvent.ACTION_DOWN:\n case MotionEvent.ACTION_POINTER_1_DOWN:\n case MotionEvent.ACTION_POINTER_2_DOWN:\n if (touchCount >= 2) {\n float distance = distance(event.getX(0), event.getX(1), event.getY(0), event.getY(1));\n mPrevDistance = distance;\n isScaling = true;\n } else {\n if (System.currentTimeMillis() <= mLastTime + DOUBLE_TAP_SECOND) {\n if (30 > Math.abs(mPrevMoveX - event.getX()) + Math.abs(mPrevMoveY - event.getY())) {\n isDoubleTap = true;\n mDoubleTapX = (int) event.getX();\n mDoubleTapY = (int) event.getY();\n }\n }\n mLastTime = System.currentTimeMillis();\n mPrevMoveX = (int) event.getX();\n mPrevMoveY = (int) event.getY();\n }\n break;\n case MotionEvent.ACTION_MOVE:\n if (touchCount >= 2 && isScaling) {\n float dist = distance(event.getX(0), event.getX(1), event.getY(0), event.getY(1));\n float scale = (dist - mPrevDistance) / dispDistance();\n mPrevDistance = dist;\n scale += 1;\n scale = scale * scale;\n zoomTo(scale, mWidth / 2, mHeight / 2);\n cutting();\n } else if (!isScaling) {\n int distanceX = mPrevMoveX - (int) event.getX();\n int distanceY = mPrevMoveY - (int) event.getY();\n mPrevMoveX = (int) event.getX();\n mPrevMoveY = (int) event.getY();\n mMatrix.postTranslate(-distanceX, -distanceY);\n cutting();\n }\n break;\n case MotionEvent.ACTION_UP:\n case MotionEvent.ACTION_POINTER_UP:\n case MotionEvent.ACTION_POINTER_2_UP:\n if (event.getPointerCount() <= 1) {\n isScaling = false;\n if (isDoubleTap) {\n if (30 > Math.abs(mDoubleTapX - event.getX()) + Math.abs(mDoubleTapY - event.getY())) {\n maxZoomTo(mDoubleTapX, mDoubleTapY);\n cutting();\n }\n }\n }\n isDoubleTap = false;\n break;\n }\n return true;\n}\n"
|
"ParsedCommand handleCommandString(Player player, String command, RunMode mode) throws SMSException {\n if (player != null) {\n ItemStack stack = player.getItemInHand();\n command = command.replace(\"String_Node_Str\", \"String_Node_Str\" + player.getLocation().getBlockX());\n command = command.replace(\"String_Node_Str\", \"String_Node_Str\" + player.getLocation().getBlockY());\n command = command.replace(\"String_Node_Str\", \"String_Node_Str\" + player.getLocation().getBlockZ());\n command = command.replace(\"String_Node_Str\", player.getName());\n command = command.replace(\"String_Node_Str\", player.getName());\n command = command.replace(\"String_Node_Str\", player.getWorld().getName());\n command = command.replace(\"String_Node_Str\", stack != null ? \"String_Node_Str\" + stack.getTypeId() : \"String_Node_Str\");\n command = command.replace(\"String_Node_Str\", stack != null ? stack.getType().toString() : \"String_Node_Str\");\n }\n Scanner scanner = new Scanner(command);\n ParsedCommand cmd = null;\n while (scanner.hasNext()) {\n cmd = new ParsedCommand(player, scanner);\n switch(mode) {\n case EXECUTE:\n if (cmd.isRestricted() || !cmd.isAffordable()) {\n continue;\n }\n execute(player, cmd);\n break;\n case CHECK_PERMS:\n cmd.setStatus(ReturnStatus.CMD_OK);\n if ((cmd.isElevated() || cmd.isConsole()) && !PermissionsUtils.isAllowedTo(player, \"String_Node_Str\")) {\n cmd.setStatus(ReturnStatus.NO_PERMS);\n return cmd;\n } else if (!cmd.getCosts().isEmpty() && !PermissionsUtils.isAllowedTo(player, \"String_Node_Str\")) {\n cmd.setStatus(ReturnStatus.NO_PERMS);\n return cmd;\n }\n break;\n default:\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n if (cmd.isCommandStopped() || cmd.isMacroStopped()) {\n break;\n }\n }\n return cmd;\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.