idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,761,706 | private void touch_up() {<NEW_LINE><MASK><NEW_LINE>// commit the path to our offscreen<NEW_LINE>mCanvas.drawPath(mPath, mPaint);<NEW_LINE>// kill this so we don't double draw<NEW_LINE>mPath.reset();<NEW_LINE>if (map != null) {<NEW_LINE>Projection projection = map.getProjection();<NEW_LINE>if (symbol != null && symbol.g... | mPath.lineTo(mX, mY); |
1,019,607 | protected boolean queueWork(Path path, ReplicationTarget target) {<NEW_LINE>String queueKey = DistributedWorkQueueWorkAssignerHelper.getQueueKey(path.getName(), target);<NEW_LINE>Map<TableId, String> workForPeer = this.queuedWorkByPeerName.computeIfAbsent(target.getPeerName(), k -> new HashMap<>());<NEW_LINE>String que... | queuedWork, target.getPeerName()); |
553,532 | private AttributeName storeAttribute(final char[] text, final int offset, final int len) {<NEW_LINE>int index = binarySearch(this.templateMode.isCaseSensitive(), this.repositoryNames, text, offset, len);<NEW_LINE>if (index >= 0) {<NEW_LINE>// It was already added while we were waiting for the lock!<NEW_LINE>return this... | buildTextAttributeName(text, offset, len); |
480,166 | private okhttp3.Call patchNamespacedPodStatusValidateBeforeCall(String name, String namespace, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException {<NEW_LINE>// verify the required parameter 'name' is set<NEW_LINE>if (n... | fieldManager, fieldValidation, force, _callback); |
1,134,529 | public void addAnimation(Element... elements) {<NEW_LINE>if (elements == null || elements.length == 0) {<NEW_LINE>throw new IllegalArgumentException("One or more elements must be specified.");<NEW_LINE>}<NEW_LINE>Set<String> elementIdsInPreviousAnimationSteps = new HashSet<>();<NEW_LINE>for (Animation animationStep : a... | + 1, elementsInThisAnimationStep, relationshipsInThisAnimationStep)); |
457,098 | static void PriorityNonpremptive(process[] g, int n) {<NEW_LINE>System.out.print("\n--------------------------------------------------------------\n");<NEW_LINE>System.out.print("Priority Non Pre-emptive");<NEW_LINE>System.out.print("\n--------------------------------------------------------------\n");<NEW_LINE>process... | bt - temp6[0].at; |
270,745 | public void relocate(MachoRelocation relocation) throws MemoryAccessException, NotFoundException {<NEW_LINE>if (!relocation.requiresRelocation()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>RelocationInfo relocationInfo = relocation.getRelocationInfo();<NEW_LINE>Address targetAddr = relocation.getTargetAddress();<NEW_LINE>l... | ~(j1 ^ s) & 0x1; |
251,312 | protected void onDraw(Canvas canvas) {<NEW_LINE>super.onDraw(canvas);<NEW_LINE>int switchLeft = mSwitchLeft;<NEW_LINE>int switchTop = mSwitchTop;<NEW_LINE>int switchRight = mSwitchRight;<NEW_LINE>int switchBottom = mSwitchBottom;<NEW_LINE>mTrackDrawable.setBounds(switchLeft, switchTop, switchRight, switchBottom);<NEW_L... | int switchInnerRight = switchRight - mTempRect.right; |
1,071,682 | public void addOccurrenceHighlights(@Nonnull Editor editor, @Nonnull PsiReference[] occurrences, @Nonnull TextAttributes attributes, boolean hideByTextChange, Collection<RangeHighlighter> outHighlighters) {<NEW_LINE>if (occurrences.length == 0)<NEW_LINE>return;<NEW_LINE>int flags = HIDE_BY_ESCAPE;<NEW_LINE>if (hideByTe... | Project project = element.getProject(); |
1,756,640 | public void actionPerformed(AnActionEvent e) {<NEW_LINE>super.actionPerformed(e);<NEW_LINE>DataContext dataContext = e.getDataContext();<NEW_LINE>final Project project = dataContext.getData(CommonDataKeys.PROJECT);<NEW_LINE>if (project == null)<NEW_LINE>return;<NEW_LINE>final BookmarkInContextInfo info = new BookmarkIn... | popup[0].cancel(); |
38,544 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>// Log.w(Constants.TAG, "EmulatorActivity - onCreate");<NEW_LINE>ThemeManager.applyTheme(this, null);<NEW_LINE>setContentView(R.layout.emulator);<NEW_LINE>setupWindow();<NEW_LINE>_drawerFragment = (EmulatorDrawerF... | int messageStringId = R.string.emulator_save_state_ok; |
234,714 | private Collection createCollection(Type type) {<NEW_LINE>Class<?> rawClass = getRawClass(type);<NEW_LINE>Collection list;<NEW_LINE>if (rawClass == AbstractCollection.class) {<NEW_LINE>list = new ArrayList();<NEW_LINE>} else if (rawClass.isAssignableFrom(HashSet.class)) {<NEW_LINE>list = new HashSet();<NEW_LINE>} else ... | "create instance error, class " + rawClass.getName()); |
1,329,304 | private static void computeInListMinMaxPredicate(Analyzer analyzer, InPredicate inPred, TupleDescriptor minMaxTuple, List<Expr> minMaxConjuncts) {<NEW_LINE>SlotRef slotRef = inPred.getChild(0).unwrapSlotRef(true);<NEW_LINE>if (slotRef == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (inPred.isNotIn()) {<NEW_LINE>retu... | Preconditions.checkState(min != null); |
1,820,219 | private Object decodeAlt(Channel channel, SocketAddress remoteAddress, String sentence) {<NEW_LINE>Parser parser = new Parser(PATTERN_ALT, sentence);<NEW_LINE>if (!parser.matches()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, parser.next());<NEW_LIN... | setDeviceId(deviceSession.getDeviceId()); |
907,081 | @NoCache<NEW_LINE>@Consumes(MediaType.APPLICATION_JSON)<NEW_LINE>@Produces(MediaType.APPLICATION_JSON)<NEW_LINE>@Path("{pageId}/content")<NEW_LINE>public final Response addContent(@Context final HttpServletRequest request, @Context final HttpServletResponse response, @PathParam("pageId") final String pageId, final Page... | e, Response.Status.NOT_FOUND); |
427,263 | private Result canSetStateDownPermanently(NodeInfo nodeInfo, ClusterState clusterState, String newDescription) {<NEW_LINE>NodeState oldWantedState = nodeInfo.getUserWantedState();<NEW_LINE>if (oldWantedState.getState() != State.UP && !oldWantedState.getDescription().equals(newDescription)) {<NEW_LINE>// Refuse to overr... | createDisallowed("Reported state (" + reportedState + ") is not UP, so no bucket data is available"); |
155,833 | public void process(Operator operator, List<COSBase> arguments) throws MissingOperandException {<NEW_LINE>if (arguments.size() < 2) {<NEW_LINE>throw new MissingOperandException(operator, arguments);<NEW_LINE>}<NEW_LINE>Matrix textLineMatrix = context.getTextLineMatrix();<NEW_LINE>if (textLineMatrix == null) {<NEW_LINE>... | ), y.floatValue()); |
41,029 | public void show(@NonNull final EmojiImageView clickedImage, @NonNull final Emoji emoji) {<NEW_LINE>dismiss();<NEW_LINE>rootImageView = clickedImage;<NEW_LINE>final View content = initView(clickedImage.getContext(), emoji, clickedImage.getWidth());<NEW_LINE>popupWindow = new PopupWindow(content, WindowManager.LayoutPar... | y - content.getMeasuredHeight()); |
1,096,592 | private void checkParameterSchema(ParameterSchema prevRec, ParameterSchema currRec) {<NEW_LINE>checkEqualSingleValue(prevRec.schema().getField("name"), prevRec.getName(GetMode.DEFAULT), currRec.getName(GetMode.DEFAULT));<NEW_LINE>checkDoc(prevRec.schema().getField("doc"), prevRec.getDoc(GetMode.DEFAULT), currRec.getDoc... | prevItems = getParameterItems(prevRec, _prevSchemaResolver); |
556,432 | public static List<List<String>> convertLeetCode2DStringArrayInputIntoJavaArray(String input) {<NEW_LINE>String[] arrays = input.split("],\\[");<NEW_LINE>List<List<String>> result = new ArrayList<>();<NEW_LINE>for (int i = 0; i < arrays.length; i++) {<NEW_LINE>List<String> level = new ArrayList<>();<NEW_LINE>String[] s... | - 1).split(","); |
558,234 | public void testBodyWithFileSchema(FileSchemaTestClass body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {<NEW_LINE>Object localVarBody = body;<NEW_LINE>// verify the required parameter 'body' is set<NEW_LINE>if (body == null) {<NEW_LINE>resultHandler.handle(ApiException.fail(400, "Missing th... | MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); |
1,349,189 | private IPricingResult createPricingResult(final IPricingContext pricingCtx, @NonNull final BigDecimal price, @NonNull final I_C_UOM priceUOM) {<NEW_LINE>final IPricingResult pricingResult = pricingBL.calculatePrice(pricingCtx);<NEW_LINE>Check.errorIf(!pricingResult.isCalculated() || pricingResult.getTaxCategoryId() ==... | setTaxCategoryId(pricingResult.getTaxCategoryId()); |
504,170 | public Optional<TypeSymbol> transform(SpecificFieldNode node) {<NEW_LINE>Optional<TypeSymbol> parentType = node.parent().<MASK><NEW_LINE>if (parentType.isEmpty()) {<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>TypeSymbol parentRawType = CommonUtil.getRawType(parentType.get());<NEW_LINE>if (parentRawType.typeKi... | apply(new ContextTypeResolver(context)); |
885,387 | private void toggleCompletedTasksList() {<NEW_LINE>ViewPropertyAnimator viewPropertyAnimator = mChevron.animate().rotation(mIsCompletedTaskListExpanded ? COLLAPSED_CHEVRON_ROTATION : EXPANDED_CHEVRON_ROTATION).setInterpolator(new LinearInterpolator()).setDuration(Duration.SHORT.toMillis(mContext));<NEW_LINE>viewPropert... | positionAfterHeader, mTaskCompleted.size()); |
518,140 | protected List<String> findDistinctNamespace(String index) {<NEW_LINE>BoolQueryBuilder query = this.defaultFilter();<NEW_LINE>// We want to keep only "distinct" values of field "namespace"<NEW_LINE>// @TODO: use includeExclude(new IncludeExclude(0, 10)) to partition results<NEW_LINE>TermsAggregationBuilder termsAggrega... | searchRequest(index, sourceBuilder, false); |
1,836,847 | public static void main(String[] args) {<NEW_LINE>// Create a report to log multi-threaded messages.<NEW_LINE>AsyncReport rep = new AsyncReport();<NEW_LINE>// Create a user-defined event handler to catch plugin events.<NEW_LINE>EventHandler handler = new EventHandler();<NEW_LINE>// Create a TS processor using the repor... | tsp.registerEventHandler(handler, EVENT_CODE); |
350,295 | private table fillTable(WWindowStatus ws, GridField mField, String target) {<NEW_LINE><MASK><NEW_LINE>tr line = new tr();<NEW_LINE>line.addElement(new th(" ")).addElement(new th(Msg.translate(ws.ctx, "Name")));<NEW_LINE>table.addElement(line);<NEW_LINE>Lookup lookup = mField.getLookup();<NEW_LINE>lookup.fillComboBo... | table table = new table("1"); |
431,649 | public Void visitPhysicalHashAggregate(PhysicalHashAggregateOperator node, ExpressionContext context) {<NEW_LINE>// If scan tablet sum leas than 1, do one phase local aggregate is enough<NEW_LINE>if (ConnectContext.get().getSessionVariable().getNewPlannerAggStage() == 0 && context.getRootProperty().isExecuteInOneTablet... | LogicalOperator) context.getChildOperator(0); |
1,539,503 | public static DescribeSecurityEventOperationsResponse unmarshall(DescribeSecurityEventOperationsResponse describeSecurityEventOperationsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeSecurityEventOperationsResponse.setRequestId(_ctx.stringValue("DescribeSecurityEventOperationsResponse.RequestId"));<NEW_LINE>Lis... | + "].MarkField[" + j + "].MarkMisValue")); |
639,214 | public void exitRmmipa_prefix_list(Rmmipa_prefix_listContext ctx) {<NEW_LINE>Optional<List<String>> optNames = toIpPrefixListNames(ctx, ctx.names);<NEW_LINE>if (!optNames.isPresent()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<String> newNames = optNames.get();<NEW_LINE>assert !newNames.isEmpty();<NEW_LINE>ImmutableLi... | (old.getNames())); |
1,232,018 | private void renderLeg(HumanoidModel<? extends LivingEntity> baseModel, @Nonnull PoseStack matrix, @Nonnull MultiBufferSource renderer, int light, int overlayLight, boolean hasEffect, boolean left) {<NEW_LINE>if (left && !baseModel.leftLeg.visible || !left && !baseModel.rightLeg.visible) {<NEW_LINE>// If the model isn'... | translate(0, 0, 0.06); |
422,681 | public void apply(MethodVisitor methodVisitor) {<NEW_LINE>methodVisitor.visitMethodInsn(Opcodes.INVOKESTATIC, type, "getUnsafe", "()L" + type + ";", false);<NEW_LINE>methodVisitor.visitVarInsn(Opcodes.ASTORE, 11);<NEW_LINE>methodVisitor.visitVarInsn(Opcodes.ALOAD, 11);<NEW_LINE>methodVisitor.visitVarInsn(Opcodes.ALOAD,... | type, "ensureClassInitialized", "(Ljava/lang/Class;)V", false); |
897,018 | public void marshall(RegisterActivityTypeRequest registerActivityTypeRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (registerActivityTypeRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(<MA... | registerActivityTypeRequest.getDomain(), DOMAIN_BINDING); |
1,543,067 | public String toEnumVarName(String value, String datatype) {<NEW_LINE>// our enum var names are keys in a python dict, so change spaces to underscores<NEW_LINE>if (value.length() == 0) {<NEW_LINE>return "EMPTY";<NEW_LINE>}<NEW_LINE>String intPattern = "^[-\\+]?\\d+$";<NEW_LINE>String floatPattern = "^[-\\+]?\\d+\\.\\d+... | Pattern.matches(intPattern, value); |
1,421,940 | public static AsyncResult<Project> openAsync(@Nonnull String path, @Nullable final Project projectToCloseFinal, boolean forceOpenInNewFrame, @Nonnull UIAccess uiAccess) {<NEW_LINE>final VirtualFile virtualFile = LocalFileSystem.getInstance().refreshAndFindFileByPath(path);<NEW_LINE>if (virtualFile == null)<NEW_LINE>ret... | )).notify(result)); |
1,675,464 | private FindRequest<RecordTemplatePlaceholder> buildFinderRequest(FinderSchema finderSchema) {<NEW_LINE>FindRequestBuilder<Object, RecordTemplatePlaceholder> finder = new FindRequestBuilder<>(_uriTemplate, <MASK><NEW_LINE>finder.name(finderSchema.getName());<NEW_LINE>if (finderSchema.hasAssocKeys()) {<NEW_LINE>Compound... | RecordTemplatePlaceholder.class, _resourceSpec, _requestOptions); |
1,334,777 | public void train(TimeSeries.DataSequence data) {<NEW_LINE>this.data = data;<NEW_LINE>int n = data.size();<NEW_LINE>DataPoint dp = null;<NEW_LINE>DataSet observedData = new DataSet();<NEW_LINE>for (int i = 0; i < n; i++) {<NEW_LINE>dp = new Observation(data.get(i).value);<NEW_LINE><MASK><NEW_LINE>observedData.add(dp);<... | dp.setIndependentValue("x", i); |
564,358 | public void launch() throws Exception {<NEW_LINE>if (init.get())<NEW_LINE>return;<NEW_LINE>// Register a SIGINT handler for graceful shutdown.<NEW_LINE>if (!init.get())<NEW_LINE>init();<NEW_LINE>log.info("Subscribing to " + channel + " on stream Id " + streamId);<NEW_LINE>log.info(<MASK><NEW_LINE>// Register a SIGINT h... | "Using aeron directory " + ctx.aeronDirectoryName()); |
332,054 | protected ProcessingResult whenItemHeld(TransportedItemStack transported, TransportedItemStackHandlerBehaviour handler) {<NEW_LINE>if (processingTicks != -1 && processingTicks != 5)<NEW_LINE>return HOLD;<NEW_LINE>if (!FillingBySpout.canItemBeFilled(level, transported.stack))<NEW_LINE>return PASS;<NEW_LINE>if (tank.isEm... | SPOUT, level, worldPosition, 5); |
1,100,630 | public void run() {<NEW_LINE>try {<NEW_LINE>final String profileName = Files.getBaseName(url);<NEW_LINE>File destFile = new File(Files.storageFolder(getApplicationContext()) + "/" + profileName + ".properties");<NEW_LINE>Files.DownloadFromUrl(url, destFile);<NEW_LINE>handler.post(new Runnable() {<NEW_LINE><NEW_LINE>@Ov... | ), e, ProfileLinkReceiverActivity.this); |
236,748 | public void or(final RoaringBitmap x2) {<NEW_LINE>int pos1 = 0, pos2 = 0;<NEW_LINE>int length1 = highLowContainer.size();<NEW_LINE>final int length2 = x2.highLowContainer.size();<NEW_LINE>main: if (pos1 < length1 && pos2 < length2) {<NEW_LINE>char s1 = highLowContainer.getKeyAtIndex(pos1);<NEW_LINE>char s2 = x2.highLow... | s1 = highLowContainer.getKeyAtIndex(pos1); |
1,621,949 | private void removeOldEntries(HistoryEntry[] entries, boolean isLocal, long removeThreshold) {<NEW_LINE>Set<Long> timestamps = new HashSet<Long>(entries.length);<NEW_LINE>for (HistoryEntry e : entries) {<NEW_LINE>timestamps.add(e.getDateTime().getTime());<NEW_LINE>}<NEW_LINE>List<Node> toRemove <MASK><NEW_LINE>for (Nod... | = new ArrayList<Node>(); |
575,394 | public void generate() {<NEW_LINE>StartScriptGenerator generator = new StartScriptGenerator(unixStartScriptGenerator, windowsStartScriptGenerator);<NEW_LINE>JavaModuleDetector javaModuleDetector = getJavaModuleDetector();<NEW_LINE>generator.setApplicationName(getApplicationName());<NEW_LINE>generator.setMainClassName(f... | getUnixScript().getName()); |
508,511 | @Path("/{itemName: [a-zA-Z_0-9]+}/members/{memberItemName: [a-zA-Z_0-9]+}")<NEW_LINE>@Operation(operationId = "addMemberToGroupItem", summary = "Adds a new member to a group item.", security = { @SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = { @ApiResponse(responseCode = "200", description =... | Status.METHOD_NOT_ALLOWED).build(); |
1,478,740 | private void updateDescription() {<NEW_LINE>String description = null;<NEW_LINE>if (selectedType.isDefault()) {<NEW_LINE>String pattern = app.getString(R.string.route_line_use_map_style_color);<NEW_LINE>description = String.format(pattern, app.getRendererRegistry().getSelectedRendererName());<NEW_LINE>} else if (select... | pattern, mapModeTitle.toLowerCase()); |
111,469 | protected com.liferay.portal.model.UserTracker[] findByCompanyId_PrevAndNext(String userTrackerId, String companyId, OrderByComparator obc) throws NoSuchUserTrackerException, SystemException {<NEW_LINE>com.liferay.portal.model.UserTracker userTracker = findByPrimaryKey(userTrackerId);<NEW_LINE>int count = countByCompan... | portal.model.UserTracker[3]; |
362,117 | public DeleteObjectsResult deleteObjects(DeleteObjectsRequest deleteObjectsRequest) {<NEW_LINE>deleteObjectsRequest = beforeClientExecution(deleteObjectsRequest);<NEW_LINE>Request<DeleteObjectsRequest> request = createRequest(deleteObjectsRequest.getBucketName(), null, deleteObjectsRequest, HttpMethodName.POST);<NEW_LI... | > headers = responseHandler.getResponseHeaders(); |
30,030 | public static DescribeBizTypeImageLibResponse unmarshall(DescribeBizTypeImageLibResponse describeBizTypeImageLibResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeBizTypeImageLibResponse.setRequestId(_ctx.stringValue("DescribeBizTypeImageLibResponse.RequestId"));<NEW_LINE>Black black = new Black();<NEW_LINE>List<Wh... | ("DescribeBizTypeImageLibResponse.White.All[" + i + "].Name")); |
753,739 | public boolean visit(SwitchCase node) {<NEW_LINE>if ((node.getAST().apiLevel() >= AST.JLS14)) {<NEW_LINE>if (node.isDefault()) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>this.buffer.append("default");<NEW_LINE>// $NON-NLS-1$ //$NON-NLS-2$<NEW_LINE>this.buffer.append(node.isSwitchLabeledRule() ? " ->" : ":");<NEW_LINE>} else {<... | this.buffer.append("case "); |
867,127 | private Messages.IndexingError.ErrorType errorTypeFromResponse(BulkItemResponse item) {<NEW_LINE>final ParsedElasticsearchException exception = ParsedElasticsearchException.<MASK><NEW_LINE>switch(exception.type()) {<NEW_LINE>case MAPPER_PARSING_EXCEPTION:<NEW_LINE>return Messages.IndexingError.ErrorType.MappingError;<N... | from(item.getFailureMessage()); |
1,575,116 | public static GetSettingsResponse fromXContent(XContentParser parser) throws IOException {<NEW_LINE>HashMap<String, Settings> indexToSettings = new HashMap<>();<NEW_LINE>HashMap<String, Settings> indexToDefaultSettings = new HashMap<>();<NEW_LINE>if (parser.currentToken() == null) {<NEW_LINE>parser.nextToken();<NEW_LIN... | putAllFromMap(indexToDefaultSettings).build(); |
1,561,748 | private int writeModelSize(String modelId, Long modelSizeBytes, OutputStream outputStream) throws IOException {<NEW_LINE>if (modelSizeBytes == null) {<NEW_LINE>String message = String.format(Locale.ROOT, "The definition doc for model [%s] has a null value for field [%s]", modelId, TrainedModelDefinitionDoc.TOTAL_DEFINI... | modelId, modelSizeBytes, Integer.MAX_VALUE); |
1,442,445 | public JVar declareUrlVariables(ExecutableElement element, RestHolder holder, JBlock methodBody, SortedMap<String, JVar> methodParams) {<NEW_LINE>Map<String, String> urlNameToElementName = new <MASK><NEW_LINE>for (VariableElement variableElement : element.getParameters()) {<NEW_LINE>if (variableElement.getAnnotation(Pa... | HashMap<String, String>(); |
1,502,169 | private static Table<String, IOType, Wrapper<AlgoOperator<?>>> loadIoOpClasses() {<NEW_LINE>Reflections reflections = new Reflections("com.alibaba.alink");<NEW_LINE>Table<String, IOType, Wrapper<AlgoOperator<?>><MASK><NEW_LINE>for (Class<?> clazz : reflections.getTypesAnnotatedWith(IoOpAnnotation.class)) {<NEW_LINE>try... | > table = HashBasedTable.create(); |
1,659,609 | final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(untagResourceRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UntagResourceRequest> request = null;<NE... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
655,242 | void createBucket(String projectId, Bucket bucket, BackOff backoff, Sleeper sleeper) throws IOException {<NEW_LINE>Storage.Buckets.Insert insertBucket = storageClient.buckets().insert(projectId, bucket);<NEW_LINE>insertBucket.setPredefinedAcl("projectPrivate");<NEW_LINE>insertBucket.setPredefinedDefaultObjectAcl("proje... | }, IOException.class, sleeper); |
1,541,372 | public void sendPrintPackageResponse(final PrintPackage printPackage, final PrintJobInstructionsConfirm response) {<NEW_LINE>final byte[] data = beanEncoder.encode(response);<NEW_LINE>final String transactionId = printPackage.getTransactionId();<NEW_LINE>final Map<String, String> params = createInitialUrlParams();<NEW_... | final File dataFiletoDelete = mkFile(printPackage); |
724,656 | public Dialog onCreateDialog(Bundle savedInstanceState) {<NEW_LINE>dialogId = getArguments().getInt(ARG_ID);<NEW_LINE>showAlphaSlider = getArguments().getBoolean(ARG_ALPHA);<NEW_LINE>showColorShades = getArguments().getBoolean(ARG_SHOW_COLOR_SHADES);<NEW_LINE>colorShape = getArguments().getInt(ARG_COLOR_SHAPE);<NEW_LIN... | builder.setNeutralButton(neutralButtonStringRes, null); |
1,304,678 | public CommandExecutionResult execute(final SequenceDiagram diagram, BlocLines lines) throws NoSuchColorException {<NEW_LINE>final String firstLine = lines.getFirst().getTrimmed().getString();<NEW_LINE>final RegexResult arg = <MASK><NEW_LINE>if (arg == null)<NEW_LINE>return CommandExecutionResult.error("Cannot parse li... | getConcat().matcher(firstLine); |
820,508 | public static OptionData fromOption(@Nonnull Command.Option option) {<NEW_LINE>Checks.notNull(option, "Option");<NEW_LINE>OptionData data = new OptionData(option.getType(), option.getName(), option.getDescription());<NEW_LINE>data.setRequired(option.isRequired());<NEW_LINE>data.setAutoComplete(option.isAutoComplete());... | setMinValue(min.longValue()); |
1,330,212 | private static String buildStringRepresentation(Program program, Address address, Reference reference, ShowBlockName showBlockName) {<NEW_LINE>if (address == null) {<NEW_LINE>return "<NULL>";<NEW_LINE>}<NEW_LINE>if (address.getAddressSpace().getType() == AddressSpace.TYPE_NONE) {<NEW_LINE>// NO_ADDRESS or EXT_FROM_ADDR... | Address baseAddr = offsetRef.getBaseAddress(); |
1,581,819 | private void tidyUp() {<NEW_LINE>try {<NEW_LINE>if (download_manager_listener != null) {<NEW_LINE>download_manager.removeListener(download_manager_listener);<NEW_LINE>}<NEW_LINE>if (download != null) {<NEW_LINE>// unfortunately the tags and category get lost on download removal so cache them<NEW_LINE>List<String> <MASK... | latest_tags = plugin.getInitialTags(core_dm); |
644,532 | public void paint(Graphics g) {<NEW_LINE>if (fontChanged) {<NEW_LINE>super.paint(g);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>FontMetrics fm = g.getFontMetrics(getFont());<NEW_LINE>fontChanged = false;<NEW_LINE>double logWidth = fm.stringWidth(NbBundle.getBundle(TransactionView.class).getString("MON_Transactions_27")) * 1.... | (logD.getWidth())); |
844,027 | public List<String> build(VarsContext context) {<NEW_LINE>String rowText = getArguments().trim();<NEW_LINE>if (!rowText.startsWith("|")) {<NEW_LINE>throw new SyntaxException(getPlace(), "Incorrect format. Should start with '|'");<NEW_LINE>}<NEW_LINE>if (!rowText.endsWith("|")) {<NEW_LINE>throw new SyntaxException(getPl... | i].trim())); |
1,600,288 | private Dialog createInsecureBluetoothAlertDialog(final String minSecurityPatch) {<NEW_LINE>final Intent settingsIntent = new Intent(<MASK><NEW_LINE>final DialogBuilder dialog = DialogBuilder.warn(activity, R.string.alert_dialogs_fragment_insecure_bluetooth_title, R.string.alert_dialogs_fragment_insecure_bluetooth_mess... | android.provider.Settings.ACTION_BLUETOOTH_SETTINGS); |
484,912 | public void nextPDU() throws IOException {<NEW_LINE>checkThread();<NEW_LINE>Association.LOG.trace("{}: waiting for PDU", as);<NEW_LINE>readFully(0, 10);<NEW_LINE>pos = 0;<NEW_LINE>pdutype = get();<NEW_LINE>get();<NEW_LINE>pdulen = getInt();<NEW_LINE>Association.LOG.trace("{} >> PDU[type={}, len={}]", new Object[] { as<... | , pdutype, pdulen & 0xFFFFFFFFL }); |
1,033,565 | // TODO: InComplete, method cache is required(indexed by params' number)<NEW_LINE>JavaMethod findJavaMethod(String methodName, RubyArray args) {<NEW_LINE>int size = args == null ? 0 : args.size();<NEW_LINE>List<Method> list = null;<NEW_LINE>RubyClass klass = this;<NEW_LINE>while (klass != null) {<NEW_LINE>list = ((Java... | method = list.get(0); |
658,101 | public static int longestSubarrayWithDistinctEntries(List<Integer> A) {<NEW_LINE>// Records the most recent occurrences of each entry.<NEW_LINE>Map<Integer, Integer> mostRecentOccurrence = new HashMap<>();<NEW_LINE><MASK><NEW_LINE>for (int i = 0; i < A.size(); ++i) {<NEW_LINE>Integer dupIdx = mostRecentOccurrence.put(A... | int longestDupFreeSubarrayStartIdx = 0, result = 0; |
1,236,845 | public void deleteApplication(TenantAndApplicationId id, Optional<Credentials> credentials) {<NEW_LINE>lockApplicationOrThrow(id, application -> {<NEW_LINE>var deployments = application.get().instances().values().stream().filter(instance -> !instance.deployments().isEmpty()).collect(toMap(instance -> instance.name(), i... | ), id.application()); |
1,604,597 | /*<NEW_LINE>* Implements<NEW_LINE>* EventPackageSubscriber.Subscription#processActiveRequest(RequestEvent<NEW_LINE>* , byte[]).<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>protected void processActiveRequest(RequestEvent requestEvent, byte[] rawContent) {<NEW_LINE>if (rawContent != null)<NEW_LINE>setPidfPresenceStatus(new ... | contact.setSubscriptionState(SubscriptionStateHeader.PENDING); |
1,350,691 | public void run() {<NEW_LINE>if (!ch.isClosing()) {<NEW_LINE>UserConnection userCon = new UserConnection(bungee, ch, getName(), InitialHandler.this);<NEW_LINE>userCon.setCompressionThreshold(BungeeCord.getInstance().config.getCompressionThreshold());<NEW_LINE>userCon.init();<NEW_LINE>unsafe.sendPacket(new LoginSuccess(... | getServerInfo(listener.getDefaultServer()); |
1,493,979 | public static Frete calcularFrete(Encomenda encomenda, Servico tipoFrete) throws CorreiosException {<NEW_LINE>Properties parameters = new Properties();<NEW_LINE>parameters.setProperty("nCdEmpresa", encomenda.getCodigoEmpresa());<NEW_LINE>parameters.setProperty("sDsSenha", encomenda.getSenha());<NEW_LINE>parameters.setP... | Unmarshaller u = jc.createUnmarshaller(); |
175,255 | public void onError(java.lang.Exception e) {<NEW_LINE>byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;<NEW_LINE>org.apache.thrift.TSerializable msg;<NEW_LINE>hasTablePermission_result result = new hasTablePermission_result();<NEW_LINE>if (e instanceof ThriftSecurityException) {<NEW_LINE>result.sec = (Thrif... | _LOGGER.error("TTransportException inside handler", e); |
426,446 | private Map<Node, Node> generateStandinMap(List<List<Node>> standins) {<NEW_LINE>Map<Node, Node> standinMap = standins.isEmpty() ? Collections.emptyMap() : new HashMap<>(standins.size());<NEW_LINE>for (List<Node> pairing : standins) {<NEW_LINE>if (pairing == null)<NEW_LINE>continue;<NEW_LINE>if (pairing.size() != 2) {<... | from = pairing.get(0); |
1,012,903 | private CompletableFuture<XContentBuilder> executeBulkRequest(Session session, String stmt, List<List<Object>> bulkArgs) {<NEW_LINE>final long startTimeInNs = System.nanoTime();<NEW_LINE>session.parse(UNNAMED, stmt, emptyList());<NEW_LINE>final RestBulkRowCountReceiver.Result[] results = new RestBulkRowCountReceiver.<M... | Result[bulkArgs.size()]; |
1,218,754 | public static ListAvailableTestPhoneNumbersResponse unmarshall(ListAvailableTestPhoneNumbersResponse listAvailableTestPhoneNumbersResponse, UnmarshallerContext context) {<NEW_LINE>listAvailableTestPhoneNumbersResponse.setRequestId(context.stringValue("ListAvailableTestPhoneNumbersResponse.RequestId"));<NEW_LINE>listAva... | (context.integerValue("ListAvailableTestPhoneNumbersResponse.PhoneNumbers.PageSize")); |
1,779,160 | public boolean runBundleOnDevice(String udid, String bundleID) {<NEW_LINE>ProcessExecutorParams processExecutorParams = ProcessExecutorParams.builder().setCommand(ImmutableList.of(deviceHelperPath.toString(), "--json", udid, "launch", bundleID)).build();<NEW_LINE>Set<ProcessExecutor.Option> options = EnumSet.of(Process... | result.getExitCode() == 0); |
1,483,993 | private final ExtractLocalDescriptor createRefactoringDescriptor() {<NEW_LINE>final Map<String, String> arguments = new HashMap<>();<NEW_LINE>String project = null;<NEW_LINE>IJavaProject javaProject = fCu.getJavaProject();<NEW_LINE>if (javaProject != null) {<NEW_LINE>project = javaProject.getElementName();<NEW_LINE>}<N... | MethodDeclaration) decl).resolveBinding(); |
490,464 | private // [START auth_with_facebook]<NEW_LINE>void handleFacebookAccessToken(AccessToken token) {<NEW_LINE>Log.d(TAG, "handleFacebookAccessToken:" + token);<NEW_LINE>AuthCredential credential = FacebookAuthProvider.<MASK><NEW_LINE>mAuth.signInWithCredential(credential).addOnCompleteListener(this, new OnCompleteListene... | getCredential(token.getToken()); |
684,994 | public List<AppDeploymentRequest> createTaskDeploymentRequests(String taskName, String dslText) {<NEW_LINE>List<AppDeploymentRequest> appDeploymentRequests = new ArrayList<>();<NEW_LINE>TaskParser taskParser = new TaskParser(taskName, dslText, true, true);<NEW_LINE>TaskNode taskNode = taskParser.parse();<NEW_LINE>if (t... | findByTaskName(subTask.getName()); |
1,788,346 | public MethodDeclaration createGetter(TypeDeclaration parent, EclipseNode fieldNode, String name, int modifier, ASTNode source, boolean lazy, List<Annotation> onMethod) {<NEW_LINE>// Remember the type; lazy will change it;<NEW_LINE>TypeReference returnType = copyType(((FieldDeclaration) fieldNode.get()).type, source);<... | statements = createLazyGetterBody(source, fieldNode); |
844,148 | private void initView() {<NEW_LINE>setContentView(R.layout.layout_setting_view);<NEW_LINE>View debugContainer = findViewById(R.id.lua_setting_debug);<NEW_LINE>View hotReloadContainer = findViewById(R.id.lua_setting_hr);<NEW_LINE>View serialContainer = findViewById(R.id.lua_setting_serial);<NEW_LINE>etDebugIp = findView... | hotReloadContainer.setVisibility(View.GONE); |
1,246,253 | private void sendBlockAck(final int seqZero, final int ttl, final int src, final int dst, final int segN) {<NEW_LINE>final int blockAck = mSegmentedAccessBlockAck;<NEW_LINE>if (BlockAcknowledgementMessage.hasAllSegmentsBeenReceived(blockAck, segN)) {<NEW_LINE>LOG.info("All segments received cancelling incomplete timer"... | upperTransportControlPdu = createAcknowledgementPayload(seqZero, blockAck); |
893,666 | private String rewriteBasePath(RequestContext context) {<NEW_LINE>InputStream responseDataStream = context.getResponseDataStream();<NEW_LINE>String requestUri = RequestContext.getCurrentContext().getRequest().getRequestURI();<NEW_LINE>try {<NEW_LINE>if (context.getResponseGZipped()) {<NEW_LINE>responseDataStream = new ... | map.put("basePath", basePath); |
289,166 | public static void interleavedYuvToArgb8888(InterleavedU8 input, byte[] output) {<NEW_LINE>final int width = input.width;<NEW_LINE>final int height = input.height;<NEW_LINE>int indexDst = 0;<NEW_LINE>for (int row = 0; row < height; row++) {<NEW_LINE>int indexSrc = input.startIndex + input.stride * row;<NEW_LINE>for (in... | indexSrc++] & 0xFF) - 128; |
1,846,833 | private static void buildNamedExpr(Item item, VarExprList varExprList) {<NEW_LINE>if (item.isNode()) {<NEW_LINE>Var v = BuilderNode.buildVar(item);<NEW_LINE>varExprList.add(v);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!item.isList() || item.getList().size() != 2)<NEW_LINE>BuilderLib.broken(item, "Not a var or var/expre... | buildVar(list.car()); |
166,163 | private static ITranslatableString createDisplayName(final ProductWithAvailabilityInfo productWithAvailabilityInfo, final String adLanguage) {<NEW_LINE>final ITranslatableString productDisplayName = productWithAvailabilityInfo.getProductDisplayName();<NEW_LINE>final Quantity availabilityInfoQty = productWithAvailabilit... | productWithAvailabilityInfo.getAttributes(), adLanguage); |
712,254 | private void process(GridDefinition grid, Texture texture, Vector2ic size, Map<Name, SubtextureData> out) {<NEW_LINE>if (grid.getTileSize() == null) {<NEW_LINE>logger.error("Bad grid definition - missing mandatory property tileSize");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (grid.getGridDimensions() == null) {<NEW_LINE... | = new Vector2f(0, 0); |
387,254 | private static boolean isNewerVersion(StringBuilder text, String v2) {<NEW_LINE>try {<NEW_LINE>// System.out.println(text);<NEW_LINE>Matcher matcher = PATTERN_TAG.matcher(text);<NEW_LINE>if (matcher.find()) {<NEW_LINE>String <MASK><NEW_LINE>System.out.println(v1 + " " + v2);<NEW_LINE>if (v1.indexOf(".") > 0 && v2.index... | v1 = matcher.group(1); |
1,167,043 | public static String makeNameUnique(CompilationInfo info, Scope s, String name, List<String> definedIds, String prefix, String suffix) {<NEW_LINE>boolean cont;<NEW_LINE>String proposedName;<NEW_LINE>name = CodeStyleUtils.addPrefixSuffix(name, prefix, null);<NEW_LINE>int counter = 0;<NEW_LINE>do {<NEW_LINE>proposedName ... | : "") + safeString(suffix); |
504,118 | public static Vector<String> removeTabs(List<String> input) {<NEW_LINE>final Vector<String> <MASK><NEW_LINE>for (final String oldLine : input) {<NEW_LINE>String newLine = "";<NEW_LINE>int next = 0;<NEW_LINE>while (next < oldLine.length()) {<NEW_LINE>if (oldLine.charAt(next) == '\t') {<NEW_LINE>int toAdd = 8 - (newLine.... | newVec = new Vector<>(); |
161,381 | public void addRemoteTransactions(final Collection<Transaction> transactions) {<NEW_LINE>if (!syncState.isInSync(SYNC_TOLERANCE)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final Set<Transaction> addedTransactions = new HashSet<>(transactions.size());<NEW_LINE>for (final Transaction transaction : transactions) {<NEW_LINE>i... | added = pendingTransactions.addRemoteTransaction(transaction); |
1,077,501 | private void attribute(ClassWriter classWriter, ParamDefinition parameter, String methodName) throws NoSuchMethodException {<NEW_LINE>MethodVisitor methodVisitor = classWriter.visitMethod(ACC_PRIVATE | ACC_STATIC, methodName, "(Lio/jooby/Context;Ljava/lang/String;)Ljava/lang/Object;", "<T:Ljava/lang/Object;>(Lio/jooby/... | Method attribute = parameter.getSingleValue(); |
1,040,039 | public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) {<NEW_LINE>// throw new UnsupportedOperationException("wip");<NEW_LINE>Point2D p1 = pos1.getTranslated(gpoint1.getPoint2D());<NEW_LINE>Point2D p2 = pos2.getTranslated(gpoint2.getPoint2D());<NEW_LINE>// final Direction originalDirection... | (10).getTranslated(p1); |
1,106,599 | public Task<T> batchable(final String desc, final K key) {<NEW_LINE>Task<T> batchableTask = Task.async(desc, ctx -> {<NEW_LINE>final BatchPromise<T> <MASK><NEW_LINE>final Long planId = ctx.getPlanId();<NEW_LINE>final GroupBatchBuilder builder = _batches.computeIfAbsent(planId, k -> new GroupBatchBuilder());<NEW_LINE>fi... | result = new BatchPromise<>(); |
942,674 | protected void kNNdistanceAdjustment(MkTabEntry entry, Map<DBID, KNNList> knnLists) {<NEW_LINE>MkTabTreeNode<O> node = getNode(entry);<NEW_LINE><MASK><NEW_LINE>if (node.isLeaf()) {<NEW_LINE>for (int i = 0; i < node.getNumEntries(); i++) {<NEW_LINE>MkTabLeafEntry leafEntry = (MkTabLeafEntry) node.getEntry(i);<NEW_LINE>K... | double[] knnDistances_node = initKnnDistanceList(); |
590,653 | public static MutableRoaringBitmap andNot(final ImmutableRoaringBitmap x1, final ImmutableRoaringBitmap x2) {<NEW_LINE>final MutableRoaringBitmap answer = new MutableRoaringBitmap();<NEW_LINE>int pos1 = 0, pos2 = 0;<NEW_LINE>final int length1 = x1.highLowContainer.size(), length2 = x2.highLowContainer.size();<NEW_LINE>... | highLowContainer.advanceUntil(s1, pos2); |
251,234 | /*<NEW_LINE>* returns whether a follow/unfollow was successful based on the response to:<NEW_LINE>* read/follows/new<NEW_LINE>* read/follows/delete<NEW_LINE>* site/$site/follows/new<NEW_LINE>* site/$site/follows/mine/delete<NEW_LINE>*/<NEW_LINE>private static boolean isFollowActionSuccessful(JSONObject json, boolean is... | json.optBoolean("subscribed", false); |
1,190,611 | private void update(Path.Command selection) {<NEW_LINE>for (MenuItem child : popupMenu.getItems()) {<NEW_LINE>child.dispose();<NEW_LINE>}<NEW_LINE>// If we just have one additional item, simply go above the max, rather than adding the<NEW_LINE>// "one more item not shown" message.<NEW_LINE>int count = (commandIds.size(... | id = commandIds.get(i); |
1,452,309 | final CreateWorkforceResult executeCreateWorkforce(CreateWorkforceRequest createWorkforceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createWorkforceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.