idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,545,361
public static StartExecutionResponse unmarshall(StartExecutionResponse startExecutionResponse, UnmarshallerContext _ctx) {<NEW_LINE>startExecutionResponse.setRequestId(_ctx.stringValue("StartExecutionResponse.RequestId"));<NEW_LINE>Execution execution = new Execution();<NEW_LINE>execution.setExecutionId(_ctx.stringValue("StartExecutionResponse.Execution.ExecutionId"));<NEW_LINE>execution.setTemplateName(_ctx.stringValue("StartExecutionResponse.Execution.TemplateName"));<NEW_LINE>execution.setTemplateId(_ctx.stringValue("StartExecutionResponse.Execution.TemplateId"));<NEW_LINE>execution.setTemplateVersion(_ctx.stringValue("StartExecutionResponse.Execution.TemplateVersion"));<NEW_LINE>execution.setMode(_ctx.stringValue("StartExecutionResponse.Execution.Mode"));<NEW_LINE>execution.setLoopMode(_ctx.stringValue("StartExecutionResponse.Execution.LoopMode"));<NEW_LINE>execution.setExecutedBy(_ctx.stringValue("StartExecutionResponse.Execution.ExecutedBy"));<NEW_LINE>execution.setStartDate(_ctx.stringValue("StartExecutionResponse.Execution.StartDate"));<NEW_LINE>execution.setEndDate(_ctx.stringValue("StartExecutionResponse.Execution.EndDate"));<NEW_LINE>execution.setCreateDate(_ctx.stringValue("StartExecutionResponse.Execution.CreateDate"));<NEW_LINE>execution.setUpdateDate(_ctx.stringValue("StartExecutionResponse.Execution.UpdateDate"));<NEW_LINE>execution.setStatus(_ctx.stringValue("StartExecutionResponse.Execution.Status"));<NEW_LINE>execution.setStatusMessage(_ctx.stringValue("StartExecutionResponse.Execution.StatusMessage"));<NEW_LINE>execution.setParentExecutionId(_ctx.stringValue("StartExecutionResponse.Execution.ParentExecutionId"));<NEW_LINE>execution.setParameters(_ctx.stringValue("StartExecutionResponse.Execution.Parameters"));<NEW_LINE>execution.setOutputs(_ctx.stringValue("StartExecutionResponse.Execution.Outputs"));<NEW_LINE>execution.setSafetyCheck(_ctx.stringValue("StartExecutionResponse.Execution.SafetyCheck"));<NEW_LINE>execution.setIsParent(_ctx.booleanValue("StartExecutionResponse.Execution.IsParent"));<NEW_LINE>execution.setCounters<MASK><NEW_LINE>execution.setRamRole(_ctx.stringValue("StartExecutionResponse.Execution.RamRole"));<NEW_LINE>execution.setTags(_ctx.mapValue("StartExecutionResponse.Execution.Tags"));<NEW_LINE>execution.setDescription(_ctx.stringValue("StartExecutionResponse.Execution.Description"));<NEW_LINE>execution.setResourceGroupId(_ctx.stringValue("StartExecutionResponse.Execution.ResourceGroupId"));<NEW_LINE>List<CurrentTask> currentTasks = new ArrayList<CurrentTask>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("StartExecutionResponse.Execution.CurrentTasks.Length"); i++) {<NEW_LINE>CurrentTask currentTask = new CurrentTask();<NEW_LINE>currentTask.setTaskExecutionId(_ctx.stringValue("StartExecutionResponse.Execution.CurrentTasks[" + i + "].TaskExecutionId"));<NEW_LINE>currentTask.setTaskName(_ctx.stringValue("StartExecutionResponse.Execution.CurrentTasks[" + i + "].TaskName"));<NEW_LINE>currentTask.setTaskAction(_ctx.stringValue("StartExecutionResponse.Execution.CurrentTasks[" + i + "].TaskAction"));<NEW_LINE>currentTasks.add(currentTask);<NEW_LINE>}<NEW_LINE>execution.setCurrentTasks(currentTasks);<NEW_LINE>startExecutionResponse.setExecution(execution);<NEW_LINE>return startExecutionResponse;<NEW_LINE>}
(_ctx.mapValue("StartExecutionResponse.Execution.Counters"));
1,568,471
protected void describeDetections(List<SiftPoint> detections) {<NEW_LINE>for (int detIdx = 0; detIdx < detections.size(); detIdx++) {<NEW_LINE>SiftPoint p = detections.get(detIdx);<NEW_LINE>// Would it be faster if all features that come from the same images were processed at once?<NEW_LINE>// Would it reduce context switching?<NEW_LINE>// Gradient image is offset by one<NEW_LINE>GrayF32 derivX = gradient.getDerivX(p.octaveIdx, (byte) (p.scaleIdx - 1));<NEW_LINE>GrayF32 derivY = gradient.getDerivY(p.octaveIdx, (byte) <MASK><NEW_LINE>orientation.setImageGradient(derivX, derivY);<NEW_LINE>describe.setImageGradient(derivX, derivY);<NEW_LINE>double pixelScaleToInput = scaleSpace.pixelScaleCurrentToInput(p.octaveIdx);<NEW_LINE>// adjust the image for the down sampling in each octave<NEW_LINE>double localX = p.pixel.x / pixelScaleToInput;<NEW_LINE>double localY = p.pixel.y / pixelScaleToInput;<NEW_LINE>double localSigma = p.scale / pixelScaleToInput;<NEW_LINE>// find potential orientations first<NEW_LINE>orientation.process(localX, localY, localSigma);<NEW_LINE>// describe each feature<NEW_LINE>DogArray_F64 angles = orientation.getOrientations();<NEW_LINE>for (int angleIdx = 0; angleIdx < angles.size; angleIdx++) {<NEW_LINE>describe.process(localX, localY, localSigma, angles.get(angleIdx), features.grow());<NEW_LINE>orientations.add(angles.get(angleIdx));<NEW_LINE>locations.add(p);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(p.scaleIdx - 1));
219,280
private void init() {<NEW_LINE>facade = Overlap2DFacade.getInstance();<NEW_LINE>projectManager = facade.retrieveProxy(ProjectManager.NAME);<NEW_LINE>resourceManager = <MASK><NEW_LINE>UIStageMediator uiStageMediator = facade.retrieveMediator(UIStageMediator.NAME);<NEW_LINE>uiStage = uiStageMediator.getViewComponent();<NEW_LINE>sceneLoader = new SceneLoader(resourceManager);<NEW_LINE>// adding spine as external component<NEW_LINE>sceneLoader.injectExternalItemType(new SpineItemType());<NEW_LINE>// Remove Physics System and add Adjusting System for box2d objects to follow items and stop world tick<NEW_LINE>sceneLoader.engine.removeSystem(sceneLoader.engine.getSystem(PhysicsSystem.class));<NEW_LINE>sceneLoader.engine.addSystem(new PhysicsAdjustSystem(sceneLoader.world));<NEW_LINE>sceneLoader.engine.getSystem(Overlap2dRenderer.class).setPhysicsOn(false);<NEW_LINE>sceneControl = new SceneControlMediator(sceneLoader);<NEW_LINE>itemControl = new ItemControlMediator(sceneControl);<NEW_LINE>selector = new ItemSelector(this);<NEW_LINE>}
facade.retrieveProxy(ResourceManager.NAME);
508,080
public List<? extends ExecutableElement> findOverridableMethods(TypeElement type) {<NEW_LINE>List<ExecutableElement> overridable = new ArrayList<>();<NEW_LINE>final Set<Modifier> notOverridable = EnumSet.copyOf(NOT_OVERRIDABLE);<NEW_LINE>if (!type.getModifiers().contains(Modifier.ABSTRACT)) {<NEW_LINE>notOverridable.add(Modifier.ABSTRACT);<NEW_LINE>}<NEW_LINE>DeclaredType dt = (DeclaredType) type.asType();<NEW_LINE>Types <MASK><NEW_LINE>Set<String> typeStrings = new HashSet<>();<NEW_LINE>for (ExecutableElement ee : ElementFilter.methodsIn(info.getElements().getAllMembers(type))) {<NEW_LINE>TypeMirror methodType = types.erasure(types.asMemberOf(dt, ee));<NEW_LINE>String methodTypeString = ee.getSimpleName().toString() + methodType.toString();<NEW_LINE>if (typeStrings.contains(methodTypeString)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Set<Modifier> set = EnumSet.copyOf(notOverridable);<NEW_LINE>set.removeAll(ee.getModifiers());<NEW_LINE>if (// do not offer package private methods in case they're from different package<NEW_LINE>set.size() == notOverridable.size() && !overridesPackagePrivateOutsidePackage(ee, type) && !isOverridden(ee, type)) {<NEW_LINE>overridable.add(ee);<NEW_LINE>if (ee.getModifiers().contains(Modifier.ABSTRACT)) {<NEW_LINE>typeStrings.add(methodTypeString);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Collections.reverse(overridable);<NEW_LINE>return overridable;<NEW_LINE>}
types = JavacTypes.instance(ctx);
858,427
public OBinaryResponse executeCommit37(OCommit37Request request) {<NEW_LINE>ODatabaseDocumentInternal database = connection.getDatabase();<NEW_LINE>final OTransactionOptimisticServer tx;<NEW_LINE>if (request.isHasContent()) {<NEW_LINE>tx = new OTransactionOptimisticServer(database, request.getTxId(), request.isUsingLog(), request.getOperations(), request.getIndexChanges());<NEW_LINE>try {<NEW_LINE>database.rawBegin(tx);<NEW_LINE>} catch (final ORecordNotFoundException e) {<NEW_LINE>throw e.getCause() instanceof OOfflineClusterException ? (OOfflineClusterException) e.getCause() : e;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (database.getTransaction().isActive()) {<NEW_LINE>tx = <MASK><NEW_LINE>} else {<NEW_LINE>throw new ODatabaseException("No transaction active on the server, send full content");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>tx.assignClusters();<NEW_LINE>database.commit();<NEW_LINE>List<OCommit37Response.OCreatedRecordResponse> createdRecords = new ArrayList<>(tx.getCreatedRecords().size());<NEW_LINE>for (Entry<ORecordId, ORecord> entry : tx.getCreatedRecords().entrySet()) {<NEW_LINE>ORecord record = entry.getValue();<NEW_LINE>createdRecords.add(new OCommit37Response.OCreatedRecordResponse(entry.getKey(), (ORecordId) record.getIdentity(), record.getVersion()));<NEW_LINE>}<NEW_LINE>List<OCommit37Response.OUpdatedRecordResponse> updatedRecords = new ArrayList<>(tx.getUpdatedRecords().size());<NEW_LINE>for (Entry<ORecordId, ORecord> entry : tx.getUpdatedRecords().entrySet()) {<NEW_LINE>updatedRecords.add(new OCommit37Response.OUpdatedRecordResponse(entry.getKey(), entry.getValue().getVersion()));<NEW_LINE>}<NEW_LINE>List<OCommit37Response.ODeletedRecordResponse> deletedRecords = new ArrayList<>(tx.getDeletedRecord().size());<NEW_LINE>for (ORID id : tx.getDeletedRecord()) {<NEW_LINE>deletedRecords.add(new OCommit37Response.ODeletedRecordResponse(id));<NEW_LINE>}<NEW_LINE>OSBTreeCollectionManager collectionManager = database.getSbTreeCollectionManager();<NEW_LINE>Map<UUID, OBonsaiCollectionPointer> changedIds = null;<NEW_LINE>if (collectionManager != null) {<NEW_LINE>changedIds = new HashMap<>(collectionManager.changedIds());<NEW_LINE>collectionManager.clearChangedIds();<NEW_LINE>}<NEW_LINE>return new OCommit37Response(createdRecords, updatedRecords, deletedRecords, changedIds);<NEW_LINE>}
(OTransactionOptimisticServer) database.getTransaction();
1,343,227
protected Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {<NEW_LINE>Parser parser = new Parser(PATTERN, (String) msg);<NEW_LINE>if (!parser.matches()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, parser.next());<NEW_LINE>if (deviceSession == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Position position = new Position(getProtocolName());<NEW_LINE>position.setDeviceId(deviceSession.getDeviceId());<NEW_LINE>position.set(Position.KEY_ALARM, decodeAlarm(parser.nextInt()));<NEW_LINE>if (parser.hasNext()) {<NEW_LINE>position.setValid(parser.next().equals("A"));<NEW_LINE>} else {<NEW_LINE>position.setValid(true);<NEW_LINE>}<NEW_LINE>position.setTime(parser.nextDateTime(Parser.DateTimeFormat.DMY_HMS));<NEW_LINE>position.setLatitude(parser.nextCoordinate());<NEW_LINE>position.setLongitude(parser.nextCoordinate());<NEW_LINE>if (parser.hasNext(9)) {<NEW_LINE>position.setSpeed(UnitsConverter.knotsFromKph(parser.nextInt()));<NEW_LINE>position.set(Position.KEY_ODOMETER, parser.nextInt());<NEW_LINE>position.setCourse(parser.nextInt());<NEW_LINE>position.setAltitude(parser.nextInt());<NEW_LINE>position.set(Position.KEY_SATELLITES, parser.nextInt());<NEW_LINE>position.set(Position.KEY_CHARGE, parser.nextInt() > 0);<NEW_LINE>position.set(Position.KEY_BATTERY_LEVEL, parser.nextInt());<NEW_LINE>position.set(<MASK><NEW_LINE>position.set(Position.KEY_BLOCKED, parser.nextInt() > 0);<NEW_LINE>}<NEW_LINE>return position;<NEW_LINE>}
"mode", parser.next());
1,263,761
protected JFreeChart createXyAreaChart() throws JRException {<NEW_LINE>ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());<NEW_LINE>JFreeChart jfreeChart = ChartFactory.createXYAreaChart(evaluateTextExpression(getChart().getTitleExpression()), evaluateTextExpression(((JRAreaPlot) getPlot()).getCategoryAxisLabelExpression()), evaluateTextExpression(((JRAreaPlot) getPlot()).getValueAxisLabelExpression()), (XYDataset) getDataset(), getPlot().getOrientationValue().getOrientation(), isShowLegend(), true, false);<NEW_LINE>configureChart(jfreeChart, getPlot());<NEW_LINE>JRAreaPlot areaPlot = (JRAreaPlot) getPlot();<NEW_LINE>// Handle the axis formating for the category axis<NEW_LINE>configureAxis(jfreeChart.getXYPlot().getDomainAxis(), areaPlot.getCategoryAxisLabelFont(), areaPlot.getCategoryAxisLabelColor(), areaPlot.getCategoryAxisTickLabelFont(), areaPlot.getCategoryAxisTickLabelColor(), areaPlot.getCategoryAxisTickLabelMask(), areaPlot.getCategoryAxisVerticalTickLabels(), areaPlot.getOwnCategoryAxisLineColor(), false, (Comparable<?>) evaluateExpression(areaPlot.getDomainAxisMinValueExpression()), (Comparable<?>) evaluateExpression<MASK><NEW_LINE>// Handle the axis formating for the value axis<NEW_LINE>configureAxis(jfreeChart.getXYPlot().getRangeAxis(), areaPlot.getValueAxisLabelFont(), areaPlot.getValueAxisLabelColor(), areaPlot.getValueAxisTickLabelFont(), areaPlot.getValueAxisTickLabelColor(), areaPlot.getValueAxisTickLabelMask(), areaPlot.getValueAxisVerticalTickLabels(), areaPlot.getOwnValueAxisLineColor(), true, (Comparable<?>) evaluateExpression(areaPlot.getRangeAxisMinValueExpression()), (Comparable<?>) evaluateExpression(areaPlot.getRangeAxisMaxValueExpression()));<NEW_LINE>return jfreeChart;<NEW_LINE>}
(areaPlot.getDomainAxisMaxValueExpression()));
285,006
public double[] calcEquation(List<List<String>> equations, double[] values, List<List<String>> queries) {<NEW_LINE>int n = equations.size();<NEW_LINE>p = new HashMap<>();<NEW_LINE><MASK><NEW_LINE>for (List<String> e : equations) {<NEW_LINE>p.put(e.get(0), e.get(0));<NEW_LINE>p.put(e.get(1), e.get(1));<NEW_LINE>w.put(e.get(0), 1.0);<NEW_LINE>w.put(e.get(1), 1.0);<NEW_LINE>}<NEW_LINE>for (int i = 0; i < n; ++i) {<NEW_LINE>List<String> e = equations.get(i);<NEW_LINE>String a = e.get(0), b = e.get(1);<NEW_LINE>String pa = find(a), pb = find(b);<NEW_LINE>if (Objects.equals(pa, pb)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>p.put(pa, pb);<NEW_LINE>w.put(pa, w.get(b) * values[i] / w.get(a));<NEW_LINE>}<NEW_LINE>int m = queries.size();<NEW_LINE>double[] ans = new double[m];<NEW_LINE>for (int i = 0; i < m; ++i) {<NEW_LINE>String c = queries.get(i).get(0), d = queries.get(i).get(1);<NEW_LINE>ans[i] = !p.containsKey(c) || !p.containsKey(d) || !Objects.equals(find(c), find(d)) ? -1.0 : w.get(c) / w.get(d);<NEW_LINE>}<NEW_LINE>return ans;<NEW_LINE>}
w = new HashMap<>();
1,461,133
public SortedMap<Integer, Map<String, String>> read(BufferedReader bRdr) throws IOException {<NEW_LINE>SortedMap<Integer, Map<String, String>> map = new TreeMap<>();<NEW_LINE>Map<String, String> fields = new HashMap<>();<NEW_LINE>String number = "";<NEW_LINE>String query = "";<NEW_LINE>String description = "";<NEW_LINE>String line;<NEW_LINE>while ((line = bRdr.readLine()) != null) {<NEW_LINE>line = line.trim();<NEW_LINE>if (line.startsWith("<qid")) {<NEW_LINE>number = line.substring(5, line.length() - 6).trim();<NEW_LINE>}<NEW_LINE>if (line.startsWith("<content>") && line.endsWith("</content>")) {<NEW_LINE>query = line.substring(9, line.length() - 10).trim();<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (line.startsWith("<description>") && line.endsWith("</description>")) {<NEW_LINE>description = line.substring(13, line.length() - 14).trim();<NEW_LINE>fields.put("description", description);<NEW_LINE>}<NEW_LINE>if (line.startsWith("</query>")) {<NEW_LINE>map.put(Integer.valueOf(number), fields);<NEW_LINE>fields = new HashMap<>();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return map;<NEW_LINE>}
fields.put("title", query);
1,187,263
public static SortingParams toSortingParams(@Nullable SortParameters params) {<NEW_LINE>SortingParams jedisParams = null;<NEW_LINE>if (params != null) {<NEW_LINE>jedisParams = new SortingParams();<NEW_LINE>byte[] byPattern = params.getByPattern();<NEW_LINE>if (byPattern != null) {<NEW_LINE>jedisParams.by(params.getByPattern());<NEW_LINE>}<NEW_LINE>byte[][] getPattern = params.getGetPattern();<NEW_LINE>if (getPattern != null) {<NEW_LINE>jedisParams.get(getPattern);<NEW_LINE>}<NEW_LINE>Range limit = params.getLimit();<NEW_LINE>if (limit != null) {<NEW_LINE>jedisParams.limit((int) limit.getStart(), (int) limit.getCount());<NEW_LINE>}<NEW_LINE>Order order = params.getOrder();<NEW_LINE>if (order != null && order.equals(Order.DESC)) {<NEW_LINE>jedisParams.desc();<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (isAlpha != null && isAlpha) {<NEW_LINE>jedisParams.alpha();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return jedisParams;<NEW_LINE>}
Boolean isAlpha = params.isAlphabetic();
1,639,635
public BackendEntry writeEdgeProperty(HugeEdgeProperty<?> prop) {<NEW_LINE>HugeEdge edge = prop.element();<NEW_LINE>EdgeId id = edge.idWithDirection();<NEW_LINE>TableBackendEntry.Row row = new TableBackendEntry.Row(edge.type(), id);<NEW_LINE>if (edge.hasTtl()) {<NEW_LINE>row.ttl(edge.ttl());<NEW_LINE>row.column(HugeKeys.EXPIRED_TIME, edge.expiredTime());<NEW_LINE>}<NEW_LINE>// Id: ownerVertex + direction + edge-label + sortValues + otherVertex<NEW_LINE>row.column(HugeKeys.OWNER_VERTEX, this.writeId<MASK><NEW_LINE>row.column(HugeKeys.DIRECTION, id.directionCode());<NEW_LINE>row.column(HugeKeys.LABEL, id.edgeLabelId().asLong());<NEW_LINE>row.column(HugeKeys.SORT_VALUES, id.sortValues());<NEW_LINE>row.column(HugeKeys.OTHER_VERTEX, this.writeId(id.otherVertexId()));<NEW_LINE>// Format edge property<NEW_LINE>this.formatProperty(prop, row);<NEW_LINE>TableBackendEntry entry = newBackendEntry(row);<NEW_LINE>entry.subId(IdGenerator.of(prop.key()));<NEW_LINE>return entry;<NEW_LINE>}
(id.ownerVertexId()));
359,964
private void solveCollision(TimeStep step) {<NEW_LINE>final AABB aabb = temp;<NEW_LINE>final Vec2 lowerBound = aabb.lowerBound;<NEW_LINE>final Vec2 upperBound = aabb.upperBound;<NEW_LINE>lowerBound.x = Float.MAX_VALUE;<NEW_LINE>lowerBound.y = Float.MAX_VALUE;<NEW_LINE>upperBound.x = -Float.MAX_VALUE;<NEW_LINE>upperBound.y = -Float.MAX_VALUE;<NEW_LINE>for (int i = 0; i < m_count; i++) {<NEW_LINE>final Vec2 v = m_velocityBuffer.data[i];<NEW_LINE>final Vec2 p1 = m_positionBuffer.data[i];<NEW_LINE>final float p1x = p1.x;<NEW_LINE>final float p1y = p1.y;<NEW_LINE>final float p2x = p1x + step.dt * v.x;<NEW_LINE>final float p2y = p1y + step.dt * v.y;<NEW_LINE>final float bx = p1x < p2x ? p1x : p2x;<NEW_LINE>final float by = p1y < p2y ? p1y : p2y;<NEW_LINE>lowerBound.x = lowerBound.x < bx ? lowerBound.x : bx;<NEW_LINE>lowerBound.y = lowerBound.y <MASK><NEW_LINE>final float b1x = p1x > p2x ? p1x : p2x;<NEW_LINE>final float b1y = p1y > p2y ? p1y : p2y;<NEW_LINE>upperBound.x = upperBound.x > b1x ? upperBound.x : b1x;<NEW_LINE>upperBound.y = upperBound.y > b1y ? upperBound.y : b1y;<NEW_LINE>}<NEW_LINE>sccallback.step = step;<NEW_LINE>sccallback.system = this;<NEW_LINE>m_world.queryAABB(sccallback, aabb);<NEW_LINE>}
< by ? lowerBound.y : by;
1,151,336
public JSONObject buildOptions4K8sMicroService(String appId, String microServiceId, String branch) {<NEW_LINE>log.info("action=packService|buildOptions4K8sMicroService|enter|appId={}|microServiceId={}|branch={}", appId, microServiceId, branch);<NEW_LINE>K8sMicroserviceMetaQueryCondition microserviceMetaCondition = K8sMicroserviceMetaQueryCondition.builder().appId(appId).microServiceId(microServiceId).withBlobs(true).build();<NEW_LINE>Pagination<K8sMicroServiceMetaDO> microserviceMetaList = k8sMicroserviceMetaService.list(microserviceMetaCondition);<NEW_LINE>if (microserviceMetaList.isEmpty()) {<NEW_LINE>log.error("action=packService|buildOptions4K8sMicroService|ERROR|message=component not exists|appId={}|" + "microServiceId={}", appId, microServiceId);<NEW_LINE>throw new AppException(AppErrorCode.INVALID_USER_ARGS, "component not exists");<NEW_LINE>}<NEW_LINE>AppMetaQueryCondition appMetaCondition = AppMetaQueryCondition.builder().appId(appId).withBlobs(true).build();<NEW_LINE>Pagination<AppMetaDO> appMetaList = appMetaService.list(appMetaCondition);<NEW_LINE>if (appMetaList.isEmpty()) {<NEW_LINE>log.error("action=packService|buildOptions4K8sMicroService|ERROR|message=app not exists|appId={}", appId);<NEW_LINE>throw new AppException(AppErrorCode.INVALID_USER_ARGS, "app not exists");<NEW_LINE>}<NEW_LINE>List<EnvMetaDTO> <MASK><NEW_LINE>return microserviceMetaList.getItems().get(0).getOptionsAndReplaceBranch(branch, appEnvList);<NEW_LINE>}
appEnvList = new ArrayList<>();
1,739,958
private static void tryMT(RegressionEnvironment env, int numSeconds) throws InterruptedException {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String eplCreateVariable = "@public create table vartotal (topgroup int primary key, subgroup int primary key)";<NEW_LINE>env.compileDeploy(eplCreateVariable, path);<NEW_LINE>String eplCreateIndex = "create index myindex on vartotal (topgroup)";<NEW_LINE>env.compileDeploy(eplCreateIndex, path);<NEW_LINE>// insert and delete merge<NEW_LINE>String eplMergeInsDel = "on SupportTopGroupSubGroupEvent as lge merge vartotal as vt " + "where vt.topgroup = lge.topgroup and vt.subgroup = lge.subgroup " + "when not matched and lge.op = 'insert' then insert select lge.topgroup as topgroup, lge.subgroup as subgroup " + "when matched and lge.op = 'delete' then delete";<NEW_LINE><MASK><NEW_LINE>// seed with {0, 0} group<NEW_LINE>env.sendEventBean(new SupportTopGroupSubGroupEvent(0, 0, "insert"));<NEW_LINE>// select/read<NEW_LINE>String eplSubselect = "@name('s0') select (select count(*) from vartotal where topgroup=sb.intPrimitive) as c0 " + "from SupportBean as sb";<NEW_LINE>env.compileDeploy(eplSubselect, path).addListener("s0");<NEW_LINE>WriteRunnable writeRunnable = new WriteRunnable(env);<NEW_LINE>ReadRunnable readRunnable = new ReadRunnable(env, env.listener("s0"));<NEW_LINE>// start<NEW_LINE>Thread writeThread = new Thread(writeRunnable, InfraTableMTGroupedSubqueryReadMergeWriteSecondaryIndexUpd.class.getSimpleName() + "-write");<NEW_LINE>Thread readThread = new Thread(readRunnable, InfraTableMTGroupedSubqueryReadMergeWriteSecondaryIndexUpd.class.getSimpleName() + "-read");<NEW_LINE>writeThread.start();<NEW_LINE>readThread.start();<NEW_LINE>// wait<NEW_LINE>Thread.sleep(numSeconds * 1000);<NEW_LINE>// shutdown<NEW_LINE>writeRunnable.setShutdown(true);<NEW_LINE>readRunnable.setShutdown(true);<NEW_LINE>// join<NEW_LINE>log.info("Waiting for completion");<NEW_LINE>writeThread.join();<NEW_LINE>readThread.join();<NEW_LINE>env.undeployAll();<NEW_LINE>assertNull(writeRunnable.getException());<NEW_LINE>assertNull(readRunnable.getException());<NEW_LINE>assertTrue(writeRunnable.numLoops > 100);<NEW_LINE>assertTrue(readRunnable.numQueries > 100);<NEW_LINE>System.out.println("Send " + writeRunnable.numLoops + " and performed " + readRunnable.numQueries + " reads");<NEW_LINE>}
env.compileDeploy(eplMergeInsDel, path);
598,409
public static <T extends I_M_ProductPrice> T iterateAllPriceListVersionsAndFindProductPrice(@Nullable final I_M_PriceList_Version startPriceListVersion, @NonNull final Function<I_M_PriceList_Version, T> productPriceMapper, @NonNull final ZonedDateTime priceDate) {<NEW_LINE>if (startPriceListVersion == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final IPriceListDAO priceListsRepo = <MASK><NEW_LINE>final Set<Integer> checkedPriceListVersionIds = new HashSet<>();<NEW_LINE>I_M_PriceList_Version currentPriceListVersion = startPriceListVersion;<NEW_LINE>while (currentPriceListVersion != null) {<NEW_LINE>// Stop here if the price list version was already considered<NEW_LINE>if (!checkedPriceListVersionIds.add(currentPriceListVersion.getM_PriceList_Version_ID())) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final T productPrice = productPriceMapper.apply(currentPriceListVersion);<NEW_LINE>if (productPrice != null) {<NEW_LINE>return productPrice;<NEW_LINE>}<NEW_LINE>currentPriceListVersion = priceListsRepo.getBasePriceListVersionForPricingCalculationOrNull(currentPriceListVersion, priceDate);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
Services.get(IPriceListDAO.class);
689,145
public Object doLocale(JSLocaleObject localeObject) {<NEW_LINE>Calendar.WeekData weekData = weekData(localeObject);<NEW_LINE>int firstDay = calendarToECMAScriptDay(weekData.firstDayOfWeek);<NEW_LINE>int minimalDays = weekData.minimalDaysInFirstWeek;<NEW_LINE>SimpleArrayList<Integer> weekendList = new SimpleArrayList<>(7);<NEW_LINE>int weekendCease = weekData.weekendCease;<NEW_LINE>int day = weekData.weekendOnset;<NEW_LINE>while (true) {<NEW_LINE>weekendList.add(calendarToECMAScriptDay(day), null);<NEW_LINE>if (day == weekendCease) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (day == Calendar.SATURDAY) {<NEW_LINE>day = Calendar.SUNDAY;<NEW_LINE>} else {<NEW_LINE>day++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>JSContext context = getContext();<NEW_LINE>JSRealm realm = getRealm();<NEW_LINE>Object weekend = JSArray.createConstantObjectArray(context, realm, weekendList.toArray());<NEW_LINE>JSObject weekInfo = JSOrdinary.create(context, realm);<NEW_LINE><MASK><NEW_LINE>createWeekendNode.executeVoid(weekInfo, weekend);<NEW_LINE>createMinimalDaysNode.executeVoid(weekInfo, minimalDays);<NEW_LINE>return weekInfo;<NEW_LINE>}
createFirstDayNode.executeVoid(weekInfo, firstDay);
212,204
private void populateConfigValuesForValidationSet() {<NEW_LINE>configValuesForValidation = new HashSet<String>();<NEW_LINE>configValuesForValidation.add("event.purge.interval");<NEW_LINE>configValuesForValidation.add("account.cleanup.interval");<NEW_LINE>configValuesForValidation.add("alert.wait");<NEW_LINE>configValuesForValidation.add("consoleproxy.capacityscan.interval");<NEW_LINE>configValuesForValidation.add("expunge.interval");<NEW_LINE>configValuesForValidation.add("host.stats.interval");<NEW_LINE>configValuesForValidation.add("network.gc.interval");<NEW_LINE>configValuesForValidation.add("ping.interval");<NEW_LINE>configValuesForValidation.add("snapshot.poll.interval");<NEW_LINE>configValuesForValidation.add("storage.stats.interval");<NEW_LINE>configValuesForValidation.add("storage.cleanup.interval");<NEW_LINE>configValuesForValidation.add("wait");<NEW_LINE>configValuesForValidation.add("xenserver.heartbeat.interval");<NEW_LINE>configValuesForValidation.add("xenserver.heartbeat.timeout");<NEW_LINE>configValuesForValidation.add("ovm3.heartbeat.interval");<NEW_LINE>configValuesForValidation.add("ovm3.heartbeat.timeout");<NEW_LINE>configValuesForValidation.add("incorrect.login.attempts.allowed");<NEW_LINE>configValuesForValidation.add("vm.password.length");<NEW_LINE>configValuesForValidation.add("externaldhcp.vmip.retrieval.interval");<NEW_LINE>configValuesForValidation.add("externaldhcp.vmip.max.retry");<NEW_LINE>configValuesForValidation.add("externaldhcp.vmipFetch.threadPool.max");<NEW_LINE>configValuesForValidation.add("remote.access.vpn.psk.length");<NEW_LINE>configValuesForValidation.add(StorageManager.STORAGE_POOL_DISK_WAIT.key());<NEW_LINE>configValuesForValidation.add(StorageManager.STORAGE_POOL_CLIENT_TIMEOUT.key());<NEW_LINE>configValuesForValidation.add(<MASK><NEW_LINE>configValuesForValidation.add(VM_USERDATA_MAX_LENGTH_STRING);<NEW_LINE>}
StorageManager.STORAGE_POOL_CLIENT_MAX_CONNECTIONS.key());
1,294,676
public void draw(Canvas canvas) {<NEW_LINE>if (barcode == null) {<NEW_LINE>throw new IllegalStateException("Attempting to draw a null barcode.");<NEW_LINE>}<NEW_LINE>// Draws the bounding box around the BarcodeBlock.<NEW_LINE>RectF rect = new <MASK><NEW_LINE>// If the image is flipped, the left will be translated to right, and the right to left.<NEW_LINE>float x0 = translateX(rect.left);<NEW_LINE>float x1 = translateX(rect.right);<NEW_LINE>rect.left = min(x0, x1);<NEW_LINE>rect.right = max(x0, x1);<NEW_LINE>rect.top = translateY(rect.top);<NEW_LINE>rect.bottom = translateY(rect.bottom);<NEW_LINE>canvas.drawRect(rect, rectPaint);<NEW_LINE>// Draws other object info.<NEW_LINE>float lineHeight = TEXT_SIZE + (2 * STROKE_WIDTH);<NEW_LINE>float textWidth = barcodePaint.measureText(barcode.getDisplayValue());<NEW_LINE>canvas.drawRect(rect.left - STROKE_WIDTH, rect.top - lineHeight, rect.left + textWidth + (2 * STROKE_WIDTH), rect.top, labelPaint);<NEW_LINE>// Renders the barcode at the bottom of the box.<NEW_LINE>canvas.drawText(barcode.getDisplayValue(), rect.left, rect.top - STROKE_WIDTH, barcodePaint);<NEW_LINE>}
RectF(barcode.getBoundingBox());
1,775,682
protected void parseCellDataElement(SOAPElement cellDataElement) throws SOAPException {<NEW_LINE>Name name = sf.createName("Cell", "", MDD_URI);<NEW_LINE>Iterator<?> itCells = cellDataElement.getChildElements(name);<NEW_LINE>while (itCells.hasNext()) {<NEW_LINE>SOAPElement cellElement = (SOAPElement) itCells.next();<NEW_LINE>Name errorName = sf.createName("Error", "", MDD_URI);<NEW_LINE>Iterator<?> errorElems = cellElement.getChildElements(errorName);<NEW_LINE>if (errorElems.hasNext()) {<NEW_LINE>handleCellErrors(errorElems);<NEW_LINE>}<NEW_LINE>Name ordinalName = sf.createName("CellOrdinal");<NEW_LINE>String cellOrdinal = cellElement.getAttributeValue(ordinalName);<NEW_LINE>Object value = null;<NEW_LINE>Iterator<?> valueElements = cellElement.getChildElements(sf.createName("Value", "", MDD_URI));<NEW_LINE>if (valueElements.hasNext()) {<NEW_LINE>SOAPElement valueElement = <MASK><NEW_LINE>String valueType = valueElement.getAttribute("xsi:type");<NEW_LINE>if (valueType.equals("xsd:int")) {<NEW_LINE>value = Long.valueOf(valueElement.getValue());<NEW_LINE>} else if (valueType.equals("xsd:double") || valueType.equals("xsd:decimal")) {<NEW_LINE>value = Double.valueOf(valueElement.getValue());<NEW_LINE>} else {<NEW_LINE>value = valueElement.getValue();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String fmtValue = "";<NEW_LINE>Iterator<?> fmtValueElements = cellElement.getChildElements(sf.createName("FmtValue", "", MDD_URI));<NEW_LINE>if (fmtValueElements.hasNext()) {<NEW_LINE>SOAPElement fmtValueElement = ((SOAPElement) fmtValueElements.next());<NEW_LINE>fmtValue = fmtValueElement.getValue();<NEW_LINE>}<NEW_LINE>int pos = Integer.parseInt(cellOrdinal);<NEW_LINE>JRXmlaCell cell = new JRXmlaCell(value, fmtValue);<NEW_LINE>xmlaResult.setCell(cell, pos);<NEW_LINE>}<NEW_LINE>}
(SOAPElement) valueElements.next();
1,279,092
TableMasterClient provideCatalogMasterClient(AlluxioHiveMetastoreConfig config) {<NEW_LINE>InstancedConfiguration conf = new <MASK><NEW_LINE>if (config.isZookeeperEnabled()) {<NEW_LINE>conf.set(PropertyKey.ZOOKEEPER_ENABLED, true);<NEW_LINE>conf.set(PropertyKey.ZOOKEEPER_ADDRESS, config.getZookeeperAddress());<NEW_LINE>} else {<NEW_LINE>String address = config.getMasterAddress();<NEW_LINE>String[] parts = address.split(":", 2);<NEW_LINE>conf.set(PropertyKey.MASTER_HOSTNAME, parts[0]);<NEW_LINE>if (parts.length > 1) {<NEW_LINE>conf.set(PropertyKey.MASTER_RPC_PORT, Integer.parseInt(parts[1]));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>MasterClientContext context = MasterClientContext.newBuilder(ClientContext.create(conf)).build();<NEW_LINE>return new RetryHandlingTableMasterClient(context);<NEW_LINE>}
InstancedConfiguration(ConfigurationUtils.defaults());
1,135,548
private void bindImeiAndMeid() {<NEW_LINE>ThanosManager thanos = ThanosManager.from(getContext());<NEW_LINE>if (!thanos.isServiceInstalled()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int phoneCount = thanos.getPrivacyManager().getPhoneCount();<NEW_LINE>XLog.w("phoneCount: %s", phoneCount);<NEW_LINE>SubscriptionInfo[] subscriptionInfos = thanos<MASK><NEW_LINE>XLog.w("subscriptionInfos: %s", Arrays.toString(subscriptionInfos));<NEW_LINE>if (ArrayUtils.isEmpty(subscriptionInfos)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Bind cheat imei.<NEW_LINE>if (thanos.hasFeature(BuildProp.THANOX_FEATURE_PRIVACY_FIELD_IMEI)) {<NEW_LINE>int nameIndex = 1;<NEW_LINE>for (SubscriptionInfo sub : subscriptionInfos) {<NEW_LINE>int slotId = sub.getSimSlotIndex();<NEW_LINE>XLog.w("nameIndex: %s, slotId: %s", nameIndex, slotId);<NEW_LINE>new Imei(getString(R.string.key_cheat_field_imei_slot_) + nameIndex, false, slotId).bind();<NEW_LINE>new Imei(getString(R.string.key_original_field_imei_slot_) + nameIndex, true, slotId).bind();<NEW_LINE>nameIndex++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Bind cheat meid.<NEW_LINE>if (thanos.hasFeature(BuildProp.THANOX_FEATURE_PRIVACY_FIELD_MEID)) {<NEW_LINE>int nameIndex = 1;<NEW_LINE>for (SubscriptionInfo sub : subscriptionInfos) {<NEW_LINE>int slotId = sub.getSimSlotIndex();<NEW_LINE>XLog.w("nameIndex: %s, slotId: %s", nameIndex, slotId);<NEW_LINE>new Meid(getString(R.string.key_cheat_field_meid_slot_) + nameIndex, false, slotId).bind();<NEW_LINE>new Meid(getString(R.string.key_original_field_meid_slot_) + nameIndex, true, slotId).bind();<NEW_LINE>nameIndex++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.getPrivacyManager().getAccessibleSubscriptionInfoList();
1,694,718
private void makeVars() {<NEW_LINE>SourceInfo info = jsProgram.createSourceInfoSynthetic(getClass());<NEW_LINE>JsVar stackVar = new JsVar(info, stack);<NEW_LINE>stackVar.setInitExpr(new JsArrayLiteral(info));<NEW_LINE>JsVar stackDepthVar = new JsVar(info, stackDepth);<NEW_LINE>stackDepthVar.setInitExpr(new JsNumberLiteral(info, (-1)));<NEW_LINE>JsVar lineNumbersVar <MASK><NEW_LINE>lineNumbersVar.setInitExpr(new JsArrayLiteral(info));<NEW_LINE>JsVar tmpVar = new JsVar(info, tmp);<NEW_LINE>JsVars vars;<NEW_LINE>JsStatement first = jsProgram.getGlobalBlock().getStatements().get(0);<NEW_LINE>if (first instanceof JsVars) {<NEW_LINE>vars = (JsVars) first;<NEW_LINE>} else {<NEW_LINE>vars = new JsVars(info);<NEW_LINE>jsProgram.getGlobalBlock().getStatements().add(0, vars);<NEW_LINE>}<NEW_LINE>vars.add(stackVar);<NEW_LINE>vars.add(stackDepthVar);<NEW_LINE>vars.add(lineNumbersVar);<NEW_LINE>vars.add(tmpVar);<NEW_LINE>}
= new JsVar(info, lineNumbers);
886,071
private Map<Integer, Converter> buildFieldToConverter(final GroupType schema) {<NEW_LINE>final Map<Integer, Converter> fieldToConverter = new HashMap<>(fieldCount);<NEW_LINE>int i = 0;<NEW_LINE>for (final Type field : schema.getFields()) {<NEW_LINE>final String[] newColumnPath = new <MASK><NEW_LINE>int j = 0;<NEW_LINE>for (final String part : columnPath) {<NEW_LINE>newColumnPath[j] = part;<NEW_LINE>j++;<NEW_LINE>}<NEW_LINE>newColumnPath[j] = field.getName();<NEW_LINE>if (field.isPrimitive()) {<NEW_LINE>fieldToConverter.put(i, new PrimitiveConverter(parquetColumnToObject, field.asPrimitiveType().getPrimitiveTypeName().javaType.getSimpleName(), newColumnPath, field.getOriginalType()));<NEW_LINE>} else {<NEW_LINE>fieldToConverter.put(i, new BypassGroupConverter(parquetColumnToObject, field.asGroupType(), newColumnPath));<NEW_LINE>}<NEW_LINE>i++;<NEW_LINE>}<NEW_LINE>return fieldToConverter;<NEW_LINE>}
String[columnPath.length + 1];
1,251,317
private static void copyFiles(Manifest manifest, JarFile in, JarOutputStream out, long timestamp) throws IOException {<NEW_LINE>byte[] buffer = new byte[4096];<NEW_LINE>int num;<NEW_LINE>Map<String, Attributes> entries = manifest.getEntries();<NEW_LINE>List<String> names = new ArrayList<>(entries.keySet());<NEW_LINE>Collections.sort(names);<NEW_LINE>for (String name : names) {<NEW_LINE>JarEntry <MASK><NEW_LINE>JarEntry outEntry = null;<NEW_LINE>if (inEntry.getMethod() == JarEntry.STORED) {<NEW_LINE>// Preserve the STORED method of the input entry.<NEW_LINE>outEntry = new JarEntry(inEntry);<NEW_LINE>} else {<NEW_LINE>// Create a new entry so that the compressed len is recomputed.<NEW_LINE>outEntry = new JarEntry(name);<NEW_LINE>}<NEW_LINE>outEntry.setTime(timestamp);<NEW_LINE>out.putNextEntry(outEntry);<NEW_LINE>InputStream data = in.getInputStream(inEntry);<NEW_LINE>while ((num = data.read(buffer)) > 0) {<NEW_LINE>out.write(buffer, 0, num);<NEW_LINE>}<NEW_LINE>out.flush();<NEW_LINE>}<NEW_LINE>}
inEntry = in.getJarEntry(name);
452,720
public void onCreate() {<NEW_LINE>super.onCreate();<NEW_LINE>setting = OldMainActivity.Setting;<NEW_LINE>layout_functionbar = OldMainActivity.CURRENT_ACTIVITY.get().findViewById(R.id.layout_functions);<NEW_LINE>buttonUser = layout_functionbar.findViewById(R.id.main_button_user);<NEW_LINE>buttonPlugin = layout_functionbar.findViewById(R.id.main_button_plugin);<NEW_LINE>buttonGamelist = layout_functionbar.findViewById(R.id.main_button_gamelist);<NEW_LINE>buttonGamedir = layout_functionbar.<MASK><NEW_LINE>buttonSetting = layout_functionbar.findViewById(R.id.main_button_setting);<NEW_LINE>buttonKeyboard = layout_functionbar.findViewById(R.id.main_button_keyboard);<NEW_LINE>buttonHome = layout_functionbar.findViewById(R.id.main_button_home);<NEW_LINE>buttonLog = layout_functionbar.findViewById(R.id.main_button_log);<NEW_LINE>textUserName = layout_functionbar.findViewById(R.id.functionbar_username);<NEW_LINE>textUserType = layout_functionbar.findViewById(R.id.functionbar_usertype);<NEW_LINE>for (View v : new View[] { buttonUser, buttonPlugin, buttonGamelist, buttonGamedir, buttonSetting, buttonKeyboard, buttonHome, buttonLog }) {<NEW_LINE>v.setOnClickListener(clickListener);<NEW_LINE>}<NEW_LINE>refreshUI();<NEW_LINE>}
findViewById(R.id.main_button_gamedir);
764,444
public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {<NEW_LINE>com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(this.getUnknownFields());<NEW_LINE>while (true) {<NEW_LINE>int tag = input.readTag();<NEW_LINE>switch(tag) {<NEW_LINE>case 0:<NEW_LINE>this.<MASK><NEW_LINE>return this;<NEW_LINE>default:<NEW_LINE>{<NEW_LINE>if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {<NEW_LINE>this.setUnknownFields(unknownFields.build());<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case 10:<NEW_LINE>{<NEW_LINE>voldemort.client.protocol.pb.VAdminProto.RebalancePartitionInfoMap.Builder subBuilder = voldemort.client.protocol.pb.VAdminProto.RebalancePartitionInfoMap.newBuilder();<NEW_LINE>input.readMessage(subBuilder, extensionRegistry);<NEW_LINE>addRebalancePartitionInfo(subBuilder.buildPartial());<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
setUnknownFields(unknownFields.build());
666,419
private static void scanObject(HashSet<J9ObjectPointer> visitedObjects, ObjectVisitor visitor, J9ObjectPointer object, VoidPointer address) {<NEW_LINE>if (visitedObjects.contains(object)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!visitor.visit(object, address)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>visitedObjects.add(object);<NEW_LINE>try {<NEW_LINE>GCObjectIterator objectIterator = GCObjectIterator.fromJ9Object(object, true);<NEW_LINE>GCObjectIterator addressIterator = GCObjectIterator.fromJ9Object(object, true);<NEW_LINE>while (objectIterator.hasNext()) {<NEW_LINE>J9ObjectPointer slot = objectIterator.next();<NEW_LINE><MASK><NEW_LINE>if (slot.notNull()) {<NEW_LINE>scanObject(visitedObjects, visitor, slot, addr);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (J9ObjectHelper.getClassName(object).equals("java/lang/Class")) {<NEW_LINE>J9ClassPointer clazz = ConstantPoolHelpers.J9VM_J9CLASS_FROM_HEAPCLASS(object);<NEW_LINE>// Iterate the Object slots<NEW_LINE>GCClassIterator classIterator = GCClassIterator.fromJ9Class(clazz);<NEW_LINE>GCClassIterator classAddressIterator = GCClassIterator.fromJ9Class(clazz);<NEW_LINE>while (classIterator.hasNext()) {<NEW_LINE>J9ObjectPointer slot = classIterator.next();<NEW_LINE>VoidPointer addr = classAddressIterator.nextAddress();<NEW_LINE>if (slot.notNull()) {<NEW_LINE>scanObject(visitedObjects, visitor, slot, addr);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Iterate the Class slots<NEW_LINE>GCClassIteratorClassSlots classSlotIterator = GCClassIteratorClassSlots.fromJ9Class(clazz);<NEW_LINE>GCClassIteratorClassSlots classSlotAddressIterator = GCClassIteratorClassSlots.fromJ9Class(clazz);<NEW_LINE>while (classSlotIterator.hasNext()) {<NEW_LINE>J9ClassPointer slot = classSlotIterator.next();<NEW_LINE>VoidPointer addr = classSlotAddressIterator.nextAddress();<NEW_LINE>J9ObjectPointer classObject = ConstantPoolHelpers.J9VM_J9CLASS_TO_HEAPCLASS(slot);<NEW_LINE>if (classObject.notNull()) {<NEW_LINE>scanObject(visitedObjects, visitor, classObject, addr);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (CorruptDataException e) {<NEW_LINE>EventManager.raiseCorruptDataEvent("Corruption found while walking the live set, object: " + object.getHexAddress(), e, false);<NEW_LINE>}<NEW_LINE>visitor.finishVisit(object, address);<NEW_LINE>}
VoidPointer addr = addressIterator.nextAddress();
1,065,297
public static void datatypes() {<NEW_LINE>// START SNIPPET: datatypes<NEW_LINE>Observation obs = new Observation();<NEW_LINE>// These are all equivalent<NEW_LINE>obs.setIssuedElement(new InstantType(new Date()));<NEW_LINE>obs.setIssuedElement(new InstantType(new Date(), TemporalPrecisionEnum.MILLI));<NEW_LINE>obs.setIssued(new Date());<NEW_LINE>// The InstantType also lets you work with the instant as a Java Date<NEW_LINE>// object or as a FHIR String.<NEW_LINE>// A date object<NEW_LINE>Date date = obs.getIssuedElement().getValue();<NEW_LINE>// "2014-03-08T12:59:58.068-05:00"<NEW_LINE>String dateString = obs.getIssuedElement().getValueAsString();<NEW_LINE>// END SNIPPET: datatypes<NEW_LINE><MASK><NEW_LINE>System.out.println(dateString);<NEW_LINE>}
System.out.println(date);
453,370
private void shareCsvFile() {<NEW_LINE>final ScaleUser selectedScaleUser = OpenScale<MASK><NEW_LINE>File shareFile = new File(getApplicationContext().getCacheDir(), getExportFilename(selectedScaleUser));<NEW_LINE>if (!OpenScale.getInstance().exportData(Uri.fromFile(shareFile))) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Intent intent = new Intent(Intent.ACTION_SEND);<NEW_LINE>intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);<NEW_LINE>intent.setType("text/csv");<NEW_LINE>final Uri uri = FileProvider.getUriForFile(getApplicationContext(), BuildConfig.APPLICATION_ID + ".fileprovider", shareFile);<NEW_LINE>intent.putExtra(Intent.EXTRA_STREAM, uri);<NEW_LINE>intent.putExtra(Intent.EXTRA_SUBJECT, getResources().getString(R.string.label_share_subject, selectedScaleUser.getUserName()));<NEW_LINE>startActivity(Intent.createChooser(intent, getResources().getString(R.string.label_share)));<NEW_LINE>}
.getInstance().getSelectedScaleUser();
1,642,421
protected void onDraw(Canvas canvas) {<NEW_LINE>int width = getMeasuredWidth();<NEW_LINE>int height = getMeasuredHeight();<NEW_LINE>if (cache != null && (cache.getWidth() != width || cache.getHeight() != height)) {<NEW_LINE>cache.recycle();<NEW_LINE>cache = null;<NEW_LINE>}<NEW_LINE>if (cache == null) {<NEW_LINE>cache = Bitmap.createBitmap(width, height, ARGB_8888);<NEW_LINE>Canvas cacheCanvas = new Canvas(cache);<NEW_LINE>switch(type) {<NEW_LINE>case NODE_UNKNOWN:<NEW_LINE>drawItems(cacheCanvas, leakPaint, leakPaint);<NEW_LINE>break;<NEW_LINE>case NODE_UNREACHABLE:<NEW_LINE>case NODE_REACHABLE:<NEW_LINE>drawItems(cacheCanvas, referencePaint, referencePaint);<NEW_LINE>break;<NEW_LINE>case NODE_FIRST_UNREACHABLE:<NEW_LINE>drawItems(cacheCanvas, leakPaint, referencePaint);<NEW_LINE>break;<NEW_LINE>case NODE_LAST_REACHABLE:<NEW_LINE>drawItems(cacheCanvas, referencePaint, leakPaint);<NEW_LINE>break;<NEW_LINE>case START:<NEW_LINE>{<NEW_LINE>drawStartLine(cacheCanvas);<NEW_LINE>drawItems(cacheCanvas, null, referencePaint);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case START_LAST_REACHABLE:<NEW_LINE>drawStartLine(cacheCanvas);<NEW_LINE>drawItems(cacheCanvas, null, leakPaint);<NEW_LINE>break;<NEW_LINE>case END:<NEW_LINE>drawItems(cacheCanvas, referencePaint, null);<NEW_LINE>break;<NEW_LINE>case END_FIRST_UNREACHABLE:<NEW_LINE><MASK><NEW_LINE>break;<NEW_LINE>case HELP:<NEW_LINE>drawRoot(cacheCanvas);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new UnsupportedOperationException("Unknown type " + type);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>canvas.drawBitmap(cache, 0, 0, null);<NEW_LINE>}
drawItems(cacheCanvas, leakPaint, null);
245,641
final DeleteInfrastructureConfigurationResult executeDeleteInfrastructureConfiguration(DeleteInfrastructureConfigurationRequest deleteInfrastructureConfigurationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteInfrastructureConfigurationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteInfrastructureConfigurationRequest> request = null;<NEW_LINE>Response<DeleteInfrastructureConfigurationResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteInfrastructureConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteInfrastructureConfigurationRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "imagebuilder");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteInfrastructureConfiguration");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteInfrastructureConfigurationResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteInfrastructureConfigurationResultJsonUnmarshaller());<NEW_LINE>response = <MASK><NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
invoke(request, responseHandler, executionContext);
1,480,883
public void message(SibMessage.Listener.MessageType type, String me, TraceComponent tc, String msgKey, Object objs, Object[] formattedMessage) {<NEW_LINE>switch(type) {<NEW_LINE>case AUDIT:<NEW_LINE>_logRecords.add(new LogRecord(Severity.AUDIT, msgKey, objs));<NEW_LINE>break;<NEW_LINE>case ERROR:<NEW_LINE>_logRecords.add(new LogRecord(Severity.ERROR, msgKey, objs));<NEW_LINE>break;<NEW_LINE>case FATAL:<NEW_LINE>_logRecords.add(new LogRecord(Severity.FATAL, msgKey, objs));<NEW_LINE>break;<NEW_LINE>case INFO:<NEW_LINE>_logRecords.add(new LogRecord(Severity.INFO, msgKey, objs));<NEW_LINE>break;<NEW_LINE>case SERVICE:<NEW_LINE>_logRecords.add(new LogRecord(Severity<MASK><NEW_LINE>break;<NEW_LINE>case WARNING:<NEW_LINE>_logRecords.add(new LogRecord(Severity.WARNING, msgKey, objs));<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}
.SERVICE, msgKey, objs));
1,034,280
public static void main(String[] args) {<NEW_LINE>// The definitions file specifies where dots are on each marker and other bits of meta data<NEW_LINE>RandomDotDefinition defs = FiducialIO.loadRandomDotYaml<MASK><NEW_LINE>// The only parameter that you have to set is markerLength. It's used to compute bounding<NEW_LINE>// boxes and similar. If you don't know what the width is just set it to 1.0<NEW_LINE>var config = new ConfigUchiyaMarker();<NEW_LINE>config.markerWidth = defs.markerWidth;<NEW_LINE>config.markerHeight = defs.markerHeight;<NEW_LINE>Uchiya_to_FiducialDetector<GrayU8> detector = FactoryFiducial.randomDots(config, GrayU8.class);<NEW_LINE>// Load / learn all the markers. This can take a few seconds if there are a lot of markers<NEW_LINE>for (List<Point2D_F64> marker : defs.markers) {<NEW_LINE>detector.addMarker(marker);<NEW_LINE>}<NEW_LINE>// If you want 3D pose information then the camera need sto be calibrated. If you don't provide<NEW_LINE>// this information then just things like the bounding box will be returned<NEW_LINE>CameraPinholeBrown intrinsic = CalibrationIO.load(UtilIO.fileExample("fiducial/random_dots/intrinsic.yaml"));<NEW_LINE>detector.setLensDistortion(LensDistortionFactory.narrow(intrinsic), intrinsic.width, intrinsic.height);<NEW_LINE>// It's now ready to start processing images. Let's load an image<NEW_LINE>BufferedImage image = UtilImageIO.loadImageNotNull(UtilIO.pathExample("fiducial/random_dots/image02.jpg"));<NEW_LINE>GrayU8 gray = ConvertBufferedImage.convertFrom(image, false, ImageType.SB_U8);<NEW_LINE>detector.detect(gray);<NEW_LINE>// Time to visualize the results<NEW_LINE>Graphics2D g2 = image.createGraphics();<NEW_LINE>var targetToSensor = new Se3_F64();<NEW_LINE>var bounds = new Polygon2D_F64();<NEW_LINE>var center = new Point2D_F64();<NEW_LINE>for (int i = 0; i < detector.totalFound(); i++) {<NEW_LINE>detector.getBounds(i, bounds);<NEW_LINE>detector.getCenter(i, center);<NEW_LINE>g2.setColor(new Color(50, 50, 255));<NEW_LINE>g2.setStroke(new BasicStroke(10));<NEW_LINE>VisualizeShapes.drawPolygon(bounds, true, 1.0, g2);<NEW_LINE>VisualizeFiducial.drawLabel(center, "" + detector.getId(i), g2);<NEW_LINE>System.out.println("Target ID = " + detector.getId(i));<NEW_LINE>if (detector.is3D()) {<NEW_LINE>detector.getFiducialToCamera(i, targetToSensor);<NEW_LINE>VisualizeFiducial.drawCube(targetToSensor, intrinsic, detector.getWidth(i), 3, g2);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ShowImages.showWindow(image, "Random Dot Markers", true);<NEW_LINE>}
(UtilIO.fileExample("fiducial/random_dots/descriptions.yaml"));
715,497
public static NDList lstm(PtNDArray input, NDList hx, NDList params, boolean hasBiases, int numLayers, double dropRate, boolean training, boolean bidirectional, boolean batchFirst) {<NEW_LINE>PtNDManager manager = input.getManager();<NEW_LINE>long[] hxHandles = hx.stream().mapToLong(array -> ((PtNDArray) array).getHandle()).toArray();<NEW_LINE>long[] paramHandles = params.stream().mapToLong(array -> ((PtNDArray) array).<MASK><NEW_LINE>long[] outputs = PyTorchLibrary.LIB.torchNNLstm(input.getHandle(), hxHandles, paramHandles, hasBiases, numLayers, dropRate, training, bidirectional, batchFirst);<NEW_LINE>NDList res = new NDList();<NEW_LINE>for (long output : outputs) {<NEW_LINE>res.add(new PtNDArray(manager, output));<NEW_LINE>}<NEW_LINE>return res;<NEW_LINE>}
getHandle()).toArray();
1,701,021
private void addPersonalNames(Map<Field, String> fields, PersonalNameSubjectList personalNameSubjectList) {<NEW_LINE>if (fields.get(StandardField.AUTHOR) == null) {<NEW_LINE>// if no authors appear, then add the personal names as authors<NEW_LINE>List<String> personalNames = new ArrayList<>();<NEW_LINE>if (personalNameSubjectList.getPersonalNameSubject() != null) {<NEW_LINE>List<PersonalNameSubject> personalNameSubject = personalNameSubjectList.getPersonalNameSubject();<NEW_LINE>for (PersonalNameSubject personalName : personalNameSubject) {<NEW_LINE>String name = personalName.getLastName();<NEW_LINE>if (personalName.getForeName() != null) {<NEW_LINE>name += ", " + personalName.getForeName();<NEW_LINE>}<NEW_LINE>personalNames.add(name);<NEW_LINE>}<NEW_LINE>fields.put(StandardField.AUTHOR<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
, join(personalNames, " and "));
1,195,298
boolean toNode(WireNode[] wireNodes) {<NEW_LINE>if (!this.validated) {<NEW_LINE>this.validate(wireNodes);<NEW_LINE>}<NEW_LINE>if (this.built == null) {<NEW_LINE>int type = flags & FLAG_NODE_TYPE;<NEW_LINE>if (type == NODE_TYPE_ROOT) {<NEW_LINE>this.built = new RootCommandNode<>();<NEW_LINE>} else {<NEW_LINE>if (args == null) {<NEW_LINE>throw new IllegalStateException("Non-root node without args builder!");<NEW_LINE>}<NEW_LINE>// Add any redirects<NEW_LINE>if (redirectTo != -1) {<NEW_LINE>WireNode redirect = wireNodes[redirectTo];<NEW_LINE>if (redirect.built != null) {<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>// Redirect node does not yet exist<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// If executable, add an empty command<NEW_LINE>if ((flags & FLAG_EXECUTABLE) != 0) {<NEW_LINE>args.executes(PLACEHOLDER_COMMAND);<NEW_LINE>}<NEW_LINE>this.built = args.build();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (int child : children) {<NEW_LINE>if (wireNodes[child].built == null) {<NEW_LINE>// The child is not yet deserialized. The node can't be built now.<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Associate children with nodes<NEW_LINE>for (int child : children) {<NEW_LINE>CommandNode<CommandSource> childNode = wireNodes[child].built;<NEW_LINE>if (!(childNode instanceof RootCommandNode)) {<NEW_LINE>built.addChild(childNode);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
args.redirect(redirect.built);
1,465,668
private List<DicaInterface> loadHints(String dir) {<NEW_LINE>List<DicaInterface> lista = new ArrayList<>();<NEW_LINE>Properties prop = new Properties();<NEW_LINE>try {<NEW_LINE>InputStream resourceAsStream = ClassLoader.getSystemClassLoader(<MASK><NEW_LINE>prop.load(new InputStreamReader(resourceAsStream, "UTF-8"));<NEW_LINE>for (int i = 0; i < Integer.parseInt(prop.getProperty("dicas")); i++) {<NEW_LINE>String nome = "dica" + i + ".";<NEW_LINE>String titulo = prop.getProperty(nome + "title");<NEW_LINE>String descricao = prop.getProperty(nome + "description");<NEW_LINE>// InputStream imageStream = ClassLoader.getSystemClassLoader().getResourceAsStream(dir+"/"+prop.getProperty(nome+"image"));<NEW_LINE>// Image imagem = ImageIO.read(imageStream);<NEW_LINE>ImageIcon imagem = new ImageIcon(getClass().getResource("/" + dir + "/" + prop.getProperty(nome + "image")));<NEW_LINE>DicaInterface dica = new DicaInterface(titulo, descricao, imagem);<NEW_LINE>lista.add(dica);<NEW_LINE>}<NEW_LINE>return lista;<NEW_LINE>} catch (Exception e) {<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
).getResourceAsStream(dir + "/index.properties");
1,211,811
public void run() {<NEW_LINE>try {<NEW_LINE>URL url = new URL("https://www.freelinebuild.com/api/feedback");<NEW_LINE>// URL url = new URL("http://localhost:3000/api/feedback");<NEW_LINE>HttpURLConnection conn = (HttpURLConnection) url.openConnection();<NEW_LINE>conn.setReadTimeout(10000);<NEW_LINE>conn.setConnectTimeout(15000);<NEW_LINE>conn.setRequestMethod("POST");<NEW_LINE>conn.setDoInput(true);<NEW_LINE>conn.setDoOutput(true);<NEW_LINE>StringBuilder builder = new StringBuilder();<NEW_LINE>builder.append(URLEncoder.encode("content", "UTF-8"));<NEW_LINE>builder.append("=");<NEW_LINE>builder.append(URLEncoder.encode(content, "UTF-8"));<NEW_LINE>builder.append("&");<NEW_LINE>builder.append(URLEncoder.encode("env", "UTF-8"));<NEW_LINE>builder.append("=");<NEW_LINE>builder.append(URLEncoder.encode(env, "UTF-8"));<NEW_LINE>OutputStream os = conn.getOutputStream();<NEW_LINE>BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(os, "UTF-8"));<NEW_LINE>writer.<MASK><NEW_LINE>writer.flush();<NEW_LINE>writer.close();<NEW_LINE>os.close();<NEW_LINE>int responseCode = conn.getResponseCode();<NEW_LINE>if (responseCode >= 400) {<NEW_LINE>this.callback.onFailure(new Exception(conn.getResponseMessage()));<NEW_LINE>} else {<NEW_LINE>this.callback.onSuccess();<NEW_LINE>}<NEW_LINE>conn.disconnect();<NEW_LINE>} catch (IOException e) {<NEW_LINE>this.callback.onFailure(e);<NEW_LINE>}<NEW_LINE>}
write(builder.toString());
355,223
public CodegenExpression makeCodegen(CodegenClassScope classScope, CodegenMethodScope parent, SAIFFInitializeSymbolWEventType symbols) {<NEW_LINE>CodegenMethod method = parent.makeChild(FilterSpecParam.EPTYPE, this.getClass(), classScope);<NEW_LINE>CodegenExpression get = exprIdentNodeEvaluator.getGetter().eventBeanGetCodegen(ref("event"), method, classScope);<NEW_LINE>method.getBlock().declareVar(ExprFilterSpecLookupable.EPTYPE, "lookupable", localMethod(lookupable.makeCodegen(method, symbols, classScope))).declareVar(ExprFilterSpecLookupable.EPTYPE_FILTEROPERATOR, "op", enumValue(FilterOperator.class, filterOperator.name()));<NEW_LINE>CodegenExpressionNewAnonymousClass param = newAnonymousClass(method.getBlock(), FilterSpecParam.EPTYPE, Arrays.asList(ref("lookupable"), ref("op")));<NEW_LINE>CodegenMethod getFilterValue = CodegenMethod.makeParentNode(FilterValueSetParam.EPTYPE, this.getClass(), classScope).addParam(FilterSpecParam.GET_FILTER_VALUE_FP);<NEW_LINE>param.addMethod("getFilterValue", getFilterValue);<NEW_LINE>getFilterValue.getBlock().declareVar(EventBean.EPTYPE, "event", exprDotMethod(ref("matchedEvents"), "getMatchingEventByTag", constant(resultEventAsName))).declareVar(EPTypePremade.OBJECT.getEPType(), "value", constantNull()).ifRefNotNull("event").assignRef(<MASK><NEW_LINE>if (isMustCoerce) {<NEW_LINE>getFilterValue.getBlock().assignRef("value", numberCoercer.coerceCodegenMayNullBoxed(cast(EPTypePremade.NUMBER.getEPType(), ref("value")), EPTypePremade.NUMBER.getEPType(), method, classScope));<NEW_LINE>}<NEW_LINE>getFilterValue.getBlock().methodReturn(FilterValueSetParamImpl.codegenNew(ref("value")));<NEW_LINE>method.getBlock().methodReturn(param);<NEW_LINE>return localMethod(method);<NEW_LINE>}
"value", get).blockEnd();
814,655
private void createLabelMaps(Body body) {<NEW_LINE>Chain<Unit<MASK><NEW_LINE>labels = new HashMap<Unit, String>(units.size() * 2 + 1, 0.7f);<NEW_LINE>references = new HashMap<Unit, String>(units.size() * 2 + 1, 0.7f);<NEW_LINE>// Create statement name table<NEW_LINE>Set<Unit> labelStmts = new HashSet<Unit>();<NEW_LINE>Set<Unit> refStmts = new HashSet<Unit>();<NEW_LINE>// Build labelStmts and refStmts<NEW_LINE>for (UnitBox box : body.getAllUnitBoxes()) {<NEW_LINE>Unit stmt = box.getUnit();<NEW_LINE>if (box.isBranchTarget()) {<NEW_LINE>labelStmts.add(stmt);<NEW_LINE>} else {<NEW_LINE>refStmts.add(stmt);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// left side zero padding for all labels<NEW_LINE>// this simplifies debugging the jimple code in simple editors, as it<NEW_LINE>// avoids the situation where a label is the prefix of another label<NEW_LINE>final int maxDigits = 1 + (int) Math.log10(labelStmts.size());<NEW_LINE>final String formatString = "label%0" + maxDigits + "d";<NEW_LINE>int labelCount = 0;<NEW_LINE>int refCount = 0;<NEW_LINE>// Traverse the stmts and assign a label if necessary<NEW_LINE>for (Unit s : units) {<NEW_LINE>if (labelStmts.contains(s)) {<NEW_LINE>labels.put(s, String.format(formatString, ++labelCount));<NEW_LINE>}<NEW_LINE>if (refStmts.contains(s)) {<NEW_LINE>references.put(s, Integer.toString(refCount++));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
> units = body.getUnits();
1,344,704
private void processOutgoingMessageRecord(@NonNull List<ChangedRecipient> changedRecipients, @NonNull MessageRecord messageRecord) {<NEW_LINE>Log.d(TAG, "processOutgoingMessageRecord");<NEW_LINE>MessageDatabase smsDatabase = SignalDatabase.sms();<NEW_LINE>MessageDatabase mmsDatabase = SignalDatabase.mms();<NEW_LINE>for (ChangedRecipient changedRecipient : changedRecipients) {<NEW_LINE>RecipientId id = changedRecipient.getRecipient().getId();<NEW_LINE>IdentityKey identityKey = changedRecipient.getIdentityRecord().getIdentityKey();<NEW_LINE>if (messageRecord.isMms()) {<NEW_LINE>mmsDatabase.removeMismatchedIdentity(messageRecord.getId(), id, identityKey);<NEW_LINE>if (messageRecord.getRecipient().isPushGroup()) {<NEW_LINE>MessageSender.<MASK><NEW_LINE>} else {<NEW_LINE>MessageSender.resend(context, messageRecord);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>smsDatabase.removeMismatchedIdentity(messageRecord.getId(), id, identityKey);<NEW_LINE>MessageSender.resend(context, messageRecord);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
resendGroupMessage(context, messageRecord, id);
482,413
final BatchDeleteDocumentResult executeBatchDeleteDocument(BatchDeleteDocumentRequest batchDeleteDocumentRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchDeleteDocumentRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<BatchDeleteDocumentRequest> request = null;<NEW_LINE>Response<BatchDeleteDocumentResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new BatchDeleteDocumentRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(batchDeleteDocumentRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchDeleteDocument");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<BatchDeleteDocumentResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new BatchDeleteDocumentResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
1,166,613
protected void encodeInput(FacesContext context, SelectOneMenu menu, String clientId, List<SelectItem> selectItems, Object values, Object submittedValues, Converter converter) throws IOException {<NEW_LINE>ResponseWriter writer = context.getResponseWriter();<NEW_LINE>String focusId = clientId + "_focus";<NEW_LINE>// input for accessibility<NEW_LINE>writer.startElement("div", null);<NEW_LINE>writer.writeAttribute("class", "ui-helper-hidden-accessible", null);<NEW_LINE>writer.startElement("input", null);<NEW_LINE>writer.writeAttribute("id", focusId, null);<NEW_LINE>writer.writeAttribute("name", focusId, null);<NEW_LINE>writer.<MASK><NEW_LINE>writer.writeAttribute("autocomplete", "off", null);<NEW_LINE>// for keyboard accessibility and ScreenReader<NEW_LINE>renderAccessibilityAttributes(context, menu);<NEW_LINE>renderPassThruAttributes(context, menu, HTML.TAB_INDEX);<NEW_LINE>renderDomEvents(context, menu, HTML.BLUR_FOCUS_EVENTS);<NEW_LINE>writer.endElement("input");<NEW_LINE>writer.endElement("div");<NEW_LINE>// hidden select<NEW_LINE>writer.startElement("div", null);<NEW_LINE>writer.writeAttribute("class", "ui-helper-hidden-accessible", null);<NEW_LINE>encodeHiddenSelect(context, menu, clientId, selectItems, values, submittedValues, converter);<NEW_LINE>writer.endElement("div");<NEW_LINE>}
writeAttribute("type", "text", null);
1,038,881
public static void generateJaxWsArtifacts(Project project, FileObject targetFolder, String targetName, URL wsdlURL, String service, String port) throws Exception {<NEW_LINE>initProjectInfo(project);<NEW_LINE>JAXWSSupport jaxWsSupport = JAXWSSupport.getJAXWSSupport(project.getProjectDirectory());<NEW_LINE>// NOI18N<NEW_LINE>String artifactsPckg <MASK><NEW_LINE>ClassPath classPath = ClassPath.getClassPath(targetFolder, ClassPath.SOURCE);<NEW_LINE>String serviceImplPath = classPath.getResourceName(targetFolder, '.', false);<NEW_LINE>boolean jsr109 = true;<NEW_LINE>JaxWsModel jaxWsModel = project.getLookup().lookup(JaxWsModel.class);<NEW_LINE>if (jaxWsModel != null) {<NEW_LINE>jsr109 = isJsr109(jaxWsModel);<NEW_LINE>}<NEW_LINE>jaxWsSupport.addService(targetName, serviceImplPath + "." + targetName, wsdlURL.toExternalForm(), service, port, artifactsPckg, jsr109, false);<NEW_LINE>}
= "service." + targetName.toLowerCase();
639,513
public FilterRegistrationBean webStatFilterRegistrationBean(DruidStatProperties properties) {<NEW_LINE>DruidStatProperties.WebStatFilter config = properties.getWebStatFilter();<NEW_LINE>FilterRegistrationBean registrationBean = new FilterRegistrationBean();<NEW_LINE>WebStatFilter filter = new WebStatFilter();<NEW_LINE>registrationBean.setFilter(filter);<NEW_LINE>registrationBean.addUrlPatterns(config.getUrlPattern() != null ? <MASK><NEW_LINE>registrationBean.addInitParameter("exclusions", config.getExclusions() != null ? config.getExclusions() : "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*");<NEW_LINE>if (config.getSessionStatEnable() != null) {<NEW_LINE>registrationBean.addInitParameter("sessionStatEnable", config.getSessionStatEnable());<NEW_LINE>}<NEW_LINE>if (config.getSessionStatMaxCount() != null) {<NEW_LINE>registrationBean.addInitParameter("sessionStatMaxCount", config.getSessionStatMaxCount());<NEW_LINE>}<NEW_LINE>if (config.getPrincipalSessionName() != null) {<NEW_LINE>registrationBean.addInitParameter("principalSessionName", config.getPrincipalSessionName());<NEW_LINE>}<NEW_LINE>if (config.getPrincipalCookieName() != null) {<NEW_LINE>registrationBean.addInitParameter("principalCookieName", config.getPrincipalCookieName());<NEW_LINE>}<NEW_LINE>if (config.getProfileEnable() != null) {<NEW_LINE>registrationBean.addInitParameter("profileEnable", config.getProfileEnable());<NEW_LINE>}<NEW_LINE>return registrationBean;<NEW_LINE>}
config.getUrlPattern() : "/*");
1,794,976
private void reloadPluginAdapterAndVisibility(@NonNull PluginListType pluginType, @Nullable ListState<ImmutablePluginModel> listState) {<NEW_LINE>if (listState == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>PluginBrowserAdapter adapter = null;<NEW_LINE>View cardView = null;<NEW_LINE>switch(pluginType) {<NEW_LINE>case SITE:<NEW_LINE>adapter = (PluginBrowserAdapter) mSitePluginsRecycler.getAdapter();<NEW_LINE>cardView = findViewById(R.id.installed_plugins_container);<NEW_LINE>break;<NEW_LINE>case FEATURED:<NEW_LINE>adapter = (PluginBrowserAdapter) mFeaturedPluginsRecycler.getAdapter();<NEW_LINE>cardView = <MASK><NEW_LINE>break;<NEW_LINE>case POPULAR:<NEW_LINE>adapter = (PluginBrowserAdapter) mPopularPluginsRecycler.getAdapter();<NEW_LINE>cardView = findViewById(R.id.popular_plugins_container);<NEW_LINE>break;<NEW_LINE>case NEW:<NEW_LINE>adapter = (PluginBrowserAdapter) mNewPluginsRecycler.getAdapter();<NEW_LINE>cardView = findViewById(R.id.new_plugins_container);<NEW_LINE>break;<NEW_LINE>case SEARCH:<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (adapter == null || cardView == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<ImmutablePluginModel> plugins = listState.getData();<NEW_LINE>adapter.setPlugins(plugins);<NEW_LINE>int newVisibility = plugins.size() > 0 ? View.VISIBLE : View.GONE;<NEW_LINE>int oldVisibility = cardView.getVisibility();<NEW_LINE>if (newVisibility == View.VISIBLE && oldVisibility != View.VISIBLE) {<NEW_LINE>AniUtils.fadeIn(cardView, AniUtils.Duration.MEDIUM);<NEW_LINE>} else if (newVisibility != View.VISIBLE && oldVisibility == View.VISIBLE) {<NEW_LINE>AniUtils.fadeOut(cardView, AniUtils.Duration.MEDIUM);<NEW_LINE>}<NEW_LINE>}
findViewById(R.id.featured_plugins_container);
1,063,584
protected void activate() {<NEW_LINE>super.activate();<NEW_LINE>phasesView.activate();<NEW_LINE>daoFacade.addBsqStateListener(this);<NEW_LINE>cyclesTableView.getSelectionModel().selectedItemProperty().addListener(selectedVoteResultListItemListener);<NEW_LINE>if (daoStateService.isParseBlockChainComplete()) {<NEW_LINE>checkForResultPhase(daoStateService.getChainHeight());<NEW_LINE>fillCycleList();<NEW_LINE>}<NEW_LINE>exportButton.setOnAction(event -> {<NEW_LINE>JsonElement cyclesJsonArray = getVotingHistoryJson();<NEW_LINE>GUIUtil.exportJSON("voteResultsHistory.json", cyclesJsonArray, (Stage) root.getScene().getWindow());<NEW_LINE>});<NEW_LINE>if (proposalsTableView != null) {<NEW_LINE>GUIUtil.setFitToRowsForTableView(proposalsTableView, 25, 28, 6, 6);<NEW_LINE>selectedProposalSubscription = EasyBind.subscribe(proposalsTableView.getSelectionModel().selectedItemProperty(), this::onSelectProposalResultListItem);<NEW_LINE>}<NEW_LINE>GUIUtil.setFitToRowsForTableView(cyclesTableView, <MASK><NEW_LINE>}
25, 28, 6, 6);
640,810
private void findRanges() {<NEW_LINE>List<CompilerThread> threads = parent.getJITDataModel().getCompilerThreads();<NEW_LINE>int compilerThreadCount = threads.size();<NEW_LINE>for (int i = 0; i < compilerThreadCount; i++) {<NEW_LINE>CompilerThread <MASK><NEW_LINE>long earliestQueuedTime = thread.getEarliestQueuedTime();<NEW_LINE>long latestEmittedTime = thread.getLatestNMethodEmittedTime();<NEW_LINE>if (i == 0) {<NEW_LINE>minTime = earliestQueuedTime;<NEW_LINE>maxTime = latestEmittedTime;<NEW_LINE>maxNativeSize = thread.getLargestNativeSize();<NEW_LINE>maxBytecodeSize = thread.getLargestBytecodeSize();<NEW_LINE>} else {<NEW_LINE>minTime = Math.min(minTime, earliestQueuedTime);<NEW_LINE>maxTime = Math.max(maxTime, latestEmittedTime);<NEW_LINE>maxNativeSize = Math.max(maxNativeSize, thread.getLargestNativeSize());<NEW_LINE>maxBytecodeSize = Math.max(maxBytecodeSize, thread.getLargestBytecodeSize());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
thread = threads.get(i);
45,414
public void methodReferenceSwingsBothWays(ReferenceExpression expression, MethodBinding instanceMethod, MethodBinding nonInstanceMethod) {<NEW_LINE>char[] selector = instanceMethod.selector;<NEW_LINE>TypeBinding receiverType = instanceMethod.declaringClass;<NEW_LINE>StringBuilder buffer1 = new StringBuilder();<NEW_LINE>StringBuilder shortBuffer1 = new StringBuilder();<NEW_LINE>TypeBinding[] parameters = instanceMethod.parameters;<NEW_LINE>for (int i = 0, length = parameters.length; i < length; i++) {<NEW_LINE>if (i != 0) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>buffer1.append(", ");<NEW_LINE>// $NON-NLS-1$<NEW_LINE>shortBuffer1.append(", ");<NEW_LINE>}<NEW_LINE>buffer1.append(new String(parameters[<MASK><NEW_LINE>shortBuffer1.append(new String(parameters[i].shortReadableName()));<NEW_LINE>}<NEW_LINE>StringBuilder buffer2 = new StringBuilder();<NEW_LINE>StringBuilder shortBuffer2 = new StringBuilder();<NEW_LINE>parameters = nonInstanceMethod.parameters;<NEW_LINE>for (int i = 0, length = parameters.length; i < length; i++) {<NEW_LINE>if (i != 0) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>buffer2.append(", ");<NEW_LINE>// $NON-NLS-1$<NEW_LINE>shortBuffer2.append(", ");<NEW_LINE>}<NEW_LINE>buffer2.append(new String(parameters[i].readableName()));<NEW_LINE>shortBuffer2.append(new String(parameters[i].shortReadableName()));<NEW_LINE>}<NEW_LINE>int id = IProblem.MethodReferenceSwingsBothWays;<NEW_LINE>this.handle(id, new String[] { new String(receiverType.readableName()), new String(selector), buffer1.toString(), new String(selector), buffer2.toString() }, new String[] { new String(receiverType.shortReadableName()), new String(selector), shortBuffer1.toString(), new String(selector), shortBuffer2.toString() }, expression.sourceStart, expression.sourceEnd);<NEW_LINE>}
i].readableName()));
707,714
final ListEffectiveDeploymentsResult executeListEffectiveDeployments(ListEffectiveDeploymentsRequest listEffectiveDeploymentsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listEffectiveDeploymentsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListEffectiveDeploymentsRequest> request = null;<NEW_LINE>Response<ListEffectiveDeploymentsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListEffectiveDeploymentsRequestProtocolMarshaller(protocolFactory).marshall<MASK><NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "GreengrassV2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListEffectiveDeployments");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListEffectiveDeploymentsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListEffectiveDeploymentsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
(super.beforeMarshalling(listEffectiveDeploymentsRequest));
183,484
public void marshall(CreateCustomDataIdentifierRequest createCustomDataIdentifierRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createCustomDataIdentifierRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createCustomDataIdentifierRequest.getClientToken(), CLIENTTOKEN_BINDING);<NEW_LINE>protocolMarshaller.marshall(createCustomDataIdentifierRequest.getDescription(), DESCRIPTION_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(createCustomDataIdentifierRequest.getKeywords(), KEYWORDS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createCustomDataIdentifierRequest.getMaximumMatchDistance(), MAXIMUMMATCHDISTANCE_BINDING);<NEW_LINE>protocolMarshaller.marshall(createCustomDataIdentifierRequest.getName(), NAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(createCustomDataIdentifierRequest.getRegex(), REGEX_BINDING);<NEW_LINE>protocolMarshaller.marshall(createCustomDataIdentifierRequest.getSeverityLevels(), SEVERITYLEVELS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createCustomDataIdentifierRequest.getTags(), TAGS_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
createCustomDataIdentifierRequest.getIgnoreWords(), IGNOREWORDS_BINDING);
1,387,658
protected SqlNodeList realParse(ByteString sql, List<?> params, ContextParameters contextParameters, ExecutionContext ec) {<NEW_LINE>try {<NEW_LINE>List<SQLStatement> <MASK><NEW_LINE>List<SqlNode> sqlNodes = new ArrayList<>();<NEW_LINE>for (SQLStatement statement : stmtList) {<NEW_LINE>final SqlNode converted;<NEW_LINE>if (contextParameters == null) {<NEW_LINE>contextParameters = new ContextParameters();<NEW_LINE>}<NEW_LINE>converted = convertStatementToSqlNode(statement, params, contextParameters, ec);<NEW_LINE>if (statement instanceof MySqlHintStatement && converted instanceof SqlNodeList) {<NEW_LINE>sqlNodes.addAll(((SqlNodeList) converted).getList());<NEW_LINE>} else {<NEW_LINE>sqlNodes.add(converted);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>SqlNodeList sqlNodeList = new SqlNodeList(sqlNodes, SqlParserPos.ZERO);<NEW_LINE>return sqlNodeList;<NEW_LINE>} catch (ParserException e) {<NEW_LINE>throw new FastSqlParserException(FastSqlParserException.ExceptionType.NOT_SUPPORT, e, "Not support and check the manual that corresponds to your CoronaDB server version");<NEW_LINE>}<NEW_LINE>}
stmtList = FastsqlUtils.parseSql(sql);
1,813,120
protected String doIt() throws Exception {<NEW_LINE>if (getCostTypeId() == getCostTypeIdTo())<NEW_LINE>throw new AdempiereException("@M_CostType_ID@ @NotValid@");<NEW_LINE>MAcctSchema accountSchema = MAcctSchema.get(<MASK><NEW_LINE>MCostType costTypeFrom = MCostType.get(getCtx(), getCostTypeId());<NEW_LINE>MCostType costTypeTo = MCostType.get(getCtx(), getCostTypeIdTo());<NEW_LINE>MCostElement costElementFrom = MCostElement.get(getCtx(), getCostElementId());<NEW_LINE>MCostElement costElementTo = MCostElement.get(getCtx(), getCostElementIdTo());<NEW_LINE>Arrays.stream(getProductIds()).filter(productId -> productId > 0).forEach(productId -> {<NEW_LINE>Trx.run(trxName -> {<NEW_LINE>copyCostTypeToCostType(productId, accountSchema, costTypeFrom, costTypeTo, costElementFrom, costElementTo, trxName);<NEW_LINE>});<NEW_LINE>});<NEW_LINE>return "@Ok@";<NEW_LINE>}
getCtx(), getAcctSchemaId());
1,387,046
public void suicide(DataWord obtainerAddress) {<NEW_LINE>byte[] owner = getOwnerAddress().getLast20Bytes();<NEW_LINE>byte[] obtainer = obtainerAddress.getLast20Bytes();<NEW_LINE>BigInteger balance = <MASK><NEW_LINE>if (logger.isInfoEnabled())<NEW_LINE>logger.info("Transfer to: [{}] heritage: [{}]", toHexString(obtainer), balance);<NEW_LINE>addInternalTx(null, null, owner, obtainer, balance, null, "suicide");<NEW_LINE>if (FastByteComparisons.compareTo(owner, 0, 20, obtainer, 0, 20) == 0) {<NEW_LINE>// if owner == obtainer just zeroing account according to Yellow Paper<NEW_LINE>getStorage().addBalance(owner, balance.negate());<NEW_LINE>} else {<NEW_LINE>transfer(getStorage(), owner, obtainer, balance);<NEW_LINE>}<NEW_LINE>getResult().addDeleteAccount(this.getOwnerAddress());<NEW_LINE>}
getStorage().getBalance(owner);
990,946
public boolean _addHotkey(int keyCode, int modifiers, HotkeyListener listener) {<NEW_LINE>if (RunTime.get().isJava9("JintelliType HotkeyHandling not useable - skipped")) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>JIntellitype itype = null;<NEW_LINE>try {<NEW_LINE>itype = JIntellitype.getInstance();<NEW_LINE>} catch (Exception ex) {<NEW_LINE>Debug.error("WindowsHotkeyManager: JIntellitype problem: %s", ex.getMessage());<NEW_LINE>}<NEW_LINE>if (itype == null) {<NEW_LINE>System.exit(1);<NEW_LINE>}<NEW_LINE>if (_gHotkeyId == 1) {<NEW_LINE>itype.addHotKeyListener(new JIntellitypeHandler());<NEW_LINE>}<NEW_LINE>_removeHotkey(keyCode, modifiers);<NEW_LINE>int id = _gHotkeyId++;<NEW_LINE>HotkeyData data = new <MASK><NEW_LINE>_idCallbackMap.put(id, data);<NEW_LINE>itype.registerHotKey(id, translateMod(modifiers), keyCode);<NEW_LINE>return true;<NEW_LINE>}
HotkeyData(keyCode, modifiers, listener);
1,600,192
public static Object spawn(Context cx, Scriptable thisObj, Object[] args, Function funObj) {<NEW_LINE>Scriptable scope = funObj.getParentScope();<NEW_LINE>Runner runner;<NEW_LINE>if (args.length != 0 && args[0] instanceof Function) {<NEW_LINE>Object[] newArgs = null;<NEW_LINE>if (args.length > 1 && args[1] instanceof Scriptable) {<NEW_LINE>newArgs = cx.getElements((Scriptable) args[1]);<NEW_LINE>}<NEW_LINE>if (newArgs == null) {<NEW_LINE>newArgs = ScriptRuntime.emptyArgs;<NEW_LINE>}<NEW_LINE>runner = new Runner(scope, (Function<MASK><NEW_LINE>} else if (args.length != 0 && args[0] instanceof Script) {<NEW_LINE>runner = new Runner(scope, (Script) args[0]);<NEW_LINE>} else {<NEW_LINE>throw reportRuntimeError("msg.spawn.args");<NEW_LINE>}<NEW_LINE>runner.factory = cx.getFactory();<NEW_LINE>Thread thread = new Thread(runner);<NEW_LINE>thread.start();<NEW_LINE>return thread;<NEW_LINE>}
) args[0], newArgs);
1,136,934
private void doVisitToken(FullIdent ident, boolean isStatic, boolean previous, DetailAST ast) {<NEW_LINE>final String name = ident.getText();<NEW_LINE>final int groupIdx = getGroupNumber(isStatic && staticImportsApart, name);<NEW_LINE>if (groupIdx > lastGroup) {<NEW_LINE>if (!beforeFirstImport && ast.getLineNo() - lastImportLine < 2 && needSeparator(isStatic)) {<NEW_LINE>log(ast, MSG_SEPARATION, name);<NEW_LINE>}<NEW_LINE>} else if (groupIdx == lastGroup) {<NEW_LINE>doVisitTokenInSameGroup(isStatic, previous, name, ast);<NEW_LINE>} else {<NEW_LINE>log(ast, MSG_ORDERING, name);<NEW_LINE>}<NEW_LINE>if (isSeparatorInGroup(groupIdx, isStatic, ast.getLineNo())) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>lastGroup = groupIdx;<NEW_LINE>lastImport = name;<NEW_LINE>}
log(ast, MSG_SEPARATED_IN_GROUP, name);
924,401
public void startDownloadable(Message message) {<NEW_LINE>if (!hasPermissions(REQUEST_START_DOWNLOAD, Manifest.permission.WRITE_EXTERNAL_STORAGE)) {<NEW_LINE>this.mPendingDownloadableMessage = message;<NEW_LINE>return;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (transferable != null) {<NEW_LINE>if (transferable instanceof TransferablePlaceholder && message.hasFileOnRemoteHost()) {<NEW_LINE>createNewConnection(message);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!transferable.start()) {<NEW_LINE>Log.d(Config.LOGTAG, "type: " + transferable.getClass().getName());<NEW_LINE>Toast.makeText(getActivity(), R.string.not_connected_try_again, Toast.LENGTH_SHORT).show();<NEW_LINE>}<NEW_LINE>} else if (message.treatAsDownloadable() || message.hasFileOnRemoteHost() || MessageUtils.unInitiatedButKnownSize(message)) {<NEW_LINE>createNewConnection(message);<NEW_LINE>} else {<NEW_LINE>Log.d(Config.LOGTAG, message.getConversation().getAccount() + ": unable to start downloadable");<NEW_LINE>}<NEW_LINE>}
Transferable transferable = message.getTransferable();
748,124
public List<I_M_Product> retrieveHoldingFeeProducts(final I_C_Flatrate_Conditions fc) {<NEW_LINE>final Properties ctx = getCtx(fc);<NEW_LINE>final String trxName = getTrxName(fc);<NEW_LINE>final List<I_M_Product> <MASK><NEW_LINE>final String wc = I_C_Flatrate_Matching.COLUMNNAME_C_Flatrate_Conditions_ID + "=?";<NEW_LINE>final List<I_C_Flatrate_Matching> matchings = new Query(ctx, I_C_Flatrate_Matching.Table_Name, wc, trxName).setParameters(fc.getC_Flatrate_Conditions_ID()).setOnlyActiveRecords(true).setClient_ID().setOrderBy(I_C_Flatrate_Matching.COLUMNNAME_SeqNo + ", " + I_C_Flatrate_Matching.COLUMNNAME_C_Flatrate_Matching_ID).list(I_C_Flatrate_Matching.class);<NEW_LINE>for (final I_C_Flatrate_Matching matching : matchings) {<NEW_LINE>Check.assume(matching.getM_Product_Category_Matching_ID() > 0, matching + " has M_Product_Category_Matching_ID>0");<NEW_LINE>if (matching.getM_Product_ID() > 0) {<NEW_LINE>result.add(InterfaceWrapperHelper.load(matching.getM_Product_ID(), I_M_Product.class));<NEW_LINE>} else {<NEW_LINE>final List<I_M_Product> productsOfCategory = new Query(ctx, org.compiere.model.I_M_Product.Table_Name, org.compiere.model.I_M_Product.COLUMNNAME_M_Product_Category_ID + "=?", trxName).setParameters(matching.getM_Product_Category_Matching_ID()).setOnlyActiveRecords(true).setClient_ID().setOrderBy(org.compiere.model.I_M_Product.COLUMNNAME_Value + "," + org.compiere.model.I_M_Product.COLUMNNAME_M_Product_ID).list(I_M_Product.class);<NEW_LINE>result.addAll(productsOfCategory);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
result = new ArrayList<>();
444,381
static int encodeToChar(byte[] sArr, char[] dArr, final int start) {<NEW_LINE>final int sLen = sArr.length;<NEW_LINE>// Length of even 24-bits.<NEW_LINE>final int eLen = (sLen / 3) * 3;<NEW_LINE>// Returned character count<NEW_LINE>final int dLen = ((sLen - 1) / 3 + 1) << 2;<NEW_LINE>// Encode even 24-bits<NEW_LINE>for (int s = 0, d = start; s < eLen; ) {<NEW_LINE>// Copy next three bytes into lower 24 bits of int, paying attension to sign.<NEW_LINE>int i = (sArr[s++] & 0xff) << 16 | (sArr[s++] & 0xff) << 8 | (sArr[s++] & 0xff);<NEW_LINE>// Encode the int into four chars<NEW_LINE>dArr[d++] = CA[(i >>> 18) & 0x3f];<NEW_LINE>dArr[d++] = CA[(i >>> 12) & 0x3f];<NEW_LINE>dArr[d++] = CA[(i >>> 6) & 0x3f];<NEW_LINE>dArr[d++] = CA[i & 0x3f];<NEW_LINE>}<NEW_LINE>// Pad and encode last bits if source isn't even 24 bits.<NEW_LINE>// 0 - 2.<NEW_LINE>int left = sLen - eLen;<NEW_LINE>if (left > 0) {<NEW_LINE>// Prepare the int<NEW_LINE>int i = ((sArr[eLen] & 0xff) << 10) | (left == 2 ? ((sArr[sLen - 1] & 0xff) << 2) : 0);<NEW_LINE>// Set last four chars<NEW_LINE>dArr[start + dLen - 4] <MASK><NEW_LINE>dArr[start + dLen - 3] = CA[(i >>> 6) & 0x3f];<NEW_LINE>dArr[start + dLen - 2] = left == 2 ? CA[i & 0x3f] : '=';<NEW_LINE>dArr[start + dLen - 1] = '=';<NEW_LINE>}<NEW_LINE>return dLen;<NEW_LINE>}
= CA[i >> 12];
15,389
private void initComponents() {<NEW_LINE>setLayout(new BorderLayout());<NEW_LINE>setOpaque(false);<NEW_LINE>area = new HTMLTextArea() {<NEW_LINE><NEW_LINE>protected void showURL(URL url) {<NEW_LINE>String link = url.toString();<NEW_LINE>if (link.startsWith(LINK_TOGGLE_CATEGORY)) {<NEW_LINE>link = link.substring(LINK_TOGGLE_CATEGORY.length());<NEW_LINE>toggleExpanded(link);<NEW_LINE>updateSavedData();<NEW_LINE>} else if (link.startsWith(LINK_OPEN_SNAPSHOT)) {<NEW_LINE>link = link.substring(LINK_OPEN_SNAPSHOT.length());<NEW_LINE>Snapshot s = snapshotsMap.get(Integer.parseInt(link));<NEW_LINE>if (s != null)<NEW_LINE>DataSourceWindowManager.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>};<NEW_LINE>updateSavedData();<NEW_LINE>area.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));<NEW_LINE>add(new ScrollableContainer(area), BorderLayout.CENTER);<NEW_LINE>}
sharedInstance().openDataSource(s);
1,346,076
public static void notifyRunConfiguration(Project project) {<NEW_LINE>final String projectName = NodeJsUtils.getProjectDisplayName(project);<NEW_LINE>final NodeJsSupport nodeJsSupport = NodeJsSupport.forProject(project);<NEW_LINE>final NodeJsPreferences preferences = nodeJsSupport.getPreferences();<NEW_LINE>assert !preferences.isRunEnabled() : "node.js run should not be enabled in " + projectName;<NEW_LINE>NotificationDisplayer.getDefault().notify(Bundle.Notifications_enabled_title(), NotificationDisplayer.Priority.LOW.getIcon(), Bundle.Notifications_enabled_description(projectName), new ActionListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void actionPerformed(ActionEvent e) {<NEW_LINE>String text;<NEW_LINE>if (!preferences.isEnabled()) {<NEW_LINE>// not enabled at all (happens if one clicks in notifications window later)<NEW_LINE>text = Bundle.Notifications_enabled_invalid(projectName);<NEW_LINE>} else if (preferences.isRunEnabled()) {<NEW_LINE>// already done<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>nodeJsSupport.firePropertyChanged(NodeJsPlatformProvider.PROP_RUN_CONFIGURATION, null, NodeJsRunPanel.IDENTIFIER);<NEW_LINE>text = Bundle.Notifications_enabled_done(projectName);<NEW_LINE>}<NEW_LINE>StatusDisplayer.getDefault().setStatusText(text);<NEW_LINE>}<NEW_LINE>}, NotificationDisplayer.Priority.LOW);<NEW_LINE>}
text = Bundle.Notifications_enabled_noop(projectName);
1,279,403
protected AlgorithmParameters engineGenerateParameters() {<NEW_LINE>DSAParametersGenerator pGen;<NEW_LINE>if (strength <= 1024) {<NEW_LINE>pGen = new DSAParametersGenerator();<NEW_LINE>} else {<NEW_LINE>pGen = new DSAParametersGenerator(new SHA256Digest());<NEW_LINE>}<NEW_LINE>if (random == null) {<NEW_LINE>random = CryptoServicesRegistrar.getSecureRandom();<NEW_LINE>}<NEW_LINE>int certainty = PrimeCertaintyCalculator.getDefaultCertainty(strength);<NEW_LINE>if (strength == 1024) {<NEW_LINE>params = new DSAParameterGenerationParameters(1024, 160, certainty, random);<NEW_LINE>pGen.init(params);<NEW_LINE>} else if (strength > 1024) {<NEW_LINE>params = new DSAParameterGenerationParameters(<MASK><NEW_LINE>pGen.init(params);<NEW_LINE>} else {<NEW_LINE>pGen.init(strength, certainty, random);<NEW_LINE>}<NEW_LINE>DSAParameters p = pGen.generateParameters();<NEW_LINE>AlgorithmParameters params;<NEW_LINE>try {<NEW_LINE>params = createParametersInstance("DSA");<NEW_LINE>params.init(new DSAParameterSpec(p.getP(), p.getQ(), p.getG()));<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new RuntimeException(e.getMessage());<NEW_LINE>}<NEW_LINE>return params;<NEW_LINE>}
strength, 256, certainty, random);
298,537
public static DescribeInstancesResponse unmarshall(DescribeInstancesResponse describeInstancesResponse, UnmarshallerContext context) {<NEW_LINE>describeInstancesResponse.setRequestId(context.stringValue("DescribeInstancesResponse.RequestId"));<NEW_LINE>describeInstancesResponse.setTotalCount(context.integerValue("DescribeInstancesResponse.TotalCount"));<NEW_LINE>List<Instance> instances = new ArrayList<Instance>();<NEW_LINE>for (int i = 0; i < context.lengthValue("DescribeInstancesResponse.Instances.Length"); i++) {<NEW_LINE>Instance instance = new Instance();<NEW_LINE>instance.setInstanceId(context.stringValue("DescribeInstancesResponse.Instances[" + i + "].InstanceId"));<NEW_LINE>instance.setRegionId(context.stringValue("DescribeInstancesResponse.Instances[" + i + "].RegionId"));<NEW_LINE>instance.setZoneId(context.stringValue("DescribeInstancesResponse.Instances[" + i + "].ZoneId"));<NEW_LINE>instance.setHsmStatus(context.integerValue("DescribeInstancesResponse.Instances[" + i + "].HsmStatus"));<NEW_LINE>instance.setHsmOem(context.stringValue<MASK><NEW_LINE>instance.setHsmDeviceType(context.stringValue("DescribeInstancesResponse.Instances[" + i + "].HsmDeviceType"));<NEW_LINE>instance.setVpcId(context.stringValue("DescribeInstancesResponse.Instances[" + i + "].VpcId"));<NEW_LINE>instance.setVswitchId(context.stringValue("DescribeInstancesResponse.Instances[" + i + "].VswitchId"));<NEW_LINE>instance.setIp(context.stringValue("DescribeInstancesResponse.Instances[" + i + "].Ip"));<NEW_LINE>instance.setRemark(context.stringValue("DescribeInstancesResponse.Instances[" + i + "].Remark"));<NEW_LINE>instance.setExpiredTime(context.longValue("DescribeInstancesResponse.Instances[" + i + "].ExpiredTime"));<NEW_LINE>instance.setCreateTime(context.longValue("DescribeInstancesResponse.Instances[" + i + "].CreateTime"));<NEW_LINE>List<String> whiteList = new ArrayList<String>();<NEW_LINE>for (int j = 0; j < context.lengthValue("DescribeInstancesResponse.Instances[" + i + "].WhiteList.Length"); j++) {<NEW_LINE>whiteList.add(context.stringValue("DescribeInstancesResponse.Instances[" + i + "].WhiteList[" + j + "]"));<NEW_LINE>}<NEW_LINE>instance.setWhiteList(whiteList);<NEW_LINE>instances.add(instance);<NEW_LINE>}<NEW_LINE>describeInstancesResponse.setInstances(instances);<NEW_LINE>return describeInstancesResponse;<NEW_LINE>}
("DescribeInstancesResponse.Instances[" + i + "].HsmOem"));
1,209,793
private ITransaction forceInitTransaction(ExecutionContext executionContext) {<NEW_LINE>lock.lock();<NEW_LINE>try {<NEW_LINE>if (this.isClosed()) {<NEW_LINE>throw new TddlRuntimeException(ErrorCode.ERR_CONNECTION_CLOSED, "connection has been closed");<NEW_LINE>}<NEW_LINE>// force update transaction policy<NEW_LINE>this.trxPolicy = loadTrxPolicy(executionContext);<NEW_LINE>loadShareReadView(executionContext);<NEW_LINE>boolean isSingleShard = false;<NEW_LINE>if (executionContext.getFinalPlan() != null) {<NEW_LINE>RelNode plan = executionContext.getFinalPlan().getPlan();<NEW_LINE>isSingleShard = plan instanceof SingleTableOperation || plan instanceof DirectTableOperation || plan instanceof DirectShardingKeyTableOperation;<NEW_LINE>}<NEW_LINE>TransactionClass trxConfig = trxPolicy.getTransactionType(false, executionContext.isReadOnly(), isSingleShard);<NEW_LINE>if (logicalTimeZone != null) {<NEW_LINE>setTimeZoneVariable(serverVariables);<NEW_LINE>}<NEW_LINE>executionContext.<MASK><NEW_LINE>executionContext.setSchemaName(dataSource.getSchemaName());<NEW_LINE>executionContext.setTxIsolation(transactionIsolation);<NEW_LINE>executionContext.setServerVariables(serverVariables);<NEW_LINE>executionContext.setUserDefVariables(userDefVariables);<NEW_LINE>executionContext.setConnection(this);<NEW_LINE>executionContext.setShareReadView(shareReadView == ShareReadViewPolicy.ON);<NEW_LINE>ITransactionManager tm = this.dataSource.getConfigHolder().getExecutorContext().getTransactionManager();<NEW_LINE>this.trx = tm.createTransaction(trxConfig, executionContext);<NEW_LINE>return this.trx;<NEW_LINE>} finally {<NEW_LINE>lock.unlock();<NEW_LINE>}<NEW_LINE>}
setAppName(dataSource.getAppName());
824,843
public List<Site> readAllActiveSites() {<NEW_LINE>CriteriaBuilder builder = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<Site> criteria = builder.createQuery(Site.class);<NEW_LINE>Root<SiteImpl> site = criteria.from(SiteImpl.class);<NEW_LINE>criteria.select(site);<NEW_LINE>criteria.where(builder.and(builder.or(builder.isNull(site.get("archiveStatus").get("archived").as(String.class)), builder.notEqual(site.get("archiveStatus").get("archived").as(Character.class), 'Y')), builder.or(builder.isNull(site.get("deactivated").as(Boolean.class)), builder.notEqual(site.get("deactivated").as(Boolean.class), true))));<NEW_LINE>TypedQuery<Site> query = em.createQuery(criteria);<NEW_LINE>query.setHint(QueryHints.HINT_CACHEABLE, true);<NEW_LINE>query.<MASK><NEW_LINE>return query.getResultList();<NEW_LINE>}
setHint(QueryHints.HINT_CACHE_REGION, "blSiteElementsQuery");
312,554
public void addCoreMethodNodes(List<? extends NodeFactory<? extends RubyBaseNode>> nodeFactories) {<NEW_LINE>String moduleName = null;<NEW_LINE>RubyModule module = null;<NEW_LINE>for (NodeFactory<? extends RubyBaseNode> nodeFactory : nodeFactories) {<NEW_LINE>final Class<?> nodeClass = nodeFactory.getNodeClass();<NEW_LINE>final CoreMethod methodAnnotation = <MASK><NEW_LINE>if (methodAnnotation != null) {<NEW_LINE>if (module == null) {<NEW_LINE>CoreModule coreModule = nodeClass.getEnclosingClass().getAnnotation(CoreModule.class);<NEW_LINE>if (coreModule == null) {<NEW_LINE>throw new Error(nodeClass.getEnclosingClass() + " needs a @CoreModule annotation");<NEW_LINE>}<NEW_LINE>moduleName = coreModule.value();<NEW_LINE>module = getModule(moduleName, coreModule.isClass());<NEW_LINE>}<NEW_LINE>addCoreMethod(module, new MethodDetails(moduleName, methodAnnotation, nodeFactory));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
nodeClass.getAnnotation(CoreMethod.class);
891,633
public List<MethodBinding> checkAndAddSyntheticRecordOverrideMethods(MethodBinding[] methodBindings, List<MethodBinding> implicitMethods) {<NEW_LINE>if (!hasMethodWithNumArgs(TypeConstants.TOSTRING, 0)) {<NEW_LINE>MethodBinding m = addSyntheticRecordOverrideMethod(TypeConstants.TOSTRING, implicitMethods.size());<NEW_LINE>implicitMethods.add(m);<NEW_LINE>}<NEW_LINE>if (!hasMethodWithNumArgs(TypeConstants.HASHCODE, 0)) {<NEW_LINE>MethodBinding m = addSyntheticRecordOverrideMethod(TypeConstants.HASHCODE, implicitMethods.size());<NEW_LINE>implicitMethods.add(m);<NEW_LINE>}<NEW_LINE>boolean isEqualsPresent = Arrays.stream(methodBindings).filter(m -> CharOperation.equals(TypeConstants.EQUALS, m.selector)).anyMatch(m -> m.parameters != null && m.parameters.length == 1 && m.parameters[0].equals(this.scope.getJavaLangObject()));<NEW_LINE>if (!isEqualsPresent) {<NEW_LINE>MethodBinding m = addSyntheticRecordOverrideMethod(TypeConstants.<MASK><NEW_LINE>implicitMethods.add(m);<NEW_LINE>}<NEW_LINE>if (this.isRecordDeclaration && getImplicitCanonicalConstructor() == -1) {<NEW_LINE>MethodBinding explicitCanon = null;<NEW_LINE>for (MethodBinding m : methodBindings) {<NEW_LINE>if (m.isCompactConstructor() || m.isCanonicalConstructor()) {<NEW_LINE>explicitCanon = m;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (explicitCanon == null) {<NEW_LINE>implicitMethods.add(addSyntheticRecordCanonicalConstructor());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return implicitMethods;<NEW_LINE>}
EQUALS, implicitMethods.size());
160,460
void completed(Exception throwable) {<NEW_LINE>boolean needToFire = true;<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "completed", throwable.getMessage());<NEW_LINE>}<NEW_LINE>synchronized (this.completedSemaphore) {<NEW_LINE>// future can already be completed<NEW_LINE>if (this.completed || !this.channel.isOpen()) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "Future completed after already cancelled or socket was closed");<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>this.completed = true;<NEW_LINE>// new timeout code - cancel active timeout request<NEW_LINE>if (getTimeoutWorkItem() != null) {<NEW_LINE>getTimeoutWorkItem<MASK><NEW_LINE>}<NEW_LINE>this.exception = throwable;<NEW_LINE>if (this.firstListener == null) {<NEW_LINE>// Sync Read/Write request.<NEW_LINE>// must do this inside the sync, or else syncRead/Write could complete<NEW_LINE>// before we get here, and we would be doing this on the next<NEW_LINE>// read/write request!<NEW_LINE>needToFire = false;<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "doing notify for future " + this);<NEW_LINE>}<NEW_LINE>this.completedSemaphore.notifyAll();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// end of sync<NEW_LINE>if (needToFire) {<NEW_LINE>// ASync Read/Write request.<NEW_LINE>// need to do this outside the sync, or else we will hold the sync<NEW_LINE>// for the user's callback.<NEW_LINE>fireCompletionActions();<NEW_LINE>}<NEW_LINE>}
().state = TimerWorkItem.ENTRY_CANCELLED;
1,511,346
private SqlViewBinding createViewBinding(@NonNull final SqlViewBindingKey key) {<NEW_LINE>final WindowId windowId = key.getWindowId();<NEW_LINE>final DocumentEntityDescriptor entityDescriptor = documentDescriptorFactory.getDocumentEntityDescriptor(windowId);<NEW_LINE>final Set<String> displayFieldNames = entityDescriptor.getFieldNamesWithCharacteristic(key.getRequiredFieldCharacteristic());<NEW_LINE>final SqlDocumentEntityDataBindingDescriptor entityBinding = SqlDocumentEntityDataBindingDescriptor.cast(entityDescriptor.getDataBinding());<NEW_LINE>final <MASK><NEW_LINE>final SqlViewBinding.Builder builder = createBuilderForEntityBindingAndFieldNames(entityBinding, displayFieldNames).filterDescriptors(filterDescriptors).refreshViewOnChangeEvents(entityDescriptor.isRefreshViewOnChangeEvents()).viewInvalidationAdvisor(getViewInvalidationAdvisor(windowId));<NEW_LINE>builder.filterConverters(filterConverters);<NEW_LINE>if (filterConvertorDecorators.containsKey(windowId)) {<NEW_LINE>builder.filterConverterDecorator(filterConvertorDecorators.get(windowId));<NEW_LINE>}<NEW_LINE>final SqlViewCustomizer sqlViewCustomizer = viewCustomizers.getOrNull(windowId, key.getProfileId());<NEW_LINE>if (sqlViewCustomizer != null) {<NEW_LINE>builder.rowCustomizer(sqlViewCustomizer);<NEW_LINE>sqlViewCustomizer.customizeSqlViewBinding(builder);<NEW_LINE>}<NEW_LINE>return builder.build();<NEW_LINE>}
DocumentFilterDescriptorsProvider filterDescriptors = entityDescriptor.getFilterDescriptors();
506,166
public void workEnded(Date date) {<NEW_LINE>// ///<NEW_LINE>// Update atomically. Mainly we're trying to avoid inconsistency such as the instance showing COMPLETED with the execution FAILED<NEW_LINE>//<NEW_LINE>// This has some tradeoff. Maybe things have failed already. We're now making it harder to update with the FAILED state since<NEW_LINE>// the whole update has to succeed...otherwise we leave things in some failed-but-not-recognized-as-failure state.<NEW_LINE>WSJobExecution execution = (WSJobExecution) getPersistenceManagerService().updateJobExecutionAndInstanceOnEnd(getTopLevelExecutionId(), batchStatus, exitStatus, new Date());<NEW_LINE>// WSJobInstance jobInstance = getPersistenceManagerService().getJobInstanceFromExecutionId(execution.getExecutionId());<NEW_LINE>ZosJBatchSMFLogging smflogger = getJBatchSMFLoggingService();<NEW_LINE>if (smflogger != null) {<NEW_LINE>byte[] timeUsedAfter <MASK><NEW_LINE>getJBatchSMFLoggingService().buildAndWriteJobEndRecord(execution, this, getPersistenceManagerService().getPersistenceType(), getPersistenceManagerService().getDisplayId(), timeUsedBefore, timeUsedAfter);<NEW_LINE>}<NEW_LINE>publishEvent(execution, execution.getJobInstance(), batchStatus);<NEW_LINE>}
= getJBatchSMFLoggingService().getTimeUsedData();
80,232
public AgentInfoBo map(TAgentInfo thriftObject) {<NEW_LINE>final String hostName = thriftObject.getHostname();<NEW_LINE>final String ip = thriftObject.getIp();<NEW_LINE>final <MASK><NEW_LINE>final String agentId = thriftObject.getAgentId();<NEW_LINE>final String agentName = thriftObject.getAgentName();<NEW_LINE>final String applicationName = thriftObject.getApplicationName();<NEW_LINE>final short serviceType = thriftObject.getServiceType();<NEW_LINE>final int pid = thriftObject.getPid();<NEW_LINE>final String vmVersion = thriftObject.getVmVersion();<NEW_LINE>final String agentVersion = thriftObject.getAgentVersion();<NEW_LINE>final long startTime = thriftObject.getStartTimestamp();<NEW_LINE>final long endTimeStamp = thriftObject.getEndTimestamp();<NEW_LINE>final int endStatus = thriftObject.getEndStatus();<NEW_LINE>final boolean container = thriftObject.isContainer();<NEW_LINE>final AgentInfoBo.Builder builder = new AgentInfoBo.Builder();<NEW_LINE>builder.setHostName(hostName);<NEW_LINE>builder.setIp(ip);<NEW_LINE>builder.setPorts(ports);<NEW_LINE>builder.setAgentId(agentId);<NEW_LINE>builder.setAgentName(agentName);<NEW_LINE>builder.setApplicationName(applicationName);<NEW_LINE>builder.setServiceTypeCode(serviceType);<NEW_LINE>builder.setPid(pid);<NEW_LINE>builder.setVmVersion(vmVersion);<NEW_LINE>builder.setAgentVersion(agentVersion);<NEW_LINE>builder.setStartTime(startTime);<NEW_LINE>builder.setEndTimeStamp(endTimeStamp);<NEW_LINE>builder.setEndStatus(endStatus);<NEW_LINE>builder.isContainer(container);<NEW_LINE>if (thriftObject.isSetServerMetaData()) {<NEW_LINE>builder.setServerMetaData(this.serverMetaDataBoMapper.map(thriftObject.getServerMetaData()));<NEW_LINE>}<NEW_LINE>if (thriftObject.isSetJvmInfo()) {<NEW_LINE>builder.setJvmInfo(this.jvmInfoBoMapper.map(thriftObject.getJvmInfo()));<NEW_LINE>}<NEW_LINE>return builder.build();<NEW_LINE>}
String ports = thriftObject.getPorts();
1,440,858
public boolean execute() {<NEW_LINE>String tableSchema = executableScheduledJob.getTableSchema();<NEW_LINE>String timeZoneStr = executableScheduledJob.getTimeZone();<NEW_LINE>long scheduleId = executableScheduledJob.getScheduleId();<NEW_LINE>long fireTime = executableScheduledJob.getFireTime();<NEW_LINE>long startTime = ZonedDateTime.now().toEpochSecond();<NEW_LINE>try {<NEW_LINE>// mark as RUNNING<NEW_LINE>boolean casSuccess = ScheduledJobsManager.casStateWithStartTime(scheduleId, fireTime, QUEUED, RUNNING, startTime);<NEW_LINE>if (!casSuccess) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// execute<NEW_LINE>FailPoint.injectException("FP_LOCAL_PARTITION_SCHEDULED_JOB_ERROR");<NEW_LINE>final String tableName = executableScheduledJob.getTableName();<NEW_LINE>final InternalTimeZone timeZone = TimeZoneUtils.convertFromMySqlTZ(timeZoneStr);<NEW_LINE>IRepository repository = ExecutorContext.getContext(tableSchema).getTopologyHandler().getRepositoryHolder().get(Group.GroupType.MYSQL_JDBC.toString());<NEW_LINE>List<LocalPartitionDescription> preLocalPartitionList = getLocalPartitionList((MyRepository) repository, tableSchema, tableName);<NEW_LINE>logger.info(String.format("start allocating local partition. table:[%s]", tableName));<NEW_LINE>executeBackgroundSql(String.format("ALTER TABLE %s ALLOCATE LOCAL PARTITION", tableName), tableSchema, timeZone);<NEW_LINE>logger.info(String.format("start expiring local partition. table:[%s]", tableName));<NEW_LINE>executeBackgroundSql(String.format("ALTER TABLE %s EXPIRE LOCAL PARTITION", tableName), tableSchema, timeZone);<NEW_LINE>List<LocalPartitionDescription> postLocalPartitionList = getLocalPartitionList((MyRepository) repository, tableSchema, tableName);<NEW_LINE>String remark = genRemark(preLocalPartitionList, postLocalPartitionList);<NEW_LINE>// mark as SUCCESS<NEW_LINE>long finishTime = ZonedDateTime.now().toEpochSecond();<NEW_LINE>casSuccess = ScheduledJobsManager.casStateWithFinishTime(scheduleId, fireTime, RUNNING, SUCCESS, finishTime, remark);<NEW_LINE>if (!casSuccess) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>} catch (Throwable t) {<NEW_LINE>logger.error(String.format("process scheduled local partition job:[%s] error, fireTime:[%s]"<MASK><NEW_LINE>ScheduledJobsManager.updateState(scheduleId, fireTime, FAILED, null, t.getMessage());<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
, scheduleId, fireTime), t);
805,661
public List<AtmosphereRequest> onTextStream(WebSocket webSocket, Reader r) {<NEW_LINE>// Converting to a string and delegating to onMessage(WebSocket webSocket, String d) causes issues because the binary data may not be a valid string.<NEW_LINE>AtmosphereResourceImpl resource = (AtmosphereResourceImpl) webSocket.resource();<NEW_LINE>if (resource == null) {<NEW_LINE>logger.trace("The WebSocket has been closed before the message was processed.");<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>AtmosphereRequest request = resource.getRequest();<NEW_LINE>request.setAttribute(FrameworkConfig.WEBSOCKET_SUBPROTOCOL, FrameworkConfig.STREAMING_HTTP_OVER_WEBSOCKET);<NEW_LINE>List<AtmosphereRequest> list = new ArrayList<AtmosphereRequest>();<NEW_LINE>list.add(constructRequest(webSocket, request.getPathInfo(), request.getRequestURI(), methodType, contentType.equalsIgnoreCase(TEXT) ? null : contentType, destroyable).reader<MASK><NEW_LINE>return list;<NEW_LINE>}
(r).build());
830,416
void run() throws ExecutionException, InterruptedException {<NEW_LINE>final <MASK><NEW_LINE>Actor<Integer, Integer> manager = spawnActor(new BasicActor<Integer, Integer>(mailboxConfig) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected Integer doRun() throws InterruptedException, SuspendExecution {<NEW_LINE>ActorRef<Integer> a = this.ref();<NEW_LINE>for (int i = 0; i < N - 1; i++) a = createRelayActor(a);<NEW_LINE>// start things off<NEW_LINE>a.send(1);<NEW_LINE>Integer msg = null;<NEW_LINE>for (int i = 0; i < M; i++) {<NEW_LINE>msg = receive();<NEW_LINE>a.send(msg + 1);<NEW_LINE>}<NEW_LINE>return msg;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>int totalCount = manager.get();<NEW_LINE>final long time = TimeUnit.MILLISECONDS.convert(System.nanoTime() - start, TimeUnit.NANOSECONDS);<NEW_LINE>System.out.println("messages: " + totalCount + " time (ms): " + time);<NEW_LINE>}
long start = System.nanoTime();
1,602,045
public void lower(NewArrayNode node, LoweringTool tool) {<NEW_LINE>StructuredGraph graph = node.graph();<NEW_LINE>if (graph.getGuardsStage() != StructuredGraph.GuardsStage.AFTER_FSA) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ValueNode length = node.length();<NEW_LINE>SharedType type = (SharedType) node<MASK><NEW_LINE>DynamicHub hub = ensureMarkedAsInstantiated(type.getHub());<NEW_LINE>int layoutEncoding = hub.getLayoutEncoding();<NEW_LINE>int arrayBaseOffset = getArrayBaseOffset(layoutEncoding);<NEW_LINE>int log2ElementSize = LayoutEncoding.getArrayIndexShift(layoutEncoding);<NEW_LINE>ConstantNode hubConstant = ConstantNode.forConstant(SubstrateObjectConstant.forObject(hub), providers.getMetaAccess(), graph);<NEW_LINE>Arguments args = new Arguments(allocateArray, graph.getGuardsStage(), tool.getLoweringStage());<NEW_LINE>args.add("hub", hubConstant);<NEW_LINE>args.add("length", length.isAlive() ? length : graph.addOrUniqueWithInputs(length));<NEW_LINE>args.addConst("arrayBaseOffset", arrayBaseOffset);<NEW_LINE>args.addConst("log2ElementSize", log2ElementSize);<NEW_LINE>args.addConst("fillContents", FillContent.fromBoolean(node.fillContents()));<NEW_LINE>args.addConst("fillStartOffset", afterArrayLengthOffset());<NEW_LINE>args.addConst("emitMemoryBarrier", node.emitMemoryBarrier());<NEW_LINE>args.addConst("maybeUnroll", length.isConstant());<NEW_LINE>args.addConst("supportsBulkZeroing", tool.getLowerer().supportsBulkZeroing());<NEW_LINE>args.addConst("supportsOptimizedFilling", tool.getLowerer().supportsOptimizedFilling(graph.getOptions()));<NEW_LINE>args.addConst("profilingData", getProfilingData(node, type));<NEW_LINE>template(node, args).instantiate(providers.getMetaAccess(), node, SnippetTemplate.DEFAULT_REPLACER, args);<NEW_LINE>}
.elementType().getArrayClass();
792,537
public static void execute(ManagerConnection c, boolean isClear) {<NEW_LINE>ByteBuffer buffer = c.allocate();<NEW_LINE>// write header<NEW_LINE>buffer = header.write(buffer, c, true);<NEW_LINE>// write fields<NEW_LINE>for (FieldPacket field : fields) {<NEW_LINE>buffer = field.write(buffer, c, true);<NEW_LINE>}<NEW_LINE>// write eof<NEW_LINE>buffer = eof.write(buffer, c, true);<NEW_LINE>// write rows<NEW_LINE>byte packetId = eof.packetId;<NEW_LINE>Map<String, UserStat> statMap = UserStatAnalyzer.getInstance().getUserStatMap();<NEW_LINE>for (UserStat userStat : statMap.values()) {<NEW_LINE><MASK><NEW_LINE>List<SqlFrequency> list = userStat.getSqlHigh().getSqlFrequency(isClear);<NEW_LINE>if (list != null) {<NEW_LINE>int i = 1;<NEW_LINE>for (SqlFrequency sqlFrequency : list) {<NEW_LINE>if (sqlFrequency != null) {<NEW_LINE>RowDataPacket row = getRow(i, user, sqlFrequency.getSql(), sqlFrequency.getCount(), sqlFrequency.getAvgTime(), sqlFrequency.getMaxTime(), sqlFrequency.getMinTime(), sqlFrequency.getExecuteTime(), sqlFrequency.getLastTime(), c.getCharset(), sqlFrequency.getHost());<NEW_LINE>row.packetId = ++packetId;<NEW_LINE>buffer = row.write(buffer, c, true);<NEW_LINE>i++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// write last eof<NEW_LINE>EOFPacket lastEof = new EOFPacket();<NEW_LINE>lastEof.packetId = ++packetId;<NEW_LINE>buffer = lastEof.write(buffer, c, true);<NEW_LINE>// write buffer<NEW_LINE>c.write(buffer);<NEW_LINE>}
String user = userStat.getUser();
1,609,022
public Parent createContent() {<NEW_LINE>Cube c = new Cube(1, Color.RED);<NEW_LINE>c.rx.setAngle(45);<NEW_LINE>c.ry.setAngle(45);<NEW_LINE>Cube c2 = new Cube(1, Color.GREEN);<NEW_LINE>c2.setTranslateX(2);<NEW_LINE>c2.rx.setAngle(45);<NEW_LINE>c2.ry.setAngle(45);<NEW_LINE>Cube c3 = new <MASK><NEW_LINE>c3.setTranslateX(-2);<NEW_LINE>c3.rx.setAngle(45);<NEW_LINE>c3.ry.setAngle(45);<NEW_LINE>animation = new Timeline();<NEW_LINE>animation.getKeyFrames().addAll(new KeyFrame(Duration.ZERO, new KeyValue(c.ry.angleProperty(), 0d), new KeyValue(c2.rx.angleProperty(), 0d), new KeyValue(c3.rz.angleProperty(), 0d)), new KeyFrame(Duration.seconds(1), new KeyValue(c.ry.angleProperty(), 360d), new KeyValue(c2.rx.angleProperty(), 360d), new KeyValue(c3.rz.angleProperty(), 360d)));<NEW_LINE>animation.setCycleCount(Timeline.INDEFINITE);<NEW_LINE>PerspectiveCamera camera = new PerspectiveCamera(true);<NEW_LINE>camera.getTransforms().add(new Translate(0, 0, -10));<NEW_LINE>Group root = new Group();<NEW_LINE>root.getChildren().addAll(c, c2, c3);<NEW_LINE>SubScene subScene = new SubScene(root, 640, 480, true, SceneAntialiasing.BALANCED);<NEW_LINE>subScene.setCamera(camera);<NEW_LINE>return new Group(subScene);<NEW_LINE>}
Cube(1, Color.ORANGE);
1,376,316
public void userGet(final Response.Listener<User> responseListener, final Response.ErrorListener errorListener) {<NEW_LINE>Object postBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String path = "/user".replaceAll("\\{format\\}", "json");<NEW_LINE>// query params<NEW_LINE>List<Pair> queryParams = new ArrayList<Pair>();<NEW_LINE>// header params<NEW_LINE>Map<String, String> headerParams = new HashMap<String, String>();<NEW_LINE>// form params<NEW_LINE>Map<String, String> formParams = new HashMap<String, String>();<NEW_LINE>String[] contentTypes = { "application/json", "application/x-www-form-urlencoded" };<NEW_LINE>String contentType = contentTypes.length > <MASK><NEW_LINE>if (contentType.startsWith("multipart/form-data")) {<NEW_LINE>// file uploading<NEW_LINE>MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create();<NEW_LINE>HttpEntity httpEntity = localVarBuilder.build();<NEW_LINE>postBody = httpEntity;<NEW_LINE>} else {<NEW_LINE>// normal form params<NEW_LINE>}<NEW_LINE>String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" };<NEW_LINE>try {<NEW_LINE>apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames, new Response.Listener<String>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onResponse(String localVarResponse) {<NEW_LINE>try {<NEW_LINE>responseListener.onResponse((User) ApiInvoker.deserialize(localVarResponse, "", User.class));<NEW_LINE>} catch (ApiException exception) {<NEW_LINE>errorListener.onErrorResponse(new VolleyError(exception));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}, new Response.ErrorListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onErrorResponse(VolleyError error) {<NEW_LINE>errorListener.onErrorResponse(error);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} catch (ApiException ex) {<NEW_LINE>errorListener.onErrorResponse(new VolleyError(ex));<NEW_LINE>}<NEW_LINE>}
0 ? contentTypes[0] : "application/json";
618,464
public void onBackPressed() {<NEW_LINE>if (_isEditingIcon) {<NEW_LINE>stopEditingIcon(false);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>AtomicReference<String> msg = new AtomicReference<>();<NEW_LINE>AtomicReference<VaultEntry> entry = new AtomicReference<>();<NEW_LINE>try {<NEW_LINE>entry.set(parseEntry());<NEW_LINE>} catch (ParseException e) {<NEW_LINE>msg.set(e.getMessage());<NEW_LINE>}<NEW_LINE>// close the activity if the entry has not been changed<NEW_LINE>if (!_hasChangedIcon && _origEntry.equals(entry.get())) {<NEW_LINE>super.onBackPressed();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// ask for confirmation if the entry has been changed<NEW_LINE>Dialogs.showDiscardDialog(this, (dialog, which) -> {<NEW_LINE>// if the entry couldn't be parsed, we show an error dialog<NEW_LINE>if (msg.get() != null) {<NEW_LINE>onSaveError(msg.get());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>}, (dialog, which) -> super.onBackPressed());<NEW_LINE>}
addAndFinish(entry.get());
1,847,162
public boolean isSimpleType(Class<?> type) {<NEW_LINE>Assert.notNull(type, "Type must not be null!");<NEW_LINE>Map<Class<?>, Boolean> localSimpleTypes = this.simpleTypes;<NEW_LINE>Boolean isSimpleType = localSimpleTypes.get(type);<NEW_LINE>if (Object.class.equals(type) || Enum.class.isAssignableFrom(type)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if (isSimpleType != null) {<NEW_LINE>return isSimpleType;<NEW_LINE>}<NEW_LINE>String typeName = type.getName();<NEW_LINE>if (typeName.startsWith("java.lang") || type.getName().startsWith("java.time") || typeName.equals("kotlin.Unit")) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>for (Class<?> simpleType : localSimpleTypes.keySet()) {<NEW_LINE>if (simpleType.isAssignableFrom(type)) {<NEW_LINE>isSimpleType = localSimpleTypes.get(simpleType);<NEW_LINE>this.simpleTypes = <MASK><NEW_LINE>return isSimpleType;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>this.simpleTypes = put(localSimpleTypes, type, false);<NEW_LINE>return false;<NEW_LINE>}
put(localSimpleTypes, type, isSimpleType);
744,668
private void exec(String[] command) throws RunnerException {<NEW_LINE>// eliminate any empty array entries<NEW_LINE>List<String> stringList = new ArrayList<>();<NEW_LINE>for (String string : command) {<NEW_LINE>string = string.trim();<NEW_LINE>if (string.length() != 0)<NEW_LINE>stringList.add(string);<NEW_LINE>}<NEW_LINE>command = stringList.toArray(new String[stringList.size()]);<NEW_LINE>if (command.length == 0)<NEW_LINE>return;<NEW_LINE>if (verbose) {<NEW_LINE>for (String c : command) System.<MASK><NEW_LINE>System.out.println();<NEW_LINE>}<NEW_LINE>DefaultExecutor executor = new DefaultExecutor();<NEW_LINE>executor.setStreamHandler(new PumpStreamHandler() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected Thread createPump(InputStream is, OutputStream os, boolean closeWhenExhausted) {<NEW_LINE>final Thread result = new Thread(new MyStreamPumper(is, Compiler.this));<NEW_LINE>result.setName("MyStreamPumper Thread");<NEW_LINE>result.setDaemon(true);<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>CommandLine commandLine = new DoubleQuotedArgumentsOnWindowsCommandLine(command[0]);<NEW_LINE>for (int i = 1; i < command.length; i++) {<NEW_LINE>commandLine.addArgument(command[i], false);<NEW_LINE>}<NEW_LINE>int result;<NEW_LINE>executor.setExitValues(null);<NEW_LINE>try {<NEW_LINE>result = executor.execute(commandLine);<NEW_LINE>} catch (IOException e) {<NEW_LINE>RunnerException re = new RunnerException(e.getMessage());<NEW_LINE>re.hideStackTrace();<NEW_LINE>throw re;<NEW_LINE>}<NEW_LINE>executor.setExitValues(new int[0]);<NEW_LINE>// an error was queued up by message(), barf this back to compile(),<NEW_LINE>// which will barf it back to Editor. if you're having trouble<NEW_LINE>// discerning the imagery, consider how cows regurgitate their food<NEW_LINE>// to digest it, and the fact that they have five stomaches.<NEW_LINE>//<NEW_LINE>// System.out.println("throwing up " + exception);<NEW_LINE>if (exception != null)<NEW_LINE>throw exception;<NEW_LINE>if (result > 1) {<NEW_LINE>// a failure in the tool (e.g. unable to locate a sub-executable)<NEW_LINE>System.err.println(I18n.format(tr("{0} returned {1}"), command[0], result));<NEW_LINE>}<NEW_LINE>if (result != 0) {<NEW_LINE>RunnerException re = new RunnerException(tr("Error compiling."));<NEW_LINE>re.hideStackTrace();<NEW_LINE>throw re;<NEW_LINE>}<NEW_LINE>}
out.print(c + " ");
749,146
public Function newInstance(int position, ObjList<Function> args, IntList argPositions, CairoConfiguration configuration, SqlExecutionContext sqlExecutionContext) throws SqlException {<NEW_LINE>final char c = args.getQuick(0).getChar(null);<NEW_LINE>switch(c) {<NEW_LINE>case 'd':<NEW_LINE>return new TimestampFloorDDFunction(args.getQuick(1));<NEW_LINE>case 'M':<NEW_LINE>return new TimestampFloorMMFunction<MASK><NEW_LINE>case 'y':<NEW_LINE>return new TimestampFloorYYYYFunction(args.getQuick(1));<NEW_LINE>case 'h':<NEW_LINE>return new TimestampFloorHHFunction(args.getQuick(1));<NEW_LINE>case 'm':<NEW_LINE>return new TimestampFloorMIFunction(args.getQuick(1));<NEW_LINE>case 's':<NEW_LINE>return new TimestampFloorSSFunction(args.getQuick(1));<NEW_LINE>case 'T':<NEW_LINE>return new TimestampFloorMSFunction(args.getQuick(1));<NEW_LINE>case 0:<NEW_LINE>throw SqlException.position(argPositions.getQuick(0)).put("invalid kind 'null'");<NEW_LINE>default:<NEW_LINE>throw SqlException.position(argPositions.getQuick(0)).put("invalid kind '").put(c).put('\'');<NEW_LINE>}<NEW_LINE>}
(args.getQuick(1));
1,575,536
public static StringBuilder append(StringBuilder sb, Pod.Value v) {<NEW_LINE>switch(v.getValCase()) {<NEW_LINE>case VAL_NOT_SET:<NEW_LINE>return sb.append("[null]");<NEW_LINE>case STRING:<NEW_LINE>return sb.append(v.getString());<NEW_LINE>case BOOL:<NEW_LINE>return sb.append(v.getBool());<NEW_LINE>case FLOAT64:<NEW_LINE>return sb.append(v.getFloat64());<NEW_LINE>case FLOAT32:<NEW_LINE>return sb.append(v.getFloat32());<NEW_LINE>case SINT:<NEW_LINE>return sb.append(v.getSint());<NEW_LINE>case SINT8:<NEW_LINE>return sb.append(v.getSint8());<NEW_LINE>case SINT16:<NEW_LINE>return sb.append(v.getSint16());<NEW_LINE>case SINT32:<NEW_LINE>return sb.append(v.getSint32());<NEW_LINE>case SINT64:<NEW_LINE>return sb.append(v.getSint64());<NEW_LINE>case UINT:<NEW_LINE>return sb.append(v.getUint());<NEW_LINE>case UINT8:<NEW_LINE>return sb.append(v.getUint8());<NEW_LINE>case UINT16:<NEW_LINE>return sb.append(v.getUint16());<NEW_LINE>case UINT32:<NEW_LINE>return sb.append(v.getUint32());<NEW_LINE>case UINT64:<NEW_LINE>return sb.append(v.getUint64());<NEW_LINE>case STRING_ARRAY:<NEW_LINE>return sb.append(v.getStringArray().getValList());<NEW_LINE>case BOOL_ARRAY:<NEW_LINE>return sb.append(v.getBoolArray().getValList());<NEW_LINE>case FLOAT64_ARRAY:<NEW_LINE>return sb.append(v.getFloat64Array().getValList());<NEW_LINE>case FLOAT32_ARRAY:<NEW_LINE>return sb.append(v.getFloat32Array().getValList());<NEW_LINE>case SINT_ARRAY:<NEW_LINE>return sb.append(v.getSintArray().getValList());<NEW_LINE>case SINT8_ARRAY:<NEW_LINE>return sb.append(v.getSint8Array().getValList());<NEW_LINE>case SINT16_ARRAY:<NEW_LINE>return sb.append(v.<MASK><NEW_LINE>case SINT32_ARRAY:<NEW_LINE>return sb.append(v.getSint32Array().getValList());<NEW_LINE>case SINT64_ARRAY:<NEW_LINE>return sb.append(v.getSint64Array().getValList());<NEW_LINE>case UINT_ARRAY:<NEW_LINE>return sb.append(v.getUintArray().getValList());<NEW_LINE>case UINT8_ARRAY:<NEW_LINE>return sb.append(ProtoDebugTextFormat.escapeBytes(v.getUint8Array()));<NEW_LINE>case UINT16_ARRAY:<NEW_LINE>return sb.append(v.getUint16Array().getValList());<NEW_LINE>case UINT32_ARRAY:<NEW_LINE>return sb.append(v.getUint32Array().getValList());<NEW_LINE>case UINT64_ARRAY:<NEW_LINE>return sb.append(v.getUint64Array().getValList());<NEW_LINE>default:<NEW_LINE>assert false;<NEW_LINE>return sb.append(ProtoDebugTextFormat.shortDebugString(v));<NEW_LINE>}<NEW_LINE>}
getSint16Array().getValList());
224,739
private void buildNearestWiki(ViewGroup viewGroup) {<NEW_LINE>final int position = viewGroup.getChildCount();<NEW_LINE>final WeakReference<ViewGroup> viewGroupRef = new WeakReference<>(viewGroup);<NEW_LINE>buildNearestWikiRow(viewGroup, new SearchAmenitiesListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onFinish(List<Amenity> amenities) {<NEW_LINE>ViewGroup viewGroup = viewGroupRef.get();<NEW_LINE>if (viewGroup == null || Algorithms.isEmpty(amenities)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String title = app.getString(R.string.wiki_around);<NEW_LINE>String count = "(" + amenities.size() + ")";<NEW_LINE>String text = app.getString(R.string.ltr_or_rtl_combine_via_space, title, count);<NEW_LINE>Context context = viewGroup.getContext();<NEW_LINE>AmenityInfoRow wikiInfo = new AmenityInfoRow(NEAREST_WIKI_KEY, R.drawable.ic_plugin_wikipedia, null, text, null, true, getCollapsableView(context, true, amenities, NEAREST_WIKI_KEY), 0, false, false, false, 1000, null, false, false, false, 0);<NEW_LINE>View amenitiesRow = createRowContainer(context, NEAREST_WIKI_KEY);<NEW_LINE>int insertIndex = position == 0 ? 0 : position + 1;<NEW_LINE>firstRow = insertIndex == 0 || <MASK><NEW_LINE>buildAmenityRow(amenitiesRow, wikiInfo);<NEW_LINE>viewGroup.addView(amenitiesRow, insertIndex);<NEW_LINE>buildNearestRowDividerIfMissing(viewGroup, insertIndex);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
isDividerAtPosition(viewGroup, insertIndex - 1);
278,776
public void onBindViewHolder(FilterItemViewHolder holder, int position) {<NEW_LINE>try {<NEW_LINE>if (position == 0) {<NEW_LINE>holder.mName.setText("None");<NEW_LINE>Bitmap bitmap = BitmapFactory.decodeStream(getAssets<MASK><NEW_LINE>holder.mIcon.setImageBitmap(bitmap);<NEW_LINE>holder.mIcon.setOnClickListener(v -> {<NEW_LINE>mSelectedFilter = null;<NEW_LINE>mShortVideoEditor.setBuiltinFilter(null);<NEW_LINE>});<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final PLBuiltinFilter filter = mFilters[position - 1];<NEW_LINE>holder.mName.setText(filter.getName());<NEW_LINE>InputStream is = getAssets().open(filter.getAssetFilePath());<NEW_LINE>Bitmap bitmap = BitmapFactory.decodeStream(is);<NEW_LINE>holder.mIcon.setImageBitmap(bitmap);<NEW_LINE>holder.mIcon.setOnClickListener(v -> {<NEW_LINE>mSelectedFilter = filter.getName();<NEW_LINE>mShortVideoEditor.setBuiltinFilter(mSelectedFilter);<NEW_LINE>});<NEW_LINE>} catch (IOException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>}
().open("filters/none.png"));
1,424,992
private Stream<Description> checkOverloads(VisitorState state, List<? extends Tree> members, ImmutableList<MemberWithIndex> overloads) {<NEW_LINE>if (overloads.size() <= 1) {<NEW_LINE>return Stream.empty();<NEW_LINE>}<NEW_LINE>// check if the indices of the overloads in the member list are sequential<NEW_LINE>MemberWithIndex first = overloads.get(0);<NEW_LINE>int prev = -1;<NEW_LINE>int group = 0;<NEW_LINE>Map<MemberWithIndex, Integer> groups = new LinkedHashMap<>();<NEW_LINE>for (MemberWithIndex overload : overloads) {<NEW_LINE>if (prev != -1 && prev != overload.index() - 1) {<NEW_LINE>group++;<NEW_LINE>}<NEW_LINE>groups.put(overload, group);<NEW_LINE>prev = overload.index();<NEW_LINE>}<NEW_LINE>if (group == 0) {<NEW_LINE>return Stream.empty();<NEW_LINE>}<NEW_LINE>if (overloads.stream().anyMatch(m -> isSuppressed(m.tree()))) {<NEW_LINE>return Stream.empty();<NEW_LINE>}<NEW_LINE>// build a fix that replaces the first overload with all the overloads grouped together<NEW_LINE>SuggestedFix.Builder fixBuilder = SuggestedFix.builder();<NEW_LINE>StringBuilder sb = new StringBuilder("\n");<NEW_LINE>sb.append(state.getSourceForNode<MASK><NEW_LINE>overloads.stream().filter(o -> o != first).forEach(o -> {<NEW_LINE>int start = state.getEndPosition(members.get(o.index() - 1));<NEW_LINE>int end = state.getEndPosition(o.tree());<NEW_LINE>sb.append(state.getSourceCode(), start, end).append('\n');<NEW_LINE>fixBuilder.replace(start, end, "");<NEW_LINE>});<NEW_LINE>fixBuilder.replace(first.tree(), sb.toString());<NEW_LINE>SuggestedFix fix = fixBuilder.build();<NEW_LINE>LineMap lineMap = state.getPath().getCompilationUnit().getLineMap();<NEW_LINE>// emit findings for each overload<NEW_LINE>return overloads.stream().map(o -> buildDescription(o.tree()).addFix(fix).setMessage(createMessage(o.tree(), overloads, groups, lineMap, o)).build());<NEW_LINE>}
(first.tree()));
1,752,288
public void updateTitle() {<NEW_LINE>Time start = new Time();<NEW_LINE>start.set(mBaseDate);<NEW_LINE>start.normalize();<NEW_LINE>Time end = new Time();<NEW_LINE>end.set(start);<NEW_LINE>end.setDay(end.getDay() + mNumDays - 1);<NEW_LINE>// Move it forward one minute so the formatter doesn't lose a day<NEW_LINE>end.setMinute(<MASK><NEW_LINE>end.normalize();<NEW_LINE>long formatFlags = DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_YEAR;<NEW_LINE>if (mNumDays != 1) {<NEW_LINE>// Don't show day of the month if for multi-day view<NEW_LINE>formatFlags |= DateUtils.FORMAT_NO_MONTH_DAY;<NEW_LINE>// Abbreviate the month if showing multiple months<NEW_LINE>if (start.getMonth() != end.getMonth()) {<NEW_LINE>formatFlags |= DateUtils.FORMAT_ABBREV_MONTH;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>mController.sendEvent(this, EventType.UPDATE_TITLE, start, end, null, -1, ViewType.CURRENT, formatFlags, null, null);<NEW_LINE>}
end.getMinute() + 1);
559,960
public final void reduceScatterBlock(Object sendbuf, Object recvbuf, int recvcount, Datatype type, Op op) throws MPIException {<NEW_LINE>MPI.check();<NEW_LINE>op.setDatatype(type);<NEW_LINE>int sendoff = 0, recvoff = 0;<NEW_LINE>boolean sdb = false, rdb = false;<NEW_LINE>if (sendbuf instanceof Buffer && !(sdb = ((Buffer) sendbuf).isDirect())) {<NEW_LINE>sendoff = type.getOffset(sendbuf);<NEW_LINE>sendbuf = ((<MASK><NEW_LINE>}<NEW_LINE>if (recvbuf instanceof Buffer && !(rdb = ((Buffer) recvbuf).isDirect())) {<NEW_LINE>recvoff = type.getOffset(recvbuf);<NEW_LINE>recvbuf = ((Buffer) recvbuf).array();<NEW_LINE>}<NEW_LINE>reduceScatterBlock(handle, sendbuf, sdb, sendoff, recvbuf, rdb, recvoff, recvcount, type.handle, type.baseType, op, op.handle);<NEW_LINE>}
Buffer) sendbuf).array();
32,270
private void initKeyMapping() {<NEW_LINE>Map<Integer, Integer> globalKeyMapping = getKeyMapping();<NEW_LINE>// Reset global mapping to default<NEW_LINE>globalKeyMapping.remove(KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE);<NEW_LINE>globalKeyMapping.remove(KeyEvent.KEYCODE_MEDIA_REWIND);<NEW_LINE>globalKeyMapping.remove(KeyEvent.KEYCODE_MEDIA_FAST_FORWARD);<NEW_LINE>if (mGeneralData.isRemapFastForwardToNextEnabled()) {<NEW_LINE>globalKeyMapping.put(KeyEvent.KEYCODE_MEDIA_FAST_FORWARD, KeyEvent.KEYCODE_MEDIA_NEXT);<NEW_LINE>globalKeyMapping.put(KeyEvent.KEYCODE_MEDIA_REWIND, KeyEvent.KEYCODE_MEDIA_PREVIOUS);<NEW_LINE>}<NEW_LINE>if (mGeneralData.isRemapPageUpToNextEnabled()) {<NEW_LINE>globalKeyMapping.put(<MASK><NEW_LINE>globalKeyMapping.put(KeyEvent.KEYCODE_PAGE_DOWN, KeyEvent.KEYCODE_MEDIA_PREVIOUS);<NEW_LINE>}<NEW_LINE>if (mGeneralData.isRemapChannelUpToNextEnabled()) {<NEW_LINE>globalKeyMapping.put(KeyEvent.KEYCODE_CHANNEL_UP, KeyEvent.KEYCODE_MEDIA_NEXT);<NEW_LINE>globalKeyMapping.put(KeyEvent.KEYCODE_CHANNEL_DOWN, KeyEvent.KEYCODE_MEDIA_PREVIOUS);<NEW_LINE>}<NEW_LINE>}
KeyEvent.KEYCODE_PAGE_UP, KeyEvent.KEYCODE_MEDIA_NEXT);
1,654,513
public static DescribeDBProxyPerformanceResponse unmarshall(DescribeDBProxyPerformanceResponse describeDBProxyPerformanceResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDBProxyPerformanceResponse.setRequestId(_ctx.stringValue("DescribeDBProxyPerformanceResponse.RequestId"));<NEW_LINE>describeDBProxyPerformanceResponse.setDBVersion(_ctx.stringValue("DescribeDBProxyPerformanceResponse.DBVersion"));<NEW_LINE>describeDBProxyPerformanceResponse.setEndTime(_ctx.stringValue("DescribeDBProxyPerformanceResponse.EndTime"));<NEW_LINE>describeDBProxyPerformanceResponse.setStartTime(_ctx.stringValue("DescribeDBProxyPerformanceResponse.StartTime"));<NEW_LINE>describeDBProxyPerformanceResponse.setDBClusterId(_ctx.stringValue("DescribeDBProxyPerformanceResponse.DBClusterId"));<NEW_LINE>describeDBProxyPerformanceResponse.setDBType(_ctx.stringValue("DescribeDBProxyPerformanceResponse.DBType"));<NEW_LINE>describeDBProxyPerformanceResponse.setEngine(_ctx.stringValue("DescribeDBProxyPerformanceResponse.Engine"));<NEW_LINE>List<PerformanceItem> performanceKeys = new ArrayList<PerformanceItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeDBProxyPerformanceResponse.PerformanceKeys.Length"); i++) {<NEW_LINE>PerformanceItem performanceItem = new PerformanceItem();<NEW_LINE>performanceItem.setMetricName(_ctx.stringValue("DescribeDBProxyPerformanceResponse.PerformanceKeys[" + i + "].MetricName"));<NEW_LINE>performanceItem.setMeasurement(_ctx.stringValue("DescribeDBProxyPerformanceResponse.PerformanceKeys[" + i + "].Measurement"));<NEW_LINE>performanceItem.setDBNodeId(_ctx.stringValue("DescribeDBProxyPerformanceResponse.PerformanceKeys[" + i + "].DBNodeId"));<NEW_LINE>List<PerformanceItemValue> points <MASK><NEW_LINE>for (int j = 0; j < _ctx.lengthValue("DescribeDBProxyPerformanceResponse.PerformanceKeys[" + i + "].Points.Length"); j++) {<NEW_LINE>PerformanceItemValue performanceItemValue = new PerformanceItemValue();<NEW_LINE>performanceItemValue.setValue(_ctx.stringValue("DescribeDBProxyPerformanceResponse.PerformanceKeys[" + i + "].Points[" + j + "].Value"));<NEW_LINE>performanceItemValue.setTimestamp(_ctx.longValue("DescribeDBProxyPerformanceResponse.PerformanceKeys[" + i + "].Points[" + j + "].Timestamp"));<NEW_LINE>points.add(performanceItemValue);<NEW_LINE>}<NEW_LINE>performanceItem.setPoints(points);<NEW_LINE>performanceKeys.add(performanceItem);<NEW_LINE>}<NEW_LINE>describeDBProxyPerformanceResponse.setPerformanceKeys(performanceKeys);<NEW_LINE>return describeDBProxyPerformanceResponse;<NEW_LINE>}
= new ArrayList<PerformanceItemValue>();
1,591,018
public void marshall(RuleDetail ruleDetail, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (ruleDetail == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(ruleDetail.getRuleId(), RULEID_BINDING);<NEW_LINE>protocolMarshaller.marshall(ruleDetail.getDescription(), DESCRIPTION_BINDING);<NEW_LINE>protocolMarshaller.marshall(ruleDetail.getDetectorId(), DETECTORID_BINDING);<NEW_LINE>protocolMarshaller.marshall(ruleDetail.getRuleVersion(), RULEVERSION_BINDING);<NEW_LINE>protocolMarshaller.marshall(ruleDetail.getExpression(), EXPRESSION_BINDING);<NEW_LINE>protocolMarshaller.marshall(ruleDetail.getLanguage(), LANGUAGE_BINDING);<NEW_LINE>protocolMarshaller.marshall(ruleDetail.getOutcomes(), OUTCOMES_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(ruleDetail.getCreatedTime(), CREATEDTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(ruleDetail.getArn(), ARN_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
ruleDetail.getLastUpdatedTime(), LASTUPDATEDTIME_BINDING);
1,082,873
public static void horizontal11(Kernel1D_S32 kernel, GrayS16 input, GrayI16 output, int skip) {<NEW_LINE>final <MASK><NEW_LINE>final short[] dataDst = output.data;<NEW_LINE>final int k1 = kernel.data[0];<NEW_LINE>final int k2 = kernel.data[1];<NEW_LINE>final int k3 = kernel.data[2];<NEW_LINE>final int k4 = kernel.data[3];<NEW_LINE>final int k5 = kernel.data[4];<NEW_LINE>final int k6 = kernel.data[5];<NEW_LINE>final int k7 = kernel.data[6];<NEW_LINE>final int k8 = kernel.data[7];<NEW_LINE>final int k9 = kernel.data[8];<NEW_LINE>final int k10 = kernel.data[9];<NEW_LINE>final int k11 = kernel.data[10];<NEW_LINE>final int radius = kernel.getRadius();<NEW_LINE>final int widthEnd = UtilDownConvolve.computeMaxSide(input.width, skip, radius);<NEW_LINE>final int height = input.getHeight();<NEW_LINE>final int offsetX = UtilDownConvolve.computeOffset(skip, radius);<NEW_LINE>for (int i = 0; i < height; i++) {<NEW_LINE>int indexDst = output.startIndex + i * output.stride + offsetX / skip;<NEW_LINE>int j = input.startIndex + i * input.stride - radius;<NEW_LINE>final int jEnd = j + widthEnd;<NEW_LINE>for (j += offsetX; j <= jEnd; j += skip) {<NEW_LINE>int indexSrc = j;<NEW_LINE>int total = (dataSrc[indexSrc++]) * k1;<NEW_LINE>total += (dataSrc[indexSrc++]) * k2;<NEW_LINE>total += (dataSrc[indexSrc++]) * k3;<NEW_LINE>total += (dataSrc[indexSrc++]) * k4;<NEW_LINE>total += (dataSrc[indexSrc++]) * k5;<NEW_LINE>total += (dataSrc[indexSrc++]) * k6;<NEW_LINE>total += (dataSrc[indexSrc++]) * k7;<NEW_LINE>total += (dataSrc[indexSrc++]) * k8;<NEW_LINE>total += (dataSrc[indexSrc++]) * k9;<NEW_LINE>total += (dataSrc[indexSrc++]) * k10;<NEW_LINE>total += (dataSrc[indexSrc]) * k11;<NEW_LINE>dataDst[indexDst++] = (short) total;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
short[] dataSrc = input.data;
1,141,766
private Future<DatagramSocket> listen(SocketAddress local) {<NEW_LINE>AddressResolver resolver = context.owner().addressResolver();<NEW_LINE>PromiseInternal<Void> promise = context.promise();<NEW_LINE>io.netty.util.concurrent.Future<InetSocketAddress> f1 = resolver.resolveHostname(context.nettyEventLoop(<MASK><NEW_LINE>f1.addListener((GenericFutureListener<io.netty.util.concurrent.Future<InetSocketAddress>>) res1 -> {<NEW_LINE>if (res1.isSuccess()) {<NEW_LINE>ChannelFuture f2 = channel.bind(new InetSocketAddress(res1.getNow().getAddress(), local.port()));<NEW_LINE>if (metrics != null) {<NEW_LINE>f2.addListener((GenericFutureListener<io.netty.util.concurrent.Future<Void>>) res2 -> {<NEW_LINE>if (res2.isSuccess()) {<NEW_LINE>metrics.listening(local.host(), localAddress());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>f2.addListener(promise);<NEW_LINE>} else {<NEW_LINE>promise.fail(res1.cause());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>return promise.future().map(this);<NEW_LINE>}
), local.host());
456,703
private void init() {<NEW_LINE>exceptionUnmarshallers.add(new MissingCustomsExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshallers.add(new InvalidVersionExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshallers.add(new MultipleRegionsExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshallers.add(new CreateJobQuotaExceededExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshallers.add(new UnableToUpdateJobIdExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshallers.add(new InvalidParameterExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshallers.add(new NoSuchBucketExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshallers.add(new BucketPermissionExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshallers.add(new InvalidCustomsExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshallers.add(new UnableToCancelJobIdExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshallers.add(new CanceledJobIdExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshallers.add(new ExpiredJobIdExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshallers.add(new InvalidJobIdExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshallers.add(new InvalidManifestFieldExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshallers.add(new MissingParameterExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshallers.add(new MissingManifestFieldExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshallers.add(new MalformedManifestExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshallers.add(new InvalidAccessKeyIdExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshallers.add(new InvalidAddressExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshallers.add(new InvalidFileSystemExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshallers.add(new StandardErrorUnmarshaller(com.amazonaws.services.importexport.model.AmazonImportExportException.class));<NEW_LINE>setServiceNameIntern(DEFAULT_SIGNING_NAME);<NEW_LINE>setEndpointPrefix(ENDPOINT_PREFIX);<NEW_LINE>// calling this.setEndPoint(...) will also modify the signer accordingly<NEW_LINE>this.setEndpoint("https://importexport.amazonaws.com");<NEW_LINE>HandlerChainFactory chainFactory = new HandlerChainFactory();<NEW_LINE>requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/importexport/request.handlers"));<NEW_LINE>requestHandler2s.addAll<MASK><NEW_LINE>requestHandler2s.addAll(chainFactory.getGlobalHandlers());<NEW_LINE>}
(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/importexport/request.handler2s"));
1,326,041
public static void main(String[] args) {<NEW_LINE>int i = 0;<NEW_LINE>int classifierToUse = WORDSHAPECHRIS1;<NEW_LINE>if (args.length == 0) {<NEW_LINE>System.out.println("edu.stanford.nlp.process.WordShapeClassifier [-wordShape name] string+");<NEW_LINE>} else if (args[0].charAt(0) == '-') {<NEW_LINE>if (args[0].equals("-wordShape") && args.length >= 2) {<NEW_LINE>classifierToUse <MASK><NEW_LINE>i += 2;<NEW_LINE>} else {<NEW_LINE>log.info("Unknown flag: " + args[0]);<NEW_LINE>i++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (; i < args.length; i++) {<NEW_LINE>System.out.print(args[i] + ": ");<NEW_LINE>System.out.println(wordShape(args[i], classifierToUse));<NEW_LINE>}<NEW_LINE>}
= lookupShaper(args[1]);
1,806,295
public TbQueueRequestTemplate<TbProtoJsQueueMsg<RemoteJsRequest>, TbProtoQueueMsg<RemoteJsResponse>> createRemoteJsRequestTemplate() {<NEW_LINE>TbQueueProducer<TbProtoJsQueueMsg<RemoteJsRequest>> producer = new TbRabbitMqProducerTemplate<>(jsExecutorAdmin, rabbitMqSettings, jsInvokeSettings.getRequestTopic());<NEW_LINE>TbQueueConsumer<TbProtoQueueMsg<RemoteJsResponse>> consumer = new TbRabbitMqConsumerTemplate<>(jsExecutorAdmin, rabbitMqSettings, jsInvokeSettings.getResponseTopic() + "." + serviceInfoProvider.getServiceId(), msg -> {<NEW_LINE>RemoteJsResponse.<MASK><NEW_LINE>JsonFormat.parser().ignoringUnknownFields().merge(new String(msg.getData(), StandardCharsets.UTF_8), builder);<NEW_LINE>return new TbProtoQueueMsg<>(msg.getKey(), builder.build(), msg.getHeaders());<NEW_LINE>});<NEW_LINE>DefaultTbQueueRequestTemplate.DefaultTbQueueRequestTemplateBuilder<TbProtoJsQueueMsg<RemoteJsRequest>, TbProtoQueueMsg<RemoteJsResponse>> builder = DefaultTbQueueRequestTemplate.builder();<NEW_LINE>builder.queueAdmin(jsExecutorAdmin);<NEW_LINE>builder.requestTemplate(producer);<NEW_LINE>builder.responseTemplate(consumer);<NEW_LINE>builder.maxPendingRequests(jsInvokeSettings.getMaxPendingRequests());<NEW_LINE>builder.maxRequestTimeout(jsInvokeSettings.getMaxRequestsTimeout());<NEW_LINE>builder.pollInterval(jsInvokeSettings.getResponsePollInterval());<NEW_LINE>return builder.build();<NEW_LINE>}
Builder builder = RemoteJsResponse.newBuilder();
688,501
public synchronized PinotResourceManagerResponse deleteSegments(String tableNameWithType, List<String> segmentNames, @Nullable String retentionPeriod) {<NEW_LINE>try {<NEW_LINE>LOGGER.<MASK><NEW_LINE>Preconditions.checkArgument(TableNameBuilder.isTableResource(tableNameWithType), "Table name: %s is not a valid table name with type suffix", tableNameWithType);<NEW_LINE>HelixHelper.removeSegmentsFromIdealState(_helixZkManager, tableNameWithType, segmentNames);<NEW_LINE>if (retentionPeriod != null) {<NEW_LINE>_segmentDeletionManager.deleteSegments(tableNameWithType, segmentNames, TimeUtils.convertPeriodToMillis(retentionPeriod));<NEW_LINE>} else {<NEW_LINE>TableConfig tableConfig = ZKMetadataProvider.getTableConfig(_propertyStore, tableNameWithType);<NEW_LINE>_segmentDeletionManager.deleteSegments(tableNameWithType, segmentNames, tableConfig);<NEW_LINE>}<NEW_LINE>return PinotResourceManagerResponse.success("Segment " + segmentNames + " deleted");<NEW_LINE>} catch (final Exception e) {<NEW_LINE>LOGGER.error("Caught exception while deleting segment: {} from table: {}", segmentNames, tableNameWithType, e);<NEW_LINE>return PinotResourceManagerResponse.failure(e.getMessage());<NEW_LINE>}<NEW_LINE>}
info("Trying to delete segments: {} from table: {} ", segmentNames, tableNameWithType);
876,517
public boolean authorizeStore(MerchantStore store, String path) {<NEW_LINE>Validate.notNull(store, "MerchantStore cannot be null");<NEW_LINE>Authentication authentication = SecurityContextHolder.getContext().getAuthentication();<NEW_LINE>if (!StringUtils.isBlank(path) && path.contains(PRIVATE_PATH)) {<NEW_LINE>Validate.notNull(authentication, "Don't call ths method if a user is not authenticated");<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>LOGGER.info("Principal " + currentPrincipalName);<NEW_LINE>ReadableUser readableUser = findByUserName(currentPrincipalName, languageService.defaultLanguage());<NEW_LINE>// ReadableUser readableUser = findByUserName(currentPrincipalName, store.getCode(), store.getDefaultLanguage());<NEW_LINE>if (readableUser == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// current user match;<NEW_LINE>String merchant = readableUser.getMerchant();<NEW_LINE>// user store is store request param<NEW_LINE>if (store.getCode().equalsIgnoreCase(merchant)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>// Set<String> roles = authentication.getAuthorities().stream().map(r -> r.getAuthority())<NEW_LINE>// .collect(Collectors.toSet());<NEW_LINE>// is superadmin<NEW_LINE>for (ReadableGroup group : readableUser.getGroups()) {<NEW_LINE>if (Constants.GROUP_SUPERADMIN.equals(group.getName())) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>boolean authorized = false;<NEW_LINE>// user store can be parent and requested store is child<NEW_LINE>// get parent<NEW_LINE>// TODO CACHE<NEW_LINE>MerchantStore parent = null;<NEW_LINE>if (store.getParent() != null) {<NEW_LINE>parent = merchantStoreService.getParent(merchant);<NEW_LINE>}<NEW_LINE>// user can be in parent<NEW_LINE>if (parent != null && parent.getCode().equals(store.getCode())) {<NEW_LINE>authorized = true;<NEW_LINE>}<NEW_LINE>// else false<NEW_LINE>return authorized;<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new UnauthorizedException("Cannot authorize user " + authentication.getPrincipal().toString() + " for store " + store.getCode(), e.getMessage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
String currentPrincipalName = authentication.getName();
413,422
public List<ValidationEvent> validate(Model model) {<NEW_LINE>List<ValidationEvent> events = new ArrayList<>();<NEW_LINE>// Normal shapes are expected to be upper camel.<NEW_LINE>model.shapes().filter(FunctionalUtils.not(Shape::isMemberShape)).filter(shape -> !shape.hasTrait(TraitDefinition.class)).filter(shape -> !MemberNameHandling.UPPER.getRegex().matcher(shape.getId().getName()).find()).map(shape -> danger(shape, format("%s shape name, `%s`, is not %s camel case", shape.getType(), shape.getId().getName(), MemberNameHandling.UPPER))).forEach(events::add);<NEW_LINE>// Trait shapes are expected to be lower camel.<NEW_LINE>model.shapes().filter(shape -> shape.hasTrait(TraitDefinition.class)).filter(shape -> !shape.hasTrait(AuthDefinitionTrait.class)).filter(shape -> !shape.hasTrait(ProtocolDefinitionTrait.class)).filter(shape -> !MemberNameHandling.LOWER.getRegex().matcher(shape.getId().getName()).find()).map(shape -> danger(shape, format("%s trait definition, `%s`, is not lower camel case", shape.getType(), shape.getId().getName()))<MASK><NEW_LINE>Pattern isValidMemberName = config.getMemberNames().getRegex();<NEW_LINE>model.shapes(MemberShape.class).filter(shape -> !isValidMemberName.matcher(shape.getMemberName()).find()).map(shape -> danger(shape, format("Member shape member name, `%s`, is not %s camel case", shape.getMemberName(), config.getMemberNames()))).forEach(events::add);<NEW_LINE>return events;<NEW_LINE>}
).forEach(events::add);