idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,624,382 | public boolean canPartition(int[] nums) {<NEW_LINE>int sum = 0;<NEW_LINE>for (int num : nums) {<NEW_LINE>sum += num;<NEW_LINE>}<NEW_LINE>if (sum % 2 != 0)<NEW_LINE>return false;<NEW_LINE>int target = sum / 2;<NEW_LINE>boolean[][] dp = new boolean[nums.length + 1][target + 1];<NEW_LINE>int n = nums.length;<NEW_LINE>for ... | - nums[i - 1]]; |
1,569,313 | // rb_execarg_init<NEW_LINE>private static RubyString execargInit(ThreadContext context, IRubyObject[] argv, boolean accept_shell, ExecArg eargp, boolean allow_exc_opt) {<NEW_LINE>RubyString prog, ret;<NEW_LINE>IRubyObject[] env_opt = { context.nil, context.nil };<NEW_LINE>IRubyObject[][] argv_p = { argv };<NEW_LINE>IR... | ? eargp.command_name : eargp.command_name; |
1,714,608 | public ListImagePipelinesResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListImagePipelinesResult listImagePipelinesResult = new ListImagePipelinesResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NE... | JsonToken token = context.getCurrentToken(); |
457,683 | public List<ValidateError> validate() {<NEW_LINE>List<ValidateError> errors = new ArrayList<>();<NEW_LINE>Validator validator;<NEW_LINE>ValidateError error;<NEW_LINE>validator = ValidatorFactory.getInstance(Validator.REQUIRED);<NEW_LINE>error = validator.validate(this.stockName, convLabelName("Stock Name"));<NEW_LINE>i... | .stockType, convLabelName("Stock Type")); |
1,654,171 | private okhttp3.Call deleteClusterCustomObjectValidateBeforeCall(String group, String version, String plural, String name, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, String dryRun, V1DeleteOptions body, final ApiCallback _callback) throws ApiException {<NEW_LINE>// verify the requir... | propagationPolicy, dryRun, body, _callback); |
1,799,310 | void sendDeployEvents(DeployBean oldDeployBean, DeployBean newDeployBean, EnvironBean environBean) {<NEW_LINE>DeployState newState = newDeployBean.getState();<NEW_LINE>DeployState oldState = oldDeployBean.getState();<NEW_LINE>if (newState == oldState) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (newState == DeployState.S... | String commit = buildBean.getScm_commit_7(); |
1,595,677 | private void loadLessThan16IntoXMMOrdered(CompilationResultBuilder crb, AMD64MacroAssembler asm, Register arr, Register lengthTail, Register tmp, Register vecArray, Register vecTmp1, Register vecTmp2) {<NEW_LINE>// array is between 8 and 15 bytes long, load it into a YMM register via two QWORD loads<NEW_LINE>asm.movdq(... | lengthTail, scale, -8)); |
493,822 | private static void initInputModes() {<NEW_LINE>if (inputModes == null) {<NEW_LINE>firstUppercaseInputMode.addElement("Abc");<NEW_LINE>inputModes = new Hashtable();<NEW_LINE>Hashtable upcase = new Hashtable();<NEW_LINE>int dlen = DEFAULT_KEY_CODES.length;<NEW_LINE>for (int iter = 0; iter < dlen; iter++) {<NEW_LINE>upca... | inputModes.put("ABC", upcase); |
1,565,425 | public okhttp3.Call apiCategoriesApiCategoryIdDeleteCall(String apiCategoryId, String ifMatch, String ifUnmodifiedSince, final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/api-categories/{apiCategoryId}".... | HashMap<String, Object>(); |
1,203,838 | public void onShowCustomView(final View view, final CustomViewCallback callback) {<NEW_LINE>if (view instanceof FrameLayout) {<NEW_LINE>// A video wants to be shown<NEW_LINE>final FrameLayout frameLayout = (FrameLayout) view;<NEW_LINE>final <MASK><NEW_LINE>// Save video related variables<NEW_LINE>this.isVideoFullscreen... | View focusedChild = frameLayout.getFocusedChild(); |
700,527 | public synchronized void initRef() {<NEW_LINE>if (initialized.get()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>interfaceClass = (Class) Class.forName(interfaceClass.getName(), true, Thread.currentThread().getContextClassLoader());<NEW_LINE>} catch (ClassNotFoundException e) {<NEW_LINE>throw new MotanFramewo... | protocol, basicReferer, extConfig, this); |
1,560,713 | protected String generateSyntaxIncorrectAST() {<NEW_LINE>// create some dummy source to generate an ast node<NEW_LINE>StringBuffer buff = new StringBuffer();<NEW_LINE>IType type = getType();<NEW_LINE>String lineSeparator = org.eclipse.jdt.internal.core.util.Util.getLineSeparator(this.source, type == null ? null : type.... | List bodyDeclarations = typeDeclaration.bodyDeclarations(); |
394,512 | public Plot scrapePlot() {<NEW_LINE>Element plotElement = document.select("div.gen12 p:contains(Story:)").first();<NEW_LINE>if (plotElement != null)<NEW_LINE>return new Plot(plotElement.ownText());<NEW_LINE>else // maybe if this is a scene, there is a link to the full movie where we can grab the plot from there<NEW_LIN... | select("a[href*=/movies/]").first(); |
949,636 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player player = game.getPlayer(source.getControllerId());<NEW_LINE>MageObject sourceOject = source.getSourceObject(game);<NEW_LINE>if (player != null && sourceOject != null) {<NEW_LINE>Cards cards = new CardsImpl(player.getLibrary().getTopCards(game, 3));<NEW_L... | Zone.HAND, source, game); |
163,571 | public static void renderWires(TilePipeHolder pipe, double x, double y, double z, BufferBuilder bb) {<NEW_LINE>int combinedLight = pipe.getWorld().getCombinedLight(pipe.getPipePos(), 0);<NEW_LINE>int skyLight = combinedLight >> 16 & 0xFFFF;<NEW_LINE>int blockLight = combinedLight & 0xFFFF;<NEW_LINE>RenderHelper.disable... | EnumWireBetween between = betweenColor.getKey(); |
366,064 | @Consumes(MediaType.APPLICATION_JSON)<NEW_LINE>@ApiOperation(value = "Deletes a group", code = 204)<NEW_LINE>@ApiResponses(value = { @ApiResponse(code = 401, message = "Unauthorized"), @ApiResponse(code = 404, message = "The group could not be found") })<NEW_LINE>@PermissionRequired(Permissions.Constants.ACCESS_MANAGEM... | Status.NO_CONTENT).build(); |
1,565,240 | public void run() {<NEW_LINE>if (isActive) {<NEW_LINE>setActive();<NEW_LINE>} else {<NEW_LINE>setInactive();<NEW_LINE>}<NEW_LINE>long now = TimeUtil.getCurrentTime(serverId);<NEW_LINE>xyGraph.primaryXAxis.setRange(now - DateUtil.MILLIS_PER_MINUTE * 5, now + 1);<NEW_LINE>double maxv = 0;<NEW_LINE>if (value.size() > 0) {... | primaryYAxis.setRange(0, maxv); |
1,682,335 | public static void checkForDirectoryAndTryToDownloadToTmpDirAndUnzip(String directoryName) {<NEW_LINE>String outputDirectoryPath = tmpDirPath + "/" + directoryName;<NEW_LINE>File directory = new File(outputDirectoryPath);<NEW_LINE>if (!directory.exists() || directoryIsEmpty(directory)) {<NEW_LINE><MASK><NEW_LINE>String... | String lastName = directory.getName(); |
1,261,008 | private void createConsumerGroupOpt(String masterUrl, String topicName, String consumerGroup, String token, String operator) {<NEW_LINE>LOGGER.info(String.format("begin to create consumer group %s for topic %s in master %s"<MASK><NEW_LINE>String url = masterUrl + ADD_CONSUMER_PATH + TOPIC_NAME + topicName + GROUP_NAME ... | , consumerGroup, topicName, masterUrl)); |
1,485,256 | // @see SWTSkinObjectBasic#paintControl(org.eclipse.swt.graphics.GC)<NEW_LINE>@Override<NEW_LINE>public void paintControl(GC gc) {<NEW_LINE>super.paintControl(gc);<NEW_LINE>int fullWidth = maxSize.x == 0 || imageFGbounds == null ? canvas.getClientArea().width : imageFGbounds.width;<NEW_LINE>if (percent > 0 && imageFG !... | y, xDrawTo, imageFGbounds.height); |
1,547,252 | private boolean canDropNode(ProgramNode destinationNode, ProgramNode dropNode, int dropAction, int relativeMousePosition) {<NEW_LINE>Group dragGroup = dropNode.getGroup();<NEW_LINE>if (dragGroup.equals(destinationNode.getGroup())) {<NEW_LINE>// can't drop a group onto itself<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>i... | ProgramModule dropModule = dropNode.getModule(); |
322,235 | public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {<NEW_LINE>super.onViewCreated(view, savedInstanceState);<NEW_LINE>mWebView = view.findViewById(getWebViewResId());<NEW_LINE>mProgress = view.findViewById(R.id.progress);<NEW_LINE>mWebView.setWebViewClient(new WebViewClient() {<NEW_LINE><NEW_LINE... | getSettings().setJavaScriptEnabled(true); |
227,470 | public void bindData(GlideUrl target, ViewHolder<RecyNineBinding> bindView, int position) {<NEW_LINE>ViewGroup.LayoutParams params = bindView.baseBind.illustImage.getLayoutParams();<NEW_LINE>if (illust.getPage_count() == 1) {<NEW_LINE>int imageSize = mContext.getResources().getDisplayMetrics().widthPixels - DensityUtil... | baseBind.illustImage.setLayoutParams(params); |
699,062 | private void chartInit() {<NEW_LINE>previewChart.setTouchEnabled(true);<NEW_LINE>previewChart.setHighlightPerDragEnabled(true);<NEW_LINE>previewChart.setDragEnabled(true);<NEW_LINE>previewChart.setScaleEnabled(true);<NEW_LINE>previewChart.setDrawGridBackground(false);<NEW_LINE>previewChart.setPinchZoom(true);<NEW_LINE>... | l.setTextColor(Color.WHITE); |
1,426,510 | private void handleManagedVolumesAfterFailedMigration(Map<VolumeInfo, DataStore> volumeToPool, Host destHost) {<NEW_LINE>for (Map.Entry<VolumeInfo, DataStore> entry : volumeToPool.entrySet()) {<NEW_LINE>VolumeInfo volumeInfo = entry.getKey();<NEW_LINE>StoragePool storagePool = storagePoolDao.findById(volumeInfo.getPool... | TRUE.toString(), false); |
813,895 | public UpdateStreamingDistributionResult unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>UpdateStreamingDistributionResult updateStreamingDistributionResult = new UpdateStreamingDistributionResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth... | ().unmarshall(context)); |
588,950 | final DeprovisionByoipCidrResult executeDeprovisionByoipCidr(DeprovisionByoipCidrRequest deprovisionByoipCidrRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deprovisionByoipCidrRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,640,577 | // Main sort method.<NEW_LINE>static <T> int[] sort(final T array, final int from, final int to, final Comparator<? super T> comparator) {<NEW_LINE>rangeCheck(from, to);<NEW_LINE>final int length = to - from;<NEW_LINE>final int[] <MASK><NEW_LINE>if (length > 1) {<NEW_LINE>final Comparator<? super T> cmp = from > 0 ? (a... | proxy = ProxySorter.indexes(length); |
1,575,071 | public int executeUpdate(final String sql, final int[] columnIndexes) throws SQLException {<NEW_LINE>returnGeneratedKeys = true;<NEW_LINE>try {<NEW_LINE>LogicSQL logicSQL = createLogicSQL(sql);<NEW_LINE>trafficContext = getTrafficContext(logicSQL);<NEW_LINE>if (trafficContext.isMatchTraffic()) {<NEW_LINE>JDBCExecutionU... | <JDBCExecutionUnit> executionGroups = createExecutionContext(); |
1,143,988 | public void testXmlOverrideValidServiceRefWithInvalidPortAddress() throws Exception {<NEW_LINE>TestUtils.publishFileToServer(server, "WsBndServiceRefOverrideTest", "ibm-ws-bnd_testXmlOverrideValidServiceRefWithInvalidPortAddress.xml", "dropins/wsBndServiceRefOverride.war/WEB-INF/", "ibm-ws-bnd.xml");<NEW_LINE>TestUtils... | , "Hello".equals(result)); |
1,320,688 | final GetServiceQuotaIncreaseRequestFromTemplateResult executeGetServiceQuotaIncreaseRequestFromTemplate(GetServiceQuotaIncreaseRequestFromTemplateRequest getServiceQuotaIncreaseRequestFromTemplateRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getServiceQuotaIncreaseRequestFromTemplateRe... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
971,346 | final AssociateServiceQuotaTemplateResult executeAssociateServiceQuotaTemplate(AssociateServiceQuotaTemplateRequest associateServiceQuotaTemplateRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(associateServiceQuotaTemplateRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionC... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,601,546 | public byte[] decodeMessage() {<NEW_LINE>byte[] data = new byte[17];<NEW_LINE>data[0] = 0x10;<NEW_LINE>data[1] = PacketType.WIND.toByte();<NEW_LINE>data[2] = subType.toByte();<NEW_LINE>data[3] = seqNbr;<NEW_LINE>data[4] = (byte) ((sensorId & 0xFF00) >> 8);<NEW_LINE>data[5] = (byte) (sensorId & 0x00FF);<NEW_LINE>short W... | (byte) (temp & 0xFF); |
1,638,681 | public static void attestSgxEnclaveAsync1() {<NEW_LINE>BinaryData runtimeData = BinaryData.fromBytes(SampleCollateral.getRunTimeData());<NEW_LINE>BinaryData inittimeData = null;<NEW_LINE>BinaryData openEnclaveReport = BinaryData.fromBytes(SampleCollateral.getOpenEnclaveReport());<NEW_LINE>BinaryData sgxQuote = BinaryDa... | runtimeData, AttestationDataInterpretation.BINARY))); |
1,135,749 | public static DescribeGatherStatsResultResponse unmarshall(DescribeGatherStatsResultResponse describeGatherStatsResultResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeGatherStatsResultResponse.setRequestId(_ctx.stringValue("DescribeGatherStatsResultResponse.RequestId"));<NEW_LINE>describeGatherStatsResultResponse... | (_ctx.longValue("DescribeGatherStatsResultResponse.GatherStatsResult.Change.UpdateTime")); |
1,245,043 | protected Rectangle calculateClientArea() {<NEW_LINE>calculateRouting();<NEW_LINE>int controlPointShapeRadius = controlPointShape.getRadius();<NEW_LINE>int controlPointShapeRadius2 = controlPointShapeRadius + controlPointShapeRadius;<NEW_LINE>int endPointShapeRadius = endPointShape.getRadius();<NEW_LINE>Rectangle rect ... | y - radius, radius2, radius2); |
167,054 | public int deleteJobsPermanently(StateName state, Instant updatedBefore) {<NEW_LINE>int amount = 0;<NEW_LINE>try (final StatefulRedisConnection<String, String> connection = getConnection()) {<NEW_LINE>RedisCommands<String, String> commands = connection.sync();<NEW_LINE>List<String> zrangeToInspect = commands.zrange(job... | , state), 0, 1000); |
1,596,121 | private void writeMagicComments(DefaultTextOutput out, LinkerContext context, int fragmentId, String strongName) {<NEW_LINE>String sourceMapUrl = getSourceMapUrl(context, strongName, fragmentId);<NEW_LINE>if (sourceMapUrl != null) {<NEW_LINE>// This magic comment determines where a browser debugger looks for a sourcema... | ) + "-" + fragmentId + ".js\n"); |
444,557 | private void detectAndUpgrade(long streamType) {<NEW_LINE>if (streamType == ControlStreamConnection.STREAM_TYPE) {<NEW_LINE><MASK><NEW_LINE>ControlStreamConnection newConnection = new ControlStreamConnection(getEndPoint(), getExecutor(), byteBufferPool, parser);<NEW_LINE>newConnection.setInputBufferSize(getInputBufferS... | ControlParser parser = new ControlParser(listener); |
1,766,803 | public void onBindViewHolder(EditorsChoiceItemAdapter.ViewHolder vh, int position) {<NEW_LINE>int type = getItemViewType(position);<NEW_LINE>EditorsChoiceItem item = items.get(position);<NEW_LINE>vh.headerView.setVisibility(type == VIEW_TYPE_HEADER ? View.VISIBLE : View.GONE);<NEW_LINE>vh.cardView.setVisibility(type ==... | setText(item.getDescription()); |
1,575,004 | private void appendIntegers(StringBuffer result, ThousandBlock... blocks) {<NEW_LINE>boolean hasStarted = false;<NEW_LINE>for (int i = 0; i < blocks.length; i++) {<NEW_LINE>ThousandBlock thousandBlock = blocks[i];<NEW_LINE>if (!(hasStarted && thousandBlock.isZero())) {<NEW_LINE>int thousandPower = (blocks.length - i - ... | result.append(getAndSeparator()); |
209,670 | public void registerUnknownSourceRoots(final ClassPath owner, final Iterable<? extends URL> roots) {<NEW_LINE>assert owner != null;<NEW_LINE>assert roots != null;<NEW_LINE>synchronized (this) {<NEW_LINE>for (URL root : roots) {<NEW_LINE>unknownRoots.put(root, <MASK><NEW_LINE>}<NEW_LINE>unknownSourcePath = new HashSet<>... | new WeakValue(owner, root)); |
269,091 | public static HostColumnVector fromDecimals(BigDecimal... values) {<NEW_LINE>// 1. Fetch the element with max precision (maxDec). Fill with ZERO if inputs is empty.<NEW_LINE>// 2. Fetch the max scale. Fill with ZERO if inputs is empty.<NEW_LINE>// 3. Rescale the maxDec with the max scale, so to come out the max precisi... | ).orElse(BigDecimal.ZERO); |
1,481,090 | public static QueryCrackEventResponse unmarshall(QueryCrackEventResponse queryCrackEventResponse, UnmarshallerContext context) {<NEW_LINE>queryCrackEventResponse.setRequestId(context.stringValue("QueryCrackEventResponse.requestId"));<NEW_LINE>queryCrackEventResponse.setCode(context.stringValue("QueryCrackEventResponse.... | ("QueryCrackEventResponse.Data.List[" + i + "].Uuid")); |
1,771,998 | public void rip() throws IOException {<NEW_LINE>int page = 0;<NEW_LINE>String baseURL = "https://vine.co/api/timelines/users/" + getGID(this.url);<NEW_LINE>JSONObject json = null;<NEW_LINE>while (true) {<NEW_LINE>page++;<NEW_LINE>String theURL = baseURL;<NEW_LINE>if (page > 1) {<NEW_LINE>theURL += "?page=" + page;<NEW_... | url(theURL).getJSON(); |
380,823 | public void writeToParcel(Parcel dest, int flags) {<NEW_LINE>dest.writeLong(this.id);<NEW_LINE>dest.writeString(this.url);<NEW_LINE>dest.writeString(this.body);<NEW_LINE>dest.writeString(this.title);<NEW_LINE>dest.writeInt(this.comments);<NEW_LINE>dest.writeInt(this.number);<NEW_LINE>dest.writeByte(this.locked ? (byte)... | ) 1 : (byte) 0); |
73,681 | public void handleAutoOpenElementEnd(final char[] buffer, final int nameOffset, final int nameLen, final int line, final int col) throws ParseException {<NEW_LINE>final String elementCompleteName = new String(buffer, nameOffset, nameLen);<NEW_LINE>final ElementDefinition elementDefinition = this.elementDefinitions.forN... | 0) + this.currentElementCol)); |
1,136,689 | private static CharSequence fullQueryOrMatrix(CharSequence string, char delimiter, String spaceReplace, boolean encode) throws IllegalArgumentException {<NEW_LINE>final int l = string.length();<NEW_LINE>final StringBuilder stb = new StringBuilder(l + 6);<NEW_LINE>for (int i = 0; i < l; i++) {<NEW_LINE>final char c = st... | i, encode, string, stb); |
1,402,567 | private final ThrowingFunction<List<List<Param<?>>>, PreparedStatement, SQLException> prepareAndBind(String sql, ThrowingFunction<String, PreparedStatement, SQLException> prepare) {<NEW_LINE>return p -> {<NEW_LINE><MASK><NEW_LINE>Rendered rendered = size == 0 ? translate(configuration, sql) : translate(configuration, s... | int size = p.size(); |
1,659,893 | private void printReply(Reply reply) {<NEW_LINE>Trace trace = reply.getTrace();<NEW_LINE>if (!trace.getRoot().isEmpty()) {<NEW_LINE>System.out.println(trace);<NEW_LINE>}<NEW_LINE>if (reply.hasErrors()) {<NEW_LINE>System.err.print("Request failed: ");<NEW_LINE>for (int i = 0; i < reply.getNumErrors(); i++) {<NEW_LINE>Sy... | JsonWriter.toByteArray(document))); |
1,652,558 | public void annotate(Annotation annotation) {<NEW_LINE>if (verbose) {<NEW_LINE>log.info("Adding RegexNER annotations ... ");<NEW_LINE>}<NEW_LINE>if (!annotation.containsKey(CoreAnnotations.SentencesAnnotation.class))<NEW_LINE>throw new RuntimeException("Unable to find sentences in " + annotation);<NEW_LINE>List<CoreMap... | class, classifier.flags.backgroundSymbol); |
24,267 | public ThreeState deepEqual(@Nonnull final ASTNode oldNode, @Nonnull final LighterASTNode newNode) {<NEW_LINE>ProgressIndicatorProvider.checkCanceled();<NEW_LINE>boolean oldIsErrorElement = oldNode instanceof PsiErrorElement;<NEW_LINE>boolean newIsErrorElement = newNode.getTokenType() == TokenType.ERROR_ELEMENT;<NEW_LI... | ? ThreeState.YES : ThreeState.NO; |
962,389 | public void marshall(ScalingActivity scalingActivity, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (scalingActivity == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(scalingActivity.getActivityId(), ACTIVI... | scalingActivity.getDescription(), DESCRIPTION_BINDING); |
1,674,936 | private Map<String, String> parseSqlServerUrl(String jdbcUrl) {<NEW_LINE>HashMap<String, String> map = new HashMap<String, String>();<NEW_LINE>if (jdbcUrl == null || !StringUtils.startsWithIgnoreCase(jdbcUrl, "jdbc:sqlserver://")) {<NEW_LINE>return map;<NEW_LINE>}<NEW_LINE>int pos1 = jdbcUrl.indexOf(':', 5);<NEW_LINE>i... | substring(pos1 + 1, pos3); |
867,216 | public InputDeviceRequest unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>InputDeviceRequest inputDeviceRequest = new InputDeviceRequest();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken t... | int originalDepth = context.getCurrentDepth(); |
1,272,200 | boolean isHashJoinCondition(EqualTo equalTo) {<NEW_LINE>Set<Slot> equalLeft = equalTo.left().collect(Slot.class::isInstance);<NEW_LINE>if (equalLeft.isEmpty()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Set<Slot> equalRight = equalTo.right().<MASK><NEW_LINE>if (equalRight.isEmpty()) {<NEW_LINE>return false;<NEW_LINE>... | collect(Slot.class::isInstance); |
24,845 | public AmazonS3ClientBuilder createBuilder(S3Options s3Options) {<NEW_LINE>AmazonS3ClientBuilder builder = AmazonS3ClientBuilder.standard().withCredentials(s3Options.getAwsCredentialsProvider());<NEW_LINE>if (s3Options.getClientConfiguration() != null) {<NEW_LINE>builder = builder.<MASK><NEW_LINE>}<NEW_LINE>if (!String... | withClientConfiguration(s3Options.getClientConfiguration()); |
1,291,311 | private void completeUDPWrite(InetSocketAddress srcAddr, InetSocketAddress dstAddr, ByteBuf udpBuf, ByteBufAllocator byteBufAllocator, ChannelHandlerContext ctx) {<NEW_LINE>ByteBuf ipBuf = byteBufAllocator.buffer();<NEW_LINE>ByteBuf ethernetBuf = byteBufAllocator.buffer();<NEW_LINE>ByteBuf pcap = byteBufAllocator.buffe... | pCapWriter.writePacket(pcap, ethernetBuf); |
1,380,022 | public UploadChangesResponse uploadSubscriptionChanges(List<String> added, List<String> removed) throws GpodnetServiceException {<NEW_LINE>requireLoggedIn();<NEW_LINE>try {<NEW_LINE>URL url = new URI(baseScheme, null, baseHost, basePort, String.format("/api/2/subscriptions/%s/%s.json", username, deviceId), null, null).... | "add", new JSONArray(added)); |
253,869 | private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>selectWsdlLbl = <MASK><NEW_LINE>innerPanel = new javax.swing.JPanel();<NEW_LINE>// NOI18N<NEW_LINE>org.openide.awt.Mnemonics.setLocalizedText(selectWsdlLbl, org.openide.util.NbBund... | new javax.swing.JLabel(); |
1,511,872 | public static InstallAgentResponse unmarshall(InstallAgentResponse installAgentResponse, UnmarshallerContext _ctx) {<NEW_LINE>installAgentResponse.setRequestId(_ctx.stringValue("InstallAgentResponse.RequestId"));<NEW_LINE>installAgentResponse.setCode(_ctx.integerValue("InstallAgentResponse.Code"));<NEW_LINE>installAgen... | ("InstallAgentResponse.ExecutionResultList[" + i + "].InvokeRecordStatus")); |
759,656 | final DeleteLocationResult executeDeleteLocation(DeleteLocationRequest deleteLocationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteLocationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
1,344,665 | public static Map<String, String> parseMetadata(String metadata) throws NacosException {<NEW_LINE>Map<String, String> metadataMap = new HashMap<>(16);<NEW_LINE>if (StringUtils.isBlank(metadata)) {<NEW_LINE>return metadataMap;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>metadataMap = JacksonUtils.toObj(metadata, new TypeReferenc... | 0], kv[1]); |
1,748,086 | public void sendEventGridEventsAsync() {<NEW_LINE>// BEGIN: com.azure.messaging.eventgrid.EventGridPublisherAsyncClient#CreateEventGridEventClient<NEW_LINE>// Create a client to send events of EventGridEvent schema<NEW_LINE>EventGridPublisherAsyncClient<EventGridEvent> eventGridEventPublisherClient = // make sure it ac... | sendEvent(eventGridEvent).block(); |
834,706 | static byte[] decode_base64(String s, int maxolen) throws IllegalArgumentException {<NEW_LINE>StringBuilder rs = new StringBuilder();<NEW_LINE>int off = 0, slen = s.length(), olen = 0;<NEW_LINE>byte[] ret;<NEW_LINE>byte c1, c2, c3, c4, o;<NEW_LINE>if (maxolen <= 0)<NEW_LINE>throw new IllegalArgumentException("Invalid m... | s.charAt(off++)); |
1,170,062 | private synchronized int _add(String key, int value, MODE m) {<NEW_LINE>if (key == null)<NEW_LINE>return NONE;<NEW_LINE>StringIntLinkedEntry[] tab = table;<NEW_LINE>int index = hash(key) % tab.length;<NEW_LINE>for (StringIntLinkedEntry e = tab[index]; e != null; e = e.next) {<NEW_LINE>if (CompareUtil.equals(e.key, key)... | header.link_prev, header, e); |
160,119 | private void createServerSettingsClass() {<NEW_LINE>schema.createEAttribute(serverSettings, "sendConfirmationEmailAfterRegistration", ecorePackage.<MASK><NEW_LINE>schema.createEAttribute(serverSettings, "allowSelfRegistration", ecorePackage.getEBooleanObject(), Multiplicity.SINGLE);<NEW_LINE>schema.createEAttribute(ser... | getEBoolean(), Multiplicity.SINGLE); |
595,025 | public void marshall(QuantumTaskSummary quantumTaskSummary, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (quantumTaskSummary == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(quantumTaskSummary.getCreatedA... | quantumTaskSummary.getEndedAt(), ENDEDAT_BINDING); |
957,830 | private boolean processUnsafeLoad(RawLoadNode load, PEReadEliminationBlockState state, GraphEffectList effects) {<NEW_LINE>if (load.ordersMemoryAccesses()) {<NEW_LINE>state.killReadCache();<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (load.offset().isConstant()) {<NEW_LINE>ResolvedJavaType type = StampTool.typeOrNull... | location = NamedLocationIdentity.getArrayLocation(componentKind); |
1,850,092 | // Suppress high Cognitive Complexity warning<NEW_LINE>@SuppressWarnings("squid:S3776")<NEW_LINE>@Override<NEW_LINE>public RowRecord nextWithoutConstraint() throws IOException {<NEW_LINE>long minTime = timeHeap.pollFirst();<NEW_LINE>RowRecord record = new RowRecord(minTime);<NEW_LINE>int seriesNumber = seriesReaderList... | dataType = dataTypes.get(seriesIndex); |
348,781 | private static List<Object> accessBufferPoolMXBeans(final Class<?> bufferPoolMXBeanClass) {<NEW_LINE>try {<NEW_LINE>final Method getPlatformMXBeansMethod = ManagementFactory.class.<MASK><NEW_LINE>final Object listOfBufferPoolMXBeanInstances = getPlatformMXBeansMethod.invoke(null, bufferPoolMXBeanClass);<NEW_LINE>return... | getMethod("getPlatformMXBeans", Class.class); |
95,395 | private void validate() {<NEW_LINE>if (this.claims.get(OidcClientMetadataClaimNames.CLIENT_ID_ISSUED_AT) != null || this.claims.get(OidcClientMetadataClaimNames.CLIENT_SECRET) != null) {<NEW_LINE>Assert.notNull(this.claims.get(OidcClientMetadataClaimNames.CLIENT_ID), "client_id cannot be null");<NEW_LINE>}<NEW_LINE>if ... | (OidcClientMetadataClaimNames.REDIRECT_URIS), "redirect_uris cannot be null"); |
788,635 | private void populateHandlers() {<NEW_LINE>ListIterator<String> listIterator = handlerClasses.listIterator();<NEW_LINE>final int[] handlerType = new int[] { WSHandlerDialog.JAXWS_LOGICAL_HANDLER };<NEW_LINE>boolean firstIteration = true;<NEW_LINE>while (listIterator.hasNext()) {<NEW_LINE>String handlerClass = listItera... | javaSource = JavaSource.forFileObject(classFO); |
491,352 | private org.neo4j.driver.Config.TrustStrategy toInternalTrustStrategy() {<NEW_LINE>org.<MASK><NEW_LINE>switch(trustStrategy) {<NEW_LINE>case TRUST_ALL_CERTIFICATES:<NEW_LINE>internalRepresentation = org.neo4j.driver.Config.TrustStrategy.trustAllCertificates();<NEW_LINE>break;<NEW_LINE>case TRUST_SYSTEM_CA_SIGNED_CERTIF... | neo4j.driver.Config.TrustStrategy internalRepresentation; |
1,416,452 | public Prel visitExchange(ExchangePrel prel, MajorFragmentStat parent) throws RuntimeException {<NEW_LINE>parent.add(prel);<NEW_LINE>MajorFragmentStat newFrag = new MajorFragmentStat();<NEW_LINE>newFrag.<MASK><NEW_LINE>if (prel instanceof SingleMergeExchangePrel) {<NEW_LINE>newFrag.isSimpleRel = true;<NEW_LINE>}<NEW_LI... | setRightSideOfLateral(parent.isRightSideOfLateral()); |
1,726,172 | public void readOnPlacement(@Nullable LivingEntity placer, ItemStack stack) {<NEW_LINE>if (stack.hasTag()) {<NEW_LINE>CompoundTag tag = stack.getOrCreateTag();<NEW_LINE>if (tag.contains("owner", NBT.TAG_STRING))<NEW_LINE>this.owner = tag.getString("owner");<NEW_LINE>else if (placer != null)<NEW_LINE>this.owner = placer... | .getName().getString(); |
1,038,456 | public static synchronized void writeToOneWire(String pvDevicePropertyPath, String pvValue) {<NEW_LINE>int lvAttempt = 1;<NEW_LINE>while (lvAttempt <= cvRetry) {<NEW_LINE>try {<NEW_LINE>logger.debug("Trying to write '{}' to '{}', write attempt={}", pvValue, pvDevicePropertyPath, lvAttempt);<NEW_LINE>if (checkIfDeviceEx... | pvDevicePropertyPath, cvIp, cvPort, ioe); |
1,837,575 | public DescribeContinuousBackupsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeContinuousBackupsResult describeContinuousBackupsResult = new DescribeContinuousBackupsResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int t... | int originalDepth = context.getCurrentDepth(); |
267,221 | public WebResponse invokeProtectedResource(String testcase, WebConversation wc, String accessToken, String where, TestSettings settings, List<validationData> expectations, String currentAction) throws Exception {<NEW_LINE>String thisMethod = "invokeProtectedResource";<NEW_LINE>msgUtils.printMethodName(thisMethod);<NEW_... | printResponseParts(response, thisMethod, "Response from protected app: "); |
557,964 | public Object invoke(ObjectName objectName, String operationName, Object[] params, String[] signature) throws JmxException {<NEW_LINE>if (LOG.isLoggable(Level.INFO)) {<NEW_LINE>LOG.info("Invoking an MBean operation");<NEW_LINE>PropertyMap args = new PropertyMap();<NEW_LINE>args.put("Object Name", objectName);<NEW_LINE>... | args.put("Signature", signature); |
713,271 | public TAlterTabletReq toThrift() {<NEW_LINE>TAlterTabletReq tAlterTabletReq = new TAlterTabletReq();<NEW_LINE>tAlterTabletReq.setBase_tablet_id(baseTabletId);<NEW_LINE>tAlterTabletReq.setBase_schema_hash(baseSchemaHash);<NEW_LINE>// make 1 TCreateTableReq<NEW_LINE>TCreateTabletReq createTabletReq = new TCreateTabletRe... | = new ArrayList<TColumn>(); |
555,742 | public URL toURL() {<NEW_LINE>if (url == null) {<NEW_LINE>if (file != null) {<NEW_LINE>try {<NEW_LINE>url = file.toURI().toURL();<NEW_LINE>} catch (MalformedURLException e) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>logger.log(Level.FINE, "Exception thrown when constructing URL from file name " + file.getAbsolutePath());<NEW_L... | .getFile().getAbsolutePath(); |
790,716 | public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {<NEW_LINE>int topOffset = 0;<NEW_LINE>// TODO - other option is to let the painting of the dark border to the inner component and make this border's insets smaller.<NEW_LINE>if (c instanceof JComponent) {<NEW_LINE>JComponent jc = (JC... | 3, width - 2, 0); |
18,354 | public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {<NEW_LINE><MASK><NEW_LINE>if (mname.equals("toString")) {<NEW_LINE>return "SpunPhadhailListener<" + l + ">";<NEW_LINE>} else if (mname.equals("equals")) {<NEW_LINE>return args[0] == l ? Boolean.TRUE : Boolean.FALSE;<NEW_LINE>} else if (m... | String mname = method.getName(); |
1,830,257 | private void reset(long key0, long key1, long key2, long key3) {<NEW_LINE>mul0[0] = 0xdbe6d5d5fe4cce2fL;<NEW_LINE>mul0[1] = 0xa4093822299f31d0L;<NEW_LINE>mul0[2] = 0x13198a2e03707344L;<NEW_LINE>mul0[3] = 0x243f6a8885a308d3L;<NEW_LINE>mul1[0] = 0x3bd39e10cb0ef593L;<NEW_LINE>mul1[1] = 0xc0acf169b5f18a8cL;<NEW_LINE>mul1[2... | ) | (key3 << 32)); |
122,587 | protected Node shallowClone(Node node) {<NEW_LINE>Node clone = node.cloneNode(false);<NEW_LINE>if (needsDebugData) {<NEW_LINE>Nodes.setFilePositionFor(clone<MASK><NEW_LINE>}<NEW_LINE>switch(node.getNodeType()) {<NEW_LINE>case Node.ATTRIBUTE_NODE:<NEW_LINE>if (needsDebugData) {<NEW_LINE>Nodes.setFilePositionForValue((At... | , Nodes.getFilePositionFor(node)); |
284,866 | private List<Token> translateFormattedTokens(int startPosition, List<Token> formattedTokens, int[] positionMapping, HashMap<Token, Token> translationMap) {<NEW_LINE>int previousLineBreaks = 0;<NEW_LINE>List<Token> result = new ArrayList<>();<NEW_LINE>for (Token token : formattedTokens) {<NEW_LINE>int newStart = Arrays.... | binarySearch(positionMapping, token.originalStart); |
1,673,654 | private void handlePotentialClipboardGeocode() {<NEW_LINE>binding.geocodeInputLayout.postDelayed(() -> {<NEW_LINE>final <MASK><NEW_LINE>String geocode = "";<NEW_LINE>if (ConnectorFactory.getConnector(clipboardText) instanceof ISearchByGeocode) {<NEW_LINE>geocode = clipboardText;<NEW_LINE>} else {<NEW_LINE>geocode = Con... | String clipboardText = ClipboardUtils.getText(); |
1,530,722 | public static APIGetCandidatePrimaryStoragesForCreatingVmReply __example__() {<NEW_LINE>APIGetCandidatePrimaryStoragesForCreatingVmReply reply = new APIGetCandidatePrimaryStoragesForCreatingVmReply();<NEW_LINE>PrimaryStorageInventory lsInv = new PrimaryStorageInventory();<NEW_LINE>lsInv.setName("example");<NEW_LINE>lsI... | (), asList(nfsInv)); |
1,717,583 | public void actionPerformed(ActionEvent e) {<NEW_LINE>if (e.getSource() instanceof JComponent) {<NEW_LINE>String name = ((JComponent) e.getSource()).getName();<NEW_LINE>if (name.startsWith("MSG_DONT_SHOW_AGAIN")) {<NEW_LINE>Config.getInstance().setShowDownloadCompleteWindow(!chkDontShow.isSelected());<NEW_LINE>} else i... | ), txtFolder.getText()); |
188,877 | public Request<DescribeConversionTasksRequest> marshall(DescribeConversionTasksRequest describeConversionTasksRequest) {<NEW_LINE>if (describeConversionTasksRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<DescribeConversionTasksRequest> r... | request.setHttpMethod(HttpMethodName.POST); |
202,285 | public void handleMessage(int group, byte cmd1, Msg msg, DeviceFeature f, String fromPort) {<NEW_LINE>InsteonDevice dev = f.getDevice();<NEW_LINE>if (!msg.isExtended()) {<NEW_LINE>logger.trace("{} device {} ignoring non-extended msg {}", nm(), dev.getAddress(), msg);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>... | msg.getByte("userData4") & 0xff; |
1,657,762 | public Publisher<Collection<ServiceDiscovererEvent<R>>> discover(final U ignoredAddress) {<NEW_LINE>return newGroup.filter(new Predicate<PSDE>() {<NEW_LINE><NEW_LINE>// Use a mutable Count to avoid boxing-unboxing and put on each call.<NEW_LINE>private final Map<R, MutableInt> <MASK><NEW_LINE><NEW_LINE>@Override<NEW_LI... | addressCount = new HashMap<>(); |
1,423,265 | public ServerAuthorConfigurationResponse updateAuditLogDestination(String userId, String serverName, String serverToBeConfiguredName, String auditLogDestinationName, Connection auditLogDestination) {<NEW_LINE>final String methodName = "updateAuditLogDestination";<NEW_LINE>RESTCallToken token = restCallLogger.logRESTCal... | token, response.toString()); |
903,511 | public String dumpTopology() {<NEW_LINE>Map<String, String> rack = getSwitchMap();<NEW_LINE>StringBuilder builder = new StringBuilder();<NEW_LINE>builder.append("Mapping: ").append(toString()).append("\n");<NEW_LINE>if (rack != null) {<NEW_LINE>builder.append("Map:\n");<NEW_LINE>Set<String> switches = new HashSet<Strin... | add(entry.getValue()); |
221,792 | public void operationComplete(final Future<PooledConnection> connectResult) {<NEW_LINE>// MUST run this within bindingcontext to support ThreadVariables.<NEW_LINE>try {<NEW_LINE>methodBinding.bind(() -> {<NEW_LINE>DiscoveryResult server = chosenServer.get();<NEW_LINE>if (server != DiscoveryResult.EMPTY) {<NEW_LINE>if (... | onOriginConnectFailed(connectResult.cause()); |
806,234 | private IMeasurementMNode constructTemplateTree(String path, IMeasurementSchema schema) throws IllegalPathException {<NEW_LINE>if (getPathNodeInTemplate(path) != null) {<NEW_LINE>throw new IllegalPathException("Path duplicated: " + path);<NEW_LINE>}<NEW_LINE>String[] pathNode = MetaUtils.splitPathToDetachedPath(path);<... | - 1], schema, null); |
1,097,514 | public RestChannelConsumer prepareRequest(final RestRequest request, final NodeClient client) throws IOException {<NEW_LINE>BulkRequest bulkRequest = Requests.bulkRequest();<NEW_LINE>String defaultIndex = request.param("index");<NEW_LINE>String defaultRouting = request.param("routing");<NEW_LINE>String defaultPipeline ... | request.paramAsBoolean("require_alias", null); |
1,061,184 | private static void addBufferPoolMemoryInfo(Map<String, List<MemoryEntryVO>> memoryInfoMap) {<NEW_LINE>try {<NEW_LINE>List<MemoryEntryVO> bufferPoolMemEntries = new ArrayList<MemoryEntryVO>();<NEW_LINE>@SuppressWarnings("rawtypes")<NEW_LINE>Class bufferPoolMXBeanClass = Class.forName("java.lang.management.BufferPoolMXB... | , total, Long.MIN_VALUE)); |
1,382,341 | private org.nzbhydra.github.mavenreleaseplugin.Release createRelease(org.nzbhydra.github.mavenreleaseplugin.ReleaseRequest releaseRequest) throws IOException, MojoExecutionException {<NEW_LINE>getLog(<MASK><NEW_LINE>String requestBody = objectMapper.writeValueAsString(releaseRequest);<NEW_LINE>getLog().info("Sending bo... | ).info("Creating release in draft mode using base URL " + githubReleasesUrl); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.