idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
970,395 | public static boolean changeIsEmpty(GroupChange.Actions change) {<NEW_LINE>return // field 3<NEW_LINE>// field 4<NEW_LINE>change.getAddMembersCount() == 0 && // field 5<NEW_LINE>change.getDeleteMembersCount() == 0 && // field 6<NEW_LINE>change.getModifyMemberRolesCount() == 0 && // field 7<NEW_LINE>change.getModifyMemb... | && change.getDeleteBannedMembersCount() == 0; |
501,084 | public RestoreVMSnapshotCommand createRestoreCommand(UserVmVO userVm, List<VMSnapshotVO> vmSnapshotVOs) {<NEW_LINE>if (!HypervisorType.KVM.equals(userVm.getHypervisorType()))<NEW_LINE>return null;<NEW_LINE>List<VMSnapshotTO> snapshots <MASK><NEW_LINE>Map<Long, VMSnapshotTO> snapshotAndParents = new HashMap<Long, VMSnap... | = new ArrayList<VMSnapshotTO>(); |
996,212 | public EnumerationValue unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>EnumerationValue enumerationValue = new EnumerationValue();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentT... | String currentParentElement = context.getCurrentParentElement(); |
385,984 | final DescribeProcessingJobResult executeDescribeProcessingJob(DescribeProcessingJobRequest describeProcessingJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeProcessingJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | addHandlerContext(HandlerContextKey.SERVICE_ID, "SageMaker"); |
1,236,388 | final UpdatePortfolioShareResult executeUpdatePortfolioShare(UpdatePortfolioShareRequest updatePortfolioShareRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updatePortfolioShareRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | (super.beforeMarshalling(updatePortfolioShareRequest)); |
752,789 | protected PreDeConModel computeLocalModel(DBIDRef id, DoubleDBIDList neighbors, Relation<? extends NumberVector> relation) {<NEW_LINE>final int referenceSetSize = neighbors.size();<NEW_LINE>mvSize.put(referenceSetSize);<NEW_LINE>// Shouldn't happen:<NEW_LINE>if (referenceSetSize < 0) {<NEW_LINE>LOG.warning("Empty refer... | ) - o.doubleValue(d); |
598,222 | public long handle(Emulator<?> emulator) {<NEW_LINE>RegisterContext context = emulator.getContext();<NEW_LINE>UnidbgPointer unicodeChars = context.getPointerArg(1);<NEW_LINE>int <MASK><NEW_LINE>if (unicodeChars == null) {<NEW_LINE>if (len == 0) {<NEW_LINE>return VM.JNI_NULL;<NEW_LINE>}<NEW_LINE>throw new IllegalStateEx... | len = context.getIntArg(2); |
181,053 | public static ClusterTaskMetadataVO convert2ClusterTaskMetadataVO(ClusterTaskDO clusterTaskDO, ClusterDO clusterDO, KafkaFileDO kafkaFileDO) {<NEW_LINE>if (ValidateUtils.isNull(clusterTaskDO)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>ClusterTaskMetadataVO vo = new ClusterTaskMetadataVO();<NEW_LINE>vo.setTaskId(clust... | (clusterTaskDO.getHostList())); |
585,580 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>// create window<NEW_LINE>String stmtTextCreate = namedWindow ? "@name('create') @public create window MyInfraUCS#keepall as select theString as a, longPrimitive as b from SupportBean" : "@name('create') @public c... | , "S3", 8L, -1L); |
332,345 | private static String createIdFieldDeclaration(String idPropertyType, String valueVar) {<NEW_LINE>String idField;<NEW_LINE>if (idPropertyType.startsWith("java.lang.")) {<NEW_LINE>String shortName = idPropertyType.substring(10);<NEW_LINE>idField = shortName + " id = " + createIdFieldInitialization(idPropertyType, valueV... | createIdFieldInitialization(idPropertyType, valueVar) + ";"; |
418,300 | private static ZooKeeperAnnouncer[] createZkAnnouncers(List<Map<String, Object>> d2ServersConfigs) {<NEW_LINE>ZooKeeperAnnouncer[] zkAnnouncers = new ZooKeeperAnnouncer[d2ServersConfigs.size()];<NEW_LINE>for (int i = 0; i < d2ServersConfigs.size(); i++) {<NEW_LINE>Map<String, Object> d2ServerConfig = d2ServersConfigs.g... | >) d2ServerConfig.get("partitionData"); |
1,667,367 | private void generateModuleInits(ClassWriter cw) {<NEW_LINE>MethodVisitor mv = null;<NEW_LINE>int moduleCount = 0;<NEW_LINE>int methodCount = 0;<NEW_LINE>for (Map.Entry<PackageID, String> entry : moduleVarMap.entrySet()) {<NEW_LINE>if (moduleCount % MAX_MODULES_PER_METHOD == 0) {<NEW_LINE>mv = cw.visitMethod(ACC_STATIC... | (packageID.version.value)); |
545,011 | protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {<NEW_LINE>// Reference the data source.<NEW_LINE>final DataSource source = mysqlDataSource;<NEW_LINE>final int count = Common.normalise<MASK><NEW_LINE>final World[] worlds = new World[count];<NEW_LINE>try (Connec... | (req.getParameter(PARAMETER_QUERIES)); |
217,790 | private void configurePorts(Instance instance) {<NEW_LINE>BitWidth dataWid = instance.getAttributeValue(StdAttr.WIDTH);<NEW_LINE>int data = dataWid == null ? 32 : dataWid.getWidth();<NEW_LINE>int shift = 1;<NEW_LINE>while ((1 << shift) < data) shift++;<NEW_LINE>instance.getAttributeSet().setValue(SHIFT_BITS_ATTR, shift... | (S.getter("shifterInputTip")); |
1,610,014 | private static void fieldFromRoot(HeapWalkerNode n, StringBuilder b, int i, int s) {<NEW_LINE>if (i == 0) {<NEW_LINE>b.append(n.getName());<NEW_LINE>// NOI18N<NEW_LINE>b.append(" - ");<NEW_LINE>// NOI18N<NEW_LINE>b.append("value: ");<NEW_LINE>b.append(n.getType());<NEW_LINE>// NOI18N<NEW_LINE>b.append(" ");<NEW_LIN... | append(n.getName()); |
168,249 | public void testOAuthResourceOwnerCreds() throws Exception {<NEW_LINE>final String thisMethod = "testOAuthResourceOwnerCreds";<NEW_LINE>try {<NEW_LINE>sslSetup();<NEW_LINE>Log.info(thisClass, thisMethod, "Begin");<NEW_LINE>firstClientUrl = httpStart + "/" + Constants.OAUTHCLIENT_APP + "/resourceowner.jsp";<NEW_LINE>cli... | info(thisClass, thisMethod, "Exception occurred:"); |
202,121 | public static CurrentPassport parseFromToString(String text) {<NEW_LINE>CurrentPassport passport = null;<NEW_LINE>Pattern ptn = Pattern.compile("CurrentPassport \\{start_ms=\\d+, \\[(.*)\\]\\}");<NEW_LINE>Pattern ptnState = Pattern.compile("^\\+(\\d+)=(.+)$");<NEW_LINE>Matcher <MASK><NEW_LINE>if (m.matches()) {<NEW_LIN... | m = ptn.matcher(text); |
247,302 | private void putMetricData(List<Metric> batch) {<NEW_LINE>METRICS_COUNTER.<MASK><NEW_LINE>final Stopwatch s = PUTS_TIMER.start();<NEW_LINE>try {<NEW_LINE>cloudWatch.putMetricData(createPutRequest(batch));<NEW_LINE>} catch (AmazonServiceException e) {<NEW_LINE>final Tag error = new BasicTag("error", e.getErrorCode());<N... | increment(batch.size()); |
1,297,359 | private static Map<TypeAlias, jnr.ffi.NativeType> buildTypeMap() {<NEW_LINE>Map<TypeAlias, jnr.ffi.NativeType> m = new EnumMap<TypeAlias, jnr.ffi.NativeType>(TypeAlias.class);<NEW_LINE>m.put(TypeAlias.int8_t, NativeType.SCHAR);<NEW_LINE>m.put(TypeAlias.u_int8_t, NativeType.UCHAR);<NEW_LINE>m.put(TypeAlias.int16_t, Nati... | TypeAlias.rlim_t, NativeType.ULONG); |
497,977 | public void addJarsForSourceTarget(WorkspaceLanguageSettings workspaceLanguageSettings, ProjectViewSet projectViewSet, TargetIdeInfo target, Collection<BlazeJarLibrary> jars, Collection<BlazeJarLibrary> genJars) {<NEW_LINE>if (!workspaceLanguageSettings.isLanguageActive(LanguageClass.ANDROID)) {<NEW_LINE>return;<NEW_LI... | LibraryArtifact resourceJar = androidIdeInfo.getResourceJar(); |
1,028,231 | public static void print(SqlFailoverGroup failoverGroup) {<NEW_LINE>StringBuilder builder = new StringBuilder().append("SQL Failover Group: ").append(failoverGroup.id()).append("Name: ").append(failoverGroup.name()).append("\n\tResource group: ").append(failoverGroup.resourceGroupName()).append("\n\tSqlServer Name: ").... | println(builder.toString()); |
339,025 | private void updateBillingData(String reservationId, ContactAndTicketsForm contactAndTicketsForm, PurchaseContext purchaseContext, String country, String vatNr, TicketReservation reservation, PriceContainer.VatStatus vatStatus) {<NEW_LINE>var discount = reservation.getPromoCodeDiscountId() != null ? promoCodeDiscountRe... | subscriptions = subscriptionRepository.findSubscriptionsByReservationId(reservationId); |
674,388 | public static GetUserInstanceResponse unmarshall(GetUserInstanceResponse getUserInstanceResponse, UnmarshallerContext context) {<NEW_LINE>getUserInstanceResponse.setRequestId(context.stringValue("GetUserInstanceResponse.RequestId"));<NEW_LINE>getUserInstanceResponse.setCode(context.integerValue("GetUserInstanceResponse... | ("GetUserInstanceResponse.Data.Detail[" + i + "].TaskType")); |
401,010 | private void raster_color(float[] zbuff, int[] img, int w, int h) {<NEW_LINE>for (int i = 0; i < index.length; i += 3) {<NEW_LINE>int p1 = index[i];<NEW_LINE>int p2 = index[i + 1];<NEW_LINE>int p3 = index[i + 2];<NEW_LINE>VectorUtil.triangleNormal(tvert, <MASK><NEW_LINE>float defuse = VectorUtil.dot(tmpVec, light);<NEW... | p1, p2, p3, tmpVec); |
759,552 | public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = "book.bookId,item.itemId,amount".split(",");<NEW_LINE>String stmtText = "@name('s0') select book.bookId,item.itemId,amount from " + "OrderBean[books]#firstunique(bookId) book, " + "OrderBean[orderdetail.items]#keepall item " + "where book.bookId = ... | "10022", "B001", 5 } }); |
738,057 | private void classHeaderExtendsOrImplements(boolean isInterface, boolean isRecord) {<NEW_LINE>if (this.currentElement != null && this.currentToken == TokenNameIdentifier && this.cursorLocation + 1 >= this.scanner.startPosition && this.cursorLocation < this.scanner.currentPosition) {<NEW_LINE>this.pushIdentifier();<NEW_... | .lastCheckPoint = completionOnKeyword.sourceEnd + 1; |
1,798,491 | private void showProfilingPointsPopup(Component source, int x, int y) {<NEW_LINE>int[] selectedRows = profilingPointsTable.getSelectedRows();<NEW_LINE>if (selectedRows.length == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>boolean singleSelection = selectedRows.length == 1;<NEW_LINE>ProfilingPoint selectedProfilingPoint =... | .setEnabled(singleSelection && !profilingInProgress); |
133,327 | private void readFile() throws IOException {<NEW_LINE>// clear all data first, if file is gone so are all creds<NEW_LINE>credentials.clear();<NEW_LINE>tags.clear();<NEW_LINE>if (!credFile.exists()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try (BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStre... | credentials.put(key, old); |
839,343 | public static ResolvedSwapLeg cashFlowEquivalentIborLeg(ResolvedSwapLeg iborLeg, RatesProvider ratesProvider) {<NEW_LINE>ArgChecker.isTrue(iborLeg.getType().equals(SwapLegType.IBOR), "Leg type should be IBOR");<NEW_LINE>ArgChecker.isTrue(iborLeg.getPaymentEvents().isEmpty(), "PaymentEvent should be empty");<NEW_LINE>Li... | multipliedBy(-ycRatio), paymentDate); |
1,470,488 | public void writeExternal(final ObjectOutput out) throws IOException {<NEW_LINE>final int version = CURRENT_VERSION;<NEW_LINE>LongPacker.packLong(out, version);<NEW_LINE>// hasName?<NEW_LINE>out.writeBoolean(name != null ? true : false);<NEW_LINE>// the name<NEW_LINE>if (name != null) {<NEW_LINE>out.writeUTF(name);<NEW... | writeLong(indexUUID.getLeastSignificantBits()); |
519,096 | final ListMonitoringSchedulesResult executeListMonitoringSchedules(ListMonitoringSchedulesRequest listMonitoringSchedulesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listMonitoringSchedulesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();... | false), new ListMonitoringSchedulesResultJsonUnmarshaller()); |
86,974 | private void load() {<NEW_LINE>TcpProxy tcp = TcpProxy.getTcpProxy(serverId);<NEW_LINE>MapPack pack = null;<NEW_LINE>try {<NEW_LINE>MapPack param = new MapPack();<NEW_LINE>param.put("objHash", objHash);<NEW_LINE>pack = (MapPack) tcp.getSingle(RequestCmd.HOST_NET_STAT, param);<NEW_LINE>} catch (Throwable t) {<NEW_LINE>C... | localAddr = localAddrList.getString(i); |
329,298 | public void marshall(Cluster cluster, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (cluster == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(cluster.getActiveOperationArn(), ACTIVEOPERATIONARN_BINDING);<N... | cluster.getClusterArn(), CLUSTERARN_BINDING); |
898,042 | public RawString unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>RawString rawString = new RawString();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonTok... | class).unmarshall(context)); |
949,521 | public void transferMaster() throws Exception {<NEW_LINE>if (!isServiceStarted()) {<NEW_LINE>throw new Exception("The BDB store StoreService is reboot now!");<NEW_LINE>}<NEW_LINE>if (isMasterNow()) {<NEW_LINE>if (!isPrimaryNodeActive()) {<NEW_LINE>if ((replicas4Transfer != null) && (!replicas4Transfer.isEmpty())) {<NEW... | (replicas4Transfer).toString()); |
1,133,976 | private static final void populateTxAttrFromJEE15Map() {<NEW_LINE>txAttrFromJEE15Map = new TransactionAttribute[6];<NEW_LINE>txAttrFromJEE15Map[javax.ejb.TransactionAttributeType.NOT_SUPPORTED.ordinal()] = TransactionAttribute.TX_NOT_SUPPORTED;<NEW_LINE>txAttrFromJEE15Map[javax.ejb.TransactionAttributeType.SUPPORTS.ord... | ordinal()] = TransactionAttribute.TX_MANDATORY; |
448,914 | public void onSearchExpand() {<NEW_LINE>searching = true;<NEW_LINE>if (switchItem != null) {<NEW_LINE>switchItem.setVisibility(View.GONE);<NEW_LINE>}<NEW_LINE>if (proxyItem != null && proxyItemVisible) {<NEW_LINE>proxyItem.setVisibility(View.GONE);<NEW_LINE>}<NEW_LINE>if (viewPages[0] != null) {<NEW_LINE>if (searchStri... | SizeNotifierFrameLayout) fragmentView).invalidateBlur(); |
1,338,072 | public static InstallException createFailedToDownload(RepositoryResource installResource, Exception e, File toDir) {<NEW_LINE>String target = toDir == null ? System.getProperty("java.io.tmpdir") : toDir.getAbsolutePath();<NEW_LINE>if (e instanceof IOException)<NEW_LINE>return ExceptionUtils.createByKey(InstallException... | RepositoryBackendException) e).getFailingConnection(); |
682,059 | public ModelArchive registerModel(String url, String modelName, Manifest.RuntimeType runtime, String handler, int batchSize, int maxBatchDelay, int responseTimeout, String defaultModelName, String preloadModel) throws ModelException, IOException, InterruptedException, ExecutionException, TimeoutException {<NEW_LINE>Mod... | "Model {} loaded.", model.getModelName()); |
990,593 | private ExecutionResult prepareNetworkElementCommand(IpAssocVpcCommand cmd) {<NEW_LINE>String routerName = cmd.getAccessDetail(NetworkElementCommand.ROUTER_NAME);<NEW_LINE>String routerIp = getRouterSshControlIp(cmd);<NEW_LINE>try {<NEW_LINE>IpAddressTO[<MASK><NEW_LINE>for (IpAddressTO ip : ips) {<NEW_LINE>int ethDevic... | ] ips = cmd.getIpAddresses(); |
274,834 | public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>View root = inflater.inflate(R.layout.component_intro_encryption, container, false);<NEW_LINE>selection = root.findViewById(R.id.introEncryptionSelection);<NEW_LINE>desc = root.findViewById(R.id.introEn... | setText(R.string.intro_slide2_desc_keystore); |
1,660,496 | public void validateCurve(Page endpointOutput, String curve) throws Exception {<NEW_LINE>String thisMethod = "validateCurve";<NEW_LINE>loggingUtils.printMethodName(thisMethod, "Start of");<NEW_LINE>String jwtToken = WebResponseUtils.getResponseText(endpointOutput);<NEW_LINE>Log.info(<MASK><NEW_LINE>JsonObject val = Jso... | thisClass, thisMethod, "response value: " + jwtToken); |
1,743,056 | public CommandLineRunner exampleRunner(CustomerRepository repository) {<NEW_LINE>return (args) -> {<NEW_LINE>repository.deleteAll();<NEW_LINE>// save a couple of customers<NEW_LINE>repository.save(new Customer("Alice", "Smith"));<NEW_LINE>repository.save(new Customer("Bob", "Smith"));<NEW_LINE>// fetch all customers<NE... | System.out.println(customer); |
1,384,380 | final CreateConnectionResult executeCreateConnection(CreateConnectionRequest createConnectionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createConnectionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
740,252 | private boolean decodeBin() {<NEW_LINE>int opcode = RV32imSupport.getOpcode(instruction);<NEW_LINE>if (opcode == LOAD) {<NEW_LINE><MASK><NEW_LINE>immediate = RV32imSupport.getImmediateValue(instruction, RV32imSupport.I_TYPE);<NEW_LINE>base = RV32imSupport.getSourceRegister1Index(instruction);<NEW_LINE>int funct3 = RV32... | destination = RV32imSupport.getDestinationRegisterIndex(instruction); |
1,614,942 | public ProcessContinuation process(@Element Map<String, String> element, RestrictionTracker<OffsetHolder, Map<String, Object>> tracker, OutputReceiver<T> receiver) throws Exception {<NEW_LINE>Map<String, String> configuration = new HashMap<>(element);<NEW_LINE>// Adding the current restriction to the class object to be... | .getDeclaredConstructor().newInstance(); |
1,599,553 | void writeValue(Value v) {<NEW_LINE>if (v == null) {<NEW_LINE>_stream.writeSize(0);<NEW_LINE>} else if (_current != null && _encaps.format == FormatType.SlicedFormat) {<NEW_LINE>if (// Lazy initialization<NEW_LINE>_current.indirectionTable == null) {<NEW_LINE>_current.indirectionTable = new java.util.ArrayList<>();<NEW... | _current.indirectionTable.add(v); |
536,808 | public static QueryIcpApplicationListResponse unmarshall(QueryIcpApplicationListResponse queryIcpApplicationListResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryIcpApplicationListResponse.setRequestId<MASK><NEW_LINE>queryIcpApplicationListResponse.setCurrentPageNum(_ctx.longValue("QueryIcpApplicationListResponse.Cur... | (_ctx.stringValue("QueryIcpApplicationListResponse.RequestId")); |
927,965 | public CaseInstanceMigrationBuilder fromCaseInstanceMigrationDocument(CaseInstanceMigrationDocument caseInstanceMigrationDocument) {<NEW_LINE>this.caseInstanceMigrationDocumentDocumentBuilder.<MASK><NEW_LINE>this.caseInstanceMigrationDocumentDocumentBuilder.setCaseDefinitionToMigrateTo(caseInstanceMigrationDocument.get... | setCaseDefinitionToMigrateTo(caseInstanceMigrationDocument.getMigrateToCaseDefinitionId()); |
486,249 | private void init() {<NEW_LINE>setTitle(_I("winPatternSettings"));<NEW_LINE>setDefaultCloseOperation(DISPOSE_ON_CLOSE);<NEW_LINE>context = sikulixide.getActiveContext();<NEW_LINE>currentPane = context.getPane();<NEW_LINE>imgFile = imgBtn.getFilename();<NEW_LINE>imgName = FilenameUtils.getName(imgFile);<NEW_LINE>_simg =... | = new Point(pOff, pOff); |
268,430 | private IModelTranslation retrieveTrl(final ResultSet rs, final POTrlInfo trlInfo) throws SQLException {<NEW_LINE>final ImmutableMap.Builder<String, String<MASK><NEW_LINE>for (final String columnName : trlInfo.getTranslatedColumnNames()) {<NEW_LINE>final String value = rs.getString(columnName);<NEW_LINE>if (value != nu... | > trlMapBuilder = ImmutableMap.builder(); |
1,572,762 | private void onDownlinkResponse(DownlinkResponseMsg msg) {<NEW_LINE>try {<NEW_LINE>if (msg.getSuccess()) {<NEW_LINE>sessionState.getPendingMsgsMap().remove(msg.getDownlinkMsgId());<NEW_LINE>log.debug("[{}] Msg has been processed successfully! {}", edge.getRoutingKey(), msg);<NEW_LINE>} else {<NEW_LINE>log.error("[{}] M... | "[{}] Pending msgs map is empty. Stopping current iteration", edge.getRoutingKey()); |
948,756 | protected void initChannel(Channel ch) {<NEW_LINE>ChannelPipeline pipeline = ch.pipeline();<NEW_LINE>pipeline.addLast(new LoggingHandler());<NEW_LINE>pipeline.addLast("http-client-codec", new HttpClientCodec());<NEW_LINE>if (gzipEnabled) {<NEW_LINE>pipeline.addLast(encoderEventLoopGroup, "gzip-encoder", new GzipEncoder... | "event-channel-handler", new HttpEventChannelHandler(registry)); |
1,267,741 | protected void doStop() {<NEW_LINE>ExecutorService indicesStopExecutor = Executors.newFixedThreadPool(5, EsExecutors.daemonThreadFactory(settings, "indices_shutdown"));<NEW_LINE>// Copy indices because we modify it asynchronously in the body of the loop<NEW_LINE>final Set<Index> indices = this.indices.values().stream()... | CountDownLatch(indices.size()); |
755,915 | public List<Row> calc(ComContext context) {<NEW_LINE>if (context.getTaskId() != 0) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>List<Double> lossIterInfo = context.getObj("lossIterInfo");<NEW_LINE>int vocSize = ((List<Long>) context.getObj("vocSize")).<MASK><NEW_LINE>int vectorSize = params.get(Word2VecTrainParams.VECTO... | get(0).intValue(); |
1,181,724 | protected void onPostExecute(Void aVoid) {<NEW_LINE>super.onPostExecute(aVoid);<NEW_LINE>tvSensorBMP180Temp.setText(DataFormatter.formatDouble(dataBMP180[0], DataFormatter.HIGH_PRECISION_FORMAT));<NEW_LINE>tvSensorBMP180Altitude.setText(DataFormatter.formatDouble(dataBMP180[1], DataFormatter.HIGH_PRECISION_FORMAT));<NE... | moveViewToX(data.getEntryCount()); |
411,161 | final DBInstance executeRestoreDBInstanceFromS3(RestoreDBInstanceFromS3Request restoreDBInstanceFromS3Request) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(restoreDBInstanceFromS3Request);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NE... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
594,502 | private void login() {<NEW_LINE>InputUtils.hideKeyboard(mEtLogin);<NEW_LINE>final String username = mEtLogin.getText().toString();<NEW_LINE>final String password = mEtPassword.getText().toString();<NEW_LINE>enableInput(false);<NEW_LINE>UiUtils.show(mProgress);<NEW_LINE>mTvLogin.setText("");<NEW_LINE>ThreadPool.getWorke... | OsmOAuth.nativeAuthWithPassword(username, password); |
1,091,667 | final DescribeOrderableDBInstanceOptionsResult executeDescribeOrderableDBInstanceOptions(DescribeOrderableDBInstanceOptionsRequest describeOrderableDBInstanceOptionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeOrderableDBInstanceOptionsRequest);<NEW_LINE>AWSRequestMetrics awsRe... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
147,609 | public FieldAssertionMatcher actualEqualsToExpected(Object actualResult) {<NEW_LINE>boolean areEqual;<NEW_LINE>if (expected != null) {<NEW_LINE>String expectedString = substringBetween((<MASK><NEW_LINE>// Store collection as a java array<NEW_LINE>String[] expectedArray = null;<NEW_LINE>// Check if it's an empty json ar... | String) expected, "[", "]"); |
687,226 | private BaseExpireSnapshotsActionResult deleteFiles(Iterator<Row> expired) {<NEW_LINE>AtomicLong dataFileCount = new AtomicLong(0L);<NEW_LINE>AtomicLong manifestCount = new AtomicLong(0L);<NEW_LINE><MASK><NEW_LINE>Tasks.foreach(expired).retry(3).stopRetryOn(NotFoundException.class).suppressFailureWhenFinished().execute... | AtomicLong manifestListCount = new AtomicLong(0L); |
172,685 | public static // | begin_end_expression<NEW_LINE>boolean max_expression(PsiBuilder b, int l) {<NEW_LINE>if (!recursion_guard_(b, l, "max_expression"))<NEW_LINE>return false;<NEW_LINE>boolean r;<NEW_LINE>Marker m = enter_section_(b, l, _COLLAPSE_, ERL_MAX_EXPRESSION, "<expression>");<NEW_LINE>r = atomic(b, l + 1);<NEW_L... | binary_comprehension(b, l + 1); |
975,976 | public static DescribeSceneDefensePoliciesResponse unmarshall(DescribeSceneDefensePoliciesResponse describeSceneDefensePoliciesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeSceneDefensePoliciesResponse.setRequestId(_ctx.stringValue("DescribeSceneDefensePoliciesResponse.RequestId"));<NEW_LINE>describeSceneDefen... | ("DescribeSceneDefensePoliciesResponse.Policies[" + i + "].ObjectCount")); |
1,519,263 | private void doRelocations(Program prog, BinaryReader reader, DOSHeader dos) {<NEW_LINE>try {<NEW_LINE>Memory mem = prog.getMemory();<NEW_LINE>SegmentedAddressSpace space = (SegmentedAddressSpace) prog.getAddressFactory().getDefaultAddressSpace();<NEW_LINE>int relocationTableOffset = Conv.shortToInt(dos.e_lfarlc());<NE... | .getBytes(value), null); |
1,664,801 | public void optimize(AsyncMethodNode method, AsyncProgramSplitter splitter, boolean friendlyToDebugger) {<NEW_LINE>NonSsaLivenessAnalyzer liveness = new NonSsaLivenessAnalyzer();<NEW_LINE>liveness.analyze(splitter.getOriginalProgram(), method.getReference().getDescriptor());<NEW_LINE>Graph cfg = ProgramUtils.buildContr... | stats, method.getReference()); |
815,766 | private void bind(VideoEntity video) {<NEW_LINE>if (DEBUG) {<NEW_LINE>Log.e(TAG, "bind: " + video);<NEW_LINE>}<NEW_LINE>mVideo = video;<NEW_LINE>if (!video.isRented()) {<NEW_LINE>mCardView.setTitleText(video.getTitle());<NEW_LINE>} else {<NEW_LINE>mCardView.setTitleText(video.getTitle() + RENTED);<NEW_LINE>}<NEW_LINE>i... | video.getStatus() + ")"); |
928,497 | public ListViolationEventsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListViolationEventsResult listViolationEventsResult = new ListViolationEventsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement()... | )).unmarshall(context)); |
1,619,451 | private void loadFrom(ApplicationEntity ae, Attributes attrs) throws NamingException {<NEW_LINE>ae.setDescription(LdapUtils.stringValue(attrs.get("dicomDescription"), null));<NEW_LINE>ae.setVendorData(byteArrays(attrs.get("dicomVendorData")));<NEW_LINE>ae.setApplicationClusters(LdapUtils.stringArray(attrs.get("dicomApp... | get("hl7ApplicationName"), null)); |
940,043 | protected Expression castExpression(AST castNode) {<NEW_LINE><MASK><NEW_LINE>ClassNode type = makeTypeWithArguments(node);<NEW_LINE>assertTypeNotNull(type, node);<NEW_LINE>AST expressionNode = node.getNextSibling();<NEW_LINE>Expression expression = expression(expressionNode);<NEW_LINE>CastExpression castExpression = ne... | AST node = castNode.getFirstChild(); |
309,672 | public Rectangle renderTab(int x, int y, int w, @Nonnull ItemStack stack, @Nullable IWidgetIcon icon, boolean isActive) {<NEW_LINE>int bg_x = isActive ? 0 : 3;<NEW_LINE>int bg_w = w - 3 - bg_x;<NEW_LINE>int l_x = isActive ? 0 : 3;<NEW_LINE>int l_w = w - 3 - l_x;<NEW_LINE>int r_x = 3;<NEW_LINE>int r_w = w - r_x;<NEW_LIN... | = IconEIO.TAB_FRAME_LEFT.width - r_w; |
836,053 | public static void removeInvalidPlugins(ToolTemplate template) {<NEW_LINE>// parse the XML to see what plugins are loaded<NEW_LINE>Element xmlRoot = template.saveToXml();<NEW_LINE>// get out the tool element of the high-level tool<NEW_LINE>Element toolElement = xmlRoot.getChild("TOOL");<NEW_LINE>// the content of the t... | children = toolElement.getChildren("PLUGIN"); |
625,934 | private void commonSupportingFiles() {<NEW_LINE>supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));<NEW_LINE>if (getLibrary().equals(MULTIPLATFORM)) {<NEW_LINE>supportingFiles.add(new SupportingFile("build.gradle.kts.mustache", "", "build.gradle.kts"));<NEW_LINE>supportingFiles.add(new Supporti... | ("manifest.mustache", "", "src/main/AndroidManifest.xml")); |
997,091 | private void writeBinding(JndiBinding binding) throws IOException {<NEW_LINE>write("<td>");<NEW_LINE>final <MASK><NEW_LINE>final String className = binding.getClassName();<NEW_LINE>final String contextPath = binding.getContextPath();<NEW_LINE>final String value = binding.getValue();<NEW_LINE>if (contextPath != null) {<... | String name = binding.getName(); |
1,231,855 | public boolean offer(final T e) {<NEW_LINE>if (null == e) {<NEW_LINE>throw new NullPointerException("Null is not a valid element");<NEW_LINE>}<NEW_LINE>// local load of field to avoid repeated loads after volatile reads<NEW_LINE><MASK><NEW_LINE>final long index = lpProducerIndex();<NEW_LINE>final int mask = producerMas... | final AtomicReferenceArray<Object> buffer = producerBuffer; |
1,047,889 | public void marshall(AwsCertificateManagerCertificateDetails awsCertificateManagerCertificateDetails, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (awsCertificateManagerCertificateDetails == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_... | awsCertificateManagerCertificateDetails.getNotBefore(), NOTBEFORE_BINDING); |
260,462 | private void startLayoutThread() {<NEW_LINE>new Thread() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>messageOverlay.setMessage("Computing axis similarities and layout...");<NEW_LINE>if (shared.settings.sim != null && shared.settings.layout instanceof SimilarityBasedLayouter3DPC) {<NEW_LINE>fina... | (SimilarityBasedLayouter3DPC) shared.settings.layout; |
516,110 | private void createArchimateElementGroups() {<NEW_LINE>// Clear cache<NEW_LINE>fEntries.clear();<NEW_LINE>createArchimateElementGroup(Messages.ArchimateDiagramEditorPalette_17, ArchimateModelUtils.getOtherClasses());<NEW_LINE>createArchimateElementGroup(Messages.ArchimateDiagramEditorPalette_16, ArchimateModelUtils.get... | ArchimateDiagramEditorPalette_9, ArchimateModelUtils.getApplicationClasses()); |
346,931 | private void initView(Context context, AttributeSet attrs) {<NEW_LINE>ViewGroup view = (ViewGroup) inflate(context, R.layout.wppref_view, this);<NEW_LINE>ViewGroup container = view.findViewById(R.id.container);<NEW_LINE>mHeadingTextView = view.findViewById(R.id.text_heading);<NEW_LINE>mTitleTextView = view.findViewById... | R.styleable.wpPrefView_wpPrefType, 0); |
1,183,031 | private static void removeDoublicatePoints(List<Point2D.Float> points) {<NEW_LINE>boolean rerun;<NEW_LINE>do {<NEW_LINE>rerun = false;<NEW_LINE>for (int i = 0; i < points.size() - 1; i++) {<NEW_LINE>Point2D.Float p1 = points.get(i);<NEW_LINE>Point2D.Float p2 = points.get(i + 1);<NEW_LINE>if (isPointEqual(p1, p2)) {<NEW... | points.get(i + 2); |
1,594,710 | public void onRegister(CompileScope scope) {<NEW_LINE>registerWrapperClass(scope, Session.class, PWebSocketSession.class);<NEW_LINE>registerWrapperClass(scope, Part.class, PHttpPart.class);<NEW_LINE>MemoryOperation.registerWrapper(WebSocketSession.class, PWebSocketSession.class);<NEW_LINE>registerClass(scope, PHttpServ... | registerClass(scope, PHttpRouteFilter.class); |
549,047 | public void run(CompilationController cc) throws Exception {<NEW_LINE>String className = new BeanClassFinder(SpringXMLConfigEditorUtils.getTagAttributes(context.getTag()), context.getFileObject()).findImplementationClass(true);<NEW_LINE>if (className == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>TypeElement te = Java... | ElementUtilities eu = cc.getElementUtilities(); |
1,371,859 | public BatchGetVariableResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>BatchGetVariableResult batchGetVariableResult = new BatchGetVariableResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>i... | )).unmarshall(context)); |
1,685,465 | public ExportJobRequest unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE><MASK><NEW_LINE>if (!reader.isContainer()) {<NEW_LINE>reader.skipValue();<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>ExportJobRequest exportJobRequest = new ExportJobRequest();<NEW_LINE>reader.beginObject();<NEW_LINE>while (r... | AwsJsonReader reader = context.getReader(); |
874,701 | protected GradleVersion determineGradleVersionFromDistribution(File distributionHomeDir) throws Exception {<NEW_LINE>List<File> checkedJarFiles = new ArrayList<File>();<NEW_LINE>for (Map.Entry<String, Pattern> entry : JAR_FILE_PATTERNS_BY_PREFIX.entrySet()) {<NEW_LINE>List<File> jarFiles = listFiles(new File(distributi... | (entry.getValue())); |
420,921 | final DeletePipelineResult executeDeletePipeline(DeletePipelineRequest deletePipelineRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deletePipelineRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | invoke(request, responseHandler, executionContext); |
49,841 | public static LedgerMetadataBuilder from(LedgerMetadata other) {<NEW_LINE>LedgerMetadataBuilder builder = new LedgerMetadataBuilder();<NEW_LINE>builder.ledgerId = other.getLedgerId();<NEW_LINE>builder.metadataFormatVersion = other.getMetadataFormatVersion();<NEW_LINE>builder.ensembleSize = other.getEnsembleSize();<NEW_... | copyOf(other.getCustomMetadata()); |
1,169,977 | public GetResult merge(List<PartitionGetResult> partResults) {<NEW_LINE>long startTs = System.currentTimeMillis();<NEW_LINE>RowType rowType = PSAgentContext.get().getMatrixMetaManager().getMatrixMeta(param.<MASK><NEW_LINE>GetRowResult result;<NEW_LINE>switch(rowType) {<NEW_LINE>case T_DOUBLE_DENSE:<NEW_LINE>case T_DOUB... | getMatrixId()).getRowType(); |
565,852 | final ModifyAquaConfigurationResult executeModifyAquaConfiguration(ModifyAquaConfigurationRequest modifyAquaConfigurationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(modifyAquaConfigurationRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LIN... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
43,618 | private void initAcl() {<NEW_LINE>this.<MASK><NEW_LINE>if (this.toggleAclSettings(false)) {<NEW_LINE>final AclPermission feature = session.getFeature(AclPermission.class);<NEW_LINE>aclAddButton.removeAllItems();<NEW_LINE>this.aclAddButton.addItemWithTitle(StringUtils.EMPTY);<NEW_LINE>this.aclAddButton.lastItem().setIma... | setAcl(Collections.emptyList()); |
1,363,065 | public byte[] encrypt(byte[] nonce, byte[] message) {<NEW_LINE>checkLength(nonce, XSALSA20_POLY1305_SECRETBOX_NONCEBYTES);<NEW_LINE>byte[] msg = org.libsodium.jni.crypto.Util.prependZeros(ZERO_BYTES, message);<NEW_LINE>byte[] ct = org.libsodium.jni.crypto.Util.zeros(msg.length);<NEW_LINE>isValid(sodium().crypto_secretb... | nonce.length, cipherWithoutNonce.length); |
28,500 | public BranchCommitResponseProto convert2Proto(BranchCommitResponse branchCommitResponse) {<NEW_LINE>final short typeCode = branchCommitResponse.getTypeCode();<NEW_LINE>final AbstractMessageProto abstractMessage = AbstractMessageProto.newBuilder().setMessageType(MessageTypeProto.forNumber(typeCode)).build();<NEW_LINE>f... | ())).build(); |
1,391,032 | public static void launchBrowser(String url) throws IOException {<NEW_LINE>try {<NEW_LINE>if (isMac()) {<NEW_LINE>Class<?> macUtils = Class.forName("com.apple.mrj.MRJFileUtils");<NEW_LINE>Method openURL = macUtils.getDeclaredMethod("openURL", String.class);<NEW_LINE>openURL.invoke(null, url);<NEW_LINE>} else if (isWind... | [] { browser, url }); |
993,250 | public DescribeTagOptionResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeTagOptionResult describeTagOptionResult = new DescribeTagOptionResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<... | int originalDepth = context.getCurrentDepth(); |
586,973 | private void processLeave(BigDecimal attendanceHours) {<NEW_LINE>scriptCtx.remove("_LeaveDurationInMillis");<NEW_LINE>scriptCtx.remove("_LeaveHours");<NEW_LINE>scriptCtx.remove("_LeaveMinutes");<NEW_LINE>scriptCtx.remove("_AttendanceDurationInMillis");<NEW_LINE>scriptCtx.remove("_AttendanceHours");<NEW_LINE>scriptCtx.r... | * (1000 * 60 * 60); |
701,194 | public void restoreNodes(RestoreDeletedNodesRequest body, String xSdsAuthToken) 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 res... | HashMap<String, String>(); |
1,755,977 | public static String replaceAllMappings(String text, Map<Object, Object> mappings, MappingOrder order) {<NEW_LINE>// Iterate over all the mappings<NEW_LINE>Iterator<Map.Entry<Object, Object>> it = mappings.entrySet().iterator();<NEW_LINE>// Construct a new map for <String, String> mappings in order to support<NEW_LINE>... | applyMappings(text, stringMappings, keys); |
1,316,566 | private void populateAgentDisplayTable() throws Exception {<NEW_LINE>dropTableIfExists("agent_display");<NEW_LINE>session.createTableWithLCS("create table if not exists agent_display (agent_rollup_id" + " varchar, display varchar, primary key (agent_rollup_id))");<NEW_LINE>PreparedStatement insertPS = session.prepare("... | agentRollupId = row.getString(0); |
1,394,299 | private void parseRecord(StringBuilder builder) throws ParseException {<NEW_LINE>int i = builder.indexOf(Document.DOCNO);<NEW_LINE>if (i == -1)<NEW_LINE>throw new ParseException("cannot find start tag " + Document.DOCNO, 0);<NEW_LINE>if (i != 0)<NEW_LINE>throw new ParseException("should start with " + Document.DOCNO, 0... | length()).trim(); |
1,500,098 | private Number readNumber() throws IOException {<NEW_LINE>StringBuffer sb = new StringBuffer();<NEW_LINE>int l = lineNo;<NEW_LINE>int c = colNo;<NEW_LINE>while (isDigitChar(lastChar)) {<NEW_LINE>sb.append((char) lastChar);<NEW_LINE>readChar();<NEW_LINE>}<NEW_LINE>// convert it!<NEW_LINE>String string = sb.toString();<N... | .substring(1), 8); |
984,241 | private void loadPictureOfTheDay(Context context, RemoteViews views, AppWidgetManager appWidgetManager, int appWidgetId) {<NEW_LINE>compositeDisposable.add(mediaClient.getPictureOfTheDay().subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(response -> {<NEW_LINE>if (response != null) {<NEW... | R.id.appwidget_image, pendingIntent); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.