content stringlengths 40 137k |
|---|
"public boolean doWork() {\n if (targets == null) {\n Vect targetStart = new Vect(xCoord, yCoord, zCoord);\n int sizeNorthSouth = FarmHelper.getFarmSizeNorthSouth(worldObj, targetStart);\n int sizeEastWest = FarmHelper.getFarmSizeEastWest(worldObj, targetStart);\n allowedExtent = Math.max(sizeNorthSouth, sizeEastWest) * 3;\n targets = createTargets(worldObj, targetStart, allowedExtent, sizeNorthSouth, sizeEastWest);\n setExtents();\n } else if (checkTimer.delayPassed(worldObj, 400)) {\n setExtents();\n }\n if (tryAddPending()) {\n return true;\n }\n if (!pendingProduce.isEmpty()) {\n setErrorState(EnumErrorCode.NOSPACE);\n return false;\n }\n if (storedFertilizer <= BUFFER_FERTILIZER) {\n replenishFertilizer();\n if (storedFertilizer <= 0) {\n setErrorState(EnumErrorCode.NOFERTILIZER);\n return false;\n }\n }\n if (!pendingCrops.isEmpty()) {\n if (cullCrop(pendingCrops.peek(), harvestProvider)) {\n pendingCrops.pop();\n return true;\n } else {\n return false;\n }\n }\n FarmWorkStatus farmWorkStatus = new FarmWorkStatus();\n for (Map.Entry<ForgeDirection, List<FarmTarget>> entry : targets.entrySet()) {\n ForgeDirection farmSide = entry.getKey();\n IFarmLogic logic = getFarmLogic(farmSide);\n if (logic == null) {\n continue;\n }\n if (isCycleCanceledByListeners(logic, farmSide)) {\n continue;\n }\n if (collectWindfall(logic)) {\n didWork = true;\n } else {\n List<FarmTarget> farmTargets = entry.getValue();\n if (stage == Stage.HARVEST) {\n didWork = harvestTargets(farmTargets, logic);\n } else {\n didWork = cultivateTargets(farmTargets, logic);\n }\n }\n if (didWork) {\n break;\n }\n }\n stage = stage.next();\n return didWork;\n}\n"
|
"private void initWizard() {\n if (!AbstractIndicatorForm.isParametersEmpty()) {\n AbstractIndicatorForm.emptyParameterList();\n }\n IndicatorParameters indicatorParam = indicatorUnit.getIndicator().getParameters();\n if (indicatorParam != null) {\n TextParameters textParameters = indicatorParam.getTextParameter();\n if (textParameters != null) {\n TextParameter textParam = new TextParameter();\n textParam.setIngoreCase(textParameters.isIgnoreCase());\n textParam.setNumOfShown(indicatorParam.getTopN());\n TextLengthParameter textLengthParam = new TextLengthParameter();\n textLengthParam.setUseBlank(textParameters.isUseBlank());\n textLengthParam.setUseNull(textParameters.isUseNulls());\n paramMap.put(FormEnum.TextParametersForm, textParam);\n paramMap.put(FormEnum.TextLengthForm, textLengthParam);\n }\n if (IndicatorHelper.getDataThreshold(indicator) != null) {\n DataThresholdsParameter dataParam = new DataThresholdsParameter();\n dataParam.setMinThreshold(IndicatorHelper.getDataThreshold(indicator)[0]);\n dataParam.setMaxThreshold(IndicatorHelper.getDataThreshold(indicator)[1]);\n paramMap.put(FormEnum.DataThresholdsForm, dataParam);\n }\n if (IndicatorHelper.getIndicatorThreshold(indicator) != null) {\n IndicatorThresholdsParameter indicatorThresholdsParam = new IndicatorThresholdsParameter();\n indicatorThresholdsParam.setMinThreshold(IndicatorHelper.getIndicatorThreshold(indicator)[0]);\n indicatorThresholdsParam.setMaxThreshold(IndicatorHelper.getIndicatorThreshold(indicator)[1]);\n paramMap.put(FormEnum.IndicatorThresholdsForm, indicatorThresholdsParam);\n }\n Domain domain = indicatorParam.getBins();\n if (domain != null) {\n BinsDesignerParameter binsParam = new BinsDesignerParameter();\n binsParam.setMaxValue(DomainHelper.getMaxBinValue(indicatorParam.getBins()));\n binsParam.setMinValue(DomainHelper.getMinBinValue(indicatorParam.getBins()));\n binsParam.setNumOfBins(DomainHelper.getNumberOfBins(indicatorParam.getBins()));\n binsParam.setNumOfShown(indicatorParam.getTopN());\n paramMap.put(FormEnum.BinsDesignerForm, binsParam);\n }\n if (indicatorParam.getDateParameters() != null) {\n TimeSlicesParameter timeParam = new TimeSlicesParameter();\n timeParam.setDataUnit(indicatorParam.getDateParameters().getDateAggregationType().getLiteral());\n timeParam.setNumOfShown(indicatorParam.getTopN());\n paramMap.put(FormEnum.TimeSlicesForm, timeParam);\n }\n }\n}\n"
|
"public String createMetadata(Object nativeItem) throws CannotDisseminateFormatException {\n HarvestedItemInfo itemInfo = (HarvestedItemInfo) nativeItem;\n Item item = itemInfo.item;\n DCValue[] allDC = item.getDC(Item.ANY, Item.ANY, Item.ANY);\n StringBuffer metadata = new StringBuffer();\n metadata.append(\"String_Node_Str\").append(\"String_Node_Str\").append(\"String_Node_Str\").append(\"String_Node_Str\").append(\"String_Node_Str\");\n metadata.append(\"String_Node_Str\").append(hostName).append(\"String_Node_Str\").append(item.getHandle()).append(\"String_Node_Str\");\n for (int i = 0; i < allDC.length; i++) {\n if (screened(allDC[i])) {\n String element = allDC[i].element;\n if (allDC[i].element.equals(\"String_Node_Str\") && (allDC[i].qualifier != null) && allDC[i].qualifier.equals(\"String_Node_Str\")) {\n element = \"String_Node_Str\";\n }\n String value = allDC[i].value;\n int c = -1;\n while ((c = value.indexOf(\"String_Node_Str\", c + 1)) > -1) {\n value = value.substring(0, c) + \"String_Node_Str\" + value.substring(c + 1);\n }\n while ((c = value.indexOf(\"String_Node_Str\")) > -1) {\n value = value.substring(0, c) + \"String_Node_Str\" + value.substring(c + 1);\n }\n while ((c = value.indexOf(\"String_Node_Str\")) > -1) {\n value = value.substring(0, c) + \"String_Node_Str\" + value.substring(c + 1);\n }\n metadata.append(\"String_Node_Str\").append(element).append(\"String_Node_Str\").append(value).append(\"String_Node_Str\").append(element).append(\"String_Node_Str\");\n }\n }\n Collection[] colls = null;\n Community[] comms = null;\n Bundle[] origBundles = null;\n Bundle[] thumbBundles = null;\n try {\n colls = item.getCollections();\n comms = item.getCommunities();\n origBundles = item.getBundles(\"String_Node_Str\");\n thumbBundles = item.getBundles(\"String_Node_Str\");\n } catch (SQLException sqlE) {\n ;\n }\n for (int i = 0; i < comms.length; i++) {\n metadata.append(\"String_Node_Str\").append(comms[i].getMetadata(\"String_Node_Str\")).append(\"String_Node_Str\");\n }\n for (int j = 0; j < colls.length; j++) {\n metadata.append(\"String_Node_Str\").append(colls[j].getMetadata(\"String_Node_Str\")).append(\"String_Node_Str\");\n }\n if (origBundles.length > 0) {\n Bitstream[] bitstreams = origBundles[0].getBitstreams();\n for (int j = 0; j < bitstreams.length; j++) {\n String tName = bitstreams[j].getName() + \"String_Node_Str\";\n Bitstream tb = null;\n if (thumbBundles.length > 0) {\n tb = thumbBundles[0].getBitstreamByName(tName);\n }\n if (tb != null) {\n String thumbUrl = null;\n try {\n thumbUrl = baseUrl + \"String_Node_Str\" + tb.getID() + \"String_Node_Str\" + Util.encodeBitstreamName(tb.getName(), Constants.DEFAULT_ENCODING);\n } catch (Exception e) {\n }\n metadata.append(\"String_Node_Str\").append(thumbUrl).append(\"String_Node_Str\");\n }\n }\n }\n metadata.append(\"String_Node_Str\");\n metadata.append(\"String_Node_Str\");\n return metadata.toString();\n}\n"
|
"public void onTaskViewClicked(final TaskStackView stackView, final TaskView tv, final TaskStack stack, final Task task, final boolean lockToTask) {\n if (mCb != null) {\n mCb.onTaskViewClicked();\n }\n TaskViewTransform transform = new TaskViewTransform();\n View sourceView;\n int offsetX = 0;\n int offsetY = 0;\n float stackScroll = stackView.getScroller().getStackScroll();\n if (tv == null) {\n sourceView = stackView;\n transform = stackView.getStackAlgorithm().getStackTransform(task, stackScroll, transform, null);\n offsetX = transform.rect.left;\n offsetY = mConfig.displayRect.height();\n } else {\n sourceView = tv.mThumbnailView;\n transform = stackView.getStackAlgorithm().getStackTransform(task, stackScroll, transform, null);\n }\n final SystemServicesProxy ssp = RecentsTaskLoader.getInstance().getSystemServicesProxy();\n ActivityOptions opts = null;\n if (task.thumbnail != null && task.thumbnail.getWidth() > 0 && task.thumbnail.getHeight() > 0) {\n Bitmap b;\n if (tv != null) {\n if (tv.isFocusedTask()) {\n tv.unsetFocusedTask();\n }\n float scale = tv.getScaleX();\n int fromHeaderWidth = (int) (tv.mHeaderView.getMeasuredWidth() * scale);\n int fromHeaderHeight = (int) (tv.mHeaderView.getMeasuredHeight() * scale);\n b = Bitmap.createBitmap(fromHeaderWidth, fromHeaderHeight, Bitmap.Config.ARGB_8888);\n if (Constants.DebugFlags.App.EnableTransitionThumbnailDebugMode) {\n b.eraseColor(0xFFff0000);\n } else {\n Canvas c = new Canvas(b);\n c.scale(tv.getScaleX(), tv.getScaleY());\n tv.mHeaderView.draw(c);\n c.setBitmap(null);\n }\n } else {\n b = Bitmap.createBitmap(1, 1, Bitmap.Config.ALPHA_8);\n }\n ActivityOptions.OnAnimationStartedListener animStartedListener = null;\n if (lockToTask) {\n animStartedListener = new ActivityOptions.OnAnimationStartedListener() {\n boolean mTriggered = false;\n public void onAnimationStarted() {\n if (!mTriggered) {\n postDelayed(new Runnable() {\n public void run() {\n mCb.onScreenPinningRequest();\n }\n }, 350);\n mTriggered = true;\n }\n }\n };\n }\n opts = ActivityOptions.makeThumbnailAspectScaleUpAnimation(sourceView, b, offsetX, offsetY, transform.rect.width(), transform.rect.height(), sourceView.getHandler(), animStartedListener);\n }\n final ActivityOptions launchOpts = opts;\n final Runnable launchRunnable = new Runnable() {\n public void run() {\n if (task.isActive) {\n ssp.moveTaskToFront(task.key.id, launchOpts);\n } else {\n if (ssp.startActivityFromRecents(getContext(), task.key.id, task.activityLabel, launchOpts)) {\n if (launchOpts == null && lockToTask) {\n mCb.onScreenPinningRequest();\n }\n } else {\n onTaskViewDismissed(task);\n if (mCb != null) {\n mCb.onTaskLaunchFailed();\n }\n }\n }\n }\n };\n if (tv == null) {\n launchRunnable.run();\n } else {\n if (!task.group.isFrontMostTask(task)) {\n stackView.startLaunchTaskAnimation(tv, launchRunnable, lockToTask);\n } else {\n stackView.startLaunchTaskAnimation(tv, null, lockToTask);\n launchRunnable.run();\n }\n }\n}\n"
|
"static void setupSecurity(WifiConfiguration config, int security, final String password) {\n config.allowedAuthAlgorithms.clear();\n config.allowedGroupCiphers.clear();\n config.allowedKeyManagement.clear();\n config.allowedPairwiseCiphers.clear();\n config.allowedProtocols.clear();\n switch(security) {\n case SECURITY_NONE:\n config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);\n break;\n case SECURITY_WEP:\n config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);\n config.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.OPEN);\n config.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.SHARED);\n if (ConnectorUtils.isHexWepKey(password))\n config.wepKeys[0] = password;\n else\n config.wepKeys[0] = convertToQuotedString(password);\n break;\n case SECURITY_WPA:\n case SECURITY_WPA2:\n config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.TKIP);\n config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP);\n config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);\n if (password.matches(\"String_Node_Str\"))\n config.preSharedKey = password;\n else\n config.preSharedKey = convertToQuotedString(password);\n break;\n case SECURITY_EAP:\n config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_EAP);\n config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.IEEE8021X);\n config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.TKIP);\n config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP);\n config.preSharedKey = convertToQuotedString(password);\n break;\n default:\n wifiLog(\"String_Node_Str\" + security);\n }\n}\n"
|
"public MediaStreamTarget getStreamTarget(MediaType mediaType) {\n MediaStreamTarget streamTarget = null;\n for (Iterable<ContentPacketExtension> remote : remotes) {\n for (ContentPacketExtension content : remote) {\n RtpDescriptionPacketExtension rtpDescription = content.getFirstChildOfType(RtpDescriptionPacketExtension.class);\n MediaType contentMediaType = MediaType.parseString(rtpDescription.getMedia());\n if (mediaType.equals(contentMediaType)) {\n ColibriConferenceIQ.Channel channel = getColibriChannel(mediaType, true);\n if (channel == null) {\n streamTarget = JingleUtils.extractDefaultTarget(content);\n } else {\n streamTarget = new MediaStreamTarget(new InetSocketAddress(channel.getHost(), channel.getRTPPort()), new InetSocketAddress(channel.getHost(), channel.getRTCPPort()));\n }\n break;\n }\n }\n }\n return streamTarget;\n}\n"
|
"public void run() {\n if (log.isDebugEnabled()) {\n log.debug(\"String_Node_Str\" + getClusterId());\n }\n List<String> primaryMemberListInClusterInstance = new ArrayList<String>();\n for (ClusterLevelPartitionContext partitionContext : instanceContext.getPartitionCtxts()) {\n for (MemberContext memberContext : partitionContext.getActiveMembers()) {\n if (isPrimaryMember(memberContext)) {\n primaryMemberListInClusterInstance.add(memberContext.getMemberId());\n }\n }\n for (MemberContext memberContext : partitionContext.getPendingMembers()) {\n if (isPrimaryMember(memberContext)) {\n primaryMemberListInClusterInstance.add(memberContext.getMemberId());\n }\n }\n }\n getMinCheckKnowledgeSession().setGlobal(\"String_Node_Str\", getClusterId());\n getMinCheckKnowledgeSession().setGlobal(\"String_Node_Str\", hasPrimary);\n String paritionAlgo = instanceContext.getPartitionAlgorithm();\n if (paritionAlgo == null) {\n paritionAlgo = \"String_Node_Str\";\n }\n getMinCheckKnowledgeSession().setGlobal(\"String_Node_Str\", paritionAlgo);\n if (log.isDebugEnabled()) {\n log.debug(String.format(\"String_Node_Str\", instanceContext.getId()));\n }\n minCheckFactHandle = AutoscalerRuleEvaluator.evaluate(getMinCheckKnowledgeSession(), minCheckFactHandle, instanceContext);\n obsoleteCheckFactHandle = AutoscalerRuleEvaluator.evaluate(getObsoleteCheckKnowledgeSession(), obsoleteCheckFactHandle, instanceContext);\n boolean rifReset = instanceContext.isRifReset();\n boolean memoryConsumptionReset = instanceContext.isMemoryConsumptionReset();\n boolean loadAverageReset = instanceContext.isLoadAverageReset();\n if (log.isDebugEnabled()) {\n log.debug(\"String_Node_Str\" + rifReset + \"String_Node_Str\" + memoryConsumptionReset + \"String_Node_Str\" + loadAverageReset);\n }\n if (rifReset || memoryConsumptionReset || loadAverageReset) {\n VMClusterContext vmClusterContext = (VMClusterContext) clusterContext;\n getScaleCheckKnowledgeSession().setGlobal(\"String_Node_Str\", instanceContext);\n getScaleCheckKnowledgeSession().setGlobal(\"String_Node_Str\", getClusterId());\n getScaleCheckKnowledgeSession().setGlobal(\"String_Node_Str\", vmClusterContext.getAutoscalePolicy());\n getScaleCheckKnowledgeSession().setGlobal(\"String_Node_Str\", rifReset);\n getScaleCheckKnowledgeSession().setGlobal(\"String_Node_Str\", memoryConsumptionReset);\n getScaleCheckKnowledgeSession().setGlobal(\"String_Node_Str\", loadAverageReset);\n getScaleCheckKnowledgeSession().setGlobal(\"String_Node_Str\", hasPrimary);\n getScaleCheckKnowledgeSession().setGlobal(\"String_Node_Str\", primaryMemberListInClusterInstance);\n getMinCheckKnowledgeSession().setGlobal(\"String_Node_Str\", instanceContext.getPartitionAlgorithm());\n if (log.isDebugEnabled()) {\n log.debug(String.format(\"String_Node_Str\", instanceContext.getId()));\n log.debug(\"String_Node_Str\" + primaryMemberListInClusterInstance);\n }\n scaleCheckFactHandle = AutoscalerRuleEvaluator.evaluate(getScaleCheckKnowledgeSession(), scaleCheckFactHandle, instanceContext);\n instanceContext.setRifReset(false);\n instanceContext.setMemoryConsumptionReset(false);\n instanceContext.setLoadAverageReset(false);\n } else if (log.isDebugEnabled()) {\n log.debug(String.format(\"String_Node_Str\" + \"String_Node_Str\", instanceContext.getId()));\n }\n}\n"
|
"private IBaseExpression[] getAggrExpr() {\n if (this.notIncludeAggr)\n return new IBinding[0];\n totalExprName = new String[2];\n this.totalExprName[0] = \"String_Node_Str\";\n this.totalExprName[1] = \"String_Node_Str\";\n return totalBeArray;\n}\n"
|
"protected Digest cloneDigest(Digest digest) {\n return new DSTU7564Digest((DSTU7564Digest) digest);\n}\n"
|
"public Element mapGenericErrorConfirmation(String message, OpenClinicaException exception, HashMap<String, String> validations) throws Exception {\n DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = dbfac.newDocumentBuilder();\n Document document = docBuilder.newDocument();\n Element faultElement = document.createElementNS(this.SOAP_NAMESPACE, \"String_Node_Str\");\n Element faultCode = document.createElementNS(SOAP_NAMESPACE, \"String_Node_Str\");\n Element faultValue = document.createElementNS(SOAP_NAMESPACE, \"String_Node_Str\");\n faultValue.setTextContent(\"String_Node_Str\");\n faultCode.appendChild(faultValue);\n faultElement.appendChild(faultCode);\n Element faultReason = document.createElementNS(SOAP_NAMESPACE, \"String_Node_Str\");\n Element faultText = document.createElementNS(SOAP_NAMESPACE, \"String_Node_Str\");\n faultText.setTextContent(exception.className + \"String_Node_Str\");\n faultReason.appendChild(faultText);\n faultElement.appendChild(faultReason);\n Element faultDetail = document.createElementNS(SOAP_NAMESPACE, \"String_Node_Str\");\n Element faultDetailMessage = document.createElementNS(CONNECTOR_NAMESPACE_V1, exception.className + \"String_Node_Str\");\n faultDetailMessage.setAttributeNS(this.XSL_NAMESPACE, \"String_Node_Str\", exception.className + \"String_Node_Str\");\n Element code = document.createElementNS(CONNECTOR_NAMESPACE_V1, \"String_Node_Str\");\n code.setTextContent(exception.errorID);\n Element reason = document.createElementNS(CONNECTOR_NAMESPACE_V1, \"String_Node_Str\");\n reason.setTextContent(exception.message);\n if (\"String_Node_Str\".equals(exception.className)) {\n faultDetailMessage.appendChild(reason);\n faultDetailMessage.appendChild(code);\n } else if (\"String_Node_Str\".equals(exception.className)) {\n faultDetailMessage.appendChild(reason);\n faultDetailMessage.appendChild(code);\n java.util.Iterator itValidations = validations.entrySet().iterator();\n while (itValidations.hasNext()) {\n Map.Entry pair = (Map.Entry) itValidations.next();\n Element validationMessage = document.createElementNS(CONNECTOR_NAMESPACE_V1, \"String_Node_Str\");\n Element inputName = document.createElementNS(CONNECTOR_NAMESPACE_V1, \"String_Node_Str\");\n inputName.setTextContent((String) pair.getKey());\n validationMessage.appendChild(inputName);\n Element attributeName = document.createElementNS(CONNECTOR_NAMESPACE_V1, \"String_Node_Str\");\n attributeName.setTextContent((String) pair.getKey());\n validationMessage.appendChild(attributeName);\n Element inputMessage = document.createElementNS(CONNECTOR_NAMESPACE_V1, \"String_Node_Str\");\n inputMessage.setTextContent((String) pair.getValue());\n validationMessage.appendChild(inputMessage);\n faultDetailMessage.appendChild(validationMessage);\n }\n } else {\n faultDetailMessage.appendChild(code);\n faultDetailMessage.appendChild(reason);\n }\n faultDetail.appendChild(faultDetailMessage);\n faultElement.appendChild(faultDetail);\n return faultElement;\n}\n"
|
"private void promotion(final String type) {\n final JFrame popup = new JFrame(\"String_Node_Str\");\n popup.setSize(500, 300);\n popup.setLocationRelativeTo(null);\n popup.setLayout(new GridBagLayout());\n popup.setResizable(false);\n final DefaultListModel emptyList = new DefaultListModel();\n final DefaultListModel list = new DefaultListModel();\n Object[] allPieces = PieceBuilder.getSet().toArray();\n for (int i = 0; i < allPieces.length; i++) {\n list.addElement(allPieces[i]);\n }\n list.remove(4);\n final JList piecesList = new JList(list);\n final JList piecesList2 = new JList(emptyList);\n final JButton moveLeft = new JButton();\n moveLeft.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent arg0) {\n int index = piecesList2.getSelectedIndex();\n list.addElement(emptyList.elementAt(index));\n emptyList.remove(index);\n }\n });\n moveLeft.setText(\"String_Node_Str\");\n final JButton moveRight = new JButton();\n moveRight.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent arg0) {\n int index = piecesList.getSelectedIndex();\n emptyList.addElement(list.elementAt(index));\n list.remove(index);\n }\n });\n moveRight.setText(\"String_Node_Str\");\n piecesList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n piecesList.setLayoutOrientation(JList.VERTICAL);\n piecesList.setVisibleRowCount(-1);\n piecesList.setSelectedIndex(0);\n piecesList2.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n piecesList2.setLayoutOrientation(JList.VERTICAL);\n piecesList2.setVisibleRowCount(-1);\n piecesList2.setSelectedIndex(0);\n JScrollPane scrollPane = new JScrollPane(piecesList);\n scrollPane.setPreferredSize(new Dimension(200, 200));\n ListSelectionModel selectList = piecesList.getSelectionModel();\n selectList.addListSelectionListener(new ListSelectionListener() {\n public void valueChanged(ListSelectionEvent e) {\n if (e.getValueIsAdjusting() == false) {\n if (piecesList.getSelectedIndex() == -1) {\n moveLeft.setEnabled(false);\n moveRight.setEnabled(false);\n } else {\n moveLeft.setEnabled(true);\n moveRight.setEnabled(true);\n }\n }\n }\n });\n JScrollPane scrollPane2 = new JScrollPane(piecesList2);\n scrollPane2.setPreferredSize(new Dimension(200, 200));\n ListSelectionModel selectList2 = piecesList2.getSelectionModel();\n selectList2.addListSelectionListener(new ListSelectionListener() {\n public void valueChanged(ListSelectionEvent e) {\n if (e.getValueIsAdjusting() == false) {\n if (piecesList2.getSelectedIndex() == -1) {\n moveLeft.setEnabled(false);\n moveRight.setEnabled(false);\n } else {\n moveLeft.setEnabled(true);\n moveRight.setEnabled(true);\n }\n }\n }\n });\n JButton submitButton = new JButton(\"String_Node_Str\");\n submitButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent arg0) {\n ArrayList<String> promotesTo = new ArrayList<String>();\n for (int i = 0; i < emptyList.size(); i++) {\n promotesTo.add((String) emptyList.get(i));\n }\n promotions.put(type, promotesTo);\n popup.dispose();\n }\n });\n JMenuItem backButton = new JMenuItem(\"String_Node_Str\");\n backButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n popup.dispose();\n }\n });\n JMenuBar optionHolder = new JMenuBar();\n JMenu options = new JMenu(\"String_Node_Str\");\n options.setForeground(Color.WHITE);\n options.add(submitButton);\n options.add(backButton);\n optionHolder.add(options);\n JPanel otherCrap = new JPanel();\n otherCrap.setLayout(new GridBagLayout());\n GridBagConstraints c = new GridBagConstraints();\n c.fill = GridBagConstraints.HORIZONTAL;\n c.gridx = 0;\n c.gridy = 1;\n otherCrap.add(moveRight, c);\n c.fill = GridBagConstraints.HORIZONTAL;\n c.gridx = 0;\n c.gridy = 2;\n otherCrap.add(moveLeft, c);\n c.gridx = 0;\n c.gridy = 0;\n popup.add(scrollPane, c);\n c.gridx = 1;\n c.gridy = 0;\n popup.add(otherCrap, c);\n c.gridx = 2;\n c.gridy = 0;\n popup.add(scrollPane2, c);\n popup.setJMenuBar(optionHolder);\n popup.setVisible(true);\n}\n"
|
"protected static int __parseAndValidateInt(String s, int radix, int lowerBound, int upperBound) throws NumberFormatException {\n if (s == null) {\n throw new NumberFormatException(\"String_Node_Str\");\n }\n if (radix < Character.MIN_RADIX || radix > Character.MAX_RADIX) {\n throw new NumberFormatException(\"String_Node_Str\" + radix + \"String_Node_Str\");\n }\n int length = s.length();\n int startIndex = (length > 0) && (s.charAt(0) == '-') ? 1 : 0;\n for (int i = startIndex; i < length; i++) {\n if (Character.digit(s.charAt(i), radix) == -1) {\n throw NumberFormatException.forInputString(s);\n }\n }\n int toReturn = __parseInt(s, radix);\n if (__isNaN(toReturn)) {\n throw NumberFormatException.forInputString(s);\n } else if (isTooLow || toReturn > upperBound) {\n throw NumberFormatException.forInputString(s);\n }\n return toReturn;\n}\n"
|
"Map<Address, List<Block>> getCurrentMemberBlocks() {\n Map<Address, List<Block>> addressBlocks = new HashMap<Address, List<Block>>();\n List<MemberImpl> lsMembers = concurrentMapManager.getMembers();\n for (MemberImpl member : lsMembers) {\n if (!member.isSuperClient()) {\n addressBlocks.put(member.getAddress(), new ArrayList<Block>());\n }\n }\n if (addressBlocks.size() > 0) {\n for (Block blockReal : blocks) {\n if (blockReal != null && !blockReal.isMigrating()) {\n List<Block> ownedBlocks = addressBlocks.get(blockReal.getOwner());\n if (ownedBlocks != null) {\n ownedBlocks.add(new Block(blockReal));\n }\n }\n }\n }\n return addressBlocks;\n}\n"
|
"public Schema getSchema(Source xsdSource, SchemaResolverWrapper schemaResolverWrapper) {\n xsdSource = schemaResolverWrapper.resolveSchema(xsdSource);\n XMLContext context = new XMLContext(getSchemaProject());\n XMLUnmarshaller unmarshaller = context.createUnmarshaller();\n unmarshaller.setEntityResolver(schemaResolverWrapper.getSchemaResolver());\n Schema schema = (Schema) unmarshaller.unmarshal(xsdSource);\n java.util.List imports = schema.getImports();\n Iterator iter = imports.iterator();\n while (iter.hasNext()) {\n Import nextImport = (Import) iter.next();\n Source referencedSchema = getReferencedSchema(xsdSource, nextImport.getNamespace(), nextImport.getSchemaLocation(), schemaResolverWrapper);\n if (referencedSchema != null) {\n Schema importedSchema = getSchema(referencedSchema, schemaResolverWrapper, true);\n nextImport.setSchema(importedSchema);\n }\n }\n java.util.List includes = schema.getIncludes();\n Iterator includesIter = includes.iterator();\n while (includesIter.hasNext()) {\n Include nextInclude = (Include) includesIter.next();\n Source referencedSchema = getReferencedSchema(xsdSource, schema.getTargetNamespace(), nextInclude.getSchemaLocation(), schemaResolverWrapper);\n if (referencedSchema != null) {\n Schema includedSchema = getSchema(referencedSchema, schemaResolverWrapper);\n nextInclude.setSchema(includedSchema);\n }\n }\n return schema;\n}\n"
|
"private static int getMask(String actions) {\n int mask = NONE;\n if (actions == null) {\n return mask;\n }\n if (actions.equalsIgnoreCase(READ_ACTION)) {\n return READ;\n }\n if (actions == WRITE_ACTION) {\n return WRITE;\n } else if (actions == RW_ACTION) {\n return READ | WRITE;\n }\n char[] a = actions.toCharArray();\n int i = a.length - 1;\n if (i < 0)\n return mask;\n while (i != -1) {\n char c;\n while ((i != -1) && ((c = a[i]) == ' ' || c == '\\r' || c == '\\n' || c == '\\f' || c == '\\t')) i--;\n int matchlen;\n if (i >= 3 && (a[i - 3] == 'r' || a[i - 3] == 'R') && (a[i - 2] == 'e' || a[i - 2] == 'E') && (a[i - 1] == 'a' || a[i - 1] == 'A') && (a[i] == 'd' || a[i] == 'D')) {\n matchlen = 4;\n mask |= READ;\n } else if (i >= 4 && (a[i - 4] == 'w' || a[i - 4] == 'W') && (a[i - 3] == 'r' || a[i - 3] == 'R') && (a[i - 2] == 'i' || a[i - 2] == 'I') && (a[i - 1] == 't' || a[i - 1] == 'T') && (a[i] == 'e' || a[i] == 'E')) {\n matchlen = 5;\n mask |= WRITE;\n } else {\n throw new IllegalArgumentException(localStrings.getLocalString(\"String_Node_Str\", \"String_Node_Str\", actions));\n }\n boolean seencomma = false;\n while (i >= matchlen && !seencomma) {\n switch(a[i - matchlen]) {\n case ',':\n seencomma = true;\n case ' ':\n case '\\r':\n case '\\n':\n case '\\f':\n case '\\t':\n break;\n default:\n throw new IllegalArgumentException(localStrings.getLocalString(\"String_Node_Str\", \"String_Node_Str\", actions));\n }\n i--;\n }\n i -= matchlen;\n }\n return mask;\n}\n"
|
"protected void onPostExecute(APIResponse.CODE code) {\n super.onPostExecute(code);\n if (code != APIResponse.CODE.NODATA) {\n JsonObject redAlliance = mMatch.getAlliances().getAsJsonObject(\"String_Node_Str\");\n JsonArray redAllianceTeamKeys = redAlliance.getAsJsonArray(\"String_Node_Str\");\n TextView red1 = ((TextView) mActivity.findViewById(R.id.red1));\n TextView red2 = ((TextView) mActivity.findViewById(R.id.red2));\n TextView red3 = ((TextView) mActivity.findViewById(R.id.red3));\n TeamClickListener listener = new TeamClickListener(mActivity);\n if (redAllianceTeamKeys.size() == 0) {\n red1.setText(\"String_Node_Str\");\n red2.setText(\"String_Node_Str\");\n red3.setText(\"String_Node_Str\");\n } else {\n String red1Key = redAllianceTeamKeys.get(0).getAsString();\n red1.setText(red1Key.substring(3));\n red1.setTag(red1Key);\n red1.setOnClickListener(listener);\n String red2Key = redAllianceTeamKeys.get(1).getAsString();\n red2.setText(red2Key.substring(3));\n red2.setTag(red2Key);\n red2.setOnClickListener(listener);\n if (redAllianceTeamKeys.size() > 2) {\n String red3Key = redAllianceTeamKeys.get(2).getAsString();\n red3.setText(red3Key.substring(3));\n red3.setTag(red3Key);\n red3.setOnClickListener(listener);\n } else {\n red3.setVisibility(View.GONE);\n }\n }\n JsonElement redScore = redAlliance.get(\"String_Node_Str\");\n TextView red_score = ((TextView) mActivity.findViewById(R.id.red_score));\n if (redScore.getAsInt() < 0) {\n red_score.setText(\"String_Node_Str\");\n } else {\n red_score.setText(redAlliance.get(\"String_Node_Str\").getAsString());\n }\n JsonObject blueAlliance = mMatch.getAlliances().getAsJsonObject(\"String_Node_Str\");\n JsonArray blueAllianceTeamKeys = blueAlliance.getAsJsonArray(\"String_Node_Str\");\n TextView blue1 = ((TextView) mActivity.findViewById(R.id.blue1));\n TextView blue2 = ((TextView) mActivity.findViewById(R.id.blue2));\n TextView blue3 = ((TextView) mActivity.findViewById(R.id.blue3));\n if (blueAllianceTeamKeys.size() == 0) {\n blue1.setText(\"String_Node_Str\");\n blue2.setText(\"String_Node_Str\");\n blue3.setText(\"String_Node_Str\");\n } else {\n String blue1Key = blueAllianceTeamKeys.get(0).getAsString();\n blue1.setText(blue1Key.substring(3));\n blue1.setTag(blue1Key);\n blue1.setOnClickListener(listener);\n String blue2Key = blueAllianceTeamKeys.get(1).getAsString();\n blue2.setText(blue2Key.substring(3));\n blue2.setTag(blue2Key);\n blue2.setOnClickListener(listener);\n if (blueAllianceTeamKeys.size() > 2) {\n String blue3Key = blueAllianceTeamKeys.get(2).getAsString();\n blue3.setText(blue3Key.substring(3));\n blue3.setTag(blue3Key);\n blue3.setOnClickListener(listener);\n } else {\n blue3.setVisibility(View.GONE);\n }\n }\n TextView blue_score = ((TextView) mActivity.findViewById(R.id.blue_score));\n JsonElement blueScore = blueAlliance.get(\"String_Node_Str\");\n if (blueScore.getAsInt() < 0) {\n blue_score.setText(\"String_Node_Str\");\n } else {\n blue_score.setText(blueAlliance.get(\"String_Node_Str\").getAsString());\n }\n JsonElement blueScore = blueAlliance.get(\"String_Node_Str\");\n blue_score.setText(blueScore.getAsString());\n Resources resources = mActivity.getResources();\n if (blueScore.getAsInt() > redScore.getAsInt()) {\n View blue_alliance = mActivity.findViewById(R.id.blue_alliance);\n if (blue_alliance != null) {\n blue_alliance.setBackgroundDrawable(resources.getDrawable(R.drawable.blue_border));\n }\n blue_score.setBackgroundDrawable(resources.getDrawable(R.drawable.blue_score_border));\n } else if (blueScore.getAsInt() < redScore.getAsInt()) {\n View red_alliance = mActivity.findViewById(R.id.red_alliance);\n if (red_alliance != null) {\n red_alliance.setBackgroundDrawable(resources.getDrawable(R.drawable.red_border));\n }\n red_score.setBackgroundDrawable(resources.getDrawable(R.drawable.red_score_border));\n }\n SimpleEvent event = Database.getInstance(mActivity).getEvent(mEventKey);\n if (event != null) {\n ((TextView) mActivity.findViewById(R.id.event_name)).setText(event.getEventName());\n }\n ((TextView) mActivity.findViewById(R.id.match_name)).setText(mMatch.getTitle());\n JsonArray videos = mMatch.getVideos();\n Picasso picasso = Picasso.with(mActivity);\n List<ImageView> images = new ArrayList();\n for (int i = 0; i < videos.size(); i++) {\n JsonObject video = videos.get(i).getAsJsonObject();\n if (video.get(\"String_Node_Str\").getAsString().equals(\"String_Node_Str\")) {\n final String videoKey = video.get(\"String_Node_Str\").getAsString();\n String thumbnailURL = \"String_Node_Str\" + videoKey + \"String_Node_Str\";\n ImageView thumbnail = new ImageView(mActivity);\n thumbnail.setAdjustViewBounds(true);\n thumbnail.setClickable(true);\n thumbnail.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"String_Node_Str\" + videoKey));\n mActivity.startActivity(intent);\n }\n });\n images.add(thumbnail);\n picasso.load(thumbnailURL).into(thumbnail);\n }\n }\n for (int i = 0; i < images.size(); i++) {\n ImageView thumbnail = images.get(i);\n LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n if (images.size() > 1 && i > 0) {\n layoutParams.topMargin = Utilities.getPixelsFromDp(mActivity, 16);\n }\n ((LinearLayout) mActivity.findViewById(R.id.video_thumbnail_container)).addView(thumbnail, layoutParams);\n }\n if (code == APIResponse.CODE.OFFLINECACHE) {\n ((RefreshableHostActivity) mActivity).showWarningMessage(mActivity.getString(R.string.warning_using_cached_data));\n }\n mActivity.findViewById(R.id.progress).setVisibility(View.GONE);\n mActivity.findViewById(R.id.match_container).setVisibility(View.VISIBLE);\n }\n}\n"
|
"public void enableLocationUpdates() {\n mSpeedReadings = 0;\n mTotalSpeed = 0f;\n try {\n gApiMgr.addTask(requestLocationUpdate);\n } catch (IllegalStateException e) {\n Log.e(TAG, \"String_Node_Str\");\n }\n}\n"
|
"void pilotExit() {\n log(\"String_Node_Str\" + (worldObj.isRemote ? \"String_Node_Str\" : \"String_Node_Str\"));\n if (riddenByEntity == null) {\n log(\"String_Node_Str\");\n return;\n Entity pilot = getPilot();\n riddenByEntity.mountEntity(this);\n riddenByEntity = null;\n if (pilot != null) {\n if (pilot.ridingEntity != null)\n pilot.ridingEntity.riddenByEntity = null;\n ;\n pilot.ridingEntity = null;\n }\n sidedHelper.pilotExit(pilot);\n targetEntity = null;\n}\n"
|
"private void adoptWolf(Player p, int wolves) {\n String world = p.getWorld().getName();\n double price = this.adoptPrice;\n int type = this.adoptType;\n int limit = this.adoptLimit;\n String aggro = this.adoptAggro;\n if (this.adoptPriceWorlds.containsKey(world)) {\n price = this.adoptPriceWorlds.get(world);\n limit = this.adoptLimitWorlds.get(world);\n type = this.adoptTypeWorlds.get(world);\n agro = this.adoptAgroWorlds.get(world);\n }\n if (limit >= 0) {\n wolves = (wolves > limit) ? limit : wolves;\n }\n if (hasPermission(p, PERM_ADOPT) && bank.hasMoney(p, price * wolves, type)) {\n bank.payForWolf(p, price * wolves, type);\n if (price > 0) {\n bank.showRecipt(p, price * wolves, type);\n }\n for (int i = 0; i < wolves; i++) {\n spawnWolf(p, agro);\n }\n }\n}\n"
|
"private Vertex findClosestVertexTo(PointF point) {\n Vertex closestVertex = graph.getVertex(\"String_Node_Str\");\n float shortestDist = Float.MAX_VALUE;\n for (Vertex vertex : graph.getVertices()) {\n PointF vertexCoordinates = (PointF) vertex.getProperty(KEY_COORDINATES);\n float distToPoint = (float) Math.sqrt(Math.pow((vertexCoordinates.x - point.x), 2) + Math.pow((vertexCoordinates.y - point.y), 2));\n if (distToPoint < shortestDist) {\n shortestDist = distToPoint;\n closestVertex = vertex;\n StringBuilder sb1 = new StringBuilder().append(\"String_Node_Str\");\n sb1.append(\"String_Node_Str\" + shortestDist + \"String_Node_Str\");\n sb1.append(\"String_Node_Str\" + closestVertex.getId());\n Log.d(TAG, sb1.toString());\n }\n }\n return closestVertex;\n}\n"
|
"private static boolean buildMultipartEntity(MultipartEntity entity, SecretKeySpec key, File[] files) throws FileNotFoundException {\n for (File f : files) {\n ContentBody fb;\n if (f.getName().endsWith(\"String_Node_Str\")) {\n if (key != null) {\n if (!validateSubmissionFile(f)) {\n return false;\n }\n fb = new EncryptedFileBody(f, FormUploadUtil.getDecryptCipher(key), ContentType.TEXT_XML);\n } else {\n fb = new FileBody(f, ContentType.TEXT_XML, f.getName());\n }\n entity.addPart(\"String_Node_Str\", fb);\n } else if (f.getName().endsWith(\"String_Node_Str\")) {\n fb = new FileBody(f, \"String_Node_Str\");\n if (fb.getContentLength() <= MAX_BYTES) {\n entity.addPart(f.getName(), fb);\n Log.i(TAG, \"String_Node_Str\" + f.getName());\n } else {\n Log.i(TAG, \"String_Node_Str\" + f.getName() + \"String_Node_Str\");\n }\n } else if (f.getName().endsWith(\"String_Node_Str\")) {\n fb = new FileBody(f, \"String_Node_Str\");\n if (fb.getContentLength() <= MAX_BYTES) {\n entity.addPart(f.getName(), fb);\n Log.i(TAG, \"String_Node_Str\" + f.getName());\n } else {\n Log.i(TAG, \"String_Node_Str\" + f.getName() + \"String_Node_Str\");\n }\n } else if (f.getName().endsWith(\"String_Node_Str\")) {\n fb = new FileBody(f, \"String_Node_Str\");\n if (fb.getContentLength() <= MAX_BYTES) {\n entity.addPart(f.getName(), fb);\n Log.i(TAG, \"String_Node_Str\" + f.getName());\n } else {\n Log.i(TAG, \"String_Node_Str\" + f.getName() + \"String_Node_Str\");\n }\n } else if (isSupportedMultimediaFile(f.getName())) {\n fb = new FileBody(f, \"String_Node_Str\");\n if (fb.getContentLength() <= MAX_BYTES) {\n entity.addPart(f.getName(), fb);\n Log.i(TAG, \"String_Node_Str\" + f.getName());\n } else {\n Log.i(TAG, \"String_Node_Str\" + f.getName() + \"String_Node_Str\");\n }\n } else {\n Log.w(TAG, \"String_Node_Str\" + f.getName());\n }\n }\n return true;\n}\n"
|
"public void setJob(final Job job) throws GenieException {\n if (job == null || StringUtils.isBlank(job.getId())) {\n throw new GenieException(HttpURLConnection.HTTP_BAD_REQUEST, \"String_Node_Str\");\n }\n this.job = job;\n}\n"
|
"public void note_build() throws IOException, InterruptedException, GitAPIException, ExecutionException {\n Git.init().setDirectory(tmp.getRoot()).call();\n tmp.newFile(\"String_Node_Str\");\n Git git = Git.open(tmp.getRoot());\n git.add().addFilepattern(\"String_Node_Str\");\n RevCommit commit = git.commit().setMessage(\"String_Node_Str\").call();\n ObjectId head = git.getRepository().resolve(Constants.HEAD);\n String repositoryUrl = tmp.getRoot().toURI().toString();\n final OneShotEvent buildTriggered = new OneShotEvent();\n FreeStyleProject project = jenkins.createFreeStyleProject();\n project.setScm(new GitSCM(repositoryUrl));\n project.getBuildersList().add(new TestBuilder() {\n public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {\n buildTriggered.signal();\n return true;\n }\n });\n Date currentDate = new Date();\n project.setQuietPeriod(0);\n noteHookTriggerHandler.handle(project, noteHook().withObjectAttributes(noteObjectAttributes().withId(1).withNote(\"String_Node_Str\").withAuthorId(1).withProjectId(1).withCreatedAt(currentDate).withUpdatedAt(currentDate).withUrl(\"String_Node_Str\").build()).withMergeRequest(mergeRequestObjectAttributes().withTargetBranch(\"String_Node_Str\" + git.nameRev().add(head).call().get(head)).withState(State.opened).withIid(1).withTitle(\"String_Node_Str\").withTargetProjectId(1).withSourceProjectId(1).withSourceBranch(\"String_Node_Str\").withTargetBranch(\"String_Node_Str\").withLastCommit(commit().withAuthor(user().withName(\"String_Node_Str\").build()).withId(commit.getName()).build()).withSource(project().withName(\"String_Node_Str\").withNamespace(\"String_Node_Str\").withHomepage(\"String_Node_Str\").withUrl(\"String_Node_Str\").withSshUrl(\"String_Node_Str\").withHttpUrl(\"String_Node_Str\").build()).withTarget(project().withName(\"String_Node_Str\").withNamespace(\"String_Node_Str\").withHomepage(\"String_Node_Str\").withUrl(\"String_Node_Str\").withSshUrl(\"String_Node_Str\").withHttpUrl(\"String_Node_Str\").withWebUrl(\"String_Node_Str\").build()).build()).build(), true, BranchFilterFactory.newBranchFilter(branchFilterConfig().build(BranchFilterType.All)));\n buildTriggered.block(10000);\n assertThat(buildTriggered.isSignaled(), is(true));\n}\n"
|
"public void serialize_string_short_map_then_deserialize() throws Exception {\n Hessian2StringShortType stringShort = new Hessian2StringShortType();\n Map<String, Short> stringShortMap = new HashMap<String, Short>();\n stringShortMap.put(\"String_Node_Str\", (short) 0);\n stringShortMap.put(\"String_Node_Str\", (short) 60);\n stringShort.stringShortMap = stringShortMap;\n Hessian2StringShortType deserialize = baseHession2Serialize(stringShort);\n assertTrue(deserialize.stringShortMap != null);\n assertTrue(deserialize.stringShortMap.size() == 2);\n assertTrue(deserialize.stringShortMap.get(\"String_Node_Str\") instanceof Short);\n assertEquals(Short.valueOf((short) 0), deserialize.stringShortMap.get(\"String_Node_Str\"));\n assertEquals(Short.valueOf((short) 60), deserialize.stringShortMap.get(\"String_Node_Str\"));\n}\n"
|
"public void doubleClickNavigation(MouseEvent e) {\n SwingTreeViewNode treeNode = (SwingTreeViewNode) tree.getLastSelectedPathComponent();\n if (treeNode != null) {\n IProgramElement currNode = (IProgramElement) treeNode.getUserObject();\n if (currNode != null && !e.isControlDown() && !e.isShiftDown() && e.getModifiers() != 4) {\n }\n }\n}\n"
|
"public void loadedRom() {\n for (RomEntry re : roms) {\n if (romCode(rom, re.romCode) && (rom[0xBC] & 0xFF) == re.version) {\n romEntry = re;\n break;\n }\n }\n tb = new String[256];\n d = new HashMap<String, Byte>();\n isRomHack = false;\n if (romEntry.romType == Gen3Constants.RomType_Ruby || romEntry.romType == Gen3Constants.RomType_Sapp) {\n int baseNomOffset = find(rom, Gen3Constants.rsPokemonNamesPointerSuffix);\n romEntry.entries.put(\"String_Node_Str\", readPointer(baseNomOffset - 4));\n } else {\n romEntry.entries.put(\"String_Node_Str\", readPointer(Gen3Constants.efrlgPokemonNamesPointer));\n romEntry.entries.put(\"String_Node_Str\", readPointer(Gen3Constants.efrlgMoveNamesPointer));\n romEntry.entries.put(\"String_Node_Str\", readPointer(Gen3Constants.efrlgAbilityNamesPointer));\n romEntry.entries.put(\"String_Node_Str\", readPointer(Gen3Constants.efrlgItemDataPointer));\n romEntry.entries.put(\"String_Node_Str\", readPointer(Gen3Constants.efrlgMoveDataPointer) + 0xC);\n }\n loadTextTable(romEntry.tableFile);\n loadPokemonStats();\n pokemonList = Arrays.asList(pokes);\n loadMoves();\n int baseWPOffset = findMultiple(rom, Gen3Constants.wildPokemonPointerPrefix).get(0);\n romEntry.entries.put(\"String_Node_Str\", readPointer(baseWPOffset + 12));\n int baseMapsOffset = findMultiple(rom, Gen3Constants.mapBanksPointerPrefix).get(0);\n romEntry.entries.put(\"String_Node_Str\", readPointer(baseMapsOffset + 12));\n this.determineMapBankSizes();\n if (romEntry.romType == Gen3Constants.RomType_FRLG) {\n int baseMLOffset = find(rom, Gen3Constants.frlgMapLabelsPointerPrefix);\n romEntry.entries.put(\"String_Node_Str\", readPointer(baseMLOffset + 12));\n } else {\n int baseMLOffset = find(rom, Gen3Constants.rseMapLabelsPointerPrefix);\n romEntry.entries.put(\"String_Node_Str\", readPointer(baseMLOffset + 12));\n }\n mapLoadingDone = false;\n loadAbilityNames();\n loadItemNames();\n}\n"
|
"public String toString() {\n StringBuilder sb = new StringBuilder(\"String_Node_Str\");\n boolean first = true;\n if (isSetPath()) {\n sb.append(\"String_Node_Str\");\n } else {\n sb.append(this.path);\n }\n first = false;\n sb.append(\"String_Node_Str\");\n return sb.toString();\n}\n"
|
"public void processEvents() {\n --ignoreDepth;\n if (ignoreDepth == 0) {\n this.ignoreEvents = false;\n }\n}\n"
|
"public Object clone() {\n NonSynchronizedProperties properties = new NonSynchronizedProperties(size());\n properties.putAll(this);\n return properties;\n}\n"
|
"public static List<Result> process(Path inDir, Path outDir, int gzipFrom) throws IOException {\n List<Result> result = new ArrayList<>();\n int num = 2;\n while (true) {\n Path cur = inDir.resolve(num + \"String_Node_Str\");\n Path prev = inDir.resolve((num - 1) + \"String_Node_Str\");\n if (!(isRegularFile(cur) && isRegularFile(prev))) {\n break;\n }\n println(\"String_Node_Str\", cur, prev);\n Result deltaHashes = new Result();\n Path deltaFile = outDir.resolve(cur.getFileName().toString() + \"String_Node_Str\");\n deleteIfExists(deltaFile);\n deltaHashes.path = deltaFile;\n try (HashingOutputStream hashingStream = new HashingOutputStream(Hashing.sha256(), new BufferedOutputStream(newOutputStream(deltaFile, StandardOpenOption.CREATE_NEW)))) {\n GZIPOutputStream zipStream = null;\n GDiffWriter writer;\n if (isGzipping) {\n println(\"String_Node_Str\");\n zipStream = new GZIPOutputStream(hashingStream);\n writer = new GDiffWriter(zipStream);\n } else {\n writer = new GDiffWriter(hashingStream);\n }\n Delta delta = new Delta();\n deltaHashes.preHash = sha256(readAllBytes(prev));\n delta.compute(prev.toFile(), cur.toFile(), writer);\n if (isGzipping)\n zipStream.close();\n deltaHashes.patchHash = hashingStream.hash().asBytes();\n deltaHashes.postHash = sha256(readAllBytes(cur));\n }\n long size = Files.size(deltaFile);\n deltaHashes.patchSize = size;\n println(\"String_Node_Str\", deltaFile, size / 1024.0);\n result.add(deltaHashes);\n num++;\n }\n return result;\n}\n"
|
"public void findMissingBlobs(FindMissingBlobsRequest request, StreamObserver<FindMissingBlobsResponse> responseObserver) {\n if (numErrors-- <= 0) {\n responseObserver.onNext(FindMissingBlobsResponse.newBuilder().addMissingBlobDigests(fooDigest).addMissingBlobDigests(barDigest).addMissingBlobDigests(bazDigest).build());\n responseObserver.onCompleted();\n } else {\n responseObserver.onError(Status.UNAVAILABLE.asRuntimeException());\n }\n}\n"
|
"protected String getPath(RegistryApplicationKey type) {\n String clsid = getClsid(type);\n if (clsid != null) {\n String path = RegistryKeyReader.readKey(BASE_KEY_CLSID + clsid + \"String_Node_Str\");\n if (path == null) {\n path = RegistryKeyReader.readKey(BASE_KEY_64_CLSID + clsid + \"String_Node_Str\");\n }\n if (path != null) {\n String extractedPath = extractPath(path).trim();\n if (!extractedPath.startsWith(\"String_Node_Str\")) {\n extractedPath = '\"' + extractedPath + '\"';\n }\n return extractedPath;\n }\n }\n return null;\n}\n"
|
"public String getDataProviderID() {\n if (dataprovider_id == null) {\n dataprovider_id = Utils.generateNormalizedNonReservedName(plainSQLName);\n }\n return dataprovider_id;\n}\n"
|
"protected static void performDrop(Location target, OtherBlocksContainer dropData) {\n if (!isCreature(dropData.dropped)) {\n if (dropData.dropped.equalsIgnoreCase(\"String_Node_Str\")) {\n Inventory inven = null;\n switch(Material.valueOf(dropData.original)) {\n case FURNACE:\n case BURNING_FURNACE:\n Furnace oven = (Furnace) target.getBlock().getState();\n inven = oven.getInventory();\n ItemStack cooking = inven.getItem(0);\n if (oven.getCookTime() > 0)\n cooking.setAmount(cooking.getAmount() - 1);\n if (cooking.getAmount() <= 0)\n inven.setItem(0, null);\n break;\n case DISPENSER:\n Dispenser trap = (Dispenser) target.getBlock().getState();\n inven = trap.getInventory();\n break;\n case CHEST:\n Chest box = (Chest) target.getBlock().getState();\n inven = box.getInventory();\n break;\n }\n if (inven != null) {\n for (ItemStack item : inven.getContents()) {\n if (item.getType() != Material.AIR) {\n target.getWorld().dropItemNaturally(target, item);\n }\n }\n }\n } else if (Material.valueOf(dropData.dropped) != Material.AIR) {\n target.getWorld().dropItemNaturally(target, new ItemStack(Material.valueOf(dropData.dropped), dropData.quantity, dropData.color));\n }\n } else {\n for (Integer i = 0; i < dropData.quantity; i++) {\n target.getWorld().spawnCreature(new Location(target.getWorld(), target.getX() + 0.5, target.getY() + 1, target.getZ() + 0.5), CreatureType.valueOf(OtherBlocks.creatureName(dropData.dropped)));\n }\n }\n}\n"
|
"public void reset() {\n synchronized (this) {\n for (String channel : connection.channelsInternal()) {\n unregisterCallback(channel);\n }\n connection.unsubscribe(new TreeSet<String>(connection.channelsInternal()));\n testChannels = new TreeSet<String>();\n String testChannel = \"String_Node_Str\" + connection.groupDevice();\n testChannels.add(testChannel);\n connection.subscribe(testChannel);\n connection.subscribe(connection.group());\n connection.subscribe(connection.groupDevice());\n connection.subscribe(GIST_LIST_SYNC_CHAN);\n connection.subscribe(GIST_GET_SYNC_CHAN);\n }\n super.reset();\n}\n"
|
"public static void main(String[] args) throws Exception {\n RandomAccessInputStream rin = new FileCacheRandomAccessInputStream(new FileInputStream(args[0]));\n RandomAccessOutputStream rout = null;\n if (args.length > 1) {\n if (args[1].equalsIgnoreCase(\"String_Node_Str\")) {\n rout = new FileCacheRandomAccessOutputStream(new FileOutputStream(\"String_Node_Str\"));\n TIFFTweaker.copyCat(rin, rout);\n rout.close();\n } else if (args[1].equalsIgnoreCase(\"String_Node_Str\")) {\n TIFFTweaker.snoop(rin);\n } else if (args[1].equalsIgnoreCase(\"String_Node_Str\")) {\n int pageCount = TIFFTweaker.getPageCount(rin);\n rout = new FileCacheRandomAccessOutputStream(new FileOutputStream(\"String_Node_Str\"));\n if (pageCount > 1)\n TIFFTweaker.retainPages(rin, rout, pageCount - 1);\n else\n TIFFTweaker.copyCat(rin, rout);\n rout.close();\n } else if (args[1].equalsIgnoreCase(\"String_Node_Str\") || args[1].equalsIgnoreCase(\"String_Node_Str\")) {\n File[] files = FileUtils.listFilesMatching(new File(args[2]), args[3]);\n TIFFFrame[] frames = new TIFFFrame[files.length];\n for (int i = 0; i < files.length; i++) {\n FileInputStream fin = new FileInputStream(files[i]);\n BufferedImage image = javax.imageio.ImageIO.read(fin);\n frames[i] = new TIFFFrame(image);\n fin.close();\n }\n ImageMeta.ImageMetaBuilder builder = new ImageMeta.ImageMetaBuilder();\n TIFFOptions tiffOptions = new TIFFOptions();\n tiffOptions.setTiffCompression(Compression.LZW);\n tiffOptions.setApplyPredictor(true);\n tiffOptions.setDeflateCompressionLevel(6);\n builder.imageOptions(tiffOptions);\n frames[0].setFrameMeta(builder.grayscale(true).applyDither(true).ditherThreshold(18).hasAlpha(true).build());\n tiffOptions = new TIFFOptions(tiffOptions);\n tiffOptions.setTiffCompression(Compression.DEFLATE);\n frames[1].setFrameMeta(builder.imageOptions(tiffOptions).build());\n tiffOptions = new TIFFOptions(tiffOptions);\n tiffOptions.setTiffCompression(Compression.CCITTFAX4);\n ImageMeta meta = builder.bilevel(true).imageOptions(tiffOptions).build();\n for (int i = 2; i < frames.length; i++) frames[i].setFrameMeta(meta);\n rout = new FileCacheRandomAccessOutputStream(new FileOutputStream(\"String_Node_Str\"));\n if (args[1].equalsIgnoreCase(\"String_Node_Str\"))\n TIFFTweaker.writeMultipageTIFF(rout, frames);\n else {\n long t1 = System.currentTimeMillis();\n List<IFD> list = new ArrayList<IFD>();\n int offset = TIFFTweaker.prepareForInsert(rin, rout, list);\n int index = 3;\n TIFFWriter writer = new TIFFWriter();\n writer.setImageMeta(frames[0].getFrameMeta());\n for (int i = 0; i < frames.length; i++) {\n offset = TIFFTweaker.insertPage(frames[i].getFrame(), index += 2, rout, list, offset, writer);\n }\n int nColors = 2;\n byte[] reds = new byte[] { 0, (byte) 255 };\n byte[] greens = new byte[] { 0, (byte) 255 };\n byte[] blues = new byte[] { 0, (byte) 255 };\n int width = 400;\n int height = 400;\n IndexColorModel colorModel = new IndexColorModel(1, nColors, reds, greens, blues);\n BufferedImage im = new BufferedImage(width, height, BufferedImage.TYPE_BYTE_BINARY, colorModel);\n WritableRaster raster = im.getRaster();\n for (int h = 0; h < height; h++) for (int w = 0; w < width; w++) if (((h / 50) + (w / 50)) % 2 == 0)\n raster.setSample(w, h, 0, 0);\n else\n raster.setSample(w, h, 0, 1);\n writer.setImageMeta(frames[2].getFrameMeta());\n TIFFTweaker.insertPage(im, 0, rout, list, offset, writer);\n TIFFTweaker.finishInsert(rout, list);\n long t2 = System.currentTimeMillis();\n System.out.println(\"String_Node_Str\" + (t2 - t1) + \"String_Node_Str\");\n }\n rout.close();\n } else if (args[1].equalsIgnoreCase(\"String_Node_Str\")) {\n TIFFTweaker.splitPages(rin, FileUtils.getNameWithoutExtension(new File(args[0])));\n } else if (args[1].equalsIgnoreCase(\"String_Node_Str\")) {\n rout = new FileCacheRandomAccessOutputStream(new FileOutputStream(\"String_Node_Str\"));\n TIFFTweaker.insertExif(rin, rout, populateExif());\n rout.close();\n } else if (args[1].equalsIgnoreCase(\"String_Node_Str\")) {\n int pageCount = TIFFTweaker.getPageCount(rin);\n rout = new FileCacheRandomAccessOutputStream(new FileOutputStream(\"String_Node_Str\"));\n if (pageCount > 1)\n TIFFTweaker.removePages(rin, rout, 0, 1, 1, 1, 5, 5, 4, 100, -100);\n else\n TIFFTweaker.copyCat(rin, rout);\n rout.close();\n }\n }\n rin.close();\n}\n"
|
"public static void persist(final CheckException errors) {\n if (errors != null && Hosts.isCoordinator()) {\n try {\n Entities.persist(e);\n db.commit();\n } catch (final Exception ex) {\n LOG.error(\"String_Node_Str\" + ex, ex);\n db.rollback();\n }\n }\n}\n"
|
"public ExecutionResult execute(Item item) {\n ProcessType processType = getProcessType(item);\n final List<String> componentNames = Arrays.asList(\"String_Node_Str\", \"String_Node_Str\");\n final String tableToCheck = \"String_Node_Str\";\n final List<String> fieldNames = Arrays.asList(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n IComponentFilter filter = new IComponentFilter() {\n public boolean accept(NodeType node) {\n return componentNames.contains(node.getComponentName());\n }\n };\n try {\n ModifyComponentsAction.searchAndModify(item, processType, filter, Arrays.<IComponentConversion>asList(new IComponentConversion() {\n public void transform(NodeType node) {\n String openBrStr = \"String_Node_Str\";\n String closeBrStr = \"String_Node_Str\";\n String openBrPattern = Pattern.quote(openBrStr);\n String closeBrPattern = Pattern.quote(closeBrStr);\n ProcessType item = (ProcessType) node.eContainer();\n for (Object o : item.getNode()) {\n NodeType nt = (NodeType) o;\n for (Object o1 : nt.getElementParameter()) {\n ElementParameterType t = (ElementParameterType) o1;\n if (\"String_Node_Str\".equals(t.getField()) && tablesToCheck.contains(t.getName())) {\n List<ElementValueType> elementValues = (List<ElementValueType>) t.getElementValue();\n for (int i = 0; i < elementValues.size() - 1; i++) {\n ElementValueType nameCol = elementValues.get(i);\n String nameValue = nameCol.getValue();\n if (nameCol.getElementRef().equals(\"String_Node_Str\") && nameValue != null && fieldNames.contains(nameValue)) {\n ElementValueType valueCol = elementValues.get(++i);\n String value = valueCol != null ? valueCol.getValue().trim() : null;\n if (value != null && value.contains(openBrStr) || value.contains(closeBrStr)) {\n String newValue = value.replaceFirst(openBrPattern, \"String_Node_Str\").replaceFirst(closeBrPattern, \"String_Node_Str\");\n if (!value.equals(newValue)) {\n valueCol.setValue(newValue);\n }\n }\n }\n }\n }\n }\n }\n }\n }));\n return ExecutionResult.SUCCESS_NO_ALERT;\n } catch (PersistenceException e) {\n ExceptionHandler.process(e);\n return ExecutionResult.FAILURE;\n }\n}\n"
|
"public void testCreateScanWithLockAndWriteColumns() throws IOException {\n byte[] startRow = Bytes.toBytes(\"String_Node_Str\");\n byte[] stopRow = Bytes.toBytes(\"String_Node_Str\");\n Scan scan = new Scan(startRow, stopRow);\n scan.addColumn(FAMILY, QUALIFIER);\n scan.addColumn(ANOTHER_FAMILY, ANOTHER_QUALIFIER);\n Scan createdScan = ThemisCpUtil.constructLockAndWriteScan(scan, PREWRITE_TS);\n Assert.assertArrayEquals(startRow, createdScan.getStartRow());\n Assert.assertArrayEquals(stopRow, createdScan.getStopRow());\n Assert.assertEquals(3, createdScan.getFamilies().length);\n checkReadWithLockAndWriteColumns(createdScan.getFamilyMap(), COLUMN);\n checkReadWithLockAndWriteColumns(createdScan.getFamilyMap(), new ColumnCoordinate(ANOTHER_FAMILY, ANOTHER_QUALIFIER));\n scan = new Scan(startRow, stopRow);\n scan.addFamily(ANOTHER_FAMILY);\n scan.addColumn(FAMILY, QUALIFIER);\n createdScan = ThemisCpUtil.constructLockAndWriteScan(scan, PREWRITE_TS);\n Assert.assertArrayEquals(startRow, createdScan.getStartRow());\n Assert.assertArrayEquals(stopRow, createdScan.getStopRow());\n Assert.assertEquals(3, createdScan.getFamilies().length);\n checkReadWithWriteColumns(createdScan.getFamilyMap(), new ColumnCoordinate(ANOTHER_FAMILY, QUALIFIER));\n Assert.assertTrue(createdScan.getFamilyMap().containsKey(FAMILY) && createdScan.getFamilyMap().get(FAMILY) == null);\n Assert.assertTrue(createdScan.getFamilyMap().containsKey(ColumnUtil.LOCK_FAMILY_NAME) && createdScan.getFamilyMap().get(ColumnUtil.LOCK_FAMILY_NAME) == null);\n Assert.assertTrue(createdScan.getFilter() instanceof ExcludeDataColumnFilter);\n}\n"
|
"protected boolean isTextIntersecting(int size, int buffer, double remainingSpaceX, int pixelX, int nextStartPixel, Rectangle2D bounds) {\n return pixelX + bounds.getWidth() + buffer > nextStartPixel && getOverlapRenderingMode() == Intersecting;\n}\n"
|
"public void updateSuggestions() {\n if ((mSuggest == null || !isSuggestionsRequested()) && !mVoiceProxy.isVoiceInputHighlighted()) {\n return;\n }\n mHandler.cancelUpdateSuggestions();\n mHandler.cancelUpdateBigramPredictions();\n if (!mHasUncommittedTypedChars) {\n setPunctuationSuggestions();\n return;\n }\n final WordComposer wordComposer = mWordComposer;\n final InputConnection ic = getCurrentInputConnection();\n final CharSequence prevWord;\n if (null == ic) {\n prevWord = null;\n } else {\n prevWord = EditingUtils.getPreviousWord(ic, mSettingsValues.mWordSeparators);\n }\n final SuggestedWords.Builder builder = mSuggest.getSuggestedWordBuilder(wordComposer, prevWord, mKeyboardSwitcher.getLatinKeyboard().getProximityInfo());\n boolean autoCorrectionAvailable = !mInputTypeNoAutoCorrect && mSuggest.hasAutoCorrection();\n final CharSequence typedWord = wordComposer.getTypedWord();\n final boolean allowsToBeAutoCorrected = AutoCorrection.allowsToBeAutoCorrected(mSuggest.getUnigramDictionaries(), typedWord, preferCapitalization());\n if (mCorrectionMode == Suggest.CORRECTION_FULL || mCorrectionMode == Suggest.CORRECTION_FULL_BIGRAM) {\n autoCorrectionAvailable |= typedWordValid;\n }\n autoCorrectionAvailable &= !wordComposer.isMostlyCaps();\n autoCorrectionAvailable &= !TextEntryState.isRecorrecting();\n if (typedWord != null) {\n if (builder.size() > 1 || typedWord.length() == 1 || typedWordValid || mSuggestionsView.isShowingAddToDictionaryHint()) {\n builder.setTypedWordValid(typedWordValid).setHasMinimalSuggestion(autoCorrectionAvailable);\n } else {\n SuggestedWords previousSuggestions = mSuggestionsView.getSuggestions();\n if (previousSuggestions == mSettingsValues.mSuggestPuncList) {\n if (builder.size() == 0) {\n return;\n }\n previousSuggestions = SuggestedWords.EMPTY;\n }\n builder.addTypedWordAndPreviousSuggestions(typedWord, previousSuggestions);\n }\n }\n showSuggestions(builder.build(), typedWord);\n}\n"
|
"private static void test5() {\n List<Double> list = new ArrayList<>();\n for (int i = 0; i < 4; i++) {\n list.add((double) i);\n }\n for (int i = 4; i < 10; i++) {\n list.add(0.0);\n }\n EmpiricalCDF cdf = new EmpiricalCDF(list, 0, 7, 7);\n System.out.println(cdf);\n List<Double> list2 = new ArrayList<>();\n for (int i = 0; i < 8; i++) {\n list2.add((double) i);\n }\n for (int i = 8; i < 10; i++) {\n list2.add(0.0);\n }\n EmpiricalCDF cdf2 = new EmpiricalCDF(list2, 3);\n System.out.println(cdf2);\n System.out.println(EmpiricalCDF.distance(cdf, cdf2));\n}\n"
|
"protected void doPropfind(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n if (!listings) {\n StringBuilder methodsAllowed = determineMethodsAllowed(resources, req);\n resp.addHeader(\"String_Node_Str\", methodsAllowed.toString());\n resp.sendError(WebdavStatus.SC_METHOD_NOT_ALLOWED);\n return;\n }\n String path = getRelativePath(req);\n if (path.endsWith(\"String_Node_Str\"))\n path = path.substring(0, path.length() - 1);\n if (path.toUpperCase(Locale.ENGLISH).startsWith(\"String_Node_Str\") || path.toUpperCase(Locale.ENGLISH).startsWith(\"String_Node_Str\")) {\n resp.sendError(WebdavStatus.SC_FORBIDDEN);\n return;\n }\n Vector<String> properties = null;\n int depth = INFINITY;\n int type = FIND_ALL_PROP;\n String depthStr = req.getHeader(\"String_Node_Str\");\n if (depthStr == null) {\n depth = INFINITY;\n } else {\n if (\"String_Node_Str\".equals(depthStr)) {\n depth = 0;\n } else if (\"String_Node_Str\".equals(depthStr)) {\n depth = 1;\n } else if (\"String_Node_Str\".equals(depthStr)) {\n depth = INFINITY;\n }\n }\n Node propNode = null;\n if (req.getInputStream().available() > 0) {\n DocumentBuilder documentBuilder = getDocumentBuilder();\n try {\n Document document = documentBuilder.parse(new InputSource(req.getInputStream()));\n Element rootElement = document.getDocumentElement();\n NodeList childList = rootElement.getChildNodes();\n for (int i = 0; i < childList.getLength(); i++) {\n Node currentNode = childList.item(i);\n switch(currentNode.getNodeType()) {\n case Node.TEXT_NODE:\n break;\n case Node.ELEMENT_NODE:\n if (currentNode.getNodeName().endsWith(\"String_Node_Str\")) {\n type = FIND_BY_PROPERTY;\n propNode = currentNode;\n }\n if (currentNode.getNodeName().endsWith(\"String_Node_Str\")) {\n type = FIND_PROPERTY_NAMES;\n }\n if (currentNode.getNodeName().endsWith(\"String_Node_Str\")) {\n type = FIND_ALL_PROP;\n }\n break;\n default:\n break;\n }\n }\n } catch (SAXException e) {\n } catch (IOException e) {\n }\n }\n if (type == FIND_BY_PROPERTY) {\n properties = new Vector<String>();\n NodeList childList = propNode.getChildNodes();\n for (int i = 0; i < childList.getLength(); i++) {\n Node currentNode = childList.item(i);\n switch(currentNode.getNodeType()) {\n case Node.TEXT_NODE:\n break;\n case Node.ELEMENT_NODE:\n String nodeName = currentNode.getNodeName();\n String propertyName = null;\n if (nodeName.indexOf(':') != -1) {\n propertyName = nodeName.substring(nodeName.indexOf(':') + 1);\n } else {\n propertyName = nodeName;\n }\n properties.addElement(propertyName);\n break;\n default:\n break;\n }\n }\n }\n boolean exists = true;\n Object object = null;\n try {\n object = resources.lookup(path);\n } catch (NamingException e) {\n exists = false;\n int slash = path.lastIndexOf('/');\n if (slash != -1) {\n String parentPath = path.substring(0, slash);\n Vector<String> currentLockNullResources = lockNullResources.get(parentPath);\n if (currentLockNullResources != null) {\n Enumeration<String> lockNullResourcesList = currentLockNullResources.elements();\n while (lockNullResourcesList.hasMoreElements()) {\n String lockNullPath = lockNullResourcesList.nextElement();\n if (lockNullPath.equals(path)) {\n resp.setStatus(WebdavStatus.SC_MULTI_STATUS);\n resp.setContentType(\"String_Node_Str\");\n XMLWriter generatedXML = new XMLWriter(resp.getWriter());\n generatedXML.writeXMLHeader();\n generatedXML.writeElement(null, \"String_Node_Str\" + generateNamespaceDeclarations(), XMLWriter.OPENING);\n parseLockNullProperties(req, generatedXML, lockNullPath, type, properties);\n generatedXML.writeElement(null, \"String_Node_Str\", XMLWriter.CLOSING);\n generatedXML.sendData();\n return;\n }\n }\n }\n }\n }\n if (!exists) {\n resp.sendError(HttpServletResponse.SC_NOT_FOUND, path);\n return;\n }\n resp.setStatus(WebdavStatus.SC_MULTI_STATUS);\n resp.setContentType(\"String_Node_Str\");\n XMLWriter generatedXML = new XMLWriter(resp.getWriter());\n generatedXML.writeXMLHeader();\n generatedXML.writeElement(null, \"String_Node_Str\" + generateNamespaceDeclarations(), XMLWriter.OPENING);\n if (depth == 0) {\n parseProperties(req, generatedXML, path, type, properties);\n } else {\n Stack<String> stack = new Stack<String>();\n stack.push(path);\n Stack<String> stackBelow = new Stack<String>();\n while (!stack.isEmpty() && depth >= 0) {\n String currentPath = stack.pop();\n parseProperties(req, generatedXML, currentPath, type, properties);\n try {\n object = resources.lookup(currentPath);\n } catch (NamingException e) {\n continue;\n }\n if (object instanceof DirContext && depth > 0) {\n try {\n NamingEnumeration<NameClassPair> enumeration = resources.list(currentPath);\n while (enumeration.hasMoreElements()) {\n NameClassPair ncPair = enumeration.nextElement();\n String newPath = currentPath;\n if (!newPath.endsWith(\"String_Node_Str\"))\n newPath += \"String_Node_Str\";\n newPath += ncPair.getName();\n stackBelow.push(newPath);\n }\n } catch (NamingException e) {\n resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, path);\n return;\n }\n String lockPath = currentPath;\n if (lockPath.endsWith(\"String_Node_Str\"))\n lockPath = lockPath.substring(0, lockPath.length() - 1);\n Vector<String> currentLockNullResources = lockNullResources.get(lockPath);\n if (currentLockNullResources != null) {\n Enumeration<String> lockNullResourcesList = currentLockNullResources.elements();\n while (lockNullResourcesList.hasMoreElements()) {\n String lockNullPath = lockNullResourcesList.nextElement();\n parseLockNullProperties(req, generatedXML, lockNullPath, type, properties);\n }\n }\n }\n if (stack.isEmpty()) {\n depth--;\n stack = stackBelow;\n stackBelow = new Stack<String>();\n }\n generatedXML.sendData();\n }\n }\n generatedXML.writeElement(null, \"String_Node_Str\", XMLWriter.CLOSING);\n generatedXML.sendData();\n}\n"
|
"public void printBanner() {\n log.info(\"String_Node_Str\" + name.getMethodName() + \"String_Node_Str\" + this.getClass().getCanonicalName() + \"String_Node_Str\");\n if (started) {\n return;\n FrameworkStartupEventChannel.fireEvent();\n String dbVendor = DBFactory.getInstance().getDbVendor();\n postgresqlConfigured = dbVendor != null && dbVendor.startsWith(\"String_Node_Str\");\n oracleConfigured = dbVendor != null && dbVendor.startsWith(\"String_Node_Str\");\n System.out.println(\"String_Node_Str\");\n printOlatLocalProperties();\n System.out.println(\"String_Node_Str\");\n System.out.println(\"String_Node_Str\");\n System.out.println(\"String_Node_Str\");\n started = true;\n}\n"
|
"private void updateCombos() {\n if (model == null || min == null || min.isDisposed()) {\n return;\n }\n final List<String> minItems = new ArrayList<String>();\n final List<String> maxItems = new ArrayList<String>();\n minItems.add(ITEM_ALL);\n for (int i = 1; i <= (hierarchy == null ? 0 : hierarchy[0].length); i++) {\n minItems.add(String.valueOf(i));\n maxItems.add(String.valueOf(i));\n }\n maxItems.add(ITEM_ALL);\n Integer minModel = model.getInputConfig().getMinimumGeneralization(attribute);\n String minSelected = ITEM_ALL;\n if (minModel != null)\n minSelected = String.valueOf(minModel + 1);\n int minIndex = minIndexOf(minSelected);\n Integer maxModel = model.getInputConfig().getMaximumGeneralization(attribute);\n String maxSelected = ITEM_ALL;\n if (maxModel != null)\n maxSelected = String.valueOf(maxModel + 1);\n int maxIndex = maxIndexOf(maxSelected);\n if (minIndex > (maxIndex + 1)) {\n minIndex = maxIndex + 1;\n }\n min.setItems(minItems.toArray(new String[] {}));\n max.setItems(maxItems.toArray(new String[] {}));\n min.select(minIndex);\n max.select(maxIndex);\n pushMin();\n pushMax();\n}\n"
|
"void skipUntil(String delim) throws java.lang.Exception {\n while (!tryRead(delim)) {\n char c;\n while (readBufferPos >= readBufferLength) {\n switch(sourceType) {\n case INPUT_READER:\n case INPUT_EXTERNAL:\n case INPUT_STREAM:\n readDataChunk();\n while (readBufferLength < 1) {\n popInput();\n if (readBufferLength < 1) {\n readDataChunk();\n }\n }\n break;\n default:\n popInput();\n break;\n }\n }\n c = readBuffer[readBufferPos++];\n if (c == '\\n') {\n line++;\n column = 0;\n } else {\n column++;\n }\n }\n}\n"
|
"public void filterMatches(BundleRevision requirer, Collection<Capability> candidates) {\n if (isMember(requirer)) {\n Iterator<Capability> i = candidates.iterator();\n while (i.hasNext()) {\n Capability c = i.next();\n Bundle providerBundle = c.getProviderRevision().getBundle();\n if (!isMember(providerBundle)) {\n String namespace = c.getNamespace();\n if (Capability.BUNDLE_CAPABILITY.equals(namespace)) {\n i.remove();\n }\n if (Capability.PACKAGE_CAPABILITY.equals(namespace)) {\n if (!imported((String) c.getAttributes().get(Capability.PACKAGE_CAPABILITY), c.getAttributes(), c.getDirectives())) {\n i.remove();\n }\n }\n }\n }\n } else {\n Iterator<Capability> i = candidates.iterator();\n while (i.hasNext()) {\n Capability c = i.next();\n Bundle providerBundle = c.getProviderRevision().getBundle();\n if (!isMember(providerBundle)) {\n i.remove();\n }\n }\n }\n}\n"
|
"synchronized public void close() throws IOException {\n try {\n closeFiles();\n if (!readOnly && !removeOnExit) {\n writeProperties();\n entryTable.write();\n nodeTable.write();\n freeTable.write();\n nodeTable.write(NodeTable.INODE_FREE_TABLE);\n writeHeader();\n }\n } finally {\n if (rf != null) {\n rf.close();\n rf = null;\n }\n if (removeOnExit) {\n new File(fileName).delete();\n }\n }\n}\n"
|
"protected void showLoadingLookAndFeel() {\n View listv = findViewById(R.id.list);\n View loadingv = findViewById(R.id.loading);\n ImageView iv = (ImageView) loadingv.findViewById(R.id.loading_img);\n TextView tv = (TextView) loadingv.findViewById(R.id.loading_msg);\n tv.setText(R.string.loading);\n loadingv.setVisibility(View.VISIBLE);\n mListv.setVisibility(View.GONE);\n iv.startAnimation(AnimationUtils.loadAnimation(YTSearchActivity.this, R.anim.rotate));\n}\n"
|
"public void createLogEntry() throws ModelServiceException, StorageActionException {\n LogEntry entry = new LogEntry();\n entry.setAction(\"String_Node_Str\");\n entry.setAddress(\"String_Node_Str\");\n entry.setDatetime(\"String_Node_Str\");\n LogEntryParameter[] parameters = new LogEntryParameter[2];\n LogEntryParameter p1 = new LogEntryParameter(\"String_Node_Str\", \"String_Node_Str\");\n LogEntryParameter p2 = new LogEntryParameter(\"String_Node_Str\", \"String_Node_Str\");\n parameters[0] = p1;\n parameters[1] = p2;\n entry.setParameters(parameters);\n model.addLogEntry(entry);\n}\n"
|
"public void handleQueryReply(QueryReply queryReply, ManagedConnection receivingConnection, MessageRouter router, ActivityCallback callback) {\n queryReply.hop();\n send(queryReply);\n}\n"
|
"public static void cleanup() throws Exception {\n if (kafkaServer != null) {\n kafkaServer.shutdown();\n }\n if (zkServer != null) {\n zkServer.stop();\n }\n File clientKeystoreFile = new File(clientKeystorePath);\n if (clientKeystoreFile.exists()) {\n FileUtils.forceDelete(clientKeystoreFile);\n }\n File serviceKeystoreFile = new File(serviceKeystorePath);\n if (serviceKeystoreFile.exists()) {\n serviceKeystoreFile.delete();\n }\n File truststoreFile = new File(truststorePath);\n if (truststoreFile.exists()) {\n truststoreFile.delete();\n }\n if (tempDir != null) {\n FileUtils.deleteDirectory(tempDir.toFile());\n }\n}\n"
|
"private String removeDTD(String modelConetnet) {\n String newModelContent = \"String_Node_Str\";\n newModelContent = modelConetnet;\n if (newModelContent.indexOf(\"String_Node_Str\") == 0) {\n newModelContent = newModelContent.substring(newModelContent.indexOf(\"String_Node_Str\"));\n newModelContent = newModelContent.substring(newModelContent.indexOf(\"String_Node_Str\") + 1);\n newModelContent = newModelContent.substring(newModelContent.indexOf(\"String_Node_Str\"));\n newModelContent = newModelContent.trim();\n }\n if (newModelContent.indexOf(\"String_Node_Str\") == 0) {\n newModelContent = newModelContent.substring(newModelContent.indexOf(\"String_Node_Str\"));\n newModelContent = newModelContent.substring(newModelContent.indexOf(\"String_Node_Str\") + 1);\n newModelContent = newModelContent.substring(newModelContent.indexOf(\"String_Node_Str\"));\n newModelContent.trim();\n }\n return newModelContent;\n}\n"
|
"public static <T extends ImageSingleBand> StereoDisparity<T, ImageUInt8> regionWta(DisparityAlgorithms whichAlg, int minDisparity, int maxDisparity, int regionRadiusX, int regionRadiusY, double maxPerPixelError, int validateRtoL, double texture, Class<T> imageType) {\n double maxError = (regionRadiusX * 2 + 1) * (regionRadiusY * 2 + 1) * maxPerPixelError;\n if (whichAlg == DisparityAlgorithms.RECT_FIVE)\n maxError *= 3;\n DisparitySelect select;\n if (imageType == ImageUInt8.class || imageType == ImageSInt16.class) {\n select = selectDisparity_S32((int) maxError, validateRtoL, texture);\n } else if (imageType == ImageFloat32.class) {\n select = selectDisparity_F32((int) maxError, validateRtoL, texture);\n } else {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n DisparityScoreRowFormat<T, ImageUInt8> alg = null;\n switch(whichAlg) {\n case RECT:\n if (imageType == ImageUInt8.class) {\n alg = FactoryStereoDisparityAlgs.scoreDisparitySadRect_U8(minDisparity, maxDisparity, regionRadiusX, regionRadiusY, select);\n } else if (imageType == ImageSInt16.class) {\n alg = FactoryStereoDisparityAlgs.scoreDisparitySadRect_S16(minDisparity, maxDisparity, regionRadiusX, regionRadiusY, select);\n } else if (imageType == ImageFloat32.class) {\n alg = FactoryStereoDisparityAlgs.scoreDisparitySadRect_F32(minDisparity, maxDisparity, regionRadiusX, regionRadiusY, select);\n }\n break;\n case RECT_FIVE:\n if (imageType == ImageUInt8.class) {\n alg = FactoryStereoDisparityAlgs.scoreDisparitySadRectFive_U8(minDisparity, maxDisparity, regionRadiusX, regionRadiusY, select);\n } else if (imageType == ImageSInt16.class) {\n alg = FactoryStereoDisparityAlgs.scoreDisparitySadRectFive_S16(minDisparity, maxDisparity, regionRadiusX, regionRadiusY, select);\n } else if (imageType == ImageFloat32.class) {\n alg = FactoryStereoDisparityAlgs.scoreDisparitySadRectFive_F32(minDisparity, maxDisparity, regionRadiusX, regionRadiusY, select);\n }\n break;\n default:\n throw new IllegalArgumentException(\"String_Node_Str\" + whichAlg);\n }\n if (alg == null)\n throw new RuntimeException(\"String_Node_Str\" + imageType.getSimpleName());\n return new WrapDisparitySadRect<T, ImageUInt8>(alg);\n}\n"
|
"public boolean isReady() {\n return assocIsUp && acceptedIncomingConnection;\n}\n"
|
"protected Collection<IClasspathEntry> getSourceEntries(boolean istest) {\n try {\n IClasspathEntry[] rawEntries = javaProject.getRawClasspath();\n if (rawEntries != null) {\n Collection<IClasspathEntry> sourceEntries = new HashSet<IClasspathEntry>();\n for (IClasspathEntry entry : rawEntries) {\n if (entry.getEntryKind() == IClasspathEntry.CPE_SOURCE) {\n IPath path = entry.getPath();\n if (path != null) {\n boolean isTestSource = isTestSource(path.toOSString());\n if ((istest && isTestSource) || (!istest && !isTestSource)) {\n sourceEntries.add(entry);\n }\n }\n }\n }\n return sourceEntries;\n }\n } catch (JavaModelException e) {\n CloudFoundryPlugin.log(e);\n }\n return Collections.emptyList();\n}\n"
|
"public void remove(Animation animation) {\n animationsToRemove.add(animation);\n}\n"
|
"boolean isFinished() {\n try {\n String output = environmentManager.runCommand(TestEnvironment.JOB_ADMIN_SERVER, \"String_Node_Str\" + TESTNAME + \"String_Node_Str\", new int[] { 0, 1 });\n final String finishedS = \"String_Node_Str\";\n Pattern finishedP = Pattern.compile(finishedS, Pattern.DOTALL);\n final Matcher matcher = finishedP.matcher(output);\n if (matcher.matches()) {\n total = matcher.group(1);\n return true;\n }\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n return false;\n}\n"
|
"public IStatus doAction() {\n try {\n IStructuredSelection selection = (TreeSelection) page.getTreeViewer().getSelection();\n XSDComponent xSDCom = null;\n if (selection.getFirstElement() instanceof Element) {\n TreePath tPath = ((TreeSelection) selection).getPaths()[0];\n for (int i = 0; i < tPath.getSegmentCount(); i++) {\n if (tPath.getSegment(i) instanceof XSDAnnotation)\n xSDCom = (XSDAnnotation) (tPath.getSegment(i));\n }\n } else\n xSDCom = (XSDComponent) selection.getFirstElement();\n XSDAnnotationsStructure struc = new XSDAnnotationsStructure(xSDCom);\n if (struc.getAnnotation() == null) {\n throw new RuntimeException(\"String_Node_Str\" + selection.getFirstElement().getClass().getName());\n }\n InputDialog id = new InputDialog(page.getSite().getShell(), \"String_Node_Str\", \"String_Node_Str\", struc.getSourceSystem(), new IInputValidator() {\n public String isValid(String newText) {\n return null;\n }\n });\n id.setBlockOnOpen(true);\n int ret = id.open();\n if (ret == Window.CANCEL) {\n return Status.CANCEL_STATUS;\n }\n struc.setSourceSystem(\"String_Node_Str\".equals(id.getValue()) ? null : id.getValue());\n if (struc.hasChanged()) {\n page.refresh();\n page.getTreeViewer().expandToLevel(selection.getFirstElement(), 2);\n page.markDirty();\n }\n } catch (Exception e) {\n e.printStackTrace();\n MessageDialog.openError(page.getSite().getShell(), \"String_Node_Str\", \"String_Node_Str\" + e.getLocalizedMessage());\n return Status.CANCEL_STATUS;\n }\n return Status.OK_STATUS;\n}\n"
|
"public void testReadValue() throws Exception {\n ObjectMapper mapper = new ObjectMapper();\n String json_str = \"String_Node_Str\";\n byte[] json_b = json_str.getBytes(\"String_Node_Str\");\n __POJO pojo = mapper.readValue(json_str, __POJO.class);\n pojo = mapper.readValue(json_b, __POJO.class);\n PluginTestVerifier verifier = PluginTestVerifierHolder.getInstance();\n verifier.printCache(System.out);\n verifier.printBlocks(System.out);\n Constructor<?> omConstructor = ObjectMapper.class.getConstructor(JsonFactory.class, DefaultSerializerProvider.class, DefaultDeserializationContext.class);\n Constructor<?> omConstructor1 = ObjectMapper.class.getConstructor();\n Method readval1 = ObjectMapper.class.getMethod(\"String_Node_Str\", String.class, Class.class);\n Method readval2 = ObjectMapper.class.getMethod(\"String_Node_Str\", byte[].class, Class.class);\n ExpectedAnnotation length = annotation(\"String_Node_Str\", 20);\n verifier.verifyApi(\"String_Node_Str\", omConstructor);\n verifier.verifyTraceBlock(BlockType.EVENT, \"String_Node_Str\", readval1, null, null, null, null, length);\n verifier.verifyTraceBlock(BlockType.EVENT, \"String_Node_Str\", readval2, null, null, null, null, length);\n verifier.verifyTraceBlockCount(0);\n}\n"
|
"public Aggregator<?, ?> reduction() {\n return aggregator;\n}\n"
|
"public String transform(String s) {\n return st.transform(s).toLowerCase();\n}\n"
|
"public List<NetworkACLItemVO> listByACL(long aclId) {\n SearchCriteria<NetworkACLItemVO> sc = AllFieldsSearch.create();\n sc.setParameters(\"String_Node_Str\", aclId);\n List<NetworkACLItemVO> list = listBy(sc);\n for (NetworkACLItemVO item : list) {\n loadCidrs(item);\n }\n return list;\n}\n"
|
"static void initGlobals(Looper looper) {\n synchronized (mSync) {\n if (sGlobals == null) {\n sGlobals = new Globals(looper);\n }\n }\n}\n"
|
"private void cleanSnow(SnipeData v, Location<World> targetBlock) {\n double brushSize = v.getBrushSize();\n double brushSizeSquared = brushSize * brushSize;\n int minx = GenericMath.floor(targetBlock.getBlockX() - brushSize);\n int maxx = GenericMath.floor(targetBlock.getBlockX() + brushSize) + 1;\n int miny = Math.max(GenericMath.floor(targetBlock.getBlockY() - brushSize), 0);\n int maxy = Math.min(GenericMath.floor(targetBlock.getBlockY() + brushSize) + 1, WORLD_HEIGHT);\n int minz = GenericMath.floor(targetBlock.getBlockZ() - brushSize);\n int maxz = GenericMath.floor(targetBlock.getBlockZ() + brushSize) + 1;\n if (miny <= 0) {\n miny = 1;\n }\n this.undo = new Undo(GenericMath.floor(Math.PI * (brushSize + 1) * (brushSize + 1) * (brushSize + 1) / 3));\n for (int x = minx; x <= maxx; x++) {\n double xs = (tx - x) * (tx - x);\n for (int z = minz; z <= maxz; z++) {\n double zs = (minz - z) * (minz - z);\n for (int y = maxy; y >= miny; y--) {\n double ys = (miny - y) * (miny - y);\n if (xs + ys + zs < brushSizeSquared) {\n BlockType below = this.world.getBlockType(x, y, z);\n if (below == BlockTypes.SNOW_LAYER || below == BlockTypes.AIR) {\n setBlockType(x, y, z, BlockTypes.AIR);\n }\n }\n }\n }\n }\n v.owner().storeUndo(this.undo);\n this.undo = null;\n}\n"
|
"public void addProbeInfo(ProbeMode mode, IProbeInfo probeInfo, EntityPlayer player, World world, IBlockState blockState, IProbeHitData data) {\n super.addProbeInfo(mode, probeInfo, player, world, blockState, data);\n TileEntity te = world.getTileEntity(data.getPos());\n if (te instanceof MatterTransmitterTileEntity) {\n MatterTransmitterTileEntity matterTransmitterTileEntity = (MatterTransmitterTileEntity) te;\n probeInfo.text(TextFormatting.GREEN + \"String_Node_Str\" + matterTransmitterTileEntity.getName());\n if (matterTransmitterTileEntity.isDialed()) {\n Integer teleportId = matterTransmitterTileEntity.getTeleportId();\n if (teleportId == null) {\n ReturnDestinationInfoHelper.id = null;\n } else {\n if (System.currentTimeMillis() - lastTime > 500) {\n lastTime = System.currentTimeMillis();\n RFToolsMessages.INSTANCE.sendToServer(new PacketGetDestinationInfo(teleportId));\n }\n }\n String name = \"String_Node_Str\";\n if (ReturnDestinationInfoHelper.id != null && ReturnDestinationInfoHelper.id == matterTransmitterTileEntity.getTeleportId()) {\n name = ReturnDestinationInfoHelper.name;\n }\n probeInfo.text(TextFormatting.YELLOW + \"String_Node_Str\" + name + \"String_Node_Str\");\n }\n if (matterTransmitterTileEntity.isOnce()) {\n probeInfo.text(TextFormatting.YELLOW + \"String_Node_Str\");\n }\n }\n}\n"
|
"public short[][] generateExtBlockSections(final World world, final Random r, final int cx, final int cz, final BiomeGrid biomes) {\n final int prime = 13;\n int h = 1;\n h = (prime * h) + cx;\n h = (prime * h) + cz;\n this.random.state = h;\n this.result = new short[256 / 16][];\n PlotWorld plotworld = PlotSquared.getPlotWorld(world.getName());\n Biome biome = Biome.valueOf(plotworld.PLOT_BIOME);\n if (ChunkManager.FORCE_PASTE) {\n X = cx << 4;\n Z = cz << 4;\n for (short x = 0; x < 16; x++) {\n for (short z = 0; z < 16; z++) {\n if (biomes != null) {\n biomes.setBiome(x, z, biome);\n }\n final PlotLoc loc = new PlotLoc((short) (X + x), (short) (Z + z));\n final HashMap<Short, Short> blocks = ChunkManager.GENERATE_BLOCKS.get(loc);\n for (final Entry<Short, Short> entry : blocks.entrySet()) {\n setBlock(x, entry.getKey(), z, entry.getValue());\n }\n }\n }\n return this.result;\n }\n generateChunk(world, ChunkManager.CURRENT_PLOT_CLEAR, random, cx, cz, biomes);\n if (ChunkManager.CURRENT_PLOT_CLEAR != null) {\n PlotLoc loc;\n for (Entry<PlotLoc, HashMap<Short, Short>> entry : ChunkManager.GENERATE_BLOCKS.entrySet()) {\n for (Entry<Short, Short> entry2 : entry.getValue().entrySet()) {\n loc = entry.getKey();\n setBlock(loc.x, entry2.getKey(), loc.z, entry2.getValue());\n }\n }\n }\n return result;\n}\n"
|
"private void handleDefaultPush(String from, Bundle data) {\n SimperiumUtils.configureSimperium(this, AccountHelper.getDefaultAccount().getAccessToken());\n long wpcomUserId = AccountHelper.getDefaultAccount().getUserId();\n String pushUserId = data.getString(PUSH_ARG_USER);\n if (!String.valueOf(wpcomUserId).equals(pushUserId)) {\n AppLog.e(T.NOTIFS, \"String_Node_Str\");\n return;\n }\n String noteType = StringUtils.notNullStr(data.getString(PUSH_ARG_TYPE));\n if (noteType.equals(PUSH_TYPE_PUSH_AUTH)) {\n handlePushAuth(from, data);\n return;\n }\n String title = StringEscapeUtils.unescapeHtml(data.getString(PUSH_ARG_TITLE));\n if (title == null) {\n title = getString(R.string.app_name);\n }\n String message = StringEscapeUtils.unescapeHtml(data.getString(PUSH_ARG_MSG));\n String noteId = data.getString(PUSH_ARG_NOTE_ID, \"String_Node_Str\");\n long thisTime = System.currentTimeMillis();\n if (mPreviousNoteId != null && mPreviousNoteId.equals(noteId)) {\n long seconds = TimeUnit.MILLISECONDS.toSeconds(thisTime - mPreviousNoteTime);\n if (seconds <= 1) {\n AppLog.w(T.NOTIFS, \"String_Node_Str\");\n return;\n }\n }\n mPreviousNoteId = noteId;\n mPreviousNoteTime = thisTime;\n int pushId = 0;\n for (Integer id : mActiveNotificationsMap.keySet()) {\n if (id == null) {\n continue;\n }\n Bundle noteBundle = mActiveNotificationsMap.get(id);\n if (noteBundle != null && noteBundle.getString(PUSH_ARG_NOTE_ID, \"String_Node_Str\").equals(noteId)) {\n pushId = id;\n mActiveNotificationsMap.put(pushId, data);\n break;\n }\n }\n if (pushId == 0) {\n pushId = PUSH_NOTIFICATION_ID + mActiveNotificationsMap.size();\n mActiveNotificationsMap.put(pushId, data);\n }\n String iconUrl = data.getString(\"String_Node_Str\");\n Bitmap largeIconBitmap = null;\n if (iconUrl != null) {\n try {\n iconUrl = URLDecoder.decode(iconUrl, \"String_Node_Str\");\n int largeIconSize = getResources().getDimensionPixelSize(android.R.dimen.notification_large_icon_height);\n String resizedUrl = PhotonUtils.getPhotonImageUrl(iconUrl, largeIconSize, largeIconSize);\n largeIconBitmap = ImageUtils.downloadBitmap(resizedUrl);\n if (largeIconBitmap != null && shouldCircularizeNoteIcon(noteType)) {\n largeIconBitmap = ImageUtils.getCircularBitmap(largeIconBitmap);\n }\n } catch (UnsupportedEncodingException e) {\n AppLog.e(T.NOTIFS, e);\n }\n }\n Map<String, String> properties = new HashMap<>();\n if (!TextUtils.isEmpty(noteType)) {\n if (noteType.equals(PUSH_TYPE_COMMENT)) {\n properties.put(\"String_Node_Str\", \"String_Node_Str\");\n } else {\n properties.put(\"String_Node_Str\", noteType);\n }\n }\n AnalyticsTracker.track(Stat.PUSH_NOTIFICATION_RECEIVED, properties);\n NotificationCompat.Builder builder;\n builder = new NotificationCompat.Builder(this).setSmallIcon(R.drawable.notification_icon).setColor(getResources().getColor(R.color.blue_wordpress)).setContentTitle(title).setContentText(message).setTicker(message).setAutoCancel(true).setStyle(new NotificationCompat.BigTextStyle().bigText(message)).setGroup(NOTIFICATION_GROUP_KEY);\n if (noteType.equals(PUSH_TYPE_COMMENT)) {\n Intent commentReplyIntent = new Intent(this, WPMainActivity.class);\n commentReplyIntent.putExtra(WPMainActivity.ARG_OPENED_FROM_PUSH, true);\n commentReplyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n commentReplyIntent.setAction(\"String_Node_Str\");\n commentReplyIntent.addCategory(\"String_Node_Str\");\n commentReplyIntent.addCategory(\"String_Node_Str\");\n commentReplyIntent.putExtra(NotificationsListFragment.NOTE_INSTANT_REPLY_EXTRA, true);\n if (noteId != null) {\n commentReplyIntent.putExtra(NotificationsListFragment.NOTE_ID_EXTRA, noteId);\n }\n PendingIntent commentReplyPendingIntent = PendingIntent.getActivity(this, 0, commentReplyIntent, PendingIntent.FLAG_CANCEL_CURRENT);\n builder.addAction(R.drawable.ic_reply_white_24dp, getText(R.string.reply), commentReplyPendingIntent);\n }\n if (largeIconBitmap != null) {\n builder.setLargeIcon(largeIconBitmap);\n }\n showNotificationForBuilder(builder, this, pushId);\n if (mActiveNotificationsMap.size() > 1) {\n NotificationCompat.InboxStyle inboxStyle = new NotificationCompat.InboxStyle();\n int noteCtr = 1;\n for (Bundle pushBundle : mActiveNotificationsMap.values()) {\n if (noteCtr > mMaxInboxItems) {\n break;\n }\n if (pushBundle == null || pushBundle.getString(PUSH_ARG_MSG) == null) {\n continue;\n }\n if (pushBundle.getString(PUSH_ARG_TYPE, \"String_Node_Str\").equals(PUSH_TYPE_COMMENT)) {\n String pnTitle = StringEscapeUtils.unescapeHtml((pushBundle.getString(PUSH_ARG_TITLE)));\n String pnMessage = StringEscapeUtils.unescapeHtml((pushBundle.getString(PUSH_ARG_MSG)));\n inboxStyle.addLine(pnTitle + \"String_Node_Str\" + pnMessage);\n } else {\n String pnMessage = StringEscapeUtils.unescapeHtml((pushBundle.getString(PUSH_ARG_MSG)));\n inboxStyle.addLine(pnMessage);\n }\n noteCtr++;\n }\n if (mActiveNotificationsMap.size() > mMaxInboxItems) {\n inboxStyle.setSummaryText(String.format(getString(R.string.more_notifications), mActiveNotificationsMap.size() - mMaxInboxItems));\n }\n String subject = String.format(getString(R.string.new_notifications), mActiveNotificationsMap.size());\n NotificationCompat.Builder groupBuilder = new NotificationCompat.Builder(this).setSmallIcon(R.drawable.notification_icon).setColor(getResources().getColor(R.color.blue_wordpress)).setGroup(NOTIFICATION_GROUP_KEY).setGroupSummary(true).setAutoCancel(true).setTicker(message).setContentTitle(getString(R.string.app_name)).setContentText(subject).setStyle(inboxStyle);\n showNotificationForBuilder(groupBuilder, this, GROUP_NOTIFICATION_ID);\n } else {\n builder.setGroupSummary(true);\n showNotificationForBuilder(builder, this, GROUP_NOTIFICATION_ID);\n }\n EventBus.getDefault().post(new NotificationEvents.NotificationsChanged());\n}\n"
|
"public Object evaluate(IResultRow resultRow) throws DataException {\n super.setData(resultRow);\n Context cx = Context.enter();\n try {\n return ScriptEvalUtil.evalExpr(expr, cx, scope, ScriptExpression.defaultID, 0);\n } catch (IJSObjectPopulator.InMatchDimensionIndicator e) {\n return null;\n } catch (BirtException e) {\n throw DataException.wrap(e);\n } finally {\n Context.exit();\n }\n}\n"
|
"private DatasetMeta getFromMds(DatasetId instance) throws Exception {\n DatasetSpecification spec = instanceManager.get(instance);\n if (spec == null) {\n throw new NotFoundException(instance);\n }\n spec = DatasetsUtil.fixOriginalProperties(spec);\n DatasetTypeId datasetTypeId = instance.getParent().datasetType(spec.getType());\n DatasetTypeMeta typeMeta = getTypeInfo(instance.getParent(), spec.getType());\n if (typeMeta == null) {\n throw new NotFoundException(datasetTypeId);\n }\n String ownerPrincipal = null;\n if (!NamespaceId.SYSTEM.equals(instance.getNamespaceId())) {\n ownerPrincipal = ownerAdmin.getOwnerPrincipal(instance);\n }\n return new DatasetMeta(spec, typeMeta, null, ownerPrincipal);\n}\n"
|
"public void processRow(String[] row) throws OseeCoreException {\n boolean isHeaderRow = false, foundDataType = false, isList, isNewRequirement = false;\n int rowIndex, documentIndex = -1, isRequirementIndex = -1, dataTypeIndex = -1;\n for (rowIndex = 0; rowIndex < row.length; rowIndex++) {\n RowTypeEnum rowType = rowIndexToRowTypeMap.get(rowIndex);\n if (rowType == RowTypeEnum.DOCUMENT_APPLICABILITY) {\n documentIndex = rowIndex;\n } else if (rowType == RowTypeEnum.IS_REQ) {\n isRequirementIndex = rowIndex;\n } else if (rowType == RowTypeEnum.DATA_TYPE) {\n dataTypeIndex = rowIndex;\n }\n }\n if (isRequirementIndex > -1) {\n String rowValue = row[isRequirementIndex].toLowerCase().trim();\n isNewRequirement = (rowValue.equals(\"String_Node_Str\"));\n } else if (dataTypeIndex > -1) {\n String rowValue = row[dataTypeIndex];\n isNewRequirement = rowValue.contains(REQUIREMENT_SUBSTRING);\n }\n inHeaderRow = (inHeaderRow && !isNewRequirement);\n if (documentIndex > -1) {\n String rowValue = row[documentIndex].toLowerCase().trim();\n boolean emptyValue = (rowValue.equals(\"String_Node_Str\") || rowValue.equals(\"String_Node_Str\") || rowValue.equals(\"String_Node_Str\") || rowValue.equals(\"String_Node_Str\"));\n if (inHeaderRow || emptyValue || isNewRequirement) {\n if (inArtifact || inHeaderRow) {\n processArtifact();\n publishInLine = !emptyValue;\n if (isNewRequirement) {\n numberRequirements++;\n }\n if (inHeaderRow) {\n mergeFirstRequirement();\n }\n if (emptyValue) {\n if (numberRequirements <= 1) {\n mergeFirstRequirement();\n }\n numberRequirements = 0;\n headerArtifact = null;\n }\n }\n inArtifact = false;\n isHeaderRow = emptyValue;\n inHeaderRow = isHeaderRow || (inHeaderRow && !isNewRequirement);\n isRequirement = false;\n } else {\n if (Strings.isValid(documentApplicability)) {\n if (rowValue.indexOf(documentApplicability.toLowerCase()) == -1) {\n return;\n }\n }\n inHeaderRow = (inHeaderRow && !isNewRequirement);\n }\n }\n if (!rowIndexToRowTypeMap.isEmpty()) {\n isList = false;\n int requirementIndex = -1;\n String requirementColumn = \"String_Node_Str\";\n boolean isRequirementColumn = false;\n for (rowIndex = 0; rowIndex < row.length; rowIndex++) {\n isRequirementColumn = false;\n RowTypeEnum rowType = rowIndexToRowTypeMap.get(rowIndex);\n String rowValue = row[rowIndex];\n switch(rowType) {\n case REQUIREMENTS:\n if (isHeaderRow) {\n String noHTML = clearHTML(rowValue);\n String[] parsed = noHTML.split(\"String_Node_Str\");\n boolean foundNumber = false;\n paragraphName = \"String_Node_Str\";\n for (int i = 0; i < parsed.length; i++) {\n if (!parsed[i].equals(\"String_Node_Str\")) {\n if (!foundNumber) {\n paragraphNumber = parsed[i].trim();\n foundNumber = true;\n } else {\n paragraphName += \"String_Node_Str\" + parsed[i].trim();\n }\n }\n }\n rowValue = \"String_Node_Str\";\n }\n requirementIndex = rowIndex;\n isRequirementColumn = true;\n requirementColumn = rowValue;\n break;\n case ID:\n break;\n case DOCUMENT_APPLICABILITY:\n break;\n case VERIFICATION_CRITERIA:\n break;\n case PARENT_ID:\n break;\n case GUID:\n guidString = GUID.checkOrCreate(rowValue.trim());\n if (Strings.isValid(guidString)) {\n postProcessGuids.add(guidString);\n }\n break;\n case IS_REQ:\n if (!foundDataType) {\n isRequirement = rowValue.trim().equals(\"String_Node_Str\");\n }\n break;\n case SUBSYSTEM:\n subsystem = rowValue.trim();\n break;\n case DATA_TYPE:\n foundDataType = true;\n DataTypeEnum dataType = DataTypeEnum.fromString(rowValue.trim());\n switch(dataType) {\n case HEADING:\n isRequirement = false;\n lastDataType = DataTypeEnum.HEADING;\n break;\n case REQUIREMENT:\n isRequirement = true;\n lastDataType = DataTypeEnum.REQUIREMENT;\n break;\n case TABLE:\n case INFORMATION:\n case FIGURE:\n isRequirement = lastDataType.equals(DataTypeEnum.REQUIREMENT);\n break;\n case NOT_DEFINED:\n isRequirement = lastDataType.equals(DataTypeEnum.REQUIREMENT);\n break;\n case LIST:\n isRequirement = lastDataType.equals(DataTypeEnum.REQUIREMENT);\n isList = true;\n break;\n case OTHER:\n foundDataType = false;\n lastDataType = DataTypeEnum.OTHER;\n break;\n }\n break;\n case OBJECT_NUMBER:\n if (!Strings.isValid(paragraphNumber)) {\n paragraphNumber = rowValue;\n }\n break;\n case PARAGRAPH_HEADING:\n String rowLower = rowValue.trim().toLowerCase();\n boolean emptyValue = (rowLower.equals(\"String_Node_Str\") || rowLower.equals(\"String_Node_Str\") || rowLower.equals(\"String_Node_Str\") || rowValue.equals(\"String_Node_Str\"));\n if (!inHeaderRow && !emptyValue) {\n paragraphName = rowValue.trim();\n }\n break;\n case CHANGE_STATUS:\n case OBJECT_HEADING:\n case OBJECT_TEXT:\n case CHANGE_RATIONALE:\n case LINKS:\n case OTHER:\n break;\n }\n if (!isRequirementColumn) {\n if (inArtifact) {\n ListIterator<String> iter = theArtifact.listIterator(rowIndex);\n String theColumnValue = iter.next();\n theColumnValue += \"String_Node_Str\" + rowValue.trim();\n iter.set(theColumnValue);\n } else {\n theArtifact.add(rowValue.trim());\n }\n } else {\n if (!inArtifact) {\n theArtifact.add(\"String_Node_Str\");\n }\n }\n }\n ListIterator<String> iter = theArtifact.listIterator(requirementIndex);\n String theColumnValue = iter.next();\n if (isList) {\n requirementColumn = processList(requirementColumn);\n }\n theColumnValue += \"String_Node_Str\" + requirementColumn.trim();\n iter.set(theColumnValue);\n }\n inArtifact = true;\n}\n"
|
"private byte[] decrypt(byte[] in, int inOff, int inLen) throws InvalidCipherTextException {\n byte[] c1 = new byte[curveLength * 2 + 1];\n System.arraycopy(in, inOff, c1, 0, c1.length);\n ECPoint c1P = ecParams.getCurve().decodePoint(c1);\n ECPoint s = c1P.multiply(ecParams.getH());\n if (s.isInfinity()) {\n throw new InvalidCipherTextException(\"String_Node_Str\");\n }\n c1P = c1P.multiply(((ECPrivateKeyParameters) ecKey).getD()).normalize();\n byte[] c2 = new byte[inLen - c1.length - digest.getDigestSize()];\n System.arraycopy(in, inOff + c1.length, c2, 0, c2.length);\n kdf(digest, c1P, c2);\n byte[] c3 = new byte[digest.getDigestSize()];\n addFieldElement(digest, c1P.getAffineXCoord());\n digest.update(c2, 0, c2.length);\n addFieldElement(digest, c1P.getAffineYCoord());\n digest.doFinal(c3, 0);\n int check = 0;\n for (int i = 0; i != c3.length; i++) {\n check |= c3[i] ^ in[inOff + c1.length + c2.length + i];\n }\n Arrays.fill(c1, (byte) 0);\n Arrays.fill(c3, (byte) 0);\n if (check != 0) {\n Arrays.fill(c2, (byte) 0);\n throw new InvalidCipherTextException(\"String_Node_Str\");\n }\n return c2;\n}\n"
|
"public String toXml(RelationOrderData data) throws OseeArgumentException {\n if (data == null) {\n throw new OseeArgumentException(\"String_Node_Str\");\n }\n StringBuilder sb = new StringBuilder();\n openRoot(sb);\n for (Entry<Pair<String, String>, Pair<String, List<String>>> entry : data.getOrderedEntrySet()) {\n writeEntry(sb, entry);\n sb.append(\"String_Node_Str\");\n }\n closeRoot(sb);\n return sb.toString();\n}\n"
|
"public static int slay(Player player, String[] args) {\n if (!player.canUseCommand(\"String_Node_Str\"))\n return EXIT_FAIL;\n if (!vMinecraftSettings.getInstance().cmdEzModo())\n return EXIT_FAIL;\n Player playerTarget = etc.getServer().matchPlayer(args[0]);\n if (playerTarget == null) {\n player.sendMessage(Colors.Rose + \"String_Node_Str\");\n return EXIT_SUCCESS;\n }\n if (vMinecraftSettings.getInstance().isEzModo(playerTarget.getName())) {\n player.sendMessage(Colors.Rose + \"String_Node_Str\" + \"String_Node_Str\");\n }\n playerTarget.setHealth(0);\n vMinecraftChat.gmsg(player, vMinecraftChat.getName(player) + Colors.LightBlue + \"String_Node_Str\" + vMinecraftChat.getName(playerTarget));\n return EXIT_SUCCESS;\n}\n"
|
"protected String getStringForQName(QName qName, MarshalRecord marshalRecord) {\n if (null == qName) {\n return null;\n }\n String namespaceURI = qName.getNamespaceURI();\n if (null == namespaceURI || 0 == namespaceURI.length()) {\n return qName.getLocalPart();\n } else {\n NamespaceResolver namespaceResolver = marshalRecord.getNamespaceResolver();\n if (namespaceResolver == null) {\n throw XMLMarshalException.namespaceResolverNotSpecified(namespaceURI);\n }\n if (namespaceURI.equals(namespaceResolver.getDefaultNamespaceURI())) {\n return qName.getLocalPart();\n }\n String prefix = namespaceResolver.resolveNamespaceURI(namespaceURI);\n if (null == prefix) {\n prefix = namespaceResolver.generatePrefix();\n marshalRecord.attribute(XMLConstants.XMLNS_URL, prefix, XMLConstants.XMLNS + XMLConstants.COLON + prefix, namespaceURI);\n }\n return prefix + XMLConstants.COLON + qName.getLocalPart();\n }\n}\n"
|
"protected void beforeUpdate(AuthenticatedUser user, ConnectionModel model) throws GuacamoleException {\n super.beforeUpdate(user, model);\n if (model.getName() == null || model.getName().trim().isEmpty())\n throw new GuacamoleClientException(\"String_Node_Str\");\n ConnectionModel existing = connectionMapper.selectOneByName(model.getParentIdentifier(), model.getName());\n if (existing != null) {\n if (!existing.getObjectID().equals(model.getObjectID()))\n throw new GuacamoleClientException(\"String_Node_Str\" + model.getName() + \"String_Node_Str\");\n }\n}\n"
|
"final K key() {\n if (keyRef instanceof KeyReference)\n return ((Reference<K>) keyRef).get();\n return (K) keyRef;\n}\n"
|
"private void createParameters() {\n if (contentPane != null && !contentPane.isDisposed()) {\n contentPane.dispose();\n }\n contentPane = new Composite(scrollPane, SWT.NONE);\n scrollPane.setContent(contentPane);\n contentPane.setLayoutData(new GridData(GridData.FILL_BOTH));\n contentPane.setLayout(new GridLayout());\n createParametersSection(params, contentPane);\n scrollPane.setMinSize(contentPane.computeSize(400, SWT.DEFAULT));\n}\n"
|
"public String getStreetName() {\n return street_name;\n}\n"
|
"protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n Resources res = getResources();\n mRecyclerView = (RecyclerView) findViewById(R.id.recycler_view);\n mRecyclerView.setLayoutManager(new GridLayoutManager(this, res.getInteger(R.integer.num_columns)));\n mRecyclerView.setAdapter(new CardAdapter());\n setExitSharedElementCallback(mCallback);\n}\n"
|
"public void process() {\n PerformanceMonitor.startActivity(\"String_Node_Str\");\n readOnlyGBufferFBO.bind();\n readOnlyGBufferFBO.setRenderBufferMask(true, false, false);\n glCallList(skySphere);\n sceneOpaqueFbo.setRenderBufferMask(true, true, true);\n PerformanceMonitor.endActivity();\n}\n"
|
"private String singleModeMapFilename(String cssFileName, boolean generateSourceMap) {\n return !generateSourceMap || cssFileName == null ? null : FileSystemUtils.addSuffix(cssFileName, Constants.SOURCE_MAP_SUFFIX);\n}\n"
|
"public int getOptions() {\n if (_opts == null) {\n if (_comp != null)\n _opts = ((ComponentCtrl) _comp).getClientEvents().get(_cmd);\n if (_opts == null)\n _opts = new Integer(0);\n }\n return _opts.intValue();\n}\n"
|
"public void stop() {\n float dt = (System.nanoTime() - timestamp) / 1000000f;\n if (verbose)\n System.out.println(\"String_Node_Str\");\n for (VirtualClient vc : clients) vc.stop();\n int sum = 0;\n int sumTimeout = 0;\n IntArray latencies = new IntArray();\n for (int i = 0; i < clients.size(); i++) {\n VirtualClient client = clients.get(i);\n int count = client.getCount();\n int lost = client.getTimeouts();\n for (int lat : client.getLatencies()) {\n latencies.add(lat);\n }\n sum += count;\n sumTimeout += lost;\n if (verbose)\n System.out.format(\"String_Node_Str\", i, count, lost, (int) (count * 1000L / dt));\n }\n float throughput = (sum * 1000L) / dt;\n int[] lats = latencies.getArray();\n long latsum = 0;\n for (int l : lats) latsum += l;\n double mean = (double) latsum / lats.length;\n double temp = 0;\n for (int l : lats) temp += (mean - l) * (mean - l);\n double var = Math.sqrt(temp / lats.length);\n if (lats.length > 0) {\n Arrays.sort(lats);\n int q50 = lats[(int) (lats.length / 2)];\n int q66 = lats[(int) (lats.length * 2L / 3)];\n int q75 = lats[(int) (lats.length * 3L / 4)];\n int q80 = lats[(int) (lats.length * 4L / 5)];\n int q90 = lats[(int) (lats.length * 9L / 10)];\n int q95 = lats[(int) (lats.length * 19L / 20)];\n int q98 = lats[(int) (lats.length * 98L / 100)];\n int q99 = lats[(int) (lats.length * 99L / 100)];\n int q100 = lats[lats.length - 1];\n log.format(\"String_Node_Str\", sumTimeout, count, dt / 1000f, sum, throughput, q50, q66, q75, q80, q90, q95, q98, q99, q100, var);\n } else {\n log.format(\"String_Node_Str\", count, dt / 1000f, sum, sumTimeout, throughput, uri.toString());\n }\n}\n"
|
"private void resume() {\n if (!resumed) {\n resumed = true;\n onResume();\n }\n}\n"
|
"public static org.talend.core.model.metadata.builder.connection.MetadataColumn convertFromAvro(Schema.Field field) {\n org.talend.core.model.metadata.builder.connection.MetadataColumn col = ConnectionFactory.eINSTANCE.createMetadataColumn();\n Schema in = field.schema();\n col.setId(field.name());\n col.setLabel(field.name());\n col.setName(field.name());\n Schema nonnullable = AvroUtils.unwrapIfNullable(in);\n if (AvroTypes.isSameType(nonnullable, AvroTypes._boolean())) {\n col.setTalendType(JavaTypesManager.BOOLEAN.getId());\n } else if (AvroTypes.isSameType(nonnullable, AvroTypes._byte())) {\n col.setTalendType(JavaTypesManager.BYTE.getId());\n } else if (AvroTypes.isSameType(nonnullable, AvroTypes._bytes())) {\n col.setTalendType(JavaTypesManager.BYTE_ARRAY.getId());\n } else if (AvroTypes.isSameType(nonnullable, AvroTypes._character())) {\n col.setTalendType(JavaTypesManager.CHARACTER.getId());\n } else if (AvroTypes.isSameType(nonnullable, AvroTypes._date())) {\n col.setTalendType(JavaTypesManager.DATE.getId());\n } else if (AvroTypes.isSameType(nonnullable, AvroTypes._decimal())) {\n col.setTalendType(JavaTypesManager.BIGDECIMAL.getId());\n } else if (AvroTypes.isSameType(nonnullable, AvroTypes._double())) {\n col.setTalendType(JavaTypesManager.DOUBLE.getId());\n } else if (AvroTypes.isSameType(nonnullable, AvroTypes._float())) {\n col.setTalendType(JavaTypesManager.FLOAT.getId());\n } else if (AvroTypes.isSameType(nonnullable, AvroTypes._int())) {\n col.setTalendType(JavaTypesManager.INTEGER.getId());\n } else if (AvroTypes.isSameType(nonnullable, AvroTypes._long())) {\n col.setTalendType(JavaTypesManager.LONG.getId());\n } else if (AvroTypes.isSameType(nonnullable, AvroTypes._short())) {\n col.setTalendType(JavaTypesManager.SHORT.getId());\n } else if (AvroTypes.isSameType(nonnullable, AvroTypes._string())) {\n col.setTalendType(JavaTypesManager.STRING.getId());\n }\n col.setNullable(AvroUtils.isNullable(in));\n String prop;\n if (null != (prop = field.getProp(Talend6SchemaConstants.TALEND6_ID))) {\n col.setId(prop);\n }\n if (null != (prop = field.getProp(Talend6SchemaConstants.TALEND6_COMMENT))) {\n col.setComment(prop);\n }\n if (null != (prop = field.getProp(Talend6SchemaConstants.TALEND6_LABEL))) {\n col.setLabel(null);\n }\n if (null != (prop = field.getProp(Talend6SchemaConstants.TALEND6_IS_READ_ONLY))) {\n col.setReadOnly(Boolean.parseBoolean(prop));\n }\n for (String key : field.getJsonProps().keySet()) {\n if (key.startsWith(Talend6SchemaConstants.TALEND6_ADDITIONAL_PROPERTIES)) {\n String originalKey = key.substring(Talend6SchemaConstants.TALEND6_ADDITIONAL_PROPERTIES.length());\n TaggedValue tv = TaggedValueHelper.createTaggedValue(originalKey, field.getProp(key));\n col.getTaggedValue().add(tv);\n }\n }\n if (null != (prop = field.getProp(Talend6SchemaConstants.TALEND6_COLUMN_IS_KEY))) {\n col.setKey(Boolean.parseBoolean(prop));\n }\n if (null != (prop = field.getProp(Talend6SchemaConstants.TALEND6_COLUMN_SOURCE_TYPE))) {\n col.setSourceType(prop);\n }\n if (null != (prop = field.getProp(Talend6SchemaConstants.TALEND6_COLUMN_TALEND_TYPE))) {\n col.setTalendType(prop);\n }\n if (null != (prop = field.getProp(Talend6SchemaConstants.TALEND6_COLUMN_PATTERN))) {\n col.setPattern(TalendQuoteUtils.addQuotesIfNotExist(prop));\n }\n if (null != (prop = field.getProp(Talend6SchemaConstants.TALEND6_COLUMN_LENGTH))) {\n Long value = Long.parseLong(prop);\n col.setLength(value > 0 ? value : -1);\n }\n if (null != (prop = field.getProp(Talend6SchemaConstants.TALEND6_COLUMN_ORIGINAL_LENGTH))) {\n Long value = Long.parseLong(prop);\n col.setOriginalLength(value > 0 ? value : -1);\n }\n if (null != (prop = field.getProp(Talend6SchemaConstants.TALEND6_COLUMN_IS_NULLABLE))) {\n col.setNullable(Boolean.parseBoolean(prop));\n }\n if (null != (prop = field.getProp(Talend6SchemaConstants.TALEND6_COLUMN_PRECISION))) {\n Long value = Long.parseLong(prop);\n col.setPrecision(value > 0 ? value : -1);\n }\n if (null != (prop = field.getProp(Talend6SchemaConstants.TALEND6_COLUMN_DEFAULT))) {\n col.setDefaultValue(prop);\n }\n if (null != (prop = field.getProp(Talend6SchemaConstants.TALEND6_COLUMN_ORIGINAL_DB_COLUMN_NAME))) {\n col.setName(prop);\n }\n if (null != (prop = field.getProp(Talend6SchemaConstants.TALEND6_COLUMN_RELATED_ENTITY))) {\n col.setRelatedEntity(prop);\n }\n if (null != (prop = field.getProp(Talend6SchemaConstants.TALEND6_COLUMN_RELATIONSHIP_TYPE))) {\n col.setRelationshipType(prop);\n }\n if (col.getTalendType() == null) {\n throw new UnsupportedOperationException(\"String_Node_Str\" + in);\n }\n return col;\n}\n"
|
"public void Setup(EntityPlayer Player, ItemStack Item) {\n Decoration = ItemCarriage.GetDecorationBlock(Item);\n DecorationMeta = ItemCarriage.GetDecorationMeta(Item);\n}\n"
|
"public String toString() {\n return value;\n}\n"
|
"private void setupChart(LineChart chart, LineData data, int color) {\n chart.setDrawBorder(false);\n chart.setDescription(\"String_Node_Str\");\n chart.setNoDataTextDescription(\"String_Node_Str\");\n chart.setDrawGridBackground(false);\n chart.setGridWidth(1.25f);\n chart.setTouchEnabled(true);\n chart.setDragEnabled(true);\n chart.setScaleEnabled(true);\n chart.setPinchZoom(false);\n chart.setBackgroundColor(color);\n chart.setValueTypeface(mTf);\n chart.setData(data);\n Legend l = chart.getLegend();\n l.setForm(LegendForm.CIRCLE);\n l.setFormSize(6f);\n l.setTextColor(Color.WHITE);\n l.setTypeface(mTf);\n YAxis leftAxis = chart.getAxisLeft();\n leftAxis.setTextColor(Color.WHITE);\n leftAxis.setTypeface(mTf);\n leftAxis.setLabelCount(4);\n leftAxis.setDrawGridLines(false);\n chart.getAxisRight().setEnabled(false);\n XAxis x = chart.getXAxis();\n x.setTextColor(Color.WHITE);\n x.setTypeface(mTf);\n x.setDrawGridLines(false);\n chart.animateX(2500);\n}\n"
|
"ActivityStack moveTaskToStackUncheckedLocked(TaskRecord task, int stackId, boolean toTop, boolean forceFocus, String reason) {\n if (StackId.isMultiWindowStack(stackId) && !mService.mSupportsMultiWindow) {\n throw new IllegalStateException(\"String_Node_Str\" + \"String_Node_Str\" + task + \"String_Node_Str\" + stackId);\n }\n final ActivityRecord r = task.topRunningActivityLocked();\n final ActivityStack prevStack = task.stack;\n final boolean wasFocused = isFocusedStack(prevStack) && (topRunningActivityLocked() == r);\n final boolean wasResumed = prevStack.mResumedActivity == r;\n final boolean wasFront = isFrontStack(prevStack) && (prevStack.topRunningActivityLocked() == r);\n if (stackId == DOCKED_STACK_ID && !task.isResizeable()) {\n stackId = (prevStack != null) ? prevStack.mStackId : FULLSCREEN_WORKSPACE_STACK_ID;\n Slog.w(TAG, \"String_Node_Str\" + task + \"String_Node_Str\" + stackId + \"String_Node_Str\");\n }\n task.mTemporarilyUnresizable = true;\n final ActivityStack stack = getStack(stackId, CREATE_IF_NEEDED, toTop);\n task.mTemporarilyUnresizable = false;\n mWindowManager.moveTaskToStack(task.taskId, stack.mStackId, toTop);\n stack.addTask(task, toTop, reason);\n stack.moveToFrontAndResumeStateIfNeeded(r, forceFocus || wasFocused || wasFront, wasResumed, reason);\n return stack;\n}\n"
|
"public void execute() throws MojoExecutionException {\n final CoverageGenerator gen = new CoverageGenerator(baseDir, includes, excludes, outputDir);\n gen.setOutputInstrumentedFiles(outputInstrumentedFiles);\n gen.setCacheInstrumentedCode(cacheInstrumentedCode);\n gen.setNoInstrumentPatterns(noInstrumentPatterns);\n gen.setOutputStrategy(outputStrategy);\n gen.setThreadCount(threadCount);\n try {\n final CoverageGenerator gen = new CoverageGenerator(baseDir, includes, excludes, outputDir);\n gen.setOutputInstrumentedFiles(outputInstrumentedFiles);\n gen.setCacheInstrumentedCode(cacheInstrumentedCode);\n gen.setNoInstrumentPatterns(noInstrumentPatterns);\n gen.setOutputStrategy(outputStrategy);\n gen.setThreadCount(threadCount);\n try {\n gen.run();\n } catch (final IOException e) {\n throw new MojoExecutionException(\"String_Node_Str\", e);\n }\n } catch (final IllegalArgumentException e) {\n throw new MojoExecutionException(\"String_Node_Str\", e);\n }\n}\n"
|
"public static URL[] parseURLs(String paths) {\n ArrayList urls = new ArrayList();\n if (paths != null && paths.trim().length() > 0) {\n String[] classpaths = paths.split(PROPERTYSEPARATOR, -1);\n if (classpaths != null && classpaths.length != 0) {\n for (int j = 0; j < classpaths.length; j++) {\n File file = new File(classpaths[j]);\n try {\n urls.add(file.toURL());\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n }\n }\n }\n URL[] oUrls = new URL[urls.size()];\n urls.toArray(oUrls);\n return oUrls;\n}\n"
|
"public void notifyConnectionStateUpdate(INetworkManager.NetworkConnectionState state) {\n switch(state) {\n case CONNECTED_TO_CUBE:\n userIface.setSessionStateIcon(ConnectionIcon.CONNECTED);\n break;\n case CONNECTED_TO_CUBE_BY_VPN:\n userIface.setSessionStateIcon(ConnectionIcon.CONNECTED_VPN);\n break;\n case NOT_CONNECTED:\n userIface.setSessionStateIcon(ConnectionIcon.NOT_CONNECTED);\n break;\n case CONNECTING_VPN:\n userIface.setSessionStateIcon(ConnectionIcon.CONNECTING_VPN);\n break;\n case CONNECTING:\n userIface.setSessionStateIcon(ConnectionIcon.CONNECTING);\n break;\n }\n lastState = state;\n}\n"
|
"protected Messages.DirectCommand getDirectCommand() {\n Messages.DirectCommand.Builder builder = Messages.DirectCommand.newBuilder();\n if (null != message) {\n builder.setMsg(message);\n }\n builder.setCid(conversationId);\n if (mentionAll) {\n builder.setMentionAll(mentionAll);\n }\n if (null != mentionList && mentionList.size() > 0) {\n builder.addAllMentionPids(mentionList);\n }\n if (null != messageOption) {\n if (messageOption.isReceipt()) {\n builder.setR(true);\n }\n if (messageOption.isTransient()) {\n builder.setTransient(true);\n }\n String pushData = messageOption.getPushData();\n if (!AVUtils.isBlankString(pushData)) {\n builder.setPushData(pushData);\n }\n if (messageOption.isWill()) {\n builder.setWill(true);\n }\n }\n if (!AVUtils.isBlankString(messageToken)) {\n builder.setDt(messageToken);\n }\n if (null != binaryMessage) {\n builder.setBinaryMsg(binaryMessage);\n }\n return builder.build();\n}\n"
|
"protected Object getShadowVariable0(AbstractComponent baseChild, String name, boolean recurse) {\n Object val = getAttribute(name);\n if (val != null || hasAttribute(name))\n return val;\n if (!(this instanceof ShadowElement)) {\n ComponentCtrl ctrl = this;\n List<HtmlShadowElement> shadowRoots = ctrl.getShadowRoots();\n if (!shadowRoots.isEmpty()) {\n Map<Component, Integer> indexCacheMap = getIndexCacheMap();\n try {\n if (indexCacheMap != null) {\n destroyIndexCacheMap();\n }\n initIndexCacheMap();\n for (HtmlShadowElement shadow : shadowRoots) {\n val = shadow.resolveVariable(baseChild, name, recurse);\n if (val != null)\n return val;\n }\n } finally {\n ShadowElementsCtrl.setDistributedIndexInfo(indexCacheMap);\n }\n }\n }\n if (recurse) {\n if (_parent != null)\n return _parent.getShadowVariable0(this, name, recurse);\n if (this instanceof ShadowElement) {\n AbstractComponent shadowHost = (AbstractComponent) ((ShadowElement) this).getShadowHost();\n if (shadowHost != null) {\n if (shadowHost._variableSeeking) {\n if (shadowHost.getParent() != null) {\n return ((AbstractComponent) shadowHost.getParent()).getShadowVariable(name, recurse);\n }\n return null;\n }\n return shadowHost.getShadowVariable(name, recurse);\n }\n }\n }\n return null;\n}\n"
|
"public void handleAction(Object context) throws ApplicationException {\n String kontoid;\n try {\n kontoid = askUserForKonto();\n } catch (Exception e1) {\n e1.printStackTrace();\n Logger.error(\"String_Node_Str\", e1);\n return;\n }\n ArrayList<FeldDefinitionen> fd = new ArrayList<FeldDefinitionen>();\n fd.add(new FeldDefinitionen(\"String_Node_Str\", java.util.Date.class, \"String_Node_Str\", true));\n fd.add(new FeldDefinitionen(\"String_Node_Str\", String.class, \"String_Node_Str\", false));\n fd.add(new FeldDefinitionen(\"String_Node_Str\", String.class, \"String_Node_Str\", false));\n fd.add(new FeldDefinitionen(\"String_Node_Str\", String.class, \"String_Node_Str\", false));\n fd.add(new FeldDefinitionen(\"String_Node_Str\", BigDecimal.class, \"String_Node_Str\", true));\n fd.add(new FeldDefinitionen(\"String_Node_Str\", BigDecimalWithCurrency.class, \"String_Node_Str\", false));\n fd.add(new FeldDefinitionen(\"String_Node_Str\", Currency.class, \"String_Node_Str\", false));\n fd.add(new FeldDefinitionen(\"String_Node_Str\", BigDecimalWithCurrency.class, \"String_Node_Str\", false));\n fd.add(new FeldDefinitionen(\"String_Node_Str\", Currency.class, \"String_Node_Str\", false));\n List<GenericObjectHashMap> daten;\n try {\n CSVImportHelper csv = new CSVImportHelper(\"String_Node_Str\" + kontoid);\n daten = csv.run(fd);\n } catch (Exception e) {\n Logger.error(\"String_Node_Str\", e);\n throw new ApplicationException(e);\n }\n if (daten == null) {\n return;\n }\n String fehlt = \"String_Node_Str\";\n try {\n for (GenericObjectHashMap x : daten) {\n for (FeldDefinitionen f : fd) {\n Object value = x.getAttribute(f.getAttr());\n if (f.isRequired() && value.toString().isEmpty()) {\n fehlt += \"String_Node_Str\" + f.getBeschreibung();\n }\n if (value instanceof BigDecimalWithCurrency) {\n BigDecimalWithCurrency b = (BigDecimalWithCurrency) value;\n x.setAttribute(f.getAttr(), b.getZahl());\n x.setAttribute(f.getAttr() + \"String_Node_Str\", b.getWaehrung());\n }\n }\n if (x.getAttribute(\"String_Node_Str\").toString().isEmpty() && x.getAttribute(\"String_Node_Str\").toString().isEmpty()) {\n fehlt += \"String_Node_Str\";\n }\n if (x.getAttribute(\"String_Node_Str\").toString().isEmpty() && x.getAttribute(\"String_Node_Str\").toString().isEmpty()) {\n fehlt += \"String_Node_Str\";\n }\n if (x.getAttribute(\"String_Node_Str\").toString().isEmpty()) {\n x.setAttribute(\"String_Node_Str\", x.getAttribute(\"String_Node_Str\"));\n }\n if (x.getAttribute(\"String_Node_Str\").toString().isEmpty()) {\n x.setAttribute(\"String_Node_Str\", x.getAttribute(\"String_Node_Str\"));\n }\n if (x.getAttribute(\"String_Node_Str\").toString().isEmpty() && !x.getAttribute(\"String_Node_Str\").toString().isEmpty()) {\n BigDecimal d = ((BigDecimal) x.getAttribute(\"String_Node_Str\")).divide((BigDecimal) x.getAttribute(\"String_Node_Str\"), 5, RoundingMode.HALF_UP);\n x.setAttribute(\"String_Node_Str\", d);\n }\n if (!x.getAttribute(\"String_Node_Str\").toString().isEmpty() && x.getAttribute(\"String_Node_Str\").toString().isEmpty()) {\n BigDecimal d = ((BigDecimal) x.getAttribute(\"String_Node_Str\")).multiply((BigDecimal) x.getAttribute(\"String_Node_Str\"));\n x.setAttribute(\"String_Node_Str\", d);\n }\n for (FeldDefinitionen f : fd) {\n if (f.getAttr().equals(\"String_Node_Str\")) {\n continue;\n }\n if (f.getAttr().equals(\"String_Node_Str\")) {\n continue;\n }\n if (f.getAttr().equals(\"String_Node_Str\")) {\n continue;\n }\n if (x.getAttribute(f.getAttr()).toString().isEmpty()) {\n fehlt += \"String_Node_Str\" + f.getBeschreibung();\n }\n }\n if (!fehlt.isEmpty()) {\n Logger.error(\"String_Node_Str\" + fehlt);\n throw new ApplicationException(\"String_Node_Str\" + fehlt.substring(1));\n }\n }\n Konto konto = Utils.getKontoByID(kontoid);\n UmsatzeAusBestandsAenderung umsaetzeAusBestaenden = new UmsatzeAusBestandsAenderung(konto);\n Utils.clearBestand(konto);\n for (GenericObjectHashMap x : daten) {\n Object kursW = x.getAttribute(\"String_Node_Str\");\n Object wertW = x.getAttribute(\"String_Node_Str\");\n Utils.addBestand(Utils.getORcreateWKN((String) x.getAttribute(\"String_Node_Str\"), (String) x.getAttribute(\"String_Node_Str\"), (String) x.getAttribute(\"String_Node_Str\")), konto, ((BigDecimal) x.getAttribute(\"String_Node_Str\")).doubleValue(), ((BigDecimal) x.getAttribute(\"String_Node_Str\")).doubleValue(), handleCurrency(kursW), ((BigDecimal) x.getAttribute(\"String_Node_Str\")).doubleValue(), handleCurrency(wertW), (Date) x.getAttribute(\"String_Node_Str\"), (Date) x.getAttribute(\"String_Node_Str\"));\n }\n umsaetzeAusBestaenden.erzeugeUmsaetze();\n } catch (RemoteException e) {\n throw new ApplicationException(e);\n }\n Application.getMessagingFactory().sendMessage(new StatusBarMessage(Application.getI18n().tr(\"String_Node_Str\"), StatusBarMessage.TYPE_INFO));\n}\n"
|
"public boolean apply(Game game, Ability source) {\n Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source));\n if (spell == null) {\n spell = (Spell) game.getLastKnownInformation(targetPointer.getFirst(game, source), Zone.STACK);\n }\n Player controller = game.getPlayer(source.getControllerId());\n if (spell != null && controller != null) {\n Target usedTarget = null;\n setUsedTarget: for (Ability ability : spell.getSpellAbilities()) {\n for (Mode mode : ability.getModes().getSelectedModes()) {\n for (Target target : mode.getTargets()) {\n if (!target.isNotTarget() && target.getFirstTarget().equals(source.getSourceId())) {\n usedTarget = target.copy();\n usedTarget.clearChosen();\n break setUsedTarget;\n }\n }\n }\n }\n if (usedTarget == null) {\n return false;\n }\n for (Permanent creature : game.getState().getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), source.getControllerId(), game)) {\n if (!creature.getId().equals(source.getSourceId()) && usedTarget.canTarget(source.getControllerId(), creature.getId(), source, game)) {\n Spell copy = spell.copySpell(source.getControllerId());\n game.getStack().push(copy);\n setTarget: for (Mode mode : copy.getSpellAbility().getModes().getSelectedModes()) {\n for (Target target : mode.getTargets()) {\n if (target.getClass().equals(usedTarget.getClass())) {\n target.clearChosen();\n if (target.getMessage().equals(usedTarget.getMessage())) {\n target.add(creature.getId(), game);\n break setTarget;\n }\n }\n }\n }\n game.getStack().push(copy);\n String activateMessage = copy.getActivatedMessage(game);\n if (activateMessage.startsWith(\"String_Node_Str\")) {\n activateMessage = activateMessage.substring(6);\n }\n if (!game.isSimulation()) {\n game.informPlayers(controller.getLogName() + activateMessage);\n }\n }\n }\n return true;\n }\n return false;\n}\n"
|
"public RemoteFile create(RemoteFile parent, LocalFile local) {\n try {\n if (local.getName() == null)\n throw new NullPointerException(\"String_Node_Str\");\n InputStream input = getApiFactory().createInputStream(local.getFile());\n getDropboxApi().putFile(Path.combine(parent, local.getName()), input, local.getFile().length(), null, null);\n safeClose(input);\n return get(local.getName());\n } catch (Exception e) {\n return null;\n }\n}\n"
|
"public boolean isPatch() {\n return getHead().isPatchVersion();\n}\n"
|
"private synchronized boolean process(Long blockId, int blockHeight, int blockTime, boolean apply, boolean scanning) throws NotValidException {\n if (blockTime < timeNext) {\n return true;\n }\n Account sender = Account.getAccount(senderId);\n Account recipient = Account.getAccount(recipientId);\n long totalAmountNQT = Convert.safeAdd(amountNQT, Convert.safeDivide(Constants.ONE_NXT, 10L));\n if (sender.getBalanceNQT() < totalAmountNQT) {\n return false;\n }\n if (apply) {\n sender.addToBalanceAndUnconfirmedBalanceNQT(-totalAmountNQT);\n recipient.addToBalanceAndUnconfirmedBalanceNQT(amountNQT);\n timeLast = timeNext;\n timeNext += frequency;\n if (!scanning) {\n Attachment.AbstractAttachment attachment = new Attachment.AdvancedPaymentSubscriptionPayment(id);\n TransactionImpl.BuilderImpl builder = new TransactionImpl.BuilderImpl((byte) 1, sender.getPublicKey(), amountNQT, Convert.safeDivide(Constants.ONE_NXT, 10L), timeLast, (short) 1440, attachment);\n builder.senderId(senderId).recipientId(recipientId).referencedTransactionFullHash((String) null).signature(null).blockId(blockId).height(blockHeight).id(null).senderId(null).blockTimestamp(blockTime).fullHash((String) null).ecBlockHeight(0).ecBlockId(0L);\n TransactionImpl transaction = builder.build();\n paymentTransactions.add(transaction);\n }\n }\n return true;\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.