content stringlengths 40 137k |
|---|
"private void fix(String location1, String location2) {\n Location loc1 = coords.getLocation(location1, world);\n Location loc2 = coords.getLocation(location2, world);\n if (loc1 == null || loc2 == null) {\n return;\n }\n if (loc1.getX() > loc2.getX()) {\n double tmp = loc1.getX();\n loc1.setX(loc2.getX());\n loc2.setX(tmp);\n }\n if (loc1.getZ() > loc2.getZ()) {\n double tmp = loc1.getZ();\n loc1.setZ(loc2.getZ());\n loc2.setZ(tmp);\n }\n if (loc1.getY() > loc2.getY()) {\n double tmp = loc1.getY();\n loc1.setY(loc2.getY());\n loc2.setY(tmp);\n }\n if (!arena.getWorld().getName().equals(world.getName())) {\n arena.setWorld(world);\n coords.set(location1, loc1);\n coords.set(location2, loc2);\n}\n"
|
"public void complexSimpleCaseInSelectTest() {\n EntityManager em = createEntityManager();\n Vector expectedResult = new Vector(2);\n expectedResult.add(\"String_Node_Str\");\n expectedResult.add(\"String_Node_Str\");\n for (int i = 0; i < 13; i++) {\n expectedResult.add(\"String_Node_Str\");\n }\n clearCache();\n String ejbqlString = \"String_Node_Str\";\n List result = (List) em.createQuery(ejbqlString).getResultList();\n Assert.assertTrue(\"String_Node_Str\", comparer.compareObjects(result, expectedResult));\n}\n"
|
"public static int getVersion() {\n return version;\n}\n"
|
"public void drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected) {\n button.x = GuiWDL.this.width / 2 - 100;\n button.y = y;\n button.drawButton(mc, mouseX, mouseY);\n if (button.isMouseOver()) {\n displayedTooltip = tooltip;\n }\n}\n"
|
"private boolean setState(int state) {\n stateMachine = state;\n switch(stateMachine) {\n case STATE_VREG_OFF:\n if (DEBUG)\n System.out.println(\"String_Node_Str\");\n break;\n case STATE_POWER_DOWN:\n rxfifoReadPos = 0;\n rxfifoWritePos = 0;\n break;\n case STATE_RX_CALIBRATE:\n setSymbolEvent(12);\n break;\n case STATE_RX_SFD_SEARCH:\n zero_symbols = 0;\n status |= STATUS_RSSI_VALID;\n break;\n case STATE_TX_CALIBRATE:\n setSymbolEvent(12 + 2);\n break;\n case STATE_TX_PREAMBLE:\n shr_pos = 0;\n SHR[0] = 0;\n SHR[1] = 0;\n SHR[2] = 0;\n SHR[3] = 0;\n SHR[4] = 0x7A;\n shrNext();\n break;\n case STATE_TX_FRAME:\n txfifo_pos = 0;\n txNext();\n break;\n case STATE_RX_WAIT:\n setSymbolEvent(8);\n break;\n case STATE_IDLE:\n status &= ~STATUS_RSSI_VALID;\n break;\n }\n return true;\n}\n"
|
"private void setSharedPoint(int i, int j, Screenshot expected, Screenshot actual, ImageDiff diff) {\n if (Coords.ofImage(expected.getImage()).contains(i, j)) {\n diff.getDiffImage().setRGB(i, j, expected.getImage().getRGB(i, j));\n } else if (Coords.ofImage(actual.getImage()).contains(i, j)) {\n diff.getDiffImage().setRGB(i, j, actual.getImage().getRGB(i, j));\n }\n}\n"
|
"public void checkLinks() {\n boolean isJoblet = false;\n if (PluginChecker.isJobLetPluginLoaded()) {\n IJobletProviderService service = (IJobletProviderService) GlobalServiceRegister.getDefault().getService(IJobletProviderService.class);\n if (service != null && service.isJobletComponent(this)) {\n isJoblet = true;\n }\n }\n if (!(Boolean) getPropertyValue(EParameterName.STARTABLE.getName())) {\n if ((getCurrentActiveLinksNbInput(EConnectionType.FLOW_MAIN) == 0) && (getConnectorFromType(EConnectionType.FLOW_MAIN).getMinLinkInput() == 0) & (getConnectorFromType(EConnectionType.FLOW_MAIN).getMaxLinkInput() != 0)) {\n String errorMessage = Messages.getString(\"String_Node_Str\");\n Problems.add(ProblemStatus.WARNING, this, errorMessage);\n }\n if ((getCurrentActiveLinksNbInput(EConnectionType.FLOW_MAIN) == 0) && (getCurrentActiveLinksNbInput(EConnectionType.FLOW_REF) > 0)) {\n String errorMessage = Messages.getString(\"String_Node_Str\");\n Problems.add(ProblemStatus.WARNING, this, errorMessage);\n }\n }\n if ((getConnectorFromType(EConnectionType.FLOW_MAIN).getMaxLinkInput() == 0) && (getConnectorFromType(EConnectionType.FLOW_MAIN).getMaxLinkOutput() != 0)) {\n if ((getCurrentActiveLinksNbOutput(EConnectionType.FLOW_MAIN) == 0) && (getCurrentActiveLinksNbOutput(EConnectionType.FLOW_MERGE) == 0) && (getCurrentActiveLinksNbOutput(EConnectionType.FLOW_REF) == 0) && (getCurrentActiveLinksNbOutput(EConnectionType.ITERATE) == 0)) {\n String errorMessage = Messages.getString(\"String_Node_Str\");\n Problems.add(ProblemStatus.WARNING, this, errorMessage);\n }\n }\n if (!isJoblet) {\n if (!isSubProcessStart() || (!(Boolean) getPropertyValue(EParameterName.STARTABLE.getName()))) {\n if ((getCurrentActiveLinksNbOutput(EConnectionType.ON_SUBJOB_OK) > 0) || getCurrentActiveLinksNbOutput(EConnectionType.ON_SUBJOB_ERROR) > 0) {\n String errorMessage = Messages.getString(\"String_Node_Str\");\n Problems.add(ProblemStatus.ERROR, this, errorMessage);\n }\n }\n if ((!isELTComponent() && !isSubProcessStart()) || (!(Boolean) getPropertyValue(EParameterName.STARTABLE.getName()))) {\n if ((getCurrentActiveLinksNbInput(EConnectionType.ON_SUBJOB_OK) > 0) || (getCurrentActiveLinksNbInput(EConnectionType.RUN_IF) > 0) || (getCurrentActiveLinksNbInput(EConnectionType.ON_COMPONENT_OK) > 0) || (getCurrentActiveLinksNbInput(EConnectionType.ON_COMPONENT_ERROR) > 0) || (getCurrentActiveLinksNbInput(EConnectionType.STARTS) > 0)) {\n String errorMessage = Messages.getString(\"String_Node_Str\");\n Problems.add(ProblemStatus.ERROR, this, errorMessage);\n }\n }\n if (isHL7Output()) {\n if (getIncomingConnections(EConnectionType.FLOW_MERGE).size() <= 0) {\n String errorMessage = Messages.getString(\"String_Node_Str\");\n Problems.add(ProblemStatus.ERROR, this, errorMessage);\n } else {\n List<Map<String, String>> maps = (List<Map<String, String>>) ElementParameterParser.getObjectValue(this, \"String_Node_Str\");\n List<IMetadataTable> tables = this.getMetadataList();\n for (IConnection connection : getIncomingConnections(EConnectionType.FLOW_MERGE)) {\n IMetadataTable metadataTable = connection.getMetadataTable();\n String rowName = connection.getUniqueName();\n String schemaName = null;\n for (Map<String, String> map : maps) {\n if (map.containsValue(rowName)) {\n if (map.get(\"String_Node_Str\") != null && map.get(\"String_Node_Str\").equals(rowName)) {\n schemaName = map.get(\"String_Node_Str\");\n break;\n }\n }\n }\n for (IMetadataTable nodeTable : tables) {\n if (schemaName != null && nodeTable.getLabel() != null && nodeTable.getLabel().equals(schemaName)) {\n if (!metadataTable.sameMetadataAs(nodeTable, IMetadataColumn.OPTIONS_NONE)) {\n String errorMessage = Messages.getString(\"String_Node_Str\");\n Problems.add(ProblemStatus.ERROR, this, errorMessage);\n }\n }\n }\n }\n }\n }\n }\n int jobletBuildConnectorNum = 0;\n for (INodeConnector nodeConnector : listConnector) {\n if (!nodeConnector.getDefaultConnectionType().hasConnectionCategory(IConnectionCategory.USE_HASH) && nodeConnector.getDefaultConnectionType() != EConnectionType.FLOW_MERGE) {\n int nbMaxOut;\n nbMaxOut = nodeConnector.getMaxLinkOutput();\n int nbMaxIn;\n nbMaxIn = nodeConnector.getMaxLinkInput();\n int nbMinOut;\n nbMinOut = nodeConnector.getMinLinkOutput();\n int nbMinIn;\n nbMinIn = nodeConnector.getMinLinkInput();\n int curLinkOut;\n curLinkOut = nodeConnector.getCurLinkNbOutput();\n int curLinkIn;\n curLinkIn = nodeConnector.getCurLinkNbInput();\n String typeName = nodeConnector.getMenuName();\n if (nodeConnector.getDefaultConnectionType() == EConnectionType.FLOW_MAIN) {\n typeName = \"String_Node_Str\";\n if (isJoblet) {\n if (nodeConnector.isBuiltIn()) {\n jobletBuildConnectorNum++;\n }\n continue;\n }\n }\n if (nbMaxOut != -1) {\n if (curLinkOut > nbMaxOut) {\n String errorMessage = Messages.getString(\"String_Node_Str\", typeName);\n Problems.add(ProblemStatus.WARNING, this, errorMessage);\n }\n }\n if (nbMinOut != 0) {\n if (curLinkOut < nbMinOut) {\n String errorMessage = Messages.getString(\"String_Node_Str\", typeName);\n Problems.add(ProblemStatus.WARNING, this, errorMessage);\n }\n }\n if (!isJoblet) {\n if (nbMaxIn != -1) {\n if (curLinkIn > nbMaxIn) {\n String errorMessage = Messages.getString(\"String_Node_Str\", typeName);\n Problems.add(ProblemStatus.WARNING, this, errorMessage);\n }\n }\n if (nbMinIn != 0) {\n if (curLinkIn < nbMinIn) {\n String errorMessage = Messages.getString(\"String_Node_Str\", typeName);\n Problems.add(ProblemStatus.WARNING, this, errorMessage);\n }\n }\n }\n }\n }\n if (isJoblet) {\n List<? extends IConnection> outgoingConnections = this.getOutgoingConnections(EConnectionType.FLOW_MAIN);\n for (IConnection con : outgoingConnections) {\n INodeConnector connector = this.getConnectorFromName(con.getConnectorName());\n if (connector == null && con instanceof Connection) {\n ((Connection) con).disconnect();\n }\n }\n String typeName = \"String_Node_Str\";\n outgoingConnections = this.getOutgoingConnections(EConnectionType.FLOW_MAIN);\n if (outgoingConnections.size() > jobletBuildConnectorNum) {\n String errorMessage = Messages.getString(\"String_Node_Str\", typeName);\n Problems.add(ProblemStatus.WARNING, this, errorMessage);\n } else if (outgoingConnections.size() < jobletBuildConnectorNum) {\n String errorMessage = Messages.getString(\"String_Node_Str\", typeName);\n Problems.add(ProblemStatus.WARNING, this, errorMessage);\n }\n }\n}\n"
|
"public UserPropertyDefn getCopy() {\n UserPropertyDefn prop = (UserPropertyDefn) (propDefn).copy();\n return prop;\n}\n"
|
"public int computeMaxKeyguardNotifications(int maximum) {\n float minPadding = mClockPositionAlgorithm.getMinStackScrollerPadding(getHeight(), mKeyguardStatusView.getHeight());\n int notificationPadding = Math.max(1, getResources().getDimensionPixelSize(R.dimen.notification_divider_height));\n final int overflowheight = getResources().getDimensionPixelSize(R.dimen.notification_summary_height);\n float bottomStackSize = mNotificationStackScroller.getKeyguardBottomStackSize();\n float availableSpace = mNotificationStackScroller.getHeight() - minPadding - overflowheight - bottomStackSize;\n int count = 0;\n for (int i = 0; i < mNotificationStackScroller.getChildCount(); i++) {\n ExpandableView child = (ExpandableView) mNotificationStackScroller.getChildAt(i);\n if (!(child instanceof ExpandableNotificationRow)) {\n continue;\n }\n ExpandableNotificationRow row = (ExpandableNotificationRow) child;\n boolean suppressedSummary = mGroupManager.isSummaryOfSuppressedGroup(row.getStatusBarNotification());\n if (suppressedSummary) {\n continue;\n }\n availableSpace -= child.getMinHeight() + notificationPadding;\n if (availableSpace >= 0 && count < maximum) {\n count++;\n } else {\n return count;\n }\n }\n return count;\n}\n"
|
"public RegionFile getRegionFile(File serverDirectory, int chunkX, int chunkZ) {\n int actualX = chunkX >> 5;\n int actualZ = chunkZ >> 5;\n File regionDir = new File(serverDirectory, \"String_Node_Str\");\n File actualFile = new File(regionDir, \"String_Node_Str\" + actualX + \"String_Node_Str\" + actualZ + \"String_Node_Str\");\n RegionFile file = this.regionFiles.get(actualFile);\n if (file == null) {\n if (!regionDir.exists()) {\n regionDir.mkdirs();\n }\n try {\n file = new RegionFile(actualFile);\n } catch (IOException | DataFormatException | NBTException e) {\n e.printStackTrace();\n }\n this.regionFiles.put(actualFile, file);\n }\n return file;\n}\n"
|
"public void createControl(Composite parent) {\n ChartUIUtil.bindHelp(parent, ChartHelpContextIds.SUBTASK_TITLE);\n init();\n cmpContent = new Composite(parent, SWT.NONE);\n {\n cmpContent.setLayout(new GridLayout());\n GridData gd = new GridData(GridData.FILL_BOTH);\n cmpContent.setLayoutData(gd);\n }\n Composite cmpBasic = new Composite(cmpContent, SWT.NONE);\n {\n cmpBasic.setLayout(new GridLayout(3, false));\n GridData gd = new GridData(GridData.FILL_BOTH);\n cmpBasic.setLayoutData(gd);\n }\n Label lblTitle = new Label(cmpBasic, SWT.NONE);\n {\n lblTitle.setText(Messages.getString(\"String_Node_Str\"));\n }\n List<String> keys = null;\n if (getContext().getUIServiceProvider() != null) {\n keys = getContext().getUIServiceProvider().getRegisteredKeys();\n }\n txtTitle = new ExternalizedTextEditorComposite(cmpBasic, SWT.BORDER, -1, -1, keys, getContext().getUIServiceProvider(), getChart().getTitle().getLabel().getCaption().getValue());\n {\n GridData gdTXTTitle = new GridData();\n gdTXTTitle.widthHint = 200;\n txtTitle.setLayoutData(gdTXTTitle);\n if (!getChart().getTitle().isVisible()) {\n txtTitle.setEnabled(false);\n }\n txtTitle.addListener(this);\n }\n btnVisible = new Button(cmpBasic, SWT.CHECK);\n {\n btnVisible.setText(Messages.getString(\"String_Node_Str\"));\n btnVisible.setSelection(getChart().getTitle().isVisible());\n btnVisible.addSelectionListener(this);\n }\n Label lblFont = new Label(cmpBasic, SWT.NONE);\n lblFont.setText(Messages.getString(\"String_Node_Str\"));\n fdcFont = new FontDefinitionComposite(cmpBasic, SWT.NONE, getContext(), getChart().getTitle().getLabel().getCaption().getFont(), getChart().getTitle().getLabel().getCaption().getColor(), true);\n GridData gdFDCFont = new GridData();\n gdFDCFont.heightHint = fdcFont.getPreferredSize().y;\n gdFDCFont.widthHint = 200;\n gdFDCFont.grabExcessVerticalSpace = false;\n fdcFont.setLayoutData(gdFDCFont);\n fdcFont.addListener(this);\n createButtonGroup(cmpContent);\n}\n"
|
"public void testRebuildReferenceFile() {\n DBConnectionParameters dbConnectionParameters = DBConnectorFactory.getDBConnectionParameters();\n try {\n new RebuildReferenceFile(dbConnectionParameters);\n } catch (DBConnectionException e) {\n fail(\"String_Node_Str\" + e.getMessage());\n }\n}\n"
|
"public void fillBuffer() {\n if (buffer == null || !bufferIterator.hasNext()) {\n try {\n buffer = kafkaConsumer.poll(3000);\n } catch (OffsetOutOfRangeException outOfRangeException) {\n handleOffsetOutOfRange(outOfRangeException);\n buffer = null;\n bufferIterator = null;\n fillBuffer();\n return;\n }\n bufferIterator = buffer.iterator();\n }\n}\n"
|
"protected void createPage2() {\n if (!GlobalServiceRegister.getDefault().isServiceRegistered(ICreateXtextProcessService.class)) {\n return;\n }\n String scriptValue = \"String_Node_Str\";\n try {\n IProject currentProject = ResourceModelUtils.getProject(ProjectManager.getInstance().getCurrentProject());\n String jobScriptVersion = \"String_Node_Str\";\n if (getEditorInput() != null && getEditorInput() instanceof RepositoryEditorInput) {\n Item item = ((RepositoryEditorInput) getEditorInput()).getItem();\n if (item != null) {\n Property property = item.getProperty();\n if (property != null) {\n jobScriptVersion = \"String_Node_Str\" + property.getVersion();\n }\n }\n }\n IFile file = currentProject.getFolder(\"String_Node_Str\").getFile(getEditorInput().getName() + jobScriptVersion + \"String_Node_Str\" + \"String_Node_Str\");\n ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(scriptValue.getBytes());\n if (file.exists()) {\n file.delete(true, null);\n file.create(byteArrayInputStream, true, null);\n file.setContents(byteArrayInputStream, 0, null);\n } else {\n file.create(byteArrayInputStream, true, null);\n }\n String pointId = \"String_Node_Str\";\n IEditorInput editorInput = new FileEditorInput(file);\n IExtensionPoint ep = RegistryFactory.getRegistry().getExtensionPoint(\"String_Node_Str\");\n IExtension[] extensions = ep.getExtensions();\n IExtension ex;\n IConfigurationElement confElem = null;\n for (IExtension extension : extensions) {\n ex = extension;\n if (ex.getContributor().getName().equals(\"String_Node_Str\")) {\n for (IConfigurationElement c : ex.getConfigurationElements()) {\n if (c.getName().equals(\"String_Node_Str\") && c.getAttribute(\"String_Node_Str\").equals(pointId)) {\n confElem = c;\n break;\n }\n }\n }\n }\n if (confElem != null) {\n TextEditor editor = (TextEditor) confElem.createExecutableExtension(\"String_Node_Str\");\n if (editor != null) {\n int index = addPage(editor, editorInput);\n setPageText(index, \"String_Node_Str\");\n }\n }\n } catch (PartInitException e) {\n ExceptionHandler.process(e);\n } catch (PersistenceException e) {\n ExceptionHandler.process(e);\n } catch (CoreException e) {\n ExceptionHandler.process(e);\n }\n}\n"
|
"public boolean hasNext() {\n return list != null && index + 1 < list.size();\n}\n"
|
"public void testWeatherServiceExported() {\n waitOnContextCreation(\"String_Node_Str\");\n waitOnContextCreation(\"String_Node_Str\");\n BundleContext context = getBundleContext();\n ServiceReference ref = context.getServiceReference(\"String_Node_Str\");\n assertNotNull(\"String_Node_Str\", ref);\n try {\n WeatherService weather = (WeatherService) context.getService(ref);\n assertNotNull(\"String_Node_Str\", weather);\n } finally {\n context.ungetService(ref);\n }\n}\n"
|
"public IValue withType(IType type, ITypeContext typeContext, MarkerList markers, IContext context) {\n if (this.isType(type)) {\n this.type = type;\n IType type1 = this.type.resolveTypeSafely(RETURN_TYPE);\n this.action = this.action.withType(type1, typeContext, markers, context);\n return this;\n }\n return null;\n}\n"
|
"private void applyQueryOnExtent(List<Object> ret, QueryAdvice qa) {\n QueryTreeNode queryTree = qa.getQuery();\n Iterator<?> ext2;\n if (!ignoreCache) {\n ClientSessionCache cache = pm.getSession().internalGetCache();\n cache.persistReachableObjects();\n }\n if (qa.getIndex() != null) {\n ext2 = pm.getSession().getPrimaryNode().readObjectFromIndex(qa.getIndex(), qa.getMin(), qa.getMax(), !ignoreCache);\n if (!ignoreCache) {\n ClientSessionCache cache = pm.getSession().internalGetCache();\n ArrayList<ZooPC> dirtyObjs = cache.getDirtyObjects();\n if (!dirtyObjs.isEmpty()) {\n QueryMergingIterator<ZooPC> qmi = new QueryMergingIterator();\n qmi.add((Iterator<ZooPC>) ext2);\n qmi.add(cache.iterator(candClsDef, subClasses, ObjectState.PERSISTENT_NEW));\n ext2 = qmi;\n }\n }\n } else {\n if (ext != null) {\n ext2 = ext.iterator();\n } else {\n ext2 = new ExtentImpl(candCls, subClasses, pm, ignoreCache).iterator();\n }\n }\n if (ext != null && !subClasses) {\n while (ext2.hasNext()) {\n Object o = ext2.next();\n if (subClasses) {\n if (!candCls.isAssignableFrom(o.getClass())) {\n continue;\n }\n } else {\n if (candCls != o.getClass()) {\n continue;\n }\n }\n boolean isMatch = queryTree.evaluate(o);\n if (isMatch) {\n ret.add(o);\n }\n }\n } else {\n while (ext2.hasNext()) {\n Object o = ext2.next();\n boolean isMatch = queryTree.evaluate(o);\n if (isMatch) {\n ret.add(o);\n }\n }\n }\n if (ext2 instanceof CloseableIterator) {\n ((CloseableIterator) ext2).close();\n }\n}\n"
|
"public boolean allowClick(BaseCommodityViewModel commodityViewModel) {\n String selectedSource = (String) spinnerSource.getSelectedItem();\n if (selectedSource.equals(getString(R.string.zonal_store_for_receive))) {\n return commodityViewModel.getCommodity().isNonLGA();\n } else {\n if (\"String_Node_Str\".equals(commodityViewModel.getCommodity().getCategory().getName())) {\n return false;\n } else {\n return !commodityViewModel.getCommodity().isNonLGA();\n }\n }\n}\n"
|
"public EasyJsonObject action(Sender sender, int command, EasyJsonObject requestObject) throws SQLException {\n String name = requestObject.getString(\"String_Node_Str\");\n SafeResultSet resultSet = database.executeQuery(\"String_Node_Str\", name, \"String_Node_Str\");\n if (resultSet.next()) {\n responseObject.put(\"String_Node_Str\", resultSet.getInt(\"String_Node_Str\"));\n responseObject.put(\"String_Node_Str\", resultSet.getInt(\"String_Node_Str\"));\n } else {\n responseObject.put(\"String_Node_Str\", 404);\n }\n return responseObject;\n}\n"
|
"public int hashCode() {\n return Arrays.hashCode(getCanonicalEncoding());\n}\n"
|
"public synchronized void onDownloadedPackage(final DownloadLink downloadLink) {\n final PackageData dat = (PackageData) downloadLink.getProperty(\"String_Node_Str\");\n logger.finer(\"String_Node_Str\");\n if (dat == null) {\n logger.severe(\"String_Node_Str\");\n return;\n }\n dat.setProperty(\"String_Node_Str\", downloadLink.getFileOutput());\n dat.setDownloaded(true);\n ArrayList<PackageData> data = (ArrayList<PackageData>) CFGConfig.getConfig(\"String_Node_Str\").getProperty(\"String_Node_Str\", new ArrayList<PackageData>());\n for (PackageData pd : data) {\n if (pd.isDownloaded())\n logger.finer(pd.getStringProperty(\"String_Node_Str\") + \"String_Node_Str\" + pd.getStringProperty(\"String_Node_Str\"));\n if (pd == dat)\n logger.finer(\"String_Node_Str\");\n {\n dat = pd;\n found = true;\n dat.setProperty(\"String_Node_Str\", downloadLink.getFileOutput());\n dat.setDownloaded(true);\n CFGConfig.getConfig(\"String_Node_Str\").save();\n new Thread() {\n\n public void run() {\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n JDUtilities.getController().removeDownloadLink(downloadLink);\n JDUtilities.getController().fireControlEvent(new ControlEvent(this, ControlEvent.CONTROL_LINKLIST_STRUCTURE_CHANGED, null));\n boolean ch = false;\n all: for (FilePackage fp : JDUtilities.getController().getPackages()) {\n for (DownloadLink dLink : fp.getDownloadLinks()) {\n if (dLink.getLinkType() == DownloadLink.LINKTYPE_JDU) {\n ch = true;\n break all;\n }\n }\n }\n if (!ch) {\n String list = \"String_Node_Str\";\n for (PackageData pa : getDownloadedPackages()) {\n list += pa.getStringProperty(\"String_Node_Str\") + \"String_Node_Str\" + pa.getStringProperty(\"String_Node_Str\") + \"String_Node_Str\";\n }\n String message = JDLocale.LF(\"String_Node_Str\", \"String_Node_Str\", list);\n boolean ret = JDUtilities.getGUI().showCountdownConfirmDialog(message, 15);\n if (ret) {\n new JDInit().doWebupdate(JDUtilities.getConfiguration().getIntegerProperty(Configuration.CID, -1), true);\n }\n }\n }\n }.start();\n}\n"
|
"public List doQuery(MappedStatement ms, Object parameterObject, RowBounds rowBounds, ResultHandler resultHandler) throws SQLException {\n try {\n flushStatements();\n Configuration configuration = ms.getConfiguration();\n StatementHandler handler = configuration.newStatementHandler(this, ms, parameterObject, rowBounds, resultHandler);\n Connection connection = transaction.getConnection();\n Statement stmt = handler.prepare(connection);\n handler.parameterize(stmt);\n return handler.query(stmt, resultHandler);\n } finally {\n flushStatements();\n }\n}\n"
|
"public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_add_route, container, false);\n Bundle args = getArguments();\n if (args != null && args.containsKey(\"String_Node_Str\")) {\n atw = (ArrivalTimeWidget) args.getSerializable(\"String_Node_Str\");\n } else {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n setHasOptionsMenu(true);\n getActivity().setTitle(\"String_Node_Str\");\n routeListView = (ListView) rootView.findViewById(R.id.lvRouteList);\n progressBar = (ProgressBar) getActivity().findViewById(R.id.pbLoading);\n progressBar.setVisibility(View.VISIBLE);\n TransLocClient client = ServiceGenerator.createService(TransLocClient.class, Utils.BASE_URL, TRANSLOC_API_KEY, atw.getAgencyID(), ROUTE);\n routesSub = client.routes(atw.getAgencyID()).observeOn(AndroidSchedulers.mainThread()).subscribe(this::populateRoutesListView, e -> handleServiceErrors(getActivity(), ROUTE, e, progressBar));\n return rootView;\n}\n"
|
"public Kind getStateKind() {\n List<IOAction> as = this.getAllTakeable();\n if (as.size() == 0) {\n return Kind.TERMINAL;\n } else {\n IOAction a = as.iterator().next();\n return (a.isSend() || a.isConnect() || a.isDisconnect()) ? Kind.OUTPUT : (a.isAccept()) ? Kind.ACCEPT : (as.size() > 1) ? Kind.POLY_INPUT : Kind.UNARY_INPUT;\n }\n}\n"
|
"private boolean onRow(int aggrIndex, int startingGroupLevel, int endingGroupLevel, boolean populateValue) throws DataException {\n IAggrInfo aggrInfo = getAggrInfo(aggrIndex);\n Accumulator acc = null;\n boolean newGroup = false;\n boolean[] argDefs = aggrInfo.getAggregation().getParameterDefn();\n if (startingGroupLevel <= aggrInfo.getGroupLevel()) {\n acc = accumulatorManagers[aggrIndex].next();\n acc.start();\n newGroup = true;\n } else {\n acc = accumulatorManagers[aggrIndex].getCurrentAccumulator();\n }\n boolean accepted = true;\n if (aggrInfo.getFilter() != null) {\n try {\n Object filterResult = ExprEvaluateUtil.evaluateValue(aggrInfo.getFilter(), this.populator.getCache().getCurrentIndex(), this.populator.getCache().getCurrentResult(), this.populator.getQuery().getExprProcessor().getScope());\n if (filterResult == null)\n accepted = true;\n else\n accepted = DataTypeUtil.toBoolean(filterResult).booleanValue();\n } catch (BirtException e) {\n if (invalidAggrMsg == null)\n invalidAggrMsg = new HashMap();\n invalidAggrMsg.put(new Integer(aggrIndex), e);\n return false;\n }\n }\n if (aggrInfo.getCalcualteLevel() > 0) {\n if (startingGroupLevel > aggrInfo.getCalcualteLevel())\n accepted = false;\n }\n if (accepted) {\n if (!isFunctionCount(aggrInfo)) {\n if (aggrInfo.getArgument() == null || aggrInfo.getArgument().length != argDefs.length) {\n DataException e = new DataException(ResourceConstants.INVALID_AGGR_PARAMETER, aggrInfo.getName());\n wrapException(aggrIndex, e);\n return false;\n }\n }\n try {\n for (int i = 0; i < argDefs.length; i++) {\n if (argDefs[i] || newGroup) {\n IBaseExpression argExpr = aggrInfo.getArgument()[i];\n checkExpression(aggrInfo, argExpr);\n try {\n aggrArgs[aggrIndex][i] = ExprEvaluateUtil.evaluateValue(argExpr, this.populator.getCache().getCurrentIndex(), this.populator.getCache().getCurrentResult(), this.populator.getQuery().getExprProcessor().getScope());\n } catch (BirtException e) {\n throw DataException.wrap(e);\n }\n }\n }\n acc.onRow(aggrArgs[aggrIndex]);\n newGroup = false;\n } catch (DataException e) {\n if (invalidAggrMsg == null)\n invalidAggrMsg = new HashMap();\n invalidAggrMsg.put(new Integer(aggrIndex), e);\n return false;\n }\n }\n boolean isRunning = (aggrInfo.getAggregation().getType() == IAggregation.RUNNING_AGGR);\n if (isRunning && populateValue) {\n Object value = acc.getValue();\n currentRoundAggrValue[aggrIndex].add(value);\n }\n if (endingGroupLevel <= aggrInfo.getGroupLevel()) {\n acc.finish();\n if ((!isRunning) && populateValue) {\n Object value = acc.getValue();\n currentRoundAggrValue[aggrIndex].add(value);\n }\n }\n return true;\n}\n"
|
"public <T extends VMInstanceVO> boolean advanceStop(T vm, boolean forced, User user, Account account) throws AgentUnavailableException, OperationTimedoutException, ConcurrentOperationException {\n long vmId = vm.getId();\n State state = vm.getState();\n if (state == State.Stopped) {\n if (s_logger.isDebugEnabled()) {\n s_logger.debug(\"String_Node_Str\" + vm);\n }\n return true;\n }\n if (state == State.Destroyed || state == State.Expunging || state == State.Error) {\n if (s_logger.isDebugEnabled()) {\n s_logger.debug(\"String_Node_Str\" + vm + \"String_Node_Str\" + state);\n }\n return true;\n }\n VirtualMachineGuru<T> vmGuru = getVmGuru(vm);\n try {\n if (!stateTransitTo(vm, forced ? Event.AgentReportStopped : Event.StopRequested, vm.getHostId(), null)) {\n throw new ConcurrentOperationException(\"String_Node_Str\");\n }\n } catch (NoTransitionException e1) {\n if (!forced) {\n throw new ConcurrentOperationException(\"String_Node_Str\");\n }\n vm = vmGuru.findById(vmId);\n if (vm == null) {\n if (s_logger.isDebugEnabled()) {\n s_logger.debug(\"String_Node_Str\" + vmId);\n }\n return true;\n }\n }\n VirtualMachineProfile<T> profile = new VirtualMachineProfileImpl<T>(vm);\n if ((vm.getState() == State.Starting || vm.getState() == State.Stopping || vm.getState() == State.Migrating) && forced) {\n ItWorkVO work = _workDao.findByOutstandingWork(vm.getId(), vm.getState());\n if (work != null) {\n if (cleanup(vmGuru, new VirtualMachineProfileImpl<T>(vm), work, Event.StopRequested, forced, user, account)) {\n try {\n return stateTransitTo(vm, Event.AgentReportStopped, null);\n } catch (NoTransitionException e) {\n s_logger.warn(\"String_Node_Str\" + vm);\n return false;\n }\n }\n }\n }\n if (vm.getHostId() != null) {\n String routerPrivateIp = null;\n if (vm.getType() == VirtualMachine.Type.DomainRouter) {\n routerPrivateIp = vm.getPrivateIpAddress();\n }\n StopCommand stop = new StopCommand(vm, vm.getInstanceName(), null, routerPrivateIp);\n boolean stopped = false;\n StopAnswer answer = null;\n try {\n answer = (StopAnswer) _agentMgr.send(vm.getHostId(), stop);\n stopped = answer.getResult();\n if (!stopped) {\n throw new CloudRuntimeException(\"String_Node_Str\" + answer.getDetails());\n }\n vmGuru.finalizeStop(profile, answer);\n } catch (AgentUnavailableException e) {\n } catch (OperationTimedoutException e) {\n } finally {\n if (!stopped) {\n if (!forced) {\n s_logger.warn(\"String_Node_Str\" + vm);\n try {\n stateTransitTo(vm, Event.OperationFailed, vm.getHostId());\n } catch (NoTransitionException e) {\n s_logger.warn(\"String_Node_Str\" + vm);\n }\n return false;\n } else {\n s_logger.warn(\"String_Node_Str\" + vm + \"String_Node_Str\");\n vmGuru.finalizeStop(profile, answer);\n }\n }\n }\n }\n if (s_logger.isDebugEnabled()) {\n s_logger.debug(vm + \"String_Node_Str\");\n }\n try {\n _networkMgr.release(profile, forced);\n s_logger.debug(\"String_Node_Str\" + vm);\n } catch (Exception e) {\n s_logger.warn(\"String_Node_Str\", e);\n }\n try {\n if (vm.getHypervisorType() != HypervisorType.BareMetal) {\n _storageMgr.release(profile);\n s_logger.debug(\"String_Node_Str\" + vm);\n }\n } catch (Exception e) {\n s_logger.warn(\"String_Node_Str\", e);\n }\n vm.setReservationId(null);\n try {\n return stateTransitTo(vm, Event.OperationSucceeded, null);\n } catch (NoTransitionException e) {\n s_logger.warn(e.getMessage());\n return false;\n }\n}\n"
|
"public boolean performFinish() {\n if (isSinglePageOnly) {\n return true;\n }\n boolean formIsPerformed;\n if (ldapSchemaWizardPage4 == null) {\n formIsPerformed = ldapSchemaWizardPage3.isPageComplete();\n } else {\n formIsPerformed = ldapSchemaWizardPage4.isPageComplete();\n }\n if (formIsPerformed) {\n IProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance();\n try {\n if (creation) {\n String nextId = factory.getNextId();\n connectionProperty.setId(nextId);\n connectionProperty.setLabel(connectionProperty.getDisplayName());\n factory.create(connectionItem, ldapSchemaWizardPage0.getDestinationPath());\n } else {\n connectionProperty.setLabel(connectionProperty.getDisplayName());\n RepositoryUpdateManager.updateMultiSchema(connectionItem, oldMetadataTable, oldTableMap);\n refreshInFinish(ldapSchemaWizardPage0.isNameModifiedByUser());\n updateConnectionItem();\n }\n } catch (Exception e) {\n String detailError = e.toString();\n new ErrorDialogWidthDetailArea(getShell(), PID, Messages.getString(\"String_Node_Str\"), detailError);\n log.error(Messages.getString(\"String_Node_Str\") + \"String_Node_Str\" + detailError);\n return false;\n }\n return true;\n } else {\n return false;\n }\n}\n"
|
"public static void imageCopy(Image src, Image dst) {\n if (src == null || dst == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n if (src.getFormat() != dst.getFormat()) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n if (src.getFormat() == ImageFormat.PRIVATE || dst.getFormat() == ImageFormat.PRIVATE) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n if (!(dst.getOwner() instanceof ImageWriter)) {\n throw new IllegalArgumentException(\"String_Node_Str\" + \"String_Node_Str\");\n }\n Size srcSize = new Size(src.getWidth(), src.getHeight());\n Size dstSize = new Size(dst.getWidth(), dst.getHeight());\n if (!srcSize.equals(dstSize)) {\n throw new IllegalArgumentException(\"String_Node_Str\" + srcSize + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + dstSize);\n }\n Plane[] srcPlanes = src.getPlanes();\n Plane[] dstPlanes = dst.getPlanes();\n ByteBuffer srcBuffer = null;\n ByteBuffer dstBuffer = null;\n for (int i = 0; i < srcPlanes.length; i++) {\n srcBuffer = srcPlanes[i].getBuffer();\n int srcPos = srcBuffer.position();\n srcBuffer.rewind();\n dstBuffer = dstPlanes[i].getBuffer();\n dstBuffer.rewind();\n if (srcRowStride == dstRowStride) {\n dstBuffer.put(srcBuffer);\n } else {\n int srcOffset = srcBuffer.position();\n int dstOffset = dstBuffer.position();\n Size effectivePlaneSize = getEffectivePlaneSizeForImage(src, i);\n int srcByteCount = effectivePlaneSize.getWidth() * srcPlanes[i].getPixelStride();\n for (int row = 0; row < effectivePlaneSize.getHeight(); row++) {\n if (row == effectivePlaneSize.getHeight() - 1) {\n int remainingBytes = srcBuffer.remaining() - srcOffset;\n if (srcByteCount > remainingBytes) {\n srcByteCount = remainingBytes;\n }\n }\n directByteBufferCopy(srcBuffer, srcOffset, dstBuffer, dstOffset, srcByteCount);\n srcOffset += srcRowStride;\n dstOffset += dstRowStride;\n }\n }\n srcBuffer.position(srcPos);\n dstBuffer.rewind();\n }\n}\n"
|
"public void testCorruptChecksumAtFooter() throws Exception {\n final DirCache dc = new DirCache(pathOf(\"String_Node_Str\"), FS.DETECTED);\n try {\n dc.read();\n fail(\"String_Node_Str\");\n } catch (CorruptObjectException err) {\n assertEquals(\"String_Node_Str\", err.getMessage());\n }\n}\n"
|
"public void init(String storedParams) {\n this.mod = Integer.parseInt(storedParams);\n}\n"
|
"private static String getNewVariableName(final MethodCall methodCall) {\n final IMethodName invokedMethod = methodCall.getInvokedMethod();\n String variableName = null;\n if (methodCall.getInvokedMethod().isInit()) {\n variableName = methodCall.getCompletionTargetVariable().getName();\n }\n if (variableName == null) {\n variableName = getNewVariableNameFromMethod(invokedMethod);\n }\n return variableName;\n}\n"
|
"public void onActiveIp(String ip) {\n if (!pool.isShutdown() && !isCancelled()) {\n pool.execute(new IpScanRunnable(ip));\n }\n}\n"
|
"public Widget createActionsLayout(SelectedItems<IndexedRepresentation> representations, AsyncCallback<ActionImpact> callback) {\n FlowPanel layout = createLayout();\n addTitle(layout, messages.representation(), representations, RepresentationAction.DOWNLOAD, RepresentationAction.CHANGE_TYPE, RepresentationAction.REMOVE);\n addButton(layout, messages.downloadButton(), RepresentationAction.DOWNLOAD, representations, ActionImpact.NONE, callback, \"String_Node_Str\");\n addButton(layout, messages.changeTypeButton(), RepresentationAction.CHANGE_TYPE, representations, ActionImpact.UPDATED, callback, \"String_Node_Str\");\n addButton(layout, messages.removeButton(), RepresentationAction.REMOVE, representations, ActionImpact.DESTROYED, callback, \"String_Node_Str\");\n addTitle(layout, messages.preservationTitle(), representations, null, RepresentationAction.NEW_PROCESS, RepresentationAction.IDENTIFY_FORMATS, RepresentationAction.SHOW_EVENTS, RepresentationAction.SHOW_RISKS);\n addButton(layout, messages.newProcessPreservation(), RepresentationAction.NEW_PROCESS, representations, ActionImpact.UPDATED, callback, \"String_Node_Str\");\n addButton(layout, messages.identifyFormatsButton(), RepresentationAction.IDENTIFY_FORMATS, representations, ActionImpact.UPDATED, callback, \"String_Node_Str\");\n addButton(layout, messages.preservationEvents(), RepresentationAction.SHOW_EVENTS, representations, ActionImpact.NONE, callback, \"String_Node_Str\");\n addButton(layout, messages.preservationRisks(), RepresentationAction.SHOW_RISKS, representations, ActionImpact.NONE, callback, \"String_Node_Str\");\n addTitle(layout, messages.sidebarFoldersFilesTitle(), representations, null, RepresentationAction.UPLOAD_FILES, RepresentationAction.CREATE_FOLDER);\n addButton(layout, messages.uploadFilesButton(), RepresentationAction.UPLOAD_FILES, representations, ActionImpact.UPDATED, callback, \"String_Node_Str\");\n addButton(layout, messages.createFolderButton(), RepresentationAction.CREATE_FOLDER, representations, ActionImpact.UPDATED, callback, \"String_Node_Str\");\n return layout;\n}\n"
|
"public void execute(ScriptEntry scriptEntry) throws CommandExecutionException {\n Boolean player = (Boolean) scriptEntry.getObject(\"String_Node_Str\");\n ChatColor color = (ChatColor) scriptEntry.getObject(\"String_Node_Str\");\n String text = (String) scriptEntry.getObject(\"String_Node_Str\");\n if (text != null) {\n if (text.equalsIgnoreCase(\"String_Node_Str\")) {\n scriptEntry.getNPC().getLivingEntity().setCustomNameVisible(false);\n dB.echoDebug(scriptEntry, \"String_Node_Str\");\n } else {\n scriptEntry.getNPC().getEntity().setCustomNameVisible(true);\n scriptEntry.getNPC().getEntity().setCustomName(text);\n dB.echoDebug(scriptEntry, text);\n }\n if (scriptEntry.getNPC().getEntity() instanceof Player)\n ((Player) scriptEntry.getNPC().getEntity()).setDisplayName(text);\n }\n if (color != null) {\n if (!scriptEntry.getNPC().getCitizen().hasTrait(NameplateTrait.class))\n scriptEntry.getNPC().getCitizen().addTrait(NameplateTrait.class);\n NameplateTrait trait = scriptEntry.getNPC().getCitizen().getTrait(NameplateTrait.class);\n if (player)\n trait.setColor(color, scriptEntry.getPlayer().getName());\n else\n trait.setColor(color);\n }\n}\n"
|
"protected final void fireConstrained(Matcher<E> matcher) {\n if (matcher == null)\n throw new NullPointerException();\n currentMatcher = matcher;\n fireChangedMatcher(createConstrainedEvent(currentMatcher));\n}\n"
|
"public List<MLHyperParameter> getHyperParameters(long analysisId) throws MLAnalysisHandlerException {\n try {\n return databaseService.getHyperParametersOfModel(analysisId, algorithmName);\n } catch (DatabaseHandlerException e) {\n throw new MLAnalysisHandlerException(e.getMessage(), e);\n }\n}\n"
|
"private Integer getBookmark() {\n if (!uriSupportsBookmarks(mUri)) {\n return null;\n }\n String[] projection = new String[] { Video.VideoColumns.DURATION, Video.VideoColumns.BOOKMARK };\n try {\n Cursor cursor = getContentResolver().query(mUri, projection, null, null, null);\n if (cursor != null) {\n try {\n if (cursor.moveToFirst()) {\n int duration = getCursorInteger(cursor, 0);\n int bookmark = getCursorInteger(cursor, 1);\n final int ONE_MINUTE = 60 * 1000;\n final int TWO_MINUTES = 2 * ONE_MINUTE;\n final int FIVE_MINUTES = 5 * ONE_MINUTE;\n if ((bookmark < TWO_MINUTES) || (duration < FIVE_MINUTES) || (bookmark > (duration - ONE_MINUTE))) {\n return null;\n }\n return Integer.valueOf(bookmark);\n }\n } finally {\n cursor.close();\n }\n }\n } catch (SQLiteException e) {\n }\n return null;\n}\n"
|
"public static SenderThread send(TransportMessage message, int tries, int delay) throws TransportException {\n Transporter transporter = message.createTransporter();\n SenderThread thread = new SimpleSenderThread(transporter, CACHE(), tries, delay);\n if (message.isCacheable()) {\n message.setSendingThreadDeadline(getSendingThreadDeadline(thread.getTries(), thread.getDelay()));\n synchronized (CACHE) {\n CACHE.cache(message);\n }\n } else {\n message.setStatus(TransportMessageStatus.QUEUED);\n }\n thread.start();\n return thread;\n}\n"
|
"private LFgExample getExample(AnnoSentence sent, int[] parents, boolean labeledExample) {\n FeatureExtractor fe = prm.dpFePrm.onlyFast ? new FastDepParseFeatureExtractor(sent, cs, prm.dpFePrm.featureHashMod, feAlphabet) : new DepParseFeatureExtractor(prm.dpFePrm, sent, cs, feAlphabet);\n fe = new FeatureCache(fe);\n FactorGraph fg = new FactorGraph();\n DepParseFactorGraphBuilder dp = new DepParseFactorGraphBuilder(prm.dpPrm);\n dp.build(sent.getWords(), sent.getDepEdgeMask(), fe, fg);\n VarConfig goldConfig = new VarConfig();\n addDepParseTrainAssignment(parents, dp, goldConfig);\n if (labeledExample) {\n return new LabeledFgExample(fg, goldConfig, fe);\n } else {\n return new UnlabeledFgExample(fg, goldConfig, fe);\n }\n}\n"
|
"public String getRedirectPath(String origin, String redirect, String originRequestPath) {\n try {\n if (mapper != null) {\n if (originRequestPath == null || originRequestPath.isEmpty()) {\n originRequestPath = \"String_Node_Str\";\n }\n PortalConfig pConfig = dataStorage.getPortalConfig(origin);\n if (pConfig == null || pConfig.getPortalRedirects() == null) {\n log.warn(\"String_Node_Str\" + origin + \"String_Node_Str\");\n return null;\n }\n PortalRedirect pRedirect = null;\n for (PortalRedirect portalRedirect : pConfig.getPortalRedirects()) {\n if (portalRedirect.getRedirectSite().equals(redirect)) {\n pRedirect = portalRedirect;\n break;\n }\n }\n if (pRedirect != null) {\n String redirectPath = mapper.getRedirectPath(origin, redirect, originRequestPath, pRedirect.getMappings());\n if (redirectPath != null && redirectPath.equals(\"String_Node_Str\")) {\n return \"String_Node_Str\";\n } else {\n return redirectPath;\n }\n } else {\n log.debug(\"String_Node_Str\" + origin + \"String_Node_Str\" + redirect + \"String_Node_Str\");\n return null;\n }\n } else {\n log.debug(\"String_Node_Str\");\n return null;\n }\n } catch (Exception e) {\n log.error(\"String_Node_Str\", e);\n return null;\n }\n}\n"
|
"public Collection<IMemberGroup> getMemberGroups() throws BBException {\n if (cachedMemberGroups.isEmpty()) {\n final WebRequest request = createMemberGroupListRequest();\n try {\n request.execute();\n String str = request.getResponseBodyAsString();\n request.releaseConnection();\n cachedMemberGroups = parser.parseMemberGroups(str);\n for (IMemberGroup grp : cachedMemberGroups.values()) {\n ((AbstractBBObject) grp).setBulletinBoard(this);\n }\n } catch (IOException e) {\n }\n }\n return new HashSet<IMemberGroup>(cachedMemberGroups.values());\n}\n"
|
"public CourseData getCourseDetails(String courseId) throws EntityDoesNotExistException {\n verifyCourseOwnerOrStudentInCourse(courseId);\n CourseData course = getCourse(courseId);\n if (course == null) {\n throw new EntityDoesNotExistException(\"String_Node_Str\" + courseId);\n }\n HashMap<String, CourseData> courseList = getCourseDetailsListForCoord(course.coord);\n return courseList.get(courseId);\n}\n"
|
"public void fire() throws IllegalActionException {\n super.fire();\n mean.update();\n covariance.update();\n transitionMatrix.update();\n prior.update();\n _nStates = ((ArrayToken) mean.getToken()).length();\n _priors = new double[_nStates];\n _transitionMatrixEstimate = new double[_nStates][_nStates];\n for (int i = 0; i < _nStates; i++) {\n _priors[i] = ((DoubleToken) ((ArrayToken) prior.getToken()).getElement(i)).doubleValue();\n for (int j = 0; j < _nStates; j++) {\n _transitionMatrixEstimate[i][j] = ((DoubleToken) ((MatrixToken) transitionMatrix.getToken()).getElementAsToken(i, j)).doubleValue();\n }\n }\n int obsDim = 1;\n if (((ArrayToken) mean.getToken()).getElementType().isCompatible(BaseType.DOUBLE)) {\n _mu = new double[_nStates][obsDim];\n _sigma = new double[_nStates][obsDim][obsDim];\n for (int i = 0; i < _nStates; i++) {\n _sigma[i][0][0] = ((DoubleToken) ((ArrayToken) standardDeviation.getToken()).getElement(i)).doubleValue();\n _mu[i][0] = ((DoubleToken) ((ArrayToken) mean.getToken()).getElement(i)).doubleValue();\n }\n } else {\n obsDim = ((ArrayToken) ((ArrayToken) mean.getToken()).getElement(0)).length();\n _mu = new double[_nStates][obsDim];\n _sigma = new double[_nStates][obsDim][obsDim];\n for (int i = 0; i < _nStates; i++) {\n _sigma[i] = ((DoubleMatrixToken) ((ArrayToken) standardDeviation.getToken()).getElement(i)).doubleMatrix();\n for (int j = 0; j < obsDim; j++) {\n _mu[i][j] = ((DoubleToken) ((ArrayToken) ((ArrayToken) mean.getToken()).getElement(i)).getElement(j)).doubleValue();\n }\n }\n }\n if ((_nStates != _sigma.length) || (_nStates != _transitionMatrixEstimate.length)) {\n throw new IllegalActionException(this, \"String_Node_Str\");\n }\n if (_observations != null) {\n int[] classifyStates = new int[_observations.length];\n classifyStates = classifyHMM(_observations, _priors, _transitionMatrixEstimate);\n IntToken[] _outTokenArray = new IntToken[classifyStates.length];\n for (int i = 0; i < classifyStates.length; i++) {\n _outTokenArray[i] = new IntToken(classifyStates[i]);\n }\n output.broadcast(new ArrayToken(BaseType.INT, _outTokenArray));\n likelihood.send(0, new DoubleToken(_likelihood));\n }\n}\n"
|
"public void write(JavaWriter javaWriter) throws IOException {\n if (isModel || isModelContainer) {\n for (ForeignKeyReference reference : foreignKeyReferences) {\n writeColumnDefinition(javaWriter, (columnName + \"String_Node_Str\" + reference.columnName()).toUpperCase(), reference.columnName());\n }\n } else {\n writeColumnDefinition(javaWriter, columnName);\n }\n}\n"
|
"protected Evaluator createEvaluator(ExperimentType type, ExperimentTaskConfiguration configuration, Dataset dataset, UriKBClassifier globalClassifier, SubClassInferencer inferencer) {\n switch(type) {\n case C2KB:\n {\n return new ConfidenceScoreEvaluatorDecorator<Meaning>(new InKBClassBasedFMeasureCalculator<Meaning>(new MeaningMatchingsSearcher<Meaning>(globalClassifier), globalClassifier), FMeasureCalculator.MICRO_F1_SCORE_NAME, new DoubleResultComparator());\n }\n case Sa2KB:\n case A2KB:\n {\n return new ConfidenceScoreEvaluatorDecorator<NamedEntity>(new InKBClassBasedFMeasureCalculator<NamedEntity>(new CompoundMatchingsCounter<NamedEntity>((MatchingsSearcher<NamedEntity>) MatchingsSearcherFactory.createSpanMatchingsSearcher(configuration.matching), new MeaningMatchingsSearcher<NamedEntity>(globalClassifier)), globalClassifier), FMeasureCalculator.MICRO_F1_SCORE_NAME, new DoubleResultComparator());\n }\n case ERec:\n {\n return new ConfidenceScoreEvaluatorDecorator<Span>(new FMeasureCalculator<Span>(new MatchingsCounterImpl<Span>((MatchingsSearcher<Span>) MatchingsSearcherFactory.createSpanMatchingsSearcher(configuration.matching))), FMeasureCalculator.MICRO_F1_SCORE_NAME, new DoubleResultComparator());\n }\n case D2KB:\n {\n return new ConfidenceScoreEvaluatorDecorator<NamedEntity>(new InKBClassBasedFMeasureCalculator<NamedEntity>(new CompoundMatchingsCounter<NamedEntity>((MatchingsSearcher<NamedEntity>) MatchingsSearcherFactory.createSpanMatchingsSearcher(configuration.matching), new MeaningMatchingsSearcher<NamedEntity>(globalClassifier)), globalClassifier), FMeasureCalculator.MICRO_F1_SCORE_NAME, new DoubleResultComparator());\n }\n case ETyping:\n {\n return new ConfidenceScoreEvaluatorDecorator<TypedSpan>(new HierarchicalFMeasureCalculator<TypedSpan>(new HierarchicalMatchingsCounter<TypedSpan>((MatchingsSearcher<TypedSpan>) MatchingsSearcherFactory.createSpanMatchingsSearcher(configuration.matching), globalClassifier, inferencer)), FMeasureCalculator.MICRO_F1_SCORE_NAME, new DoubleResultComparator());\n }\n case OKE_Task1:\n {\n ExperimentTaskConfiguration subTaskConfig;\n List<SubTaskEvaluator<TypedNamedEntity>> evaluators = new ArrayList<SubTaskEvaluator<TypedNamedEntity>>();\n UriKBClassifier okeClassifierTask1 = new ExactWhiteListBasedUriKBClassifier(Arrays.asList(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n subTaskConfig = new ExperimentTaskConfiguration(configuration.annotatorConfig, configuration.datasetConfig, ExperimentType.ERec, configuration.matching);\n evaluators.add(new SubTaskEvaluator<>(subTaskConfig, (Evaluator<TypedNamedEntity>) createEvaluator(ExperimentType.ERec, subTaskConfig, dataset)));\n subTaskConfig = new ExperimentTaskConfiguration(configuration.annotatorConfig, configuration.datasetConfig, ExperimentType.D2KB, Matching.STRONG_ENTITY_MATCH);\n evaluators.add(new SubTaskEvaluator<>(subTaskConfig, (Evaluator<TypedNamedEntity>) createEvaluator(ExperimentType.D2KB, subTaskConfig, dataset)));\n subTaskConfig = new ExperimentTaskConfiguration(configuration.annotatorConfig, configuration.datasetConfig, ExperimentType.ETyping, Matching.STRONG_ENTITY_MATCH);\n evaluators.add(new SubTaskEvaluator<>(subTaskConfig, (Evaluator<TypedNamedEntity>) createEvaluator(ExperimentType.ETyping, subTaskConfig, dataset, okeClassifierTask1, inferencer)));\n return new ConfidenceScoreEvaluatorDecorator<TypedNamedEntity>(new SubTaskAverageCalculator<TypedNamedEntity>(evaluators), FMeasureCalculator.MICRO_F1_SCORE_NAME, new DoubleResultComparator());\n }\n case OKE_Task2:\n {\n ExperimentTaskConfiguration subTaskConfig;\n List<SubTaskEvaluator<TypedNamedEntity>> evaluators = new ArrayList<SubTaskEvaluator<TypedNamedEntity>>();\n String[] classTypes = new String[] { RDFS.Class.getURI(), OWL.Class.getURI() };\n UriKBClassifier okeClassifierTask2 = new SimpleWhiteListBasedUriKBClassifier(\"String_Node_Str\");\n subTaskConfig = new ExperimentTaskConfiguration(configuration.annotatorConfig, configuration.datasetConfig, ExperimentType.ETyping, Matching.STRONG_ENTITY_MATCH);\n evaluators.add(new SubTaskEvaluator<>(subTaskConfig, new MarkingFilteringEvaluatorDecorator<>(new TypeBasedMarkingFilter<TypedNamedEntity>(false, classTypes), (Evaluator<TypedNamedEntity>) createEvaluator(ExperimentType.ETyping, subTaskConfig, dataset, okeClassifierTask2, inferencer))));\n subTaskConfig = new ExperimentTaskConfiguration(configuration.annotatorConfig, configuration.datasetConfig, ExperimentType.ERec, configuration.matching);\n evaluators.add(new SubTaskEvaluator<>(subTaskConfig, new MarkingFilteringEvaluatorDecorator<>(new TypeBasedMarkingFilter<TypedNamedEntity>(true, classTypes), new SpanMergingEvaluatorDecorator<>((Evaluator<TypedNamedEntity>) createEvaluator(ExperimentType.ERec, subTaskConfig, dataset)))));\n return new ConfidenceScoreEvaluatorDecorator<TypedNamedEntity>(new SubTaskAverageCalculator<TypedNamedEntity>(evaluators), FMeasureCalculator.MICRO_F1_SCORE_NAME, new DoubleResultComparator());\n }\n default:\n {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n }\n}\n"
|
"public ImpersonationInfo getImpersonationInfo(NamespaceMeta meta) {\n return new ImpersonationInfo(meta, cConf);\n}\n"
|
"public BaseNode getBaseNode(ClusterCreate cluster, NodeGroupCreate nodeGroup, int index) {\n String vmName = PlacementUtil.getVmName(cluster.getName(), nodeGroup.getName(), index);\n BaseNode node = new BaseNode(vmName, nodeGroup, cluster);\n List<DiskSpec> disks = new ArrayList<DiskSpec>();\n DiskSpec systemDisk = new DiskSpec(templateNode.getDisks().get(0));\n Integer memCapa = nodeGroup.getMemCapacityMB();\n memCapa = (memCapa == null) ? 0 : memCapa;\n systemDisk.setSize(systemDisk.getSize() + (memCapa + 1023) / 1024);\n systemDisk.setDiskType(DiskType.SYSTEM_DISK);\n systemDisk.setSeparable(false);\n disks.add(systemDisk);\n AllocationType diskAllocType = null;\n if (nodeGroup.getStorage().getAllocType() != null) {\n diskAllocType = AllocationType.valueOf(nodeGroup.getStorage().getAllocType());\n } else {\n diskAllocType = AllocationType.THICK;\n }\n int swapDisk = (((int) Math.ceil(nodeGroup.getMemCapacityMB() * nodeGroup.getSwapRatio()) + 1023) / 1024);\n disks.add(new DiskSpec(DiskType.SWAP_DISK.getDiskName(), swapDisk, node.getVmName(), false, DiskType.SWAP_DISK, DiskScsiControllerType.LSI_CONTROLLER, null, diskAllocType.toString(), null, null, null));\n if (!DatastoreType.TEMPFS.name().equalsIgnoreCase(nodeGroup.getStorage().getType())) {\n disks.add(new DiskSpec(DiskType.DATA_DISK.getDiskName(), nodeGroup.getStorage().getSizeGB(), node.getVmName(), true, DiskType.DATA_DISK, nodeGroup.getStorage().getControllerType(), nodeGroup.getStorage().getSplitPolicy(), diskAllocType.toString(), null, null, null));\n }\n node.setDisks(disks);\n node.setVmFolder(nodeGroup.getVmFolderPath());\n NetworkSchema netSchema = new NetworkSchema();\n ArrayList<Network> networks = new ArrayList<Network>();\n netSchema.networks = networks;\n for (NetworkAdd networkAdd : cluster.getNetworkings()) {\n Network network = new Network();\n network.vcNetwork = networkAdd.getPortGroup();\n networks.add(network);\n }\n node.getVmSchema().networkSchema = netSchema;\n ResourceSchema resourceSchema = new ResourceSchema();\n resourceSchema.numCPUs = node.getCpu();\n resourceSchema.cpuReservationMHz = 0;\n resourceSchema.memSize = node.getMem();\n resourceSchema.memReservationSize = 0;\n resourceSchema.name = \"String_Node_Str\";\n resourceSchema.priority = Priority.Normal;\n node.getVmSchema().resourceSchema = resourceSchema;\n return node;\n}\n"
|
"protected void helpTestDeleteCoveredCol(boolean mutable, boolean localIndex) throws Exception {\n String dataTableName = generateUniqueName();\n String fullDataTableName = INDEX_DATA_SCHEMA + QueryConstants.NAME_SEPARATOR + dataTableName;\n String indexName = generateUniqueName();\n String fullIndexTableName = INDEX_DATA_SCHEMA + QueryConstants.NAME_SEPARATOR + indexName;\n Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);\n Connection conn = DriverManager.getConnection(getUrl(), props);\n try {\n conn.setAutoCommit(false);\n createDataTable(conn, fullDataTableName, mutable ? \"String_Node_Str\" : \"String_Node_Str\");\n populateDataTable(conn, fullDataTableName);\n String ddl = \"String_Node_Str\" + (localIndex ? \"String_Node_Str\" : \"String_Node_Str\") + \"String_Node_Str\" + indexName + \"String_Node_Str\" + fullDataTableName + \"String_Node_Str\" + \"String_Node_Str\";\n conn.createStatement().execute(ddl);\n ResultSet rs;\n rs = conn.createStatement().executeQuery(\"String_Node_Str\" + fullDataTableName);\n assertTrue(rs.next());\n assertEquals(2, rs.getInt(1));\n rs = conn.createStatement().executeQuery(\"String_Node_Str\" + fullIndexTableName);\n assertTrue(rs.next());\n assertEquals(2, rs.getInt(1));\n String dml = \"String_Node_Str\" + fullDataTableName + \"String_Node_Str\";\n assertEquals(1, conn.createStatement().executeUpdate(dml));\n conn.commit();\n String query = \"String_Node_Str\" + fullDataTableName;\n rs = conn.createStatement().executeQuery(query);\n assertTrue(rs.next());\n assertEquals(1L, rs.getLong(1));\n assertEquals(\"String_Node_Str\", rs.getString(2));\n assertEquals(2L, rs.getLong(3));\n assertEquals(\"String_Node_Str\", rs.getString(4));\n assertFalse(rs.next());\n query = \"String_Node_Str\" + fullDataTableName;\n rs = conn.createStatement().executeQuery(query);\n assertTrue(rs.next());\n assertEquals(1L, rs.getLong(1));\n assertEquals(\"String_Node_Str\", rs.getString(2));\n assertEquals(2L, rs.getLong(3));\n assertEquals(\"String_Node_Str\", rs.getString(4));\n assertFalse(rs.next());\n query = \"String_Node_Str\" + fullIndexTableName;\n rs = conn.createStatement().executeQuery(query);\n assertTrue(rs.next());\n assertEquals(1L, rs.getLong(1));\n assertEquals(\"String_Node_Str\", rs.getString(2));\n assertEquals(2L, rs.getLong(3));\n assertEquals(\"String_Node_Str\", rs.getString(4));\n assertFalse(rs.next());\n conn.createStatement().execute(\"String_Node_Str\" + indexName + \"String_Node_Str\" + fullDataTableName);\n } finally {\n conn.close();\n }\n}\n"
|
"public List getFilters() {\n return this.filters;\n}\n"
|
"protected boolean initDialog() {\n if (inputGroup.getName() != null) {\n nameEditor.setText(inputGroup.getName());\n }\n columnList = DataSetManager.getCurrentInstance().getColumns(dataSetList);\n Iterator itor = columnList.iterator();\n while (itor.hasNext()) {\n keyChooser.add(((DataSetItemModel) itor.next()).getDisplayName());\n }\n setKeyExpression(inputGroup.getKeyExpr());\n int index = getIntervalTypeIndex(inputGroup.getInterval());\n intervalType.select(index);\n if (index == 0) {\n intervalRange.setEnabled(false);\n } else {\n intervalRange.setSelection(inputGroup.getIntervalRange());\n }\n if (inputGroup instanceof TableGroupHandle) {\n includeHeader.setSelection(inputGroup.hasHeader());\n includeFooter.setSelection(inputGroup.hasFooter());\n } else {\n includeHeader.setSelection(false);\n includeFooter.setSelection(false);\n }\n if (DesignChoiceConstants.SORT_DIRECTION_ASC.equals(inputGroup.getSortDirection())) {\n ascending.setSelection(true);\n } else {\n descending.setSelection(true);\n }\n List list = new ArrayList(1);\n list.add(inputGroup);\n tocEditor.setText(UIUtil.convertToGUIString(inputGroup.getTocExpression()));\n return true;\n}\n"
|
"public static void main(String[] args) throws ConfigurationException, DaoException, IOException {\n MostSimilarInDegrees sim = new MostSimilarInDegrees(\"String_Node_Str\");\n String testTitle = \"String_Node_Str\";\n int degrees = 3;\n System.out.println(\"String_Node_Str\" + testTitle + \"String_Node_Str\" + degrees + \"String_Node_Str\" + sim.getMostSimilar(testTitle, degrees));\n}\n"
|
"public void processOffer(String offer, final Continuation<String> cont) {\n Map<String, MediaParam> params = new HashMap<String, MediaParam>(4);\n StringMediaParam param = new StringMediaParam();\n param.setString(offer);\n params.put(PROCESS_SDP_OFFER_PARAM_OFFER_STR, param);\n invoke(PROCESS_SDP_OFFER, params, new StringContinuationWrapper(cont));\n}\n"
|
"private boolean checkSurfaceFormsCandidates(DirectedSparseGraph<MyNode, String> graph, HashMap<String, MyNode> nodes, double threshholdTrigram, NamedEntityInText entity, String label, String knowledgeBase) {\n boolean addedCandidates = false;\n label = cleanLabelsfromCorporationIdentifier(label);\n label = label.trim();\n List<Triple> candidates = surfaceFormIndex.searchInLabels(label, true);\n if (candidates.size() == 0) {\n log.info(\"String_Node_Str\" + label);\n if (label.endsWith(\"String_Node_Str\")) {\n label = label.substring(0, label.lastIndexOf(\"String_Node_Str\"));\n candidates = surfaceFormIndex.searchInLabels(label, true);\n log.info(\"String_Node_Str\");\n } else if (label.endsWith(\"String_Node_Str\")) {\n label = label.substring(0, label.lastIndexOf(\"String_Node_Str\"));\n candidates = surfaceFormIndex.searchInLabels(label, true);\n log.info(\"String_Node_Str\");\n }\n }\n for (Triple c : candidates) {\n String candidateURL = c.getSubject();\n log.debug(\"String_Node_Str\" + candidateURL);\n if (candidateURL.startsWith(nodeType) && !candidateURL.matches(\"String_Node_Str\")) {\n if (disambiguates(candidateURL) != candidateURL) {\n continue;\n }\n if (trigramLabelLabel(c.getObject(), label, nodeType) < threshholdTrigram) {\n continue;\n }\n if (!nodeType.equals(\"String_Node_Str\")) {\n candidateURL = redirect(candidateURL);\n }\n if (fitsIntoDomain(candidateURL, knowledgeBase)) {\n addNodeToGraph(graph, nodes, entity, c, candidateURL);\n addedCandidates = true;\n }\n }\n }\n return addedCandidates;\n}\n"
|
"public int numFeatures() {\n return super.numFeatures() + TetrisState.worldWidth;\n}\n"
|
"public void setup() {\n indiDefinition = DefinitionFactoryImpl.eINSTANCE.createIndicatorDefinition();\n EList<TdExpression> tdExpessionLs = new BasicEList<TdExpression>();\n TdExpression tdExpression1 = BooleanExpressionHelper.createTdExpression(\"String_Node_Str\", \"String_Node_Str\");\n TdExpression tdExpression2 = BooleanExpressionHelper.createTdExpression(\"String_Node_Str\", \"String_Node_Str\");\n tdExpessionLs.add(tdExpression1);\n tdExpessionLs.add(tdExpression2);\n when(indiDefinition.getSqlGenericExpression()).thenReturn(tdExpessionLs);\n UnitTestBuildHelper.initProjectStructure();\n}\n"
|
"public void test_invalid_handle_not_exist() throws Exception {\n String notExistHandle = \"String_Node_Str\";\n mockMvc.perform(put(URI_NS_U + notExistHandle).contentType(MediaType.parseMediaType(rdapJson)).content(\"String_Node_Str\")).andExpect(status().isNotFound()).andExpect(content().contentType(rdapJson)).andExpect(jsonPath(\"String_Node_Str\").value(404)).andExpect(jsonPath(\"String_Node_Str\").value(4041)).andExpect(jsonPath(\"String_Node_Str\").value(CoreMatchers.hasItems(String.format(ServiceErrorCode.ERROR_4041.getMessage(), notExistHandle))));\n}\n"
|
"public static String getStringOfDate(Context context, List<Integer> dateObj) {\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"String_Node_Str\", context.getResources().getConfiguration().locale);\n Date date = null;\n try {\n date = simpleDateFormat.parse(DateHelper.getDateAsString(dateObj));\n } catch (ParseException e) {\n Log.d(LOG_TAG, e.getLocalizedMessage());\n }\n DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM);\n return df.format(calendar.getTime());\n}\n"
|
"public void buildAttributesIntoObject(Object domainObject, CacheKey cacheKey, AbstractRecord databaseRow, ObjectBuildingQuery query, JoinedAttributeManager joinManager, boolean forRefresh, AbstractSession targetSession) throws DatabaseException {\n List mappings = this.descriptor.getMappings();\n boolean readAllMappings = query.shouldReadAllMappings();\n boolean isTargetProtected = targetSession.isProtectedSession();\n int size = mappings.size();\n for (int index = 0; index < size; index++) {\n DatabaseMapping mapping = (DatabaseMapping) mappings.get(index);\n if (readAllMappings || query.shouldReadMapping(mapping)) {\n mapping.readFromRowIntoObject(databaseRow, joinManager, domainObject, cacheKey, query, targetSession, isTargetProtected);\n }\n }\n if (this.descriptor.hasEventManager()) {\n DescriptorEventManager descriptorEventManager = this.descriptor.getDescriptorEventManager();\n if (descriptorEventManager.hasAnyEventListeners()) {\n org.eclipse.persistence.descriptors.DescriptorEvent event = new org.eclipse.persistence.descriptors.DescriptorEvent(domainObject);\n event.setQuery(query);\n event.setSession(query.getSession());\n event.setRecord(databaseRow);\n if (forRefresh) {\n event.setEventCode(DescriptorEventManager.PostRefreshEvent);\n } else {\n event.setEventCode(DescriptorEventManager.PostBuildEvent);\n }\n descriptorEventManager.executeEvent(event);\n }\n this.descriptor.getEventManager().executeEvent(event);\n }\n}\n"
|
"public String getReference(TypedIOPort port, String[] channelAndOffset, boolean forComposite, boolean isWrite, CodeGeneratorHelper helper) throws IllegalActionException {\n if (port.isOutput()) {\n if (channelAndOffset[0].equals(\"String_Node_Str\")) {\n channelAndOffset[0] = \"String_Node_Str\";\n }\n return CodeGeneratorHelper.generateName(port);\n } else {\n return super.getReference(port, channelAndOffset, forComposite, isWrite, helper);\n }\n}\n"
|
"protected String evalFieldType(MappingField mf) {\n if (mf.getColumnType() == ColType.INT) {\n int width = mf.getWidth();\n if (width <= 0)\n return \"String_Node_Str\";\n else if (width <= 4) {\n return \"String_Node_Str\" + (width * 4) + \"String_Node_Str\";\n } else if (width <= 8) {\n return \"String_Node_Str\" + (width * 4) + \"String_Node_Str\";\n }\n return \"String_Node_Str\" + (width * 4) + \"String_Node_Str\";\n }\n return super.evalFieldType(mf);\n}\n"
|
"public void progress() {\n if (partialSendAttempts > 1000000 || sendAttempts > 1000000 || sendCount > 5900) {\n String s = \"String_Node_Str\";\n for (Map.Entry<Integer, Queue<MPIBuffer>> e : receiveBuffers.entrySet()) {\n s += e.getKey() + \"String_Node_Str\" + e.getValue().size() + \"String_Node_Str\";\n }\n LOG.info(String.format(\"String_Node_Str\", executor, sendCount, receiveCount, sendBufferReleaseCount, receiveBufferReleaseCount, s, sendsOfferred, sendsPartialOfferred));\n ((TWSMPIChannel) channel).setDebug(true);\n }\n if (sendProgressTracker.canProgress()) {\n int sendId = sendProgressTracker.next();\n if (sendId != Integer.MIN_VALUE) {\n sendProgress(pendingSendMessagesPerSource.get(sendId), sendId);\n sendProgressTracker.finish(sendId);\n }\n }\n if (deserializeProgressTracker.canProgress()) {\n int deserializeId = deserializeProgressTracker.next();\n if (deserializeId != Integer.MIN_VALUE) {\n receiveDeserializeProgress(pendingReceiveDeSerializations.get(deserializeId).poll(), deserializeId);\n deserializeProgressTracker.finish(deserializeId);\n }\n }\n if (receiveProgressTracker.canProgress()) {\n int receiveId = receiveProgressTracker.next();\n if (receiveId != Integer.MIN_VALUE) {\n receiveProgress(pendingReceiveMessagesPerSource.get(receiveId));\n receiveProgressTracker.finish(receiveId);\n }\n }\n}\n"
|
"private void morrePorErroExcecao(Exception e) {\n boolean status = isInfosProtegidas();\n System.out.println(\"String_Node_Str\" + this);\n e.printStackTrace();\n super.getArena().getDesenhista().agenteMorreuPorExcecao(this, e);\n protegeInformacoes(false);\n morre();\n protegeInformacoes(status);\n}\n"
|
"public void afterRun() throws Exception {\n LocalQueueStatsImpl queueStats = getQueueService().getLocalQueueStatsImpl(name);\n if (data == null) {\n queueStats.incrementEmptyPolls();\n } else {\n queueStats.incrementPolls();\n publishEvent(ItemEventType.REMOVED, data);\n }\n}\n"
|
"public void addTo(Object source) {\n SourceAccessor sourceAccessor = (SourceAccessor) source;\n sourceAccessor.addAdapter(this);\n}\n"
|
"private void createVncRecorderContainer() {\n try {\n String vncrecordImageId = getProperty(DOCKER_VNCRECORDER_IMAGE_PROPERTY, DOCKER_VNCRECORDER_IMAGE_DEFAULT);\n if (!docker.existsContainer(vncrecorderContainerName)) {\n String secretFile = createSecretFile();\n docker.pullImageIfNecessary(vncrecordImageId);\n String browserIp = docker.inspectContainer(browserContainerName).getNetworkSettings().getIpAddress();\n String videoFile = Paths.get(KurentoClientWebPageTest.getDefaultOutputFile(\"String_Node_Str\" + id + \"String_Node_Str\")).toAbsolutePath().toString();\n log.debug(\"String_Node_Str\", vncrecorderContainerName, browserContainerName, videoFile);\n CreateContainerCmd createContainerCmd = docker.getClient().createContainerCmd(vncrecordImageId).withName(vncrecorderContainerName).withCmd(\"String_Node_Str\", videoFile, \"String_Node_Str\", secretFile, browserIp, \"String_Node_Str\");\n docker.mountDefaultFolders(createContainerCmd);\n createContainerCmd.exec();\n docker.startContainer(vncrecorderContainerName);\n log.debug(\"String_Node_Str\", vncrecorderContainerName);\n } else {\n log.debug(\"String_Node_Str\", vncrecorderContainerName);\n }\n } catch (Exception e) {\n log.warn(\"String_Node_Str\");\n }\n}\n"
|
"private void recursiveMove(EntityLinkableRollingStock prev) {\n for (CouplerType coupler : CouplerType.values()) {\n EntityLinkableRollingStock coupled = this.getLinkedCart(coupler);\n Vec3d myOffset = this.getCouplerPosition(coupler);\n if (coupled == null || coupled == prev) {\n continue;\n }\n Vec3d otherOffset = null;\n for (CouplerType otherCoupler : CouplerType.values()) {\n if (coupled.getLinkedCart(otherCoupler) == this) {\n otherOffset = coupled.getCouplerPosition(otherCoupler);\n }\n }\n if (otherOffset == null) {\n ImmersiveRailroading.logger.warn(\"String_Node_Str\", this.getPersistentID(), coupled.getPersistentID());\n return;\n }\n double distance = myOffset.distanceTo(otherOffset);\n if (distance > 1) {\n ImmersiveRailroading.logger.warn(String.format(\"String_Node_Str\", this.getPersistentID(), coupled.getPersistentID()));\n ImmersiveRailroading.logger.warn(String.format(\"String_Node_Str\", myOffset, otherOffset));\n return;\n }\n Vec3d nextPosForward = otherOffset.add(VecUtil.fromYaw(distance, coupled.rotationYaw));\n Vec3d nextPosReverse = otherOffset.add(VecUtil.fromYaw(-distance, coupled.rotationYaw));\n if (myOffset.distanceTo(nextPosForward) > myOffset.distanceTo(nextPosReverse)) {\n distance = -distance;\n }\n coupled.moveRollingStock(distance);\n coupled.recursiveMove(this);\n }\n}\n"
|
"public final int computeTicks(IDisplayServer xs, Label la, int iLabelLocation, int iOrientation, double dStart, double dEnd, boolean bConsiderStartLabel, boolean bConsiderEndLabel, AllAxes aax) throws ChartException {\n boolean bMaxIsNotIntegralMultipleOfStep = false;\n int nTicks = 0;\n double dLength = 0;\n double dTickGap = 0;\n int iDirection = (iScaleDirection == AUTO) ? ((iOrientation == HORIZONTAL) ? FORWARD : BACKWARD) : iScaleDirection;\n if (bConsiderStartLabel || bConsiderEndLabel) {\n computeAxisStartEndShifts(xs, la, iOrientation, iLabelLocation, aax);\n if (!bLabelWithinAxes && bConsiderStartLabel) {\n double dNewStart = dStart + dStartShift * iDirection;\n if (dEnd > dStart && dNewStart > dEnd - 1) {\n dNewStart = dEnd - 1;\n } else if (dEnd < dStart && dNewStart < dEnd + 1) {\n dNewStart = dEnd + 1;\n }\n dStartShift = (dNewStart - dStart) / iDirection;\n dStart = dNewStart;\n }\n if (bConsiderEndLabel) {\n dEnd += dEndShift * -iDirection;\n }\n }\n this.dStart = dStart;\n this.dEnd = dEnd;\n nTicks = getTickCount();\n dLength = Math.abs(dStart - dEnd);\n if (!bCategoryScale && (iType & NUMERICAL) == NUMERICAL && (iType & LINEAR) == LINEAR) {\n double dMax = asDouble(oMaximum).doubleValue();\n double dMin = asDouble(oMinimum).doubleValue();\n double dStep = asDouble(oStep).doubleValue();\n bMaxIsNotIntegralMultipleOfStep = !ChartUtil.mathEqual(dMax / dStep, (int) (dMax / dStep));\n if (bStepFixed && oStepNumber != null) {\n dTickGap = dLength / (oStepNumber.intValue()) * iDirection;\n } else {\n double dStepSize = asDouble(oStep).doubleValue();\n dTickGap = Math.min(Math.abs(dStepSize / (dMax - dMin) * dLength), dLength) * iDirection;\n }\n } else {\n if (isTickBetweenCategories()) {\n dTickGap = dLength / (nTicks - 1) * iDirection;\n } else {\n dTickGap = dLength / (nTicks - 2) * iDirection;\n }\n }\n if (nTicks > TICKS_MAX && bStepFixed && !bCategoryScale) {\n throw new ChartException(ChartEnginePlugin.ID, ChartException.GENERATION, \"String_Node_Str\", Messages.getResourceBundle(rtc.getULocale()));\n }\n AxisTickCoordinates atc = new AxisTickCoordinates(nTicks, dStart, dEnd, dTickGap, !bCategoryScale || isTickBetweenCategories());\n setTickCordinates(null);\n setEndPoints(dStart, dEnd);\n setTickCordinates(atc);\n if (bStepFixed && oStepNumber == null && (nTicks > 2) && bMaxIsNotIntegralMultipleOfStep) {\n if (!checkFit(xs, la, iLabelLocation)) {\n nTicks--;\n AxisTickCoordinates atc1 = new AxisTickCoordinates(nTicks, dStart, dEnd, dTickGap, !bCategoryScale || isTickBetweenCategories());\n setTickCordinates(null);\n setTickCordinates(atc1);\n }\n }\n checkTickLabelsVisibility(xs, la, iLabelLocation);\n return nTicks;\n}\n"
|
"private InstructionHandle copyInstruction(MethodCode invokeeCode, StacksizeAnalysis stacksize, InstructionList il, InstructionHandle src, InstructionHandle next) {\n InstructionHandle ih;\n Instruction instr = src.getInstruction();\n Instruction c = invokeSite.getInvoker().getCode().copyFrom(invokee.getClassInfo(), instr);\n if (instr instanceof LocalVariableInstruction) {\n int slot = maxLocals + ((LocalVariableInstruction) instr).getIndex();\n ((LocalVariableInstruction) c).setIndex(slot);\n ih = il.insert(next, c);\n } else if (instr instanceof ReturnInstruction) {\n if (src.getNext() != null) {\n c = new GOTO(next);\n ih = il.insert(next, c);\n } else {\n ih = null;\n }\n int stack = stacksize.getStacksizeBefore(src);\n Type type = ((ReturnInstruction) instr).getType();\n stack -= type.getSize();\n if (stack != 0) {\n Instruction store = TypeHelper.createStoreInstruction(type, maxLocals);\n ih = il.insert(ih == null ? next : ih, store);\n Instruction load = TypeHelper.createLoadInstruction(type, maxLocals);\n il.append(ih, load);\n while (stack > 0) {\n if (stack > 1) {\n il.append(ih, new POP2());\n stack -= 2;\n } else {\n il.append(ih, new POP());\n stack--;\n }\n }\n }\n } else if (c instanceof BranchInstruction) {\n ih = il.insert(next, (BranchInstruction) c);\n } else {\n ih = il.insert(next, c);\n }\n return ih;\n}\n"
|
"protected IClassLoader makeNewClassLoader(ClassLoaderReference classLoaderReference, IClassHierarchy cha, IClassLoader parent, AnalysisScope scope) throws IOException {\n if (classLoaderReference.equals(JavaSourceAnalysisScope.SOURCE)) {\n ClassLoaderImpl cl = new JDTSourceLoaderImpl(classLoaderReference, parent, getExclusions(), cha);\n cl.init(scope.getModules(classLoaderReference));\n return cl;\n } else {\n return super.makeNewClassLoader(classLoaderReference, cha, parent, scope);\n }\n}\n"
|
"protected void openStreams() throws IncomingFileTransferException {\n final String urlString = getRemoteFileURL().toString();\n try {\n httpClient.getHttpConnectionManager().getParams().setSoTimeout(DEFAULT_CONNECTION_TIMEOUT);\n httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(DEFAULT_CONNECTION_TIMEOUT);\n setupAuthentication(urlString);\n setupHostAndPort(urlString);\n getMethod = new GzipGetMethod(urlString);\n getMethod.setFollowRedirects(true);\n getMethod.getParams().setParameter(CredentialsProvider.PROVIDER, new ECFCredentialsProvider());\n setRequestHeaderValues();\n code = httpClient.executeMethod(getMethod);\n if (code == HttpURLConnection.HTTP_PARTIAL || code == HttpURLConnection.HTTP_OK) {\n getResponseHeaderValues();\n setInputStream(getMethod.getResponseBodyAsUnzippedStream());\n fireReceiveStartEvent();\n } else if (code == HttpURLConnection.HTTP_NOT_FOUND) {\n getMethod.releaseConnection();\n throw new FileNotFoundException(urlString);\n } else if (code == HttpURLConnection.HTTP_UNAUTHORIZED || code == HttpURLConnection.HTTP_FORBIDDEN) {\n getMethod.getResponseBody();\n getMethod.releaseConnection();\n throw new IncomingFileTransferException(Messages.HttpClientRetrieveFileTransfer_Unauthorized);\n } else if (code == HttpURLConnection.HTTP_PROXY_AUTH) {\n getMethod.releaseConnection();\n throw new LoginException(Messages.HttpClientRetrieveFileTransfer_Proxy_Auth_Required);\n } else {\n getMethod.releaseConnection();\n throw new IOException(NLS.bind(Messages.HttpClientRetrieveFileTransfer_ERROR_GENERAL_RESPONSE_CODE, new Integer(code)));\n }\n } catch (final Exception e) {\n throw new IncomingFileTransferException(NLS.bind(Messages.HttpClientRetrieveFileTransfer_EXCEPTION_COULD_NOT_CONNECT, urlString), e, getResponseCode());\n }\n}\n"
|
"public void testDoneAfterSubmitted() {\n JMSConnectionTestMQ con = (JMSConnectionTestMQ) JMSConnectionFactory.getInstance();\n Job j1 = TestInfo.getJob();\n the_dao.create(j1);\n j1.setStatus(JobStatus.NEW);\n the_dao.update(j1);\n HarvestSchedulerMonitorServer hsms = HarvestSchedulerMonitorServer.getInstance();\n long j1ID = j1.getJobID().longValue();\n j1.setStatus(JobStatus.SUBMITTED);\n the_dao.update(j1);\n DomainHarvestReport hhr = new HeritrixDomainHarvestReport(CRAWL_REPORT, DEFAULT_STOPREASON);\n CrawlStatusMessage csm_done = new CrawlStatusMessage(j1ID, JobStatus.DONE, hhr);\n hsms.onMessage(con.getObjectMessage(csm_done));\n j1 = the_dao.read(new Long(j1ID));\n assertEquals(\"String_Node_Str\", JobStatus.DONE, j1.getStatus());\n Domain nk_domain = DomainDAO.getInstance().read(\"String_Node_Str\");\n Iterator<HarvestInfo> hist = nk_domain.getHistory().getHarvestInfo();\n assertTrue(\"String_Node_Str\", hist.hasNext());\n HarvestInfo dh = (HarvestInfo) hist.next();\n assertFalse(\"String_Node_Str\", hist.hasNext());\n assertEquals(\"String_Node_Str\", 22, dh.getCountObjectRetrieved());\n assertEquals(\"String_Node_Str\", 270, dh.getSizeDataRetrieved());\n LogUtils.flushLogs(hsms.getClass().getName());\n FileAsserts.assertFileContains(\"String_Node_Str\", \"String_Node_Str\", LOG_FILE);\n}\n"
|
"public Boolean getUseNetwork() {\n return useNetwork;\n}\n"
|
"public boolean apply(Game game, Ability source) {\n Permanent triggeringCreature = game.getPermanent(getTargetPointer().getFirst(game, source));\n if (triggeringCreature == null) {\n triggeringCreature = (Permanent) game.getLastKnownInformation(getTargetPointer().getFirst(game, source), Zone.BATTLEFIELD);\n }\n if (triggeringCreature != null) {\n FilterPermanent filter = new FilterPermanent(\"String_Node_Str\" + triggeringCreature.getName());\n filter.add(Predicates.not(new PermanentIdPredicate(triggeringCreature.getId())));\n filter.add(new ControllerPredicate(TargetController.YOU));\n Set<CardTypePredicate> cardTypes = new HashSet<CardTypePredicate>();\n for (CardType cardType : triggeringCreature.getCardType()) {\n cardTypes.add(new CardTypePredicate(cardType));\n }\n filter.add(Predicates.or(cardTypes));\n TargetPermanent target = new TargetPermanent(1, 1, filter, true);\n Player controller = game.getPlayer(source.getControllerId());\n if (controller != null) {\n if (target.canChoose(controller.getId(), game) && controller.chooseTarget(outcome, target, source, game)) {\n Permanent returningCreature = game.getPermanent(target.getFirstTarget());\n if (returningCreature != null) {\n if (returningCreature.moveToZone(Zone.HAND, source.getSourceId(), game, true)) {\n game.informPlayers(new StringBuilder(\"String_Node_Str\").append(returningCreature.getName()).append(\"String_Node_Str\").toString());\n return true;\n }\n }\n }\n }\n }\n return false;\n}\n"
|
"protected void calcYValueCount(List<? extends DataSet<?>> dataSets) {\n mYValCount = 0;\n if (mDataSets == null)\n return;\n int count = 0;\n for (int i = 0; i < dataSets.size(); i++) {\n count += dataSets.get(i).getEntryCount();\n }\n mYValCount = count;\n}\n"
|
"protected void decorateSQL(Statement s) throws SQLException {\n Connection conn = getConnection();\n conn.setAutoCommit(false);\n PreparedStatement ps = null;\n String sql;\n sql = \"String_Node_Str\";\n s.executeUpdate(sql);\n sql = \"String_Node_Str\";\n ps = conn.prepareStatement(sql);\n ps.setCharacterStream(1, new java.io.StringReader(Utilities.repeatChar(\"String_Node_Str\", 38000)), 38000);\n try {\n ps.setBytes(2, Utilities.repeatChar(\"String_Node_Str\", 38000).getBytes(\"String_Node_Str\"));\n } catch (UnsupportedEncodingException ue) {\n BaseTestCase.fail(ue.getMessage(), ue);\n }\n ps.setInt(3, 38000);\n ps.executeUpdate();\n ps.close();\n conn.commit();\n}\n"
|
"public ArrayList<Property> getPropertyPropertiesForClass(JavaClass cls, TypeInfo info, boolean onlyPublic, boolean onlyExplicit) {\n ArrayList<Property> properties = new ArrayList<Property>();\n if (cls == null) {\n return properties;\n }\n ArrayList<JavaMethod> propertyMethods = new ArrayList<JavaMethod>();\n for (JavaMethod next : new ArrayList<JavaMethod>(cls.getDeclaredMethods())) {\n if (!next.isSynthetic()) {\n if (((next.getName().startsWith(GET_STR) && next.getName().length() > 3) || (next.getName().startsWith(IS_STR) && next.getName().length() > 2)) && next.getParameterTypes().length == 0 && next.getReturnType() != helper.getJavaClass(java.lang.Void.class)) {\n int modifiers = next.getModifiers();\n if (!Modifier.isStatic(modifiers) && !Modifier.isTransient(modifiers) && ((onlyPublic && Modifier.isPublic(next.getModifiers())) || !onlyPublic)) {\n propertyMethods.add(next);\n }\n } else if (next.getName().startsWith(SET_STR) && next.getName().length() > 3 && next.getParameterTypes().length == 1) {\n int modifiers = next.getModifiers();\n if (!Modifier.isStatic(modifiers) && !Modifier.isTransient(modifiers) && ((onlyPublic && Modifier.isPublic(next.getModifiers())) || !onlyPublic)) {\n propertyMethods.add(next);\n }\n }\n }\n }\n ArrayList<String> propertyNames = new ArrayList<String>();\n for (int i = 0; i < propertyMethods.size(); i++) {\n boolean isPropertyTransient = false;\n JavaMethod nextMethod = propertyMethods.get(i);\n String propertyName = EMPTY_STRING;\n JavaMethod getMethod;\n JavaMethod setMethod;\n JavaMethod propertyMethod = null;\n if (!nextMethod.getName().startsWith(SET_STR)) {\n if (nextMethod.getName().startsWith(GET_STR)) {\n propertyName = nextMethod.getName().substring(3);\n } else if (nextMethod.getName().startsWith(IS_STR)) {\n propertyName = nextMethod.getName().substring(2);\n }\n getMethod = nextMethod;\n String setMethodName = SET_STR + propertyName;\n propertyName = Introspector.decapitalize(propertyName);\n JavaClass[] paramTypes = { (JavaClass) getMethod.getReturnType() };\n setMethod = cls.getDeclaredMethod(setMethodName, paramTypes);\n if (setMethod == null && !(hasJAXBAnnotations(getMethod))) {\n isPropertyTransient = true;\n }\n if (setMethod != null && hasJAXBAnnotations(setMethod)) {\n boolean isTransient = helper.isAnnotationPresent(setMethod, XmlTransient.class);\n boolean isLocation = helper.isAnnotationPresent(setMethod, XmlLocation.class) || helper.isAnnotationPresent(setMethod, CompilerHelper.XML_LOCATION_ANNOTATION_CLASS) || helper.isAnnotationPresent(setMethod, CompilerHelper.INTERNAL_XML_LOCATION_ANNOTATION_CLASS);\n if (!isTransient) {\n propertyMethod = setMethod;\n } else {\n isPropertyTransient = true;\n if (isLocation) {\n propertyMethod = setMethod;\n info.setLocationAware(true);\n }\n }\n } else if ((onlyExplicit && hasJAXBAnnotations(getMethod)) || !onlyExplicit) {\n boolean isTransient = helper.isAnnotationPresent(getMethod, XmlTransient.class);\n boolean isLocation = helper.isAnnotationPresent(getMethod, XmlLocation.class) || helper.isAnnotationPresent(setMethod, CompilerHelper.XML_LOCATION_ANNOTATION_CLASS) || helper.isAnnotationPresent(setMethod, CompilerHelper.INTERNAL_XML_LOCATION_ANNOTATION_CLASS);\n if (!isTransient) {\n propertyMethod = getMethod;\n } else {\n isPropertyTransient = true;\n if (isLocation) {\n propertyMethod = getMethod;\n info.setLocationAware(true);\n }\n }\n } else if (onlyExplicit) {\n continue;\n }\n } else {\n propertyName = nextMethod.getName().substring(3);\n setMethod = nextMethod;\n String getMethodName = GET_STR + propertyName;\n getMethod = cls.getDeclaredMethod(getMethodName, new JavaClass[] {});\n if (getMethod == null) {\n getMethodName = IS_STR + propertyName;\n getMethod = cls.getDeclaredMethod(getMethodName, new JavaClass[] {});\n }\n if (getMethod == null && !(hasJAXBAnnotations(setMethod))) {\n isPropertyTransient = true;\n }\n if (getMethod != null && hasJAXBAnnotations(getMethod)) {\n boolean isTransient = helper.isAnnotationPresent(getMethod, XmlTransient.class);\n boolean isLocation = helper.isAnnotationPresent(getMethod, XmlLocation.class);\n if (!isTransient) {\n propertyMethod = getMethod;\n } else {\n isPropertyTransient = true;\n if (isLocation) {\n propertyMethod = getMethod;\n info.setLocationAware(true);\n }\n }\n } else if ((onlyExplicit && hasJAXBAnnotations(setMethod)) || !onlyExplicit) {\n boolean isTransient = helper.isAnnotationPresent(setMethod, XmlTransient.class);\n boolean isLocation = helper.isAnnotationPresent(setMethod, XmlLocation.class);\n if (!isTransient) {\n propertyMethod = setMethod;\n } else {\n isPropertyTransient = true;\n if (isLocation) {\n propertyMethod = setMethod;\n info.setLocationAware(true);\n }\n }\n } else if (onlyExplicit) {\n continue;\n }\n propertyName = Introspector.decapitalize(propertyName);\n }\n JavaClass ptype = null;\n if (getMethod != null) {\n ptype = (JavaClass) getMethod.getReturnType();\n } else {\n ptype = setMethod.getParameterTypes()[0];\n }\n if (!propertyNames.contains(propertyName)) {\n propertyNames.add(propertyName);\n Property property = buildNewProperty(info, cls, propertyMethod, propertyName, ptype);\n property.setTransient(isPropertyTransient);\n if (getMethod != null) {\n property.setOriginalGetMethodName(getMethod.getName());\n if (property.getGetMethodName() == null) {\n property.setGetMethodName(getMethod.getName());\n }\n }\n if (setMethod != null) {\n property.setOriginalSetMethodName(setMethod.getName());\n if (property.getSetMethodName() == null) {\n property.setSetMethodName(setMethod.getName());\n }\n }\n property.setMethodProperty(true);\n boolean isTransient = helper.isAnnotationPresent(property.getElement(), XmlTransient.class);\n boolean isLocation = helper.isAnnotationPresent(property.getElement(), XmlLocation.class);\n if (!isTransient || (isTransient && isLocation)) {\n properties.add(property);\n }\n }\n }\n properties = removeSuperclassProperties(cls, properties);\n Collections.sort(properties, new PropertyComparitor());\n return properties;\n}\n"
|
"public void q() {\n this.A = !this.d.isEmpty();\n Iterator iterator = this.d.iterator();\n while (iterator.hasNext()) {\n EntityHuman entityhuman = (EntityHuman) iterator.next();\n if (!entityhuman.F() && !entityhuman.fauxSleeping) {\n this.A = false;\n break;\n }\n }\n}\n"
|
"private List<IEditor<?>> getEditors(final Model model) {\n final List<IEditor<?>> result = new ArrayList<IEditor<?>>();\n result.add(new EditorString(Resources.getMessage(\"String_Node_Str\"), Resources.getMessage(\"String_Node_Str\"), ok, false) {\n public boolean accepts(final String s) {\n if (s.equals(\"String_Node_Str\")) {\n return false;\n } else {\n return true;\n }\n }\n public String getValue() {\n return model.getName();\n }\n public void setValue(final String s) {\n model.setName(s);\n }\n });\n result.add(new EditorString(Resources.getMessage(\"String_Node_Str\"), Resources.getMessage(\"String_Node_Str\"), ok, true) {\n public boolean accepts(final String s) {\n return true;\n }\n public String getValue() {\n return model.getDescription();\n }\n public void setValue(final String s) {\n model.setDescription(s);\n }\n });\n result.add(new EditorString(Resources.getMessage(\"String_Node_Str\"), Resources.getMessage(\"String_Node_Str\"), ok, false) {\n public boolean accepts(final String s) {\n if (s.length() == 1) {\n return true;\n } else {\n return false;\n }\n }\n public String getValue() {\n return String.valueOf(model.getSeparator());\n }\n public void setValue(final String s) {\n model.setSeparator(s.toCharArray()[0]);\n }\n });\n result.add(new EditorBoolean(Resources.getMessage(\"String_Node_Str\"), Resources.getMessage(\"String_Node_Str\")) {\n public Boolean getValue() {\n return model.getInputConfig().isRemoveOutliers();\n }\n public void setValue(final Boolean t) {\n model.getInputConfig().setRemoveOutliers(t);\n }\n });\n result.add(new EditorString(Resources.getMessage(\"String_Node_Str\"), Resources.getMessage(\"String_Node_Str\"), ok, false) {\n public boolean accepts(final String s) {\n return true;\n }\n public String getValue() {\n return model.getSuppressionString();\n }\n public void setValue(final String s) {\n model.setSuppressionString(s);\n }\n });\n final IntegerValidator v = new IntegerValidator(0, 1000001);\n result.add(new EditorString(Resources.getMessage(\"String_Node_Str\"), Resources.getMessage(\"String_Node_Str\"), ok, false) {\n public boolean accepts(final String s) {\n return v.validate(s);\n }\n public String getValue() {\n return String.valueOf(model.getMaxNodesInLattice());\n }\n public void setValue(final String s) {\n model.setMaxNodesInLattice(Integer.valueOf(s));\n }\n });\n final IntegerValidator v2 = new IntegerValidator(0, 1000001);\n result.add(new EditorString(Resources.getMessage(\"String_Node_Str\"), Resources.getMessage(\"String_Node_Str\"), ok, false) {\n public boolean accepts(final String s) {\n return v2.validate(s);\n }\n public String getValue() {\n return String.valueOf(model.getHistorySize());\n }\n public void setValue(final String s) {\n model.setHistorySize(Integer.valueOf(s));\n }\n });\n final DoubleValidator v3 = new DoubleValidator(0d, 1d);\n result.add(new EditorString(Resources.getMessage(\"String_Node_Str\"), Resources.getMessage(\"String_Node_Str\"), ok, false) {\n public boolean accepts(final String s) {\n return v3.validate(s);\n }\n public String getValue() {\n return String.valueOf(model.getSnapshotSizeDataset());\n }\n public void setValue(final String s) {\n model.setSnapshotSizeDataset(Double.valueOf(s));\n }\n });\n result.add(new EditorString(Resources.getMessage(\"String_Node_Str\"), Resources.getMessage(\"String_Node_Str\"), ok, false) {\n public boolean accepts(final String s) {\n return v3.validate(s);\n }\n public String getValue() {\n return String.valueOf(model.getSnapshotSizeSnapshot());\n }\n public void setValue(final String s) {\n model.setSnapshotSizeSnapshot(Double.valueOf(s));\n }\n });\n final IntegerValidator v5 = new IntegerValidator(0, Integer.MAX_VALUE);\n result.add(new EditorString(Resources.getMessage(\"String_Node_Str\"), Resources.getMessage(\"String_Node_Str\"), ok, false) {\n public boolean accepts(final String s) {\n return v5.validate(s);\n }\n public String getValue() {\n return String.valueOf(model.getMaximalSizeForComplexOperations());\n }\n public void setValue(final String s) {\n model.setMaximalSizeForComplexOperations(Integer.valueOf(s));\n }\n });\n result.add(new EditorBoolean(Resources.getMessage(\"String_Node_Str\"), Resources.getMessage(\"String_Node_Str\")) {\n public Boolean getValue() {\n return model.isDebugEnabled();\n }\n public void setValue(final Boolean s) {\n model.setDebugEnabled(s);\n }\n });\n final IntegerValidator v4 = new IntegerValidator(0, 10000);\n result.add(new EditorString(Resources.getMessage(\"String_Node_Str\"), Resources.getMessage(\"String_Node_Str\"), ok, false) {\n public boolean accepts(final String s) {\n return v4.validate(s);\n }\n public String getValue() {\n return String.valueOf(model.getInitialNodesInViewer());\n }\n public void setValue(final String s) {\n model.setInitialNodesInViewer(Integer.valueOf(s));\n }\n });\n result.add(new EditorString(Resources.getMessage(\"String_Node_Str\"), Resources.getMessage(\"String_Node_Str\"), ok, false) {\n public boolean accepts(final String s) {\n return v4.validate(s);\n }\n public String getValue() {\n return String.valueOf(model.getMaxNodesInViewer());\n }\n public void setValue(final String s) {\n model.setMaxNodesInViewer(Integer.valueOf(s));\n }\n });\n return result;\n}\n"
|
"public void undeployService(String type) throws ADCException {\n DataInsertionAndRetrievalManager dataInsertionAndRetrievalManager = new DataInsertionAndRetrievalManager();\n Collection<CartridgeSubscription> cartridgeSubscriptions = dataInsertionAndRetrievalManager.getCartridgeSubscriptions(type);\n if (cartridgeSubscriptions != null) {\n if (!cartridgeSubscriptions.isEmpty()) {\n String errorMsg = \"String_Node_Str\";\n log.error(errorMsg);\n throw new ADCException(errorMsg);\n }\n }\n if (log.isDebugEnabled()) {\n log.debug(\"String_Node_Str\" + type + \"String_Node_Str\");\n }\n Service service;\n try {\n service = dataInsertionAndRetrievalManager.getService(type);\n } catch (PersistenceManagerException e) {\n String errorMsg = \"String_Node_Str\";\n log.error(errorMsg, e);\n throw new ADCException(errorMsg, e);\n }\n if (service == null) {\n String errorMsg = \"String_Node_Str\" + type;\n log.error(errorMsg);\n throw new ADCException(errorMsg);\n }\n service.undeploy();\n try {\n dataInsertionAndRetrievalManager.removeService(type);\n } catch (PersistenceManagerException e) {\n String errorMsg = \"String_Node_Str\";\n log.error(errorMsg, e);\n throw new ADCException(errorMsg, e);\n }\n}\n"
|
"private JSONObject getElementObject(Element e, boolean added) {\n JSONObject elementOb = null;\n String elementID = ExportUtility.getElementID(e);\n if (elements.containsKey(elementID)) {\n elementOb = elements.get(elementID);\n } else {\n elementOb = new JSONObject();\n elementOb.put(\"String_Node_Str\", elementID);\n elements.put(elementID, elementOb);\n }\n if (deletedElements.containsKey(elementID) && !auto)\n deletedElements.remove(elementID);\n if (added)\n addedElements.put(elementID, e);\n changedElements.put(elementID, e);\n return elementOb;\n}\n"
|
"private boolean isClassnameValid(String className) {\n if (className.isEmpty()) {\n corpusMgmtViewform.getMessageManager().addMessage(\"String_Node_Str\", \"String_Node_Str\", null, IMessageProvider.ERROR);\n return false;\n } else {\n corpusMgmtViewform.getMessageManager().removeMessage(\"String_Node_Str\");\n }\n String parentCorpusId = selectedCorpusClass.getParentId();\n ICorpus parentCorpus = corpusManagement.readCorpusById(parentCorpusId);\n for (ICorpusClass cc : parentCorpus.getClasses()) {\n if ((CorpusClass) cc != selectedCorpusClass) {\n if (cc.getClassName().equals(className)) {\n corpusMgmtViewform.getMessageManager().addMessage(\"String_Node_Str\", \"String_Node_Str\" + className + \"String_Node_Str\" + corpusId, null, IMessageProvider.ERROR);\n return false;\n }\n }\n }\n corpusMgmtViewform.getMessageManager().removeMessage(\"String_Node_Str\");\n return true;\n}\n"
|
"public void configureTableFacadePostColumnConfiguration(TableFacade tableFacade) {\n ListNotesTableToolbar toolbar = new ListNotesTableToolbar();\n tableFacade.setToolbar(toolbar);\n toolbar.setStudyHasDiscNotes(studyHasDiscNotes);\n toolbar.setDiscNoteType(discNoteType);\n toolbar.setResolutionStatus(resolutionStatus);\n toolbar.setModule(module);\n toolbar.setResword(resword);\n tableFacade.setToolbar(toolbar);\n}\n"
|
"public void test2() throws IOException, ParseException, CloudsyncException, FileIOException, UsageException, InfoException {\n File rootFolder = Files.createTempDirectory(\"String_Node_Str\").toFile();\n File targetLocalRemoteFolder = Files.createTempDirectory(\"String_Node_Str\").toFile();\n File restoreFolder = new File(rootFolder.getParent(), rootFolder.getName() + \"String_Node_Str\");\n File configFile = Files.createTempFile(\"String_Node_Str\", \"String_Node_Str\").toFile();\n System.out.println(\"String_Node_Str\");\n System.out.println(\"String_Node_Str\" + rootFolder.getAbsolutePath());\n System.out.println(\"String_Node_Str\" + targetLocalRemoteFolder.getAbsolutePath());\n String config = \"String_Node_Str\";\n config += \"String_Node_Str\" + \"String_Node_Str\";\n config += \"String_Node_Str\" + \"String_Node_Str\" + targetLocalRemoteFolderPath;\n config += \"String_Node_Str\" + \"String_Node_Str\" + targetLocalRemoteFolderPath + File.separator + \"String_Node_Str\";\n config += \"String_Node_Str\" + \"String_Node_Str\" + targetLocalRemoteFolderPath + File.separator + \"String_Node_Str\";\n config += \"String_Node_Str\" + \"String_Node_Str\";\n Files.write(configFile.toPath(), config.getBytes(), StandardOpenOption.CREATE);\n File file1 = new File(rootFolder, \"String_Node_Str\");\n File subfolder1 = new File(rootFolder, \"String_Node_Str\");\n File file2 = new File(subfolder1, \"String_Node_Str\");\n File subfolder2 = new File(subfolder1, \"String_Node_Str\");\n File file3 = new File(subfolder2, \"String_Node_Str\");\n subfolder1.mkdirs();\n subfolder2.mkdirs();\n Files.write(file1.toPath(), \"String_Node_Str\".getBytes(\"String_Node_Str\"), StandardOpenOption.CREATE_NEW);\n Files.write(file2.toPath(), \"String_Node_Str\".getBytes(\"String_Node_Str\"), StandardOpenOption.CREATE_NEW);\n Files.write(file3.toPath(), \"String_Node_Str\".getBytes(\"String_Node_Str\"), StandardOpenOption.CREATE_NEW);\n String[] args = new String[] { \"String_Node_Str\", \"String_Node_Str\", rootFolder.getAbsolutePath(), \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", configFile.getAbsolutePath() };\n Cloudsync.main(args);\n Files.write(file1.toPath(), \"String_Node_Str\".getBytes(\"String_Node_Str\"), StandardOpenOption.TRUNCATE_EXISTING);\n Files.write(file2.toPath(), \"String_Node_Str\".getBytes(\"String_Node_Str\"), StandardOpenOption.TRUNCATE_EXISTING);\n Files.write(file3.toPath(), \"String_Node_Str\".getBytes(\"String_Node_Str\"), StandardOpenOption.TRUNCATE_EXISTING);\n Cloudsync.main(args);\n SimpleDateFormat sdf = new SimpleDateFormat(\"String_Node_Str\");\n File historyFolder = new File(targetLocalRemoteFolder, \"String_Node_Str\" + \"String_Node_Str\" + sdf.format(new Date()));\n CmdOptions cmdOptions = new CmdOptions(args);\n cmdOptions.parse();\n Crypt crypt = new Crypt(cmdOptions);\n assertEquals(historyFolder.listFiles().length, 3);\n for (File f1 : historyFolder.listFiles()) {\n if (f1.getName().endsWith(\"String_Node_Str\")) {\n } else if (f1.isFile()) {\n assertEquals(crypt.decryptText(f1.getName()), \"String_Node_Str\");\n _assertEncryptedFileContentEquals(f1, crypt, \"String_Node_Str\");\n } else {\n assertEquals(crypt.decryptText(f1.getName()), \"String_Node_Str\");\n assertEquals(f1.listFiles().length, 3);\n for (File f2 : f1.listFiles()) {\n if (f2.getName().endsWith(\"String_Node_Str\")) {\n } else if (f2.isFile()) {\n assertEquals(crypt.decryptText(f2.getName()), \"String_Node_Str\");\n _assertEncryptedFileContentEquals(f2, crypt, \"String_Node_Str\");\n } else {\n assertEquals(f2.listFiles().length, 2);\n assertEquals(crypt.decryptText(f2.getName()), \"String_Node_Str\");\n for (File f3 : f2.listFiles()) {\n if (f3.getName().endsWith(\"String_Node_Str\")) {\n } else {\n assertEquals(crypt.decryptText(f3.getName()), \"String_Node_Str\");\n _assertEncryptedFileContentEquals(f3, crypt, \"String_Node_Str\");\n }\n }\n }\n }\n }\n }\n restoreFolder.mkdir();\n args = new String[] { \"String_Node_Str\", \"String_Node_Str\", restoreFolder.getAbsolutePath(), \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", configFile.getAbsolutePath() };\n Cloudsync.main(args);\n assertTrue(hierarchieEquals(rootFolder, restoreFolder));\n FileUtils.deleteDirectory(rootFolder);\n}\n"
|
"private JSType simpleInferExprType(Node n) {\n switch(n.getType()) {\n case Token.REGEXP:\n return getRegexpType();\n case Token.ARRAYLIT:\n {\n if (!n.hasChildren()) {\n return null;\n }\n Node child = n.getFirstChild();\n JSType arrayType = simpleInferExprType(child);\n if (arrayType == null) {\n return null;\n }\n while (null != (child = child.getNext())) {\n if (!arrayType.equals(simpleInferExprType(child))) {\n return null;\n }\n }\n return getArrayType(arrayType);\n }\n case Token.TRUE:\n return JSType.TRUE_TYPE;\n case Token.FALSE:\n return JSType.FALSE_TYPE;\n case Token.NAME:\n {\n String varName = n.getString();\n if (varName.equals(\"String_Node_Str\")) {\n return JSType.UNDEFINED;\n } else if (currentScope.isNamespaceLiteral(varName)) {\n return null;\n }\n return currentScope.getDeclaredTypeOf(varName);\n }\n case Token.OBJECTLIT:\n {\n JSType objLitType = JSType.TOP_OBJECT;\n for (Node prop : n.children()) {\n JSType propType = simpleInferExprType(prop.getFirstChild());\n if (propType == null) {\n return null;\n }\n objLitType = objLitType.withProperty(new QualifiedName(NodeUtil.getObjectLitKeyName(prop)), propType);\n }\n return objLitType;\n }\n case Token.GETPROP:\n JSType recvType = simpleInferExprType(n.getFirstChild());\n if (recvType == null) {\n return null;\n }\n QualifiedName qname = new QualifiedName(n.getLastChild().getString());\n if (!recvType.mayHaveProp(qname)) {\n return null;\n }\n return recvType.getProp(qname);\n case Token.COMMA:\n case Token.ASSIGN:\n return simpleInferExprType(n.getLastChild());\n case Token.CALL:\n case Token.NEW:\n JSType ratorType = simpleInferExprType(n.getFirstChild());\n if (ratorType == null) {\n return null;\n }\n FunctionType funType = ratorType.getFunType();\n if (funType == null) {\n return null;\n }\n if (funType.isGeneric()) {\n ImmutableList.Builder<JSType> argTypes = ImmutableList.builder();\n for (Node argNode = n.getFirstChild().getNext(); argNode != null; argNode = argNode.getNext()) {\n JSType t = simpleInferExprType(argNode);\n if (t == null) {\n return null;\n }\n argTypes.add(t);\n }\n funType = funType.instantiateGenericsFromArgumentTypes(argTypes.build());\n if (funType == null) {\n return null;\n }\n }\n return funType.getReturnType();\n default:\n switch(NodeUtil.getKnownValueType(n)) {\n case NULL:\n return JSType.NULL;\n case VOID:\n return JSType.UNDEFINED;\n case NUMBER:\n return JSType.NUMBER;\n case STRING:\n return JSType.STRING;\n case BOOLEAN:\n return JSType.BOOLEAN;\n case UNDETERMINED:\n default:\n return null;\n }\n }\n}\n"
|
"private int[][] initialiseGrid(String sudokuAsText) throws NumberFormatException {\n int[][] grid = new int[9][9];\n if (!isValidChain(sudokuAsText)) {\n throw new NumberFormatException(\"String_Node_Str\");\n }\n if (!isTheRightAmountOFNumbers(sudokuAsText)) {\n throw new NumberFormatException(\"String_Node_Str\");\n }\n int counterForSudokuText = 0;\n for (int row = 0; row < 9; row++) {\n for (int column = 0; column < 9; column++) {\n grid[row][column] = new Integer(sudokuAsText.charAt(counterForSudokuText) + \"String_Node_Str\").intValue();\n counterForSudokuText++;\n }\n }\n return grid;\n}\n"
|
"public void onClick(View view) {\n Intent intent = new Intent(getActivity(), BuySellSelectFragment.class);\n startActivity(intent);\n}\n"
|
"public static byte[] compressTimes(final int[] times) {\n final ByteArrayOutputStream outputStream = new ByteArrayOutputStream(times.length / 3);\n final DataOutputStream dataStream = new DataOutputStream(outputStream);\n try {\n int lastTime = times[0];\n int lastDelta = 0;\n int repeatCount = 0;\n writeTime(0, lastTime, dataStream);\n for (int i = 1; i < times.length; i++) {\n final int newTime = times[i];\n if (newTime < lastTime) {\n log.warn(\"String_Node_Str\", newTime, lastTime);\n continue;\n }\n final int delta = newTime - lastTime;\n final boolean deltaWorks = delta <= MAX_DELTA_TIME;\n final boolean sameDelta = repeatCount > 0 && delta == lastDelta;\n if (deltaWorks) {\n if (sameDelta) {\n repeatCount++;\n if (repeatCount == MAX_REPEAT_COUNT) {\n writeRepeatedDelta(delta, repeatCount, dataStream);\n repeatCount = 0;\n }\n } else {\n if (repeatCount > 0) {\n writeRepeatedDelta(lastDelta, repeatCount, dataStream);\n }\n repeatCount = 1;\n }\n lastDelta = delta;\n } else {\n if (repeatCount > 0) {\n writeRepeatedDelta(lastDelta, repeatCount, dataStream);\n }\n writeTime(0, newTime, dataStream);\n repeatCount = 0;\n lastDelta = 0;\n }\n lastTime = newTime;\n }\n if (repeatCount > 0) {\n writeRepeatedDelta(lastDelta, repeatCount, dataStream);\n }\n outputStream.flush();\n return outputStream.toByteArray();\n } catch (IOException e) {\n log.error(e, \"String_Node_Str\", times.length);\n return null;\n }\n}\n"
|
"public void mute(boolean isMuted) {\n SoftphoneControlImpl sc = SoftphoneControlImpl.getInstance();\n sc.mute(isMuted);\n session.send(this, new MuteCallMessage(sc.getCallID(), isMuted));\n}\n"
|
"public static String[] exec(Map flags, final String[] cmd, String[] envp, File dir, String input, final Logger log, final Object context) {\n Closer closer = Closer.create();\n try {\n log.debug(\"String_Node_Str\" + context + \"String_Node_Str\" + Strings.join(cmd, \"String_Node_Str\"));\n final Process proc = Runtime.getRuntime().exec(cmd, envp, dir);\n ByteArrayOutputStream stdoutB = new ByteArrayOutputStream();\n ByteArrayOutputStream stderrB = new ByteArrayOutputStream();\n PrintStream stdoutP = new GroovyPrintStream(stdoutB);\n PrintStream stderrP = new GroovyPrintStream(stderrB);\n StreamGobbler stdoutG = new StreamGobbler(proc.getInputStream(), stdoutP, log).setLogPrefix(\"String_Node_Str\" + context + \"String_Node_Str\");\n stdoutG.start();\n closer.register(stdoutG);\n StreamGobbler stderrG = new StreamGobbler(proc.getErrorStream(), stderrP, log).setLogPrefix(\"String_Node_Str\" + context + \"String_Node_Str\");\n stderrG.start();\n closer.register(stderrG);\n if (input != null && input.length() > 0) {\n proc.getOutputStream().write(input.getBytes());\n proc.getOutputStream().flush();\n }\n long timeout2 = TIMEOUT;\n Object tf = flags.get(\"String_Node_Str\");\n if (tf instanceof Number)\n timeout2 = ((Number) tf).longValue();\n else if (tf instanceof Duration)\n timeout2 = ((Duration) tf).toMilliseconds();\n else if (tf instanceof TimeDuration)\n timeout2 = ((TimeDuration) tf).toMilliseconds();\n if (tf != null)\n timeout2 = (Long) tf;\n final long timeout = timeout2;\n final AtomicBoolean ended = new AtomicBoolean(false);\n final AtomicBoolean killed = new AtomicBoolean(false);\n Thread timeoutThread = new Thread(new Runnable() {\n\n public void run() {\n try {\n if (timeout > 0) {\n Thread.sleep(timeout);\n if (!ended.get()) {\n log.debug(\"String_Node_Str\" + context + \"String_Node_Str\" + Strings.join(cmd, \"String_Node_Str\"));\n proc.destroy();\n killed.set(true);\n }\n }\n } catch (Exception e) {\n }\n }\n });\n if (TIMEOUT > 0)\n t.start();\n int exitCode = proc.waitFor();\n ended.set(true);\n if (TIMEOUT > 0)\n t.interrupt();\n stdoutG.blockUntilFinished();\n stderrG.blockUntilFinished();\n if (exitCode != 0 || killed.get()) {\n String message = killed.get() ? \"String_Node_Str\" : \"String_Node_Str\" + exitCode;\n log.debug(\"String_Node_Str\" + context + \"String_Node_Str\" + Strings.join(cmd, \"String_Node_Str\") + \"String_Node_Str\" + message);\n String e = \"String_Node_Str\" + message + \"String_Node_Str\" + Strings.join(cmd, \"String_Node_Str\");\n log.warn(e + \"String_Node_Str\" + stdoutB + (stderrB.size() > 0 ? \"String_Node_Str\" + stderrB : \"String_Node_Str\"));\n throw new IllegalStateException(e + \"String_Node_Str\");\n }\n log.debug(\"String_Node_Str\" + context + \"String_Node_Str\" + Strings.join(cmd, \"String_Node_Str\") + \"String_Node_Str\");\n return stdoutB.toString().split(\"String_Node_Str\");\n } catch (Exception e) {\n throw Exceptions.propagate(e);\n } finally {\n Streams.closeQuietly(closer);\n }\n}\n"
|
"public boolean checkTrigger(GameEvent event, Game game) {\n return event.getSourceId().equals(madnessOriginalId);\n}\n"
|
"public boolean apply(Game game, Ability source) {\n Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source));\n Player controller = game.getPlayer(source.getControllerId());\n MageObject sourceObject = game.getObject(source.getSourceId());\n if (targetPlayer != null && controller != null && sourceObject != null) {\n String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY);\n Cards hand = targetPlayer.getHand();\n for (Card card : hand.getCards(game)) {\n if (card.getName().equals(cardName)) {\n targetPlayer.discard(card, source, game);\n }\n }\n controller.lookAtCards(sourceObject.getName() + \"String_Node_Str\", targetPlayer.getHand(), game);\n }\n return true;\n}\n"
|
"public static Weighted weighted(Number number) {\n if (number instanceof Weighted)\n return (Weighted) number;\n return weighted(number, 1);\n}\n"
|
"public static boolean getRetrieveAllMetadata(ModelElement element) {\n if (element != null && element instanceof Connection) {\n if (element instanceof DatabaseConnection) {\n DatabaseConnection dbConn = (DatabaseConnection) element;\n String sid = JavaSqlFactory.getSID(dbConn);\n if (sid != null && !\"String_Node_Str\".equals(sid.trim())) {\n TaggedValue taggedValue = TaggedValueHelper.getTaggedValue(TaggedValueHelper.RETRIEVE_ALL, element.getTaggedValue());\n if (taggedValue != null) {\n String value = taggedValue.getValue();\n if (value.equals(\"String_Node_Str\")) {\n return true;\n }\n }\n if (ConnectionHelper.isOracle(dbConn) || isPostgresql(dbConn)) {\n String uiSchema = dbConn.getUiSchema();\n if (uiSchema != null && !\"String_Node_Str\".equals(uiSchema.trim())) {\n return false;\n } else {\n return true;\n }\n } else {\n return false;\n }\n } else {\n return true;\n }\n } else if (element instanceof MDMConnection) {\n MDMConnection mdmConn = (MDMConnection) element;\n String context = mdmConn.getContext();\n if (context != null && !\"String_Node_Str\".equals(context.trim())) {\n return false;\n } else {\n return true;\n }\n } else if (element instanceof FileConnection) {\n return true;\n }\n }\n return true;\n}\n"
|
"public boolean onOptionsItemSelected(MenuItem item) {\n switch(item.getItemId()) {\n case R.id.actionToggleValues:\n {\n for (DataSet<?> set : mChart.getData().getDataSets()) set.setDrawValues(!set.isDrawValuesEnabled());\n mChart.invalidate();\n break;\n }\n case R.id.actionToggleHighlight:\n {\n if (mChart.isHighlightEnabled())\n mChart.setHighlightEnabled(false);\n else\n mChart.setHighlightEnabled(true);\n mChart.invalidate();\n break;\n }\n case R.id.actionToggleRotate:\n {\n if (mChart.isRotationEnabled())\n mChart.setRotationEnabled(false);\n else\n mChart.setRotationEnabled(true);\n mChart.invalidate();\n break;\n }\n case R.id.actionToggleFilled:\n {\n ArrayList<RadarDataSet> sets = (ArrayList<RadarDataSet>) mChart.getData().getDataSets();\n for (RadarDataSet set : sets) {\n if (set.isDrawFilledEnabled())\n set.setDrawFilled(false);\n else\n set.setDrawFilled(true);\n }\n mChart.invalidate();\n break;\n }\n case R.id.actionSave:\n {\n if (mChart.saveToPath(\"String_Node_Str\" + System.currentTimeMillis(), \"String_Node_Str\")) {\n Toast.makeText(getApplicationContext(), \"String_Node_Str\", Toast.LENGTH_SHORT).show();\n } else\n Toast.makeText(getApplicationContext(), \"String_Node_Str\", Toast.LENGTH_SHORT).show();\n break;\n }\n case R.id.actionToggleXLabels:\n {\n mChart.getXAxis().setEnabled(!mChart.getXAxis().isEnabled());\n mChart.invalidate();\n break;\n }\n case R.id.actionToggleYLabels:\n {\n mChart.getYAxis().setEnabled(!mChart.getYAxis().isEnabled());\n mChart.invalidate();\n break;\n }\n case R.id.actionToggleSpin:\n {\n mChart.spin(2000, mChart.getRotationAngle(), mChart.getRotationAngle() + 360);\n break;\n }\n }\n return true;\n}\n"
|
"public Location getPlotHome(PlotId id, IWorld world) {\n Location plotHome = getGenManager(world).getPlotHome(id);\n plugin.getLogger().info(plotHome.toString());\n return plotHome;\n}\n"
|
"private static Type unpackedStructType(Type type, StructType structType) {\n List<StructField> packedFields = structType.getFields();\n List<StructField> unpackedFields = new ArrayList<StructField>(packedFields.size());\n boolean differences = false;\n for (StructField packedField : packedFields) {\n Type packedFieldType = packedField.getType();\n Type unpackedFieldType = unpackedType(packedFieldType);\n if (unpackedFieldType.equals(packedFieldType)) {\n unpackedFields.add(packedField);\n } else {\n StructField unpackedField = new StructField(unpackedFieldType, packedField.getName());\n unpackedFields.add(unpackedField);\n differences = true;\n }\n }\n if (differences) {\n return new StructType(true, \"String_Node_Str\" + type.typeName(), unpackedFields);\n } else {\n return StructType.localStruct(structType);\n }\n}\n"
|
"public static void test3() {\n Variables variables = new Variables();\n EF_SparseMultinomial dist = new EF_SparseMultinomial(variables.newMultinomialVariable(\"String_Node_Str\", 10));\n EF_Multinomial distM = new EF_Multinomial(variables.newMultinomialVariable(\"String_Node_Str\", 10));\n int size = 10;\n SufficientStatistics sufficientStatistics = dist.getSufficientStatistics(1);\n sufficientStatistics.multiplyBy(size);\n sufficientStatistics.sum(dist.createInitSufficientStatistics());\n dist.setMomentParameters(sufficientStatistics);\n distM.setMomentParameters(sufficientStatistics);\n dist.updateNaturalFromMomentParameters();\n distM.updateNaturalFromMomentParameters();\n dist.fixNumericalInstability();\n distM.fixNumericalInstability();\n dist.updateMomentFromNaturalParameters();\n distM.updateMomentFromNaturalParameters();\n assertEquals(dist.getNaturalParameters().sum(), distM.getNaturalParameters().sum());\n assertEquals(dist.getMomentParameters().sum(), distM.getMomentParameters().sum());\n assertEquals(dist.computeLogBaseMeasure(1.0), distM.computeLogBaseMeasure(1.0));\n assertEquals(dist.computeLogNormalizer(), distM.computeLogNormalizer());\n for (int i = 0; i < 10; i++) {\n assertEquals(dist.computeLogProbabilityOf(i), distM.computeLogProbabilityOf(i));\n }\n}\n"
|
"public boolean isComplete() {\n if (validator == null) {\n return false;\n }\n ValidationStatus status = validator.getPreviousValidationStatus();\n return status != null && status.getStatus().isOK();\n}\n"
|
"public void testGetState() {\n Var v0 = getVar(0, 2);\n Var v1 = getVar(1, 3);\n Var v2 = getVar(2, 5);\n VarSet vars1 = new VarSet();\n vars1.add(v0);\n vars1.add(v1);\n vars1.add(v2);\n VarSet vars2 = new VarSet();\n vars2.add(v1);\n vars2.add(v3);\n IndexFor iter = new IndexFor(vars1, vars2);\n while (iter.hasNext()) {\n System.out.println(Arrays.toString(iter.getState()));\n iter.next();\n }\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.