content stringlengths 40 137k |
|---|
"public void testLockUnlock() throws Exception {\n Sardine sardine = SardineFactory.begin();\n String url = String.format(\"String_Node_Str\", UUID.randomUUID().toString());\n sardine.put(url, new byte[0]);\n try {\n String token = sardine.lock(url);\n try {\n sardine.delete(url);\n fail(\"String_Node_Str\");\n } catch (SardineException e) {\n assertEquals(423, e.getStatusCode());\n }\n sardine.unlock(url, token);\n } finally {\n sardine.delete(url);\n }\n}\n"
|
"public void addEdgeDefinition(EdgeDefinitionEntity edgeDefinition) {\n if (!this.edgeCollections.contains(edgeDefinition.getCollection())) {\n this.edgeDefinitions.add(edgeDefinition);\n this.edgeCollections.add(edgeDefinition.getCollection());\n }\n}\n"
|
"public CommandResult execute(IssuedCommand issuedCommand) {\n if (issuedCommand.getTokenCount() >= 3) {\n boolean gaveItem = give(issuedCommand.getArguments()[1]);\n if (gaveItem) {\n return new DebugCommandResult(0, true);\n } else {\n return null;\n }\n } else {\n Messenger.printMissingArgumentsMessage();\n return null;\n }\n}\n"
|
"public HilightedTextWriter newLine() {\n appendToSb(NEW_LINE);\n newLine = true;\n newLineCount++;\n return this;\n}\n"
|
"protected void configure() {\n bindListener(Matchers.any(), counter);\n bindListener(Matchers.any(), counter);\n}\n"
|
"public static AtomSite convertAtomToAtomSite(Atom a, int model, String chainId, String internalChainId, int atomId) {\n Group g = a.getGroup();\n String record;\n if (g.getType().equals(GroupType.HETATM)) {\n record = \"String_Node_Str\";\n } else {\n record = \"String_Node_Str\";\n }\n String entityId = \"String_Node_Str\";\n String labelSeqId = Integer.toString(g.getResidueNumber().getSeqNum());\n if (g.getChain() != null && g.getChain().getEntityInfo() != null) {\n entityId = Integer.toString(g.getChain().getEntityInfo().getMolId());\n labelSeqId = Integer.toString(g.getChain().getEntityInfo().getAlignedResIndex(g, g.getChain()));\n }\n Character altLoc = a.getAltLoc();\n String altLocStr = altLoc.toString();\n if (altLoc == null || altLoc == ' ') {\n altLocStr = MMCIF_DEFAULT_VALUE;\n }\n Element e = a.getElement();\n String eString = e.toString().toUpperCase();\n if (e.equals(Element.R)) {\n eString = \"String_Node_Str\";\n }\n String insCode = MMCIF_MISSING_VALUE;\n if (g.getResidueNumber().getInsCode() != null) {\n insCode = Character.toString(g.getResidueNumber().getInsCode());\n }\n AtomSite atomSite = new AtomSite();\n atomSite.setGroup_PDB(record);\n atomSite.setId(Integer.toString(atomId));\n atomSite.setType_symbol(eString);\n atomSite.setLabel_atom_id(a.getName());\n atomSite.setLabel_alt_id(altLocStr);\n atomSite.setLabel_comp_id(g.getPDBName());\n atomSite.setLabel_asym_id(internalChainId);\n atomSite.setLabel_entity_id(entityId);\n atomSite.setLabel_seq_id(labelSeqId);\n atomSite.setPdbx_PDB_ins_code(insCode);\n atomSite.setCartn_x(FileConvert.d3.format(a.getX()));\n atomSite.setCartn_y(FileConvert.d3.format(a.getY()));\n atomSite.setCartn_z(FileConvert.d3.format(a.getZ()));\n atomSite.setOccupancy(FileConvert.d2.format(a.getOccupancy()));\n atomSite.setB_iso_or_equiv(FileConvert.d2.format(a.getTempFactor()));\n atomSite.setAuth_seq_id(Integer.toString(g.getResidueNumber().getSeqNum()));\n atomSite.setAuth_comp_id(g.getPDBName());\n atomSite.setAuth_asym_id(chainId);\n atomSite.setAuth_atom_id(a.getName());\n atomSite.setPdbx_PDB_model_num(Integer.toString(model));\n return atomSite;\n}\n"
|
"protected boolean runAnalysis(Analysis analysis, String sqlStatement) {\n boolean ok = true;\n TypedReturnCode<Connection> trc = this.getConnection(analysis);\n if (!trc.isOk()) {\n return traceError(\"String_Node_Str\" + analysis.getName() + \"String_Node_Str\" + trc.getMessage());\n }\n Connection connection = trc.getObject();\n try {\n Map<ModelElement, List<Indicator>> elementToIndicator = new HashMap<ModelElement, List<Indicator>>();\n Collection<Indicator> indicators = IndicatorHelper.getIndicatorLeaves(analysis.getResults());\n if (canParallel()) {\n ok = runAnalysisIndicatorsParallel(connection, elementToIndicator, indicators);\n } else {\n ok = runAnalysisIndicators(connection, elementToIndicator, indicators);\n }\n connection.close();\n setRowCountAndNullCount(elementToIndicator);\n } catch (SQLException e) {\n log.error(e, e);\n this.errorMessage = e.getMessage();\n ok = false;\n } finally {\n ConnectionUtils.closeConnection(connection);\n }\n return ok;\n}\n"
|
"public void onSingleInstalledModuleReloaded(ModuleUtil moduleUtil, String packageName, InstalledModule module) {\n new ReloadModules().execute();\n}\n"
|
"private Object instantiateOrGetIndexServiceObject(Session session, Output out) throws Exception {\n try {\n Class.forName(\"String_Node_Str\");\n } catch (Exception e) {\n throw new ShellException(\"String_Node_Str\");\n }\n String className = (String) safeGet(session, KEY_INDEX_CLASS_NAME);\n if (className == null) {\n return null;\n }\n IndexServiceContext context = null;\n synchronized (this.contexts) {\n context = this.contexts.get(className);\n if (context == null) {\n if (session instanceof SameJvmSession) {\n context = new IndexServiceContext(Class.forName(className).getConstructor(GraphDatabaseService.class).newInstance(this.getServer().getDb()), true);\n } else {\n XaDataSourceManager xaManager = ((EmbeddedGraphDatabase) getServer().getDb()).getConfig().getTxModule().getXaDataSourceManager();\n String xaName = DATA_SOURCE_NAMES.get(className);\n if (xaName == null) {\n throw new ShellException(\"String_Node_Str\" + className);\n }\n if (!xaManager.hasDataSource(xaName)) {\n throw new ShellException(\"String_Node_Str\" + className + \"String_Node_Str\");\n }\n XaDataSource dataSource = xaManager.getXaDataSource(xaName);\n Method getterMethod = dataSource.getClass().getMethod(\"String_Node_Str\");\n getterMethod.setAccessible(true);\n context = new IndexServiceContext(getterMethod.invoke(dataSource), false);\n }\n this.contexts.put(className, context);\n }\n }\n return context.indexService;\n}\n"
|
"public void testKafkaConsumerSimple() throws Exception {\n final String topic = \"String_Node_Str\";\n initializeKafkaSource(topic, PARTITIONS, false);\n int msgCount = 5;\n Map<String, String> messages = Maps.newHashMap();\n for (int i = 0; i < msgCount; i++) {\n messages.put(Integer.toString(i), \"String_Node_Str\" + i);\n }\n sendMessage(topic, messages);\n TimeUnit.SECONDS.sleep(2);\n verifyEmittedMessages(kafkaSource, msgCount, new SourceState());\n}\n"
|
"public void UnifiedFileAttributes(Path path, BasicFileAttributes attrs, boolean followLinks) {\n mPath = path;\n setBasic(attrs);\n setPosix(FileUtils.getPosixFileAttributes(path, followLinks));\n setDos(FileUtils.getDosFileAttributes(path, followLinks));\n if (getPosix() != null) {\n if (getBasic() == null)\n setBasic(getPosix());\n posixPermissions = getPosix().permissions();\n } else if (getBasic() == null) {\n if (getDos() != null)\n setBasic(getDos());\n else\n setBasic(FileUtils.getBasicFileAttributes(path, followLinks));\n }\n if (posixPermissions == null) {\n posixPermissions = FileUtils.emulatePosixFilePermissions(path, followLinks);\n }\n}\n"
|
"protected Control createDialogArea(Composite parent) {\n Composite content = new Composite(parent, SWT.NONE);\n GridDataFactory.fillDefaults().grab(true, true).applyTo(content);\n GridLayoutFactory.fillDefaults().numColumns(1).applyTo(content);\n super.createDialogArea(content);\n createPrefixArea(content);\n return content;\n}\n"
|
"private void receive(InputStream in, OriginatorFinder origFinder) throws IOException {\n ContextBootstrap.debug(MessageID.PROPAGATION_STARTED, \"String_Node_Str\");\n ContextAccessController accessController = ContextBootstrap.getContextAccessController();\n wireAdapter.prepareToReadFrom(in);\n SimpleMap map = getMapAndCreateIfNeeded();\n map.prepareToPropagate();\n for (String key = wireAdapter.readKey(); key != null; key = wireAdapter.readKey()) {\n try {\n Entry entry = wireAdapter.readEntry();\n if (entry == null) {\n break;\n entry.init(origFinder.isOriginator(key), accessController.isEveryoneAllowedToRead(key));\n if (entry != null)\n map.put(key, entry);\n } catch (ClassNotFoundException e) {\n ContextBootstrap.getLoggerAdapter().log(Level.ERROR, e, MessageID.ERROR_UNABLE_TO_INSTANTIATE_CONTEXT_FROM_THE_WIRE);\n }\n }\n for (ContextLifecycle context : map.getAddedContextLifecycles()) {\n context.contextAdded();\n }\n ContextBootstrap.debug(MessageID.PROPAGATION_COMPLETED, \"String_Node_Str\");\n}\n"
|
"public <E extends ConditionalDistribution> E newConditionalDistribution(List<Variable> parents) {\n if (!this.areParentsCompatible(parents))\n throw new IllegalArgumentException(\"String_Node_Str\");\n if (parents.isEmpty())\n return (E) new Multinomial(this.variable);\n else\n return (E) new Multinomial_MultinomialParents(this.variable, parents);\n}\n"
|
"public ItemStack getCraftingResult(InventoryCrafting inv) {\n int cntRep = 0;\n ItemStack theItem = null;\n for (int i = 0; i < inv.getSizeInventory(); i++) {\n ItemStack s = inv.getStackInSlot(i);\n if (s != null) {\n if (s.getItem() == itemToRepair) {\n if (theItem != null) {\n return null;\n }\n theItem = s;\n } else if (s.getItem() == repairMat.getItem()) {\n ++cntRep;\n }\n }\n if (theItem == null) {\n return null;\n }\n int damage = theItem.getItemDamage();\n damage -= cntRep * amt;\n if (damage < 0)\n damage = 0;\n return new ItemStack(itemToRepair, 1, damage);\n}\n"
|
"public Session getSession(String keyspace) {\n String cqlKeyspace = storeToCQLName(keyspace);\n return getOrCreateKeyspaceSession(cqlKeyspace);\n}\n"
|
"public com.stratio.crossdata.common.data.ResultSet transformToMetaResultSet(com.datastax.driver.core.ResultSet resultSet, Map<ColumnName, String> alias) {\n ResultSet crs = new ResultSet();\n CassandraMetadataHelper helper = new CassandraMetadataHelper();\n List<ColumnDefinitions.Definition> definitions = resultSet.getColumnDefinitions().asList();\n List<ColumnMetadata> columnList = new ArrayList<>();\n ColumnMetadata columnMetadata = null;\n for (ColumnDefinitions.Definition def : definitions) {\n ColumnName columnName = new ColumnName(def.getKeyspace(), def.getTable(), def.getName());\n ColumnType type = helper.toColumnType(def.getType().getName().toString());\n if (alias.containsKey(new ColumnSelector(new ColumnName(def.getKeyspace(), def.getTable(), def.getName())))) {\n columnMetadata = new ColumnMetadata(columnName, null, type);\n columnMetadata.getName().setAlias(alias.get(new ColumnName(def.getKeyspace(), def.getTable(), def.getName())));\n } else {\n columnMetadata = new ColumnMetadata(columnName, null, type);\n }\n columnList.add(columnMetadata);\n }\n crs.setColumnMetadata(columnList);\n try {\n for (Row row : resultSet.all()) {\n com.stratio.crossdata.common.data.Row metaRow = new com.stratio.crossdata.common.data.Row();\n for (ColumnDefinitions.Definition def : definitions) {\n if (def.getName().toLowerCase().startsWith(\"String_Node_Str\")) {\n continue;\n }\n Cell metaCell = getCell(def.getType(), row, def.getName());\n if (alias.containsKey(new ColumnName(def.getKeyspace(), def.getTable(), def.getName()))) {\n metaRow.addCell(alias.get(new ColumnName(def.getKeyspace(), def.getTable(), def.getName())), metaCell);\n } else {\n metaRow.addCell(def.getName(), metaCell);\n }\n }\n crs.add(metaRow);\n }\n } catch (InvocationTargetException | IllegalAccessException e) {\n LOG.error(\"String_Node_Str\", e);\n crs = new ResultSet();\n }\n return crs;\n}\n"
|
"private void buildSparkSubTrees(ETypeGen typeGen) {\n subTrees = new ArrayList<NodesSubTree>();\n for (INode node : nodes) {\n if (node instanceof BigDataNode) {\n BigDataNode bigDataNode = (BigDataNode) node;\n if (((bigDataNode == bigDataNode.getSubProcessStartNode(false)) && (bigDataNode.getDesignSubjobStartNode() == null || bigDataNode == bigDataNode.getDesignSubjobStartNode()) && (bigDataNode.isActivate()) && !((AbstractNode) node).isThereLinkWithHash())) {\n subTrees.add(new NodesSubTree(node, nodes, typeGen));\n }\n }\n }\n}\n"
|
"private final void processConfigProps(String name, ExprNode pred, Context c, List subs) {\n if (pred instanceof SubstInNode) {\n SubstInNode pred1 = (SubstInNode) pred;\n this.processConfigProps(name, pred1.getBody(), c, subs.cons(pred1));\n return;\n }\n if (pred instanceof OpApplNode) {\n OpApplNode pred1 = (OpApplNode) pred;\n ExprOrOpArgNode[] args = pred1.getArgs();\n if (args.length == 0) {\n SymbolNode opNode = pred1.getOperator();\n Object val = this.lookup(opNode, c, false);\n if (val instanceof OpDefNode) {\n if (((OpDefNode) val).getArity() != 0) {\n Assert.fail(EC.TLC_CONFIG_OP_NO_ARGS, opNode.getName().toString());\n }\n this.processConfigProps(opNode.getName().toString(), ((OpDefNode) val).getBody(), c, subs);\n } else if (val == null) {\n Assert.fail(EC.TLC_CONFIG_OP_NOT_IN_SPEC, opNode.getName().toString());\n } else if (val instanceof BoolValue) {\n if (!((BoolValue) val).val) {\n Assert.fail(EC.TLC_CONFIG_SPEC_IS_TRIVIAL, opNode.getName().toString());\n }\n } else {\n Assert.fail(EC.TLC_CONFIG_OP_IS_EQUAL, new String[] { opNode.getName().toString(), val.toString(), \"String_Node_Str\" });\n }\n return;\n }\n int opcode = BuiltInOPs.getOpCode(pred1.getOperator().getName());\n if (opcode == OPCODE_cl || opcode == OPCODE_land) {\n for (int i = 0; i < args.length; i++) {\n ExprNode conj = (ExprNode) args[i];\n this.processConfigProps(conj.toString(), conj, c, subs);\n }\n return;\n }\n if (opcode == OPCODE_box) {\n ExprNode boxArg = (ExprNode) args[0];\n if ((boxArg instanceof OpApplNode) && BuiltInOPs.getOpCode(((OpApplNode) boxArg).getOperator().getName()) == OPCODE_sa) {\n OpApplNode boxArg1 = (OpApplNode) boxArg;\n if (boxArg1.getArgs().length == 0) {\n name = boxArg1.getOperator().getName().toString();\n }\n this.impliedActNameVec.addElement(name);\n this.impliedActionVec.addElement(new Action(Spec.addSubsts(boxArg, subs), c));\n } else if (this.getLevelBound(boxArg, c) < 2) {\n this.invVec.addElement(new Action(Spec.addSubsts(boxArg, subs), c));\n if ((boxArg instanceof OpApplNode) && (((OpApplNode) boxArg).getArgs().length == 0)) {\n name = ((OpApplNode) boxArg).getOperator().getName().toString();\n }\n this.invNameVec.addElement(name);\n } else {\n this.impliedTemporalVec.addElement(new Action(Spec.addSubsts(pred, subs), c));\n this.impliedTemporalNameVec.addElement(name);\n }\n return;\n }\n }\n int level = this.getLevelBound(pred, c);\n if (level <= 1) {\n this.impliedInitVec.addElement(new Action(Spec.addSubsts(pred, subs), c));\n this.impliedInitNameVec.addElement(name);\n } else if (level == 3) {\n this.impliedTemporalVec.addElement(new Action(Spec.addSubsts(pred, subs), c));\n this.impliedTemporalNameVec.addElement(name);\n } else {\n Assert.fail(EC.TLC_CONFIG_PROPERTY_NOT_CORRECTLY_DEFINED, name);\n }\n}\n"
|
"private HashMap<String, String> getWriteDate(OModel model, List<Integer> ids) {\n HashMap<String, String> map = new HashMap<>();\n try {\n List<OdooRecord> result;\n if (model.getColumn(\"String_Node_Str\") != null) {\n OdooFields fields = new OdooFields(new String[] { \"String_Node_Str\" });\n ODomain domain = new ODomain();\n domain.add(\"String_Node_Str\", \"String_Node_Str\", ids);\n OdooResult response = mOdoo.searchRead(model.getModelName(), fields, domain, 0, 0, null);\n result = response.getRecords();\n } else {\n OdooResult response = mOdoo.permRead(model.getModelName(), ids);\n result = response.getArray(\"String_Node_Str\");\n }\n if (!result.isEmpty()) {\n for (OdooRecord record : result) {\n map.put(\"String_Node_Str\" + record.getInt(\"String_Node_Str\"), record.getString(\"String_Node_Str\"));\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return map;\n}\n"
|
"public void onCreate(Bundle savedInstanceState) {\n SharedPreferences themePrefs = getSharedPreferences(\"String_Node_Str\", 0);\n Boolean isDark = themePrefs.getBoolean(\"String_Node_Str\", false);\n if (isDark)\n setTheme(R.style.Sherlock___Theme);\n else\n setTheme(R.style.AppTheme);\n super.onCreate(savedInstanceState);\n mScanToggleButton = (ToggleButton) findViewById(R.id.scanToggleButton);\n mScanProgress = (ProgressBar) findViewById(R.id.scanActivity);\n mScanToggleButton.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n if (mRunning) {\n setStoppedState();\n } else {\n setStartedState();\n }\n }\n });\n ListView mScanList = (ListView) findViewById(R.id.scanListView);\n createPortList();\n mListAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, mPortList);\n mScanList.setAdapter(mListAdapter);\n mScanList.setOnItemLongClickListener(new OnItemLongClickListener() {\n public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {\n int portNumber = System.getCurrentTarget().getOpenPorts().get(position).number;\n String url = \"String_Node_Str\";\n if (portNumber == 80)\n url = \"String_Node_Str\" + System.getCurrentTarget().getCommandLineRepresentation() + \"String_Node_Str\";\n else if (portNumber == 443)\n url = \"String_Node_Str\" + System.getCurrentTarget().getCommandLineRepresentation() + \"String_Node_Str\";\n else if (portNumber == 21)\n url = \"String_Node_Str\" + System.getCurrentTarget().getCommandLineRepresentation();\n else if (portNumber == 22)\n url = \"String_Node_Str\" + System.getCurrentTarget().getCommandLineRepresentation();\n else\n url = \"String_Node_Str\" + System.getCurrentTarget().getCommandLineRepresentation() + \"String_Node_Str\" + portNumber;\n final String furl = url;\n new ConfirmDialog(\"String_Node_Str\", \"String_Node_Str\" + url + \"String_Node_Str\", PortScanner.this, new ConfirmDialogListener() {\n public void onConfirm() {\n try {\n Intent browser = new Intent(Intent.ACTION_VIEW, Uri.parse(furl));\n PortScanner.this.startActivity(browser);\n } catch (ActivityNotFoundException e) {\n System.errorLogging(e);\n new ErrorDialog(getString(R.string.error), getString(R.string.no_activities_for_url), PortScanner.this).show();\n }\n }\n public void onCancel() {\n }\n }).show();\n return false;\n }\n });\n}\n"
|
"private void setStartAddressForIp6(byte[] sections) {\n byte[] byteStart = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };\n System.arraycopy(sections, 0, byteStart, 0, sections.length);\n byte[] highSecs = new byte[LENGTH_OF_V6_SECTIONS / 2];\n byte[] lowSecs = new byte[LENGTH_OF_V6_SECTIONS / 2];\n byte[] highBytes = new byte[LENGTH_OF_V6_BYTES / 2];\n byte[] lowBytes = new byte[LENGTH_OF_V6_BYTES / 2];\n System.arraycopy(byteStart, 0, highSecs, 0, highSecs.length);\n for (int i = 0; i < highBytes.length; i++) {\n int hb = (highSecs[i << 1] << HIGH_BYTE) + highSecs[(i << 1) + 1];\n highBytes[i] = (byte) (MASK_FF & hb);\n }\n this.startHighAddress = new BigInteger(1, highBytes);\n System.arraycopy(byteStart, lowSecs.length, lowSecs, 0, lowSecs.length);\n for (int i = 0; i < lowBytes.length; i++) {\n int lb = (lowSecs[i << 1] << HIGH_BYTE) + lowSecs[(i << 1) + 1];\n lowBytes[i] = (byte) (MASK_FF & lb);\n }\n this.startLowAddress = new BigInteger(1, lowBytes);\n}\n"
|
"public void write(int flagToClient, double curTim, double[] dblVal) throws IOException {\n simTimWri = curTim;\n final int nDbl = (dblVal != null) ? dblVal.length : 0;\n StringBuffer strBuf = new StringBuffer(Integer.toString(verNo));\n strBuf.append(\"String_Node_Str\" + Integer.toString(flagToClient));\n strBuf.append(\"String_Node_Str\" + Integer.toString(nDbl));\n strBuf.append(\"String_Node_Str\");\n strBuf.append(curTim);\n strBuf.append(\"String_Node_Str\");\n for (int i = 0; i < nDbl; i++) {\n strBuf.append(String.valueOf(dblVal[i]));\n strBuf.append(\"String_Node_Str\");\n }\n strBuf.append(\"String_Node_Str\");\n _write(strBuf);\n}\n"
|
"public void widgetSelected(SelectionEvent e) {\n Object source = e.getSource();\n if (source == fCmbAggregate) {\n String aggFunc = ((String[]) fCmbAggregate.getData())[fCmbAggregate.getSelectionIndex()];\n showAggregateParameters(aggFunc);\n if (AGG_FUNC_NONE.equals(aggFunc)) {\n fGrouping.setEnabled(false);\n fGrouping.setAggregateExpression(null);\n } else {\n fGrouping.setEnabled(true);\n fGrouping.setAggregateExpression(aggFunc);\n }\n } else if (isAggParametersWidget(source)) {\n setAggParameter((Text) source);\n } else if (isBuilderBtnWidget(source)) {\n try {\n Text txtArg = fExprBuilderWidgetsMap.get(source);\n String sExpr = fChartContext.getUIServiceProvider().invoke(IUIServiceProvider.COMMAND_EXPRESSION_DATA_BINDINGS, txtArg.getText(), fChartContext.getExtendedItem(), fTitle);\n txtArg.setText(sExpr);\n setAggParameter(txtArg);\n } catch (ChartException e1) {\n WizardBase.displayException(e1);\n }\n } else if (source == fBtnOK) {\n if (query != null) {\n query.setGrouping(fGrouping);\n query.getGrouping().eAdapters().addAll(query.eAdapters());\n } else {\n fSeriesDefi.setGrouping(fGrouping);\n fSeriesDefi.getGrouping().eAdapters().addAll(fSeriesDefi.eAdapters());\n }\n ChartUIUtil.checkAggregateType(fChartContext);\n closeAggregateEditor(getShell());\n } else if (source == fBtnCancel) {\n closeAggregateEditor(getShell());\n }\n}\n"
|
"public int hashCode() {\n return new HashCodeBuilder(17, 37).append(this.getCategory()).append(this.getType()).append(this.getController()).append(this.getDspaceName()).append(this.getDspaceURL()).append(this.getDspaceRest()).toHashCode();\n}\n"
|
"public String[] GetAffiliations(Document parse) {\n NodeList affis = parse.getElementsByTagName(\"String_Node_Str\");\n String[] affilis = new String[affis.getLength()];\n for (int j = 0; j < affis.getLength(); j++) {\n String affiliation = Utilities.getString(affis.item(j));\n affilis[j] = affiliation;\n System.out.println(\"String_Node_Str\" + affiliation);\n }\n return affilis;\n}\n"
|
"public Optional<VertexLabel> getVertexLabel(String vertexLabelName) {\n Preconditions.checkArgument(!vertexLabelName.startsWith(VERTEX_PREFIX), \"String_Node_Str\", Topology.VERTEX_PREFIX);\n if (this.topology.isSqlWriteLockHeldByCurrentThread() && this.uncommittedRemovedVertexLabels.contains(this.name + \"String_Node_Str\" + VERTEX_PREFIX + vertexLabelName)) {\n return Optional.empty();\n }\n VertexLabel result = null;\n if (this.topology.isSqlWriteLockHeldByCurrentThread()) {\n result = this.uncommittedVertexLabels.get(this.name + \"String_Node_Str\" + VERTEX_PREFIX + vertexLabelName);\n }\n return Optional.ofNullable(result);\n}\n"
|
"public void run() {\n Timber.d(\"String_Node_Str\", mode);\n try {\n final boolean supportControllerMode = doesSupportControllerMode();\n final String command = supportControllerMode ? SOLOLINK_SSID_CONFIG_PATH + \"String_Node_Str\" : \"String_Node_Str\";\n final String response;\n switch(mode) {\n case SoloControllerMode.MODE_1:\n response = sshLink.execute(String.format(Locale.US, command, mode));\n postSuccessEvent(listener);\n break;\n case SoloControllerMode.MODE_2:\n response = sshLink.execute(String.format(Locale.US, command, mode));\n postSuccessEvent(listener);\n break;\n default:\n response = \"String_Node_Str\";\n postErrorEvent(CommandExecutionError.COMMAND_UNSUPPORTED, listener);\n break;\n }\n Timber.d(\"String_Node_Str\", response);\n if (supportControllerMode) {\n setControllerMode(mode);\n }\n } catch (IOException e) {\n Timber.e(e, \"String_Node_Str\");\n postTimeoutEvent(listener);\n }\n}\n"
|
"public boolean clearPlot(final PlotWorld plotworld, final Plot plot, final boolean isDelete, final Runnable whenDone) {\n final String world = plotworld.worldname;\n final HybridPlotWorld dpw = ((HybridPlotWorld) plotworld);\n final Location pos1 = MainUtil.getPlotBottomLocAbs(world, plot.id).add(1, 0, 1);\n final Location pos2 = MainUtil.getPlotTopLocAbs(world, plot.id);\n setWallFilling(dpw, plot.id, new PlotBlock[] { dpw.WALL_FILLING });\n final int p1x = pos1.getX();\n final int p1z = pos1.getZ();\n final int p2x = pos2.getX();\n final int p2z = pos2.getZ();\n final int bcx = p1x >> 4;\n final int bcz = p1z >> 4;\n final int tcx = p2x >> 4;\n final int tcz = p2z >> 4;\n final boolean canRegen = plotworld.TYPE == 0 && plotworld.TERRAIN == 0;\n final PlotBlock[] plotfloor = dpw.TOP_BLOCK;\n final PlotBlock[] filling = dpw.MAIN_BLOCK;\n final PlotBlock[] bedrock = (dpw.PLOT_BEDROCK ? new PlotBlock[] { new PlotBlock((short) 7, (byte) 0) } : filling);\n final PlotBlock air = new PlotBlock((short) 0, (byte) 0);\n final ArrayList<ChunkLoc> chunks = new ArrayList<ChunkLoc>();\n for (int x = bcx; x <= tcx; x++) {\n for (int z = bcz; z <= tcz; z++) {\n chunks.add(new ChunkLoc(x, z));\n }\n }\n TaskManager.runTask(new Runnable() {\n public void run() {\n long start = System.currentTimeMillis();\n while (chunks.size() > 0 && System.currentTimeMillis() - start < 20) {\n ChunkLoc chunk = chunks.remove(0);\n int x = chunk.x;\n int z = chunk.z;\n int xxb = x << 4;\n int zzb = z << 4;\n int xxt = xxb + 15;\n int zzt = zzb + 15;\n if (canRegen) {\n if (xxb >= p1x && xxt <= p2x && zzb >= p1z && zzt <= p2z) {\n BukkitUtil.regenerateChunk(world, x, z);\n continue;\n }\n }\n if (x == bcx) {\n xxb = p1x;\n }\n if (x == tcx) {\n xxt = p2x;\n }\n if (z == bcz) {\n zzb = p1z;\n }\n if (z == tcz) {\n zzt = p2z;\n }\n BukkitUtil.setBiome(plot.world, xxb, zzb, xxt, zzt, dpw.PLOT_BIOME);\n Location bot = new Location(world, xxb, 0, zzb);\n Location top = new Location(world, xxt + 1, 1, zzt + 1);\n MainUtil.setCuboidAsync(world, bot, top, bedrock);\n bot.setY(1);\n top.setY(dpw.PLOT_HEIGHT);\n MainUtil.setCuboidAsync(world, bot, top, filling);\n bot.setY(dpw.PLOT_HEIGHT);\n top.setY(dpw.PLOT_HEIGHT + 1);\n MainUtil.setCuboidAsync(world, bot, top, plotfloor);\n bot.setY(dpw.PLOT_HEIGHT + 1);\n top.setY(256);\n MainUtil.setSimpleCuboidAsync(world, bot, top, air);\n }\n if (chunks.size() != 0) {\n TaskManager.runTaskLater(this, 1);\n } else {\n pastePlotSchematic(dpw, pos1, pos2);\n final PlotBlock wall = isDelete ? dpw.WALL_BLOCK : dpw.CLAIMED_WALL_BLOCK;\n setWall(dpw, plot.id, new PlotBlock[] { wall });\n SetBlockQueue.addNotify(whenDone);\n }\n }\n }, 5);\n return true;\n}\n"
|
"public void testMeasureFilter() throws Exception {\n ICubeQueryDefinition cqd = new CubeQueryDefinition(cubeName);\n IEdgeDefinition columnEdge = cqd.createEdge(ICubeQueryDefinition.COLUMN_EDGE);\n IEdgeDefinition rowEdge = cqd.createEdge(ICubeQueryDefinition.ROW_EDGE);\n IDimensionDefinition dim1 = columnEdge.createDimension(\"String_Node_Str\");\n IHierarchyDefinition hier1 = dim1.createHierarchy(\"String_Node_Str\");\n ILevelDefinition level11 = hier1.createLevel(\"String_Node_Str\");\n ILevelDefinition level12 = hier1.createLevel(\"String_Node_Str\");\n ILevelDefinition level13 = hier1.createLevel(\"String_Node_Str\");\n IDimensionDefinition dim2 = rowEdge.createDimension(\"String_Node_Str\");\n IHierarchyDefinition hier2 = dim2.createHierarchy(\"String_Node_Str\");\n ILevelDefinition level21 = hier2.createLevel(\"String_Node_Str\");\n createSortTestBindings(cqd);\n CubeFilterDefinition filter1 = new CubeFilterDefinition(new ScriptExpression(\"String_Node_Str\"));\n CubeFilterDefinition filter2 = new CubeFilterDefinition(new ScriptExpression(\"String_Node_Str\"));\n cqd.addFilter(filter1);\n cqd.addFilter(filter2);\n DataEngineImpl engine = (DataEngineImpl) DataEngine.newDataEngine(DataEngineContext.newInstance(DataEngineContext.DIRECT_PRESENTATION, null, null, null));\n this.createCube(engine);\n IPreparedCubeQuery pcq = engine.prepare(cqd, null);\n ICubeQueryResults queryResults = pcq.execute(null);\n CubeCursor cursor = queryResults.getCubeCursor();\n List columnEdgeBindingNames = new ArrayList();\n columnEdgeBindingNames.add(\"String_Node_Str\");\n columnEdgeBindingNames.add(\"String_Node_Str\");\n columnEdgeBindingNames.add(\"String_Node_Str\");\n printCube(cursor, \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", new String[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" }, \"String_Node_Str\", \"String_Node_Str\");\n}\n"
|
"private void pushPath(CratePersistentProperty property) {\n if (getVisitedPath(property) != null) {\n throw new CyclicReferenceException(property.getFieldName(), property.getOwner().getType(), dotPath);\n }\n String propertyTypeKey = createKey(property);\n List<VisitedPath> paths = visitedPaths.get(propertyTypeKey);\n if (paths == null) {\n paths = new LinkedList<VisitedPath>();\n }\n paths.add(new VisitedPath(property));\n if (!visitedPaths.containsKey(type)) {\n visitedPaths.put(type, paths);\n }\n if (hasText(dotPath)) {\n dotPath = dotPath.concat(\"String_Node_Str\").concat(property.getFieldName());\n } else {\n dotPath = property.getFieldName();\n }\n}\n"
|
"public void addOffence(Player player) {\n if (User.getUser(plugin, player).isJailed() != null) {\n return;\n }\n if (offenders.containsKey(player.getName())) {\n offenders.put(player.getName(), getOffences(player) + 1);\n } else {\n offenders.put(player.getName(), 1);\n }\n}\n"
|
"public void bindView(View view, Context context, Cursor cursor) {\n final GroceryItem item = new GroceryItem(cursor);\n CheckedTextView cv = (CheckedTextView) view;\n cv.setText(item.text);\n cv.setChecked(item.checked);\n}\n"
|
"public void copyElements() {\n ArrayList<XSDParticle> particles = WorkbenchClipboard.getWorkbenchClipboard().getParticles();\n IStructuredSelection selection = (IStructuredSelection) page.getTreeViewer().getSelection();\n XSDElementDeclaration element = (XSDElementDeclaration) selection.getFirstElement();\n if (element.getTypeDefinition() instanceof XSDComplexTypeDefinition) {\n XSDComplexTypeContent content = ((XSDComplexTypeDefinition) element.getTypeDefinition()).getContent();\n if (content instanceof XSDParticle) {\n XSDParticle partile = (XSDParticle) content;\n if (((XSDParticle) partile).getTerm() instanceof XSDModelGroup) {\n XSDModelGroup toGroup = ((XSDModelGroup) partile.getTerm());\n for (XSDParticle particle : particles) {\n if (isExist(toGroup, particle)) {\n boolean ifOverwrite = MessageDialog.openConfirm(this.page.getSite().getShell(), \"String_Node_Str\", \"String_Node_Str\" + ((XSDElementDeclaration) particle.getTerm()).getName() + \"String_Node_Str\");\n if (ifOverwrite) {\n reomveElement(toGroup, particle);\n } else\n continue;\n }\n XSDParticle newParticle = (XSDParticle) particle.cloneConcreteComponent(true, false);\n toGroup.getContents().add(newParticle);\n toGroup.updateElement();\n if (newParticle.getContent() instanceof XSDElementDeclaration) {\n if (((XSDElementDeclaration) newParticle.getContent()).getTypeDefinition() instanceof XSDComplexTypeDefinition) {\n addAnnotationForComplexType((XSDComplexTypeDefinition) ((XSDElementDeclaration) particle.getContent()).getTypeDefinition(), (XSDComplexTypeDefinition) ((XSDElementDeclaration) newParticle.getContent()).getTypeDefinition());\n }\n XSDAnnotationsStructure struc1 = new XSDAnnotationsStructure(newParticle.getTerm());\n addAnnotion(struc1, ((XSDElementDeclaration) particle.getTerm()).getAnnotation());\n }\n }\n }\n }\n }\n}\n"
|
"public Map<String, Object> getDiscount(Invoice invoice, InvoiceLine invoiceLine, BigDecimal price) {\n PriceList priceList = invoice.getPriceList();\n if (priceList == null) {\n return null;\n }\n return discounts;\n}\n"
|
"public List<TriggerFiredResult> triggersFired(List<OperableTrigger> triggers, Jedis jedis) throws JobPersistenceException, ClassNotFoundException {\n List<TriggerFiredResult> results = new ArrayList<>();\n for (OperableTrigger trigger : triggers) {\n final String triggerHashKey = redisSchema.triggerHashKey(trigger.getKey());\n logger.debug(String.format(\"String_Node_Str\", triggerHashKey));\n Pipeline pipe = jedis.pipelined();\n Response<Boolean> triggerExistsResponse = pipe.exists(triggerHashKey);\n Response<Double> triggerAcquiredResponse = pipe.zscore(redisSchema.triggerStateKey(RedisTriggerState.ACQUIRED), triggerHashKey);\n pipe.sync();\n if (!triggerExistsResponse.get() || triggerAcquiredResponse.get() == null) {\n if (!triggerExistsResponse.get()) {\n logger.debug(String.format(\"String_Node_Str\", triggerHashKey));\n } else {\n logger.debug(String.format(\"String_Node_Str\", triggerHashKey));\n }\n continue;\n }\n Calendar calendar = null;\n final String calendarName = trigger.getCalendarName();\n if (calendarName != null) {\n calendar = retrieveCalendar(calendarName, jedis);\n if (calendar == null) {\n continue;\n }\n }\n final Date previousFireTime = trigger.getPreviousFireTime();\n trigger.triggered(calendar);\n final Date nextFireDate = trigger.getNextFireTime();\n long nextFireTime = 0;\n if (nextFireDate != null) {\n nextFireTime = nextFireDate.getTime();\n jedis.hset(triggerHashKey, TRIGGER_NEXT_FIRE_TIME, Long.toString(nextFireTime));\n setTriggerState(RedisTriggerState.WAITING, (double) nextFireTime, triggerHashKey, jedis);\n }\n JobDetail job = retrieveJob(trigger.getJobKey(), jedis);\n TriggerFiredBundle triggerFiredBundle = new TriggerFiredBundle(job, trigger, calendar, false, new Date(), previousFireTime, previousFireTime, trigger.getNextFireTime());\n if (isJobConcurrentExecutionDisallowed(job.getJobClass())) {\n if (logger.isTraceEnabled()) {\n logger.trace(\"String_Node_Str\" + trigger.getKey() + \"String_Node_Str\" + job.getKey() + \"String_Node_Str\");\n }\n final String jobHashKey = redisSchema.jobHashKey(trigger.getJobKey());\n final String jobTriggerSetKey = redisSchema.jobTriggersSetKey(job.getKey());\n for (String nonConcurrentTriggerHashKey : jedis.smembers(jobTriggerSetKey)) {\n Double score = jedis.zscore(redisSchema.triggerStateKey(RedisTriggerState.WAITING), nonConcurrentTriggerHashKey);\n if (score != null) {\n if (logger.isTraceEnabled()) {\n logger.trace(\"String_Node_Str\" + trigger.getKey() + \"String_Node_Str\" + job.getKey() + \"String_Node_Str\");\n }\n setTriggerState(RedisTriggerState.BLOCKED, score, nonConcurrentTriggerHashKey, jedis);\n } else {\n score = jedis.zscore(redisSchema.triggerStateKey(RedisTriggerState.PAUSED), nonConcurrentTriggerHashKey);\n if (score != null) {\n if (logger.isTraceEnabled()) {\n logger.trace(\"String_Node_Str\" + trigger.getKey() + \"String_Node_Str\" + job.getKey() + \"String_Node_Str\");\n }\n setTriggerState(RedisTriggerState.PAUSED_BLOCKED, score, nonConcurrentTriggerHashKey, jedis);\n }\n }\n }\n pipe = jedis.pipelined();\n pipe.set(redisSchema.jobBlockedKey(job.getKey()), schedulerInstanceId);\n pipe.sadd(redisSchema.blockedJobsSet(), jobHashKey);\n pipe.sync();\n } else if (trigger.getNextFireTime() != null) {\n jedis.hset(triggerHashKey, TRIGGER_NEXT_FIRE_TIME, Long.toString(nextFireTime));\n logger.debug(String.format(\"String_Node_Str\", triggerHashKey, nextFireTime));\n setTriggerState(RedisTriggerState.WAITING, (double) nextFireTime, triggerHashKey, jedis);\n } else {\n jedis.hset(triggerHashKey, TRIGGER_NEXT_FIRE_TIME, \"String_Node_Str\");\n unsetTriggerState(triggerHashKey, jedis);\n }\n results.add(new TriggerFiredResult(triggerFiredBundle));\n }\n return results;\n}\n"
|
"private void chunk(int len) throws IOException {\n chunkHeader.clear();\n chunkSink.clear(EOL.length());\n Numbers.appendHex(chunkSink, len);\n chunkSink.put(EOL);\n chunkHeader.limit(chunkSink.length());\n MultipartParser.dump(chunkHeader);\n channel.write(chunkHeader);\n}\n"
|
"private void writeTextDataFile(File dataFile, byte[] textData) throws IOException {\n BufferedOutputStream bos = null;\n try {\n bos = new BufferedOutputStream(new FileOutputStream(dataFile, false));\n bos.write(textData);\n } finally {\n if (bos != null) {\n bos.close();\n }\n }\n}\n"
|
"public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(getResource(), container, false);\n final MissionProxy missionProxy = ((DroidPlannerApp) getActivity().getApplication()).missionProxy;\n final List<MissionItemProxy> selections = missionProxy.selection.getSelected();\n if (selections.isEmpty()) {\n return null;\n }\n itemRender = selections.get(0);\n return inflater.inflate(getResource(), container, false);\n}\n"
|
"private static void processOtherUser(long id, FastIDSet relevantItemIDs, FastByIDMap<PreferenceArray> trainingUsers, long userID2, DataModel dataModel) throws TasteException {\n PreferenceArray prefs2Array = dataModel.getPreferencesFromUser(userID2);\n if (id == userID2) {\n List<Preference> prefs2 = new ArrayList<Preference>(prefs2Array.length());\n for (Preference pref : prefs2Array) {\n prefs2.add(pref);\n }\n for (Iterator<Preference> iterator = prefs2.iterator(); iterator.hasNext(); ) {\n Preference pref = iterator.next();\n if (relevantItemIDs.contains(pref.getItemID())) {\n iterator.remove();\n }\n }\n if (!prefs2.isEmpty()) {\n trainingUsers.put(userID2, new GenericUserPreferenceArray(prefs2));\n }\n } else {\n trainingUsers.put(userID2, prefs2Array);\n }\n trainingUsers.put(userID2, prefs2Array);\n}\n"
|
"public static String[] getDistributionVersionsDisplay(String hiveDistribution, boolean byDisplay) {\n List<String> versionsItems = new ArrayList<String>();\n IHDistribution distribution = getDistribution(hiveDistribution, byDisplay);\n if (distribution != null) {\n IHDistributionVersion[] hdVersions = distribution.getHDVersions();\n for (IHDistributionVersion v : hdVersions) {\n String[] hiveModesDisplay = getHiveModesDisplay(distribution.getName(), v.getVersion(), null, false);\n if (hiveModesDisplay == null || hiveModesDisplay.length == 0) {\n continue;\n }\n String displayVersion = v.getDisplayVersion();\n if (displayVersion != null) {\n versionsItems.add(displayVersion);\n }\n }\n }\n return versionsItems.toArray(new String[versionsItems.size()]);\n}\n"
|
"public void actionPerformed(final ActionEvent e) {\n startSendWorklogThread();\n}\n"
|
"private void validateSignatures(List<Signature> signatures) {\n List<Future<SignatureValidationData>> validationData = startSignatureValidationInParallel(signatures);\n extractValidatedSignatureErrors(validationData);\n}\n"
|
"public Node parse(final String source) throws MalformedProgramException {\n if (source == null) {\n return null;\n }\n final int openingBracket = source.indexOf('(');\n String identifier = null;\n List<String> args = null;\n if (openingBracket == -1) {\n identifier = source;\n args = new ArrayList<String>();\n } else {\n identifier = source.substring(0, openingBracket);\n final int closingBracket = source.lastIndexOf(')');\n final String argumentStr = source.substring(openingBracket + 1, closingBracket);\n args = splitArguments(argumentStr);\n }\n Node node;\n if (terminal) {\n node = parseTerminal(identifier);\n }\n if ((node == null) || (node.getArity() != args.size())) {\n throw new MalformedProgramException();\n } else {\n for (int i = 0; i < args.size(); i++) {\n node.setChild(i, parse(args.get(i)));\n }\n }\n return node;\n}\n"
|
"public int powerRequest(ForgeDirection from) {\n return getPowerProvider().getMaxEnergyReceived();\n}\n"
|
"public void onButtonPressedListener(TextView textView) {\n Toast.makeText(mContext, \"String_Node_Str\", Toast.LENGTH_SHORT).show();\n mListView.getCard(0).setTitle(\"String_Node_Str\");\n mListView.notifyDataSetChanged();\n}\n"
|
"public void performAppSwitch_appSwitchesWithVenmoLaunchIntent() {\n ArgumentCaptor<Intent> launchIntentCaptor = ArgumentCaptor.forClass(Intent.class);\n Configuration configuration = getConfiguration();\n when(configuration.getVenmoState()).thenReturn(\"String_Node_Str\");\n BraintreeFragment fragment = getMockFragment(mActivity, configuration);\n doNothing().when(fragment).sendAnalyticsEvent(anyString());\n doNothing().when(fragment).startActivityForResult(any(Intent.class), anyInt());\n ActivityInfo activityInfo = new ActivityInfo();\n activityInfo.packageName = \"String_Node_Str\";\n ResolveInfo resolveInfo = new ResolveInfo();\n resolveInfo.activityInfo = activityInfo;\n PackageManager packageManager = mock(PackageManager.class);\n when(packageManager.queryIntentActivities(any(Intent.class), anyInt())).thenReturn(Collections.singletonList(resolveInfo));\n Context context = mock(Context.class);\n when(context.getPackageManager()).thenReturn(packageManager);\n when(fragment.getApplicationContext()).thenReturn(context);\n disableSignatureVerification();\n Venmo.authorize(fragment);\n verify(fragment).startActivityForResult(launchIntentCaptor.capture(), eq(Venmo.VENMO_REQUEST_CODE));\n Intent launchIntent = launchIntentCaptor.getValue();\n assertEquals(\"String_Node_Str\", launchIntent.getComponent().flattenToString());\n}\n"
|
"private IScriptExpression adapterExpression(Expression expr) {\n if (expr instanceof Expression.Script && \"String_Node_Str\".equals(((Expression.Script) expr).getLanguage())) {\n ScriptExpression scriptExpr = null;\n try {\n scriptExpr = getModelAdapter().adaptJSExpression(expr.getScriptText(), ((Expression.Script) expr).getLanguage());\n return new ScriptExpression(scriptExpr.getText());\n } catch (Exception ex) {\n }\n } else {\n if (expr.getType() == Expression.CONSTANT) {\n ScriptExpression jsExpr = new ScriptExpression(JavascriptEvalUtil.transformToJsExpression(expr.getScriptText()));\n jsExpr.setScriptId(BaseExpression.constantId);\n jsExpr.setHandle(expr.getScriptText());\n return jsExpr;\n }\n }\n return new ScriptExpression(expr.getScriptText());\n}\n"
|
"private Class<?> injectToPlainClassLoader(ClassPool pool, ClassLoader classLoader, String className) throws NotFoundException, IOException, CannotCompileException, IllegalArgumentException, IllegalAccessException, InvocationTargetException {\n Class<?> c = null;\n try {\n c = classLoader.loadClass(className);\n } catch (ClassNotFoundException ex) {\n if (logger.isTraceEnabled()) {\n logger.trace(\"String_Node_Str\", ex.getMessage(), ex);\n }\n }\n if (c != null) {\n return c;\n }\n CtClass ct = pool.get(className);\n if (ct == null) {\n throw new NotFoundException(className);\n }\n CtClass superClass = ct.getSuperclass();\n if (superClass != null) {\n injectToPlainClassLoader(pool, classLoader, superClass.getName());\n }\n CtClass[] interfaces = ct.getInterfaces();\n for (CtClass i : interfaces) {\n injectToPlainClassLoader(pool, classLoader, i.getName());\n }\n Collection<String> refs = ct.getRefClasses();\n for (String ref : refs) {\n try {\n injectToPlainClassLoader(pool, classLoader, ref);\n } catch (NotFoundException e) {\n logger.warn(\"String_Node_Str\", e);\n }\n }\n byte[] bytes = ct.toBytecode();\n return (Class<?>) DEFINE_CLASS.invoke(classLoader, ct.getName(), bytes, 0, bytes.length);\n}\n"
|
"private void parseItems(final PageDefinition pgdef, final NodeInfo parent, Collection items, AnnotationHelper annHelper, boolean bNativeContent) throws Exception {\n LanguageDefinition parentlang = getLanguageDefinition(parent);\n if (parentlang == null)\n parentlang = pgdef.getLanguageDefinition();\n final boolean bZkSwitch = isZkSwitch(parent);\n ComponentInfo pi = null;\n String textAs = null;\n StringBuffer textAsBuffer = null;\n for (NodeInfo p = parent; p != null; p = p.getParent()) if (p instanceof ComponentInfo) {\n pi = (ComponentInfo) p;\n textAs = pi.getTextAs();\n if (textAs != null && pi == parent)\n textAsBuffer = new StringBuffer();\n break;\n }\n final boolean isXHTML = \"String_Node_Str\".equals(parentlang.getName());\n final boolean isAllBlankPreserved = !\"String_Node_Str\".equals(Library.getProperty(\"String_Node_Str\"));\n boolean breakLine = false;\n NativeInfo preNativeInfo = null;\n for (Iterator it = items.iterator(); it.hasNext(); ) {\n final Object o = it.next();\n if (o instanceof Element)\n parseItem(pgdef, parent, (Element) o, annHelper, bNativeContent, ParsingState.FIRST);\n }\n for (Iterator it = items.iterator(); it.hasNext(); ) {\n final Object o = it.next();\n if (o instanceof Element) {\n breakLine = false;\n preNativeInfo = (NativeInfo) parseItem(pgdef, parent, (Element) o, annHelper, bNativeContent, ParsingState.SECOND);\n } else if (o instanceof ProcessingInstruction) {\n breakLine = false;\n parse(pgdef, (ProcessingInstruction) o);\n } else if (o instanceof Comment) {\n breakLine = false;\n if (parentlang.isNative() || isXHTML) {\n String label = \"String_Node_Str\" + ((Item) o).getText() + \"String_Node_Str\";\n final ComponentInfo labelInfo = parentlang.newLabelInfo(parent, label);\n labelInfo.addProperty(\"String_Node_Str\", \"String_Node_Str\", null);\n }\n } else if ((o instanceof Text) || (o instanceof CData)) {\n String label = ((Item) o).getText(), trimLabel = !isXHTML ? label.trim() : label;\n if (breakLine && (o instanceof Text) && label.trim().isEmpty()) {\n List<NodeInfo> children = parent.getChildren();\n final String labelAttr = parentlang.getLabelAttribute();\n for (Property prop : ((ComponentInfo) children.get(children.size() - 1)).getProperties()) {\n if (prop.getName().equals(labelAttr)) {\n prop.setRawValue(prop.getRawValue() + trimLabel);\n }\n }\n continue;\n }\n if (label.length() == 0)\n continue;\n if (bZkSwitch) {\n if (trimLabel.length() == 0)\n continue;\n throw new UiException(message(\"String_Node_Str\", (Item) o));\n }\n if (trimLabel.length() == 0 && ((pi != null && !pi.isBlankPreserved() && !isNativeText(pi)) || !isBlankPreserved))\n continue;\n if (!isXHTML && (o instanceof Text) && label.trim().isEmpty())\n breakLine = true;\n if (isNativeText(pi)) {\n String newLabel = label.trim();\n if (newLabel.startsWith(\"String_Node_Str\") && newLabel.endsWith(\"String_Node_Str\")) {\n label = newLabel.substring(9, newLabel.length() - 3);\n }\n new TextInfo(parent, label);\n } else {\n if (textAs != null) {\n if (trimLabel.length() != 0)\n if (textAsBuffer != null)\n textAsBuffer.append(label);\n else if (!(parent instanceof TemplateInfo))\n throw new UnsupportedOperationException(message(\"String_Node_Str\", ((Item) o).getParent()));\n } else {\n if (parent instanceof ShadowInfo) {\n if (trimLabel.isEmpty())\n continue;\n }\n if (isTrimLabel() && !parentlang.isRawLabel()) {\n if (trimLabel.length() == 0)\n continue;\n label = trimLabel;\n }\n if (isXHTML && preNativeInfo != null && label.trim().length() == 0) {\n preNativeInfo.addEpilogChild(new TextInfo(null, label));\n } else {\n final ComponentInfo labelInfo = parentlang.newLabelInfo(parent, label);\n if (trimLabel.length() == 0)\n labelInfo.setReplaceableText(label);\n }\n }\n }\n } else {\n breakLine = false;\n }\n }\n if (textAsBuffer != null) {\n String trimLabel = textAsBuffer.toString();\n if (pi == null || !pi.isBlankPreserved())\n trimLabel = trimLabel.trim();\n if (trimLabel.length() != 0)\n pi.addProperty(textAs, trimLabel, null);\n }\n}\n"
|
"public void computeFromStartDateTime(ActionRequest request, ActionResponse response) {\n Event event = request.getContext().asType(Event.class);\n LOG.debug(\"String_Node_Str\", event);\n if (event.getStartDateTime() != null) {\n if (event.getDuration() != null && event.getDuration() != 0) {\n response.setValue(\"String_Node_Str\", eventService.computeEndDateTime(event.getStartDateTime(), event.getDuration().intValue()));\n } else if (event.getEndDateTime() != null && event.getEndDateTime().isAfter(event.getStartDateTime())) {\n Duration duration = eventService.computeDuration(event.getStartDateTime(), event.getEndDateTime());\n response.setValue(\"String_Node_Str\", eventService.getDuration(duration));\n }\n }\n}\n"
|
"private void updatePostUploadProgressBar(ProgressBar view, PostModel post) {\n if (!mUploadStore.isFailedPost(post) && (UploadService.isPostUploadingOrQueued(post) || UploadService.hasInProgressMediaUploadsForPost(post))) {\n view.setVisibility(View.VISIBLE);\n int overallProgress = Math.round(UploadService.getMediaUploadProgressForPost(post) * 100);\n view.setProgress(Math.min(MAX_DISPLAYED_UPLOAD_PROGRESS, overallProgress));\n } else {\n view.setVisibility(View.GONE);\n }\n}\n"
|
"public void handle0(DownloadLink downloadLink) throws Exception {\n LinkStatus linkStatus = downloadLink.getLinkStatus();\n String link = (String) downloadLink.getProperty(\"String_Node_Str\");\n String[] mirrors = (String[]) downloadLink.getProperty(\"String_Node_Str\");\n int c = 0;\n while (active) {\n if (c++ == 120)\n break;\n try {\n downloadLink.getLinkStatus().setStatusText(\"String_Node_Str\");\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n active = true;\n downloadLink.getLinkStatus().setStatusText(\"String_Node_Str\");\n downloadLink.requestGuiUpdate();\n ArrayList<DownloadLink> dls = getDLinks(link);\n if (dls.size() < 1) {\n linkStatus.addStatus(LinkStatus.ERROR_PLUGIN_DEFEKT);\n linkStatus.setErrorMessage(JDLocale.L(\"String_Node_Str\", \"String_Node_Str\"));\n logger.warning(\"String_Node_Str\");\n active = false;\n return;\n }\n FilePackage fp = downloadLink.getFilePackage();\n int index = fp.indexOf(downloadLink);\n fp.remove(downloadLink);\n Vector<Integer> down = new Vector<Integer>();\n Vector<DownloadLink> ret = new Vector<DownloadLink>();\n for (int i = dls.size() - 1; i >= 0; i--) {\n DistributeData distributeData = new DistributeData(dls.get(i).getDownloadURL());\n Vector<DownloadLink> links = distributeData.findLinks();\n Iterator<DownloadLink> it2 = links.iterator();\n boolean online = false;\n while (it2.hasNext()) {\n DownloadLink downloadLink3 = (DownloadLink) it2.next();\n if (downloadLink3.isAvailable()) {\n fp.add(index, downloadLink3);\n online = true;\n } else {\n down.add(i);\n }\n }\n if (online) {\n ret.addAll(links);\n }\n }\n if (mirrors != null) {\n for (String element : mirrors) {\n if (down.size() > 0) {\n try {\n dls = getDLinks(element);\n Iterator<Integer> iter = down.iterator();\n while (iter.hasNext()) {\n Integer integer = (Integer) iter.next();\n DistributeData distributeData = new DistributeData(dls.get(integer).getDownloadURL());\n Vector<DownloadLink> links = distributeData.findLinks();\n Iterator<DownloadLink> it2 = links.iterator();\n boolean online = false;\n while (it2.hasNext()) {\n DownloadLink downloadLink3 = (DownloadLink) it2.next();\n if (downloadLink3.isAvailable()) {\n fp.add(index, downloadLink3);\n online = true;\n iter.remove();\n }\n }\n if (online) {\n ret.addAll(links);\n }\n }\n } catch (Exception e) {\n }\n } else {\n break;\n }\n }\n }\n if (down.size() > 0) {\n fp.add(downloadLink);\n linkStatus.addStatus(LinkStatus.ERROR_FATAL);\n linkStatus.setErrorMessage(JDLocale.L(\"String_Node_Str\", \"String_Node_Str\"));\n active = false;\n return;\n }\n active = false;\n}\n"
|
"public void testDelTemplate() {\n String testFileContent = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n ParseResult parseResult = SoyFileSetParserBuilder.forFileContents(testFileContent).parse();\n String expectedJsCode = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n genJsCodeVisitor.jsSrcOptions.setShouldProvideRequireSoyNamespaces(true);\n String file = genJsCodeVisitor.gen(parseResult.fileSet(), parseResult.registry(), ExplodingErrorReporter.get()).get(0);\n assertThat(file).endsWith(expectedJsCode);\n}\n"
|
"private static int firstWhitespace(char[] title, int startAt) {\n int first = 0;\n for (int j = startAt; j < title.length; j++) {\n if (!Character.isLetterOrDigit(title[j])) {\n first = j + 1;\n continue;\n }\n break;\n }\n return first;\n}\n"
|
"public boolean performFinish() {\n if (wizPage.isPageComplete()) {\n IWizardPage[] pages = getPages();\n for (IWizardPage page : pages) {\n if (page instanceof GenericConnWizardPage) {\n GenericConnWizardPage gPage = (GenericConnWizardPage) page;\n parameters.addAll(gPage.getParameters());\n }\n }\n try {\n createOrUpdateConnectionItem();\n } catch (Throwable e) {\n new ErrorDialogWidthDetailArea(getShell(), IGenericConstants.REPOSITORY_PLUGIN_ID, Messages.getString(\"String_Node_Str\"), ExceptionUtils.getFullStackTrace(e));\n ExceptionHandler.process(e);\n return false;\n }\n return true;\n } else {\n return false;\n }\n}\n"
|
"private void update(File desFile, boolean isCovered) throws IOException, CoreException {\n String curProjectLabel = ResourceManager.getRootProjectName();\n if (desFile.exists()) {\n boolean needReloadResource = false;\n IFile desIFile = ResourceService.file2IFile(desFile);\n String fileExt = desIFile.getFileExtension();\n if (FactoriesUtil.isEmfFile(fileExt)) {\n needReloadResource = true;\n if (!StringUtils.equals(projectName, curProjectLabel)) {\n String content = FileUtils.readFileToString(desFile, \"String_Node_Str\");\n content = StringUtils.replace(content, \"String_Node_Str\" + projectName + \"String_Node_Str\", \"String_Node_Str\" + curProjectLabel + \"String_Node_Str\");\n FileUtils.writeStringToFile(desFile, content, \"String_Node_Str\");\n }\n }\n if (fileExt.equals(FactoriesUtil.PROPERTIES_EXTENSION)) {\n needReloadResource = true;\n Property property = PropertyHelper.getProperty(desIFile, true);\n if (property != null) {\n User user = ReponsitoryContextBridge.getUser();\n if (user != null && property.getAuthor() == null) {\n property.setAuthor(user);\n EMFSharedResources.getInstance().saveResource(property.eResource());\n }\n if (log.isDebugEnabled()) {\n log.debug(\"String_Node_Str\" + desIFile + \"String_Node_Str\" + property.getLabel());\n }\n } else {\n log.error(\"String_Node_Str\" + desIFile.getFullPath().toString());\n }\n }\n if (isCovered && needReloadResource) {\n URI uri = URI.createPlatformResourceURI(desIFile.getFullPath().toString(), false);\n EMFSharedResources.getInstance().reloadResource(uri);\n }\n } else {\n log.error(DefaultMessagesImpl.getString(\"String_Node_Str\", desFile.getAbsolutePath()));\n }\n}\n"
|
"private List<Variables> processSource(String ruleId, TransformContext context, Variables vars, StructureMapGroupRuleSourceComponent src, String pathForErrors) throws FHIRException {\n List<Base> items;\n if (src.getContext().equals(\"String_Node_Str\")) {\n ExpressionNode expr = (ExpressionNode) src.getUserData(MAP_SEARCH_EXPRESSION);\n if (expr == null) {\n expr = fpe.parse(src.getElement());\n src.setUserData(MAP_SEARCH_EXPRESSION, expr);\n }\n String search = fpe.evaluateToString(vars, null, new StringType(), expr);\n items = services.performSearch(context.appInfo, search);\n } else {\n items = new ArrayList<Base>();\n Base b = vars.get(VariableMode.INPUT, src.getContext());\n if (b == null)\n throw new FHIRException(\"String_Node_Str\" + src.getContext() + \"String_Node_Str\" + pathForErrors + \"String_Node_Str\" + ruleId + \"String_Node_Str\" + vars.summary() + \"String_Node_Str\");\n if (!src.hasElement())\n items.add(b);\n else {\n getChildrenByName(b, src.getElement(), items);\n if (items.size() == 0 && src.hasDefaultValue())\n items.add(src.getDefaultValue());\n }\n }\n if (src.hasType()) {\n List<Base> remove = new ArrayList<Base>();\n for (Base item : items) {\n if (item != null && !isType(item, src.getType())) {\n remove.add(item);\n }\n }\n items.removeAll(remove);\n }\n if (src.hasCondition()) {\n ExpressionNode expr = (ExpressionNode) src.getUserData(MAP_WHERE_EXPRESSION);\n if (expr == null) {\n expr = fpe.parse(src.getCondition());\n src.setUserData(MAP_WHERE_EXPRESSION, expr);\n }\n List<Base> remove = new ArrayList<Base>();\n for (Base item : items) {\n if (!fpe.evaluateToBoolean(vars, null, item, expr))\n remove.add(item);\n }\n items.removeAll(remove);\n }\n if (src.hasCheck()) {\n ExpressionNode expr = (ExpressionNode) src.getUserData(MAP_WHERE_CHECK);\n if (expr == null) {\n expr = fpe.parse(src.getCheck());\n src.setUserData(MAP_WHERE_CHECK, expr);\n }\n List<Base> remove = new ArrayList<Base>();\n for (Base item : items) {\n if (!fpe.evaluateToBoolean(vars, null, item, expr))\n throw new FHIRException(\"String_Node_Str\" + ruleId + \"String_Node_Str\");\n }\n }\n if (src.hasLogMessage()) {\n ExpressionNode expr = (ExpressionNode) src.getUserData(MAP_WHERE_LOG);\n if (expr == null) {\n expr = fpe.parse(src.getLogMessage());\n src.setUserData(MAP_WHERE_LOG, expr);\n }\n CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder();\n for (Base item : items) b.append(fpe.evaluateToString(vars, null, item, expr));\n if (b.length() > 0)\n services.log(b.toString());\n }\n if (src.hasListMode() && !items.isEmpty()) {\n switch(src.getListMode()) {\n case FIRST:\n Base bt = items.get(0);\n items.clear();\n items.add(bt);\n break;\n case NOTFIRST:\n if (items.size() > 0)\n items.remove(0);\n break;\n case LAST:\n bt = items.get(items.size() - 1);\n items.clear();\n items.add(bt);\n break;\n case NOTLAST:\n if (items.size() > 0)\n items.remove(items.size() - 1);\n break;\n case ONLYONE:\n if (items.size() > 1)\n throw new FHIRException(\"String_Node_Str\" + ruleId + \"String_Node_Str\");\n break;\n case NULL:\n }\n }\n List<Variables> result = new ArrayList<Variables>();\n for (Base r : items) {\n Variables v = vars.copy();\n if (src.hasVariable())\n v.add(VariableMode.INPUT, src.getVariable(), r);\n result.add(v);\n }\n return result;\n}\n"
|
"private void doCategoricalBinning() {\n Map<String, Integer> categoryHistNeg = new HashMap<String, Integer>();\n Map<String, Integer> categoryHistPos = new HashMap<String, Integer>();\n Map<String, Double> categoryWeightedNeg = new HashMap<String, Double>();\n Map<String, Double> categoryWeightedPos = new HashMap<String, Double>();\n Set<String> categorySet = new HashSet<String>();\n for (int i = 0; i < voSize; i++) {\n String category = voList.get(i).getRaw();\n categorySet.add(category);\n if (negTags.contains(voList.get(i).getTag())) {\n incMapCnt(categoryHistNeg, category);\n incMapWithValue(categoryWeightedNeg, category, voList.get(i).getWeight());\n } else {\n incMapCnt(categoryHistPos, category);\n incMapWithValue(categoryWeightedPos, category, voList.get(i).getWeight());\n }\n }\n Map<String, Double> categoryFraudRateMap = new HashMap<String, Double>();\n for (String key : categorySet) {\n double cnt0 = categoryHistNeg.containsKey(key) ? categoryHistNeg.get(key) : 0;\n double cnt1 = categoryHistPos.containsKey(key) ? categoryHistPos.get(key) : 0;\n double rate;\n if (Double.compare(cnt0 + cnt1, 0) == 0) {\n rate = 0;\n } else {\n rate = cnt1 / (cnt0 + cnt1);\n }\n categoryFraudRateMap.put(key, rate);\n }\n MapComparator cmp = new MapComparator(categoryFraudRateMap);\n Map<String, Double> sortedCategoryFraudRateMap = new TreeMap<String, Double>(cmp);\n sortedCategoryFraudRateMap.putAll(categoryFraudRateMap);\n for (Map.Entry<String, Double> entry : sortedCategoryFraudRateMap.entrySet()) {\n String key = entry.getKey();\n Integer countNeg = categoryHistNeg.containsKey(key) ? categoryHistNeg.get(key) : 0;\n binCountNeg.add(countNeg);\n Integer countPos = categoryHistPos.containsKey(key) ? categoryHistPos.get(key) : 0;\n binCountPos.add(countPos);\n Double weightedNeg = categoryWeightedNeg.containsKey(key) ? categoryWeightedNeg.get(key) : 0.0;\n this.binWeightedNeg.add(weightedNeg);\n Double weightedPos = categoryWeightedPos.containsKey(key) ? categoryWeightedPos.get(key) : 0.0;\n this.binWeightedPos.add(weightedPos);\n binAvgScore.add(0);\n binCategory.add(key);\n binPosCaseRate.add(entry.getValue());\n }\n this.actualNumBins = binCategory.size();\n for (ValueObject vo : voList) {\n String key = vo.getRaw();\n if (binCategory.indexOf(key) == -1) {\n vo.setValue(0.0);\n } else {\n vo.setValue(binPosCaseRate.get(binCategory.indexOf(key)));\n }\n }\n}\n"
|
"public void pullImage(String imageName) {\n final Image image = Image.valueOf(imageName);\n PullImageCmd pullImageCmd = this.dockerClient.pullImageCmd(image.getName());\n if (this.cubeConfiguration.getDockerRegistry() != null) {\n pullImageCmd.withRegistry(this.cubeConfiguration.getDockerRegistry());\n }\n int tagSeparator = imageName.indexOf(TAG_SEPARATOR);\n if (tagSeparator > 0) {\n pullImageCmd.withRepository(imageName.substring(0, tagSeparator));\n pullImageCmd.withTag(imageName.substring(tagSeparator + 1));\n }\n pullImageCmd.exec(new PullImageResultCallback()).awaitSuccess();\n}\n"
|
"public boolean applies(GameEvent event, Ability source, Game game) {\n Permanent sourceObject = game.getPermanent(source.getSourceId());\n Permanent targetPermanent = game.getPermanent(event.getTargetId());\n Permanent guardianBeast = game.getPermanent(guardianBeastId);\n if (guardianBeast == null || guardianBeast.isTapped() || sourceObject == null || targetPermanent == null) {\n return false;\n }\n if (!Objects.equals(targetPermanent.getControllerId(), guardianBeast.getControllerId())) {\n return false;\n }\n StackObject spell = game.getStack().getStackObject(event.getSourceId());\n if (event.getType() == EventType.LOSE_CONTROL || event.getType() == EventType.ATTACH || event.getType() == EventType.TARGET && spell != null && spell.getCardType().contains(CardType.ENCHANTMENT) && spell.getSubtype(game).contains(\"String_Node_Str\")) {\n for (Permanent perm : game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) {\n if (perm != null && perm.getId() == targetPermanent.getId() && !perm.getCardType().contains(CardType.CREATURE)) {\n return true;\n }\n }\n }\n return false;\n}\n"
|
"private EnvTypePair analyzeFunctionBindFwd(Node call, TypeEnv inEnv) {\n Preconditions.checkArgument(call.isCall());\n Bind bindComponents = this.convention.describeFunctionBind(call, true, false);\n Node boundFunNode = bindComponents.target;\n EnvTypePair pair = analyzeExprFwd(boundFunNode, inEnv);\n TypeEnv env = pair.env;\n FunctionType boundFunType = pair.type.getFunTypeIfSingletonObj();\n if (!pair.type.isSubtypeOf(commonTypes.topFunction())) {\n warnings.add(JSError.make(boundFunNode, GOOG_BIND_EXPECTS_FUNCTION, pair.type.toString()));\n }\n if (boundFunType == null || boundFunType.isTopFunction() || boundFunType.isQmarkFunction() || boundFunType.isLoose()) {\n return analyzeCallNodeArgsFwdWhenError(call, env);\n }\n if (boundFunType.isSomeConstructorOrInterface()) {\n warnings.add(JSError.make(call, CANNOT_BIND_CTOR));\n return new EnvTypePair(env, UNKNOWN);\n }\n int callChildCount = call.getChildCount();\n if ((NodeUtil.isGoogBind(call.getFirstChild()) && callChildCount <= 2) || (!NodeUtil.isGoogPartial(call.getFirstChild()) && callChildCount == 1)) {\n warnings.add(JSError.make(call, WRONG_ARGUMENT_COUNT, getReadableCalleeName(call.getFirstChild()), \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n }\n int maxArity = boundFunType.hasRestFormals() ? Integer.MAX_VALUE : boundFunType.getMaxArity();\n int numArgs = bindComponents.getBoundParameterCount();\n if (numArgs > maxArity) {\n warnings.add(JSError.make(call, WRONG_ARGUMENT_COUNT, getReadableCalleeName(call.getFirstChild()), Integer.toString(numArgs), \"String_Node_Str\", \"String_Node_Str\" + maxArity));\n return analyzeCallNodeArgsFwdWhenError(call, inEnv);\n }\n Node receiver = bindComponents.thisValue;\n if (boundFunType.isGeneric()) {\n Map<String, JSType> typeMap = calcTypeInstantiationFwd(call, receiver, bindComponents.parameters, boundFunType, env);\n boundFunType = boundFunType.instantiateGenerics(typeMap);\n }\n FunctionTypeBuilder builder = new FunctionTypeBuilder(this.commonTypes);\n if (receiver != null) {\n JSType reqThisType = boundFunType.getThisType();\n if (reqThisType == null || boundFunType.isSomeConstructorOrInterface()) {\n reqThisType = JSType.join(NULL, TOP_OBJECT);\n }\n pair = analyzeExprFwd(receiver, env, reqThisType);\n env = pair.env;\n if (!pair.type.isSubtypeOf(reqThisType)) {\n warnings.add(JSError.make(call, INVALID_THIS_TYPE_IN_BIND, errorMsgWithTypeDiff(reqThisType, pair.type)));\n }\n }\n env = analyzeCallNodeArgumentsFwd(call, bindComponents.parameters, boundFunType, new ArrayList<JSType>(), env);\n for (int j = numArgs; j < boundFunType.getMaxArityWithoutRestFormals(); j++) {\n JSType formalType = boundFunType.getFormalType(j);\n if (boundFunType.isRequiredArg(j)) {\n builder.addReqFormal(formalType);\n } else {\n builder.addOptFormal(formalType);\n }\n }\n if (boundFunType.hasRestFormals()) {\n builder.addRestFormals(boundFunType.getRestFormalsType());\n }\n return new EnvTypePair(env, commonTypes.fromFunctionType(builder.addRetType(boundFunType.getReturnType()).buildFunction()));\n}\n"
|
"protected void populateTableList() {\n if (rootNode != null) {\n availableDbObjectsTree.removeAll();\n setRootElement();\n }\n String namePattern = null;\n String[] tableType = null;\n if (searchTxt.getText().length() > 0) {\n namePattern = searchTxt.getText();\n if (namePattern != null) {\n if (namePattern.lastIndexOf('%') == -1) {\n namePattern = namePattern + \"String_Node_Str\";\n }\n }\n }\n String dbtype = getSelectedDbType();\n if (dbtype != null && !DbType.ALL_STRING.equalsIgnoreCase(dbtype)) {\n tableType = new String[] { dbtype };\n }\n String catalogName = metaDataProvider.getCatalog();\n ArrayList tableList = new ArrayList();\n ArrayList targetSchemaList = new ArrayList();\n if (schemaList != null && schemaList.size() > 0) {\n if (schemaCombo.getSelectionIndex() == 0) {\n targetSchemaList = schemaList;\n } else {\n targetSchemaList.add(schemaCombo.getItem(schemaCombo.getSelectionIndex()));\n }\n ResultSet tablesRs = null;\n int numTables = 0;\n for (int i = 0; i < targetSchemaList.size(); i++) {\n int count = 0;\n String schemaName = (String) targetSchemaList.get(i);\n tablesRs = metaDataProvider.getAlltables(catalogName, schemaName, namePattern, tableType);\n tableList = new ArrayList();\n if (tablesRs == null) {\n continue;\n }\n try {\n ArrayList schema = new ArrayList();\n TreeItem[] schemaTreeItem = null;\n Image image = tableImage;\n if (count == 0) {\n schema.add(schemaName);\n schemaTreeItem = Utility.createTreeItems(rootNode, schema, SWT.NONE, schemaImage);\n if (schemaTreeItem != null && schemaTreeItem.length > 0)\n availableDbObjectsTree.showItem(schemaTreeItem[0]);\n }\n while (tablesRs.next()) {\n String type = tablesRs.getString(\"String_Node_Str\");\n if (type.equalsIgnoreCase(\"String_Node_Str\"))\n continue;\n count++;\n String tableName = tablesRs.getString(\"String_Node_Str\");\n int dbType = DbObject.TABLE_TYPE;\n if (type.equalsIgnoreCase(\"String_Node_Str\")) {\n image = tableImage;\n dbType = DbObject.TABLE_TYPE;\n } else if (type.equalsIgnoreCase(\"String_Node_Str\")) {\n image = viewImage;\n dbType = DbObject.VIEW_TYPE;\n }\n String fullyQualifiedTableName = tableName;\n if (schemaName != null && schemaName.trim().length() > 0) {\n fullyQualifiedTableName = schemaName + \"String_Node_Str\" + tableName;\n }\n DbObject dbObject = new DbObject(fullyQualifiedTableName, tableName, dbType, image);\n tableList.add(dbObject);\n numTables++;\n }\n if (metaDataProvider.isProcedureSupported()) {\n String fullyQualifiedTableName = \"String_Node_Str\";\n if (schemaName != null && schemaName.trim().length() > 0) {\n fullyQualifiedTableName = schemaName + \"String_Node_Str\" + \"String_Node_Str\";\n }\n DbObject dbObject = new DbObject(fullyQualifiedTableName, \"String_Node_Str\", DbObject.PROCEDURE_TYPE, image);\n tableList.add(dbObject);\n }\n if (schemaTreeItem != null && schemaTreeItem.length > 0) {\n TreeItem[] item = Utility.createTreeItems(schemaTreeItem[0], tableList, SWT.NONE, null);\n if (expandDbObjectsTree && item != null && item.length > 0) {\n availableDbObjectsTree.showItem(item[0]);\n }\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n } else {\n ResultSet tablesRs = metaDataProvider.getAlltables(catalogName, null, namePattern, tableType);\n if (tablesRs == null) {\n return;\n }\n try {\n Image image = tableImage;\n while (tablesRs.next()) {\n String type = tablesRs.getString(\"String_Node_Str\");\n if (type.equalsIgnoreCase(\"String_Node_Str\"))\n continue;\n String tableName = tablesRs.getString(\"String_Node_Str\");\n int dbType = DbObject.TABLE_TYPE;\n if (type.equalsIgnoreCase(\"String_Node_Str\")) {\n image = tableImage;\n dbType = DbObject.TABLE_TYPE;\n } else if (type.equalsIgnoreCase(\"String_Node_Str\")) {\n image = viewImage;\n dbType = DbObject.VIEW_TYPE;\n }\n DbObject dbObject = new DbObject(tableName, tableName, dbType, image);\n tableList.add(dbObject);\n }\n TreeItem[] item = Utility.createTreeItems(rootNode, tableList, SWT.NONE, null);\n if (item != null && item.length > 0)\n availableDbObjectsTree.showItem(item[0]);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n addFetchColumnListener();\n}\n"
|
"public static File ConvertSrtToAss(String SrtFile, PmsConfiguration configuration) throws IOException {\n String dir = configuration.getDataFile(SUB_DIR);\n File path = new File(dir);\n if (!path.exists()) {\n path.mkdirs();\n }\n File outputSubs = new File(path.getAbsolutePath() + File.separator + new File(SrtFile).getName() + \"String_Node_Str\");\n BufferedWriter output;\n BufferedReader input;\n try {\n if (isBlank(configuration.getSubtitlesCodepage())) {\n input = new BufferedReader(new InputStreamReader(new FileInputStream(SrtFile)));\n } else {\n input = new BufferedReader(new InputStreamReader(new FileInputStream(SrtFile), configuration.getSubtitlesCodepage()));\n }\n output = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputSubs)));\n String line;\n output.write(\"String_Node_Str\");\n output.write(\"String_Node_Str\");\n output.write(\"String_Node_Str\");\n output.write(\"String_Node_Str\");\n output.write(\"String_Node_Str\");\n StringBuilder s = new StringBuilder();\n s.append(\"String_Node_Str\");\n if (!configuration.getFont().isEmpty()) {\n s.append(configuration.getFont()).append(\"String_Node_Str\");\n } else {\n s.append(\"String_Node_Str\");\n }\n s.append(Integer.toString((int) (14 * Double.parseDouble(configuration.getAssScale())))).append(\"String_Node_Str\");\n String primaryColour = Integer.toHexString(configuration.getSubsColor());\n primaryColour = primaryColour.substring(6, 8) + primaryColour.substring(4, 6) + primaryColour.substring(2, 4);\n s.append(\"String_Node_Str\").append(primaryColour).append(\"String_Node_Str\");\n s.append(\"String_Node_Str\");\n s.append(\"String_Node_Str\");\n s.append(\"String_Node_Str\");\n s.append(\"String_Node_Str\");\n s.append(\"String_Node_Str\");\n s.append(\"String_Node_Str\");\n s.append(\"String_Node_Str\");\n s.append(configuration.getAssOutline()).append(\"String_Node_Str\");\n s.append(configuration.getAssShadow()).append(\"String_Node_Str\");\n s.append(\"String_Node_Str\");\n s.append(\"String_Node_Str\");\n s.append(\"String_Node_Str\");\n s.append(\"String_Node_Str\");\n s.append(\"String_Node_Str\");\n s.append(\"String_Node_Str\");\n output.write(s.toString() + \"String_Node_Str\");\n output.write(\"String_Node_Str\");\n output.write(\"String_Node_Str\");\n output.write(\"String_Node_Str\");\n String startTime;\n String endTime;\n while ((line = input.readLine()) != null) {\n if (line.contains(\"String_Node_Str\")) {\n startTime = line.substring(0, line.indexOf(\"String_Node_Str\") - 1).replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n endTime = line.substring(line.indexOf(\"String_Node_Str\") + 4).replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n startTime = StringUtil.convertTimeToString(StringUtil.convertStringToTime(startTime), StringUtil.ASS_FORMAT);\n endTime = StringUtil.convertTimeToString(StringUtil.convertStringToTime(endTime), StringUtil.ASS_FORMAT);\n s = new StringBuilder();\n s.append(\"String_Node_Str\");\n s.append(startTime).append(\"String_Node_Str\");\n s.append(endTime).append(\"String_Node_Str\");\n s.append(\"String_Node_Str\").append(\"String_Node_Str\");\n s.append(convertTags(input.readLine()));\n if (isNotBlank(line = input.readLine())) {\n s.append(\"String_Node_Str\");\n s.append(convertTags(line));\n }\n output.write(s.toString() + \"String_Node_Str\");\n }\n }\n } finally {\n }\n input.close();\n output.flush();\n output.close();\n PMS.get().addTempFile(outputSubs, 2 * 24 * 3600 * 1000);\n return outputSubs;\n}\n"
|
"public String getSourceList() {\n StringBuffer sb = new StringBuffer();\n IndexHits<Node> hits = sourceMetaIndex.query(\"String_Node_Str\", \"String_Node_Str\");\n while (hits.hasNext()) {\n Node n = hits.next();\n sb.append(n.getProperty(\"String_Node_Str\") + \"String_Node_Str\");\n }\n return sb.toString();\n}\n"
|
"protected void setupRecurrence(Recurrence recurrence) throws Exception {\n super.setupRecurrence(recurrence);\n recurrence.setEndDate(this.endDate);\n}\n"
|
"public int processIncomingMessages() {\n int newMessagesReceived = 0;\n PayloadProvider payProv = PayloadProvider.get(App.getContext());\n String[] columnNames = new String[] { PayloadsTable.COLUMN_TYPE, PayloadsTable.COLUMN_BELONGS_TO_ME, PayloadsTable.COLUMN_PROCESSING_COMPLETE };\n String[] searchTerms = new String[] { Payload.OBJECT_TYPE_MSG, \"String_Node_Str\", \"String_Node_Str\" };\n ArrayList<Payload> msgsToProcess = payProv.searchPayloads(columnNames, searchTerms);\n ArrayList<Payload> processedMsgs = new ArrayList<Payload>();\n for (Payload p : msgsToProcess) {\n Message decryptedMessage = new IncomingMessageProcessor().processReceivedMsg(p);\n if (decryptedMessage != null) {\n newMessagesReceived++;\n MessageProvider.get(App.getContext()).addMessage(decryptedMessage);\n App.getContext().sendBroadcast(new Intent(UI_NOTIFICATION));\n }\n processedMsgs.add(p);\n }\n for (Payload p : processedMsgs) {\n p.setProcessingComplete(true);\n payProv.updatePayload(p);\n }\n if (newMessagesReceived > 0) {\n Context appContext = App.getContext();\n Intent intent = new Intent(appContext, NotificationsService.class);\n intent.putExtra(NotificationsService.EXTRA_DISPLAY_NEW_MESSAGES_NOTIFICATION, newMessagesReceived);\n appContext.startService(intent);\n }\n return processedMsgs.size();\n}\n"
|
"public static org.hl7.fhir.dstu2016may.model.Conformance.SystemInteractionComponent convertSystemInteractionComponent(org.hl7.fhir.dstu3.model.Conformance.SystemInteractionComponent src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2016may.model.Conformance.SystemInteractionComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.SystemInteractionComponent();\n copyElement(src, tgt);\n tgt.setCode(convertSystemRestfulInteraction(src.getCode()));\n tgt.setDocumentation(src.getDocumentation());\n return tgt;\n}\n"
|
"void startMonitoring() {\n if (this.cardTerminal == null)\n return;\n Card card = null;\n boolean validCard = true;\n while (true) {\n try {\n this.cardTerminal.waitForCardPresent(0);\n if (SimpleAfirma.DEBUG) {\n System.out.println(\"String_Node_Str\" + this.cardTerminal.getName() + \"String_Node_Str\");\n }\n card = this.cardTerminal.connect(\"String_Node_Str\");\n } catch (final CardException e) {\n if (SimpleAfirma.DEBUG) {\n e.printStackTrace();\n }\n firePropertyChange(CARD_EXCEPTION, \"String_Node_Str\", this.cardTerminal.getName());\n return;\n }\n try {\n if (!itsDNIe(card.getATR().getBytes())) {\n if (SimpleAfirma.DEBUG) {\n System.out.println(\"String_Node_Str\");\n }\n firePropertyChange(NOT_DNI_INSERTED, \"String_Node_Str\", this.cardTerminal.getName());\n try {\n this.cardTerminal.waitForCardAbsent(0);\n } catch (final CardException e) {\n firePropertyChange(CARD_EXCEPTION, \"String_Node_Str\", this.cardTerminal.getName());\n return;\n }\n } else {\n if (SimpleAfirma.DEBUG) {\n System.out.println(\"String_Node_Str\");\n }\n firePropertyChange(DNI_INSERTED, \"String_Node_Str\", this.cardTerminal.getName());\n return;\n }\n } catch (final BlownDNIeException e) {\n firePropertyChange(\"String_Node_Str\", false, true);\n return;\n }\n }\n}\n"
|
"private void scrollToPageRequiresSetup() {\n if (isInTabletUi)\n return;\n int positionToStartAt = 0;\n if (SetupSupport.isThisKeyboardEnabled(getActivity())) {\n positionToStartAt = 1;\n if (SetupSupport.isThisKeyboardSetAsDefaultIME(getActivity())) {\n positionToStartAt = 2;\n }\n }\n mUiHandler.removeMessages(KEY_MESSAGE_SCROLL_TO_PAGE);\n mUiHandler.sendMessageDelayed(mUiHandler.obtainMessage(KEY_MESSAGE_SCROLL_TO_PAGE, positionToStartAt, 0), getResources().getInteger(android.R.integer.config_longAnimTime));\n}\n"
|
"public Map<Material, Mesh> createTextMesh(List<String> lines) {\n Map<Material, MeshBuilder> meshBuilders = Maps.newLinkedHashMap();\n addLinesToMesh(lines, meshBuilders);\n Map<Material, Mesh> result = Maps.newLinkedHashMap();\n for (Map.Entry<Material, MeshBuilder> entry : meshBuilders.entrySet()) {\n result.put(entry.getKey(), entry.getValue().build());\n }\n return result;\n}\n"
|
"public String configShortName(String config) {\n if (!config.startsWith(\"String_Node_Str\")) {\n return null;\n }\n config = config.substring(1);\n MavenCoordinates coordinates = MavenCoordinates.fromConfigGAV(config);\n if (coordinates == null) {\n return config.substring(0).replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n }\n return coordinates.getArtifactId();\n}\n"
|
"public void testAtomicLongSpawnNodeInParallel() {\n int total = 6;\n int parallel = 2;\n final TestHazelcastInstanceFactory nodeFactory = createHazelcastInstanceFactory(total + 1);\n final Config config = new Config();\n HazelcastInstance instance = nodeFactory.newHazelcastInstance(config);\n final String name = \"String_Node_Str\";\n IAtomicLong atomicLong = instance.getAtomicLong(name);\n atomicLong.set(100);\n final ExecutorService ex = Executors.newFixedThreadPool(parallel);\n try {\n for (int i = 0; i < total / parallel; i++) {\n final HazelcastInstance[] instances = new HazelcastInstance[parallel];\n final CountDownLatch countDownLatch = new CountDownLatch(parallel);\n for (int j = 0; j < parallel; j++) {\n final int id = j;\n ex.execute(new Runnable() {\n\n public void run() {\n instances[id] = nodeFactory.newHazelcastInstance(config);\n instances[id].getAtomicLong(name).incrementAndGet();\n countDownLatch.countDown();\n }\n }.start();\n }\n try {\n countDownLatch.await(1, TimeUnit.MINUTES);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n IAtomicLong newAtomicLong = instance.getAtomicLong(name);\n Assert.assertEquals((long) 100 + (i + 1) * parallel, newAtomicLong.get());\n instance.getLifecycleService().shutdown();\n instance = instances[0];\n for (int j = 1; j < parallel; j++) {\n instances[j].getLifecycleService().shutdown();\n }\n }\n}\n"
|
"private void setCurrentTag(final String tagName) {\n if (TextUtils.isEmpty(tagName))\n return;\n if (isCurrentTag(tagName) && hasPostAdapter() && tagName.equals(getPostAdapter().getCurrentTag()))\n return;\n mCurrentTag = tagName;\n UserPrefs.setReaderTag(tagName);\n hideLoadingProgress();\n getPostAdapter().setCurrentTag(tagName);\n hideNewPostsBar();\n if (ReaderTagTable.shouldAutoUpdateTag(tagName))\n updatePostsWithTag(tagName, ReaderActions.RequestDataAction.LOAD_NEWER, RefreshType.AUTOMATIC);\n}\n"
|
"protected void processHttpResponse(final Element httpResponse, final Map<SerializationProperty, String> serializationProperties, final HttpResponse response) throws RestXqServiceException {\n final String strStatus = httpResponse.getAttribute(STATUS_ATTR_NAME);\n HttpStatus httpStatus = null;\n if (strStatus != null && !strStatus.isEmpty()) {\n final int status = Integer.parseInt(strStatus);\n try {\n httpStatus = HttpStatus.fromStatus(status);\n } catch (final IllegalArgumentException iae) {\n throw new RestXqServiceException(\"String_Node_Str\" + strStatus, iae);\n }\n }\n final String reason = httpResponse.getAttribute(REASON_ATTR_NAME);\n if (httpStatus != null) {\n if (reason != null && !reason.isEmpty()) {\n response.setStatus(httpStatus, reason);\n } else {\n response.setStatus(httpStatus);\n }\n }\n final NodeList nlHttpHeader = httpResponse.getElementsByTagNameNS(HTTP_HEADER_ELEMENT_NAME.getNamespaceURI(), HTTP_HEADER_ELEMENT_NAME.getLocalPart());\n processHttpHeaders(nlHttpHeader, serializationProperties, response);\n}\n"
|
"public double readDouble(int byteIndex) {\n return view.getFloat64(byteIndex, littleEndian);\n}\n"
|
"public static XMLEntityMappings generateXmlEntityMappings(Project orProject, List<CompositeDatabaseType> complexTypes) {\n List<ClassDescriptor> descriptors = orProject.getOrderedDescriptors();\n List<DatabaseQuery> queries = orProject.getQueries();\n XMLEntityMappings xmlEntityMappings = new XMLEntityMappings();\n xmlEntityMappings.setEmbeddables(new ArrayList<EmbeddableAccessor>());\n xmlEntityMappings.setEntities(new ArrayList<EntityAccessor>());\n xmlEntityMappings.setPLSQLRecords(new ArrayList<PLSQLRecordMetadata>());\n xmlEntityMappings.setPLSQLTables(new ArrayList<PLSQLTableMetadata>());\n xmlEntityMappings.setOracleObjectTypes(new ArrayList<OracleObjectTypeMetadata>());\n xmlEntityMappings.setOracleArrayTypes(new ArrayList<OracleArrayTypeMetadata>());\n List<PLSQLRecordMetadata> plsqlRecords = null;\n List<PLSQLTableMetadata> plsqlTables = null;\n List<OracleObjectTypeMetadata> objectTypes = null;\n List<OracleArrayTypeMetadata> arrayTypes = null;\n List<ComplexTypeMetadata> complexTypeMetadata = processCompositeTypes(complexTypes, orProject);\n for (ComplexTypeMetadata cTypeMetadata : complexTypeMetadata) {\n if (cTypeMetadata.isOracleComplexTypeMetadata()) {\n OracleComplexTypeMetadata octMetadata = (OracleComplexTypeMetadata) cTypeMetadata;\n if (octMetadata.isOracleArrayTypeMetadata()) {\n arrayTypes.add((OracleArrayTypeMetadata) octMetadata);\n } else {\n objectTypes.add((OracleObjectTypeMetadata) octMetadata);\n }\n } else {\n PLSQLComplexTypeMetadata plsqlctMetadata = (PLSQLComplexTypeMetadata) cTypeMetadata;\n if (plsqlctMetadata.isPLSQLRecordMetadata()) {\n plsqlRecords.add((PLSQLRecordMetadata) plsqlctMetadata);\n } else {\n plsqlTables.add((PLSQLTableMetadata) plsqlctMetadata);\n }\n }\n }\n if (plsqlRecords.size() > 0) {\n xmlEntityMappings.setPLSQLRecords(plsqlRecords);\n }\n if (plsqlTables.size() > 0) {\n xmlEntityMappings.setPLSQLTables(plsqlTables);\n }\n if (objectTypes != null) {\n xmlEntityMappings.setOracleObjectTypes(objectTypes);\n }\n if (arrayTypes != null) {\n xmlEntityMappings.setOracleArrayTypes(arrayTypes);\n }\n List<NamedPLSQLStoredProcedureQueryMetadata> plsqlStoredProcs = null;\n List<NamedPLSQLStoredFunctionQueryMetadata> plsqlStoredFuncs = null;\n List<NamedStoredProcedureQueryMetadata> storedProcs = null;\n List<NamedStoredFunctionQueryMetadata> storedFuncs = null;\n List<NamedNativeQueryMetadata> namedNativeQueries = null;\n DatabaseQuery query;\n for (Iterator<DatabaseQuery> queryIt = queries.iterator(); queryIt.hasNext(); ) {\n query = queryIt.next();\n if (query.getCall().isStoredFunctionCall()) {\n if (query.getCall() instanceof PLSQLStoredFunctionCall) {\n PLSQLStoredFunctionCall call = (PLSQLStoredFunctionCall) query.getCall();\n NamedPLSQLStoredFunctionQueryMetadata metadata = new NamedPLSQLStoredFunctionQueryMetadata();\n metadata.setName(query.getName());\n metadata.setProcedureName(call.getProcedureName());\n List<PLSQLParameterMetadata> params = new ArrayList<PLSQLParameterMetadata>();\n if (plsqlStoredFuncs == null) {\n plsqlStoredFuncs = new ArrayList<NamedPLSQLStoredFunctionQueryMetadata>();\n }\n PLSQLargument arg;\n PLSQLParameterMetadata param;\n List<PLSQLargument> types = call.getArguments();\n for (int i = 0; i < types.size(); i++) {\n arg = types.get(i);\n param = new PLSQLParameterMetadata();\n param.setName(arg.name);\n String dbType = arg.databaseType.getTypeName();\n if (arg.databaseType == XMLType) {\n dbType = XMLType.name();\n } else {\n if (!(getJDBCTypeFromTypeName(dbType) == Types.OTHER)) {\n if (!dbType.equals(BOOLEAN_STR)) {\n dbType = dbType.concat(_TYPE_STR);\n }\n }\n }\n param.setDatabaseType(dbType);\n if (i == 0) {\n metadata.setReturnParameter(param);\n if (arg.cursorOutput) {\n param.setDirection(CURSOR_STR);\n }\n } else {\n param.setDirection(getDirectionAsString(arg.direction));\n params.add(param);\n }\n }\n if (params.size() > 0) {\n metadata.setParameters(params);\n }\n plsqlStoredFuncs.add(metadata);\n } else {\n StoredFunctionCall call = (StoredFunctionCall) query.getCall();\n NamedStoredFunctionQueryMetadata metadata = new NamedStoredFunctionQueryMetadata();\n metadata.setName(query.getName());\n metadata.setProcedureName(call.getProcedureName());\n List<StoredProcedureParameterMetadata> params = new ArrayList<StoredProcedureParameterMetadata>();\n if (storedFuncs == null) {\n storedFuncs = new ArrayList<NamedStoredFunctionQueryMetadata>();\n }\n DatabaseField arg;\n StoredProcedureParameterMetadata param;\n List<DatabaseField> paramFields = call.getParameters();\n List types = call.getParameterTypes();\n for (int i = 0; i < paramFields.size(); i++) {\n arg = paramFields.get(i);\n param = new StoredProcedureParameterMetadata();\n param.setTypeName(arg.getTypeName());\n param.setJdbcType(arg.getSqlType());\n if (arg.isObjectRelationalDatabaseField()) {\n param.setJdbcTypeName(((ObjectRelationalDatabaseField) arg).getSqlTypeName());\n }\n if (i == 0) {\n metadata.setReturnParameter(param);\n } else {\n param.setName(arg.getName());\n param.setDirection(getDirectionAsString((Integer) types.get(i)));\n params.add(param);\n }\n }\n if (params.size() > 0) {\n metadata.setParameters(params);\n }\n storedFuncs.add(metadata);\n }\n } else if (query.getCall().isStoredProcedureCall()) {\n if (query.getCall() instanceof PLSQLStoredProcedureCall) {\n PLSQLStoredProcedureCall call = (PLSQLStoredProcedureCall) query.getCall();\n if (plsqlStoredProcs == null) {\n plsqlStoredProcs = new ArrayList<NamedPLSQLStoredProcedureQueryMetadata>();\n }\n NamedPLSQLStoredProcedureQueryMetadata metadata = new NamedPLSQLStoredProcedureQueryMetadata();\n metadata.setName(query.getName());\n metadata.setProcedureName(call.getProcedureName());\n PLSQLParameterMetadata param;\n List<PLSQLParameterMetadata> params = new ArrayList<PLSQLParameterMetadata>();\n List<PLSQLargument> types = call.getArguments();\n for (PLSQLargument arg : types) {\n param = new PLSQLParameterMetadata();\n param.setName(arg.name);\n String dbType = processTypeName(arg.databaseType.getTypeName());\n if (arg.cursorOutput) {\n param.setDirection(CURSOR_STR);\n } else {\n param.setDirection(getDirectionAsString(arg.direction));\n }\n if (arg.databaseType == XMLType) {\n param.setDatabaseType(XMLType.name());\n } else {\n param.setDatabaseType(dbType);\n }\n params.add(param);\n }\n if (params.size() > 0) {\n metadata.setParameters(params);\n }\n plsqlStoredProcs.add(metadata);\n } else {\n StoredProcedureCall call = (StoredProcedureCall) query.getCall();\n NamedStoredProcedureQueryMetadata metadata = new NamedStoredProcedureQueryMetadata();\n metadata.setName(query.getName());\n metadata.setProcedureName(call.getProcedureName());\n List<StoredProcedureParameterMetadata> params = new ArrayList<StoredProcedureParameterMetadata>();\n DatabaseField arg;\n StoredProcedureParameterMetadata param;\n List<DatabaseField> paramFields = call.getParameters();\n List types = call.getParameterTypes();\n for (int i = 0; i < paramFields.size(); i++) {\n arg = paramFields.get(i);\n param = new StoredProcedureParameterMetadata();\n param.setName(arg.getName());\n param.setTypeName(arg.getTypeName());\n param.setJdbcType(arg.getSqlType());\n if (arg.isObjectRelationalDatabaseField()) {\n param.setJdbcTypeName(((ObjectRelationalDatabaseField) arg).getSqlTypeName());\n }\n param.setDirection(getDirectionAsString((Integer) types.get(i)));\n params.add(param);\n }\n if (params.size() > 0) {\n metadata.setParameters(params);\n }\n if (storedProcs == null) {\n storedProcs = new ArrayList<NamedStoredProcedureQueryMetadata>();\n }\n storedProcs.add(metadata);\n }\n } else {\n NamedNativeQueryMetadata namedQuery = new NamedNativeQueryMetadata();\n namedQuery.setName(query.getName());\n namedQuery.setQuery(query.getSQLString());\n namedQuery.setResultClassName(query.getReferenceClassName());\n if (namedNativeQueries == null) {\n namedNativeQueries = new ArrayList<NamedNativeQueryMetadata>();\n }\n namedNativeQueries.add(namedQuery);\n }\n }\n if (plsqlStoredProcs != null) {\n xmlEntityMappings.setNamedPLSQLStoredProcedureQueries(plsqlStoredProcs);\n }\n if (plsqlStoredFuncs != null) {\n xmlEntityMappings.setNamedPLSQLStoredFunctionQueries(plsqlStoredFuncs);\n }\n if (storedProcs != null) {\n xmlEntityMappings.setNamedStoredProcedureQueries(storedProcs);\n }\n if (storedFuncs != null) {\n xmlEntityMappings.setNamedStoredFunctionQueries(storedFuncs);\n }\n if (namedNativeQueries != null) {\n xmlEntityMappings.setNamedNativeQueries(namedNativeQueries);\n }\n List<String> embeddables = new ArrayList<String>();\n Map<String, ClassAccessor> accessors = new HashMap<String, ClassAccessor>();\n for (ClassDescriptor cdesc : descriptors) {\n boolean embeddable = false;\n ClassAccessor classAccessor;\n if (cdesc.isAggregateDescriptor()) {\n embeddable = true;\n classAccessor = new EmbeddableAccessor();\n ((EmbeddableAccessor) classAccessor).setName(cdesc.getAlias());\n embeddables.add(cdesc.getJavaClassName());\n } else {\n classAccessor = new EntityAccessor();\n ((EntityAccessor) classAccessor).setEntityName(cdesc.getAlias());\n }\n classAccessor.setClassName(cdesc.getJavaClassName());\n classAccessor.setAccess(EL_ACCESS_VIRTUAL);\n if (cdesc.isObjectRelationalDataTypeDescriptor()) {\n ObjectRelationalDataTypeDescriptor odesc = (ObjectRelationalDataTypeDescriptor) cdesc;\n if (odesc.getOrderedFields().size() > 0) {\n StructMetadata struct = new StructMetadata();\n struct.setName(odesc.getStructureName());\n struct.setFields(odesc.getOrderedFields());\n classAccessor.setStruct(struct);\n }\n }\n if (!embeddable && cdesc.getTableName() != null) {\n TableMetadata table = new TableMetadata();\n table.setName(cdesc.getTableName());\n ((EntityAccessor) classAccessor).setTable(table);\n }\n if (!embeddable) {\n List<NamedNativeQueryMetadata> namedNatQueries = new ArrayList<NamedNativeQueryMetadata>();\n NamedNativeQueryMetadata namedQuery;\n DatabaseQuery dbQuery;\n for (Iterator<DatabaseQuery> queryIt = cdesc.getQueryManager().getAllQueries().iterator(); queryIt.hasNext(); ) {\n dbQuery = queryIt.next();\n namedQuery = new NamedNativeQueryMetadata();\n namedQuery.setName(dbQuery.getName());\n namedQuery.setQuery(dbQuery.getSQLString());\n namedQuery.setResultClassName(dbQuery.getReferenceClassName());\n namedNatQueries.add(namedQuery);\n }\n if (namedNatQueries.size() > 0) {\n ((EntityAccessor) classAccessor).setNamedNativeQueries(namedNatQueries);\n }\n }\n classAccessor.setAttributes(new XMLAttributes());\n classAccessor.getAttributes().setIds(new ArrayList<IdAccessor>());\n classAccessor.getAttributes().setBasics(new ArrayList<BasicAccessor>());\n classAccessor.getAttributes().setArrays(new ArrayList<ArrayAccessor>());\n classAccessor.getAttributes().setStructures(new ArrayList<StructureAccessor>());\n classAccessor.getAttributes().setEmbeddeds(new ArrayList<EmbeddedAccessor>());\n if (embeddable) {\n xmlEntityMappings.getEmbeddables().add((EmbeddableAccessor) classAccessor);\n } else {\n xmlEntityMappings.getEntities().add((EntityAccessor) classAccessor);\n }\n accessors.put(cdesc.getJavaClassName(), classAccessor);\n }\n for (ClassDescriptor cdesc : descriptors) {\n ClassAccessor classAccessor = accessors.get(cdesc.getJavaClassName());\n MappingAccessor mapAccessor;\n for (Iterator<DatabaseMapping> mapIt = cdesc.getMappings().iterator(); mapIt.hasNext(); ) {\n DatabaseMapping dbMapping = mapIt.next();\n mapAccessor = generateMappingAccessor(dbMapping, embeddables);\n if (mapAccessor == null) {\n continue;\n }\n if (mapAccessor.isId()) {\n classAccessor.getAttributes().getIds().add((IdAccessor) mapAccessor);\n } else if (mapAccessor.isBasic()) {\n classAccessor.getAttributes().getBasics().add((BasicAccessor) mapAccessor);\n } else if (mapAccessor instanceof ArrayAccessor) {\n classAccessor.getAttributes().getArrays().add((ArrayAccessor) mapAccessor);\n } else if (mapAccessor instanceof StructureAccessor) {\n classAccessor.getAttributes().getStructures().add((StructureAccessor) mapAccessor);\n } else {\n classAccessor.getAttributes().getEmbeddeds().add((EmbeddedAccessor) mapAccessor);\n }\n }\n }\n EntityAccessor eAccessor = new EntityAccessor();\n eAccessor.setAttributes(new XMLAttributes());\n eAccessor.getAttributes().setEmbeddeds(new ArrayList<EmbeddedAccessor>());\n eAccessor.getAttributes().setIds(new ArrayList<IdAccessor>());\n eAccessor.setClassName(ENTITY_STR);\n eAccessor.setAccess(EL_ACCESS_VIRTUAL);\n xmlEntityMappings.getEntities().add(eAccessor);\n EmbeddedAccessor fakeAccessor;\n int i = 0;\n for (ClassDescriptor cdesc : descriptors) {\n if (cdesc.isAggregateDescriptor()) {\n fakeAccessor = new EmbeddedAccessor();\n fakeAccessor.setName(FAKE_STR + i++);\n fakeAccessor.setAttributeType(cdesc.getJavaClassName());\n eAccessor.getAttributes().getEmbeddeds().add(fakeAccessor);\n }\n }\n IdAccessor idAccessor = new IdAccessor();\n idAccessor.setName(FAKEPK_STR);\n idAccessor.setAttributeType(STRING_STR);\n ColumnMetadata column = new ColumnMetadata();\n column.setName(FAKE_PK_STR);\n idAccessor.setColumn(column);\n eAccessor.getAttributes().getIds().add(idAccessor);\n return xmlEntityMappings;\n}\n"
|
"private String sizeStr(int memSize) {\n String sizeStr;\n switch(memSize) {\n case 1:\n sizeStr = \"String_Node_Str\";\n break;\n case 2:\n sizeStr = \"String_Node_Str\";\n break;\n case 4:\n sizeStr = \"String_Node_Str\";\n break;\n case 8:\n sizeStr = \"String_Node_Str\";\n break;\n default:\n throw new CompilerError(\"String_Node_Str\" + memSize);\n }\n return sizeStr;\n}\n"
|
"public VmwareHypervisorHostNetworkSummary getHyperHostNetworkSummary(String esxServiceConsolePort) throws Exception {\n if (s_logger.isTraceEnabled())\n s_logger.trace(\"String_Node_Str\" + _mor.getValue() + \"String_Node_Str\" + esxServiceConsolePort);\n List<ManagedObjectReference> hosts = (List<ManagedObjectReference>) _context.getVimClient().getDynamicProperty(_mor, \"String_Node_Str\");\n if (hosts != null && hosts.size() > 0) {\n VmwareHypervisorHostNetworkSummary summary = new HostMO(_context, hosts.get(0)).getHyperHostNetworkSummary(esxServiceConsolePort);\n if (s_logger.isTraceEnabled())\n s_logger.trace(\"String_Node_Str\");\n return summary;\n }\n if (s_logger.isTraceEnabled())\n s_logger.trace(\"String_Node_Str\");\n return null;\n}\n"
|
"public void testDelegatesToValue() {\n String contents = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n String toFind = \"String_Node_Str\";\n int offset = contents.lastIndexOf(toFind);\n assertType(contents, offset, offset + toFind.length(), \"String_Node_Str\");\n}\n"
|
"public void setMethod(Method method) {\n if (method == null) {\n typeText.setType(null);\n return;\n }\n Class<?> cls = method.getDeclaringClass();\n typeText.setType(cls);\n reviseMethodListFor(cls);\n methodList.select(indexOf(method));\n}\n"
|
"private boolean collectDirectNetworkUsage(final HostVO host) {\n s_logger.debug(\"String_Node_Str\");\n final long zoneId = host.getDataCenterId();\n final DetailVO lastCollectDetail = _detailsDao.findDetail(host.getId(), \"String_Node_Str\");\n if (lastCollectDetail == null) {\n s_logger.warn(\"String_Node_Str\" + host.getId());\n return false;\n }\n Date lastCollection = new Date(Long.parseLong(lastCollectDetail.getValue()));\n List<IPAddressVO> allocatedIps = listAllocatedDirectIps(zoneId);\n Calendar rightNow = Calendar.getInstance();\n rightNow.add(Calendar.HOUR_OF_DAY, -2);\n final Date now = rightNow.getTime();\n if (lastCollection.after(now)) {\n s_logger.debug(\"String_Node_Str\" + lastCollection.toString() + \"String_Node_Str\");\n return false;\n }\n List<UsageEventVO> IpEvents = _eventDao.listDirectIpEvents(lastCollection, now, zoneId);\n Map<String, Date> ipAssigment = new HashMap<String, Date>();\n List<UsageIPAddressVO> IpPartialUsage = new ArrayList<UsageIPAddressVO>();\n List<UsageIPAddressVO> fullDurationIpUsage = new ArrayList<UsageIPAddressVO>();\n for (UsageEventVO IpEvent : IpEvents) {\n String address = IpEvent.getResourceName();\n if (EventTypes.EVENT_NET_IP_ASSIGN.equals(IpEvent.getType())) {\n ipAssigment.put(address, IpEvent.getCreateDate());\n } else if (EventTypes.EVENT_NET_IP_RELEASE.equals(IpEvent.getType())) {\n if (ipAssigment.containsKey(address)) {\n Date assigned = ipAssigment.get(address);\n ipAssigment.remove(address);\n IpPartialUsage.add(new UsageIPAddressVO(IpEvent.getAccountId(), address, assigned, IpEvent.getCreateDate()));\n } else {\n IpPartialUsage.add(new UsageIPAddressVO(IpEvent.getAccountId(), address, lastCollection, IpEvent.getCreateDate()));\n }\n }\n }\n List<String> IpList = new ArrayList<String>();\n for (IPAddressVO ip : allocatedIps) {\n if (ip.getAllocatedToAccountId() == Account.ACCOUNT_ID_SYSTEM) {\n continue;\n }\n String address = (ip.getAddress()).toString();\n if (ipAssigment.containsKey(address)) {\n IpPartialUsage.add(new UsageIPAddressVO(ip.getAllocatedToAccountId(), address, ipAssigment.get(address), now));\n } else {\n fullDurationIpUsage.add(new UsageIPAddressVO(ip.getAllocatedToAccountId(), address, lastCollection, now));\n IpList.add(address);\n }\n }\n final List<UserStatisticsVO> collectedStats = new ArrayList<UserStatisticsVO>();\n if (fullDurationIpUsage.size() > 0) {\n DirectNetworkUsageCommand cmd = new DirectNetworkUsageCommand(IpList, lastCollection, now, _TSinclZones, _TSexclZones);\n DirectNetworkUsageAnswer answer = (DirectNetworkUsageAnswer) _agentMgr.easySend(host.getId(), cmd);\n if (answer == null || !answer.getResult()) {\n String details = (answer != null) ? answer.getDetails() : \"String_Node_Str\";\n String msg = \"String_Node_Str\" + host.getId() + \"String_Node_Str\" + details + \"String_Node_Str\";\n s_logger.error(msg);\n return false;\n } else {\n for (UsageIPAddressVO usageIp : fullDurationIpUsage) {\n String publicIp = usageIp.getAddress();\n long[] bytesSentRcvd = answer.get(publicIp);\n Long bytesSent = bytesSentRcvd[0];\n Long bytesRcvd = bytesSentRcvd[1];\n if (bytesSent == null || bytesRcvd == null) {\n s_logger.debug(\"String_Node_Str\" + publicIp);\n continue;\n }\n if (bytesSent == 0L && bytesRcvd == 0L) {\n s_logger.trace(\"String_Node_Str\" + publicIp);\n continue;\n }\n UserStatisticsVO stats = new UserStatisticsVO(usageIp.getAccountId(), zoneId, null, null, null, null);\n stats.setCurrentBytesSent(bytesSent);\n stats.setCurrentBytesReceived(bytesRcvd);\n collectedStats.add(stats);\n }\n }\n }\n for (UsageIPAddressVO usageIp : IpPartialUsage) {\n IpList = new ArrayList<String>();\n IpList.add(usageIp.getAddress());\n DirectNetworkUsageCommand cmd = new DirectNetworkUsageCommand(IpList, usageIp.getAssigned(), usageIp.getReleased(), _TSinclZones, _TSexclZones);\n DirectNetworkUsageAnswer answer = (DirectNetworkUsageAnswer) _agentMgr.easySend(host.getId(), cmd);\n if (answer == null || !answer.getResult()) {\n String details = (answer != null) ? answer.getDetails() : \"String_Node_Str\";\n String msg = \"String_Node_Str\" + host.getId() + \"String_Node_Str\" + details + \"String_Node_Str\";\n s_logger.error(msg);\n return false;\n } else {\n String publicIp = usageIp.getAddress();\n long[] bytesSentRcvd = answer.get(publicIp);\n Long bytesSent = bytesSentRcvd[0];\n Long bytesRcvd = bytesSentRcvd[1];\n if (bytesSent == null || bytesRcvd == null) {\n s_logger.debug(\"String_Node_Str\" + publicIp);\n continue;\n }\n if (bytesSent == 0L && bytesRcvd == 0L) {\n s_logger.trace(\"String_Node_Str\" + publicIp);\n continue;\n }\n UserStatisticsVO stats = new UserStatisticsVO(usageIp.getAccountId(), zoneId, null, null, null, null);\n stats.setCurrentBytesSent(bytesSent);\n stats.setCurrentBytesReceived(bytesRcvd);\n collectedStats.add(stats);\n }\n }\n if (collectedStats.size() == 0) {\n s_logger.debug(\"String_Node_Str\");\n return false;\n }\n Transaction.execute(new TransactionCallbackNoReturn() {\n public void doInTransactionWithoutResult(TransactionStatus status) {\n for (UserStatisticsVO stat : collectedStats) {\n UserStatisticsVO stats = _statsDao.lock(stat.getAccountId(), stat.getDataCenterId(), 0L, null, host.getId(), \"String_Node_Str\");\n if (stats == null) {\n stats = new UserStatisticsVO(stat.getAccountId(), zoneId, null, host.getId(), \"String_Node_Str\", 0L);\n stats.setCurrentBytesSent(stat.getCurrentBytesSent());\n stats.setCurrentBytesReceived(stat.getCurrentBytesReceived());\n _statsDao.persist(stats);\n } else {\n stats.setCurrentBytesSent(stats.getCurrentBytesSent() + stat.getCurrentBytesSent());\n stats.setCurrentBytesReceived(stats.getCurrentBytesReceived() + stat.getCurrentBytesReceived());\n _statsDao.update(stats.getId(), stats);\n }\n }\n lastCollectDetail.setValue(\"String_Node_Str\" + now.getTime());\n _detailsDao.update(lastCollectDetail.getId(), lastCollectDetail);\n }\n });\n return true;\n}\n"
|
"public static void fillTreeList(IProgressMonitor monitor) {\n allFilteredNodeList.clear();\n DQRepositoryNode.setIsReturnAllNodesWhenFiltering(false);\n List<IRepositoryNode> list = new ArrayList<IRepositoryNode>();\n list.add(getRootNode(ERepositoryObjectType.TDQ_DATA_PROFILING, true));\n list.add(getRootNode(ERepositoryObjectType.TDQ_LIBRARIES, true));\n list.add(getRootNode(ERepositoryObjectType.METADATA, true));\n list.add(getRecycleBinRepNode());\n for (IRepositoryNode iRepositoryNode : list) {\n allFilteredNodeList.addAll(getTreeList(iRepositoryNode));\n if (null != monitor) {\n monitor.worked(2);\n }\n }\n DQRepositoryNode.setIsReturnAllNodesWhenFiltering(true);\n}\n"
|
"private static boolean isEquality(ExpressionTree condition) {\n return condition.is(EQUAL_TO, NOT_EQUAL_TO);\n}\n"
|
"private TreeOperation handleBackspaceOrDeleteKeyOnEmptyTexts(boolean isBackspace, Node node, Node rightParagraph, Node leftParagraph) {\n org.xwiki.gwt.dom.client.Document document = getTextArea().getDocument();\n Range range = document.createRange();\n if (isBackspace) {\n range.setStart(document.getBody().getFirstChild(), 0);\n range.setEndBefore(node);\n } else {\n range.setStartAfter(node);\n range.setEndBefore(document.getBody().getLastChild());\n }\n TreeOperation op = null;\n List<Text> nonEmptyTextNodes = getNonEmptyTextNodes(range);\n if (nonEmptyTextNodes.size() > 0) {\n int idx = isBackspace ? nonEmptyTextNodes.size() - 1 : 0;\n Node prevNonEmptyTextNode = nonEmptyTextNodes.get(idx);\n log.fine(\"String_Node_Str\" + prevNonEmptyTextNode.getNodeValue());\n List<Integer> path;\n if (node.getParentNode() == prevNonEmptyTextNode.getParentNode()) {\n int deletePos = isBackspace ? prevNonEmptyTextNode.getNodeValue().length() - 1 : 0;\n path = TreeHelper.getLocator(prevNonEmptyTextNode);\n op = new TreeDeleteText(clientJupiter.getSiteId(), deletePos, TreeHelper.toIntArray(path));\n } else {\n int lBbrCount = Element.as(leftParagraph).getElementsByTagName(BR).getLength();\n int rBbrCount = Element.as(rightParagraph).getElementsByTagName(BR).getLength();\n path = TreeHelper.getLocator(prevNonEmptyTextNode);\n op = new TreeMergeParagraph(clientJupiter.getSiteId(), path.get(0), leftParagraph.getChildCount() - lBbrCount, rightParagraph.getChildCount() - rBbrCount);\n op.setPath(TreeHelper.toIntArray(path));\n }\n }\n return op;\n}\n"
|
"public static void init() {\n GameRegistry.registerBlock(remnantRuinChest, RemnantRuinChestBlock.NAME);\n GameRegistry.registerBlock(craftingStation, CraftingStationBlock.NAME);\n GameRegistry.registerBlock(cupola, CupolaBlock.NAME);\n GameRegistry.registerBlock(structureShape, SteamNSteelStructureShapeBlock.NAME);\n GameRegistry.registerBlock(shapeLI, ShapeLIBlock.NAME);\n registerStructure(ssBallMill, shapeLI, SSBallMillStructure.NAME);\n registerStructure(ssBlastFurnace, shapeLI, SSBlastFurnaceStructure.NAME);\n registerStructure(ssBoiler, shapeLI, SSBoilerStructure.NAME);\n registerStructure(fanLarge, structureShape, FanLargeStructure.NAME);\n GameRegistry.registerBlock(pipe, PipeBlock.NAME);\n GameRegistry.registerBlock(pipeValve, PipeValveBlock.NAME);\n GameRegistry.registerBlock(pipeValveRedstone, PipeRedstoneValveBlock.NAME);\n GameRegistry.registerBlock(pipeJunction, PipeJunctionBlock.NAME);\n registerBlockAndOre(oreNiter, NiterOre.NAME);\n registerBlockAndOre(oreCopper, CopperOre.NAME);\n registerBlockAndOre(oreSulfur, SulfurOre.NAME);\n registerBlockAndOre(oreTin, TinOre.NAME);\n registerBlockAndOre(oreZinc, ZincOre.NAME);\n registerBlockAndOre(blockBrass, SteamNSteelStorageBlock.BRASS_BLOCK);\n registerBlockAndOre(blockBronze, SteamNSteelStorageBlock.BRONZE_BLOCK);\n registerBlockAndOre(blockCopper, SteamNSteelStorageBlock.COPPER_BLOCK);\n registerBlockAndOre(blockPlotonium, SteamNSteelStorageBlock.PLOTONIUM_BLOCK);\n registerBlockAndOre(blockSteel, SteamNSteelStorageBlock.STEEL_BLOCK);\n registerBlockAndOre(blockTin, SteamNSteelStorageBlock.TIN_BLOCK);\n registerBlockAndOre(blockZinc, SteamNSteelStorageBlock.ZINC_BLOCK);\n GameRegistry.registerBlock(remnantRuinPillar, RemnantRuinPillarBlock.NAME);\n GameRegistry.registerBlock(remnantRuinFloor, RemnantRuinFloorBlock.NAME);\n GameRegistry.registerBlock(remnantRuinWall, RemnantRuinWallBlock.NAME);\n GameRegistry.registerBlock(remnantRuinIronBars, RemnantRuinIronBarsBlockItem.class, RemnantRuinIronBarsBlock.NAME);\n GameRegistry.registerBlock(blockConcrete, ConcreteBlockItem.class, ConcreteBlock.NAME);\n TileEntity.addMapping(RemnantRuinChestTE.class, \"String_Node_Str\");\n}\n"
|
"public int drainTo(Collection<? super T> c, int maxElements) {\n if (maxElements <= 0) {\n return 0;\n }\n int addedElements = 0;\n synchronized (queueLock) {\n while (addedElements < maxElements && peek() != null) {\n c.add(poll());\n addedElements++;\n }\n }\n return addedElements;\n}\n"
|
"public Tuple exec(Tuple input) throws IOException {\n Map<String, String> rawDataMap = CommonUtils.convertDataIntoMap(input, this.headers);\n Tuple tuple = TupleFactory.getInstance().newTuple(this.outputNames.size() + 1);\n for (int i = 0; i < this.outputNames.size(); i++) {\n String name = this.outputNames.get(i);\n String raw = rawDataMap.get(name);\n if (i == 0) {\n tuple.set(i, raw);\n } else if (i == 1) {\n tuple.set(i, (StringUtils.isEmpty(raw) ? \"String_Node_Str\" : raw));\n } else if (i > 1 && i < 2 + validMetaSize) {\n tuple.set(i, raw);\n } else {\n ColumnConfig columnConfig = this.columnConfigMap.get(name);\n Double value = Normalizer.normalize(columnConfig, raw, this.modelConfig.getNormalizeStdDevCutOff(), this.modelConfig.getNormalizeType());\n tuple.set(i, value);\n }\n }\n return tuple;\n}\n"
|
"public Calc accept(ExpCompiler compiler) {\n final Calc defaultCalc = defaultExp.accept(compiler);\n return new GenericCalc(new DummyExp(type)) {\n public Calc[] getCalcs() {\n return new Calc[] { defaultCalc };\n }\n public Object evaluate(Evaluator evaluator) {\n if (value != null) {\n return value;\n } else {\n return defaultCalc.evaluate(evaluator);\n }\n }\n };\n}\n"
|
"public Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {\n if (!shouldInstrument(name)) {\n return KernelBundleClassLoader.this.loadClass(name, resolve);\n }\n Class<?> cls = KernelBundleClassLoader.this.findLoadedClass(name);\n if (cls == null) {\n cls = this.loadedClasses.get(name);\n if (cls == null) {\n cls = findClassInternal(name, true);\n if (cls == null) {\n cls = KernelBundleClassLoader.this.loadClass(name, resolve);\n }\n }\n }\n if (cls == null) {\n throw new ClassNotFoundException(name);\n }\n if (resolve) {\n resolveClass(cls);\n }\n this.loadedClasses.putIfAbsent(name, cls);\n return cls;\n}\n"
|
"protected final void validateCoverageRange() {\n if (coverageRange == null) {\n CoverageRange defaultCoverageRange = new CoverageRange();\n log.info(\"String_Node_Str\" + this.name + \"String_Node_Str\" + defaultCoverageRange.toString());\n } else if (organism == null || !organism.isGenomeSizeAvailable()) {\n CoverageRange defaultCoverageRange = new CoverageRange();\n log.warn(\"String_Node_Str\" + \"String_Node_Str\" + defaultCoverageRange.toString());\n } else if (coverageRange.validate()) {\n log.info(\"String_Node_Str\" + this.name + \"String_Node_Str\" + coverageRange.toString());\n } else {\n throw new IllegalArgumentException(\"String_Node_Str\" + coverageRange.toString() + \"String_Node_Str\" + this.name + \"String_Node_Str\");\n }\n}\n"
|
"public boolean start() {\n try {\n List<SyncQueueItemVO> l = _queueMgr.getActiveQueueItems(getMsid(), false);\n cleanupPendingJobs(l);\n _queueMgr.resetQueueProcess(getMsid());\n _jobDao.resetJobProcess(getMsid(), BaseCmd.INTERNAL_ERROR, getSerializedErrorMessage(\"String_Node_Str\"));\n } catch (Throwable e) {\n s_logger.error(\"String_Node_Str\" + e.getMessage(), e);\n }\n _heartbeatScheduler.scheduleAtFixedRate(getHeartbeatTask(), HEARTBEAT_INTERVAL, HEARTBEAT_INTERVAL, TimeUnit.MILLISECONDS);\n _heartbeatScheduler.scheduleAtFixedRate(getGCTask(), GC_INTERVAL, GC_INTERVAL, TimeUnit.MILLISECONDS);\n return true;\n}\n"
|
"public Project create(ProjectDTO projectDTO) {\n logger.debug(\"String_Node_Str\" + projectDTO);\n Project project = new Project();\n project.setName(projectDTO.getName());\n project.setDescription(projectDTO.getDescription());\n BaseNode projectRef = new BaseNode();\n projectRef.setName(projectDTO.getName());\n projectRef.setNodeType(\"String_Node_Str\");\n projectRef.setParentId(Long.valueOf(-1));\n BaseNode savedRef = nodeRepository.save(projectRef);\n project.setProjectRef(savedRef);\n return projectRepository.save(project);\n}\n"
|
"public boolean isInOctreeLeaf(Octant leaf) {\n NodeData nodeFrom = obj.getSource();\n NodeData nodeTo = obj.getTarget();\n if (octants[0] == leaf) {\n if (octants[0] != ((ModelImpl) nodeFrom.getModel()).getOctants()[0]) {\n res = false;\n }\n } else {\n if (octants[1] != ((ModelImpl) nodeTo.getModel()).getOctants()[0]) {\n return false;\n }\n }\n return true;\n}\n"
|
"private com.sun.syndication.feed.rss.Item itemFromDSpaceItem(Context context, Item dspaceItem) throws SQLException {\n com.sun.syndication.feed.rss.Item rssItem = new com.sun.syndication.feed.rss.Item();\n String titleField = ConfigurationManager.getProperty(\"String_Node_Str\");\n if (titleField == null) {\n titleField = \"String_Node_Str\";\n }\n String dateField = ConfigurationManager.getProperty(\"String_Node_Str\");\n if (dateField == null) {\n dateField = \"String_Node_Str\";\n }\n String itHandle = ConfigurationManager.getBooleanProperty(\"String_Node_Str\") ? HandleManager.resolveToURL(context, dspaceItem.getHandle()) : HandleManager.getCanonicalForm(dspaceItem.getHandle());\n rssItem.setLink(itHandle);\n String title = null;\n try {\n title = dspaceItem.getMetadata(titleField)[0].value;\n } catch (ArrayIndexOutOfBoundsException e) {\n title = labels.getString(clazz + \"String_Node_Str\");\n }\n rssItem.setTitle(title);\n String descriptionFields = ConfigurationManager.getProperty(\"String_Node_Str\");\n if (descriptionFields == null) {\n descriptionFields = defaultDescriptionFields;\n }\n StringBuffer descBuf = new StringBuffer();\n StringTokenizer st = new StringTokenizer(descriptionFields, \"String_Node_Str\");\n while (st.hasMoreTokens()) {\n String field = st.nextToken().trim();\n boolean isDate = false;\n if (field.indexOf(\"String_Node_Str\") > 0) {\n field = field.replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n isDate = true;\n }\n DCValue[] values = dspaceItem.getMetadata(field);\n if (values != null && values.length > 0) {\n if (descBuf.length() > 0) {\n descBuf.append(\"String_Node_Str\");\n descBuf.append(\"String_Node_Str\");\n }\n String fieldLabel = null;\n try {\n fieldLabel = labels.getString(\"String_Node_Str\" + field);\n } catch (java.util.MissingResourceException e) {\n }\n if (fieldLabel != null && fieldLabel.length() > 0)\n descBuf.append(fieldLabel + \"String_Node_Str\");\n for (int i = 0; i < values.length; i++) {\n String fieldValue = values[i].value;\n if (isDate)\n fieldValue = (new DCDate(fieldValue)).toString();\n descBuf.append(fieldValue);\n if (i < values.length - 1) {\n descBuf.append(\"String_Node_Str\");\n }\n }\n }\n }\n Description descrip = new Description();\n descrip.setValue(descBuf.toString().replaceAll(\"String_Node_Str\", \"String_Node_Str\"));\n rssItem.setDescription(descrip);\n String dcDate = null;\n try {\n dcDate = dspaceItem.getMetadata(dateField)[0].value;\n } catch (ArrayIndexOutOfBoundsException e) {\n }\n if (dcDate != null) {\n rssItem.setPubDate((new DCDate(dcDate)).toDate());\n }\n return rssItem;\n}\n"
|
"public void computeScroll() {\n if (mScroller.computeScrollOffset()) {\n int oldX = mScrollX;\n int oldY = mScrollY;\n int x = mScroller.getCurrX();\n int y = mScroller.getCurrY();\n if (oldX != x || oldY != y) {\n overscrollBy(x - oldX, y - oldY, oldX, oldY, getScrollRange(), 0, mOverflingDistance, 0, false);\n onScrollChanged(mScrollX, mScrollY, oldX, oldY);\n final int range = getScrollRange();\n final int overscrollMode = getOverscrollMode();\n if (overscrollMode == OVERSCROLL_ALWAYS || (overscrollMode == OVERSCROLL_IF_CONTENT_SCROLLS && range > 0)) {\n if (x < 0 && oldX >= 0) {\n mEdgeGlowLeft.onAbsorb((int) mScroller.getCurrVelocity());\n } else if (x > range && oldX <= range) {\n mEdgeGlowRight.onAbsorb((int) mScroller.getCurrVelocity());\n }\n }\n }\n awakenScrollBars();\n postInvalidate();\n }\n}\n"
|
"public static Filter buildFilter(String field, String lethal, String not, String min, String minType, String max, String maxType, String exact, String exactType, String wildChar) throws Exception {\n Filter f = null;\n if (field != null) {\n field = field.trim();\n }\n if (lethal != null) {\n lethal = lethal.trim();\n }\n if (not != null) {\n not = not.trim();\n }\n if (min != null) {\n min = min.trim();\n }\n if (minType != null) {\n minType = minType.trim();\n }\n if (max != null) {\n max = max.trim();\n }\n if (maxType != null) {\n maxType = maxType.trim();\n }\n if (exact != null) {\n exact = exact.trim();\n }\n if (exactType != null) {\n exactType = exactType.trim();\n }\n if (wildChar != null) {\n wildChar = wildChar.trim();\n }\n int fieldInt;\n if (field == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n fieldInt = Integer.parseInt(field);\n int temp;\n if (lethal == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n temp = Integer.parseInt(lethal);\n boolean isLethal = (temp == 1);\n if (not == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n temp = Integer.parseInt(not);\n boolean notPolicy = (temp == 1);\n if (wildChar != null && (min != null || max != null || exact != null)) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n if (exact != null && (min != null || max != null)) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n if (exact != null && exactType == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n if (min != null && minType == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n if (max != null && maxType == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n if (minType != null && maxType != null) {\n if (minType.compareTo(maxType) != 0) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n }\n if (wildChar != null) {\n f = new Filter(fieldInt, isLethal, wildChar, notPolicy);\n return f;\n }\n if (exact != null) {\n if (exactType.compareTo(\"String_Node_Str\") == 0) {\n Integer integer;\n try {\n integer = new Integer(exact);\n } catch (NumberFormatException e) {\n throw new IllegalArgumentException(\"String_Node_Str\" + exact);\n }\n f = new Filter(fieldInt, isLethal, integer, notPolicy);\n } else if (exactType.compareTo(\"String_Node_Str\") == 0) {\n Date date = null;\n try {\n date = new Date(Long.parseLong(exact));\n } catch (NumberFormatException e) {\n throw new IllegalArgumentException(\"String_Node_Str\" + exact);\n }\n f = new Filter(fieldInt, isLethal, date, notPolicy);\n } else if (exactType.compareTo(\"String_Node_Str\") == 0) {\n f = new Filter(fieldInt, isLethal, (Object) exact, notPolicy);\n } else {\n throw new IllegalArgumentException(\"String_Node_Str\" + exactType);\n }\n return f;\n }\n if (minType == null) {\n minType = maxType;\n }\n if (minType.compareTo(\"String_Node_Str\") == 0) {\n f = new Filter(fieldInt, isLethal, min, max, notPolicy);\n } else if (minType.compareTo(\"String_Node_Str\") == 0) {\n Date minDate = null;\n Date maxDate = null;\n try {\n if (min != null) {\n minDate = new Date(Long.parseLong(min));\n }\n } catch (NumberFormatException e) {\n throw new IllegalArgumentException(\"String_Node_Str\" + min);\n }\n try {\n if (max != null) {\n maxDate = new Date(Long.parseLong(max));\n }\n } catch (NumberFormatException e) {\n throw new IllegalArgumentException(\"String_Node_Str\" + max);\n }\n f = new Filter(fieldInt, isLethal, minDate, maxDate, notPolicy);\n } else if (minType.compareTo(\"String_Node_Str\") == 0) {\n Integer minInt = null;\n Integer maxInt = null;\n if (min == null) {\n throw new IllegalArgumentException(\"String_Node_Str\" + min);\n }\n if (max == null) {\n throw new IllegalArgumentException(\"String_Node_Str\" + min);\n }\n try {\n if (min != null) {\n minInt = new Integer(min);\n }\n if (max != null) {\n maxInt = new Integer(max);\n }\n } catch (NumberFormatException e) {\n throw new IllegalArgumentException(\"String_Node_Str\" + min + \"String_Node_Str\" + max);\n }\n f = new Filter(fieldInt, isLethal, minInt, maxInt, notPolicy);\n } else {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n return f;\n}\n"
|
"static PropertyIndex createPropertyIndex(String key) {\n int id = IdGenerator.getGenerator().nextId(PropertyIndex.class);\n PropertyIndex index = new PropertyIndex(key, id);\n EventManager em = EventManager.getManager();\n EventData eventData = new EventData(new PropIndexOpData(index));\n if (!em.generateProActiveEvent(Event.PROPERTY_INDEX_CREATE, eventData)) {\n setRollbackOnly();\n throw new CreateException(\"String_Node_Str\" + \"String_Node_Str\");\n }\n Transaction tx = null;\n try {\n tx = transactionManager.getTransaction();\n if (tx == null) {\n throw new NotInTransactionException(\"String_Node_Str\" + index.getKey());\n }\n tx.registerSynchronization(new TxCommitHook(index));\n } catch (javax.transaction.SystemException e) {\n throw new NotInTransactionException(e);\n } catch (Exception e) {\n throw new NotInTransactionException(e);\n }\n em.generateReActiveEvent(Event.PROPERTY_INDEX_CREATE, eventData);\n return index;\n}\n"
|
"public void printST(int indentLevel) {\n String operator = \"String_Node_Str\";\n TreeNode[] heirs = this.heirs();\n if (image != null && image.toString().equals(\"String_Node_Str\")) {\n if (((SyntaxTreeNode) (heirs()[0])).image.toString().equals(\"String_Node_Str\")) {\n operator = \"String_Node_Str\" + ((SyntaxTreeNode) (((SyntaxTreeNode) (heirs()[0])).heirs()[0])).image.toString();\n }\n if (((SyntaxTreeNode) (heirs()[1])).image.toString().equals(\"String_Node_Str\")) {\n operator = ((SyntaxTreeNode) (((SyntaxTreeNode) (heirs()[1])).heirs()[0])).image.toString();\n }\n if (((SyntaxTreeNode) (heirs()[0])).image.toString().equals(\"String_Node_Str\")) {\n operator = ((SyntaxTreeNode) (((SyntaxTreeNode) (heirs()[0])).heirs()[1])).image.toString();\n }\n }\n for (int i = 0; i < indentLevel; i++) System.out.print(Strings.blanks[2]);\n System.out.print((image == null ? \"String_Node_Str\" + SyntaxNodeImage[kind].toString() + \"String_Node_Str\" : image.toString()) + \"String_Node_Str\" + (operator != \"String_Node_Str\" ? operator + \"String_Node_Str\" : \"String_Node_Str\") + \"String_Node_Str\" + heirs.length + \"String_Node_Str\" + \"String_Node_Str\" + kind + PreCommentToString(preComment) + \"String_Node_Str\");\n for (int i = 0; i < heirs.length; i++) {\n if (heirs[i] != null)\n ((SyntaxTreeNode) heirs[i]).printST(indentLevel + 1);\n else {\n for (int j = 0; j <= indentLevel; j++) {\n System.out.print(Strings.blanks[2]);\n }\n ;\n System.out.println(\"String_Node_Str\");\n }\n }\n}\n"
|
"public void init() throws JSchException, SftpException, IOException, InterruptedException {\n remoteCache = new RemoteFileCache();\n remoteCache.setAgentHome(agentHome);\n remoteCache.setSession(getSession());\n remoteCache.init();\n initRemoteClassPath();\n ExecCommand halloWorldCmd = new ExecCommand(javaExecPath);\n halloWorldCmd.setWorkDir(agentHome);\n halloWorldCmd.addArg(\"String_Node_Str\").addArg(bootJarPath).addArg(HalloWelt.class.getName());\n Process rp = createDirectProcess(halloWorldCmd);\n rp.getOutputStream().close();\n BackgroundStreamDumper.link(rp.getInputStream(), System.out, false);\n BackgroundStreamDumper.link(rp.getErrorStream(), System.err, false);\n int rcode = rp.waitFor();\n if (rcode != 0) {\n throw new IOException(\"String_Node_Str\");\n }\n ;\n if (USE_EXEC_RELAY) {\n initControlSession();\n }\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.