content stringlengths 40 137k |
|---|
"public default double[] rowMeans() {\n int m = nrows();\n int n = ncols();\n double[] x = new double[m];\n for (int j = 0; j < n; j++) {\n for (int i = 0; i < m; i++) {\n x[i] += get(i, j);\n }\n }\n for (int i = 1; i < m; i++) {\n x[i] /= n;\n }\n return x;\n}\n"
|
"private static void createRoles(final Configuration rodaConfig) throws GenericException {\n final Iterator<String> keys = rodaConfig.getKeys(\"String_Node_Str\");\n final Set<String> roles = new HashSet<>();\n while (keys.hasNext()) {\n roles.addAll(Arrays.asList(rodaConfig.getStringArray(keys.next())));\n }\n for (final String role : roles) {\n try {\n if (!role.trim().equalsIgnoreCase(\"String_Node_Str\")) {\n RodaCoreFactory.ldapUtility.addRole(role);\n LOGGER.info(\"String_Node_Str\", role);\n }\n } catch (final RoleAlreadyExistsException e) {\n LOGGER.info(\"String_Node_Str\", role);\n LOGGER.trace(e.getMessage(), e);\n } catch (final LdapUtilityException e) {\n throw new GenericException(\"String_Node_Str\" + role + \"String_Node_Str\", e);\n }\n }\n}\n"
|
"public boolean isStriped() {\n return getStripingPolicy().getWidth() > 1;\n}\n"
|
"private static void writeUTF(DataOutputStream dos, String str) throws IOException {\n int strlen = str.length();\n int c = 0;\n int utflen = getBytesSize(str);\n dos.writeInt(utflen);\n int i = 0;\n for (; i < strlen; i++) {\n c = str.charAt(i);\n if (!((c >= 0x0001) && (c <= 0x007F)))\n break;\n dos.writeByte((byte) c);\n }\n for (; i < strlen; i++) {\n c = str.charAt(i);\n if ((c >= 0x0001) && (c <= 0x007F)) {\n dos.writeByte((byte) c);\n } else if (c > 0x07FF) {\n dos.writeByte((byte) (0xE0 | ((c >> 12) & 0x0F)));\n dos.writeByte((byte) (0x80 | ((c >> 6) & 0x3F)));\n dos.writeByte((byte) (0x80 | ((c >> 0) & 0x3F)));\n } else {\n dos.writeByte((byte) (0xC0 | ((c >> 6) & 0x1F)));\n dos.writeByte((byte) (0x80 | ((c >> 0) & 0x3F)));\n }\n }\n}\n"
|
"public void testZBar() throws KurentoMediaFrameworkException, InterruptedException {\n PlayerEndPoint player = mediaPipeline.createPlayerEndPoint(\"String_Node_Str\");\n ZBarFilter zbar = mediaPipeline.createZBarFilter();\n player.connect(zbar, KmsMediaType.VIDEO);\n final Semaphore sem = new Semaphore(0);\n zbar.addCodeFoundDataListener(new AbstractCodeFoundEventListener() {\n public void onEvent(CodeFoundEvent event) {\n log.info(\"String_Node_Str\" + event);\n sem.release();\n }\n });\n player.play();\n Assert.assertTrue(sem.tryAcquire(10, TimeUnit.SECONDS));\n player.stop();\n zbar.release();\n player.release();\n}\n"
|
"private void minimizeToTray() {\n if (!SystemTray.isSupported()) {\n Mediator.getLogger(DaemonManager.class.getName()).log(Level.INFO, \"String_Node_Str\");\n return;\n }\n final PopupMenu popup = new PopupMenu();\n final TrayIcon trayIcon = new TrayIcon(Toolkit.getDefaultToolkit().getImage(\"String_Node_Str\"), \"String_Node_Str\", popup);\n final SystemTray tray = SystemTray.getSystemTray();\n MenuItem showItem = new MenuItem(\"String_Node_Str\");\n MenuItem hideItem = new MenuItem(\"String_Node_Str\");\n MenuItem exitItem = new MenuItem(\"String_Node_Str\");\n showItem.addActionListener(showListener);\n hideItem.addActionListener(hideListener);\n exitItem.addActionListener(exitListener);\n popup.add(showItem);\n popup.addSeparator();\n popup.add(hideItem);\n popup.addSeparator();\n popup.add(exitItem);\n trayIcon.setPopupMenu(popup);\n try {\n tray.add(trayIcon);\n } catch (AWTException ex) {\n System.out.println(ex.toString() + \"String_Node_Str\");\n }\n}\n"
|
"public boolean run(CommandLine cline) {\n if (!cline.hasOption(\"String_Node_Str\")) {\n setErrorMessage(\"String_Node_Str\");\n return false;\n }\n if (!cline.hasOption(\"String_Node_Str\")) {\n setErrorMessage(\"String_Node_Str\");\n return false;\n }\n String netfile = cline.getOptionValue(\"String_Node_Str\");\n Net net = Net.load(netfile);\n String outDir = cline.getOptionValue(\"String_Node_Str\");\n int bins = 100;\n if (cline.hasOption(\"String_Node_Str\")) {\n bins = new Integer(cline.getOptionValue(\"String_Node_Str\"));\n }\n int nodeCount = net.getNodeCount();\n int edgeCount = net.getEdgeCount();\n Net randomNet = RandomNet.generate(nodeCount, edgeCount);\n randomNet.save(outDir + \"String_Node_Str\", NetFileType.SNAP);\n DiscreteDistrib inDegrees = new DiscreteDistrib(randomNet.inDegSeq());\n DiscreteDistrib outDegrees = new DiscreteDistrib(randomNet.outDegSeq());\n Distrib dPageRank = new Distrib(randomNet.prDSeq(), bins);\n Distrib uPageRank = new Distrib(randomNet.prUSeq(), bins);\n inDegrees.write(outDir + \"String_Node_Str\");\n outDegrees.write(outDir + \"String_Node_Str\");\n dPageRank.write(outDir + \"String_Node_Str\");\n uPageRank.write(outDir + \"String_Node_Str\");\n (new TriadicProfile(randomNet)).write(outDir + \"String_Node_Str\");\n return true;\n}\n"
|
"void startServer() {\n try {\n CassandraCli.cassandraSetUp();\n } catch (IOException e) {\n log.error(e.getMessage());\n } catch (TException e) {\n e.printStackTrace();\n } catch (InvalidRequestException e) {\n e.printStackTrace();\n } catch (UnavailableException e) {\n e.printStackTrace();\n } catch (TimedOutException e) {\n e.printStackTrace();\n } catch (SchemaDisagreementException e) {\n e.printStackTrace();\n }\n}\n"
|
"protected String buildBookmarkAction(IAction action, IReportContext context) {\n if (action == null || context == null)\n return null;\n String baseURL = null;\n Object renderContext = getRenderContext(context);\n if (renderContext instanceof HTMLRenderContext) {\n baseURL = ((HTMLRenderContext) renderContext).getBaseURL();\n }\n if (renderContext instanceof PDFRenderContext) {\n baseURL = ((PDFRenderContext) renderContext).getBaseURL();\n }\n if (baseURL == null)\n return null;\n String bookmark = action.getBookmark();\n if (baseURL.lastIndexOf(IBirtConstants.SERVLET_PATH_FRAMESET) > 0) {\n String func = \"String_Node_Str\" + ParameterAccessor.htmlEncode(bookmark) + \"String_Node_Str\";\n return \"String_Node_Str\" + func + \"String_Node_Str\" + func + \"String_Node_Str\";\n } else if (baseURL.lastIndexOf(IBirtConstants.SERVLET_PATH_RUN) > 0) {\n return \"String_Node_Str\" + bookmark + \"String_Node_Str\";\n }\n StringBuffer link = new StringBuffer();\n boolean realBookmark = false;\n if (this.document != null) {\n long pageNumber = this.document.getPageNumber(action.getBookmark());\n realBookmark = (pageNumber == this.page && !isEmbeddable);\n }\n try {\n bookmark = URLEncoder.encode(bookmark, ParameterAccessor.UTF_8_ENCODE);\n } catch (UnsupportedEncodingException e) {\n }\n link.append(baseURL);\n link.append(ParameterAccessor.QUERY_CHAR);\n if (document != null) {\n link.append(ParameterAccessor.PARAM_REPORT_DOCUMENT);\n link.append(ParameterAccessor.EQUALS_OPERATOR);\n String documentName = document.getName();\n try {\n documentName = URLEncoder.encode(documentName, ParameterAccessor.UTF_8_ENCODE);\n } catch (UnsupportedEncodingException e) {\n }\n link.append(documentName);\n } else if (action.getReportName() != null && action.getReportName().length() > 0) {\n link.append(ParameterAccessor.PARAM_REPORT);\n link.append(ParameterAccessor.EQUALS_OPERATOR);\n String reportName = getReportName(context, action);\n try {\n reportName = URLEncoder.encode(reportName, ParameterAccessor.UTF_8_ENCODE);\n } catch (UnsupportedEncodingException e) {\n }\n link.append(reportName);\n } else {\n return \"String_Node_Str\" + action.getActionString();\n }\n if (locale != null) {\n link.append(ParameterAccessor.getQueryParameterString(ParameterAccessor.PARAM_LOCALE, locale.toString()));\n }\n if (isRtl) {\n link.append(ParameterAccessor.getQueryParameterString(ParameterAccessor.PARAM_RTL, String.valueOf(isRtl)));\n }\n link.append(ParameterAccessor.getQueryParameterString(ParameterAccessor.PARAM_MASTERPAGE, String.valueOf(this.isMasterPageContent)));\n try {\n if (resourceFolder != null)\n resourceFolder = URLEncoder.encode(resourceFolder, ParameterAccessor.UTF_8_ENCODE);\n } catch (UnsupportedEncodingException e) {\n }\n if (resourceFolder != null) {\n link.append(ParameterAccessor.getQueryParameterString(ParameterAccessor.PARAM_RESOURCE_FOLDER, this.resourceFolder));\n }\n if (realBookmark) {\n link.append(\"String_Node_Str\");\n link.append(bookmark);\n } else {\n link.append(ParameterAccessor.getQueryParameterString(ParameterAccessor.PARAM_BOOKMARK, bookmark));\n }\n return link.toString();\n}\n"
|
"public <T> T generateValue() {\n RandomFunction random = new RandomFunction(Integer.class, new Range(1, 9));\n Integer a = random.generateValue();\n Integer b = random.generateValue();\n Integer c = random.generateValue();\n Integer d = random.generateValue();\n Integer e = random.generateValue();\n Integer f = random.generateValue();\n Integer g = random.generateValue();\n Integer h = random.generateValue();\n Integer i = random.generateValue();\n Integer j = (a * 10 + b * 9 + c * 8 + d * 7 + e * 6 + f * 5 + g * 4 + h * 3 + i * 2);\n j = j % 11;\n j = j <= 1 ? 0 : 11 - j;\n int m = (a * 11 + b * 10 + c * 9 + d * 8 + e * 7 + f * 6 + g * 5 + h * 4 + i * 3 + j * 2);\n m = m % 11;\n m = m <= 1 ? 0 : 11 - m;\n return (T) String.format(formatted ? \"String_Node_Str\" : \"String_Node_Str\", a, b, c, d, e, f, g, h, i, j, m);\n}\n"
|
"public static void main(String[] args) throws ConfigurationException, WikapidiaException {\n Options options = new Options();\n options.addOption(new DefaultOptionBuilder().withLongOpt(\"String_Node_Str\").withDescription(\"String_Node_Str\").create(\"String_Node_Str\"));\n options.addOption(new DefaultOptionBuilder().withLongOpt(\"String_Node_Str\").withDescription(\"String_Node_Str\").create(\"String_Node_Str\"));\n EnvBuilder.addStandardOptions(options);\n CommandLineParser parser = new PosixParser();\n CommandLine cmd;\n try {\n cmd = parser.parse(options, args);\n } catch (ParseException e) {\n System.err.println(\"String_Node_Str\" + e.getMessage());\n new HelpFormatter().printHelp(\"String_Node_Str\", options);\n return;\n }\n Env env = new EnvBuilder(cmd).build();\n Configurator conf = env.getConfigurator();\n String phraseAnalyzerName = cmd.getOptionValue(\"String_Node_Str\", \"String_Node_Str\");\n PhraseAnalyzer phraseAnalyzer = conf.get(PhraseAnalyzer.class, phraseAnalyzerName);\n String spatialDataFolderPath = cmd.getOptionValue('f');\n File spatialDataFolder = new File(\"String_Node_Str\");\n WikidataDao wdDao = conf.get(WikidataDao.class);\n SpatialDataDao spatialDataDao = conf.get(SpatialDataDao.class);\n LOG.log(Level.INFO, \"String_Node_Str\" + spatialDataFolderPath + \"String_Node_Str\");\n SpatialDataLoader loader = new SpatialDataLoader(spatialDataDao, wdDao, phraseAnalyzer, spatialDataFolder);\n loader.loadWikidataData();\n}\n"
|
"private synchronized void conditionallyUpdateTime() {\n if (doSetTimeNextQuery) {\n super.setTime(System.currentTimeMillis());\n doSetTimeNextQuery = false;\n }\n}\n"
|
"private StateMachine<ServiceConfiguration, Component.State, Component.Transition> buildStateMachine() {\n final TransitionAction<ServiceConfiguration> noop = Transitions.noop();\n return new StateMachineBuilder<ServiceConfiguration, State, Transition>(this.parent, State.PRIMORDIAL) {\n {\n in(State.ENABLED).run(ServiceTransitions.StateCallbacks.PIPELINES_ADD).run(ServiceTransitions.StateCallbacks.PROPERTIES_ADD).run(ServiceTransitions.StateCallbacks.SERVICE_CONTEXT_RESTART);\n in(State.LOADED).run(ServiceTransitions.StateCallbacks.ENDPOINT_START);\n in(State.STOPPED).run(ServiceTransitions.StateCallbacks.ENDPOINT_STOP);\n in(State.DISABLED).run(ServiceTransitions.StateCallbacks.SERVICE_CONTEXT_RESTART).run(ServiceTransitions.StateCallbacks.PIPELINES_REMOVE).run(ServiceTransitions.StateCallbacks.PROPERTIES_REMOVE);\n from(State.PRIMORDIAL).to(State.INITIALIZED).error(State.BROKEN).on(Transition.INITIALIZING).run(noop);\n from(State.PRIMORDIAL).to(State.BROKEN).error(State.BROKEN).on(Transition.FAILED_TO_PREPARE).run(noop);\n from(State.INITIALIZED).to(State.LOADED).error(State.BROKEN).on(Transition.LOADING).run(ServiceTransitions.TransitionActions.LOAD);\n from(State.LOADED).to(State.NOTREADY).error(State.BROKEN).on(Transition.STARTING).addListener(ServiceTransitions.StateCallbacks.FIRE_START_EVENT).run(ServiceTransitions.TransitionActions.START);\n from(State.NOTREADY).to(State.DISABLED).error(State.NOTREADY).on(Transition.READY_CHECK).run(ServiceTransitions.TransitionActions.CHECK);\n from(State.DISABLED).to(State.ENABLED).error(State.NOTREADY).on(Transition.ENABLING).addListener(ServiceTransitions.StateCallbacks.FIRE_ENABLE_EVENT).run(ServiceTransitions.TransitionActions.ENABLE);\n from(State.DISABLED).to(State.STOPPED).error(State.NOTREADY).on(Transition.STOPPING).addListener(ServiceTransitions.StateCallbacks.FIRE_STOP_EVENT).run(ServiceTransitions.TransitionActions.STOP);\n from(State.DISABLED).to(State.DISABLED).error(State.NOTREADY).on(Transition.DISABLED_CHECK).run(ServiceTransitions.TransitionActions.CHECK);\n from(State.ENABLED).to(State.DISABLED).error(State.NOTREADY).on(Transition.DISABLING).addListener(ServiceTransitions.StateCallbacks.FIRE_DISABLE_EVENT).run(ServiceTransitions.TransitionActions.DISABLE);\n from(State.ENABLED).to(State.ENABLED).error(State.NOTREADY).on(Transition.ENABLED_CHECK).run(ServiceTransitions.TransitionActions.CHECK);\n from(State.STOPPED).to(State.INITIALIZED).error(State.BROKEN).on(Transition.DESTROYING).run(ServiceTransitions.TransitionActions.DESTROY);\n }\n }.newAtomicMarkedState();\n}\n"
|
"public boolean isItemValid(ItemStack itemStack) {\n return TileFarmer.isFeed(itemStack);\n}\n"
|
"public void render() {\n ShaderManager.getInstance().enableDefault();\n for (int i = 0; i < 2; i++) {\n if (i == 0) {\n glColorMask(false, false, false, false);\n } else {\n glColorMask(true, true, true, true);\n }\n for (BlockPosition gp : _gridPositions) {\n GL11.glPushMatrix();\n Vector3f cameraPosition = CoreRegistry.get(WorldRenderer.class).getActiveCamera().getPosition();\n GL11.glTranslated(gp.x - cameraPosition.x, gp.y - cameraPosition.y, gp.z - cameraPosition.z);\n _mesh.render();\n GL11.glPopMatrix();\n }\n }\n}\n"
|
"public void setRelativePath(String relativePath) {\n this.relativePath = relativePath;\n validate();\n}\n"
|
"public void onLoadFinished(Loader<HashMap<String, List<Movie>>> arg0, HashMap<String, List<Movie>> data) {\n mRowsAdapter = new ArrayObjectAdapter(new ListRowPresenter());\n CardPresenter cardPresenter = new CardPresenter();\n int i = 0;\n for (Map.Entry<String, List<Movie>> entry : data.entrySet()) {\n ArrayObjectAdapter listRowAdapter = new ArrayObjectAdapter(cardPresenter);\n List<Movie> list = entry.getValue();\n for (int j = 0; j < list.size(); j++) {\n listRowAdapter.add(list.get(j));\n }\n HeaderItem header = new HeaderItem(i, entry.getKey(), null);\n i++;\n mRowsAdapter.add(new ListRow(header, listRowAdapter));\n }\n HeaderItem gridHeader = new HeaderItem(i, getResources().getString(R.string.preferences), null);\n GridItemPresenter gridPresenter = new GridItemPresenter();\n ArrayObjectAdapter gridRowAdapter = new ArrayObjectAdapter(gridPresenter);\n gridRowAdapter.add(getResources().getString(R.string.grid_view));\n gridRowAdapter.add(getResources().getString(R.string.send_feeback));\n gridRowAdapter.add(getResources().getString(R.string.personal_settings));\n mRowsAdapter.add(new ListRow(gridHeader, gridRowAdapter));\n setAdapter(mRowsAdapter);\n updateRecommendations();\n}\n"
|
"public void replaceVarWithPrefixedURI(String var, String uri) {\n SPARQL_Term subject;\n SPARQL_Property property;\n SPARQL_Value object;\n for (SPARQL_Triple triple : conditions) {\n subject = triple.getVariable();\n property = triple.getProperty();\n object = triple.getValue();\n if (subject.isVariable()) {\n if (subject.getName().equals(var)) {\n subject.setName(uri);\n subject.setIsVariable(false);\n }\n }\n if (property.isVariable()) {\n if (property.getName().equals(var)) {\n property.setName(uri);\n property.setIsVariable(false);\n }\n }\n if (object.isVariable()) {\n if (object.getName().equals(var)) {\n object.setName(uri);\n object.setIsVariable(false);\n }\n }\n }\n}\n"
|
"private static Series copyInstanceThis(Series src) {\n if (src == null) {\n return null;\n }\n SeriesImpl dest = new SeriesImpl();\n if (src.getLabel() != null) {\n dest.setLabel(LabelImpl.copyInstance(src.getLabel()));\n }\n if (src.getDataDefinition() != null) {\n EList<Query> list = dest.getDataDefinition();\n for (Query element : src.getDataDefinition()) {\n list.add(QueryImpl.copyInstance(element));\n }\n }\n if (src.getDataPoint() != null) {\n dest.setDataPoint(DataPointImpl.copyInstance(src.getDataPoint()));\n }\n if (src.getDataSets() != null) {\n EMap<String, DataSet> map = dest.getDataSets();\n for (Map.Entry<String, DataSet> entry : src.getDataSets().entrySet()) {\n map.put(entry.getKey(), DataSetImpl.copyInstance(entry.getValue()));\n }\n }\n if (src.getTriggers() != null) {\n EList<Trigger> list = dest.getTriggers();\n for (Trigger element : src.getTriggers()) {\n list.add(TriggerImpl.copyInstance(element));\n }\n }\n if (src.getCurveFitting() != null) {\n dest.setCurveFitting(CurveFittingImpl.copyInstance(src.getCurveFitting()));\n }\n if (src.getCursor() != null) {\n dest.setCursor(CursorImpl.copyInstance(src.getCursor()));\n }\n dest.visible = src.isVisible();\n dest.visibleESet = src.isSetVisible();\n dest.seriesIdentifier = src.getSeriesIdentifier();\n dest.labelPosition = src.getLabelPosition();\n dest.labelPositionESet = src.isSetLabelPosition();\n dest.stacked = src.isStacked();\n dest.stackedESet = src.isSetStacked();\n dest.translucent = src.isTranslucent();\n dest.translucentESet = src.isSetTranslucent();\n return dest;\n}\n"
|
"public void testListRecursive() {\n CachingFileManager fm = new CachingFileManager(CachingArchiveProvider.getDefault(), bCp, SourceLevelUtils.JDK1_8, false, true);\n Iterable<JavaFileObject> res = fm.list(StandardLocation.CLASS_PATH, \"String_Node_Str\", EnumSet.of(JavaFileObject.Kind.CLASS), true);\n assertEquals(Arrays.asList(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"), toContent(res));\n assertEquals(Arrays.asList(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"), toInferedName(fm, res));\n fm = new CachingFileManager(CachingArchiveProvider.getDefault(), mvCp, Source.JDK1_8, false, true);\n res = fm.list(StandardLocation.CLASS_PATH, \"String_Node_Str\", EnumSet.of(JavaFileObject.Kind.CLASS), true);\n assertEquals(Arrays.asList(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"), toContent(res));\n assertEquals(Arrays.asList(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"), toInferedName(fm, res));\n fm = new CachingFileManager(CachingArchiveProvider.getDefault(), bCp, Source.JDK1_9, false, true);\n res = fm.list(StandardLocation.CLASS_PATH, \"String_Node_Str\", EnumSet.of(JavaFileObject.Kind.CLASS), true);\n assertEquals(Arrays.asList(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"), toContent(res));\n assertEquals(Arrays.asList(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"), toInferedName(fm, res));\n fm = new CachingFileManager(CachingArchiveProvider.getDefault(), mvCp, Source.JDK1_9, false, true);\n res = fm.list(StandardLocation.CLASS_PATH, \"String_Node_Str\", EnumSet.of(JavaFileObject.Kind.CLASS), true);\n assertEquals(Arrays.asList(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"), toContent(res));\n assertEquals(Arrays.asList(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"), toInferedName(fm, res));\n}\n"
|
"public final Function_argument_listContext function_argument_list() throws RecognitionException {\n Function_argument_listContext _localctx = new Function_argument_listContext(_ctx, getState());\n enterRule(_localctx, 84, RULE_function_argument_list);\n int _la;\n try {\n enterOuterAlt(_localctx, 1);\n {\n setState(400);\n _la = _input.LA(1);\n if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << 1) | (1L << 2) | (1L << 4) | (1L << 20) | (1L << 27) | (1L << 28) | (1L << 37) | (1L << 43) | (1L << 53))) != 0) || ((((_la - 83)) & ~0x3f) == 0 && ((1L << (_la - 83)) & ((1L << (ALPHA_NUMERIC - 83)) | (1L << (HEX_LITERAL - 83)) | (1L << (DECIMAL_LITERAL - 83)) | (1L << (OCTAL_LITERAL - 83)) | (1L << (FLOATING_POINT_LITERAL - 83)) | (1L << (CHAR - 83)) | (1L << (STRING - 83)))) != 0)) {\n {\n setState(379);\n function_argument();\n setState(384);\n _errHandler.sync(this);\n _la = _input.LA(1);\n while (_la == 26) {\n {\n {\n setState(380);\n match(26);\n setState(381);\n function_argument();\n }\n }\n setState(386);\n _errHandler.sync(this);\n _la = _input.LA(1);\n }\n }\n }\n }\n } catch (RecognitionException re) {\n _localctx.exception = re;\n _errHandler.reportError(this, re);\n _errHandler.recover(this, re);\n } finally {\n exitRule();\n }\n return _localctx;\n}\n"
|
"public static VersionInfo fetchVersionInfo() {\n NetClient client = new NetClient();\n try {\n HttpResponse response = client.get(UPDATE_VERSION_FILE);\n int statusCode = response.getStatusLine().getStatusCode();\n if (App.DEBUG) {\n Log.d(TAG, \"String_Node_Str\" + statusCode);\n }\n if (statusCode == 200) {\n String content = EntityUtils.toString(response.getEntity(), HTTP.UTF_8);\n if (App.DEBUG) {\n Log.d(TAG, \"String_Node_Str\" + content);\n }\n return VersionInfo.parse(content);\n }\n } catch (IOException e) {\n if (App.DEBUG) {\n e.printStackTrace();\n }\n } catch (Exception e) {\n if (App.DEBUG) {\n e.printStackTrace();\n }\n } finally {\n client.close();\n }\n return null;\n}\n"
|
"public void onTextChanged(CharSequence s, int start, int before, int count) {\n mEmailInput.setError(null);\n mIsSocialLogin = false;\n}\n"
|
"RowDeletor getRowDeletor(IThriftPool pool) {\n IThriftPool iThriftPool = pool;\n boolean success = false;\n while (!success) {\n if (iThriftPool != null) {\n Node[] nodes = ((CommonsBackedPool) iThriftPool).getCluster().getNodes();\n String host = nodes[0].getAddress();\n int thriftPort = ((CommonsBackedPool) iThriftPool).getCluster().getConnectionConfig().getThriftPort();\n CassandraHost cassandraHost = ((CassandraHostConfiguration) configuration).getCassandraHost(nodes[0].getAddress(), ((CommonsBackedPool) pool).getCluster().getConnectionConfig().getThriftPort());\n if (cassandraHost.isTestOnBorrow()) {\n if (cassandraHost.isTestOnBorrow() && PelopsUtils.verifyConnection(host, thriftPort)) {\n logger.info(\"String_Node_Str\", nodes[0].getAddress(), thriftPort);\n return Pelops.createRowDeletor(PelopsUtils.getPoolName(iThriftPool));\n }\n removePool(iThriftPool);\n } else {\n logger.info(\"String_Node_Str\", nodes[0].getAddress(), thriftPort);\n return Pelops.createRowDeletor(PelopsUtils.getPoolName(iThriftPool));\n }\n removePool(iThriftPool);\n }\n success = false;\n iThriftPool = getPoolUsingPolicy();\n }\n throw new KunderaException(\"String_Node_Str\");\n}\n"
|
"public void sessionTest() {\n final AIConfiguration config = new AIConfiguration(getAccessToken(), getSubscriptionKey(), AIConfiguration.SupportedLanguages.English, AIConfiguration.RecognitionEngine.System);\n updateConfig(config);\n try {\n final AIDataService firstService = new AIDataService(Robolectric.application, config);\n final AIDataService secondService = new AIDataService(Robolectric.application, config);\n {\n final AIRequest weatherRequest = new AIRequest();\n weatherRequest.setQuery(\"String_Node_Str\");\n final AIResponse weatherResponse = makeRequest(firstService, weatherRequest);\n assertNotNull(weatherResponse);\n }\n {\n final AIRequest checkSecondRequest = new AIRequest();\n checkSecondRequest.setQuery(\"String_Node_Str\");\n final AIResponse checkSecondResponse = makeRequest(secondService, checkSecondRequest);\n assertTrue(TextUtils.isEmpty(checkSecondResponse.getResult().getAction()));\n }\n {\n final AIRequest checkFirstRequest = new AIRequest();\n checkFirstRequest.setQuery(\"String_Node_Str\");\n final AIResponse checkFirstResponse = makeRequest(firstService, checkFirstRequest);\n assertNotNull(checkFirstResponse.getResult().getAction());\n assertTrue(checkFirstResponse.getResult().getAction().equalsIgnoreCase(\"String_Node_Str\"));\n }\n } catch (final AIServiceException e) {\n e.printStackTrace();\n assertTrue(e.getMessage(), false);\n }\n}\n"
|
"public boolean evaluate(Graph graph, Edge edge) {\n if (edgeColumn != null) {\n Object obj = edge.getEdgeData().getAttributes().getValue(edgeColumn.getIndex());\n if (obj != null) {\n TimeInterval timeInterval = (TimeInterval) obj;\n min = Math.min(min, Double.isInfinite(timeInterval.getLow()) ? min : timeInterval.getLow());\n max = Math.max(max, Double.isInfinite(timeInterval.getHigh()) ? max : timeInterval.getHigh());\n return timeInterval.isInRange(visibleInterval.getLow(), visibleInterval.getHigh());\n }\n }\n return true;\n}\n"
|
"private void progressCurrentAction() {\n progress += progressIncrease;\n if (progress >= 1) {\n setState(ENewMovableState.DOING_NOTHING);\n this.movableAction = EAction.NO_ACTION;\n }\n}\n"
|
"public void actionPerformed(ActionEvent e) {\n GameContext context = curAvatar.getAvatarCharacter().getContext();\n CharacterSteeringHelm helm = curAvatar.getAvatarCharacter().getContext().getSteering();\n helm.addTaskToTop(new GoTo(new Vector3f(0, 0, 0), context));\n helm.setEnable(true);\n}\n"
|
"public void createAppSettingBarControls(Composite composite) {\n GridLayout layout = new GridLayout(1, true);\n layout.verticalSpacing = 9;\n Label label = new Label(composite, SWT.NULL);\n label.setText(\"String_Node_Str\");\n m_appNameText = new Text(composite, SWT.BORDER | SWT.SINGLE);\n m_appNameText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n m_appNameText.addModifyListener(new ModifyListener() {\n public void modifyText(ModifyEvent e) {\n dialogChanged();\n }\n });\n label = new Label(composite, SWT.NULL);\n m_defaultPathButton = new Button(composite, SWT.CHECK);\n m_defaultPathButton.setText(\"String_Node_Str\");\n m_defaultPathButton.setSelection(true);\n m_defaultPathButton.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n setControlsForDefaultPath();\n dialogChanged();\n }\n });\n label = new Label(composite, SWT.NULL);\n label = new Label(composite, SWT.NULL);\n label = new Label(composite, SWT.NULL);\n label.setText(\"String_Node_Str\");\n m_appFolderText = new Text(composite, SWT.BORDER | SWT.SINGLE);\n m_appFolderText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n m_appFolderText.addModifyListener(new ModifyListener() {\n public void modifyText(ModifyEvent e) {\n dialogChanged();\n }\n });\n m_browseButton = new Button(composite, SWT.PUSH);\n m_browseButton.setText(\"String_Node_Str\");\n m_browseButton.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n handleBrowse();\n }\n });\n}\n"
|
"public int read(byte[] b, int off, int len) throws IOException {\n int value = in.read(b, off, len);\n if (value != -1) {\n partial += value;\n total += value;\n }\n return value;\n}\n"
|
"public void setMissing(Context ctx, boolean isMissing) {\n PreyConfig preyConfig = PreyConfig.getPreyConfig(ctx);\n HashMap<String, String> parameters = new HashMap<String, String>();\n parameters.put(\"String_Node_Str\", preyConfig.getApiKey());\n if (isMissing)\n parameters.put(\"String_Node_Str\", \"String_Node_Str\");\n else\n parameters.put(\"String_Node_Str\", \"String_Node_Str\");\n try {\n PreyRestHttpClient.getInstance(ctx).methodAsParameter(this.getDeviceUrl(ctx), \"String_Node_Str\", parameters, preyConfig);\n PreyLogger.d(\"String_Node_Str\" + isMissing + \"String_Node_Str\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n}\n"
|
"public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.my_space_fragment, container, false);\n}\n"
|
"private TransferEnvelopeReceiverList getReceiverList(final JobID jobID, final ChannelID sourceChannelID) {\n TransferEnvelopeReceiverList receiverList = this.receiverCache.get(sourceChannelID);\n if (receiverList == null) {\n try {\n while (true) {\n ConnectionInfoLookupResponse lookupResponse;\n synchronized (this.channelLookupService) {\n lookupResponse = this.channelLookupService.lookupConnectionInfo(this.localConnectionInfo, jobID, sourceChannelID);\n }\n if (lookupResponse.receiverNotFound()) {\n LOG.error(\"String_Node_Str\" + sourceChannelID);\n break;\n }\n if (lookupResponse.receiverNotReady()) {\n Thread.sleep(500);\n continue;\n }\n if (lookupResponse.receiverReady()) {\n receiverList = new TransferEnvelopeReceiverList(lookupResponse);\n break;\n }\n }\n if (receiverList != null) {\n this.receiverCache.put(sourceChannelID, receiverList);\n if (LOG.isDebugEnabled()) {\n final StringBuilder sb = new StringBuilder();\n sb.append(\"String_Node_Str\" + sourceChannelID + \"String_Node_Str\" + this.localConnectionInfo + \"String_Node_Str\");\n if (receiverList.hasLocalReceivers()) {\n sb.append(\"String_Node_Str\");\n final Iterator<ChannelID> it = receiverList.getLocalReceivers().iterator();\n while (it.hasNext()) {\n sb.append(\"String_Node_Str\" + it.next() + \"String_Node_Str\");\n }\n }\n if (receiverList.hasRemoteReceivers()) {\n sb.append(\"String_Node_Str\");\n final Iterator<InetSocketAddress> it = receiverList.getRemoteReceivers().iterator();\n while (it.hasNext()) {\n sb.append(\"String_Node_Str\" + it.next() + \"String_Node_Str\");\n }\n }\n LOG.debug(sb.toString());\n }\n }\n } catch (InterruptedException ie) {\n } catch (IOException ioe) {\n }\n }\n return receiverList;\n}\n"
|
"public void testLogQueueNoDelay() throws Exception {\n logReceiver.setDelayMillis(0);\n BlockingQueue<DelayedLogEntry> queue = logReceiver.getLogQueue();\n final int numLogs = 5;\n Level[] levels = new Level[] { Level.FINEST, Level.FINE, Level.INFO, Level.WARNING, Level.SEVERE };\n Random random = new Random(System.currentTimeMillis());\n for (int i = 0; i < numLogs; i++) {\n Level level = levels[random.nextInt(levels.length)];\n String acsLevelName = AcsLogLevel.getNativeLevel(level).getEntryName();\n int jlogLevelIndex = LogTypeHelper.parseLogTypeDescription(acsLevelName).intValue();\n String logMessage = \"String_Node_Str\" + i;\n m_logger.log(level, logMessage);\n long timeoutSec = 15L;\n while (true) {\n DelayedLogEntry delayedLogEntry = queue.poll(timeoutSec, TimeUnit.SECONDS);\n if (delayedLogEntry != null) {\n if (delayedLogEntry.isQueuePoison()) {\n fail(\"String_Node_Str\");\n }\n ILogEntry logEntry = delayedLogEntry.getLogEntry();\n String sourceObjectName = (String) logEntry.getField(ILogEntry.FIELD_SOURCEOBJECT);\n if (sourceObjectName.equals(\"String_Node_Str\")) {\n assertEquals(logMessage, logEntry.getField(ILogEntry.FIELD_LOGMESSAGE));\n assertEquals(jlogLevelIndex, ((Integer) logEntry.getField(ILogEntry.FIELD_ENTRYTYPE)).intValue());\n System.out.println(\"String_Node_Str\" + i);\n break;\n } else {\n System.out.println(\"String_Node_Str\" + sourceObjectName);\n }\n } else {\n System.out.println(\"String_Node_Str\" + sourceObjectName);\n }\n } else {\n fail(\"String_Node_Str\" + i + \"String_Node_Str\" + timeoutSec + \"String_Node_Str\");\n }\n }\n logReceiver.stop();\n}\n"
|
"protected void writeReportItem(DataOutputStream out, ReportItemDesign design) throws IOException {\n writeStyledElement(out, design);\n DimensionType x = design.getX();\n if (x != null) {\n IOUtil.writeShort(out, FIELD_X);\n writeDimension(out, x);\n }\n DimensionType y = design.getY();\n if (y != null) {\n IOUtil.writeShort(out, FIELD_Y);\n writeDimension(out, y);\n }\n DimensionType height = design.getHeight();\n if (height != null) {\n IOUtil.writeShort(out, FIELD_HEIGHT);\n writeDimension(out, height);\n }\n DimensionType width = design.getWidth();\n if (width != null) {\n IOUtil.writeShort(out, FIELD_WIDTH);\n writeDimension(out, width);\n }\n String bookmark = design.getBookmark();\n if (bookmark != null) {\n IOUtil.writeShort(out, FIELD_BOOKMARK);\n IOUtil.writeString(out, bookmark);\n }\n String toc = design.getTOC();\n if (toc != null) {\n IOUtil.writeShort(out, FIELD_TOC);\n IOUtil.writeString(out, toc);\n }\n ScriptExpression onCreateScriptExpr = design.getOnCreate();\n if (onCreateScriptExpr != null) {\n IOUtil.writeShort(out, FIELD_ON_CREATE);\n IOUtil.writeString(out, onCreateScriptExpr.getScriptText());\n }\n ScriptExpression onRenderScriptExpr = design.getOnRender();\n if (onRenderScriptExpr != null) {\n IOUtil.writeShort(out, FIELD_ON_RENDER);\n IOUtil.writeString(out, onRenderScriptExpr.getScriptText());\n }\n ScriptExpression onPageBreakScriptExpr = design.getOnPageBreak();\n if (onPageBreakScriptExpr != null) {\n IOUtil.writeShort(out, FIELD_ON_PAGE_BREAK);\n IOUtil.writeString(out, onPageBreakScriptExpr.getScriptText());\n }\n VisibilityDesign visibility = design.getVisibility();\n if (visibility != null) {\n IOUtil.writeShort(out, FIELD_VISIBILITY);\n writeVisibility(out, visibility);\n }\n ActionDesign action = design.getAction();\n if (action != null) {\n IOUtil.writeShort(out, FIELD_ACTION_V1);\n writeAction(out, action);\n }\n boolean useCachedResult = design.useCachedResult();\n if (useCachedResult) {\n IOUtil.writeShort(out, FIELD_USE_CACHED_RESULT);\n IOUtil.writeBool(out, useCachedResult);\n }\n}\n"
|
"public void writeStatement(MethodWriter writer) throws BytecodeException {\n if (this.action == null) {\n this.condition.writeStatement(writer);\n }\n org.objectweb.asm.Label startLabel = this.startLabel.target = new org.objectweb.asm.Label();\n org.objectweb.asm.Label endLabel = this.endLabel.target = new org.objectweb.asm.Label();\n writer.writeTargetLabel(startLabel);\n this.condition.writeInvJump(writer, endLabel);\n this.action.writeStatement(writer);\n writer.writeJumpInsn(Opcodes.GOTO, startLabel);\n writer.writeLabel(endLabel);\n}\n"
|
"public void attributeChanged(Attribute attribute) throws IllegalActionException {\n if ((attribute == width || attribute == xUnit || attribute == xInit) && plot != null) {\n super.attributeChanged(attribute);\n int widthValue = ((IntToken) width.getToken()).intValue();\n plot.setXRange(0.0, xUnitValue * widthValue);\n } else if (attribute == persistence && plot != null) {\n int persValue = ((IntToken) persistence.getToken()).intValue();\n plot.setPointsPersistence(persValue);\n } else {\n super.attributeChanged(attribute);\n }\n}\n"
|
"public List<IRepositoryNode> getChildren() {\n afterGlobalFilter = new ArrayList<IRepositoryNode>();\n DatabaseConnection databaseConnection = getDatabaseConnection();\n if (databaseConnection != null) {\n EList<Package> dataPackage = databaseConnection.getDataPackage();\n if (dataPackage != null && dataPackage.size() > 0) {\n Package pack = dataPackage.get(0);\n String filterCharater = ConnectionHelper.getPackageFilter(databaseConnection);\n List<IRepositoryNode> afterPackageFilter = null;\n if (pack instanceof Schema) {\n afterGlobalFilter = filterResultsIfAny(createRepositoryNodeSchema(dataPackage));\n afterPackageFilter = filterPackages(filterCharater, afterGlobalFilter);\n return afterPackageFilter == null ? afterGlobalFilter : afterPackageFilter;\n } else if (pack instanceof Catalog) {\n afterGlobalFilter = filterResultsIfAny(createRepositoryNodeCatalog(dataPackage));\n afterPackageFilter = filterPackages(filterCharater, afterGlobalFilter);\n return afterPackageFilter == null ? afterGlobalFilter : afterPackageFilter;\n }\n }\n }\n return new ArrayList<IRepositoryNode>();\n}\n"
|
"public void getAutoCompleteContent(String searchValue, Map<String, String> resMap) {\n if (StringHelper.containsNonWhitespace(searchValue)) {\n String searchValueLower = searchValue.toLowerCase();\n for (BusinessGroup group : groupList) {\n if (group.getName() != null && group.getName().toLowerCase().indexOf(searchValueLower) >= 0) {\n resMap.put(group.getName(), group.getKey().toString());\n }\n }\n }\n}\n"
|
"protected List<String> readString(String stringList) {\n if (stringList == null || \"String_Node_Str\".equals(stringList)) {\n return EMPTY_STRING_LIST;\n }\n ArrayList<String> result = new ArrayList<String>(50);\n for (String tmp : stringList.split(\"String_Node_Str\")) {\n if (tmp != null && !\"String_Node_Str\".equals(tmp)) {\n result.add(tmp);\n }\n }\n return result;\n}\n"
|
"public int update(final Uri uri, final ContentValues values, final String where, final String[] whereArgs) {\n Helpers.validateSelection(where, sAppReadableColumnsSet);\n SQLiteDatabase db = mOpenHelper.getWritableDatabase();\n int count;\n boolean startService = false;\n ContentValues filteredValues;\n if (Binder.getCallingPid() != Process.myPid()) {\n filteredValues = new ContentValues();\n copyString(Downloads.Impl.COLUMN_APP_DATA, values, filteredValues);\n copyInteger(Downloads.Impl.COLUMN_VISIBILITY, values, filteredValues);\n Integer i = values.getAsInteger(Downloads.Impl.COLUMN_CONTROL);\n if (i != null) {\n filteredValues.put(Downloads.Impl.COLUMN_CONTROL, i);\n startService = true;\n }\n copyInteger(Downloads.Impl.COLUMN_CONTROL, values, filteredValues);\n copyString(Downloads.Impl.COLUMN_TITLE, values, filteredValues);\n copyString(Downloads.Impl.COLUMN_DESCRIPTION, values, filteredValues);\n } else {\n filteredValues = values;\n String filename = values.getAsString(Downloads.Impl._DATA);\n if (filename != null) {\n Cursor c = query(uri, new String[] { Downloads.Impl.COLUMN_TITLE }, null, null, null);\n if (!c.moveToFirst() || c.getString(0).isEmpty()) {\n values.put(Downloads.Impl.COLUMN_TITLE, new File(filename).getName());\n }\n c.close();\n }\n Integer status = values.getAsInteger(Downloads.Impl.COLUMN_STATUS);\n boolean isRestart = status != null && status == Downloads.Impl.STATUS_PENDING;\n if (isRestart) {\n startService = true;\n }\n }\n int match = sURIMatcher.match(uri);\n switch(match) {\n case MY_DOWNLOADS:\n case MY_DOWNLOADS_ID:\n case ALL_DOWNLOADS:\n case ALL_DOWNLOADS_ID:\n String fullWhere = getWhereClause(uri, where, match);\n if (filteredValues.size() > 0) {\n count = db.update(DB_TABLE, filteredValues, fullWhere, whereArgs);\n } else {\n count = 0;\n }\n break;\n default:\n Log.d(Constants.TAG, \"String_Node_Str\" + uri);\n throw new UnsupportedOperationException(\"String_Node_Str\" + uri);\n }\n notifyContentChanged(uri, match);\n if (startService) {\n Context context = getContext();\n context.startService(new Intent(context, DownloadService.class));\n }\n return count;\n}\n"
|
"public String onMessageReceived(String data) {\n EventMessage eventMessage = XMLConverUtil.convertToObject(EventMessage.class, data);\n if (eventMessage.getEvent() != null && eventMessage.getEvent().equals(\"String_Node_Str\")) {\n return new XMLTextMessage(eventMessage.getFromUserName(), eventMessage.getToUserName(), \"String_Node_Str\").toXML();\n }\n if (eventMessage.getContent().contains(\"String_Node_Str\")) {\n String openid = eventMessage.getFromUserName();\n wechatService.saveOpenid(openid);\n XMLNewsMessage.Article t = new XMLNewsMessage.Article();\n t.setDescription(\"String_Node_Str\");\n t.setPicurl(\"String_Node_Str\");\n t.setTitle(\"String_Node_Str\");\n t.setUrl(\"String_Node_Str\" + eventMessage.getFromUserName());\n XMLNewsMessage xmlNewsMessage = new XMLNewsMessage(eventMessage.getFromUserName(), eventMessage.getToUserName(), Collections.singletonList(t));\n return xmlNewsMessage.toXML();\n } else if (eventMessage.getContent().contains(\"String_Node_Str\")) {\n return new XMLTextMessage(eventMessage.getFromUserName(), eventMessage.getToUserName(), \"String_Node_Str\").toXML();\n }\n return new XMLTextMessage(eventMessage.getFromUserName(), eventMessage.getToUserName(), \"String_Node_Str\").toXML();\n}\n"
|
"void onCall() {\n entries = new Entries(name, operation, predicate);\n}\n"
|
"public void call(String country) throws Exception {\n countInc();\n List<SimpleFeature> features = inputFeatureHandler(inputCollection, country, 0, WIKITYPE, countryState);\n writeQueue.add(features);\n writeToShpFile(outputFeatureSource, WIKITYPE, transaction, writeQueue.poll());\n ;\n}\n"
|
"private static List<ElementParameter> getParametersFromForm(IElement element, EComponentCategory category, ComponentProperties rootProperty, ComponentProperties compProperties, String parentPropertiesPath, Form form, Widget parentWidget, AtomicInteger lastRowNum) {\n List<ElementParameter> elementParameters = new ArrayList<>();\n List<String> parameterNames = new ArrayList<>();\n EComponentCategory compCategory = category;\n if (compCategory == null) {\n compCategory = EComponentCategory.BASIC;\n }\n AtomicInteger lastRN = lastRowNum;\n if (lastRN == null) {\n lastRN = new AtomicInteger();\n }\n if (form == null) {\n return elementParameters;\n }\n ComponentProperties componentProperties = compProperties;\n if (componentProperties == null) {\n componentProperties = (ComponentProperties) form.getProperties();\n }\n if (element instanceof INode) {\n INode node = (INode) element;\n if (node.getComponentProperties() == null) {\n node.setComponentProperties(componentProperties);\n }\n }\n Collection<Widget> formWidgets = form.getWidgets();\n for (Widget widget : formWidgets) {\n NamedThing widgetProperty = widget.getContent();\n String propertiesPath = getPropertiesPath(parentPropertiesPath, null);\n if (widgetProperty instanceof Form) {\n Form subForm = (Form) widgetProperty;\n ComponentProperties subProperties = (ComponentProperties) subForm.getProperties();\n if (!isSameComponentProperties(componentProperties, widgetProperty)) {\n propertiesPath = getPropertiesPath(parentPropertiesPath, subProperties.getName());\n }\n elementParameters.addAll(getParametersFromForm(element, isInitializing, compCategory, rootProperty, subProperties, propertiesPath, subForm, widget, lastRN));\n continue;\n }\n GenericElementParameter param = new GenericElementParameter(element, rootProperty, form, widget, getComponentService());\n String parameterName = propertiesPath.concat(param.getName());\n param.setName(parameterName);\n param.setCategory(compCategory);\n param.setShow(parentWidget == null ? !widget.isHidden() : !parentWidget.isHidden() && !widget.isHidden());\n int rowNum = 0;\n if (widget.getOrder() != 1) {\n rowNum = lastRN.get();\n } else {\n rowNum = widget.getRow();\n if (parentWidget != null) {\n rowNum += parentWidget.getRow();\n }\n rowNum = rowNum + lastRN.get();\n }\n param.setNumRow(rowNum);\n lastRN.set(rowNum);\n EParameterFieldType fieldType = getFieldType(widget, widgetProperty);\n param.setFieldType(fieldType != null ? fieldType : EParameterFieldType.TEXT);\n if (widgetProperty instanceof SchemaProperty) {\n boolean found = false;\n param.setContext(EConnectionType.FLOW_MAIN.getName());\n for (Connector connector : rootProperty.getAvailableConnectors(null, true)) {\n if (!(((SchemaProperty) widgetProperty).getValue() instanceof Schema)) {\n continue;\n }\n if (connector instanceof PropertyPathConnector) {\n String linkedSchema = ((PropertyPathConnector) connector).getPropertyPath() + \"String_Node_Str\";\n if (parameterName.equals(linkedSchema)) {\n found = true;\n param.setContext(connector.getName());\n IElementParameterDefaultValue defaultValue = new ElementParameterDefaultValue();\n Schema schema = ((SchemaProperty) widgetProperty).getValue();\n defaultValue.setDefaultValue(new Schema.Parser().parse(schema.toString()));\n param.getDefaultValues().add(defaultValue);\n }\n }\n }\n if (!found) {\n for (Connector connector : rootProperty.getAvailableConnectors(null, false)) {\n if (!(((SchemaProperty) widgetProperty).getValue() instanceof Schema)) {\n continue;\n }\n if (connector instanceof PropertyPathConnector) {\n String linkedSchema = ((PropertyPathConnector) connector).getPropertyPath() + \"String_Node_Str\";\n if (parameterName.equals(linkedSchema)) {\n if (GenericNodeConnector.INPUT_CONNECTOR.equals(connector.getName())) {\n param.setContext(EConnectionType.FLOW_MAIN.getName());\n } else {\n param.setContext(connector.getName());\n }\n IElementParameterDefaultValue defaultValue = new ElementParameterDefaultValue();\n Schema schema = ((SchemaProperty) widgetProperty).getValue();\n defaultValue.setDefaultValue(new Schema.Parser().parse(schema.toString()));\n param.getDefaultValues().add(defaultValue);\n }\n }\n }\n }\n }\n if (widgetProperty instanceof PresentationItem) {\n param.setValue(widgetProperty.getDisplayName());\n } else if (widgetProperty instanceof Property) {\n Property property = (Property) widgetProperty;\n param.setRequired(property.isRequired());\n param.setValue(getParameterValue(element, property, fieldType));\n if (EParameterFieldType.NAME_SELECTION_AREA.equals(fieldType)) {\n param.setSupportContext(false);\n } else {\n param.setSupportContext(isSupportContext(property));\n }\n property.setTaggedValue(IComponentConstants.SUPPORT_CONTEXT, param.isSupportContext());\n Object cmTV = property.getTaggedValue(IGenericConstants.IS_CONTEXT_MODE);\n param.setReadOnly(Boolean.valueOf(String.valueOf(cmTV)));\n boolean isDynamic = Boolean.valueOf(String.valueOf(property.getTaggedValue(IGenericConstants.IS_DYNAMIC)));\n param.setContextMode(isDynamic);\n List<?> values = property.getPossibleValues();\n if (values != null || EParameterFieldType.CLOSED_LIST.equals(fieldType)) {\n if (values == null) {\n values = Collections.emptyList();\n }\n param.setPossibleValues(values);\n List<String> possVals = new ArrayList<>();\n List<String> possValsDisplay = new ArrayList<>();\n for (Object obj : values) {\n if (obj instanceof NamedThing) {\n NamedThing nal = (NamedThing) obj;\n possVals.add(nal.getName());\n possValsDisplay.add(nal.getDisplayName());\n } else {\n possVals.add(String.valueOf(obj));\n possValsDisplay.add(String.valueOf(obj));\n }\n }\n param.setListItemsDisplayName(possValsDisplay.toArray(new String[0]));\n param.setListItemsDisplayCodeName(possValsDisplay.toArray(new String[0]));\n param.setListItemsValue(possVals.toArray(new String[0]));\n }\n } else if (fieldType != null && fieldType.equals(EParameterFieldType.TABLE) && widgetProperty instanceof Properties) {\n Properties table = (Properties) widgetProperty;\n Form mainForm = table.getForm(Form.MAIN);\n param.setDisplayName(mainForm.getTitle());\n List<ElementParameter> parameters = getParametersFromForm(new FakeElement(\"String_Node_Str\"), mainForm);\n param.setSupportContext(false);\n List<String> codeNames = new ArrayList<>();\n List<String> possValsDisplay = new ArrayList<>();\n for (ElementParameter curParam : parameters) {\n curParam.setFilter(null);\n curParam.setContext(null);\n curParam.setShowIf(null);\n curParam.setNotShowIf(null);\n curParam.setReadOnlyIf(null);\n curParam.setNotReadOnlyIf(null);\n curParam.setNoContextAssist(false);\n curParam.setRaw(false);\n curParam.setReadOnly(false);\n codeNames.add(curParam.getName());\n possValsDisplay.add(curParam.getDisplayName());\n }\n param.setListItemsDisplayName(possValsDisplay.toArray(new String[0]));\n param.setListItemsDisplayCodeName(codeNames.toArray(new String[0]));\n param.setListItemsValue(parameters.toArray(new ElementParameter[0]));\n String[] listItemsShowIf = new String[parameters.size()];\n String[] listItemsNotShowIf = new String[parameters.size()];\n param.setListItemsShowIf(listItemsShowIf);\n param.setListItemsNotShowIf(listItemsNotShowIf);\n param.setValue(GenericTableUtils.getTableValues(table, param));\n }\n if (!param.isReadOnly()) {\n param.setReadOnly(element.isReadOnly());\n }\n param.setSerialized(true);\n param.setDynamicSettings(true);\n if (!parameterNames.contains(parameterName)) {\n elementParameters.add(param);\n parameterNames.add(parameterName);\n }\n }\n return elementParameters;\n}\n"
|
"public int hashCode() {\n int hash = getClass().hashCode();\n hash += hash * 31 + JodaBeanUtils.hashCode(getForename());\n hash += hash * 31 + JodaBeanUtils.hashCode(getSurname());\n hash += hash * 31 + JodaBeanUtils.hashCode(getNumberOfCars());\n hash += hash * 31 + JodaBeanUtils.hashCode(getAddressList());\n hash += hash * 31 + JodaBeanUtils.hashCode(getOtherAddressMap());\n hash += hash * 31 + JodaBeanUtils.hashCode(getAddressesList());\n hash += hash * 31 + JodaBeanUtils.hashCode(getMainAddress());\n hash += hash * 31 + JodaBeanUtils.hashCode(getPropDefAnnotationSecondDeprecated());\n hash += hash * 31 + JodaBeanUtils.hashCode(getPropDefAnnotationSecondManual());\n return hash;\n}\n"
|
"private boolean maybeProcessDeclaration(NodeTraversal t, Node name, Node parent, NamedInfo info) {\n Node gramps = parent.getParent();\n switch(parent.getType()) {\n case Token.VAR:\n if (canMoveValue(collector, ref.getScope(), name.getFirstChild())) {\n return info.addDeclaration(new Declaration(getModule(ref), name));\n }\n return false;\n case Token.FUNCTION:\n if (NodeUtil.isFunctionDeclaration(parent)) {\n return info.addDeclaration(new Declaration(t.getModule(), name));\n }\n return false;\n case Token.ASSIGN:\n case Token.GETPROP:\n Node child = name;\n for (Node current : name.getAncestors()) {\n if (current.isGetProp()) {\n } else if (current.isAssign() && current.getFirstChild() == child) {\n Node currentParent = current.getParent();\n if (currentParent.isExprResult() && canMoveValue(current.getLastChild())) {\n return info.addDeclaration(new Declaration(t.getModule(), current));\n }\n } else {\n return false;\n }\n child = current;\n }\n return false;\n case Token.CALL:\n if (NodeUtil.isExprCall(gramps)) {\n SubclassRelationship relationship = compiler.getCodingConvention().getClassesDefinedByCall(parent);\n if (relationship != null && name.getString().equals(relationship.subclassName)) {\n return info.addDeclaration(new Declaration(t.getModule(), parent));\n }\n }\n return false;\n default:\n return false;\n }\n}\n"
|
"public void testGetColumn1() {\n CwmZExpression<Double> exp = new CwmZExpression<Double>(SqlPredicate.EQUAL);\n String name = \"String_Node_Str\";\n TdColumn column = getColumn(name);\n TdTable table = getTable(tableName);\n column.setOwner(table);\n Double value = new Double(5.0);\n exp.setOperands(column, value);\n Assert.assertNotNull(exp.getColumn1());\n}\n"
|
"private String getDateTime() {\n Calendar c = Calendar.getInstance();\n SimpleDateFormat sdf = new SimpleDateFormat(\"String_Node_Str\");\n return sdf.format(c.getTime());\n}\n"
|
"private static List getToCChildren(TOCNode node) {\n if (node.getChildren() == null)\n return null;\n List children = node.getChildren();\n List ret = new ArrayList();\n Iterator it = children.iterator();\n while (it.hasNext()) {\n TOCNode childNode = (TOCNode) it.next();\n ToC child = new ToC(childNode.getNodeID(), childNode.getDisplayString(), childNode.getBookmark(), BirtUtility.getTOCStyle(childNode));\n child.setChildren(getToCChildren(childNode));\n ret.add(child);\n }\n return ret;\n}\n"
|
"public float getValue(Point p) {\n float leftSide = getLeftSideValue(p);\n float diff = Math.abs(leftSide - constant);\n if (!isValid(leftSide, constant)) {\n diff = -diff;\n }\n return diff;\n}\n"
|
"public static void sendGrapplePacket(EntityPlayer player, int x, int y, int z) {\n ByteBuf buf = Unpooled.buffer();\n ByteBufOutputStream out = new ByteBufOutputStream(buf);\n try {\n out.writeByte(5);\n out.writeInt(player.worldObj.provider.dimensionId);\n out.writeInt(player.getEntityId());\n out.writeInt(x);\n out.writeInt(y);\n out.writeInt(z);\n out.writeDouble(player.posX);\n out.writeDouble(player.posY);\n out.writeDouble(player.posZ);\n } catch (IOException ignored) {\n }\n FMLProxyPacket packet = new FMLProxyPacket(buf, \"String_Node_Str\");\n Steamcraft.channel.sendToServer(packet);\n try {\n out.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n}\n"
|
"public List<BillOfMaterial> getBillOfMaterialList(Product product) {\n return (List<BillOfMaterial>) BillOfMaterial.filter(\"String_Node_Str\", product).fetch();\n}\n"
|
"public byte[] doInTransform(Instrumentor instrumentor, ClassLoader classLoader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {\n try {\n logger.info(\"String_Node_Str\", classLoader);\n InstrumentClass testClass = instrumentor.getInstrumentClass(classLoader, className, classfileBuffer);\n testClass.addSetter(IntSetter.class.getName(), \"String_Node_Str\");\n testClass.addSetter(IntArraySetter.class.getName(), \"String_Node_Str\");\n testClass.addSetter(IntegerArraySetter.class.getName(), \"String_Node_Str\");\n return testClass.toBytecode();\n } catch (InstrumentException e) {\n throw new RuntimeException(e.getMessage(), e);\n }\n}\n"
|
"public synchronized void updateDatabase(UploadAnswer answer) {\n if (answer.getErrorString().startsWith(\"String_Node_Str\")) {\n answer.setErrorString(answer.getErrorString().concat(\"String_Node_Str\"));\n }\n resultObj.setResultString(answer.getErrorString());\n resultObj.setState(answer.getUploadStatus().toString());\n resultObj.setUploadPercent(answer.getUploadPct());\n if (answer.getUploadStatus() == Status.UPLOAD_IN_PROGRESS) {\n asyncMgr.updateAsyncJobAttachment(asyncJobId, type.toString(), 1L);\n asyncMgr.updateAsyncJobStatus(asyncJobId, AsyncJobResult.STATUS_IN_PROGRESS, resultObj);\n } else if (answer.getUploadStatus() == Status.UPLOADED) {\n asyncMgr.completeAsyncJob(asyncJobId, AsyncJobResult.STATUS_SUCCEEDED, 1, resultObj);\n } else {\n asyncMgr.completeAsyncJob(asyncJobId, AsyncJobResult.STATUS_FAILED, 2, resultObj);\n }\n UploadVO updateBuilder = uploadDao.createForUpdate();\n updateBuilder.setUploadPercent(answer.getUploadPct());\n updateBuilder.setUploadState(answer.getUploadStatus());\n updateBuilder.setLastUpdated(new Date());\n updateBuilder.setErrorString(answer.getErrorString());\n updateBuilder.setJobId(answer.getJobId());\n uploadDao.update(getUploadId(), updateBuilder);\n}\n"
|
"public static double binomialCoefficientDouble(final int n, final int k) {\n if (n < k) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n if (n < 0) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n if ((n == k) || (k == 0)) {\n return 1d;\n }\n if ((k == 1) || (k == n - 1)) {\n return n;\n }\n if (k > n / 2) {\n return binomialCoefficientDouble(n, n - k);\n }\n if (n < 67) {\n return binomialCoefficient(n, k);\n }\n double result = 1d;\n for (int i = 1; i <= k; i++) {\n result *= (double) (n - k + i) / (double) i;\n }\n return Math.floor(result + 0.5);\n}\n"
|
"private void saveCorners(Context context) {\n try {\n final File outFile = new File(context.getFilesDir(), \"String_Node_Str\");\n outFile.createNewFile();\n DataOutputStream writer = new DataOutputStream(new BufferedOutputStream(new GZIPOutputStream(new FileOutputStream(outFile))));\n for (int[] corners : mWordsCorners) {\n writer.writeShort(corners.length);\n for (int i = 0; i < corners.length / 2; i++) {\n writer.writeShort((short) (corners[i * 2] * WORDS_SIZE / width));\n writer.writeShort((short) (corners[i * 2 + 1] * WORDS_SIZE / height));\n }\n }\n writer.flush();\n writer.close();\n } catch (IOException e) {\n Log.e(TAG, \"String_Node_Str\", e);\n throw new RuntimeException(e);\n }\n}\n"
|
"private HttpMethodBase createMethod(HttpClient client, Request request) throws IOException, FileNotFoundException {\n String methodName = request.getReqType();\n HttpMethodBase method = null;\n if (methodName.equalsIgnoreCase(\"String_Node_Str\") || methodName.equalsIgnoreCase(\"String_Node_Str\")) {\n EntityEnclosingMethod post = methodName.equalsIgnoreCase(\"String_Node_Str\") ? new PostMethod(request.getUrl()) : new PutMethod(request.getUrl());\n post.getParams().setContentCharset(\"String_Node_Str\");\n if (request.getByteData() != null) {\n post.setRequestEntity(new ByteArrayRequestEntity(request.getByteData()));\n post.setRequestHeader(\"String_Node_Str\", String.valueOf(request.getByteData().length));\n } else if (request.getStringData() != null) {\n post.setRequestEntity(new StringRequestEntity(request.getStringData(), \"String_Node_Str\", \"String_Node_Str\"));\n post.setRequestHeader(\"String_Node_Str\", String.valueOf(request.getStringData().length()));\n } else if (request.getStreamData() != null) {\n InputStreamRequestEntity r = new InputStreamRequestEntity(request.getStreamData());\n post.setRequestEntity(r);\n post.setRequestHeader(\"String_Node_Str\", String.valueOf(r.getContentLength()));\n } else if (request.getParams() != null) {\n StringBuilder sb = new StringBuilder();\n for (final Map.Entry<String, List<String>> paramEntry : request.getParams()) {\n final String key = paramEntry.getKey();\n for (final String value : paramEntry.getValue()) {\n if (sb.length() > 0) {\n sb.append(\"String_Node_Str\");\n }\n UTF8UrlEncoder.appendEncoded(sb, key);\n sb.append(\"String_Node_Str\");\n UTF8UrlEncoder.appendEncoded(sb, value);\n }\n }\n post.setRequestHeader(\"String_Node_Str\", String.valueOf(sb.length()));\n post.setRequestEntity(new StringRequestEntity(sb.toString(), \"String_Node_Str\", \"String_Node_Str\"));\n if (!request.getHeaders().containsKey(\"String_Node_Str\")) {\n post.setRequestHeader(\"String_Node_Str\", \"String_Node_Str\");\n }\n } else if (request.getParts() != null) {\n MultipartRequestEntity mre = createMultipartRequestEntity(request.getParts(), post.getParams());\n post.setRequestEntity(mre);\n post.setRequestHeader(\"String_Node_Str\", mre.getContentType());\n post.setRequestHeader(\"String_Node_Str\", String.valueOf(mre.getContentLength()));\n } else if (request.getEntityWriter() != null) {\n post.setRequestEntity(new EntityWriterRequestEntity(request.getEntityWriter(), computeAndSetContentLength(request, post)));\n } else if (request.getFile() != null) {\n File file = request.getFile();\n if (!file.isFile()) {\n throw new IOException(String.format(Thread.currentThread() + \"String_Node_Str\", file.getAbsolutePath()));\n }\n post.setRequestHeader(\"String_Node_Str\", String.valueOf(file.length()));\n FileInputStream fis = new FileInputStream(file);\n try {\n InputStreamRequestEntity r = new InputStreamRequestEntity(fis);\n post.setRequestEntity(r);\n post.setRequestHeader(\"String_Node_Str\", String.valueOf(r.getContentLength()));\n } finally {\n fis.close();\n }\n } else if (request.getBodyGenerator() != null) {\n Body body = request.getBodyGenerator().createBody();\n try {\n int length = (int) body.getContentLength();\n if (length < 0) {\n length = (int) request.getLength();\n }\n if (length >= 0) {\n post.setRequestHeader(\"String_Node_Str\", String.valueOf(length));\n byte[] bytes = new byte[length];\n ByteBuffer buffer = ByteBuffer.wrap(bytes);\n for (; ; ) {\n buffer.clear();\n if (body.read(buffer) < 0) {\n break;\n }\n }\n }\n post.setRequestEntity(new ByteArrayRequestEntity(bytes));\n } finally {\n try {\n body.close();\n } catch (IOException e) {\n logger.warn(\"String_Node_Str\", e.getMessage(), e);\n }\n }\n }\n method = post;\n } else if (methodName.equalsIgnoreCase(\"String_Node_Str\")) {\n method = new DeleteMethod(request.getUrl());\n } else if (methodName.equalsIgnoreCase(\"String_Node_Str\")) {\n method = new HeadMethod(request.getUrl());\n } else if (methodName.equalsIgnoreCase(\"String_Node_Str\")) {\n method = new GetMethod(request.getUrl());\n } else if (methodName.equalsIgnoreCase(\"String_Node_Str\")) {\n method = new OptionsMethod(request.getUrl());\n } else {\n throw new IllegalStateException(String.format(\"String_Node_Str\", methodName));\n }\n ProxyServer proxyServer = request.getProxyServer() != null ? request.getProxyServer() : config.getProxyServer();\n if (proxyServer != null) {\n if (proxyServer.getPrincipal() != null) {\n Credentials defaultcreds = new UsernamePasswordCredentials(proxyServer.getPrincipal(), proxyServer.getPassword());\n client.getState().setCredentials(new AuthScope(null, -1, AuthScope.ANY_REALM), defaultcreds);\n }\n ProxyHost proxyHost = proxyServer == null ? null : new ProxyHost(proxyServer.getHost(), proxyServer.getPort());\n client.getHostConfiguration().setProxyHost(proxyHost);\n }\n method.setFollowRedirects(false);\n if ((request.getCookies() != null) && !request.getCookies().isEmpty()) {\n for (Cookie cookie : request.getCookies()) {\n method.setRequestHeader(\"String_Node_Str\", AsyncHttpProviderUtils.encodeCookies(request.getCookies()));\n }\n }\n if (request.getHeaders() != null) {\n for (String name : request.getHeaders().keySet()) {\n if (!\"String_Node_Str\".equalsIgnoreCase(name)) {\n for (String value : request.getHeaders().get(name)) {\n method.setRequestHeader(name, value);\n }\n }\n }\n }\n if (request.getHeaders().getFirstValue(\"String_Node_Str\") == null && config.getUserAgent() != null) {\n method.setRequestHeader(\"String_Node_Str\", config.getUserAgent());\n } else {\n method.setRequestHeader(\"String_Node_Str\", AsyncHttpProviderUtils.constructUserAgent(ApacheAsyncHttpProvider.class));\n }\n if (config.isCompressionEnabled()) {\n Header acceptableEncodingHeader = method.getRequestHeader(\"String_Node_Str\");\n if (acceptableEncodingHeader != null) {\n String acceptableEncodings = acceptableEncodingHeader.getValue();\n if (acceptableEncodings.indexOf(\"String_Node_Str\") == -1) {\n StringBuilder buf = new StringBuilder(acceptableEncodings);\n if (buf.length() > 1) {\n buf.append(\"String_Node_Str\");\n }\n buf.append(\"String_Node_Str\");\n method.setRequestHeader(\"String_Node_Str\", buf.toString());\n }\n } else {\n method.setRequestHeader(\"String_Node_Str\", \"String_Node_Str\");\n }\n }\n if (request.getVirtualHost() != null) {\n method.getParams().setVirtualHost(request.getVirtualHost());\n }\n return method;\n}\n"
|
"public void noargsTest() {\n Invocation invocation = new Invocation(\"String_Node_Str\");\n Operation op = xrService.getOperation(invocation.getName());\n Object result = op.invoke(xrService, invocation);\n assertNotNull(\"String_Node_Str\", result);\n Document doc = xmlPlatform.createDocument();\n XMLMarshaller marshaller = xrService.getXMLContext().createMarshaller();\n marshaller.marshal(result, doc);\n Document controlDoc = xmlParser.parse(new StringReader(xrService.getORSession().getProject().getDatasourceLogin().getPlatform() instanceof MySQLPlatform ? VALUE_0_XML : VALUE_1_XML));\n assertTrue(\"String_Node_Str\", comparer.isNodeEqual(controlDoc, doc));\n}\n"
|
"private void relabelGraphs2MultisetLabels(List<DirectedGraph<Vertex<String>, Edge<String>>> graphs, int startLabel, int currentLabel) {\n Map<String, Bucket<Vertex<String>>> bucketsV = new HashMap<String, Bucket<Vertex<String>>>();\n Map<String, Bucket<Edge<String>>> bucketsE = new HashMap<String, Bucket<Edge<String>>>();\n for (int i = startLabel; i < currentLabel; i++) {\n bucketsV.put(Integer.toString(i), new Bucket<Vertex<StringBuffer>>(Integer.toString(i)));\n bucketsE.put(Integer.toString(i), new Bucket<Edge<StringBuffer>>(Integer.toString(i)));\n }\n for (DirectedGraph<Vertex<String>, Edge<String>> graph : graphs) {\n for (Edge<String> edge : graph.getEdges()) {\n bucketsV.get(edge.getLabel()).getContents().add(graph.getDest(edge));\n }\n for (Vertex<String> vertex : graph.getVertices()) {\n Collection<Edge<String>> v2 = graph.getOutEdges(vertex);\n bucketsE.get(vertex.getLabel()).getContents().addAll(v2);\n }\n }\n for (DirectedGraph<Vertex<String>, Edge<String>> graph : graphs) {\n for (Edge<String> edge : graph.getEdges()) {\n edge.setLabel(edge.getLabel() + \"String_Node_Str\");\n }\n for (Vertex<String> vertex : graph.getVertices()) {\n vertex.setLabel(vertex.getLabel() + \"String_Node_Str\");\n }\n }\n for (int i = startLabel; i < currentLabel; i++) {\n Bucket<Vertex<String>> bucketV = bucketsV.get(Integer.toString(i));\n for (Vertex<String> vertex : bucketV.getContents()) {\n vertex.setLabel(vertex.getLabel() + bucketV.getLabel());\n }\n Bucket<Edge<String>> bucketE = bucketsE.get(Integer.toString(i));\n for (Edge<String> edge : bucketE.getContents()) {\n edge.setLabel(edge.getLabel() + bucketE.getLabel());\n }\n }\n}\n"
|
"public Instruction nextInstruction(boolean blocking) throws GuacamoleException {\n try {\n do {\n if (usedLength > buffer.length / 2) {\n char[] newbuffer = new char[buffer.length * 2];\n System.arraycopy(newbuffer, 0, buffer, 0, usedLength);\n buffer = newbuffer;\n }\n int numRead = input.read(buffer, usedLength, buffer.length - usedLength);\n if (numRead == -1)\n return null;\n int prevLength = usedLength;\n usedLength += numRead;\n for (int i = usedLength - 1; i >= prevLength; i--) {\n char readChar = buffer[i];\n if (readChar == ';') {\n final String instruction = new String(buffer, 0, i + 1);\n usedLength -= i + 1;\n System.arraycopy(buffer, i + 1, buffer, 0, usedLength);\n return new Instruction() {\n public String toString() {\n return instruction;\n }\n };\n }\n }\n }\n } catch (IOException e) {\n throw new GuacamoleException(e);\n }\n return null;\n}\n"
|
"public void paste() {\n Clipboard clipboard = java.awt.Toolkit.getDefaultToolkit().getSystemClipboard();\n Transferable transferable = clipboard.getContents(this);\n GraphModel model = _getGraphModel();\n if (transferable == null)\n return;\n try {\n NamedObj container = (NamedObj) model.getRoot();\n StringBuffer moml = new StringBuffer();\n moml.append(\"String_Node_Str\");\n moml.append(offsetPastedMomlLocation((String) transferable.getTransferData(DataFlavor.stringFlavor), 10, 10));\n moml.append(\"String_Node_Str\");\n MoMLChangeRequest change = new MoMLChangeRequest(this, container, moml.toString());\n change.setUndoable(true);\n container.requestChange(change);\n } catch (Exception ex) {\n MessageHandler.error(\"String_Node_Str\", ex);\n }\n}\n"
|
"public Document createDocument() throws XMLPlatformException {\n try {\n DocumentBuilder documentBuilder = getDocumentBuilderFactory().newDocumentBuilder();\n return documentBuilder.newDocument();\n } catch (Exception e) {\n throw XMLPlatformException.xmlPlatformCouldNotCreateDocument(e);\n }\n}\n"
|
"public synchronized void updateAccountInfo(final User u, final OAuthToken otoken) {\n if (DEBUG) {\n Log.d(\"String_Node_Str\", \"String_Node_Str\");\n }\n userId = u.id;\n userScreenName = u.screenName;\n Editor editor = sp.edit();\n editor.putString(getString(R.string.option_userid), u.id);\n editor.putString(getString(R.string.option_username), u.screenName);\n editor.putString(getString(R.string.option_profile_image), u.profileImageUrl);\n editor.putString(getString(R.string.option_oauth_token), token.getToken());\n editor.putString(getString(R.string.option_oauth_token_secret), token.getTokenSecret());\n editor.commit();\n}\n"
|
"public void save(File baseDir, Set<WharfResolverMetadata> wharfResolverMetadatas) {\n File resolversFile = new File(baseDir, RESOLVERS_FILE_PATH);\n OutputStream stream = null;\n try {\n stream = new FileOutputStream(resolversFile);\n ObjectBuffer buffer = KryoFactory.createWharfResolverObjectBuffer(WharfResolverMetadata.class);\n buffer.writeObject(stream, wharfResolverMetadatas);\n } catch (IOException e) {\n throw new RuntimeException(e);\n } finally {\n if ((stream != null)) {\n try {\n stream.close();\n } catch (IOException e) {\n }\n }\n }\n}\n"
|
"private void addDelegates(CtClass target) throws NotFoundException, CannotCompileException {\n CtMethod[] modelMethods = modelClass.getDeclaredMethods();\n CtMethod[] targetMethods = target.getDeclaredMethods();\n for (CtMethod method : modelMethods) {\n if (Modifier.PRIVATE == method.getModifiers()) {\n continue;\n }\n CtMethod newMethod = CtNewMethod.delegator(method, target);\n if (!targetHasMethod(targetMethods, newMethod)) {\n target.addMethod(newMethod);\n } else {\n System.out.println(\"String_Node_Str\" + newMethod.getName() + \"String_Node_Str\");\n }\n }\n}\n"
|
"public static MapRewritePolicy createPolicy(String mode, KeyValuePair[] pairs) {\n Mode op;\n if (mode == null) {\n op = Mode.Add;\n } else {\n op = Mode.valueOf(mode);\n if (op == null) {\n LOGGER.error(\"String_Node_Str\" + mode);\n return null;\n }\n }\n if (pairs == null || pairs.length == 0) {\n logger.error(\"String_Node_Str\");\n return null;\n }\n Map<String, String> map = new HashMap<String, String>();\n for (KeyValuePair pair : pairs) {\n String key = pair.getKey();\n if (key == null) {\n logger.error(\"String_Node_Str\");\n continue;\n }\n String value = pair.getValue();\n if (value == null) {\n logger.error(\"String_Node_Str\" + key + \"String_Node_Str\");\n continue;\n }\n map.put(pair.getKey(), pair.getValue());\n }\n if (map.size() == 0) {\n logger.error(\"String_Node_Str\");\n return null;\n }\n return new MapRewritePolicy(map, op);\n}\n"
|
"public boolean transferOutputs(IOPort port) throws IllegalActionException {\n boolean result = false;\n for (int i = 0; i < port.getWidthInside(); i++) {\n try {\n while (port.isKnownInside(i) && port.hasTokenInside(i)) {\n Token t = port.getInside(i);\n if (_isAssociatedWithNetworkTransmitter(port)) {\n MetroIIPtidesDirector director = (MetroIIPtidesDirector) ((MetroIICompositeActor) ((MirrorPort) port).getAssociatedPort().getContainer()).getDirector();\n Object[] timestamps = ((MetroIIPtidesPort) ((MirrorPort) port).getAssociatedPort()).getTimeStampForToken(t);\n Time timestamp = (Time) timestamps[0];\n Time sourceTimestamp = (Time) timestamps[1];\n Token[] values = new Token[] { new DoubleToken(timestamp.getDoubleValue()), new IntToken(director.getMicrostep()), t, new DoubleToken(sourceTimestamp.getDoubleValue()) };\n RecordToken record = new RecordToken(PtidesNetworkType.LABELS, values);\n try {\n ((MirrorPort) port).send(i, record);\n } catch (IllegalActionException ex) {\n throw new IllegalActionException(this, ex.getMessage());\n }\n } else {\n ((MirrorPort) port).send(i, t);\n }\n }\n result = true;\n } catch (NoTokenException ex) {\n throw new InternalErrorException(this, ex, null);\n }\n }\n return result;\n}\n"
|
"protected void runOneIteration() throws Exception {\n Log.debug(\"String_Node_Str\", reapFutures.size());\n if (reapFutures.size() < 1) {\n return;\n }\n for (Future<MetricResponse.Status> future : reapFutures) {\n try {\n Await.ready(future, Duration.parse(\"String_Node_Str\"));\n } catch (TimeoutException e) {\n future.failed();\n }\n if (future.isCompleted()) {\n futureList.remove(future);\n }\n }\n}\n"
|
"public void translateFromRow(Row row, Object entity) {\n byte[] rowKey = row.getKey();\n Object value = converter.convertFromNoSql(rowKey);\n ReflectionUtil.putFieldValue(entity, field, value);\n}\n"
|
"public Drawable getDrawable(String name, int density, boolean tileX, boolean tileY, int scaleToWidth, int scaleToHeight, boolean eternal, int forceDensity) {\n String densityPath = getPath(name, density);\n String commonPath = getPath(name);\n CacheableDrawable drawable = cache.get(densityPath + name);\n if (drawable == null) {\n drawable = cache.get(commonPath);\n }\n if (drawable != null && !drawable.isRecycled()) {\n return drawable;\n }\n InputStream in = null;\n try {\n ClassLoader loader = null;\n if (classLoaderProvider != null) {\n loader = classLoaderProvider.getClassLoader();\n } else {\n loader = Drawables.class.getClassLoader();\n }\n String path = densityPath;\n in = loader.getResourceAsStream(path);\n if (in == null) {\n if (logger != null && logger.isInfoEnabled()) {\n logger.info(\"String_Node_Str\" + path + \"String_Node_Str\");\n }\n path = commonPath;\n in = loader.getResourceAsStream(path);\n }\n if (in != null) {\n drawable = createDrawable(in, path, tileX, tileY, scaleToWidth, scaleToHeight, forceDensity);\n addToCache(path, drawable, eternal);\n } else {\n if (logger != null && logger.isWarnEnabled()) {\n logger.warn(\"String_Node_Str\" + path + \"String_Node_Str\");\n }\n }\n return drawable;\n } finally {\n if (in != null) {\n try {\n in.close();\n } catch (IOException ignore) {\n ignore.printStackTrace();\n }\n }\n }\n}\n"
|
"private void extractVariables() {\n try {\n Attribute at = applicationRoot.attribute(Constants.APPLICATION_NAME_ATTRIBUTE);\n if (at != null) {\n nameWithNamePath = at.getText();\n String[] stlist = nameWithNamePath.split(\"String_Node_Str\");\n name = stlist[stlist.length - 1];\n } else {\n log.debug(\"String_Node_Str\");\n name = \"String_Node_Str\";\n nameWithNamePath = \"String_Node_Str\";\n }\n Element elem = settings.getSubChild(Constants.SETTINGS_APPLICATION_INSTANCE_ID_LEAF);\n if (elem != null && !elem.getText().isEmpty()) {\n applicationId = elem.getText();\n } else {\n applicationId = null;\n }\n } catch (Exception e) {\n log.debug(\"String_Node_Str\" + e);\n throw new IOFailure(\"String_Node_Str\" + e);\n }\n}\n"
|
"public void addFolder(final String name) {\n ContentValues values = new ContentValues();\n values.put(DataContract.FoldersEntry.COLUMN_FOLDER_NAME, name);\n App.getAppContext().getContentResolver().insert(DataContract.FoldersEntry.CONTENT_URI, values);\n}\n"
|
"public ValidationErrors validate(Database database) {\n try {\n return customChange.validate(database);\n } catch (AbstractMethodError e) {\n return new ValidationErrors();\n }\n}\n"
|
"public static void addChecker(Check c) {\n checks.add(c);\n cB = new Phaser();\n cB.register();\n c.init(status, cB);\n}\n"
|
"public int run(String[] args) throws Exception {\n long startTime = System.currentTimeMillis() / 1000L;\n for (int i = 0; i < args.length; i++) {\n System.out.println(i + \"String_Node_Str\" + args[i]);\n }\n if (args.length < 2) {\n System.err.printf(\"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\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", getClass().getSimpleName());\n ToolRunner.printGenericCommandUsage(System.err);\n return -1;\n }\n int d = Integer.parseInt(args[0]);\n boolean is2D = (Integer.parseInt(args[1]) < 3);\n int iter = d;\n if (!is2D) {\n iter = d * d;\n }\n boolean isPaired = (Integer.parseInt(args[2]) == 2);\n iter = 1;\n for (int i = 0; i < iter; i++) {\n System.out.println(\"String_Node_Str\" + i);\n JobConf conf = getJobInstance(i, isPaired);\n FileSystem fs = FileSystem.get(conf);\n conf.setInt(\"String_Node_Str\", d);\n conf.setInt(\"String_Node_Str\", i);\n int outputIndex = 4;\n if (isPaired) {\n MultipleInputs.addInputPath(conf, new Path(args[4]), KeyValueTextInputFormat.class, FFMapper.class);\n MultipleInputs.addInputPath(conf, new Path(args[5]), KeyValueTextInputFormat.class, FFMapperPaired.class);\n outputIndex = 6;\n } else {\n FileInputFormat.addInputPath(conf, new Path(args[4]));\n outputIndex = 5;\n }\n conf.setStrings(\"String_Node_Str\", args[outputIndex]);\n if (args.length > outputIndex + 1) {\n conf.setStrings(\"String_Node_Str\", args[outputIndex + 1]);\n } else {\n conf.setStrings(\"String_Node_Str\", \"String_Node_Str\");\n }\n RunningJob job = JobClient.runJob(conf);\n }\n long endTime = System.currentTimeMillis() / 1000L;\n BufferedWriter timeResults = new BufferedWriter(new FileWriter(\"String_Node_Str\" + \"String_Node_Str\" + args[3] + \"String_Node_Str\", true));\n ;\n timeResults.write(startTime + \"String_Node_Str\" + endTime + \"String_Node_Str\" + (endTime - startTime) + \"String_Node_Str\");\n timeResults.close();\n return 0;\n}\n"
|
"public String getClusterBalancerMap() {\n if (clusterContext == null) {\n return \"String_Node_Str\";\n }\n CollectionsFactory factory = clusterContext.getCollectionsFactory();\n Map<String, Collection<String>> balancers = factory.getMap(HttpBalancerService.BALANCER_MAP_NAME);\n if ((balancers == null) || balancers.isEmpty()) {\n return \"String_Node_Str\";\n }\n JSONObject jsonObj = new JSONObject();\n try {\n for (URI uri : balancers.keySet()) {\n Collection<URI> balancees = balancers.get(uri);\n if (balancees != null && balancees.size() > 0) {\n JSONArray jsonArray = new JSONArray();\n for (URI balanceeURI : balancees) {\n jsonArray.put(balanceeURI.toString());\n }\n jsonObj.put(uri.toString(), jsonArray);\n } else {\n jsonObj.put(uri.toString(), JSONObject.NULL);\n }\n }\n } catch (JSONException ex) {\n throw new RuntimeException(\"String_Node_Str\");\n }\n return jsonObj.toString();\n}\n"
|
"public void setDate_created_gmt(long dateCreatedGmt) {\n this.dateCreatedGmt = dateCreatedGmt;\n}\n"
|
"public void formatTo(final StringBuilder buffer) {\n if (formattedMessage != null) {\n buffer.append(formattedMessage);\n } else {\n if (indices[0] < 0) {\n ParameterFormatter.formatMessage(buffer, messagePattern, argArray, usedCount);\n } else {\n ParameterFormatter.formatMessage2(buffer, messagePattern, argArray, argArray == null ? 0 : argArray.length, indices);\n }\n }\n}\n"
|
"public SqlElasticPoolImpl withTags(Map<String, String> tags) {\n this.inner().withTags(new HashMap<>(tags));\n return this;\n}\n"
|
"public Response getJson(String subject, List<String> slabels, List<String> sAltLabels, String object, List<String> olabels, List<String> oAltLabels, String property, String from, String to, List<String> languages) {\n DefactoServer.log.log(Level.INFO, \"String_Node_Str\" + subject + \"String_Node_Str\" + property + \"String_Node_Str\" + object + \"String_Node_Str\");\n if (olabels != null && slabels != null)\n DefactoServer.log.log(Level.INFO, \"String_Node_Str\" + slabels + \"String_Node_Str\" + property + \"String_Node_Str\" + olabels + \"String_Node_Str\");\n try {\n org.apache.log4j.PropertyConfigurator.configure(\"String_Node_Str\");\n Defacto.init();\n Model model = ModelFactory.createDefaultModel();\n Resource subj = model.createResource(subject);\n for (String labelToLang : slabels) {\n String label = labelToLang.substring(0, labelToLang.length() - 3);\n String lang = labelToLang.substring(labelToLang.length() - 2);\n subj.addProperty(RDFS.label, label, lang);\n }\n for (String altLabel : sAltLabels) {\n String label = altLabel.substring(0, altLabel.length() - 3);\n String lang = altLabel.substring(altLabel.length() - 2);\n subj.addProperty(Constants.SKOS_ALT_LABEL, label, lang);\n }\n Resource obj = model.createResource(object);\n for (String labelToLang : olabels) {\n String label = labelToLang.substring(0, labelToLang.length() - 3);\n String lang = labelToLang.substring(labelToLang.length() - 2);\n obj.addProperty(RDFS.label, label, lang);\n }\n for (String altLabel : oAltLabels) {\n String label = altLabel.substring(0, altLabel.length() - 3);\n String lang = altLabel.substring(altLabel.length() - 2);\n obj.addProperty(Constants.SKOS_ALT_LABEL, label, lang);\n }\n Resource bnode = model.createResource(\"String_Node_Str\");\n subj.addProperty(ResourceFactory.createProperty(\"String_Node_Str\"), bnode);\n bnode.addProperty(model.createProperty(property), obj);\n bnode.addProperty(Constants.DEFACTO_FROM, from == null ? \"String_Node_Str\" : from);\n bnode.addProperty(Constants.DEFACTO_TO, to == null ? \"String_Node_Str\" : to);\n Evidence ev = Defacto.checkFact(new DefactoModel(model, subject + \"String_Node_Str\" + property + \"String_Node_Str\" + object, true, languages), Defacto.TIME_DISTRIBUTION_ONLY.YES);\n JSONObject result = new JSONObject();\n result.put(\"String_Node_Str\", subject);\n result.put(\"String_Node_Str\", StringUtils.join(slabels, \"String_Node_Str\"));\n result.put(\"String_Node_Str\", property);\n result.put(\"String_Node_Str\", object);\n result.put(\"String_Node_Str\", StringUtils.join(olabels, \"String_Node_Str\"));\n result.put(\"String_Node_Str\", from == null ? \"String_Node_Str\" : from);\n result.put(\"String_Node_Str\", to == null ? \"String_Node_Str\" : to);\n buildYearOccurrences(result, ev);\n return Response.ok(result.toString()).header(\"String_Node_Str\", \"String_Node_Str\").build();\n } catch (Exception e) {\n DefactoServer.log.log(Level.WARNING, \"String_Node_Str\" + subject + \"String_Node_Str\" + property + \"String_Node_Str\" + object + \"String_Node_Str\");\n DefactoServer.log.log(Level.WARNING, e.getMessage());\n e.printStackTrace();\n }\n return Response.serverError().build();\n}\n"
|
"public String methodBody() {\n if (_construct) {\n StringBuffer sb = new StringBuffer();\n if (_superParams > 0) {\n Iterator argsItr = _superArgs.listIterator();\n sb.append(ident + ident);\n sb.append(\"String_Node_Str\");\n for (int i = 0; i < _superParams; i++) {\n sb.append((String) argsItr.next());\n if (i < (_superParams - 1)) {\n sb.append(\"String_Node_Str\");\n }\n }\n sb.append(\"String_Node_Str\");\n }\n if (_defConstruct) {\n Iterator typeItr = _paramTypes.listIterator();\n Iterator nameItr = _paramNames.listIterator();\n Iterator varPlaceItr = _varPlacements.listIterator();\n int varCount = 0;\n do {\n String typeStr = (String) typeItr.next();\n String nameStr = (String) nameItr.next();\n char placement = ((Character) varPlaceItr.next()).charValue();\n if (varCount >= _superParams) {\n sb.append(ident);\n sb.append(ident);\n switch(placement) {\n case 'l':\n sb.append(\"String_Node_Str\");\n sb.append(nameStr);\n sb.append(\"String_Node_Str\");\n break;\n case 'm':\n case 'h':\n sb.append('_');\n sb.append(nameStr);\n sb.append(\"String_Node_Str\");\n sb.append(nameStr);\n sb.append(';');\n break;\n case 'p':\n sb.append(\"String_Node_Str\");\n sb.append(nameStr);\n sb.append(\"String_Node_Str\");\n sb.append(_wrapPrimitive(typeStr, nameStr));\n sb.append(\"String_Node_Str\");\n break;\n case 'n':\n break;\n default:\n throw new RuntimeException(\"String_Node_Str\");\n }\n if (typeItr.hasNext()) {\n sb.append('\\n');\n }\n }\n varCount++;\n } while (typeItr.hasNext());\n }\n return sb.toString();\n }\n if (_methodBody != null) {\n return ident + ident + _methodBody;\n }\n if (_returnType.equals(\"String_Node_Str\") || _returnType.equals(\"String_Node_Str\")) {\n return \"String_Node_Str\";\n }\n if (_returnType.equals(\"String_Node_Str\")) {\n return ident + ident + \"String_Node_Str\";\n }\n if (_returnType.equals(\"String_Node_Str\") || _returnType.equals(\"String_Node_Str\") || _returnType.equals(\"String_Node_Str\")) {\n return ident + ident + \"String_Node_Str\";\n }\n if (_returnType.equals(\"String_Node_Str\")) {\n return ident + ident + \"String_Node_Str\";\n }\n if (_returnType.equals(\"String_Node_Str\")) {\n return ident + ident + \"String_Node_Str\";\n }\n if (_returnType.equals(\"String_Node_Str\")) {\n return ident + ident + \"String_Node_Str\";\n }\n if (_returnType.equals(\"String_Node_Str\")) {\n return ident + ident + \"String_Node_Str\";\n }\n return ident + ident + \"String_Node_Str\";\n}\n"
|
"public void testBoxedGetSet() {\n facet.set(0, 1, 3, Integer.valueOf(4));\n Assert.assertEquals(Integer.valueOf(4), facet.get(0, 1, 3));\n}\n"
|
"public FlowProvider createFlowProvider(String aDbId, final String aEntityId, String aSqlClause, final Fields aExpectedFields, Set<String> aReadRoles, Set<String> aWriteRoles) throws Exception {\n if (JAVASCRIPT_QUERY_CONTENTS.equals(aSqlClause)) {\n JSObject dataFeeder = createModule(aEntityId);\n if (dataFeeder != null) {\n return new PlatypusScriptedFlowProvider(ScriptedDatabasesClient.this, aExpectedFields, dataFeeder);\n } else {\n throw new IllegalStateException(\"String_Node_Str\" + aEntityId + \"String_Node_Str\");\n }\n } else {\n return super.createFlowProvider(aDbId, aEntityId, aSqlClause, aExpectedFields, aReadRoles, aWriteRoles);\n }\n}\n"
|
"public void initialize() throws IOException {\n SettingsManager settingsManager = SettingsManager.instance();\n String expectString;\n if (isOutgoing()) {\n _socket = new Socket(_host, _port);\n expectString = settingsManager.getConnectString();\n } else {\n expectString = settingsManager.getConnectStringRemainder();\n }\n if (_closed) {\n _socket.close();\n throw new IOException();\n }\n try {\n _in = new BufferedInputStream(_socket.getInputStream());\n _out = new BufferedOutputStream(_socket.getOutputStream());\n sendString(expectString + \"String_Node_Str\");\n expectString(settingsManager.getConnectOkString() + \"String_Node_Str\");\n } catch (IOException e) {\n _socket.close();\n throw e;\n }\n}\n"
|
"private boolean restoreRecentTaskLocked(TaskRecord task, int stackId) {\n if (stackId == INVALID_STACK_ID) {\n stackId = task.getLaunchStackId();\n } else if (stackId == DOCKED_STACK_ID && !task.canGoInDockedStack()) {\n stackId = FULLSCREEN_WORKSPACE_STACK_ID;\n }\n if (task.stack != null) {\n if (task.stack.mStackId == stackId) {\n return true;\n }\n task.stack.removeTask(task, \"String_Node_Str\", REMOVE_TASK_MODE_MOVING);\n }\n final ActivityStack stack = getStack(stackId, CREATE_IF_NEEDED, !ON_TOP);\n if (stack == null) {\n if (DEBUG_RECENTS)\n Slog.v(TAG_RECENTS, \"String_Node_Str\" + task);\n return false;\n }\n stack.addTask(task, false, \"String_Node_Str\");\n if (DEBUG_RECENTS)\n Slog.v(TAG_RECENTS, \"String_Node_Str\" + task + \"String_Node_Str\" + stack);\n final ArrayList<ActivityRecord> activities = task.mActivities;\n for (int activityNdx = activities.size() - 1; activityNdx >= 0; --activityNdx) {\n stack.addConfigOverride(activities.get(activityNdx), task);\n }\n return true;\n}\n"
|
"public void writeDataFormat(StyleEntry style) {\n if (style.getProperty(StyleConstant.DATA_TYPE_PROP) == Data.DATE && style.getProperty(StyleConstant.DATE_FORMAT_PROP) != null) {\n writer.openTag(\"String_Node_Str\");\n writer.attribute(\"String_Node_Str\", style.getProperty(StyleConstant.DATE_FORMAT_PROP));\n writer.closeTag(\"String_Node_Str\");\n }\n if (style.getDatatype() == Data.STRING && style.getProperty(StyleConstant.STRING_FORMAT_PROP) != null) {\n writer.openTag(\"String_Node_Str\");\n writer.attribute(\"String_Node_Str\", style.getProperty(StyleConstant.STRING_FORMAT_PROP));\n writer.closeTag(\"String_Node_Str\");\n }\n if (style.getDatatype() == Data.NUMBER && style.getProperty(StyleConstant.NUMBER_FORMAT_PROP) != null) {\n writer.openTag(\"String_Node_Str\");\n writer.attribute(\"String_Node_Str\", style.getProperty(StyleConstant.NUMBER_FORMAT_PROP));\n writer.closeTag(\"String_Node_Str\");\n }\n}\n"
|
"public DataSerializableFactory createFactory() {\n ConstructorFunction<Integer, IdentifiedDataSerializable>[] constructors = new ConstructorFunction[LEN];\n constructors[KEY_VALUE_SOURCE_MAP] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {\n public IdentifiedDataSerializable createNew(Integer arg) {\n return new MapKeyValueSource();\n }\n };\n constructors[KEY_VALUE_SOURCE_MULTIMAP] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {\n public IdentifiedDataSerializable createNew(Integer arg) {\n return new MultiMapKeyValueSource();\n }\n };\n constructors[REDUCER_CHUNK_MESSAGE] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {\n public IdentifiedDataSerializable createNew(Integer arg) {\n return new IntermediateChunkNotification();\n }\n };\n constructors[REDUCER_LAST_CHUNK_MESSAGE] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {\n public IdentifiedDataSerializable createNew(Integer arg) {\n return new LastChunkNotification();\n }\n };\n constructors[TRACKED_JOB_OPERATION] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {\n public IdentifiedDataSerializable createNew(Integer arg) {\n return new KeyValueJobOperation();\n }\n };\n constructors[REQUEST_PARTITION_PROCESSING] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {\n public IdentifiedDataSerializable createNew(Integer arg) {\n return new RequestPartitionProcessing();\n }\n };\n constructors[REQUEST_PARTITION_PROCESSED] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {\n public IdentifiedDataSerializable createNew(Integer arg) {\n return new RequestPartitionProcessed();\n }\n };\n constructors[REDUCER_RESULT_OPERATION] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {\n\n public IdentifiedDataSerializable createNew(Integer arg) {\n return new ReducerResultNotification();\n }\n };\n constructors[CLIENT_MAP_REDUCE_REQUEST] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {\n public IdentifiedDataSerializable createNew(Integer arg) {\n return new ClientMapReduceRequest();\n }\n };\n return new ArrayDataSerializableFactory(constructors);\n}\n"
|
"public final boolean isNumber() {\n return isSubtype(getNativeType(JSTypeNative.NUMBER_VALUE_OR_OBJECT_TYPE));\n}\n"
|
"public Node getCDATA(Node container) {\n int start = 0;\n int nested = 0;\n CDataState state = CDataState.INTERMEDIATE;\n int c;\n boolean isEmpty = true;\n boolean matches = false;\n boolean hasSrc = container.getAttrById(AttrId.SRC) != null;\n this.lines = this.in.getCurline();\n this.columns = this.in.getCurcol();\n this.waswhite = false;\n this.txtstart = this.lexsize;\n this.txtend = this.lexsize;\n lastc = '\\0';\n start = -1;\n while ((c = this.in.readChar()) != StreamIn.END_OF_STREAM) {\n if (qt > 0) {\n if ((c == '\\r' || c == '\\n' || c == qt) && (!TidyUtils.toBoolean(esc) || lastc != esc)) {\n qt = 0;\n } else if (c == '/' && lastc == '<') {\n start = this.lexsize + 1;\n } else if (c == '>' && start >= 0) {\n len = this.lexsize - start;\n this.lines = this.in.getCurline();\n this.columns = this.in.getCurcol() - 3;\n report.warning(this, null, null, Report.BAD_CDATA_CONTENT);\n if (TidyUtils.toBoolean(esc)) {\n for (i = this.lexsize; i > start - 1; --i) {\n this.lexbuf[i] = this.lexbuf[i - 1];\n }\n this.lexbuf[start - 1] = (byte) esc;\n this.lexsize++;\n }\n start = -1;\n }\n } else if (TidyUtils.isQuote(c) && (!TidyUtils.toBoolean(esc) || lastc != esc)) {\n qt = c;\n } else if (c == '<') {\n start = this.lexsize + 1;\n endtag = false;\n begtag = true;\n } else if (c == '!' && lastc == '<') {\n start = -1;\n endtag = false;\n begtag = false;\n } else if (c == '/' && lastc == '<') {\n start = this.lexsize + 1;\n endtag = true;\n begtag = false;\n } else if (c == '>' && start >= 0) {\n int decr = 2;\n if (endtag && ((len = this.lexsize - start) == container.element.length())) {\n str = TidyUtils.getString(this.lexbuf, start, len);\n if (container.element.equalsIgnoreCase(str)) {\n this.txtend = start - decr;\n this.lexsize = start - decr;\n break;\n }\n }\n this.lines = this.in.getCurline();\n this.columns = this.in.getCurcol() - 3;\n report.warning(this, null, null, Report.BAD_CDATA_CONTENT);\n if (begtag) {\n decr = 1;\n }\n this.txtend = start - decr;\n this.lexsize = start - decr;\n break;\n } else if (c == '\\r') {\n if (begtag || endtag) {\n continue;\n }\n c = this.in.readChar();\n if (c != '\\n') {\n this.in.ungetChar(c);\n }\n c = '\\n';\n } else if ((c == '\\n' || c == '\\t' || c == ' ') && (begtag || endtag)) {\n continue;\n }\n addCharToLexer(c);\n this.txtend = this.lexsize;\n lastc = c;\n }\n if (c == StreamIn.END_OF_STREAM) {\n report.warning(this, container, null, Report.MISSING_ENDTAG_FOR);\n }\n if (this.txtend > this.txtstart) {\n this.token = newNode(NodeType.TextNode, this.lexbuf, this.txtstart, this.txtend);\n return this.token;\n }\n return null;\n}\n"
|
"public static int ezlist(Player player, String[] args) {\n if (!player.canUseCommand(\"String_Node_Str\"))\n return EXIT_FAIL;\n if (!vMinecraftSettings.getInstance().cmdEzModo())\n return EXIT_FAIL;\n player.sendMessage(\"String_Node_Str\" + vMinecraftSettings.getInstance().ezModoList());\n return EXIT_SUCCESS;\n}\n"
|
"private void initColumnNames() {\n try {\n columns = ((DataSetEditor) this.getContainer()).getCurrentItemModel(true);\n if (columns != null) {\n columnExpressions = new String[columns.length];\n for (int n = 0; n < columns.length; n++) {\n columnExpressions[n] = columns[n].getName();\n }\n }\n } catch (BirtException e) {\n DataSetExceptionHandler.handle(e);\n }\n}\n"
|
"public void perform(final GraphRewrite event, EvaluationContext context) {\n ExecutionStatistics.get().begin(\"String_Node_Str\");\n try {\n WindupJavaConfigurationService windupJavaConfigurationService = new WindupJavaConfigurationService(event.getGraphContext());\n final WindupJavaConfigurationModel javaConfiguration = WindupJavaConfigurationService.getJavaConfigurationModel(event.getGraphContext());\n final boolean classNotFoundAnalysisEnabled = javaConfiguration.isClassNotFoundAnalysisEnabled();\n GraphService<JavaSourceFileModel> service = new GraphService<>(event.getGraphContext(), JavaSourceFileModel.class);\n Iterable<JavaSourceFileModel> allJavaSourceModels = service.findAll();\n final Set<Path> allSourceFiles = new TreeSet<>();\n Set<String> sourcePaths = new HashSet<>();\n for (JavaSourceFileModel javaFile : allJavaSourceModels) {\n FileModel rootSourceFolder = javaFile.getRootSourceFolder();\n if (rootSourceFolder != null) {\n sourcePaths.add(rootSourceFolder.getFilePath());\n }\n if (windupJavaConfigurationService.shouldScanPackage(javaFile.getPackageName())) {\n Path path = Paths.get(javaFile.getFilePath());\n allSourceFiles.add(path);\n sourcePathToFileModel.put(path, javaFile);\n }\n }\n GraphService<JarArchiveModel> libraryService = new GraphService<>(event.getGraphContext(), JarArchiveModel.class);\n Iterable<JarArchiveModel> libraries = libraryService.findAll();\n Set<String> libraryPaths = new HashSet<>();\n WindupConfigurationModel configurationModel = WindupConfigurationService.getConfigurationModel(event.getGraphContext());\n for (TechnologyReferenceModel target : configurationModel.getTargetTechnologies()) {\n TechnologyMetadata technologyMetadata = technologyMetadataProvider.getMetadata(event.getGraphContext(), new TechnologyReference(target));\n if (technologyMetadata != null && technologyMetadata instanceof JavaTechnologyMetadata) {\n JavaTechnologyMetadata javaMetadata = (JavaTechnologyMetadata) technologyMetadata;\n for (Path additionalClasspath : javaMetadata.getAdditionalClasspaths()) libraryPaths.add(additionalClasspath.toString());\n }\n }\n for (FileModel additionalClasspath : javaConfiguration.getAdditionalClasspaths()) {\n libraryPaths.add(additionalClasspath.getFilePath());\n }\n for (JarArchiveModel library : libraries) {\n if (library.getUnzippedDirectory() != null) {\n libraryPaths.add(library.getUnzippedDirectory().getFilePath());\n } else {\n libraryPaths.add(library.getFilePath());\n }\n }\n ExecutionStatistics.get().begin(\"String_Node_Str\");\n try {\n WindupWildcardImportResolver.setContext(event.getGraphContext());\n final BlockingQueue<Pair<Path, List<ClassReference>>> processedPaths = new ArrayBlockingQueue<>(ANALYSIS_QUEUE_SIZE);\n final Set<Path> failedPaths = Sets.getConcurrentSet();\n BatchASTListener listener = new BatchASTListener() {\n public void processed(Path filePath, List<ClassReference> references) {\n try {\n processedPaths.put(new ImmutablePair<>(filePath, filterClassReferences(references)));\n } catch (InterruptedException e) {\n throw new WindupException(e.getMessage(), e);\n }\n }\n public void failed(Path filePath, Throwable cause) {\n LOG.log(Level.WARNING, \"String_Node_Str\" + filePath + \"String_Node_Str\" + cause.getMessage(), cause);\n failedPaths.add(filePath);\n }\n };\n Set<Path> filesToProcess = new TreeSet<>(allSourceFiles);\n BatchASTFuture future = BatchASTProcessor.analyze(listener, importResolver, libraryPaths, sourcePaths, filesToProcess);\n ProgressEstimate estimate = new ProgressEstimate(filesToProcess.size());\n while (!future.isDone() || !processedPaths.isEmpty()) {\n if (processedPaths.size() > (ANALYSIS_QUEUE_SIZE / 2))\n LOG.info(\"String_Node_Str\" + processedPaths.size() + \"String_Node_Str\" + ANALYSIS_QUEUE_SIZE);\n Pair<Path, List<ClassReference>> pair = processedPaths.poll(250, TimeUnit.MILLISECONDS);\n if (pair == null)\n continue;\n processReferences(event.getGraphContext(), pair.getKey(), pair.getValue());\n estimate.addWork(1);\n printProgressEstimate(event, estimate);\n if (estimate.getWorked() % COMMIT_INTERVAL == 0) {\n event.getGraphContext().getGraph().getBaseGraph().commit();\n }\n filesToProcess.remove(pair.getKey());\n }\n for (Path path : failedPaths) {\n ClassificationService classificationService = new ClassificationService(event.getGraphContext());\n JavaSourceFileModel sourceFileModel = getJavaSourceFileModel(event.getGraphContext(), path);\n classificationService.attachClassification(context, sourceFileModel, JavaSourceFileModel.UNPARSEABLE_JAVA_CLASSIFICATION, JavaSourceFileModel.UNPARSEABLE_JAVA_DESCRIPTION);\n }\n if (!filesToProcess.isEmpty()) {\n for (Path unprocessed : new ArrayList<>(filesToProcess)) {\n try {\n List<ClassReference> references = ASTProcessor.analyze(importResolver, libraryPaths, sourcePaths, unprocessed);\n processReferences(event.getGraphContext(), unprocessed, filterClassReferences(references));\n filesToProcess.remove(unprocessed);\n } catch (Exception e) {\n LOG.log(Level.WARNING, \"String_Node_Str\" + unprocessed + \"String_Node_Str\" + e.getMessage(), e);\n ClassificationService classificationService = new ClassificationService(event.getGraphContext());\n JavaSourceFileModel sourceFileModel = getJavaSourceFileModel(event.getGraphContext(), unprocessed);\n classificationService.attachClassification(context, sourceFileModel, JavaSourceFileModel.UNPARSEABLE_JAVA_CLASSIFICATION, JavaSourceFileModel.UNPARSEABLE_JAVA_DESCRIPTION);\n }\n estimate.addWork(1);\n printProgressEstimate(event, estimate);\n }\n }\n if (!filesToProcess.isEmpty()) {\n ClassificationService classificationService = new ClassificationService(event.getGraphContext());\n StringBuilder message = new StringBuilder();\n message.append(\"String_Node_Str\" + filesToProcess.size() + \"String_Node_Str\");\n for (Path unprocessed : filesToProcess) {\n JavaSourceFileModel sourceFileModel = getJavaSourceFileModel(event.getGraphContext(), unprocessed);\n message.append(\"String_Node_Str\" + unprocessed + \"String_Node_Str\");\n classificationService.attachClassification(context, sourceFileModel, JavaSourceFileModel.UNPARSEABLE_JAVA_CLASSIFICATION, JavaSourceFileModel.UNPARSEABLE_JAVA_DESCRIPTION);\n }\n LOG.warning(message.toString());\n }\n ExecutionStatistics.get().end(\"String_Node_Str\");\n } catch (Exception e) {\n LOG.log(Level.SEVERE, \"String_Node_Str\" + e.getMessage(), e);\n } finally {\n WindupWildcardImportResolver.setContext(null);\n }\n } finally {\n ExecutionStatistics.get().end(\"String_Node_Str\");\n }\n}\n"
|
"public synchronized boolean isValidWord(CharSequence word) {\n synchronized (mUpdatingLock) {\n if (mRequiresReload)\n startDictionaryLoadingTaskLocked();\n if (mUpdatingDictionary)\n return false;\n }\n return getWordFrequency(word) > -1;\n}\n"
|
"private void processEvents(NetData.NetMessage message) {\n boolean lagCompensated = false;\n PredictionSystem predictionSystem = CoreRegistry.get(PredictionSystem.class);\n for (NetData.EventMessage eventMessage : message.getEventList()) {\n Event event = eventSerializer.deserialize(eventMessage.getEvent());\n EventMetadata<?> metadata = entitySystemLibrary.getEventLibrary().getMetadata(event.getClass());\n if (metadata.getNetworkEventType() != NetworkEventType.SERVER) {\n logger.warn(\"String_Node_Str\", metadata, getName());\n continue;\n }\n if (!lagCompensated && metadata.isLagCompensated()) {\n if (predictionSystem != null) {\n predictionSystem.lagCompensate(getEntity(), lastReceivedTime);\n }\n lagCompensated = true;\n }\n EntityRef target = EntityRef.NULL;\n if (eventMessage.hasTargetId()) {\n target = networkSystem.getEntity(eventMessage.getTargetId());\n }\n if (target.exists()) {\n if (Objects.equal(networkSystem.getOwner(target), this)) {\n target.send(event);\n } else {\n logger.warn(\"String_Node_Str\", event, target, this);\n }\n }\n }\n if (lagCompensated && predictionSystem != null) {\n predictionSystem.restoreToPresent();\n }\n}\n"
|
"public List _getOpenContentPropertiesWithXMLRoots() {\n List returnList = new ArrayList();\n for (int i = 0, size = openContentProperties.size(); i < size; i++) {\n Property next = (Property) openContentProperties.get(i);\n XMLRoot root = new XMLRoot();\n String localName = ((SDOProperty) next).getXPath();\n if (next.getType() != null) {\n if (!next.getType().isDataType()) {\n String uri = ((SDOProperty) next).getUri();\n root.setNamespaceURI(uri);\n } else {\n String uri = getType().getURI();\n root.setNamespaceURI(uri);\n }\n }\n root.setLocalName(localName);\n Object value = get(next);\n if (next.isMany()) {\n for (int j = 0, sizel = ((List) value).size(); j < sizel; j++) {\n XMLRoot nextRoot = new XMLRoot();\n nextRoot.setNamespaceURI(root.getNamespaceURI());\n nextRoot.setLocalName(root.getLocalName());\n Object nextItem = ((List) value).get(j);\n if ((next.getType() != null) && (((SDOType) next.getType()).getXmlDescriptor() == null)) {\n nextItem = XMLConversionManager.getDefaultXMLManager().convertObject(nextItem, String.class);\n }\n nextRoot.setObject(nextItem);\n returnList.add(nextRoot);\n }\n } else {\n if ((next.getType() != null) && (((SDOType) next.getType()).getXmlDescriptor() == null)) {\n value = XMLConversionManager.getDefaultXMLManager().convertObject(value, String.class);\n }\n root.setObject(value);\n returnList.add(root);\n }\n }\n return returnList;\n}\n"
|
"public List<EngineHostVO> findLostHosts(long timeout) {\n TransactionLegacy txn = TransactionLegacy.currentTxn();\n PreparedStatement pstmt = null;\n List<EngineHostVO> result = new ArrayList<EngineHostVO>();\n String sql = \"String_Node_Str\";\n try (PreparedStatement pstmt = txn.prepareStatement(sql)) {\n pstmt.setLong(1, timeout);\n rs = pstmt.executeQuery();\n while (rs.next()) {\n long id = rs.getLong(1);\n result.add(findById(id));\n }\n } catch (Exception e) {\n s_logger.warn(\"String_Node_Str\", e);\n } finally {\n try {\n if (rs != null) {\n rs.close();\n }\n if (pstmt != null) {\n pstmt.close();\n }\n } catch (SQLException e) {\n }\n }\n return result;\n}\n"
|
"protected final void renderImpl(GLGraphics g, float w, float h) {\n g.save();\n switch(record.getLabel()) {\n case LEFT:\n w -= textWidth;\n g.move(textWidth, 0);\n break;\n case RIGHT:\n w -= textWidth;\n break;\n default:\n break;\n }\n switch(dimension.getLabel()) {\n case LEFT:\n h -= textWidth;\n g.move(0, textWidth);\n break;\n case RIGHT:\n h -= textWidth;\n break;\n default:\n break;\n }\n if (record.getLabel().show()) {\n final List<Integer> data = record.getData();\n final ISpacingLayout spacing = record.getSpacing();\n final EShowLabels label = record.getLabel();\n for (int i = 0; i < data.size(); ++i) {\n Integer recordID = data.get(i);\n float y = spacing.getPosition(i);\n float fieldHeight = spacing.getSize(i);\n float textHeight = Math.min(fieldHeight, MAX_TEXT_HEIGHT);\n String text = getLabel(EDimension.RECORD, recordID);\n if (label == EShowLabels.LEFT)\n g.drawText(text, -textWidth, y + (fieldHeight - textHeight) * 0.5f, textWidth - TEXT_OFFSET, textHeight, VAlign.RIGHT);\n else\n g.drawText(text, w + TEXT_OFFSET, y + (fieldHeight - textHeight) * 0.5f, textWidth - TEXT_OFFSET, textHeight, VAlign.LEFT);\n }\n }\n if (dimension.getLabel().show()) {\n final List<Integer> data = dimension.getData();\n final ISpacingLayout spacing = dimension.getSpacing();\n final EShowLabels label = dimension.getLabel();\n g.save();\n g.gl.glRotatef(-90, 0, 0, 1);\n for (int i = 0; i < data.size(); ++i) {\n Integer dimensionID = data.get(i);\n String l = getLabel(EDimension.DIMENSION, dimensionID);\n float x = spacing.getPosition(i);\n float fieldWidth = spacing.getSize(i);\n float textHeight = Math.min(fieldWidth, MAX_TEXT_HEIGHT);\n if (textHeight < 5)\n continue;\n if (label == EShowLabels.LEFT)\n g.drawText(l, TEXT_OFFSET, x + (fieldWidth - textHeight) * 0.5f, textWidth - TEXT_OFFSET, textHeight, VAlign.LEFT);\n else\n g.drawText(l, -h - textWidth, x + (fieldWidth - textHeight) * 0.5f, textWidth - TEXT_OFFSET, textHeight, VAlign.RIGHT);\n }\n g.restore();\n }\n renderAddons(g, w, h);\n renderer.render(g, w, h, record.getSpacing(), dimension.getSpacing());\n g.incZ();\n if (blurNotSelected) {\n renderBlurSelection(g, SelectionType.SELECTION, w, h);\n record.renderSelectionRects(g, SelectionType.MOUSE_OVER, w, h, true);\n dimension.renderSelectionRects(g, SelectionType.MOUSE_OVER, w, h, true);\n } else {\n record.render(g, SelectionType.SELECTION, w, h);\n dimension.render(g, SelectionType.SELECTION, w, h);\n record.render(g, SelectionType.MOUSE_OVER, w, h);\n dimension.render(g, SelectionType.MOUSE_OVER, w, h);\n }\n g.lineWidth(1);\n g.decZ();\n g.restore();\n}\n"
|
"void force() throws IOException {\n fileChannel.force(false);\n}\n"
|
"public boolean hasNextChild() {\n if (currentElement < totalElements) {\n return true;\n }\n if (endOfGroup) {\n return false;\n }\n while (!endOfGroup) {\n IResultSet rset = listingExecutor.getResultSet();\n GroupDesign groupDesign = (GroupDesign) getDesign();\n int endGroup = rset.getEndingGroupLevel();\n int groupLevel = groupDesign.getGroupLevel() + 1;\n if (endGroup <= groupLevel) {\n totalElements = 0;\n currentElement = 0;\n BandDesign footer = groupDesign.getFooter();\n if (footer != null) {\n executableElements[totalElements++] = footer;\n }\n endOfGroup = true;\n return currentElement < totalElements;\n }\n if (rset.next()) {\n collectExecutableElements();\n if (currentElement < totalElements) {\n return true;\n }\n }\n }\n return false;\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.