content
stringlengths 40
137k
|
---|
"public void receivedByte(byte data) {\n if (DEBUG)\n log(\"String_Node_Str\" + Utils.hex8(data) + \"String_Node_Str\" + stateMachine + \"String_Node_Str\" + zeroSymbols + ((stateMachine == RadioState.RX_SFD_SEARCH || stateMachine == RadioState.RX_FRAME) ? \"String_Node_Str\" : \"String_Node_Str\"));\n if (stateMachine == RadioState.RX_SFD_SEARCH) {\n if (data == 0) {\n zeroSymbols++;\n } else if (zeroSymbols >= 4 && data == 0x7A) {\n setSFD(true);\n if (DEBUG)\n log(\"String_Node_Str\");\n setState(RadioState.RX_FRAME);\n } else {\n zeroSymbols = 0;\n }\n } else if (stateMachine == RadioState.RX_FRAME) {\n if (overflow) {\n } else if (rxFIFO.isFull()) {\n setRxOverflow();\n } else {\n if (!frameRejected) {\n rxFIFO.write(data);\n if (rxread == 0) {\n rxCrc.setCRC(0);\n rxlen = data & 0xff;\n decodeAddress = false;\n if (DEBUG)\n log(\"String_Node_Str\" + rxlen);\n setFIFO(true);\n } else if (rxread < rxlen - 1) {\n rxCrc.addBitrev(data & 0xff);\n if (rxread == 1) {\n fcf0 = data & 0xff;\n frameType = fcf0 & FRAME_TYPE;\n } else if (rxread == 2) {\n fcf1 = data & 0xff;\n decodeAddress = addressDecode;\n if (frameType == TYPE_DATA_FRAME) {\n ackRequest = (fcf0 & ACK_REQUEST) > 0;\n destinationAddressMode = (fcf1 >> 2) & 3;\n if (addressDecode && destinationAddressMode != LONG_ADDRESS && destinationAddressMode != SHORT_ADDRESS) {\n rejectFrame();\n }\n } else if (frameType == TYPE_BEACON_FRAME || frameType == TYPE_ACK_FRAME) {\n decodeAddress = false;\n ackRequest = false;\n } else if (addressDecode) {\n rejectFrame();\n }\n } else if (rxread == 3) {\n dsn = data & 0xff;\n } else if (decodeAddress) {\n boolean flushPacket = false;\n if (destinationAddressMode == LONG_ADDRESS && rxread == 8 + 5) {\n flushPacket = !rxFIFO.tailEquals(memory, RAM_IEEEADDR, 8);\n flushPacket |= !rxFIFO.tailEquals(memory, RAM_PANID, 2, 8);\n decodeAddress = false;\n } else if (destinationAddressMode == SHORT_ADDRESS && rxread == 2 + 5) {\n flushPacket = !rxFIFO.tailEquals(BC_ADDRESS, 0, 2) && !rxFIFO.tailEquals(memory, RAM_SHORTADDR, 2);\n flushPacket |= !rxFIFO.tailEquals(memory, RAM_PANID, 2, 2);\n decodeAddress = false;\n }\n if (flushPacket) {\n rejectFrame();\n }\n }\n }\n }\n if (rxread++ == rxlen) {\n if (frameRejected) {\n log(\"String_Node_Str\");\n setSFD(false);\n setState(RadioState.RX_WAIT);\n return;\n }\n int crc = rxFIFO.get(-2) << 8;\n crc += rxFIFO.get(-1);\n crcOk = crc == rxCrc.getCRCBitrev();\n if (DEBUG && !crcOk) {\n log(\"String_Node_Str\" + Utils.hex16(crc) + \"String_Node_Str\" + Utils.hex16(rxCrc.getCRCBitrev()));\n }\n rxFIFO.set(-2, registers[REG_RSSI] & 0xff);\n rxFIFO.set(-1, 37 | (crc == rxCrc.getCRCBitrev() ? 0x80 : 0));\n if (rxFIFO.length() <= rxlen + 1) {\n setFIFOP(true);\n } else {\n if (DEBUG)\n log(\"String_Node_Str\" + rxFIFO.length() + \"String_Node_Str\" + rxlen);\n }\n setSFD(false);\n if (DEBUG)\n log(\"String_Node_Str\" + rxFIFO.stateToString());\n if ((autoAck && ackRequest && (crc == rxCrc.getCRCBitrev())) || shouldAck) {\n setState(RadioState.TX_ACK_CALIBRATE);\n } else {\n setState(RadioState.RX_WAIT);\n }\n }\n }\n }\n}\n"
|
"public ModelAndView handleUserEditFailure(final String id) {\n ModelAndView modelAndView = new ModelAndView(\"String_Node_Str\");\n modelAndView.addObject(MODEL, restoreFromSession(SESSION_KEY_COMMAND));\n enrichBindingResultFromSession(MODEL, modelAndView);\n return modelAndView;\n}\n"
|
"protected void doSetInput(IEditorInput input) throws CoreException {\n final boolean installed = semanticHighlightingInstalled();\n if (installed) {\n uninstallGroovySemanticHighlighting();\n }\n super.doSetInput(input);\n unsetJavaBreakpointUpdater();\n if (installed) {\n installGroovySemanticHighlighting();\n }\n}\n"
|
"private void setGesturePreviewText(KeyboardSwitcher switcher, MotionEvent me) {\n if (mPreviewText == null)\n return;\n final int slide = getSlideDistance(me);\n final int slideDisatance = slide & 0x00FF;\n if (slideDisatance >= 20) {\n final boolean isGesture = slideDisatance > SLIDE_RATIO_FOR_GESTURE;\n final int alpha = isGesture ? 255 : slideDisatance / 2;\n mPreviewText.setTextSize(TypedValue.COMPLEX_UNIT_PX, mGesturePreviewTextSize);\n int color = Color.argb(alpha, mGesturePreviewTextColorRed, mGesturePreviewTextColorGreen, mGesturePreviewTextColorBlue);\n mPreviewText.setTextColor(color);\n final int swipeKeyTarget;\n final Configuration cfg = AnyApplication.getConfig();\n switch(slide & 0xFF00) {\n case DIRECTION_UP:\n swipeKeyTarget = cfg.getGestureSwipeUpFromSpacebarKeyCode();\n break;\n case DIRECTION_DOWN:\n swipeKeyTarget = cfg.getGestureSwipeDownKeyCode();\n break;\n case DIRECTION_LEFT:\n swipeKeyTarget = cfg.getGestureSwipeLeftKeyCode();\n break;\n case DIRECTION_RIGHT:\n swipeKeyTarget = cfg.getGestureSwipeRightKeyCode();\n break;\n default:\n swipeKeyTarget = KeyCodes.SPACE;\n break;\n }\n String tooltip;\n switch(swipeKeyTarget) {\n case KeyCodes.MODE_ALPHABET:\n tooltip = switcher != null ? switcher.peekNextAlphabetKeyboard() : \"String_Node_Str\";\n break;\n case KeyCodes.MODE_SYMOBLS:\n tooltip = switcher.peekNextSymbolsKeyboard();\n break;\n default:\n tooltip = \"String_Node_Str\";\n break;\n }\n mPreviewText.setText(tooltip);\n } else {\n mPreviewText.setText(\"String_Node_Str\");\n }\n}\n"
|
"private String _agentCode(CompositeActor actor) throws IllegalActionException {\n String codeString = \"String_Node_Str\";\n String parameterString = \"String_Node_Str\";\n String inputString = \"String_Node_Str\";\n String outputString = \"String_Node_Str\";\n String initString = \"String_Node_Str\";\n String modeString = \"String_Node_Str\";\n String modeParameterString = \"String_Node_Str\";\n String typedModeParameterString = \"String_Node_Str\";\n String flowString = \"String_Node_Str\";\n String invariantString = \"String_Node_Str\";\n LinkedList parameterList = (LinkedList) actor.attributeList(Parameter.class);\n int parameterNumber = parameterList.size();\n ListIterator parameters = parameterList.listIterator();\n Parameter invariantPara = (Parameter) actor.getAttribute(\"String_Node_Str\");\n if (invariantPara != null) {\n invariantString = \"String_Node_Str\" + ((StringToken) invariantPara.getToken()).stringValue() + \"String_Node_Str\";\n }\n _inPorts = actor.inputPortList().iterator();\n while (_inPorts.hasNext()) {\n if (inputString == \"String_Node_Str\") {\n inputString += \"String_Node_Str\" + ((NamedObj) _inPorts.next()).getName();\n } else {\n inputString += \"String_Node_Str\" + ((NamedObj) _inPorts.next()).getName();\n }\n }\n if (inputString != \"String_Node_Str\")\n inputString += \"String_Node_Str\";\n _outPorts = actor.outputPortList().iterator();\n int outportNumber = actor.outputPortList().size();\n boolean parameterForOutport = false;\n while (parameters.hasNext()) {\n String parameterName = ((NamedObj) parameters.next()).getName();\n if (parameterName.startsWith(\"String_Node_Str\")) {\n continue;\n }\n if (parameters.nextIndex() > (parameterNumber - outportNumber)) {\n parameterForOutport = true;\n }\n if (parameterString == \"String_Node_Str\") {\n parameterString += \"String_Node_Str\" + parameterName;\n } else {\n parameterString += \"String_Node_Str\" + parameterName;\n }\n if (parameterForOutport) {\n if (_outPorts.hasNext()) {\n String outportName = ((NamedObj) _outPorts.next()).getName();\n if (outputString == \"String_Node_Str\") {\n outputString += \"String_Node_Str\" + outportName;\n } else {\n outputString += \"String_Node_Str\" + outportName;\n }\n initString += outportName + \"String_Node_Str\" + parameterName + \"String_Node_Str\";\n }\n } else {\n if (modeParameterString == \"String_Node_Str\") {\n modeParameterString += parameterName;\n typedModeParameterString += \"String_Node_Str\" + parameterName;\n } else {\n modeParameterString += \"String_Node_Str\" + parameterName;\n typedModeParameterString += \"String_Node_Str\" + parameterName;\n }\n }\n }\n if (outputString != \"String_Node_Str\")\n outputString += \"String_Node_Str\";\n initString = \"String_Node_Str\" + initString + \"String_Node_Str\";\n modeString = \"String_Node_Str\" + actor.getName() + \"String_Node_Str\" + \"String_Node_Str\" + modeParameterString + \"String_Node_Str\";\n codeString += \"String_Node_Str\" + actor.getName() + \"String_Node_Str\" + parameterString + \"String_Node_Str\" + _endLine + \"String_Node_Str\" + _endLine + \"String_Node_Str\" + outputString + _endLine + \"String_Node_Str\" + inputString + _endLine + \"String_Node_Str\" + initString + _endLine + \"String_Node_Str\" + modeString + _endLine + \"String_Node_Str\" + _endLine;\n if (FSMDirector.class.isInstance(actor.getDirector())) {\n _modeCode += \"String_Node_Str\" + actor.getName() + \"String_Node_Str\" + \"String_Node_Str\" + typedModeParameterString + \"String_Node_Str\" + _endLine + \"String_Node_Str\" + _endLine + \"String_Node_Str\" + outputString + _endLine + \"String_Node_Str\" + inputString + _endLine;\n String subModeString = _fsmModeCode(((FSMDirector) actor.getDirector()).getController(), inputString, outputString);\n _modeCode += \"String_Node_Str\" + invariantString + _endLine + \"String_Node_Str\" + _endLine + subModeString;\n } else {\n flowString = _graphToText(actor);\n _modeCode += \"String_Node_Str\" + actor.getName() + \"String_Node_Str\" + \"String_Node_Str\" + typedModeParameterString + \"String_Node_Str\" + _endLine + \"String_Node_Str\" + _endLine + \"String_Node_Str\" + outputString + _endLine + \"String_Node_Str\" + inputString + _endLine + \"String_Node_Str\" + flowString + _endLine + \"String_Node_Str\" + invariantString + _endLine + \"String_Node_Str\" + _endLine;\n }\n return codeString;\n}\n"
|
"public String generateURL(CardDownloadData card) throws Exception {\n Integer collectorId = card.getCollectorId();\n String cardSet = card.getSet();\n if (collectorId == null || cardSet == null) {\n throw new Exception(\"String_Node_Str\" + collectorId + \"String_Node_Str\" + cardSet);\n }\n StringBuilder url = new StringBuilder(\"String_Node_Str\");\n url.append(cardSet.toUpperCase()).append(\"String_Node_Str\");\n if (card.isSplitCard()) {\n url.append(card.getDownloadName().replaceAll(\"String_Node_Str\", \"String_Node_Str\"));\n } else {\n url.append(card.getDownloadName().replaceAll(\"String_Node_Str\", \"String_Node_Str\"));\n }\n if (card.isTwoFacedCard()) {\n url.append(card.isSecondSide() ? \"String_Node_Str\" : \"String_Node_Str\");\n }\n if (card.isFlipCard()) {\n if (card.isFlippedSide()) {\n url.append(\"String_Node_Str\");\n } else {\n url.append(\"String_Node_Str\");\n }\n }\n url.append(\"String_Node_Str\");\n return url.toString();\n}\n"
|
"protected String getStringValue(IDataIterator dataIterator, String[] columnNames, int index) throws BirtException {\n Object obj = dataIterator.getValue(columnNames[index]);\n String value = null;\n if (isLocaleNeutral) {\n value = DataTypeUtil.toLocaleNeutralString(obj);\n } else if (obj != null) {\n value = valueFormatters[index].formatValue(obj);\n }\n return value;\n}\n"
|
"public void actionPerformed(ActionEvent e) {\n showExportAsImageDialog();\n}\n"
|
"public static int computeAggregationCellRowOverSpan(CrosstabReportItemHandle crosstabItem, List rowGroups, LevelHandle targetSpanLevel, EdgeCursor rowEdgeCursor) throws OLAPException {\n if (rowEdgeCursor == null || targetSpanLevel == null) {\n return 1;\n }\n long startPosition = rowEdgeCursor.getPosition();\n int targetGroupIndex = getGroupIndex(rowGroups, targetSpanLevel);\n boolean verticalHeader = MEASURE_DIRECTION_VERTICAL.equals(crosstabItem.getMeasureDirection());\n int factor = verticalHeader ? Math.max(crosstabItem.getMeasureCount(), 1) : 1;\n if (targetGroupIndex != -1) {\n long currentPosition = startPosition;\n long edgeEndPosition;\n DimensionCursor dc;\n if (targetGroupIndex > 0) {\n dc = (DimensionCursor) rowEdgeCursor.getDimensionCursor().get(targetGroupIndex - 1);\n edgeEndPosition = dc.getEdgeEnd();\n } else {\n edgeEndPosition = Long.MAX_VALUE;\n }\n int span = 0;\n while (currentPosition <= edgeEndPosition && !rowEdgeCursor.isAfterLast()) {\n span += factor;\n for (int i = rowGroups.size() - 2; i >= targetGroupIndex; i--) {\n dc = (DimensionCursor) rowEdgeCursor.getDimensionCursor().get(i);\n if (isDummyGroup(dc)) {\n continue;\n }\n if (currentPosition == dc.getEdgeEnd()) {\n EdgeGroup gp = rowGroups.get(i);\n DimensionViewHandle dv = crosstabItem.getDimension(ROW_AXIS_TYPE, gp.dimensionIndex);\n LevelViewHandle lv = dv.getLevel(gp.levelIndex);\n if (lv.getAggregationHeader() != null) {\n span += getTotalRowSpan(crosstabItem, gp.dimensionIndex, gp.levelIndex, verticalHeader);\n }\n } else {\n break;\n }\n }\n rowEdgeCursor.next();\n currentPosition = rowEdgeCursor.getPosition();\n }\n rowEdgeCursor.setPosition(startPosition);\n return span;\n }\n return factor;\n}\n"
|
"public boolean apply(Game game, Ability source) {\n Player controller = game.getPlayer(source.getControllerId());\n if (controller != null) {\n ManaCosts cost = new ManaCostsImpl(\"String_Node_Str\");\n if (controller.chooseUse(outcome, \"String_Node_Str\" + cost.getText() + \"String_Node_Str\", source, game)) {\n int costX = controller.announceXMana(0, Integer.MAX_VALUE, \"String_Node_Str\", game, source);\n cost.add(new GenericManaCost(costX));\n if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false, null)) {\n controller.resetStoredBookmark(game);\n CreateTokenEffect effect = new CreateTokenEffect(new TilonallisSummonerElementalToken(), costX, true, true);\n effect.apply(game, source);\n Effect exileEffect = new ExileTargetEffect(null, \"String_Node_Str\", Zone.BATTLEFIELD).setText(\"String_Node_Str\");\n exileEffect.setTargetPointer(new FixedTargets(new CardsImpl(effect.getLastAddedTokenIds()), game));\n game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(Zone.ALL, exileEffect, TargetController.ANY, new InvertCondition(CitysBlessingCondition.instance)), source);\n }\n }\n return true;\n }\n return false;\n}\n"
|
"public char[] getMainTypeName() {\n String typeName = cup.getMainTypeName();\n if (typeName != null) {\n return typeName.toCharArray();\n }\n mainTypeName = mainTypeName.substring(0, ext);\n int nameStart = mainTypeName.lastIndexOf(File.separatorChar);\n if (nameStart == -1) {\n nameStart = mainTypeName.lastIndexOf('/');\n }\n mainTypeName = mainTypeName.substring(nameStart + 1);\n return mainTypeName.toCharArray();\n}\n"
|
"private void readServerElement_1_4(final Namespace namespace, final XMLExtendedStreamReader reader, final ModelNode address, final List<ModelNode> list) throws XMLStreamException {\n parseNamespaces(reader, address, list);\n ModelNode serverName = null;\n final int count = reader.getAttributeCount();\n for (int i = 0; i < count; i++) {\n switch(Namespace.forUri(reader.getAttributeNamespace(i))) {\n case NONE:\n {\n final String value = reader.getAttributeValue(i);\n final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));\n switch(attribute) {\n case NAME:\n {\n serverName = ServerRootResourceDefinition.NAME.parse(value, reader.getLocation());\n break;\n }\n default:\n throw unexpectedAttribute(reader, i);\n }\n break;\n }\n case XML_SCHEMA_INSTANCE:\n {\n switch(Attribute.forName(reader.getAttributeLocalName(i))) {\n case SCHEMA_LOCATION:\n {\n parseSchemaLocations(reader, address, list, i);\n break;\n }\n case NO_NAMESPACE_SCHEMA_LOCATION:\n {\n break;\n }\n default:\n {\n throw unexpectedAttribute(reader, i);\n }\n }\n break;\n }\n default:\n throw unexpectedAttribute(reader, i);\n }\n }\n setServerName(address, list, serverName);\n Element element = nextElement(reader, namespace);\n if (element == Element.EXTENSIONS) {\n extensionXml.parseExtensions(reader, address, namespace, list);\n element = nextElement(reader, namespace);\n }\n if (element == Element.SYSTEM_PROPERTIES) {\n parseSystemProperties(reader, address, namespace, list, true);\n element = nextElement(reader, namespace);\n }\n if (element == Element.PATHS) {\n parsePaths(reader, address, namespace, list, true);\n element = nextElement(reader, namespace);\n }\n if (element == Element.VAULT) {\n parseVault(reader, address, namespace, list);\n element = nextElement(reader, namespace);\n }\n if (element == Element.MANAGEMENT) {\n ManagementXml managementXml = new ManagementXml(this);\n managementXml.parseManagement(reader, address, namespace, list, true, false);\n element = nextElement(reader, namespace);\n }\n if (element == Element.PROFILE) {\n parseServerProfile(reader, address, list);\n element = nextElement(reader, namespace);\n }\n final Set<String> interfaceNames = new HashSet<String>();\n if (element == Element.INTERFACES) {\n parseInterfaces(reader, interfaceNames, address, namespace, list, true);\n element = nextElement(reader, namespace);\n }\n if (element == Element.SOCKET_BINDING_GROUP) {\n parseSocketBindingGroup_1_1(reader, interfaceNames, address, namespace, list);\n element = nextElement(reader, namespace);\n }\n if (element == Element.DEPLOYMENTS) {\n parseDeployments(reader, address, namespace, list, EnumSet.of(Attribute.NAME, Attribute.RUNTIME_NAME, Attribute.ENABLED), EnumSet.of(Element.CONTENT, Element.FS_ARCHIVE, Element.FS_EXPLODED));\n element = nextElement(reader, namespace);\n }\n if (element == Element.DEPLOYMENT_OVERLAYS) {\n parseDeploymentOverlays(reader, namespace, new ModelNode(), list, true, true);\n element = nextElement(reader, namespace);\n }\n if (element != null) {\n throw unexpectedElement(reader);\n }\n}\n"
|
"public void removeTreeRows(int[] rows) {\n for (int i = 0; i < rows.length; i++) {\n rowArray.add(rows[i]);\n }\n Collections.sort(rowArray, Collections.reverseOrder());\n for (int i = 0; i < rowArray.size(); i++) {\n int item = rowArray.get(i);\n if (item >= 0 && item < rootChildren.getItemCount()) {\n this.rootChildren.removeItem(item);\n }\n }\n table.updateUI();\n changeSupport.firePropertyChange(\"String_Node_Str\", null, getSelectedRows());\n}\n"
|
"public String getDocumentName(ODocument doc) {\n if (doc == null)\n return Application.get().getResourceSettings().getLocalizer().getString(\"String_Node_Str\", null);\n else {\n OProperty nameProp = getNameProperty(doc.getSchemaClass());\n if (nameProp != null) {\n Object value = doc.field(nameProp.getName());\n if (value == null)\n return Application.get().getResourceSettings().getLocalizer().getString(\"String_Node_Str\", null);\n OType type = nameProp.getType();\n Locale locale = OrienteerWebSession.get().getLocale();\n switch(type) {\n case DATE:\n return OrienteerWebApplication.DATE_CONVERTER.convertToString((Date) value, locale);\n case DATETIME:\n return OrienteerWebApplication.DATE_TIME_CONVERTER.convertToString((Date) value, locale);\n case LINK:\n return getDocumentName((ODocument) value);\n case EMBEDDEDMAP:\n Map<String, Object> localizations = (Map<String, Object>) value;\n Object localized = CommonUtils.localizeByMap(localizations, true, locale.getLanguage(), Locale.getDefault().getLanguage());\n if (localized != null)\n return localized.toString();\n default:\n return value.toString();\n }\n } else {\n return doc.toString();\n }\n }\n}\n"
|
"public ServerAccessToken getPreauthorizedToken(Client client, List<String> requestedScopes, UserSubject subject, String grantType) {\n long clientId = getClientId(client);\n long subjectId = getSubjectId(subject);\n OAuthToken accessToken = storage.getPreauthorizedToken(clientId, subjectId, grantType);\n ServerAccessToken token = null;\n if (accessToken != null) {\n isExpired = OAuthUtils.isExpired(accessToken.getIssuedAt(), accessToken.getExpiresIn());\n if (isExpired) {\n revokeToken(client, accessToken.getTokenKey(), accessToken.getTokenType());\n } else {\n token = getTokenHelper(client, grantType, accessToken, token);\n }\n }\n if (token != null) {\n boolean isRolesOutdated = isRolesOutdated(subject, token);\n if (isRolesOutdated) {\n revokeAllTokens(client, subjectId, grantType);\n token = null;\n }\n }\n return token;\n}\n"
|
"public static String createTransferredResourcesFolder(RodaUser user, String parent, String folderName, boolean forceCommit) throws AuthorizationDeniedException, GenericException, RequestNotValidException {\n Date startDate = new Date();\n UserUtility.checkRoles(user, INGEST_TRANSFER_ROLE);\n UserUtility.checkTransferredResourceAccess(user, Arrays.asList(parentUUID));\n try {\n String uuid = BrowserHelper.createTransferredResourcesFolder(parent, folderName, forceCommit);\n long duration = new Date().getTime() - startDate.getTime();\n registerAction(user, BROWSER_COMPONENT, \"String_Node_Str\", null, duration, PARENT_PARAM, parent, FOLDERNAME_PARAM, folderName, SUCCESS_PARAM, true);\n return uuid;\n } catch (GenericException e) {\n long duration = new Date().getTime() - startDate.getTime();\n registerAction(user, BROWSER_COMPONENT, \"String_Node_Str\", null, duration, PARENT_PARAM, parent, FOLDERNAME_PARAM, folderName, SUCCESS_PARAM, false, ERROR_PARAM, e.getMessage());\n throw e;\n }\n}\n"
|
"public void createControl(Composite parent) {\n ScrolledComposite scrollTop = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL);\n scrollTop.setExpandVertical(true);\n scrollTop.setExpandHorizontal(true);\n final Composite container = new Composite(scrollTop, SWT.NONE);\n GridLayoutFactory.fillDefaults().numColumns(3).margins(6, 6).applyTo(container);\n final Label vmNameLabel = new Label(container, SWT.NONE);\n vmNameLabel.setText(WizardMessages.getString(\"String_Node_Str\"));\n GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(false, false).applyTo(vmNameLabel);\n final Text vmNameText = new Text(container, SWT.BORDER);\n GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).span(2, 1).applyTo(vmNameText);\n vmNameText.setToolTipText(WizardMessages.getString(\"String_Node_Str\"));\n final IObservableValue<String> vmmNameObservable = BeanProperties.value(CreateVMPageModel.class, CreateVMPageModel.VM_NAME).observe(model);\n dbc.bindValue(WidgetProperties.text(SWT.Modify).observe(vmNameText), vmmNameObservable);\n final Label boxRefLabel = new Label(container, SWT.NONE);\n boxRefLabel.setText(WizardMessages.getString(\"String_Node_Str\"));\n GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(false, false).applyTo(boxRefLabel);\n final Text boxRefText = new Text(container, SWT.BORDER);\n GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(boxRefText);\n boxRefText.setToolTipText(WizardMessages.getString(\"String_Node_Str\"));\n final IObservableValue<String> boxRefObservable = BeanProperties.value(CreateVMPageModel.class, CreateVMPageModel.BOX_REF).observe(model);\n dbc.bindValue(WidgetProperties.text(SWT.Modify).observe(boxRefText), boxRefObservable);\n final Button boxSearchButton = new Button(container, SWT.NONE);\n boxSearchButton.setText(WizardMessages.getString(\"String_Node_Str\"));\n GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(false, false).applyTo(boxSearchButton);\n boxSearchButton.addSelectionListener(onSearchImage());\n final Button customVMFileButton = new Button(container, SWT.CHECK);\n customVMFileButton.setText(WizardMessages.getString(\"String_Node_Str\"));\n GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(false, false).span(3, 1).applyTo(customVMFileButton);\n final IObservableValue<String> customVMFileObservable = BeanProperties.value(CreateVMPageModel.class, CreateVMPageModel.V_FILE_MODE).observe(model);\n dbc.bindValue(WidgetProperties.selection().observe(customVMFileButton), customVMFileObservable);\n final Label boxLocLabel = new Label(container, SWT.NONE);\n boxLocLabel.setText(WizardMessages.getString(\"String_Node_Str\"));\n GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(false, false).applyTo(boxLocLabel);\n final Text boxLocText = new Text(container, SWT.BORDER);\n GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(boxLocText);\n boxLocText.setToolTipText(WizardMessages.getString(\"String_Node_Str\"));\n boxLocText.setEnabled(false);\n final IObservableValue<String> boxLocObservable = BeanProperties.value(CreateVMPageModel.class, CreateVMPageModel.VM_FILE).observe(model);\n dbc.bindValue(WidgetProperties.text(SWT.Modify).observe(boxLocText), boxLocObservable);\n boxLocText.addModifyListener(e -> vmFileChanged(boxLocText.getText()));\n final Button vgFilesearchButton = new Button(container, SWT.NONE);\n vgFilesearchButton.setText(WizardMessages.getString(\"String_Node_Str\"));\n vgFilesearchButton.setEnabled(false);\n GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(false, false).applyTo(vgFilesearchButton);\n vgFilesearchButton.addSelectionListener(onSearchVMFile());\n customVMFileButton.addSelectionListener(onCheckCustomVMFile(vmNameText, boxRefText, boxLocText, vgFilesearchButton, boxSearchButton));\n dbc.addValidationStatusProvider(new CreateVMValidationStatusProvider(vmmNameObservable, boxRefObservable, boxLocObservable));\n advanced = new CreateVMAdvancedComposite(container, scrollTop, model);\n GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).span(3, 1).grab(true, false).applyTo(advanced);\n WizardPageSupport.create(this, dbc);\n scrollTop.setContent(container);\n Point point = container.computeSize(SWT.DEFAULT, SWT.DEFAULT);\n scrollTop.setSize(point);\n scrollTop.setMinSize(point);\n setControl(container);\n}\n"
|
"public boolean isSuperTypeOf(IType subType) {\n return this.backReference || this.typeParameter.isAssignableFrom(subType, ITypeContext.COVARIANT);\n}\n"
|
"public GenerateGeometryResult generateGeometry(long uoid, final DatabaseSession databaseSession, QueryContext queryContext) throws BimserverDatabaseException, GeometryGeneratingException {\n GenerateGeometryResult generateGeometryResult = new GenerateGeometryResult();\n packageMetaData = queryContext.getPackageMetaData();\n productClass = packageMetaData.getEClass(\"String_Node_Str\");\n geometryFeature = productClass.getEStructuralFeature(\"String_Node_Str\");\n representationFeature = productClass.getEStructuralFeature(\"String_Node_Str\");\n productRepresentationClass = packageMetaData.getEClass(\"String_Node_Str\");\n representationsFeature = productRepresentationClass.getEStructuralFeature(\"String_Node_Str\");\n long start = System.nanoTime();\n String pluginName = \"String_Node_Str\";\n if (queryContext.getPackageMetaData().getSchema() == Schema.IFC4) {\n pluginName = \"String_Node_Str\";\n } else if (queryContext.getPackageMetaData().getSchema() == Schema.IFC2X3TC1) {\n pluginName = \"String_Node_Str\";\n }\n try {\n final StreamingSerializerPlugin ifcSerializerPlugin = (StreamingSerializerPlugin) bimServer.getPluginManager().getPlugin(pluginName, true);\n if (ifcSerializerPlugin == null) {\n throw new UserException(\"String_Node_Str\");\n }\n User user = (User) databaseSession.get(uoid, org.bimserver.database.OldQuery.getDefault());\n UserSettings userSettings = user.getUserSettings();\n RenderEnginePluginConfiguration defaultRenderEngine = userSettings.getDefaultRenderEngine();\n if (defaultRenderEngine == null) {\n throw new UserException(\"String_Node_Str\");\n }\n int maxSimultanousThreads = Math.min(bimServer.getServerSettingsCache().getServerSettings().getRenderEngineProcesses(), Runtime.getRuntime().availableProcessors());\n if (maxSimultanousThreads < 1) {\n maxSimultanousThreads = 1;\n }\n final RenderEngineSettings settings = new RenderEngineSettings();\n settings.setPrecision(Precision.SINGLE);\n settings.setIndexFormat(IndexFormat.AUTO_DETECT);\n settings.setGenerateNormals(true);\n settings.setGenerateTriangles(true);\n settings.setGenerateWireFrame(false);\n final RenderEngineFilter renderEngineFilter = new RenderEngineFilter();\n RenderEnginePool renderEnginePool = bimServer.getRenderEnginePools().getRenderEnginePool(packageMetaData.getSchema(), defaultRenderEngine.getPluginDescriptor().getPluginClassName(), new PluginConfiguration(defaultRenderEngine.getSettings()));\n ThreadPoolExecutor executor = new ThreadPoolExecutor(maxSimultanousThreads, maxSimultanousThreads, 24, TimeUnit.HOURS, new ArrayBlockingQueue<Runnable>(10000000));\n for (EClass eClass : queryContext.getOidCounters().keySet()) {\n if (packageMetaData.getEClass(\"String_Node_Str\").isSuperTypeOf(eClass)) {\n Query query2 = new Query(\"String_Node_Str\", packageMetaData);\n QueryPart queryPart2 = query2.createQueryPart();\n queryPart2.addType(eClass, false);\n Include include = queryPart2.createInclude();\n include.addType(eClass, false);\n include.addFieldDirect(\"String_Node_Str\");\n QueryObjectProvider queryObjectProvider2 = new QueryObjectProvider(databaseSession, bimServer, query2, Collections.singleton(queryContext.getRoid()), packageMetaData);\n HashMapVirtualObject next = queryObjectProvider2.next();\n while (next != null) {\n if (next.eClass() == eClass) {\n HashMapVirtualObject representation = next.getDirectFeature(representationFeature);\n if (representation != null) {\n List<Long> representations = (List<Long>) representation.get(\"String_Node_Str\");\n if (representations != null && !representations.isEmpty()) {\n Query query = new Query(\"String_Node_Str\", packageMetaData);\n QueryPart queryPart = query.createQueryPart();\n queryPart.addType(eClass, false);\n int x = 0;\n queryPart.addOid(next.getOid());\n while (next != null && x < 10) {\n next = queryObjectProvider2.next();\n if (next != null) {\n if (next.eClass() == eClass) {\n representation = next.getDirectFeature(representationFeature);\n if (representation != null) {\n representations = (List<Long>) representation.get(\"String_Node_Str\");\n if (!representations.isEmpty()) {\n queryPart.addOid(next.getOid());\n x++;\n }\n }\n }\n }\n }\n JsonQueryObjectModelConverter jsonQueryObjectModelConverter = new JsonQueryObjectModelConverter(packageMetaData);\n String queryNameSpace = \"String_Node_Str\";\n if (packageMetaData.getSchema() == Schema.IFC4) {\n queryNameSpace = \"String_Node_Str\";\n }\n if (eClass.getName().equals(\"String_Node_Str\")) {\n queryPart.addInclude(jsonQueryObjectModelConverter.getDefineFromFile(queryNameSpace + \"String_Node_Str\"));\n } else {\n queryPart.addInclude(jsonQueryObjectModelConverter.getDefineFromFile(queryNameSpace + \"String_Node_Str\"));\n }\n queryPart.addInclude(jsonQueryObjectModelConverter.getDefineFromFile(queryNameSpace + \"String_Node_Str\"));\n queryPart.addInclude(jsonQueryObjectModelConverter.getDefineFromFile(queryNameSpace + \"String_Node_Str\"));\n Include representationInclude = jsonQueryObjectModelConverter.getDefineFromFile(queryNameSpace + \"String_Node_Str\");\n queryPart.addInclude(representationInclude);\n Include objectPlacement = jsonQueryObjectModelConverter.getDefineFromFile(queryNameSpace + \"String_Node_Str\");\n queryPart.addInclude(objectPlacement);\n if (packageMetaData.getEClass(\"String_Node_Str\").isSuperTypeOf(eClass)) {\n Include ifcWall = queryPart.createInclude();\n ifcWall.addType(packageMetaData.getEClass(eClass.getName()), false);\n ifcWall.addField(\"String_Node_Str\");\n Include hasOpenings = ifcWall.createInclude();\n hasOpenings.addType(packageMetaData.getEClass(\"String_Node_Str\"), false);\n hasOpenings.addField(\"String_Node_Str\");\n hasOpenings.addInclude(representationInclude);\n hasOpenings.addInclude(objectPlacement);\n }\n QueryObjectProvider queryObjectProvider = new QueryObjectProvider(databaseSession, bimServer, query, Collections.singleton(queryContext.getRoid()), packageMetaData);\n Runner runner = new Runner(eClass, renderEnginePool, databaseSession, settings, queryObjectProvider, ifcSerializerPlugin, renderEngineFilter, generateGeometryResult, queryContext, query);\n executor.submit(runner);\n jobsTotal.incrementAndGet();\n }\n }\n }\n next = queryObjectProvider2.next();\n }\n }\n }\n allJobsPushed = true;\n executor.shutdown();\n executor.awaitTermination(24, TimeUnit.HOURS);\n long end = System.nanoTime();\n LOGGER.info(\"String_Node_Str\" + ((end - start) / 1000000) + \"String_Node_Str\" + \"String_Node_Str\" + Formatters.bytesToString(bytesSaved.get()) + \"String_Node_Str\" + Formatters.bytesToString(totalBytes.get()) + \"String_Node_Str\" + Formatters.bytesToString(totalBytes.get() - bytesSaved.get()));\n } catch (Exception e) {\n LOGGER.error(\"String_Node_Str\", e);\n throw new GeometryGeneratingException(e);\n }\n return generateGeometryResult;\n}\n"
|
"public static String path(String... args) {\n StringBuilder s = new StringBuilder();\n boolean d = false;\n for (String arg : args) {\n if (!d)\n d = !noString(arg);\n else if (!s.toString().endsWith(File.separator))\n s.append(File.separator);\n String a = arg;\n a = a.replace(\"String_Node_Str\", File.separator);\n if (a.startsWith(File.separator))\n a = a.substring(File.separator.length());\n if (\"String_Node_Str\".equals(a)) {\n int i = s.substring(0, s.length() - 1).lastIndexOf(File.separator);\n s = new StringBuilder(s.substring(0, i + 1));\n } else\n s.append(a);\n }\n return s.toString();\n}\n"
|
"protected void showResults(int generation) {\n log.info(\"String_Node_Str\");\n if (!this.solutions.isEmpty()) {\n log.info(\"String_Node_Str\");\n log.info(\"String_Node_Str\" + projectFacade.getProperties().getInDir());\n } else {\n log.info(\"String_Node_Str\");\n }\n log.info(\"String_Node_Str\" + this.solutions.size());\n for (ProgramVariant variant : solutions) {\n log.info(\"String_Node_Str\" + variant.getFitness() + \"String_Node_Str\" + variant);\n }\n log.info(\"String_Node_Str\");\n for (ProgramVariant variant : variants) {\n log.info(\"String_Node_Str\" + variant.getFitness() + \"String_Node_Str\" + variant);\n }\n if (!solutions.isEmpty()) {\n log.info(\"String_Node_Str\");\n log.info(mutatorSupporter.getSolutionData(solutions, generation));\n }\n if (this.getFixSpace() != null) {\n FixLocationSpace space = this.getFixSpace();\n String s = \"String_Node_Str\" + space.strategy() + \"String_Node_Str\";\n for (Object l : space.getSpace().keySet()) {\n int ing = 0;\n Map r = (Map) space.getSpace().get(l);\n String ty = \"String_Node_Str\";\n for (Object t : r.keySet()) {\n List ingredients = (List) r.get(t);\n ing += ingredients.size();\n }\n s += l + \"String_Node_Str\" + ing + \"String_Node_Str\" + ty + \"String_Node_Str\";\n }\n s += l + \"String_Node_Str\" + ing + \"String_Node_Str\" + ty + \"String_Node_Str\";\n }\n log.info(s);\n log.info(\"String_Node_Str\");\n log.info(currentStat);\n}\n"
|
"public void noBonusPoolsForHostedNonDistributorBinds() {\n when(config.getBoolean(ConfigProperties.STANDALONE)).thenReturn(false);\n Subscription s = createVirtLimitSub(\"String_Node_Str\", 10, \"String_Node_Str\");\n List<Pool> pools = poolRules.createPools(s);\n assertEquals(2, pools.size());\n Pool physicalPool = pools.get(0);\n physicalPool.setId(\"String_Node_Str\");\n Pool virtBonusPool = pools.get(1);\n virtBonusPool.setId(\"String_Node_Str\");\n assertEquals(new Long(10), physicalPool.getQuantity());\n assertEquals(0, physicalPool.getAttributes().size());\n assertEquals(new Long(-1), virtBonusPool.getQuantity());\n assertEquals(\"String_Node_Str\", virtBonusPool.getAttributeValue(\"String_Node_Str\"));\n assertEquals(\"String_Node_Str\", virtBonusPool.getProduct().getAttributeValue(\"String_Node_Str\"));\n Entitlement e = new Entitlement(physicalPool, consumer, 1);\n PoolHelper postHelper = new PoolHelper(poolManagerMock, e);\n enforcer.postEntitlement(consumer, postHelper, e);\n verify(poolManagerMock, never()).createPool(any(Pool.class));\n verify(poolManagerMock, never()).updatePoolQuantity(any(Pool.class), anyInt());\n enforcer.postUnbind(consumer, postHelper, e);\n verify(poolManagerMock, never()).updatePoolQuantity(any(Pool.class), anyInt());\n verify(poolManagerMock, never()).setPoolQuantity(any(Pool.class), anyLong());\n}\n"
|
"public int getTokens() {\n if (coreData.getTokens() == 0) {\n load(CHAMPION_MASTERY_LOAD_GROUP);\n }\n return coreData.getTokens();\n}\n"
|
"public void processRemotes(ProcessAnnotatedType<?> event) throws InstantiationException, IllegalAccessException {\n Class<?> type = event.getAnnotatedType().getJavaClass();\n if (Annotations.isAnnotationPresent(type, Exported.class) && !(Modifier.isAbstract(type.getModifiers()) || Modifier.isInterface(type.getModifiers()))) {\n if (type.getClassLoader().equals(Thread.currentThread().getContextClassLoader())) {\n services.put(event.getAnnotatedType().getJavaClass(), event.getAnnotatedType());\n }\n }\n}\n"
|
"public void onDisable() {\n Config.saveAll();\n Config.unLoad();\n Util.info(\"String_Node_Str\");\n}\n"
|
"private void autoDiscoverLeechPlugins() {\n Reflections reflections = new Reflections(\"String_Node_Str\");\n Set<Class<? extends LeechService>> pluginsAvailable = reflections.getSubTypesOf(LeechService.class);\n for (Class<? extends LeechService> plugin : pluginsAvailable) {\n try {\n LOGGER.info(\"String_Node_Str\", plugin.getCanonicalName());\n LeechService leechService = plugin.newInstance();\n leechPluginRegistry.put(leechService.getFrameworkInformations().getFrameworkEnum(), leechService);\n } catch (InstantiationException e) {\n LOGGER.error(\"String_Node_Str\" + plugin.getCanonicalName(), e);\n } catch (IllegalAccessException e) {\n LOGGER.error(\"String_Node_Str\" + plugin.getCanonicalName(), e);\n }\n }\n}\n"
|
"public String[] next() {\n if (!headerReturned) {\n headerReturned = true;\n return header;\n }\n String[] result = new String[indexes.length];\n for (int i = 0; i < indexes.length; i++) {\n row.getCell(indexes[i]).setCellType(Cell.CELL_TYPE_STRING);\n result[i] = row.getCell(indexes[i]).getStringCellValue();\n if (!dataTypes[i].isValid(result[i])) {\n if (config.columns.get(i).isCleansing()) {\n result[i] = DataType.NULL_VALUE;\n } else {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n }\n }\n if (iterator.hasNext()) {\n row = iterator.next();\n currentRow++;\n } else {\n row = null;\n try {\n input.close();\n } catch (Exception e) {\n }\n }\n return result;\n}\n"
|
"public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n mCategorySub = new QueryCategorySubCategory(getActivity());\n mCategories = new ArrayList<TableCategory>();\n mSubCategories = new HashMap<TableCategory, List<QueryCategorySubCategory>>();\n if (savedInstanceState != null) {\n if (savedInstanceState.containsKey(KEY_ID_GROUP))\n mIdGroupChecked = savedInstanceState.getInt(KEY_ID_GROUP);\n if (savedInstanceState.containsKey(KEY_ID_CHILD))\n mIdChildChecked = savedInstanceState.getInt(KEY_ID_CHILD);\n }\n setShowMenuItemSearch(true);\n setEmptyText(getActivity().getResources().getString(R.string.category_empty_list));\n setHasOptionsMenu(true);\n mLayout = Intent.ACTION_PICK.equals(mAction) ? R.layout.simple_expandable_list_item_multiple_choice_2 : android.R.layout.simple_expandable_list_item_2;\n registerForContextMenu(getExpandableListView());\n getExpandableListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE);\n setListShown(false);\n getExpandableListView().setOnChildClickListener(new OnChildClickListener() {\n public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) {\n if (getExpandableListAdapter() != null && getExpandableListAdapter() instanceof CategoryExpandableListAdapter) {\n CategoryExpandableListAdapter adapter = (CategoryExpandableListAdapter) getExpandableListAdapter();\n QueryCategorySubCategory data = mSubCategories.get(mCategories.get(groupPosition)).get(childPosition);\n adapter.setIdChildChecked(data.getCategId(), data.getSubCategId());\n adapter.notifyDataSetChanged();\n }\n });\n getExpandableListView().setOnGroupClickListener(new OnGroupClickListener() {\n\n public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) {\n if (getExpandableListAdapter() != null && getExpandableListAdapter() instanceof CategoryExpandableListAdapter) {\n CategoryExpandableListAdapter adapter = (CategoryExpandableListAdapter) getExpandableListAdapter();\n adapter.setIdGroupChecked(mCategories.get(groupPosition).getCategId());\n adapter.notifyDataSetChanged();\n }\n return false;\n }\n });\n getLoaderManager().initLoader(ID_LOADER_CATEGORYSUB, null, this);\n}\n"
|
"public ISelection getSelection() {\n if (specialSelectionProvider != null) {\n return specialSelectionProvider.getSelection();\n }\n IWorkbenchPart activePart = getActivePage().getActivePart();\n if (activePart instanceof PropertySheet) {\n return getActivePage().getSelection();\n }\n if (activePart instanceof IJobSettingsView) {\n ISelection selection = ((IJobSettingsView) activePart).getSelection();\n if (selection == null) {\n selection = getRepositorySelection();\n }\n return selection;\n }\n if (activePart instanceof IRepositoryView) {\n workbenchPart = activePart;\n ISelection selection = ((IRepositoryView) activePart).getViewer().getSelection();\n if (!selection.isEmpty()) {\n return ((IRepositoryView) activePart).getViewer().getSelection();\n } else {\n if (node != null) {\n selection = new StructuredSelection(node);\n }\n return selection;\n }\n }\n if (workbenchPart != null) {\n if (workbenchPart instanceof IRepositoryView) {\n IRepositoryView view = (IRepositoryView) workbenchPart;\n return view.getViewer().getSelection();\n }\n }\n if (getActivePage().getActiveEditor() == null) {\n workbenchPart = activePart;\n if (workbenchPart instanceof IRepositoryView) {\n IRepositoryView view = (IRepositoryView) workbenchPart;\n return view.getViewer().getSelection();\n }\n return null;\n }\n IWorkbenchPartSite site = getActivePage().getActiveEditor().getSite();\n ISelectionProvider selectionProvider = site.getSelectionProvider();\n return selectionProvider == null ? null : selectionProvider.getSelection();\n}\n"
|
"private JsonValue applyDefaultMappings(JsonValue source, JsonValue oldSource, JsonValue target, JsonValue existingTarget, String linkQualifier) throws SynchronizationException {\n JsonValue result = null;\n if (defaultMapping != null) {\n Map<String, Object> queryScope = new HashMap<String, Object>();\n queryScope.put(\"String_Node_Str\", source.asMap());\n if (oldSource != null) {\n queryScope.put(\"String_Node_Str\", oldSource.asMap());\n }\n queryScope.put(\"String_Node_Str\", target.asMap());\n queryScope.put(\"String_Node_Str\", config.asMap());\n queryScope.put(\"String_Node_Str\", existingTarget.copy().asMap());\n queryScope.put(\"String_Node_Str\", linkQualifier);\n try {\n result = json(defaultMapping.exec(queryScope));\n } catch (ScriptThrownException ste) {\n throw toSynchronizationException(ste, name, \"String_Node_Str\");\n } catch (ScriptException se) {\n LOGGER.debug(\"String_Node_Str\", name, se);\n throw new SynchronizationException(se);\n }\n }\n return result;\n}\n"
|
"protected void closeLayout() {\n if (root == null) {\n return;\n }\n IStyle areaStyle = root.getStyle();\n if (!isLast) {\n areaStyle.setProperty(IStyle.STYLE_BORDER_BOTTOM_WIDTH, IStyle.NUMBER_0);\n areaStyle.setProperty(IStyle.STYLE_PADDING_BOTTOM, IStyle.NUMBER_0);\n areaStyle.setProperty(IStyle.STYLE_MARGIN_BOTTOM, IStyle.NUMBER_0);\n }\n int height = getCurrentBP() + getOffsetY() + getDimensionValue(areaStyle.getProperty(StyleConstants.STYLE_PADDING_BOTTOM)) + getDimensionValue(areaStyle.getProperty(StyleConstants.STYLE_BORDER_BOTTOM_WIDTH));\n if (isFirst && isLast) {\n calculateSpecifiedHeight();\n if (specifiedHeight > height) {\n CSSValue verticalAlign = areaStyle.getProperty(IStyle.STYLE_VERTICAL_ALIGN);\n if (IStyle.BOTTOM_VALUE.equals(verticalAlign) || IStyle.MIDDLE_VALUE.equals(verticalAlign)) {\n int offset = specifiedHeight - height;\n if (IStyle.BOTTOM_VALUE.equals(verticalAlign)) {\n Iterator iter = root.getChildren();\n while (iter.hasNext()) {\n AbstractArea child = (AbstractArea) iter.next();\n child.setAllocatedPosition(child.getAllocatedX(), child.getAllocatedY() + offset);\n }\n } else if (IStyle.MIDDLE_VALUE.equals(verticalAlign)) {\n Iterator iter = root.getChildren();\n while (iter.hasNext()) {\n AbstractArea child = (AbstractArea) iter.next();\n child.setAllocatedPosition(child.getAllocatedX(), child.getAllocatedY() + offset / 2);\n }\n }\n }\n height = specifiedHeight;\n }\n }\n root.setHeight(height);\n}\n"
|
"public String cityName() {\n return resolve(\"String_Node_Str\");\n}\n"
|
"public void testClearDatabase_IgnoreFirstErrorOnDropTable() throws Exception {\n database.onceRaises(RuntimeException.class).dropTable(SCHEMA, \"String_Node_Str\");\n defaultDBClearer.clearDatabase();\n}\n"
|
"private void placeComponents() {\n this.setLayout(new GridLayout());\n grpLine = new Group(this, SWT.NONE);\n GridLayout glLine = new GridLayout(2, false);\n glLine.horizontalSpacing = 0;\n grpLine.setLayout(glLine);\n grpLine.setLayoutData(new GridData(GridData.FILL_BOTH));\n grpLine.setText(Messages.getString(\"String_Node_Str\"));\n Composite cmpLine = new Composite(grpLine, SWT.NONE);\n {\n GridLayout gl = new GridLayout(2, false);\n gl.marginHeight = 0;\n gl.marginWidth = 0;\n gl.horizontalSpacing = 0;\n gl.verticalSpacing = 0;\n cmpLine.setLayout(gl);\n cmpLine.setLayoutData(new GridData(GridData.FILL_BOTH));\n }\n liacLine = new LineAttributesComposite(cmpLine, SWT.NONE, context, ((LineSeries) series).getLineAttributes(), true, true, true, true, true);\n GridData gdLIACLine = new GridData(GridData.FILL_HORIZONTAL);\n gdLIACLine.horizontalSpan = 2;\n liacLine.setLayoutData(gdLIACLine);\n liacLine.addListener(this);\n if (isShadowNeeded()) {\n Composite cmpShadow = new Composite(cmpLine, SWT.NONE);\n {\n GridLayout gl = new GridLayout(2, false);\n gl.marginHeight = 0;\n gl.marginBottom = 0;\n gl.verticalSpacing = 0;\n cmpShadow.setLayout(gl);\n GridData gd = new GridData(GridData.FILL_HORIZONTAL);\n gd.horizontalSpan = 2;\n cmpShadow.setLayoutData(gd);\n }\n lblShadow = new Label(cmpShadow, SWT.NONE);\n lblShadow.setText(Messages.getString(\"String_Node_Str\"));\n int iFillOption = FillChooserComposite.DISABLE_PATTERN_FILL | FillChooserComposite.ENABLE_TRANSPARENT | FillChooserComposite.ENABLE_TRANSPARENT_SLIDER;\n fccShadow = new FillChooserComposite(cmpShadow, SWT.DROP_DOWN | SWT.READ_ONLY, iFillOption, context, ((LineSeries) series).getShadowColor());\n GridData gdFCCShadow = new GridData(GridData.FILL_HORIZONTAL);\n fccShadow.setLayoutData(gdFCCShadow);\n fccShadow.addListener(this);\n }\n Composite cmp = new Composite(grpLine, SWT.NONE);\n cmp.setLayout(new GridLayout());\n btnPalette = new Button(cmp, SWT.CHECK);\n {\n btnPalette.setText(Messages.getString(\"String_Node_Str\"));\n btnPalette.setSelection(((LineSeries) series).isPaletteLineColor());\n btnPalette.addSelectionListener(this);\n }\n btnCurve = new Button(cmp, SWT.CHECK);\n {\n btnCurve.setText(Messages.getString(\"String_Node_Str\"));\n btnCurve.setSelection(((LineSeries) series).isCurve());\n btnCurve.addSelectionListener(this);\n }\n if (!(series instanceof AreaSeries && (series.isStacked()))) {\n btnMissingValue = new Button(cmp, SWT.CHECK);\n {\n btnMissingValue.setText(Messages.getString(\"String_Node_Str\"));\n btnMissingValue.setSelection(((LineSeries) series).isConnectMissingValue());\n btnMissingValue.addSelectionListener(this);\n }\n }\n enableLineSettings(((LineSeries) series).getLineAttributes().isVisible());\n}\n"
|
"public void initialize(AbstractSession session) throws DescriptorException {\n super.initialize(session);\n if (this.fieldToClassMappings.size() == 0) {\n this.convertClassNamesToClasses(((XMLConversionManager) session.getDatasourcePlatform().getConversionManager()).getLoader());\n }\n Iterator<XMLMapping> mappings = getChoiceElementMappings().values().iterator();\n while (mappings.hasNext()) {\n DatabaseMapping nextMapping = (DatabaseMapping) mappings.next();\n nextMapping.setDescriptor(getDescriptor());\n nextMapping.setAttributeName(this.getAttributeName());\n nextMapping.setAttributeAccessor(getAttributeAccessor());\n Converter converter = null;\n if (fieldsToConverters != null) {\n converter = fieldsToConverters.get(next);\n }\n if (next.getLastXPathFragment().nameIsText()) {\n XMLDirectMapping xmlMapping = new XMLDirectMapping();\n xmlMapping.setAttributeName(this.getAttributeName());\n xmlMapping.setAttributeAccessor(this.getAttributeAccessor());\n xmlMapping.setAttributeClassification(getFieldToClassMappings().get(next));\n XMLConversionManager xmlConversionManager = (XMLConversionManager) session.getDatasourcePlatform().getConversionManager();\n QName schemaType = (QName) xmlConversionManager.getDefaultJavaTypes().get(xmlMapping.getAttributeClassification());\n if (schemaType != null) {\n next.setSchemaType(schemaType);\n }\n xmlMapping.setField(next);\n xmlMapping.setDescriptor(this.getDescriptor());\n if (converter != null) {\n xmlMapping.setConverter(converter);\n }\n this.choiceElementMappings.put(next, xmlMapping);\n xmlMapping.initialize(session);\n } else {\n XMLCompositeObjectMapping xmlMapping = new XMLCompositeObjectMapping();\n xmlMapping.setAttributeName(this.getAttributeName());\n xmlMapping.setAttributeAccessor(this.getAttributeAccessor());\n xmlMapping.setReferenceClass(getFieldToClassMappings().get(next));\n xmlMapping.setField(next);\n xmlMapping.setDescriptor(this.getDescriptor());\n if (converter != null) {\n xmlMapping.setConverter(converter);\n }\n this.choiceElementMappings.put(next, xmlMapping);\n xmlMapping.initialize(session);\n }\n }\n}\n"
|
"protected void doWakefulWork(Intent intent) {\n context = getApplicationContext();\n if (!intent.getBooleanExtra(\"String_Node_Str\", false))\n new Thread(this).start();\n}\n"
|
"public Element disseminateElement(DSpaceObject dso) throws CrosswalkException, IOException, SQLException, AuthorizeException {\n if (dso == null)\n return null;\n else if (dso.getType() == Constants.SITE)\n throw new CrosswalkObjectNotSupported(\"String_Node_Str\");\n Element rightsMD = new Element(\"String_Node_Str\", METSRights_NS);\n rightsMD.setAttribute(\"String_Node_Str\", \"String_Node_Str\");\n Context context = new Context();\n List<ResourcePolicy> policies = AuthorizeManager.getPolicies(context, dso);\n for (ResourcePolicy policy : policies) {\n Group group = policy.getGroup();\n EPerson person = policy.getEPerson();\n Element rightsContext = new Element(\"String_Node_Str\", METSRights_NS);\n rightsMD.addContent(rightsContext);\n if (group != null) {\n String contextClass = GROUP_CONTEXTCLASS;\n if (group.getID() == 0)\n contextClass = ANONYMOUS_CONTEXTCLASS;\n else if (group.getID() == 1)\n contextClass = ADMIN_CONTEXTCLASS;\n rightsContext.setAttribute(\"String_Node_Str\", contextClass);\n if (contextClass.equals(GROUP_CONTEXTCLASS)) {\n try {\n Element rightsUser = new Element(\"String_Node_Str\", METSRights_NS);\n rightsUser.setAttribute(\"String_Node_Str\", GROUP_USERTYPE);\n rightsUser.addContent(PackageUtils.translateGroupNameForExport(context, group.getName()));\n rightsContext.addContent(rightsUser);\n } catch (PackageException pe) {\n throw new CrosswalkException(pe);\n }\n }\n } else if (person != null) {\n rightsContext.setAttribute(\"String_Node_Str\", PERSON_CONTEXTCLASS);\n Element rightsUser = new Element(\"String_Node_Str\", METSRights_NS);\n rightsUser.setAttribute(\"String_Node_Str\", PERSON_USERTYPE);\n rightsUser.addContent(person.getEmail());\n rightsContext.addContent(rightsUser);\n }\n Element rightsPerm = translatePermissions(policy);\n rightsContext.addContent(rightsPerm);\n }\n context.complete();\n return rightsMD;\n}\n"
|
"public static boolean isSignBlock(Block block) {\n return block.getState() instanceof Sign;\n}\n"
|
"public PrevNextFinishConfig getInitialPrevNextFinishConfig() {\n return new PrevNextFinishConfig(!hasPreviousStep, true, false);\n}\n"
|
"Model copy(String URIprefix, String displayId, String version) {\n if (this.checkDescendantsURIcompliance() && isURIprefixCompliant(URIprefix) && isDisplayIdCompliant(displayId) && isVersionCompliant(version)) {\n Model cloned = this.deepCopy();\n cloned.setWasDerivedFrom(this.getIdentity());\n cloned.setPersistentIdentity(createCompliantURI(URIprefix, displayId, \"String_Node_Str\"));\n cloned.setDisplayId(displayId);\n cloned.setVersion(version);\n URI newIdentity = URI.create(URIprefix + '/' + displayId + '/' + version);\n cloned.setIdentity(newIdentity);\n return cloned;\n } else {\n return null;\n }\n}\n"
|
"private static SimpleDateFormat getAbbrMonthFormat() {\n if (abbrMonthFormat == null)\n abbrMonthFormat = new SimpleDateFormat(\"String_Node_Str\", defaultLocale);\n return abbrMonthFormat;\n } finally {\n Context.exit();\n }\n}\n"
|
"public static void main(String[] argv) throws IOException, SQLException, AuthorizeException {\n final String USAGE = \"String_Node_Str\" + \"String_Node_Str\";\n final String loginRE = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n Options options = new Options();\n options.addOption(\"String_Node_Str\", \"String_Node_Str\", false, \"String_Node_Str\");\n options.addOption(\"String_Node_Str\", \"String_Node_Str\", false, \"String_Node_Str\");\n options.addOption(\"String_Node_Str\", \"String_Node_Str\", false, \"String_Node_Str\");\n PosixParser parser = new PosixParser();\n CommandLine command = null;\n try {\n command = parser.parse(options, argv);\n } catch (org.apache.commons.cli.ParseException ex) {\n System.err.println(ex.getMessage());\n if (!(ex instanceof MissingOptionException))\n new HelpFormatter().printHelp(USAGE, options);\n System.exit(1);\n }\n if (command.hasOption('h')) {\n System.out.println(\"String_Node_Str\");\n System.out.println();\n new HelpFormatter().printHelp(USAGE, options);\n System.exit(0);\n }\n final boolean VERBOSE = command.hasOption('v');\n final boolean PRETEND = command.hasOption('p');\n String[] args = command.getArgs();\n final Properties rmProps = new Properties();\n rmProps.put(RecordManagerOptions.DISABLE_TRANSACTIONS, \"String_Node_Str\");\n String dbname = new File(System.getProperty(\"String_Node_Str\"), \"String_Node_Str\").getCanonicalPath();\n if (VERBOSE)\n System.out.println(\"String_Node_Str\" + dbname);\n RecordManager stamps = RecordManagerFactory.createRecordManager(dbname, rmProps);\n BTree stampDb = BTree.createInstance(stamps, new StringComparator());\n final Pattern loginCracker = Pattern.compile(loginRE);\n final SimpleDateFormat dateEncoder = new SimpleDateFormat(\"String_Node_Str\");\n for (String logName : args) {\n BufferedReader logReader = new BufferedReader(new FileReader(logName));\n while (true) {\n String line = logReader.readLine();\n if (null == line)\n break;\n if (!line.contains(\"String_Node_Str\"))\n continue;\n Matcher loginMatcher = loginCracker.matcher(line);\n if (!loginMatcher.matches())\n continue;\n String date = loginMatcher.group(1);\n String time = loginMatcher.group(2);\n String user = loginMatcher.group(3);\n String logDateTime = date + ' ' + time;\n Date stamp;\n try {\n stamp = dateEncoder.parse(logDateTime);\n } catch (ParseException ex) {\n System.err.println(\"String_Node_Str\" + ex.getMessage());\n continue;\n }\n Date previous = (Date) stampDb.find(user);\n if (null == previous || stamp.after(previous)) {\n stampDb.insert(user, stamp, true);\n }\n }\n logReader.close();\n }\n TupleBrowser walker = stampDb.browse();\n Tuple stamp = new Tuple();\n Context ctx = new Context();\n ctx.turnOffAuthorisationSystem();\n EPersonService ePersonService = EPersonServiceFactory.getInstance().getEPersonService();\n while (walker.getNext(stamp)) {\n String name = (String) stamp.getKey();\n Date date = (Date) stamp.getValue();\n EPerson ePerson;\n ePerson = ePersonService.findByEmail(ctx, name);\n if (null == ePerson)\n ePerson = ePersonService.findByNetid(ctx, name);\n if (null == ePerson) {\n System.err.println(\"String_Node_Str\" + name);\n continue;\n }\n Date previous = ePerson.getLastActive();\n if ((null == previous) || date.after(previous)) {\n if (PRETEND) {\n System.out.printf(\"String_Node_Str\", ePerson.getID().toString(), date, ePerson.getEmail(), ePerson.getNetid(), ePerson.getFullName());\n } else {\n ePerson.setLastActive(date);\n ePersonService.update(ctx, ePerson);\n }\n }\n }\n ctx.complete();\n stamps.close();\n File target;\n target = new File(dbname + \"String_Node_Str\");\n if (target.exists())\n target.delete();\n target = new File(dbname + \"String_Node_Str\");\n if (target.exists())\n target.delete();\n}\n"
|
"private double asRelativeValue(final InformationLoss<?> infoLoss) {\n if (model != null && model.getResult() != null && model.getResult().getLattice() != null && model.getResult().getLattice().getBottom() != null && model.getResult().getLattice().getTop() != null) {\n return infoLoss.relativeTo(model.getResult().getLattice().getMinimumInformationLoss(), model.getResult().getLattice().getMaximumInformationLoss()) * 100d;\n } else {\n return 0;\n }\n}\n"
|
"public String promptAndSwallowCR() {\n int c;\n StringBuilder buf = new StringBuilder();\n while ((c = scan()) != '\\n') {\n if (c == 127) {\n if (buf.length() != 0) {\n buf.deleteCharAt(buf.length() - 1);\n cursorLeft(1);\n print(\"String_Node_Str\");\n cursorLeft(1);\n }\n continue;\n }\n write((byte) c);\n buf.append((char) c);\n }\n return buf.toString();\n}\n"
|
"public void initialize() throws IllegalActionException {\n try {\n super.initialize();\n _secretKey = (SecretKey) _createSymmetricKey();\n _cipher.init(Cipher.ENCRYPT_MODE, _secretKey);\n _algorithmParameters = _cipher.getParameters();\n FIRST_RUN = true;\n } catch (Exception ex) {\n throw new IllegalActionException(this, ex, \"String_Node_Str\");\n }\n}\n"
|
"public void testRelativeUriResolutionPut() {\n skipIfMethodNotAllowed(HttpMethod.PUT);\n String resourceUri = getResourceUri();\n Response response = RestAssured.given().header(ACCEPT, TEXT_TURTLE).expect().statusCode(isSuccessful()).header(ETAG, isValidEntityTag()).when().get(resourceUri);\n String eTag = response.getHeader(ETAG);\n Model model = response.as(Model.class, new RdfObjectMapper(resourceUri));\n ResourceUtils.renameResource(model.getResource(resourceUri), \"String_Node_Str\");\n updateResource(model.getResource(\"String_Node_Str\"));\n Response put = RestAssured.given().contentType(TEXT_TURTLE).header(IF_MATCH, eTag).body(model, new RdfObjectMapper(\"String_Node_Str\")).when().put(resourceUri);\n if (!isSuccessful().matches(put.getStatusCode())) {\n throw new SkipException(\"String_Node_Str\");\n }\n model = RestAssured.given().header(ACCEPT, TEXT_TURTLE).expect().statusCode(isSuccessful()).when().get(resourceUri).as(Model.class, new RdfObjectMapper(resourceUri));\n verifyUpdatedResource(model.getResource(resourceUri));\n}\n"
|
"public <T> void delete(Query<T> query, WriteConcern wc) {\n QueryImpl<T> q = (QueryImpl<T>) query;\n DBCollection dbColl = q.getCollection();\n if (dbColl == null)\n dbColl = getCollection(q.getEntityClass());\n WriteResult wr;\n if (q.getSortObject() != null || q.getOffset() != 0 || q.getLimit() > 0)\n throw new QueryException(\"String_Node_Str\");\n if (q.getQueryObject() != null)\n if (wc == null)\n wr = dbColl.remove(q.getQueryObject());\n else\n wr = dbColl.remove(q.getQueryObject(), wc);\n else if (wc == null)\n wr = dbColl.remove(new BasicDBObject());\n else\n wr = dbColl.remove(new BasicDBObject(), wc);\n throwOnError(wc, wr);\n}\n"
|
"public void onRefreshStarted() {\n updatePostAndComments();\n}\n"
|
"public RepositorySession createSession() {\n try {\n MetadataRepository metadataRepository = new JcrMetadataRepository(metadataFacetFactories, repository);\n return new RepositorySession(metadataRepository, getMetadataResolver());\n } catch (RepositoryException e) {\n throw new RuntimeException(e);\n }\n}\n"
|
"public void processAlignmentEntry(final AlignmentReader alignmentReader, final Alignments.AlignmentEntry alignmentEntry) {\n String basename = alignmentReader.basename();\n basename = FilenameUtils.getName(AlignmentReaderImpl.getBasename(basename));\n switch(outputFormat) {\n case CONCISE:\n {\n if (alignmentEntry.getSequenceVariationsCount() > 0) {\n outputStream.print(String.format(\"String_Node_Str\", alignmentEntry.getQueryIndex(), getReferenceId(alignmentEntry.getTargetIndex())));\n boolean variations = false;\n for (final Alignments.SequenceVariation var : alignmentEntry.getSequenceVariationsList()) {\n final int positionOnReference = alignmentEntry.getPosition() + var.getPosition();\n final int referenceIndex = alignmentEntry.getTargetIndex();\n boolean keepVar = true;\n keepVar = determineKeepVariation(positionOnReference, referenceIndex, keepVar);\n if (keepVar) {\n variations = true;\n outputStream.print(String.format(\"String_Node_Str\", positionOnReference, var.getReadIndex(), var.getFrom(), var.getTo()));\n }\n }\n if (variations) {\n outputStream.println();\n }\n }\n }\n break;\n case TSV:\n case TAB_DELIMITED:\n {\n final boolean variations = false;\n for (final Alignments.SequenceVariation var : alignmentEntry.getSequenceVariationsList()) {\n final int positionOnReference = alignmentEntry.getPosition() + var.getPosition();\n final int readIndex = var.getReadIndex();\n final String from = var.getFrom();\n final String to = var.getTo();\n final int referenceIndex = alignmentEntry.getTargetIndex();\n final byte[] qualityScores;\n if (var.hasToQuality()) {\n System.out.println(\"String_Node_Str\");\n qualityScores = var.getToQuality().toByteArray();\n } else {\n System.out.println(\"String_Node_Str\");\n qualityScores = null;\n }\n boolean keepVar = true;\n keepVar = determineKeepVariation(positionOnReference, referenceIndex, keepVar);\n if (keepVar && !isAllNs(to)) {\n printTab(alignmentEntry, basename, positionOnReference, readIndex, from, to, qualityScores);\n }\n }\n }\n break;\n case TAB_SINGLE_BASE:\n {\n for (final Alignments.SequenceVariation var : alignmentEntry.getSequenceVariationsList()) {\n final int positionOnReference = alignmentEntry.getPosition() + var.getPosition();\n final int readIndex = var.getReadIndex();\n final String from = var.getFrom();\n final String to = var.getTo();\n final int fromLength = from.length();\n final int toLength = to.length();\n final int referenceIndex = alignmentEntry.getTargetIndex();\n final byte[] qualityScores;\n if (var.hasToQuality()) {\n qualityScores = var.getToQuality().toByteArray();\n } else {\n qualityScores = null;\n }\n boolean keepVar = true;\n keepVar = determineKeepVariation(positionOnReference, referenceIndex, keepVar);\n if (keepVar && !isAllNs(to)) {\n final int maxLength = Math.max(fromLength, toLength);\n int fromOffset = 0;\n int toOffset = 0;\n int readIndexIncrementValue = (alignmentEntry.getMatchingReverseStrand() ? -1 : 1);\n byte[] toScore;\n if (qualityScores != null) {\n toScore = new byte[1];\n } else {\n toScore = null;\n }\n for (int i = 0; i < maxLength; i++) {\n final char fromChar = var.getFrom().charAt(i);\n final char toChar = var.getTo().charAt(i);\n if (qualityScores != null) {\n if (i < qualityScores.length) {\n toScore[0] = qualityScores[i];\n } else {\n toScore = null;\n }\n }\n printTab(alignmentEntry, basename, positionOnReference + fromOffset, readIndex + toOffset, i < fromLength ? Character.toString(fromChar) : \"String_Node_Str\", i < toLength ? Character.toString(toChar) : \"String_Node_Str\", toScore);\n if (fromChar != '-') {\n fromOffset += 1;\n }\n if (toChar != '-') {\n toOffset += readIndexIncrementValue;\n }\n }\n }\n }\n }\n break;\n }\n}\n"
|
"private List<Sample> matchSampleName(String name) throws IOException, JAXBException {\n JaxbObject<SampleList> jaxb = new JaxbObject<SampleList>();\n SampleList list = (SampleList) findObject(\"String_Node_Str\", \"String_Node_Str\" + name, jaxb, new SampleList());\n if (list != null)\n return list.getList();\n return null;\n}\n"
|
"public void onResume() {\n super.onResume();\n mIsActive = true;\n setContentPane(mRootPane);\n setLoadingBit(BIT_LOADING_RELOAD);\n mAlbumSetDataAdapter.resume();\n mAlbumSetView.resume();\n mEyePosition.resume();\n mActionModeHandler.resume();\n GalleryActionBar actionBar = mActivity.getGalleryActionBar();\n if (mShowClusterMenu && actionBar != null) {\n actionBar.enableClusterMenu(mSelectedAction, this);\n }\n if (!mInitialSynced) {\n setLoadingBit(BIT_LOADING_SYNC);\n mSyncTask = mMediaSet.requestSync(AlbumSetPage.this);\n }\n}\n"
|
"public synchronized LttngEventField getField(String name) {\n if (name.equals(LttngEventType.CONTENT_LABEL) || name.equals(ITmfEvent.EVENT_FIELD_CONTENT)) {\n return new LttngEventField(LttngEventType.CONTENT_LABEL, toString());\n } else if (name.equals(LttngEventType.MARKER_LABEL) || name.equals(ITmfEvent.EVENT_FIELD_TYPE)) {\n return new LttngEventField(fParentEvent.getType().getName());\n } else if (name.equals(LttngEventType.TRACE_LABEL) || name.equals(ITmfEvent.EVENT_FIELD_REFERENCE)) {\n return new LttngEventField(fParentEvent.getReference());\n } else if (name.equals(LttngEventType.TIMESTAMP_LABEL) || name.equals(ITmfEvent.EVENT_FIELD_TIMESTAMP)) {\n return new LttngEventField(fParentEvent.getTimestamp().toString());\n } else if (name.equals(ITmfEvent.EVENT_FIELD_SOURCE)) {\n return new LttngEventField(fParentEvent.getSource());\n }\n LttngEventField returnedField = fFieldsMap.get(name);\n if (returnedField == null) {\n JniEvent tmpEvent = ((LttngEvent) getEvent()).convertEventTmfToJni();\n if (tmpEvent != null) {\n Object newValue = tmpEvent.parseFieldByName(name);\n if (newValue != null) {\n returnedField = new LttngEventField(name, newValue);\n fFieldsMap.put(name, returnedField);\n }\n }\n }\n return returnedField;\n}\n"
|
"Resources getTopLevelResources(String appDir) {\n synchronized (mPackages) {\n WeakReference<Resources> wr = mActiveResources.get(appDir);\n Resources r = wr != null ? wr.get() : null;\n if (r != null && r.getAssets().isUpToDate()) {\n return r;\n }\n AssetManager assets = new AssetManager();\n if (assets.addAssetPath(appDir) == 0) {\n return null;\n }\n Configuration config = getConfiguration();\n if (config != null && config.customTheme != null) {\n String resourcePath = config.customTheme.getThemeResourcePath();\n if (resourcePath != null) {\n if (assets.addAssetPath(resourcePath) == 0) {\n Log.e(TAG, \"String_Node_Str\" + resourcePath);\n }\n }\n PackageInfo pi = getPackageInfo(config.customTheme.getThemePackageName(), 0);\n if (pi != null) {\n String resDir = pi.getResDir();\n if (assets.addAssetPath(resDir) == 0) {\n Log.e(TAG, \"String_Node_Str\" + resDir);\n }\n }\n }\n DisplayMetrics metrics = getDisplayMetricsLocked(false);\n r = new Resources(assets, metrics, config);\n mActiveResources.put(appDir, new WeakReference<Resources>(r));\n return r;\n }\n}\n"
|
"private ArrayList<String> buildFilterPaths(final IResource[] inResources, final File[] inFiles, final Repository db) throws IllegalStateException {\n final ArrayList<String> paths;\n if (inResources != null) {\n paths = new ArrayList<String>(inResources.length);\n for (final IResource r : inResources) {\n final RepositoryMapping map = RepositoryMapping.getMapping(r);\n if (map == null)\n continue;\n if (db != map.getRepository()) {\n throw new IllegalStateException(UIText.AbstractHistoryCommanndHandler_NoUniqueRepository);\n }\n if (showAllFilter == ShowFilter.SHOWALLFOLDER) {\n final String path;\n if (r.getParent() instanceof IWorkspaceRoot)\n path = map.getRepoRelativePath(r.getProject());\n else\n path = map.getRepoRelativePath(r.getParent());\n if (path != null && path.length() > 0)\n paths.add(path);\n } else if (showAllFilter == ShowFilter.SHOWALLPROJECT) {\n final String path = map.getRepoRelativePath(r.getProject());\n if (path != null && path.length() > 0)\n paths.add(path);\n } else if (showAllFilter == ShowFilter.SHOWALLREPO) {\n } else {\n final String path = map.getRepoRelativePath(r);\n if (path != null && path.length() > 0)\n paths.add(path);\n }\n }\n } else if (inFiles != null) {\n IPath workdirPath = new Path(db.getWorkTree().getPath());\n IPath gitDirPath = new Path(db.getDirectory().getPath());\n int segmentCount = workdirPath.segmentCount();\n paths = new ArrayList<String>(inFiles.length);\n for (File file : inFiles) {\n IPath filePath;\n if (showAllFilter == ShowFilter.SHOWALLFOLDER) {\n filePath = new Path(file.getParentFile().getPath());\n } else if (showAllFilter == ShowFilter.SHOWALLPROJECT || showAllFilter == ShowFilter.SHOWALLREPO) {\n continue;\n } else {\n filePath = new Path(file.getPath());\n }\n if (gitDirPath.isPrefixOf(filePath)) {\n throw new IllegalStateException(NLS.bind(UIText.GitHistoryPage_FileOrFolderPartOfGitDirMessage, filePath.toOSString()));\n }\n IPath pathToAdd = filePath.removeFirstSegments(segmentCount).setDevice(null);\n if (!pathToAdd.isEmpty()) {\n paths.add(pathToAdd.toString());\n }\n }\n } else {\n paths = new ArrayList<String>(0);\n }\n return paths;\n}\n"
|
"public void saveModel() throws IllegalActionException {\n for (int i = 0; i < getRowCount() - 1; i++) {\n StringBuffer selfTransitionExpression = new StringBuffer();\n StringBuffer enterModeExpression = new StringBuffer();\n String guard = \"String_Node_Str\";\n String value = \"String_Node_Str\";\n State state = (State) _model.getEntity((String) getValueAt(i, 0));\n for (int j = 0; j < getColumnCount() - 1; j++) {\n int contentIndex = _getContentIndex(i, j);\n String condition = (String) getValueAt(i, j + 1);\n value = (String) getValueAt(getRowCount() - 1, j + 1);\n String[] conditions = _handleInmodeExpression(condition, value, state);\n String enterModeCondition = \"String_Node_Str\";\n if (condition.contains(\"String_Node_Str\")) {\n enterModeCondition = \"String_Node_Str\";\n } else {\n enterModeCondition = conditions[1];\n }\n condition = conditions[0];\n if (condition.equals(\"String_Node_Str\")) {\n condition = \"String_Node_Str\";\n }\n if (!guard.equals(\"String_Node_Str\")) {\n guard = guard + \"String_Node_Str\";\n }\n guard = guard + condition;\n if (enterModeCondition.equals(\"String_Node_Str\")) {\n enterModeCondition = \"String_Node_Str\";\n }\n selfTransitionExpression = selfTransitionExpression + \"String_Node_Str\" + condition + \"String_Node_Str\" + value + \"String_Node_Str\";\n enterModeExpression = enterModeExpression + \"String_Node_Str\" + enterModeCondition + \"String_Node_Str\" + value + \"String_Node_Str\";\n }\n selfTransitionExpression = selfTransitionExpression + \"String_Node_Str\" + value;\n enterModeExpression = enterModeExpression + \"String_Node_Str\" + value;\n for (int j = 0; j < getColumnCount() - 1; j++) {\n selfTransitionExpression = selfTransitionExpression + \"String_Node_Str\";\n enterModeExpression = enterModeExpression + \"String_Node_Str\";\n }\n Transition transition = SCRTableHelper.getSelfTransition(state, _parameter);\n if (transition == null) {\n try {\n transition = new Transition(_model, ((CompositeEntity) _model).uniqueName(state.getName() + \"String_Node_Str\"));\n state.outgoingPort.link(transition);\n state.incomingPort.link(transition);\n } catch (IllegalActionException e) {\n e.printStackTrace();\n } catch (NameDuplicationException e) {\n e.printStackTrace();\n }\n }\n transition.setActions.setExpression(_parameter.getName() + \"String_Node_Str\" + selfTransitionExpression);\n transition.guardExpression.setExpression(guard);\n boolean noSetActionSet = true;\n for (Object relation : state.incomingPort.linkedRelationList()) {\n if (!state.outgoingPort.linkedRelationList().contains(relation)) {\n transition = (Transition) relation;\n String newExpression = _parameter.getName() + \"String_Node_Str\" + enterModeExpression;\n String expression = transition.setActions.getExpression();\n System.out.println(\"String_Node_Str\" + expression);\n try {\n if (transition.setActions.getDestinations().contains(_parameter)) {\n int index = expression.indexOf(_parameter.getName() + \"String_Node_Str\");\n String before = expression.substring(0, index);\n int afterIdx = expression.indexOf(\"String_Node_Str\", index + 1);\n String after = \"String_Node_Str\";\n if (afterIdx > 0) {\n after = expression.substring(afterIdx).trim();\n if (after.startsWith(\"String_Node_Str\")) {\n after = after.substring(1).trim();\n }\n }\n expression = before + after;\n expression = expression.trim();\n }\n if (!expression.equals(\"String_Node_Str\") && !expression.endsWith(\"String_Node_Str\")) {\n expression = expression + \"String_Node_Str\";\n }\n System.out.println(\"String_Node_Str\" + expression + newExpression);\n transition.setActions.setExpression(expression + newExpression);\n transition.setActions.setPersistent(true);\n noSetActionSet = false;\n } catch (IllegalActionException e) {\n throw e;\n }\n }\n }\n if (noSetActionSet) {\n throw new IllegalActionException(_model, \"String_Node_Str\" + state.getName());\n }\n }\n}\n"
|
"private SDOTypeHelperDelegate getSDOTypeHelperDelegate() {\n HelperContext hCtx = SDOHelperContext.getHelperContext(getDelegateMapKey());\n return (SDOTypeHelperDelegate) hCtx.getTypeHelper();\n}\n"
|
"public Date getOrder() {\n return createDate(2010, 8, 15);\n}\n"
|
"public IParameterMetaData getParameterMetaData() throws OdaException {\n assertNotNull(callStat);\n int[] positionArray = paramUtil.getParameterPositions();\n List paramMetaList1 = this.getCallableParamMetaData();\n List paramMetaList2 = new ArrayList();\n for (int i = 0; i < positionArray.length; i++) {\n int index = positionArray[i];\n paramMetaList2.add(paramMetaList1.get(index - 1));\n }\n return new SPParameterMetaData(paramMetaList2);\n}\n"
|
"private boolean quoteElement(String nextElement) {\n if (quoteAllFields) {\n return true;\n }\n if (nextElement == null) {\n return false;\n }\n for (int j = 0; j < nextElement.length(); j++) {\n char nextChar = nextElement.charAt(j);\n if (nextChar == separator || nextChar == newLine || nextChar == quotechar) {\n return true;\n }\n }\n return false;\n}\n"
|
"private Report executeOnFile(IndexService index, ModelService model, StorageService storage, List<File> list) throws PluginException {\n PluginState pluginResultState = PluginState.SUCCESS;\n Set<String> aipSet = new HashSet<String>();\n boolean notify = true;\n String newRepresentationID = null;\n String newFileId = null;\n ArrayList<File> newFiles = new ArrayList<File>();\n String detailExtension = \"String_Node_Str\";\n Report report = PluginHelper.createPluginReport(this);\n Report reportItem = null;\n for (File file : list) {\n try {\n LOGGER.debug(\"String_Node_Str\" + file.getId());\n newRepresentationID = UUID.randomUUID().toString();\n reportItem = PluginHelper.createPluginReportItem(this, file.getId(), null);\n if (!file.isDirectory()) {\n IndexedFile ifile = index.retrieve(IndexedFile.class, IdUtils.getFileId(file));\n String fileMimetype = ifile.getFileFormat().getMimeType();\n String filePronom = ifile.getFileFormat().getPronom();\n String fileFormat = ifile.getId().substring(ifile.getId().lastIndexOf('.') + 1);\n List<String> applicableTo = getApplicableTo();\n List<String> convertableTo = getConvertableTo();\n Map<String, List<String>> pronomToExtension = getPronomToExtension();\n Map<String, List<String>> mimetypeToExtension = getMimetypeToExtension();\n if (doPluginExecute(fileFormat, filePronom, fileMimetype, applicableTo, convertableTo, pronomToExtension, mimetypeToExtension)) {\n fileFormat = getNewFileFormat(fileFormat, filePronom, fileMimetype, applicableTo, pronomToExtension, mimetypeToExtension);\n StoragePath fileStoragePath = ModelUtils.getFileStoragePath(file);\n DirectResourceAccess directAccess = storage.getDirectAccess(fileStoragePath);\n LOGGER.debug(\"String_Node_Str\" + fileFormat + \"String_Node_Str\" + outputFormat + \"String_Node_Str\" + file.getId());\n try {\n Path pluginResult = Files.createTempFile(\"String_Node_Str\", \"String_Node_Str\" + getOutputFormat());\n String result = executePlugin(directAccess.getPath(), pluginResult, fileFormat);\n ContentPayload payload = new FSPathContentPayload(pluginResult);\n StoragePath storagePath = ModelUtils.getRepresentationStoragePath(file.getAipId(), file.getRepresentationId());\n LOGGER.debug(\"String_Node_Str\" + newRepresentationID + \"String_Node_Str\" + file.getAipId());\n boolean original = false;\n model.createRepresentation(file.getAipId(), newRepresentationID, original, model.getStorage(), storagePath);\n newFileId = file.getId().replaceFirst(\"String_Node_Str\", \"String_Node_Str\" + outputFormat);\n model.deleteFile(file.getAipId(), newRepresentationID, file.getPath(), file.getId(), notify);\n File f = model.createFile(file.getAipId(), newRepresentationID, file.getPath(), newFileId, payload, notify);\n newFiles.add(f);\n aipSet.add(file.getAipId());\n reportItem.setPluginState(PluginState.SUCCESS).setPluginDetails(result);\n } catch (CommandException e) {\n detailExtension += file.getId() + \"String_Node_Str\" + e.getOutput();\n pluginResultState = 2;\n reportItem.setPluginState(PluginState.PARTIAL_SUCCESS).setPluginDetails(e.getMessage());\n LOGGER.debug(\"String_Node_Str\" + fileFormat + \"String_Node_Str\" + outputFormat + \"String_Node_Str\" + file.getId() + \"String_Node_Str\" + file.getRepresentationId() + \"String_Node_Str\" + file.getAipId());\n }\n }\n }\n } catch (RuntimeException | NotFoundException | GenericException | RequestNotValidException | AuthorizationDeniedException | ValidationException | IOException | AlreadyExistsException e) {\n LOGGER.error(\"String_Node_Str\" + file.getId() + \"String_Node_Str\" + e.getMessage(), e);\n pluginResultState = 0;\n reportItem.setPluginState(PluginState.FAILURE).setPluginDetails(e.getMessage());\n }\n boolean notifyEvent = false;\n createEvent(Arrays.asList(file), newFiles, file.getAipId(), newRepresentationID, model, outputFormat, pluginResultState, detailExtension, notifyEvent);\n report.addReport(reportItem);\n }\n try {\n AbstractConvertPluginUtils.reIndexPlugins(model, aipSet);\n } catch (Throwable e) {\n LOGGER.debug(\"String_Node_Str\");\n }\n return report;\n}\n"
|
"private void initTagletManager(Set<List<String>> customTagStrs) {\n tagletManager = tagletManager == null ? new TagletManager(nosince, showversion, showauthor, javafx, this) : tagletManager;\n for (List<String> args : customTagStrs) {\n if (args.get(0).equals(\"String_Node_Str\")) {\n tagletManager.addCustomTag(args.get(1), getFileManager(), tagletpath);\n continue;\n }\n List<String> tokens = tokenize(args.get(1), TagletManager.SIMPLE_TAGLET_OPT_SEPARATOR, 3);\n switch(tokens.size()) {\n case 1:\n String tagName = args.get(1);\n if (tagletManager.isKnownCustomTag(tagName)) {\n tagletManager.addNewSimpleCustomTag(tagName, null, \"String_Node_Str\");\n } else {\n StringBuilder heading = new StringBuilder(tagName + \"String_Node_Str\");\n heading.setCharAt(0, Character.toUpperCase(tagName.charAt(0)));\n tagletManager.addNewSimpleCustomTag(tagName, heading.toString(), \"String_Node_Str\");\n }\n break;\n case 2:\n tagletManager.addNewSimpleCustomTag(tokens.get(0), tokens.get(1), \"String_Node_Str\");\n break;\n case 3:\n tagletManager.addNewSimpleCustomTag(tokens.get(0), tokens.get(2), tokens.get(1));\n break;\n default:\n Messages messages = getMessages();\n messages.error(\"String_Node_Str\", args.get(1));\n }\n }\n}\n"
|
"public StormMetrics start() {\n long now = System.currentTimeMillis();\n final long endTime = now + totalTime;\n long totalLat = 0L;\n int count = 0;\n try {\n final String confFile = String.format(METRICS_CONF_FORMAT, path, topoName, now);\n final String dataFile = String.format(METRICS_FILE_FORMAT, path, topoName, now);\n PrintWriter confWriter = FileUtils.createFileWriter(path, confFile);\n PrintWriter dataWriter = FileUtils.createFileWriter(path, dataFile);\n writeStormConfig(confWriter);\n while (now < endTime) {\n Thread.sleep(pollInterval);\n long lat = execute(nextArg());\n dataWriter.println(String.format(\"String_Node_Str\", lat));\n dataWriter.flush();\n totalLat += lat;\n count++;\n now = System.currentTimeMillis();\n }\n long avgLat = 0 == count ? 0L : totalLat / count;\n dataWriter.println(String.format(\"String_Node_Str\", avgLat));\n dataWriter.close();\n } catch (Exception e) {\n LOG.error(\"String_Node_Str\", e);\n }\n return this;\n}\n"
|
"private void setLanguagePreference(String preference) {\n Utility.storeUserProfileEntry(Utility.getQualifiedUsername(), \"String_Node_Str\", null, Utility.getQualifiedUsername(), preference, \"String_Node_Str\");\n String newURL = Window.Location.createUrlBuilder().setParameter(LocaleInfo.getLocaleQueryParam(), preference).buildString();\n Window.Location.replace(newURL);\n}\n"
|
"public String getFileName(String imageUrl) {\n if (StringUtils.isEmpty(imageUrl)) {\n return DEFAULT_FILE_NAME;\n }\n String ext = (fileExtension == null ? FileUtils.getFileExtension(imageUrl) : fileExtension);\n String fileName = (imageUrl.length() > MAX_FILE_NAME_LENGTH ? imageUrl.substring(imageUrl.length() - MAX_FILE_NAME_LENGTH, imageUrl.length()) : imageUrl).replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n return StringUtils.isEmpty(ext) ? fileName : (new StringBuilder().append(fileName).append(\"String_Node_Str\").append(ext.replaceAll(\"String_Node_Str\", \"String_Node_Str\")).toString());\n}\n"
|
"private void paintSplitStations(Graphics2D g2) {\n int numStations = getHexModel().getStations().size();\n for (int i = 0; i < numStations; i++) {\n numTokens = getHexModel().getTokens(i).size();\n tokens = (ArrayList) getHexModel().getTokens(i);\n for (int j = 0; j < tokens.size(); j++) {\n PublicCompany co = (PublicCompany) tokens.get(j);\n switch(numStations) {\n case 2:\n switch(i) {\n case 0:\n origin.y += -5;\n case 1:\n origin.y += 5;\n default:\n break;\n }\n case 3:\n switch(i) {\n case 0:\n case 1:\n case 2:\n default:\n break;\n }\n default:\n break;\n }\n drawToken(g2, co, origin);\n }\n }\n}\n"
|
"public void delete(final Long userId) throws NotFoundException, WorkflowException, PropagationException, UnauthorizedRoleException {\n LOG.debug(\"String_Node_Str\", userId);\n notificationManager.createTasks(new WorkflowResult<Long>(userId, null, \"String_Node_Str\"));\n List<PropagationTask> tasks = propagationManager.getDeleteTaskIds(userId);\n propagationManager.execute(tasks);\n wfAdapter.delete(userId);\n LOG.debug(\"String_Node_Str\", userId);\n}\n"
|
"public void loadAndChangeAvatar(final AvatarConfigInfo avatarConfigInfo) {\n logger.info(\"String_Node_Str\");\n WlAvatarCharacter avatar = loadAvatar(avatarConfigInfo);\n logger.warning(\"String_Node_Str\");\n changeAvatar(avatar);\n logger.warning(\"String_Node_Str\");\n}\n"
|
"private void testFileSystem() throws IOException {\n FilePathReorderWrites fs = FilePathReorderWrites.register();\n FilePathReorderWrites.setPartialWrites(false);\n String fileName = \"String_Node_Str\";\n final ByteBuffer empty = ByteBuffer.allocate(1024);\n Random r = new Random(1);\n long minSize = Long.MAX_VALUE;\n long maxSize = 0;\n int minWritten = Integer.MAX_VALUE;\n int maxWritten = 0;\n for (int i = 0; i < 100; i++) {\n fs.setPowerOffCountdown(100, i);\n FileUtils.delete(fileName);\n FileChannel fc = FilePath.get(fileName).open(\"String_Node_Str\");\n for (int j = 0; j < 20; j++) {\n fc.write(empty, j * 1024);\n empty.flip();\n }\n fs.setPowerOffCountdown(4 + r.nextInt(20), i);\n int lastWritten = 0;\n int lastTruncated = 0;\n for (int j = 20; j >= 0; j--) {\n try {\n byte[] bytes = new byte[1024];\n Arrays.fill(bytes, (byte) j);\n ByteBuffer data = ByteBuffer.wrap(bytes);\n fc.write(data, 0);\n lastWritten = j;\n } catch (IOException e) {\n break;\n }\n try {\n fc.truncate(j * 1024);\n lastTruncated = j * 1024;\n } catch (IOException e) {\n break;\n }\n }\n if (lastTruncated <= 0 || lastWritten <= 0) {\n fail();\n }\n fs.setPowerOffCountdown(100, 0);\n fc = FilePath.get(fileName).open(\"String_Node_Str\");\n ByteBuffer data = ByteBuffer.allocate(1024);\n fc.read(data, 0);\n data.flip();\n int got = data.get();\n long size = fc.size();\n minSize = Math.min(minSize, size);\n maxSize = Math.max(minSize, size);\n minWritten = Math.min(minWritten, got);\n maxWritten = Math.max(maxWritten, got);\n }\n assertTrue(minSize < maxSize);\n assertTrue(minWritten < maxWritten);\n FileUtils.delete(fileName);\n}\n"
|
"public synchronized void requestInstance(final JobID jobID, final Configuration conf, final InstanceRequestMap instanceRequestMap, final List<String> splitAffinityList) throws InstanceException {\n final List<AllocatedSlice> newlyAllocatedSlicesOfJob = new ArrayList<AllocatedSlice>();\n final Map<InstanceType, Integer> pendingRequests = new HashMap<InstanceType, Integer>();\n for (final Iterator<Map.Entry<InstanceType, Integer>> it = instanceRequestMap.getMaximumIterator(); it.hasNext(); ) {\n final Map.Entry<InstanceType, Integer> entry = it.next();\n final int maximumNumberOfInstances = entry.getValue().intValue();\n for (int i = 0; i < maximumNumberOfInstances; i++) {\n LOG.info(\"String_Node_Str\" + entry.getKey().getIdentifier());\n final AllocatedSlice slice = getSliceOfType(jobID, entry.getKey());\n if (slice == null) {\n if (i < instanceRequestMap.getMinimumNumberOfInstances(entry.getKey())) {\n removeAllSlicesOfJob(jobID);\n throw new InstanceException(\"String_Node_Str\");\n } else {\n final int numberOfRemainingInstances = maximumNumberOfInstances - i;\n if (numberOfRemainingInstances > 0) {\n PendingRequestsMap pendingRequests = this.pendingRequestsOfJob.get(jobID);\n if (pendingRequests == null) {\n pendingRequests = new PendingRequestsMap();\n this.pendingRequestsOfJob.put(jobID, pendingRequests);\n }\n pendingRequests.addRequest(entry.getKey(), numberOfRemainingInstances);\n }\n break;\n }\n }\n List<AllocatedSlice> allocatedSlices = this.slicesOfJobs.get(jobID);\n if (allocatedSlices == null) {\n allocatedSlices = new ArrayList<AllocatedSlice>();\n this.slicesOfJobs.put(jobID, allocatedSlices);\n }\n allocatedSlices.add(slice);\n allocatedResources.add(new AllocatedResource(slice.getHostingInstance(), slice.getType(), slice.getAllocationID()));\n }\n }\n if (this.instanceListener != null) {\n final ClusterInstanceNotifier clusterInstanceNotifier = new ClusterInstanceNotifier(this.instanceListener, jobID, allocatedResources);\n clusterInstanceNotifier.start();\n }\n}\n"
|
"public List disseminateList(DSpaceObject dso) throws CrosswalkException, IOException, SQLException, AuthorizeException {\n if (dso.getType() != Constants.ITEM) {\n String h = dso.getHandle();\n throw new CrosswalkObjectNotSupported(\"String_Node_Str\" + dso.getID() + \"String_Node_Str\" + Constants.typeText[dso.getType()] + \"String_Node_Str\" + (h == null ? \"String_Node_Str\" : h));\n }\n Item item = (Item) dso;\n String handle = item.getHandle();\n List<Element> metas = new ArrayList<Element>();\n DCValue[] values = item.getMetadata(Item.ANY, Item.ANY, Item.ANY, Item.ANY);\n Iterator<String> schemaIterator = schemaURLs.keySet().iterator();\n while (schemaIterator.hasNext()) {\n String s = schemaIterator.next();\n Element e = new Element(\"String_Node_Str\", XHTML_NAMESPACE);\n e.setAttribute(\"String_Node_Str\", s);\n e.setAttribute(\"String_Node_Str\", schemaURLs.get(s));\n metas.add(e);\n }\n for (int i = 0; i < values.length; i++) {\n DCValue v = values[i];\n String key = v.schema + \"String_Node_Str\" + v.element + (v.qualifier != null ? \"String_Node_Str\" + v.qualifier : \"String_Node_Str\");\n String originalKey = key;\n String name = names.get(key);\n if (name == null && v.qualifier != null) {\n key = v.schema + \"String_Node_Str\" + v.element;\n name = names.get(key);\n }\n if (name == null) {\n if (log.isDebugEnabled()) {\n log.debug(\"String_Node_Str\" + (handle == null ? String.valueOf(dso.getID()) : handle) + \"String_Node_Str\" + originalKey);\n }\n } else if (provenance != true) {\n Element e = new Element(\"String_Node_Str\", XHTML_NAMESPACE);\n e.setAttribute(\"String_Node_Str\", name);\n if (v.value == null) {\n e.setAttribute(\"String_Node_Str\", \"String_Node_Str\");\n } else {\n String reason = Verifier.checkCharacterData(v.value);\n if (reason == null) {\n e.setAttribute(\"String_Node_Str\", v.value == null ? \"String_Node_Str\" : v.value);\n } else {\n log.warn(\"String_Node_Str\" + reason);\n String simpleText = v.value.replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n if (Verifier.checkCharacterData(simpleText) == null)\n e.setAttribute(\"String_Node_Str\", simpleText);\n }\n }\n if (v.language != null && !v.language.equals(\"String_Node_Str\")) {\n e.setAttribute(\"String_Node_Str\", v.language, Namespace.XML_NAMESPACE);\n }\n String schemeAttr = schemes.get(key);\n if (schemeAttr != null) {\n e.setAttribute(\"String_Node_Str\", schemeAttr);\n }\n metas.add(e);\n }\n }\n return metas;\n}\n"
|
"public CronField apply(final CronField field) {\n FieldExpression expression = field.getExpression();\n FieldExpression dest = null;\n dest = expression.accept(new ValueMappingFieldExpressionVisitor(new Function<FieldValue, FieldValue>() {\n\n public FieldValue apply(FieldValue fieldValue) {\n if (fieldValue instanceof IntegerFieldValue) {\n return new IntegerFieldValue(ConstantsMapper.weekDayMapping(sourceDef.getMondayDoWValue(), targetDef.getMondayDoWValue(), ((IntegerFieldValue) fieldValue).getValue()));\n } else {\n return fieldValue;\n }\n }\n }));\n return new CronField(CronFieldName.DAY_OF_WEEK, expression, targetDef.getConstraints());\n}\n"
|
"public GuiIngredientFast render(Minecraft minecraft, boolean isMouseOver, int mouseX, int mouseY) {\n GuiIngredientFast hovered = null;\n if (isMouseOver) {\n hovered = getHovered(mouseX, mouseY);\n }\n RenderHelper.enableGUIStandardItemLighting();\n RenderItem renderItem = minecraft.getRenderItem();\n TextureManager textureManager = minecraft.getTextureManager();\n renderItem.zLevel += 50.0F;\n textureManager.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);\n textureManager.getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).setBlurMipmap(false, false);\n GlStateManager.enableRescaleNormal();\n GlStateManager.enableAlpha();\n GlStateManager.alphaFunc(GL11.GL_GREATER, 0.1F);\n GlStateManager.enableBlend();\n GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);\n GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\n GlStateManager.enableLighting();\n for (GuiIngredientFast guiItemStack : renderItems3d) {\n guiItemStack.renderItemAndEffectIntoGUI();\n }\n GlStateManager.disableLighting();\n for (GuiIngredientFast guiItemStack : renderItems2d) {\n if (hovered != guiItemStack) {\n guiItemStack.renderItemAndEffectIntoGUI();\n }\n }\n GlStateManager.disableAlpha();\n GlStateManager.disableBlend();\n GlStateManager.disableRescaleNormal();\n GlStateManager.disableLighting();\n textureManager.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);\n textureManager.getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).restoreLastBlurMipmap();\n renderItem.zLevel -= 50.0F;\n for (GuiIngredientFast guiItemStack : renderItems3d) {\n if (hovered != guiItemStack) {\n guiItemStack.renderOverlay(minecraft);\n }\n }\n for (GuiIngredientFast guiItemStack : renderItems2d) {\n if (hovered != guiItemStack) {\n guiItemStack.renderOverlay(minecraft);\n }\n }\n for (GuiIngredientFast guiItemStack : renderOther) {\n if (hovered != guiItemStack) {\n guiItemStack.renderSlow();\n }\n }\n RenderHelper.disableStandardItemLighting();\n return hovered;\n}\n"
|
"private static Calendar tomorrowMidnight() {\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(System.currentTimeMillis());\n calendar.set(Calendar.HOUR_OF_DAY, 3);\n calendar.set(Calendar.MINUTE, 0);\n calendar.set(Calendar.SECOND, 0);\n calendar.set(Calendar.MILLISECOND, 0);\n calendar.add(Calendar.DAY_OF_MONTH, 1);\n return calendar;\n}\n"
|
"public View getView(int position, View convertView, ViewGroup parent) {\n View view = super.getView(position, convertView, parent);\n final Note note = getItem(position);\n final TextView detailText = (TextView) view.findViewById(R.id.note_detail);\n final ProgressBar placeholderLoading = (ProgressBar) view.findViewById(R.id.placeholder_loading);\n final NetworkImageView avatarView = (NetworkImageView) view.findViewById(R.id.note_avatar);\n final ImageView iconView = (ImageView) view.findViewById(R.id.note_icon);\n final TextView unreadIndicator = (TextView) view.findViewById(R.id.unread_indicator);\n if (note.isCommentType()) {\n detailText.setText(note.getCommentPreview());\n detailText.setVisibility(View.VISIBLE);\n } else {\n detailText.setVisibility(View.GONE);\n }\n String iconUrl = note.getIconURL();\n if (iconUrl != null && iconUrl.contains(\"String_Node_Str\"))\n iconUrl = iconUrl.replace(\"String_Node_Str\", \"String_Node_Str\" + mAvatarSz);\n avatarView.setImageUrl(iconUrl, WordPress.imageLoader);\n avatarView.setDefaultImageResId(R.drawable.placeholder);\n iconView.setImageDrawable(getDrawableForType(note.getType()));\n unreadIndicator.setVisibility(note.isUnread() ? View.VISIBLE : View.GONE);\n placeholderLoading.setVisibility(note.isPlaceholder() ? View.VISIBLE : View.GONE);\n return view;\n}\n"
|
"protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {\n final int relMouseX = mouseX - this.guiLeft;\n final int relMouseY = mouseY - this.guiTop;\n this.guis.getLast().onUpdateMouse(this, relMouseX, relMouseY);\n GlStateManager.pushAttrib();\n GlStateManager.pushMatrix();\n GlStateManager.pushAttrib();\n GlStateManager.pushMatrix();\n this.guis.getLast().onRenderForeground(this, toolTips, relMouseX, relMouseY);\n GlStateManager.popMatrix();\n GlStateManager.popAttrib();\n if (toolTips.size() > 0) {\n drawHoveringText(toolTips, relMouseX, relMouseY, fontRenderer);\n }\n GlStateManager.popMatrix();\n GlStateManager.popAttrib();\n}\n"
|
"public void addListener(ProjectFileListener listener) {\n listeners.add(listener);\n}\n"
|
"private void processOptimisticVerification(boolean isTrialRun) {\n ArrayList<Long> updateOids = new ArrayList<>();\n ArrayList<Long> updateTimstamps = new ArrayList<>();\n getObjectToCommit(updateOids, updateTimstamps);\n OptimisticTransactionResult ovrSummary = new OptimisticTransactionResult();\n for (Node n : nodes) {\n if (isTrialRun) {\n ovrSummary.add(n.checkTxConsistency(updateOids, updateTimstamps));\n } else {\n ovrSummary.add(n.beginCommit(updateOids, updateTimstamps));\n }\n }\n processOptimisticTransactionResult(ovrSummary);\n if (!ovrSummary.getConflicts().isEmpty()) {\n JDOOptimisticVerificationException[] ea = new JDOOptimisticVerificationException[ovrSummary.getConflicts().size()];\n int pos = 0;\n for (Long oid : ovrSummary.getConflicts()) {\n Object failedObj = cache.findCoByOID(oid);\n if (failedObj == null) {\n failedObj = cache.getGeneric(oid).getOrCreateHandle();\n }\n ea[pos] = new JDOOptimisticVerificationException(Util.oidToString(oid), failedObj);\n pos++;\n }\n if (!isTrialRun) {\n rollback();\n }\n throw new JDOOptimisticVerificationException(\"String_Node_Str\", ea);\n }\n}\n"
|
"public void init(IDataMapTable currentTable, Zone[] zones, ITableEntry currentEntry) {\n tables = new ArrayList<AbstractDataMapTable>();\n for (Zone zone : zones) {\n if (zone == Zone.INPUTS) {\n tables.addAll(mapperManager.getInputTables());\n } else if (zones[i] == Zone.OUTPUTS) {\n tables.addAll(mapperManager.getOutputTables());\n } else if (zones[i] == Zone.VARS) {\n tables.addAll(mapperManager.getVarsTables());\n }\n }\n this.currentModifiedEntry = currentEntry;\n}\n"
|
"protected static String message(IOException exception) {\n if (exception instanceof GoogleJsonResponseException) {\n GoogleJsonError details = ((GoogleJsonResponseException) exception).getDetails();\n if (details != null) {\n return details.getMessage();\n }\n }\n return exception.getMessage();\n}\n"
|
"public World getWorld() {\n if (Spout.getPlatform() == Platform.SERVER) {\n return entityManager.get().getRegion().getWorld();\n } else {\n return ((Client) Spout.getEngine()).getWorld();\n }\n}\n"
|
"public int validateInRange(int number) {\n if (isInRange(number)) {\n return number;\n }\n throw new RuntimeException(String.format(\"String_Node_Str\", number, startRange, endRange));\n}\n"
|
"private void cloneBaseDataBaseConnection(DatabaseConnection connection) {\n temConnection = EcoreUtil.copy(connection);\n EList<Package> dataPackage = connection.getDataPackage();\n Collection<Package> newDataPackage = EcoreUtil.copyAll(dataPackage);\n ConnectionHelper.addPackages(newDataPackage, temConnection);\n}\n"
|
"public void setPageBody(PageNode pageNode, UIPortal uiPortal) throws Exception {\n WebuiRequestContext context = Util.getPortalRequestContext();\n ExoContainer appContainer = context.getApplication().getApplicationServiceContainer();\n UserPortalConfigService userPortalConfigService = (UserPortalConfigService) appContainer.getComponentInstanceOfType(UserPortalConfigService.class);\n Page page = null;\n UIPage uiPage = null;\n if (pageNode != null) {\n try {\n if (pageNode.getPageReference() != null) {\n page = userPortalConfigService.getPage(pageNode.getPageReference(), context.getRemoteUser());\n }\n } catch (Exception e) {\n UIPortalApplication uiApp = getAncestorOfType(UIPortalApplication.class);\n uiApp.addMessage(new ApplicationMessage(e.getMessage(), new Object[] {}));\n }\n }\n uiPortal.setMaximizedUIComponent(null);\n if (page != null) {\n if (Page.DESKTOP_PAGE.equals(page.getFactoryId())) {\n uiPage = createUIComponent(context, UIDesktopPage.class, null, null);\n } else {\n uiPage = createUIComponent(context, UIPage.class, null, null);\n }\n PortalDataMapper.toUIPage(uiPage, page);\n if (uiPage.isShowMaxWindow()) {\n uiPortal.setMaximizedUIComponent(uiPage);\n }\n setUIComponent(uiPage);\n}\n"
|
"public I cache(I id) {\n ArgumentNotValid.checkNotNull(id, \"String_Node_Str\");\n File cachedFile = getCacheFile(id);\n try {\n File fileBehindLockFile = new File(cachedFile.getAbsolutePath() + \"String_Node_Str\");\n FileOutputStream lockFile = new FileOutputStream(fileBehindLockFile);\n FileLock lock = null;\n synchronized (fileBehindLockFile.getAbsolutePath().intern()) {\n try {\n log.debug(\"String_Node_Str\" + fileBehindLockFile.getAbsolutePath() + \"String_Node_Str\" + Thread.currentThread().getName() + \"String_Node_Str\");\n try {\n log.debug(\"String_Node_Str\" + fileBehindLockFile.getAbsolutePath() + \"String_Node_Str\" + Thread.currentThread().getName() + \"String_Node_Str\");\n try {\n lock = lockFile.getChannel().lock();\n } catch (OverlappingFileLockException e) {\n log.warn(e);\n throw new IOException(e);\n }\n if (cachedFile.exists()) {\n return id;\n }\n return cacheData(id);\n } finally {\n if (lock != null) {\n log.debug(\"String_Node_Str\" + lockFile.getChannel());\n lock.release();\n }\n lockFile.close();\n }\n }\n } catch (IOException e) {\n String errMsg = \"String_Node_Str\" + cachedFile.getAbsolutePath() + \"String_Node_Str\";\n log.warn(errMsg, e);\n throw new IOFailure(errMsg, e);\n }\n }\n}\n"
|
"public void setKeepActive(boolean keepActive) {\n this.keepActive = keepActive;\n}\n"
|
"public void assign(boolean compatabilityMode) {\n if (!variables.containsKey(\"String_Node_Str\")) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n if (!variables.containsKey(\"String_Node_Str\")) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n if (compatabilityMode) {\n GL11.glMatrixMode(GL11.GL_PROJECTION);\n matrixBuffer.clear();\n matrixBuffer.put(getProjectionMatrix().toArray());\n matrixBuffer.flip();\n GL11.glLoadMatrix(matrixBuffer);\n GL11.glMatrixMode(GL11.GL_MODELVIEW);\n SpoutClient client = ((SpoutClient) Spout.getEngine());\n Quaternion r = client.getActivePlayer().getTransform().getRotation();\n Point p = client.getActivePlayer().getTransform().getPosition();\n GL11.glLoadIdentity();\n GL11.glRotatef(r.getPitch(), 1, 0, 0);\n GL11.glRotatef(r.getYaw(), 0, 1, 0);\n GL11.glRotatef(r.getRoll(), 0, 0, 1);\n GL11.glTranslatef(-p.getX(), -p.getY(), -p.getZ());\n } else {\n super.assign();\n }\n}\n"
|
"protected String generatedAlias(String fieldName) {\n final String counterValueString = String.valueOf(getNextFieldCounterValue());\n final Integer maximumAliasLength = getMaximumAliasLength();\n if (null != maximumAliasLength) {\n final int counterValueStringLength = counterValueString.length();\n final int fieldNameLength = fieldName.length();\n final int maximumAliasLengthValue = maximumAliasLength.intValue();\n if ((fieldNameLength + counterValueStringLength) > maximumAliasLengthValue) {\n return fieldName.substring(0, maximumAliasLengthValue - counterValueStringLength - 1) + counterValueString;\n }\n }\n return fieldName + counterValueString;\n}\n"
|
"public boolean arrowScroll(int direction) {\n View currentFocused = findFocus();\n if (currentFocused == this)\n currentFocused = null;\n View nextFocused = FocusFinder.getInstance().findNextFocus(this, currentFocused, direction);\n final int maxJump = getMaxScrollAmount();\n if (nextFocused != null && isWithinDeltaOfScreen(nextFocused, maxJump, getHeight())) {\n nextFocused.getDrawingRect(mTempRect);\n offsetDescendantRectToMyCoords(nextFocused, mTempRect);\n int scrollDelta = computeScrollDeltaToGetChildRectOnScreen(mTempRect);\n doScrollY(scrollDelta);\n nextFocused.requestFocus(direction);\n } else {\n int scrollDelta = maxJump;\n if (direction == View.FOCUS_UP && getScrollY() < scrollDelta) {\n scrollDelta = getScrollY();\n } else if (direction == View.FOCUS_DOWN) {\n if (getChildCount() > 0) {\n int daBottom = getChildAt(0).getBottom();\n int screenBottom = getScrollY() + getHeight();\n if (daBottom - screenBottom < maxJump) {\n scrollDelta = daBottom - screenBottom;\n }\n }\n }\n if (scrollDelta == 0) {\n return false;\n }\n doScrollY(direction == View.FOCUS_DOWN ? scrollDelta : -scrollDelta);\n }\n if (currentFocused != null && currentFocused.isFocused() && isOffScreen(currentFocused)) {\n final int descendantFocusability = getDescendantFocusability();\n setDescendantFocusability(ViewGroup.FOCUS_BEFORE_DESCENDANTS);\n requestFocus();\n setDescendantFocusability(descendantFocusability);\n }\n return true;\n}\n"
|
"public void call(EnunciateContext context) {\n Map<String, SchemaInfo> ns2schema = Collections.emptyMap();\n Map<String, String> ns2prefix = Collections.emptyMap();\n if (this.jaxbModule != null) {\n ns2schema = this.jaxbModule.getJaxbContext().getSchemas();\n ns2prefix = this.jaxbModule.getJaxbContext().getNamespacePrefixes();\n }\n Map<String, WsdlInfo> ns2wsdl = Collections.emptyMap();\n if (this.jaxwsModule != null) {\n ns2wsdl = this.jaxwsModule.getJaxwsContext().getWsdls();\n }\n Set<String> facetIncludes = new TreeSet<String>(this.enunciate.getConfiguration().getFacetIncludes());\n facetIncludes.addAll(getFacetIncludes());\n Set<String> facetExcludes = new TreeSet<String>(this.enunciate.getConfiguration().getFacetExcludes());\n facetExcludes.addAll(getFacetExcludes());\n FacetFilter facetFilter = new FacetFilter(facetIncludes, facetExcludes);\n Map<String, SchemaConfig> schemaConfigs = getSchemaConfigs();\n for (SchemaInfo schemaInfo : ns2schema.values()) {\n String defaultFilename = ns2prefix.get(schemaInfo.getNamespace()) + \"String_Node_Str\";\n SchemaConfig explicitConfig = schemaConfigs.get(schemaInfo.getNamespace());\n if (explicitConfig != null && explicitConfig.getUseFile() != null) {\n schemaInfo.setFilename(explicitConfig.getUseFile().getName());\n schemaInfo.setSchemaFile(new StaticInterfaceDescriptionFile(explicitConfig.getUseFile(), this.enunciate));\n } else if (explicitConfig != null) {\n schemaInfo.setAppinfo(explicitConfig.getAppinfo());\n schemaInfo.setFilename(explicitConfig.getFilename() != null ? explicitConfig.getFilename() : defaultFilename);\n schemaInfo.setExplicitLocation(explicitConfig.getLocation());\n schemaInfo.setJaxbBindingVersion(explicitConfig.getJaxbBindingVersion());\n schemaInfo.setSchemaFile(new JaxbSchemaFile(this.jaxbModule.getJaxbContext(), schemaInfo, facetFilter, ns2prefix));\n } else {\n schemaInfo.setFilename(defaultFilename);\n schemaInfo.setSchemaFile(new JaxbSchemaFile(this.jaxbModule.getJaxbContext(), schemaInfo, facetFilter, ns2prefix));\n }\n }\n String baseUri = this.enunciate.getConfiguration().getApplicationRoot();\n Map<String, WsdlConfig> wsdlConfigs = getWsdlConfigs();\n for (WsdlInfo wsdlInfo : ns2wsdl.values()) {\n String defaultFilename = ns2prefix.get(wsdlInfo.getNamespace()) + \"String_Node_Str\";\n WsdlConfig explicitConfig = wsdlConfigs.get(wsdlInfo.getNamespace());\n if (explicitConfig != null && explicitConfig.getUseFile() != null) {\n wsdlInfo.setFilename(explicitConfig.getUseFile().getName());\n wsdlInfo.setWsdlFile(new StaticInterfaceDescriptionFile(explicitConfig.getUseFile(), this.enunciate));\n } else if (explicitConfig != null) {\n wsdlInfo.setFilename(explicitConfig.getFilename() != null ? explicitConfig.getFilename() : defaultFilename);\n wsdlInfo.setInlineSchema(explicitConfig.isInlineSchema());\n wsdlInfo.setWsdlFile(new JaxwsWsdlFile(wsdlInfo, this.jaxbModule.getJaxbContext(), baseUri, ns2prefix, facetFilter));\n } else {\n wsdlInfo.setFilename(defaultFilename);\n wsdlInfo.setWsdlFile(new JaxwsWsdlFile(wsdlInfo, baseUri, ns2prefix, facetFilter));\n }\n }\n if (this.jaxrsModule != null && this.jaxbModule != null && !isDisableWadl()) {\n this.jaxrsModule.getJaxrsContext().setWadlFile(new JaxrsWadlFile(this.jaxrsModule.getJaxrsContext(), new ArrayList<SchemaInfo>(ns2schema.values()), getWadlStylesheetUri(), baseUri, ns2prefix, facetFilter));\n }\n}\n"
|
"public static void sendSpacePacket(Entity player) {\n ByteBuf buf = Unpooled.buffer();\n ByteBufOutputStream out = new ByteBufOutputStream(buf);\n try {\n out.writeByte(0);\n out.writeInt(player.worldObj.provider.dimensionId);\n out.writeInt(player.getEntityId());\n } catch (IOException ignored) {\n }\n FMLProxyPacket packet = new FMLProxyPacket(buf, \"String_Node_Str\");\n Steamcraft.channel.sendToServer(packet);\n try {\n out.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n}\n"
|
"public boolean startCompany(String playerName, StartCompany action) {\n PublicCompanyI company = action.getCertificate().getCompany();\n int price = action.getPrice();\n int shares = action.getNumberBought();\n String errMsg = null;\n StockSpaceI startSpace = null;\n int numberOfCertsToBuy = 0;\n PublicCertificateI cert = null;\n String companyName = company.getName();\n PublicCompanyI minor = null;\n StartCompany_18EU startAction = null;\n currentPlayer = GameManager.getCurrentPlayer();\n while (true) {\n if (!(action instanceof StartCompany_18EU)) {\n errMsg = LocalText.getText(\"String_Node_Str\");\n break;\n }\n startAction = (StartCompany_18EU) action;\n if (companyBoughtThisTurnWrapper.getObject() != null) {\n errMsg = LocalText.getText(\"String_Node_Str\", playerName);\n break;\n }\n company = companyMgr.getPublicCompany(companyName);\n if (company == null) {\n errMsg = LocalText.getText(\"String_Node_Str\", companyName);\n break;\n }\n if (company.hasStarted()) {\n errMsg = LocalText.getText(\"String_Node_Str\", companyName);\n break;\n }\n cert = ipo.findCertificate(company, true);\n if (shares < cert.getShares())\n shares = cert.getShares();\n numberOfCertsToBuy = shares - (cert.getShares() - 1);\n if (!currentPlayer.mayBuyCertificate(company, numberOfCertsToBuy)) {\n errMsg = LocalText.getText(\"String_Node_Str\");\n break;\n }\n startSpace = company.getParPrice();\n if (startSpace != null) {\n price = startSpace.getPrice();\n } else {\n if ((startSpace = stockMarket.getStartSpace(price)) == null) {\n errMsg = LocalText.getText(\"String_Node_Str\", new String[] { Bank.format(price), company.getName() });\n break;\n }\n }\n if (currentPlayer.getCash() < shares * price) {\n errMsg = LocalText.getText(\"String_Node_Str\");\n break;\n }\n minor = startAction.getChosenMinor();\n if (currentPlayer.getPortfolio().getCertificatesPerCompany(minor.getName()) == null) {\n errMsg = LocalText.getText(\"String_Node_Str\", new String[] { currentPlayer.getName(), minor.getName() });\n break;\n }\n numberOfCertsToBuy++;\n break;\n }\n if (errMsg != null) {\n DisplayBuffer.add(LocalText.getText(\"String_Node_Str\", new String[] { playerName, companyName, Bank.format(price), errMsg }));\n return false;\n }\n MoveSet.start(true);\n company.setHomeHex(minor.getHomeHex());\n company.start(startSpace);\n int tokensCost = 100;\n cert.moveTo(currentPlayer.getPortfolio());\n new CashMove(currentPlayer, company, shares * price);\n new CashMove(company, null, tokensCost);\n PublicCertificateI cert2 = ipo.findCertificate(company, false);\n cert2.moveTo(currentPlayer.getPortfolio());\n Util.moveObjects(ipo.getCertificatesPerCompany(company.getName()), company.getPortfolio());\n int minorCash = minor.getCash();\n int minorTrains = minor.getPortfolio().getTrainList().size();\n company.transferAssetsFrom(minor);\n minor.setClosed();\n ReportBuffer.add(LocalText.getText(\"String_Node_Str\", new String[] { playerName, companyName, Bank.format(price), Bank.format(shares * price), String.valueOf(shares), String.valueOf(cert.getShare()), company.getName() }));\n ReportBuffer.add(LocalText.getText(\"String_Node_Str\", new String[] { currentPlayer.getName(), minor.getName(), company.getName(), Bank.format(minorCash), String.valueOf(minorTrains) }));\n ReportBuffer.add(LocalText.getText(\"String_Node_Str\", new String[] { currentPlayer.getName(), String.valueOf(cert2.getShare()), company.getName(), minor.getName() }));\n ReportBuffer.add(LocalText.getText(\"String_Node_Str\", new String[] { String.valueOf(company.getPortfolio().getShare(company)), company.getName() }));\n ReportBuffer.add(LocalText.getText(\"String_Node_Str\", new String[] { company.getName(), Bank.format(100), String.valueOf(company.getNumberOfBaseTokens()) }));\n companyBoughtThisTurnWrapper.set(company);\n hasActed.set(true);\n setPriority();\n return true;\n}\n"
|
"public MediaType fromString(String header) {\n if (header == null)\n throw new IllegalArgumentException(\"String_Node_Str\");\n try {\n HttpHeaderReader reader = new HttpHeaderReaderImpl(header);\n reader.hasNext();\n String type = reader.nextToken();\n reader.nextSeparator('/');\n String subType = reader.nextToken();\n Map<String, String> params = null;\n if (reader.hasNext())\n params = HttpHeaderReader.readParameters(reader);\n return new MediaType(type, subType, params);\n } catch (ParseException ex) {\n throw new IllegalArgumentException(ex);\n }\n}\n"
|
"private <T> UpdateResults<T> update(Query<T> query, DBObject u, boolean createIfMissing, boolean multi, WriteConcern wc) {\n QueryImpl<T> qi = (QueryImpl<T>) query;\n DBCollection dbColl = qi.getCollection();\n if (dbColl == null)\n dbColl = getCollection(qi.getEntityClass());\n if (qi.getSortObject() != null && qi.getSortObject().keySet() != null && !qi.getSortObject().keySet().isEmpty())\n throw new QueryException(\"String_Node_Str\");\n if (qImpl.getOffset() > 0)\n throw new QueryException(\"String_Node_Str\");\n if (qImpl.getLimit() > 0)\n throw new QueryException(\"String_Node_Str\");\n DBObject q = qImpl.getQueryObject();\n if (q == null)\n q = new BasicDBObject();\n if (log.isTraceEnabled())\n log.trace(\"String_Node_Str\" + dbColl.getName() + \"String_Node_Str\" + q + \"String_Node_Str\" + u + \"String_Node_Str\" + multi + \"String_Node_Str\" + createIfMissing);\n WriteResult wr;\n if (wc == null)\n wr = dbColl.update(q, u, createIfMissing, multi);\n else\n wr = dbColl.update(q, u, createIfMissing, multi, wc);\n throwOnError(wc, wr);\n return new UpdateResults<T>(wr);\n}\n"
|
"protected void cancelCloseTask(DB db) {\n CloseDBTimeTask closeDBTimeTask = closeTaskMap.get(db);\n if (closeDBTimeTask != null) {\n closeDBTimeTask.cancel();\n timer.purge();\n closeTaskMap.remove(db);\n }\n}\n"
|
"public void populateId(Id id, IdMeta idMeta) {\n while (true) {\n varOld = variant.get();\n timestamp = TimeUtils.genTime(IdType.parse(id.getType()));\n TimeUtils.validateTimestamp(varOld.lastTimestamp, timestamp);\n long sequence = variant.get().sequence;\n if (timestamp == varOld.lastTimestamp) {\n sequence++;\n sequence &= idMeta.getSeqBitsMask();\n if (sequence == 0) {\n timestamp = TimeUtils.tillNextTimeUnit(varOld.lastTimestamp, IdType.parse(id.getType()));\n }\n } else {\n sequence = 0;\n }\n Variant varNew = new Variant();\n varNew.sequence = sequence;\n varNew.lastTimestamp = timestamp;\n if (variant.compareAndSet(varOld, varNew)) {\n id.setSeq(sequence);\n id.setTime(timestamp);\n break;\n }\n }\n}\n"
|
"public void onClick(View v) {\n DomainHolder holder = RetrofitUrlManager.getInstance().fetchDomain(GITHUB_DOMAIN_NAME);\n if (holder == null || !holder.getUrlStr().equals(mUrl1.getText().toString())) {\n RetrofitUrlManager.getInstance().putDomain(GITHUB_DOMAIN_NAME, mUrl1.getText().toString());\n }\n NetWorkManager.getInstance().getOneApiService().getUsers(1, 10).subscribeOn(Schedulers.io()).doOnSubscribe(new Consumer<Disposable>() {\n public void accept(Disposable disposable) throws Exception {\n mProgressDialog.show();\n }\n }).subscribeOn(AndroidSchedulers.mainThread()).observeOn(AndroidSchedulers.mainThread()).doAfterTerminate(new Action() {\n public void run() throws Exception {\n mProgressDialog.dismiss();\n }\n }).subscribe(new Consumer<ResponseBody>() {\n public void accept(ResponseBody response) throws Exception {\n String string = response.string();\n Log.d(\"String_Node_Str\", string);\n mDisplay.setText(string);\n }\n }, new Consumer<Throwable>() {\n public void accept(Throwable throwable) throws Exception {\n throwable.printStackTrace();\n mDisplay.setText(throwable.getMessage());\n }\n });\n}\n"
|
"private void generateDungeon(World world, Random random, int midx, int starty, int midz) {\n boolean do_small_antenna = random.nextInt(4) == 0;\n boolean do_extra_feature = random.nextInt(4) == 0;\n int color = random.nextInt(3);\n if (color == 0) {\n color = 3;\n } else if (color == 1) {\n color = 9;\n } else {\n color = 11;\n }\n for (int x = midx - 3; x <= midx + 3; x++) {\n for (int z = midz - 3; z <= midz + 3; z++) {\n boolean corner = (x == midx - 3 || x == midx + 3) && (z == midz - 3 || z == midz + 3);\n boolean xside = x == midx - 3 || x == midx + 3;\n boolean zside = z == midz - 3 || z == midz + 3;\n boolean antenna = (x == midx - 2 && z == midz - 2);\n boolean small_antenna = do_small_antenna && (x == midx + 2 && z == midz + 2);\n world.setBlock(x, starty, z, Blocks.double_stone_slab, 0, 2);\n if (corner) {\n world.setBlock(x, starty + 1, z, Blocks.quartz_block, 0, 2);\n world.setBlock(x, starty + 2, z, Blocks.quartz_block, 0, 2);\n world.setBlock(x, starty + 3, z, Blocks.quartz_block, 0, 2);\n } else if (xside) {\n world.setBlock(x, starty + 1, z, Blocks.stained_hardened_clay, color, 2);\n if (z >= midz - 1 && z <= midz + 1) {\n world.setBlock(x, starty + 2, z, Blocks.glass_pane, 0, 2);\n } else {\n world.setBlock(x, starty + 2, z, Blocks.stained_hardened_clay, color, 2);\n }\n world.setBlock(x, starty + 3, z, Blocks.stained_hardened_clay, color, 2);\n } else if (zside) {\n world.setBlock(x, starty + 1, z, Blocks.stained_hardened_clay, color, 2);\n world.setBlock(x, starty + 2, z, Blocks.stained_hardened_clay, color, 2);\n world.setBlock(x, starty + 3, z, Blocks.stained_hardened_clay, color, 2);\n } else {\n world.setBlockToAir(x, starty + 1, z);\n world.setBlockToAir(x, starty + 2, z);\n world.setBlockToAir(x, starty + 3, z);\n }\n if (antenna) {\n world.setBlock(x, starty + 4, z, Blocks.double_stone_slab, 0, 2);\n world.setBlock(x, starty + 5, z, Blocks.iron_bars, 0, 2);\n world.setBlock(x, starty + 6, z, Blocks.iron_bars, 0, 2);\n world.setBlock(x, starty + 7, z, Blocks.iron_bars, 0, 2);\n world.setBlock(x, starty + 8, z, Blocks.glowstone, 0, 2);\n } else if (small_antenna) {\n world.setBlock(x, starty + 4, z, Blocks.double_stone_slab, 0, 2);\n world.setBlock(x, starty + 5, z, Blocks.iron_bars, 0, 2);\n world.setBlockToAir(x, starty + 6, z);\n world.setBlockToAir(x, starty + 7, z);\n world.setBlockToAir(x, starty + 8, z);\n } else {\n world.setBlock(x, starty + 4, z, Blocks.stone_slab, 0, 2);\n world.setBlockToAir(x, starty + 5, z);\n world.setBlockToAir(x, starty + 6, z);\n world.setBlockToAir(x, starty + 7, z);\n world.setBlockToAir(x, starty + 8, z);\n }\n WorldGenerationTools.fillEmptyWithStone(world, x, starty - 1, z);\n }\n }\n if (do_extra_feature) {\n if (!WorldGenerationTools.isSolid(world, midx + 4, starty, midz - 3)) {\n world.setBlock(midx + 4, starty, midz - 3, Blocks.iron_bars, 0, 2);\n }\n world.setBlock(midx + 4, starty + 1, midz - 3, Blocks.iron_bars, 0, 2);\n world.setBlock(midx + 4, starty + 2, midz - 3, Blocks.iron_bars, 0, 2);\n if (!WorldGenerationTools.isSolid(world, midx + 5, starty, midz - 3)) {\n world.setBlock(midx + 5, starty, midz - 3, Blocks.stained_hardened_clay, color, 2);\n }\n world.setBlock(midx + 5, starty + 1, midz - 3, Blocks.stained_hardened_clay, color, 2);\n world.setBlock(midx + 5, starty + 2, midz - 3, Blocks.stained_hardened_clay, color, 2);\n WorldGenerationTools.fillEmptyWithStone(world, midx + 4, starty - 1, midz - 3);\n WorldGenerationTools.fillEmptyWithStone(world, midx + 5, starty - 1, midz - 3);\n }\n for (int x = midx - 3; x <= midx + 3; x++) {\n for (int y = starty + 1; y <= starty + 3; y++) {\n world.setBlockToAir(x, y, midz - 4);\n }\n }\n world.setBlock(midx - 1, starty, midz - 4, Blocks.double_stone_slab, 0, 2);\n world.setBlock(midx, starty, midz - 4, Blocks.double_stone_slab, 0, 2);\n world.setBlock(midx + 1, starty, midz - 4, Blocks.double_stone_slab, 0, 2);\n world.setBlock(midx, starty + 1, midz - 3, Blocks.iron_door, 1, 2);\n world.setBlock(midx, starty + 2, midz - 3, Blocks.iron_door, 8, 2);\n world.setBlock(midx - 1, starty + 2, midz - 4, Blocks.stone_button, 4, 2);\n world.setBlock(midx + 1, starty + 2, midz - 2, Blocks.stone_button, 3, 2);\n world.setBlock(midx, starty + 3, midz + 3, Blocks.redstone_lamp, 0, 2);\n world.setBlock(midx, starty + 3, midz + 2, Blocks.lever, 4, 2);\n world.setBlock(midx + 2, starty + 1, midz - 2, Blocks.chest, 0, 2);\n TileEntityChest chest = (TileEntityChest) world.getTileEntity(midx + 2, starty + 1, midz - 2);\n for (int i = 0; i < random.nextInt(2) + 2; i++) {\n chest.setInventorySlotContents(random.nextInt(chest.getSizeInventory()), new ItemStack(ModItems.unknownDimlet, random.nextInt(6) + 3));\n }\n WeightedRandomSelector.Distribution<Integer> goodDistribution = KnownDimletConfiguration.randomDimlets.createDistribution(0.01f);\n for (int i = 0; i < random.nextInt(2) + 1; i++) {\n chest.setInventorySlotContents(random.nextInt(chest.getSizeInventory()), new ItemStack(ModItems.knownDimlet, 1, KnownDimletConfiguration.getRandomDimlet(goodDistribution, random)));\n }\n WeightedRandomSelector.Distribution<Integer> bestDistribution = KnownDimletConfiguration.randomDimlets.createDistribution(0.15f);\n EntityItemFrame frame1 = spawnItemFrame(world, midx - 1, starty + 2, midz + 2);\n frame1.setDisplayedItem(new ItemStack(ModItems.knownDimlet, 1, KnownDimletConfiguration.getRandomDimlet(bestDistribution)));\n EntityItemFrame frame2 = spawnItemFrame(world, midx, starty + 2, midz + 2);\n frame2.setDisplayedItem(new ItemStack(ModItems.knownDimlet, 1, KnownDimletConfiguration.getRandomDimlet(bestDistribution)));\n EntityItemFrame frame3 = spawnItemFrame(world, midx + 1, starty + 2, midz + 2);\n frame3.setDisplayedItem(new ItemStack(ModItems.knownDimlet, 1, KnownDimletConfiguration.getRandomDimlet(bestDistribution)));\n}\n"
|
"public void _refresh_com_sun_ejb_containers_read_only_bean_(Object primaryKey) throws java.rmi.RemoteException {\n if (robContainer != null) {\n robContainer.setRefreshFlag(primaryKey);\n }\n}\n"
|
"public Long fixDiskFailures(String clusterName, String groupName) throws Exception {\n ClusterEntity cluster = clusterEntityMgr.findByName(clusterName);\n if (cluster == null) {\n logger.error(\"String_Node_Str\" + clusterName + \"String_Node_Str\");\n throw BddException.NOT_FOUND(\"String_Node_Str\", clusterName);\n }\n ClusterStatus oldStatus = cluster.getStatus();\n if (ClusterStatus.RUNNING != oldStatus) {\n throw ClusterHealServiceException.NOT_SUPPORTED(clusterName, \"String_Node_Str\");\n }\n List<NodeGroupEntity> nodeGroups;\n if (groupName != null) {\n NodeGroupEntity nodeGroup = clusterEntityMgr.findByName(clusterName, groupName);\n AuAssert.check(nodeGroup != null);\n nodeGroups = new ArrayList<NodeGroupEntity>(1);\n nodeGroups.add(nodeGroup);\n } else {\n nodeGroups = clusterEntityMgr.findAllGroups(clusterName);\n }\n boolean workerNodesFound = false;\n JobParametersBuilder parametersBuilder = new JobParametersBuilder();\n List<JobParameters> jobParameterList = new ArrayList<JobParameters>();\n for (NodeGroupEntity nodeGroup : nodeGroups) {\n List<String> roles = nodeGroup.getRoleNameList();\n if (HadoopRole.hasMgmtRole(roles)) {\n logger.info(\"String_Node_Str\" + nodeGroup.getName() + \"String_Node_Str\");\n continue;\n }\n workerNodesFound = true;\n for (NodeEntity node : clusterEntityMgr.findAllNodes(clusterName, nodeGroup.getName())) {\n if (clusterHealService.hasBadDisks(node.getVmName())) {\n logger.warn(\"String_Node_Str\" + node.getVmName() + \"String_Node_Str\");\n JobParameters nodeParameters = parametersBuilder.addString(JobConstants.CLUSTER_NAME_JOB_PARAM, clusterName).addString(JobConstants.TARGET_NAME_JOB_PARAM, node.getVmName()).addString(JobConstants.GROUP_NAME_JOB_PARAM, nodeGroup.getName()).addString(JobConstants.SUB_JOB_NODE_NAME, node.getVmName()).toJobParameters();\n jobParameterList.add(nodeParameters);\n }\n }\n }\n if (!workerNodesFound) {\n throw ClusterHealServiceException.NOT_SUPPORTED(clusterName, \"String_Node_Str\");\n }\n if (jobParameterList.isEmpty()) {\n logger.info(\"String_Node_Str\");\n throw ClusterHealServiceException.NOT_NEEDED(clusterName);\n }\n try {\n clusterEntityMgr.updateClusterStatus(clusterName, ClusterStatus.MAINTENANCE);\n return jobManager.runSubJobForNodes(JobConstants.FIX_NODE_DISK_FAILURE_JOB_NAME, jobParameterList, clusterName, oldStatus, oldStatus);\n } catch (Exception e) {\n logger.error(\"String_Node_Str\" + e.getMessage());\n throw e;\n }\n}\n"
|