content stringlengths 40 137k |
|---|
"public void testGetItem() {\n try {\n handler.getItem(2003, ItemData.CONSUME_ON_FULL);\n } catch (RequestException ex) {\n System.out.println(\"String_Node_Str\");\n ex.printStackTrace();\n }\n}\n"
|
"protected static PartRevisionKey getPartRevisionKey(Map<String, Object> source) {\n return new PartRevisionKey(extractValue(source, WORKSPACE_ID_KEY), extractValue(source, PART_NUMBER_KEY), extractValue(source, VERSION_KEY));\n}\n"
|
"public void insert(K key, V value) {\n if (value == null)\n treeList.tree.put(key, nullValue);\n else\n treeList.tree.put(key, value);\n}\n"
|
"public boolean delete(Profile profile) throws PersistenceException {\n LOGGER.debug(\"String_Node_Str\" + profile);\n if (profile == null)\n throw new IllegalArgumentException(\"String_Node_Str\");\n ResultSet rs;\n String sqlString;\n PreparedStatement stmt = null;\n try {\n stmt = this.con.prepareStatement(sqlString);\n stmt.setInt(1, profile.getId());\n stmt.executeUpdate();\n ResultSet rs = stmt.getResultSet();\n if (rs.next()) {\n return true;\n } else {\n return false;\n }\n } catch (SQLException e) {\n throw new PersistenceException(\"String_Node_Str\" + e);\n } finally {\n try {\n if (stmt != null)\n stmt.close();\n } catch (SQLException e) {\n throw new PersistenceException(\"String_Node_Str\" + e);\n }\n }\n}\n"
|
"protected List<PermissionGroup> getWorldParents(String worldName) {\n List<PermissionGroup> groups = new LinkedList<>();\n for (String groupName : getData().getParents(worldName)) {\n if (groupName == null || groupName.trim().isEmpty() || (this instanceof PermissionGroup && groupName.equalsIgnoreCase(this.getIdentifier()))) {\n continue;\n }\n PermissionGroup group = this.manager.getGroup(groupName);\n if (!groups.contains(group)) {\n groups.add(group);\n }\n }\n Collections.sort(groups);\n return Collections.unmodifiableList(groups);\n}\n"
|
"protected TreeContext generate(Reader source) throws IOException {\n XMLInputFactory fact = XMLInputFactory.newInstance();\n TreeContext context = new TreeContext();\n try {\n ArrayDeque<ITree> trees = new ArrayDeque<>();\n XMLEventReader r = fact.createXMLEventReader(source);\n while (r.hasNext()) {\n XMLEvent e = r.nextEvent();\n if (e instanceof StartElement) {\n StartElement s = (StartElement) e;\n if (!s.getName().getLocalPart().equals(\"String_Node_Str\"))\n continue;\n int type = Integer.parseInt(s.getAttributeByName(TYPE).getValue());\n ITree t = context.createTree(type, labelForAttribute(s, LABEL), labelForAttribute(s, TYPE_LABEL));\n Iterator<?> it = s.getAttributes();\n while (it.hasNext()) {\n Attribute a = (Attribute) it.next();\n unserializers.load(t, a.getName().getLocalPart(), a.getValue());\n }\n if (trees.isEmpty())\n context.setRoot(t);\n else\n t.setParentAndUpdateChildren(trees.peek());\n trees.push(t);\n } else if (e instanceof EndElement) {\n if (!((EndElement) e).getName().getLocalPart().equals(\"String_Node_Str\"))\n continue;\n trees.pop();\n }\n }\n context.validate();\n return context;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n}\n"
|
"public boolean equals(Object obj) {\n if (this == obj) {\n return true;\n if (obj == null)\n return false;\n if (getClass() != obj.getClass())\n return false;\n RangeConstraint other = (RangeConstraint) obj;\n if (after == null) {\n if (other.after != null)\n return false;\n } else if (!after.equals(other.after))\n return false;\n if (before == null) {\n if (other.before != null)\n return false;\n } else if (!before.equals(other.before))\n return false;\n return true;\n}\n"
|
"public boolean performFinish() {\n closeOpenEditors();\n if (zipBtn.getSelection()) {\n zipfile = zip.getText().getText();\n try {\n ZipToFile.unZipFile(getZipFilePath(), importFolder);\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n }\n }\n if (folderBtn.getSelection()) {\n importFolder = folder.getText().getText();\n }\n final TreeObject[] objs = treeViewer.getCheckNodes();\n UIJob job = new UIJob(\"String_Node_Str\") {\n public IStatus runInUIThread(IProgressMonitor monitor) {\n try {\n doImport(objs, monitor);\n port.initMDM(null);\n return Status.OK_STATUS;\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n return Status.CANCEL_STATUS;\n } finally {\n new UIJob(\"String_Node_Str\") {\n public IStatus runInUIThread(IProgressMonitor monitor) {\n new ServerRefreshAction(view, serverRoot).run();\n return Status.OK_STATUS;\n }\n }.schedule();\n if (zipfile != null) {\n importFolder = System.getProperty(\"String_Node_Str\") + \"String_Node_Str\";\n ZipToFile.deleteDirectory(new File(importFolder));\n }\n }\n }\n };\n job.setPriority(Job.INTERACTIVE);\n job.schedule();\n return true;\n}\n"
|
"public void mouseUp(MouseEvent e) {\n txtClassifyOutput.setText(\"String_Node_Str\");\n FileDialog fd = new FileDialog(shell, SWT.SAVE);\n fd.open();\n String oFile = fd.getFileName();\n String dir = fd.getFilterPath();\n txtClassifyOutput.setText(dir + System.getProperty(\"String_Node_Str\") + oFile);\n}\n"
|
"public void onStart() {\n super.onStart();\n mDrawerListView.setOnItemClickListener(this);\n int position = -1;\n if (mDrawerListItems.size() > 0) {\n if (!mDrawerListItems.get(0).isGroupTitle()) {\n mDrawerListView.setItemChecked(0, true);\n position = 0;\n } else {\n mDrawerListView.setItemChecked(1, true);\n position = 1;\n }\n }\n if (mDrawerItemSelectedPosition >= 0) {\n position = mDrawerItemSelectedPosition;\n }\n if (getIntent().getAction() != null && !getIntent().getAction().toString().equalsIgnoreCase(\"String_Node_Str\")) {\n if (getIntent().getAction().toString().equalsIgnoreCase(\"String_Node_Str\")) {\n startActivity(new Intent(context, MessageComposeActivty.class));\n }\n if (getIntent().getAction().toString().equalsIgnoreCase(\"String_Node_Str\")) {\n startActivity(new Intent(context, ComposeNoteActivity.class));\n }\n } else {\n if (position > 0) {\n if (position != mDrawerItemSelectedPosition) {\n loadFragment(mDrawerListItems.get(position));\n }\n }\n }\n}\n"
|
"public Set<Description> refine(Description description, int maxLength, List<Description> knownRefinements, Description currDomain) {\n if (!(currDomain instanceof Thing) && !topARefinementsLength.containsKey(currDomain))\n topARefinementsLength.put((NamedClass) currDomain, 0);\n Set<Description> refinements = new TreeSet<Description>(conceptComparator);\n Set<Description> tmp = new HashSet<Description>();\n if (description instanceof Thing) {\n if (currDomain instanceof Thing) {\n if (maxLength > topRefinementsLength)\n computeTopRefinements(maxLength);\n refinements = (TreeSet<Description>) topRefinementsCumulative.get(maxLength).clone();\n } else {\n if (maxLength > topARefinementsLength.get(currDomain))\n computeTopRefinements(maxLength, (NamedClass) currDomain);\n refinements = (TreeSet<Description>) topARefinementsCumulative.get(currDomain).get(maxLength).clone();\n }\n } else if (description instanceof Nothing) {\n } else if (description instanceof NamedClass) {\n refinements.addAll(subHierarchy.getMoreSpecialConcepts(description));\n refinements.remove(new Nothing());\n } else if (description instanceof Negation && description.getChild(0) instanceof NamedClass) {\n tmp = rs.getMoreGeneralConcepts(description.getChild(0));\n for (Description c : tmp) {\n if (!(c instanceof Thing))\n refinements.add(new Negation(c));\n }\n } else if (description instanceof Intersection) {\n for (Description child : description.getChildren()) {\n tmp = refine(child, maxLength - description.getLength() + child.getLength(), null, currDomain);\n for (Description c : tmp) {\n List<Description> newChildren = (List<Description>) ((LinkedList) description.getChildren()).clone();\n newChildren.add(c);\n newChildren.remove(child);\n Intersection mc = new Intersection(newChildren);\n ConceptTransformation.cleanConceptNonRecursive(mc);\n ConceptTransformation.transformToOrderedNegationNormalFormNonRecursive(mc, conceptComparator);\n }\n }\n } else if (description instanceof Union) {\n for (Description child : description.getChildren()) {\n tmp = refine(child, maxLength - description.getLength() + child.getLength(), null, currDomain);\n for (Description c : tmp) {\n List<Description> newChildren = new LinkedList<Description>(description.getChildren());\n newChildren.remove(child);\n newChildren.add(c);\n Union md = new Union(newChildren);\n ConceptTransformation.transformToOrderedNegationNormalFormNonRecursive(md, conceptComparator);\n refinements.add(md);\n }\n }\n } else if (description instanceof ObjectSomeRestriction) {\n ObjectPropertyExpression role = ((ObjectQuantorRestriction) description).getRole();\n Description range = opRanges.get(role);\n tmp = refine(description.getChild(0), maxLength - 2, null, range);\n for (Description c : tmp) refinements.add(new ObjectSomeRestriction(((ObjectQuantorRestriction) description).getRole(), c));\n ObjectProperty ar = (ObjectProperty) role;\n Set<ObjectProperty> moreSpecialRoles = rs.getMoreSpecialRoles(ar);\n for (ObjectProperty moreSpecialRole : moreSpecialRoles) refinements.add(new ObjectSomeRestriction(moreSpecialRole, description.getChild(0)));\n } else if (description instanceof ObjectAllRestriction) {\n ObjectPropertyExpression role = ((ObjectQuantorRestriction) description).getRole();\n Description range = opRanges.get(role);\n tmp = refine(description.getChild(0), maxLength - 2, null, range);\n for (Description c : tmp) {\n refinements.add(new ObjectAllRestriction(((ObjectQuantorRestriction) description).getRole(), c));\n }\n if (description.getChild(0) instanceof NamedClass && tmp.size() == 0) {\n refinements.add(new ObjectAllRestriction(((ObjectQuantorRestriction) description).getRole(), new Nothing()));\n }\n ObjectProperty ar = (ObjectProperty) role;\n Set<ObjectProperty> moreSpecialRoles = rs.getMoreSpecialRoles(ar);\n for (ObjectProperty moreSpecialRole : moreSpecialRoles) {\n refinements.add(new ObjectAllRestriction(moreSpecialRole, description.getChild(0)));\n }\n }\n if (!(description instanceof Thing) && !(description instanceof Nothing) && !(description instanceof ObjectAllRestriction && description.getChild(0) instanceof Nothing)) {\n int topRefLength = maxLength - description.getLength() - 1;\n if (currDomain instanceof Thing) {\n if (topRefLength > topRefinementsLength)\n computeTopRefinements(topRefLength);\n } else if (topRefLength > topARefinementsLength.get(currDomain))\n computeTopRefinements(topRefLength, (NamedClass) currDomain);\n if (topRefLength > 0) {\n Set<Description> topRefs;\n if (currDomain instanceof Thing)\n topRefs = topRefinementsCumulative.get(topRefLength);\n else\n topRefs = topARefinementsCumulative.get(currDomain).get(topRefLength);\n for (Description c : topRefs) {\n boolean skip = false;\n if (applyAllFilter) {\n if (c instanceof ObjectAllRestriction) {\n for (Description child : description.getChildren()) {\n if (child instanceof ObjectAllRestriction) {\n ObjectPropertyExpression r1 = ((ObjectAllRestriction) c).getRole();\n ObjectPropertyExpression r2 = ((ObjectAllRestriction) child).getRole();\n if (r1.toString().equals(r2.toString()))\n skip = true;\n }\n }\n }\n }\n if (disjointChecks && c instanceof NamedClass && description instanceof NamedClass && isDisjoint(description, c)) {\n skip = true;\n if (!skip) {\n Intersection mc = new Intersection();\n mc.addChild(description);\n mc.addChild(c);\n ConceptTransformation.cleanConceptNonRecursive(mc);\n ConceptTransformation.transformToOrderedNegationNormalFormNonRecursive(mc, conceptComparator);\n refinements.add(mc);\n }\n }\n }\n }\n return refinements;\n}\n"
|
"public void gotSource(String streamId, Node source) {\n synchronized (this) {\n if (!wantSources.contains(streamId))\n return;\n }\n if (source.getId().equals(mina.getMyNodeId().toString()))\n return;\n ControlConnection cc = mina.getCCM().getCCWithId(source.getId());\n if (cc != null && cc.getLCPair(streamId) != null)\n return;\n if (mina.getBadNodeList().checkBadNode(source.getId())) {\n log.debug(\"String_Node_Str\" + source.getId());\n return;\n }\n if (mina.getNetMgr().canConnectTo(source)) {\n cacheSourceInitially(source, streamId);\n if (log.isDebugEnabled())\n log.debug(\"String_Node_Str\" + source.getId() + \"String_Node_Str\" + streamId);\n if (mina.getBidStrategy().tolerateDelay(streamId)) {\n ReqSourceStatusBatcher rssb;\n synchronized (this) {\n if (rssBatchers.containsKey(source.getId()))\n rssb = rssBatchers.get(source.getId());\n else {\n rssb = new ReqSourceStatusBatcher(source);\n rssBatchers.put(source.getId(), rssb);\n }\n }\n rssb.add(streamId);\n } else {\n ReqSourceStatus.Builder rssb = ReqSourceStatus.newBuilder();\n rssb.addStreamId(streamId);\n sendReqSourceStatus(source, rssb);\n }\n queryStatus(sd, mina.getBidStrategy().tolerateDelay(streamId));\n } else {\n if (source.getEndPointCount() > 0) {\n log.debug(\"String_Node_Str\" + source.getId() + \"String_Node_Str\");\n synchronized (this) {\n if (!unreachableSources.containsKey(streamId))\n unreachableSources.put(streamId, new HashSet<Node>());\n unreachableSources.get(streamId).add(source);\n }\n }\n }\n}\n"
|
"public void testLocateWithAction() throws Exception {\n useMethod(\"String_Node_Str\");\n assertEquals(\"String_Node_Str\", locate(event(\"String_Node_Str\", \"String_Node_Str\")).getNavigationCase().to());\n assertEquals(\"String_Node_Str\", locate(event(\"String_Node_Str\", \"String_Node_Str\")).getNavigationCase().to());\n assertNull(locate(event(\"String_Node_Str\", \"String_Node_Str\")));\n assertEquals(\"String_Node_Str\", locate(event(\"String_Node_Str\", \"String_Node_Str\")).getNavigationCase().to());\n assertEquals(\"String_Node_Str\", locate(event(\"String_Node_Str\", \"String_Node_Str\")).getNavigationCase().to());\n assertNull(locate(event(\"String_Node_Str\", \"String_Node_Str\")));\n assertEquals(\"String_Node_Str\", locate(event(\"String_Node_Str\", \"String_Node_Str\")).getNavigationCase().to());\n assertEquals(\"String_Node_Str\", locate(event(\"String_Node_Str\", \"String_Node_Str\")).getNavigationCase().to());\n assertNull(locate(event(\"String_Node_Str\", \"String_Node_Str\")));\n}\n"
|
"protected void addDependencies(Model model) {\n Set<ModuleNeeded> runningModules = getDependenciesModules();\n if (runningModules != null) {\n List<Dependency> existedDependencies = model.getDependencies();\n if (existedDependencies == null) {\n existedDependencies = new ArrayList<Dependency>();\n model.setDependencies(existedDependencies);\n }\n for (ModuleNeeded module : runningModules) {\n Dependency dependency = null;\n if (module.getDeployStatus() == ELibraryInstallStatus.DEPLOYED) {\n dependency = PomUtil.createModuleDependency(module.getMavenUri(true));\n }\n if (dependency != null) {\n existedDependencies.add(dependency);\n }\n }\n }\n}\n"
|
"private boolean dropVarsEntryIsValid(TableItem tableItemTarget) {\n Table table = tableItemTarget.getParent();\n TableItem[] tableItems = table.getItems();\n for (TableItem tableItem : tableItems) {\n if (tableItemTarget == tableItem) {\n break;\n }\n if (tableItemSource == tableItems[i]) {\n return true;\n }\n }\n return false;\n}\n"
|
"private void processInsn(int opcode) {\n switch(opcode) {\n case DUP:\n {\n this.ensureStack(this.stackIndex + 2);\n this.stack[this.stackIndex + 1] = this.stack[this.stackIndex];\n this.stackIndex++;\n return;\n }\n case DUP_X1:\n {\n this.ensureStack(this.stackIndex + 2);\n this.stack[this.stackIndex + 1] = this.stack[this.stackIndex - 1];\n this.stackIndex++;\n return;\n }\n case DUP_X2:\n {\n this.ensureStack(this.stackIndex + 2);\n this.stack[this.stackIndex + 1] = this.stack[this.stackIndex - 2];\n this.stackIndex++;\n return;\n }\n case DUP2:\n {\n this.ensureStack(this.stackIndex + 3);\n this.stack[this.stackIndex + 1] = this.stack[this.stackIndex - 1];\n this.stack[this.stackIndex + 2] = this.stack[this.stackIndex];\n this.stackIndex += 2;\n return;\n }\n case DUP2_X1:\n {\n this.ensureStack(this.stackIndex + 3);\n this.stack[this.stackIndex + 1] = this.stack[this.stackIndex - 2];\n this.stack[this.stackIndex + 2] = this.stack[this.stackIndex - 1];\n this.stackIndex += 2;\n return;\n }\n case DUP2_X2:\n {\n this.ensureStack(this.stackIndex + 3);\n this.stack[this.stackIndex + 1] = this.stack[this.stackIndex - 3];\n this.stack[this.stackIndex + 2] = this.stack[this.stackIndex - 2];\n this.stackIndex += 2;\n return;\n }\n case SWAP:\n {\n Object o = this.stack[this.stackIndex];\n this.stack[this.stackIndex] = this.stack[this.stackIndex - 1];\n this.stack[this.stackIndex - 1] = o;\n return;\n }\n case POP:\n this.pop();\n return;\n case ACONST_NULL:\n this.push(NULL);\n return;\n case ARRAYLENGTH:\n this.set(INTEGER);\n return;\n case RETURN:\n this.hasReturn = true;\n return;\n case BALOAD:\n case SALOAD:\n case CALOAD:\n case IALOAD:\n this.pop();\n this.pop();\n this.push(INTEGER);\n break;\n case LALOAD:\n this.pop();\n this.pop();\n this.push(LONG);\n break;\n case FALOAD:\n this.pop();\n this.pop();\n this.push(FLOAT);\n break;\n case DALOAD:\n this.pop();\n this.pop();\n this.push(DOUBLE);\n break;\n case AALOAD:\n this.pop();\n this.pop();\n this.push(TOP);\n case IADD:\n case ISUB:\n case IMUL:\n case IDIV:\n case IREM:\n case ISHL:\n case ISHR:\n case IUSHR:\n this.pop();\n this.pop();\n this.push(INTEGER);\n return;\n case LADD:\n case LSUB:\n case LMUL:\n case LDIV:\n case LREM:\n case LSHL:\n case LSHR:\n case LUSHR:\n this.pop();\n this.pop();\n this.push(LONG);\n return;\n case FADD:\n case FSUB:\n case FMUL:\n case FDIV:\n case FREM:\n this.pop();\n this.pop();\n this.push(FLOAT);\n return;\n case DADD:\n case DSUB:\n case DMUL:\n case DDIV:\n case DREM:\n this.pop();\n this.pop();\n this.push(DOUBLE);\n return;\n case L2I:\n case F2I:\n case D2I:\n this.set(INTEGER);\n case I2L:\n case F2L:\n case D2L:\n this.set(LONG);\n return;\n case I2F:\n case L2F:\n case D2F:\n this.set(FLOAT);\n return;\n case LCMP:\n case FCMPL:\n case FCMPG:\n case DCMPL:\n case DCMPG:\n this.pop();\n this.pop();\n this.push(INTEGER);\n return;\n }\n}\n"
|
"protected String getRuleName(AbstractElement element) {\n if (nameMappings == null) {\n nameMappings = new HashMap<AbstractElement, String>() {\n private static final long serialVersionUID = 1L;\n {\n put(grammarAccess.getKClassModelAccess().getAlternatives_1_1(), \"String_Node_Str\");\n put(grammarAccess.getKTypeAccess().getAlternatives(), \"String_Node_Str\");\n put(grammarAccess.getKClassAccess().getAlternatives_3(), \"String_Node_Str\");\n put(grammarAccess.getKInterfaceAccess().getAlternatives_3(), \"String_Node_Str\");\n put(grammarAccess.getKEnumAccess().getAlternatives_3(), \"String_Node_Str\");\n put(grammarAccess.getTypeSignatureAccess().getAlternatives_1_1(), \"String_Node_Str\");\n put(grammarAccess.getPropertyValueAccess().getAlternatives(), \"String_Node_Str\");\n put(grammarAccess.getFloatAccess().getAlternatives(), \"String_Node_Str\");\n put(grammarAccess.getKTypeSelectionAccess().getGroup(), \"String_Node_Str\");\n put(grammarAccess.getKTypeSelectionAccess().getGroup_1(), \"String_Node_Str\");\n put(grammarAccess.getKTypeSelectionAccess().getGroup_1_1_0(), \"String_Node_Str\");\n put(grammarAccess.getKTypeSelectionAccess().getGroup_1_1_1(), \"String_Node_Str\");\n put(grammarAccess.getKTypeAccess().getGroup(), \"String_Node_Str\");\n put(grammarAccess.getKMethodAccess().getGroup(), \"String_Node_Str\");\n put(grammarAccess.getKMethodAccess().getGroup_2(), \"String_Node_Str\");\n put(grammarAccess.getKMethodAccess().getGroup_2_1(), \"String_Node_Str\");\n put(grammarAccess.getKParameterTypeSignatureAccess().getGroup(), \"String_Node_Str\");\n put(grammarAccess.getQualifiedIDAccess().getGroup(), \"String_Node_Str\");\n put(grammarAccess.getQualifiedIDAccess().getGroup_1(), \"String_Node_Str\");\n put(grammarAccess.getTypeSignatureAccess().getGroup(), \"String_Node_Str\");\n put(grammarAccess.getTypeSignatureAccess().getGroup_1(), \"String_Node_Str\");\n put(grammarAccess.getKTypeSelectionAccess().getJavaProjectsAssignment_1_1_0_1(), \"String_Node_Str\");\n put(grammarAccess.getKTypeSelectionAccess().getBundlesAssignment_1_1_1_1(), \"String_Node_Str\");\n put(grammarAccess.getKTypeSelectionAccess().getTypesAssignment_2(), \"String_Node_Str\");\n put(grammarAccess.getKTypeAccess().getQualifiedNameAssignment_1(), \"String_Node_Str\");\n put(grammarAccess.getKTypeAccess().getFieldsAssignment_3_0(), \"String_Node_Str\");\n put(grammarAccess.getKTypeAccess().getMethodsAssignment_3_1(), \"String_Node_Str\");\n put(grammarAccess.getKFieldAccess().getNameAssignment(), \"String_Node_Str\");\n put(grammarAccess.getKMethodAccess().getNameAssignment_0(), \"String_Node_Str\");\n put(grammarAccess.getKMethodAccess().getParameterTypeSignaturesAssignment_2_0(), \"String_Node_Str\");\n put(grammarAccess.getKMethodAccess().getParameterTypeSignaturesAssignment_2_1_1(), \"String_Node_Str\");\n put(grammarAccess.getKParameterTypeSignatureAccess().getNameAssignment_1(), \"String_Node_Str\");\n }\n };\n }\n return nameMappings.get(element);\n}\n"
|
"public void actionPerformed(ActionEvent e) {\n if (e.getID() == 0) {\n try {\n subConfig.setProperty(FolderWatchConstants.CONFIG_KEY_ENABLED, toggleAction.isSelected());\n subConfig.save();\n } catch (Exception ex) {\n JDLogger.exception(ex);\n }\n startWatching(toggleAction.isSelected());\n } else if (e.getID() == 1) {\n if (showGuiAction.isSelected())\n showGui();\n else\n view.close();\n }\n}\n"
|
"public IMessage onMessage(PacketGetTransmitters message, MessageContext ctx) {\n FMLCommonHandler.instance().getWorldThread(ctx.netHandler).addScheduledTask(() -> handle(message, ctx));\n return null;\n}\n"
|
"public String postUpload(String uuid, String filename) {\n UploadEntity uploadEntity = uploadEntityStateMap.get(uuid);\n int installTimeoutPerGig = 180 * 60 * 1000;\n String resourcePath = uploadEntity.getInstallPathPrefix();\n String finalResourcePath = uploadEntity.getTmpltPath();\n UploadEntity.ResourceType resourceType = uploadEntity.getResourceType();\n String fileSavedTempLocation = uploadEntity.getInstallPathPrefix() + \"String_Node_Str\" + filename;\n String uploadedFileExtension = FilenameUtils.getExtension(filename);\n String userSelectedFormat = uploadEntity.getFormat().toString();\n if (uploadedFileExtension.equals(\"String_Node_Str\") || uploadedFileExtension.equals(\"String_Node_Str\") || uploadedFileExtension.equals(\"String_Node_Str\")) {\n userSelectedFormat += \"String_Node_Str\" + uploadedFileExtension;\n }\n String formatError = ImageStoreUtil.checkTemplateFormat(fileSavedTempLocation, userSelectedFormat);\n if (StringUtils.isNotBlank(formatError)) {\n String errorString = \"String_Node_Str\" + userSelectedFormat + \"String_Node_Str\" + formatError;\n s_logger.error(errorString);\n return errorString;\n }\n int imgSizeGigs = getSizeInGB(_storage.getSize(fileSavedTempLocation));\n int maxSize = uploadEntity.getMaxSizeInGB();\n if (imgSizeGigs > maxSize) {\n String errorMessage = \"String_Node_Str\" + imgSizeGigs + \"String_Node_Str\" + maxSize + \"String_Node_Str\";\n s_logger.error(errorMessage);\n return errorMessage;\n }\n imgSizeGigs++;\n long timeout = (long) imgSizeGigs * installTimeoutPerGig;\n Script scr = new Script(getScriptLocation(resourceType), timeout, s_logger);\n scr.add(\"String_Node_Str\", Integer.toString(imgSizeGigs));\n scr.add(\"String_Node_Str\", Long.toString(UploadEntity.s_maxTemplateSize));\n if (uploadEntity.getDescription() != null && uploadEntity.getDescription().length() > 1) {\n scr.add(\"String_Node_Str\", uploadEntity.getDescription());\n }\n if (uploadEntity.isHvm()) {\n scr.add(\"String_Node_Str\");\n }\n String checkSum = uploadEntity.getChksum();\n if (StringUtils.isNotBlank(checkSum)) {\n scr.add(\"String_Node_Str\", checkSum);\n }\n String extension = uploadEntity.getFormat().getFileExtension();\n String templateName = \"String_Node_Str\";\n if (extension.equals(\"String_Node_Str\")) {\n templateName = uploadEntity.getUuid().trim().replace(\"String_Node_Str\", \"String_Node_Str\");\n } else {\n try {\n templateName = UUID.nameUUIDFromBytes((uploadEntity.getFilename() + System.currentTimeMillis()).getBytes(\"String_Node_Str\")).toString();\n } catch (UnsupportedEncodingException e) {\n templateName = uploadEntity.getUuid().trim().replace(\"String_Node_Str\", \"String_Node_Str\");\n }\n }\n String templateFilename = templateName + \"String_Node_Str\" + extension;\n uploadEntity.setTemplatePath(finalResourcePath + \"String_Node_Str\" + templateFilename);\n scr.add(\"String_Node_Str\", templateFilename);\n scr.add(\"String_Node_Str\", resourcePath);\n scr.add(\"String_Node_Str\", fileSavedTempLocation);\n if (uploadEntity.getChksum() != null && uploadEntity.getChksum().length() > 1) {\n scr.add(\"String_Node_Str\", uploadEntity.getChksum());\n }\n scr.add(\"String_Node_Str\");\n String result;\n result = scr.execute();\n if (result != null) {\n return result;\n }\n File downloadedTemplate = new File(resourcePath + \"String_Node_Str\" + templateFilename);\n _storage.setWorldReadableAndWriteable(downloadedTemplate);\n String propertiesFile = resourcePath;\n if (resourceType == UploadEntity.ResourceType.TEMPLATE) {\n propertiesFile += \"String_Node_Str\";\n } else {\n propertiesFile += \"String_Node_Str\";\n }\n File templateProperties = new File(propertiesFile);\n _storage.setWorldReadableAndWriteable(templateProperties);\n TemplateLocation loc = new TemplateLocation(_storage, resourcePath);\n try {\n loc.create(uploadEntity.getEntityId(), true, uploadEntity.getFilename());\n } catch (IOException e) {\n s_logger.warn(\"String_Node_Str\" + resourcePath, e);\n loc.purge();\n return \"String_Node_Str\" + e.getMessage();\n }\n Map<String, Processor> processors = _dlMgr.getProcessors();\n for (Processor processor : processors.values()) {\n FormatInfo info = null;\n try {\n info = processor.process(resourcePath, null, templateName);\n } catch (InternalErrorException e) {\n s_logger.error(\"String_Node_Str\", e);\n return e.toString();\n }\n if (info != null) {\n loc.addFormat(info);\n uploadEntity.setVirtualSize(info.virtualSize);\n uploadEntity.setPhysicalSize(info.size);\n break;\n }\n }\n if (!loc.save()) {\n s_logger.warn(\"String_Node_Str\");\n loc.purge();\n }\n uploadEntity.setStatus(UploadEntity.Status.COMPLETED);\n uploadEntityStateMap.put(uploadEntity.getUuid(), uploadEntity);\n return null;\n}\n"
|
"public PositiveBooleanExpression MkOr(PositiveBooleanExpression phi, PositiveBooleanExpression psi) {\n if (phi instanceof PositiveTrue || psi instanceof PositiveTrue) {\n return True();\n } else if (phi instanceof PositiveFalse) {\n return psi;\n } else if (psi instanceof PositiveFalse) {\n return phi;\n } else {\n return mkOr.apply(new Pair<>(phi, psi));\n }\n}\n"
|
"public Result resetPassword() throws Exception {\n PasswordReset passwordReset = PasswordReset.fromJson(requestToJSON(request()));\n authenticationService.resetPassword(passwordReset);\n return okResult(\"String_Node_Str\");\n}\n"
|
"public void execute(Event<UIEditUserProfileForm> event) throws Exception {\n UIEditUserProfileForm editUserProfile = event.getSource();\n String objectId = event.getRequestContext().getRequestParameter(OBJECTID);\n editUserProfile.removeChildById(objectId);\n editUserProfile.experiens.remove(objectId);\n List<UIInputSection> experienceSections = editUserProfile.getExperienceSections();\n if (experienceSections.size() > 0) {\n experienceSections.get(0).setTitle(\"String_Node_Str\");\n } else {\n editUserProfile.addEmpryExperienceSection();\n }\n editUserProfile.resetActionFileds();\n event.getRequestContext().addUIComponentToUpdateByAjax(editUserProfile);\n}\n"
|
"public void preOrderTraversal(FnO1ToVoid<NaryTree> function) {\n function.call(this);\n if (children != null) {\n for (NaryTree child : children) {\n child.preOrderTraversal(function);\n }\n }\n}\n"
|
"public void executionStateChanged(final JobID jobID, final ExecutionVertexID id, final ExecutionState newExecutionState, final String optionalDescription) {\n if (newExecutionState == ExecutionState.CANCELING) {\n return;\n }\n if (newExecutionState == ExecutionState.FINISHED || newExecutionState == ExecutionState.CANCELED || newExecutionState == ExecutionState.FAILED) {\n unregisterTask(id);\n }\n try {\n jobManager.updateTaskExecutionState(new TaskExecutionState(jobID, id, newExecutionState, optionalDescription));\n } catch (Exception e) {\n LOG.error(StringUtils.stringifyException(e));\n }\n}\n"
|
"private static void runSearch(SearchCommand searchCommand) {\n LOGGER.info(\"String_Node_Str\");\n String indexDirectory = searchCommand.getIndexDir(commandLine);\n String queryLine = searchCommand.getQuery(commandLine);\n List<String> cliFields = searchCommand.getFields(commandLine);\n System.out.println(\"String_Node_Str\" + queryLine + \"String_Node_Str\");\n for (int i = 0; i < cliFields.size(); i++) {\n System.out.print(\"String_Node_Str\" + i + \"String_Node_Str\" + cliFields.get(i) + \"String_Node_Str\");\n }\n List<String> cliDFields = new ArrayList<String>();\n for (String fieldName : cliFields) {\n if (fieldName.equals(FieldNames.FILENAME)) {\n cliDFields.add(FieldNames.DFILENAME);\n }\n if (fieldName.equals(FieldNames.PATH)) {\n cliDFields.add(FieldNames.DPATH);\n }\n }\n System.out.println(\"String_Node_Str\");\n SearchRepository searchRepository = new SearchRepository(indexDirectory);\n TopDocs result = searchRepository.getQueryResult(queryLine);\n if (result == null) {\n System.out.println(\"String_Node_Str\");\n return;\n }\n System.out.println(\"String_Node_Str\" + result.totalHits);\n try {\n for (int i = 0; i < result.scoreDocs.length; i++) {\n Document hit;\n hit = searchRepository.getSearcher().doc(result.scoreDocs[i].doc);\n List<Field> fieldList = hit.getFields();\n System.out.print((i + 1) + \"String_Node_Str\");\n for (int k = 0; k < fieldList.size(); k++) {\n Field field = (Field) fieldList.get(k);\n if ((cliDFields.size() > 0) && cliDFields.contains(field.name())) {\n System.out.print(field.name() + \"String_Node_Str\" + field.stringValue() + \"String_Node_Str\");\n } else {\n if (FieldNames.DPATH.equals(field.name())) {\n System.out.print(\"String_Node_Str\" + field.stringValue() + \"String_Node_Str\");\n }\n if (FieldNames.DFILENAME.equals(field.name())) {\n System.out.print(\"String_Node_Str\" + field.stringValue() + \"String_Node_Str\");\n }\n if (FieldNames.REVISION.equals(field.name())) {\n long rev = Long.parseLong(field.stringValue());\n System.out.print(\"String_Node_Str\" + rev + \"String_Node_Str\");\n }\n if (FieldNames.KIND.equals(field.name())) {\n System.out.print(\"String_Node_Str\" + field.stringValue() + \"String_Node_Str\");\n }\n }\n }\n System.out.println(\"String_Node_Str\");\n }\n } catch (CorruptIndexException e) {\n LOGGER.error(\"String_Node_Str\", e);\n } catch (IOException e) {\n LOGGER.error(\"String_Node_Str\" + e.getLocalizedMessage());\n } finally {\n IndexReader reader = searchRepository.getReader();\n try {\n reader.close();\n } catch (IOException e) {\n LOGGER.error(\"String_Node_Str\" + e.getLocalizedMessage());\n }\n }\n}\n"
|
"public org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterBindingComponent convertOperationDefinitionParameterBindingComponent(org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterBindingComponent src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterBindingComponent tgt = new org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterBindingComponent();\n copyElement(src, tgt);\n tgt.setStrength(convertBindingStrength(src.getStrength()));\n tgt.setValueSet(convertType(src.getValueSet()));\n return tgt;\n}\n"
|
"public void onSharedPreferenceChanged(SharedPreferences sp, String key) {\n Log.d(TAG, \"String_Node_Str\");\n mFirstAppVersionInstalled = sp.getInt(mContext.getString(R.string.settings_key_first_app_version_installed), 0);\n mFirstTimeAppInstalled = sp.getLong(mContext.getString(R.string.settings_key_first_time_app_installed), 0);\n mFirstTimeCurrentVersionInstalled = sp.getLong(mContext.getString(R.string.settings_key_first_time_current_version_installed), 0);\n mDomainText = sp.getString(\"String_Node_Str\", \"String_Node_Str\");\n Log.d(TAG, \"String_Node_Str\" + mDomainText);\n mShowKeyPreview = sp.getBoolean(mContext.getString(R.string.settings_key_key_press_shows_preview_popup), mContext.getResources().getBoolean(R.bool.settings_default_key_press_shows_preview_popup));\n Log.d(TAG, \"String_Node_Str\" + mShowKeyPreview);\n mKeyPreviewAboveKey = sp.getString(mContext.getString(R.string.settings_key_key_press_preview_popup_position), mContext.getString(R.string.settings_default_key_press_preview_popup_position)).equals(\"String_Node_Str\");\n Log.d(TAG, \"String_Node_Str\" + mKeyPreviewAboveKey);\n mShowKeyboardNameText = sp.getBoolean(mContext.getString(R.string.settings_key_show_keyboard_name_text_key), mContext.getResources().getBoolean(R.bool.settings_default_show_keyboard_name_text_value));\n Log.d(TAG, \"String_Node_Str\" + mShowKeyboardNameText);\n mShowHintTextOnKeys = sp.getBoolean(mContext.getString(R.string.settings_key_show_hint_text_key), mContext.getResources().getBoolean(R.bool.settings_default_show_hint_text_value));\n Log.d(TAG, \"String_Node_Str\" + mShowHintTextOnKeys);\n mUseCustomHintAlign = sp.getBoolean(mContext.getString(R.string.settings_key_use_custom_hint_align_key), mContext.getResources().getBoolean(R.bool.settings_default_use_custom_hint_align_value));\n Log.d(TAG, \"String_Node_Str\" + mUseCustomHintAlign);\n mCustomHintAlign = getIntFromString(sp, mContext.getString(R.string.settings_key_custom_hint_align_key), mContext.getString(R.string.settings_default_custom_hint_align_value));\n Log.d(TAG, \"String_Node_Str\" + mCustomHintAlign);\n mCustomHintVAlign = getIntFromString(sp, mContext.getString(R.string.settings_key_custom_hint_valign_key), mContext.getString(R.string.settings_default_custom_hint_valign_value));\n Log.d(TAG, \"String_Node_Str\" + mCustomHintVAlign);\n mSwitchKeyboardOnSpace = sp.getBoolean(\"String_Node_Str\", false);\n Log.d(TAG, \"String_Node_Str\" + mSwitchKeyboardOnSpace);\n mUseFullScreenInputInLandscape = sp.getBoolean(mContext.getString(R.string.settings_key_landscape_fullscreen), mContext.getResources().getBoolean(R.bool.settings_default_landscape_fullscreen));\n Log.d(TAG, \"String_Node_Str\" + mUseFullScreenInputInLandscape);\n mUseFullScreenInputInPortrait = sp.getBoolean(mContext.getString(R.string.settings_key_portrait_fullscreen), mContext.getResources().getBoolean(R.bool.settings_default_portrait_fullscreen));\n Log.d(TAG, \"String_Node_Str\" + mUseFullScreenInputInPortrait);\n mUseKeyRepeat = sp.getBoolean(\"String_Node_Str\", true);\n Log.d(TAG, \"String_Node_Str\" + mUseKeyRepeat);\n mKeysHeightFactorInPortrait = getFloatFromString(sp, \"String_Node_Str\", mContext.getString(R.string.settings_default_portrait_keyboard_height_factor));\n Log.d(TAG, \"String_Node_Str\" + mKeysHeightFactorInPortrait);\n if (mKeysHeightFactorInPortrait > 2.0f) {\n mKeysHeightFactorInPortrait = 2.0f;\n Log.d(TAG, \"String_Node_Str\" + mKeysHeightFactorInPortrait);\n } else if (mKeysHeightFactorInPortrait < 0.2f) {\n mKeysHeightFactorInPortrait = 0.2f;\n Log.d(TAG, \"String_Node_Str\" + mKeysHeightFactorInPortrait);\n }\n mKeysHeightFactorInLandscape = getFloatFromString(sp, \"String_Node_Str\", mContext.getString(R.string.settings_default_landscape_keyboard_height_factor));\n Log.d(TAG, \"String_Node_Str\" + mKeysHeightFactorInLandscape);\n if (mKeysHeightFactorInLandscape > 2.0f) {\n mKeysHeightFactorInLandscape = 2.0f;\n Log.d(TAG, \"String_Node_Str\" + mKeysHeightFactorInLandscape);\n } else if (mKeysHeightFactorInPortrait < 0.2f) {\n mKeysHeightFactorInPortrait = 0.2f;\n Log.d(TAG, \"String_Node_Str\" + mKeysHeightFactorInLandscape);\n }\n mInsertSpaceAfterCandidatePick = sp.getBoolean(\"String_Node_Str\", true);\n Log.d(TAG, \"String_Node_Str\" + mInsertSpaceAfterCandidatePick);\n mSwipeUpKeyCode = getIntFromSwipeConfiguration(sp, \"String_Node_Str\", \"String_Node_Str\");\n Log.d(TAG, \"String_Node_Str\" + mSwipeUpKeyCode);\n mSwipeUpFromSpacebarKeyCode = getIntFromSwipeConfiguration(sp, \"String_Node_Str\", \"String_Node_Str\");\n Log.d(TAG, \"String_Node_Str\" + mSwipeUpFromSpacebarKeyCode);\n mSwipeDownKeyCode = getIntFromSwipeConfiguration(sp, \"String_Node_Str\", \"String_Node_Str\");\n Log.d(TAG, \"String_Node_Str\" + mSwipeDownKeyCode);\n mSwipeLeftKeyCode = getIntFromSwipeConfiguration(sp, \"String_Node_Str\", \"String_Node_Str\");\n Log.d(TAG, \"String_Node_Str\" + mSwipeLeftKeyCode);\n mSwipeRightKeyCode = getIntFromSwipeConfiguration(sp, \"String_Node_Str\", \"String_Node_Str\");\n Log.d(TAG, \"String_Node_Str\" + mSwipeRightKeyCode);\n mPinchKeyCode = getIntFromSwipeConfiguration(sp, \"String_Node_Str\", \"String_Node_Str\");\n Log.d(TAG, \"String_Node_Str\" + mPinchKeyCode);\n mSeparateKeyCode = getIntFromSwipeConfiguration(sp, \"String_Node_Str\", \"String_Node_Str\");\n Log.d(TAG, \"String_Node_Str\" + mSeparateKeyCode);\n mActionKeyInvisibleWhenRequested = sp.getBoolean(\"String_Node_Str\", false);\n Log.d(TAG, \"String_Node_Str\" + mActionKeyInvisibleWhenRequested);\n mIsDoubleSpaceChangesToPeroid = sp.getBoolean(\"String_Node_Str\", true);\n Log.d(TAG, \"String_Node_Str\" + mIsDoubleSpaceChangesToPeroid);\n mShouldPopupForLanguageSwitch = sp.getBoolean(mContext.getString(R.string.settings_key_lang_key_shows_popup), mContext.getResources().getBoolean(R.bool.settings_default_lang_key_shows_popup));\n Log.d(TAG, \"String_Node_Str\" + mShouldPopupForLanguageSwitch);\n mHideSoftKeyboardWhenPhysicalKeyPressed = sp.getBoolean(mContext.getString(R.string.settings_key_hide_soft_when_physical), mContext.getResources().getBoolean(R.bool.settings_default_hide_soft_when_physical));\n Log.d(TAG, \"String_Node_Str\" + mHideSoftKeyboardWhenPhysicalKeyPressed);\n mShowVersionNotification = sp.getBoolean(mContext.getString(R.string.settings_key_show_version_notification), mContext.getResources().getBoolean(R.bool.settings_default_show_version_notification));\n Log.d(TAG, \"String_Node_Str\" + mShowVersionNotification);\n mShowTipsNotification = sp.getBoolean(mContext.getString(R.string.settings_key_show_tips_notification), mContext.getResources().getBoolean(R.bool.settings_default_show_tips_notification));\n Log.d(TAG, \"String_Node_Str\" + mShowTipsNotification);\n mUse16KeysSymbolsKeyboard = sp.getBoolean(mContext.getString(R.string.settings_key_use_16_keys_symbols_keyboards), mContext.getResources().getBoolean(R.bool.settings_default_use_16_keys_symbols_keyboards));\n Log.d(TAG, \"String_Node_Str\" + mUse16KeysSymbolsKeyboard);\n mUseBackword = sp.getBoolean(mContext.getString(R.string.settings_key_use_backword), mContext.getResources().getBoolean(R.bool.settings_default_use_backword));\n Log.d(TAG, \"String_Node_Str\" + mUseBackword);\n mCycleOverAllSymbolsKeyboard = sp.getBoolean(mContext.getString(R.string.settings_key_cycle_all_symbols), mContext.getResources().getBoolean(R.bool.settings_default_cycle_all_symbols));\n Log.d(TAG, \"String_Node_Str\" + mCycleOverAllSymbolsKeyboard);\n mUseCameraKeyForBackspaceBackword = sp.getBoolean(mContext.getString(R.string.settings_key_use_camera_key_for_backspace_backword), mContext.getResources().getBoolean(R.bool.settings_default_use_camera_key_for_backspace_backword));\n Log.d(TAG, \"String_Node_Str\" + mUseCameraKeyForBackspaceBackword);\n mUseVolumeKeyForLeftRight = sp.getBoolean(mContext.getString(R.string.settings_key_use_volume_key_for_left_right), mContext.getResources().getBoolean(R.bool.settings_default_use_volume_key_for_left_right));\n Log.d(TAG, \"String_Node_Str\" + mUseVolumeKeyForLeftRight);\n mUseContactsDictionary = sp.getBoolean(mContext.getString(R.string.settings_key_use_contacts_dictionary), mContext.getResources().getBoolean(R.bool.settings_default_contacts_dictionary));\n Log.d(TAG, \"String_Node_Str\" + mUseContactsDictionary);\n mAutoDictionaryInsertionThreshold = getIntFromString(sp, mContext.getString(R.string.settings_key_auto_dictionary_threshold), mContext.getString(R.string.settings_default_auto_dictionary_add_threshold));\n Log.d(TAG, \"String_Node_Str\" + mAutoDictionaryInsertionThreshold);\n mIsStickyExtensionKeyboard = sp.getBoolean(mContext.getString(R.string.settings_key_is_sticky_extesion_keyboard), mContext.getResources().getBoolean(R.bool.settings_default_is_sticky_extesion_keyboard));\n Log.d(TAG, \"String_Node_Str\" + mIsStickyExtensionKeyboard);\n mDrawExtensionKeyboardAboveMainKeyboard = sp.getBoolean(mContext.getString(R.string.settings_key_is_extesion_keyboard_above_keyboard), mContext.getResources().getBoolean(R.bool.settings_default_is_extesion_keyboard_above_keyboard));\n Log.d(TAG, \"String_Node_Str\" + mDrawExtensionKeyboardAboveMainKeyboard);\n mSwipeDistanceThreshold = getIntFromString(sp, mContext.getString(R.string.settings_key_swipe_distance_threshold), mContext.getString(R.string.settings_default_swipe_distance_threshold));\n Log.d(TAG, \"String_Node_Str\" + mSwipeDistanceThreshold);\n mSwipeVelocityThreshold = getIntFromString(sp, mContext.getString(R.string.settings_key_swipe_velocity_threshold), mContext.getString(R.string.settings_default_swipe_velocity_threshold));\n Log.d(TAG, \"String_Node_Str\" + mSwipeVelocityThreshold);\n mLongPressTimeout = getIntFromString(sp, mContext.getString(R.string.settings_key_long_press_timeout), mContext.getString(R.string.settings_default_long_press_timeout));\n Log.d(TAG, \"String_Node_Str\" + mLongPressTimeout);\n mMultiTapTimeout = getIntFromString(sp, mContext.getString(R.string.settings_key_multitap_timeout), mContext.getString(R.string.settings_default_multitap_timeout));\n Log.d(TAG, \"String_Node_Str\" + mMultiTapTimeout);\n mWorkaround_alwaysUseDrawText = sp.getBoolean(mContext.getString(R.string.settings_key_workaround_disable_rtl_fix), getAlwaysUseDrawTextDefault());\n Log.d(TAG, \"String_Node_Str\" + mWorkaround_alwaysUseDrawText);\n mInitialKeyboardSplitState = sp.getString(mContext.getString(R.string.settings_key_default_split_state), mContext.getString(R.string.settings_default_default_split_state));\n Log.d(TAG, \"String_Node_Str\" + mInitialKeyboardSplitState);\n mUseChewbacca = sp.getBoolean(mContext.getString(R.string.settings_key_show_chewbacca), mContext.getResources().getBoolean(R.bool.settings_default_show_chewbacca));\n Log.d(TAG, \"String_Node_Str\" + mUseChewbacca);\n String shouldSwapType = sp.getString(mContext.getString(R.string.settings_key_should_swap_punctuation_and_space), mContext.getString(R.string.settings_default_should_swap_punctuation_and_space));\n mSwapPunctuationAndSpace = shouldSwapType.equals(\"String_Node_Str\");\n Log.d(TAG, \"String_Node_Str\" + mSwapPunctuationAndSpace);\n String animationsLevel = sp.getString(mContext.getString(R.string.settings_key_tweak_animations_level), mContext.getString(R.string.settings_default_tweak_animations_level));\n if (\"String_Node_Str\".equals(animationsLevel))\n mAnimationsLevel = AnimationsLevel.None;\n else if (\"String_Node_Str\".equals(animationsLevel))\n mAnimationsLevel = AnimationsLevel.Some;\n else\n mAnimationsLevel = AnimationsLevel.Full;\n Log.d(TAG, \"String_Node_Str\" + mAnimationsLevel);\n final LinkedList<OnSharedPreferenceChangeListener> disconnectedList = new LinkedList<SharedPreferences.OnSharedPreferenceChangeListener>(mPreferencesChangedListeners);\n for (OnSharedPreferenceChangeListener listener : disconnectedList) {\n listener.onSharedPreferenceChanged(sp, key);\n }\n}\n"
|
"public ConnectionStatus testConnection(IMetadataConnection metadataConnection) {\n classLoader = HBaseClassLoaderFactory.getClassLoader(metadataConnection);\n ConnectionStatus connectionStatus = new ConnectionStatus();\n connectionStatus.setResult(false);\n ClassLoader oldClassLoaderLoader = Thread.currentThread().getContextClassLoader();\n try {\n Thread.currentThread().setContextClassLoader(classLoader);\n Object config = ReflectionUtils.invokeStaticMethod(\"String_Node_Str\", classLoader, \"String_Node_Str\", new Object[0]);\n ReflectionUtils.invokeMethod(config, \"String_Node_Str\", new Object[] { \"String_Node_Str\", metadataConnection.getServerName() });\n ReflectionUtils.invokeMethod(config, \"String_Node_Str\", new Object[] { \"String_Node_Str\", metadataConnection.getPort() });\n ReflectionUtils.invokeMethod(config, \"String_Node_Str\", new Object[] { \"String_Node_Str\", \"String_Node_Str\" });\n ReflectionUtils.invokeMethod(config, \"String_Node_Str\", new Object[] { \"String_Node_Str\", \"String_Node_Str\" });\n ReflectionUtils.invokeMethod(config, \"String_Node_Str\", new Object[] { \"String_Node_Str\", \"String_Node_Str\" });\n Callable<Object> callable = checkHBaseAvailable(config);\n ExecutorService executor = Executors.newSingleThreadExecutor();\n Future<Object> future = executor.submit(callable);\n try {\n int timeout = 15;\n if (GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerCoreService.class)) {\n IDesignerCoreService designerService = (IDesignerCoreService) GlobalServiceRegister.getDefault().getService(IDesignerCoreService.class);\n timeout = designerService.getDesignerCorePreferenceStore().getInt(ITalendCorePrefConstants.DB_CONNECTION_TIMEOUT);\n }\n future.get(timeout, TimeUnit.SECONDS);\n connectionStatus.setResult(true);\n } catch (Exception e) {\n future.cancel(true);\n connectionStatus.setResult(false);\n connectionStatus.setMessageException(\"String_Node_Str\");\n ThreadGroup group = Thread.currentThread().getThreadGroup();\n int activeCount = group.activeCount();\n Thread[] allThreads = new Thread[activeCount];\n group.enumerate(allThreads);\n Thread foundThread = null;\n for (Thread t : allThreads) {\n if (t.getClass().getName().equals(\"String_Node_Str\")) {\n foundThread = t;\n break;\n }\n }\n if (foundThread != null) {\n foundThread.getClass().getDeclaredMethods();\n Method method = foundThread.getClass().getDeclaredMethod(\"String_Node_Str\");\n method.setAccessible(true);\n method.invoke(foundThread);\n }\n Class ownerClass = Class.forName(\"String_Node_Str\", true, classLoader);\n Method[] methods = ownerClass.getMethods();\n Method m2 = null;\n for (Method method : methods) {\n Class<?>[] parameterTypes = method.getParameterTypes();\n if (\"String_Node_Str\".equals(method.getName()) && parameterTypes.length == 1 && \"String_Node_Str\".equals(parameterTypes[0].getName())) {\n m2 = method;\n }\n }\n if (m2 != null) {\n m2.setAccessible(true);\n m2.invoke(null, true);\n }\n }\n } catch (Exception e) {\n ExceptionHandler.process(e);\n connectionStatus.setMessageException(e.getStackTrace() == null ? e.getMessage() : e.getStackTrace().toString());\n } finally {\n Thread.currentThread().setContextClassLoader(oldClassLoaderLoader);\n }\n return connectionStatus;\n}\n"
|
"public void onItemTooltip(ItemTooltipEvent event) {\n if (event.getEntityPlayer() != null && event.getEntityPlayer().worldObj != null && event.getItemStack() != null) {\n final KeyBinding keyBindSneak = Minecraft.getMinecraft().gameSettings.keyBindSneak;\n final boolean isShifting = GameSettings.isKeyDown(keyBindSneak);\n final Item item = event.getItemStack().getItem();\n final Block block = Block.getBlockFromItem(item);\n if (item instanceof ItemEnchantedBook && enchantmentDescription) {\n final Set<Enchantment> enchants = EnchantmentHelper.getEnchantments(event.getItemStack()).keySet();\n if (!enchants.isEmpty()) {\n final Enchantment enchant = enchants.iterator().next();\n if (enchant != null)\n if (isShifting) {\n final String description = I18n.format(\"String_Node_Str\" + enchant.getName());\n if (description.startsWith(\"String_Node_Str\"))\n Utilities.wrapStringToList(I18n.format(\"String_Node_Str\", Utilities.getModName(enchant), description), 45, false, event.getToolTip());\n else {\n Utilities.wrapStringToList(description, 45, false, event.getToolTip());\n if (enchantmentMod)\n event.getToolTip().add(String.format(I18n.format(\"String_Node_Str\"), Utilities.getModName(enchant)));\n }\n } else\n Utilities.wrapStringToList(String.format(I18n.format(\"String_Node_Str\"), keyBindSneak.getDisplayName()), 45, false, event.getToolTip());\n }\n }\n if (block != null && showEnchantmentPower)\n try {\n final float enchPower = block.getEnchantPowerBonus(event.getEntityPlayer().worldObj, BlockPos.ORIGIN);\n if (enchPower > 0)\n event.getToolTip().add(I18n.format(\"String_Node_Str\") + \"String_Node_Str\" + enchPower);\n } catch (final IllegalArgumentException exception) {\n }\n }\n}\n"
|
"protected XMLDescriptor findReferenceDescriptor(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord, Attributes atts, DatabaseMapping mapping, UnmarshalKeepAsElementPolicy policy) {\n XMLDescriptor referenceDescriptor = super.findReferenceDescriptor(xPathFragment, unmarshalRecord, atts, mapping, policy);\n if (referenceDescriptor == null) {\n XMLContext xmlContext = unmarshalRecord.getUnmarshaller().getXMLContext();\n XPathQName xpathQName = new XPathQName(xPathFragment.getNamespaceURI(), xPathFragment.getLocalName(), unmarshalRecord.isNamespaceAware());\n referenceDescriptor = xmlContext.getDescriptor(xpathQName);\n if (referenceDescriptor != null && referenceDescriptor.isWrapper()) {\n referenceDescriptor = null;\n }\n }\n return referenceDescriptor;\n}\n"
|
"protected Object doMainTask(TaskMonitor monitor, ObjectRepository repository) {\n Object result = null;\n String arffFile, outputFile;\n FileStream fStream;\n for (int i = 0; i < this.numStreamsOption.getValue(); i++) {\n this.task = (Task) ((MOAObject) taskBase).copy();\n result = this.task.doTask(monitor, repository);\n }\n return result;\n}\n"
|
"public static Block getWaterSourceBlock(Player player, double range, ClickType clickType, boolean allowWater, boolean allowIce, boolean allowPlant, boolean allowSnow, boolean allowWaterBottles) {\n Block sourceBlock = null;\n if (allowWaterBottles) {\n sourceBlock = WaterAbility.getWaterSourceBlock(player, range, allowPlant);\n if (sourceBlock == null || (sourceBlock.getWorld().equals(player.getWorld()) && sourceBlock.getLocation().distance(player.getEyeLocation()) > 3)) {\n sourceBlock = null;\n }\n }\n if (allowWater && sourceBlock == null) {\n sourceBlock = getSourceBlock(player, range, BlockSourceType.WATER, clickType);\n }\n if (allowIce && sourceBlock == null) {\n sourceBlock = getSourceBlock(player, range, BlockSourceType.ICE, clickType);\n }\n if (allowPlant && sourceBlock == null) {\n sourceBlock = getSourceBlock(player, range, BlockSourceType.PLANT, clickType);\n }\n if (allowSnow && sourceBlock == null) {\n sourceBlock = getSourceBlock(player, range, BlockSourceType.SNOW, clickType);\n }\n if (sourceBlock != null && TempBlock.isTempBlock(sourceBlock) && !tempblock) {\n return null;\n }\n return sourceBlock;\n}\n"
|
"public String toValueString() {\n StringBuilder result = new StringBuilder();\n for (final Map.Entry<String, String> entry : applied.entrySet()) {\n if (result.length() > 0) {\n result.append(',').append(' ');\n }\n result.append(name);\n if (applied.get(name) != null) {\n final boolean safe = ODataPreferenceNames.ALLOW_ENTITY_REFERENCES.toString().equals(name) || ODataPreferenceNames.CALLBACK.toString().equals(name) || ODataPreferenceNames.CONTINUE_ON_ERROR.toString().equals(name) || ODataPreferenceNames.MAX_PAGE_SIZE.toString().equals(name) || ODataPreferenceNames.TRACK_CHANGES.toString().equals(name) || ODataPreferenceNames.RETURN.toString().equals(name) || ODataPreferenceNames.RESPOND_ASYNC.toString().equals(name) || ODataPreferenceNames.WAIT.toString().equals(name);\n result.append('=').append(safe ? \"String_Node_Str\" : '\"').append(applied.get(name).replaceAll(\"String_Node_Str\", \"String_Node_Str\")).append(safe ? \"String_Node_Str\" : '\"');\n }\n }\n return result.toString();\n}\n"
|
"public Object pop() throws IOException {\n if (popBuffer == null) {\n initPop();\n }\n if (popBufferSize == 0) {\n return null;\n }\n ValueIndex reObj = popBuffer[0];\n Object reValue = reObj.value;\n Object readValue = readNext(reObj.index);\n if (readValue == null) {\n popBufferSize--;\n if (popBufferSize > 0) {\n ValueIndex[] tBuffer = new ValueIndex[popBufferSize];\n System.arraycopy(popBuffer, 1, tBuffer, 0, popBufferSize);\n popBuffer = tBuffer;\n }\n } else {\n int pos = 0;\n mValueIndex.value = readValue;\n mValueIndex.index = reObj.index;\n if (popBufferSize > 1) {\n pos = Arrays.binarySearch(popBuffer, mValueIndex);\n if (pos < 0)\n pos = (pos + 1) * -1;\n pos--;\n if (pos == -1)\n pos = 0;\n if (pos > 0) {\n System.arraycopy(popBuffer, 1, popBuffer, 0, pos);\n }\n }\n popBuffer[pos] = mValueIndex;\n mValueIndex = reObj;\n }\n if (forceDistinct) {\n if (lastPopObject == null) {\n lastPopObject = reValue;\n } else {\n if (((Comparable) lastPopObject).compareTo(reValue) == 0) {\n return pop();\n }\n }\n }\n lastPopObject = reValue;\n return reValue;\n}\n"
|
"private ApplicationHttpRequest wrapRequest(State state) {\n ServletRequest previous = null;\n ServletRequest current = state.outerRequest;\n while (current != null) {\n if (\"String_Node_Str\".equals(current.getClass().getName())) {\n break;\n }\n if (!(current instanceof ServletRequestWrapper)) {\n break;\n }\n if (current instanceof ApplicationHttpRequest) {\n break;\n }\n previous = current;\n current = ((ServletRequestWrapper) current).getRequest();\n }\n ServletRequest wrapper = null;\n if ((current instanceof ApplicationHttpRequest) || (current instanceof Request) || (current instanceof HttpServletRequest)) {\n HttpServletRequest hcurrent = (HttpServletRequest) current;\n boolean crossContext = false;\n if ((state.outerRequest instanceof ApplicationHttpRequest) || (state.outerRequest instanceof Request) || (state.outerRequest instanceof HttpServletRequest)) {\n HttpServletRequest houterRequest = (HttpServletRequest) state.outerRequest;\n Object contextPath = houterRequest.getAttribute(RequestDispatcher.INCLUDE_CONTEXT_PATH);\n if (contextPath == null) {\n contextPath = houterRequest.getContextPath();\n }\n crossContext = !(context.getPath().equals(contextPath));\n }\n crossContextFlag = Boolean.valueOf(crossContext);\n wrapper = new ApplicationHttpRequest(hcurrent, context, crossContext, state.dispatcherType);\n } else {\n wrapper = new ApplicationRequest(current);\n }\n if (previous == null) {\n state.outerRequest = wrapper;\n } else {\n ((ServletRequestWrapper) previous).setRequest(wrapper);\n }\n state.wrapRequest = wrapper;\n return wrapper;\n}\n"
|
"protected static void convertMappingToXMLChoiceMapping(ClassDescriptor jaxbDescriptor, DatabaseMapping jpaMapping, ClassLoader cl) {\n if ((jpaMapping != null) && (jaxbDescriptor != null)) {\n DatabaseMapping jaxbMapping = jaxbDescriptor.getMappingForAttributeName(jpaMapping.getAttributeName());\n if (!(jaxbMapping.isXMLMapping() && (jaxbMapping.isAbstractCompositeCollectionMapping() || jaxbMapping.isAbstractCompositeObjectMapping()))) {\n return;\n }\n String attributeName = jpaMapping.getAttributeName();\n String adapterClassName = jpaMapping.getReferenceDescriptor().getJavaClassName() + \"String_Node_Str\" + RestAdapterClassWriter.ADAPTER_INNER_CLASS_NAME;\n try {\n if (jaxbMapping.isAbstractCompositeObjectMapping()) {\n XMLChoiceObjectMapping xmlChoiceMapping = new XMLChoiceObjectMapping();\n xmlChoiceMapping.setAttributeName(attributeName);\n copyAccessorToMapping(jaxbMapping, xmlChoiceMapping);\n xmlChoiceMapping.setProperties(jaxbMapping.getProperties());\n xmlChoiceMapping.addChoiceElement(attributeName, jpaMapping.getReferenceDescriptor().getJavaClass());\n xmlChoiceMapping.addChoiceElement(attributeName, Link.class);\n xmlChoiceMapping.setConverter(new XMLJavaTypeConverter(Class.forName(adapterClassName, true, cl)));\n jaxbDescriptor.removeMappingForAttributeName(jaxbMapping.getAttributeName());\n jaxbDescriptor.addMapping(xmlChoiceMapping);\n } else if (jaxbMapping.isAbstractCompositeCollectionMapping()) {\n XMLChoiceCollectionMapping xmlChoiceMapping = new XMLChoiceCollectionMapping();\n xmlChoiceMapping.setAttributeName(attributeName);\n xmlChoiceMapping.setGetMethodName(jaxbMapping.getGetMethodName());\n xmlChoiceMapping.setSetMethodName(jaxbMapping.getSetMethodName());\n xmlChoiceMapping.setProperties(jaxbMapping.getProperties());\n xmlChoiceMapping.addChoiceElement(attributeName, Link.class);\n xmlChoiceMapping.addChoiceElement(attributeName, jpaMapping.getReferenceDescriptor().getJavaClass());\n xmlChoiceMapping.setConverter(new XMLJavaTypeConverter(Class.forName(adapterClassName, true, cl)));\n jaxbDescriptor.removeMappingForAttributeName(jaxbMapping.getAttributeName());\n jaxbDescriptor.addMapping(xmlChoiceMapping);\n }\n } catch (ClassNotFoundException e) {\n throw new RuntimeException(e);\n }\n }\n}\n"
|
"private static StrippedGeometry stripGeometry(final MultiDimensionalNumericData query, final NumericDimensionField<?>[] dimensionDefinitions) {\n final Set<ByteArrayId> geometryFieldIds = new HashSet<ByteArrayId>();\n final List<NumericData> numericDataPerDimension = new ArrayList<NumericData>();\n final List<NumericDimensionField<?>> fields = new ArrayList<NumericDimensionField<?>>();\n final NumericData[] data = query.getDataPerDimension();\n for (int d = 0; d < orderedConstrainedDimensionDefinitions.length; d++) {\n if (isSpatial(orderedConstrainedDimensionDefinitions[d])) {\n geometryFieldIds.add(orderedConstrainedDimensionDefinitions[d].getFieldId());\n } else {\n numericDataPerDimension.add(data[d]);\n fields.add(dimensionDefinitions[d]);\n }\n }\n return new StrippedGeometry(new BasicNumericDataset(numericDataPerDimension.toArray(new NumericData[numericDataPerDimension.size()])), fields.toArray(new NumericDimensionField<?>[fields.size()]), geometryFieldIds);\n}\n"
|
"public T next() {\n T result = iterator.next();\n atStart = false;\n return result;\n}\n"
|
"private void enableSlidingUpPanel(Drone drone) {\n if (mSlidingPanel == null) {\n return;\n }\n final boolean isEnabled = flightActions != null && flightActions.isSlidingUpPanelEnabled(drone);\n if (isEnabled) {\n mSlidingPanel.setSlidingEnabled(true);\n } else {\n if (!mSlidingPanelCollapsing.get()) {\n if (mSlidingPanel.isPanelExpanded()) {\n mSlidingPanel.setPanelSlideListener(mDisablePanelSliding);\n mSlidingPanel.collapsePanel();\n mSlidingPanelCollapsing.set(true);\n } else {\n mSlidingPanel.setSlidingEnabled(false);\n mSlidingPanelCollapsing.set(false);\n }\n }\n }\n}\n"
|
"public void onResume() {\n super.onResume();\n if (mCalc.toString().equals(\"String_Node_Str\") && mCalc.getPrevExpressions().size() == 0)\n mDisplay.setText(R.string.app_name);\n else\n updateScreenWithInstaScrollOption(true, true);\n}\n"
|
"private void loadSkipMers(String file) throws Exception {\n BufferedReader bf = Utils.getFile(file, \"String_Node_Str\");\n String line = null;\n while ((line = bf.readLine()) != null) {\n String[] split = line.trim().split(\"String_Node_Str\");\n String mer = split[0].trim();\n int count = Integer.parseInt(split[1]);\n this.skipMers.put(mer, count);\n }\n bf.close();\n}\n"
|
"public SUserChanged convertToSObject(UserChanged input) {\n if (input == null) {\n return null;\n }\n SVersion result = new SVersion();\n result.setOid(input.getOid());\n result.setDate(input.getDate());\n result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);\n User executorVal = input.getExecutor();\n result.setExecutorId(executorVal == null ? -1 : executorVal.getOid());\n User userVal = input.getUser();\n result.setUserId(userVal == null ? -1 : userVal.getOid());\n return result;\n}\n"
|
"private Statement createSyntheticAfterImports() {\n ASTNode target = null;\n Statement synthetic = ReturnStatement.RETURN_NULL_OR_VOID;\n ASTNode target = null;\n if (output.getImports() != null && !output.getImports().isEmpty()) {\n target = output.getImports().get(output.getImports().size() - 1);\n } else if (output.hasPackage()) {\n target = output.getPackage();\n }\n if (target != null) {\n synthetic = new ReturnStatement(ConstantExpression.NULL);\n synthetic.setStart(target.getEnd() + 1);\n synthetic.setEnd(target.getEnd() + 1);\n synthetic.setLineNumber(target.getLastLineNumber());\n synthetic.setLastLineNumber(target.getLineNumber());\n synthetic.setColumnNumber(target.getLastColumnNumber() + 1);\n synthetic.setLastColumnNumber(target.getColumnNumber() + 1);\n }\n return synthetic;\n}\n"
|
"public void onPlayerUseItemEvent(PlayerInteractEvent event) {\n if (event.action == PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK) {\n if (event.world.getBlock(event.x, event.y, event.z) == Blocks.farmland) {\n if (event.entityPlayer.getCurrentEquippedItem() != null && event.entityPlayer.getCurrentEquippedItem().stackSize > 0 && event.entityPlayer.getCurrentEquippedItem().getItem() != null && event.entityPlayer.getCurrentEquippedItem().getItem() instanceof IPlantable && event.entityPlayer.getCurrentEquippedItem().hasTagCompound()) {\n if (ConfigurationHandler.disableVanillaFarming && SeedHelper.isValidSeed((ItemSeeds) event.entityPlayer.getCurrentEquippedItem().getItem())) {\n event.setResult(Event.Result.DENY);\n event.setCanceled(true);\n } else {\n NBTTagCompound tag = event.entityPlayer.getCurrentEquippedItem().getTagCompound();\n if (tag.hasKey(Names.growth) && tag.hasKey(Names.gain) && tag.hasKey(Names.strength)) {\n event.setResult(Event.Result.DENY);\n event.setCanceled(true);\n }\n } else {\n event.setResult(Event.Result.DENY);\n event.setCanceled(true);\n }\n }\n } else if (LoadedMods.hungerOverhaul) {\n if (event.world.getBlock(event.x, event.y, event.z) instanceof BlockCrop) {\n if (event.entityPlayer.getCurrentEquippedItem() != null) {\n if (event.entityPlayer.getCurrentEquippedItem().getItem() == Items.dye && event.entityPlayer.getCurrentEquippedItem().getItemDamage() == 15) {\n if (!((TileEntityCrop) event.world.getTileEntity(event.x, event.y, event.z)).isMature()) {\n if (!event.world.isRemote) {\n event.setResult(Event.Result.ALLOW);\n return;\n }\n }\n } else if (event.entityPlayer.getCurrentEquippedItem().getItem() instanceof ItemDebugger) {\n event.entityPlayer.getCurrentEquippedItem().getItem().onItemUse(event.entityPlayer.getCurrentEquippedItem(), event.entityPlayer, event.world, event.x, event.y, event.z, event.face, 0, 0, 0);\n }\n }\n event.world.getBlock(event.x, event.y, event.z).onBlockActivated(event.world, event.x, event.y, event.z, event.entityPlayer, event.face, 0, 0, 0);\n event.setResult(Event.Result.DENY);\n event.useItem = Event.Result.DENY;\n event.useBlock = Event.Result.DENY;\n if (event.world.isRemote) {\n FMLClientHandler.instance().getClientPlayerEntity().sendQueue.addToSendQueue(new C08PacketPlayerBlockPlacement(event.x, event.y, event.z, event.face, event.entityPlayer.inventory.getCurrentItem(), 0f, 0f, 0f));\n }\n event.setCanceled(true);\n }\n }\n }\n}\n"
|
"private void readHeader(DataInputStream stream) throws IOException {\n int headerLength = readInt(stream, bigEndian);\n if ((headerLength != DARPA_TG_HEADER.length() + 1) && (headerLength != DARPA_QG_HEADER.length() + 1) && (headerLength != DARPA_NG_HEADER.length() - 1)) {\n headerLength = Utilities.swapInteger(headerLength);\n if (headerLength == (DARPA_TG_HEADER.length() + 1) || headerLength == (DARPA_QG_HEADER.length() + 1) || headerLength == (DARPA_NG_HEADER.length() - 1)) {\n bigEndian = false;\n } else {\n throw new Error(\"String_Node_Str\" + headerLength + \"String_Node_Str\");\n }\n } else {\n }\n String header = readString(stream, headerLength - 1);\n readByte(stream);\n if (!header.equals(DARPA_TG_HEADER) & !header.equals(DARPA_QG_HEADER) & !Pattern.matches(DARPA_NG_HEADER, header)) {\n throw new Error(\"String_Node_Str\" + header);\n } else {\n if (header.equals(DARPA_TG_HEADER))\n maxNGram = 3;\n else if (header.equals(DARPA_QG_HEADER))\n maxNGram = 4;\n else {\n Pattern p = Pattern.compile(\"String_Node_Str\");\n Matcher m = p.matcher(header);\n maxNGram = Integer.parseInt(m.group());\n }\n }\n int fileNameLength = readInt(stream, bigEndian);\n skipStreamBytes(stream, fileNameLength);\n numberNGrams = new int[maxNGram];\n NGramOffset = new long[maxNGram];\n NGramProbTable = new float[maxNGram][];\n NGramBackoffTable = new float[maxNGram][];\n NGramSegmentTable = new int[maxNGram][];\n numberNGrams[0] = 0;\n logNGramSegmentSize = LOG2_NGRAM_SEGMENT_SIZE;\n int version = readInt(stream, bigEndian);\n bytesPerField = 2;\n if (version <= 0) {\n readInt(stream, bigEndian);\n if (version <= -3)\n bytesPerField = 4;\n int formatLength;\n for (; ; ) {\n if ((formatLength = readInt(stream, bigEndian)) == 0) {\n break;\n }\n bytesRead += (long) stream.skipBytes(formatLength);\n }\n if (version == -2) {\n logNGramSegmentSize = readInt(stream, bigEndian);\n if (logNGramSegmentSize < 1 || logNGramSegmentSize > 15) {\n throw new Error(\"String_Node_Str\");\n }\n }\n numberNGrams[0] = readInt(stream, bigEndian);\n } else {\n numberNGrams[0] = version;\n }\n if (numberNGrams[0] <= 0) {\n throw new Error(\"String_Node_Str\" + numberNGrams[0] + \"String_Node_Str\");\n }\n for (int i = 1; i < maxNGram; i++) {\n if ((numberNGrams[i] = readInt(stream, bigEndian)) < 0) {\n throw new Error(\"String_Node_Str\" + String.valueOf(i) + \"String_Node_Str\" + numberNGrams[i]);\n }\n }\n}\n"
|
"public SequenceDescriptor getSequenceDescriptor(SchemaDescriptor sd, String sequenceName) throws StandardException {\n DataValueDescriptor schemaIDOrderable;\n DataValueDescriptor sequenceNameOrderable;\n TabInfoImpl ti = getNonCoreTI(SYSSEQUENCES_CATALOG_NUM);\n sequenceNameOrderable = new SQLVarchar(sequenceName);\n schemaIDOrderable = getIDValueAsCHAR(sd.getUUID());\n ExecIndexRow keyRow = exFactory.getIndexableRow(2);\n keyRow.setColumn(1, schemaIDOrderable);\n keyRow.setColumn(2, sequenceNameOrderable);\n SequenceDescriptor sequenceDescriptor = (SequenceDescriptor) getDescriptorViaIndex(SYSSEQUENCESRowFactory.SYSSEQUENCES_INDEX2_ID, keyRow, (ScanQualifier[][]) null, ti, (TupleDescriptor) null, (List) null, false);\n putSequenceID(sequenceDescriptor);\n return sequenceDescriptor;\n}\n"
|
"public static VmSchema getVmSchema(ClusterCreate spec, String nodeGroup, List<DiskSpec> diskSet, String templateVmId, String templateVmSnapId) {\n NodeGroupCreate groupSpec = spec.getNodeGroup(nodeGroup);\n VmSchema schema = new VmSchema();\n ResourceSchema resourceSchema = new ResourceSchema();\n resourceSchema.name = \"String_Node_Str\";\n resourceSchema.cpuReservationMHz = 0;\n resourceSchema.memReservationSize = 0;\n resourceSchema.numCPUs = (groupSpec.getCpuNum() == null) ? 0 : groupSpec.getCpuNum();\n resourceSchema.memSize = (groupSpec.getMemCapacityMB() == null) ? 0 : groupSpec.getMemCapacityMB();\n resourceSchema.priority = com.vmware.aurora.interfaces.model.IDatabaseConfig.Priority.Normal;\n schema.resourceSchema = resourceSchema;\n DiskSchema diskSchema = new DiskSchema();\n ArrayList<Disk> disks = new ArrayList<Disk>(diskSet.size());\n for (DiskSpec disk : diskSet) {\n Disk tmDisk = new Disk();\n tmDisk.name = disk.getName();\n tmDisk.type = disk.getDiskType().getType();\n tmDisk.initialSizeMB = disk.getSize() * 1024;\n if (disk.getAllocType() != null && !disk.getAllocType().isEmpty())\n tmDisk.allocationType = AllocationType.valueOf(disk.getAllocType().toUpperCase());\n else\n tmDisk.allocationType = null;\n tmDisk.datastore = disk.getTargetDs();\n tmDisk.externalAddress = disk.getExternalAddress();\n tmDisk.vmdkPath = disk.getVmdkPath();\n tmDisk.mode = DiskMode.valueOf(disk.getDiskMode());\n disks.add(tmDisk);\n }\n diskSchema.setParent(templateVmId);\n diskSchema.setParentSnap(templateVmSnapId);\n diskSchema.setDisks(disks);\n schema.diskSchema = diskSchema;\n ArrayList<Network> networks = new ArrayList<Network>();\n List<NetworkAdd> networkAdds = spec.getNetworkings();\n int labelIndex = 1;\n for (NetworkAdd networkAdd : networkAdds) {\n Network network = new Network();\n network.vcNetwork = networkAdd.getPortGroup();\n network.nicLabel = NIC_LABEL_PREFIX + labelIndex;\n labelIndex++;\n networks.add(network);\n }\n NetworkSchema networkSchema = new NetworkSchema();\n networkSchema.name = \"String_Node_Str\";\n networkSchema.networks = networks;\n schema.networkSchema = networkSchema;\n return schema;\n}\n"
|
"public boolean canInsertItem(int slot, ItemStack stack, int side) {\n int[] accessibleSlots = getAccessibleSlotsFromSide(side);\n boolean isAccessibleSlot = false;\n for (int i = 0; i < accessibleSlots.length; i++) {\n if (accessibleSlots[i] == slot)\n isAccessibleSlot = true;\n }\n return worldObj.getBlockMetadata(xCoord, yCoord, zCoord) > 0 && hasPrimary() ? this.isItemValidForSlot(slot, stack) && isAccessibleSlot : false;\n}\n"
|
"private void reportWeavingMessage(ShadowMunger munger) {\n Advice advice = (Advice) munger;\n AdviceKind aKind = advice.getKind();\n if (aKind == null || advice.getConcreteAspect() == null) {\n return;\n }\n if (!(aKind.equals(AdviceKind.Before) || aKind.equals(AdviceKind.After) || aKind.equals(AdviceKind.AfterReturning) || aKind.equals(AdviceKind.AfterThrowing) || aKind.equals(AdviceKind.Around) || aKind.equals(AdviceKind.Softener)))\n return;\n String description = advice.getKind().toString();\n String advisedType = this.getEnclosingType().getName();\n String advisingType = advice.getConcreteAspect().getName();\n Message msg = null;\n if (advice.getKind().equals(AdviceKind.Softener)) {\n msg = WeaveMessage.constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_SOFTENS, new String[] { advisedType, beautifyLocation(getSourceLocation()), advisingType, beautifyLocation(munger.getSourceLocation()) }, advisedType, advisingType);\n } else {\n boolean runtimeTest = ((BcelAdvice) advice).hasDynamicTests();\n msg = WeaveMessage.constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_ADVISES, new String[] { advisedType, beautifyLocation(getSourceLocation()), description, advisingType, beautifyLocation(munger.getSourceLocation()), (runtimeTest ? \"String_Node_Str\" : \"String_Node_Str\") });\n }\n getIWorld().getMessageHandler().handleMessage(msg);\n}\n"
|
"public static void setUp() throws WSDLException {\n if (conn == null) {\n try {\n conn = buildConnection();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n String ddlCreateProp = System.getProperty(DATABASE_DDL_CREATE_KEY, DEFAULT_DATABASE_DDL_CREATE);\n if (\"String_Node_Str\".equalsIgnoreCase(ddlCreateProp)) {\n ddlCreate = true;\n }\n String ddlDropProp = System.getProperty(DATABASE_DDL_DROP_KEY, DEFAULT_DATABASE_DDL_DROP);\n if (\"String_Node_Str\".equalsIgnoreCase(ddlDropProp)) {\n ddlDrop = true;\n }\n String ddlDebugProp = System.getProperty(DATABASE_DDL_DEBUG_KEY, DEFAULT_DATABASE_DDL_DEBUG);\n if (\"String_Node_Str\".equalsIgnoreCase(ddlDebugProp)) {\n ddlDebug = true;\n }\n if (ddlCreate) {\n runDdl(conn, CREATE_STRONGLY_TYPED_REF_CURSOR_TABLE, ddlDebug);\n try {\n Statement stmt = conn.createStatement();\n for (int i = 0; i < POPULATE_STRONGLY_TYPED_REF_CURSOR_TABLE.length; i++) {\n stmt.addBatch(POPULATE_STRONGLY_TYPED_REF_CURSOR_TABLE[i]);\n }\n stmt.executeBatch();\n } catch (SQLException e) {\n }\n runDdl(conn, CREATE_STRONGLY_TYPED_REF_CURSOR_TEST_PACKAGE, ddlDebug);\n runDdl(conn, CREATE_STRONGLY_TYPED_REF_CURSOR_TEST_PACKAGE_BODY, ddlDebug);\n }\n username = System.getProperty(DATABASE_USERNAME_KEY, DEFAULT_DATABASE_USERNAME);\n DBWS_BUILDER_XML_USERNAME = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n DBWS_BUILDER_XML_PASSWORD = \"String_Node_Str\";\n DBWS_BUILDER_XML_URL = \"String_Node_Str\";\n DBWS_BUILDER_XML_DRIVER = \"String_Node_Str\";\n DBWS_BUILDER_XML_PLATFORM = \"String_Node_Str\";\n DBWS_BUILDER_XML_MAIN = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + STRONGLY_TYPED_REF_CURSOR_TEST_PACKAGE + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + STRONGLY_TYPED_REF_CURSOR_TEST_PACKAGE + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n builder = new DBWSBuilder();\n DBWSTestSuite.setUp(\"String_Node_Str\");\n}\n"
|
"double normalize(double x, int p){\n\tif (p == 1){\n\t\tdouble v = Math.max(x, min);\n\t\tx = (v - min) / (max - min);\n\t\treturn x;\n\t} else if (p == 2) {\n\t\tdouble v = Math.max(x, min);\n\t\tx = Math.pow((v - min), 2) / Math.pow((max - min), 2);\n\t\treturn x;\n\t}\n}\n"
|
"public CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay) {\n CodeSystem cs = fetchCodeSystem(theContext, theCodeSystem);\n if (cs != null) {\n CodeValidationResult retVal = testIfConceptIsInList(theCode, cs.getConcept());\n if (retVal != null) {\n return retVal;\n }\n }\n return new CodeValidationResult(IssueSeverity.INFORMATION, \"String_Node_Str\" + theCodeSystem + \"String_Node_Str\" + theCode);\n}\n"
|
"private void doCommandAnalyse() throws IOException {\n if (featureDir == null)\n throw new RuntimeException(\"String_Node_Str\");\n if (maxentModelFilePath == null)\n throw new RuntimeException(\"String_Node_Str\");\n if (outfilePath == null)\n throw new RuntimeException(\"String_Node_Str\");\n CSVEventListReader reader = this.getReader(TrainingSetType.ALL_TEST, false);\n GenericEvents events = reader.getEvents();\n try {\n LOG.info(\"String_Node_Str\");\n ZipInputStream zis = new ZipInputStream(new FileInputStream(maxentModelFilePath));\n ZipEntry ze;\n while ((ze = zis.getNextEntry()) != null) {\n if (ze.getName().endsWith(\"String_Node_Str\"))\n break;\n }\n MaxentModel model = new MaxentModelReader(zis).getModel();\n zis.close();\n MaxentAnalyser analyser = new MaxentAnalyser();\n analyser.setMaxentModel(model);\n if (preferredOutcome != null) {\n analyser.setPreferredOutcome(preferredOutcome);\n analyser.setBias(bias);\n }\n if (outfilePath.lastIndexOf('/') >= 0) {\n String outDirPath = outfilePath.substring(0, outfilePath.lastIndexOf('/'));\n File outDir = new File(outDirPath);\n outDir.mkdirs();\n }\n File outcomeFile = new File(outfilePath);\n if (outfilePath.endsWith(\"String_Node_Str\")) {\n MaxentOutcomeXmlWriter xmlWriter = new MaxentOutcomeXmlWriter(outcomeFile);\n xmlWriter.setMinProbToConsider(minProbToConsider);\n xmlWriter.setUnknownOutcomeName(unknownOutcomeName);\n analyser.addObserver(xmlWriter);\n } else {\n MaxentOutcomeCsvWriter csvWriter = new MaxentOutcomeCsvWriter(model, outcomeFile);\n csvWriter.setMinProbToConsider(minProbToConsider);\n csvWriter.setUnknownOutcomeName(unknownOutcomeName);\n analyser.addObserver(csvWriter);\n }\n MaxentBestFeatureObserver bestFeatureObserver = null;\n if (!crossValidation && featureCount > 0 && resultFilePath != null) {\n bestFeatureObserver = new MaxentBestFeatureObserver(model, featureCount, reader.getFeatureToFileMap());\n analyser.addObserver(bestFeatureObserver);\n }\n MaxentFScoreCalculator maxentFScoreCalculator = null;\n if (resultFilePath != null) {\n maxentFScoreCalculator = new MaxentFScoreCalculator();\n maxentFScoreCalculator.setMinProbToConsider(minProbToConsider);\n maxentFScoreCalculator.setUnknownOutcomeName(unknownOutcomeName);\n analyser.addObserver(maxentFScoreCalculator);\n }\n analyser.analyse(events);\n if (maxentFScoreCalculator != null) {\n FScoreCalculator<String> fscoreCalculator = maxentFScoreCalculator.getFscoreCalculator();\n LOG.info(\"String_Node_Str\" + fscoreCalculator.getTotalFScore());\n File fscoreFile = new File(outfilePath + \"String_Node_Str\");\n fscoreCalculator.writeScoresToCSVFile(fscoreFile);\n }\n if (bestFeatureObserver != null) {\n File weightPerFileFile = new File(outfilePath + \"String_Node_Str\");\n weightPerFileFile.delete();\n weightPerFileFile.createNewFile();\n Writer weightPerFileWriter = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(weightPerFileFile, false), \"String_Node_Str\"));\n try {\n bestFeatureObserver.writeFileTotalsToFile(weightPerFileWriter);\n } finally {\n weightPerFileWriter.flush();\n weightPerFileWriter.close();\n }\n LOG.debug(\"String_Node_Str\" + reader.getFeatures().size());\n }\n } catch (IOException ioe) {\n LogUtils.logError(LOG, ioe);\n throw new RuntimeException(ioe);\n }\n if (generateEventFile) {\n File eventFile = new File(outfilePath + \"String_Node_Str\");\n this.generateEventFile(eventFile, events);\n }\n LOG.info(\"String_Node_Str\");\n}\n"
|
"private String createDigestResponse(byte[] challenge) throws SaslException {\n char[] response;\n StringBuffer digestResponse = new StringBuffer(512);\n int realmSize;\n m_dc = new DigestChallenge(challenge);\n m_digestURI = m_protocol + \"String_Node_Str\" + m_serverName;\n if ((m_dc.getQop() & DigestChallenge.QOP_AUTH) == DigestChallenge.QOP_AUTH)\n m_qopValue = \"String_Node_Str\";\n else\n throw new SaslException(\"String_Node_Str\");\n Callback[] callbacks = new Callback[3];\n ArrayList realms = m_dc.getRealms();\n realmSize = realms.size();\n if (realmSize == 0) {\n callbacks[0] = new RealmCallback(\"String_Node_Str\");\n } else if (realmSize == 1) {\n callbacks[0] = new RealmCallback(\"String_Node_Str\", (String) realms.get(0));\n } else {\n callbacks[0] = new RealmChoiceCallback(\"String_Node_Str\", (String[]) realms.toArray(new String[realmSize]), 0, false);\n }\n callbacks[1] = new PasswordCallback(\"String_Node_Str\", false);\n if (m_authorizationId == null || m_authorizationId.length() == 0)\n callbacks[2] = new NameCallback(\"String_Node_Str\");\n else\n callbacks[2] = new NameCallback(\"String_Node_Str\", m_authorizationId);\n try {\n m_cbh.handle(callbacks);\n } catch (UnsupportedCallbackException e) {\n throw new SaslException(\"String_Node_Str\" + \"String_Node_Str\", e);\n } catch (IOException e) {\n throw new SaslException(\"String_Node_Str\", e);\n }\n if (realmSize > 1) {\n int[] selections = ((RealmChoiceCallback) callbacks[0]).getSelectedIndexes();\n if (selections.length > 0)\n m_realm = ((RealmChoiceCallback) callbacks[0]).getChoices()[selections[0]];\n else\n m_realm = ((RealmChoiceCallback) callbacks[0]).getChoices()[0];\n } else\n m_realm = ((RealmCallback) callbacks[0]).getText();\n m_clientNonce = getClientNonce();\n m_name = ((NameCallback) callbacks[2]).getName();\n if (m_name == null)\n m_name = ((NameCallback) callbacks[2]).getDefaultName();\n if (m_name == null)\n throw new SaslException(\"String_Node_Str\");\n m_HA1 = DigestCalcHA1(m_dc.getAlgorithm(), m_name, m_realm, new String(((PasswordCallback) callbacks[1]).getPassword()), m_dc.getNonce(), m_clientNonce);\n response = DigestCalcResponse(m_HA1, m_dc.getNonce(), \"String_Node_Str\", m_clientNonce, m_qopValue, \"String_Node_Str\", m_digestURI, true);\n digestResponse.append(\"String_Node_Str\");\n digestResponse.append(m_name);\n if (0 != m_realm.length()) {\n digestResponse.append(\"String_Node_Str\");\n digestResponse.append(m_realm);\n }\n digestResponse.append(\"String_Node_Str\");\n digestResponse.append(m_clientNonce);\n digestResponse.append(\"String_Node_Str\");\n digestResponse.append(\"String_Node_Str\");\n digestResponse.append(\"String_Node_Str\");\n digestResponse.append(m_qopValue);\n digestResponse.append(\"String_Node_Str\");\n digestResponse.append(m_serverName);\n digestResponse.append(\"String_Node_Str\");\n digestResponse.append(response);\n digestResponse.append(\"String_Node_Str\");\n digestResponse.append(m_dc.getNonce());\n digestResponse.append(\"String_Node_Str\");\n return digestResponse.toString();\n}\n"
|
"boolean isValid(RangerPolicy policy, Action action, boolean isAdmin, List<ValidationFailureDetails> failures) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(String.format(\"String_Node_Str\", policy, action, isAdmin, failures));\n }\n if (!(action == Action.CREATE || action == Action.UPDATE)) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n boolean valid = true;\n if (policy == null) {\n String message = \"String_Node_Str\";\n LOG.debug(message);\n failures.add(new ValidationFailureDetailsBuilder().field(\"String_Node_Str\").isMissing().becauseOf(message).build());\n valid = false;\n } else {\n Long id = policy.getId();\n if (action == Action.UPDATE) {\n if (id == null) {\n String message = \"String_Node_Str\";\n LOG.debug(message);\n failures.add(new ValidationFailureDetailsBuilder().field(\"String_Node_Str\").isMissing().becauseOf(message).build());\n valid = false;\n } else if (getPolicy(id) == null) {\n failures.add(new ValidationFailureDetailsBuilder().field(\"String_Node_Str\").isSemanticallyIncorrect().becauseOf(\"String_Node_Str\" + id + \"String_Node_Str\").build());\n valid = false;\n }\n }\n String policyName = policy.getName();\n String serviceName = policy.getService();\n if (StringUtils.isBlank(policyName)) {\n String message = \"String_Node_Str\" + policyName + \"String_Node_Str\";\n LOG.debug(message);\n failures.add(new ValidationFailureDetailsBuilder().field(\"String_Node_Str\").isMissing().becauseOf(message).build());\n valid = false;\n } else {\n List<RangerPolicy> policies = getPolicies(serviceName, policyName);\n if (CollectionUtils.isNotEmpty(policies)) {\n if (policies.size() > 1) {\n failures.add(new ValidationFailureDetailsBuilder().isAnInternalError().becauseOf(\"String_Node_Str\" + policyName + \"String_Node_Str\").build());\n valid = false;\n } else if (action == Action.CREATE) {\n failures.add(new ValidationFailureDetailsBuilder().field(\"String_Node_Str\").isSemanticallyIncorrect().becauseOf(\"String_Node_Str\" + policyName + \"String_Node_Str\" + policies.iterator().next().getId() + \"String_Node_Str\").build());\n valid = false;\n } else if (!policies.iterator().next().getId().equals(id)) {\n failures.add(new ValidationFailureDetailsBuilder().field(\"String_Node_Str\").isSemanticallyIncorrect().becauseOf(\"String_Node_Str\" + policyName + \"String_Node_Str\" + policies.iterator().next().getId() + \"String_Node_Str\").build());\n valid = false;\n }\n }\n }\n RangerService service = null;\n if (StringUtils.isBlank(serviceName)) {\n failures.add(new ValidationFailureDetailsBuilder().field(\"String_Node_Str\").isMissing().becauseOf(\"String_Node_Str\").build());\n valid = false;\n } else {\n service = getService(serviceName);\n if (service == null) {\n failures.add(new ValidationFailureDetailsBuilder().field(\"String_Node_Str\").isSemanticallyIncorrect().becauseOf(\"String_Node_Str\").build());\n valid = false;\n }\n }\n List<RangerPolicyItem> policyItems = policy.getPolicyItems();\n boolean isAuditEnabled = getIsAuditEnabled(policy);\n RangerServiceDef serviceDef = null;\n String serviceDefName = null;\n if (CollectionUtils.isEmpty(policyItems) && !isAuditEnabled) {\n failures.add(new ValidationFailureDetailsBuilder().field(\"String_Node_Str\").isMissing().becauseOf(\"String_Node_Str\").build());\n valid = false;\n } else if (service != null) {\n serviceDefName = service.getType();\n serviceDef = getServiceDef(serviceDefName);\n if (serviceDef == null) {\n failures.add(new ValidationFailureDetailsBuilder().field(\"String_Node_Str\").isAnInternalError().becauseOf(\"String_Node_Str\").build());\n valid = false;\n } else {\n valid = isValidPolicyItems(policyItems, failures, serviceDef) && valid;\n }\n }\n valid = isValidResources(policy, failures, action, isAdmin, serviceDef, serviceName) && valid;\n }\n if (LOG.isDebugEnabled()) {\n LOG.debug(String.format(\"String_Node_Str\", policy, action, isAdmin, failures, valid));\n }\n return valid;\n}\n"
|
"public static float[] getCoeffs(float[] sourceCoords, int sourceOffset, float[] destCoords, int destOffset, int numCoords, float preScaleX, float preScaleY, float postScaleX, float postScaleY, int degree) {\n int i, j, k;\n int equations = numCoords / 2;\n int unknowns = (degree + 1) * (degree + 2) / 2;\n float[] out = new float[2 * unknowns];\n if ((degree == 1) && (numCoords == 3)) {\n double x0, x1, x2, y0, y1, y2;\n double u0, u1, u2, v0, v1, v2;\n x0 = sourceCoords[0] / postScaleX;\n y0 = sourceCoords[1] / postScaleY;\n x1 = sourceCoords[2] / postScaleX;\n y1 = sourceCoords[3] / postScaleY;\n x2 = sourceCoords[4] / postScaleX;\n y2 = sourceCoords[5] / postScaleY;\n u0 = destCoords[0] * preScaleX;\n v0 = destCoords[1] * preScaleY;\n u1 = destCoords[2] * preScaleX;\n v1 = destCoords[3] * preScaleY;\n u2 = destCoords[4] * preScaleX;\n v2 = destCoords[5] * preScaleY;\n double v0mv1 = v0 - v1;\n double v1mv2 = v1 - v2;\n double v2mv0 = v2 - v0;\n double u1mu0 = u1 - u0;\n double u2mu1 = u2 - u1;\n double u0mu2 = u0 - u2;\n double u1v2mu2v1 = u1 * v2 - u2 * v1;\n double u2v0mu0v2 = u2 * v0 - u0 * v2;\n double u0v1mu1v0 = u0 * v1 - u1 * v0;\n double invdet = 1.0F / (u0 * (v1mv2) + v0 * (u2mu1) + (u1v2mu2v1));\n out[0] = (float) (((v1mv2) * x0 + (v2mv0) * x1 + (v0mv1) * x2) * invdet);\n out[1] = (float) (((u2mu1) * x0 + (u0mu2) * x1 + (u1mu0) * x2) * invdet);\n out[2] = (float) (((u1v2mu2v1) * x0 + (u2v0mu0v2) * x1 + (u0v1mu1v0) * x2) * invdet);\n out[3] = (float) (((v1mv2) * y0 + (v2mv0) * y1 + (v0mv1) * y2) * invdet);\n out[4] = (float) (((u2mu1) * y0 + (u0mu2) * y1 + (u1mu0) * y2) * invdet);\n out[5] = (float) (((u1v2mu2v1) * y0 + (u2v0mu0v2) * y1 + (u0v1mu1v0) * y2) * invdet);\n return out;\n }\n double[][] A = new double[equations][unknowns];\n double[] xpow = new double[degree + 1];\n double[] ypow = new double[degree + 1];\n for (i = 0; i < equations; i++) {\n double[] Ai = A[i];\n double x = destCoords[2 * i + destOffset] / postScaleX;\n double y = destCoords[2 * i + 1 + destOffset] / postScaleY;\n double xtmp = 1.0F;\n double ytmp = 1.0F;\n for (int d = 0; d <= degree; d++) {\n xpow[d] = xtmp;\n ypow[d] = ytmp;\n xtmp *= x;\n ytmp *= y;\n }\n int index = 0;\n for (int deg = 0; deg <= degree; deg++) {\n for (int ydeg = 0; ydeg <= deg; ydeg++) {\n Ai[index++] = xpow[deg - ydeg] * ypow[ydeg];\n }\n }\n }\n double[][] V = new double[unknowns][unknowns];\n double[] W = new double[unknowns];\n double[][] U = new double[equations][unknowns];\n SVD(A, W, U, V);\n for (j = 0; j < unknowns; j++) {\n double winv = W[j];\n if (winv != 0.0) {\n winv = 1.0F / winv;\n }\n for (i = 0; i < unknowns; i++) {\n V[i][j] *= winv;\n }\n }\n double[][] VWINVUT = matmul_t(V, U);\n for (i = 0; i < unknowns; i++) {\n double tmp0 = 0;\n double tmp1 = 0;\n for (j = 0; j < equations; j++) {\n double val = VWINVUT[i][j];\n tmp0 += val * sourceCoords[2 * j + sourceOffset] * preScaleX;\n tmp1 += val * sourceCoords[2 * j + 1 + sourceOffset] * preScaleY;\n }\n out[i] = (float) tmp0;\n out[i + unknowns] = (float) tmp1;\n }\n return out;\n}\n"
|
"private ScopDomain getScopDomain(String scopId) {\n if (scopInstallation == null) {\n scopInstallation = ScopFactory.getSCOP();\n }\n return scopInstallation.getDomainByScopID(scopId);\n}\n"
|
"private static long parseLong0(CharSequence sequence, final int p, int lim) throws NumericException {\n if (lim == p) {\n throw NumericException.INSTANCE;\n }\n boolean negative = sequence.charAt(p) == '-';\n int i = p;\n if (negative) {\n i++;\n }\n if (i >= lim) {\n throw NumericException.INSTANCE;\n }\n long val = 0;\n for (; i < lim; i++) {\n int c = sequence.charAt(i);\n if (c == 'L' || c == 'l') {\n if (i == 0 || i + 1 < lim) {\n throw NumericException.INSTANCE;\n }\n break;\n }\n if (c < '0' || c > '9') {\n throw NumericException.INSTANCE;\n }\n long r = (val << 3) + (val << 1) - (c - '0');\n if (r > val) {\n throw NumericException.INSTANCE;\n }\n val = r;\n }\n if (val == Long.MIN_VALUE && !negative) {\n throw NumericException.INSTANCE;\n }\n return negative ? val : -val;\n}\n"
|
"public void post() throws Exception {\n ClientDispatcher myClient = new ClientDispatcher();\n TransportImpl myTransport = new TransportImpl(null);\n myClient.init(myTransport);\n FailureDetector myFd = _tport1.getFD();\n FDUtil.ensureFD(myFd);\n ByteBuffer myBuffer = ByteBuffer.allocate(4);\n myBuffer.putInt(55);\n Proposal myProp = new Proposal(\"String_Node_Str\", myBuffer.array());\n myClient.send(new Envelope(myProp), _tport1.getLocalAddress());\n VoteOutcome myEv = myClient.getNext(10000);\n Assert.assertFalse((myEv == null));\n Assert.assertTrue(myEv.getResult() == VoteOutcome.Reason.VALUE);\n AcceptorLearner myAl = _node2.getAcceptorLearner();\n Common myCommon = _node2.getCore().getCommon();\n Collect myCollect = new Collect(myAl.getLowWatermark().getSeqNum() + 1, myAl.getLeaderRndNum() + 1);\n myClient.send(myCollect, _tport2.getLocalAddress());\n Thread.sleep(5000);\n Assert.assertTrue(myAl.getStats().getIgnoredCollectsCount() == 1);\n}\n"
|
"public static void removeStarColors(Item fireworkStar, DyeColor... colors) {\n if (fireworkStar == null || fireworkStar.getType() != ItemType.FireworkStar) {\n return;\n }\n if (colors == null || colors.length < 1) {\n return;\n }\n if (verifyTags(fireworkStar, \"String_Node_Str\", COMPOUND, false)) {\n ArrayList<Integer> rawColors = new ArrayList<Integer>();\n for (int index = 0; index < colors.length; index++) {\n if (colors[index] == null || colors[index] == DyeColor.CUSTOM) {\n continue;\n }\n rawColors.add(colors[index].getDecimalCode());\n }\n int[] rawColorsArray = new int[rawColors.size()];\n for (int index = 0; index < rawColors.size(); index++) {\n rawColorsArray[index] = rawColors.get(index);\n }\n removeStarColorsRaw(fireworkStar, rawColorsArray);\n }\n}\n"
|
"public void write(DataOutput out) throws IOException {\n new BooleanWritable(null != context.getXUpdated()).write(out);\n if (null != context.getXUpdated()) {\n writer.set(context.getXUpdated());\n writer.write(out);\n }\n new BooleanWritable(null != context.getUInitial()).write(out);\n if (null != context.getUInitial()) {\n writer.set(context.getUInitial());\n writer.write(out);\n }\n new BooleanWritable(null != context.getZUpdated()).write(out);\n if (null != context.getZUpdated()) {\n writer.set(context.getZUpdated());\n writer.write(out);\n }\n new DoubleWritable(context.getRho()).write(out);\n new DoubleWritable(context.getLambdaValue()).write(out);\n new DoubleWritable(context.getPrimalObjectiveValue()).write(out);\n new LongWritable(context.getCount()).write(out);\n}\n"
|
"public void enable() {\n GridComponentPattern grid = getGrid();\n for (ViewGridColumnModuleColumnModel columnModel : columns) {\n grid.addColumn(columnModel.getName(), columnModel.getFields(), columnModel.getExpression(), columnModel.getLink(), columnModel.getWidth(), columnModel.getOrderable(), columnModel.getSearchable(), pluginIdentifier);\n }\n}\n"
|
"public void retire(BigInteger id, Integer retire) {\n Project project = getNotNullById(id);\n Config config = configService.getConfigByTokenName(project.getTokenName());\n Boolean canRetire = project.getStatus().equals(2) && project.getRetire().equals(0) && config.getWithdrawStatus().equals(0);\n Assert.isTrue(canRetire, MessageConstants.CANNOT_RETIRE);\n project.setRetire(1);\n projectMapper.updateByPrimaryKeySelective(project);\n projectMapper.retireBalance(id);\n projectMapper.retireToken(id, config.getId());\n orderService.updateStatusByProject(id, CommonConstants.ORDER_STATUS_RETIRE);\n}\n"
|
"public Token getToken() throws IllegalActionException {\n Token token = super.getToken();\n if (token != _token) {\n Iterator attributes = attributeList(UnitCategory.class).iterator();\n if (attributes.hasNext()) {\n UnitCategory category = (UnitCategory) attributes.next();\n int index = UnitSystem.getUnitCategoryIndex(category);\n if (index >= 0) {\n ((ScalarToken) token).setUnitCategory(index);\n }\n }\n _token = token;\n }\n return _token;\n}\n"
|
"private int throwError() {\n throw new IllegalArgumentException();\n}\n"
|
"public boolean loadUpdates(Startup startupOutput) {\n String notes = null;\n try {\n startupOutput.setStatus(\"String_Node_Str\");\n PatchNotesDownloader notesDownloader = new PatchNotesDownloader(getPatchNotesLink());\n notesDownloader.downloadVersionNotes(programVersion);\n notes = notesDownloader.getVersionNotes();\n if (notesDownloader.updateAvailable()) {\n UpdateDownloader myDownloader = new UpdateDownloader(getUpdateLink(), getBetaUpdateLink());\n UpdatePrompt myPrompt = null;\n boolean shouldUpdate;\n if (!headless) {\n myPrompt = new UpdatePrompt(\"String_Node_Str\", myDownloader.getUpdateSize(), notesDownloader.getUpdateLevel(), programVersion, notesDownloader.getVersionNotes(programVersion));\n startupOutput.stop();\n myPrompt.showWindow();\n try {\n myPrompt.waitForClose();\n } catch (InterruptedException e) {\n }\n shouldUpdate = myPrompt.shouldUpdateProgram();\n } else {\n System.out.println(\"String_Node_Str\");\n System.out.println(\"String_Node_Str\" + programVersion);\n System.out.println(\"String_Node_Str\" + notesDownloader.getUpdateLevel());\n System.out.println(\"String_Node_Str\" + myDownloader.getUpdateSize());\n System.out.print(\"String_Node_Str\");\n Scanner in = new Scanner(System.in);\n shouldUpdate = in.nextLine().toUpperCase().startsWith(\"String_Node_Str\");\n }\n if (myPrompt.shouldUpdateProgram()) {\n myDownloader.updateProgram(myPrompt, new File(PAXChecker.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath()));\n System.exit(0);\n } else {\n startupOutput.start();\n }\n }\n } catch (IOException | URISyntaxException e) {\n e.printStackTrace();\n return false;\n }\n patchNotes = notes;\n return true;\n}\n"
|
"public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime * result + ((fFile == null) ? 0 : fFile.getLocation().hashCode());\n result = prime * result + ((fTrace == null) ? 0 : fTrace.getName().hashCode());\n return result;\n}\n"
|
"private String parseAggregate(String expr) {\n int i = expr.indexOf(\"String_Node_Str\");\n if (aggregateParts.length >= 2 && i >= 0) {\n String aggregate = expr.substring(0, i);\n if (aggregate.length() == 0) {\n aggregateFunction = null;\n aggregateField = null;\n } else {\n int f1 = aggregate.indexOf(\"String_Node_Str\");\n int f2 = aggregate.indexOf(\"String_Node_Str\");\n if (f1 != -1 && f2 != -1 && f2 > f1) {\n aggregateFunction = aggregate.substring(0, f1);\n aggregateField = aggregate.substring(f1 + 1, f2);\n } else {\n aggregateFunction = aggregate;\n aggregateField = \"String_Node_Str\";\n }\n }\n return expr.substring(i + 1);\n }\n aggregateFunction = null;\n aggregateField = null;\n return expr;\n}\n"
|
"public void testGetOutputFileURI() throws Exception {\n PayloadFilesManager.Temp instance = new PayloadFilesManager.Temp(Logger.getAnonymousLogger());\n try {\n String originalPath = \"String_Node_Str\";\n Part testPart = PayloadImpl.Part.newInstance(\"String_Node_Str\", originalPath, null, \"String_Node_Str\");\n URI result = instance.getOutputFileURI(testPart, testPart.getName());\n assertTrue(result.toASCIIString().endsWith(\"String_Node_Str\"));\n } finally {\n instance.cleanup();\n }\n}\n"
|
"public void chooseComparator(int column, boolean ascending) {\n Comparator selected;\n String sortedHeader = listTable.getTableFormat().getFieldName(column);\n if (comparators[column].size() > 0) {\n int comparatorIndex = columnClicks[column] % comparators[column].size();\n sortedHeader = sortedHeader + \"String_Node_Str\" + comparatorNames[column].get(comparatorIndex);\n selected = (Comparator) comparators[column].get(comparatorIndex);\n } else {\n selected = new ComparableComparator();\n }\n if (!ascending)\n selected = new ReverseComparator(selected);\n sortedList.setComparator(selected);\n for (int c = 0; c < table.getColumnCount(); c++) {\n int modelColumn = table.convertColumnIndexToModel(c);\n if (modelColumn == column) {\n table.getColumnModel().getColumn(c).setHeaderValue(sortedHeader);\n } else {\n String header = listTable.getTableFormat().getFieldName(c);\n table.getColumnModel().getColumn(c).setHeaderValue(header);\n }\n }\n table.getTableHeader().revalidate();\n table.getTableHeader().repaint();\n}\n"
|
"public BigDecimal getSalePrice(PurchaseOrder purchaseOrder, Product product, BigDecimal price) throws AxelorException {\n TaxLine saleTaxLine = accountManagementService.getTaxLine(purchaseOrder.getOrderDate(), product, purchaseOrder.getCompany(), purchaseOrder.getSupplierPartner().getFiscalPosition(), false);\n price = this.convertUnitPrice(product, saleTaxLine, price, purchaseOrder);\n price = price.multiply(product.getManagPriceCoef());\n return currencyService.getAmountCurrencyConverted(product.getSaleCurrency(), purchaseOrder.getCurrency(), price, purchaseOrder.getOrderDate()).setScale(generalService.getNbDecimalDigitForUnitPrice(), RoundingMode.HALF_UP);\n}\n"
|
"public Token subtract(Token rightArg) throws IllegalActionException {\n int typeInfo = TypeCPO.compare(this, rightArg);\n try {\n if (typeInfo == CPO.LOWER) {\n return rightArg.subtractR(this);\n } else if (rightArg instanceof DoubleToken) {\n double result = _value - ((DoubleToken) rightArg).getValue();\n return new DoubleToken(result);\n } else if (typeInfo == CPO.HIGHER) {\n DoubleToken tmp = (DoubleToken) this.convert(rightArg);\n double result = _value - tmp.getValue();\n return new DoubleToken(result);\n } else {\n throw new Exception();\n }\n } catch (Exception ex) {\n String str = \"String_Node_Str\";\n str = str + this.getClass().getName() + \"String_Node_Str\";\n str = str + rightArg.getClass().getName();\n throw new IllegalActionException(str + \"String_Node_Str\" + ex.getMessage());\n }\n}\n"
|
"public void select(Workspace workspace) {\n Lookup.getDefault().lookup(DataTablesController.class).setDataTablesEventListener(DataTableTopComponent.this);\n AttributeModel attributeModel = Lookup.getDefault().lookup(AttributeController.class).getModel();\n dataTablesModel = workspace.getLookup().lookup(DataTablesModel.class);\n if (dataTablesModel == null) {\n workspace.add(dataTablesModel = new DataTablesModel(attributeModel.getNodeTable(), attributeModel.getEdgeTable()));\n }\n nodeAvailableColumnsModel = dataTablesModel.getNodeAvailableColumnsModel();\n edgeAvailableColumnsModel = dataTablesModel.getEdgeAvailableColumnsModel();\n hideTable();\n enableTableControls();\n bannerPanel.setVisible(false);\n attributeModel.addAttributeListener(DataTableTopComponent.this);\n graphModel = gc.getModel();\n graphModel.addGraphListener(DataTableTopComponent.this);\n refreshAllOnce();\n}\n"
|
"public Promise<QueryResponse, ResourceException> queryCollection(final Context context, final QueryRequest request, final QueryResourceHandler handler) {\n logger.debug(\"String_Node_Str\", name, request.getResourcePath());\n QueryRequest repoRequest = Requests.copyOfQueryRequest(request);\n repoRequest.setResourcePath(repoId(null));\n String executeOnRetrieve = request.getAdditionalParameter(\"String_Node_Str\");\n final boolean onRetrieve = executeOnRetrieve == null ? false : Boolean.parseBoolean(executeOnRetrieve);\n final List<Map<String, Object>> results = new ArrayList<Map<String, Object>>();\n final ResourceException[] ex = new ResourceException[] { null };\n try {\n QueryResponse queryResponse = connectionFactory.getConnection().query(context, repoRequest, new QueryResourceHandler() {\n public boolean handleResource(ResourceResponse resource) {\n if (onRetrieve) {\n try {\n onRetrieve(context, request, resource.getId(), resource);\n } catch (ResourceException e) {\n ex[0] = e;\n return false;\n }\n }\n results.add(resource.getContent().asMap());\n if (ContextUtil.isExternal(context)) {\n return handler.handleResource(cullPrivateProperties(resource));\n }\n return handler.handleResource(resource);\n }\n });\n if (ex[0] != null) {\n return newExceptionPromise(ex[0]);\n }\n activityLogger.log(context, request, \"String_Node_Str\" + request.getQueryId() + \"String_Node_Str\" + request.getAdditionalParameters(), request.getQueryId(), null, new JsonValue(results), Status.SUCCESS);\n return newResultPromise(queryResponse);\n } catch (ResourceException e) {\n return newExceptionPromise(e);\n }\n}\n"
|
"private void populateCategoryList() {\n mCategoryLevels = CategoryNode.getSortedListOfCategoriesFromRoot(mCategories);\n for (int i = 0; i < mCategoryLevels.size(); i++) {\n mCategoryNames.put(StringUtils.unescapeHTML(mCategoryLevels.get(i).getName()), i);\n }\n CategoryArrayAdapter categoryAdapter = new CategoryArrayAdapter(this, R.layout.categories_row, mCategoryLevels);\n this.setListAdapter(categoryAdapter);\n if (mSelectedCategories != null) {\n ListView lv = getListView();\n for (String selectedCategory : mSelectedCategories) {\n if (mCategoryNames.keySet().contains(selectedCategory)) {\n lv.setItemChecked(mCategoryNames.get(selectedCategory), true);\n }\n }\n }\n restoreScrollOffset();\n}\n"
|
"private void recordVisibleChildren() {\n for (int i = 0; i < mHelper.getVisibleChildCount(); i++) {\n int adapterPosition = mHelper.getAdapterPositionAt(i);\n if (!mHelper.isLayoutItem(adapterPosition) && !mKnownPositions.get(adapterPosition)) {\n mKnownPositions.put(adapterPosition, true);\n recordItemData(mHelper.getAbsoluteRectForChildViewAt(i), adapterPosition);\n }\n }\n}\n"
|
"public synchronized void discard() {\n final Iterator<TransferEnvelope> it = this.queuedEnvelopes.iterator();\n while (it.hasNext()) {\n final TransferEnvelope transferEnvelope = it.next();\n transferEnvelope.getProcessingLog().setWrittenToCheckpoint();\n }\n this.queuedEnvelopes.clear();\n final File file = new File(getFilename());\n if (file.exists()) {\n try {\n file.delete();\n } catch (SecurityException e) {\n LOG.error(e);\n }\n }\n}\n"
|
"protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_about);\n mResources = getResources();\n StringBuilder builder = new StringBuilder();\n addStringsFromArray(builder, R.array.meta_about, LINE_BREAK + LINE_BREAK);\n addString(builder, LINE_BREAK);\n addStringsFromArray(builder, R.array.meta_questions_answers, LINE_BREAK + LINE_BREAK, true);\n addString(builder, LINE_BREAK);\n addTitleAndBody(builder, R.string.meta_security_title, R.array.meta_security_body);\n addTitleAndBody(builder, R.string.meta_permissions_title, R.array.meta_permissions_body);\n addTitleAndBody(builder, R.string.meta_privacy_title, R.array.meta_privacy_body);\n addTitleAndBody(builder, R.string.meta_open_source_title, R.array.meta_open_source_body);\n builder.setLength(builder.length() - (LINE_BREAK.length() * 3));\n if (Config.DEMO_ACTIVE) {\n final StringBuilder appDescription = new StringBuilder();\n appDescription.append(\"String_Node_Str\");\n appDescription.append(\"String_Node_Str\");\n appDescription.append(Base64.encodeToString(builder.toString().getBytes(), Base64.NO_WRAP));\n appDescription.append(\"String_Node_Str\");\n final String[] descriptionChunks = Strings.splitToChunks(appDescription.toString(), 4000);\n for (String descriptionChunk : descriptionChunks) {\n System.out.println(descriptionChunk);\n }\n }\n mTextViewAbout = (TextView) findViewById(R.id.textViewAbout);\n mTextViewAbout.setText(Html.fromHtml(builder.toString()));\n mButtonRate = (Button) findViewById(R.id.buttonRate);\n mButtonRate.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n final String packageName = getApplicationContext().getPackageName();\n Intent rateIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(String.format(URL_GOOGLE_PLAY, packageName)));\n startActivity(rateIntent);\n }\n });\n findViewById(R.id.buttonTranslate).setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n AlertDialog.Builder builder = new AlertDialog.Builder(ActivityAbout.this);\n builder.setTitle(R.string.translate);\n builder.setMessage(R.string.translate_explanation);\n builder.setNeutralButton(R.string.ok, null);\n builder.show();\n }\n });\n BackgroundPatterns.applyRandomBackground(this, mTextViewAbout);\n getActionBar().setDisplayHomeAsUpEnabled(true);\n}\n"
|
"public static TypePattern read(VersionedDataInputStream s, ISourceContext context) throws IOException {\n UnresolvedType type = UnresolvedType.read(s);\n int index = s.readShort();\n boolean isVarargs = false;\n if (s.getMajorVersion() >= AjAttribute.WeaverVersionInfo.WEAVER_VERSION_MAJOR_AJ150) {\n isVarargs = s.readBoolean();\n }\n TypePattern ret = new BindingTypePattern(type, index, isVarargs);\n ret.readLocation(context, s);\n return ret;\n}\n"
|
"public void testPullRequestLifecycleManagement() throws Exception {\n Thread.sleep(3000);\n List<GHHook> hooks = gitHubRepo.getHooks();\n GHHook webhook = null;\n for (GHHook hook : hooks) {\n if (\"String_Node_Str\".equals(hook.getName()) && webhookUrl.equals(hook.getConfig().get(\"String_Node_Str\"))) {\n webhook = hook;\n break;\n }\n }\n Assert.assertNotNull(MessageFormat.format(\"String_Node_Str\", webhookUrl, gitHubRepo.getUrl()), webhook);\n pullRequest.open();\n TestUtils.waitUntil(new TestUtils.Condition() {\n public boolean satisfied() {\n return project.getLastBuild() != null;\n }\n }.waitUntilSatisfied(60);\n Assert.assertNotNull(MessageFormat.format(\"String_Node_Str\", pullRequest.getGHPullRequest().getUrl()), project.getLastBuild());\n waitForCompletion(TimeUnit.MINUTES.toSeconds(15));\n Assert.assertFalse(MessageFormat.format(\"String_Node_Str\", pullRequest.getGHPullRequest().getUrl()), project.getLastBuild().isBuilding());\n final List<JSONObject> instances = new ArrayList<JSONObject>();\n instances.addAll(checkBuild(null));\n final String triggerPhrase = \"String_Node_Str\";\n pullRequest.comment(triggerPhrase);\n Assert.assertNull(MessageFormat.format(\"String_Node_Str\", triggerPhrase), waitForNextBuild(30));\n updateTriggerPhrase(triggerPhrase);\n pullRequest.comment(triggerPhrase);\n Assert.assertNotNull(MessageFormat.format(\"String_Node_Str\", pullRequest.getGHPullRequest().getUrl()), waitForNextBuild(60));\n waitForCompletion(TimeUnit.MINUTES.toSeconds(15));\n Assert.assertFalse(MessageFormat.format(\"String_Node_Str\", pullRequest.getGHPullRequest().getUrl()), project.getLastBuild().isBuilding());\n instances.addAll(checkBuild(TestUtils.GITHUB_USER));\n pullRequest.close();\n waitForDeletion(instances, TimeUnit.MINUTES.toSeconds(10));\n Assert.assertTrue(\"String_Node_Str\", instances.isEmpty());\n pullRequest.comment(triggerPhrase);\n Assert.assertNull(\"String_Node_Str\", waitForNextBuild(30));\n updateWhitelist(testTag);\n pullRequest.open();\n Assert.assertNull(\"String_Node_Str\", waitForNextBuild(30));\n pullRequest.comment(triggerPhrase);\n Assert.assertNull(\"String_Node_Str\", waitForNextBuild(30));\n pullRequest.close();\n pullRequest.reopen();\n Assert.assertNull(\"String_Node_Str\", waitForNextBuild(30));\n updateWhitelist(testTag + ',' + TestUtils.GITHUB_USER);\n pullRequest.reopen();\n AbstractBuild build = waitForNextBuild(60);\n Assert.assertNotNull(\"String_Node_Str\", build);\n waitForCompletion(TimeUnit.MINUTES.toSeconds(15));\n Assert.assertFalse(MessageFormat.format(\"String_Node_Str\", pullRequest.getGHPullRequest().getUrl()), build.isBuilding());\n instances.addAll(checkBuild(null));\n pullRequest.comment(triggerPhrase);\n build = waitForNextBuild(60);\n Assert.assertNotNull(\"String_Node_Str\", build);\n waitForCompletion(TimeUnit.MINUTES.toSeconds(15));\n instances.addAll(checkBuild(TestUtils.GITHUB_USER));\n pullRequest.close();\n waitForDeletion(instances, TimeUnit.MINUTES.toSeconds(10));\n Assert.assertTrue(\"String_Node_Str\", instances.isEmpty());\n}\n"
|
"public void makeActions(final IWorkbenchWindow window) {\n openFileAction = new OpenFileAction(window);\n register(openFileAction);\n newReportAction = new NewReportAction(window);\n register(newReportAction);\n newLibraryAction = new NewLibraryAction(window);\n register(newLibraryAction);\n newReportTemplateAction = new NewReportTemplateAction(window);\n register(newReportTemplateAction);\n saveAction = ActionFactory.SAVE.create(window);\n register(saveAction);\n saveAsAction = ActionFactory.SAVE_AS.create(window);\n register(saveAsAction);\n saveAllAction = ActionFactory.SAVE_ALL.create(window);\n register(saveAllAction);\n undoAction = ActionFactory.UNDO.create(window);\n register(undoAction);\n redoAction = ActionFactory.REDO.create(window);\n register(redoAction);\n cutAction = ActionFactory.CUT.create(window);\n register(cutAction);\n copyAction = ActionFactory.COPY.create(window);\n register(copyAction);\n pasteAction = ActionFactory.PASTE.create(window);\n register(pasteAction);\n selectAllAction = ActionFactory.SELECT_ALL.create(window);\n register(selectAllAction);\n findAction = ActionFactory.FIND.create(window);\n register(findAction);\n closeAction = ActionFactory.CLOSE.create(window);\n register(closeAction);\n closeAllAction = ActionFactory.CLOSE_ALL.create(window);\n register(closeAllAction);\n helpContentsAction = ActionFactory.HELP_CONTENTS.create(window);\n register(helpContentsAction);\n aboutAction = ActionFactory.ABOUT.create(window);\n aboutAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(\"String_Node_Str\"));\n register(aboutAction);\n openPreferencesAction = ActionFactory.PREFERENCES.create(window);\n register(openPreferencesAction);\n deleteAction = ActionFactory.DELETE.create(window);\n register(deleteAction);\n makeFeatureDependentActions(window);\n lockToolBarAction = ActionFactory.LOCK_TOOL_BAR.create(window);\n register(lockToolBarAction);\n forwardHistoryAction = ActionFactory.FORWARD_HISTORY.create(window);\n register(forwardHistoryAction);\n backwardHistoryAction = ActionFactory.BACKWARD_HISTORY.create(window);\n register(backwardHistoryAction);\n quitAction = ActionFactory.QUIT.create(window);\n register(quitAction);\n Object[] adapters = ElementAdapterManager.getAdapters(this, IExtensionFile.class);\n List<IWorkbenchAction> tempList = new ArrayList<IWorkbenchAction>();\n if (adapters != null) {\n for (int i = 0; i < adapters.length; i++) {\n IExtensionFile newFile = (IExtensionFile) adapters[i];\n INewExtensionFileWorkbenchAction action = newFile.getNewAction();\n if (action == null) {\n continue;\n }\n action.init(window);\n register(action);\n tempList.add(action);\n }\n newActions = tempList.toArray(new IWorkbenchAction[tempList.size()]);\n } else {\n newActios = new IWorkbenchAction[0];\n }\n if (window.getWorkbench().getIntroManager().hasIntro()) {\n introAction = ActionFactory.INTRO.create(window);\n register(introAction);\n }\n pinEditorContributionItem = ContributionItemFactory.PIN_EDITOR.create(window);\n}\n"
|
"protected boolean _resolveDeadlock() throws IllegalActionException {\n if (_writeBlockCount == 0 && _readBlockCount > 0) {\n return false;\n } else if (_getActiveActorsCount() == 0) {\n return false;\n } else {\n _incrementLowestWriteCapacityPort();\n return true;\n }\n}\n"
|
"private boolean bindCustomTabsService() {\n if (mCustomTabsClient != null)\n return true;\n String packageName = CustomTabActivityManager.getInstance().getPackageNameToUse(this);\n if (packageName == null)\n return false;\n mCustomTabsConnection = new CustomTabsServiceConnection() {\n\n public void onCustomTabsServiceConnected(ComponentName name, CustomTabsClient client) {\n mCustomTabsClient = client;\n }\n public void onServiceDisconnected(ComponentName name) {\n mCustomTabsClient = null;\n }\n });\n}\n"
|
"private void makeFieldCache(CtMember.Cache cache) {\n List list = getClassFile3(false).getFields();\n int n = list.size();\n for (int i = 0; i < n; ++i) {\n FieldInfo finfo = (FieldInfo) list.get(i);\n CtField newField = new CtField(finfo, this);\n cache.addField(newField);\n }\n}\n"
|
"protected void onFailure(final RequestFailureType type, Throwable t, StatusLine status, final String readableMessage) {\n final RRError error = General.getGeneralErrorForFailure(context, type, t, status, url.toString());\n AndroidApi.UI_THREAD_HANDLER.post(new Runnable() {\n\n public void run() {\n mRequest = null;\n progressBar.setVisibility(View.GONE);\n layout.addView(new ErrorView(ImageViewActivity.this, error));\n }\n });\n}\n"
|
"private static void printTargets(final Project project, final Vector<String> names, final Vector<String> descriptions, final Vector<Enumeration<String>> dependencies, final String heading, final int maxlen) {\n final String lSep = System.getProperty(\"String_Node_Str\");\n String spaces = \"String_Node_Str\";\n while (spaces.length() <= maxlen) {\n spaces += spaces;\n }\n final StringBuilder msg = new StringBuilder();\n msg.append(heading + lSep + lSep);\n final int size = names.size();\n for (int i = 0; i < size; i++) {\n msg.append(\"String_Node_Str\");\n msg.append(names.elementAt(i));\n if (descriptions != null) {\n msg.append(spaces.substring(0, maxlen - names.elementAt(i).length() + 2));\n msg.append(descriptions.elementAt(i));\n }\n msg.append(lSep);\n if (!dependencies.isEmpty()) {\n final Enumeration<String> deps = dependencies.elementAt(i);\n if (deps.hasMoreElements()) {\n msg.append(\"String_Node_Str\");\n while (deps.hasMoreElements()) {\n msg.append(deps.nextElement());\n if (deps.hasMoreElements()) {\n msg.append(\"String_Node_Str\");\n }\n }\n msg.append(lSep);\n }\n }\n }\n project.log(msg.toString(), Project.MSG_WARN);\n}\n"
|
"private String addWhereToSqlStringStatement(List<String> whereExpressions, String completedSqlString) throws ParseException {\n return dbms().addWhereToSqlStringStatement(completedSqlString, whereExpressions);\n}\n"
|
"public void stateChanged(ChangeEvent e) {\n JSlider slider = (JSlider) e.getSource();\n if (!slider.getValueIsAdjusting()) {\n int frequencyBand = Integer.parseInt(slider.getName());\n float w = slider.getValue() / 100f;\n if (w != model.getEqualizerWeight(frequencyBand)) {\n model.setEqualizerWeight(frequencyBand, w);\n generalizeAndRender();\n }\n }\n}\n"
|
"private void getCurrentBasicBlock(Function function) {\n currentBasicBlock = new BasicBlock(function, currentSymbolTable);\n function.pushBack(currentBasicBlock);\n}\n"
|
"public List<? extends PortForwardingRule> listPortForwardingRules(ListPortForwardingRulesCmd cmd) {\n Long ipId = cmd.getIpAddressId();\n Long id = cmd.getId();\n Account caller = UserContext.current().getCaller();\n List<Long> permittedAccounts = new ArrayList<Long>();\n if (ipId != null) {\n IPAddressVO ipAddressVO = _ipAddressDao.findById(ipId);\n if (ipAddressVO == null || !ipAddressVO.readyToUse()) {\n throw new InvalidParameterValueException(\"String_Node_Str\" + ipId + \"String_Node_Str\");\n }\n _accountMgr.checkAccess(caller, null, true, ipAddressVO);\n }\n Ternary<Long, Boolean, ListProjectResourcesCriteria> domainIdRecursiveListProject = new Ternary<Long, Boolean, ListProjectResourcesCriteria>(cmd.getDomainId(), cmd.isRecursive(), null);\n _accountMgr.buildACLSearchParameters(caller, id, cmd.getAccountName(), cmd.getProjectId(), permittedAccounts, domainIdRecursiveListProject, cmd.listAll(), false);\n Long domainId = domainIdRecursiveListProject.first();\n Boolean isRecursive = domainIdRecursiveListProject.second();\n ListProjectResourcesCriteria listProjectResourcesCriteria = domainIdRecursiveListProject.third();\n Filter filter = new Filter(PortForwardingRuleVO.class, \"String_Node_Str\", false, cmd.getStartIndex(), cmd.getPageSizeVal());\n SearchBuilder<PortForwardingRuleVO> sb = _portForwardingDao.createSearchBuilder();\n _accountMgr.buildACLSearchBuilder(sb, domainId, isRecursive, permittedAccounts, listProjectResourcesCriteria);\n sb.and(\"String_Node_Str\", sb.entity().getId(), Op.EQ);\n sb.and(\"String_Node_Str\", sb.entity().getSourceIpAddressId(), Op.EQ);\n sb.and(\"String_Node_Str\", sb.entity().getPurpose(), Op.EQ);\n SearchCriteria<PortForwardingRuleVO> sc = sb.create();\n _accountMgr.buildACLSearchCriteria(sc, domainId, isRecursive, permittedAccounts, listProjectResourcesCriteria);\n if (id != null) {\n sc.setParameters(\"String_Node_Str\", id);\n }\n if (ipId != null) {\n sc.setParameters(\"String_Node_Str\", ipId);\n }\n sc.setParameters(\"String_Node_Str\", Purpose.PortForwarding);\n return _portForwardingDao.search(sc, filter);\n}\n"
|
"protected void compress() {\n for (int i = 0; i < _compactors.size(); i++) {\n if (_compactors.get(i).size() >= capacity(i)) {\n if (i + 1 >= _h)\n grow();\n _compactors.get(i + 1).addAll(_compactors.get(i).compact());\n int size = 0;\n for (int j = 0; j < _compactors.size(); j++) size += _compactors.get(j).size();\n _size = size;\n break;\n }\n }\n }\n}\n"
|
"public org.hl7.fhir.dstu2.model.Conformance convertConformance(org.hl7.fhir.dstu3.model.CapabilityStatement src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2.model.Conformance tgt = new org.hl7.fhir.dstu2.model.Conformance();\n copyDomainResource(src, tgt);\n tgt.setUrl(src.getUrl());\n tgt.setVersion(src.getVersion());\n tgt.setName(src.getName());\n tgt.setStatus(convertConformanceResourceStatus(src.getStatus()));\n if (src.hasExperimental())\n tgt.setExperimental(src.getExperimental());\n if (src.hasDate())\n tgt.setDate(src.getDate());\n tgt.setPublisher(src.getPublisher());\n for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertConformanceContactComponent(t));\n tgt.setDescription(src.getDescription());\n tgt.setRequirements(src.getPurpose());\n tgt.setCopyright(src.getCopyright());\n tgt.setKind(convertConformanceStatementKind(src.getKind()));\n tgt.setSoftware(convertConformanceSoftwareComponent(src.getSoftware()));\n if (src.hasImplementation())\n tgt.setImplementation(convertConformanceImplementationComponent(src.getImplementation()));\n tgt.setFhirVersion(src.getFhirVersion());\n tgt.setAcceptUnknown(convertUnknownContentCode(src.getAcceptUnknown()));\n for (org.hl7.fhir.dstu3.model.CodeType t : src.getFormat()) tgt.addFormat(t.getValue());\n for (org.hl7.fhir.dstu3.model.Reference t : src.getProfile()) tgt.addProfile(convertReference(t));\n for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestComponent t : src.getRest()) tgt.addRest(convertConformanceRestComponent(t));\n for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingComponent t : src.getMessaging()) tgt.addMessaging(convertConformanceMessagingComponent(t));\n for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementDocumentComponent t : src.getDocument()) tgt.addDocument(convertConformanceDocumentComponent(t));\n return tgt;\n}\n"
|
"public void mouseClicked(MouseEvent e) {\n int x = e.getX(), y = e.getY();\n int bodyPart = getEquipPlace(x, y);\n if (bodyPart != -1 && !player.isFree(bodyPart))\n addActionRequest(\"String_Node_Str\" + player.name + \"String_Node_Str\" + bodyPart);\n if (x < 440 || x > 630 || y < 30 || y > 260)\n return;\n x -= 440;\n y -= 30;\n x /= 40;\n y /= 40;\n int itemIndex = x + 5 * y;\n if (itemIndex < player.getInventory().getSize()) {\n GameItem item = player.getInventory().getItem(itemIndex);\n if (item != null) {\n if (item instanceof Weapon || item instanceof Armor) {\n if (e.getButton() == 3)\n addActionRequest(\"String_Node_Str\" + player.name + \"String_Node_Str\" + itemIndex);\n else\n addActionRequest(\"String_Node_Str\" + player.name + \"String_Node_Str\" + itemIndex);\n } else if (item instanceof UsableItem) {\n addActionRequest(\"String_Node_Str\" + player.name + \"String_Node_Str\" + itemIndex);\n }\n }\n }\n}\n"
|
"public void onValueChange(ValueChangeEvent<String> event) {\n String encodedToken = event.getValue();\n if (encodedToken == null || encodedToken.length() == 0) {\n return;\n }\n WaveRef waveRef;\n try {\n waveRef = GwtWaverefEncoder.decodeWaveRefFromPath(encodedToken);\n } catch (InvalidWaveRefException e) {\n LOG.info(\"String_Node_Str\" + encodedToken);\n return;\n }\n LOG.info(\"String_Node_Str\" + waveRef.toString());\n ClientEvents.get().fireEvent(new WaveSelectionEvent(waveRef));\n}\n"
|
"public void testSetRollbackOnly() {\n EntityManager em = createEntityManager();\n beginTransaction(em);\n Employee emp = null;\n Employee emp2 = null;\n try {\n emp = new Employee();\n emp.setFirstName(\"String_Node_Str\");\n emp.setLastName(\"String_Node_Str\");\n em.persist(emp);\n emp2 = new Employee();\n emp2.setFirstName(\"String_Node_Str\");\n emp2.setLastName(\"String_Node_Str\");\n em.persist(emp2);\n commitTransaction(em);\n } catch (RuntimeException ex) {\n if (isTransactionActive(em)) {\n rollbackTransaction(em);\n }\n closeEntityManager(em);\n throw ex;\n }\n clearCache();\n em = createEntityManager();\n beginTransaction(em);\n List result = em.createQuery(\"String_Node_Str\" + emp.getId() + \"String_Node_Str\" + emp2.getId()).getResultList();\n emp = (Employee) result.get(0);\n emp.toString();\n emp2 = (Employee) result.get(1);\n String newName = \"String_Node_Str\" + System.currentTimeMillis();\n emp2.setFirstName(newName);\n em.flush();\n emp2.setLastName(\"String_Node_Str\");\n emp2.setVersion(0);\n try {\n em.flush();\n } catch (Exception ex) {\n if (!isOnServer()) {\n em.clear();\n try {\n String eName = (String) em.createQuery(\"String_Node_Str\" + emp2.getId()).getSingleResult();\n assertTrue(\"String_Node_Str\", eName.equals(newName));\n } catch (Exception ignore) {\n }\n }\n }\n try {\n if (isOnServer()) {\n assertTrue(\"String_Node_Str\", !isTransactionActive(em));\n } else {\n assertTrue(\"String_Node_Str\", em.getTransaction().getRollbackOnly());\n }\n } finally {\n try {\n commitTransaction(em);\n } catch (RollbackException ex) {\n return;\n } catch (RuntimeException ex) {\n if (ex.getCause() instanceof javax.transaction.RollbackException) {\n return;\n }\n if (ex.getCause() instanceof javax.persistence.RollbackException) {\n return;\n }\n if (isTransactionActive(em)) {\n rollbackTransaction(em);\n }\n throw ex;\n }\n }\n fail(\"String_Node_Str\");\n}\n"
|
"static byte[] createOutputScript(Address to) {\n try {\n ByteArrayOutputStream bits = new ByteArrayOutputStream();\n writeBytes(bits, pubkey);\n bits.write(OP_CHECKSIG);\n return bits.toByteArray();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n}\n"
|
"private void registerTabListItemSkinlistener() {\n PacketListener tablistListener = new PacketAdapter(PacketAdapter.params(SkinsRestorer.getInstance(), PacketType.Play.Server.PLAYER_INFO).listenerPriority(ListenerPriority.HIGHEST)) {\n\n public void onPacketSending(PacketEvent event) {\n StructureModifier<GameProfile> profiles = event.getPacket().getSpecificModifier(GameProfile.class);\n GameProfile profile = profiles.read(0);\n String name = profile.getName();\n SkinsRestorer.getInstance().logDebug(\"String_Node_Str\" + name);\n if (SkinsRestorer.getInstance().getSkinStorage().hasLoadedSkinData(name)) {\n SkinsRestorer.getInstance().logDebug(\"String_Node_Str\" + name);\n SkinProfile skinprofile = SkinsRestorer.getInstance().getSkinStorage().getLoadedSkinData(name);\n profiles.write(0, ProfileUtils.recreateProfile(profile, skinprofile, name.equals(event.getPlayer().getName())));\n }\n }\n };\n ProtocolLibrary.getProtocolManager().addPacketListener(tablistListener);\n}\n"
|
"private boolean discriiminatorMatches(List<StringType> diff, List<StringType> base) {\n if (diff.isEmpty() || base.isEmpty())\n return true;\n if (diff.size() != base.size())\n return false;\n for (int i = 0; i < diff.size(); i++) if (!diff.get(i).getValue().equals(base.get(i).getValue()))\n return false;\n return true;\n}\n"
|
"protected Control createDialogArea(Composite parent) {\n Composite top = new Composite(parent, SWT.NONE);\n top.setLayout(new GridLayout());\n dateTime = new DateTime(top, SWT.CALENDAR);\n dateTime.setLayoutData(new GridData(GridData.FILL_BOTH));\n if (isDatetime) {\n Label dt = new Label(top, SWT.NONE);\n dt.setText(DefaultMessagesImpl.getString(\"String_Node_Str\"));\n timet = new DateTime(top, SWT.TIME);\n timet.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n }\n return top;\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.