content
stringlengths
40
137k
"public void start(AcceptsOneWidget container, EventBus eventBus) {\n this.container = container;\n this.clientFactory.getShellView().hideDetail();\n this.clientFactory.getShellView().getDetailView().setPresenter(this);\n this.clientFactory.getShellView().getContentView().setContentTitle(getTitle());\n LoadingAnimationView view = this.clientFactory.getLoadingAnimationView();\n container.setWidget(view);\n String query = URL.decodeQueryString(place.getSearch());\n LOG.log(Level.INFO, \"String_Node_Str\" + query);\n doSearch(query, new SearchRange(0, pageSize));\n}\n"
"public User getUser(String userid) throws WeixinException {\n String user_get_uri = getRequestUri(\"String_Node_Str\");\n Token token = tokenHolder.getToken();\n WeixinResponse response = weixinExecutor.get(String.format(user_get_uri, token.getAccessToken(), userid));\n JSONObject obj = response.getAsJson();\n Object attrs = obj.remove(\"String_Node_Str\");\n User user = JSON.toJavaObject(obj, User.class);\n if (attrs != null) {\n obj.put(\"String_Node_Str\", attrs);\n }\n return JSON.toJavaObject(obj, User.class);\n}\n"
"private short getNextId() {\n if (nextId.get() > MAX_ID) {\n return UNKNOWN_ID;\n }\n return (short) nextId++;\n}\n"
"private int createValueListComposite(Composite parent) {\n if (valueListComposite != null && !valueListComposite.isDisposed()) {\n return 0;\n }\n disposeComposites();\n valueListComposite = new Composite(parent, SWT.NONE);\n GridData gdata = new GridData(GridData.FILL_HORIZONTAL);\n gdata.horizontalSpan = 4;\n valueListComposite.setLayoutData(gdata);\n GridLayout layout = new GridLayout();\n layout.numColumns = 4;\n valueListComposite.setLayout(layout);\n compositeList.add(valueListComposite);\n Group group = new Group(valueListComposite, SWT.NONE);\n GridData data = new GridData(GridData.FILL_HORIZONTAL);\n data.heightHint = 118;\n data.horizontalSpan = 3;\n data.horizontalIndent = 0;\n data.grabExcessHorizontalSpace = true;\n group.setLayoutData(data);\n layout = new GridLayout();\n layout.numColumns = 4;\n group.setLayout(layout);\n new Label(group, SWT.NONE).setText(Messages.getString(\"String_Node_Str\"));\n GridData expgd = new GridData();\n expgd.widthHint = 100;\n addExpressionValue = new MultiValueCombo(group, SWT.NONE);\n addExpressionValue.setLayoutData(expgd);\n addBtn = new Button(group, SWT.PUSH);\n addBtn.setText(Messages.getString(\"String_Node_Str\"));\n addBtn.setToolTipText(Messages.getString(\"String_Node_Str\"));\n setButtonLayoutData(addBtn);\n addBtn.addSelectionListener(new SelectionListener() {\n public void widgetDefaultSelected(SelectionEvent e) {\n }\n public void widgetSelected(SelectionEvent e) {\n String value = addExpressionValue.getText().trim();\n if (valueList.indexOf(value) < 0) {\n valueList.add(value);\n tableViewer.refresh();\n updateButtons();\n addExpressionValue.setFocus();\n addExpressionValue.setText(\"String_Node_Str\");\n } else {\n addBtn.setEnabled(false);\n }\n }\n });\n new Label(group, SWT.NONE);\n int tableStyle = SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION;\n table = new Table(group, tableStyle);\n data = new GridData(GridData.FILL_BOTH);\n data.horizontalSpan = 4;\n table.setLayoutData(data);\n table.setHeaderVisible(false);\n table.setLinesVisible(true);\n TableColumn column;\n int i;\n String[] columNames = new String[] { Messages.getString(\"String_Node_Str\") };\n int[] columLength = new int[] { 288 };\n for (i = 0; i < columNames.length; i++) {\n column = new TableColumn(table, SWT.NONE, i);\n column.setText(columNames[i]);\n column.setWidth(columLength[i]);\n }\n table.addSelectionListener(new SelectionListener() {\n public void widgetDefaultSelected(SelectionEvent e) {\n }\n public void widgetSelected(SelectionEvent e) {\n checkEditDelButtonStatus();\n }\n });\n table.addKeyListener(new KeyListener() {\n public void keyPressed(KeyEvent e) {\n if (e.keyCode == SWT.DEL) {\n delTableValue();\n }\n }\n public void keyReleased(KeyEvent e) {\n }\n });\n table.addMouseListener(new MouseAdapter() {\n public void mouseDoubleClick(MouseEvent e) {\n editTableValue();\n }\n });\n tableViewer = new TableViewer(table);\n tableViewer.setUseHashlookup(true);\n tableViewer.setColumnProperties(columNames);\n tableViewer.setLabelProvider(tableLableProvier);\n tableViewer.setContentProvider(tableContentProvider);\n Composite rightPart = new Composite(valueListComposite, SWT.NONE);\n data = new GridData(GridData.FILL_BOTH | GridData.VERTICAL_ALIGN_END);\n rightPart.setLayoutData(data);\n layout = new GridLayout();\n layout.makeColumnsEqualWidth = true;\n rightPart.setLayout(layout);\n editBtn = new Button(rightPart, SWT.PUSH);\n editBtn.setText(Messages.getString(\"String_Node_Str\"));\n editBtn.setToolTipText(Messages.getString(\"String_Node_Str\"));\n setButtonLayoutData(editBtn);\n editBtn.addSelectionListener(new SelectionListener() {\n public void widgetDefaultSelected(SelectionEvent e) {\n }\n public void widgetSelected(SelectionEvent e) {\n editTableValue();\n }\n });\n delBtn = new Button(rightPart, SWT.PUSH);\n delBtn.setText(Messages.getString(\"String_Node_Str\"));\n delBtn.setToolTipText(Messages.getString(\"String_Node_Str\"));\n setButtonLayoutData(delBtn);\n delBtn.addSelectionListener(new SelectionListener() {\n public void widgetDefaultSelected(SelectionEvent e) {\n }\n public void widgetSelected(SelectionEvent e) {\n delTableValue();\n }\n });\n delAllBtn = new Button(rightPart, SWT.PUSH);\n delAllBtn.setText(Messages.getString(\"String_Node_Str\"));\n delAllBtn.setToolTipText(Messages.getString(\"String_Node_Str\"));\n setButtonLayoutData(delAllBtn);\n delAllBtn.addSelectionListener(new SelectionAdapter() {\n\n public void widgetSelected(SelectionEvent e) {\n int count = valueList.size();\n if (count > 0) {\n valueList.clear();\n tableViewer.refresh();\n updateButtons();\n } else {\n delAllBtn.setEnabled(false);\n }\n }\n });\n addExpressionValue.addModifyListener(new ModifyListener() {\n public void modifyText(ModifyEvent e) {\n checkAddButtonStatus();\n updateButtons();\n }\n });\n addExpressionValue.addSelectionListener(0, mAddSelValueAction);\n addExpressionValue.addSelectionListener(1, mAddExpValueAction);\n addExpressionValue.setItems(popupItems);\n parent.getParent().layout(true, true);\n if (parent.getShell() != null)\n parent.getShell().pack();\n return 1;\n}\n"
"protected WireStore newStore(final long cycle) {\n try {\n final String cycleFormat = this.dateCache.formatFor(cycle);\n final File cycleFile = new File(this.builder.path(), cycleFormat + \"String_Node_Str\");\n File parentFile = cycleFile.getParentFile();\n if (parentFile != null & !parentFile.exists()) {\n parentFile.mkdirs();\n }\n return WiredFile.<WireStore>build(cycleFile, file -> MappedFile.mappedFile(file, builder.blockSize(), builder.blockSize()), builder.wireType(), () -> new SingleChronicleQueueStore(builder.rollCycle()), ws -> ws.delegate().install(ws.mappedFile(), ws.headerLength(), ws.headerCreated(), cycle, builder, ws.wireSupplier(), ws.mappedFile())).delegate();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n}\n"
"protected void appendToCurrentLine(Character currentChar) {\n if (currentChar == null) {\n } else if (CARRIAGE_RETURN.equals(currentChar))\n currentLine.append(NEWLINE);\n else if (CARRIAGE_RETURN.equals(previousChar) && NEWLINE.equals(currentChar)) {\n } else\n currentLine.append(currentChar);\n}\n"
"public void onConfirm(String username, int type) {\n PlayerController.setName(MainActivity.this, username);\n Fragment fragment;\n if (type == -1) {\n fragment = ProfileFragment.newInstance(username);\n } else {\n fragment = ShotsFragment.newInstance(type);\n }\n getSupportFragmentManager().beginTransaction().replace(R.id.container, fragment).commit();\n}\n"
"public void encodeBegin(FacesContext context, UIComponent component) throws IOException {\n if (!component.isRendered()) {\n return;\n }\n Message message = (Message) component;\n String forValue = message.getFor();\n if (null == forValue || forValue.length() == 0)\n forValue = \"String_Node_Str\";\n forValue = ExpressionResolver.getComponentIDs(context, message, forValue);\n List<FacesMessage> messageList = new ArrayList<FacesMessage>();\n Iterator<FacesMessage> messageIterator = FacesContext.getCurrentInstance().getMessages(forValue);\n while (messageIterator.hasNext()) {\n FacesMessage fm = messageIterator.next();\n messageList.add(fm);\n }\n ResponseWriter rw = context.getResponseWriter();\n String clientId = message.getClientId();\n if (null != messageList && (!messageList.isEmpty())) {\n rw.startElement(\"String_Node_Str\", message);\n writeAttribute(rw, \"String_Node_Str\", clientId);\n if (null != message.getDir()) {\n rw.writeAttribute(\"String_Node_Str\", message.getDir(), \"String_Node_Str\");\n }\n String styleClass = message.getStyleClass();\n if (null != styleClass && styleClass.length() > 0)\n styleClass = styleClass + \"String_Node_Str\";\n else\n styleClass = \"String_Node_Str\";\n String severityClass = findHighestSeverityClass(messageList, message);\n styleClass += \"String_Node_Str\" + severityClass + \"String_Node_Str\";\n writeAttribute(rw, \"String_Node_Str\", styleClass);\n writeAttribute(rw, \"String_Node_Str\", \"String_Node_Str\");\n boolean firstMessage = true;\n for (FacesMessage msg : messageList) {\n if (!firstMessage) {\n if (message.isLineBreak()) {\n rw.append(message.getLineBreakTag());\n }\n }\n firstMessage = false;\n if (message.isShowIcon()) {\n rw.startElement(\"String_Node_Str\", component);\n writeAttribute(rw, \"String_Node_Str\", findHighestSeverityIcon(messageList, message) + \"String_Node_Str\");\n writeAttribute(rw, \"String_Node_Str\", \"String_Node_Str\");\n rw.endElement(\"String_Node_Str\");\n }\n if (message.isShowSummary()) {\n if (msg.getSummary() != null && (!msg.getSummary().equals(msg.getDetail()))) {\n rw.startElement(\"String_Node_Str\", component);\n writeAttribute(rw, \"String_Node_Str\", \"String_Node_Str\");\n if (message.isEscape()) {\n rw.writeText(msg.getSummary(), null);\n } else {\n warnOnFirstUse();\n rw.write(msg.getSummary());\n }\n rw.endElement(\"String_Node_Str\");\n }\n }\n if (message.isShowDetail()) {\n rw.startElement(\"String_Node_Str\", component);\n writeAttribute(rw, \"String_Node_Str\", \"String_Node_Str\");\n if (message.isEscape()) {\n rw.writeText(msg.getDetail(), null);\n } else {\n warnOnFirstUse();\n rw.write(msg.getDetail());\n }\n rw.endElement(\"String_Node_Str\");\n }\n }\n rw.endElement(\"String_Node_Str\");\n }\n}\n"
"public void codeGenerated(Path binaryPath) {\n if (DockerDataHolder.getInstance().isCanProcess()) {\n String filePath = binaryPath.toAbsolutePath().toString();\n String userDir = new File(filePath).getParentFile().getAbsolutePath();\n DockerAnnotationProcessor dockerAnnotationProcessor = new DockerAnnotationProcessor();\n String targetPath = userDir + File.separator + ARTIFACT_DIRECTORY + File.separator;\n if (userDir.endsWith(\"String_Node_Str\")) {\n targetPath = userDir + File.separator + extractBalxName(filePath);\n }\n try {\n DockerGenUtils.deleteDirectory(targetPath);\n dockerAnnotationProcessor.processDockerModel(DockerContext.getInstance().getDataHolder(), filePath, targetPath);\n } catch (DockerPluginException e) {\n printError(e.getMessage());\n dlog.logDiagnostic(Diagnostic.Kind.ERROR, null, e.getMessage());\n try {\n DockerGenUtils.deleteDirectory(targetPath);\n } catch (DockerPluginException ignored) {\n }\n }\n }\n}\n"
"public boolean canEvaluate(Template template) {\n if (!template.getContextTypeId().equals(JavaStatementPostfixContext.CONTEXT_TYPE_ID))\n return false;\n if (fForceEvaluation)\n return true;\n if (selectedNode == null)\n return false;\n if (template.getName().toLowerCase().startsWith(getPrefixKey().toLowerCase()) == false) {\n return false;\n }\n String regex = (\"String_Node_Str\");\n Pattern pattern = Pattern.compile(regex);\n Matcher matcher = pattern.matcher(template.getPattern());\n boolean result = true;\n while (matcher.find()) {\n String[] types = matcher.group(2).split(\"String_Node_Str\");\n for (String s : types) {\n result = false;\n if (this.isNodeResolvingTo(currentNode, s.trim()) == true) {\n return true;\n }\n }\n }\n return result;\n}\n"
"public void setUpGlobal() throws Exception {\n server = new Server();\n Logger root = Logger.getRootLogger();\n root.setLevel(Level.DEBUG);\n root.addAppender(new ConsoleAppender(new PatternLayout(PatternLayout.TTCC_CONVERSION_PATTERN)));\n port1 = findFreePort();\n Connector listener = new SelectChannelConnector();\n listener.setHost(\"String_Node_Str\");\n listener.setPort(port1);\n server.addConnector(listener);\n LoginService loginService = new HashLoginService(\"String_Node_Str\", \"String_Node_Str\");\n server.addBean(loginService);\n Constraint constraint = new Constraint();\n constraint.setName(Constraint.__BASIC_AUTH);\n constraint.setRoles(new String[] { user, admin });\n constraint.setAuthenticate(true);\n ConstraintMapping mapping = new ConstraintMapping();\n mapping.setConstraint(constraint);\n mapping.setPathSpec(\"String_Node_Str\");\n Set<String> knownRoles = new HashSet<String>();\n knownRoles.add(user);\n knownRoles.add(admin);\n ConstraintSecurityHandler security = new ConstraintSecurityHandler();\n security.setConstraintMappings(Arrays.asList(new ConstraintMapping[] { mapping }), knownRoles);\n security.setAuthenticator(new DigestAuthenticator());\n security.setLoginService(loginService);\n security.setStrict(false);\n security.setHandler(configureHandler());\n server.setHandler(security);\n server.start();\n log.info(\"String_Node_Str\");\n}\n"
"public List<Identity> getIdentitys() {\n return walletInMem.getIdentities();\n}\n"
"private static void replyToPing(Connection c, boolean ultrapeer) throws IOException, BadPacketException {\n Message m = null;\n byte[] guid;\n try {\n while (!(m instanceof PingRequest)) {\n m = c.receive(500);\n }\n guid = ((PingRequest) m).getGUID();\n } catch (InterruptedIOException iioe) {\n guid = new GUID().bytes();\n }\n PingReply reply = PingReply.createExternal(guid, (byte) 7, c.getLocalPort(), ultrapeer ? ultrapeerIP : oldIP, ultrapeer);\n reply.hop();\n c.send(reply);\n c.flush();\n}\n"
"public void testKepler() throws DimensionMismatchException, NumberIsTooSmallException, MaxCountExceededException, NoBracketingException {\n doTestKepler(Decimal64Field.getInstance(), 2.18e-7, 4.0e-10);\n}\n"
"public AssetURI unmarshal(String uri) throws Exception {\n AssetURI assetURI = new AssetURI(uri);\n if (uri != null) {\n String moduleName = assetURI.getModuleName();\n String rawPath = assetURI.getRawPath();\n assetURI = new AssetURI(moduleName, rawPath, serverName);\n }\n return assetURI;\n}\n"
"public boolean marshalSingleValue(XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, Object objectValue, AbstractSession session, NamespaceResolver namespaceResolver, MarshalContext marshalContext) {\n if (xPathFragment.hasLeafElementType()) {\n marshalRecord.setLeafElementType(xPathFragment.getLeafElementType());\n }\n XMLMarshaller marshaller = marshalRecord.getMarshaller();\n Converter converter = xmlCompositeObjectMapping.getConverter();\n if (null != converter) {\n if (converter instanceof XMLConverter) {\n objectValue = ((XMLConverter) converter).convertObjectValueToDataValue(objectValue, session, marshaller);\n } else {\n objectValue = converter.convertObjectValueToDataValue(objectValue, session);\n }\n }\n if (null == objectValue) {\n return xmlCompositeObjectMapping.getNullPolicy().compositeObjectMarshal(xPathFragment, marshalRecord, object, session, namespaceResolver);\n }\n XPathFragment groupingFragment = marshalRecord.openStartGroupingElements(namespaceResolver);\n if (xPathFragment.isAttribute()) {\n TreeObjectBuilder tob = (TreeObjectBuilder) xmlCompositeObjectMapping.getReferenceDescriptor().getObjectBuilder();\n MappingNodeValue textMappingNodeValue = (MappingNodeValue) tob.getRootXPathNode().getTextNode().getMarshalNodeValue();\n DatabaseMapping textMapping = textMappingNodeValue.getMapping();\n if (textMapping.isDirectToFieldMapping()) {\n XMLDirectMapping xmlDirectMapping = (XMLDirectMapping) textMapping;\n Object fieldValue = xmlDirectMapping.getFieldValue(xmlDirectMapping.valueFromObject(objectValue, xmlDirectMapping.getField(), session), session, marshalRecord);\n QName schemaType = getSchemaType((XMLField) xmlDirectMapping.getField(), fieldValue, session);\n marshalRecord.attribute(xPathFragment, namespaceResolver, fieldValue, schemaType);\n marshalRecord.closeStartGroupingElements(groupingFragment);\n return true;\n } else {\n return textMappingNodeValue.marshalSingleValue(xPathFragment, marshalRecord, objectValue, textMapping.getAttributeValueFromObject(objectValue), session, namespaceResolver, marshalContext);\n }\n }\n boolean isSelfFragment = xPathFragment.isSelfFragment;\n marshalRecord.closeStartGroupingElements(groupingFragment);\n UnmarshalKeepAsElementPolicy keepAsElementPolicy = xmlCompositeObjectMapping.getKeepAsElementPolicy();\n if (((keepAsElementPolicy == UnmarshalKeepAsElementPolicy.KEEP_UNKNOWN_AS_ELEMENT) || (keepAsElementPolicy == UnmarshalKeepAsElementPolicy.KEEP_ALL_AS_ELEMENT)) && objectValue instanceof Node) {\n if (isSelfFragment) {\n NodeList children = ((org.w3c.dom.Element) objectValue).getChildNodes();\n for (int i = 0, size = children.getLength(); i < size; i++) {\n Node next = children.item(i);\n if (next.getNodeType() == Node.ELEMENT_NODE) {\n marshalRecord.node(next, marshalRecord.getNamespaceResolver());\n return true;\n }\n }\n } else {\n marshalRecord.node((Node) objectValue, marshalRecord.getNamespaceResolver());\n return true;\n }\n }\n XMLDescriptor descriptor = (XMLDescriptor) xmlCompositeObjectMapping.getReferenceDescriptor();\n if (descriptor == null || (descriptor.hasInheritance() && !(objectValue.getClass() == descriptor.getJavaClass()))) {\n descriptor = (XMLDescriptor) session.getDescriptor(objectValue.getClass());\n }\n if (descriptor != null) {\n marshalRecord.beforeContainmentMarshal(objectValue);\n TreeObjectBuilder objectBuilder = (TreeObjectBuilder) descriptor.getObjectBuilder();\n if (!(isSelfFragment || xPathFragment.nameIsText())) {\n xPathNode.startElement(marshalRecord, xPathFragment, object, session, namespaceResolver, objectBuilder, objectValue);\n }\n List extraNamespaces = objectBuilder.addExtraNamespacesToNamespaceResolver(descriptor, marshalRecord, session);\n writeExtraNamespaces(extraNamespaces, marshalRecord, session);\n if (!isSelfFragment) {\n objectBuilder.addXsiTypeAndClassIndicatorIfRequired(marshalRecord, descriptor, (XMLDescriptor) xmlCompositeObjectMapping.getReferenceDescriptor(), (XMLField) xmlCompositeObjectMapping.getField(), false);\n }\n objectBuilder.buildRow(marshalRecord, objectValue, session, marshaller, xPathFragment, WriteType.UNDEFINED);\n marshalRecord.afterContainmentMarshal(object, objectValue);\n if (!(isSelfFragment || xPathFragment.nameIsText())) {\n marshalRecord.endElement(xPathFragment, namespaceResolver);\n }\n objectBuilder.removeExtraNamespacesFromNamespaceResolver(marshalRecord, extraNamespaces, session);\n } else {\n if (!isSelfFragment) {\n xPathNode.startElement(marshalRecord, xPathFragment, object, session, namespaceResolver, null, objectValue);\n }\n QName schemaType = getSchemaType((XMLField) xmlCompositeObjectMapping.getField(), objectValue, session);\n String stringValue = marshalRecord.getValueToWrite(schemaType, objectValue, (XMLConversionManager) session.getDatasourcePlatform().getConversionManager());\n updateNamespaces(schemaType, marshalRecord, ((XMLField) xmlCompositeObjectMapping.getField()));\n marshalRecord.characters(schemaType, objectValue, null, false);\n if (!isSelfFragment) {\n marshalRecord.endElement(xPathFragment, namespaceResolver);\n }\n }\n return true;\n}\n"
"public static void validator(final String[] args) throws IllegalArgumentException {\n if (args.length == 0) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n } else if (!\"String_Node_Str\".equalsIgnoreCase(args[0])) {\n final File configFile = new File(InstallConfigFileTemplate.FILE_PATH);\n if (!configFile.exists()) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n }\n}\n"
"public static List<ModelElement> getDependencyClients(ModelElement modelElement) {\n if (modelElement == null) {\n return new ArrayList<ModelElement>();\n }\n EList<Dependency> clientDependencys = modelElement.getSupplierDependency();\n List<ModelElement> supplierList = new ArrayList<ModelElement>();\n for (Dependency dependency : clientDependencys) {\n EList<ModelElement> clients = dependency.getClient();\n if (clients != null) {\n for (ModelElement client : clients) {\n if (!client.eIsProxy()) {\n supplierList.add(client);\n }\n }\n }\n }\n return supplierList;\n}\n"
"public void testCreateDelete() throws Exception {\n final String uid = \"String_Node_Str\";\n final List<String> gids = createGIDs(\"String_Node_Str\");\n final String volumeName = \"String_Node_Str\";\n final UserCredentials uc = MRCClient.getCredentials(uid, gids);\n invokeSync(client.mkvol(mrcAddress, uc, volumeName, 1, getDefaultStripingPolicy(), POSIXFileAccessPolicy.POLICY_ID, 0775));\n invokeSync(client.rmvol(mrcAddress, uc, volumeName));\n invokeSync(client.mkvol(mrcAddress, uc, volumeName, 1, getDefaultStripingPolicy(), YesToAnyoneFileAccessPolicy.POLICY_ID, 0));\n invokeSync(client.mkdir(mrcAddress, uc, volumeName + \"String_Node_Str\", 0));\n invokeSync(client.mkdir(mrcAddress, uc, volumeName + \"String_Node_Str\", 0));\n for (int i = 0; i < 10; i++) invokeSync(client.create(mrcAddress, uc, volumeName + \"String_Node_Str\" + i + \"String_Node_Str\", 0));\n try {\n invokeSync(client.create(mrcAddress, uc, volumeName, 0));\n fail(\"String_Node_Str\");\n } catch (MRCException exc) {\n }\n try {\n invokeSync(client.create(mrcAddress, uc, volumeName + \"String_Node_Str\", 0));\n fail(\"String_Node_Str\");\n } catch (MRCException exc) {\n }\n try {\n invokeSync(client.create(mrcAddress, uc, volumeName + \"String_Node_Str\", 0));\n fail(\"String_Node_Str\");\n } catch (MRCException exc) {\n }\n DirectoryEntrySet entrySet = invokeSync(client.readdir(mrcAddress, uc, volumeName));\n assertEquals(2, entrySet.size());\n entrySet = invokeSync(client.readdir(mrcAddress, uc, volumeName + \"String_Node_Str\"));\n assertEquals(10, entrySet.size());\n Stat stat = invokeSync(client.getattr(mrcAddress, uc, volumeName + \"String_Node_Str\"));\n assertEquals(uid, stat.getUser_id());\n assertTrue(\"String_Node_Str\", (stat.getMode() & Constants.SYSTEM_V_FCNTL_H_S_IFREG) != 0);\n assertEquals(0, stat.getSize());\n assertTrue(stat.getAtime_ns() > 0);\n assertTrue(stat.getCtime_ns() > 0);\n assertTrue(stat.getMtime_ns() > 0);\n assertTrue((stat.getMode() & 511) > 0);\n assertEquals(1, stat.getNlink());\n invokeSync(client.unlink(mrcAddress, uc, volumeName + \"String_Node_Str\"));\n entrySet = invokeSync(client.readdir(mrcAddress, uc, volumeName + \"String_Node_Str\"));\n assertEquals(9, entrySet.size());\n invokeSync(client.rmdir(mrcAddress, uc, volumeName + \"String_Node_Str\"));\n}\n"
"private void performOperation(Callable<Call> operation) {\n showProgressBar();\n try {\n return operation.call();\n } catch (Exception e) {\n onOperationFailed();\n }\n}\n"
"public static String collectDeviceData(BraintreeFragment fragment, String merchantId, String collectorUrl) {\n JSONObject deviceData = new JSONObject();\n try {\n DeviceCollector deviceCollector = new DeviceCollector(fragment.getActivity());\n sDeviceCollector = deviceCollector;\n deviceCollector.setMerchantId(merchantId);\n deviceCollector.setCollectorUrl(collectorUrl);\n deviceCollector.setStatusListener(new StatusListener() {\n public void onCollectorStart() {\n }\n public void onCollectorSuccess() {\n sDeviceCollector = null;\n }\n public void onCollectorError(ErrorCode errorCode, Exception e) {\n sDeviceCollector = null;\n }\n });\n String deviceSessionId = UUID.randomUUID().toString().replace(\"String_Node_Str\", \"String_Node_Str\");\n deviceData.put(DEVICE_SESSION_ID_KEY, deviceSessionId);\n deviceData.put(FRAUD_MERCHANT_ID_KEY, merchantId);\n deviceCollector.collect(deviceSessionId);\n } catch (NoClassDefFoundError | JSONException ignored) {\n }\n try {\n deviceData.put(CORRELATION_ID_KEY, PayPalOneTouchCore.getClientMetadataId(fragment.getApplicationContext()));\n } catch (JSONException ignored) {\n }\n return deviceData.toString();\n}\n"
"public void resolveBorderConflict(CellArea cellArea, boolean isFirst) {\n IContent cellContent = cellArea.getContent();\n int columnID = cellArea.getColumnID();\n int colSpan = cellArea.getColSpan();\n IRowContent row = (IRowContent) cellContent.getParent();\n IStyle cellContentStyle = cellContent.getComputedStyle();\n IStyle tableStyle = tableContent.getComputedStyle();\n IStyle rowStyle = row.getComputedStyle();\n IStyle columnStyle = getColumnStyle(columnID);\n IStyle preRowStyle = null;\n IStyle preColumnStyle = isRTL ? getColumnStyle(columnID + 1) : getColumnStyle(columnID - 1);\n IStyle leftCellContentStyle = null;\n IStyle topCellStyle = null;\n RowArea lastRow = null;\n if (rows.size() > 0) {\n lastRow = (RowArea) rows.getCurrent();\n }\n if (lastRow != null) {\n preRowStyle = lastRow.getContent().getComputedStyle();\n CellArea cell = lastRow.getCell(columnID);\n if (cell != null && cell.getContent() != null) {\n topCellStyle = cell.getContent().getComputedStyle();\n }\n }\n if ((!isRTL && columnID > startCol) || (isRTL && columnID + colSpan - 1 < endCol)) {\n leftCellContentStyle = getLeftCellContentStyle(lastRow, cellArea);\n }\n if (rows.size() == 0 && lastRow == null) {\n if (isFirst) {\n if (tableStyle != null || rowStyle != null || cellContentStyle != null) {\n BorderInfo border = bcr.resolveTableTopBorder(tableStyle, rowStyle, columnStyle, cellContentStyle);\n if (border != null) {\n cellArea.getBoxStyle().setTopBorder(border);\n }\n }\n } else {\n if (tableStyle != null) {\n BorderInfo border = bcr.resolveTableTopBorder(tableStyle, null, columnStyle, null);\n if (border != null) {\n cellArea.getBoxStyle().setTopBorder(border);\n }\n }\n }\n if ((columnID == startCol && !isRTL) || (columnID + colSpan - 1 == endCol && isRTL)) {\n if (tableStyle != null || rowStyle != null || cellContentStyle != null) {\n BorderInfo border = bcr.resolveTableLeftBorder(tableStyle, rowStyle, columnStyle, cellContentStyle);\n if (border != null) {\n cellArea.getBoxStyle().setLeftBorder(border);\n }\n }\n } else {\n if (leftCellContentStyle != null || cellContentStyle != null) {\n BorderInfo border = bcr.resolveCellLeftBorder(preColumnStyle, columnStyle, leftCellContentStyle, cellContentStyle);\n if (border != null) {\n cellArea.getBoxStyle().setLeftBorder(border);\n }\n }\n }\n if ((columnID + colSpan - 1 == endCol && !isRTL) || (columnID == startCol && isRTL)) {\n if (tableStyle != null || rowStyle != null || cellContentStyle != null) {\n BorderInfo border = bcr.resolveTableRightBorder(tableStyle, rowStyle, columnStyle, cellContentStyle);\n if (border != null) {\n cellArea.getBoxStyle().setRightBorder(border);\n }\n }\n }\n } else {\n if (isFirst) {\n if (preRowStyle != null || rowStyle != null || topCellStyle != null || cellContentStyle != null) {\n BorderInfo border = bcr.resolveCellTopBorder(preRowStyle, rowStyle, topCellStyle, cellContentStyle);\n if (border != null) {\n cellArea.getBoxStyle().setTopBorder(border);\n }\n }\n } else {\n if (preRowStyle != null || topCellStyle != null) {\n BorderInfo border = bcr.resolveCellTopBorder(preRowStyle, null, topCellStyle, null);\n if (border != null) {\n cellArea.getBoxStyle().setTopBorder(border);\n }\n }\n }\n if ((columnID == startCol && !isRTL) || (columnID + colSpan - 1 == endCol && isRTL)) {\n if (tableStyle != null || rowStyle != null || cellContentStyle != null) {\n BorderInfo border = bcr.resolveTableLeftBorder(tableStyle, rowStyle, columnStyle, cellContentStyle);\n if (border != null) {\n cellArea.getBoxStyle().setLeftBorder(border);\n }\n }\n } else {\n if (leftCellContentStyle != null || cellContentStyle != null) {\n BorderInfo border = bcr.resolveCellLeftBorder(preColumnStyle, columnStyle, leftCellContentStyle, cellContentStyle);\n if (border != null) {\n cellArea.getBoxStyle().setLeftBorder(border);\n }\n }\n }\n if ((columnID + colSpan - 1 == endCol && !isRTL) || (columnID == startCol && isRTL)) {\n if (tableStyle != null || rowStyle != null || cellContentStyle != null) {\n BorderInfo border = bcr.resolveTableRightBorder(tableStyle, rowStyle, columnStyle, cellContentStyle);\n if (border != null) {\n cellArea.getBoxStyle().setRightBorder(border);\n }\n }\n }\n }\n}\n"
"public String getMessage() {\n Optional<JsonError> body = getResponse().getBody(JsonError.class);\n if (body.isPresent() && body.get().getMessage() != null) {\n return body.get().getMessage();\n } else {\n return super.getMessage();\n }\n}\n"
"public void changeWorld() {\n Se2_F32 oldToNew = new Se2_F32(1, 2, 0);\n Se2_F32 model = new Se2_F32();\n ImageMotionPointKey<ImageUInt8, Se2_F32> alg = new ImageMotionPointKey<ImageUInt8, Se2_F32>(null, null, null, model, 1000);\n alg.changeWorld(oldToNew);\n Se2_F32 worldToCurr = alg.getWorldToCurr();\n Se2_F32 worldToKey = alg.getWorldToKey();\n assertEquals(oldToNew.getX(), worldToCurr.getX(), 1e-8);\n assertEquals(oldToNew.getX(), worldToKey.getX(), 1e-8);\n}\n"
"public void logLogout(SSOToken ssot) {\n try {\n String logLogout = bundle.getString(\"String_Node_Str\");\n List<String> dataList = new ArrayList<String>();\n dataList.add(logLogout);\n StringBuilder messageId = new StringBuilder();\n messageId.append(\"String_Node_Str\");\n String indexType = ssot.getProperty(ISAuthConstants.INDEX_TYPE);\n if (indexType != null) {\n messageId.append(\"String_Node_Str\").append(indexType.toUpperCase());\n dataList.add(indexType);\n if (indexType.equals(AuthContext.IndexType.USER.toString())) {\n dataList.add(ssot.getProperty(ISAuthConstants.PRINCIPAL));\n } else if (indexType.equals(AuthContext.IndexType.ROLE.toString())) {\n dataList.add(ssot.getProperty(ISAuthConstants.ROLE));\n } else if (indexType.equals(AuthContext.IndexType.SERVICE.toString())) {\n dataList.add(ssot.getProperty(ISAuthConstants.SERVICE));\n } else if (indexType.equals(AuthContext.IndexType.LEVEL.toString())) {\n dataList.add(ssot.getProperty(ISAuthConstants.AUTH_LEVEL));\n } else if (indexType.equals(AuthContext.IndexType.MODULE_INSTANCE.toString())) {\n dataList.add(ssot.getProperty(ISAuthConstants.AUTH_TYPE));\n }\n }\n Hashtable<String, String> props = new Hashtable<String, String>();\n String client = ssot.getProperty(ISAuthConstants.HOST);\n if (client != null) {\n props.put(LogConstants.IP_ADDR, client);\n }\n String userDN = ssot.getProperty(ISAuthConstants.PRINCIPAL);\n if (userDN != null) {\n props.put(LogConstants.LOGIN_ID, userDN);\n }\n String orgDN = ssot.getProperty(ISAuthConstants.ORGANIZATION);\n if (orgDN != null) {\n props.put(LogConstants.DOMAIN, orgDN);\n }\n String authMethName = ssot.getProperty(ISAuthConstants.AUTH_TYPE);\n if (authMethName != null) {\n props.put(LogConstants.MODULE_NAME, authMethName);\n }\n String contextId = null;\n contextId = ssot.getProperty(Constants.AM_CTX_ID);\n if (contextId != null) {\n props.put(LogConstants.CONTEXT_ID, contextId);\n }\n props.put(LogConstants.LOGIN_ID_SID, ssot.getTokenID().toString());\n String[] data = dataList.toArray(new String[dataList.size()]);\n if (auditor == null) {\n auditor = InjectorHolder.getInstance(LegacyAuthenticationEventAuditor.class);\n }\n CoreWrapper cw = new CoreWrapper();\n String realmName = cw.convertOrgNameToRealmName(orgDN);\n if (auditor.isAuditing(realmName, AuditConstants.AUTHENTICATION_TOPIC)) {\n String messageName = messageId.toString();\n LogMessageProviderBase provider = null;\n if (logStatus) {\n try {\n provider = (LogMessageProviderBase) MessageProviderFactory.getProvider(\"String_Node_Str\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n String description = \"String_Node_Str\";\n if (provider != null) {\n description = provider.getAllHashMessageIDs().get(messageName).getDescription();\n }\n long time = Calendar.getInstance().getTimeInMillis();\n Map<String, String> contexts = null;\n if (StringUtils.isNotEmpty(contextId)) {\n contexts = new HashMap<>();\n contexts.put(AuditConstants.Context.SESSION.toString(), contextId);\n }\n AMIdentity identity = cw.getIdentity(userDN, realmName);\n String authentication = null;\n if (identity != null) {\n authentication = identity.getUniversalId();\n }\n List<Entry> entries;\n Map<String, String> info = new HashMap<>();\n if (StringUtils.isNotEmpty(client)) {\n info = Collections.singletonMap(\"String_Node_Str\", client);\n }\n Map<String, Object> map = new HashMap<>();\n map.put(\"String_Node_Str\", authMethName);\n map.put(\"String_Node_Str\", description);\n map.put(\"String_Node_Str\", info);\n entries = Collections.singletonList(map);\n auditor.audit(messageName, AM_LOGOUT.toString(), AuditRequestContext.getTransactionIdValue(), authentication, realmName, time, contexts, entries);\n }\n this.logIt(data, LOG_ACCESS, messageId.toString(), props);\n } catch (SSOException ssoExp) {\n debug.error(\"String_Node_Str\", ssoExp);\n } catch (Exception e) {\n debug.error(\"String_Node_Str\", e);\n }\n}\n"
"public final List<List<IGraphItem>> getSearchResultDepthOrdered() {\n List<List<IGraphItem>> resultList = createDepthSortedList(depthSortedList.size());\n Iterator<List<IGraphItem>> iterRawDataTopLevel = depthSortedList.iterator();\n int index = 0;\n while (iterRawDataTopLevel.hasNext()) {\n List<IGraphItem> currentRawDataDepthList = iterRawDataTopLevel.next();\n Iterator<IGraphItem> iterRawDataInnerLoop = currentRawDataDepthList.iterator();\n ArrayList<IGraphItem> resultListDeepCopy = new ArrayList<IGraphItem>(currentRawDataDepthList.size());\n while (iterRawDataInnerLoop.hasNext()) {\n resultListDeepCopy.add(iterRawDataInnerLoop.next());\n }\n }\n return resultList;\n}\n"
"public static void setupTMap(Node node) {\n if (!GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerMapperService.class)) {\n return;\n }\n IDesignerMapperService service = (IDesignerMapperService) GlobalServiceRegister.getDefault().getService(IDesignerMapperService.class);\n IConnection inputConnection = node.getIncomingConnections().get(0);\n IConnection outputConnection = node.getOutgoingConnections().get(0);\n outputConnection.getMetadataTable().setListColumns(inputConnection.getMetadataTable().clone(false).getListColumns());\n ((Process) node.getProcess()).checkProcess();\n if (\"String_Node_Str\".equals(node.getComponent().getName())) {\n IDesignerMapperService service = (IDesignerMapperService) GlobalServiceRegister.getDefault().getService(IDesignerMapperService.class);\n service.createAutoMappedNode(node, inputConnection, outputConnection);\n }\n}\n"
"public Integer call() throws Exception {\n Payload message = PayloadService.instance.findLatest(product.getId(), userId);\n if (message == null) {\n return 0;\n }\n if (message.getClients() != null) {\n SentProgress progress = new SentProgress(message.getClients().size());\n for (String client : message.getClients()) {\n Connection c = ConnectionKeeper.get(product.getAppKey(), client);\n if (c != null) {\n c.send(progress, message);\n } else {\n progress.incrFailed();\n }\n }\n try {\n progress.getCountDownLatch().await();\n } catch (InterruptedException e) {\n logger.error(e.getMessage(), e);\n }\n int total = progress.getSuccess().get();\n try {\n PayloadService.instance.updateSendStatus(message, total);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return total;\n }\n return 0;\n}\n"
"public void run() {\n TreeNodeEditPart nodePart = (TreeNodeEditPart) getSelectedObjects().get(0);\n TreeNode model = (TreeNode) nodePart.getModel();\n AbstractInOutTree abstractTree = null;\n TreeNode docRoot = null;\n boolean isLookup = false;\n if (model instanceof OutputTreeNode) {\n OutputTreeNode outputNode = (OutputTreeNode) model;\n docRoot = (OutputTreeNode) XmlMapUtil.getTreeNodeRoot(outputNode);\n if (docRoot != null) {\n XmlMapUtil.cleanSubGroup(outputNode);\n List<TreeNode> newLoopUpGroups = new ArrayList<TreeNode>();\n findUpGroupNode(newLoopUpGroups, outputNode);\n XmlMapUtil.cleanSubGroup(docRoot, newLoopUpGroups);\n if (!newLoopUpGroups.isEmpty()) {\n TreeNode rootGroup = newLoopUpGroups.get(newLoopUpGroups.size() - 1);\n upsetGroup(outputNode, rootGroup);\n }\n if (docRoot.eContainer() instanceof AbstractInOutTree) {\n abstractTree = (AbstractInOutTree) docRoot.eContainer();\n }\n }\n } else if (model instanceof TreeNode) {\n docRoot = XmlMapUtil.getTreeNodeRoot(model);\n if (docRoot.eContainer() instanceof AbstractInOutTree) {\n abstractTree = (AbstractInOutTree) docRoot.eContainer();\n if (abstractTree != null && abstractTree instanceof InputXmlTree) {\n isLookup = ((InputXmlTree) abstractTree).isLookup();\n }\n }\n }\n if (!isLookup) {\n boolean hasDocument = false;\n if (abstractTree != null) {\n hasDocument = XmlMapUtil.hasDocument(abstractTree);\n }\n List<TreeNode> loopNodes = new ArrayList<TreeNode>();\n checkSubElementIsLoop(model, loopNodes);\n checkParentElementIsLoop(model, loopNodes);\n if (!loopNodes.isEmpty()) {\n if (MessageDialog.openConfirm(Display.getDefault().getActiveShell(), Messages.getString(\"String_Node_Str\"), Messages.getString(\"String_Node_Str\"))) {\n } else {\n return;\n }\n }\n for (TreeNode treeNode : loopNodes) {\n treeNode.setLoop(false);\n }\n if (input) {\n removeloopInOutputTree(loopNodes);\n addInputLoopNodesToOutput(model, model);\n }\n if (!input) {\n for (TreeNode treeNode : loopNodes) {\n InputLoopNodesTable inputLoopNodesTable = ((OutputTreeNode) treeNode).getInputLoopNodesTable();\n if (inputLoopNodesTable != null && abstractTree != null) {\n ((OutputXmlTree) abstractTree).getInputLoopNodesTables().remove(inputLoopNodesTable);\n inputLoopNodesTable.getInputloopnodes().clear();\n }\n ((OutputTreeNode) treeNode).setInputLoopNodesTable(null);\n }\n List<TreeNode> sourceLoopNodes = new ArrayList<TreeNode>();\n XmlMapUtil.findChildSourceLoop(model, sourceLoopNodes);\n if (!sourceLoopNodes.isEmpty()) {\n InputLoopNodesTable createInputLoopNodesTable = XmlmapFactory.eINSTANCE.createInputLoopNodesTable();\n createInputLoopNodesTable.eAdapters().add(nodePart);\n ((OutputTreeNode) model).setInputLoopNodesTable(createInputLoopNodesTable);\n createInputLoopNodesTable.getInputloopnodes().addAll(sourceLoopNodes);\n ((OutputXmlTree) abstractTree).getInputLoopNodesTables().add(createInputLoopNodesTable);\n }\n }\n model.setLoop(true);\n XmlMapUtil.clearMainNode(model);\n XmlMapUtil.upsetMainNode(model);\n if (hasDocument) {\n loopNodeList.clear();\n getLoopNode(docRoot);\n if (loopNodeList != null && loopNodeList.size() > 1) {\n abstractTree.setMultiLoops(true);\n } else {\n abstractTree.setMultiLoops(false);\n }\n }\n } else {\n if (docRoot != null) {\n cleanSubLoop(docRoot);\n }\n model.setLoop(true);\n XmlMapUtil.clearMainNode(docRoot);\n XmlMapUtil.upsetMainNode(model);\n }\n if (abstractTree != null) {\n mapperManager.getProblemsAnalyser().checkLoopProblems(abstractTree);\n mapperManager.getMapperUI().updateStatusBar();\n }\n}\n"
"public void testPadBytes() throws Exception {\n int TOTAL_LENGTH = 20;\n int TEST_SIZE = 10;\n int PAD_SIZE = TOTAL_LENGTH - TEST_SIZE;\n Buffer buffer = new AutomaticBuffer(10);\n byte[] test = new byte[10];\n random.nextBytes(test);\n buffer.putPadBytes(test, TOTAL_LENGTH);\n byte[] result = buffer.getBuffer();\n org.junit.Assert.assertEquals(result.length, TOTAL_LENGTH);\n org.junit.Assert.assertTrue(\"String_Node_Str\", Arrays.equals(Arrays.copyOfRange(test, 0, TEST_SIZE), Arrays.copyOfRange(result, 0, TEST_SIZE)));\n byte[] padBytes = new byte[TOTAL_LENGTH - TEST_SIZE];\n org.junit.Assert.assertTrue(\"String_Node_Str\", Bytes.equals(padBytes, 0, TEST_SIZE, result, TEST_SIZE, PAD_SIZE));\n}\n"
"static public void createPath(String path) {\n try {\n File file = new File(path);\n String parent = file.getParent();\n if (parent != null) {\n File unit = new File(parent);\n if (!unit.exists())\n unit.mkdirs();\n }\n } catch (SecurityException se) {\n System.err.println(\"String_Node_Str\" + file.getAbsolutePath());\n }\n}\n"
"protected void afterRun() {\n this.recycleBitmaps();\n}\n"
"private List<IndexClause> prepareIndexClause() {\n List<IndexClause> clauses = new ArrayList<IndexClause>();\n List<IndexExpression> expr = new ArrayList<IndexExpression>();\n for (Object o : getKunderaQuery().getFilterClauseQueue()) {\n if (o instanceof FilterClause) {\n FilterClause clause = ((FilterClause) o);\n String fieldName = getColumnName(clause.getProperty());\n String condition = clause.getCondition();\n String value = clause.getValue();\n expr.add(Selector.newIndexExpression(fieldName, getOperator(condition), getBytesValue(fieldName, m, value)));\n } else {\n String opr = o.toString();\n if (opr.equalsIgnoreCase(\"String_Node_Str\")) {\n log.error(\"String_Node_Str\");\n throw new QueryHandlerException(\"String_Node_Str\" + opr + \"String_Node_Str\");\n }\n }\n }\n return clauses;\n}\n"
"public org.hl7.fhir.dstu2.model.Group convertGroup(org.hl7.fhir.dstu3.model.Group src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2.model.Group tgt = new org.hl7.fhir.dstu2.model.Group();\n copyDomainResource(src, tgt);\n for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(convertIdentifier(t));\n tgt.setType(convertGroupType(src.getType()));\n tgt.setActual(src.getActual());\n tgt.setCode(convertCodeableConcept(src.getCode()));\n tgt.setName(src.getName());\n tgt.setQuantity(src.getQuantity());\n for (org.hl7.fhir.dstu3.model.Group.GroupCharacteristicComponent t : src.getCharacteristic()) tgt.addCharacteristic(convertGroupCharacteristicComponent(t));\n for (org.hl7.fhir.dstu3.model.Group.GroupMemberComponent t : src.getMember()) tgt.addMember(convertGroupMemberComponent(t));\n return tgt;\n}\n"
"public boolean nextKeyValue() throws IOException {\n if (key == null) {\n key = new LongWritable();\n }\n key.set(pos);\n if (value == null) {\n value = new Text();\n }\n int newSize = 0;\n while (getFilePosition() <= end || in.needAdditionalRecordAfterSplit()) {\n if (pos == 0) {\n newSize = skipUtfByteOrderMark();\n } else {\n newSize = in.readLine(value, maxLineLength, maxBytesToConsume(pos));\n pos += newSize;\n }\n pos += newSize;\n if (newSize < maxLineLength) {\n break;\n }\n LOG.info(\"String_Node_Str\" + newSize + \"String_Node_Str\" + (pos - newSize));\n }\n if (this.splitIndex == this.fileSplits.length && newSize == 0 && consumedSplitSize == wholeSize) {\n key = null;\n value = null;\n return false;\n }\n if (newSize == 0) {\n if (this.splitIndex < this.fileSplits.length) {\n consumedSplitSize += (end - start);\n close();\n FileSplit currSplit = this.fileSplits[this.splitIndex++];\n initializeOne(context, currSplit);\n if (currSplit.getLength() == 0L) {\n throw new IllegalStateException(\"String_Node_Str\" + currSplit + \"String_Node_Str\");\n }\n return nextKeyValue();\n } else {\n consumedSplitSize += (end - start);\n key = null;\n value = null;\n return false;\n }\n } else {\n return true;\n }\n}\n"
"protected Dimension getIntrinsicDimension(IImageContent content) throws BadElementException, MalformedURLException, IOException {\n Image image = null;\n switch(content.getImageSource()) {\n case IImageContent.IMAGE_FILE:\n URL url = new URL(content.getURI());\n InputStream in = url.openStream();\n try {\n byte[] buffer = new byte[in.available()];\n in.read(buffer);\n image = Image.getInstance(buffer);\n } catch (Exception ex) {\n logger.log(Level.WARNING, ex.getMessage(), ex);\n } finally {\n in.close();\n }\n break;\n case IImageContent.IMAGE_NAME:\n case IImageContent.IMAGE_EXPRESSION:\n image = Image.getInstance(content.getData());\n break;\n case IImageContent.IMAGE_URL:\n image = Image.getInstance(new URL(content.getURI()));\n break;\n default:\n assert (false);\n }\n if (image != null) {\n Object design = content.getGenerateBy();\n int resolution = 96;\n if (design instanceof ExtendedItemDesign) {\n resolution = 192;\n }\n return new Dimension((int) (image.plainWidth() * 1000 / resolution * 72), (int) (image.plainHeight() * 1000 / resolution * 72));\n }\n return null;\n}\n"
"public ProjectBuildingResult getProjectBuildingResult() {\n bootstrapMaven();\n try {\n if (this.buildingResult == null) {\n buildingResult = builder.build(getPOMFile(), request);\n }\n return buildingResult;\n } catch (ProjectBuildingException e) {\n throw new ProjectModelException(e);\n }\n}\n"
"public void destroyContainerServices(ContainerServices cs) throws ContainerException {\n try {\n ContainerServicesImpl csImpl = (ContainerServicesImpl) cs;\n AcsManagerProxy acsManagerProxy = additionalContainerServices.get(cs);\n acsManagerProxy.shutdownNotify();\n csImpl.releaseAllComponents();\n ((CleaningDaemonThreadFactory) csImpl.getThreadFactory()).cleanUp();\n m_acsManagerProxy.logoutFromManager();\n } catch (Throwable thr) {\n throw new ContainerException(\"String_Node_Str\", thr);\n }\n}\n"
"public boolean finish() {\n boolean failed = false;\n finishBound();\n if (hasReturnType) {\n failed |= (returnType[0] == null);\n ((JMethod) method).setReturnType(returnType[0]);\n }\n List<CollectAnnotationData>[] argAnnotations = methodData.getArgAnnotations();\n if (argTypes.length != params.size()) {\n throw new IllegalStateException(\"String_Node_Str\" + methodData.getDesc() + \"String_Node_Str\" + methodData.getSignature() + \"String_Node_Str\");\n }\n for (int i = 0; i < argTypes.length; ++i) {\n JType argType = params.get(i)[0];\n if (argType == null) {\n failed = true;\n continue;\n }\n Map<Class<? extends Annotation>, Annotation> declaredAnnotations = new HashMap<Class<? extends Annotation>, Annotation>();\n resolver.resolveAnnotations(logger, argAnnotations[i], declaredAnnotations);\n new JParameter(method, argType, argNames[i], declaredAnnotations, argNamesAreReal);\n }\n for (JType[] exc : exceptions) {\n if (exc[0] == null) {\n failed = true;\n continue;\n }\n method.addThrows(exc[0]);\n }\n return !failed;\n}\n"
"public void addProperty(String key, String value) {\n if (value == null) {\n StringBuilder txt = new StringBuilder(128);\n txt.append(\"String_Node_Str\").append(key);\n LOG.warn(txt.toString());\n } else if (!key.matches(VALID_HEADER_CHARS)) {\n StringBuilder txt = new StringBuilder(128);\n txt.append(\"String_Node_Str\").append(key);\n txt.append(\"String_Node_Str\").append(value);\n LOG.warn(txt.toString());\n } else {\n if (!lifecycle.matches(RESOURCE_PHASE) && disallowedHeaders.contains(key.toUpperCase())) {\n StringBuilder txt = new StringBuilder(128);\n txt.append(\"String_Node_Str\").append(key);\n txt.append(\"String_Node_Str\").append(value);\n LOG.warn(txt.toString());\n } else {\n if (!isClosed() && isSetPropsAllowed) {\n headerData.addHttpHeader(key, value);\n }\n }\n }\n}\n"
"private void appendGenericFields() {\n Iterator it = otherSimpleFields.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry entry = (Map.Entry) it.next();\n String tag = entry.getKey().toString();\n if (\"String_Node_Str\".equals(tag))\n continue;\n appendTag(tag, (String) entry.getValue());\n }\n}\n"
"public void executeInitSql(Properties dbProps, String sqlFile) {\n try {\n System.out.println(\"String_Node_Str\" + sqlFile);\n Project project = new Project();\n project.init();\n SQLExec task = new SQLExec();\n SQLExec.OnError error = new SQLExec.OnError();\n error.setValue(\"String_Node_Str\");\n task.setDriver(\"String_Node_Str\");\n String url = \"String_Node_Str\" + dbProps.getProperty(\"String_Node_Str\") + \"String_Node_Str\" + dbProps.getProperty(\"String_Node_Str\") + \"String_Node_Str\" + dbProps.getProperty(DatabaseProvisioner.DATABASENAME) + \"String_Node_Str\";\n task.setUrl(url);\n task.setUserid(dbProps.getProperty(DatabaseProvisioner.USER));\n task.setPassword(dbProps.getProperty(DatabaseProvisioner.PASSWORD));\n task.setSrc(new File(sqlFile));\n task.setOnerror(error);\n Path path = new Path(project, clh.getCommonClassPath());\n path.addJavaRuntime();\n task.setClasspath(path);\n task.setProject(project);\n task.setAutocommit(true);\n task.execute();\n System.out.println(\"String_Node_Str\" + sqlFile);\n } catch (Exception ex) {\n logger.log(Level.WARNING, \"String_Node_Str\" + sqlFile + \"String_Node_Str\" + ex);\n }\n}\n"
"public void testStreamConversion() throws Exception {\n ApplicationManager appManager = deployApplication(StreamConversionApp.class);\n WorkflowManager workflowManager = appManager.startWorkflow(\"String_Node_Str\", RuntimeArguments.NO_ARGUMENTS);\n workflowManager.getSchedule(\"String_Node_Str\").suspend();\n StreamWriter streamWriter = appManager.getStreamWriter(\"String_Node_Str\");\n streamWriter.send(\"String_Node_Str\");\n streamWriter.send(\"String_Node_Str\");\n streamWriter.send(\"String_Node_Str\");\n long startTime = System.currentTimeMillis();\n MapReduceManager mapReduceManager = appManager.startMapReduce(\"String_Node_Str\", RuntimeArguments.NO_ARGUMENTS);\n mapReduceManager.waitForFinish(5, TimeUnit.MINUTES);\n DataSetManager<TimePartitionedFileSet> fileSetManager = getTestManager().getDataset(\"String_Node_Str\");\n TimePartitionedFileSet converted = fileSetManager.get();\n Map<Long, String> partitions = converted.getPartitions(startTime, System.currentTimeMillis());\n Assert.assertEquals(1, partitions.size());\n long partitionTime = partitions.keySet().iterator().next();\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(startTime);\n calendar.set(Calendar.SECOND, 0);\n calendar.set(Calendar.MILLISECOND, 0);\n long startMinute = calendar.getTimeInMillis();\n Assert.assertTrue(partitionTime >= startMinute);\n Assert.assertTrue(partitionTime <= System.currentTimeMillis());\n calendar.setTimeInMillis(partitionTime);\n int year = calendar.get(Calendar.YEAR);\n int month = calendar.get(Calendar.MONTH) + 1;\n int day = calendar.get(Calendar.DAY_OF_MONTH);\n int hour = calendar.get(Calendar.HOUR_OF_DAY);\n int minute = calendar.get(Calendar.MINUTE);\n Connection connection = getTestManager().getQueryClient();\n ResultSet results = connection.prepareStatement(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\").executeQuery();\n Assert.assertTrue(results.next());\n Assert.assertEquals(year, results.getInt(1));\n Assert.assertEquals(month, results.getInt(2));\n Assert.assertEquals(day, results.getInt(3));\n Assert.assertEquals(hour, results.getInt(4));\n Assert.assertEquals(minute, results.getInt(5));\n Assert.assertFalse(results.next());\n}\n"
"public void updateFrequency(int y) {\n controller.changeFrequency(y);\n if (display != null)\n display.updatePitchKnob(y);\n}\n"
"public int getInt(int col) {\n long index = getIndex(col);\n if (index < 0) {\n return Numbers.INT_NaN;\n }\n return colA(col).getInt(index * 4);\n}\n"
"public void apply(XSSchemaSet schema, ErrorReceiver errorReceiver) {\n if (topLevel != null) {\n this.errorReceiver = errorReceiver;\n UnmarshallerImpl u = BindInfo.getJAXBContext().createUnmarshaller();\n this.unmarshaller = u.getUnmarshallerHandler();\n ValidatorHandler v = BindInfo.bindingFileSchema.newValidator();\n v.setErrorHandler(errorReceiver);\n loader = new ForkContentHandler(v, unmarshaller);\n topLevel.applyAll(schema.getSchemas());\n this.loader = null;\n this.unmarshaller = null;\n this.errorReceiver = null;\n }\n}\n"
"private boolean isSameInstance(Object view) {\n final int id = getId(view);\n return id == this.id;\n}\n"
"public double invokeNativeDouble(String name, Object jthis, Class<?>[] types, Object[] args) throws Throwable {\n JsValue result = invokeNative(name, jthis, types, args);\n String msgPrefix = composeResultErrorMsgPrefix(name, \"String_Node_Str\");\n Double value = JsValueGlue.get(result, null, Double.TYPE, msgPrefix);\n if (value == null) {\n throw new HostedModeException(msgPrefix + \"String_Node_Str\");\n }\n return value.doubleValue();\n}\n"
"public static String getMyPetBuild() {\n if (!updated) {\n getManifestVersion();\n updated = true;\n }\n return myPetBuild;\n}\n"
"private void sendProgress(Queue<Pair<Object, MPISendMessage>> pendingSendMessages, int sendId) {\n boolean canProgress = true;\n while (pendingSendMessages.size() > 0 && canProgress) {\n Pair<Object, MPISendMessage> pair = pendingSendMessages.peek();\n MPISendMessage mpiSendMessage = pair.getValue();\n Object messageObject = pair.getKey();\n if (mpiSendMessage.serializedState() == MPISendMessage.SendState.INIT) {\n int startOfInternalRouts = mpiSendMessage.getAcceptedInternalSends();\n List<Integer> inRoutes = new ArrayList<>(mpiSendMessage.getInternalSends());\n for (int i = startOfInternalRouts; i < mpiSendMessage.getInternalSends().size(); i++) {\n boolean receiveAccepted;\n if (isStoreBased && isLastReceiver) {\n serializeAndWriteToMemoryManager(mpiSendMessage, messageObject);\n receiveAccepted = receiver.receiveSendInternally(mpiSendMessage.getSource(), i, mpiSendMessage.getPath(), mpiSendMessage.getFlags(), operationMemoryManager);\n } else {\n lock.lock();\n try {\n receiveAccepted = receiver.receiveSendInternally(mpiSendMessage.getSource(), i, mpiSendMessage.getPath(), mpiSendMessage.getFlags(), messageObject);\n } finally {\n lock.unlock();\n }\n }\n if (!receiveAccepted) {\n canProgress = false;\n break;\n }\n }\n if (canProgress) {\n mpiSendMessage.setSendState(MPISendMessage.SendState.SENT_INTERNALLY);\n }\n }\n if (canProgress) {\n if (mpiSendMessage.getExternalSends().size() == 0) {\n pendingSendMessages.poll();\n continue;\n }\n MPISendMessage message = (MPISendMessage) messageSerializer.get(sendId).build(pair.getKey(), mpiSendMessage);\n if (message.serializedState() == MPISendMessage.SendState.SERIALIZED) {\n List<Integer> exRoutes = new ArrayList<>(mpiSendMessage.getExternalSends());\n int startOfExternalRouts = mpiSendMessage.getAcceptedExternalSends();\n int noOfExternalSends = startOfExternalRouts;\n for (int i = startOfExternalRouts; i < exRoutes.size(); i++) {\n boolean sendAccepted = sendMessageToTarget(message.getMPIMessage(), exRoutes.get(i));\n if (!sendAccepted) {\n canProgress = false;\n break;\n } else {\n sendCount++;\n mpiSendMessage.incrementAcceptedExternalSends();\n noOfExternalSends++;\n }\n }\n if (noOfExternalSends == exRoutes.size()) {\n mpiSendMessage.setSendState(MPISendMessage.SendState.FINISHED);\n pendingSendMessages.poll();\n }\n } else {\n break;\n }\n }\n }\n}\n"
"public boolean hasPower(ItemStack me, int powerNeeded) {\n if (this.slot == 1) {\n if (!me.hasTagCompound()) {\n me.setTagCompound(new NBTTagCompound());\n }\n if (!me.stackTagCompound.hasKey(\"String_Node_Str\")) {\n me.stackTagCompound.setInteger(\"String_Node_Str\", 0);\n }\n if (!me.stackTagCompound.hasKey(\"String_Node_Str\")) {\n me.stackTagCompound.setInteger(\"String_Node_Str\", 0);\n }\n return hasTank(me) && me.stackTagCompound.getInteger(\"String_Node_Str\") > powerNeeded;\n }\n return false;\n}\n"
"public short getStillNeededIfNoOthersHandleIt(EMaterialType materialType) {\n Set<MultiRequestStack> stacksHandlingThisMaterial = handlingStacks[materialType.ordinal];\n for (MultiRequestStack stack : stacksHandlingThisMaterial) {\n if (stack.canAcceptMoreDeliveriesOf(materialType)) {\n return 0;\n }\n }\n return getStillNeeded(materialType);\n}\n"
"public synchronized void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, final IProgressMonitor monitor) throws CoreException {\n try {\n setProcessFinished(false);\n m_projectName = configuration.getAttribute(projectNameCfgAttribute, \"String_Node_Str\");\n m_platformName = configuration.getAttribute(platforrmCfgAttribute, \"String_Node_Str\");\n final IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(m_projectName);\n if (project == null || m_platformName == null || m_platformName.length() == 0) {\n throw new IllegalArgumentException();\n }\n Thread cancelingThread = new Thread(new Runnable() {\n public void run() {\n try {\n rhodesAdapter.buildApp(project.getLocation().toOSString(), m_platformName);\n setProcessFinished(true);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n cancelingThread.start();\n while (true) {\n try {\n if (monitor.isCanceled()) {\n OSHelper.killProcess(\"String_Node_Str\", \"String_Node_Str\");\n return;\n }\n if (getProcessFinished()) {\n return;\n }\n Thread.sleep(100);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n } catch (IllegalArgumentException e) {\n ConsoleHelper.consolePrint(\"String_Node_Str\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n}\n"
"protected List<Pair<Long, String>> load() {\n List<GroupTO> groupTOs = groupRestClient.list(\"String_Node_Str\", -1, -1, new SortParam<>(\"String_Node_Str\", true), null);\n final Map<Long, String> result = new HashMap<>(groupTOs.size());\n for (GroupTO group : groupTOs) {\n result.add(Pair.of(group.getKey(), group.getName()));\n }\n return result;\n}\n"
"public int peel(byte[] buffer, int start, int bytes_available) {\n RBPair rbp = RBSerial.peel(buffer, start, bytes_available);\n int bytes_read = rbp.getNumberOfBytesRead();\n RBSerialMessage message = rbp.getMessage();\n byte b = message.getHeaderByte();\n if (b == RBSerialMessage.BRAKE) {\n } else if (b == RBSerialMessage.STEERING) {\n } else if (b == RBSerialMessage.DEVICE_ID) {\n }\n return bytes_read;\n}\n"
"public boolean apply(Game game, Ability source) {\n Permanent sourcePermanent = game.getPermanent(source.getSourceId());\n if (sourcePermanent != null) {\n int amount = sourcePermanent.getCounters().getCount(CounterType.P1P1);\n if (amount > 0) {\n sourcePermanent.addCounters(CounterType.P1P1.createInstance(amount), game);\n }\n return true;\n }\n return false;\n}\n"
"protected void onResume() {\n super.onResume();\n BusProvider.get().register(this);\n if (restaurant == null) {\n progressDialog = new ProgressDialog(this);\n progressDialog.setTitle(\"String_Node_Str\");\n progressDialog.setMessage(\"String_Node_Str\");\n progressDialog.show();\n BusProvider.get().post(new GetOneRestaurantEvent(mID));\n }\n}\n"
"private boolean bindOnLongClickListener(Method method, OnLongClick onLongClick, Set<View> modifiedViews, Finder finder) {\n boolean invokeWithView = checkInvokeWithView(method, new Class[] { View.class });\n method.setAccessible(true);\n InjectedOnLongClickListener listener = new InjectedOnLongClickListener(target, method, invokeWithView);\n int[] ids = onLongClick.id();\n for (int id : ids) {\n if (id != 0) {\n View view = findView(method, id, finder);\n if (view != null) {\n view.setOnLongClickListener(listener);\n }\n }\n }\n return invokeWithView;\n}\n"
"private HearthTreeNode<BoardState> doBuffs(int targetMinionPlayerIndex, int targetMinionIndex, HearthTreeNode<BoardState> boardState, Deck deck) {\n if (targetMinionPlayerIndex == 1)\n return boardState;\n Minion minion = boardState.data_.getMinion(thisMinionPlayerIndex, targetMinionIndex - 1);\n if (minion != this)\n minion.setAttack((byte) (minion.getAttack() + 1));\n return boardState;\n}\n"
"private static void writeApiOnly(BufferedWriter w) throws IOException {\n writeIniFileLine(ApiOnlyTrueSetting, w);\n}\n"
"public IValue applyState(CompilerState state, IContext context) {\n int len = this.values.size();\n if (state == CompilerState.FOLD_CONSTANTS) {\n if (len == 1) {\n return this.values.get(0);\n }\n } else if (state == CompilerState.RESOLVE) {\n IVariableList variableList = context instanceof IVariableList ? (IVariableList) context : null;\n for (IValue v : this.values) {\n v.applyState(state, this);\n if (!(v instanceof FieldAssign)) {\n continue;\n }\n FieldAssign assign = (FieldAssign) v;\n if (!assign.initializer) {\n continue;\n }\n Variable var = (Variable) assign.field;\n var.start = this.start;\n var.end = this.end;\n this.variables.put(assign.qualifiedName, assign.field);\n if (variableList != null) {\n variableList.addVariable((Variable) assign.field);\n }\n }\n }\n this.context = context;\n for (int i = 0; i < len; i++) {\n IValue v = this.values.get(i);\n this.values.set(i, v.applyState(state, this));\n }\n return this;\n}\n"
"public static String getFolderName(String filePath) {\n if (isFileExist(filePath)) {\n return filePath;\n }\n int filePosi = filePath.lastIndexOf(File.separator);\n return (filePosi == -1) ? \"String_Node_Str\" : filePath.substring(0, filePosi);\n}\n"
"public void doDisplay(GLAutoDrawable drawable, int flags) {\n GL2 gl = drawable.getGL().getGL2();\n if (resetViewVolume && resizeEnabled) {\n resetViewVolume(gl);\n resetViewVolume = false;\n }\n if (isSelecting()) {\n invalidateProjectionMatrix();\n }\n gl.glPushMatrix();\n if (isSelecting()) {\n gl.glClearColor(0f, 0f, 0f, 0f);\n } else {\n gl.glClearColor(backgroundColor[0], backgroundColor[1], backgroundColor[2], backgroundColor[3]);\n }\n gl.glClear(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_DEPTH_BUFFER_BIT);\n GLSupport.transformToGLMatrix(GLMatrix, viewMatrix);\n gl.glLoadMatrixd(GLMatrix, 0);\n viewMatrixValidP = true;\n setupLights(gl);\n if (!isSelecting()) {\n if (gridVisible) {\n myGrid.render(this, flags);\n }\n if (axisLength > 0) {\n drawAxes(gl, axisLength);\n }\n for (Dragger3d dragger : myDraggers) {\n dragger.render(this, 0);\n }\n if (myDrawTool != null) {\n myDrawTool.render(this, 0);\n }\n for (GLClipPlane cp : myClipPlanes) {\n cp.render(this, flags);\n }\n }\n maybeUpdateState(gl);\n int nclips = 0;\n int clipIdx = GL2.GL_CLIP_PLANE0;\n for (GLClipPlane cp : myClipPlanes) {\n if (cp.isClippingEnabled()) {\n cp.getPlaneValues(myClipPlaneValues);\n myClipPlaneValues[3] += cp.getOffset();\n gl.glClipPlane(clipIdx, myClipPlaneValues, 0);\n gl.glEnable(clipIdx);\n clipIdx++;\n nclips++;\n if (nclips >= maxClipPlanes) {\n break;\n }\n if (cp.isSlicingEnabled()) {\n myClipPlaneValues[0] = -myClipPlaneValues[0];\n myClipPlaneValues[1] = -myClipPlaneValues[1];\n myClipPlaneValues[2] = -myClipPlaneValues[2];\n myClipPlaneValues[3] = -myClipPlaneValues[3] + 2 * cp.getOffset();\n gl.glClipPlane(clipIdx, myClipPlaneValues, 0);\n gl.glEnable(clipIdx);\n clipIdx++;\n nclips++;\n if (nclips >= maxClipPlanes) {\n break;\n }\n }\n }\n }\n gl.glPushMatrix();\n int qid = 0;\n synchronized (myInternalRenderList) {\n qid = myInternalRenderList.renderOpaque(this, qid, flags);\n if (myExternalRenderList != null) {\n qid = myExternalRenderList.renderOpaque(this, qid, flags);\n }\n }\n if (!isSelecting()) {\n enableTransparency(gl);\n }\n synchronized (myInternalRenderList) {\n qid = myInternalRenderList.renderTransparent(this, qid, flags);\n }\n if (myExternalRenderList != null) {\n synchronized (myExternalRenderList) {\n qid = myExternalRenderList.renderTransparent(this, qid, flags);\n }\n }\n disableTransparency(gl);\n gl.glPopMatrix();\n for (int i = GL2.GL_CLIP_PLANE0; i < clipIdx; ++i) {\n gl.glDisable(i);\n }\n begin2DRendering(width, height);\n synchronized (myInternalRenderList) {\n qid = myInternalRenderList.renderOpaque2d(this, qid, 0);\n }\n if (myExternalRenderList != null) {\n synchronized (myExternalRenderList) {\n qid = myExternalRenderList.renderOpaque2d(this, qid, 0);\n }\n }\n enableTransparency(gl);\n synchronized (myInternalRenderList) {\n qid = myInternalRenderList.renderTransparent2d(this, qid, 0);\n }\n if (myExternalRenderList != null) {\n synchronized (myExternalRenderList) {\n qid = myExternalRenderList.renderTransparent2d(this, qid, 0);\n }\n }\n disableTransparency(gl);\n end2DRendering();\n gl.glPopMatrix();\n if (!isSelecting()) {\n if (myDragBox != null) {\n drawDragBox(gl);\n }\n }\n gl.glFlush();\n}\n"
"public void close(VirtualConnection inVC, Exception e) {\n if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {\n Tr.debug(tc, \"String_Node_Str\" + this + \"String_Node_Str\" + inVC);\n }\n if (streamID == 0 || streamID % 2 == 1) {\n if (e == null || e instanceof Http2Exception) {\n if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {\n Tr.debug(tc, \"String_Node_Str\" + e);\n }\n this.muxLink.close(inVC, e);\n } else {\n H2StreamProcessor h2sp = muxLink.getStreamProcessor(streamID);\n if (h2sp != null) {\n try {\n if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {\n Tr.debug(tc, \"String_Node_Str\" + streamID);\n }\n int PROTOCOL_ERROR = 0x1;\n Frame reset = new FrameRstStream(streamID, PROTOCOL_ERROR, false);\n h2sp.processNextFrame(reset, Constants.Direction.WRITING_OUT);\n } catch (Http2Exception h2e) {\n this.muxLink.close(inVC, e);\n }\n }\n this.muxLink.close(inVC, null);\n }\n } else {\n H2StreamProcessor h2sp = muxLink.getStreamProcessor(streamID);\n if (h2sp != null && !h2sp.isStreamClosed() && !h2sp.isHalfClosed()) {\n if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {\n Tr.debug(tc, \"String_Node_Str\" + streamID);\n }\n int PROTOCOL_ERROR = 0x1;\n Frame reset = new FrameRstStream(streamID, PROTOCOL_ERROR, false);\n try {\n h2sp.processNextFrame(reset, Constants.Direction.WRITING_OUT);\n } catch (Http2Exception h2e) {\n }\n }\n }\n}\n"
"private void decOpenCountLocked() {\n mOpenCount--;\n if (mOpenCount == 0) {\n nativeDestroy(mNative);\n if (mAssets != null) {\n mAssets.xmlBlockGone(hashCode());\n }\n }\n}\n"
"private static void filterSamples(final File srcDesignFile, final File destDesignFile, final double threshold) throws IOException, EoulsanIOException {\n if (srcDesignFile == null)\n throw new NullPointerException(\"String_Node_Str\");\n if (destDesignFile == null)\n throw new NullPointerException(\"String_Node_Str\");\n if (destDesignFile.exists())\n throw new EoulsanIOException(\"String_Node_Str\" + destDesignFile);\n final DesignReader dr = new SimpleDesignReader(srcDesignFile);\n final Design design = dr.read();\n LogReader logReader = new LogReader(new File(\"String_Node_Str\"));\n final Reporter filterReadsReporter = logReader.read();\n logReader = new LogReader(new File(\"String_Node_Str\"));\n final Reporter soapMapReadsReporter = logReader.read();\n final Map<String, Long> sampleInputMapReads = parseReporter(filterReadsReporter, Common.READS_AFTER_FILTERING_COUNTER);\n final Map<String, Long> soapAlignementWithOneLocus = parseReporter(soapMapReadsReporter, Common.SOAP_ALIGNEMENT_WITH_ONLY_ONE_HIT_COUNTER);\n for (String sample : sampleInputMapReads.keySet()) {\n if (!soapAlignementWithOneLocus.containsKey(sample))\n continue;\n final long inputReads = sampleInputMapReads.get(sample);\n final long oneLocus = soapAlignementWithOneLocus.get(sample);\n final double ratio = (double) oneLocus / (double) inputReads;\n logger.info(\"String_Node_Str\" + sample + \"String_Node_Str\" + oneLocus + \"String_Node_Str\" + inputReads + \"String_Node_Str\" + ratio + \"String_Node_Str\" + threshold);\n if (ratio < threshold) {\n design.removeSample(sample);\n logger.info(\"String_Node_Str\" + sample);\n }\n }\n DesignWriter writer = new SimpleDesignWriter(destDesignFile);\n writer.write(design);\n}\n"
"private Node createFilterBox() {\n filterTextField = new FilterTextField(Parser::check).setOnCancel(this::requestFocus).setOnShowDocs(ui.getBrowserComponent()::showFilterDocs).setOnConfirm((text) -> {\n Platform.runLater(() -> ui.triggerEvent(new ApplyingFilterEvent(this)));\n applyStringFilter(text);\n return text;\n });\n filterTextField.setId(guiController.getDefaultRepo() + \"String_Node_Str\" + panelIndex + \"String_Node_Str\");\n filterTextField.setMinWidth(388);\n filterTextField.setMaxWidth(388);\n ui.registerEvent(onModelUpdate);\n filterTextField.setOnMouseClicked(e -> ui.triggerEvent(new PanelClickedEvent(panelIndex)));\n HBox layout = new HBox();\n layout.getChildren().addAll(filterTextField);\n layout.setPadding(new Insets(0, 0, 3, 0));\n setupPanelDragEvents(layout);\n return layout;\n}\n"
"public RequestParameter isValidSingleParam(String value) {\n try {\n Number number = parseNumber.apply(value);\n checkMaximum(number);\n checkMinimum(number);\n checkMultipleOf(number);\n return RequestParameter.create(number);\n } catch (NumberFormatException e) {\n throw ValidationException.ValidationExceptionFactory.generateNotMatchValidationException(\"String_Node_Str\");\n }\n}\n"
"public void handleEvent(Event event) {\n if (event.widget.equals(txtTitle)) {\n getChart().getTitle().getLabel().getCaption().setValue(txtTitle.getText());\n } else if (event.widget.equals(fdcFont)) {\n if (event.type == FontDefinitionComposite.FONT_CHANTED_EVENT) {\n getChart().getTitle().getLabel().getCaption().setFont((FontDefinition) ((Object[]) event.data)[0]);\n getChart().getTitle().getLabel().getCaption().setColor((ColorDefinition) ((Object[]) event.data)[1]);\n }\n }\n}\n"
"public void onPostDownloaded(final RedditPreparedPost post) {\n postAddedHandler.sendMessage(General.handlerMessage(0, post));\n}\n"
"public Object getAdater(Object adaptableObject) {\n if (this.adapter != null && this.isSingleton) {\n return this.adapter;\n }\n if (this.adapterInstance != null) {\n return this.adapterInstance;\n }\n if (this.factory != null) {\n this.adapter = this.factory.getAdapter(adaptableObject, this.adapterType);\n }\n if (this.adapter == null && this.includeWorkbenchContribute) {\n this.adapter = Platform.getAdapterManager().getAdapter(adaptableObject, this.adapterType);\n }\n return adapter;\n}\n"
"public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) {\n return Item.getItemFromBlock(NContent.floraSapling);\n}\n"
"private int stormpathUserConsent(Study study) {\n int count = 0;\n Application application = StormpathFactory.createStormpathApplication(stormpathClient);\n AccountList accounts = application.getAccounts();\n for (Account account : accounts) {\n final CustomData customData = account.getCustomData();\n final String studyKey = study.getKey();\n final String consentedKey = studyKey + BridgeConstants.CUSTOM_DATA_CONSENT_SUFFIX;\n final Object consentedObj = customData.get(consentedKey);\n final String healthIdKey = studyKey + BridgeConstants.CUSTOM_DATA_HEALTH_CODE_SUFFIX;\n final Object healthIdObj = customData.get(healthIdKey);\n if (consentedObj != null && healthIdObj != null) {\n boolean consented = \"String_Node_Str\".equals(((String) consentedObj).toLowerCase());\n if (consented) {\n String healthId = healthCodeEncryptor.decrypt((String) healthIdObj);\n String healthCode = healthCodeService.getHealthCode(healthId);\n StudyConsent studyConsent = studyConsentDao.getConsent(studyKey);\n if (!userConsentDao.hasConsented(healthCode, studyConsent)) {\n String userName = account.getUsername();\n ConsentSignature researchConsent = new ConsentSignature(userName, \"String_Node_Str\");\n userConsentDao.giveConsent(healthCode, studyConsent, researchConsent);\n count++;\n }\n }\n }\n }\n return count;\n}\n"
"protected void logProblem(String type, Object val) {\n if (lastWasProblem && currentProblemLoggedAsWarning) {\n if (log.isTraceEnabled())\n log.trace(\"String_Node_Str\", new Object[] { type, this, getBriefDescription(), val });\n } else {\n long nowTime = System.currentTimeMillis();\n Long currentProblemStartTimeCache = currentProblemStartTime;\n long expiryTime = lastSuccessTime != null ? lastSuccessTime + logWarningGraceTime.toMilliseconds() : currentProblemStartTimeCache != null ? currentProblemStartTimeCache + logWarningGraceTimeOnStartup.toMilliseconds() : nowTime + logWarningGraceTimeOnStartup.toMilliseconds();\n if (!lastWasProblem) {\n if (expiryTime <= nowTime) {\n currentProblemLoggedAsWarning = true;\n if (entity == null || !Entities.isNoLongerManaged(entity)) {\n log.warn(\"String_Node_Str\" + getBriefDescription() + \"String_Node_Str\" + type + \"String_Node_Str\" + val);\n } else {\n log.debug(\"String_Node_Str\" + getBriefDescription() + \"String_Node_Str\" + type + \"String_Node_Str\" + val);\n }\n if (log.isDebugEnabled() && val instanceof Throwable)\n log.debug(\"String_Node_Str\" + type + \"String_Node_Str\" + getBriefDescription() + \"String_Node_Str\" + val, (Throwable) val);\n } else {\n if (log.isDebugEnabled())\n log.debug(\"String_Node_Str\" + getBriefDescription() + \"String_Node_Str\" + type + \"String_Node_Str\" + val);\n }\n lastWasProblem = true;\n currentProblemStartTime = nowTime;\n } else {\n if (expiryTime <= nowTime) {\n currentProblemLoggedAsWarning = true;\n log.warn(\"String_Node_Str\" + getBriefDescription() + \"String_Node_Str\" + type + \"String_Node_Str\" + Duration.millis(nowTime - currentProblemStartTimeCache) + (config.hasExceptionHandler() ? \"String_Node_Str\" : \"String_Node_Str\") + \"String_Node_Str\" + \"String_Node_Str\" + val);\n if (log.isDebugEnabled() && val instanceof Throwable)\n log.debug(\"String_Node_Str\" + type + \"String_Node_Str\" + getBriefDescription() + \"String_Node_Str\" + val, (Throwable) val);\n } else {\n if (log.isDebugEnabled())\n log.debug(\"String_Node_Str\", new Object[] { type, this, getBriefDescription(), val });\n }\n }\n }\n}\n"
"public void runBeforeEachTest() throws LibrarySaveException, RepositoryException {\n xsdStringNode = NodeFinders.findNodeByName(\"String_Node_Str\", Node.XSD_NAMESPACE);\n ProjectNode uploadProject = createProject(\"String_Node_Str\", getRepositoryForTest(), \"String_Node_Str\");\n majorLibrary = LibraryNodeBuilder.create(\"String_Node_Str\", getRepositoryForTest().getNamespace() + \"String_Node_Str\", \"String_Node_Str\", new Version(1, 0, 0)).build(uploadProject, pc);\n secondLib = LibraryNodeBuilder.create(\"String_Node_Str\", getRepositoryForTest().getNamespace() + \"String_Node_Str\", \"String_Node_Str\", new Version(1, 0, 0)).build(uploadProject, pc);\n chain = rc.manage(getRepositoryForTest(), Collections.singletonList(majorLibrary)).get(0);\n boolean locked = rc.lock(chain.getHead());\n Assert.assertTrue(locked);\n Assert.assertTrue(majorLibrary.isEditable());\n Assert.assertEquals(RepositoryItemState.MANAGED_WIP, chain.getHead().getProjectItem().getState());\n sbo = ml.addBusinessObjectToLibrary(secondLib, \"String_Node_Str\");\n bo = ml.addBusinessObjectToLibrary(majorLibrary, \"String_Node_Str\");\n co = ml.addCoreObjectToLibrary(majorLibrary, \"String_Node_Str\");\n bo.setExtensible(true);\n vwa = ml.addVWA_ToLibrary(majorLibrary, \"String_Node_Str\");\n ml.addSimpleTypeToLibrary(majorLibrary, \"String_Node_Str\");\n ml.addClosedEnumToLibrary(majorLibrary, \"String_Node_Str\");\n ml.addOpenEnumToLibrary(majorLibrary, \"String_Node_Str\");\n ml.addNestedTypes(majorLibrary);\n core2 = (CoreObjectNode) majorLibrary.findNodeByName(\"String_Node_Str\");\n ServiceNode svc = new ServiceNode(bo);\n svc.setName(bo.getName() + \"String_Node_Str\");\n ExtensionPointNode ep = new ExtensionPointNode(new TLExtensionPointFacet());\n ep.setExtendsType(sbo.getSummaryFacet());\n majorLibrary.addMember(ep);\n Assert.assertTrue(majorLibrary.isValid());\n TotalDescendents = 11;\n TotalLibraries = 3;\n ActiveComplex = 8;\n ActiveSimple = 2;\n MinorComplex = 0;\n patchLibrary = rc.createPatchVersion(chain.getHead());\n ml.addSimpleTypeToLibrary(patchLibrary, \"String_Node_Str\");\n TotalDescendents += 1;\n ActiveSimple += 1;\n Assert.assertTrue(chain.isValid());\n checkCounts(chain);\n ExtensionPointNode ePatch = new ExtensionPointNode(new TLExtensionPointFacet());\n patchLibrary.addMember(ePatch);\n ePatch.setExtendsType(core2.getSummaryFacet());\n ePatch.addProperty(new IndicatorNode(ePatch, \"String_Node_Str\"));\n TotalDescendents += 1;\n ActiveComplex += 1;\n Assert.assertTrue(chain.isValid());\n checkCounts(chain);\n minorLibrary = rc.createMinorVersion(chain.getHead());\n MinorComplex++;\n TotalDescendents++;\n TotalDescendents++;\n Assert.assertSame(((VersionNode) patchLibrary.getComplexRoot().getChildren().get(0)).getNewestVersion(), ePatch);\n checkCounts(chain);\n mCo = null;\n for (Node n : minorLibrary.getDescendants_NamedTypes()) {\n if (n.getName().equals(core2.getName())) {\n mCo = (CoreObjectNode) n;\n break;\n }\n }\n Assert.assertSame(core2, mCo.getExtendsType());\n if (!(mCo.getParent() instanceof VersionNode)) {\n VersionNode vn = new VersionNode(mCo);\n ((AggregateNode) chain.getComplexAggregate()).add(mCo);\n }\n checkCounts(chain);\n Assert.assertTrue(chain.isValid());\n}\n"
"private void setBackground(LinearLayout topPanel, LinearLayout contentPanel, View customPanel, boolean hasButtons, TypedArray a, boolean hasTitle, View buttonPanel) {\n int fullDark = a.getResourceId(R.styleable.AlertDialog_fullDark, R.drawable.popup_full_dark);\n int topDark = a.getResourceId(R.styleable.AlertDialog_topDark, R.drawable.popup_top_dark);\n int centerDark = a.getResourceId(R.styleable.AlertDialog_centerDark, R.drawable.popup_center_dark);\n int bottomDark = a.getResourceId(R.styleable.AlertDialog_bottomDark, R.drawable.popup_bottom_dark);\n int fullBright = a.getResourceId(R.styleable.AlertDialog_fullBright, R.drawable.popup_full_bright);\n int topBright = a.getResourceId(R.styleable.AlertDialog_topBright, R.drawable.popup_top_bright);\n int centerBright = a.getResourceId(R.styleable.AlertDialog_centerBright, R.drawable.popup_center_bright);\n int bottomBright = a.getResourceId(R.styleable.AlertDialog_bottomBright, R.drawable.popup_bottom_bright);\n int bottomMedium = a.getResourceId(R.styleable.AlertDialog_bottomMedium, R.drawable.popup_bottom_medium);\n int centerMedium = a.getResourceId(R.styleable.AlertDialog_centerMedium, R.drawable.popup_center_medium);\n View[] views = new View[4];\n boolean[] light = new boolean[4];\n View lastView = null;\n boolean lastLight = false;\n int pos = 0;\n if (hasTitle) {\n views[pos] = topPanel;\n light[pos] = false;\n pos++;\n }\n views[pos] = (contentPanel.getVisibility() == View.GONE) ? null : contentPanel;\n light[pos] = mListView != null;\n pos++;\n if (customPanel != null) {\n views[pos] = customPanel;\n light[pos] = mForceInverseBackground;\n pos++;\n }\n if (hasButtons) {\n views[pos] = buttonPanel;\n light[pos] = true;\n }\n boolean setView = false;\n for (pos = 0; pos < views.length; pos++) {\n View v = views[pos];\n if (v == null) {\n continue;\n }\n if (lastView != null) {\n if (!setView) {\n lastView.setBackgroundResource(lastLight ? topBright : topDark);\n } else {\n lastView.setBackgroundResource(lastLight ? centerBright : centerDark);\n }\n setView = true;\n }\n lastView = v;\n lastLight = light[pos];\n }\n if (lastView != null) {\n if (setView) {\n lastView.setBackgroundResource(lastLight ? (hasButtons ? bottomMedium : bottomBright) : bottomDark);\n } else {\n lastView.setBackgroundResource(lastLight ? fullBright : fullDark);\n }\n }\n if ((mListView != null) && (mAdapter != null)) {\n mListView.setAdapter(mAdapter);\n if (mCheckedItem > -1) {\n mListView.setItemChecked(mCheckedItem, true);\n mListView.setSelection(mCheckedItem);\n }\n }\n}\n"
"public void controlResized(ControlEvent e) {\n Rectangle r = scrolledComposite.getClientArea();\n if (getConnection().getDatabaseType() != null && getConnection().getDatabaseType().equals(EDatabaseConnTemplate.HIVE.getDBDisplayName())) {\n if (Platform.getOS().equals(Platform.OS_LINUX)) {\n scrolledComposite.setMinSize(newParent.computeSize(SWT.DEFAULT, 900));\n } else {\n scrolledComposite.setMinSize(newParent.computeSize(SWT.DEFAULT, 820));\n }\n } else {\n scrolledComposite.setMinSize(newParent.computeSize(SWT.DEFAULT, 550));\n }\n}\n"
"public void findConversationsByConversationIds(List<String> ids, AVIMConversationQueryCallback callback) {\n AVIMConversationQuery conversationQuery = ChatManager.getInstance().getQuery();\n if (ids.size() > 0 && null != conversationQuery) {\n conversationQuery.whereContainsIn(Constant.OBJECT_ID, ids);\n conversationQuery.setLimit(1000);\n conversationQuery.findInBackground(callback);\n } else if (null != callback) {\n callback.done(new ArrayList<AVIMConversation>(), null);\n }\n}\n"
"public static synchronized NavigableMap<byte[], NavigableMap<Long, byte[]>> get(String tableName, byte[] row, Long version) {\n ConcurrentNavigableMap<byte[], NavigableMap<byte[], NavigableMap<Long, Update>>> table = tables.get(tableName);\n Preconditions.checkArgument(table != null, \"String_Node_Str\" + tableName);\n NavigableMap<byte[], NavigableMap<Long, Update>> rowMap = table.get(row);\n return deepCopy(Updates.rowToBytes(getVisible(rowMap, tx)));\n}\n"
"private static boolean isStillAValidSource(BlockSourceInformation info, double range, ClickType clickType) {\n if (info == null || info.getBlock() == null) {\n return false;\n } else if (info.getClickType() != clickType) {\n return false;\n } else if (!info.getPlayer().getWorld().equals(info.getBlock().getWorld())) {\n return false;\n } else if (Math.abs(info.getPlayer().getLocation().distance(info.getBlock().getLocation())) > range) {\n return false;\n } else if (info.getSourceType() == BlockSourceType.WATER && !WaterMethods.isWaterbendable(info.getBlock(), info.getPlayer())) {\n return false;\n } else if (info.getSourceType() == BlockSourceType.ICE && !WaterMethods.isIcebendable(info.getBlock())) {\n return false;\n } else if (info.getSourceType() == BlockSourceType.PLANT && (!WaterMethods.isPlant(info.getBlock()) || !WaterMethods.isWaterbendable(info.getBlock(), info.getPlayer()))) {\n return false;\n } else if (info.getSourceType() == BlockSourceType.EARTH && !EarthMethods.isEarthbendable(info.getPlayer(), info.getBlock())) {\n return false;\n } else if (info.getSourceType() == BlockSourceType.METAL && (!EarthMethods.isMetal(info.getBlock()) || !EarthMethods.isEarthbendable(info.getPlayer(), info.getBlock()))) {\n return false;\n } else if (info.getSourceType() == BlockSourceType.LAVA && (!EarthMethods.isLava(info.getBlock()) || !EarthMethods.isLavabendable(info.getBlock(), info.getPlayer()))) {\n return false;\n }\n return true;\n}\n"
"public void compute(float x, float y, Point3D_F32 out) {\n p2.x = x;\n p2.y = y;\n GeometryMath_F32.mult(K_inv, p2, p2);\n removeRadial(p2.x, p2.y, distortion.radial, distortion.t1, distortion.t2, p2, tol);\n float u = p2.x;\n float v = p2.y;\n float a;\n float xi = mirrorOffset;\n float c0 = u * u + v * v + 1.0f;\n float c1 = -2.0f * xi;\n float c2 = xi * xi - 1;\n a = (-c1 + (float) Math.sqrt(c1 * c1 - 4.0f * c0 * c2)) / (2.0f * c0);\n out.x = u * a;\n out.y = v * a;\n out.z = a - xi;\n}\n"
"public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {\n String label = \"String_Node_Str\";\n String detail = null;\n IMessage.Kind kind = IMessage.ERROR;\n if (value instanceof IMessage) {\n IMessage cm = (IMessage) value;\n label = cm.getMessage();\n if (LangUtil.isEmpty(label)) {\n label = cm.getMessage().toString();\n }\n kind = cm.getKind();\n Throwable thrown = cm.getThrown();\n if (null != thrown) {\n detail = LangUtil.renderException(thrown);\n }\n } else if (null != value) {\n label = value.toString();\n }\n setText(label);\n if (kind.equals(IMessage.WARNING)) {\n setIcon(AjdeUIManager.getDefault().getIconRegistry().getWarningIcon());\n } else if (IMessage.ERROR.isSameOrLessThan(kind)) {\n setIcon(AjdeUIManager.getDefault().getIconRegistry().getErrorIcon());\n } else {\n setIcon(null);\n }\n if (isSelected) {\n setBackground(list.getSelectionBackground());\n setForeground(list.getSelectionForeground());\n } else {\n setBackground(list.getBackground());\n setForeground(list.getForeground());\n }\n setEnabled(list.isEnabled());\n setFont(list.getFont());\n setOpaque(true);\n if (null != detail) {\n setToolTipText(detail);\n }\n return this;\n}\n"
"private void deleteEntry(SessionContext context, DeleteParams args) throws SVNException, IOException {\n final EntryUpdater parent = getParent(args.parentToken);\n final int rev = args.rev.length > 0 ? args.rev[0] : -1;\n log.info(\"String_Node_Str\", args.name, rev);\n final VcsFile entry = parent.getEntry(StringHelper.baseName(args.name));\n if (parent.head && (rev >= 0) && (parent.source != null)) {\n checkUpToDate(entry, rev, true);\n }\n parent.changes.add(treeBuilder -> treeBuilder.delete(entry.getFileName()));\n}\n"
"public Element createUnownedElement(Node parent, XMLField xmlField) {\n XPathFragment lastFragment = xmlField.getXPathFragment();\n while (lastFragment.getNextFragment() != null) {\n lastFragment = lastFragment.getNextFragment();\n }\n String nodeName = lastFragment.getShortName();\n String namespace = resolveNamespacePrefix(lastFragment, getNamespaceResolverForField(xmlField));\n NamespaceResolver domResolver = new NamespaceResolver();\n domResolver.setDOM(parent);\n String existingPrefix = domResolver.resolveNamespaceURI(namespace);\n String elementName = lastFragment.getShortName();\n if (existingPrefix != null) {\n if (existingPrefix.length() > 0) {\n elementName = existingPrefix + \"String_Node_Str\" + lastFragment.getLocalName();\n } else {\n elementName = lastFragment.getLocalName();\n }\n }\n Element elem = parent.getOwnerDocument().createElementNS(namespace, elementName);\n if (lastFragment.isGeneratedPrefix() && existingPrefix == null) {\n elem.setAttributeNS(XMLConstants.XMLNS_URL, XMLConstants.XMLNS + XMLConstants.COLON + lastFragment.getPrefix(), lastFragment.getNamespaceURI());\n }\n return elem;\n}\n"
"public void readFromNBT(NBTTagCompound nbt, MappingRegistry registry) {\n block = registry.getBlockForId(nbt.getInteger(\"String_Node_Str\"));\n meta = nbt.getInteger(\"String_Node_Str\");\n if (nbt.hasKey(\"String_Node_Str\")) {\n NBTTagList rq = nbt.getTagList(\"String_Node_Str\", Constants.NBT.TAG_COMPOUND);\n ArrayList<ItemStack> rqs = new ArrayList<ItemStack>();\n for (int i = 0; i < rq.tagCount(); ++i) {\n try {\n NBTTagCompound sub = rq.getCompoundTagAt(i);\n if (sub.getInteger(\"String_Node_Str\") >= 0) {\n registry.stackToWorld(sub);\n rqs.add(ItemStack.loadItemStackFromNBT(sub));\n } else {\n defaultPermission = BuildingPermission.CREATIVE_ONLY;\n }\n } catch (Throwable t) {\n t.printStackTrace();\n defaultPermission = BuildingPermission.CREATIVE_ONLY;\n }\n }\n storedRequirements = rqs.toArray(new ItemStack[rqs.size()]);\n } else {\n storedRequirements = new ItemStack[0];\n }\n}\n"
"private void enteringServletContainer(Request req, Response res) {\n if (interceptors == null)\n return;\n for (ServletContainerInterceptor interceptor : interceptors) {\n try {\n interceptor.preInvoke(req, res);\n } catch (Throwable th) {\n log.log(Level.SEVERE, INTERNAL_ERROR, th);\n }\n }\n}\n"
"public static void handleJSONException(JSONException e) throws ApiException {\n if (App.DEBUG) {\n Log.e(TAG, e.getMessage());\n }\n throw new ApiException(ERROR_JSON_EXCEPTION, e.getMessage(), e.getCause());\n}\n"
"public void info(Object arg0, Throwable arg1) {\n if (logLevel <= LOG_INFO)\n log.info(prefix + arg0, arg1);\n}\n"
"public boolean checkFlight(Player player, Distance distance) {\n if (distance.getYDifference() > 400) {\n return false;\n }\n double y1 = distance.fromY();\n double y2 = distance.toY();\n Block block = player.getLocation().getBlock().getRelative(BlockFace.DOWN);\n if (y1 == y2 && !isMovingExempt(player) && !player.isInsideVehicle() && player.getFallDistance() == 0 && !Utilities.isOnLilyPad(player)) {\n String name = player.getName();\n if (Utilities.cantStandAt(block) && !Utilities.isOnLilyPad(player) && Utilities.cantStandAt(player.getLocation().getBlock()) && !Utilities.isInWater(player)) {\n int violation = 1;\n if (!flightViolation.containsKey(name)) {\n flightViolation.put(name, violation);\n } else {\n violation = flightViolation.get(name) + 1;\n flightViolation.put(name, violation);\n }\n if (violation >= FLIGHT_LIMIT) {\n flightViolation.put(name, 1);\n return true;\n }\n if (flightViolation.containsKey(name) && flightViolation.get(name) > 0) {\n for (int i = FLY_LOOP; i > 0; i--) {\n Location newLocation = new Location(player.getWorld(), player.getLocation().getX(), player.getLocation().getY() - i, player.getLocation().getZ());\n Block lower = newLocation.getBlock();\n if (lower.getTypeId() == 0) {\n player.teleport(newLocation);\n break;\n }\n }\n }\n }\n }\n return false;\n}\n"
"public void visitNode(Tree tree) {\n if (tree.is(Kind.SCRIPT)) {\n checks.forEach(seCheck -> seCheck.cleanupAndStartFileAnalysis((ScriptTree) tree));\n return;\n }\n FunctionTree functionTree = (FunctionTree) tree;\n if (functionTree.body().is(Kind.BLOCK)) {\n ControlFlowGraph cfg = ControlFlowGraph.build((BlockTree) functionTree.body());\n Scope functionScope = getContext().getSymbolModel().getScope(functionTree);\n new SymbolicExecution(functionScope, cfg, checks).visitCfg(ProgramState.emptyState());\n }\n}\n"
"public void onStop() {\n for (Thread t : _threadList) {\n if (t.isAlive())\n t.interrupt();\n }\n}\n"
"public static Rectangle2D bounds(Rectangle2D... rs) {\n Rectangle2D bounds = rs[0].getBounds2D();\n for (Rectangle2D r : rs) {\n if (r != null) {\n add(bounds, r);\n }\n }\n return bounds;\n}\n"
"public static int getTableVersion(String tablename) throws IOFailure {\n Connection c = DBConnect.getDBConnection();\n PreparedStatement s = null;\n int version = 0;\n try {\n s = c.prepareStatement(\"String_Node_Str\" + \"String_Node_Str\");\n s.setString(1, tablename);\n ResultSet res = s.executeQuery();\n if (!res.next()) {\n log.warn(\"String_Node_Str\" + tablename + \"String_Node_Str\");\n } else {\n version = res.getInt(1);\n if (res.wasNull()) {\n log.warn(\"String_Node_Str\" + tablename + \"String_Node_Str\");\n }\n }\n return version;\n } catch (SQLException e) {\n String msg = \"String_Node_Str\" + tablename + \"String_Node_Str\" + ExceptionUtils.getSQLExceptionCause(e);\n log.warn(msg, e);\n throw new IOFailure(msg, e);\n } finally {\n DBUtils.closeStatementIfOpen(s);\n }\n}\n"
"private boolean sameDriverForJDBC(Node node, Connection repositoryConnection, List<Map<String, Object>> oldList, Object objectValue) {\n boolean sameValues = true;\n List objectList = (List) objectValue;\n if (oldList.size() != objectList.size()) {\n sameValues = false;\n } else {\n if (isOldJDBC(node, repositoryConnection)) {\n nodeParamDriverKey = \"String_Node_Str\";\n } else {\n for (int i = 0; i < oldList.size(); i++) {\n Map<String, Object> oldMap = oldList.get(i);\n Map<String, Object> objectMap = (Map<String, Object>) objectList.get(i);\n if (oldMap.get(\"String_Node_Str\").equals(objectMap.get(\"String_Node_Str\"))) {\n sameValues = true;\n } else {\n sameValues = false;\n break;\n }\n }\n }\n }\n return sameValues;\n}\n"
"public void setShowPastItems(boolean enable) {\n PickerSpinnerAdapter adapter = (PickerSpinnerAdapter) getAdapter();\n if (enable && !showPastItems) {\n final Resources res = getResources();\n final Calendar date = Calendar.getInstance();\n date.add(Calendar.DAY_OF_YEAR, -1);\n insertAdapterItem(new DateItem(res.getString(R.string.date_yesterday), date), 0);\n date.add(Calendar.DAY_OF_YEAR, -6);\n adapter.insert(new DateItem(getWeekDay(date.get(Calendar.DAY_OF_WEEK), R.string.date_last_weekday), date), 0);\n setSelection(getSelectedItemPosition() + 2);\n } else if (!enable && showPastItems) {\n int selection = getSelectedItemPosition();\n if (selection >= 2)\n setSelection(selection - 2);\n else\n setSelection(0);\n adapter.remove(adapter.getItem(0));\n adapter.remove(adapter.getItem(0));\n }\n if (enable != showPastItems) {\n adapter.notifyDataSetChanged();\n showPastItems = enable;\n }\n}\n"
"public boolean isInFactory() {\n return factoryMode;\n}\n"
"public void run() {\n try {\n if (sApplication != null) {\n return;\n }\n sApplication = getSystemApp();\n } catch (Throwable e) {\n e.printStackTrace();\n } finally {\n synchronized (LOCK) {\n LOCK.notifyAll();\n }\n }\n}\n"
"private void learnPosOnly() {\n resultQueries.clear();\n resultTrees.clear();\n if (logger.isDebugEnabled()) {\n logger.debug(\"String_Node_Str\");\n }\n Monitor monitor = MonitorFactory.getTimeMonitor(\"String_Node_Str\");\n monitor.start();\n lgg = lggGenerator.getLGG(posQueryTrees);\n monitor.stop();\n newPosExample = null;\n if (logger.isDebugEnabled()) {\n logger.debug(\"String_Node_Str\");\n logger.debug(lgg.getStringRepresentation());\n logger.debug(\"String_Node_Str\" + monitor.getTotal() + \"String_Node_Str\");\n }\n resultQueries.add(lgg.toSPARQLQueryString(true));\n resultTrees.add(lgg);\n}\n"
"private static List<FnMatch> concretiseInputs(Context context, FunctionCall fc, boolean resolveOverload) throws UserException {\n List<Type> argTypes = new ArrayList<Type>(fc.args().size());\n for (SwiftAST arg : fc.args()) {\n argTypes.add(TypeChecker.findExprType(context, arg));\n }\n FnCallInfo info = new FnCallInfo(fc.originalName(), fc.overloads(), argTypes);\n return concretiseInputsOverloaded(context, info);\n}\n"
"private boolean createInstanceAndStartDependency(Application application) throws TopologyInConsistentException, PolicyValidationException {\n boolean initialStartup = true;\n List<String> instanceIds = new ArrayList<String>();\n String instanceId;\n ApplicationPolicy applicationPolicy = PolicyManager.getInstance().getApplicationPolicy(application.getApplicationPolicyId());\n if (applicationPolicy == null) {\n String msg = String.format(\"String_Node_Str\" + \"String_Node_Str\", appId);\n log.error(msg);\n throw new RuntimeException(msg);\n }\n NetworkPartitionAlgorithmContext algorithmContext = AutoscalerContext.getInstance().getNetworkPartitionAlgorithmContext(appId);\n if (algorithmContext == null) {\n String msg = String.format(\"String_Node_Str\", appId);\n log.error(msg);\n throw new RuntimeException(msg);\n }\n String networkPartitionAlgorithmName = applicationPolicy.getAlgorithm();\n if (log.isDebugEnabled()) {\n String msg = String.format(\"String_Node_Str\", networkPartitionAlgorithmName, appId);\n log.debug(msg);\n }\n NetworkPartitionAlgorithm algorithm = getNetworkPartitionAlgorithm(networkPartitionAlgorithmName);\n if (algorithm == null) {\n String msg = String.format(\"String_Node_Str\", appId);\n log.error(msg);\n throw new RuntimeException(msg);\n }\n List<String> nextNetworkPartitions = algorithm.getNextNetworkPartitions(algorithmContext);\n if (nextNetworkPartitions == null || nextNetworkPartitions.isEmpty()) {\n String msg = String.format(\"String_Node_Str\", appId);\n log.warn(msg);\n return false;\n }\n for (String networkPartitionIds : nextNetworkPartitions) {\n ApplicationLevelNetworkPartitionContext context = new ApplicationLevelNetworkPartitionContext(networkPartitionIds);\n ApplicationInstance appInstance = (ApplicationInstance) application.getInstanceByNetworkPartitionId(context.getId());\n if (appInstance != null) {\n instanceId = handleApplicationInstanceCreation(application, context, appInstance);\n initialStartup = false;\n } else {\n instanceId = handleApplicationInstanceCreation(application, context, null);\n }\n instanceIds.add(instanceId);\n log.info(\"String_Node_Str\" + networkPartitionIds + \"String_Node_Str\" + instanceId);\n }\n startDependency(application, instanceIds);\n return initialStartup;\n}\n"