content
stringlengths 40
137k
|
---|
"private Route getRouteForJourney(JourneyHeaderElement journey) {\n AgencyAndId routeId = getRouteIdForJourney(journey);\n Route route = _dao.getRouteForId(routeId);\n if (route == null) {\n route = new Route();\n route.setAgency(getAgencyForId(routeId.getAgencyId()));\n route.setId(routeId);\n route.setShortName(journey.getRouteIdentifier());\n route.setType(getRouteTypeForJourney(journey));\n _dao.saveEntity(route);\n }\n return route;\n}\n"
|
"public void delete(final PropagationMode propagationMode, final ObjectClass objClass, final Uid uid, final OperationOptions options, final Set<String> triedPropagationRequests) {\n if (propagationMode == PropagationMode.SYNC ? capabitilies.contains(ConnectorCapability.SYNC_DELETE) : capabitilies.contains(ConnectorCapability.ASYNC_DELETE)) {\n triedPropagationRequests.add(\"String_Node_Str\");\n connector.delete(objClass, uid, options);\n }\n}\n"
|
"public void onStartSimplePollingClicked() {\n _setupLogger();\n _subscriptions.add(Observable.interval(INITIAL_DELAY, POLLING_INTERVAL, TimeUnit.MILLISECONDS).map(new Func1<Long, String>() {\n\n public void call(final Subscriber<? super String> subscriber) {\n Subscription subscription = _worker.schedulePeriodically(new Action0() {\n public void call() {\n subscriber.onNext(_doNetworkCallAndGetStringResult());\n }\n }, INITIAL_DELAY, POLLING_INTERVAL, TimeUnit.MILLISECONDS);\n subscriber.add(subscription);\n }\n }).take(10).subscribe(new Action1<String>() {\n public void call(String s) {\n _log(String.format(\"String_Node_Str\", s));\n }\n }));\n}\n"
|
"public void onResponse(Data valueData) {\n storeInNearCache(keyData, valueData, null, reservationId, false);\n if (statisticsEnabled) {\n handleStatisticsOnGet(start, valueData);\n }\n}\n"
|
"private void parseGroups(String groupsDef, PolicyDef def) {\n if (isDebugEnabled) {\n LOG.debug(\"String_Node_Str\");\n }\n String[] groups = groupsDef.split(\"String_Node_Str\");\n String[] groupAndRole = null;\n Map<String, List<AtlasActionTypes>> groupsMap = new HashMap<String, List<AtlasActionTypes>>();\n if (validateEntity(groupsDef.trim())) {\n for (String group : groups) {\n if (!Pattern.matches(\"String_Node_Str\", group)) {\n continue;\n }\n groupAndRole = group.split(\"String_Node_Str\");\n if (def.getGroups() != null) {\n groupsMap = def.getGroups();\n }\n List<AtlasActionTypes> groupAutorities = getListOfAutorities(groupAndRole[GROUP_AUTHORITIES]);\n groupsMap.put(groupAndRole[GROUPNAME], groupAutorities);\n def.setGroups(groupsMap);\n }\n } else {\n def.setGroups(groupsMap);\n }\n if (isDebugEnabled) {\n LOG.debug(\"String_Node_Str\");\n }\n}\n"
|
"public void append(K key, V value) {\n int index = mSize;\n final int hash = key.hashCode();\n if (index >= mHashes.length) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n if (index > 0 && mHashes[index - 1] > hash) {\n RuntimeException e = new RuntimeException(\"String_Node_Str\");\n e.fillInStackTrace();\n Log.w(TAG, \"String_Node_Str\" + hash + \"String_Node_Str\" + mHashes[index - 1] + \"String_Node_Str\" + index + \"String_Node_Str\" + key, e);\n put(key, value);\n return;\n }\n mSize = index + 1;\n mHashes[index] = hash;\n index <<= 1;\n mArray[index] = key;\n mArray[index + 1] = value;\n}\n"
|
"protected void updateEnabledGroupIndexes(Chart cm, List<IGroupDefinition> groupDefinitions) throws ChartException {\n faEnabledGroups = new boolean[fGroupCount];\n boolean isSharing = isSharing();\n EList<SeriesDefinition> baseSDs = ChartUtil.getBaseSeriesDefinitions(cm);\n for (SeriesDefinition sd : baseSDs) {\n if (sd.getDesignTimeSeries().getDataDefinition().isEmpty() || sd.getGrouping() == null || !sd.getGrouping().isEnabled()) {\n continue;\n }\n Query q = sd.getDesignTimeSeries().getDataDefinition().get(0);\n String expr = q.getDefinition();\n int index = getGroupIndex(expr, groupDefinitions, true);\n if (index >= 0) {\n faEnabledGroups[index] = true;\n if (isSharing && sd.getGrouping() != null) {\n IGroupDefinition gd = groupDefinitions.get(index);\n setGroupingInterval(sd.getGrouping(), gd);\n }\n }\n }\n List<SeriesDefinition> orthoSDs = ChartUtil.getAllOrthogonalSeriesDefinitions(cm);\n for (SeriesDefinition sd : orthoSDs) {\n Query q = sd.getQuery();\n if (q == null || q.getDefinition() == null || \"String_Node_Str\".equals(q.getDefinition().trim())) {\n continue;\n }\n String expr = q.getDefinition();\n int index = getGroupIndex(expr, groupDefinitions);\n if (index >= 0) {\n faEnabledGroups[index] = true;\n if (isSharing && sd.getQuery() != null) {\n IGroupDefinition gd = groupDefinitions.get(index);\n setGroupingInterval(sd.getQuery().getGrouping(), gd);\n }\n }\n }\n}\n"
|
"public void browseHost(String host, int port, Set proxies, boolean canDoFWTransfer) {\n if (!NetworkUtils.isValidPort(port) || !NetworkUtils.isValidAddress(host)) {\n failed();\n return;\n }\n LOG.trace(\"String_Node_Str\");\n setState(STARTED);\n int shouldPush = needsPush(host);\n LOG.trace(\"String_Node_Str\" + shouldPush);\n boolean shouldTryPush = false;\n switch(shouldPush) {\n case 0:\n try {\n setState(DIRECTLY_CONNECTING);\n LOG.trace(\"String_Node_Str\");\n Socket socket = Sockets.connect(host, port, DIRECT_CONNECT_TIME);\n LOG.trace(\"String_Node_Str\");\n browseExchange(socket);\n } catch (IOException ioe) {\n LOG.debug(\"String_Node_Str\", ioe);\n shouldTryPush = true;\n }\n if (!shouldTryPush)\n break;\n case 1:\n LOG.debug(\"String_Node_Str\");\n if (_serventID == null) {\n LOG.debug(\"String_Node_Str\");\n failed();\n } else {\n RemoteFileDesc fakeRFD = new RemoteFileDesc(host, port, SPECIAL_INDEX, \"String_Node_Str\", 0, _serventID.bytes(), 0, false, 0, false, null, null, false, true, \"String_Node_Str\", proxies, -1, canDoFWTransfer ? UDPConnection.VERSION : 0);\n synchronized (_pushedHosts) {\n _pushedHosts.put(_serventID, new PushRequestDetails(this));\n }\n LOG.trace(\"String_Node_Str\");\n setState(PUSHING);\n RouterService.getDownloadManager().sendPush(fakeRFD);\n }\n break;\n }\n}\n"
|
"public void handle(ParserContext parserContext, String attributeKey, String attributeValue, V view, ProteusView proteusView, ProteusView parent, JsonObject layout, int index) {\n ViewGroup.LayoutParams layoutParams = view.getLayoutParams();\n layoutParams.height = dimension;\n view.setLayoutParams(layoutParams);\n}\n"
|
"public static void main(String[] args) throws IOException {\n final MSP430 cpu = new MSP430(0);\n cpu.setMonitorExec(true);\n int[] memory = cpu.getMemory();\n if (args[0].endsWith(\"String_Node_Str\")) {\n IHexReader reader = new IHexReader();\n reader.readFile(memory, args[0]);\n } else {\n elf = ELF.readELF(args[0]);\n elf.loadPrograms(memory);\n MapTable map = elf.getMap();\n cpu.getDisAsm().setMap(map);\n cpu.setMap(map);\n }\n cpu.reset();\n SkyNode node = new SkyNode(cpu);\n node.gui = new SkyGui(node);\n ControlUI control = new ControlUI(cpu);\n if (args.length > 1) {\n MapTable map = new MapTable(args[1]);\n cpu.getDisAsm().setMap(map);\n }\n cpu.cpuloop();\n}\n"
|
"public void testSetExternalFile_noFile() throws Exception {\n DLNAMediaSubtitle dlnaMediaSubtitle = new DLNAMediaSubtitle();\n dlnaMediaSubtitle.setExternalFile(new File(\"String_Node_Str\"), null);\n}\n"
|
"public void testIntegration() throws IOException {\n Resource resource = new ClassPathResource(\"String_Node_Str\", ContextGeneratorTest.class);\n JavaDocBuilder builder = new JavaDocBuilder();\n builder.addSourceTree(new File(getBaseDir(), \"String_Node_Str\"));\n SpringConfigurationLoader loader = new SpringConfigurationLoader(new QDoxAugmentation(builder));\n Configuration configuration = loader.load(resource);\n InMemoryDestination dest = new InMemoryDestination();\n BeanFactoryGenerator generator = new BeanFactoryGenerator();\n generator.generate(dest, configuration, BeanFactoryTypes.MINIMAL_JAVA_SE);\n System.out.println(dest.getAsText());\n}\n"
|
"private void postProcessProperties(Map<String, Object> propertiesMap) {\n for (Iterator<String> iter = propertiesMap.keySet().iterator(); iter.hasNext(); ) {\n String key = iter.next();\n if (key.equals(\"String_Node_Str\")) {\n propertiesMap.remove(key);\n }\n }\n}\n"
|
"private int getPosition(Artifact artifact) throws OseeCoreException {\n Artifact parent = artifact.getParent();\n List<Artifact> children = parentToChildrenCache.get(parent.getId());\n if (children == null) {\n children = parent.getChildren();\n parentToChildrenCache.put(parent.getId(), children);\n }\n int index = 1 + children.indexOf(artifact);\n if (index > 0) {\n return index;\n }\n throw new OseeStateException(\"String_Node_Str\", artifact, parent);\n}\n"
|
"public void locationCallbackFinished(ILocationListener listener) {\n synchronized (mLock) {\n IBinder binder = listener.asBinder();\n Receiver receiver = mReceivers.get(binder);\n if (receiver != null) {\n synchronized (receiver) {\n long identity = Binder.clearCallingIdentity();\n receiver.decrementPendingBroadcastsLocked();\n Binder.restoreCallingIdentity(identity);\n }\n }\n }\n}\n"
|
"protected void configureShell(Shell newShell) {\n super.configureShell(newShell);\n newShell.setText(Messages.getString(\"String_Node_Str\"));\n newShell.setSize(550, 600);\n setHelpAvailable(false);\n}\n"
|
"public void shouldNotCallBaseFunctionThusNotRemovingTheVertex() throws Exception {\n Graph g = this.sqlgGraph;\n final StrategyWrappedGraph swg = new StrategyWrappedGraph(g);\n swg.getStrategy().setGraphStrategy(new GraphStrategy() {\n\n public UnaryOperator<Supplier<Void>> getRemoveVertexStrategy(final Strategy.Context<StrategyWrappedVertex> ctx) {\n return (t) -> () -> {\n final Vertex v = ctx.getCurrent().getBaseVertex();\n v.bothE().remove();\n v.properties().forEachRemaining(Property::remove);\n v.property(\"String_Node_Str\", true);\n return null;\n };\n }\n });\n final Vertex toRemove = g.addVertex(\"String_Node_Str\", \"String_Node_Str\");\n toRemove.addEdge(\"String_Node_Str\", g.addVertex(\"String_Node_Str\", \"String_Node_Str\"));\n assertEquals(1, toRemove.properties().count().next(), 0);\n assertEquals(new Long(1), toRemove.bothE().count().next());\n assertFalse(toRemove.property(\"String_Node_Str\").isPresent());\n swg.v(toRemove.id()).remove();\n final Vertex removed = g.v(toRemove.id());\n assertNotNull(removed);\n assertEquals(1, removed.properties().count().next(), 0);\n assertEquals(new Long(0), removed.bothE().count().next());\n assertTrue(toRemove.property(\"String_Node_Str\").isPresent());\n}\n"
|
"public void occurred(String operationName, DatabaseQuery query) {\n Sensor event = getSensorByName(operationName);\n if (event != null) {\n ((Event) event).occurred();\n occurred(query.getMonitorName());\n }\n}\n"
|
"private static TurboIssue updateRandomIssue(String repoId) {\n int i = (int) (Math.random() * issueCounter);\n return issues.set(i, new TurboIssue(repoId, i + 1, \"String_Node_Str\" + (i + 1) + \"String_Node_Str\" + Math.random()));\n}\n"
|
"public static TypedReturnCode<java.sql.Connection> createConnection(Connection connection) {\n TypedReturnCode<java.sql.Connection> rc = new TypedReturnCode<java.sql.Connection>(false);\n String url = getURL(connection);\n if (url == null || !(connection instanceof DatabaseConnection)) {\n rc.setMessage(Messages.getString(\"String_Node_Str\"));\n rc.setOk(false);\n return rc;\n }\n java.sql.Connection sqlConnection = null;\n if (connection instanceof DatabaseConnection) {\n sqlConnection = MetadataConnectionUtils.createConnection((DatabaseConnection) connection).getObject();\n }\n rc.setObject(sqlConnection);\n rc.setOk(sqlConnection != null);\n return rc;\n}\n"
|
"public OpenAPI buildModel() {\n return OASFactory.createObject(OpenAPI.class).info(OASFactory.createObject(Info.class).title(\"String_Node_Str\").version(\"String_Node_Str\").termsOfService(\"String_Node_Str\").contact(OASFactory.createObject(Contact.class).name(\"String_Node_Str\").url(\"String_Node_Str\").email(\"String_Node_Str\")).license(OASFactory.createObject(License.class).name(\"String_Node_Str\").url(\"String_Node_Str\"))).security(new ArrayList<SecurityRequirement>()).addSecurityRequirement(OASFactory.createObject(SecurityRequirement.class).addScheme(\"String_Node_Str\")).servers(new ArrayList<Server>()).addServer(OASFactory.createObject(Server.class).url(\"String_Node_Str\").description(\"String_Node_Str\").variables(OASFactory.createObject(ServerVariables.class).addServerVariable(\"String_Node_Str\", OASFactory.createObject(ServerVariable.class).defaultValue(\"String_Node_Str\").description(\"String_Node_Str\").enumeration(new ArrayList<String>()).addEnumeration(\"String_Node_Str\").addEnumeration(\"String_Node_Str\")).addServerVariable(\"String_Node_Str\", OASFactory.createObject(ServerVariable.class).defaultValue(\"String_Node_Str\").description(\"String_Node_Str\")).addServerVariable(\"String_Node_Str\", OASFactory.createObject(ServerVariable.class).defaultValue(\"String_Node_Str\").description(\"String_Node_Str\")).addServerVariable(\"String_Node_Str\", OASFactory.createObject(ServerVariable.class).defaultValue(\"String_Node_Str\")))).addServer(OASFactory.createObject(Server.class).url(\"String_Node_Str\").description(\"String_Node_Str\")).components(OASFactory.createObject(Components.class).schemas(new HashMap<String, Schema>()).addSchema(\"String_Node_Str\", OASFactory.createObject(Schema.class).type(Schema.SchemaType.INTEGER).title(\"String_Node_Str\").ref(\"String_Node_Str\")).addSchema(\"String_Node_Str\", OASFactory.createObject(Schema.class).type(Schema.SchemaType.INTEGER).title(\"String_Node_Str\")).addSchema(\"String_Node_Str\", OASFactory.createObject(Schema.class).ref(\"String_Node_Str\")).addSchema(\"String_Node_Str\", OASFactory.createObject(Schema.class).type(Schema.SchemaType.INTEGER).format(\"String_Node_Str\")).responses(new HashMap<String, APIResponse>()).addResponse(\"String_Node_Str\", OASFactory.createObject(APIResponse.class).description(\"String_Node_Str\").content(OASFactory.createObject(Content.class).addMediaType(\"String_Node_Str\", OASFactory.createObject(MediaType.class).schema(OASFactory.createObject(Schema.class).type(Schema.SchemaType.ARRAY))))).addResponse(\"String_Node_Str\", OASFactory.createObject(APIResponse.class).description(\"String_Node_Str\").content(OASFactory.createObject(Content.class).addMediaType(\"String_Node_Str\", OASFactory.createObject(MediaType.class).schema(OASFactory.createObject(Schema.class).type(Schema.SchemaType.ARRAY).ref(\"String_Node_Str\"))))).parameters(new HashMap<String, Parameter>()).addParameter(\"String_Node_Str\", OASFactory.createObject(Parameter.class).required(true).description(\"String_Node_Str\").schema(OASFactory.createObject(Schema.class))).addParameter(\"String_Node_Str\", OASFactory.createObject(Parameter.class).required(true).description(\"String_Node_Str\").schema(OASFactory.createObject(Schema.class))).examples(new HashMap<String, Example>()).addExample(\"String_Node_Str\", OASFactory.createObject(Example.class).summary(\"String_Node_Str\").description(\"String_Node_Str\").externalValue(\"String_Node_Str\")).addExample(\"String_Node_Str\", OASFactory.createObject(Example.class).summary(\"String_Node_Str\").externalValue(\"String_Node_Str\")).requestBodies(new HashMap<String, RequestBody>()).addRequestBody(\"String_Node_Str\", OASFactory.createObject(RequestBody.class).required(true).description(\"String_Node_Str\").content(OASFactory.createObject(Content.class).addMediaType(\"String_Node_Str\", OASFactory.createObject(MediaType.class).schema(OASFactory.createObject(Schema.class).ref(\"String_Node_Str\"))))).headers(new HashMap<String, Header>()).addHeader(\"String_Node_Str\", OASFactory.createObject(Header.class).description(\"String_Node_Str\").schema(OASFactory.createObject(Schema.class).type(Schema.SchemaType.INTEGER)).required(true).allowEmptyValue(true).deprecated(true)).addHeader(\"String_Node_Str\", OASFactory.createObject(Header.class).description(\"String_Node_Str\").schema(OASFactory.createObject(Schema.class).type(Schema.SchemaType.INTEGER))).securitySchemes(new HashMap<String, SecurityScheme>()).addSecurityScheme(\"String_Node_Str\", OASFactory.createObject(SecurityScheme.class).description(\"String_Node_Str\").type(SecurityScheme.Type.HTTP).scheme(\"String_Node_Str\")).links(new HashMap<String, Link>()).addLink(\"String_Node_Str\", OASFactory.createObject(Link.class).description(\"String_Node_Str\").operationId(\"String_Node_Str\").parameters(new HashMap<String, Object>()).addParameter(\"String_Node_Str\", \"String_Node_Str\"))).tags(new ArrayList<Tag>()).addTag(OASFactory.createObject(Tag.class).name(\"String_Node_Str\").description(\"String_Node_Str\")).addTag(OASFactory.createObject(Tag.class).name(\"String_Node_Str\").description(\"String_Node_Str\")).addTag(OASFactory.createObject(Tag.class).name(\"String_Node_Str\").description(\"String_Node_Str\")).addTag(OASFactory.createObject(Tag.class).name(\"String_Node_Str\").description(\"String_Node_Str\")).addTag(OASFactory.createObject(Tag.class).name(\"String_Node_Str\").description(\"String_Node_Str\")).addTag(OASFactory.createObject(Tag.class).name(\"String_Node_Str\").description(\"String_Node_Str\")).addTag(OASFactory.createObject(Tag.class).name(\"String_Node_Str\").description(\"String_Node_Str\")).addTag(OASFactory.createObject(Tag.class).name(\"String_Node_Str\").description(\"String_Node_Str\").externalDocs(OASFactory.createObject(ExternalDocumentation.class).description(\"String_Node_Str\").url(\"String_Node_Str\"))).externalDocs(OASFactory.createObject(ExternalDocumentation.class).description(\"String_Node_Str\").url(\"String_Node_Str\")).paths(OASFactory.createObject(Paths.class).addPathItem(\"String_Node_Str\", OASFactory.createObject(PathItem.class).GET(OASFactory.createObject(Operation.class).summary(\"String_Node_Str\").operationId(\"String_Node_Str\").responses(OASFactory.createObject(APIResponses.class).addApiResponse(\"String_Node_Str\", OASFactory.createObject(APIResponse.class).description(\"String_Node_Str\").content(OASFactory.createObject(Content.class).addMediaType(\"String_Node_Str\", OASFactory.createObject(MediaType.class))))))).addPathItem(\"String_Node_Str\", OASFactory.createObject(PathItem.class).GET(OASFactory.createObject(Operation.class).tags(new ArrayList<String>()).addTag(\"String_Node_Str\").summary(\"String_Node_Str\").operationId(\"String_Node_Str\").responses(OASFactory.createObject(APIResponses.class).addApiResponse(\"String_Node_Str\", OASFactory.createObject(APIResponse.class).description(\"String_Node_Str\").content(OASFactory.createObject(Content.class).addMediaType(\"String_Node_Str\", OASFactory.createObject(MediaType.class).schema(OASFactory.createObject(Schema.class).type(Schema.SchemaType.ARRAY).ref(\"String_Node_Str\"))))).addApiResponse(\"String_Node_Str\", OASFactory.createObject(APIResponse.class).description(\"String_Node_Str\").content(OASFactory.createObject(Content.class).addMediaType(\"String_Node_Str\", OASFactory.createObject(MediaType.class))))).parameters(new ArrayList<Parameter>()).addParameter(OASFactory.createObject(Parameter.class).ref(\"String_Node_Str\")).addParameter(OASFactory.createObject(Parameter.class).name(\"String_Node_Str\").required(true).in(Parameter.In.QUERY).allowEmptyValue(true).description(\"String_Node_Str\").schema(OASFactory.createObject(Schema.class).type(Schema.SchemaType.STRING))).addParameter(OASFactory.createObject(Parameter.class).name(\"String_Node_Str\").required(true).in(Parameter.In.QUERY).allowReserved(true).description(\"String_Node_Str\").schema(OASFactory.createObject(Schema.class).type(Schema.SchemaType.STRING))).addParameter(OASFactory.createObject(Parameter.class).name(\"String_Node_Str\").required(true).in(Parameter.In.QUERY).description(\"String_Node_Str\").schema(OASFactory.createObject(Schema.class).type(Schema.SchemaType.STRING))).addParameter(OASFactory.createObject(Parameter.class).name(\"String_Node_Str\").required(true).in(Parameter.In.QUERY).description(\"String_Node_Str\").schema(OASFactory.createObject(Schema.class).minimum(new BigDecimal(0)).type(Schema.SchemaType.STRING))).addParameter(OASFactory.createObject(Parameter.class).name(\"String_Node_Str\").required(true).deprecated(true).in(Parameter.In.QUERY).description(\"String_Node_Str\").schema(OASFactory.createObject(Schema.class).minimum(new BigDecimal(0)).type(Schema.SchemaType.STRING))))).addPathItem(\"String_Node_Str\", OASFactory.createObject(PathItem.class).GET(OASFactory.createObject(Operation.class).tags(new ArrayList<String>()).addTag(\"String_Node_Str\").summary(\"String_Node_Str\").operationId(\"String_Node_Str\").responses(OASFactory.createObject(APIResponses.class).addApiResponse(\"String_Node_Str\", OASFactory.createObject(APIResponse.class).description(\"String_Node_Str\").content(OASFactory.createObject(Content.class).addMediaType(\"String_Node_Str\", OASFactory.createObject(MediaType.class).schema(OASFactory.createObject(Schema.class).type(Schema.SchemaType.ARRAY).ref(\"String_Node_Str\"))))).addApiResponse(\"String_Node_Str\", OASFactory.createObject(APIResponse.class).description(\"String_Node_Str\")))).POST(OASFactory.createObject(Operation.class).security(new ArrayList<SecurityRequirement>()).addSecurityRequirement(OASFactory.createObject(SecurityRequirement.class).addScheme(\"String_Node_Str\", new ArrayList<String>(Arrays.asList(\"String_Node_Str\", \"String_Node_Str\")))).summary(\"String_Node_Str\").description(\"String_Node_Str\").operationId(\"String_Node_Str\").responses(OASFactory.createObject(APIResponses.class).addApiResponse(\"String_Node_Str\", OASFactory.createObject(APIResponse.class).description(\"String_Node_Str\").content(OASFactory.createObject(Content.class).addMediaType(\"String_Node_Str\", OASFactory.createObject(MediaType.class).schema(OASFactory.createObject(Schema.class).title(\"String_Node_Str\").description(\"String_Node_Str\").type(Schema.SchemaType.STRING)))))))));\n}\n"
|
"protected void writeMap(DataOutputStream out, MapDesign map) throws IOException {\n int ruleCount = map.getRuleCount();\n IOUtil.writeInt(out, ruleCount);\n for (int i = 0; i < ruleCount; i++) {\n MapRuleDesign rule = map.getRule(i);\n IOUtil.writeString(out, rule.getTestExpression());\n IOUtil.writeString(out, rule.getOperator());\n IOUtil.writeBool(out, rule.ifValueIsList());\n if (rule.ifValueIsList()) {\n IOUtil.writeList(out, rule.getValue1List());\n } else {\n IOUtil.writeString(out, rule.getValue1());\n IOUtil.writeString(out, rule.getValue2());\n }\n IOUtil.writeString(out, rule.getDisplayText());\n IOUtil.writeString(out, rule.getDisplayKey());\n }\n}\n"
|
"public synchronized void leaveTable(UUID userId) {\n if (table.getState() == TableState.WAITING || table.getState() == TableState.STARTING) {\n UUID playerId = userPlayerMap.get(userId);\n if (playerId != null) {\n table.leaveTable(playerId);\n if (table.isTournament()) {\n tournament.leave(playerId);\n } else {\n match.leave(playerId);\n }\n User user = UserManager.getInstance().getUser(userId);\n user.removeTable(playerId);\n userPlayerMap.remove(userId);\n }\n }\n}\n"
|
"public void loadLibrary() throws LibraryLoadingException {\n if (!isLoaded) {\n try {\n System.loadLibrary(Core.NATIVE_LIBRARY_NAME);\n isLoaded = true;\n LOGGER.info(\"String_Node_Str\", Core.NATIVE_LIBRARY_NAME);\n } catch (UnsatisfiedLinkError e) {\n LOGGER.info(\"String_Node_Str\");\n String lib;\n String operatingSystem = System.getProperty(\"String_Node_Str\").toLowerCase();\n if (operatingSystem.contains(\"String_Node_Str\")) {\n lib = \"String_Node_Str\";\n } else if (operatingSystem.contains(\"String_Node_Str\")) {\n lib = \"String_Node_Str\";\n } else if (operatingSystem.contains(\"String_Node_Str\")) {\n lib = \"String_Node_Str\";\n } else {\n LOGGER.error(\"String_Node_Str\", operatingSystem);\n throw new LibraryLoadingException(\"String_Node_Str\");\n }\n String dest = System.getProperty(\"String_Node_Str\") + \"String_Node_Str\" + lib;\n FileTransfer ft = new FileTransfer();\n try {\n ft.transfer(\"String_Node_Str\" + lib, dest, false);\n } catch (IOException e1) {\n LOGGER.error(\"String_Node_Str\", e1);\n throw new LibraryLoadingException(e1);\n }\n System.load(dest);\n isLoaded = true;\n LOGGER.info(\"String_Node_Str\", operatingSystem, dest);\n }\n }\n}\n"
|
"public void allocate(VirtualNode vNode, AbstractHost host) {\n for (BaseNode node : vNode.getBaseNodes()) {\n for (DiskSpec disk : node.getDisks()) {\n this.dc.getDatastore(disk.getTargetDs()).allocate(disk.getSize());\n }\n }\n}\n"
|
"public synchronized void cancel() {\n cancelled = true;\n new Thread() {\n public void run() {\n if (httpGet != null)\n httpGet.abort();\n queue.exterminateDownload(CacheDownload.this);\n notifyAllOnFailure(RequestFailureType.CANCELLED, null, null, \"String_Node_Str\");\n }\n }.start();\n}\n"
|
"public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n new AppDatabaseUpgrader(context).upgrade(db, oldVersion, newVersion);\n}\n"
|
"public static void fixLinux(int trayIconSize) {\n if (isOracleVM()) {\n return;\n }\n if (isSwingTrayLoaded()) {\n throw new RuntimeException(\"String_Node_Str\");\n }\n try {\n ClassPool pool = ClassPool.getDefault();\n CtField ctField;\n String className = \"String_Node_Str\";\n byte[] eFrameBytes;\n byte[] trayIconBytes;\n byte[] trayPeerBytes;\n {\n CtClass trayIconClass = pool.get(className);\n CtClass eFrameClass = null;\n CtClass trayPeerClass;\n CtClass[] nestedClasses = trayIconClass.getNestedClasses();\n for (CtClass nestedClass : nestedClasses) {\n String name = nestedClass.getName();\n if (name.equals(className + \"String_Node_Str\")) {\n eFrameClass = nestedClass;\n }\n }\n if (eFrameClass == null) {\n throw new RuntimeException(\"String_Node_Str\");\n }\n ctField = new CtField(pool.get(\"String_Node_Str\"), \"String_Node_Str\", trayIconClass);\n ctField.setModifiers(Modifier.STATIC);\n trayIconClass.addField(ctField);\n ctField = new CtField(pool.get(\"String_Node_Str\"), \"String_Node_Str\", trayIconClass);\n ctField.setModifiers(Modifier.STATIC);\n trayIconClass.addField(ctField);\n trayPeerClass = pool.get(\"String_Node_Str\");\n CtConstructor constructor = trayIconClass.getDeclaredConstructors()[0];\n CtMethod method1 = trayIconClass.getDeclaredMethod(\"String_Node_Str\");\n CtMethod method2 = trayPeerClass.getDeclaredMethod(\"String_Node_Str\");\n CtBehavior[] methodInfos = new CtBehavior[] { constructor, method1, method2 };\n fixTraySize(methodInfos, 24, trayIconSize);\n constructor.getMethodInfo().rebuildStackMapForME(trayIconClass.getClassPool());\n method1.getMethodInfo().rebuildStackMapForME(trayIconClass.getClassPool());\n method2.getMethodInfo().rebuildStackMapForME(trayPeerClass.getClassPool());\n trayIconBytes = trayIconClass.toBytecode();\n trayPeerBytes = trayPeerClass.toBytecode();\n CtMethod methodVisible = CtNewMethod.make(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + className + \"String_Node_Str\" + className + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + className + \"String_Node_Str\" + className + \"String_Node_Str\" + \"String_Node_Str\" + className + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", eFrameClass);\n eFrameClass.addMethod(methodVisible);\n methodVisible.getMethodInfo().rebuildStackMapForME(eFrameClass.getClassPool());\n eFrameBytes = eFrameClass.toBytecode();\n }\n BootStrapClassLoader.defineClass(trayIconBytes);\n BootStrapClassLoader.defineClass(trayPeerBytes);\n BootStrapClassLoader.defineClass(eFrameBytes);\n if (SystemTray.DEBUG) {\n logger.debug(\"String_Node_Str\");\n }\n } catch (Exception e) {\n logger.error(\"String_Node_Str\", e);\n }\n}\n"
|
"public void appendSearchableData(IndexBuilder builder) {\n builder.appendTokenFromColumn(StructuredName.PREFIX);\n builder.appendTokenFromColumn(StructuredName.FAMILY_NAME);\n builder.appendTokenFromColumn(StructuredName.GIVEN_NAME);\n builder.appendTokenFromColumn(StructuredName.MIDDLE_NAME);\n builder.appendTokenFromColumn(StructuredName.SUFFIX);\n String phoneticFamily = builder.getString(StructuredName.PHONETIC_FAMILY_NAME);\n String phoneticMiddle = builder.getString(StructuredName.PHONETIC_MIDDLE_NAME);\n String phoneticGiven = builder.getString(StructuredName.PHONETIC_GIVEN_NAME);\n if (!TextUtils.isEmpty(phoneticFamily) || !TextUtils.isEmpty(phoneticMiddle) || !TextUtils.isEmpty(phoneticGiven)) {\n mSb.setLength(0);\n if (!TextUtils.isEmpty(phoneticFamily)) {\n builder.appendToken(phoneticFamily);\n mSb.append(phoneticFamily);\n }\n if (!TextUtils.isEmpty(phoneticMiddle)) {\n builder.appendToken(phoneticMiddle);\n mSb.append(phoneticMiddle);\n }\n if (!TextUtils.isEmpty(phoneticGiven)) {\n builder.appendToken(phoneticGiven);\n mSb.append(phoneticGiven);\n }\n builder.appendToken(mSb.toString().trim());\n }\n}\n"
|
"public DIDAuthenticateResponse didAuthenticate(DIDAuthenticate request) {\n DIDAuthenticateResponse response = WSHelper.makeResponse(DIDAuthenticateResponse.class, WSHelper.makeResultOK());\n try {\n ConnectionHandleType connectionHandle = SALUtils.getConnectionHandle(request);\n DIDAuthenticationDataType didAuthenticationData = request.getAuthenticationProtocolData();\n Assert.assertIncorrectParameter(didAuthenticationData, \"String_Node_Str\");\n String protocolURI = didAuthenticationData.getProtocol();\n if (protocolURI == null) {\n logger.warn(\"String_Node_Str\");\n protocolURI = ECardConstants.Protocol.EAC_GENERIC;\n } else if (protocolURI.equals(\"String_Node_Str\")) {\n logger.warn(\"String_Node_Str\");\n protocolURI = ECardConstants.Protocol.EAC_GENERIC;\n }\n Protocol protocol = getProtocol(connectionHandle, protocolURI);\n if (protocol.hasNextStep(FunctionType.DIDAuthenticate)) {\n response = protocol.didAuthenticate(request);\n removeFinishedProtocol(connectionHandle, protocolURI, protocol);\n } else {\n throw new InappropriateProtocolForActionException(\"String_Node_Str\", protocol.toString());\n }\n } catch (ECardException e) {\n response.setResult(e.getResult());\n } catch (Exception e) {\n logger.error(e.getMessage(), e);\n response.setResult(WSHelper.makeResult(e));\n }\n return response;\n}\n"
|
"public Side side(final Arc arc) {\n final double reference = FastMath.PI + arc.getInf();\n final double arcLength = arc.getSup() - arc.getInf();\n boolean inMinus = false;\n boolean inPlus = false;\n for (final double[] a : this) {\n final double syncedStart = MathUtils.normalizeAngle(a[0], reference) - arc.getInf();\n final double arcOffset = a[0] - syncedStart;\n final double syncedEnd = a[1] - arcOffset;\n if (syncedStart <= arcLength - getTolerance() || syncedEnd >= MathUtils.TWO_PI + getTolerance()) {\n inMinus = true;\n }\n if (syncedEnd > arcLength) {\n inPlus = true;\n }\n }\n if (inMinus) {\n if (inPlus) {\n return Side.BOTH;\n } else {\n return Side.MINUS;\n }\n } else {\n if (inPlus) {\n return Side.PLUS;\n } else {\n return Side.HYPER;\n }\n }\n}\n"
|
"protected EmvCard extractCommonsCardData(final byte[] pGpo) throws CommunicationException {\n EmvCard card = null;\n byte[] data = TlvUtil.getValue(pGpo, EmvTags.RESPONSE_MESSAGE_TEMPLATE_1);\n if (data != null) {\n data = ArrayUtils.subarray(data, 2, data.length);\n } else {\n data = TlvUtil.getValue(pGpo, EmvTags.APPLICATION_FILE_LOCATOR);\n }\n if (data != null) {\n List<Afl> listAfl = extractAfl(data);\n for (Afl afl : listAfl) {\n for (int index = afl.getFirstRecord(); index <= afl.getLastRecord(); index++) {\n byte[] info = provider.transceive(new CommandApdu(CommandEnum.READ_RECORD, index, afl.getSfi() << 3 | 4, 0).toBytes());\n if (ResponseUtils.isEquals(data, SwEnum.SW_6C)) {\n info = provider.transceive(new CommandApdu(CommandEnum.READ_RECORD, index, afl.getSfi() << 3 | 4, info[info.length - 1]).toBytes());\n }\n if (ResponseUtils.isSucceed(info)) {\n card = extractTrack2Data(info);\n if (card != null) {\n break;\n }\n }\n }\n if (card != null) {\n break;\n }\n }\n } else {\n card = extractTrack2Data(pGpo);\n }\n return card;\n}\n"
|
"public void showListCities(String country, String state) {\n LibraryListFragment fragment = new LibraryListFragment();\n Bundle args = new Bundle();\n args.putInt(\"String_Node_Str\", LEVEL_CITY);\n args.putString(\"String_Node_Str\", country);\n args.putString(\"String_Node_Str\", state);\n fragment.setArguments(args);\n Set<String> data = new HashSet<String>();\n for (Library lib : libraries) {\n if (country.equals(lib.getCountry()) && state.equals(lib.getState()) && !data.contains(lib.getCity())) {\n data.add(lib.getCity());\n }\n }\n List<String> list = new ArrayList<String>(data);\n if (data.size() == 1 && list.get(0).equals(state)) {\n showListLibraries(country, state, list.get(0));\n }\n Collections.sort(list);\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, R.layout.listitem_simple, R.id.text1, list);\n fragment.setListAdapter(adapter);\n if (findViewById(R.id.llFragments) != null) {\n fragment3 = fragment;\n getSupportFragmentManager().beginTransaction().replace(R.id.container3, fragment3).commit();\n if (fragment4 != null)\n getSupportFragmentManager().beginTransaction().detach(fragment4).commit();\n } else if (data.size() > 1 || !list.get(0).equals(state)) {\n this.fragment = fragment;\n getSupportFragmentManager().beginTransaction().replace(R.id.container, fragment).addToBackStack(null).setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN).commit();\n }\n}\n"
|
"protected ASTNode findDeclaration(String name, ClassNode declaringType, boolean isLhsExpression, boolean isStaticExpression, List<ClassNode> methodCallArgumentTypes) {\n if (declaringType.isArray()) {\n if (name.equals(\"String_Node_Str\")) {\n return createLengthField(declaringType);\n }\n return findDeclaration(name, VariableScope.OBJECT_CLASS_NODE, isLhsExpression, isStaticExpression, methodCallArgumentTypes);\n }\n if (methodCallArgumentTypes != null) {\n ASTNode method = findMethodDeclaration(name, declaringType, methodCallArgumentTypes);\n if (method != null) {\n return method;\n }\n }\n MethodNode accessor = AccessorSupport.findAccessorMethodForPropertyName(name, declaringType, false, !isLhsExpression ? READER : WRITER);\n if (accessor != null && !isSynthetic(accessor) && (accessor.isStatic() == isStaticExpression)) {\n return accessor;\n }\n LinkedHashSet<ClassNode> typeHierarchy = new LinkedHashSet<ClassNode>();\n VariableScope.createTypeHierarchy(declaringType, typeHierarchy, true);\n for (ClassNode type : typeHierarchy) {\n PropertyNode property = type.getProperty(name);\n if (isCompatible(property, isStaticExpression)) {\n return property;\n }\n }\n FieldNode field = declaringType.getField(name);\n if (field != null) {\n return field;\n }\n typeHierarchy.clear();\n VariableScope.findAllInterfaces(declaringType, typeHierarchy, true);\n for (ClassNode type : typeHierarchy) {\n if (type == declaringType) {\n continue;\n }\n field = type.getField(name);\n if (field != null && field.isFinal() && field.isStatic()) {\n return field;\n }\n }\n if (accessor != null) {\n return accessor;\n }\n if (methodCallArgumentTypes == null) {\n return findMethodDeclaration(name, declaringType, null);\n }\n return null;\n}\n"
|
"protected Boolean doInBackground(Void... params) {\n SharedPreferences mPrefs = PreferenceManager.getDefaultSharedPreferences(NewFeedActivity.this);\n String baseUrl = mPrefs.getString(SettingsActivity.EDT_OWNCLOUDROOTPATH_STRING, \"String_Node_Str\");\n API api = new APIv2(baseUrl);\n try {\n int status = HttpJsonRequest.getInstance().performCreateFeedRequest(api.getFeedUrl(), mUrlToFeed, mFolderId);\n if (status == 200) {\n return true;\n }\n Log.d(\"String_Node_Str\", \"String_Node_Str\" + status);\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n return false;\n}\n"
|
"private void sortPlatesAction() {\n PlateAttributeDialog dialog = new PlateAttributeDialog(heatMapModel);\n dialog.setVisible(true);\n String[] selectedAttributes = dialog.getSelectedAttributeTitles();\n ArrayList<PlateAttribute> attributeList = new ArrayList<PlateAttribute>();\n for (String attributeString : selectedAttributes) {\n PlateAttribute attribute = PlateUtils.getPlateAttributeByTitle(attributeString);\n attributeList.add(attribute);\n }\n heatMapModel.fireModelChanged();\n heatMapModel.setSortAttributeSelectionByTiles(selectedAttributes);\n}\n"
|
"public void testKVToKVMeta() throws Exception {\n ETLStage source = new ETLStage(\"String_Node_Str\", ImmutableMap.of(Properties.BatchReadableWritable.NAME, \"String_Node_Str\"));\n ETLStage sink = new ETLStage(\"String_Node_Str\", ImmutableMap.of(Properties.BatchReadableWritable.NAME, \"String_Node_Str\"));\n ETLBatchConfig etlConfig = new ETLBatchConfig(\"String_Node_Str\", source, sink);\n AppRequest<ETLBatchConfig> appRequest = new AppRequest<>(ETLBATCH_ARTIFACT, etlConfig);\n Id.Application appId = Id.Application.from(Id.Namespace.DEFAULT, \"String_Node_Str\");\n ApplicationManager appManager = deployApplication(appId, appRequest);\n MapReduceManager mrManager = appManager.getMapReduceManager(ETLMapReduce.NAME);\n mrManager.start();\n mrManager.waitForFinish(5, TimeUnit.MINUTES);\n DataSetManager<KeyValueTable> sourceMetaTable = getDataset(MetaKVTableSource.META_TABLE);\n KeyValueTable sourceTable = sourceMetaTable.get();\n Assert.assertEquals(MetaKVTableSource.PREPARE_RUN_KEY, Bytes.toString(sourceTable.read(MetaKVTableSource.PREPARE_RUN_KEY)));\n Assert.assertEquals(MetaKVTableSource.FINISH_RUN_KEY, Bytes.toString(sourceTable.read(MetaKVTableSource.FINISH_RUN_KEY)));\n DataSetManager<KeyValueTable> sinkMetaTable = getDataset(MetaKVTableSink.META_TABLE);\n try (KeyValueTable sinkTable = sinkMetaTable.get()) {\n Assert.assertEquals(MetaKVTableSink.PREPARE_RUN_KEY, Bytes.toString(sinkTable.read(MetaKVTableSink.PREPARE_RUN_KEY)));\n Assert.assertEquals(MetaKVTableSink.FINISH_RUN_KEY, Bytes.toString(sinkTable.read(MetaKVTableSink.FINISH_RUN_KEY)));\n }\n}\n"
|
"private List<ExampleModel> generateExamplesForNode(List<Node> children, ValidationFindings findingsAggregator) {\n List<ExampleModel> ret = new ArrayList<ExampleModel>();\n for (Node child : children) {\n NamedEntity namedEntity = getNamedEntity(child);\n if (namedEntity != null) {\n ExampleModel childModel = null;\n try {\n Object[] examples = generateExample(namedEntity);\n if (child instanceof VersionNode) {\n child = ((VersionNode) child).getNewestVersion();\n }\n if (child.isService()) {\n childModel = new ExampleModel(child);\n childModel.addChildren(generateExamplesForNode(child.getChildren(), findingsAggregator));\n } else if (child.isOperation()) {\n childModel = new ExampleModel(child);\n childModel.addChildren(generateExamplesForNode(child.getChildren(), findingsAggregator));\n } else {\n if (namedEntity instanceof TLFacet) {\n TLFacet facet = (TLFacet) namedEntity;\n if (!facet.declaresContent()) {\n break;\n }\n }\n if (((Document) examples[0]).getDocumentElement() != null) {\n childModel = new DOMExampleModel(child, ((Document) examples[0]).getDocumentElement());\n childModel.setXmlString((String) examples[1]);\n }\n }\n } catch (ValidationException e) {\n childModel = new ErrorExampleModel(child);\n findingsAggregator.addAll(e.getFindings());\n LOGGER.debug(\"String_Node_Str\" + Arrays.toString(e.getFindings().getAllValidationMessages(FindingMessageFormat.IDENTIFIED_FORMAT)));\n } catch (CodeGenerationException e) {\n DialogUserNotifier.openError(\"String_Node_Str\", \"String_Node_Str\" + e);\n LOGGER.error(\"String_Node_Str\", e);\n }\n if (childModel != null)\n ret.add(childModel);\n } else if (!child.getChildren().isEmpty()) {\n ret.addAll(generateExamplesForNode(child.getChildren(), findingsAggregator));\n }\n }\n return ret;\n}\n"
|
"private PduPart[] loadParts(long msgId) throws MmsException {\n Cursor c = SqliteWrapper.query(mContext, mContentResolver, Uri.parse(\"String_Node_Str\" + msgId + \"String_Node_Str\"), PART_PROJECTION, null, null, null);\n PduPart[] parts = null;\n try {\n if ((c == null) || (c.getCount() == 0)) {\n if (LOCAL_LOGV) {\n Log.v(TAG, \"String_Node_Str\" + msgId + \"String_Node_Str\");\n }\n return null;\n }\n int partCount = c.getCount();\n int partIdx = 0;\n parts = new PduPart[partCount];\n while (c.moveToNext()) {\n PduPart part = new PduPart();\n Integer charset = getIntegerFromPartColumn(c, PART_COLUMN_CHARSET);\n if (charset != null) {\n part.setCharset(charset);\n }\n byte[] contentDisposition = getByteArrayFromPartColumn(c, PART_COLUMN_CONTENT_DISPOSITION);\n if (contentDisposition != null) {\n part.setContentDisposition(contentDisposition);\n }\n byte[] contentId = getByteArrayFromPartColumn(c, PART_COLUMN_CONTENT_ID);\n if (contentId != null) {\n part.setContentId(contentId);\n }\n byte[] contentLocation = getByteArrayFromPartColumn(c, PART_COLUMN_CONTENT_LOCATION);\n if (contentLocation != null) {\n part.setContentLocation(contentLocation);\n }\n byte[] contentType = getByteArrayFromPartColumn(c, PART_COLUMN_CONTENT_TYPE);\n if (contentType != null) {\n part.setContentType(contentType);\n } else {\n throw new MmsException(\"String_Node_Str\");\n }\n byte[] fileName = getByteArrayFromPartColumn(c, PART_COLUMN_FILENAME);\n if (fileName != null) {\n part.setFilename(fileName);\n }\n byte[] name = getByteArrayFromPartColumn(c, PART_COLUMN_NAME);\n if (name != null) {\n part.setName(name);\n }\n long partId = c.getLong(PART_COLUMN_ID);\n Uri partURI = Uri.parse(\"String_Node_Str\" + partId);\n part.setDataUri(partURI);\n String type = toIsoString(contentType);\n if (!ContentType.isImageType(type) && !ContentType.isAudioType(type) && !ContentType.isVideoType(type)) {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n InputStream is = null;\n if (ContentType.TEXT_PLAIN.equals(type) || ContentType.APP_SMIL.equals(type) || ContentType.TEXT_HTML.equals(type)) {\n String text = c.getString(PART_COLUMN_TEXT);\n byte[] blob = new EncodedStringValue(text != null ? text : \"String_Node_Str\").getTextString();\n baos.write(blob, 0, blob.length);\n } else {\n try {\n is = mContentResolver.openInputStream(partURI);\n byte[] buffer = new byte[256];\n int len = is.read(buffer);\n while (len >= 0) {\n baos.write(buffer, 0, len);\n len = is.read(buffer);\n }\n } catch (IOException e) {\n Log.e(TAG, \"String_Node_Str\", e);\n c.close();\n throw new MmsException(e);\n } finally {\n if (is != null) {\n try {\n is.close();\n } catch (IOException e) {\n Log.e(TAG, \"String_Node_Str\", e);\n }\n }\n }\n }\n part.setData(baos.toByteArray());\n }\n parts[partIdx++] = part;\n }\n } finally {\n if (c != null) {\n c.close();\n }\n }\n return parts;\n}\n"
|
"public IStatus doAction() {\n try {\n IStructuredSelection selection = (TreeSelection) page.getTreeViewer().getSelection();\n XSDComponent xSDCom = null;\n if (selection.getFirstElement() instanceof Element) {\n TreePath tPath = ((TreeSelection) selection).getPaths()[0];\n for (int i = 0; i < tPath.getSegmentCount(); i++) {\n if (tPath.getSegment(i) instanceof XSDAnnotation)\n xSDCom = (XSDAnnotation) (tPath.getSegment(i));\n }\n } else\n xSDCom = (XSDComponent) selection.getFirstElement();\n XSDAnnotationsStructure struc = new XSDAnnotationsStructure(xSDCom);\n if (struc.getAnnotation() == null) {\n throw new RuntimeException(\"String_Node_Str\" + selection.getFirstElement().getClass().getName());\n }\n dlg = new AnnotationOrderedListsDialog(new ArrayList(struc.getForeignKeyInfos().values()), new SelectionListener() {\n public void widgetDefaultSelected(SelectionEvent e) {\n }\n public void widgetSelected(SelectionEvent e) {\n dlg.close();\n }\n }, page.getSite().getShell(), \"String_Node_Str\", \"String_Node_Str\", page, AnnotationOrderedListsDialog.AnnotationForeignKeyInfo_ActionType, dataModelName);\n dlg.setBlockOnOpen(true);\n int ret = dlg.open();\n if (ret == Window.CANCEL) {\n return Status.CANCEL_STATUS;\n }\n struc.setForeignKeyInfos(dlg.getXPaths());\n if (struc.hasChanged()) {\n page.refresh();\n page.getTreeViewer().expandToLevel(selection.getFirstElement(), 2);\n page.markDirty();\n }\n } catch (Exception e) {\n e.printStackTrace();\n MessageDialog.openError(page.getSite().getShell(), \"String_Node_Str\", \"String_Node_Str\" + e.getLocalizedMessage());\n return Status.CANCEL_STATUS;\n }\n return Status.OK_STATUS;\n}\n"
|
"private void endStatefulConnection() {\n try {\n jcoContext.end(destination);\n } catch (JCoException e) {\n LOG.warn(\"String_Node_Str\", e);\n } finally {\n destination = null;\n }\n}\n"
|
"protected Class<?> resolveElementType() {\n Class<?> attributeType = ReflectionUtils.getResolvedMethodReturnType(entityViewClass, method);\n Class<?>[] typeArguments = ReflectionUtils.getResolvedMethodReturnTypeArguments(entityViewClass, method);\n if (typeArguments.length == 0 || AnnotationUtils.findAnnotation(method, MappingSingular.class) != null || AnnotationUtils.findAnnotation(method, MappingParameter.class) != null) {\n return attributeType;\n }\n return typeArguments[typeArguments.length - 1];\n}\n"
|
"private boolean matchCondition(Map<String, MatchPair> condition, URL url, URL param) {\n Map<String, String> sample = url.toMap();\n boolean result = false;\n for (Map.Entry<String, MatchPair> matchPair : condition.entrySet()) {\n String key = matchPair.getKey();\n String sampleValue;\n if (invocation != null && (Constants.METHOD_KEY.equals(key) || Constants.METHODS_KEY.equals(key))) {\n sampleValue = invocation.getMethodName();\n } else {\n sampleValue = sample.get(key);\n }\n if (sampleValue != null) {\n if (!matchPair.getValue().isMatch(sampleValue, param)) {\n return false;\n } else {\n result = true;\n }\n } else {\n if (matchPair.getValue().matches.size() > 0) {\n return false;\n } else {\n result = true;\n }\n }\n }\n return true;\n}\n"
|
"protected Trace createTrace(Object target, Object[] args) {\n final Request request = (Request) args[0];\n if (isAsynchronousProcess(request)) {\n final Trace trace = getTraceMetadata(request);\n if (trace != null) {\n trace.recordApi(SERVLET_ASYNCHRONOUS_API_TAG);\n getTraceContext().attachTraceObject(trace);\n return trace;\n }\n }\n final String requestURI = request.getRequestURI();\n if (excludeUrlFilter.filter(requestURI)) {\n if (isTrace) {\n logger.trace(\"String_Node_Str\", requestURI);\n }\n return null;\n }\n final boolean sampling = samplingEnable(request);\n if (!sampling) {\n final TraceContext traceContext = getTraceContext();\n final Trace trace = traceContext.disableSampling();\n if (isDebug) {\n logger.debug(\"String_Node_Str\", request.getRequestURI(), request.getRemoteAddr());\n }\n return trace;\n }\n final TraceId traceId = populateTraceIdFromRequest(request);\n if (traceId != null) {\n final TraceContext traceContext = getTraceContext();\n final Trace trace = traceContext.continueTraceObject(traceId);\n if (trace.canSampled()) {\n recordRootSpan(trace, request);\n setTraceMetadata(request, trace);\n if (isDebug) {\n logger.debug(\"String_Node_Str\", new Object[] { traceId, request.getRequestURI(), request.getRemoteAddr() });\n }\n } else {\n if (isDebug) {\n logger.debug(\"String_Node_Str\", new Object[] { traceId, request.getRequestURI(), request.getRemoteAddr() });\n }\n }\n return trace;\n } else {\n final TraceContext traceContext = getTraceContext();\n final Trace trace = traceContext.newTraceObject();\n if (trace.canSampled()) {\n recordRootSpan(trace, request);\n setTraceMetadata(request, trace);\n if (isDebug) {\n logger.debug(\"String_Node_Str\", request.getRequestURI(), request.getRemoteAddr());\n }\n } else {\n if (isDebug) {\n logger.debug(\"String_Node_Str\", request.getRequestURI(), request.getRemoteAddr());\n }\n }\n return trace;\n }\n}\n"
|
"public boolean isNameVisibleTo(FeedbackQuestionAttributes question, FeedbackResponseAttributes response, String userEmail, UserType.Role role, boolean isGiverName, CourseRoster roster) {\n if (question == null) {\n return false;\n }\n List<FeedbackParticipantType> showNameTo = isGiverName ? question.showGiverNameTo : question.showRecipientNameTo;\n if (question.giverType != FeedbackParticipantType.TEAMS) {\n if (response.giverEmail.equals(userEmail)) {\n return true;\n }\n } else {\n if (roster.isStudentsInSameTeam(response.giverEmail, userEmail)) {\n return true;\n }\n }\n for (FeedbackParticipantType type : showNameTo) {\n switch(type) {\n case INSTRUCTORS:\n if (roster.getInstructorForEmail(userEmail) != null && role == UserType.Role.INSTRUCTOR) {\n return true;\n } else {\n break;\n }\n case OWN_TEAM_MEMBERS:\n case OWN_TEAM_MEMBERS_INCLUDING_SELF:\n if (roster.isStudentsInSameTeam(response.giverEmail, userEmail)) {\n return true;\n } else {\n break;\n }\n case RECEIVER:\n if (question.recipientType.isTeam()) {\n if (roster.isStudentInTeam(userEmail, response.recipientEmail)) {\n return true;\n }\n break;\n } else if (response.recipientEmail.equals(userEmail)) {\n return true;\n } else {\n break;\n }\n case RECEIVER_TEAM_MEMBERS:\n if (question.recipientType.isTeam()) {\n if (roster.isStudentInTeam(userEmail, response.recipientEmail)) {\n return true;\n }\n break;\n } else if (roster.isStudentsInSameTeam(response.recipientEmail, userEmail)) {\n return true;\n } else {\n break;\n }\n case STUDENTS:\n if (roster.isStudentInCourse(userEmail)) {\n return true;\n } else {\n break;\n }\n default:\n Assumption.fail(\"String_Node_Str\" + \"String_Node_Str\");\n break;\n }\n }\n return false;\n}\n"
|
"public void testSnapshotOutputRateLimitQuery11() throws InterruptedException {\n log.info(\"String_Node_Str\");\n SiddhiManager siddhiManager = new SiddhiManager();\n siddhiManager.defineStream(\"String_Node_Str\");\n String queryReference = siddhiManager.addQuery(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n siddhiManager.addCallback(queryReference, new QueryCallback() {\n public void receive(long timeStamp, Event[] inEvents, Event[] removeEvents) {\n EventPrinter.print(timeStamp, inEvents, removeEvents);\n count++;\n if (count == 2) {\n Assert.assertTrue((Long) inEvents[0].getData0() == 9l);\n } else if (count == 3) {\n Assert.assertTrue((Long) inEvents[0].getData0() == 9l);\n } else if (count == 4) {\n Assert.assertTrue((Long) inEvents[0].getData0() == 21l);\n }\n eventArrived = true;\n }\n });\n InputHandler loginSucceedEvents = siddhiManager.getInputHandler(\"String_Node_Str\");\n Thread.sleep(1100);\n loginSucceedEvents.send(new Object[] { System.currentTimeMillis(), \"String_Node_Str\", 3 });\n loginSucceedEvents.send(new Object[] { System.currentTimeMillis(), \"String_Node_Str\", 6 });\n Thread.sleep(2200);\n loginSucceedEvents.send(new Object[] { System.currentTimeMillis(), \"String_Node_Str\", 2 });\n loginSucceedEvents.send(new Object[] { System.currentTimeMillis(), \"String_Node_Str\", 10 });\n Thread.sleep(1200);\n Assert.assertEquals(\"String_Node_Str\", true, eventArrived);\n Assert.assertEquals(\"String_Node_Str\", 3, count);\n Assert.assertEquals(\"String_Node_Str\", true, value > 3);\n siddhiManager.shutdown();\n}\n"
|
"public List<PostCommentListingURL> getMoreUrls() {\n final ArrayList<PostCommentListingURL> urls = new ArrayList<PostCommentListingURL>(16);\n if (mSrc.count > 0) {\n for (JsonValue child : mSrc.children) {\n if (child.getType() == JsonValue.Type.STRING) {\n urls.add(mPostUrl.commentId(child.asString()));\n }\n }\n }\n return urls;\n}\n"
|
"private void onDirectoryChanged(Path path, WatchEvent.Kind<Path> kind) {\n executor.checkOnThread();\n boolean isProject = path.toString().endsWith(PROJECT_FILE_EXTENSION);\n boolean isPledge = path.toString().endsWith(PLEDGE_FILE_EXTENSION);\n boolean isCreate = kind == StandardWatchEventKinds.ENTRY_CREATE || kind == StandardWatchEventKinds.ENTRY_MODIFY;\n boolean isDelete = kind == StandardWatchEventKinds.ENTRY_DELETE || kind == StandardWatchEventKinds.ENTRY_MODIFY;\n if (isProject || isPledge)\n log.info(\"String_Node_Str\", path, kind);\n if (isProject && path.getParent().equals(AppDirectory.dir())) {\n if (isDelete) {\n log.info(\"String_Node_Str\", path);\n Project project = projectsByPath.get(path);\n if (project != null) {\n if (kind == StandardWatchEventKinds.ENTRY_MODIFY) {\n log.info(\"String_Node_Str\");\n this.tryLoadProject(path, projects.indexOf(project));\n } else {\n projects.remove(project);\n projectsByPath.remove(path);\n synchronized (this) {\n projectsById.remove(project.getID());\n }\n }\n }\n } else if (isCreate) {\n log.info(\"String_Node_Str\", path);\n this.tryLoadProject(path);\n }\n } else if (isPledge) {\n if (isDelete) {\n LHProtos.Pledge pledge = pledgesByPath.get(path);\n if (pledge != null) {\n log.info(\"String_Node_Str\", path);\n synchronized (this) {\n Project project = projectsById.get(pledge.getProjectId());\n ObservableSet<LHProtos.Pledge> projectPledges = this.getPledgesFor(project);\n checkNotNull(projectPledges);\n projectPledges.remove(pledge);\n }\n pledgesByPath.remove(path);\n } else {\n log.error(\"String_Node_Str\", path);\n }\n }\n if (isCreate) {\n this.tryLoadPledge(path);\n }\n }\n}\n"
|
"public static void getAllSelectedTarget(HandlerContext handlerCtx) {\n String prefix = (String) GuiUtil.getSessionValue(REST_URL);\n List<String> targetList = (List) handlerCtx.getInputValue(\"String_Node_Str\");\n String resourceName = (String) handlerCtx.getInputValue(\"String_Node_Str\");\n List<String> selectedTargetList = new ArrayList<>();\n String endpoint;\n for (String targetName : targetList) {\n endpoint = prefix + CLUSTER + targetName + RESOURCE_REF + resourceName;\n boolean existsInCluster = isEndpointValid(endpoint);\n if (!existsInCluster) {\n endpoint = prefix + DEPLOYMENT_GROUP + targetName + RESOURCE_REF + resourceName;\n boolean existsInDeploymentGroup = isEndpointValid(endpoint);\n if (!existsInDeploymentGroup) {\n endpoint = prefix + SERVER + targetName + RESOURCE_REF + resourceName;\n boolean existsInServer = isEndpointValid(endpoint);\n if (existsInServer) {\n selectedTargetList.add(targetName);\n }\n }\n if (existsInDeploymentGroup) {\n selectedTargetList.add(targetName);\n }\n }\n if (existsInCluster) {\n selectedTargetList.add(targetName);\n }\n }\n handlerCtx.setOutputValue(\"String_Node_Str\", selectedTargetList);\n}\n"
|
"public synchronized boolean isLocalValuePresent(ConfigProperty configProperty) {\n checkArgument(configProperty != null, \"String_Node_Str\");\n String value = baseConfig.getString(configProperty.getName());\n return (value != null ? true : false);\n}\n"
|
"public void doLayout(List<? extends IGLLayoutElement> children, float w, float h) {\n super.doLayout(children, w, h);\n List<? extends IGLLayoutElement> childs = children.subList(firstColumn(), children.size());\n if (headerHovered)\n childrenHovered = true;\n if (childrenHovered && !this.isCollapsed()) {\n float y = h;\n for (IGLLayoutElement child : childs) {\n child.setBounds(0, y, w, h);\n y += h;\n }\n } else {\n for (IGLLayoutElement child : childs) child.setBounds(0, h, w, 0);\n }\n}\n"
|
"public Long checkinFromUrl(Long poid, String comment, Long deserializerOid, String fileName, String urlString, Boolean merge, Boolean sync) throws ServerException, UserException {\n requireAuthenticationAndRunningServer();\n final DatabaseSession session = getBimServer().getDatabase().createSession();\n String username = \"String_Node_Str\";\n String userUsername = \"String_Node_Str\";\n try {\n User user = (User) session.get(StorePackage.eINSTANCE.getUser(), getAuthorization().getUoid(), Query.getDefault());\n username = user.getName();\n userUsername = user.getUsername();\n Path homeDirIncoming = getBimServer().getHomeDir().resolve(\"String_Node_Str\");\n if (!Files.isDirectory(homeDirIncoming)) {\n Files.createDirectory(homeDirIncoming);\n }\n Path userDirIncoming = homeDirIncoming.resolve(userUsername);\n if (!Files.exists(userDirIncoming)) {\n Files.createDirectory(userDirIncoming);\n }\n URL url = new URL(urlString);\n URLConnection openConnection = url.openConnection();\n InputStream input = openConnection.getInputStream();\n DateFormat dateFormat = new SimpleDateFormat(\"String_Node_Str\");\n if (fileName == null) {\n if (urlString.contains(\"String_Node_Str\")) {\n fileName = urlString.substring(urlString.lastIndexOf(\"String_Node_Str\") + 1);\n } else {\n fileName = urlString;\n }\n fileName = URLDecoder.decode(fileName, Charsets.UTF_8.name());\n } else {\n fileName = dateFormat.format(new Date()) + \"String_Node_Str\" + fileName;\n }\n Path file = userDirIncoming.resolve(fileName);\n DeserializerPluginConfiguration deserializerPluginConfiguration = session.get(StorePackage.eINSTANCE.getDeserializerPluginConfiguration(), deserializerOid, Query.getDefault());\n if (deserializerPluginConfiguration == null) {\n throw new UserException(\"String_Node_Str\" + deserializerOid + \"String_Node_Str\");\n }\n OutputStream outputStream = Files.newOutputStream(file);\n InputStream inputStream = new MultiplexingInputStream(input, outputStream);\n DeserializerPlugin deserializerPlugin = (DeserializerPlugin) getBimServer().getPluginManager().getPlugin(deserializerPluginConfiguration.getPluginDescriptor().getPluginClassName(), true);\n ObjectType settings = deserializerPluginConfiguration.getSettings();\n Deserializer deserializer = deserializerPlugin.createDeserializer(new PluginConfiguration(settings));\n deserializer.init(getBimServer().getDatabase().getMetaDataManager().getPackageMetaData(\"String_Node_Str\"));\n IfcModelInterface model = deserializer.read(inputStream, fileName, 0, null);\n CheckinDatabaseAction checkinDatabaseAction = new CheckinDatabaseAction(getBimServer(), null, getInternalAccessMethod(), poid, getAuthorization(), model, comment, fileName, merge);\n LongCheckinAction longAction = new LongCheckinAction(-1L, getBimServer(), username, userUsername, getAuthorization(), checkinDatabaseAction);\n getBimServer().getLongActionManager().start(longAction);\n if (sync) {\n longAction.waitForCompletion();\n }\n return longAction.getProgressTopic().getKey().getId();\n } catch (UserException e) {\n throw e;\n } catch (Throwable e) {\n LOGGER.error(\"String_Node_Str\", e);\n throw new ServerException(e);\n } finally {\n session.close();\n }\n}\n"
|
"private void restructureFeedforward() {\n CreateFeedforward dialog = new CreateFeedforward(EncogWorkBench.getInstance().getMainWindow());\n BasicNetwork network = (BasicNetwork) method;\n ActivationFunction oldActivationOutput = network.getActivation(network.getLayerCount() - 1);\n dialog.setActivationFunctionOutput(oldActivationOutput);\n dialog.getInputCount().setValue(network.getInputCount());\n dialog.getOutputCount().setValue(network.getOutputCount());\n int hiddenLayerCount = network.getLayerCount() - 2;\n ActivationFunction oldActivationHidden = new ActivationTANH();\n for (int i = 0; i < hiddenLayerCount; i++) {\n int num = network.getLayerNeuronCount(i + 1);\n String str = \"String_Node_Str\" + (i + 1) + \"String_Node_Str\" + num + \"String_Node_Str\";\n dialog.getHidden().getModel().addElement(str);\n }\n dialog.setActivationFunctionHidden(oldActivationHidden);\n if (dialog.process()) {\n if ((dialog.getActivationFunctionHidden() != oldActivationHidden) || (dialog.getActivationFunctionOutput() != oldActivationOutput) || dialog.getHidden().getModel().size() != (network.getLayerCount() - 2)) {\n FeedForwardPattern feedforward = new FeedForwardPattern();\n feedforward.setActivationFunction(dialog.getActivationFunctionHidden());\n feedforward.setInputNeurons(dialog.getInputCount().getValue());\n for (int i = 0; i < dialog.getHidden().getModel().size(); i++) {\n String str = (String) dialog.getHidden().getModel().getElementAt(i);\n int i1 = str.indexOf(':');\n int i2 = str.indexOf(\"String_Node_Str\");\n if (i1 != -1 && i2 != -1) {\n str = str.substring(i1 + 1, i2).trim();\n int neuronCount = Integer.parseInt(str);\n feedforward.addHiddenLayer(neuronCount);\n }\n }\n feedforward.setInputNeurons(dialog.getInputCount().getValue());\n feedforward.setOutputNeurons(dialog.getOutputCount().getValue());\n this.method = (BasicNetwork) feedforward.generate();\n ((ProjectEGFile) getEncogObject()).setObject(this.method);\n produceReport();\n } else {\n PruneSelective prune = new PruneSelective(network);\n int newInputCount = dialog.getInputCount().getValue();\n int newOutputCount = dialog.getOutputCount().getValue();\n if (newInputCount != network.getInputCount()) {\n prune.changeNeuronCount(0, newInputCount);\n }\n if (newOutputCount != network.getOutputCount()) {\n prune.changeNeuronCount(0, newOutputCount);\n }\n for (int i = 0; i < network.getLayerCount() - 2; i++) {\n int newHiddenCount = 1;\n String str = (String) dialog.getHidden().getModel().getElementAt(i);\n int i1 = str.indexOf(':');\n int i2 = str.indexOf(\"String_Node_Str\");\n if (i1 != -1 && i2 != -1) {\n str = str.substring(i1 + 1, i2).trim();\n newHiddenCount = Integer.parseInt(str);\n }\n if (network.getLayerNeuronCount(i) != newHiddenCount) {\n prune.changeNeuronCount(i + 1, newHiddenCount);\n }\n }\n }\n setDirty(true);\n produceReport();\n }\n}\n"
|
"public void launchVideoCamera() {\n MediaUtils.launchVideoCamera(this, this);\n}\n"
|
"protected Set<CGNode> getTargetsForCall(final CGNode caller, final CallSiteReference site, InstanceKey[][] invs) {\n IntSet params = contextSelector.getRelevantParameters(caller, site);\n if (!site.isStatic() && !params.contains(0)) {\n params = IntSetUtil.makeMutableCopy(params);\n ((MutableIntSet) params).add(0);\n }\n final Set<CGNode> targets = HashSetFactory.make();\n VoidFunction<InstanceKey[]> f = new VoidFunction<InstanceKey[]>() {\n public void apply(InstanceKey[] v) {\n IClass recv = null;\n if (site.isDispatch()) {\n recv = v[0].getConcreteType();\n }\n CGNode target = getTargetForCall(caller, site, recv, v);\n if (target != null) {\n targets.add(target);\n }\n }\n };\n iterateCrossProduct(caller, instruction, params, invs, f);\n return targets;\n}\n"
|
"private Collection createDynamicSelectionChoices(String pattern, String dataSetName, String labelStmt, String valueStmt, String dataType, int limit, boolean fixedOrder) {\n ArrayList choices = new ArrayList();\n ReportDesignHandle report = (ReportDesignHandle) this.runnable.getDesignHandle();\n DataSetHandle dataSet = report.findDataSet(dataSetName);\n if (dataSet != null) {\n try {\n IDataEngine dataEngine = executionContext.getDataEngine();\n DataRequestSession dteSession = getDataSession();\n dataEngine.defineDataSet(dataSet);\n ScriptExpression labelExpr = null;\n if (labelStmt != null && labelStmt.length() > 0) {\n labelExpr = new ScriptExpression(labelStmt);\n }\n ScriptExpression valueExpr = new ScriptExpression(valueStmt);\n QueryDefinition queryDefn = new QueryDefinition();\n queryDefn.setDataSetName(dataSetName);\n if (limit > 0) {\n queryDefn.setMaxRows(limit);\n }\n Iterator paramIter = dataSet.paramBindingsIterator();\n while (paramIter.hasNext()) {\n ParamBindingHandle binding = (ParamBindingHandle) paramIter.next();\n String paramName = binding.getParamName();\n String paramExpr = binding.getExpression();\n queryDefn.getInputParamBindings().add(new InputParameterBinding(paramName, new ScriptExpression(paramExpr)));\n }\n String labelColumnName = LABEL_PREFIX;\n ;\n String valueColumnName = VALUE_PREFIX;\n ;\n if (labelExpr != null) {\n queryDefn.addResultSetExpression(labelColumnName, labelExpr);\n }\n queryDefn.addResultSetExpression(valueColumnName, valueExpr);\n queryDefn.setAutoBinding(true);\n IPreparedQuery query = dteSession.prepare(queryDefn, getAppContext());\n IQueryResults result = query.execute(executionContext.getSharedScope());\n IResultIterator iter = result.getResultIterator();\n int count = 0;\n Map checkPool = new HashMap();\n while (iter.next()) {\n String label = null;\n if (labelExpr != null) {\n label = iter.getString(labelColumnName);\n }\n Object value = iter.getValue(valueColumnName);\n value = convertToType(value, dataType);\n if (isDistinct) {\n if (!checkPool.containsKey(value)) {\n checkPool.put(value, value);\n choices.add(new SelectionChoice(label, value));\n count++;\n }\n } else {\n choices.add(new SelectionChoice(label, value));\n count++;\n if ((limit != 0) && (count >= limit)) {\n break;\n }\n }\n }\n } catch (BirtException ex) {\n ex.printStackTrace();\n }\n }\n if (!fixedOrder)\n Collections.sort(choices, new SelectionChoiceComparator(true, pattern, ULocale.forLocale(locale)));\n return choices;\n}\n"
|
"public void openServer(final ScriptObjectMirror socketServer, final Map<String, Object> options) {\n ClientAuth auth = ClientAuth.NONE;\n String authSpec = (String) options.get(\"String_Node_Str\");\n if (authSpec.toLowerCase().trim().equals(\"String_Node_Str\")) {\n auth = ClientAuth.REQUEST;\n } else if (authSpec.toLowerCase().trim().equals(\"String_Node_Str\")) {\n auth = ClientAuth.REQUIRED;\n }\n final NetServerOptions serverOptions = new NetServerOptions().setClientAuth(auth).setHost((String) options.get(\"String_Node_Str\")).setIdleTimeout((Integer) options.get(\"String_Node_Str\")).setTcpKeepAlive((Boolean) options.get(\"String_Node_Str\")).setPort((Integer) options.get(\"String_Node_Str\")).setReceiveBufferSize((Integer) options.get(\"String_Node_Str\")).setSendBufferSize((Integer) options.get(\"String_Node_Str\")).setSsl((Boolean) options.get(\"String_Node_Str\")).setTcpNoDelay((Boolean) options.get(\"String_Node_Str\"));\n if (serverOptions.isSsl()) {\n PfxOptions pfxOptions = new PfxOptions();\n String pfxKeyCertPath = (String) options.get(\"String_Node_Str\");\n File pfxKeyCertFile = FileUtilities.nameToFile(pfxKeyCertPath, null);\n if (pfxKeyCertFile == null) {\n _error(socketServer, \"String_Node_Str\");\n return;\n }\n try {\n pfxOptions.setPath(pfxKeyCertFile.getCanonicalPath());\n } catch (IOException e) {\n _error(socketServer, \"String_Node_Str\" + pfxKeyCertFile);\n return;\n }\n String pfxKeyCertPassword = (String) options.get(\"String_Node_Str\");\n pfxOptions.setPassword(pfxKeyCertPassword);\n serverOptions.setPfxKeyCertOptions(pfxOptions);\n if (serverOptions.getClientAuth() != ClientAuth.NONE) {\n PemTrustOptions pemTrustOptions = new PemTrustOptions();\n String caCertPath = (String) options.get(\"String_Node_Str\");\n File caCertFile = FileUtilities.nameToFile(caCertPath, null);\n if (caCertFile == null) {\n _error(socketServer, \"String_Node_Str\");\n return;\n }\n try {\n pemTrustOptions.addCertPath(caCertFile.getCanonicalPath());\n serverOptions.setPemTrustOptions(pemTrustOptions);\n } catch (IOException e) {\n _error(socketServer, \"String_Node_Str\" + caCertFile);\n return;\n }\n }\n }\n submit(() -> {\n final NetServer server = _vertx.createNetServer(serverOptions);\n _issueResponse(() -> {\n socketServer.callMember(\"String_Node_Str\", server);\n });\n server.connectHandler(socket -> {\n socketServer.callMember(\"String_Node_Str\", socket);\n });\n try {\n server.listen(result -> {\n _issueResponse(() -> {\n if (result.succeeded()) {\n socketServer.callMember(\"String_Node_Str\", \"String_Node_Str\", server.actualPort());\n } else {\n _error(\"String_Node_Str\" + result);\n }\n });\n });\n } catch (Throwable ex) {\n _error(socketServer, \"String_Node_Str\" + ex);\n }\n });\n}\n"
|
"private List<SearchResult> parse_search(String html) {\n Document doc = Jsoup.parse(html);\n if (doc.select(\"String_Node_Str\").size() > 0) {\n last_error = doc.select(\"String_Node_Str\").text().trim();\n return null;\n } else if (doc.select(\"String_Node_Str\").size() > 0) {\n last_error = doc.select(\"String_Node_Str\").text().trim();\n return null;\n }\n this.results = doc.select(\"String_Node_Str\").first().text();\n if (results.contains(\"String_Node_Str\") || results.contains(\"String_Node_Str\")) {\n reusehtml = html;\n last_error = \"String_Node_Str\";\n return null;\n }\n Elements table = doc.select(\"String_Node_Str\");\n identifier = null;\n List<SearchResult> results = new ArrayList<SearchResult>();\n for (int i = 0; i < table.size(); i++) {\n Element tr = table.get(i);\n SearchResult sr = new SearchResult();\n if (tr.select(\"String_Node_Str\").size() > 0) {\n String[] fparts = tr.select(\"String_Node_Str\").get(0).attr(\"String_Node_Str\").split(\"String_Node_Str\");\n sr.setType(fparts[fparts.length - 1].replace(\"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\").toLowerCase());\n }\n String desc = \"String_Node_Str\";\n List<Node> children = tr.child(2).childNodes();\n int childrennum = children.size();\n boolean haslink = false;\n for (int ch = 0; ch < childrennum; ch++) {\n Node node = children.get(ch);\n if (node instanceof TextNode) {\n String text = ((TextNode) node).text().trim();\n if (!text.equals(\"String_Node_Str\"))\n desc += text + \"String_Node_Str\";\n } else if (node instanceof Element) {\n if (((Element) node).tag().getName().equals(\"String_Node_Str\")) {\n if (node.hasAttr(\"String_Node_Str\") && !haslink) {\n haslink = true;\n desc += ((Element) node).text() + \"String_Node_Str\";\n try {\n List<NameValuePair> anyurl = URLEncodedUtils.parse(new URI(((Element) node).attr(\"String_Node_Str\")), \"String_Node_Str\");\n for (NameValuePair nv : anyurl) {\n if (nv.getName().equals(\"String_Node_Str\")) {\n identifier = nv.getValue();\n break;\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n }\n }\n if (desc.endsWith(\"String_Node_Str\"))\n desc = desc.substring(0, desc.length() - 6);\n sr.setInnerhtml(desc);\n sr.setNr(i);\n sr.setId(null);\n results.add(sr);\n }\n resultcount = results.size();\n return results;\n}\n"
|
"private static Integer getInteger(ExpressionTree expression) {\n if (expression.is(NUMERIC_LITERAL)) {\n LiteralTree literal = (LiteralTree) expression;\n Integer decoded;\n try {\n decoded = Integer.decode(literal.value());\n return decoded;\n } catch (NumberFormatException e) {\n return null;\n }\n }\n return null;\n}\n"
|
"public void netCatIsCompleted(Result result) {\n switch(result.op) {\n case CONNECT:\n case LISTEN:\n Socket socket = result.getSocket();\n output = new ByteArrayOutputStream();\n netCat.setSocket(socket);\n netCat.setOutput(output);\n netCat.executeParallel(RECEIVE.toString());\n EventBus.getDefault().post(new ActivityEvent(CONNECTED));\n break;\n case RECEIVE:\n outputView.setText(output.toString());\n break;\n case SEND:\n inputText.setText(\"String_Node_Str\");\n break;\n case DISCONNECT:\n Toast.makeText(getActivity(), \"String_Node_Str\", Toast.LENGTH_LONG).show();\n EventBus.getDefault().post(new ActivityEvent(IDLE, outputView.getText().toString()));\n break;\n }\n updateUIWithValidation();\n}\n"
|
"protected void createContents() {\n super.createContents();\n shlNewSortedSet.setText(\"String_Node_Str\");\n text.setEditable(false);\n text.removeModifyListener(new ModifyKey());\n btnOk.setEnabled(true);\n Iterator<Tuple> i = values.iterator();\n while (i.hasNext()) {\n Tuple entry = i.next();\n TableItem item = new TableItem(table, SWT.NONE);\n String[] zvalues = new String[] { Double.toString(entry.getScore()), entry.getElement() };\n item.setText(zvalues);\n }\n}\n"
|
"public BigDecimal getMinSalePrice(PurchaseOrder purchaseOrder, PurchaseOrderLine purchaseOrderLine) throws AxelorException {\n Product product = purchaseOrderLine.getProduct();\n return currencyService.getAmountCurrencyConverted(product.getSaleCurrency(), purchaseOrder.getCurrency(), product.getSalePrice(), purchaseOrder.getOrderDate());\n}\n"
|
"public void endElement(String namespaceURI, String localName, String qName) throws SAXException {\n try {\n if (null != selfRecords) {\n for (int x = 0, selfRecordsSize = selfRecords.size(); x < selfRecordsSize; x++) {\n UnmarshalRecord selfRecord = selfRecords.get(x);\n if (selfRecord != null) {\n selfRecord.endElement(namespaceURI, localName, qName);\n } else {\n getFragmentBuilder().endSelfElement(namespaceURI, localName, qName);\n }\n }\n }\n if (-1 != unmappedLevel && unmappedLevel <= levelIndex) {\n if (levelIndex == unmappedLevel) {\n unmappedLevel = -1;\n }\n levelIndex--;\n return;\n }\n NodeValue unmarshalNodeValue = xPathNode.getUnmarshalNodeValue();\n if (null != unmarshalNodeValue) {\n boolean isIncludedInAttributeGroup = true;\n if (unmarshalNodeValue.isMappingNodeValue()) {\n Mapping mapping = ((MappingNodeValue) unmarshalNodeValue).getMapping();\n isIncludedInAttributeGroup = this.unmarshalAttributeGroup.containsAttributeInternal(mapping.getAttributeName());\n }\n try {\n if (isIncludedInAttributeGroup) {\n unmarshalNodeValue.endElement(xPathFragment, this);\n } else {\n resetStringBuffer();\n }\n } catch (EclipseLinkException e) {\n if ((null == xmlReader) || (null == xmlReader.getErrorHandler())) {\n throw e;\n } else {\n SAXParseException saxParseException = new SAXParseException(e.getLocalizedMessage(), getDocumentLocator(), e);\n xmlReader.getErrorHandler().warning(saxParseException);\n }\n }\n } else {\n XPathNode textNode = xPathNode.getTextNode();\n if (null != textNode && getStringBuffer().length() == 0) {\n NodeValue textNodeUnmarshalNodeValue = textNode.getUnmarshalNodeValue();\n if (textNode.isWhitespaceAware()) {\n if (textNodeUnmarshalNodeValue.isMappingNodeValue()) {\n Mapping mapping = ((MappingNodeValue) textNodeUnmarshalNodeValue).getMapping();\n if (mapping.isAbstractDirectMapping() && isNil()) {\n Object nullValue = ((DirectMapping) mapping).getNullValue();\n if (!(Constants.EMPTY_STRING.equals(nullValue))) {\n setAttributeValue(null, mapping);\n this.removeNullCapableValue((NullCapableValue) textNodeUnmarshalNodeValue);\n }\n } else {\n textNodeUnmarshalNodeValue.endElement(xPathFragment, this);\n }\n isXsiNil = false;\n }\n } else {\n if (textNodeUnmarshalNodeValue.isMappingNodeValue()) {\n Mapping mapping = ((MappingNodeValue) textNodeUnmarshalNodeValue).getMapping();\n if (mapping.isAbstractDirectMapping() && !isXsiNil && ((DirectMapping) mapping).getNullPolicy().isNullRepresentedByXsiNil()) {\n removeNullCapableValue((NullCapableValue) textNodeUnmarshalNodeValue);\n }\n }\n }\n }\n }\n XPathFragment xPathFragment = xPathNode.getXPathFragment();\n if ((null != xPathFragment && xPathFragment.nameIsText()) || (xpathNodeIsMixedContent && xPathNode.getParent() != null)) {\n xPathNode = xPathNode.getParent();\n }\n NodeValue xPathNodeUnmarshalNodeValue = xPathNode.getUnmarshalNodeValue();\n if (null != xPathNodeUnmarshalNodeValue && xPathNodeUnmarshalNodeValue.isContainerValue()) {\n predictedNextXPathNode = xPathNode;\n } else {\n predictedNextXPathNode = xPathNode.getNextNode();\n }\n if (null != xPathNode.getParent()) {\n xPathNode = xPathNode.getParent();\n }\n xpathNodeIsMixedContent = false;\n unmarshalContext.endElement(this);\n typeQName = null;\n levelIndex--;\n if (this.isNil() && levelIndex > 0) {\n this.setNil(false);\n }\n if ((0 == levelIndex) && (null != parentRecord) && !isSelfRecord()) {\n endDocument();\n UnmarshalRecord pRec = parentRecord;\n while (pRec.isSelfRecord()) {\n pRec = pRec.getParentRecord();\n }\n pRec.endElement(namespaceURI, localName, qName);\n xmlReader.setContentHandler(pRec);\n xmlReader.setLexicalHandler(pRec);\n }\n } catch (EclipseLinkException e) {\n if ((null == xmlReader) || (null == xmlReader.getErrorHandler())) {\n throw e;\n } else {\n Locator locator = xmlReader.getLocator();\n SAXParseException saxParseException = new SAXParseException(null, getDocumentLocator(), e);\n xmlReader.getErrorHandler().warning(saxParseException);\n }\n }\n}\n"
|
"public CardState updateLiquid(TileEntity panel, ICardWrapper card, int range) {\n ChunkCoordinates target = card.getTarget();\n FluidTankInfo storage = LiquidStorageHelper.getStorageAt(panel.getWorldObj(), target.posX, target.posY, target.posZ);\n if (storage != null) {\n int capacity = storage.capacity;\n int amount = 0;\n int liquidId = 0;\n NBTTagCompound liquidTag = null;\n if (storage.fluid != null) {\n amount = storage.fluid.amount;\n if (storage.fluid.getFluidID() != 0 && amount > 0) {\n liquidId = storage.fluid.getFluidID();\n liquidTag = storage.fluid.tag;\n }\n }\n card.setInt(\"String_Node_Str\", capacity);\n card.setInt(\"String_Node_Str\", amount);\n card.setInt(\"String_Node_Str\", liquidId);\n card.setTag(\"String_Node_Str\", liquidTag);\n card.setDouble(\"String_Node_Str\", (double) amount);\n return CardState.OK;\n } else {\n return CardState.NO_TARGET;\n }\n}\n"
|
"public void handleAfterOpen(IDataSourceInstanceHandle dataSource) {\n if (reportContext == null)\n return;\n try {\n if (!this.useAfterOpenEventHandler) {\n ScriptStatus status = handleJS(dataSource.getScriptScope(), dataSource.getName(), AFTER_OPEN, dataSourceHandle.getAfterOpen(), afterOpenMethodID);\n if (status.didRun())\n return;\n }\n if (eventHandler != null)\n eventHandler.afterOpen(new DataSourceInstance(dataSource), reportContext);\n } catch (Exception e) {\n addException(context, e);\n }\n}\n"
|
"public void remap(FMLMissingMappingsEvent event) {\n for (FMLMissingMappingsEvent.MissingMapping mapping : event.get()) {\n if (mapping.name.toLowerCase().contains(\"String_Node_Str\")) {\n if (mapping.type == GameRegistry.Type.ITEM)\n mapping.remap(Item.getItemFromBlock(FluidRegistry.getFluid(\"String_Node_Str\").getBlock()));\n if (mapping.type == GameRegistry.Type.BLOCK)\n mapping.remap(FluidRegistry.getFluid(\"String_Node_Str\").getBlock());\n continue;\n } else if (mapping.name.toLowerCase().contains(\"String_Node_Str\") && Loader.isModLoaded(\"String_Node_Str\")) {\n if (mapping.type == GameRegistry.Type.ITEM)\n mapping.remap(Item.getItemFromBlock(FluidRegistry.getFluid(\"String_Node_Str\").getBlock()));\n if (mapping.type == GameRegistry.Type.BLOCK)\n mapping.remap(FluidRegistry.getFluid(\"String_Node_Str\").getBlock());\n continue;\n }\n for (IDust dust : BCAItemManager.dusts.getDusts()) {\n if (dust == null)\n continue;\n String name = dust.getName().toLowerCase();\n if (mapping.name.toLowerCase().contains(name)) {\n mapping.remap(GameRegistry.findItem(Variables.MOD.ID, \"String_Node_Str\" + name));\n }\n }\n }\n}\n"
|
"public static void setUpClass() throws Exception {\n int xcount = 100;\n int ycount = 10;\n JournalWriter xw = factory.writer(new JournalStructure(\"String_Node_Str\").$ts().$sym(\"String_Node_Str\").$double(\"String_Node_Str\").$double(\"String_Node_Str\").$str(\"String_Node_Str\").$sym(\"String_Node_Str\").$float(\"String_Node_Str\").$short(\"String_Node_Str\").$long(\"String_Node_Str\").$bool(\"String_Node_Str\").recordCountHint(xcount).$());\n JournalWriter yw = factory.writer(new JournalStructure(\"String_Node_Str\").$ts().$sym(\"String_Node_Str\").$double(\"String_Node_Str\").$str(\"String_Node_Str\").recordCountHint(ycount).$());\n Rnd rnd = new Rnd();\n String[] ccy = new String[3];\n for (int i = 0; i < ccy.length; i++) {\n ccy[i] = rnd.nextChars(6).toString();\n }\n int count = 100;\n long ts = Dates.parseDateTime(\"String_Node_Str\");\n for (int i = 0; i < count; i++) {\n JournalEntryWriter w = jw.entryWriter();\n w.putDate(0, ts += 10000);\n w.putSym(1, ccy[rnd.nextPositiveInt() % ccy.length]);\n w.putDouble(2, rnd.nextDouble());\n w.putDouble(3, rnd.nextDouble());\n w.putStr(4, rnd.nextChars(rnd.nextPositiveInt() % 128));\n w.putSym(5, ccy[rnd.nextPositiveInt() % ccy.length]);\n w.putFloat(6, rnd.nextFloat());\n w.putShort(7, (short) rnd.nextInt());\n w.putLong(8, rnd.nextLong());\n w.putBool(9, rnd.nextBoolean());\n w.append();\n }\n jw.commit();\n int county = 10;\n ts = Dates.parseDateTime(\"String_Node_Str\");\n for (int i = 0; i < county; i++) {\n JournalEntryWriter w = jwy.entryWriter();\n w.putDate(0, ts += 60000);\n w.putSym(1, ccy[rnd.nextPositiveInt() % ccy.length]);\n w.putDouble(2, rnd.nextDouble());\n w.putStr(3, rnd.nextChars(rnd.nextPositiveInt() % 128));\n w.append();\n }\n jwy.commit();\n JournalWriter jwa = factory.writer(new JournalStructure(\"String_Node_Str\").$ts().$sym(\"String_Node_Str\").$double(\"String_Node_Str\").$());\n JournalWriter jwb = factory.writer(new JournalStructure(\"String_Node_Str\").$ts().$sym(\"String_Node_Str\").$double(\"String_Node_Str\").$());\n JournalEntryWriter ewa;\n ewa = jwa.entryWriter();\n ewa.putDate(0, Dates.parseDateTime(\"String_Node_Str\"));\n ewa.putSym(1, \"String_Node_Str\");\n ewa.putDouble(2, 0.538);\n ewa.append();\n ewa = jwa.entryWriter();\n ewa.putDate(0, Dates.parseDateTime(\"String_Node_Str\"));\n ewa.putSym(1, \"String_Node_Str\");\n ewa.putDouble(2, 1.35);\n ewa.append();\n ewa = jwa.entryWriter();\n ewa.putDate(0, Dates.parseDateTime(\"String_Node_Str\"));\n ewa.putSym(1, \"String_Node_Str\");\n ewa.putDouble(2, 1.41);\n ewa.append();\n ewa = jwa.entryWriter();\n ewa.putDate(0, Dates.parseDateTime(\"String_Node_Str\"));\n ewa.putSym(1, \"String_Node_Str\");\n ewa.putDouble(2, 0.601);\n ewa.append();\n ewa = jwa.entryWriter();\n ewa.putDate(0, Dates.parseDateTime(\"String_Node_Str\"));\n ewa.putSym(1, \"String_Node_Str\");\n ewa.putDouble(2, 1.26);\n ewa.append();\n ewa = jwa.entryWriter();\n ewa.putDate(0, Dates.parseDateTime(\"String_Node_Str\"));\n ewa.putSym(1, \"String_Node_Str\");\n ewa.putDouble(2, 1.29);\n ewa.append();\n jwa.commit();\n JournalEntryWriter ewb;\n ewb = jwb.entryWriter();\n ewb.putDate(0, Dates.parseDateTime(\"String_Node_Str\"));\n ewb.putSym(1, \"String_Node_Str\");\n ewb.putDouble(2, 1100);\n ewb.append();\n ewb = jwb.entryWriter();\n ewb.putDate(0, Dates.parseDateTime(\"String_Node_Str\"));\n ewb.putSym(1, \"String_Node_Str\");\n ewb.putDouble(2, 1200);\n ewb.append();\n ewb = jwb.entryWriter();\n ewb.putDate(0, Dates.parseDateTime(\"String_Node_Str\"));\n ewb.putSym(1, \"String_Node_Str\");\n ewb.putDouble(2, 1500);\n ewb.append();\n ewb = jwb.entryWriter();\n ewb.putDate(0, Dates.parseDateTime(\"String_Node_Str\"));\n ewb.putSym(1, \"String_Node_Str\");\n ewb.putDouble(2, 130);\n ewb.append();\n ewb = jwb.entryWriter();\n ewb.putDate(0, Dates.parseDateTime(\"String_Node_Str\"));\n ewb.putSym(1, \"String_Node_Str\");\n ewb.putDouble(2, 150);\n ewb.append();\n ewb = jwb.entryWriter();\n ewb.putDate(0, Dates.parseDateTime(\"String_Node_Str\"));\n ewb.putSym(1, \"String_Node_Str\");\n ewb.putDouble(2, 12000);\n ewb.append();\n jwb.commit();\n}\n"
|
"public HashSet<String> search(Date dateStart, Date dateEnd, Address meetingPoint, HashSet<Dog> dogList, boolean cash) {\n loadDogSitterList();\n SimpleDateFormat dateNumDayOfWeek = new SimpleDateFormat(\"String_Node_Str\");\n int nStartDay = Integer.parseInt(dateNumDayOfWeek.format(dateStart));\n int nEndDay = Integer.parseInt(dateNumDayOfWeek.format(dateEnd));\n searchStep0(meetingPoint);\n searchStep1(dateStart, dateEnd, nStartDay, nEndDay);\n searchStep2(dateStart, dateEnd, nStartDay, nEndDay);\n searchStep3(dogList);\n searchStep4(dogList);\n searchStep5(dateStart, dateEnd, dogList);\n searchStep6(cash);\n System.out.println(\"String_Node_Str\");\n if (dogSitterSearchList.size() != 0) {\n for (DogSitter ds : dogSitterSearchList) {\n System.out.println(ds.getEmail());\n }\n } else {\n System.out.println(\"String_Node_Str\");\n }\n HashSet<String> dogSitterMailList = new HashSet<String>();\n for (DogSitter ds : dogSitterSearchList) {\n dogSitterMailList.add(ds.getEmail());\n }\n return dogSitterMailList;\n}\n"
|
"public static CompareOp getOperator(String condition, boolean idPresent) {\n if (condition.equals(\"String_Node_Str\")) {\n return CompareOp.EQUAL;\n } else if (condition.equals(\"String_Node_Str\")) {\n return CompareOp.GREATER;\n } else if (condition.equals(\"String_Node_Str\")) {\n return CompareOp.LESS;\n } else if (condition.equals(\"String_Node_Str\")) {\n return CompareOp.GREATER_OR_EQUAL;\n } else if (condition.equals(\"String_Node_Str\")) {\n return CompareOp.LESS_OR_EQUAL;\n } else if (useFilter) {\n if (!idPresent) {\n throw new UnsupportedOperationException(\"String_Node_Str\" + condition + \"String_Node_Str\");\n } else {\n throw new UnsupportedOperationException(\"String_Node_Str\" + condition + \"String_Node_Str\");\n }\n }\n}\n"
|
"public void updateScreen(boolean updatePrev) {\n updateScreenWithInstaScrollOption(updatePrev, false);\n if (!mCalc.isUnitIsSet()) {\n FragmentStatePagerAdapter tempAdapter = (FragmentStatePagerAdapter) mViewPager.getAdapter();\n ConvertKeysFragment currFrag = (ConvertKeysFragment) tempAdapter.instantiateItem(mViewPager, mViewPager.getCurrentItem());\n currFrag.clearKeySelection();\n }\n}\n"
|
"public static void onExternalPackChanged(Intent eventIntent, AnySoftKeyboard ime, AddOnsFactory... factories) {\n boolean cleared = false;\n boolean recreateView = false;\n for (AddOnsFactory<?> factory : factories) {\n try {\n if (factory.isEventRequiresCacheRefresh(eventIntent)) {\n cleared = true;\n if (factory.isEventRequiresViewReset(eventIntent))\n recreateView = true;\n Logger.d(\"String_Node_Str\", factory.getClass().getName() + \"String_Node_Str\" + recreateView);\n factory.clearAddOnList();\n }\n } catch (PackageManager.NameNotFoundException e) {\n Logger.w(\"String_Node_Str\", e, \"String_Node_Str\", factory);\n }\n }\n if (cleared)\n ime.resetAddOnsCaches(recreateView);\n}\n"
|
"public void sendChunks(int viewDistance) {\n int centX = ((int) Math.floor(loc.x())) >> 4;\n int centZ = ((int) Math.floor(loc.z())) >> 4;\n for (int x = (centX - viewDistance / 2); x <= (centX + viewDistance / 2); x += 1) {\n for (int z = (centZ - viewDistance / 2); z <= (centZ + viewDistance / 2); z += 1) {\n ChunkLocation location = ChunkLocation.create(x, z);\n if (!knownChunks.add(location))\n continue;\n bulk.addEntry(((TridentChunk) world().chunkAt(location, true)).asPacket());\n if (bulk.size() >= 1845152) {\n connection().sendPacket(bulk);\n bulk = new PacketPlayOutMapChunkBulk();\n }\n }\n }\n}\n"
|
"public String getEnv() {\n logger.debug(\"String_Node_Str\");\n PropertiesConfiguration tempConfig = new PropertiesConfiguration();\n try {\n String content = \"String_Node_Str\";\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n Map<String, String> env = System.getenv();\n for (Map.Entry<String, String> entry : env.entrySet()) {\n tempConfig.addProperty(entry.getKey(), entry.getValue());\n }\n Properties proterties = System.getProperties();\n for (Map.Entry<Object, Object> entry : proterties.entrySet()) {\n tempConfig.setProperty((String) entry.getKey(), entry.getValue());\n }\n tempConfig.save(baos);\n content = baos.toString();\n return content;\n } catch (ConfigurationException e) {\n throw new InternalErrorException(\"String_Node_Str\", e);\n }\n}\n"
|
"public boolean munge(BcelClassWeaver weaver) {\n LazyClassGen gen = weaver.getLazyClassGen();\n if (!gen.getType().equals(cflowStackField.getDeclaringType()))\n return false;\n Field f = new FieldGen(cflowStackField.getModifiers(), BcelWorld.makeBcelType(cflowStackField.getReturnType()), cflowStackField.getName(), gen.getConstantPoolGen()).getField();\n gen.addField(f);\n LazyMethodGen clinit = gen.getAjcClinit();\n InstructionList setup = new InstructionList();\n InstructionFactory fact = gen.getFactory();\n setup.append(fact.createNew(new ObjectType(NameMangler.CFLOW_STACK_TYPE)));\n setup.append(fact.createDup(1));\n setup.append(fact.createInvoke(NameMangler.CFLOW_STACK_TYPE, \"String_Node_Str\", Type.VOID, new Type[0], Constants.INVOKESPECIAL));\n setup.append(Utility.createSet(fact, cflowStackField));\n clinit.getBody().insert(setup);\n return true;\n}\n"
|
"private boolean isValidPermutation(List<Integer> permutation) {\n if (permutation.size() == 0) {\n return null;\n }\n if (hashCodes.contains(permutation)) {\n return false;\n }\n if (!isAllowedPermutation(permutation)) {\n return false;\n }\n int fold = PermutationGroup.getOrder(permutation);\n if (rotations.getOrder() > 1 && fold == 1) {\n return false;\n }\n if (fold == 0 || subunits.getSubunitCount() % fold != 0) {\n return false;\n }\n return hashCodes.add(permutation);\n}\n"
|
"public void onSuccess(Boolean confirmed) {\n if (confirmed) {\n Dialogs.showPromptDialog(messages.outcomeDetailTitle(), null, null, messages.outcomeDetailPlaceholder(), RegExp.compile(\"String_Node_Str\"), messages.cancelButton(), messages.confirmButton(), false, new AsyncCallback<String>() {\n\n public void onFailure(Throwable caught) {\n }\n public void onSuccess(final String details) {\n BrowserService.Util.getInstance().deleteFile(selected, details, new AsyncCallback<Void>() {\n public void onSuccess(Void result) {\n Toast.showInfo(messages.runningInBackgroundTitle(), messages.runningInBackgroundDescription());\n Timer timer = new Timer() {\n public void run() {\n HistoryUtils.newHistory(HistoryUtils.getCurrentHistoryPath());\n callback.onSuccess(ActionImpact.DESTROYED);\n }\n };\n timer.schedule(RodaConstants.ACTION_TIMEOUT);\n }\n public void onFailure(Throwable caught) {\n callback.onFailure(caught);\n }\n });\n }\n });\n }\n}\n"
|
"private Pair<Panel, Integer> addItemToList(ItemStack stack, WidgetList itemList, Pair<Panel, Integer> currentPos, int numcolumns, int labelWidth, int spacing, int slot, boolean newgroup, String groupName) {\n Panel panel = currentPos.getKey();\n if (panel == null || currentPos.getValue() >= numcolumns || (newgroup && groupName != null)) {\n if (newgroup && groupName != null) {\n AbstractWidget<?> groupLabel = new Label(mc, this).setText(groupName).setColor(ModularStorageConfiguration.groupForeground).setColor(StyleConfig.colorTextInListNormal).setHorizontalAlignment(HorizontalAlignment.ALIGN_LEFT).setFilledBackground(ModularStorageConfiguration.groupBackground).setDesiredHeight(10).setDesiredWidth(231);\n itemList.addChild(new Panel(mc, this).setLayout(new HorizontalLayout().setHorizontalMargin(2).setVerticalMargin(0)).setDesiredHeight(10).addChild(groupLabel));\n }\n panel = new Panel(mc, this).setLayout(new HorizontalLayout().setSpacing(spacing)).setDesiredHeight(12).setUserObject(new Integer(-1)).setDesiredHeight(16);\n currentPos = MutablePair.of(panel, 0);\n itemList.addChild(panel);\n }\n BlockRender blockRender = new BlockRender(mc, this).setRenderItem(stack).setUserObject(new Integer(slot)).setOffsetX(-1).setOffsetY(-1);\n panel.addChild(blockRender);\n if (labelWidth > 0) {\n String displayName;\n if (labelWidth > 100) {\n displayName = typeModule.getLongLabel(stack);\n } else {\n displayName = typeModule.getShortLabel(stack);\n }\n AbstractWidget label = new Label(mc, this).setText(displayName).setColor(StyleConfig.colorTextInListNormal).setHorizontalAlignment(HorizontalAlignment.ALIGN_LEFT).setDesiredWidth(labelWidth).setUserObject(new Integer(-1));\n panel.addChild(label);\n }\n currentPos.setValue(currentPos.getValue() + 1);\n return currentPos;\n}\n"
|
"protected void paintColorScale(GlimpseContext context) {\n if (colorTexture != null) {\n GlimpseBounds bounds = getBounds(context);\n GL3 gl = context.getGL().getGL3();\n int height = bounds.getHeight();\n int width = bounds.getWidth();\n float y1 = getColorBarMinY(height);\n float y2 = getColorBarMaxY(height);\n pathOutline.clear();\n pathOutline.addRectangle(0.5f, y1, width, y2);\n xyBuffer.clear();\n xyBuffer.addQuad2f(0.5f, y1, width, y2);\n sBuffer.clear();\n sBuffer.addQuad1f(0, 0, 1, 1);\n GLUtils.enableStandardBlending(gl);\n try {\n progTex.begin(gl);\n try {\n progTex.setPixelOrtho(gl, bounds);\n progTex.draw(gl, colorTexture, xyBuffer, sBuffer);\n } finally {\n progTex.end(gl);\n }\n progOutline.begin(gl);\n try {\n progOutline.setPixelOrtho(gl, bounds);\n progOutline.setViewport(gl, bounds);\n progOutline.draw(gl, style, pathOutline);\n } finally {\n progOutline.end(gl);\n }\n } finally {\n gl.glDisable(GL.GL_BLEND);\n }\n }\n}\n"
|
"private void writePlotToStorage(final Plot plot) {\n deletePlotFromStorage(plot);\n try (PreparedStatement ps = getConnection().prepareStatement(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\")) {\n ps.setLong(1, plot.getInternalID());\n ps.setInt(2, plot.getId().getX());\n ps.setInt(3, plot.getId().getZ());\n ps.setString(4, plot.getWorld().getName().toLowerCase());\n ps.setString(5, plot.getOwnerId().toString());\n ps.setString(6, plot.getOwner());\n ps.setString(7, plot.getBiome());\n ps.setBoolean(8, plot.isFinished());\n ps.setString(9, plot.getFinishedDate());\n ps.setBoolean(10, plot.isForSale());\n ps.setDouble(11, plot.getPrice());\n ps.setBoolean(12, plot.isProtected());\n ps.setDate(13, plot.getExpiredDate());\n ps.setInt(14, plot.getTopX());\n ps.setInt(15, plot.getTopZ());\n ps.setInt(16, plot.getBottomX());\n ps.setInt(17, plot.getBottomZ());\n ps.setInt(18, plot.getLikes());\n ps.setString(19, plot.getCreatedDate());\n ps.executeUpdate();\n getConnection().commit();\n } catch (SQLException e) {\n plugin.getLogger().severe(\"String_Node_Str\");\n plugin.getLogger().severe(e.getMessage());\n plugin.getLogger().severe(\"String_Node_Str\" + e.getMessage());\n plugin.getLogger().severe(\"String_Node_Str\" + e.getErrorCode());\n plugin.getLogger().severe(\"String_Node_Str\" + e.getSQLState());\n }\n for (String denied : plot.getDenied()) {\n try (PreparedStatement ps = getConnection().prepareStatement(\"String_Node_Str\")) {\n ps.setLong(1, plot.getInternalID());\n ps.setString(2, denied);\n ps.execute();\n getConnection().commit();\n } catch (SQLException e) {\n plugin.getLogger().severe(\"String_Node_Str\" + plot.getInternalID());\n plugin.getLogger().severe(\"String_Node_Str\" + e.getMessage());\n plugin.getLogger().severe(\"String_Node_Str\" + e.getErrorCode());\n plugin.getLogger().severe(\"String_Node_Str\" + e.getSQLState());\n e.printStackTrace();\n }\n }\n for (Map.Entry<String, Plot.AccessLevel> member : plot.getMembers().entrySet()) {\n try (PreparedStatement ps = getConnection().prepareStatement(\"String_Node_Str\")) {\n ps.setLong(1, plot.getInternalID());\n ps.setString(2, member.getKey());\n ps.setInt(3, member.getValue().getLevel());\n ps.execute();\n getConnection().commit();\n } catch (SQLException e) {\n plugin.getLogger().severe(\"String_Node_Str\" + plot.getInternalID());\n plugin.getLogger().severe(\"String_Node_Str\" + e.getMessage());\n plugin.getLogger().severe(\"String_Node_Str\" + e.getErrorCode());\n plugin.getLogger().severe(\"String_Node_Str\" + e.getSQLState());\n e.printStackTrace();\n }\n }\n for (UUID player : plot.getLikers()) {\n try (PreparedStatement ps = getConnection().prepareStatement(\"String_Node_Str\")) {\n ps.setLong(1, plot.getInternalID());\n ps.setString(2, player.toString());\n ps.execute();\n getConnection().commit();\n } catch (SQLException e) {\n plugin.getLogger().severe(\"String_Node_Str\" + plot.getInternalID());\n plugin.getLogger().severe(\"String_Node_Str\" + e.getMessage());\n plugin.getLogger().severe(\"String_Node_Str\" + e.getErrorCode());\n plugin.getLogger().severe(\"String_Node_Str\" + e.getSQLState());\n e.printStackTrace();\n }\n }\n for (Map.Entry<String, Map<String, String>> metadata : plot.getAllPlotProperties().entrySet()) {\n for (Map.Entry<String, String> stringStringEntry : metadata.getValue().entrySet()) {\n try (PreparedStatement ps = getConnection().prepareStatement(\"String_Node_Str\" + \"String_Node_Str\")) {\n ps.setLong(1, plot.getInternalID());\n ps.setInt(2, plot.getId().getX());\n ps.setInt(3, plot.getId().getZ());\n ps.setString(4, plot.getWorld().getName().toLowerCase());\n ps.setString(5, plot.getOwnerId().toString());\n ps.setString(6, plot.getOwner());\n ps.setString(7, plot.getBiome());\n ps.setBoolean(8, plot.isFinished());\n ps.setString(9, plot.getFinishedDate());\n ps.setBoolean(10, plot.isForSale());\n ps.setDouble(11, plot.getPrice());\n ps.setBoolean(12, plot.isProtected());\n ps.setDate(13, plot.getExpiredDate());\n ps.setInt(14, plot.getTopX());\n ps.setInt(15, plot.getTopZ());\n ps.setInt(16, plot.getBottomX());\n ps.setInt(17, plot.getBottomZ());\n ps.setInt(18, plot.getLikes());\n ps.setString(19, plot.getCreatedDate());\n ps.executeUpdate();\n getConnection().commit();\n } catch (SQLException e) {\n plugin.getLogger().severe(\"String_Node_Str\");\n plugin.getLogger().severe(e.getMessage());\n plugin.getLogger().severe(\"String_Node_Str\" + e.getMessage());\n plugin.getLogger().severe(\"String_Node_Str\" + e.getErrorCode());\n plugin.getLogger().severe(\"String_Node_Str\" + e.getSQLState());\n }\n for (String denied : plot.getDenied()) {\n try (PreparedStatement ps = getConnection().prepareStatement(\"String_Node_Str\")) {\n ps.setLong(1, plot.getInternalID());\n ps.setString(2, denied);\n ps.execute();\n getConnection().commit();\n } catch (SQLException e) {\n plugin.getLogger().severe(\"String_Node_Str\" + plot.getInternalID());\n plugin.getLogger().severe(\"String_Node_Str\" + e.getMessage());\n plugin.getLogger().severe(\"String_Node_Str\" + e.getErrorCode());\n plugin.getLogger().severe(\"String_Node_Str\" + e.getSQLState());\n e.printStackTrace();\n }\n }\n for (Map.Entry<String, Plot.AccessLevel> member : plot.getMembers().entrySet()) {\n try (PreparedStatement ps = getConnection().prepareStatement(\"String_Node_Str\")) {\n ps.setLong(1, plot.getInternalID());\n ps.setString(2, member.getKey());\n ps.setInt(3, member.getValue().getLevel());\n ps.execute();\n getConnection().commit();\n } catch (SQLException e) {\n plugin.getLogger().severe(\"String_Node_Str\" + plot.getInternalID());\n plugin.getLogger().severe(\"String_Node_Str\" + e.getMessage());\n plugin.getLogger().severe(\"String_Node_Str\" + e.getErrorCode());\n plugin.getLogger().severe(\"String_Node_Str\" + e.getSQLState());\n e.printStackTrace();\n }\n }\n for (UUID player : plot.getLikers()) {\n try (PreparedStatement ps = getConnection().prepareStatement(\"String_Node_Str\")) {\n ps.setLong(1, plot.getInternalID());\n ps.setString(2, player.toString());\n ps.execute();\n getConnection().commit();\n } catch (SQLException e) {\n plugin.getLogger().severe(\"String_Node_Str\" + plot.getInternalID());\n plugin.getLogger().severe(\"String_Node_Str\" + e.getMessage());\n plugin.getLogger().severe(\"String_Node_Str\" + e.getErrorCode());\n plugin.getLogger().severe(\"String_Node_Str\" + e.getSQLState());\n e.printStackTrace();\n }\n }\n for (Map.Entry<String, Map<String, String>> metadata : plot.getAllPlotProperties().entrySet()) {\n for (Map.Entry<String, String> stringStringEntry : metadata.getValue().entrySet()) {\n try (PreparedStatement ps = getConnection().prepareStatement(\"String_Node_Str\" + \"String_Node_Str\")) {\n ps.setLong(1, plot.getInternalID());\n ps.setString(2, metadata.getKey());\n ps.setString(3, stringStringEntry.getKey());\n ps.setString(4, stringStringEntry.getValue());\n } catch (SQLException e) {\n plugin.getLogger().severe(\"String_Node_Str\" + e.getMessage());\n plugin.getLogger().severe(\"String_Node_Str\" + e.getErrorCode());\n plugin.getLogger().severe(\"String_Node_Str\" + e.getSQLState());\n e.printStackTrace();\n }\n }\n }\n }\n });\n}\n"
|
"public void performTest(Database database) throws JDBCException {\n CreateTableStatement statement = new CreateTableStatement(TABLE_NAME).addPrimaryKeyColumn(\"String_Node_Str\", \"String_Node_Str\").addColumn(\"String_Node_Str\", \"String_Node_Str\").addColumn(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n new JdbcTemplate(database).execute(statement);\n DatabaseSnapshot snapshot = new DatabaseSnapshot(database);\n Table table = snapshot.getTable(TABLE_NAME);\n assertEquals(TABLE_NAME.toUpperCase(), table.getName().toUpperCase());\n assertNotNull(table.getColumn(\"String_Node_Str\"));\n assertNotNull(table.getColumn(\"String_Node_Str\"));\n assertNotNull(table.getColumn(\"String_Node_Str\"));\n assertTrue(table.getColumn(\"String_Node_Str\").isPrimaryKey());\n assertNull(StringUtils.trimToNull(table.getColumn(\"String_Node_Str\").getDefaultValue()));\n assertTrue(table.getColumn(\"String_Node_Str\").getDefaultValue().indexOf(\"String_Node_Str\") >= 0);\n assertFalse(table.getColumn(\"String_Node_Str\").isAutoIncrement());\n}\n"
|
"public void updateItemsPath(ERepositoryObjectType type, IPath targetPath) throws PersistenceException {\n if (type == null) {\n return;\n }\n Project baseProject = getRepositoryContext().getProject();\n IProject project = ResourceUtils.getProject(baseProject);\n String folderPathString = ERepositoryObjectType.getFolderName(type) + IPath.SEPARATOR + targetPath.toString();\n IFolder folder = ResourceUtils.getFolder(project, folderPathString, false);\n unloadUnlockedResources();\n List<IRepositoryViewObject> serializableFromFolder = getSerializableFromFolder(baseProject, folder, null, type, true, false, true, false);\n for (IRepositoryViewObject repositoryObject : serializableFromFolder) {\n ItemState state = repositoryObject.getProperty().getItem().getState();\n state.setPath(getItemStatePath(type, targetPath).toString());\n xmiResourceManager.saveResource(state.eResource());\n }\n if (folder.exists()) {\n for (IResource current : ResourceUtils.getMembers(folder)) {\n if (current instanceof IFolder) {\n updateItemsPath(type, targetPath.append(current.getName()));\n }\n }\n }\n}\n"
|
"public boolean handle(Object value) {\n Object indValue = value;\n if (value == null) {\n indValue = 0;\n }\n if (dataset != null) {\n if (indValue instanceof FrequencyExt[]) {\n FrequencyExt[] frequencyExt = (FrequencyExt[]) indValue;\n setFrequecyToDataset(dataset, frequencyExt, indicator);\n }\n }\n if (tableViewer != null && dataset != null) {\n TableWithData input = (TableWithData) tableViewer.getInput();\n if (input != null) {\n if (this.indicator instanceof ModeIndicator) {\n ChartDataEntity entity = new ChartDataEntity();\n entity.setIndicator(indicator);\n entity.setLabel(this.indicatorName);\n entity.setValue(String.valueOf(indValue));\n input.setEntities(new ChartDataEntity[] { entity });\n } else {\n ICustomerDataset customerDataset = TOPChartUtils.getInstance().getCustomerDataset(dataset);\n if (customerDataset != null) {\n input.setEntities((customerDataset).getDataEntities());\n } else {\n input.setEntities(((ICustomerDataset) dataset).getDataEntities());\n }\n }\n }\n if (!tableViewer.getTable().isDisposed()) {\n tableViewer.getTable().clearAll();\n tableViewer.setInput(input);\n }\n }\n if (registerChart != TOPChartUtils.getInstance().getChartFromChartComposite(parentChartComposite)) {\n restoreChart();\n }\n if (!(indicator instanceof ModeIndicator)) {\n EventManager.getInstance().publish(chartComposite, EventEnum.DQ_DYNAMIC_REFRESH_DYNAMIC_CHART, null);\n }\n return true;\n}\n"
|
"private void addSnippets() {\n ElementImpl rootKid = getRootKid();\n topSnippetNode = addElement(rootKid, snippetsElementCode, 2, true);\n topSnippetNode.setAttribute(0, totalHitCountAttrCode, (docHit != null) ? Integer.toString(docHit.totalSnippets()) : \"String_Node_Str\");\n topSnippetNode.setAttribute(1, hitCountAttrCode, Integer.toString(nHits));\n if (nHits > 0)\n topSnippetNode.childNum = SNIPPET_MARKER + 0;\n}\n"
|
"public static Queue<String> getStartupOrder(ParentBehavior component) {\n Queue<String> startup = new LinkedList<String>();\n DependencyOrder dependencyOrder = component.getDependencyOrder();\n if (dependencyOrder != null) {\n Set<StartupOrder> startupOrderSet = dependencyOrder.getStartupOrders();\n for (StartupOrder startupOrder : startupOrderSet) {\n String start = startupOrder.getStart();\n String after = startupOrder.getAfter();\n if (!startup.contains(start)) {\n startup.add(start);\n if (!startup.contains(after)) {\n startup.add(after);\n } else {\n }\n } else {\n if (!startup.contains(after)) {\n startup.add(after);\n } else {\n }\n }\n }\n }\n if (component instanceof Application) {\n for (Group group : component.getAliasToGroupMap().values()) {\n if (!startup.contains(\"String_Node_Str\" + group.getAlias())) {\n startup.add(\"String_Node_Str\" + group.getAlias());\n }\n }\n }\n Set<String> cartridgeAliases = component.getClusterDataMap().keySet();\n for (String carAlias : cartridgeAliases) {\n if (!startup.contains(\"String_Node_Str\" + carAlias)) {\n startup.add(\"String_Node_Str\" + carAlias);\n }\n }\n return startup;\n}\n"
|
"public String ReadTableFooter(Node tablesxmlNode) {\n String foot = \"String_Node_Str\";\n List<Node> nl = getChildrenByTagName(tablesxmlNode, \"String_Node_Str\");\n if (nl.size() >= 1) {\n foot = Utilities.getString(nl.get(0));\n }\n return foot;\n}\n"
|
"protected void onPersist(EntityMetadata metadata, Object entity, Object id, List<RelationHolder> rlHolders) {\n if (!isOpen()) {\n throw new PersistenceException(\"String_Node_Str\");\n }\n if (isUpdate && metadata.isCounterColumnType()) {\n throw new UnsupportedOperationException(\"String_Node_Str\");\n }\n String insert_Query = null;\n if (isCql3Enabled(metadata)) {\n Cassandra.Client client = getRawClient(metadata.getPersistenceUnit(), metadata.getSchema());\n try {\n cqlClient.persist(metadata, entity, client, rlHolders, getTtlValues().get(metadata.getTableName()));\n } catch (InvalidRequestException e) {\n log.error(\"String_Node_Str\", insert_Query, e);\n throw new KunderaException(e);\n } catch (TException e) {\n log.error(\"String_Node_Str\", insert_Query, e);\n throw new KunderaException(e);\n } catch (UnavailableException e) {\n log.error(\"String_Node_Str\", insert_Query, e);\n throw new KunderaException(e);\n } catch (TimedOutException e) {\n log.error(\"String_Node_Str\", insert_Query, e);\n throw new KunderaException(e);\n } catch (SchemaDisagreementException e) {\n log.error(\"String_Node_Str\", insert_Query, e);\n throw new KunderaException(e);\n }\n } else {\n ThriftRow tf = null;\n try {\n String columnFamily = metadata.getTableName();\n tf = dataHandler.toThriftRow(entity, id, metadata, columnFamily, getTtlValues().get(columnFamily));\n } catch (Exception e) {\n log.error(\"String_Node_Str\", e);\n throw new KunderaException(e);\n }\n addRelationsToThriftRow(metadata, tf, rlHolders);\n Mutator mutator = clientFactory.getMutator(pool);\n if (metadata.isCounterColumnType()) {\n if (log.isInfoEnabled()) {\n log.info(\"String_Node_Str\", tf.getId());\n }\n List<CounterColumn> thriftCounterColumns = tf.getCounterColumns();\n List<CounterSuperColumn> thriftCounterSuperColumns = tf.getCounterSuperColumns();\n if (thriftCounterColumns != null && !thriftCounterColumns.isEmpty()) {\n mutator.writeCounterColumns(metadata.getTableName(), CassandraUtilities.toBytes(tf.getId(), tf.getId().getClass()), Arrays.asList(tf.getCounterColumns().toArray(new CounterColumn[0])));\n }\n if (thriftCounterSuperColumns != null && !thriftCounterSuperColumns.isEmpty()) {\n for (CounterSuperColumn sc : thriftCounterSuperColumns) {\n mutator.writeSubCounterColumns(metadata.getTableName(), CassandraUtilities.toBytes(tf.getId(), tf.getId().getClass()), Bytes.fromByteArray(sc.getName()), sc.getColumns());\n }\n }\n } else {\n List<Column> thriftColumns = tf.getColumns();\n List<SuperColumn> thriftSuperColumns = tf.getSuperColumns();\n if (thriftColumns != null && !thriftColumns.isEmpty()) {\n if (log.isInfoEnabled()) {\n }\n mutator.writeColumns(metadata.getTableName(), CassandraUtilities.toBytes(tf.getId(), tf.getId().getClass()), Arrays.asList(tf.getColumns().toArray(new Column[0])));\n }\n if (thriftSuperColumns != null && !thriftSuperColumns.isEmpty()) {\n for (SuperColumn sc : thriftSuperColumns) {\n if (log.isInfoEnabled()) {\n log.info(\"String_Node_Str\", tf.getId());\n }\n mutator.writeSubColumns(metadata.getTableName(), CassandraUtilities.toBytes(tf.getId(), tf.getId().getClass()), Bytes.fromByteArray(sc.getName()), sc.getColumns());\n }\n }\n }\n mutator.execute(getConsistencyLevel());\n tf = null;\n if (isTtlPerRequest()) {\n getTtlValues().clear();\n }\n }\n}\n"
|
"public JobInstance submitJob(CubeInstance cube, long startDate, long endDate, CubeBuildTypeEnum buildType, String submitter) throws IOException, JobException {\n final List<CubingJob> cubingJobs = listAllCubingJobs(cube.getName(), null, EnumSet.allOf(ExecutableState.class));\n for (CubingJob job : cubingJobs) {\n if (job.getStatus() == ExecutableState.READY || job.getStatus() == ExecutableState.RUNNING) {\n throw new JobException(\"String_Node_Str\" + cube.getName() + \"String_Node_Str\" + job.getId() + \"String_Node_Str\");\n }\n }\n CubingJob job;\n CubingJobBuilder builder = new CubingJobBuilder(new JobEngineConfig(getConfig()));\n builder.setSubmitter(submitter);\n if (buildType == CubeBuildTypeEnum.BUILD) {\n if (cube.getDescriptor().hasHolisticCountDistinctMeasures() && cube.getSegments().size() > 0) {\n Pair<CubeSegment, CubeSegment> segs = getCubeManager().appendAndMergeSegments(cube, endDate);\n job = builder.buildAndMergeJob(segs.getFirst(), segs.getSecond());\n } else {\n CubeSegment newSeg = getCubeManager().appendSegments(cube, startDate, endDate);\n job = builder.buildJob(newSeg);\n }\n } else if (buildType == CubeBuildTypeEnum.MERGE) {\n CubeSegment newSeg = getCubeManager().mergeSegments(cube, startDate, endDate);\n job = builder.mergeJob(newSeg);\n } else {\n throw new JobException(\"String_Node_Str\" + buildType);\n }\n getExecutableManager().addJob(job);\n return parseToJobInstance(job);\n}\n"
|
"private static HttpHandler getSecurityHandlerChain(final IdentityManager identityManager, final AccessManager accessManager) {\n HttpHandler handler = null;\n if (identityManager != null) {\n final List<AuthenticationMechanism> mechanisms = new ArrayList<>();\n mechanisms.add(new AuthTokenAuthenticationMechanism(RESTHEART_REALM));\n mechanisms.add(new BasicAuthenticationMechanism(RESTHEART_REALM));\n handler = buildSecurityHandlerChain(next, accessManager, identityManager, mechanisms);\n }\n return handler;\n}\n"
|
"public void draw(Graphics g) {\n ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n for (int i = 0; i < MAX_FINGER_BLOBS; i++) {\n Finger f = blobs[i];\n if (f != null)\n bloblist.add(f);\n for (Finger blob : bloblist) {\n if (blob != null && blob.getState() == FingerState.PRESSED) {\n int x = (int) (width * (blob.getX()));\n int y = (int) (height * (1 - blob.getY()));\n int xsize = (int) (10 * blob.getSize() * (blob.getMajorAxis() / 2));\n int ysize = (int) (10 * blob.getSize() * (blob.getMinorAxis() / 2));\n int ang = blob.getAngle();\n if (x > 0 && y > 0) {\n Color pitchcolor = new Color((int) Math.floor((x / 800.0) * 255), 255 - (int) Math.floor((y / 600.0) * 255), 0);\n g.setColor(pitchcolor);\n Ellipse2D ellipse = new Ellipse2D.Float(0, 0, xsize, ysize);\n AffineTransform at = AffineTransform.getTranslateInstance(0, 0);\n at.translate(x - xsize / 2, y - ysize / 2);\n at.rotate((Math.PI / 180) * -ang, xsize / 2, ysize / 2);\n ((Graphics2D) g).fill(at.createTransformedShape(ellipse));\n g.setColor(Color.DARK_GRAY);\n }\n }\n }\n if (bloblist.size() > 10)\n bloblist.remove(0);\n }\n}\n"
|
"public void open() {\n if (isOpened) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n isOpened = true;\n logger.info(\"String_Node_Str\", startingState);\n logger.info(\"String_Node_Str\", endingState);\n deserializer = getFactoryManager().createNewDeserializerInstance();\n retryManager = getFactoryManager().createNewFailedMsgRetryManagerInstance();\n retryManager.open(getSpoutConfig());\n if (consumer == null) {\n final PersistenceAdapter persistenceAdapter = getFactoryManager().createNewPersistenceAdapterInstance();\n persistenceAdapter.open(getTopologyConfig());\n final List<String> kafkaBrokers = (List<String>) getTopologyConfigItem(SidelineSpoutConfig.KAFKA_BROKERS);\n final String topic = (String) getTopologyConfigItem(SidelineSpoutConfig.KAFKA_TOPIC);\n final ConsumerConfig consumerConfig = new ConsumerConfig(kafkaBrokers, getVirtualSpoutId(), topic);\n consumerConfig.setNumberOfConsumers(topologyContext.getComponentTasks(topologyContext.getThisComponentId()).size());\n consumerConfig.setIndexOfConsumer(topologyContext.getThisTaskIndex());\n consumer = new Consumer(consumerConfig, persistenceAdapter);\n }\n consumer.open(startingState);\n nextTupleTimeBuckets.put(\"String_Node_Str\", 0L);\n nextTupleTimeBuckets.put(\"String_Node_Str\", 0L);\n nextTupleTimeBuckets.put(\"String_Node_Str\", 0L);\n nextTupleTimeBuckets.put(\"String_Node_Str\", 0L);\n nextTupleTimeBuckets.put(\"String_Node_Str\", 0L);\n nextTupleTimeBuckets.put(\"String_Node_Str\", 0L);\n nextTupleTimeBuckets.put(\"String_Node_Str\", 0L);\n nextTupleTimeBuckets.put(\"String_Node_Str\", 0L);\n nextTupleTimeBuckets.put(\"String_Node_Str\", 0L);\n ackTimeBuckets.put(\"String_Node_Str\", 0L);\n ackTimeBuckets.put(\"String_Node_Str\", 0L);\n ackTimeBuckets.put(\"String_Node_Str\", 0L);\n ackTimeBuckets.put(\"String_Node_Str\", 0L);\n ackTimeBuckets.put(\"String_Node_Str\", 0L);\n ackTimeBuckets.put(\"String_Node_Str\", 0L);\n}\n"
|
"public static Tensor1DStats get1DTensorStats(INDArray array, int dimension) {\n int tensorLength = array.size(dimension);\n int numTensors = array.length() / tensorLength;\n int firstTensorOffset = array.offset();\n int tensorStartSeparation;\n int elementWiseStride;\n if (numTensors == 1) {\n tensorStartSeparation = -1;\n elementWiseStride = array.elementWiseStride();\n } else {\n INDArray secondTensor = array.tensorAlongDimension(1, dimension);\n tensorStartSeparation = secondTensor.offset() - firstTensorOffset;\n elementWiseStride = secondTensor.elementWiseStride();\n }\n return new Tensor1DStats(firstTensorOffset, tensorStartSeparation, numTensors, tensorLength, elementWiseStride);\n}\n"
|
"private CreatureType getMob(int UID) {\n if (CreatureType.fromName(mob.getString(UID)) != null) {\n return CreatureType.fromName(mob.getString(UID));\n }\n System.out.println(\"String_Node_Str\");\n return CreatureType.CREEPER;\n}\n"
|
"public int getOffset() {\n Assert.isTrue(this.offset >= 0, \"String_Node_Str\");\n return this.offset;\n}\n"
|
"private void setupWidthSeekBar(final SeekBar widthSeekBar, final EditText widthText, int imageWidth) {\n widthSeekBar.setMax(mMaxImageWidth / 10);\n if (imageWidth != 0) {\n widthSeekBar.setProgress(imageWidth / 10);\n widthText.setText(String.format(Locale.US, getString(R.string.pixel_suffix), imageWidth));\n }\n widthSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {\n public void onStopTrackingTouch(SeekBar seekBar) {\n }\n public void onStartTrackingTouch(SeekBar seekBar) {\n }\n public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n if (progress == 0) {\n progress = 1;\n }\n widthText.setText(progress * 10 + \"String_Node_Str\");\n }\n });\n widthText.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n public void onFocusChange(View v, boolean hasFocus) {\n if (hasFocus) {\n widthText.setText(\"String_Node_Str\");\n }\n }\n });\n widthText.setOnEditorActionListener(new TextView.OnEditorActionListener() {\n public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n int width = getEditTextIntegerClamped(widthText, 10, mMaxImageWidth);\n widthSeekBar.setProgress(width / 10);\n widthText.setSelection((String.valueOf(width).length()));\n InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(widthText.getWindowToken(), InputMethodManager.RESULT_UNCHANGED_SHOWN);\n return true;\n }\n });\n}\n"
|
"public static String convertActionScriptLayer(int layerIndex, int spriteId, List<Tag> tags, List<Tag> timeLineTags, String backgroundColor) {\n String ret = \"String_Node_Str\";\n String script = \"String_Node_Str\";\n int duration = 0;\n int frame = 0;\n for (Tag t : tags) {\n if (t instanceof DoInitActionTag) {\n DoInitActionTag dia = (DoInitActionTag) t;\n if (dia.spriteId == spriteId) {\n script += convertActionScript(dia);\n }\n }\n }\n if (!script.equals(\"String_Node_Str\")) {\n script = \"String_Node_Str\" + script + \"String_Node_Str\";\n }\n for (Tag t : timeLineTags) {\n if (t instanceof DoActionTag) {\n DoActionTag da = (DoActionTag) t;\n script += convertActionScript(da);\n }\n if (t instanceof ShowFrameTag) {\n if (script.equals(\"String_Node_Str\")) {\n duration++;\n } else {\n if (duration > 0) {\n ret += \"String_Node_Str\" + (frame - duration) + \"String_Node_Str\";\n if (duration > 1) {\n ret += \"String_Node_Str\" + duration + \"String_Node_Str\";\n }\n ret += \"String_Node_Str\" + KEY_MODE_NORMAL + \"String_Node_Str\";\n ret += \"String_Node_Str\";\n ret += \"String_Node_Str\";\n ret += \"String_Node_Str\";\n }\n ret += \"String_Node_Str\" + frame + \"String_Node_Str\";\n ret += \"String_Node_Str\" + KEY_MODE_NORMAL + \"String_Node_Str\";\n ret += \"String_Node_Str\";\n ret += script;\n ret += \"String_Node_Str\";\n ret += \"String_Node_Str\";\n ret += \"String_Node_Str\";\n ret += \"String_Node_Str\";\n script = \"String_Node_Str\";\n duration = 0;\n }\n frame++;\n }\n }\n if (!ret.equals(\"String_Node_Str\")) {\n ret = \"String_Node_Str\" + (layerIndex + 1) + \"String_Node_Str\" + randomOutlineColor() + \"String_Node_Str\" + \"String_Node_Str\" + ret + \"String_Node_Str\" + \"String_Node_Str\";\n }\n return ret;\n}\n"
|
"private Session session() throws IOException {\n try {\n JSch.setConfig(\"String_Node_Str\", \"String_Node_Str\");\n JSch.setLogger(new JschLogger());\n final JSch jsch = new JSch();\n final File file = File.createTempFile(\"String_Node_Str\", \"String_Node_Str\");\n FileUtils.forceDeleteOnExit(file);\n FileUtils.write(file, this.key.replaceAll(\"String_Node_Str\", \"String_Node_Str\").replaceAll(\"String_Node_Str\", \"String_Node_Str\").trim(), CharEncoding.UTF_8);\n jsch.setHostKeyRepository(new EasyRepo());\n jsch.addIdentity(file.getAbsolutePath());\n Logger.debug(this, \"String_Node_Str\", this.getLogin(), this.getAddr(), this.getPort(), file.length());\n final Session session = jsch.getSession(this.getLogin(), this.getAddr(), this.getPort());\n session.setServerAliveInterval((int) TimeUnit.SECONDS.toMillis(Tv.TEN));\n session.setServerAliveCountMax(Tv.MILLION);\n session.connect();\n FileUtils.deleteQuietly(file);\n return session;\n } catch (final JSchException ex) {\n throw new IOException(ex);\n }\n}\n"
|
"public static boolean installed() {\n if (hasManager()) {\n return manager.installed();\n } else {\n return false;\n }\n}\n"
|
"public void run() {\n while (!stop[0]) {\n try {\n Connection conn = DriverManager.getConnection(writeUrl, \"String_Node_Str\", \"String_Node_Str\");\n conn.createStatement().execute(\"String_Node_Str\");\n conn.close();\n } catch (Exception e) {\n }\n }\n}\n"
|
"private Node selectSingleText(Node contextNode) {\n NodeList childrenNodes = contextNode.getChildNodes();\n int numberOfNodes = childrenNodes.getLength();\n if (numberOfNodes == 0) {\n return null;\n }\n if (childrenNodes.getLength() == 1) {\n Node child = childrenNodes.item(0);\n if (child.getNodeType() == Node.TEXT_NODE || child.getNodeType() == Node.CDATA_SECTION_NODE) {\n return child;\n }\n return null;\n }\n String returnVal = null;\n for (int i = 0; i < childrenNodes.getLength(); i++) {\n Node next = childrenNodes.item(i);\n if (next.getNodeType() == Node.TEXT_NODE || next.getNodeType() == Node.CDATA_SECTION_NODE) {\n String val = next.getNodeValue();\n if (val != null) {\n if (returnVal == null) {\n returnVal = new String();\n }\n if (next.getNodeType() == Node.CDATA_SECTION_NODE) {\n val = val.trim();\n }\n returnVal += val;\n }\n }\n }\n if (returnVal != null) {\n return contextNode.getOwnerDocument().createTextNode(returnVal);\n }\n return null;\n}\n"
|
"protected boolean isRootEmpty() {\n if (root != null) {\n Iterator iter = root.getChildren();\n while (iter.hasNext()) {\n CellArea cell = (CellArea) iter.next();\n if (cell.getChildrenCount() > 0) {\n return false;\n }\n }\n if (this.isRowFinished()) {\n return false;\n }\n return true;\n }\n}\n"
|