content
stringlengths
40
137k
"boolean trackMotionScroll(int deltaY, int incrementalDeltaY) {\n final int childCount = getChildCount();\n if (childCount == 0) {\n return true;\n }\n final int firstTop = getChildAt(0).getTop();\n final int lastBottom = getChildAt(childCount - 1).getBottom();\n final Rect listPadding = mListPadding;\n final int spaceAbove = listPadding.top - firstTop;\n final int end = getHeight() - listPadding.bottom;\n final int spaceBelow = lastBottom - end;\n final int height = getHeight() - mPaddingBottom - mPaddingTop;\n if (deltaY < 0) {\n deltaY = Math.max(-(height - 1), deltaY);\n } else {\n deltaY = Math.min(height - 1, deltaY);\n }\n if (incrementalDeltaY < 0) {\n incrementalDeltaY = Math.max(-(height - 1), incrementalDeltaY);\n } else {\n incrementalDeltaY = Math.min(height - 1, incrementalDeltaY);\n }\n final int firstPosition = mFirstPosition;\n if (firstPosition == 0 && firstTop >= listPadding.top && deltaY > 0) {\n return true;\n }\n if (firstPosition + childCount == mItemCount && lastBottom <= end && deltaY < 0) {\n return true;\n }\n final boolean down = incrementalDeltaY < 0;\n final boolean inTouchMode = isInTouchMode();\n if (inTouchMode) {\n hideSelector();\n }\n final int headerViewsCount = getHeaderViewsCount();\n final int footerViewsStart = mItemCount - getFooterViewsCount();\n int start = 0;\n int count = 0;\n if (down) {\n final int top = listPadding.top - incrementalDeltaY;\n for (int i = 0; i < childCount; i++) {\n final View child = getChildAt(i);\n if (child.getBottom() >= top) {\n break;\n } else {\n count++;\n int position = firstPosition + i;\n if (position >= headerViewsCount && position < footerViewsStart) {\n mRecycler.addScrapView(child);\n if (ViewDebug.TRACE_RECYCLER) {\n ViewDebug.trace(child, ViewDebug.RecyclerTraceType.MOVE_TO_SCRAP_HEAP, firstPosition + i, -1);\n }\n }\n }\n }\n } else {\n final int bottom = getHeight() - listPadding.bottom - incrementalDeltaY;\n for (int i = childCount - 1; i >= 0; i--) {\n final View child = getChildAt(i);\n if (child.getTop() <= bottom) {\n break;\n } else {\n start = i;\n count++;\n int position = firstPosition + i;\n if (position >= headerViewsCount && position < footerViewsStart) {\n mRecycler.addScrapView(child);\n if (ViewDebug.TRACE_RECYCLER) {\n ViewDebug.trace(child, ViewDebug.RecyclerTraceType.MOVE_TO_SCRAP_HEAP, firstPosition + i, -1);\n }\n }\n }\n }\n }\n mMotionViewNewTop = mMotionViewOriginalTop + deltaY;\n mBlockLayoutRequests = true;\n if (count > 0) {\n detachViewsFromParent(start, count);\n }\n offsetChildrenTopAndBottom(incrementalDeltaY);\n if (down) {\n mFirstPosition += count;\n }\n invalidate();\n final int absIncrementalDeltaY = Math.abs(incrementalDeltaY);\n if (spaceAbove < absIncrementalDeltaY || spaceBelow < absIncrementalDeltaY) {\n fillGap(down);\n }\n mBlockLayoutRequests = false;\n invokeOnItemScrollListener();\n awakenScrollBars();\n return false;\n}\n"
"private void onUpdateEntry(Uri uri, long channelId, long time, SessionState sessionState) {\n String[] projection = { TvContract.WatchedPrograms.COLUMN_WATCH_END_TIME_UTC_MILLIS };\n Cursor cursor = null;\n try {\n cursor = mContentResolver.query(uri, projection, null, null, null);\n if (cursor != null && cursor.moveToNext()) {\n long watchStartTime = cursor.getLong(0);\n long watchEndTime = cursor.getLong(1);\n String title = cursor.getString(2);\n long startTime = cursor.getLong(3);\n long endTime = cursor.getLong(4);\n String description = cursor.getString(5);\n if (watchEndTime > 0) {\n return;\n }\n ContentValues values = new ContentValues();\n values.put(TvContract.WatchedPrograms.COLUMN_WATCH_START_TIME_UTC_MILLIS, watchStartTime);\n values.put(TvContract.WatchedPrograms.COLUMN_WATCH_END_TIME_UTC_MILLIS, time);\n values.put(TvContract.WatchedPrograms.COLUMN_CHANNEL_ID, channelId);\n values.put(TvContract.WatchedPrograms.COLUMN_TITLE, title);\n values.put(TvContract.WatchedPrograms.COLUMN_START_TIME_UTC_MILLIS, startTime);\n values.put(TvContract.WatchedPrograms.COLUMN_END_TIME_UTC_MILLIS, endTime);\n values.put(TvContract.WatchedPrograms.COLUMN_DESCRIPTION, description);\n mContentResolver.insert(TvContract.WatchedPrograms.CONTENT_URI, values);\n }\n } finally {\n if (cursor != null) {\n cursor.close();\n }\n }\n onOpenEntry(uri, channelId, time, sessionState);\n}\n"
"protected void buildProperties(IContent content, LayoutContext context) {\n IStyle style = content.getComputedStyle();\n boxStyle = new BoxStyle();\n Color color = PropertyUtil.getColor(style.getProperty(IStyle.STYLE_BACKGROUND_COLOR));\n if (color != null) {\n boxStyle.setBackgroundColor(color);\n }\n String url = content.getStyle().getBackgroundImage();\n if (url != null) {\n boxStyle.setBackgroundImage(new BackgroundImageInfo(getImageUrl(url), style.getProperty(IStyle.STYLE_BACKGROUND_REPEAT), 0, 0, 0, 0));\n }\n localProperties = new LocalProperties();\n int maw = parent.getMaxAvaWidth();\n IStyle cs = content.getStyle();\n CSSValue padding = cs.getProperty(IStyle.STYLE_PADDING_TOP);\n if (padding == null) {\n localProperties.setPaddingTop(DEFAULT_PADDING);\n } else {\n localProperties.setPaddingTop(PropertyUtil.getDimensionValue(style.getProperty(IStyle.STYLE_PADDING_TOP), width));\n }\n padding = cs.getProperty(IStyle.STYLE_PADDING_BOTTOM);\n if (padding == null) {\n localProperties.setPaddingBottom(DEFAULT_PADDING);\n } else {\n localProperties.setPaddingBottom(PropertyUtil.getDimensionValue(style.getProperty(IStyle.STYLE_PADDING_BOTTOM), width));\n }\n padding = cs.getProperty(IStyle.STYLE_PADDING_LEFT);\n if (padding == null) {\n localProperties.setPaddingLeft(DEFAULT_PADDING);\n } else {\n localProperties.setPaddingLeft(PropertyUtil.getDimensionValue(style.getProperty(IStyle.STYLE_PADDING_LEFT), width));\n }\n padding = cs.getProperty(IStyle.STYLE_PADDING_RIGHT);\n if (padding == null) {\n localProperties.setPaddingRight(DEFAULT_PADDING);\n } else {\n localProperties.setPaddingRight(PropertyUtil.getDimensionValue(style.getProperty(IStyle.STYLE_PADDING_RIGHT), width));\n }\n textAlign = content.getComputedStyle().getProperty(IStyle.STYLE_TEXT_ALIGN);\n}\n"
"public String[] getChoiceSet(Object item, String key) {\n if (key.equals(SortKey.DIRECTION_MEMBER)) {\n choiceSet = ChoiceSetFactory.getStructChoiceSet(SortKey.SORT_STRUCT, key);\n return ChoiceSetFactory.getDisplayNamefromChoiceSet(choiceSet);\n }\n if (!(item instanceof DesignElementHandle)) {\n return EMPTY;\n }\n return getDataSetColumns((ReportItemHandle) item);\n}\n"
"public void match(final PactRecord record1, final PactRecord record2, final Collector out) throws Exception {\n this.context.increaseInputCounter();\n this.collector.configure(out, this.context);\n final IJsonNode input1 = this.inputSchema1.recordToJson(record1, this.cachedInput1);\n final IJsonNode input2 = this.inputSchema2.recordToJson(record2, this.cachedInput2);\n if (SopremoUtil.LOG.isTraceEnabled())\n SopremoUtil.LOG.trace(String.format(\"String_Node_Str\", this.getContext().operatorTrace(), input1, input2));\n try {\n this.match(input1, input2, this.collector);\n } catch (final RuntimeException e) {\n SopremoUtil.LOG.error(String.format(\"String_Node_Str\", this.getContext().operatorTrace(), input1, input2, e));\n throw e;\n }\n}\n"
"private M2Model readCustomContentModel(NodeRef modelNodeRef) {\n ContentReader reader = this.contentService.getReader(modelNodeRef, ContentModel.TYPE_CONTENT);\n if (!reader.exists()) {\n throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_CUSTOM_MODEL_NO_CONTENT, modelNodeRef.toString()));\n }\n InputStream contentIn = null;\n M2Model deserializedModel = null;\n try {\n contentIn = reader.getContentInputStream();\n deserializedModel = M2Model.createModel(contentIn);\n } finally {\n try {\n if (contentIn != null) {\n contentIn.close();\n }\n } catch (IOException ignored) {\n }\n }\n return deserializedModel;\n}\n"
"public Object get(EntityContext context) throws Throwable {\n Object parent = context.getParent();\n Class<?> relatedClass = getRelatedClass();\n if (relatedClass.isInstance(parent)) {\n return parent;\n } else {\n EntityContext parentCtx = context.getSession().unwrapEntity(parent);\n EmbeddedContext embeddedCtx = parentCtx.getEmbedded(relatedClass);\n if (embeddedCtx != null) {\n return embeddedCtx.getObject();\n }\n return null;\n }\n}\n"
"private void tryEnableContextPreservation() {\n try {\n Method m = GLSurfaceView.class.getMethod(\"String_Node_Str\", Boolean.TYPE);\n m.invoke(this, true);\n } catch (Throwable t) {\n Log.d(\"String_Node_Str\", \"String_Node_Str\");\n }\n}\n"
"public void removePositionTo(final int x, final int y, final Partition newPartitionObject) {\n if (this == newPartitionObject) {\n System.err.println(\"String_Node_Str\" + x + \"String_Node_Str\" + y + \"String_Node_Str\");\n }\n this.decrement(x, y);\n newPartitionObject.increment(x, y);\n super.removePositionTo(x, y, newPartitionObject, newPartitionObject.playerId == this.playerId);\n if (isEmpty())\n super.stopManager();\n}\n"
"public void importDemoProject() {\n ImportDemoProjectAction.getInstance().setShell(getShell());\n ImportDemoProjectAction.getInstance().run();\n fillUIProjectListWithBusyCursor();\n String newProject = ImportDemoProjectAction.getInstance().getProjectName();\n if (newProject != null) {\n resetProjectOperationSelectionWithBusyCursor();\n selectProject(newProject);\n }\n validateProject();\n}\n"
"protected String getLocalizedMessage(String errorCode) {\n String localizedMessage;\n Locale locale = null;\n if (rb == null) {\n localizedMessage = errorCode;\n } else {\n locale = rb.getLocale();\n try {\n localizedMessage = rb.getString(errorCode);\n } catch (Exception e) {\n localizedMessage = errorCode;\n }\n }\n try {\n MessageFormat form = new MessageFormat(localizedMessage, locale == null ? Locale.getDefault() : locale);\n return form.format(oaMessageArguments);\n } catch (Throwable ex) {\n return localizedMessage;\n }\n}\n"
"private Node selectSingleAttribute(Node contextNode, XPathFragment xPathFragment, XMLNamespaceResolver xmlNamespaceResolver) {\n if (xPathFragment.hasNamespace()) {\n Element contextElement = (Element) contextNode;\n String attributeNamespaceURI = xmlNamespaceResolver.resolveNamespacePrefix(xPathFragment.getPrefix());\n return contextNode.getAttributes().getNamedItemNS(attributeNamespaceURI, xPathFragment.getLocalName());\n } else {\n Element contextElement = (Element) contextNode;\n return contextElement.getAttributeNode(xPathFragment.getShortName());\n }\n}\n"
"public void evaluate() throws Throwable {\n Server server = description.getAnnotation(Server.class);\n if (server != null) {\n Class<?> testClass = description.getTestClass();\n processor = new ServerProcessor(server, testClass);\n processor.initServer();\n try {\n base.evaluate();\n return;\n } finally {\n processor.stopServer();\n }\n }\n}\n"
"public File generateFile(BankOrder bankOrder) throws JAXBException, IOException, AxelorException, DatatypeConfigurationException {\n bankOrder.setFileGenerationDateTime(new LocalDateTime());\n BankOrderFileFormat bankOrderFileFormat = bankOrder.getBankOrderFileFormat();\n File file = null;\n switch(bankOrderFileFormat.getOrderFileFormatSelect()) {\n case BankOrderFileFormatRepository.FILE_FORMAT_pain_001_001_02_SCT:\n file = new BankOrderFile00100102Service(bankOrder).generateFile();\n break;\n case BankOrderFileFormatRepository.FILE_FORMAT_pain_001_001_03_SCT:\n file = new BankOrderFile00100103Service(bankOrder).generateFile();\n break;\n case BankOrderFileFormatRepository.FILE_FORMAT_pain_XXX_CFONB320_XCT:\n file = new BankOrderFileAFB320Service(bankOrder).generateFile();\n break;\n default:\n throw new AxelorException(I18n.get(IExceptionMessage.BANK_ORDER_FILE_UNKNOW_FORMAT), IException.INCONSISTENCY);\n }\n if (file == null) {\n throw new AxelorException(I18n.get(String.format(IExceptionMessage.BANK_ORDER_ISSUE_DURING_FILE_GENERATION, bankOrder.getBankOrderSeq())), IException.INCONSISTENCY);\n }\n MetaFiles metaFiles = Beans.get(MetaFiles.class);\n try (InputStream is = new FileInputStream(file)) {\n metaFiles.attach(is, file.getName(), bankOrder);\n bankOrder.setFileToSend(metaFiles.upload(file));\n }\n return file;\n}\n"
"private HeaderPositionHelper myGetColumnPositionHelper(NSheet sheet) {\n HelperContainer<HeaderPositionHelper> helpers = (HelperContainer) getAttribute(COLUMN_SIZE_HELPER_KEY);\n if (helpers == null) {\n setAttribute(COLUMN_SIZE_HELPER_KEY, helpers = new HelperContainer<HeaderPositionHelper>());\n }\n final String sheetId = sheet.getId();\n HeaderPositionHelper helper = helpers.getHelper(sheetId);\n if (helper == null) {\n final int defaultColSize = sheet.getDefaultColumnWidth();\n List<HeaderPositionInfo> infos = new ArrayList<HeaderPositionInfo>();\n Iterator<NColumn> iter = sheet.getColumnIterator();\n while (iter.hasNext()) {\n NColumn column = iter.next();\n final boolean hidden = column.isHidden();\n final int columnWidth = column.getWidth();\n if (columnWidth != defaultColSize || hidden) {\n infos.add(new HeaderPositionInfo(column.getIndex(), columnWidth, _custColId.next(), hidden));\n }\n }\n helpers.putHelper(sheetId, helper = new HeaderPositionHelper(defaultColSize, infos));\n }\n return helper;\n}\n"
"public void complexConstructorMapTest() {\n if (isOnServer()) {\n return;\n }\n JpaEntityManager em = (JpaEntityManager) createEntityManager();\n beginTransaction(em);\n BeerConsumer consumer = new BeerConsumer();\n consumer.setName(\"String_Node_Str\");\n em.persist(consumer);\n Blue blue = new Blue();\n blue.setAlcoholContent(5.0f);\n blue.setUniqueKey(BigInteger.ONE);\n consumer.addBlueBeerToConsume(blue);\n em.persist(blue);\n em.flush();\n String jpqlString = \"String_Node_Str\";\n Query query = em.createQuery(jpqlString);\n EmployeeDetail result = (EmployeeDetail) query.getSingleResult();\n EmployeeDetail expectedResult = new EmployeeDetail(\"String_Node_Str\", \"String_Node_Str\", BigInteger.ONE);\n em.getTransaction().rollback();\n Assert.assertTrue(\"String_Node_Str\", result.equals(expectedResult));\n}\n"
"public void openClientSocket(final ScriptObjectMirror socketClient, final int port, final String host, Map<String, Object> options) {\n if ((Boolean) options.get(\"String_Node_Str\")) {\n if (!MessageHandler.yesNoQuestion(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\")) {\n return;\n }\n }\n final NetClientOptions clientOptions = new NetClientOptions().setConnectTimeout((Integer) options.get(\"String_Node_Str\")).setIdleTimeout((Integer) options.get(\"String_Node_Str\")).setReceiveBufferSize((Integer) options.get(\"String_Node_Str\")).setReconnectAttempts((Integer) options.get(\"String_Node_Str\")).setReconnectInterval((Integer) options.get(\"String_Node_Str\")).setSendBufferSize((Integer) options.get(\"String_Node_Str\")).setSsl((Boolean) options.get(\"String_Node_Str\")).setTcpKeepAlive((Boolean) options.get(\"String_Node_Str\")).setTcpNoDelay((Boolean) options.get(\"String_Node_Str\")).setTrustAll((Boolean) options.get(\"String_Node_Str\"));\n if (clientOptions.isSsl() && !clientOptions.isTrustAll()) {\n PemTrustOptions pemTrustOptions = new PemTrustOptions();\n String caCertPath = (String) options.get(\"String_Node_Str\");\n File caCertFile = FileUtilities.nameToFile(caCertPath, null);\n if (caCertFile == null) {\n _error(socketClient, \"String_Node_Str\");\n return;\n }\n try {\n pemTrustOptions.addCertPath(caCertFile.getCanonicalPath());\n clientOptions.setPemTrustOptions(pemTrustOptions);\n } catch (IOException e) {\n _error(socketClient, \"String_Node_Str\" + caCertFile);\n return;\n }\n }\n String pfxKeyCertPath = (String) options.get(\"String_Node_Str\");\n File pfxKeyCertFile = FileUtilities.nameToFile(pfxKeyCertPath, null);\n if (pfxKeyCertFile != null) {\n PfxOptions pfxOptions = new PfxOptions();\n try {\n pfxOptions.setPath(pfxKeyCertFile.getCanonicalPath());\n } catch (IOException e) {\n _error(socketClient, \"String_Node_Str\" + pfxKeyCertFile);\n return;\n }\n String pfxKeyCertPassword = (String) options.get(\"String_Node_Str\");\n pfxOptions.setPassword(pfxKeyCertPassword);\n clientOptions.setPfxKeyCertOptions(pfxOptions);\n }\n submit(() -> {\n NetClient client = _vertx.createNetClient(clientOptions);\n client.connect(port, host, response -> {\n if (response.succeeded()) {\n NetSocket socket = response.result();\n synchronized (_actor) {\n socketClient.callMember(\"String_Node_Str\", socket, client);\n }\n } else {\n StringBuffer message = new StringBuffer();\n Throwable cause = response.cause();\n while (cause != null) {\n message = message + \"String_Node_Str\" + cause.getMessage();\n cause = cause.getCause();\n }\n String errorMessage = \"String_Node_Str\" + message;\n _error(socketClient, errorMessage, cause);\n }\n });\n });\n}\n"
"public boolean set(Data key, Object value, long ttl) {\n checkIfLoaded();\n final long now = getNow();\n markRecordStoreExpirable(ttl);\n Record record = getRecordOrNull(key, now, false);\n boolean newRecord = false;\n if (record == null) {\n value = mapServiceContext.interceptPut(name, null, value);\n value = mapDataStore.add(key, value, now);\n record = createRecord(key, value, ttl, now);\n records.put(key, record);\n updateSizeEstimator(calculateRecordHeapCost(record));\n newRecord = true;\n } else {\n value = mapServiceContext.interceptPut(name, record.getValue(), value);\n value = mapDataStore.add(key, value, now);\n onStore(record);\n updateSizeEstimator(-calculateRecordHeapCost(record));\n updateRecord(record, value, now);\n updateSizeEstimator(calculateRecordHeapCost(record));\n updateExpiryTime(record, ttl, mapContainer.getMapConfig());\n }\n saveIndex(record);\n return newRecord;\n}\n"
"public void notifyAccountDataChanged() {\n switch(accountManager.size()) {\n case 3:\n this.setThirdAccountPhoto(findAccountNumber(MaterialAccount.THIRD_ACCOUNT).getCircularPhoto());\n case 2:\n this.setSecondAccountPhoto(findAccountNumber(MaterialAccount.SECOND_ACCOUNT).getCircularPhoto());\n case 1:\n this.setFirstAccountPhoto(currentAccount.getCircularPhoto());\n this.setDrawerHeaderImage(currentAccount.getBackground());\n this.setUsername(currentAccount.getTitle());\n this.setUserEmail(currentAccount.getSubTitle());\n case 0:\n }\n}\n"
"private void recieveMessageIdSendCorrelationIdTestImpl(Object idForAmqpMessageClass) throws Exception {\n try (TestAmqpPeer testPeer = new TestAmqpPeer(testFixture.getAvailablePort())) {\n Connection connection = testFixture.establishConnecton(testPeer);\n connection.start();\n testPeer.expectBegin(true);\n Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);\n Queue queue = session.createQueue(\"String_Node_Str\");\n PropertiesDescribedType props = new PropertiesDescribedType();\n props.setMessageId(idForAmqpMessageClass);\n DescribedType amqpValueNullContent = new AmqpValueDescribedType(null);\n testPeer.expectReceiverAttach();\n testPeer.expectLinkFlowRespondWithTransfer(null, null, props, null, amqpValueNullContent);\n testPeer.expectDispositionThatIsAcceptedAndSettled();\n MessageConsumer messageConsumer = session.createConsumer(queue);\n Message receivedMessage = messageConsumer.receive(1000);\n testPeer.waitForAllHandlersToComplete(3000);\n assertNotNull(receivedMessage);\n String expectedBaseIdString = new AmqpMessageIdHelper().toBaseMessageIdString(idForAmqpMessageClass);\n String jmsMessageID = receivedMessage.getJMSMessageID();\n assertEquals(\"String_Node_Str\" + expectedBaseIdString, jmsMessageID);\n testPeer.expectSenderAttach();\n MessageProducer producer = session.createProducer(queue);\n MessageHeaderSectionMatcher headersMatcher = new MessageHeaderSectionMatcher(true);\n MessageAnnotationsSectionMatcher msgAnnotationsMatcher = new MessageAnnotationsSectionMatcher(true);\n MessagePropertiesSectionMatcher propsMatcher = new MessagePropertiesSectionMatcher(true);\n propsMatcher.withCorrelationId(equalTo(idForAmqpMessageClass));\n TransferPayloadCompositeMatcher messageMatcher = new TransferPayloadCompositeMatcher();\n messageMatcher.setHeadersMatcher(headersMatcher);\n messageMatcher.setMessageAnnotationsMatcher(msgAnnotationsMatcher);\n messageMatcher.setPropertiesMatcher(propsMatcher);\n messageMatcher.setMessageContentMatcher(new EncodedAmqpValueMatcher(null));\n testPeer.expectTransfer(messageMatcher);\n Message message = session.createTextMessage();\n message.setJMSCorrelationID(jmsMessageID);\n producer.send(message);\n testPeer.waitForAllHandlersToComplete(3000);\n }\n}\n"
"public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {\n if (!parse) {\n if (qName.equals(_serverName)) {\n parse = true;\n parent = getAttribute(atts, \"String_Node_Str\");\n String implementationClass = getAttribute(atts, \"String_Node_Str\");\n if (implementationClass != null) {\n try {\n componentClass = Class.forName(implementationClass);\n } catch (ClassNotFoundException e) {\n throw new CloudRuntimeException(\"String_Node_Str\" + implementationClass, e);\n }\n }\n library = getAttribute(atts, \"String_Node_Str\");\n }\n } else if (qName.equals(\"String_Node_Str\")) {\n lst = new ArrayList<ComponentInfo<Adapter>>();\n String key = getAttribute(atts, \"String_Node_Str\");\n if (key == null) {\n throw new CloudRuntimeException(\"String_Node_Str\");\n }\n adapters.put(key, lst);\n } else if (qName.equals(\"String_Node_Str\")) {\n ComponentInfo<Adapter> info = new ComponentInfo<Adapter>();\n fillInfo(atts, Adapter.class, info);\n lst.add(info);\n currentInfo = info;\n } else if (qName.equals(\"String_Node_Str\")) {\n ComponentInfo<Manager> info = new ComponentInfo<Manager>();\n fillInfo(atts, Manager.class, info);\n s_logger.info(\"String_Node_Str\" + info.name);\n for (String key : info.keys) {\n s_logger.info(\"String_Node_Str\" + key + \"String_Node_Str\" + info.name);\n managers.put(key, info);\n }\n currentInfo = info;\n } else if (qName.equals(\"String_Node_Str\")) {\n paramName = getAttribute(atts, \"String_Node_Str\");\n value = new StringBuilder();\n } else if (qName.equals(\"String_Node_Str\")) {\n ComponentInfo<GenericDao<?, ?>> info = new ComponentInfo<GenericDao<?, ?>>();\n fillInfo(atts, GenericDao.class, info);\n for (String key : info.keys) {\n daos.put(key, info);\n }\n currentInfo = info;\n } else {\n }\n}\n"
"private void showRelativeTo(UIObject target, CalloutPosition position, int offsetWidth, int offsetHeight) {\n Pair<Integer, Integer> positionPair = Pair.of(0, 0);\n if (CalloutPosition.BOTTOM_RIGHT.equals(position)) {\n left = target.getAbsoluteLeft() + target.getOffsetWidth() / 2 - offsetWidth + ARROW_OFFSET_PX;\n top = target.getAbsoluteTop() - offsetHeight - MARGIN_FROM_TARGET_PX;\n } else if (CalloutPosition.TOP_RIGHT.equals(position)) {\n left = target.getAbsoluteLeft() + target.getOffsetWidth() / 2 - offsetWidth + ARROW_OFFSET_PX;\n top = target.getAbsoluteTop() + target.getOffsetHeight() + MARGIN_FROM_TARGET_PX;\n } else {\n left = 0;\n top = 0;\n }\n setPopupPosition(left, top);\n}\n"
"public void test() {\n String accountsNo = \"String_Node_Str\";\n String organizationNo = \"String_Node_Str\";\n String productNo = \"String_Node_Str\";\n String customerNo = \"String_Node_Str\";\n String accountNo2 = \"String_Node_Str\";\n String accountNo3 = \"String_Node_Str\";\n AccountNoSection.Builder accountNoSectionBuilder = AccountNoSection.builder();\n accountNoSectionBuilder.codeOfAccounts(codeOfAccounts);\n accountNoSectionBuilder.organizationNo(organizationNo);\n accountNoSectionBuilder.productNo(productNo);\n accountNoSectionBuilder.customerNo(customerNo);\n AccountNoSection acocuntNoSection = accountNoSectionBuilder.build();\n String accountNo1 = accountNoService.createAccountNo(acocuntNoSection);\n accountNo1 = accountNoService.getAccountNo(acocuntNoSection);\n Operation.Builder operationBuilder = Operation.builder();\n operationBuilder.openCustomer(codeOfAccounts, accountNo1, organizationNo, productNo, customerNo);\n Operation operation = operationBuilder.build();\n accountingService.post(operation);\n Voucher.Builder voucherBuilder = Voucher.builder();\n Voucher voucher = voucherBuilder.build();\n Transaction.Builder transactionBuilder = Transaction.builder();\n transactionBuilder.associate(voucher);\n transactionBuilder.credit(codeOfAccounts, accountNo1, new BigDecimal(\"String_Node_Str\"));\n transactionBuilder.debit(codeOfAccounts, accountNo2, new BigDecimal(\"String_Node_Str\"));\n transactionBuilder.debit(codeOfAccounts, accountNo3, new BigDecimal(\"String_Node_Str\"));\n Transaction transaction = transactionBuilder.build();\n accountingService.post(transaction);\n TransactionFlag[] transflags = { TransactionFlag.RECORD };\n TransactionSymbol[] transSymbols = { TransactionSymbol.CREDIT };\n List<TransactionEntry> transactionEntries = accountingService.auditTransaction(codeOfAccounts, LocalDate.now(), accountNo1, transflags, transSymbols, voucher.getBusinessId());\n operationBuilder = Operation.builder();\n operationBuilder.freeze(codeOfAccounts, accountNo1, new BigDecimal(\"String_Node_Str\"));\n operationBuilder.lock(codeOfAccounts, accountNo1, voucher.getBusinessId());\n operation = operationBuilder.build();\n accountingService.post(operation);\n OperationSymbol[] operSymbols = { OperationSymbol.OPEN, OperationSymbol.CLOSE };\n List<OperationEntry> operationEntries = accountingService.auditOperation(codeOfAccounts, LocalDate.now(), accountNo3, operSymbols, voucher.getBusinessId());\n}\n"
"public void getInstances(HttpRequest request, HttpResponder responder) {\n programLifecycleHttpHandler.getInstances(RESTMigrationUtils.rewriteV2RequestToV3(request), responder, Constants.DEFAULT_NAMESPACE);\n}\n"
"protected void execute() {\n table = new Table(getClass(), \"String_Node_Str\", \"String_Node_Str\");\n try {\n final PtrStatus3 status = new PTRStatusCallable(service).call();\n addRow(\"String_Node_Str\", status.getDevice());\n addRow(\"String_Node_Str\", status.getMedia());\n addPaperSupplyStates(status.getPaper());\n addRow(\"String_Node_Str\", status.getToner());\n addRow(\"String_Node_Str\", status.getInk());\n addRow(\"String_Node_Str\", status.getLamp());\n addRow(\"String_Node_Str\", status.getRetractBins());\n addRow(\"String_Node_Str\", status.getMediaOnStacker());\n addRow(\"String_Node_Str\", status.getExtra());\n addRow(\"String_Node_Str\", status.getGuidLights());\n addRow(\"String_Node_Str\", status.getDevicePosition());\n addRow(\"String_Node_Str\", status.getPowerSaveRecoveryTime());\n addRow(\"String_Node_Str\", status.getPaperType());\n addRow(\"String_Node_Str\", status.getAntiFraudModule());\n getContent().setUIElement(table);\n } catch (final XfsException e) {\n showException(e);\n }\n}\n"
"public void onPlayerBucketEmpty(PlayerBucketEmptyEvent event) {\n if (JailZoneManager.isInsideJail(event.getBlockClicked().getLocation()) || JailZoneManager.isInsideJail(event.getBlockClicked().getFace(event.getBlockFace()).getLocation())) {\n if (Settings.BucketPenalty > 0 && Jail.prisoners.containsKey(event.getPlayer().getName().toLowerCase()) && Jail.prisoners.get(event.getPlayer().getName().toLowerCase()).getRemainingTime() > 0) {\n JailPrisoner prisoner = Jail.prisoners.get(event.getPlayer().getName().toLowerCase());\n Util.Message(Settings.MessageBucketPenalty, event.getPlayer());\n prisoner.setRemainingTime(prisoner.getRemainingTime() + Settings.BucketPenalty * 6);\n InputOutput.UpdatePrisoner(prisoner);\n } else {\n Util.Message(Settings.MessageBucketNoPenalty, event.getPlayer());\n }\n event.setCancelled(true);\n }\n}\n"
"public boolean isStepMethod(Method paramMethod) {\n if (!Modifier.isPublic(paramMethod.getModifiers())) {\n return false;\n return true;\n}\n"
"private void addSubstitutionDetails(XSDSchema xsdSchema, ATreeNode parentNode, XSDElementDeclaration elementDeclaration, ATreeNode rootSubsNode) throws OdaException, IllegalAccessException, InvocationTargetException {\n boolean hasSubstitution = false;\n Set<ATreeNode> subsChildren = new HashSet<ATreeNode>();\n List<XSDElementDeclaration> directSubstitutionGroups = getDirectSubstitutionGroups(elementDeclaration);\n for (XSDElementDeclaration xsdElementDeclaration : directSubstitutionGroups) {\n String elementName = xsdElementDeclaration.getName();\n hasSubstitution = true;\n if (rootSubsNode == null) {\n rootSubsNode = parentNode;\n }\n ATreeNode node = new ATreeNode();\n String prefix = null;\n String namespace = xsdElementDeclaration.getTargetNamespace();\n node.setCurrentNamespace(namespace);\n XSDTypeDefinition typeDef = xsdElementDeclaration.getTypeDefinition();\n if (namespace != null) {\n prefix = xsdElementDeclaration.getQName().contains(\"String_Node_Str\") ? xsdElementDeclaration.getQName().split(\"String_Node_Str\")[0] : \"String_Node_Str\";\n if (prefix == null || prefix.isEmpty()) {\n if (xsdSchema.getQNamePrefixToNamespaceMap().containsValue(typeDef.getTargetNamespace())) {\n for (String key : xsdSchema.getQNamePrefixToNamespaceMap().keySet()) {\n if (xsdSchema.getQNamePrefixToNamespaceMap().get(key).equals(typeDef.getTargetNamespace())) {\n prefix = key;\n }\n }\n }\n }\n if (isEnableGeneratePrefix() && (prefix == null || prefix.isEmpty())) {\n prefix = \"String_Node_Str\" + prefixNumberGenerated;\n prefixNumberGenerated++;\n }\n if (prefix != null && !prefix.isEmpty()) {\n elementName = prefix + \"String_Node_Str\" + xsdElementDeclaration.getName();\n namespaceToPrefix.put(namespace, prefix);\n } else {\n ATreeNode namespaceNode = new ATreeNode();\n namespaceNode.setDataType(\"String_Node_Str\");\n namespaceNode.setType(ATreeNode.NAMESPACE_TYPE);\n namespaceNode.setValue(namespace);\n node.addChild(namespaceNode);\n }\n }\n node.setValue(elementName);\n node.setType(ATreeNode.ELEMENT_TYPE);\n node.setDataType(xsdElementDeclaration.getName());\n XSDTypeDefinition xsdTypeDefinition = xsdElementDeclaration.getTypeDefinition();\n if (xsdTypeDefinition == null) {\n XSDComplexTypeDefinition generalType = xsdSchema.resolveComplexTypeDefinitionURI(xsdElementDeclaration.getURI());\n if (generalType.getContainer() != null) {\n xsdTypeDefinition = generalType;\n }\n }\n if (xsdTypeDefinition != null && xsdTypeDefinition.getName() != null) {\n node.setDataType(xsdTypeDefinition.getName());\n }\n if (xsdTypeDefinition instanceof XSDComplexTypeDefinition) {\n addComplexTypeDetails(xsdSchema, node, xsdTypeDefinition, prefix, namespace, \"String_Node_Str\" + elementName + \"String_Node_Str\");\n }\n List<String> namespaceList = new ArrayList(namespaceToPrefix.keySet());\n Collections.reverse(namespaceList);\n for (String currentNamespace : namespaceList) {\n ATreeNode namespaceNode = null;\n if (currentNamespace != null) {\n prefix = namespaceToPrefix.get(currentNamespace);\n namespaceNode = new ATreeNode();\n namespaceNode.setDataType(prefix);\n namespaceNode.setType(ATreeNode.NAMESPACE_TYPE);\n namespaceNode.setValue(currentNamespace);\n node.addAsFirstChild(namespaceNode);\n }\n }\n addSubstitutionDetails(xsdSchema, node, xsdElementDeclaration, rootSubsNode);\n subsChildren.add(node);\n }\n if (hasSubstitution) {\n if (supportSubstitution) {\n Object oldValue = parentNode.getValue();\n parentNode.setSubstitution(true);\n parentNode.setValue(oldValue + SUBS);\n Object[] originalChildren = parentNode.getChildren();\n parentNode.removeAllChildren();\n if (!elementDeclaration.isAbstract()) {\n ATreeNode cloneNode = new ATreeNode();\n BeanUtils.copyProperties(cloneNode, parentNode);\n cloneNode.setSubstitution(false);\n cloneNode.setValue(oldValue);\n cloneNode.addChild(originalChildren);\n parentNode.addAsFirstChild(cloneNode);\n }\n parentNode.addChild(subsChildren.toArray());\n } else {\n if (rootSubsNode != null) {\n ATreeNode parent = rootSubsNode.getParent();\n if (parent != null) {\n List children = Arrays.asList(parent.getChildren());\n for (ATreeNode child : subsChildren) {\n if (!children.contains(child)) {\n parent.addChild(child);\n }\n }\n }\n }\n }\n }\n}\n"
"public void setAttribute(String namespace, String name, String value) {\n if (namespace == null)\n namespace = \"String_Node_Str\";\n for (int i = attributes.size() - 1; i >= 0; i--) {\n TreeElement attribut = attributes.elementAt(i);\n if (attribut.name.equals(name) && (namespace == null || namespace.equals(attribut.namespace))) {\n if (value == null) {\n attributes.removeElementAt(i);\n } else {\n attribut.setValue(new UncastData(value));\n }\n return;\n }\n }\n TreeElement attr = TreeElement.constructAttributeElement(namespace, name);\n attr.setValue(new UncastData(value));\n attr.setParent(this);\n attributes.addElement(attr);\n}\n"
"public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n Core core = new Core(getActivity());\n BaseFragmentActivity activity = (BaseFragmentActivity) getActivity();\n if (activity != null)\n activity.getSupportActionBar().setSubtitle(null);\n if (!(core.isTablet() || Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH)) {\n activity.getSupportActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM, ActionBar.DISPLAY_HOME_AS_UP | ActionBar.DISPLAY_SHOW_HOME | ActionBar.DISPLAY_SHOW_TITLE | ActionBar.DISPLAY_SHOW_CUSTOM);\n LayoutInflater inflater = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n View actionBarButtons = inflater.inflate(R.layout.actionbar_button_cancel_done, new LinearLayout(getActivity()), false);\n View cancelActionView = actionBarButtons.findViewById(R.id.action_cancel);\n cancelActionView.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n onDoneClick();\n }\n });\n View doneActionView = actionBarButtons.findViewById(R.id.action_done);\n ImageView doneImageView = (ImageView) doneActionView.findViewById(R.id.image_done);\n doneImageView.setImageDrawable(getActivity().getResources().getDrawable(core.resolveIdAttribute(R.attr.ic_action_search)));\n TextView doneTextView = (TextView) doneActionView.findViewById(R.id.text_done);\n doneTextView.setText(R.string.search);\n doneActionView.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n onSearchClick();\n }\n });\n activity.getSupportActionBar().setCustomView(actionBarButtons);\n }\n}\n"
"public SelectedItems<?> getSelected() {\n SelectedItems<?> selected = null;\n if (itemsSearchResultPanel != null && itemsSearchResultPanel.hasElementsSelected()) {\n selected = itemsSearchResultPanel.getSelected();\n }\n if (representationsSearchResultPanel != null && representationsSearchAdvancedFieldsPanel.isVisible()) {\n selected = representationsSearchResultPanel.getSelected();\n }\n if (filesSearchResultPanel != null && filesSearchAdvancedFieldsPanel.isVisible()) {\n selected = filesSearchResultPanel.getSelected();\n }\n if (selected == null) {\n selected = new SelectedItemsList<>();\n }\n return selected;\n}\n"
"public static int softCompare(double a, double b) {\n final BigDecimal acceptedVariation = BigDecimal.valueOf(1d).divide(BigDecimal.valueOf(10d).pow(PCT_COMPARISON_SCALE - 1));\n BigDecimal first = new BigDecimal(a).setScale(PCT_COMPARISON_SCALE, ROUNDING_MODE);\n BigDecimal second = new BigDecimal(b).setScale(PCT_COMPARISON_SCALE, ROUNDING_MODE);\n BigDecimal variation = first.subtract(second).abs();\n if (variation.compareTo(acceptedVariation) < 0) {\n return 0;\n } else {\n return first.compareTo(second);\n }\n}\n"
"private void initHierarchy() {\n JBPropertyDescriptor propDes = null;\n IComponentIdentifier compId = getNode().getTechnicalName();\n if (compId != null) {\n List<?> hierarchy = compId.getHierarchyNames();\n for (int i = 0; i < hierarchy.size(); i++) {\n if (i == 0) {\n propDes = new PropertyDescriptor(new ComponentHierarchyController(i), P_ELEMENT_DISPLAY_HIERARCHY);\n } else {\n propDes = new PropertyDescriptor(new ComponentHierarchyController(i), StringConstants.EMPTY);\n }\n propDes.setCategory(P_ELEMENT_DISPLAY_COMPADDINFO);\n addPropertyDescriptor(propDes);\n }\n }\n}\n"
"public void export(Network network, Properties parameters, DataSource dataSource) {\n if (network == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n XMLExportOptions options = new XMLExportOptions();\n if (parameters != null) {\n options.setIndent(!\"String_Node_Str\".equals(parameters.getProperty(INDENT_PROPERTY))).setWithBranchSV(\"String_Node_Str\".equals(parameters.getProperty(WITH_BRANCH_STATE_VARIABLES_PROPERTY))).setForceBusBranchTopo(\"String_Node_Str\".equals(parameters.getProperty(FORCE_BUS_BRANCH_TOPO_PROPERTY, \"String_Node_Str\"))).setOnlyMainCc(\"String_Node_Str\".equals(parameters.getProperty(ONLY_MAIN_CC_PROPERTIES))).setAnonymized(\"String_Node_Str\".equals(parameters.getProperty(ANONYMISED_PROPERTIES))).setSkipExtensions(\"String_Node_Str\".equals(parameters.getProperty(SKIP_EXTENSIONS_PROPERTIES)));\n }\n try {\n long startTime = System.currentTimeMillis();\n try (OutputStream os = dataSource.newOutputStream(null, \"String_Node_Str\", false);\n BufferedOutputStream bos = new BufferedOutputStream(os)) {\n Anonymizer anonymizer = NetworkXml.write(network, options, bos);\n if (anonymizer != null) {\n try (BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(dataSource.newOutputStream(\"String_Node_Str\", \"String_Node_Str\", false), StandardCharsets.UTF_8))) {\n anonymizer.write(writer);\n }\n }\n }\n LOGGER.debug(\"String_Node_Str\", (System.currentTimeMillis() - startTime));\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n}\n"
"public RemoteFileDesc toRemoteFileDesc(HostData data) {\n if (cachedRFD != null && cachedRFD.getPort() == data.getPort() && cachedRFD.getHost().equals(data.getIP()))\n return cachedRFD;\n else {\n RemoteFileDesc rfd = new RemoteFileDesc(data.getIP(), data.getPort(), getIndex(), getName(), (int) getSize(), data.getClientGUID(), data.getSpeed(), data.isChatEnabled(), data.getQuality(), data.isBrowseHostEnabled(), getDocument(), getUrns(), data.isReplyToMulticastQuery(), data.isFirewalled(), data.getVendorCode(), data.getPushProxies(), getCreateTime(), data.getFWTVersionSupported());\n cachedRFD = rfd;\n return rfd;\n }\n}\n"
"public Optional<RestxHandlerMatch> match(RestxRequest req) {\n Optional<String> origin = req.getHeader(\"String_Node_Str\");\n if (origin.isPresent() && isSimpleCORSRequest(req)) {\n CORS cors = CORS.check(authorizers, req, origin.get(), req.getHttpMethod(), req.getRestxPath());\n if (cors.isAccepted()) {\n return Optional.of(new RestxHandlerMatch(new StdRestxRequestMatch(\"String_Node_Str\", req.getRestxPath(), ImmutableMap.<String, String>of(), ImmutableMap.of(\"String_Node_Str\", cors)), this));\n }\n }\n return Optional.absent();\n}\n"
"public String getCustomTranslation(final String key, final String locale) {\n if (getTenantCustomTranslationsCache().containsKey(key) && getTenantCustomTranslationsCache().get(key).containsKey(locale)) {\n return getTenantCustomTranslationsCache().get(key).get(locale);\n }\n return null;\n}\n"
"public static String center(String text) {\n int w = 0;\n boolean isBold = false;\n for (int i = 0; i < text.length(); ++i) {\n char c = text.charAt(i);\n if (c == ChatColor.COLOR_CHAR)\n isBold = text.charAt(++i) == ChatColor.BOLD.getChar();\n else\n w += 1 + getCharWidth(c, isBold);\n }\n int repeat = (LINE_WIDTH - w) / (2 * (charWidth.get(' ') + 1));\n return StringUtils.repeat(' ', repeat < 0 ? 0 : repeat) + text;\n}\n"
"private QueueProcessor newQueueProcessor(String name) {\n if (name.equals(\"String_Node_Str\")) {\n return new LocalQueueProcessor(localService);\n } else if (name.equals(\"String_Node_Str\")) {\n return new BlockQueueProcessor(localService, settings);\n } else if (name.equals(\"String_Node_Str\")) {\n return new PassiveQueueProcessor(localService, localService.getContact());\n } else {\n throw new IllegalArgumentException(\"String_Node_Str\" + name);\n }\n}\n"
"public Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache) {\n boolean importData = false;\n if (req.getParameter(ARG_IMPORT) != null) {\n importData = Boolean.parseBoolean(req.getParameter(ARG_IMPORT));\n }\n String siteName = RmSiteType.DEFAULT_SITE_NAME;\n if (req.getParameter(ARG_SITE_NAME) != null) {\n siteName = req.getParameter(ARG_SITE_NAME);\n }\n if (importData) {\n SiteInfo site = siteService.getSite(siteName);\n if (site == null) {\n throw new AlfrescoRuntimeException(\"String_Node_Str\" + siteName);\n }\n NodeRef filePlan = siteService.getContainer(siteName, RmSiteType.COMPONENT_DOCUMENT_LIBRARY);\n if (filePlan == null) {\n filePlan = siteService.createContainer(siteName, RmSiteType.COMPONENT_DOCUMENT_LIBRARY, TYPE_FILE_PLAN, null);\n }\n InputStream is = BootstrapTestDataGet.class.getClassLoader().getResourceAsStream(XML_IMPORT);\n if (is == null) {\n throw new AlfrescoRuntimeException(\"String_Node_Str\");\n }\n Reader viewReader = null;\n try {\n viewReader = new InputStreamReader(is, CHARSET_NAME);\n } catch (UnsupportedEncodingException error) {\n throw new AlfrescoRuntimeException(\"String_Node_Str\" + charsetName + \"String_Node_Str\", error);\n }\n Location location = new Location(filePlan);\n importerService.importView(viewReader, location, null, null);\n }\n BootstrapTestDataGet.patchLoadedData(searchService, nodeService, recordsManagementService, recordsManagementActionService, permissionService, authorityService, recordsManagementSecurityService, recordsManagementSearchBehaviour, dispositionService, recordFolderService);\n Map<String, Object> model = new HashMap<String, Object>(1, 1.0f);\n model.put(\"String_Node_Str\", true);\n return model;\n}\n"
"void animateBounds(final AnimateBoundsUser target, Rect from, Rect to) {\n boolean moveToFullscreen = false;\n if (to == null) {\n to = new Rect();\n target.getFullScreenBounds(to);\n moveToFullscreen = true;\n }\n final BoundsAnimator existing = mRunningAnimations.get(target);\n final boolean replacing = existing != null;\n if (replacing) {\n existing.cancel();\n }\n BoundsAnimator animator = new BoundsAnimator(target, from, to, moveToFullscreen);\n mRunningAnimations.put(target, animator);\n animator.setFloatValues(0f, 1f);\n animator.setDuration(DEFAULT_APP_TRANSITION_DURATION);\n animator.setInterpolator(new LinearInterpolator());\n animator.start();\n}\n"
"protected void internalSaveWidgetValues() {\n IDialogSettings settings = getDialogSettings();\n if (settings != null) {\n if (getCurrentExportType1().equals(JobExportType.PETALSESB)) {\n String[] directoryNames = settings.getArray(PETALS_EXPORT_DESTINATIONS);\n if (directoryNames == null) {\n directoryNames = new String[0];\n directoryNames = addToHistory(directoryNames, saDestinationFilePath);\n settings.put(PETALS_EXPORT_DESTINATIONS, directoryNames);\n return;\n }\n String[] directoryNames = settings.getArray(STORE_DESTINATION_NAMES_ID);\n if (directoryNames == null) {\n directoryNames = new String[0];\n }\n String destinationValue = getDestinationValue();\n directoryNames = addToHistory(directoryNames, destinationValue);\n settings.put(STORE_EXPORTTYPE_ID, getCurrentExportType1().toString());\n settings.put(STORE_DESTINATION_NAMES_ID, directoryNames);\n if (getCurrentExportType1().equals(JobExportType.OSGI)) {\n return;\n }\n if (contextButton != null) {\n settings.put(STORE_CONTEXT_ID, contextButton.getSelection());\n }\n if (jobScriptButton != null && !jobScriptButton.isDisposed()) {\n settings.put(STORE_SOURCE_ID, jobScriptButton.getSelection());\n }\n if (applyToChildrenButton != null) {\n settings.put(APPLY_TO_CHILDREN_ID, applyToChildrenButton.getSelection());\n }\n if (jobItemButton != null && !jobItemButton.isDisposed()) {\n settings.put(STORE_JOB_ID, jobItemButton.getSelection());\n }\n if (exportDependencies != null && !exportDependencies.isDisposed()) {\n settings.put(STORE_DEPENDENCIES_ID, exportDependencies.getSelection());\n }\n if (getCurrentExportType1().equals(JobExportType.POJO)) {\n settings.put(STORE_SHELL_LAUNCHER_ID, shellLauncherButton.getSelection());\n settings.put(STORE_SYSTEM_ROUTINE_ID, systemRoutineButton.getSelection());\n settings.put(STORE_USER_ROUTINE_ID, userRoutineButton.getSelection());\n settings.put(STORE_MODEL_ID, modelButton.getSelection());\n settings.put(EXTRACT_ZIP_FILE, chkButton.getSelection());\n return;\n } else if (getCurrentExportType1().equals(JobExportType.WSZIP)) {\n settings.put(STORE_WEBXML_ID, webXMLButton.getSelection());\n settings.put(STORE_CONFIGFILE_ID, configFileButton.getSelection());\n settings.put(STORE_AXISLIB_ID, axisLibButton.getSelection());\n settings.put(STORE_WSDD_ID, wsddButton.getSelection());\n settings.put(STORE_WSDL_ID, wsdlButton.getSelection());\n settings.put(EXTRACT_ZIP_FILE, chkButton.getSelection());\n }\n }\n}\n"
"private void okPressed() {\n String destPath = pathField.getText();\n Object[] ret = FileToolkit.resolvePath(destPath, mainFrame.getActiveTable().getCurrentFolder());\n if (ret == null || (files.size() > 1 && ret[1] != null)) {\n showErrorDialog(Translator.get(\"String_Node_Str\", destPath), errorDialogTitle);\n return;\n }\n AbstractFile destFolder = (AbstractFile) ret[0];\n String newName = (String) ret[1];\n int defaultFileExistsAction = fileExistsActionComboBox.getSelectedIndex();\n if (defaultFileExistsAction == 0)\n defaultFileExistsAction = FileCollisionDialog.ASK_ACTION;\n else\n defaultFileExistsAction = DEFAULT_ACTIONS[defaultFileExistsAction - 1];\n startJob(destFolder, newName, defaultFileExistsAction);\n}\n"
"public void run() {\n AudioStreamBasicDescription asbd = new AudioStreamBasicDescription(mSampleRate, mFormatID, mFormatFlags, mBytesPerPacket, mFramesPerPacket, mBytesPerFrame, mChannelsPerFrame, mBitsPerChannel, 0);\n AudioQueuePtr mQueuePtr = new AudioQueuePtr();\n Method callbackMethod = null;\n Method[] methods = me.getClass().getMethods();\n int i = methods.length;\n while (i-- > 0) if (methods[i].getName().equals(\"String_Node_Str\")) {\n callbackMethod = methods[i];\n break;\n }\n FunctionPtr fp = new FunctionPtr(callbackMethod);\n AQPlayerState aqData = new AQPlayerState(me);\n mStateID = aqData.mID();\n VoidPtr vp = aqData.as(VoidPtr.class);\n OSStatus aqe = AudioQueue.newOutput(asbd, fp, vp, null, null, 0, mQueuePtr);\n System.out.println(AudioQueueError.valueOf(aqe.getStatusCode()));\n mQueue = mQueuePtr.get();\n int bufferByteSize = deriveBufferSize(asbd, 2, 0.5);\n System.out.println(\"String_Node_Str\" + bufferByteSize);\n System.out.println(\"String_Node_Str\" + (int) AudioQueueParam.Volume.value());\n mQueue.setParameter((int) AudioQueueParam.Volume.value(), 1.0f);\n mRunning = true;\n AudioQueueBufferPtr mBuffers = Struct.allocate(AudioQueueBufferPtr.class, kNumberBuffers);\n AudioQueueBufferPtr[] buffers = mBuffers.toArray(kNumberBuffers);\n for (i = 0; i < kNumberBuffers; ++i) {\n mQueue.allocateBuffer(bufferByteSize, buffers[i]);\n nextChunk(mQueue, buffers[i].get());\n }\n System.out.println(\"String_Node_Str\");\n mQueue.start(null);\n System.out.println(\"String_Node_Str\");\n}\n"
"private void startAnimations(final ExpandableView child, StackScrollState.ViewState viewState, StackScrollState finalState, int i) {\n int childVisibility = child.getVisibility();\n boolean wasVisible = childVisibility == View.VISIBLE;\n final float alpha = viewState.alpha;\n if (!wasVisible && alpha != 0 && !viewState.gone) {\n child.setVisibility(View.VISIBLE);\n }\n boolean yTranslationChanging = child.getTranslationY() != viewState.yTranslation;\n boolean zTranslationChanging = child.getTranslationZ() != viewState.zTranslation;\n boolean scaleChanging = child.getScaleX() != viewState.scale;\n boolean alphaChanging = alpha != child.getAlpha();\n boolean heightChanging = viewState.height != child.getActualHeight();\n boolean topInsetChanging = viewState.clipTopAmount != child.getClipTopAmount();\n boolean wasAdded = mNewAddChildren.contains(child);\n boolean hasDelays = mAnimationFilter.hasDelays;\n boolean isDelayRelevant = yTranslationChanging || zTranslationChanging || scaleChanging || alphaChanging || heightChanging || topInsetChanging;\n long delay = 0;\n long duration = mCurrentLength;\n if (hasDelays && isDelayRelevant || wasAdded) {\n delay = mCurrentAdditionalDelay + calculateChildAnimationDelay(viewState, finalState);\n }\n if (wasAdded && mAnimationFilter.hasGoToFullShadeEvent) {\n child.setTranslationY(child.getTranslationY() + mGoToFullShadeAppearingTranslation);\n yTranslationChanging = true;\n float longerDurationFactor = viewState.notGoneIndex - mCurrentLastNotAddedIndex;\n longerDurationFactor = (float) Math.pow(longerDurationFactor, 0.7f);\n duration = ANIMATION_DURATION_APPEAR_DISAPPEAR + 50 + (long) (100 * longerDurationFactor);\n }\n if (yTranslationChanging) {\n if (noAnimation) {\n child.setTranslationY(viewState.yTranslation);\n } else {\n startYTranslationAnimation(child, viewState, duration, delay);\n }\n }\n if (zTranslationChanging) {\n startZTranslationAnimation(child, viewState, duration, delay);\n }\n if (scaleChanging) {\n startScaleAnimation(child, viewState, duration);\n }\n if (alphaChanging && child.getTranslationX() == 0) {\n startAlphaAnimation(child, viewState, duration, delay);\n }\n if (heightChanging) {\n startHeightAnimation(child, viewState, duration, delay);\n }\n if (topInsetChanging) {\n startInsetAnimation(child, viewState, duration, delay);\n }\n child.setDimmed(viewState.dimmed, mAnimationFilter.animateDimmed && !wasAdded);\n child.setDark(viewState.dark, mAnimationFilter.animateDark);\n child.setBelowSpeedBump(viewState.belowSpeedBump);\n child.setHideSensitive(viewState.hideSensitive, mAnimationFilter.animateHideSensitive && !wasAdded, delay, duration);\n child.setScrimAmount(viewState.scrimAmount);\n if (wasAdded) {\n child.performAddAnimation(delay, mCurrentLength);\n }\n if (child instanceof SpeedBumpView) {\n finalState.performSpeedBumpAnimation(i, (SpeedBumpView) child, viewState, delay + duration);\n }\n}\n"
"public void expandCustomLineItemsDiscount() throws Exception {\n final RelativeCartDiscountValue relativeCartDiscountValue = RelativeCartDiscountValue.of(10000);\n withCartHavingDiscountedCustomLineItem(client(), relativeCartDiscountValue, (cart) -> {\n final CartQuery query = CartQuery.of().withPredicates(m -> m.id().is(cart.getId())).withExpansionPaths(m -> m.customLineItems().discountedPricePerQuantity().discountedPrice().includedDiscounts().discount());\n assertEventually(() -> {\n final Cart loadedCart = client().executeBlocking(query).head().get();\n final Reference<CartDiscount> cartDiscountReference = loadedCart.getCustomLineItems().get(0).getDiscountedPricePerQuantity().get(0).getDiscountedPrice().getIncludedDiscounts().get(0).getDiscount();\n assertThat(cartDiscountReference.getObj()).isNotNull();\n final CartDiscount customLineItemDiscount = cartDiscountReference.getObj();\n assertThat(customLineItemDiscount).isNotNull();\n final CartDiscountValue customLineItemDiscountValue = customLineItemDiscount.getValue();\n assertThat(customLineItemDiscountValue).isEqualTo(relativeCartDiscountValue);\n });\n });\n}\n"
"public void processFile(String path) {\n try {\n System.out.println(\"String_Node_Str\" + path);\n ResourceProducer producer = ProducerUtils.getProducer(path);\n ResourceFactoryMapper mapper = new ExtractingResourceFactoryMapper();\n ExtractingResourceProducer exProducer = new ExtractingResourceProducer(producer, mapper);\n Resource resource = null;\n resource = exProducer.getNext();\n while (resource != null) {\n resource = exProducer.getNext();\n if (resource instanceof HTTPResponseResource) {\n String url = JSONUtils.extractSingle(resource.getMetaData().getTopMetaData(), \"String_Node_Str\");\n HTTPResponseResource httpResp = (HTTPResponseResource) resource;\n HttpResponse response = httpResp.getHttpResponse();\n int status = response.getMessage().getStatus();\n if (url.endsWith(\"String_Node_Str\")) {\n if (jedis != null) {\n if (jedis.exists(url)) {\n dupCount++;\n continue;\n }\n } else {\n if (urlDB.contains(url)) {\n dupCount++;\n continue;\n }\n urlDB.add(url);\n }\n String contents = IOUtils.toString(httpResp.getHttpResponse().getInner(), \"String_Node_Str\");\n int size = contents.length();\n System.out.println(\"String_Node_Str\" + status + \"String_Node_Str\" + url + \"String_Node_Str\" + size + \"String_Node_Str\" + contentType);\n totalSize += contents.length();\n totalFiles++;\n if (status == 200) {\n totalSuccessSize += contents.length();\n totalSuccessFiles++;\n if (jedis != null) {\n jedis.setex(url, 60 * 60 * 4, contents);\n }\n }\n }\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ResourceParseException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n}\n"
"private void reportOnWorkflow(String workflowAccession, Date earlyDate, Date lateDate) throws IOException {\n String title = \"String_Node_Str\" + workflowAccession;\n if (earlyDate != null) {\n title += \"String_Node_Str\" + dateFormat.format(earlyDate);\n }\n if (lateDate != null) {\n title += \"String_Node_Str\" + dateFormat.format(lateDate);\n }\n initWriter(title);\n String report;\n try {\n report = metadata.getWorkflowRunReport(Integer.parseInt(workflowAccession), earlyDate, lateDate);\n } catch (RuntimeException e) {\n println(\"String_Node_Str\");\n ret = new ReturnValue(ReturnValue.INVALIDPARAMETERS);\n return;\n }\n if (options.has(\"String_Node_Str\")) {\n writer.write(TabExpansionUtil.expansion(report));\n return;\n }\n writer.write(report);\n}\n"
"boolean checkAllowNonWakeupDelayLocked(long nowELAPSED) {\n if (mInteractive) {\n return false;\n }\n if (mLastAlarmDeliveryTime <= 0) {\n return false;\n }\n if (mPendingNonWakeupAlarms.size() > 0 && mNextNonWakeupDeliveryTime < nowELAPSED) {\n return false;\n }\n long timeSinceLast = nowELAPSED - mLastAlarmDeliveryTime;\n return timeSinceLast <= currentNonWakeupFuzzLocked(nowELAPSED);\n}\n"
"public INetHandler getClientPlayHandler() {\n return this.currentPlayClient;\n}\n"
"String[] getContentsArray() {\n if (parentContents == null) {\n if (canGoUp) {\n return new String[] { getBuilder().goUpLabel };\n }\n return new String[] {};\n }\n String[] results = new String[parentContents.length + (canGoUp ? 1 : 0)];\n if (canGoUp) {\n results[0] = getBuilder().goUpLabel;\n }\n for (int i = 0; i < parentContents.length; i++) {\n results[canGoUp ? i + 1 : i] = parentContents[i].getName();\n }\n return results;\n}\n"
"public static void makeOrbsVisible(boolean isVisible) {\n Collection<ArrayList<OrbCell>> attachedOrbs = attachedOrbMap.values();\n Iterator<ArrayList<OrbCell>> it = attachedOrbs.iterator();\n while (it.hasNext()) {\n ArrayList<OrbCell> orbs = it.next();\n for (OrbCell orb : orbs) {\n orb.setVisible(isVisible);\n }\n }\n for (OrbCell orbCell : detachedOrbList) {\n orbCell.setVisible(isVisible);\n }\n}\n"
"public void writeColumns(EntityManagerImpl em, EnhancedEntity e, EntityMetadata m) throws Exception {\n String dbName = m.getKeyspaceName();\n String documentName = m.getColumnFamilyName();\n String key = e.getId();\n log.debug(\"String_Node_Str\" + dbName + \"String_Node_Str\" + documentName + \"String_Node_Str\" + key);\n Object entity = loadColumns(em, m.getEntityClazz(), dbName, documentName, key, m);\n if (entity != null) {\n log.debug(\"String_Node_Str\" + dbName + \"String_Node_Str\" + documentName + \"String_Node_Str\" + key);\n DBCollection dbCollection = mongoDb.getCollection(documentName);\n BasicDBObject searchQuery = new BasicDBObject();\n searchQuery.put(m.getIdColumn().getName(), key);\n BasicDBObject updatedDocument = new MongoDBDataHandler().getDocumentFromEntity(em, m, e.getEntity());\n dbCollection.update(searchQuery, updatedDocument);\n } else {\n log.debug(\"String_Node_Str\" + dbName + \"String_Node_Str\" + documentName + \"String_Node_Str\" + key);\n DBCollection dbCollection = mongoDb.getCollection(documentName);\n BasicDBObject document = new MongoDBDataHandler().getDocumentFromEntity(em, m, e.getEntity());\n dbCollection.insert(document);\n }\n}\n"
"public StudyBean getStudyIdentifier(StudyBean study, Node studyNode) throws Exception {\n Element studyElement = (Element) studyNode;\n NodeList nlist = studyElement.getElementsByTagNameNS(CONNECTOR_NAMESPACE_V1, \"String_Node_Str\");\n String identifier = \"String_Node_Str\";\n System.out.println(\"String_Node_Str\" + nlist.getLength() + \"String_Node_Str\");\n for (int j = 0; j < nlist.getLength(); j++) {\n Node nlistNode = nlist.item(j);\n String isPrimaryIdentifier = this.getElementValue(nlistNode, CONNECTOR_NAMESPACE_V1, \"String_Node_Str\", \"String_Node_Str\");\n if (\"String_Node_Str\".equals(isPrimaryIdentifier)) {\n identifier = this.getElementValue(nlistNode, CONNECTOR_NAMESPACE_V1, \"String_Node_Str\", \"String_Node_Str\");\n }\n }\n study.setIdentifier(identifier);\n return study;\n}\n"
"public IListBoxElement getSelectedElement() {\n if (_selectedIndex == -1 || _selectedIndex >= _elements.size()) {\n return null;\n }\n return _elements.get(_selectedIndex);\n}\n"
"public void add(Widget w, int left, int top) {\n w.removeFromParent();\n setWidgetPositionImpl(w, left, top);\n insert(w, beforeIndex);\n}\n"
"protected void onPostExecute(final String[] hashes) {\n super.onPostExecute(hashes);\n if (!f.isDirectory() && f.getSize() != 0) {\n md5HashText.setText(hashes[0]);\n sha256Text.setText(hashes[1]);\n mMD5LinearLayout.setOnLongClickListener(new View.OnLongClickListener() {\n public boolean onLongClick(View v) {\n Futils.copyToClipboard(c, hashes[0]);\n Toast.makeText(c, c.getResources().getString(R.string.md5).toUpperCase() + \"String_Node_Str\" + c.getResources().getString(R.string.properties_copied_clipboard), Toast.LENGTH_SHORT).show();\n return false;\n }\n });\n mSHA256LinearLayout.setOnLongClickListener(new View.OnLongClickListener() {\n public boolean onLongClick(View v) {\n Futils.copyToClipboard(c, hashes[1]);\n Toast.makeText(c, c.getResources().getString(R.string.hash_sha256) + \"String_Node_Str\" + c.getResources().getString(R.string.properties_copied_clipboard), Toast.LENGTH_SHORT).show();\n return false;\n }\n });\n } else {\n mMD5LinearLayout.setVisibility(View.GONE);\n mSHA256LinearLayout.setVisibility(View.GONE);\n }\n}\n"
"private JCExpression makeMetafactoryIndyCall(TranslationContext<?> context, int refKind, Symbol refSym, List<JCExpression> indy_args) {\n JCFunctionalExpression tree = context.tree;\n MethodSymbol samSym = (MethodSymbol) types.findDescriptorSymbol(tree.type.tsym);\n List<Object> staticArgs = List.<Object>of(typeToMethodType(samSym.type), new Pool.MethodHandle(refKind, refSym, types), typeToMethodType(tree.getDescriptorType(types)));\n ListBuffer<Type> indy_args_types = new ListBuffer<>();\n for (JCExpression arg : indy_args) {\n indy_args_types.append(arg.type);\n }\n MethodType indyType = new MethodType(indy_args_types.toList(), tree.type, List.<Type>nil(), syms.methodClass);\n Name metafactoryName = context.needsAltMetafactory() ? names.altMetafactory : names.metafactory;\n if (context.needsAltMetafactory()) {\n ListBuffer<Object> markers = new ListBuffer<>();\n for (Type t : tree.targets.tail) {\n if (t.tsym != syms.serializableType.tsym) {\n markers.append(t.tsym);\n }\n }\n int flags = context.isSerializable() ? FLAG_SERIALIZABLE : 0;\n boolean hasMarkers = markers.nonEmpty();\n boolean hasBridges = context.bridges.nonEmpty();\n if (hasMarkers) {\n flags |= FLAG_MARKERS;\n }\n if (hasBridges) {\n flags |= FLAG_BRIDGES;\n }\n staticArgs = staticArgs.append(flags);\n if (hasMarkers) {\n staticArgs = staticArgs.append(markers.length());\n staticArgs = staticArgs.appendList(markers.toList());\n }\n if (hasBridges) {\n staticArgs = staticArgs.append(context.bridges.length() - 1);\n for (Symbol s : context.bridges) {\n Type s_erasure = s.erasure(types);\n if (!types.isSameType(s_erasure, samSym.erasure(types))) {\n staticArgs = staticArgs.append(s.erasure(types));\n }\n }\n }\n if (context.isSerializable()) {\n addDeserializationCase(refKind, refSym, tree.type, samSym, tree, staticArgs, indyType);\n }\n }\n return makeIndyCall(tree, syms.lambdaMetafactory, metafactoryName, staticArgs, indyType, indy_args, samSym.name);\n}\n"
"private void updateMediaSourceInternal(MediaSourceHolder mediaSourceHolder, Timeline timeline) {\n if (mediaSourceHolder == null) {\n throw new IllegalArgumentException();\n }\n DeferredTimeline deferredTimeline = mediaSourceHolder.timeline;\n if (deferredTimeline.getTimeline() == timeline) {\n return;\n }\n int windowOffsetUpdate = timeline.getWindowCount() - deferredTimeline.getWindowCount();\n int periodOffsetUpdate = timeline.getPeriodCount() - deferredTimeline.getPeriodCount();\n if (windowOffsetUpdate != 0 || periodOffsetUpdate != 0) {\n correctOffsets(mediaSourceHolder.childIndex + 1, 0, windowOffsetUpdate, periodOffsetUpdate);\n }\n mediaSourceHolder.timeline = deferredTimeline.cloneWithNewTimeline(timeline);\n if (!mediaSourceHolder.isPrepared) {\n for (int i = deferredMediaPeriods.size() - 1; i >= 0; i--) {\n if (deferredMediaPeriods.get(i).mediaSource == mediaSourceHolder.mediaSource) {\n deferredMediaPeriods.get(i).createPeriod();\n deferredMediaPeriods.remove(i);\n }\n }\n }\n mediaSourceHolder.isPrepared = true;\n maybeNotifyListener(null);\n}\n"
"public void init(GLAutoDrawable drawable) {\n this.drawable = drawable;\n this.gl = drawable.getGL().getGL2();\n if (DEBUG) {\n System.out.println(\"String_Node_Str\" + gl);\n System.out.println(\"String_Node_Str\");\n GLContext context = drawable.getContext();\n String contextHC = Integer.toHexString(System.identityHashCode(context));\n System.out.println(\"String_Node_Str\" + context.getClass().getName() + \"String_Node_Str\" + contextHC + \"String_Node_Str\" + context.isShared() + \"String_Node_Str\");\n }\n gl.setSwapInterval(1);\n if (gl.isExtensionAvailable(\"String_Node_Str\")) {\n gl.glEnable(GL2.GL_MULTISAMPLE);\n myMultiSampleEnabled = true;\n }\n int[] buff = new int[1];\n gl.glGetIntegerv(GL2.GL_MAX_CLIP_PLANES, buff, 0);\n maxClipPlanes = buff[0];\n setFaceStyle(FaceStyle.FRONT);\n gl.glEnable(GL2.GL_DEPTH_TEST);\n gl.glClearDepth(1.0);\n gl.glLightModelfv(GL2.GL_LIGHT_MODEL_LOCAL_VIEWER, lmodel_local, 0);\n gl.glLightModelfv(GL2.GL_LIGHT_MODEL_TWO_SIDE, lmodel_twoside, 0);\n gl.glLightModelfv(GL2.GL_LIGHT_MODEL_AMBIENT, lmodel_ambient, 0);\n gl.glLightModelf(GL2.GL_LIGHT_MODEL_TWO_SIDE, 1);\n gl.glEnable(GL2.GL_LIGHTING);\n gl.glEnable(GL2.GL_NORMALIZE);\n gl.glHint(GL2.GL_POINT_SMOOTH_HINT, GL2.GL_FASTEST);\n gl.glDisable(GL2.GL_POINT_SMOOTH);\n setLightingEnabled(true);\n setDepthEnabled(true);\n setColorEnabled(true);\n setVertexColoringEnabled(true);\n setTextureMappingEnabled(true);\n setFaceStyle(FaceStyle.FRONT);\n setShading(Shading.PHONG);\n setGammaCorrectionEnabled(false);\n lightManager.setMaxLights(getMaxLights());\n setupLights(gl);\n gl.glShadeModel(GL2.GL_FLAT);\n if (!isSelecting()) {\n gl.glClearColor(bgColor[0], bgColor[1], bgColor[2], bgColor[3]);\n }\n resetViewVolume();\n invalidateModelMatrix();\n invalidateProjectionMatrix();\n invalidateViewMatrix();\n buildInternalRenderList();\n if (DEBUG) {\n System.out.println(\"String_Node_Str\");\n }\n}\n"
"protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {\n FormLayoutContainer leftContainer = FormLayoutContainer.createDefaultFormLayout(\"String_Node_Str\", getTranslator());\n leftContainer.setRootForm(mainForm);\n formLayout.add(leftContainer);\n displayName = uifactory.addTextElement(\"String_Node_Str\", \"String_Node_Str\", 255, \"String_Node_Str\", leftContainer);\n displayName.setElementCssClass(\"String_Node_Str\");\n displayName.setFocus(true);\n description = uifactory.addTextElement(\"String_Node_Str\", \"String_Node_Str\", 255, \"String_Node_Str\", leftContainer);\n description.setElementCssClass(\"String_Node_Str\");\n List<String> typeList = getResources();\n String[] typeKeys = typeList.toArray(new String[typeList.size()]);\n String[] typeValues = getTranslatedResources(typeList);\n types = uifactory.addDropdownSingleselect(\"String_Node_Str\", \"String_Node_Str\", leftContainer, typeKeys, typeValues, null);\n FormLayoutContainer rightContainer = FormLayoutContainer.createDefaultFormLayout(\"String_Node_Str\", getTranslator());\n rightContainer.setRootForm(mainForm);\n formLayout.add(rightContainer);\n author = uifactory.addTextElement(\"String_Node_Str\", \"String_Node_Str\", 255, \"String_Node_Str\", rightContainer);\n author.setElementCssClass(\"String_Node_Str\");\n id = uifactory.addTextElement(\"String_Node_Str\", \"String_Node_Str\", 12, \"String_Node_Str\", rightContainer);\n id.setElementCssClass(\"String_Node_Str\");\n id.setVisible(isAdmin);\n id.setRegexMatchCheck(\"String_Node_Str\", \"String_Node_Str\");\n FormLayoutContainer buttonLayout = FormLayoutContainer.createButtonLayout(\"String_Node_Str\", getTranslator());\n formLayout.add(buttonLayout);\n searchButton = uifactory.addFormSubmitButton(\"String_Node_Str\", buttonLayout);\n if (cancelAllowed) {\n uifactory.addFormCancelButton(\"String_Node_Str\", buttonLayout, ureq, getWindowControl());\n }\n}\n"
"public static void tickTestSandstormParticles() {\n Minecraft mc = Minecraft.getMinecraft();\n if (vecWOP == null) {\n particleBehaviorFog = new ParticleBehaviorFogGround(new Vec3(mc.player.posX, mc.player.posY, mc.player.posZ));\n vecWOP = new Vec3d(mc.player.posX, mc.player.posY, mc.player.posZ);\n }\n for (int i = 0; i < 0; i++) {\n ParticleTexFX part = new ParticleTexFX(mc.world, vecWOP.x, vecWOP.y, vecWOP.z, 0, 0, 0, ParticleRegistry.cloud256);\n particleBehaviorFog.initParticle(part);\n part.setFacePlayer(false);\n part.spawnAsWeatherEffect();\n }\n boolean derp = false;\n if (derp) {\n IBlockState state = mc.world.getBlockState(new BlockPos(mc.player.posX, mc.player.getEntityBoundingBox().minY - 1, mc.player.posZ));\n int id = Block.getStateId(state);\n id = 12520;\n double speed = 0.2D;\n Random rand = mc.world.rand;\n mc.world.spawnParticle(EnumParticleTypes.BLOCK_DUST, mc.player.posX, mc.player.posY, mc.player.posZ, (rand.nextDouble() - rand.nextDouble()) * speed, (rand.nextDouble()) * speed * 2D, (rand.nextDouble() - rand.nextDouble()) * speed, id);\n }\n}\n"
"public static void finalizeStaticSpaceMap() {\n Address startAddress = Space.getDiscontigStart();\n int first = hashAddress(startAddress);\n int last = hashAddress(Space.getDiscontigEnd());\n int unavailStart = last + 1;\n int trailingUnavail = Space.MAX_CHUNKS - unavailStart;\n int pages = (1 + last - first) * Space.PAGES_IN_CHUNK;\n globalPageMap.resizeFreeList(pages, pages);\n for (int pr = 0; pr < sharedDiscontigFLCount; pr++) sharedFLMap[pr].resizeFreeList(startAddress);\n regionMap.alloc(first);\n for (int chunk = first; chunk <= last; chunk++) regionMap.alloc(1);\n regionMap.alloc(Space.MAX_CHUNKS - last);\n int firstPage = 0;\n for (int chunk = first; chunk <= last; chunk++) {\n if (VM.VERIFY_ASSERTIONS)\n VM.assertions._assert(spaceMap[chunk] == null);\n totalAvailableDiscontiguousChunks++;\n regionMap.free(chunk);\n globalPageMap.setUncoalescable(firstPage);\n int tmp = globalPageMap.alloc(Space.PAGES_IN_CHUNK);\n if (VM.VERIFY_ASSERTIONS)\n VM.assertions._assert(tmp == firstPage);\n firstPage += Space.PAGES_IN_CHUNK;\n }\n}\n"
"public void run(IAction action) {\n try {\n IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();\n String projectName = null;\n String testTargetClassname = null;\n String testCaseFilename = null;\n String testCaseCreateFilepath = null;\n String testCaseResource = null;\n StructuredSelection structuredSelection = null;\n if (selection instanceof StructuredSelection) {\n structuredSelection = (StructuredSelection) selection;\n } else {\n }\n if (structuredSelection != null && structuredSelection.size() == 0) {\n MessageDialog.openWarning(new Shell(), STR.Dialog.Common.TITLE, STR.Dialog.Common.REQUIRED);\n return;\n } else if (structuredSelection != null && structuredSelection.size() > 1) {\n MessageDialog.openWarning(new Shell(), STR.Dialog.Common.TITLE, STR.Dialog.Common.SELECT_ONLY_ONE);\n return;\n }\n String pathFromProjectRoot = ResourcePathUtil.getPathStartsFromProjectRoot(structuredSelection);\n String[] dirArrFromProjectRoot = pathFromProjectRoot.split(STR.DIR_SEP);\n String selected = STR.EMPTY;\n int allDirLen = dirArrFromProjectRoot.length - 1;\n for (int i = 2; i < allDirLen; i++) selected += dirArrFromProjectRoot[i] + STR.DIR_SEP;\n selected += dirArrFromProjectRoot[allDirLen];\n projectName = dirArrFromProjectRoot[1];\n String testTargetClassFilename = dirArrFromProjectRoot[dirArrFromProjectRoot.length - 1];\n testTargetClassname = testTargetClassFilename.replace(STR.JAVA_EXP, STR.EMPTY);\n testCaseFilename = testTargetClassname + STR.SUFFIX_OF_TESTCASE + STR.JAVA_EXP;\n String projectRootPath = workspaceRoot.getLocation() + STR.DIR_SEP + projectName + STR.DIR_SEP;\n if (testTargetClassname == null) {\n MessageDialog.openWarning(new Shell(), STR.Dialog.Common.TITLE, STR.Dialog.TestCase.SELECT_JAVA_FILE);\n } else {\n testCaseResource = selected.replace(STR.SRC_MAIN_JAVA, STR.SRC_TEST_JAVA).replace(STR.JAVA_EXP, STR.SUFFIX_OF_TESTCASE + STR.JAVA_EXP);\n testCaseCreateFilepath = projectRootPath + selected.replace(STR.SRC_MAIN_JAVA, STR.SRC_TEST_JAVA).replace(STR.JAVA_EXP, STR.SUFFIX_OF_TESTCASE + STR.JAVA_EXP);\n File outputFile = new File(testCaseCreateFilepath);\n if (!outputFile.exists()) {\n String msg = STR.Dialog.Common.NOT_EXIST + \"String_Node_Str\" + testCaseFilename + \"String_Node_Str\" + STR.LINE_FEED + STR.Dialog.Common.COMFIRM_CREATE_NEW_FILE;\n if (testCaseFilename != null && MessageDialog.openConfirm(new Shell(), STR.Dialog.Common.TITLE, msg)) {\n new CreateNewTestCaseAction().run(action, selection);\n }\n return;\n }\n int retryCount = 0;\n IEditorPart editorPart = null;\n while (true) {\n try {\n IProject project = workspaceRoot.getProject(projectName);\n IFile testCaseFile = project.getFile(testCaseResource);\n String editorId = IDE.getEditorDescriptor(testCaseFile.getName()).getId();\n IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();\n editorPart = IDE.openEditor(page, testCaseFile, editorId);\n editorPart.setFocus();\n if (Activator.getDefault().getPreferenceStore().getBoolean(STR.Preference.TestMethodGen.ENABLE)) {\n IFile testTargetFile = project.getFile(selected);\n List<GeneratingMethodInfo> unimpledTestMethodNames = TestCaseGenerateUtil.getUnimplementedTestMethodNames(testTargetFile, testCaseFile);\n if (unimpledTestMethodNames.size() > 0) {\n List<String> lines = TestCaseGenerateUtil.getAllSourceCodeLineList(testCaseFile);\n OutputStreamWriter testFileOSWriter = null;\n FileOutputStream fos = null;\n try {\n fos = new FileOutputStream(projectRootPath + STR.DIR_SEP + testCaseResource);\n testFileOSWriter = new OutputStreamWriter(fos);\n boolean enabledNotBlankMethods = Activator.getDefault().getPreferenceStore().getBoolean(STR.Preference.TestMethodAutoGenerate.METHOD_SAMPLE_IMPLEMENTATION);\n StringBuffer sb = new StringBuffer();\n String CRLF = STR.CARRIAGE_RETURN + STR.LINE_FEED;\n for (String line : lines) {\n if (line.equals(\"String_Node_Str\")) {\n for (GeneratingMethodInfo testMethod : unimpledTestMethodNames) {\n sb.append(\"String_Node_Str\");\n sb.append(testMethod.testMethodName);\n sb.append(\"String_Node_Str\");\n sb.append(CRLF);\n sb.append(\"String_Node_Str\");\n sb.append(STR.AUTO_GEN_MSG_TODO);\n sb.append(CRLF);\n if (enabledNotBlankMethods) {\n String notBlankSourceCode = TestCaseGenerateUtil.getNotBlankTestMethodSource(testMethod, unimpledTestMethodNames, testTargetClassname);\n sb.append(notBlankSourceCode);\n }\n sb.append(CRLF);\n sb.append(\"String_Node_Str\");\n sb.append(CRLF);\n sb.append(CRLF);\n }\n sb.append(\"String_Node_Str\");\n sb.append(CRLF);\n break;\n } else {\n sb.append(line);\n sb.append(CRLF);\n }\n }\n String content = sb.toString();\n testFileOSWriter.write(content);\n } finally {\n FileResourceUtil.close(testFileOSWriter);\n FileResourceUtil.close(fos);\n }\n }\n if (!ResourceRefreshUtil.refreshLocal(null, projectName + STR.DIR_SEP + testCaseResource + \"String_Node_Str\")) {\n MessageDialog.openWarning(new Shell(), STR.Dialog.Common.TITLE, STR.Dialog.Common.RESOURCE_REFRESH_ERROR);\n System.err.println(\"String_Node_Str\");\n } else {\n retryCount = 0;\n ThreadUtil.sleep(1500);\n while (true) {\n try {\n editorPart = IDE.openEditor(page, testCaseFile, editorId);\n if (editorPart == null)\n throw new NullPointerException();\n break;\n } catch (Exception e) {\n retryCount++;\n if (retryCount > 3)\n break;\n ThreadUtil.sleep(1500);\n }\n }\n editorPart.setFocus();\n }\n }\n } catch (Exception e) {\n retryCount++;\n if (retryCount > 10)\n break;\n e.printStackTrace();\n ThreadUtil.sleep(1500);\n }\n break;\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n}\n"
"public boolean isValid() {\n BigInteger maxNumberOfEdges = BigInteger.valueOf(getNumberOfNodes());\n maxNumberOfEdges = maxNumberOfEdges.multiply(maxNumberOfEdges.subtract(BigInteger.ONE));\n maxNumberOfEdges = maxNumberOfEdges.divide(BigInteger.valueOf(2));\n return super.isValid() && numberOfEdges > 0 && BigInteger.valueOf(numberOfEdges).compareTo(maxNumberOfEdges) < 1;\n}\n"
"public void updateEntity() {\n super.updateEntity();\n if (worldObj.isRemote)\n return;\n ItemStack stack = inventory.getStackInSlot(0);\n if (stack != null) {\n Item stackItem = stack.getItem();\n if (stackItem instanceof IFluidContainerItem) {\n IFluidContainerItem iFluidContainerItem = (IFluidContainerItem) stackItem;\n if (fill) {\n if (!tank.isEmpty()) {\n int amount = 128;\n if (tank.getFluidAmount() < amount)\n amount = tank.getFluidAmount();\n if (energy >= amount) {\n drain(ForgeDirection.UNKNOWN, iFluidContainerItem.fill(stack, new FluidStack(tank.getFluid().fluidID, amount), true), true);\n energy -= amount;\n }\n }\n } else {\n FluidStack contained = iFluidContainerItem.getFluid(stack);\n if (!fill && !tank.isFull() && contained != null && contained.amount > 0) {\n int amount = 64;\n if (tank.getFreeSpace() < amount)\n amount = tank.getFreeSpace();\n if (amount > contained.amount)\n amount = contained.amount;\n iFluidContainerItem.drain(stack, fill(ForgeDirection.UNKNOWN, new FluidStack(contained.fluidID, amount), true), true);\n }\n }\n } else if (FluidContainerRegistry.isContainer(stack)) {\n if (fill) {\n if (!tank.isEmpty()) {\n int amount = FluidContainerRegistry.getContainerCapacity(tank.getFluid(), stack);\n if (amount > 0 && energy >= amount && tank.getFluidAmount() >= amount) {\n ItemStack filledContainer = FluidContainerRegistry.fillFluidContainer(new FluidStack(tank.getFluid().fluidID, amount), stack);\n if (filledContainer != null && filledContainer.getItem() != null && filledContainer.stackSize > 0) {\n energy -= amount;\n drain(ForgeDirection.UNKNOWN, amount, true);\n inventory.setInventorySlotContents(0, filledContainer.copy());\n }\n }\n }\n } else {\n FluidStack contained = FluidContainerRegistry.getFluidForFilledItem(stack);\n if (contained != null && contained.amount > 0 && tank.getFreeSpace() >= contained.amount) {\n if (fill(ForgeDirection.UNKNOWN, contained, false) == contained.amount) {\n fill(ForgeDirection.UNKNOWN, contained, true);\n ItemStack drainedContainer = FluidContainerRegistry.drainFluidContainer(stack);\n if (drainedContainer != null && drainedContainer.getItem() != null && drainedContainer.stackSize > 0)\n inventory.setInventorySlotContents(0, drainedContainer.copy());\n }\n }\n }\n }\n if (getProgress() >= 16) {\n stack = getStackInSlot(0);\n if (stack != null) {\n ItemStack outputStack = getStackInSlot(1);\n if (outputStack == null || outputStack.getItem() == null || outputStack.stackSize <= 0) {\n ItemStack copyStack = stack.copy();\n copyStack.stackSize = 1;\n inventory.setInventorySlotContents(1, copyStack);\n inventory.decrStackSize(0, 1);\n }\n }\n }\n }\n}\n"
"public String getInfoLDS() throws IOException {\n HttpSession session = ServletActionContext.getRequest().getSession();\n Integer rdfizerJob = (Integer) session.getAttribute(\"String_Node_Str\");\n setState((int) session.getAttribute(\"String_Node_Str\"));\n logger.debug(\"String_Node_Str\" + state);\n if (rdfizerJob != null) {\n getFile(rdfizerJob);\n }\n if (session.getAttribute(\"String_Node_Str\") != null) {\n setLdsStarted(true);\n int ldsJobId = (int) session.getAttribute(\"String_Node_Str\");\n URL url = new URL(\"String_Node_Str\" + ldsJobId);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n conn.setRequestMethod(\"String_Node_Str\");\n conn.setRequestProperty(\"String_Node_Str\", \"String_Node_Str\");\n if (conn.getResponseCode() != 202) {\n logger.error(MessageCatalog._00015_HTTP_ERROR_CODE + conn.getResponseCode());\n }\n try {\n Locale locale = (Locale) session.getAttribute(\"String_Node_Str\");\n if (locale == null) {\n locale = Locale.ROOT;\n }\n SimpleDateFormat dateFormatIn = new SimpleDateFormat(\"String_Node_Str\");\n SimpleDateFormat dateFormatOut = new SimpleDateFormat(\"String_Node_Str\", locale);\n BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n JSONParser parser = new JSONParser();\n JSONObject jsonObject = (JSONObject) parser.parse(reader);\n String startDate = (String) jsonObject.get(\"String_Node_Str\");\n if (startDate != null) {\n setStartDate(dateFormatOut.format(dateFormatIn.parse(startDate)));\n }\n String endDate = (String) jsonObject.get(\"String_Node_Str\");\n if (endDate != null) {\n setEndDate(dateFormatOut.format(dateFormatIn.parse(endDate)));\n }\n String status = (String) jsonObject.get(\"String_Node_Str\");\n if (status.equals(\"String_Node_Str\")) {\n setStatus(getText(\"String_Node_Str\"));\n } else if (status.equals(\"String_Node_Str\")) {\n setStatus(getText(\"String_Node_Str\"));\n } else if (status.equals(\"String_Node_Str\")) {\n logger.debug(\"String_Node_Str\" + state);\n if (state == 3) {\n session.setAttribute(\"String_Node_Str\", 5);\n } else if (state != 5) {\n session.setAttribute(\"String_Node_Str\", 4);\n }\n logger.debug(\"String_Node_Str\" + state);\n setStatus(getText(\"String_Node_Str\"));\n }\n conn.disconnect();\n setState((int) session.getAttribute(\"String_Node_Str\"));\n return SUCCESS;\n } catch (Exception e) {\n logger.error(MessageCatalog._00016_ERROR_READING_XML, e);\n conn.disconnect();\n return ERROR;\n }\n } else {\n setLdsStarted(false);\n setStatus(getText(\"String_Node_Str\"));\n return SUCCESS;\n }\n}\n"
"private <T> boolean tryAdd(ConcurrentHashMultiset<T> multiset, T value, int max) {\n while (true) {\n int count = multiset.count(value);\n if (count >= max && max != 0)\n return false;\n if (multiset.setCount(value, count, count + 1))\n return true;\n }\n}\n"
"protected void performAdd() {\n try {\n if (stepText.getText().trim().length() == 0)\n return;\n TransformerMainPage.this.comitting = true;\n TransformerMainPage.this.stepsList.add(TransformerMainPage.this.stepText.getText());\n WSTransformerV2 wsTransformer = transformer;\n ArrayList<WSTransformerProcessStep> list = new ArrayList<WSTransformerProcessStep>();\n if (wsTransformer.getProcessSteps() != null) {\n list = new ArrayList<WSTransformerProcessStep>(Arrays.asList(wsTransformer.getProcessSteps()));\n }\n list.add(new WSTransformerProcessStep(\"String_Node_Str\", TransformerMainPage.this.stepText.getText(), \"String_Node_Str\", new WSTransformerVariablesMapping[0], new WSTransformerVariablesMapping[0], false));\n wsTransformer.setProcessSteps(list.toArray(new WSTransformerProcessStep[list.size()]));\n TransformerMainPage.this.comitting = false;\n int index = TransformerMainPage.this.stepsList.getItemCount() - 1;\n TransformerMainPage.this.stepsList.select(index);\n refreshStep(index);\n TransformerMainPage.this.stepsList.forceFocus();\n markDirtyWithoutCommit();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n}\n"
"public String addResourceLink(String resourceLinkName, String global, String name, String type) throws MalformedObjectNameException {\n NamingResources nresources = getNamingResources();\n if (nresources == null) {\n return null;\n }\n ContextResourceLink resourceLink = nresources.findResourceLink(resourceLinkName);\n if (resourceLink != null) {\n throw new IllegalArgumentException(\"String_Node_Str\" + resourceLinkName + \"String_Node_Str\");\n }\n resourceLink = new ContextResourceLink();\n resourceLink.setGlobal(global);\n resourceLink.setName(resourceLinkName);\n resourceLink.setType(type);\n nresources.addResourceLink(resourceLink);\n return createObjectName(resourceLink).toString();\n}\n"
"private boolean handleStatements(Logger logger, Program program, Function f, ExecContext execCx, Block block, ListIterator<Statement> stmts, ValueTracker cv, HierarchicalMap<Var, Arg> replaceInputs, HierarchicalMap<Var, Arg> replaceAll) throws InvalidWriteException, InvalidOptionException {\n while (stmts.hasNext()) {\n Statement stmt = stmts.next();\n if (stmt.type() == StatementType.INSTRUCTION) {\n handleInstruction(logger, f, execCx, block, stmts, stmt.instruction(), cv, replaceInputs, replaceAll);\n } else {\n assert (stmt.type() == StatementType.CONDITIONAL);\n UnifiedState condClosed = recurseOnContinuation(logger, program, f, execCx, stmt.conditional(), cv, replaceInputs, replaceAll);\n cv.addClosed(condClosed);\n cv.addComputedValues(condClosed.availableVals, Ternary.FALSE);\n }\n }\n logger.trace(\"String_Node_Str\");\n sb = new StringBuilder();\n for (Statement stmt : block.getStatements()) {\n stmt.prettyPrint(sb, \"String_Node_Str\");\n }\n logger.trace(sb);\n}\n"
"public HashMap<String, Object> getSliceStatus() {\n IFlowSpaceFirewallService iFSFs = (IFlowSpaceFirewallService) getContext().getAttributes().get(IFlowSpaceFirewallService.class.getCanonicalName());\n String dpidStr = (String) getRequestAttributes().get(\"String_Node_Str\");\n Long dpid = HexString.toLong(dpidStr);\n String sliceStr = (String) getRequestAttributes().get(\"String_Node_Str\");\n List<Proxy> proxies = iFSFs.getSwitchProxies(dpid);\n HashMap<String, Object> results = new HashMap<String, Object>();\n if (proxies == null) {\n logger.info(\"String_Node_Str\" + dpidStr + \"String_Node_Str\");\n HashMap<Long, Slicer> slice = iFSFs.getSlice(sliceStr);\n if (slice == null) {\n results.put(\"String_Node_Str\", \"String_Node_Str\" + sliceStr);\n return results;\n }\n if (!slice.containsKey(dpid)) {\n logger.warn(\"String_Node_Str\" + dpidStr + \"String_Node_Str\" + sliceStr);\n results.put(\"String_Node_Str\", \"String_Node_Str\" + dpidStr + \"String_Node_Str\" + sliceStr);\n return results;\n }\n Slicer mySlice = slice.get(dpid);\n results.put(\"String_Node_Str\", \"String_Node_Str\");\n results.put(\"String_Node_Str\", 0);\n results.put(\"String_Node_Str\", mySlice.getMaxFlows());\n results.put(\"String_Node_Str\", false);\n results.put(\"String_Node_Str\", dpidStr);\n results.put(\"String_Node_Str\", mySlice.getPacketInRate());\n results.put(\"String_Node_Str\", 0);\n }\n Iterator<Proxy> it = proxies.iterator();\n Proxy myProxy = null;\n while (it.hasNext()) {\n Proxy p = it.next();\n if (p.getSlicer().getSliceName().equals(sliceStr)) {\n myProxy = p;\n }\n }\n if (myProxy == null) {\n logger.warn(\"String_Node_Str\" + sliceStr + \"String_Node_Str\" + dpidStr);\n results.put(\"String_Node_Str\", \"String_Node_Str\" + dpidStr + \"String_Node_Str\" + sliceStr);\n return results;\n }\n results.put(\"String_Node_Str\", myProxy.getSlicer().getRate());\n results.put(\"String_Node_Str\", myProxy.getFlowCount());\n results.put(\"String_Node_Str\", myProxy.getSlicer().getMaxFlowRate());\n results.put(\"String_Node_Str\", myProxy.connected());\n results.put(\"String_Node_Str\", myProxy.getSwitch().getStringId());\n results.put(\"String_Node_Str\", myProxy.getSlicer().getPacketInRate());\n results.put(\"String_Node_Str\", myProxy.getPacketInRate());\n results.put(\"String_Node_Str\", myProxy.getSlicer().getMaxFlowRate());\n return results;\n}\n"
"public static IReportElementInstance getInstance(IElement element) {\n if (element == null)\n return null;\n if (element instanceof CellContent)\n return new CellInstance((CellContent) element, context);\n if (element instanceof DataContent)\n return new DataItemInstance((DataContent) element);\n if (element instanceof ImageContent)\n return new ImageInstance((ImageContent) element);\n if (element instanceof LabelContent)\n return new LabelInstance((LabelContent) element);\n if (element instanceof ContainerContent)\n return new ListInstance((ContainerContent) element);\n if (element instanceof RowContent)\n return new RowInstance((RowContent) element);\n if (element instanceof TableContent) {\n Object genBy = ((TableContent) element).getGenerateBy();\n if (genBy instanceof TableItemDesign)\n return new TableInstance((TableContent) element);\n else if (genBy instanceof GridItemDesign)\n return new GridInstance((TableContent) element);\n }\n if (element instanceof TextContent)\n return new TextItemInstance((TextContent) element);\n if (element instanceof ForeignContent) {\n ForeignContent fc = (ForeignContent) element;\n if (IForeignContent.HTML_TYPE.equals(fc.getRawType()) || IForeignContent.TEXT_TYPE.equals(fc.getRawType()) || IForeignContent.TEMPLATE_TYPE.equals(fc.getRawType()))\n return new TextItemInstance(fc);\n }\n return null;\n}\n"
"public List<GraphmlNode> getNonSubnetNeighbours() {\n List<GraphmlNode> neighbourNodes = new ArrayList<>();\n List<DeviceNeighbour> deviceNeighbours = device.getDeviceNeighbours();\n for (DeviceNeighbour deviceNeighbour : deviceNeighbours) {\n String neighbourIpAddress = deviceNeighbour.getIpAddress();\n String neighbourHostName = deviceNeighbour.getNeighbourHostName();\n String neighbourMac = deviceNeighbour.getNeighbourMac();\n AliasResolver aliasResolver = new AliasResolver(node, neighbourHostName, neighbourIpAddress, neighbourMac);\n String neighbourId = aliasResolver.getNeighbourIdFromAliases();\n if (neighbourId == null) {\n logger.info(\"String_Node_Str\" + deviceNeighbour);\n continue;\n }\n GraphmlNode graphmlNode = new GraphmlNode(neighbourId, neighbourId);\n neighbourNodes.add(graphmlNode);\n }\n return neighbourNodes;\n}\n"
"private String performTransmission(String data) throws IOException {\n Writer outputWriter = null;\n try {\n outputStream = connection.getOutputStream();\n outputWriter = new OutputStreamWriter(outputStream, Charset.forName(\"String_Node_Str\"));\n outputWriter.write(data);\n outputWriter.flush();\n inputStream = connection.getInputStream();\n StringBuilder response = new StringBuilder();\n int inputChar;\n while ((inputChar = inputStream.read()) != -1) {\n response.append((char) inputChar);\n }\n return response.toString();\n } finally {\n if (outputWriter != null) {\n IOUtils.closeQuietly(outputWriter);\n }\n}\n"
"public void run() {\n EventBus.getDefault().send(new TaskViewDismissedEvent(mTask, tv, new AnimationProps(TaskStackView.DEFAULT_SYNC_STACK_DURATION, Interpolators.FAST_OUT_SLOW_IN)));\n}\n"
"private void addAsArrayElement(Type elementType, Object elementValue) {\n if (elementValue == null) {\n addNullAsArrayElement();\n } else {\n JsonElement childElement = getJsonElementForChild(elementType, elementValue);\n root.getAsJsonArray().add(childElement);\n }\n}\n"
"public void timestamp_is_required() {\n givenWithContent(authToken).body(minValidPayload().put(Key.TIMESTAMP, null).asArray()).when().put(UrlSchema.FACILITY_UTILIZATION, f.id).then().spec(assertResponse(HttpStatus.BAD_REQUEST, ValidationException.class)).body(\"String_Node_Str\", is(\"String_Node_Str\" + Key.TIMESTAMP)).body(\"String_Node_Str\", is(\"String_Node_Str\"));\n}\n"
"public void test() {\n try {\n KsDef ksDef = CassandraCli.client.describe_keyspace(keyspaceName);\n Assert.assertNotNull(ksDef);\n Assert.assertEquals(keyspaceName, ksDef.getName());\n Assert.assertEquals(SimpleStrategy.class.getName(), ksDef.getStrategy_class());\n Assert.assertEquals(\"String_Node_Str\", ksDef.getStrategy_options().get(\"String_Node_Str\"));\n Assert.assertTrue(ksDef.isDurable_writes());\n Assert.assertNotNull(ksDef.getCf_defs());\n Assert.assertNotNull(ksDef.getStrategy_options());\n Assert.assertEquals(7, ksDef.getCf_defsSize());\n for (CfDef cfDef : ksDef.getCf_defs()) {\n Assert.assertNotNull(cfDef);\n if (\"String_Node_Str\".equals(cfDef.getName())) {\n Assert.assertEquals(\"String_Node_Str\", cfDef.getName());\n Assert.assertEquals(keyspaceName, cfDef.getKeyspace());\n Assert.assertEquals(\"String_Node_Str\", cfDef.getColumn_type());\n Assert.assertFalse(cfDef.getComment().isEmpty());\n Assert.assertEquals(UTF8Type.class.getName(), cfDef.getComparator_type());\n Assert.assertNull(cfDef.getSubcomparator_type());\n Assert.assertEquals(2, cfDef.getColumn_metadataSize());\n Assert.assertEquals(BytesType.class.getName(), cfDef.getDefault_validation_class());\n Assert.assertTrue(cfDef.isReplicate_on_write());\n Assert.assertEquals(16, cfDef.getMin_compaction_threshold());\n Assert.assertEquals(64, cfDef.getMax_compaction_threshold());\n } else if (\"String_Node_Str\".equals(cfDef.getName())) {\n Assert.assertEquals(keyspaceName, cfDef.getKeyspace());\n Assert.assertEquals(\"String_Node_Str\", cfDef.getColumn_type());\n Assert.assertTrue(cfDef.getComment().isEmpty());\n Assert.assertEquals(UTF8Type.class.getName(), cfDef.getComparator_type());\n Assert.assertNull(cfDef.getSubcomparator_type());\n Assert.assertEquals(2, cfDef.getColumn_metadataSize());\n Assert.assertEquals(BytesType.class.getName(), cfDef.getDefault_validation_class());\n Assert.assertTrue(cfDef.isReplicate_on_write());\n Assert.assertEquals(4, cfDef.getMin_compaction_threshold());\n Assert.assertEquals(32, cfDef.getMax_compaction_threshold());\n } else if (\"String_Node_Str\".equals(cfDef.getName())) {\n Assert.assertEquals(keyspaceName, cfDef.getKeyspace());\n Assert.assertEquals(\"String_Node_Str\", cfDef.getColumn_type());\n Assert.assertTrue(cfDef.getComment().isEmpty());\n Assert.assertEquals(UTF8Type.class.getName(), cfDef.getComparator_type());\n Assert.assertNotNull(cfDef.getSubcomparator_type());\n Assert.assertEquals(UTF8Type.class.getName(), cfDef.getSubcomparator_type());\n Assert.assertEquals(0, cfDef.getColumn_metadataSize());\n Assert.assertEquals(BytesType.class.getName(), cfDef.getDefault_validation_class());\n } else if (\"String_Node_Str\".equals(cfDef.getName())) {\n Assert.assertEquals(\"String_Node_Str\", cfDef.getName());\n Assert.assertEquals(keyspaceName, cfDef.getKeyspace());\n Assert.assertEquals(\"String_Node_Str\", cfDef.getColumn_type());\n Assert.assertFalse(cfDef.getComment().isEmpty());\n Assert.assertEquals(BytesType.class.getName(), cfDef.getComparator_type());\n Assert.assertNotNull(cfDef.getSubcomparator_type());\n Assert.assertEquals(BytesType.class.getName(), cfDef.getSubcomparator_type());\n Assert.assertEquals(0, cfDef.getColumn_metadataSize());\n Assert.assertEquals(BytesType.class.getName(), cfDef.getDefault_validation_class());\n } else {\n }\n }\n } catch (NotFoundException nfe) {\n Assert.fail();\n logger.error(\"String_Node_Str\", nfe.getMessage());\n } catch (InvalidRequestException ire) {\n Assert.fail();\n logger.error(\"String_Node_Str\", ire.getMessage());\n } catch (TException te) {\n Assert.fail();\n logger.error(\"String_Node_Str\", te.getMessage());\n }\n}\n"
"private void setupInheritance(SDOType parentType) {\n if ((parentType.getURI() != null) && (!parentType.getURI().equals(SDOConstants.SDO_URL))) {\n XMLField field = (XMLField) getXmlDescriptor().buildField(\"String_Node_Str\");\n XMLDescriptor parentDescriptor = (XMLDescriptor) parentType.getXmlDescriptor().getInheritancePolicy().getRootParentDescriptor();\n parentDescriptor.getInheritancePolicy().setClassIndicatorField(field);\n if (getInstanceClassName() != null) {\n String indicator = getName();\n String prefix = parentDescriptor.getNamespaceResolver().resolveNamespaceURI(getURI());\n if (prefix == null) {\n prefix = getXmlDescriptor().getNamespaceResolver().resolveNamespaceURI(getURI());\n if (prefix != null) {\n parentDescriptor.getNamespaceResolver().put(prefix, getURI());\n }\n }\n if (prefix != null) {\n indicator = prefix + SDOConstants.SDO_XPATH_NS_SEPARATOR_FRAGMENT + indicator;\n }\n Class implClass = getImplClass();\n parentDescriptor.getInheritancePolicy().addClassIndicator(implClass, indicator);\n parentDescriptor.getInheritancePolicy().setShouldReadSubclasses(true);\n String parentIndicator = parentType.getName();\n String parentPrefix = parentDescriptor.getNamespaceResolver().resolveNamespaceURI(parentType.getURI());\n if (parentPrefix != null) {\n parentIndicator = parentPrefix + SDOConstants.SDO_XPATH_NS_SEPARATOR_FRAGMENT + parentIndicator;\n }\n Class parentImplClass = parentType.getImplClass();\n parentDescriptor.getInheritancePolicy().addClassIndicator(parentImplClass, parentIndicator);\n Class parentClass = parentType.getImplClass();\n getXmlDescriptor().getInheritancePolicy().setParentClass(parentClass);\n getXmlDescriptor().getInheritancePolicy().setParentDescriptor(parentType.getXmlDescriptor());\n parentType.getXmlDescriptor().getNamespaceResolver().put(XMLConstants.SCHEMA_INSTANCE_PREFIX, XMLConstants.SCHEMA_INSTANCE_URL);\n getXmlDescriptor().getNamespaceResolver().put(XMLConstants.SCHEMA_INSTANCE_PREFIX, XMLConstants.SCHEMA_INSTANCE_URL);\n }\n }\n}\n"
"public void testNoReplaceDynamicRev() throws Exception {\n project.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n IvyResolve res = new IvyResolve();\n res.setProject(project);\n res.execute();\n deliver.setPubrevision(\"String_Node_Str\");\n deliver.setDeliverpattern(\"String_Node_Str\");\n deliver.setReplacedynamicrev(false);\n deliver.execute();\n File deliveredIvyFile = new File(\"String_Node_Str\");\n assertTrue(deliveredIvyFile.exists());\n ModuleDescriptor md = XmlModuleDescriptorParser.getInstance().parseDescriptor(new IvySettings(), deliveredIvyFile.toURI().toURL(), true);\n assertEquals(ModuleRevisionId.newInstance(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"), md.getModuleRevisionId());\n DependencyDescriptor[] dds = md.getDependencies();\n assertEquals(1, dds.length);\n assertEquals(ModuleRevisionId.newInstance(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"), dds[0].getDependencyRevisionId());\n}\n"
"public ChoiceObjectNode addChoice(LibraryNode ln, String name) {\n if (name.isEmpty())\n name = \"String_Node_Str\";\n TypeProvider string = (TypeProvider) NodeFinders.findNodeByName(\"String_Node_Str\", ModelNode.XSD_NAMESPACE);\n ChoiceObjectNode choice = new ChoiceObjectNode(new TLChoiceObject());\n if (!ln.isEditable())\n return choice;\n choice.setName(name);\n if (ln != null)\n ln.addMember(choice);\n PropertyOwnerInterface shared = choice.getSharedFacet();\n new ElementNode(shared, \"String_Node_Str\" + name);\n FacetNode f1 = choice.addFacet(\"String_Node_Str\");\n new ElementNode(f1, \"String_Node_Str\", string);\n new AttributeNode(f1, \"String_Node_Str\");\n new IndicatorNode(f1, \"String_Node_Str\");\n FacetNode f2 = choice.addFacet(\"String_Node_Str\");\n new ElementNode(f2, \"String_Node_Str\");\n new AttributeNode(f2, \"String_Node_Str\");\n new IndicatorNode(f2, \"String_Node_Str\");\n return choice;\n}\n"
"public void loadsDateWithUtcTimezone() throws Exception {\n final Long message = new MessageRowMocker(new BoutRowMocker().mock()).mock();\n final Connection conn = Database.connection();\n Date loaded;\n try {\n final PreparedStatement ustmt = conn.prepareStatement(\"String_Node_Str\");\n ustmt.setString(1, \"String_Node_Str\");\n ustmt.setLong(2, message);\n ustmt.executeUpdate();\n final PreparedStatement rstmt = conn.prepareStatement(\"String_Node_Str\");\n rstmt.setLong(1, message);\n final ResultSet rset = rstmt.executeQuery();\n try {\n if (!rset.next()) {\n throw new IllegalArgumentException();\n }\n loaded = Utc.getTimestamp(rset, 1);\n } finally {\n rset.close();\n }\n } finally {\n conn.close();\n }\n this.fmt.setCalendar(new GregorianCalendar(TimeZone.getTimeZone(\"String_Node_Str\")));\n MatcherAssert.assertThat(this.fmt.format(loaded), Matchers.startsWith(\"String_Node_Str\"));\n}\n"
"public void renderReportlet(OutputStream out, HttpServletRequest request, IReportDocument reportDocument, String reportletId, String format, boolean masterPage, boolean svgFlag, List activeIds, Locale locale, boolean rtl, String iServletPath) throws RemoteException {\n if (reportDocument == null) {\n AxisFault fault = new AxisFault(BirtResources.getMessage(ResourceConstants.ACTION_EXCEPTION_NO_REPORT_DOCUMENT));\n fault.setFaultCode(new QName(\"String_Node_Str\"));\n throw fault;\n }\n if (out == null)\n return;\n String servletPath = iServletPath;\n if (servletPath == null)\n servletPath = request.getServletPath();\n IRenderTask renderTask = engine.createRenderTask(reportDocument);\n BirtUtility.addTask(request, renderTask);\n HashMap context = new HashMap();\n context.put(EngineConstants.APPCONTEXT_BIRT_VIEWER_HTTPSERVET_REQUEST, request);\n context.put(EngineConstants.APPCONTEXT_CLASSLOADER_KEY, ReportEngineService.class.getClassLoader());\n context.put(EngineConstants.APPCONTEXT_CHART_RESOLUTION, ParameterAccessor.getDpi(request));\n ParameterAccessor.pushAppContext(context, request);\n renderTask.setAppContext(context);\n RenderOption renderOption = null;\n if (format == null)\n format = ParameterAccessor.getFormat(request);\n if (IBirtConstants.PDF_RENDER_FORMAT.equalsIgnoreCase(format) || IBirtConstants.POSTSCRIPT_RENDER_FORMAT.equalsIgnoreCase(format)) {\n renderOption = createPDFRenderOption(servletPath, request, ParameterAccessor.isDesigner(request));\n } else {\n if (!IBirtConstants.HTML_RENDER_FORMAT.equalsIgnoreCase(format))\n svgFlag = false;\n renderOption = createHTMLRenderOption(svgFlag, servletPath, request);\n }\n renderOption.setOutputFormat(format);\n renderOption.setOutputStream(out);\n ViewerHTMLActionHandler handler = null;\n if (IBirtConstants.PDF_RENDER_FORMAT.equalsIgnoreCase(format) || IBirtConstants.POSTSCRIPT_RENDER_FORMAT.equalsIgnoreCase(format)) {\n handler = new ViewerHTMLActionHandler(reportDocument, -1, locale, false, rtl, masterPage, format, new Boolean(svgFlag), ParameterAccessor.getParameter(request, ParameterAccessor.PARAM_DESIGNER));\n } else {\n boolean isEmbeddable = false;\n if (IBirtConstants.SERVLET_PATH_FRAMESET.equalsIgnoreCase(servletPath) || IBirtConstants.SERVLET_PATH_OUTPUT.equalsIgnoreCase(servletPath))\n isEmbeddable = true;\n if (renderOption instanceof IHTMLRenderOption)\n ((IHTMLRenderOption) renderOption).setEmbeddable(isEmbeddable);\n if (IBirtConstants.DOC_RENDER_FORMAT.equalsIgnoreCase(format)) {\n ((IHTMLRenderOption) renderOption).setOption(IHTMLRenderOption.HTML_PAGINATION, Boolean.TRUE);\n }\n renderOption.setOption(IHTMLRenderOption.HTML_RTL_FLAG, new Boolean(rtl));\n renderOption.setOption(IHTMLRenderOption.INSTANCE_ID_LIST, activeIds);\n renderOption.setOption(IHTMLRenderOption.MASTER_PAGE_CONTENT, new Boolean(masterPage));\n handler = new ViewerHTMLActionHandler(reportDocument, -1, locale, isEmbeddable, rtl, masterPage, format, new Boolean(svgFlag));\n }\n String resourceFolder = ParameterAccessor.getParameter(request, ParameterAccessor.PARAM_RESOURCE_FOLDER);\n handler.setResourceFolder(resourceFolder);\n renderOption.setActionHandler(handler);\n String reportTitle = ParameterAccessor.htmlDecode(ParameterAccessor.getTitle(request));\n if (reportTitle != null)\n renderOption.setOption(IHTMLRenderOption.HTML_TITLE, reportTitle);\n renderTask.setRenderOption(renderOption);\n renderTask.setLocale(locale);\n try {\n if (ParameterAccessor.isIidReportlet(request)) {\n InstanceID instanceId = InstanceID.parse(reportletId);\n renderTask.setInstanceID(instanceId);\n } else {\n renderTask.setReportlet(reportletId);\n }\n renderTask.render();\n } catch (Exception e) {\n AxisFault fault = new AxisFault(e.getLocalizedMessage(), e.getCause());\n fault.setFaultCode(new QName(\"String_Node_Str\"));\n throw fault;\n } finally {\n BirtUtility.removeTask(request);\n BirtUtility.error(request, renderTask.getErrors());\n renderTask.close();\n }\n}\n"
"private String getTimeDimsionName() {\n String dimensionName = timeDimension.getText();\n return dimensionName;\n}\n"
"private void renderBackground(GL2 gl) {\n int pickingID = glVisBricks.getPickingManager().getPickingID(glVisBricks.getID(), EPickingType.DIMENSION_GROUP_SPACER, ID);\n float avoidDragHandle = 0;\n gl.glPushName(pickingID);\n gl.glColor4f(1, 1, 0, 0f);\n gl.glBegin(GL2.GL_POLYGON);\n gl.glVertex2f(0, 0);\n gl.glVertex2f(x - avoidDragHandle, 0);\n gl.glVertex2f(x - avoidDragHandle, y);\n gl.glVertex2f(0, y);\n gl.glEnd();\n gl.glPopName();\n}\n"
"private void populateSeriesTypesList() {\n if (cbSeriesType == null) {\n return;\n }\n cbSeriesType.removeAll();\n Series series = getSeriesDefinitionForProcessing().getDesignTimeSeries();\n if (getCurrentChartType().canCombine()) {\n populateSeriesTypes(ChartUIExtensionsImpl.instance().getUIChartTypeExtensions(getContext().getClass().getSimpleName()), series, this.orientation);\n } else {\n String seriesName = series.getDisplayName();\n cbSeriesType.add(seriesName);\n cbSeriesType.select(0);\n }\n if (this.chartModel instanceof ChartWithAxes) {\n Axis xAxis = ((Axis) ((ChartWithAxes) chartModel).getAxes().get(0));\n if (xAxis.getAssociatedAxes().size() > 1) {\n String lastType = ChartCacheManager.getInstance().findSeriesType();\n Axis overlayAxis = (Axis) xAxis.getAssociatedAxes().get(1);\n if (!overlayAxis.getSeriesDefinitions().isEmpty()) {\n Series oseries = ((SeriesDefinition) overlayAxis.getSeriesDefinitions().get(0)).getDesignTimeSeries();\n String sDisplayName = oseries.getDisplayName();\n if (lastType != null) {\n cbSeriesType.setText(lastType);\n } else {\n cbSeriesType.setText(sDisplayName);\n }\n }\n changeOverlaySeriesType();\n }\n }\n}\n"
"public synchronized void transferOwnerGroupSpace(QuotaFileInformation quotaFileInformation, String newOwnerGroupId, long filesize, long blockedSpace, AtomicDBUpdate update) throws UserException {\n Logging.logMessage(Logging.LEVEL_DEBUG, this, \"String_Node_Str\" + volumeId + \"String_Node_Str\");\n QuotaFileInformation newQuotaFileInformation = new QuotaFileInformation(quotaFileInformation);\n newQuotaFileInformation.setOwnerGroupId(newOwnerGroupId);\n QuotaInformation quotaInformationOldOwnerGroup = getAndApplyGroupQuotaInformation(null, quotaFileInformation, true, update);\n QuotaInformation quotaInformationNewOwnerGroup = getAndApplyGroupQuotaInformation(null, newQuotaFileInformation, true, update);\n System.out.println(\"String_Node_Str\" + quotaFileInformation.getOwnerId());\n System.out.println(\"String_Node_Str\" + quotaFileInformation.getOwnerGroupId() + \"String_Node_Str\" + newOwnerGroupId);\n System.out.println(\"String_Node_Str\" + quotaInformationNewOwnerGroup.getFreeSpace() + \"String_Node_Str\" + filesize + \"String_Node_Str\" + blockedSpace);\n if (QuotaConstants.checkQuotaOnChown && quotaInformationNewOwnerGroup.getFreeSpace() < (filesize + blockedSpace)) {\n throw new UserException(POSIXErrno.POSIX_ERROR_ENOSPC, \"String_Node_Str\" + quotaInformationNewOwnerGroup.getQuotaType() + \"String_Node_Str\");\n }\n updateGroupSpaceUsage(quotaFileInformation, quotaInformationOldOwnerGroup, -1 * filesize, -1 * blockedSpace, update);\n updateGroupSpaceUsage(newQuotaFileInformation, quotaInformationNewOwnerGroup, filesize, blockedSpace, update);\n}\n"
"private void deleteNode(AbstractNode node) {\n for (DescendantAndSelfIterator itr = new DescendantAndSelfIterator(treeStructure, node, Tautology.instance); itr.hasNext(); ) {\n AbstractNode descendant = itr.next();\n if (descendant.isEnabled()) {\n edgeProcessor.clearMetaEdges(descendant);\n view.decNodesEnabled(1);\n }\n edgeProcessor.clearEdges(descendant);\n if (node.countInViews() == 1) {\n dhns.getGraphStructure().getNodeDictionnary().remove(descendant);\n }\n }\n treeStructure.deleteDescendantAndSelf(node);\n}\n"
"private void setAllConnectionParameters(String typ, IElement element) {\n String type = null;\n if (typ != null && !typ.equals(\"String_Node_Str\")) {\n type = typ;\n } else {\n type = getValueFromRepositoryName(element, \"String_Node_Str\");\n }\n if (type.equals(\"String_Node_Str\") || type.contains(\"String_Node_Str\")) {\n IElementParameter ele = element.getElementParameter(\"String_Node_Str\");\n if (ele != null) {\n type = (String) ele.getValue();\n } else {\n type = \"String_Node_Str\";\n }\n }\n if (StringUtils.trimToNull(type) == null && StringUtils.trimToNull(connParameters.getDbType()) == null) {\n type = EDatabaseTypeName.GENERAL_JDBC.getXmlName();\n }\n connParameters.setDbType(type);\n String frameWorkKey = getValueFromRepositoryName(element, \"String_Node_Str\");\n connParameters.setFrameworkType(frameWorkKey);\n String schema = getValueFromRepositoryName(element, EConnectionParameterName.SCHEMA.getName());\n connParameters.setSchema(schema);\n String userName = getValueFromRepositoryName(element, EConnectionParameterName.USERNAME.getName());\n connParameters.setUserName(userName);\n String password = getValueFromRepositoryName(element, EConnectionParameterName.PASSWORD.getName());\n connParameters.setPassword(password);\n String host = getValueFromRepositoryName(element, EConnectionParameterName.SERVER_NAME.getName());\n connParameters.setHost(host);\n String port = getValueFromRepositoryName(element, EConnectionParameterName.PORT.getName());\n connParameters.setPort(port);\n boolean https = Boolean.parseBoolean(getValueFromRepositoryName(element, EConnectionParameterName.HTTPS.getName()));\n connParameters.setHttps(https);\n boolean isOracleOCI = type.equals(EDatabaseTypeName.ORACLE_OCI.getXmlName()) || type.equals(EDatabaseTypeName.ORACLE_OCI.getDisplayName());\n if (isOracleOCI) {\n String localServiceName = getValueFromRepositoryNameAndParameterName(element, EConnectionParameterName.SID.getName(), EParameterName.LOCAL_SERVICE_NAME.getName());\n connParameters.setLocalServiceName(localServiceName);\n }\n String datasource = getValueFromRepositoryName(element, EConnectionParameterName.DATASOURCE.getName());\n connParameters.setDatasource(datasource);\n String dbName = getValueFromRepositoryName(element, EConnectionParameterName.SID.getName());\n connParameters.setDbName(dbName);\n if (connParameters.getDbType().equals(EDatabaseTypeName.SQLITE.getXmlName()) || connParameters.getDbType().equals(EDatabaseTypeName.ACCESS.getXmlName()) || connParameters.getDbType().equals(EDatabaseTypeName.FIREBIRD.getXmlName())) {\n String file = getValueFromRepositoryName(element, EConnectionParameterName.FILE.getName());\n connParameters.setFilename(file);\n }\n String dir = getValueFromRepositoryName(element, EConnectionParameterName.DIRECTORY.getName());\n connParameters.setDirectory(dir);\n String url = getValueFromRepositoryName(element, EConnectionParameterName.URL.getName());\n if (StringUtils.isEmpty(url)) {\n if (EDatabaseTypeName.ORACLE_RAC.getXmlName().equals(type)) {\n url = getValueFromRepositoryName(element, \"String_Node_Str\" + EConnectionParameterName.URL.getName());\n }\n }\n connParameters.setUrl(TalendTextUtils.removeQuotes(url));\n String driverJar = getValueFromRepositoryName(element, EConnectionParameterName.DRIVER_JAR.getName());\n connParameters.setDriverJar(TalendTextUtils.removeQuotes(driverJar));\n String driverClass = getValueFromRepositoryName(element, EConnectionParameterName.DRIVER_CLASS.getName());\n connParameters.setDriverClass(TalendTextUtils.removeQuotes(driverClass));\n if (driverClass != null && !\"String_Node_Str\".equals(driverClass) && !EDatabaseTypeName.GENERAL_JDBC.getDisplayName().equals(connParameters.getDbType())) {\n if (driverClass.startsWith(\"String_Node_Str\") && driverClass.endsWith(\"String_Node_Str\")) {\n driverClass = TalendTextUtils.removeQuotes(driverClass);\n }\n String dbTypeByClassName = \"String_Node_Str\";\n if (driverJar != null && !\"String_Node_Str\".equals(driverJar)) {\n dbTypeByClassName = ExtractMetaDataUtils.getDbTypeByClassNameAndDriverJar(driverClass, driverJar);\n } else {\n dbTypeByClassName = ExtractMetaDataUtils.getDbTypeByClassName(driverClass);\n }\n if (dbTypeByClassName != null) {\n connParameters.setDbType(dbTypeByClassName);\n }\n }\n String jdbcProps = getValueFromRepositoryName(element, EConnectionParameterName.PROPERTIES_STRING.getName());\n connParameters.setJdbcProperties(jdbcProps);\n String realTableName = null;\n if (EmfComponent.REPOSITORY.equals(elem.getPropertyValue(EParameterName.SCHEMA_TYPE.getName()))) {\n final Object propertyValue = elem.getPropertyValue(EParameterName.REPOSITORY_SCHEMA_TYPE.getName());\n IMetadataTable metadataTable = null;\n String connectionId = propertyValue.toString().split(\"String_Node_Str\")[0];\n String tableLabel = propertyValue.toString().split(\"String_Node_Str\")[1];\n IProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance();\n Item item = null;\n try {\n IRepositoryViewObject repobj = factory.getLastVersion(connectionId);\n if (repobj != null) {\n Property property = repobj.getProperty();\n if (property != null) {\n item = property.getItem();\n }\n }\n } catch (PersistenceException e) {\n ExceptionHandler.process(e);\n }\n if (item != null && item instanceof ConnectionItem) {\n Connection connection = ((ConnectionItem) item).getConnection();\n for (org.talend.core.model.metadata.builder.connection.MetadataTable table : ConnectionHelper.getTables(connection)) {\n if (table.getLabel().equals(tableLabel)) {\n metadataTable = ConvertionHelper.convert(table);\n break;\n }\n }\n }\n if (metadataTable != null) {\n realTableName = metadataTable.getTableName();\n }\n }\n connParameters.setSchemaName(QueryUtil.getTableName(elem, connParameters.getMetadataTable(), TalendTextUtils.removeQuotes(schema), type, realTableName));\n}\n"
"private String getParameterValueString(Class paramType, Object paramValue) throws DataException {\n if (paramValue instanceof String)\n return (String) paramValue;\n try {\n paramValue = DataTypeUtil.convert(paramValue, paramType);\n if (paramValue instanceof Date) {\n SimpleDateFormat sdf = new SimpleDateFormat(\"String_Node_Str\");\n return sdf.format((Date) paramValue);\n }\n if (paramValue != null) {\n return paramValue.toString();\n }\n return null;\n } catch (BirtException e) {\n throw new DataException(ResourceConstants.DATATYPEUTIL_ERROR, e);\n }\n}\n"
"public DataSource buildDataSource(String driverClass, String userName, String password, String url, Map<String, String> connectParam) throws LoadConfigException {\n BasicDataSource ds = new BasicDataSource();\n ds.setDriverClassName(driverClass);\n ds.setUsername(userName);\n ds.setPassword(password);\n ds.setUrl(url);\n ds.setValidationQuery(\"String_Node_Str\");\n for (Map.Entry<String, String> entry : connectParam.entrySet()) {\n try {\n setConnectionParam(ds, entry.getKey(), entry.getValue());\n } catch (Exception e) {\n LOG.warn(\"String_Node_Str\" + entry);\n }\n }\n return ds;\n}\n"
"public static <T> StructuredArray<T> copyInstance(StructuredArray<T> source, int sourceOffset, int count) throws NoSuchMethodException {\n if (source.getLength() < sourceOffset + count) {\n throw new ArrayIndexOutOfBoundsException(\"String_Node_Str\" + source + \"String_Node_Str\" + source.getLength() + \"String_Node_Str\" + sourceOffset + \"String_Node_Str\" + count + \"String_Node_Str\");\n }\n final ElementConstructorGenerator<T> copyConstructorGenerator = (ElementConstructorGenerator<T>) new ElementCopyConstructorGenerator<T>(source.getElementClass(), source, sourceOffset);\n return new StructuredArray<T>(count, source.getElementClass(), copyConstructorGenerator);\n}\n"
"public IMatchEngine getEngineInstance() {\n if (engine == null) {\n try {\n engine = (IMatchEngine) element.createExecutableExtension(\"String_Node_Str\");\n } catch (final CoreException e) {\n EMFComparePlugin.log(e, false);\n }\n }\n if (engine != null) {\n engine.reset();\n }\n return engine;\n}\n"
"public static void main(String[] args) throws Exception {\n ConfigurationFactory cf = new ConfigurationFactory(new ConfigurationLoader().loadProperties());\n AbstractModule exampleModule = new AbstractModule() {\n public void configure() {\n ConfigurationModule.bindConfig(binder()).to(ExampleConfig.class);\n binder().bind(NiftyBootstrap.class).in(Singleton.class);\n }\n };\n Guice.createInjector(Stage.PRODUCTION, new ConfigurationModule(cf), new ValidationErrorModule(new ConfigurationValidator(cf, null).validate(exampleModule)), new LifeCycleModule(), exampleModule, new NiftyModule() {\n protected void configureNifty() {\n bind().toProvider(ExampleThriftServerProvider.class);\n }\n }).getInstance(LifeCycleManager.class).start();\n}\n"
"public IStyle getContentStyle() {\n if (body == null) {\n if (generateBy instanceof MasterPageDesign) {\n body = report.createCellContent();\n body.setInlineStyle(((MasterPageDesign) generateBy).getContentStyle());\n }\n }\n return null;\n}\n"
"public ResourceAction perform(ResourceAction resourceAction) throws Exception {\n AWSCloudFormationWaitConditionHandleResourceAction action = (AWSCloudFormationWaitConditionHandleResourceAction) resourceAction;\n if (!Boolean.TRUE.equals(action.info.getCreatedEnoughToDelete()))\n return action;\n try (final EucaS3Client s3c = EucaS3ClientFactory.getEucaS3Client(new CloudFormationAWSCredentialsProvider())) {\n ObjectNode objectNode = (ObjectNode) JsonHelper.getJsonNodeFromString(action.info.getEucaParts());\n if (!\"String_Node_Str\".equals(objectNode.get(\"String_Node_Str\").asText()))\n throw new Exception(\"String_Node_Str\");\n String bucketName = objectNode.get(\"String_Node_Str\").asText();\n String keyName = objectNode.get(\"String_Node_Str\").asText();\n if (!s3c.doesBucketExist(bucketName)) {\n return action;\n }\n VersionListing versionListing = s3c.listVersions(bucketName, \"String_Node_Str\");\n for (S3VersionSummary versionSummary : versionListing.getVersionSummaries()) {\n if (versionSummary.getKey().equals(keyName)) {\n s3c.deleteVersion(versionSummary.getBucketName(), versionSummary.getKey(), versionSummary.getVersionId());\n }\n }\n }\n return action;\n}\n"
"private int getState() {\n boolean fingerprintRunning = KeyguardUpdateMonitor.getInstance(mContext).isFingerprintDetectionRunning();\n if (mUnlockMethodCache.canSkipBouncer()) {\n return STATE_LOCK_OPEN;\n } else if (mTransientFpError) {\n return STATE_FINGERPRINT_ERROR;\n } else if (fingerprintRunning) {\n return STATE_FINGERPRINT;\n } else if (mUnlockMethodCache.isFaceUnlockRunning()) {\n return STATE_FACE_UNLOCK;\n } else {\n return STATE_LOCKED;\n }\n}\n"
"public <T> CLBuffer<?> createInputBufferFor(CLContext context, PList<T> list) {\n char[] ar = ((CharList) list).getArray();\n byte[] car = encodeCharToBytes(ar);\n ByteBuffer ibuffer = ByteBuffer.wrap(car, 0, list.size());\n return context.createByteBuffer(CLMem.Usage.Input, ibuffer, true);\n}\n"
"public void onEnable() {\n Locale.setDefault(Locale.US);\n logger.setName(this.getDescription().getName());\n setupVault();\n setupMetrics();\n setupDeathTpPlus();\n setupMobArenaHandler();\n setupHeroes();\n setupMcMMO();\n setupWorldGuard();\n globalMessageManager = new HashMap<String, ecoMessageManager>();\n globalRewardManager = new HashMap<String, ecoRewardManager>();\n configManager = new ecoConfigManager(this);\n registerCommands();\n registerEvents();\n Bukkit.getScheduler().scheduleAsyncRepeatingTask(this, new ecoUpdate(this, DEV_BUKKIT_URL), CHECK_DELAY, CHECK_PERIOD);\n logger.info(getDescription().getVersion() + \"String_Node_Str\");\n}\n"