idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,326,132 | final DeleteDatasetResult executeDeleteDataset(DeleteDatasetRequest deleteDatasetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteDatasetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
59,457 | public void testSetDeliveryDelayTopicClassicApi_Tcp(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>boolean testFailed = false;<NEW_LINE>TopicConnection con = jmsTCFTCP.createTopicConnection();<NEW_LINE>con.start();<NEW_LINE>TopicSession session = con.createTopicSession(false, Sess... | sub = session.createSubscriber(jmsTopic); |
263,430 | public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {<NEW_LINE>if (!XmlItem.class.isAssignableFrom(type.getRawType())) {<NEW_LINE>// this class only serializes 'XmlItem' and its subtypes<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.clas... | .get(XmlItem.class)); |
1,056,777 | public void interceptResponse(IHttpResponse theResponse) throws IOException {<NEW_LINE>if (myLogResponseSummary) {<NEW_LINE>String message = "HTTP " + theResponse.getStatus() + " " + theResponse.getStatusInfo();<NEW_LINE>String respLocation = "";<NEW_LINE>List<String> locationHeaders = theResponse.getHeaders(Constants.... | "Client response: {}{}{}", message, respLocation, timing); |
644,556 | private static int detectPreviousVersion(File directory) throws IOException {<NEW_LINE>String[] <MASK><NEW_LINE>File v2versionFile = new File(directory, BookKeeperConstants.VERSION_FILENAME);<NEW_LINE>if ((files == null || files.length == 0) && !v2versionFile.exists()) {<NEW_LINE>// no old data, so we're ok<NEW_LINE>re... | files = directory.list(bookieFilesFilter); |
408,769 | private List<I_M_HU> retrieveTopLevelHuIfNoSourceHuIsOnThePath(final HuId huId) {<NEW_LINE>final IHandlingUnitsDAO handlingUnitsDAO = Services.get(IHandlingUnitsDAO.class);<NEW_LINE>final Predicate<I_M_HU> filterToExcludeSourceHus = currentHu -> !isSourceHu(HuId.ofRepoId<MASK><NEW_LINE>final TopLevelHusQuery query = To... | (currentHu.getM_HU_ID())); |
193,867 | public void prepare(Progress progress) throws IOException {<NEW_LINE>if (prepared) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Artifact artifact = mrl.getDefaultArtifact();<NEW_LINE>mrl.prepare(artifact, progress);<NEW_LINE>Path root = mrl.getRepository().getResourceDirectory(artifact);<NEW_LINE>Path usagePath;<NEW_LINE>swi... | indexFile = usagePath.resolve("index.file"); |
274,549 | private Collection<String> createSupersededByQuery() {<NEW_LINE>Collection<String> supersededBy = _asset.getWlpInformation().getSupersededBy();<NEW_LINE>Collection<String> query = null;<NEW_LINE>if (supersededBy != null) {<NEW_LINE>// if there are no queries to add<NEW_LINE>query <MASK><NEW_LINE>for (String feature : s... | = new ArrayList<String>(); |
896,333 | private void initMpEventMessageClass() {<NEW_LINE>String messageType = MessageType.event.name();<NEW_LINE>AccountType accountType = AccountType.MP;<NEW_LINE>messageClassMap.put(new WeixinMessageKey(messageType, EventType.scan.name(), accountType), com.foxinmy.weixin4j.mp.event.ScanEventMessage.class);<NEW_LINE>messageC... | EventType.qualification_verify_success, EventType.naming_verify_fail }; |
833,516 | public edu.stanford.nlp.pipeline.CoreNLPProtos.SemgrexRequest.Dependencies buildPartial() {<NEW_LINE>edu.stanford.nlp.pipeline.CoreNLPProtos.SemgrexRequest.Dependencies result = new edu.stanford.nlp.pipeline.CoreNLPProtos.SemgrexRequest.Dependencies(this);<NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>int to_bitF... | .token_ = tokenBuilder_.build(); |
793,994 | public void marshall(CreateProductRequest createProductRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createProductRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createProductRequest.get... | createProductRequest.getIdempotencyToken(), IDEMPOTENCYTOKEN_BINDING); |
1,224,191 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>* @see com.aptana.ide.core.ftp.IFTPConnectionFileManager#init(java.lang.String, int,<NEW_LINE>* org.eclipse.core.runtime.IPath, java.lang.String, char[], boolean, java.lang.String, java.lang.String,<NEW_LINE>* java.lang.String)<NEW_LINE>*/<NEW_LINE>public void init(String host, int ... | initFTPClient(ftpClient, passive, encoding); |
842,693 | private boolean checkConditionAndStartDragging(RecyclerView rv, MotionEvent e, boolean checkTouchSlop) {<NEW_LINE>if (mDraggingItemInfo != null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>final int touchX = (int) (e.getX() + 0.5f);<NEW_LINE>final int touchY = (int) (e.getY() + 0.5f);<NEW_LINE>mLastTouchX = touchX;<NE... | mWrapperAdapter.getItemDraggableRange(holder, wrappedItemPosition); |
48,777 | public double distance(NumberVector v1, NumberVector v2) {<NEW_LINE>// Dimensionality, and last valid value in second vector:<NEW_LINE>final int dim1 = v1.getDimensionality(), dim2 = v2.getDimensionality();<NEW_LINE>final int m2 = dim2 - 1;<NEW_LINE>// bandsize is the maximum allowed distance to the diagonal<NEW_LINE>f... | = new double[dim2 << 1]; |
1,047,111 | public JSDynamicObject createPrototype(JSRealm realm, JSFunctionObject ctor) {<NEW_LINE>JSContext ctx = realm.getContext();<NEW_LINE>JSDynamicObject prototype;<NEW_LINE>if (ctx.getEcmaScriptVersion() < 6) {<NEW_LINE>Shape shape = JSShape.createPrototypeShape(realm.getContext(), INSTANCE, realm.getObjectPrototype());<NE... | putConstructorProperty(ctx, prototype, ctor); |
1,428,772 | public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = "mycontextvar".split(",");<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>env.compileDeploy("@public create context MyCtx as " + "partition by theString from SupportBean, p00 from SupportBean_S0", path);<NEW_LINE>env.compileDeploy("@... | new SupportBean_S0(5, "P3")); |
1,737,070 | void createMetadataStore() throws MetadataException {<NEW_LINE>Object instance = conf.getProperty(METADATA_STORE_INSTANCE);<NEW_LINE>if (instance != null) {<NEW_LINE>// We have been passed a metadata store instance, so we're going to use that instead of creating a new<NEW_LINE>// instance<NEW_LINE>this.store = (Metadat... | ).replace(";", ","); |
499,863 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see javax.jms.JMSProducer#send(javax.jms.Destination, javax.jms.Message)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public JMSProducer send(Destination dest, Message msg) throws MessageFormatRuntimeException, InvalidDestinationRuntimeException, MessageNotWriteableRuntimeE... | send_internal(dest, msg, _completionListerner); |
1,027,560 | public T isEqualTo(CtPackage expected) {<NEW_LINE>assertNotNull(expected);<NEW_LINE>if (!actual.getSimpleName().equals(expected.getSimpleName())) {<NEW_LINE>throw new AssertionError(String.format("The actual package named %1$s isn't equals to the expected package named %2$s", actual.getSimpleName(), expected.getSimpleN... | >(expected.getPackages()); |
204,688 | public // =============<NEW_LINE>void functionScore(OperatorCall<DuplicateHostCQ> queryLambda, ScoreFunctionCall<ScoreFunctionCreator<DuplicateHostCQ>> functionsLambda, final ConditionOptionCall<FunctionScoreQueryBuilder> opLambda) {<NEW_LINE>DuplicateHostCQ cq = new DuplicateHostCQ();<NEW_LINE>queryLambda.callback(cq)... | .getQuery(), scoreFunctionBuilder)); |
1,460,067 | public RelDataType deriveType(SqlValidator validator, SqlValidatorScope scope, SqlCall call) {<NEW_LINE>final <MASK><NEW_LINE>List<RelDataTypeFieldImpl> columns = new LinkedList<>();<NEW_LINE>columns.add(new RelDataTypeFieldImpl("Trigger_Name", 0, typeFactory.createSqlType(SqlTypeName.VARCHAR)));<NEW_LINE>columns.add(n... | RelDataTypeFactory typeFactory = validator.getTypeFactory(); |
78,343 | private Node createGraphic(ParStyle ps, int idx) {<NEW_LINE>Label foldIndicator = new Label(" ");<NEW_LINE>VBox.setVgrow(foldIndicator, Priority.ALWAYS);<NEW_LINE>foldIndicator.setMaxHeight(Double.MAX_VALUE);<NEW_LINE>foldIndicator.setAlignment(Pos.TOP_LEFT);<NEW_LINE>foldIndicator.setFont(DEFAULT_FONT);<NEW_LINE>if (... | (ps.getIndent())); |
349,450 | protected void appendXsbCommonSlot(XStringBuilder xsb, SofaTracerSpan span) {<NEW_LINE>SofaTracerSpanContext context = span.getSofaTracerSpanContext();<NEW_LINE>Map<String, String> tagWithStr = span.getTagsWithStr();<NEW_LINE>// span end time<NEW_LINE>xsb.append(Timestamp.format(span.getEndTime()));<NEW_LINE>// appName... | .get(CommonSpanTags.CURRENT_THREAD_NAME)); |
212,481 | public static PostgreSQLCommandPacket newInstance(final CommandPacketType commandPacketType, final PostgreSQLPacketPayload payload) {<NEW_LINE>if (!OpenGaussCommandPacketType.isExtendedProtocolPacketType(commandPacketType)) {<NEW_LINE>payload.getByteBuf().skipBytes(1);<NEW_LINE>return getCommandPacket(commandPacketType... | ), payload.getCharset()); |
563,007 | public Object map(Object input) {<NEW_LINE>List<Long> list = (List<Long>) input;<NEW_LINE>switch(mathOp) {<NEW_LINE>case Add:<NEW_LINE>long sum = 0;<NEW_LINE>for (Long w : list) sum += w;<NEW_LINE>return new LongWritable(sum);<NEW_LINE>case Subtract:<NEW_LINE>return list.get(0) - list.get(1);<NEW_LINE>case Multiply:<NE... | ) % list.get(1); |
1,422,573 | public BlobHierarchyListSegment deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {<NEW_LINE>ArrayList<BlobItemInternal> blobItems = new ArrayList<>();<NEW_LINE>ArrayList<BlobPrefix> blobPrefixes = new ArrayList<>();<NEW_LINE>JsonDeserializer<Object> blobItemDeserializer = ctxt.findRootValueDese... | (blobItems).setBlobPrefixes(blobPrefixes); |
1,757,165 | public void addQuads(List<MutableQuad> addTo, ITextureGetter spriteLookup) {<NEW_LINE>if (visible.evaluate()) {<NEW_LINE>float[] f = bakePosition(from);<NEW_LINE>float[] t = bakePosition(to);<NEW_LINE>boolean s = shade.evaluate();<NEW_LINE>int l = (int) (light.evaluate() & 15);<NEW_LINE>int rgba = RenderUtil.swapARGBfo... | 2] - f[2]); |
1,122,207 | final Template loadTemplate(InternalContextAdapter context, String templatePath) {<NEW_LINE>try {<NEW_LINE>RuntimeServices rsvc = VelocityUtil.getEngine().getRuntimeServices();<NEW_LINE>return rsvc.getTemplate(templatePath, getInputEncoding(context));<NEW_LINE>} catch (ResourceNotFoundException rnfe) {<NEW_LINE>if (Vel... | ") at " + VelocityException.formatFileString(this); |
274,847 | private Object populateEntityFromHBaseData(Object entity, HBaseDataWrapper hbaseData, EntityMetadata m, Object rowKey) {<NEW_LINE>try {<NEW_LINE>Map<String, Object> relations = new HashMap<String, Object>();<NEW_LINE>if (entity.getClass().isAssignableFrom(EnhanceEntity.class)) {<NEW_LINE>relations = ((EnhanceEntity) en... | AbstractManagedType) entityType).getAttributes(); |
697,347 | public String[] listFiles() {<NEW_LINE>char[] chars = path.toCharArray();<NEW_LINE>StringList list = CFileSystem.<MASK><NEW_LINE>if (list == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>List<String> files = new ArrayList<>();<NEW_LINE>while (list != null) {<NEW_LINE>if (list.data != null) {<NEW_LINE>chars = new ch... | listFiles(chars, chars.length); |
780,139 | public <ReqT, RespT> ServerCall.Listener<ReqT> interceptCall(ServerCall<ReqT, RespT> call, Metadata headers, ServerCallHandler<ReqT, RespT> next) {<NEW_LINE>final ForwardingServerCall.SimpleForwardingServerCall<ReqT, RespT> validationServerCall = new ForwardingServerCall.SimpleForwardingServerCall<ReqT, RespT>(call) {<... | -> b.request(message)); |
552,078 | public void postProcessRequest(RestRequest restRequest, Callback<Void> callback) {<NEW_LINE>if (restRequest == null || callback == null) {<NEW_LINE>throw new IllegalArgumentException("RestRequest or Callback is null");<NEW_LINE>}<NEW_LINE>Exception exception = null;<NEW_LINE>frontendMetrics.securityServicePostProcessRe... | System.currentTimeMillis() - startTimeMs); |
323,691 | public OBaseIndexEngine createIndexEngine(int indexId, String algorithm, String name, Boolean durableInNonTxMode, OStorage storage, int version, int apiVersion, @SuppressWarnings("SpellCheckingInspection") boolean multiValue, Map<String, String> engineProperties) {<NEW_LINE>if (algorithm == null) {<NEW_LINE>throw new O... | , (OAbstractPaginatedStorage) storage, version); |
1,345,455 | public static void main(String[] args) {<NEW_LINE>// This OAuth 2.0 access scope allows for read-only access to the<NEW_LINE>// authenticated user's account, but not other types of account access.<NEW_LINE>List<String> scopes = Lists.newArrayList(YouTubeScopes.YOUTUBE_READONLY);<NEW_LINE>try {<NEW_LINE>// Authorize the... | setApplicationName("youtube-cmdline-getlivechatid-sample").build(); |
406,052 | private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {<NEW_LINE>stream.defaultReadObject();<NEW_LINE>multimapHeaderEntry = new ValueEntry<>(null, null, 0, null);<NEW_LINE>succeedsInMultimap(multimapHeaderEntry, multimapHeaderEntry);<NEW_LINE>valueSetCapacity = DEFAULT_VALUE_SET_C... | (V) stream.readObject(); |
488,757 | private Object doActualRequest(@NonNull final String apiUrl, @NonNull final Object request, @Nullable final Login login, @Nullable final DeliveryOrderId deliveryOrderRepoIdForLogging) {<NEW_LINE>final Stopwatch stopwatch = Stopwatch.createStarted();<NEW_LINE>final DpdClientLogEvent.DpdClientLogEventBuilder logEventBuil... | MILLISECONDS)).build()); |
827,869 | public NinjaPool parseNinjaPool() throws GenericParsingException {<NEW_LINE>// TODO: consider using generics to condense this and parseNinjaRule into the same<NEW_LINE>// method body.<NEW_LINE>parseExpected(NinjaToken.POOL);<NEW_LINE>String name = asString<MASK><NEW_LINE>ImmutableSortedMap.Builder<NinjaPoolVariable, Ni... | (parseExpected(NinjaToken.IDENTIFIER)); |
1,118,428 | private byte[] applyTransformers(String name, String transformedName, byte[] basicClass, Profiler profiler) {<NEW_LINE>if (this.classLoaderUtil.isClassExcluded(name, transformedName)) {<NEW_LINE>return basicClass;<NEW_LINE>}<NEW_LINE>for (ILegacyClassTransformer transformer : this.getDelegatedLegacyTransformers()) {<NE... | getName().lastIndexOf('.'); |
1,291,121 | public String changePass(@RequestParam String email, @RequestParam(required = false) String newpassword, @RequestParam(required = false) String token, HttpServletRequest req, Model model) {<NEW_LINE>boolean approvedDomain = utils.isEmailDomainApproved(email);<NEW_LINE>boolean validCaptcha = HttpUtils.isValidCaptcha(req... | ).get("msgcode.8"))); |
1,386,720 | public Object resolveArgument(MethodParameter parameter, Message<?> message) {<NEW_LINE>Object payload = message.getPayload();<NEW_LINE>Assert.state(payload instanceof Collection, "This Argument Resolver support only messages with payload as Collection<Message<?>>");<NEW_LINE>Collection<Message<?>> messages = (Collecti... | ("![payload." + expression + "]")); |
752,391 | public void deleteById(String id) {<NEW_LINE>String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>throw logger.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroup... | Utils.getValueFromIdByName(id, "privateEndpoints"); |
998,665 | private static boolean isMalformedRequest(Http2Headers headers) {<NEW_LINE>if (headers.method() == null) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>String method = headers.method().toString();<NEW_LINE>if (method.equals("CONNECT")) {<NEW_LINE>if (headers.scheme() != null || headers.path() != null || headers.authority(... | ), null, null, null); |
662,719 | final ITrx createTrxAndRegister(final String trxName, final boolean autoCommit) {<NEW_LINE>final ITrx trx = createTrx(trxName, autoCommit);<NEW_LINE>// shall never happen, but just to make sure the contract is respected<NEW_LINE>Check.assumeNotNull(trx, "trx not null");<NEW_LINE>trxName2trxLock.lock();<NEW_LINE>try {<N... | .class).onNewTrx(trx); |
527,049 | private void removeCurrentMappings(Path path) {<NEW_LINE>List<HttpServerStub> httpServerStubs = SpringFactoriesLoader.loadFactories(HttpServerStub.class, null);<NEW_LINE>if (httpServerStubs.isEmpty()) {<NEW_LINE>httpServerStubs.add(new WireMockHttpServerStub());<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Files.walkFileTree(pat... | final HttpServerStub wireMockHttpServerStub = new WireMockHttpServerStub(); |
539,789 | // ///////////////////////////////////////////////////<NEW_LINE>// ///////////// API Implementation///////////////////<NEW_LINE>// ///////////////////////////////////////////////////<NEW_LINE>@Override<NEW_LINE>public void execute() {<NEW_LINE>Pair<List<? extends Vpc>, Integer> vpcs = _vpcService.listVpcs(getId(), getV... | = new ArrayList<VpcResponse>(); |
99,135 | // Attach a clause to watcher lists.<NEW_LINE>void attachClause(Clause cr) {<NEW_LINE>assert cr.size() > 1;<NEW_LINE>ArrayList<Watcher> l0 = watches_.get(neg(<MASK><NEW_LINE>if (l0 == null) {<NEW_LINE>l0 = new ArrayList<>();<NEW_LINE>watches_.put(neg(cr._g(0)), l0);<NEW_LINE>}<NEW_LINE>ArrayList<Watcher> l1 = watches_.... | cr._g(0))); |
1,474,304 | public Request<ListChannelsModeratedByAppInstanceUserRequest> marshall(ListChannelsModeratedByAppInstanceUserRequest listChannelsModeratedByAppInstanceUserRequest) {<NEW_LINE>if (listChannelsModeratedByAppInstanceUserRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(ListCh... | <ListChannelsModeratedByAppInstanceUserRequest>(listChannelsModeratedByAppInstanceUserRequest, "AmazonChimeSDKMessaging"); |
787,869 | public final void updateOutputCondition(int newEventsCount, int oldEventsCount) {<NEW_LINE>if (currentReferencePoint == null) {<NEW_LINE>currentReferencePoint = context.getStatementContext().getSchedulingService().getTime();<NEW_LINE>}<NEW_LINE>// If we pull the interval from a variable, then we may need to reschedule<... | ).remove(handle, scheduleSlot); |
970,245 | public static String identifyVM() {<NEW_LINE>SystemInfo si = new SystemInfo();<NEW_LINE>HardwareAbstractionLayer hw = si.getHardware();<NEW_LINE>// Check CPU Vendor<NEW_LINE>String vendor = hw.getProcessor().getProcessorIdentifier().getVendor().trim();<NEW_LINE>if (vmVendor.containsKey(vendor)) {<NEW_LINE>return vmVend... | substring(0, 8) : mac; |
290,546 | public void testFindTaskIds(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>PrintWriter out = response.getWriter();<NEW_LINE>String jndiName = request.getParameter("jndiName");<NEW_LINE>String executorName = request.getParameter("executorId");<NEW_LINE>ObjectInstance <MASK><NEW_LIN... | bean = getPEMBean(mbs, jndiName); |
1,754,091 | private void check(APIRecoverImageMsg msg, Map<String, Quota.QuotaPair> pairs) {<NEW_LINE>String currentAccountUuid = msg.getSession().getAccountUuid();<NEW_LINE>String resourceTargetOwnerAccountUuid = new QuotaUtil().getResourceOwnerAccountUuid(msg.getImageUuid());<NEW_LINE>long imageNumQuota = pairs.get(ImageQuotaCon... | long imageSizeAsked = image.getSize(); |
120,323 | public String applySIPrefix(double value, String unit, int precision) {<NEW_LINE>boolean negative = false;<NEW_LINE>if (value < 0) {<NEW_LINE>negative = true;<NEW_LINE>value *= -1;<NEW_LINE>} else if (value == 0)<NEW_LINE>return "0 " + unit;<NEW_LINE>int exponent = (int) Math.log10(value);<NEW_LINE>if (exponent > 0) {<... | / 3) * (-3); |
1,727,074 | protected void doApply(ApiRequest request, IPolicyContext context, AuthorizationConfig config, IPolicyChain<ApiRequest> chain) {<NEW_LINE>Set<String> userRoles = context.getAttribute(AUTHENTICATED_USER_ROLES, <MASK><NEW_LINE>String verb = request.getType();<NEW_LINE>String resource = request.getDestination();<NEW_LINE>... | (HashSet<String>) null); |
1,114,585 | private void registerClefs(Collection<ClefInter> clefSet) {<NEW_LINE>// Sort clefs by decreasing grade<NEW_LINE>final List<ClefInter> clefList = new ArrayList<>(clefSet);<NEW_LINE>Collections.sort(clefList, Inters.byReverseGrade);<NEW_LINE>for (int idx = 0; idx < clefList.size(); idx++) {<NEW_LINE>final ClefInter inter... | x + box.width) - 1; |
1,590,637 | public SystemDataStreamDescriptor validateDataStreamAccess(String dataStreamName, ThreadContext threadContext) {<NEW_LINE>if (systemDataStreamPredicate.test(dataStreamName)) {<NEW_LINE>SystemDataStreamDescriptor dataStreamDescriptor = featureDescriptors.values().stream().flatMap(feature -> feature.getDataStreamDescript... | final SystemIndexAccessLevel accessLevel = getSystemIndexAccessLevel(threadContext); |
1,427,131 | public static GetMetaTableFullInfoResponse unmarshall(GetMetaTableFullInfoResponse getMetaTableFullInfoResponse, UnmarshallerContext _ctx) {<NEW_LINE>getMetaTableFullInfoResponse.setRequestId(_ctx.stringValue("GetMetaTableFullInfoResponse.RequestId"));<NEW_LINE>getMetaTableFullInfoResponse.setHttpStatusCode(_ctx.intege... | (_ctx.stringValue("GetMetaTableFullInfoResponse.ErrorMessage")); |
1,545,623 | public Request<UpdateAccountPasswordPolicyRequest> marshall(UpdateAccountPasswordPolicyRequest updateAccountPasswordPolicyRequest) {<NEW_LINE>if (updateAccountPasswordPolicyRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<UpdateAccountPass... | (updateAccountPasswordPolicyRequest.getRequireNumbers())); |
1,617,173 | public void marshall(DevicePositionUpdate devicePositionUpdate, AwsJsonWriter jsonWriter) throws Exception {<NEW_LINE>jsonWriter.beginObject();<NEW_LINE>if (devicePositionUpdate.getAccuracy() != null) {<NEW_LINE><MASK><NEW_LINE>jsonWriter.name("Accuracy");<NEW_LINE>PositionalAccuracyJsonMarshaller.getInstance().marshal... | PositionalAccuracy accuracy = devicePositionUpdate.getAccuracy(); |
771,572 | /* Convert a row to a message. If Schema payload field is a Row type, payloadSerializer is required. */<NEW_LINE>PubSubMessage rowToMessage(Row row) {<NEW_LINE>row = castRow(row, row.getSchema(), schema);<NEW_LINE>PubSubMessage.Builder builder = PubSubMessage.newBuilder();<NEW_LINE>if (schema.hasField(MESSAGE_KEY_FIELD... | time = row.getDateTime(EVENT_TIMESTAMP_FIELD); |
1,833,814 | void repaint() {<NEW_LINE>int w = (int) Math.ceil(getWidth());<NEW_LINE>int h = (int) Math.ceil(getHeight());<NEW_LINE>if (w <= 0 || h <= 0)<NEW_LINE>return;<NEW_LINE>if (img == null || img.getWidth() != w || img.getHeight() != h) {<NEW_LINE>img = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);<NEW_LINE>}<NEW_LIN... | .5, getHeight() * .5); |
86,886 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player player = game.getPlayer(source.getControllerId());<NEW_LINE>if (player == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Cards cards = new CardsImpl(player.getLibrary().getTopCards(game, 6));<NEW_LINE>player.<MASK><NEW_LINE>Cards toBattlfield = new C... | revealCards(source, cards, game); |
817,847 | public AccessGroupDefinition composeGroupDefinitionFromDb(UUID groupId) {<NEW_LINE>return persistence.callInTransaction(em -> {<NEW_LINE>AccessGroupDefinitionBuilder groupDefinitionBuilder = AccessGroupDefinitionBuilder.create();<NEW_LINE>Group group = em.find(Group.class, groupId);<NEW_LINE>// noinspection ConstantCon... | .getName()), e); |
1,039,507 | private void init() {<NEW_LINE>exceptionUnmarshallers.add(new InvalidRequestExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshallers.add(new InvalidNextTokenExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshallers.add(new JobStatusExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshallers.add(new NoSuchPublicAccessBlo... | addAll(chainFactory.getGlobalHandlers()); |
470,156 | private void downloadRegion(final String regionName) {<NEW_LINE>// Define offline region parameters, including bounds,<NEW_LINE>// min/max zoom, and metadata<NEW_LINE>// Start the progressBar<NEW_LINE>startProgress();<NEW_LINE>// Create offline definition using the current<NEW_LINE>// style and boundaries of visible ma... | ().getDisplayMetrics().density; |
1,038,123 | public void marshall(AwsAutoScalingLaunchConfigurationDetails awsAutoScalingLaunchConfigurationDetails, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (awsAutoScalingLaunchConfigurationDetails == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<N... | awsAutoScalingLaunchConfigurationDetails.getAssociatePublicIpAddress(), ASSOCIATEPUBLICIPADDRESS_BINDING); |
679,355 | private void registerReflectionForApiResponseSchemaSerialization(BuildProducer<ReflectiveClassBuildItem> reflectiveClass, BuildProducer<ReflectiveHierarchyBuildItem> reflectiveHierarchy, Collection<AnnotationInstance> apiResponseAnnotationInstances) {<NEW_LINE>for (AnnotationInstance apiResponseAnnotationInstance : api... | .value(OPENAPI_SCHEMA_ONE_OF), source); |
1,826,548 | public static DescribeVnPerformanceIndexResponse unmarshall(DescribeVnPerformanceIndexResponse describeVnPerformanceIndexResponse, UnmarshallerContext context) {<NEW_LINE>describeVnPerformanceIndexResponse.setRequestId(context.stringValue("DescribeVnPerformanceIndexResponse.RequestId"));<NEW_LINE>ResolutionRate resolut... | ("DescribeVnPerformanceIndexResponse.DialoguePassRate.UnitValues[" + i + "].RateValue")); |
996,122 | protected boolean doubleCheckValidate(Connection connection, String validateMemberId) throws SQLException {<NEW_LINE>try (Statement statement = connection.createStatement()) {<NEW_LINE>statement.setQueryTimeout(1);<NEW_LINE>try (ResultSet resultSet = statement.executeQuery(validateSQL1)) {<NEW_LINE>boolean flag = false... | VALIDATE_COMMAND_DENIED, e.getMessage()); |
372,197 | private static // of a Pinned sketch before compressing it. Hence the name Hybrid.<NEW_LINE>void compressHybridFlavor(final CompressedState target, final CpcSketch source) {<NEW_LINE>final int srcK = 1 << source.lgK;<NEW_LINE>final PairTable srcPairTable = source.pairTable;<NEW_LINE>final int srcNumPairs = srcPairTable... | srcPairArr, 0, srcNumPairs - 1); |
937,817 | public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {<NEW_LINE>com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(this.getUnknownFields());<NEW_LINE>while (tru... | addFilterStoreNames(input.readString()); |
203,132 | public static <K, V> Map<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8) {<NEW_LINE>Map<K, V> result = new HashMap<>(8);<NEW_LINE>result.put(k1, v1);<NEW_LINE><MASK><NEW_LINE>result.put(k3, v3);<NEW_LINE>result.put(k4, v4);<NEW_LINE>result.put(k5, v5);<NEW_LINE>r... | result.put(k2, v2); |
1,098,321 | public void actionPerformed(ActionEvent e) {<NEW_LINE>new Thread(() -> {<NEW_LINE>String caseMetadataFilePath = null;<NEW_LINE>File caseDirectory = caseNodeData.getDirectory().toFile();<NEW_LINE>File[] filesInDirectory = caseDirectory.listFiles();<NEW_LINE>if (filesInDirectory != null) {<NEW_LINE>for (File file : files... | (ex.getLocalizedMessage())); |
980,826 | void freeLocationListeners() {<NEW_LINE>if (MyDebug.LOG)<NEW_LINE>Log.d(TAG, "freeLocationListeners");<NEW_LINE>if (locationListeners != null) {<NEW_LINE>if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {<NEW_LINE>// Android Lint claims we need location permission for LocationManager.removeUpdates().<NEW_LINE>// als... | d(TAG, "has_coarse_location_permission? " + has_coarse_location_permission); |
890,324 | public int read(InputStream is, int contentLength) {<NEW_LINE>if (is != null) {<NEW_LINE>try {<NEW_LINE>int capacity = (contentLength > 0) <MASK><NEW_LINE>ByteArrayOutputStream buffer = new ByteArrayOutputStream(capacity);<NEW_LINE>int nRead;<NEW_LINE>byte[] data = new byte[16384];<NEW_LINE>while ((nRead = is.read(data... | ? (contentLength + 4096) : 4096; |
1,244,861 | public RemotingCommand queryBrokerTopicConfig(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException {<NEW_LINE>final RemotingCommand response = RemotingCommand.createResponseCommand(QueryDataVersionResponseHeader.class);<NEW_LINE>final QueryDataVersionResponseHeader responseHeader = <MASK>... | (QueryDataVersionResponseHeader) response.readCustomHeader(); |
828,606 | public void run() {<NEW_LINE>JLabel label = new JLabel();<NEW_LINE>// NOI18N<NEW_LINE>Mnemonics.setLocalizedText(label, NbBundle.getMessage(JFRRecordingProvider.class, "MSG_Remote_JFR_dump"));<NEW_LINE>label.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0));<NEW_LINE>JTextField field = new JTextField();<NEW_LINE>l... | , 10, 5, 10)); |
513,483 | private void hookMenu(View view, ExtensionHook hook) {<NEW_LINE>if (!hasView()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ExtensionHookMenu hookMenu = hook.getHookMenuNoInit();<NEW_LINE>if (hookMenu == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>MainMenuBar menuBar = view.getMainFrame().getMainMenuBar();<NEW_LINE>// 2 me... | hookMenu.getTools(), 2); |
25,664 | public void writeTo(Source source, Class<?> t, Type gt, Annotation[] as, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) throws IOException {<NEW_LINE>try {<NEW_LINE>if (source instanceof StreamSource) {<NEW_LINE>StreamSource stream = (StreamSource) source;<NEW_LINE>InputSour... | StreamResult sr = new StreamResult(entityStream); |
676,947 | void insert(GpxDataItem item, SQLiteConnection db) {<NEW_LINE>String fileName = getFileName(item.file);<NEW_LINE>String fileDir = getFileDir(item.file);<NEW_LINE>GPXTrackAnalysis trackAnalysis = item.getAnalysis();<NEW_LINE>String color;<NEW_LINE>if (item.color == 0) {<NEW_LINE>color = "";<NEW_LINE>} else {<NEW_LINE>co... | put(GPX_COL_COLORING_TYPE, item.coloringType); |
1,004,751 | public Element input(String locator, String value) {<NEW_LINE>retryIfEnabled(locator);<NEW_LINE>// focus<NEW_LINE>eval(options.focusJs(locator));<NEW_LINE>Input input = new Input(value);<NEW_LINE>Set<String> pressed = new HashSet();<NEW_LINE>while (input.hasNext()) {<NEW_LINE>char c = input.next();<NEW_LINE>String <MAS... | keyValue = Keys.keyValue(c); |
1,038,593 | /*<NEW_LINE>* testCMTIA()<NEW_LINE>*<NEW_LINE>* MIA01 - Illegal access for CMT<NEW_LINE>* MCM08 - MDB to access SLL and SLR<NEW_LINE>*/<NEW_LINE>public void testXMLCMTIA() throws Exception {<NEW_LINE><MASK><NEW_LINE>FATMDBHelper.putQueueMessage("Request test results", qcfName, cmtRequestQueueName);<NEW_LINE>String resu... | FATMDBHelper.emptyQueue(qcfName, testResultQueueName); |
739,192 | public AuthenticationDetails login(Credentials credentials) throws LoginException {<NEW_LINE>LoginPasswordCredentials loginPasswordCredentials = (LoginPasswordCredentials) credentials;<NEW_LINE>if (webAuthConfig.getStandardAuthenticationUsers().contains(loginPasswordCredentials.getLogin())) {<NEW_LINE>log.debug("User {... | ImmutableMap.of(EXTERNAL_AUTH_USER_SESSION_ATTRIBUTE, true); |
675,687 | public void onTake(Player playerIn, ItemStack stack) {<NEW_LINE>CraftingEvent.fireCraftingEvent(playerIn, stack, <MASK><NEW_LINE>this.checkTakeAchievements(stack);<NEW_LINE>// FIXME FABRIC no crafting hooks<NEW_LINE>// ForgeHooks.setCraftingPlayer(playerIn);<NEW_LINE>final CraftingContainer ic = new CraftingContainer(t... | this.craftingGrid.toContainer()); |
1,598,646 | private DataFlowOpForgeInitializeResult initializeTypeDeclared(DataFlowOpOutputPort port, DataFlowOpForgeInitializeContext context) throws ExprValidationException {<NEW_LINE>produceEventBean = port.getOptionalDeclaredType() != null && !port.getOptionalDeclaredType().isUnderlying();<NEW_LINE>// compile properties to pop... | getEventTypeAvroHandler().getTypeWidenerCustomizer(outputEventType); |
1,847,823 | protected CommandExecutionResult executeArg(ClassDiagram diagram, LineLocation location, RegexResult arg) throws NoSuchColorException {<NEW_LINE>final String idShort = arg.get("NAME", 0);<NEW_LINE>final Ident idNewLong = diagram.buildLeafIdent(idShort);<NEW_LINE>final Code code = diagram.V1972() ? idNewLong : diagram.b... | (Stereotype.build(stereotype)); |
351,443 | public void updateErrorView(View dialogView) {<NEW_LINE>// Allow or disallow touches with other visible windows<NEW_LINE>LinearLayout manageSpace = dialogView.findViewById(R.id.root);<NEW_LINE>manageSpace.setFilterTouchesWhenObscured(PreferenceUtils.shouldDisallowTouchesWithOtherVisibleWindows(dialogView.getContext()))... | ).setVisibility(View.GONE); |
334,140 | @Produces(MediaType.APPLICATION_JSON)<NEW_LINE>@NoCache<NEW_LINE>public Response whoAmI(@Context final HttpHeaders headers) {<NEW_LINE>RealmManager realmManager = new RealmManager(session);<NEW_LINE>AuthenticationManager.AuthResult authResult = new AppAuthManager.BearerTokenAuthenticator(session).setRealm(realm).setCon... | addRealmAccess(realm, user, realmAccess); |
669,349 | private static List<STNode> convertInvalidNodeToMinutiae(STNode invalidNode, DiagnosticCode diagnosticCode, Object... args) {<NEW_LINE>List<STNode> <MASK><NEW_LINE>List<STToken> tokens = invalidNode.tokens();<NEW_LINE>for (STToken token : tokens) {<NEW_LINE>addMinutiaeToList(minutiaeList, token.leadingMinutiae());<NEW_... | minutiaeList = new ArrayList<>(); |
1,060,788 | public void tableChanged(final TableModelEvent e) {<NEW_LINE>if (!isColumnDataIncluded) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Needed when table is sorted.<NEW_LINE>SwingUtilities.invokeLater(() -> {<NEW_LINE>// A cell has been updated<NEW_LINE>int column = table.convertColumnIndexToView(e.getColumn());<NEW_LINE>if ... | getColumnModel().getColumn(column); |
116,224 | public TimecodeConfig unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>TimecodeConfig timecodeConfig = new TimecodeConfig();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth +... | JsonToken token = context.getCurrentToken(); |
109,682 | final UpdateProjectResult executeUpdateProject(UpdateProjectRequest updateProjectRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateProjectRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | resolvedHostPrefix = String.format("monitor."); |
276,097 | public void actionPerformed(ActionEvent evt) {<NEW_LINE>PropertyPanel panel = i18nString.getSupport().getPropertyPanel();<NEW_LINE>I18nString clone = (I18nString) i18nString.clone();<NEW_LINE>panel.setI18nString(i18nString);<NEW_LINE>// NOI18N<NEW_LINE>String title = Util.getString("PROP_cust_dialog_name");<NEW_LINE>Di... | DialogDescriptor.OK_OPTION, DialogDescriptor.CANCEL_OPTION }; |
413,968 | private Map<String, Object> toNotation(Pair<String, String> nameAndValue) {<NEW_LINE>String name = nameAndValue.getLeft();<NEW_LINE>String value = nameAndValue.getRight();<NEW_LINE>Map<String, Object> ret = new HashMap<>();<NEW_LINE>ret.put(NAME_KEY, name);<NEW_LINE>if (value.startsWith(BRANCH_KEYWORD)) {<NEW_LINE>ret.... | (TAG_KEYWORD.length())); |
1,118,169 | public final void onBindViewHolder(@NonNull MultichoiceViewHolder<T> holder, final int position) {<NEW_LINE>boolean isSelected = map.containsKey(getItemId<MASK><NEW_LINE>View master = getMaster(holder.innerHolder);<NEW_LINE>updateLayoutParams(master, holder.censor, isSelected);<NEW_LINE>if (master != null) {<NEW_LINE>m... | (holder.getBindingAdapterPosition())); |
1,525,374 | private Page generateNextPage() {<NEW_LINE>// generate 'n' pages for every input page, where n is the number of grouping sets<NEW_LINE>Block[] outputBlocks = new Block[types.size()];<NEW_LINE>for (int i = 0; i < groupingSetInputs[currentGroupingSet].length; i++) {<NEW_LINE>if (groupingSetInputs[currentGroupingSet][i] =... | groupingSetInputs[currentGroupingSet][i]); |
1,328,139 | public void initialize(TemplateWizard wizard) {<NEW_LINE>this.wizard = wizard;<NEW_LINE>// NOI18N<NEW_LINE>selectedText = (String) wizard.getProperty("selectedText");<NEW_LINE>Project project = Templates.getProject(wizard);<NEW_LINE>Sources sources = project.getLookup().lookup(org.netbeans.api.project.Sources.class);<N... | wizard.getProperty(WizardDescriptor.PROP_CONTENT_DATA); |
1,363,208 | public void execute() {<NEW_LINE>try {<NEW_LINE>List<BibEntry> bes = stateManager.getSelectedEntries();<NEW_LINE>if ((bes == null) || bes.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>NamedCompound ce = new NamedCompound(undoText);<NEW_LINE>List<BibEntry> besCopy = new ArrayList<>(bes);<NEW_LINE>for (BibEntry bibEn... | getUndoManager().addEdit(ce); |
308,464 | private void reverseGeocode(Point point) {<NEW_LINE>final ListenableFuture<List<GeocodeResult>> results = mLocatorTask.reverseGeocodeAsync(point, mReverseGeocodeParameters);<NEW_LINE>try {<NEW_LINE>List<GeocodeResult> geocodeResults = results.get();<NEW_LINE>if (!geocodeResults.isEmpty()) {<NEW_LINE>// get the top resu... | get("StAddr").toString(); |
612,965 | public void marshall(CustomRoutingAccelerator customRoutingAccelerator, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (customRoutingAccelerator == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(customRoutin... | customRoutingAccelerator.getStatus(), STATUS_BINDING); |
1,663,966 | private static void tryAssertionCrontab(RegressionEnvironment env, int days) {<NEW_LINE>String[] fields = "symbol".split(",");<NEW_LINE>sendEvent(env, "S1", 0);<NEW_LINE>env.assertListenerNotInvoked("s0");<NEW_LINE>sendTimeEvent(env, days, 17, 14, 59, 0);<NEW_LINE>sendEvent(env, "S2", 0);<NEW_LINE>env.assertListenerNot... | 18, 0, 0, 0); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.