idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
429,213 | private void writeHAProxyMessage() {<NEW_LINE>if (proxyConnection.hasHAProxyMessage()) {<NEW_LINE>outboundChannel.writeAndFlush(encodeProxyProtocolMessage(proxyConnection.getHAProxyMessage())<MASK><NEW_LINE>} else {<NEW_LINE>if (inboundChannel.remoteAddress() instanceof InetSocketAddress && outboundChannel.localAddress... | ).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE); |
15,492 | // find PsiLanguageInjectionHost in range "newInjectionHostRange" in the file which is almost "hostPsiFile" but where "oldRoot" replaced with "newRoot"<NEW_LINE>private static PsiLanguageInjectionHost findNewInjectionHost(@Nonnull PsiFile hostPsiFile, @Nonnull ASTNode oldRoot, @Nonnull ASTNode newRoot, @Nonnull PsiLang... | TextRange newRootRange = newRoot.getTextRange(); |
801,149 | private synchronized void addAppModuleNames(String appName, String moduleAndAppName) {<NEW_LINE>HashSet<String> moduleNames = null;<NEW_LINE>if (moduleAndAppName == null) {<NEW_LINE>if (tc.isDebugEnabled())<NEW_LINE><MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String moduleName = moduleAndAppName.split("#")[1];<NEW_LINE... | Tr.debug(tc, "addAppModuleNames(): moduleAndAppName is null."); |
859,035 | final public CompletableFuture<Integer> read(ChunkHandle handle, long fromOffset, int length, byte[] buffer, int bufferOffset) {<NEW_LINE>Exceptions.checkNotClosed(this.closed.get(), this);<NEW_LINE>// Validate parameters<NEW_LINE>Preconditions.checkArgument(null != handle, "handle must not be null");<NEW_LINE>checkChu... | bufferOffset, buffer.length, "bufferOffset"); |
1,175,225 | private void cancelQuery(Query<T> query, String cancelUrl) {<NEW_LINE>Runnable cancelRunnable = () -> {<NEW_LINE>try {<NEW_LINE>Future<StatusResponseHolder> responseFuture = httpClient.go(new Request(HttpMethod.DELETE, new URL(cancelUrl)).setContent(objectMapper.writeValueAsBytes(query)).setHeader(HttpHeaders.Names.CON... | error(e, "Error cancelling query[%s]", query); |
1,846,590 | private void updateSearchViewState(boolean enter) {<NEW_LINE>int hide = enter ? View.GONE : View.VISIBLE;<NEW_LINE>listView.setVisibility(hide);<NEW_LINE>searchListView.setVisibility(enter ? View.VISIBLE : View.GONE);<NEW_LINE>searchItem.getSearchContainer().setVisibility(enter ? View.VISIBLE : View.GONE);<NEW_LINE>act... | [1].setVisibility(hide); |
1,837,685 | private Mono<PagedResponse<BackupPolicyInner>> listSinglePageAsync(String resourceGroupName, String accountName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>... | error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); |
1,839,353 | private void SKIP__action(RuleContext _localctx, int actionIndex) {<NEW_LINE>switch(actionIndex) {<NEW_LINE>case 9:<NEW_LINE>int startIndex = lastCodePointCheckOffset + 1;<NEW_LINE>int endIndex = _input.index();<NEW_LINE>String text = _input.getText(Interval.of(startIndex, endIndex));<NEW_LINE>int len = text.length();<... | this.emit(createLineContinuationEOFError()); |
1,540,389 | public boolean next() {<NEW_LINE>// we first traverse shortcuts (in decreasing order) and when we are done we use the base iterator to traverse<NEW_LINE>// the base edges as well. shortcuts are filtered using shortcutFilter, but base edges are only filtered by<NEW_LINE>// access/finite weight.<NEW_LINE>while (nextEdgeI... | nextEdgeId - baseGraph.getEdges()); |
1,429,705 | public void deleteAllTimestamps(TableReference tableRef, Map<Cell, TimestampRangeDelete> deletes) {<NEW_LINE>if (deletes.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>long maxTimestampExclusive = deletes.values().stream().mapToLong(TimestampRangeDelete::maxTimestampToDelete).max<MASK><NEW_LINE>Multimap<Cell, Long> ... | ().getAsLong() + 1; |
533,368 | protected void registerMetrics(MeterRegistry meterRegistry, TimeLimiter timeLimiter, List<Tag> customTags) {<NEW_LINE>// Remove previous meters before register<NEW_LINE>removeMetrics(meterRegistry, timeLimiter.getName());<NEW_LINE>Counter successes = Counter.builder(names.getCallsMetricName()).description("The number o... | new HashSet<>(ids)); |
884,712 | private void configureMenuItem(JMenuItem item, String containerCtx, String action, ActionProvider provider, Map context) {<NEW_LINE>// System.err.println("ConfigureMenuItem: " + containerCtx + "/" + action);<NEW_LINE>item.setName(action);<NEW_LINE>item.putClientProperty(KEY_ACTION, action);<NEW_LINE>item.putClientPrope... | getState(action, containerCtx, context); |
1,109,379 | public IClass.IMethod findIMethod(SuperclassMethodInvocation superclassMethodInvocation) throws CompileException {<NEW_LINE>AbstractClassDeclaration declaringClass;<NEW_LINE>for (Scope s = superclassMethodInvocation.getEnclosingScope(); ; s = s.getEnclosingScope()) {<NEW_LINE>if (s instanceof FunctionDeclarator) {<NEW_... | "Superclass method cannot be invoked in static context", superclassMethodInvocation.getLocation()); |
435,689 | private static <T> T initProxy(Class<?> type, MethodInvocationInterceptor interceptor) {<NEW_LINE>Assert.notNull(type, "'type' must not be null");<NEW_LINE>if (type.isInterface()) {<NEW_LINE>ProxyFactory factory = new ProxyFactory(EmptyTargetSource.INSTANCE);<NEW_LINE>factory.addInterface(type);<NEW_LINE>factory.addInt... | proxyClass, enhancer.getUseCache()); |
947,694 | public static String bytesToSize(long sizeInBytes) {<NEW_LINE>String readableSize;<NEW_LINE>double b = sizeInBytes;<NEW_LINE>double k = sizeInBytes / 1024.0;<NEW_LINE>double m = ((sizeInBytes / 1024.0) / 1024.0);<NEW_LINE>double g = (((sizeInBytes / 1024.0) / 1024.0) / 1024.0);<NEW_LINE>double t = ((((sizeInBytes / 102... | 1024.0) / 1024.0) / 1024.0); |
1,022,441 | public static <T> RecordChangeLog of(@NonNull final T model, @NonNull final Class<T> modelClass, @NonNull final List<RecordChangeLogEntry> entries) {<NEW_LINE>final RecordChangeLogBuilder builder = RecordChangeLog.builder().entries(entries);<NEW_LINE>final Integer createdBy = InterfaceWrapperHelper.getValueOrNull(model... | getValueOrNull(model, InterfaceWrapperHelper.COLUMNNAME_Created); |
513,636 | protected void sync() {<NEW_LINE>inSync = true;<NEW_LINE>WSDLComponent secBinding = null;<NEW_LINE>WSDLComponent bootPolicy = null;<NEW_LINE>WSDLComponent topSecBinding = SecurityPolicyModelHelper.getSecurityBindingTypeElement(comp);<NEW_LINE>WSDLComponent protTokenKind = SecurityTokensModelHelper.<MASK><NEW_LINE>WSDLC... | getTokenElement(topSecBinding, ProtectionToken.class); |
1,622,660 | public void updateCurrentLevel() {<NEW_LINE>boolean changed = false;<NEW_LINE>float occupied = 0;<NEW_LINE>float totalSpace = 0;<NEW_LINE>observedInventory.findNewCapability();<NEW_LINE>observedTank.findNewCapability();<NEW_LINE>if (observedInventory.hasInventory() || observedTank.hasInventory()) {<NEW_LINE>if (observe... | (int) (currentLevel * 6); |
1,831,525 | public boolean grantUserRole(@NotNull WebSession webSession, String user, String role) throws DBWebException {<NEW_LINE>WebUser grantor = webSession.getUser();<NEW_LINE>if (grantor == null) {<NEW_LINE>throw new DBWebException("Cannot grant role in anonymous mode");<NEW_LINE>}<NEW_LINE>if (CommonUtils.equalObjects(user,... | throw new DBWebException("Error granting role", e); |
344,254 | private static ContentTypeWithDependencies createURLMapContentType(PageWithDependencies livePageWithContent) throws WebAssetException, DotDataException, DotSecurityException {<NEW_LINE>final Host host = new SiteDataGen().nextPersisted();<NEW_LINE>final Folder folder = new FolderDataGen().<MASK><NEW_LINE>final Language ... | site(host).nextPersisted(); |
99,960 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>if (controller == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>int xValue = (Integer) getValue("damage");<NEW_LINE>Cards cards = new CardsImpl(controller.getLibrary().getTopCards(game,... | MAX_VALUE, Zone.LIBRARY, filter); |
1,107,294 | public void testFlowableRxInvoker_getIbmReceiveTimeout(Map<String, String> param, StringBuilder ret) {<NEW_LINE>long timeout = messageTimeout;<NEW_LINE>if (isZOS()) {<NEW_LINE>timeout = zTimeout;<NEW_LINE>}<NEW_LINE>String serverIP = param.get("serverIP");<NEW_LINE>String serverPort = param.get("serverPort");<NEW_LINE>... | long startTime = System.currentTimeMillis(); |
1,308,891 | public void emit(SPIRVCompilationResultBuilder crb, SPIRVAssembler asm) {<NEW_LINE>Logger.traceCodeGen(Logger.BACKEND.SPIRV, "emit TernaryBranch: " + leftVal + " " + cond + right + " ? " + trueValue + " : " + falseValue);<NEW_LINE>SPIRVId idLeftVar = getId(leftVal, asm, (SPIRVKind) leftVal.getPlatformKind());<NEW_LINE>... | asm.primitives.getTypePrimitive(kind); |
954,177 | private Optional<Long> doStep(Supplier<Long> step) {<NEW_LINE>if (closed)<NEW_LINE><MASK><NEW_LINE>if (!isValid())<NEW_LINE>return Optional.empty();<NEW_LINE>try {<NEW_LINE>return Optional.of(step.get());<NEW_LINE>} catch (TransientException | ActivationConflictException e) {<NEW_LINE>metric.add("maintenanceDeployment.... | throw new IllegalStateException(this + "' is closed"); |
882,891 | public void manageRefuseLeaves(LeaveRequest leave) throws AxelorException {<NEW_LINE>Employee employee = leave.getUser().getEmployee();<NEW_LINE>if (employee == null) {<NEW_LINE>throw new AxelorException(leave, TraceBackRepository.CATEGORY_CONFIGURATION_ERROR, I18n.get(IExceptionMessage.LEAVE_USER_EMPLOYEE), leave.getU... | getLeaveReason()).fetchOne(); |
1,413,992 | public static ManagedChannel newChannel(@Nullable Executor executor, String target, String proxy, AuthAndTLSOptions options, @Nullable List<ClientInterceptor> interceptors) throws IOException {<NEW_LINE>Preconditions.checkNotNull(target);<NEW_LINE>Preconditions.checkNotNull(options);<NEW_LINE>SslContext sslContext = is... | builder.overrideAuthority(options.tlsAuthorityOverride); |
4,217 | private void drawButtonBackground(MatrixStack matrixStack, int x1, int x3, int y1, int y2, boolean hHack) {<NEW_LINE>float[] bgColor = GUI.getBgColor();<NEW_LINE>float opacity = GUI.getOpacity();<NEW_LINE>Matrix4f matrix = matrixStack.peek().getPositionMatrix();<NEW_LINE>BufferBuilder bufferBuilder = Tessellator.getIns... | hHack ? opacity * 1.5F : opacity); |
956,031 | final CreateApplicationResult executeCreateApplication(CreateApplicationRequest createApplicationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createApplicationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
1,816,673 | public static boolean isMatch(URL consumerUrl, URL providerUrl) {<NEW_LINE>String consumerInterface = consumerUrl.getServiceInterface();<NEW_LINE><MASK><NEW_LINE>// FIXME accept providerUrl with '*' as interface name, after carefully thought about all possible scenarios I think it's ok to add this condition.<NEW_LINE>i... | String providerInterface = providerUrl.getServiceInterface(); |
594,887 | public void display(boolean verbose, PrintWriter pw) {<NEW_LINE>super.display(verbose, pw);<NEW_LINE>if (doCatLevelEval) {<NEW_LINE>final NumberFormat nf = new DecimalFormat("0.00");<NEW_LINE>final Set<String> cats = Generics.newHashSet();<NEW_LINE>final Random rand = new Random();<NEW_LINE>cats.addAll(precisions.keySe... | nf.format(oovRate))); |
245,290 | private void connectAutomatically() {<NEW_LINE>DetectOpenOfficeInstallation officeInstallation = new DetectOpenOfficeInstallation(preferencesService, dialogService);<NEW_LINE>if (officeInstallation.isExecutablePathDefined()) {<NEW_LINE>connect();<NEW_LINE>} else {<NEW_LINE>Task<List<Path>> taskConnectIfInstalled = new ... | >(taskConnectIfInstalled.getValue()); |
198,939 | public void marshall(DataSourceConfiguration dataSourceConfiguration, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (dataSourceConfiguration == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(dataSourceConfi... | dataSourceConfiguration.getSharePointConfiguration(), SHAREPOINTCONFIGURATION_BINDING); |
526,845 | public boolean visit(TagElement node) {<NEW_LINE>String tagName = node.getTagName();<NEW_LINE>if (tagName == null || tagName.length() <= 1)<NEW_LINE>return true;<NEW_LINE>int startIndex = tokenStartingAt(node.getStartPosition());<NEW_LINE>int nodeEnd = node.getStartPosition() + node.getLength() - 1;<NEW_LINE>while (Sca... | (startIndex).startsWith(tagName); |
704,774 | final CreateProvisioningTemplateResult executeCreateProvisioningTemplate(CreateProvisioningTemplateRequest createProvisioningTemplateRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createProvisioningTemplateRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRe... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
630,329 | public GroupUserEntity postGroupUsers(GroupUsersBody body) throws ApiException {<NEW_LINE>Object localVarPostBody = body;<NEW_LINE>// verify the required parameter 'body' is set<NEW_LINE>if (body == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'body' when calling postGroupUsers");<NEW_LI... | HashMap<String, String>(); |
1,286,789 | public final OnMergeDirectInsertContext onMergeDirectInsert() throws RecognitionException {<NEW_LINE>OnMergeDirectInsertContext _localctx = new OnMergeDirectInsertContext(_ctx, getState());<NEW_LINE>enterRule(_localctx, 50, RULE_onMergeDirectInsert);<NEW_LINE>int _la;<NEW_LINE>try {<NEW_LINE>enterOuterAlt(_localctx, 1)... | _errHandler.reportError(this, re); |
736,162 | final DeleteMemberResult executeDeleteMember(DeleteMemberRequest deleteMemberRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteMemberRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteMemberRequest> request = null;<NEW_LINE... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
390,205 | public EvaluationValue evaluate(Expression expression, Token functionToken, EvaluationValue... parameterValues) {<NEW_LINE>BigDecimal x = parameterValues[0].getNumberValue();<NEW_LINE>MathContext mathContext = expression.getConfiguration().getMathContext();<NEW_LINE>if (x.compareTo(BigDecimal.ZERO) == 0) {<NEW_LINE>ret... | , mathContext.getPrecision())); |
678,071 | public static void registerContainers(RegistryEvent.Register<MenuType<?>> event) {<NEW_LINE>ClientRegistrationUtil.registerScreen(GeneratorsContainerTypes.BIO_GENERATOR, GuiBioGenerator::new);<NEW_LINE>ClientRegistrationUtil.registerScreen(GeneratorsContainerTypes.GAS_BURNING_GENERATOR, GuiGasGenerator::new);<NEW_LINE>... | GeneratorsContainerTypes.HEAT_GENERATOR, GuiHeatGenerator::new); |
1,015,598 | private void verifyResults(PrintWriter pw, long execId, String testName) throws TestFailureException {<NEW_LINE>// Common stuff<NEW_LINE>JobOperator jobOp = BatchRuntime.getJobOperator();<NEW_LINE>// Tests<NEW_LINE>if (testName.equals("flowTransitionIllegal")) {<NEW_LINE>JobWaiter waiter = new JobWaiter(JobWaiter.START... | ("flow1step1").getBatchStatus()); |
973,098 | public ApiReturn doFilter(String fullyName) {<NEW_LINE>if (TYPE_SET.stream().anyMatch(fullyName::startsWith)) {<NEW_LINE>ApiReturn apiReturn = new ApiReturn();<NEW_LINE>if (fullyName.contains("<")) {<NEW_LINE>String[] strings = DocClassUtil.getSimpleGicName(fullyName);<NEW_LINE>String newFullName = strings[0];<NEW_LINE... | apiReturn.setSimpleName(DocGlobalConstants.JAVA_OBJECT_FULLY); |
559,141 | void superPostActivate(InvocationContext inv) {<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>results.addPostActivate(CLASS_NAME, "superPostActivate");<NEW_LINE>// Validate and update context data.<NEW_LINE>Map<String, Object> map = inv.getContextData();<NEW_LINE>String data;<NEW_LINE>if (map.containsKey("PostActivate")) {<N... | ResultsLocal results = ResultsLocalBean.getSFBean(); |
1,422,346 | public void drawU(UGraphic ug) {<NEW_LINE>final StringBounder stringBounder = ug.getStringBounder();<NEW_LINE>final Component comp = getComponent(stringBounder);<NEW_LINE>final Dimension2D dim = comp.getPreferredDimension(stringBounder);<NEW_LINE>double x1 = getPoint1Value(stringBounder);<NEW_LINE>double x2 = getPoint2... | , area, (Context2D) ug); |
315,288 | public Function<Object, Result<TimeseriesResultValue>> pullFromCache(boolean isResultLevelCache) {<NEW_LINE>return new Function<Object, Result<TimeseriesResultValue>>() {<NEW_LINE><NEW_LINE>private final Granularity granularity = query.getGranularity();<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Result<TimeseriesResu... | (Number) resultIter.next(); |
1,109,763 | public static int aiGetMaterialTexture(@NativeType("struct aiMaterial const *") AIMaterial pMat, @NativeType("aiTextureType") int type, @NativeType("unsigned int") int index, @NativeType("struct aiString *") AIString path, @Nullable @NativeType("aiTextureMapping *") int[] mapping, @Nullable @NativeType("unsigned int *"... | op, mapmode, flags, __functionAddress); |
641,357 | public ListResponse<DomainRouterResponse> searchForInternalLbVms(ListInternalLBVMsCmd cmd) {<NEW_LINE>Pair<List<DomainRouterJoinVO>, Integer> result = searchForRoutersInternal(cmd, cmd.getId(), cmd.getRouterName(), cmd.getState(), cmd.getZoneId(), cmd.getPodId(), null, cmd.getHostId(), cmd.getKeyword(), cmd.getNetworkI... | (resRouter.getId())); |
1,593,411 | public List<String> generatePalindromes(String s) {<NEW_LINE>int odd = 0;<NEW_LINE>String mid = "";<NEW_LINE>List<String> res = new ArrayList();<NEW_LINE>List<Character> list = new ArrayList();<NEW_LINE>Map<Character, Integer> map = new HashMap();<NEW_LINE>// step 1. build character count map and count odds<NEW_LINE>fo... | , new StringBuilder(), res); |
1,473,747 | public static void main(String[] args) {<NEW_LINE>final String USAGE = "\n" + "SetWebsiteConfiguration - set the website configuration for an S3 bucket\n\n" + "Usage: SetWebsiteConfiguration <bucket> [indexdoc] [errordoc]\n\n" + "Where:\n" + " bucket - the bucket to set the website configuration on\n" + " indexdo... | ) ? args[1] : "index.html"; |
1,628,734 | private void initialize() {<NEW_LINE>preferences = MoviescraperPreferences.getInstance();<NEW_LINE>guiSettings = GuiSettings.getInstance();<NEW_LINE>reinitializeAmalgamationPreferencesFromFile();<NEW_LINE>setCurrentlySelectedNfoFileList(new ArrayList<File>());<NEW_LINE>setCurrentlySelectedMovieFileList(new ArrayList<Fi... | setDividerLocation(guiSettings.getFileListDividerLocation()); |
1,349,139 | final BatchMeterUsageResult executeBatchMeterUsage(BatchMeterUsageRequest batchMeterUsageRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchMeterUsageRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<BatchM... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
830,857 | private double readADCSingleEnded(int chan) throws IOException, InterruptedException {<NEW_LINE>if (chan > 3) {<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>// start with default values<NEW_LINE>// Disable the comparator (default val)<NEW_LINE>int // Disable the comparator (default val)<NEW_LINE>config = // Non-latching (de... | REG_CONFIG_MODE_SINGLE | sdrSelection.get(rate); |
1,852,930 | private LatestSecurityPrice fromArray(JSONArray ohlcArray) throws ParseException {<NEW_LINE>long timestamp = Long.parseLong(ohlcArray.get(0).toString());<NEW_LINE>long close = YahooHelper.asPrice(ohlcArray.get(2).toString());<NEW_LINE>long high = YahooHelper.asPrice(ohlcArray.get(3).toString());<NEW_LINE>long low = Yah... | (4).toString()); |
1,592,102 | private void init(Options options) {<NEW_LINE>if (initialized) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>initialized = true;<NEW_LINE>HelpLocation help = new HelpLocation(HelpTopics.CODE_BROWSER, "Format_Code");<NEW_LINE>options.getOptions<MASK><NEW_LINE>options.registerOption(ENABLE_WORD_WRAP_MSG, false, null, "Enables w... | (GROUP_TITLE).setOptionsHelpLocation(help); |
941,237 | public Request<UpdateSmsChannelRequest> marshall(UpdateSmsChannelRequest updateSmsChannelRequest) {<NEW_LINE>if (updateSmsChannelRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(UpdateSmsChannelRequest)");<NEW_LINE>}<NEW_LINE>Request<UpdateSmsChannelRequest> request = new... | SMSChannelRequest sMSChannelRequest = updateSmsChannelRequest.getSMSChannelRequest(); |
452,322 | public void onClick(View v) {<NEW_LINE>// Utils.platformLog("#$#$#$#$#$#$#$#$#$", "onClick( "+String.valueOf((int)x)+" , "+String.valueOf((int)y)+" )");<NEW_LINE>// found child item<NEW_LINE>for (int i = 0; i < tabHost.getTabWidget().getChildCount(); i++) {<NEW_LINE>int curIndex = i;<NEW_LINE>int left = tabHost.getTabW... | getChildAt(curIndex).getWidth(); |
285,335 | public static void writeScaledChartAsPNG(OutputStream out, JFreeChart chart, int width, int height, int widthScaleFactor, int heightScaleFactor) throws IOException {<NEW_LINE>Args.nullNotPermitted(out, "out");<NEW_LINE>Args.nullNotPermitted(chart, "chart");<NEW_LINE>double desiredWidth = width * widthScaleFactor;<NEW_L... | .getScaleInstance(scaleX, scaleY)); |
998,105 | public static BatchDispatchGameSlotResponse unmarshall(BatchDispatchGameSlotResponse batchDispatchGameSlotResponse, UnmarshallerContext _ctx) {<NEW_LINE>batchDispatchGameSlotResponse.setRequestId(_ctx.stringValue("BatchDispatchGameSlotResponse.RequestId"));<NEW_LINE>List<DataList> queueResultList <MASK><NEW_LINE>for (i... | = new ArrayList<DataList>(); |
1,067,267 | public boolean visit(SQLAlterTableConvertCharSet x) {<NEW_LINE>final SQLExpr charset = x.getCharset();<NEW_LINE>final SQLExpr collate = x.getCollate();<NEW_LINE>final String charsetName;<NEW_LINE>final String collateName;<NEW_LINE>if (charset != null) {<NEW_LINE>if (charset instanceof SQLIdentifierExpr) {<NEW_LINE>char... | SQLIdentifierExpr) collate).getName(); |
167,938 | public synchronized static void init(Context c) {<NEW_LINE>if (c == null) {<NEW_LINE>LOG.d("AppProfile init null");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>AppSP.get().init(c);<NEW_LINE>if (!Android6.canWrite(c)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (profile.equals(getCurrent(c))) {<NEW_LINE>LOG.d("AppProfile skip", ... | hashCode() + "-" + profile); |
22,316 | public static void handleCommons(PokemonGo api, ServerResponse response) throws InvalidProtocolBufferException, RequestFailedException {<NEW_LINE>if (response.has(RequestType.DOWNLOAD_SETTINGS)) {<NEW_LINE>ByteString data = response.get(RequestType.DOWNLOAD_SETTINGS);<NEW_LINE>DownloadSettingsResponse settings = Downlo... | response.get(RequestType.GET_HATCHED_EGGS); |
315,661 | public ResponseData<Boolean> delegateSetService(String weId, ServiceArgs serviceArgs, WeIdPrivateKey delegateAuth) {<NEW_LINE>if (delegateAuth == null) {<NEW_LINE>return new ResponseData<>(false, ErrorCode.ILLEGAL_INPUT);<NEW_LINE>}<NEW_LINE>if (serviceArgs == null || StringUtils.isEmpty(serviceArgs.getServiceEndpoint(... | weId, serviceType, serviceEndpoint, true); |
316,052 | private Frequency makeSketch(Config config) {<NEW_LINE>BasicSettings settings = new BasicSettings(config);<NEW_LINE>String type = settings.tinyLfu().sketch();<NEW_LINE>if (type.equalsIgnoreCase("count-min-4")) {<NEW_LINE>String reset = settings.tinyLfu().countMin4().reset();<NEW_LINE>if (reset.equalsIgnoreCase("periodi... | throw new IllegalStateException("Unknown sketch type: " + type); |
539,848 | protected PO createResponse(final IReplRequestHandlerCtx ctx, final PO requestPO) {<NEW_LINE>Check.assume(requestPO != null, "requestPO not null");<NEW_LINE>final I_C_Print_Package printPackage = InterfaceWrapperHelper.create(requestPO, I_C_Print_Package.class);<NEW_LINE>Check.assume(printPackage != null, "No print pac... | responsePO = InterfaceWrapperHelper.getPO(printPackage); |
140,591 | public List<User> executeList(CommandContext commandContext) {<NEW_LINE>// GET /{realm}/users<NEW_LINE>// Query parameters: username, email, firstName, lastName, search(email, first, last or username)<NEW_LINE>// paging first, max<NEW_LINE>UriComponentsBuilder builder = prepareQuery("/users");<NEW_LINE>if (getMaxResult... | queryParam("max", getMaxResults()); |
1,336,211 | private void validateDocument(OpenAPI document) {<NEW_LINE>this.isValid = true;<NEW_LINE>final OASValidator validator = new OASValidator();<NEW_LINE>final OASValidationResult result = validator.validate(document);<NEW_LINE>final StringBuilder sbError = new StringBuilder();<NEW_LINE><MASK><NEW_LINE>if (result.hasEvents(... | final StringBuilder sbWarnings = new StringBuilder(); |
748,196 | public void run() {<NEW_LINE>String tunnelUrl = getClientParam().getClientTunnelUrl();<NEW_LINE>String tunnelSession = getClientParam().getClientTunnelSession();<NEW_LINE>try {<NEW_LINE>if (tunnelUrl != null && !tunnelUrl.isEmpty() && tunnelSession != null && !tunnelSession.isEmpty()) {<NEW_LINE>URI uri = new URI(tunne... | s_logger.error("Unexpected exception", e); |
1,436,572 | // getBulkActions.<NEW_LINE>@PUT<NEW_LINE>@Path("/contentlet/actions/bulk/fire")<NEW_LINE>@JSONP<NEW_LINE>@NoCache<NEW_LINE>@Produces({ MediaType.APPLICATION_JSON, "application/javascript" })<NEW_LINE>public final void fireBulkActions(@Context final HttpServletRequest request, @Suspended final AsyncResponse asyncRespon... | e.getMessage(), e); |
35,860 | public <G extends FieldDefinition> CreateResponse<G> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException {<NEW_LINE>CreateResponse<G> createResponse = context.createOrRetrieveCopyInstance(this);<NEW_LINE>if (createResponse.isAlreadyPopulated()) {<NEW_LINE>return createResponse... | FieldDefinition cloned = createResponse.getClone(); |
633,194 | final AcceptInputDeviceTransferResult executeAcceptInputDeviceTransfer(AcceptInputDeviceTransferRequest acceptInputDeviceTransferRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(acceptInputDeviceTransferRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequest... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
1,124,623 | public static final int writeJSONString(OutputStream os, Object object, SerializeFilter[] filters, SerializerFeature... features) throws IOException {<NEW_LINE>try (JSONWriter jsonWriter = JSONWriter.ofUTF8()) {<NEW_LINE>JSONWriter.Context context = jsonWriter.getContext();<NEW_LINE>jsonWriter.setRootObject(object);<NE... | throw new JSONException("writeJSONString error", cause); |
1,553,020 | public static void reschedulePersistentAlarms(Context context) {<NEW_LINE>synchronized (persistentAlarmsLock) {<NEW_LINE>SharedPreferences prefs = context.getSharedPreferences(SHARED_PREFERENCES_KEY, 0);<NEW_LINE>Set<String> persistentAlarms = prefs.getStringSet(PERSISTENT_ALARMS_SET_KEY, null);<NEW_LINE>// No alarms t... | allowWhileIdle = alarm.getBoolean("allowWhileIdle"); |
121,374 | public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.text_and_button);<NEW_LINE>mResultTextView = (TextView) <MASK><NEW_LINE>Button button = (Button) findViewById(R.id.button);<NEW_LINE>mResultTextView.setText(R.string.no_value);<NEW_LINE>button... | findViewById(R.id.text); |
1,481,338 | private Object convertList(Object value, Mapper mapper) {<NEW_LINE>final List list = (List) value;<NEW_LINE>final Object convertedValue;<NEW_LINE>if (list.size() == 0) {<NEW_LINE>convertedValue = list;<NEW_LINE>} else {<NEW_LINE>final List convertedList = new ArrayList(list.size());<NEW_LINE>list.forEach(item -> {<NEW_... | Object.class, m, mapper); |
1,586,241 | private void handleServerChannel(JsonNode jsonChannel) {<NEW_LINE>long channelId = jsonChannel.<MASK><NEW_LINE>long guildId = jsonChannel.get("guild_id").asLong();<NEW_LINE>ServerImpl server = api.getPossiblyUnreadyServerById(guildId).map(ServerImpl.class::cast).orElse(null);<NEW_LINE>if (server == null) {<NEW_LINE>ret... | get("id").asLong(); |
1,373,427 | public Request<DeleteResourcePolicyRequest> marshall(DeleteResourcePolicyRequest deleteResourcePolicyRequest) {<NEW_LINE>if (deleteResourcePolicyRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(DeleteResourcePolicyRequest)");<NEW_LINE>}<NEW_LINE>Request<DeleteResourcePoli... | String resourceArn = deleteResourcePolicyRequest.getResourceArn(); |
639,371 | private static void reset() {<NEW_LINE>Class<? extends RDFReaderI> rdfxmlReader = org.apache.jena.rdfxml.xmlinput.JenaReader.class;<NEW_LINE>Class<? extends RDFReaderI> ntReader = org.apache.jena.rdf.model.impl.NTripleReader.class;<NEW_LINE>Class<? extends RDFReaderI> turtleReader = org.apache.jena.ttl.turtle.TurtleRea... | custom.put("RDF", rdfxmlReader); |
1,210,133 | protected IDeserializationConverter<RowData, AbstractBaseColumn> createInternalConverter(String type) {<NEW_LINE>switch(type.toUpperCase(Locale.ENGLISH)) {<NEW_LINE>case "ID":<NEW_LINE>return val -> new BigDecimalColumn(new BigDecimal(id.incrementAndGet()));<NEW_LINE>case "INT":<NEW_LINE>case "INTEGER":<NEW_LINE>return... | (LocalTime.now())); |
473,831 | private static void handleUpsert(ConfigurationDBAdapter configuration, Node parentNode) {<NEW_LINE>DOMElementIterator eventTypeNodeIterator = new DOMElementIterator(parentNode.getChildNodes());<NEW_LINE>UpsertQuery upsertQuery = new UpsertQuery();<NEW_LINE>String connection = getRequiredAttribute(parentNode, "connectio... | = new ArrayList<BindingParameter>(); |
1,228,385 | ActionResult<Wo> execute(EffectivePerson effectivePerson, String id, String path0, String path1, String path2, JsonElement jsonElement) throws Exception {<NEW_LINE>Wo wo = new Wo();<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>String executorSeed = null;<NEW_LINE>try (EntityManagerContainer emc = E... | setId(work.getId()); |
335,416 | private Point parsePoint() {<NEW_LINE>double x = data.getDouble();<NEW_LINE>double y = data.getDouble();<NEW_LINE>double z = Double.NaN;<NEW_LINE>double m = Double.NaN;<NEW_LINE>if (xyzmMode.hasZ()) {<NEW_LINE>z = data.getDouble();<NEW_LINE>}<NEW_LINE>if (xyzmMode.hasM()) {<NEW_LINE>m = data.getDouble();<NEW_LINE>}<NEW... | (0).setZ(z); |
1,351,365 | public void write(org.apache.thrift.protocol.TProtocol oprot, knnQueryBatch_result struct) throws org.apache.thrift.TException {<NEW_LINE>struct.validate();<NEW_LINE>oprot.writeStructBegin(STRUCT_DESC);<NEW_LINE>if (struct.success != null) {<NEW_LINE>oprot.writeFieldBegin(SUCCESS_FIELD_DESC);<NEW_LINE>{<NEW_LINE>oprot.... | struct.err.write(oprot); |
1,137,448 | public static MutableRoaringBitmap remove(MutableRoaringBitmap rb, final long rangeStart, final long rangeEnd) {<NEW_LINE>rangeSanityCheck(rangeStart, rangeEnd);<NEW_LINE>if (rangeStart >= rangeEnd) {<NEW_LINE>// empty range<NEW_LINE>return rb.clone();<NEW_LINE>}<NEW_LINE>final int hbStart = (BufferUtil.highbits(rangeS... | ((char) hbStart, c); |
173,984 | final List<DockerImageSpec> fetchUpdatedSeedSpecs(final JsonNode seedDefinitions, final JsonNode currentSeedSpecs) {<NEW_LINE>final List<String> seedDefinitionsDockerImages = MoreIterators.toList(seedDefinitions.elements()).stream().map(json -> String.format("%s:%s", json.get(DOCKER_REPOSITORY_FIELD).asText(), json.get... | , ConnectorSpecification.class)))); |
168,963 | public CmmnSentryDeclaration handleElement(Sentry element, CmmnHandlerContext context) {<NEW_LINE>String id = element.getId();<NEW_LINE>Collection<OnPart> onParts = element.getOnParts();<NEW_LINE>IfPart ifPart = element.getIfPart();<NEW_LINE>List<CamundaVariableOnPart> variableOnParts = queryExtensionElementsByClass(el... | element, sentryDeclaration, context, variableOnParts); |
1,116,275 | public boolean action(Request request, Response response) {<NEW_LINE>if (request.getNettyRequest() instanceof FullHttpRequest) {<NEW_LINE>JSONObject jsonObject = new JSONObject();<NEW_LINE>jsonObject.put("node", "1");<NEW_LINE>JSONObject cpuObject = new JSONObject();<NEW_LINE>jsonObject.put("cpu", cpuObject);<NEW_LINE>... | result = RestResult.ok(out); |
867,161 | protected Folder newSubFolder(Location location, int index) {<NEW_LINE>switch(location) {<NEW_LINE>case Left:<NEW_LINE>{<NEW_LINE>Element old = children.get(index);<NEW_LINE>Group g = createGroup(old.weight);<NEW_LINE>children.set(index, g);<NEW_LINE>Folder folder = g.newFolder(old.weight);<NEW_LINE><MASK><NEW_LINE>ret... | g.children.add(old); |
889,906 | public void marshall(Branch branch, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (branch == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(branch.getBranchArn(), BRANCHARN_BINDING);<NEW_LINE>protocolMarsha... | branch.getAssociatedResources(), ASSOCIATEDRESOURCES_BINDING); |
1,462,194 | public ExpectedAttributeValue unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AwsJsonReader reader = context.getReader();<NEW_LINE>if (!reader.isContainer()) {<NEW_LINE>reader.skipValue();<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>ExpectedAttributeValue expectedAttributeValue = new ExpectedAttri... | )).unmarshall(context)); |
1,338,594 | public void execute() throws MojoExecutionException, MojoFailureException {<NEW_LINE>Bundlers bundlers = Bundlers.createBundlersInstance();<NEW_LINE>getLog().info("Available bundlers:");<NEW_LINE>getLog().info("-------------------");<NEW_LINE>Map<String, ? super Object> dummyParams = new HashMap<>();<NEW_LINE>bundlers.... | > bundleParameters = bundler.getBundleParameters(); |
789,671 | private void serializeDeltaLinkList(BytesContainer bytes, ORecordLazyList value) {<NEW_LINE>OMultiValueChangeTimeLine<Integer, OIdentifiable> timeline = value.getTransactionTimeLine();<NEW_LINE>assert timeline != null : "Collection timeline required for link* types serialization";<NEW_LINE>OVarIntSerializer.write(bytes... | bytes, event.getValue()); |
1,095,388 | protected final Processor<T> switchRowProcessor(String[] row, T context) {<NEW_LINE>if (columnIndex == -1) {<NEW_LINE>NormalizedString[] headers = NormalizedString.toIdentifierGroupArray(context.headers());<NEW_LINE>if (headers == null) {<NEW_LINE>throw new <MASK><NEW_LINE>}<NEW_LINE>columnIndex = ArgumentUtils.indexOf... | DataProcessingException("Unable to determine position of column named '" + columnName + "' as no headers have been defined nor extracted from the input"); |
56,409 | public SofaTracerSpan clientSend(String operationName) {<NEW_LINE>SofaTraceContext sofaTraceContext = SofaTraceContextHolder.getSofaTraceContext();<NEW_LINE>SofaTracerSpan serverSpan = sofaTraceContext.pop();<NEW_LINE>SofaTracerSpan clientSpan = null;<NEW_LINE>try {<NEW_LINE>clientSpan = (SofaTracerSpan) this.sofaTrace... | currentThread().getName()); |
1,045,289 | static void bitRotateCCW(final int[] src, int srcPos, @SuppressWarnings("SameParameterValue") int srcStep, final byte[] dst, int dstPos, int dstStep) {<NEW_LINE>int idx = srcPos;<NEW_LINE>int lonyb;<NEW_LINE>int hinyb;<NEW_LINE>long lo = 0;<NEW_LINE>long hi = 0;<NEW_LINE>for (int i = 7; i >= 0; i--) {<NEW_LINE>lonyb = ... | lo >> 24) & 0xFF); |
1,435,238 | public AdGroup withAdState(@AdState int state, @IntRange(from = 0) int index) {<NEW_LINE>checkArgument(count == C.LENGTH_UNSET || index < count);<NEW_LINE>@AdState<NEW_LINE>int[] states = copyStatesWithSpaceForAdCount(this.states, index + 1);<NEW_LINE>checkArgument(states[index] == AD_STATE_UNAVAILABLE || states[index]... | this.durationsUs, states.length); |
965,051 | public static InterleavedF32 yuvToInterleavedRgbF32(ByteBuffer bufferY, ByteBuffer bufferU, ByteBuffer bufferV, int width, int height, int strideY, int strideUV, int stridePixelUV, @Nullable InterleavedF32 output, @Nullable GrowArray<DogArray_I8> workArrays) {<NEW_LINE>output = InputSanityCheck.declareOrReshape(output,... | .data[indexOut++] = g; |
480,629 | public static IntDeltaCompressor newInstance(@Nonnull IntList deltaList) {<NEW_LINE>if (deltaList.size() < 0)<NEW_LINE>throw new NegativeArraySizeException("size < 0: " + deltaList.size());<NEW_LINE>int bytesAfterCompression = ByteArrayUtils.countBytesAfterCompression(deltaList);<NEW_LINE>Flags startedDeltaIndex = new ... | value = deltaList.get(i); |
1,748,648 | public Request<RevokeGrantRequest> marshall(RevokeGrantRequest revokeGrantRequest) {<NEW_LINE>if (revokeGrantRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(RevokeGrantRequest)");<NEW_LINE>}<NEW_LINE>Request<RevokeGrantRequest> request = new DefaultRequest<RevokeGrantReq... | setContent(new StringInputStream(snippet)); |
564,684 | public boolean isDropAcceptable(DropTargetDropEvent e, int dt) {<NEW_LINE>// Only accept COPY or MOVE gestures (ie LINK is not supported)<NEW_LINE>if ((e.getDropAction() & DnDConstants.ACTION_COPY_OR_MOVE) == 0) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// Only accept this particular flavor<NEW_LINE>if (!e.isDataFla... | Transferable transferable = e.getTransferable(); |
143,275 | private void loadAddresses(MatchInfo matchInfo) {<NEW_LINE>VTMatch match = matchInfo.getMatch();<NEW_LINE>VTAssociation association = match.getAssociation();<NEW_LINE>Address sourceAddress = association.getSourceAddress();<NEW_LINE>Address destinationAddress = association.getDestinationAddress();<NEW_LINE>int sourceLen... | sourceProgram, destinationProgram, sourceAddressSet, destinationAddressSet); |
1,180,371 | protected void before(XParam param) throws Throwable {<NEW_LINE>// Get intent(s)<NEW_LINE>Intent[] intents = null;<NEW_LINE>switch(mMethod) {<NEW_LINE>case getSystemService:<NEW_LINE>// Do nothing<NEW_LINE>break;<NEW_LINE>case startActivity:<NEW_LINE>case startActivityForResult:<NEW_LINE>case startActivityIfNeeded:<NEW... | restricted = isRestricted(param, mActionName); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.