idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,445,906 | public ListRegexMatchSetsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListRegexMatchSetsResult listRegexMatchSetsResult = new ListRegexMatchSetsResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth +... | int originalDepth = context.getCurrentDepth(); |
800,437 | private String toStringSlow() {<NEW_LINE>// Prepare all properties required for building a String, so that we don't have a chance of<NEW_LINE>// building one String with a thread-local StringBuilder while building another String with<NEW_LINE>// the same StringBuilder. See TemporaryThreadLocals for more information.<NE... | = sessionProtocol().uriText(); |
1,355,517 | protected RepositoryModel createRepository(UserModel user, String repository, String action) {<NEW_LINE>boolean isPush = !StringUtils.isEmpty(action) && GIT_RECEIVE_PACK.equals(action);<NEW_LINE>if (GIT_LFS.equals(action)) {<NEW_LINE>// Repository must already exist for any filestore actions<NEW_LINE>return null;<NEW_L... | , model.name), e); |
897,147 | public void findDevice_bootloader() {<NEW_LINE>Log.d(QtApplication.QtTAG, "findDevice_bootloader");<NEW_LINE>// ???<NEW_LINE>PendingIntent mPermissionIntent = PendingIntent.getBroadcast(this, 0, <MASK><NEW_LINE>// Handle to system USB service?<NEW_LINE>UsbManager manager = (UsbManager) getSystemService(Context.USB_SERV... | new Intent(ACTION_USB_PERMISSION), 0); |
358,168 | public static void rotateCCW(GrayF32 image) {<NEW_LINE>if (image.width != image.height)<NEW_LINE>throw new IllegalArgumentException("Image must be square");<NEW_LINE>int w = image.height / 2 + image.height % 2;<NEW_LINE>int h = image.height / 2;<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, h, y0->{<NEW_LINE>... | + y1 * image.stride + x1; |
449,051 | public static GetNodeGroupResponse unmarshall(GetNodeGroupResponse getNodeGroupResponse, UnmarshallerContext _ctx) {<NEW_LINE>getNodeGroupResponse.setRequestId(_ctx.stringValue("GetNodeGroupResponse.RequestId"));<NEW_LINE>getNodeGroupResponse.setSuccess(_ctx.booleanValue("GetNodeGroupResponse.Success"));<NEW_LINE>Data ... | (_ctx.stringValue("GetNodeGroupResponse.Data.ClassMode")); |
319,002 | public static ListWorkFlowTemplatesResponse unmarshall(ListWorkFlowTemplatesResponse listWorkFlowTemplatesResponse, UnmarshallerContext _ctx) {<NEW_LINE>listWorkFlowTemplatesResponse.setRequestId(_ctx.stringValue("ListWorkFlowTemplatesResponse.RequestId"));<NEW_LINE>listWorkFlowTemplatesResponse.setErrorCode(_ctx.strin... | ("ListWorkFlowTemplatesResponse.WorkFlowTemplates[" + i + "].CreateUserId")); |
1,386,931 | public SSLContext forDirectory(String directory) {<NEW_LINE>try {<NEW_LINE>Path keyPath = Paths.get(directory, "key.pem");<NEW_LINE>Path certPath = Paths.get(directory, "cert.pem");<NEW_LINE>Path caPath = Paths.get(directory, "ca.pem");<NEW_LINE>Path caKeyPath = Paths.get(directory, "ca-key.pem");<NEW_LINE>verifyCertif... | trustManagerFactory = getTrustManagerFactory(caPath, caKeyPath); |
1,268,044 | public Future<Void> startAsync() {<NEW_LINE>log.info("Session store / pubsub factory used: {}", configCopy.getStoreFactory());<NEW_LINE>initGroups();<NEW_LINE>pipelineFactory.start(configCopy, namespacesHub);<NEW_LINE>Class<? extends ServerChannel> channelClass = NioServerSocketChannel.class;<NEW_LINE>if (configCopy.is... | InetSocketAddress(configCopy.getPort()); |
1,014,630 | private void forwardResults(BatchIterator<Row> it, boolean isLast) {<NEW_LINE>multiBucketBuilder.build(buckets);<NEW_LINE>AtomicInteger numActiveRequests = new AtomicInteger(downstreams.size());<NEW_LINE>for (int i = 0; i < downstreams.size(); i++) {<NEW_LINE>Downstream downstream = downstreams.get(i);<NEW_LINE>if (dow... | targetPhaseId, inputId, bucketIdx, isLast); |
1,684,439 | public void loadExtensions(ExtensionLoader loader) {<NEW_LINE>logger.info("ReindexPlugin reloadSPI called");<NEW_LINE>Iterable<RemoteReindexExtension> iterable = loader.loadExtensions(RemoteReindexExtension.class);<NEW_LINE>List<RemoteReindexExtension> remoteReindexExtensionList = new ArrayList<>();<NEW_LINE>iterable.f... | (remoteReindexExtensionList.get(0)); |
1,653,299 | private ImmutableMessageData addReaction(ImmutableMessageData message, MessageReactionAdd dispatch) {<NEW_LINE>boolean me = dispatch.userId().asLong() == selfUser.get().id().asLong();<NEW_LINE>List<ReactionData> reactions = message.reactions().toOptional().orElse(Collections.emptyList());<NEW_LINE>if (reactions.stream(... | Collectors.toList()))); |
89,552 | public long lastModified() {<NEW_LINE>switch(mode) {<NEW_LINE>case SFTP:<NEW_LINE>final Long returnValue = SshClientUtils.execute(new SFtpClientTemplate<Long>(path) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Long execute(@NonNull SFTPClient client) throws IOException {<NEW_LINE>return client.mtime(SshClientUtils.ex... | "Error getting last modified time for SMB [" + path + "]", e); |
1,448,316 | final UpdateDocumentResult executeUpdateDocument(UpdateDocumentRequest updateDocumentRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateDocumentRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
1,236,561 | private void initView() {<NEW_LINE>HomeTitleBar titleBar = findViewById(R.id.title_bar);<NEW_LINE><MASK><NEW_LINE>titleBar.setListener(new HomeTitleBar.OnTitleBarClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onRightClick() {<NEW_LINE>getActivity().finish();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>mSettin... | titleBar.setTitle(getTitle()); |
1,652,026 | Reporter<Span> reporter(ReporterMetrics reporterMetrics, ZipkinProperties zipkin, @Qualifier(SENDER_BEAN_NAME) Sender sender) {<NEW_LINE>CheckResult checkResult = checkResult(zipkinExecutor, sender, 1_000L);<NEW_LINE>logCheckResult(sender, checkResult);<NEW_LINE>// historical constraint. Note: AsyncReporter supports me... | build(zipkin.getEncoder()); |
854,224 | public static <N extends ImageBase, D extends ImageBase<D>> void divide(N imgA, D imgB, N output) {<NEW_LINE>if (imgA instanceof ImageGray && imgB instanceof ImageGray) {<NEW_LINE>if (GrayF32.class == imgA.getClass()) {<NEW_LINE>PixelMath.divide((GrayF32) imgA, (GrayF32) imgB, (GrayF32) output);<NEW_LINE>} else if (Gra... | ) out.getBand(i)); |
1,721,021 | public void sendAReaction() {<NEW_LINE>ChannelClient channelClient = client.channel("messaging", "general");<NEW_LINE>// Add reaction 'like' with a custom field<NEW_LINE>Reaction reaction = new Reaction();<NEW_LINE>reaction.setMessageId("message-id");<NEW_LINE>reaction.setType("like");<NEW_LINE>reaction.setScore(1);<NE... | ).put("customField", 1); |
1,261,064 | public void applyCamera(GL2 gl) {<NEW_LINE>// Setup projection.<NEW_LINE>gl.glMatrixMode(GL2.GL_PROJECTION);<NEW_LINE>gl.glLoadIdentity();<NEW_LINE>// fov,<NEW_LINE>// fov,<NEW_LINE>glu.// fov,<NEW_LINE>gluPerspective(// ratio<NEW_LINE>45f, // near, far clipping<NEW_LINE>width / (float) height, // near, far clipping<NE... | Math.cos(theta) * 2.f; |
1,109,858 | public void onGetLatestJobDiscoveryInfo(GetLatestJobDiscoveryInfoRequest r) {<NEW_LINE>LOGGER.trace("Entering onGetLatestJobDiscoveryInfo {}", r);<NEW_LINE>ActorRef sender = getSender();<NEW_LINE>if (r.getJobCluster().equals(this.jobId.getCluster())) {<NEW_LINE>JobSchedulingInfo schedulingInfo = workerManager.getJobSta... | LOGGER.info("discoveryInfo from BehaviorSubject is null {}", jobId); |
1,493,646 | public static List<TrojanConfig> readTrojanServerConfigList(String trojanConfigListPath) {<NEW_LINE>File file = new File(trojanConfigListPath);<NEW_LINE>if (!file.exists()) {<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<NEW_LINE>try (InputStream fis = new FileInputStream(file)) {<NEW_LINE>byte[] data = new byte[... | int) file.length()]; |
452,359 | private static List<Token> tokenize(String string, char delimiter) {<NEW_LINE>final List<Token> tokens = new ArrayList<>();<NEW_LINE>final StringBuilder builder = new StringBuilder();<NEW_LINE>for (int cursor = 0; cursor < string.length(); ) {<NEW_LINE>final char c = string.charAt(cursor);<NEW_LINE>int nextChar = curso... | .toString(), cursor)); |
830,773 | public void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception {<NEW_LINE>if (args.length < 1) {<NEW_LINE>throw new NotEnoughArgumentsException();<NEW_LINE>}<NEW_LINE>String message = getFinalArg(args, 0);<NEW_LINE>final IMessageRecipient messageSender;... | message = FormatUtil.replaceFormat(message); |
931,508 | void applyAll(int y0, int y1, GrayU8 mask) {<NEW_LINE>init();<NEW_LINE>float maxWidth = srcImg.getWidth() - 1;<NEW_LINE>float maxHeight = srcImg.getHeight() - 1;<NEW_LINE>for (int y = y0; y < y1; y++) {<NEW_LINE>int indexDst = dstImg.startIndex + dstImg.stride * y + x0;<NEW_LINE>int indexMsk = mask.startIndex + mask.st... | .x, s.y)); |
1,757,531 | private void installDevices(int platformIndex, TornadoPlatform platform, final OptionValues options, final HotSpotJVMCIRuntime vmRuntime, TornadoVMConfig vmConfig) {<NEW_LINE>info("OpenCL[%d]: Platform %s", platformIndex, platform.getName());<NEW_LINE>final OCLExecutionEnvironment context = platform.createContext();<NE... | devices().get(deviceIndex); |
91,529 | private SimpleStatement buildDynamicStatementHitCount(EventQueryDefinition query) {<NEW_LINE>// Default settings<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append("SELECT * FROM " + AUDIT_HITCOUNT_TABLE);<NEW_LINE>sb.append(" WHERE (" + AUDIT_ATT_TIME + "> ?) ");<NEW_LINE>sb.append(" AND (" + AUDIT_... | append(" AND (" + AUDIT_ATT_ACTION + " IN ?)"); |
1,044,065 | private static void tryAssertionStreamInsertWWidenMap(RegressionEnvironment env, EventRepresentationChoice rep) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String schemaSrc = rep.getAnnotationTextWJsonProvided(MyLocalJsonProvidedSrc.class) + "@name('schema') @public @buseventtype create schema Src a... | [] { 123, "abc" }); |
1,643,737 | private okhttp3.Call replaceNamespacedCronJobValidateBeforeCall(String name, String namespace, V1beta1CronJob body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException {<NEW_LINE>// verify the required parameter 'name' is set<NEW_LINE>if (name == n... | dryRun, fieldManager, fieldValidation, _callback); |
38,364 | synchronized public void writeMetadata(@NonNull BackupFiles.BackupFile backupFile) throws IOException {<NEW_LINE>if (metadata == null) {<NEW_LINE>throw new RuntimeException("Metadata not set for path " + backupFile.getBackupPath());<NEW_LINE>}<NEW_LINE>Path metadataFile = backupFile.getMetadataFile();<NEW_LINE>try (Out... | " for path " + backupFile.getBackupPath()); |
996,063 | public void onMatch(RelOptRuleCall call) {<NEW_LINE>ExecutionContext ec = PlannerContext.getPlannerContext(call).getExecutionContext();<NEW_LINE>final LogicalInsert origin = call.rel(0);<NEW_LINE>final PlannerContext context = call.getPlanner().getContext().unwrap(PlannerContext.class);<NEW_LINE>final ExecutionStrategy... | handleInsert(origin, context, ec); |
699,961 | public synchronized void writeVideoBuffer(ByteBuffer encodedVideoFrame, long dts, int frameRotation, int streamIndex, boolean isKeyFrame, long firstFrameTimeStamp, long pts) {<NEW_LINE>if (!isRunning.get()) {<NEW_LINE>logPacketIssue("Not writing VideoBuffer for {} because Is running:{}", streamId, isRunning.get());<NEW... | data(new BytePointer(encodedVideoFrame)); |
1,092,807 | public static Map<Integer, BitSet> buildEquitySet(List<RexNode> andFilters) {<NEW_LINE>Map<Integer, BitSet> equalitySet = new HashMap<>();<NEW_LINE>for (RexNode filter : andFilters) {<NEW_LINE>if (SqlKind.EQUALS.equals(filter.getKind()) && filter instanceof RexCall) {<NEW_LINE>RexCall filterCall = (RexCall) filter;<NEW... | RexInputRef) rightRexNode).getIndex(); |
1,272,972 | private void updateGUI() {<NEW_LINE>var viewer = qupath.getViewer();<NEW_LINE>var imageData = viewer.getImageData();<NEW_LINE>if (imageData == null) {<NEW_LINE>transforms.getItems().clear();<NEW_LINE>transforms.setDisable(true);<NEW_LINE>spinner.setDisable(true);<NEW_LINE>sigmaSpinner.setDisable(true);<NEW_LINE>return;... | getItems().setAll(newResolutions); |
851,472 | private void generateBinary(WasmIntBinaryOperation intOp, WasmFloatBinaryOperation floatOp, BinaryExpr expr) {<NEW_LINE>accept(expr.getFirstOperand());<NEW_LINE>WasmExpression first = result;<NEW_LINE>accept(expr.getSecondOperand());<NEW_LINE>WasmExpression second = result;<NEW_LINE>if (expr.getType() == null) {<NEW_LI... | FLOAT64, floatOp, first, second); |
1,306,748 | private void processCustomRoles(String parent, boolean isOrgLevel) throws Exception {<NEW_LINE>logger.atInfo().log("Processing custom roles: " + parent);<NEW_LINE>Set<Role> customRole = null;<NEW_LINE>try {<NEW_LINE>if (isOrgLevel) {<NEW_LINE>customRole = iamClient.fetchCustomRolesOrgLevel(parent);<NEW_LINE>} else {<NE... | ).log("Exception while feching custom roles: " + parent); |
696,143 | public void createOrUpdateDraftBy(Integer postId, String content, String originalContent) {<NEW_LINE>Assert.notNull(postId, "The postId must not be null.");<NEW_LINE>// First, we need to save the contentPatchLog<NEW_LINE>ContentPatchLog contentPatchLog = contentPatchLogService.<MASK><NEW_LINE>// then update the value o... | createOrUpdate(postId, content, originalContent); |
381,388 | final ResumeSessionResult executeResumeSession(ResumeSessionRequest resumeSessionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(resumeSessionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
1,763,346 | protected void update(ManaPoolView pool) {<NEW_LINE>for (Map.Entry<JLabel, ManaType> mana : manaLabels.entrySet()) {<NEW_LINE>String category = mana.getValue().toString() + " mana";<NEW_LINE>switch(mana.getValue()) {<NEW_LINE>case BLACK:<NEW_LINE>setTextForLabel(category, mana.getKey(), manaButtons.get(mana.getKey()), ... | getRed(), false, activeValueColor); |
663,534 | public synchronized void fill(InputStream in) throws IOException {<NEW_LINE>if (readOnly) {<NEW_LINE>throw new UnsupportedOperationException("Read-only buffer");<NEW_LINE>}<NEW_LINE>byte[<MASK><NEW_LINE>int index = 0;<NEW_LINE>int offset = 0;<NEW_LINE>int length = size;<NEW_LINE>int readSpace = dataSpace;<NEW_LINE>if (... | ] data = new byte[dataSpace]; |
1,611,653 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<NEW_LINE>Query post = RemoteAccess.evaluate(request);<NEW_LINE>boolean localhost = post.isLocalhostAccess();<NEW_LINE>String callback = post.get("callback", "");<NEW_LINE>boolean jsonp = callback != nul... | JSONObject json = new JSONObject(true); |
470,695 | private void cacheEviction(EntityRelation relation, Cache cache) {<NEW_LINE>List<Object> fromToTypeAndTypeGroup = new ArrayList<>();<NEW_LINE>fromToTypeAndTypeGroup.add(relation.getFrom());<NEW_LINE>fromToTypeAndTypeGroup.add(relation.getTo());<NEW_LINE>fromToTypeAndTypeGroup.add(relation.getType());<NEW_LINE>fromToTyp... | add(relation.getTypeGroup()); |
1,078,051 | public boolean importData(JComponent comp, Transferable t) {<NEW_LINE>Map<String, String> _copiedImgs = getCopiedImgs();<NEW_LINE>DataFlavor htmlFlavor = DataFlavor.stringFlavor;<NEW_LINE>if (canImport(comp, t.getTransferDataFlavors())) {<NEW_LINE>String transferString = null;<NEW_LINE>String msg = "";<NEW_LINE>try {<N... | String imgPath = entry.getValue(); |
965,799 | static boolean insert_door_ok(ExpansionRoom p_room_1, ExpansionRoom p_room_2, TileShape p_door_shape) {<NEW_LINE>if (p_room_1.door_exists(p_room_2)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (p_room_1 instanceof ObstacleExpansionRoom && p_room_2 instanceof ObstacleExpansionRoom) {<NEW_LINE>Item first_item = ((<MA... | ObstacleExpansionRoom) p_room_1).get_item(); |
975,040 | public Item[] split(final LocalDate splitDate) {<NEW_LINE>// Relax this pre-condition to allow splitting from 'merge' phase as well.<NEW_LINE>// Preconditions.checkState(action == ItemAction.ADD);<NEW_LINE>Preconditions.checkState(currentRepairedAmount.compareTo(BigDecimal.ZERO) == 0);<NEW_LINE>Preconditions.checkState... | (BigDecimal.ZERO) == 0); |
116,640 | public ListMeshesResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListMeshesResult listMeshesResult = new ListMeshesResult();<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(); |
368,631 | public synchronized void indexMainMap(File f, long dateCreated) {<NEW_LINE>String nm = Algorithms.getFileNameWithoutExtension(f).toLowerCase();<NEW_LINE>RegionUpdateFiles regionUpdateFiles = regions.get(nm);<NEW_LINE>if (regionUpdateFiles == null) {<NEW_LINE>regionUpdateFiles = new RegionUpdateFiles(nm);<NEW_LINE>regio... | .dayUpdates.get(month)); |
334,295 | public synchronized void open() throws IOException {<NEW_LINE>HugeConfig config = this.config();<NEW_LINE>String hosts = config.get(HbaseOptions.HBASE_HOSTS);<NEW_LINE>int port = config.get(HbaseOptions.HBASE_PORT);<NEW_LINE>String znodeParent = config.get(HbaseOptions.HBASE_ZNODE_PARENT);<NEW_LINE>boolean isEnableKerb... | System.setProperty("java.security.krb5.conf", krb5Conf); |
338,356 | public void marshall(PoolInformation poolInformation, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (poolInformation == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(poolInformation.getPoolArn(), POOLARN_B... | poolInformation.getSharedRoutesEnabled(), SHAREDROUTESENABLED_BINDING); |
899,284 | private void handleResourceRequest(Request request, Response response) throws IOException {<NEW_LINE>String resourcePath = RESOURCE_PACKAGE + request.getRequestURI();<NEW_LINE>ClassLoader loader = RestMonitoringAdapter.class.getClassLoader();<NEW_LINE>try (InputStream inputStream = loader.getResourceAsStream(resourcePa... | ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(512); |
1,082,598 | protected void initModel() {<NEW_LINE>title = currentPage.getTitle();<NEW_LINE>description = currentPage.getDescription();<NEW_LINE>if (StringUtils.isBlank(title)) {<NEW_LINE>title = currentPage.getName();<NEW_LINE>}<NEW_LINE>Tag[] tags = currentPage.getTags();<NEW_LINE>keywords = new String[tags.length];<NEW_LINE>int ... | (currentPage.getLanguage(false)); |
601,751 | public String sayHello(String vote, int expectedDirection) {<NEW_LINE>if (expectedDirection < 0) {<NEW_LINE>return "Hello, this is HelloImplTwowayService";<NEW_LINE>} else {<NEW_LINE>boolean result = false;<NEW_LINE>try {<NEW_LINE>if (vote.endsWith("clear")) {<NEW_LINE>XAResourceImpl.clear();<NEW_LINE>}<NEW_LINE>final ... | ).setPrepareAction(XAException.XA_RBROLLBACK); |
1,314,399 | private void addClassifiedManagedDependencies(Node dependencyManagement) {<NEW_LINE>Node dependencies = findChild(dependencyManagement, "dependencies");<NEW_LINE>if (dependencies != null) {<NEW_LINE>for (Node dependency : findChildren(dependencies, "dependency")) {<NEW_LINE>String groupId = findChild(dependency, "group... | collect(Collectors.toSet()); |
649,298 | public static void main(String[] args) throws Exception {<NEW_LINE>EventLoopGroup bossGroup = new NioEventLoopGroup(1);<NEW_LINE>EventLoopGroup workerGroup = new NioEventLoopGroup();<NEW_LINE>try {<NEW_LINE>ServerBootstrap b = new ServerBootstrap();<NEW_LINE><MASK><NEW_LINE>b.option(ChannelOption.SO_BACKLOG, 1024);<NEW... | b.group(bossGroup, workerGroup); |
873,965 | private static Node deserializeHeader(DataInput dataInput) throws IOException {<NEW_LINE>int nodeTypeOrdinal = dataInput.readByte();<NEW_LINE>short count = Short.reverseBytes(dataInput.readShort());<NEW_LINE>byte prefixLength = dataInput.readByte();<NEW_LINE>byte[] prefix = new byte[0];<NEW_LINE>if (prefixLength > 0) {... | Node16 node16 = new Node16(prefixLength); |
131,016 | void initNoFileLayout() {<NEW_LINE>nofilesview = rootView.findViewById(R.id.nofilelayout);<NEW_LINE>nofilesview.setColorSchemeColors(mainFragmentViewModel.getAccentColor());<NEW_LINE>nofilesview.setOnRefreshListener(() -> {<NEW_LINE>loadlist((mainFragmentViewModel.getCurrentPath()), false, mainFragmentViewModel.getOpen... | , R.color.holo_dark_background)); |
528,515 | public List<T> applyFuzzy(List<T> target, int maxFuzz) throws PatchFailedException {<NEW_LINE>PatchApplyingContext<T> ctx = new PatchApplyingContext<>(new ArrayList<>(target), maxFuzz);<NEW_LINE>// the difference between patch's position and actually applied position<NEW_LINE>int lastPatchDelta = 0;<NEW_LINE>for (Abstr... | ().last() + lastPatchDelta; |
944,801 | public SimilarityQuery<O> similarityQuery() {<NEW_LINE>if (simQuery != null) {<NEW_LINE>return simQuery;<NEW_LINE>}<NEW_LINE>if (similarity == null) {<NEW_LINE>throw new IllegalStateException("Similarity query requested for 'null' similarity!");<NEW_LINE>}<NEW_LINE>for (It<SimilarityIndex<O>> it = Metadata.hierarchyOf(... | get().getSimilarityQuery(similarity); |
116,663 | public Status delete(String remotePath) {<NEW_LINE>// get a proper broker<NEW_LINE>Pair<TPaloBrokerService.Client, TNetworkAddress> pair = getBroker();<NEW_LINE>if (pair == null) {<NEW_LINE>return new Status(Status.ErrCode.COMMON_ERROR, "failed to get broker client");<NEW_LINE>}<NEW_LINE>TPaloBrokerService.Client clien... | brokerPool.invalidateObject(address, client); |
325,922 | private void addExternalUrl(Property property, KubeLink kubeLink, String externalUrl) throws IOException {<NEW_LINE>if (externalUrl != null) {<NEW_LINE>out.append(" For more information, see the ").append(externalUrl).append("[").append("external documentation for ").append(kubeLink.group()).append("/").append(kubeLink... | ()).append("."); |
153,061 | public void preview(PFMFile pfm) {<NEW_LINE>if (log != null && log.isInfoEnabled()) {<NEW_LINE>log.info("Font: " + pfm.getWindowsName());<NEW_LINE>log.info("Name: " + pfm.getPostscriptName());<NEW_LINE>log.info("CharSet: " + pfm.getCharSetName());<NEW_LINE>log.info("CapHeight: " + pfm.getCapHeight());<NEW_LINE>log.info... | pfm.getLastChar() + ")."); |
371,243 | private static Hashtable parseQueryString(String query) {<NEW_LINE>Hashtable<String, String[]> ht = new Hashtable<String, String[]>();<NEW_LINE>if (query == null)<NEW_LINE>return ht;<NEW_LINE>StringTokenizer st = new StringTokenizer(query, "&");<NEW_LINE>while (st.hasMoreTokens()) {<NEW_LINE>String pair = st.nextToken(... | ht.put(key, values); |
1,002,757 | final public MutableString replace(final char[] c, final char[] r) {<NEW_LINE>final int n = c.length;<NEW_LINE>if (n == 0)<NEW_LINE>return this;<NEW_LINE>final char[] a = array;<NEW_LINE>int i = length(), k, bloomFilter = 0;<NEW_LINE>k = n;<NEW_LINE>while (k-- != 0) bloomFilter |= 1 << (c[k] & 0x1F);<NEW_LINE>while (i-... | [i] = r[k]; |
447,743 | public LambdaFunctionAssociations unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>LambdaFunctionAssociations lambdaFunctionAssociations = new LambdaFunctionAssociations();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.i... | XMLEvent xmlEvent = context.nextEvent(); |
66,253 | /*<NEW_LINE>private static RestClientBuilder buildRestClient(Elasticsearch settings) {<NEW_LINE>List<HttpHost> hosts = new ArrayList<>(settings.<MASK><NEW_LINE>settings.getNodes().forEach(node -> hosts.add(HttpHost.create(node.decodedUrl())));<NEW_LINE><NEW_LINE>RestClientBuilder builder = RestClient.builder(hosts.toAr... | getNodes().size()); |
1,228,185 | public NetworkFirewallBlackHoleRouteDetectedViolation unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>NetworkFirewallBlackHoleRouteDetectedViolation networkFirewallBlackHoleRouteDetectedViolation = new NetworkFirewallBlackHoleRouteDetectedViolation();<NEW_LINE>int originalDepth = context.getCurr... | class).unmarshall(context)); |
1,647,423 | private ResolvedType inferReturnType(EntityContext context, HandlerMethod handler) {<NEW_LINE>TypeResolver resolver = context.getTypeResolver();<NEW_LINE><MASK><NEW_LINE>RepositoryMetadata repository = context.getRepositoryMetadata();<NEW_LINE>ResolvedType domainReturnType = resolver.resolve(repository.getReturnedDomai... | HandlerMethodResolver methodResolver = new HandlerMethodResolver(resolver); |
1,092,131 | static File resolveTarget(File root, List<Pair<String, String>> mappings, File file) {<NEW_LINE>String name = file.getName();<NEW_LINE>String extension = FileUtil.getExtension(name);<NEW_LINE>if (!extension.isEmpty()) {<NEW_LINE>name = name.substring(0, name.length() - (extension.length() + 1));<NEW_LINE>}<NEW_LINE>for... | root, mapping.second()); |
1,115,790 | protected DefaultActionGroup collectToolbarActions(@javax.annotation.Nullable List<AnAction> viewerActions) {<NEW_LINE>DefaultActionGroup group = new DefaultActionGroup();<NEW_LINE>List<AnAction> navigationActions = new ArrayList<AnAction>();<NEW_LINE>navigationActions.addAll(getNavigationActions());<NEW_LINE>navigatio... | DiffUtil.addActionBlock(group, contextActions); |
338,104 | public DkimSigningAttributes unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DkimSigningAttributes dkimSigningAttributes = new DkimSigningAttributes();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE... | int originalDepth = context.getCurrentDepth(); |
946,557 | Object typeGeneric(VirtualFrame frame, Object cls, Object name, Object bases, Object dict, PKeyword[] kwds, @Cached TypeNode nextTypeNode, @Cached IsTypeNode isTypeNode) {<NEW_LINE>if (PGuards.isNoValue(bases) && !PGuards.isNoValue(dict) || !PGuards.isNoValue(bases) && PGuards.isNoValue(dict)) {<NEW_LINE>throw raise(Ty... | name, bases, dict, kwds); |
3,338 | private List<List<Object>> explodeRow(Heading head, List<Object> row) throws SQLException {<NEW_LINE>List<List<Object>> rows = new ArrayList<List<Object>>();<NEW_LINE>rows.add(row);<NEW_LINE>for (int ri = 0; ri < head.getColumnCount(); ri++) {<NEW_LINE>if (!head.getColumn(ri).isVisible())<NEW_LINE>continue;<NEW_LINE>Ob... | get(nestedCol.getIndex()); |
735,726 | public void updateListenerParam(Listener listener, ListenerParam param) {<NEW_LINE>checkDead();<NEW_LINE>synchronized (threadLock) {<NEW_LINE>if (audioDisabled) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>switch(param) {<NEW_LINE>case Position:<NEW_LINE>Vector3f pos = listener.getLocation();<NEW_LINE>al.alListener3f(AL_POSI... | al.alListener(AL_ORIENTATION, fb); |
1,585,720 | protected void onSizeChanged(int w, int h, int oldw, int oldh) {<NEW_LINE>super.onSizeChanged(w, h, oldw, oldh);<NEW_LINE>float xpad = (float) (getPaddingLeft() + getPaddingRight());<NEW_LINE>float ypad = (float) (getPaddingTop() + getPaddingBottom());<NEW_LINE>int viewWidth = (int) (w - xpad);<NEW_LINE>int viewHeight ... | (int) (viewHeight * 0.535f); |
719,028 | public static boolean registerDevice(final ActivityBase context) {<NEW_LINE>int userId = Util.getUserId(Process.myUid());<NEW_LINE>if (Util.hasProLicense(context) == null && !PrivacyManager.getSettingBool(userId, PrivacyManager.cSettingRegistered, false)) {<NEW_LINE>// Get accounts<NEW_LINE>String email = null;<NEW_LIN... | ).executeOnExecutor(mExecutor, email); |
521,778 | protected int writeValueAndFinal(int i, boolean isFinal) {<NEW_LINE>if (0 <= i && i <= BytesTrie.kMaxOneByteValue) {<NEW_LINE>return write(((BytesTrie.kMinOneByteValueLead + i) << 1) | (isFinal ? 1 : 0));<NEW_LINE>}<NEW_LINE>int length = 1;<NEW_LINE>if (i < 0 || i > 0xffffff) {<NEW_LINE>intBytes[0] = (byte) BytesTrie.k... | byte) (i >> 24); |
1,222,809 | public KubernetesServiceInstance map(Service service) {<NEW_LINE>final ObjectMeta meta = service.getMetadata();<NEW_LINE>final List<ServicePort> ports = service.getSpec().getPorts();<NEW_LINE>ServicePort port = null;<NEW_LINE>if (ports.size() == 1) {<NEW_LINE>port = ports.get(0);<NEW_LINE>} else if (ports.size() > 1 &&... | ())).findAny(); |
1,204,919 | public Credentials unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>Credentials credentials = new Credentials();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetDepth += 1;<NEW_LINE>while (true) {<NEW_LINE>XMLEvent xmlEvent = ... | int originalDepth = context.getCurrentDepth(); |
1,784,290 | private void createDetailsView() {<NEW_LINE>TableGroupHeadline conflictTableHeadline = new TableGroupHeadline(getConflictTableHeadLine());<NEW_LINE>GridPane.setRowIndex(conflictTableHeadline, ++gridRow);<NEW_LINE>GridPane.setMargin(conflictTableHeadline, new Insets(Layout.GROUP_DISTANCE, -10, -10, -10));<NEW_LINE>root.... | setVgrow(conflictTableView, Priority.SOMETIMES); |
1,402,281 | public static StateModelDefinition build() {<NEW_LINE>Builder builder = new Builder(name);<NEW_LINE>// init state<NEW_LINE>builder.initialState(States.OFFLINE.name());<NEW_LINE>// add states<NEW_LINE>builder.addState(States.ONLINE.name(), 20);<NEW_LINE>builder.addState(States.OFFLINE.name(), -1);<NEW_LINE>for (HelixDef... | OFFLINE.name(), 25); |
958,875 | private void captureImage(Request req) {<NEW_LINE>boolean needExternalStoragePermission = !PermissionHelper.hasPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE);<NEW_LINE>boolean needCameraPermission = cameraPermissionInManifest && !PermissionHelper.hasPermission(this, Manifest.permission.CAMERA);<NEW_LINE>i... | Images.Media.MIME_TYPE, IMAGE_JPEG); |
954,628 | public static void deleteLoggers(List<Map<String, Object>> allRows, String configName) {<NEW_LINE>ArrayList<String> newLoggers = new ArrayList<String>();<NEW_LINE>HashMap attrs = new HashMap();<NEW_LINE>attrs.put("target", configName);<NEW_LINE>Map result = RestUtil.restRequest((String) GuiUtil.getSessionValue("REST_UR... | attrs, "POST", null, false); |
261,202 | private void updateHighlighters() {<NEW_LINE>final EditorEx editor = ((<MASK><NEW_LINE>if (editor == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final EditorEx editor2 = ((EditorEx) mySuffix.getEditor());<NEW_LINE>assert editor2 != null;<NEW_LINE>final Language language = InjectedLanguage.findLanguageById(getLanguage(... | EditorEx) myPrefix.getEditor()); |
1,165,937 | private Mono<Response<RemediationInner>> createOrUpdateAtSubscriptionWithResponseAsync(String remediationName, RemediationInner parameters) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));... | error(new IllegalArgumentException("Parameter remediationName is required and cannot be null.")); |
962,226 | public Matrix subtract(Matrix m1, Matrix m2) {<NEW_LINE><MASK><NEW_LINE>ArgChecker.notNull(m2, "m2");<NEW_LINE>if (m1 instanceof DoubleArray) {<NEW_LINE>if (m2 instanceof DoubleArray) {<NEW_LINE>DoubleArray array1 = (DoubleArray) m1;<NEW_LINE>DoubleArray array2 = (DoubleArray) m2;<NEW_LINE>return array1.minus(array2);<... | ArgChecker.notNull(m1, "m1"); |
561,481 | private void stopTask() {<NEW_LINE><MASK><NEW_LINE>// Flag the task to be stopped<NEW_LINE>if (_taskService != null && _taskService.isRunning()) {<NEW_LINE>_taskService.stopAsync();<NEW_LINE>}<NEW_LINE>// Send a signal to the task thread if necessary<NEW_LINE>if (_taskThread != null && _taskThread.isAlive()) {<NEW_LINE... | LOG.debug("Stopping task {}", _taskService); |
378,504 | private void createRerunButtons() {<NEW_LINE>rerunButton = new JButton(rerunIcon);<NEW_LINE>rerunButton.setEnabled(false);<NEW_LINE>rerunButton.getAccessibleContext().setAccessibleName(Bundle.ACSN_RerunButton());<NEW_LINE>rerunButton.setToolTipText(Bundle.MultiviewPanel_rerunButton_tooltip());<NEW_LINE>rerunFailedButto... | rerun(treePanel.getFailedTests()); |
914,682 | public void doOnResponse(Object result) {<NEW_LINE>if (rpcFuture == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ClassLoader oldCl = Thread.currentThread().getContextClassLoader();<NEW_LINE>SofaResponse response = (SofaResponse) result;<NEW_LINE>try {<NEW_LINE>Thread.currentThread().setContextClassLoader(this.classLoad... | .getCluster().getFilterChain(); |
1,308,812 | private Agent lookupAgent(Task task) {<NEW_LINE>// FIXME: superuser security context<NEW_LINE>Class taskClass = task.getClass();<NEW_LINE>Agent agent = null;<NEW_LINE>Class agentClass = agentClassCache.get(taskClass.getName());<NEW_LINE>// cache miss<NEW_LINE>if (agentClass == null) {<NEW_LINE>Map<String, Class<? exten... | Class supportedTaskClass = supportedAgent.getSupportedTaskType(); |
1,106,889 | private void migrateAttachment() {<NEW_LINE>addLog("@AD_Attachment_ID@");<NEW_LINE>KeyNamePair[] attachmentArray = DB.getKeyNamePairs("SELECT AD_Attachment_ID, UUID " + "FROM AD_Attachment " + "WHERE AD_Client_ID = ?", false, getAD_Client_ID());<NEW_LINE>Arrays.asList(attachmentArray).forEach(attachmentPair -> {<NEW_LI... | getName(), getAppSupportId()); |
1,583,144 | public static void main(String[] args) throws Exception {<NEW_LINE>Exchange itbit = ItBitDemoUtils.createExchange();<NEW_LINE>AccountService account = itbit.getAccountService();<NEW_LINE>TradeService tradeService = itbit.getTradeService();<NEW_LINE>AccountInfo accountInfo = account.getAccountInfo();<NEW_LINE>System.out... | out.println("Cancelling " + placeLimitOrderBTC); |
1,423,756 | final ListModelPackagingJobsResult executeListModelPackagingJobs(ListModelPackagingJobsRequest listModelPackagingJobsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listModelPackagingJobsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
74,089 | public static void main(final String[] args) {<NEW_LINE>CommandSpec spec = CommandSpec.create();<NEW_LINE>spec.mixinStandardHelpOptions(true);<NEW_LINE>spec.addOption(OptionSpec.builder("-c", "--count").paramLabel("COUNT").type(int.class).description<MASK><NEW_LINE>spec.addPositional(PositionalParamSpec.builder().param... | ("number of times to execute").build()); |
1,817,511 | public com.amazonaws.services.route53resolver.model.InternalServiceErrorException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.route53resolver.model.InternalServiceErrorException internalServiceErrorException = new com.amazonaws.services.route53resolver.model... | String currentParentElement = context.getCurrentParentElement(); |
542,985 | final GetTagsResult executeGetTags(GetTagsRequest getTagsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getTagsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Reques... | endClientExecution(awsRequestMetrics, request, response); |
209,135 | private JSONObject decode35(ByteBuffer buf) {<NEW_LINE>JSONObject m = new JSONObject();<NEW_LINE>while (buf.position() < buf.array().length) {<NEW_LINE>long tl = uint32(buf);<NEW_LINE>int t = (int) (tl >>> 3);<NEW_LINE>switch(t) {<NEW_LINE>case 1:<NEW_LINE>m.put("AAA311", uint32(buf));<NEW_LINE>break;<NEW_LINE>case 2:<... | ("AAA312", uint32(buf)); |
1,386,931 | public SSLContext forDirectory(String directory) {<NEW_LINE>try {<NEW_LINE>Path keyPath = Paths.get(directory, "key.pem");<NEW_LINE>Path certPath = Paths.get(directory, "cert.pem");<NEW_LINE>Path caPath = Paths.get(directory, "ca.pem");<NEW_LINE>Path caKeyPath = Paths.get(directory, "ca-key.pem");<NEW_LINE><MASK><NEW_L... | verifyCertificateFiles(keyPath, certPath, caPath); |
1,185,976 | public static Event[] fromJson(final String json, final EventFactory factory) throws IOException {<NEW_LINE>// empty/blank json string does not generate an event<NEW_LINE>if (json == null || isBlank(json)) {<NEW_LINE>return NULL_ARRAY;<NEW_LINE>}<NEW_LINE>Object o = parseJson(json);<NEW_LINE>// we currently only suppor... | Object>>) o, factory); |
1,293,593 | public void testShardingKeyNotUsableWithDriversConnectionBuilder() throws Exception {<NEW_LINE>ShardingKeyBuilder keybuilder = sharablePool1DataSourceWithAppAuth.createShardingKeyBuilder();<NEW_LINE>ShardingKey key = keybuilder.subkey(Arrays.asList(23, 41, 86, 17, 95), JDBCType.ARRAY).build();<NEW_LINE><MASK><NEW_LINE>... | ConnectionBuilder conbuilder = defaultDataSource.createConnectionBuilder(); |
1,513,894 | protected Answer execute(MigrateVmToPoolCommand cmd) {<NEW_LINE>final String vmName = cmd.getVmName();<NEW_LINE>VmwareHypervisorHost hyperHost = getHyperHost(getServiceContext());<NEW_LINE>try {<NEW_LINE>VirtualMachineMO vmMo = getVirtualMachineMO(vmName, hyperHost);<NEW_LINE>if (vmMo == null) {<NEW_LINE>s_logger.info(... | hyperHost.getHyperHostName() + ". Looking for the VM in datacenter."); |
816,653 | protected void encodeContent(FacesContext context, ConfirmDialog dialog) throws IOException {<NEW_LINE>ResponseWriter writer = context.getResponseWriter();<NEW_LINE>String messageText = dialog.getMessage();<NEW_LINE>UIComponent <MASK><NEW_LINE>String defaultIcon = dialog.isGlobal() ? "ui-icon" : "ui-icon ui-icon-" + di... | messageFacet = dialog.getFacet("message"); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.