idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
84,595 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<NEW_LINE>try {<NEW_LINE>response.setContentType("application/json");<NEW_LINE>response.setStatus(HttpServletResponse.SC_OK);<NEW_LINE>response.setCharacterEncoding("UTF-8");<NEW_LINE>response.setHeader(... | .parseInt(size), model); |
115,934 | protected static void calculateSelectivityCoeffs(List<DoubleObjPair<DAFile>> daFiles, NumberVector query, double epsilon) {<NEW_LINE>final int dimensions = query.getDimensionality();<NEW_LINE>double[<MASK><NEW_LINE>double[] upperVals = new double[dimensions];<NEW_LINE>VectorApproximation queryApprox = calculatePartialA... | ] lowerVals = new double[dimensions]; |
467,627 | public void processFilter(final PwmApplicationMode mode, final PwmRequest pwmRequest, final PwmFilterChain chain) throws IOException, ServletException, PwmUnrecoverableException {<NEW_LINE>// output request information to debug log<NEW_LINE>final <MASK><NEW_LINE>final PwmURL pwmURL = pwmRequest.getURL();<NEW_LINE>if (!... | Instant startTime = Instant.now(); |
60,650 | public MethodDeclaration erased() {<NEW_LINE>Map<String, TypeReference> table = new HashMap<>();<NEW_LINE>for (TypeParameter parameter : typeParameters) {<NEW_LINE>table.put(parameter.name(), parameter.extendsBound());<NEW_LINE>}<NEW_LINE>TypeReference newReturnType = erase(returnType(), table);<NEW_LINE>Parameter[] ne... | (exceptions[i], table); |
292,368 | public void marshall(TranscriptFilter transcriptFilter, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (transcriptFilter == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(transcriptFilter.getTranscriptFilter... | transcriptFilter.getRelativeTimeRange(), RELATIVETIMERANGE_BINDING); |
1,505,641 | public void process(List<AddRemoveListItem<Symbol>> addRemoveList, TableData<Symbol> tableData, TaskMonitor monitor) throws CancelledException {<NEW_LINE>Set<AddRemoveListItem<Symbol>> items = coalesceAddRemoveItems(addRemoveList);<NEW_LINE>//<NEW_LINE>// Hash map the existing values so that we can use any object insid... | setMessage("Removing " + n + " items..."); |
567,876 | public com.amazonaws.services.applicationinsights.model.ResourceNotFoundException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.applicationinsights.model.ResourceNotFoundException resourceNotFoundException = new com.amazonaws.services.applicationinsights.model... | String currentParentElement = context.getCurrentParentElement(); |
445,849 | private List<File> removeFilesIfExists(List<File> files, ZipParameters zipParameters, ProgressMonitor progressMonitor, Zip4jConfig zip4jConfig) throws ZipException {<NEW_LINE>List<File> filesToAdd = new ArrayList<>(files);<NEW_LINE>if (!zipModel.getZipFile().exists()) {<NEW_LINE>return filesToAdd;<NEW_LINE>}<NEW_LINE>f... | removeFile(fileHeader, progressMonitor, zip4jConfig); |
1,766,363 | public static final String toEnglish(int number) {<NEW_LINE>int x = number;<NEW_LINE>if (x > Integer.MAX_VALUE || x <= Integer.MIN_VALUE)<NEW_LINE>throw new IllegalArgumentException("Number has to be <= Integer.MAX_VALUE and > Integer.MIN_VALUE. number=" + x);<NEW_LINE>StringBuilder builder = new StringBuilder();<NEW_L... | .append(handleUnderOneThousand(x)); |
1,836,751 | public void whenStreamTimeoutReachedThenEventsFlushed() {<NEW_LINE>final TestStreamingClient client = TestStreamingClient.create(URL, subscription.getId(), "batch_flush_timeout=600&batch_limit=1000&stream_timeout=2&max_uncommitted_events=1000").start();<NEW_LINE>waitFor(() -> assertThat(client.getSessionId(), Matchers.... | , Matchers.hasSize(0)); |
1,021,115 | public static SecurityId optionId(ExchangeId exchangeId, EtdContractCode contractCode, YearMonth expiryMonth, EtdVariant variant, int version, PutCall putCall, double strikePrice, YearMonth underlyingExpiryMonth) {<NEW_LINE>ArgChecker.notNull(exchangeId, "exchangeId");<NEW_LINE>ArgChecker.notNull(contractCode, "contrac... | ArgChecker.notNull(variant, "variant"); |
533,816 | private boolean applicationOverrideRuleValid(ApplicationOverrideRule rule) {<NEW_LINE>String ruleName = rule.getName();<NEW_LINE>boolean valid = true;<NEW_LINE>if (rule.getApplication() == null) {<NEW_LINE>_w.redFlag(String.format("No application set for application-override rule %s", ruleName));<NEW_LINE>valid = false... | .format("No protocol set for application-override rule %s", ruleName)); |
674,841 | final DeleteDatasetResult executeDeleteDataset(DeleteDatasetRequest deleteDatasetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteDatasetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteDataset"); |
1,419,767 | /* (non-Javadoc)<NEW_LINE>* @see org.netbeans.modules.web.beans.analysis.analyzer.AbstractTypedAnalyzer#checkSpecializes(javax.lang.model.element.Element, javax.lang.model.type.TypeMirror, java.util.List, java.util.concurrent.atomic.AtomicBoolean, org.netbeans.modules.web.beans.analysis.analyzer.ElementAnalyzer.Result)... | getElementUtilities().enclosingTypeElement(overriddenMethod); |
1,008,715 | private void printPropertyData(final ClassDef def) {<NEW_LINE>final Set<PropertyDesc> properties = def.getProperties();<NEW_LINE>if (properties != null && !properties.isEmpty()) {<NEW_LINE>println(detail, "<tr><td colspan=\"2\">");<NEW_LINE>println(detail, "<table>");<NEW_LINE>println(detail, "<tr class=\"TableHeadingC... | , property.defaultValue())); |
1,434,658 | public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception {<NEW_LINE>NetworkMessage networkMessage = (NetworkMessage) msg;<NEW_LINE>if (networkMessage.getMessage() instanceof Command) {<NEW_LINE>Command command = (Command) networkMessage.getMessage();<NEW_LINE>Object encodedComma... | .getRemoteAddress()), promise); |
806,464 | public static ConnectionProfile buildDefaultConnectionProfile(Settings settings) {<NEW_LINE>int connectionsPerNodeRecovery = TransportSettings.CONNECTIONS_PER_NODE_RECOVERY.get(settings);<NEW_LINE>int connectionsPerNodeBulk = TransportSettings.CONNECTIONS_PER_NODE_BULK.get(settings);<NEW_LINE>int connectionsPerNodeReg ... | .CONNECT_TIMEOUT.get(settings)); |
1,317,213 | protected String doIt() throws Exception {<NEW_LINE>// Instance current Payment Selection<NEW_LINE>MPaySelection paySelection = new MPaySelection(getCtx(), <MASK><NEW_LINE>m_SeqNo = paySelection.getLastLineNo();<NEW_LINE>// Loop for keys<NEW_LINE>for (Integer key : getSelectionKeys()) {<NEW_LINE>// get values from resu... | getRecord_ID(), get_TrxName()); |
101,878 | private static AbstractStrategy readSearchAnnotation(EAnnotation e, Model solver, StringBuilder description) {<NEW_LINE>Expression[] exps = new Expression[e.exps.size()];<NEW_LINE>e.exps.toArray(exps);<NEW_LINE>Search search = Search.valueOf(e.id.value);<NEW_LINE>if (search == Search.seq_search) {<NEW_LINE>EArray eArra... | e.exps.get(0); |
1,362,453 | public RunCommandParameters unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>RunCommandParameters runCommandParameters = new RunCommandParameters();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = con... | String currentParentElement = context.getCurrentParentElement(); |
1,638,383 | public com.amazonaws.services.route53resolver.model.InvalidParameterException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.route53resolver.model.InvalidParameterException invalidParameterException = new com.amazonaws.services.route53resolver.model.InvalidPara... | String currentParentElement = context.getCurrentParentElement(); |
122,075 | void initialize(DemoFrame frame, JTabbedPane tabbedPane) {<NEW_LINE>this.frame = frame;<NEW_LINE>this.tabbedPane = tabbedPane;<NEW_LINE>// register F1, F2, ... keys to switch to Light, Dark or other LaFs<NEW_LINE>registerSwitchToLookAndFeel(KeyEvent.VK_F1, <MASK><NEW_LINE>registerSwitchToLookAndFeel(KeyEvent.VK_F2, Fla... | FlatLightLaf.class.getName()); |
364,848 | public static void trackCommentReplyWithDetails(boolean isQuickReply, SiteModel site, CommentModel comment, AnalyticsCommentActionSource source) {<NEW_LINE>AnalyticsTracker.Stat legacyTracker = null;<NEW_LINE>if (source == AnalyticsCommentActionSource.NOTIFICATIONS) {<NEW_LINE>legacyTracker = isQuickReply ? AnalyticsTr... | AnalyticsTracker.track(stat, properties); |
840,889 | private void determineTags(BuildableJob job, LayerDetail layer, Element layerTag) {<NEW_LINE>Set<String> newTags = new LinkedHashSet<String>();<NEW_LINE>String tags = layerTag.getChildTextTrim("tags");<NEW_LINE>if (tags == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (tags.length() == 0) {<NEW_LINE>return;<NEW_LINE>... | , "").split("\\|"); |
1,769,075 | public static DetailDigitalTemplateResponse unmarshall(DetailDigitalTemplateResponse detailDigitalTemplateResponse, UnmarshallerContext _ctx) {<NEW_LINE>detailDigitalTemplateResponse.setRequestId(_ctx.stringValue("DetailDigitalTemplateResponse.RequestId"));<NEW_LINE>detailDigitalTemplateResponse.setErrorCode(_ctx.strin... | (_ctx.stringValue("DetailDigitalTemplateResponse.Data.SmsTemplateCode")); |
1,449,089 | final DeleteUserProfileResult executeDeleteUserProfile(DeleteUserProfileRequest deleteUserProfileRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteUserProfileRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteUserProfile"); |
436,227 | public DeploymentSpec read(String xmlForm) {<NEW_LINE>deprecatedElements.clear();<NEW_LINE>Element root = XML.getDocument(xmlForm).getDocumentElement();<NEW_LINE>if (!root.getTagName().equals(deploymentTag))<NEW_LINE>illegal("The root tag must be <deployment>");<NEW_LINE>if (isEmptySpec(root))<NEW_LINE>return Deploymen... | Optional.empty(), steps); |
907,369 | public void stopPreview() {<NEW_LINE>if (MyDebug.LOG)<NEW_LINE>Log.d(TAG, "stopPreview");<NEW_LINE>if (camera == null || captureSession == null) {<NEW_LINE>if (MyDebug.LOG)<NEW_LINE>Log.d(TAG, "no camera or capture session");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>// pending_request_when_ready = null;<NEW_... | "message: " + e.getMessage()); |
203,336 | public Symbol visitMatchPredicate(MatchPredicate node, ExpressionAnalysisContext context) {<NEW_LINE>Map<Symbol, Symbol> identBoostMap = new HashMap<>(node.idents().size());<NEW_LINE>DataType<?> columnType = null;<NEW_LINE>HashSet<RelationName> relationsInColumns = new HashSet<>();<NEW_LINE>for (MatchPredicateColumnIde... | .accept(this, context)); |
818,521 | /* Take the string as an input file or URI, and<NEW_LINE>* try to read using the current default input syntax.<NEW_LINE>*/<NEW_LINE>protected void readInput(String inputName) {<NEW_LINE>List<IncludeQueueEntry> queue = new ArrayList<>();<NEW_LINE>queue.add(<MASK><NEW_LINE>while (!queue.isEmpty()) {<NEW_LINE>IncludeQueue... | new IncludeQueueEntry(inputName, null)); |
938,640 | private void showFileListDialog(final FileSender sender) {<NEW_LINE>if (!Systems.isNetworkAvailable(this)) {<NEW_LINE>Dialogs.alert(getString(R.string.sorry), getString(R.string.no_network_message), this);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final File gpxFolder = new File(preferenceHelper.getGpsLoggerFolder());<NEW_L... | Files.fromFolder(gpxFolder, sender); |
552,141 | private static boolean verifyLabelMarkerData(Rule rule, String key, String value, Environment env) throws InterruptedException {<NEW_LINE>Preconditions.checkArgument(key.startsWith("FILE:"));<NEW_LINE>try {<NEW_LINE>RootedPath rootedPath;<NEW_LINE>String fileKey = key.substring(5);<NEW_LINE>if (LabelValidator.isAbsolut... | getValueOrThrow(fileSkyKey, IOException.class); |
486,851 | public static void registerPlayer(final Player player) throws InterruptedException {<NEW_LINE>if (player == null) {<NEW_LINE>throw new IllegalArgumentException("player cannot be null");<NEW_LINE>}<NEW_LINE>configuration.capitalizeEngineId(player);<NEW_LINE>PLAYERS_LOCK.writeLock().lock();<NEW_LINE>try {<NEW_LINE>if (is... | .writeLock().lock(); |
469,804 | public static MethodTree createToStringMethod(WorkingCopy wc, Iterable<? extends VariableElement> fields, String typeName, boolean useStringBuilder) {<NEW_LINE>TreeMaker make = wc.getTreeMaker();<NEW_LINE>Set<Modifier> mods = EnumSet.of(Modifier.PUBLIC);<NEW_LINE>List<AnnotationTree> annotations = new LinkedList<>();<N... | <ExpressionTree>emptyList())); |
1,415,210 | private HoldingContainer visitValueVectorWriteExpression(ValueVectorWriteExpression e, ClassGenerator<?> generator) {<NEW_LINE>final LogicalExpression child = e.getChild();<NEW_LINE>final HoldingContainer inputContainer = child.accept(this, generator);<NEW_LINE>JBlock block = generator.getEvalBlock();<NEW_LINE>JExpress... | .isSingularRepeated() ? "copyAsValueSingle" : "copyAsValue"; |
1,440,319 | public BooleanExpr toBooleanExpr(JuniperConfiguration jc, Configuration c, Warnings warnings) {<NEW_LINE>PrefixList pl = jc.getMasterLogicalSystem().getPrefixLists().get(_prefixList);<NEW_LINE>if (pl == null) {<NEW_LINE>warnings.redFlag("Reference to undefined prefix-list: \"" + _prefixList + "\"");<NEW_LINE>return Boo... | .PERMIT, prefix, longerLineRange)); |
809,737 | public Mono<Response<Void>> simulateEvictionWithResponseAsync(String resourceGroupName, String vmName) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName... | error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); |
151,247 | protected void initView() {<NEW_LINE>illust = Shaft.sGson.fromJson(Params.EXAMPLE_ILLUST, IllustsBean.class);<NEW_LINE>baseBind.toolbar.toolbar.setNavigationOnClickListener(v -> mActivity.finish());<NEW_LINE>baseBind.toolbar.toolbar.setTitle(R.string.string_242);<NEW_LINE>baseBind.showNow.setOnClickListener(new View.On... | Shaft.sSettings.setHasP0(isChecked); |
1,196,864 | static private Font createFont(String filename, int size) throws IOException, FontFormatException {<NEW_LINE>File fontFile = Platform.getContentFile("lib/fonts/" + filename);<NEW_LINE>if (fontFile == null || !fontFile.exists()) {<NEW_LINE>String msg = "Could not find required fonts. ";<NEW_LINE>// This gets the JAVA_HO... | BufferedInputStream(new FileInputStream(fontFile)); |
825,575 | public Request<ModifyInstanceCreditSpecificationRequest> marshall(ModifyInstanceCreditSpecificationRequest modifyInstanceCreditSpecificationRequest) {<NEW_LINE>if (modifyInstanceCreditSpecificationRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>R... | InstanceCreditSpecificationRequest>) modifyInstanceCreditSpecificationRequest.getInstanceCreditSpecifications(); |
1,457,418 | private void updateToRepository(final TrafficRuleConfiguration toBeCreatedRuleConfiguration, final Optional<TrafficRuleConfiguration> currentRuleConfiguration) {<NEW_LINE>MetaDataContexts metaDataContexts = ProxyContext.getInstance().getContextManager().getMetaDataContexts();<NEW_LINE>Collection<RuleConfiguration> glob... | > metaDataPersistService = metaDataContexts.getMetaDataPersistService(); |
708,375 | private static void fdctRow(int[] block, int off) {<NEW_LINE>int z0 = block[off + 0] - block[off + 7];<NEW_LINE>int z1 = block[off + 1] - block[off + 6];<NEW_LINE>int z2 = block[off + 2] - block[off + 5];<NEW_LINE>int z3 = block[off + 3<MASK><NEW_LINE>int z4 = block[off + 0] + block[off + 7];<NEW_LINE>int z5 = block[of... | ] - block[off + 4]; |
1,324,492 | private void configureIdeaWorkspace(final Project project) {<NEW_LINE>if (isRoot()) {<NEW_LINE>final IdeaWorkspace workspace = project.getObjects().newInstance(IdeaWorkspace.class);<NEW_LINE>workspace.setIws(new <MASK><NEW_LINE>ideaModel.setWorkspace(workspace);<NEW_LINE>final TaskProvider<GenerateIdeaWorkspace> task =... | XmlFileContentMerger(new XmlTransformer())); |
1,452,314 | private static final void exportSequence0(Configuration configuration, InformationSchema result, Sequence<?> q) {<NEW_LINE>org.jooq.util.xml.jaxb.Sequence iq = new org.jooq.util.xml.jaxb.Sequence();<NEW_LINE>String catalogName = catalogName(q);<NEW_LINE>String schemaName = schemaName(q);<NEW_LINE>if (!isBlank(catalogNa... | (), BigInteger.class)); |
152,854 | private static Config resolveConfig(@Nonnull EnvironmentOptions options, Path userdir, String... names) {<NEW_LINE>Config application = ConfigFactory.empty();<NEW_LINE>String basedir = options.getBasedir();<NEW_LINE>Path[] rootdirs;<NEW_LINE>String[] cpdirs;<NEW_LINE>if (basedir == null) {<NEW_LINE>rootdirs = new Path[... | .resolve("conf"), userdir }; |
471,985 | public void onEvent(FlowableEvent event) {<NEW_LINE>if (isValidEvent(event) && event instanceof FlowableEngineEvent) {<NEW_LINE>FlowableEngineEvent engineEvent = (FlowableEngineEvent) event;<NEW_LINE>ExecutionEntity execution = null;<NEW_LINE>if (Context.isExecutionContextActive()) {<NEW_LINE>execution = Context<MASK><... | .getExecutionContext().getExecution(); |
406,882 | protected String layoutCL(final JLabel label, final FontMetrics fontMetrics, final String text, final Icon icon, final Rectangle viewR, final Rectangle iconR, final Rectangle textR) {<NEW_LINE>final ZoomableLabel zLabel = (ZoomableLabel) label;<NEW_LINE>final float zoom = zLabel.getZoom();<NEW_LINE>if (isPainting) {<NE... | zLabel.getMaximumWidth() / zoom); |
922,859 | public static SearchEditingProjectResponse unmarshall(SearchEditingProjectResponse searchEditingProjectResponse, UnmarshallerContext _ctx) {<NEW_LINE>searchEditingProjectResponse.setRequestId(_ctx.stringValue("SearchEditingProjectResponse.RequestId"));<NEW_LINE>searchEditingProjectResponse.setTotal(_ctx.integerValue("S... | ("SearchEditingProjectResponse.ProjectList[" + i + "].ProjectId")); |
1,067,775 | public void onMessage(ServiceBusReceivedMessageContext messageContext) {<NEW_LINE>Checkpointer checkpointer = new AzureCheckpointer(() -> Mono.fromRunnable(messageContext::complete), () -> Mono.fromRunnable(messageContext::abandon));<NEW_LINE>Map<String, Object> headers = new HashMap<>();<NEW_LINE>headers.put(ServiceBu... | , t)).block(); |
592,308 | protected void initChannel(Channel channel) {<NEW_LINE>ChannelPipeline pipeline = channel.pipeline();<NEW_LINE>if (config.metricsRecorder != null) {<NEW_LINE>ChannelOperations.addMetricsHandler(channel, config.metricsRecorder, remoteAddress, onServer);<NEW_LINE>if (Metrics.isInstrumentationAvailable()) {<NEW_LINE>ByteB... | ).metric(), alloc); |
648,641 | private void doLogEvent(final PwmLogEvent logEvent) {<NEW_LINE>pushMessageToLog4j(logEvent);<NEW_LINE>try {<NEW_LINE>if (!localDBDisabled && localDBLogger != null && minimumDbLogLevel != null) {<NEW_LINE>if (logEvent.getLevel().compareTo(minimumDbLogLevel) >= 0) {<NEW_LINE>localDBLogger.writeEvent(logEvent);<NEW_LINE>}... | "errorMessage", logEvent.getMessage()); |
1,656,086 | private void onNoLongerPrimary(Exception failure) {<NEW_LINE>final Throwable cause = SQLExceptions.unwrap(failure);<NEW_LINE>final boolean nodeIsClosing = cause instanceof NodeClosedException;<NEW_LINE>final String message;<NEW_LINE>if (nodeIsClosing) {<NEW_LINE>message = String.format(Locale.ROOT, "node with primary [... | "primary shard [%s] was demoted while failing replica shard", primary.routingEntry()); |
1,351,198 | public static List<ListenerConfig> buildMinionAdminConfigs(PinotConfiguration minionConf) {<NEW_LINE>List<ListenerConfig> listeners = new ArrayList<>();<NEW_LINE>String adminApiPortString = minionConf.getProperty(CommonConstants.Minion.CONFIG_OF_ADMIN_API_PORT);<NEW_LINE>if (adminApiPortString != null) {<NEW_LINE>liste... | HTTP_PROTOCOL, new TlsConfig())); |
1,052,745 | private void initView(Context context, AttributeSet attrs) {<NEW_LINE>color = Color.WHITE;<NEW_LINE>width = dpToPx(context, DEFAULT_WIDTH);<NEW_LINE>shadowPosition = dpToPx(getContext(), DEFAULT_SHADOW_POSITION);<NEW_LINE>speedOfDegree = DEFAULT_SPEED_OF_DEGREE;<NEW_LINE>if (null != attrs) {<NEW_LINE>TypedArray typedAr... | setStyle(Paint.Style.STROKE); |
234,713 | final GetTablesResult executeGetTables(GetTablesRequest getTablesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getTablesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_L... | (super.beforeMarshalling(getTablesRequest)); |
1,768,485 | static AdminEventEntity convertAdminEvent(AdminEvent adminEvent, boolean includeRepresentation) {<NEW_LINE>AdminEventEntity adminEventEntity = new AdminEventEntity();<NEW_LINE>adminEventEntity.setId(adminEvent.getId() == null ? UUID.randomUUID().toString() : adminEvent.getId());<NEW_LINE>adminEventEntity.setTime(adminE... | setResourceType(adminEvent.getResourceTypeAsString()); |
664,540 | protected TimerDeclarationImpl createTimer(BpmnParse bpmnParse, TimerEventDefinition timerEventDefinition, ScopeImpl timerActivity, String jobHandlerType) {<NEW_LINE>TimerDeclarationType type = null;<NEW_LINE>Expression expression = null;<NEW_LINE>Expression endDate = null;<NEW_LINE>Expression calendarName = null;<NEW_... | createExpression(timerEventDefinition.getTimeCycle()); |
324,423 | /*<NEW_LINE>* Initializes the <code>PluralRules</code> object.<NEW_LINE>* Postcondition:<br/><NEW_LINE>* <code>ulocale</code> : is <code>locale</code><br/><NEW_LINE>* <code>pluralRules</code>: if <code>rules</code> != <code>null</code><NEW_LINE>* it's set to rules, otherwise it is ... | forLocale(ulocale, type) : rules; |
535,000 | private void initSigning(PropertyEvaluator eval) {<NEW_LINE>signing = eval.getProperty(JNLP_SIGNING);<NEW_LINE>if (signing == null)<NEW_LINE>signing = "";<NEW_LINE>signingKeyStore = eval.getProperty(JNLP_SIGNING_KEYSTORE);<NEW_LINE>if (signingKeyStore == null)<NEW_LINE>signingKeyStore = "";<NEW_LINE>signingKeyAlias = e... | getProperty(JNLP_SIGNING_KEYSTORE_PASSWORD).toCharArray(); |
1,311,069 | Command<HostPort> sentinelMaster(HostPort sentinel) {<NEW_LINE>Command<HostPort> command = sentinelManager.getMasterOfMonitor(new Sentinel(String.format("%s:%d", sentinel.getHost(), sentinel.getPort()), sentinel.getHost(), sentinel<MASK><NEW_LINE>command.future().addListener(innerFuture -> {<NEW_LINE>if (innerFuture.is... | .getPort()), sentinelMonitorName); |
1,745,940 | public ListenableFuture<byte[]> downloadBlob(RemoteActionExecutionContext context, Digest digest) {<NEW_LINE>if (digest.getSizeBytes() == 0) {<NEW_LINE>return EMPTY_BYTES;<NEW_LINE>}<NEW_LINE>ByteArrayOutputStream bOut = new ByteArrayOutputStream((int) digest.getSizeBytes());<NEW_LINE>SettableFuture<byte[]> outerF = Se... | (e).log("Unexpected exception"); |
1,030,688 | private void findBPartner() {<NEW_LINE>String query = bPartnerName.getText();<NEW_LINE>//<NEW_LINE>if (query == null || query.length() == 0)<NEW_LINE>return;<NEW_LINE>// unchanged<NEW_LINE>if (posPanel.hasBPartner() && posPanel.compareBPName(query))<NEW_LINE>return;<NEW_LINE>query = query.toUpperCase();<NEW_LINE>// Tes... | = (allNumber ? null : query); |
669,188 | public void write(final char[] cbuf, final int off, final int len) throws IOException {<NEW_LINE>if (cbuf == null) {<NEW_LINE>throw new NullPointerException();<NEW_LINE>} else if ((off < 0) || (off > cbuf.length) || (len < 0) || ((off + len) > cbuf.length) || ((off + len) < 0)) {<NEW_LINE>throw new IndexOutOfBoundsExce... | write(cbuf, off, len); |
931,060 | private JPanel createPortPanel() {<NEW_LINE>portField = new JTextField(HttpMirrorControl.DEFAULT_PORT_S, 8);<NEW_LINE>portField.setName(HttpMirrorControl.PORT);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>JLabel label = new JLabel(JMeterUtils.getResString("port"));<NEW_LINE>label.setLabelFor(portField);<NEW_LINE>maxPoolSizeField ... | (JMeterUtils.getResString("httpmirror_max_queue_size")); |
1,029,171 | public String parseIdentifier(boolean allowReservedWords) throws ParseException {<NEW_LINE>Token<JsTokenType<MASK><NEW_LINE>String s = t.text;<NEW_LINE>switch(t.type) {<NEW_LINE>case WORD:<NEW_LINE>if (!allowReservedWords) {<NEW_LINE>Keyword k = Keyword.fromString(decodeIdentifier(s));<NEW_LINE>if (null != k) {<NEW_LIN... | > t = tq.peek(); |
511,818 | private static void tryAssertionSix(RegressionEnvironment env, String expression) {<NEW_LINE>env.compileDeploy(expression).addListener("s0");<NEW_LINE>String[] fields = "valh0,valh1,valh2".split(",");<NEW_LINE>sendBeanInt(env, "S00", 1, 1, 1);<NEW_LINE>env.assertPropsPerRowIteratorAnyOrder("s0", fields, new Object[][] ... | "H01", "H11", "H01-H21" } }); |
337,358 | public void show(Window owner) {<NEW_LINE>InvalidationListener viewTypeListener = <MASK><NEW_LINE>if (dialog != null) {<NEW_LINE>dialog.show();<NEW_LINE>} else {<NEW_LINE>TimeRangeView timeRange = getSettingsView().getTimeRangeView();<NEW_LINE>Scene scene = new Scene(this);<NEW_LINE>dialog = new Stage();<NEW_LINE>dialo... | obs -> loadDropDownValues(getDate()); |
1,723,552 | private LatLon parseOlcCode(String olcText) {<NEW_LINE>LatLon loc = null;<NEW_LINE>stopSearchAsyncTask();<NEW_LINE>updateProgressBar(false);<NEW_LINE>String olcTextCode;<NEW_LINE>String cityName = "";<NEW_LINE>String[] olcTextParts = olcText.split(" ");<NEW_LINE>if (olcTextParts.length > 1) {<NEW_LINE>olcTextCode = olc... | OpenLocationCode code = new OpenLocationCode(olcTextCode); |
904,165 | final GetSnapshotBlockResult executeGetSnapshotBlock(GetSnapshotBlockRequest getSnapshotBlockRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getSnapshotBlockRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | endClientExecution(awsRequestMetrics, request, response); |
686,285 | public void putMedia(@NonNull final String streamName, @NonNull final String containerType, final long streamStartTimeInMillis, final boolean absoluteFragmentTimes, final boolean ackRequired, @NonNull final String dataEndpoint, long timeoutInMillis, @Nullable final KinesisVideoCredentialsProvider credentialsProvider, @... | (timecodeType).putMediaDestinationUri(putMediaUri); |
67,462 | private void createBeanSymbol(DOMNode node, IJavaProject project, String docURI, long lastModified, TextDocument document, List<CachedSymbol> generatedSymbols) throws Exception {<NEW_LINE>String beanID = null;<NEW_LINE>int symbolStart = 0;<NEW_LINE>int symbolEnd = 0;<NEW_LINE>String beanClass = null;<NEW_LINE>List<DOMA... | String name = attribute.getName(); |
1,035,884 | public com.amazonaws.services.mgn.model.ThrottlingException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.mgn.model.ThrottlingException throttlingException = new com.amazonaws.services.mgn.model.ThrottlingException(null);<NEW_LINE>if (context.isStartOfDocument... | JsonToken token = context.getCurrentToken(); |
1,506,561 | private static void checkFieldType(String columnName, Type columnType, FieldType fieldType) {<NEW_LINE>if (columnType == BIGINT) {<NEW_LINE>checkFieldTypeOneOf(fieldType, columnName, columnType, FieldType.BYTE, FieldType.SHORT, FieldType.INT, FieldType.LONG);<NEW_LINE>} else if (columnType == INTEGER) {<NEW_LINE>checkF... | columnName, columnType, FieldType.BYTE); |
503,983 | public byte[] generateSignature(byte[] message) {<NEW_LINE>// # Input: Message M, private key SK = (SK.seed, SK.prf, PK.seed, PK.root)<NEW_LINE>// # Output: SPHINCS+ signature SIG<NEW_LINE>// init<NEW_LINE>SPHINCSPlusEngine engine = privKey.getParameters().getEngine();<NEW_LINE>// generate randomizer<NEW_LINE>byte[] op... | sign(PK_FORS, idx_tree, idx_leaf); |
654,359 | private void initClickListeners(@NonNull View root) {<NEW_LINE>View getDirectLinkView = root.findViewById(R.id.get_direct_link_text);<NEW_LINE>getDirectLinkView.setOnClickListener(directLinkListener -> onGetDirectLinkClicked());<NEW_LINE>mUpdateGuideDirectLinkBtn.setOnClickListener(v -> onUpdateDirectLinkClicked());<NE... | findViewById(R.id.upload_and_publish_text); |
257,068 | public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {<NEW_LINE>if (!TypeHolderDefault.class.isAssignableFrom(type.getRawType())) {<NEW_LINE>// this class only serializes 'TypeHolderDefault' and its subtypes<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final TypeAdapter<JsonElement> elementAdapter = gson.getAdap... | .get(TypeHolderDefault.class)); |
1,116,139 | private Object parseRpcProxyAnnotation(RpcProxy rpcProxy, Class serviceInterface, DefaultListableBeanFactory beanFactory) throws Exception {<NEW_LINE>RpcProxyFactoryBean rpcProxyFactoryBean;<NEW_LINE>String factoryBeanName <MASK><NEW_LINE>try {<NEW_LINE>rpcProxyFactoryBean = beanFactory.getBean(factoryBeanName, RpcProx... | = "&" + serviceInterface.getSimpleName(); |
314,642 | private static PostContentRequest generateRequestInternal(Map<String, String> sessionAttributes, Map<String, String> requestAttributes, InteractionConfig interactionConfig, AWSCredentialsProvider credentialsProvider, ResponseType mode) {<NEW_LINE>final PostContentRequest request = new PostContentRequest();<NEW_LINE>req... | putAll(interactionConfig.getGlobalSessionAttributes()); |
1,481,641 | static RequestContext readRequestContext(HttpServletRequest req) {<NEW_LINE>RequestContext context = new RequestContext();<NEW_LINE>context.putLocalAttr(R2Constants.REMOTE_ADDR, req.getRemoteAddr());<NEW_LINE>context.putLocalAttr(R2Constants.REMOTE_PORT, req.getRemotePort());<NEW_LINE>HttpProtocolVersion protocol = Htt... | parse(req.getProtocol()); |
899,789 | public void uploadFile(URL url, File file) {<NEW_LINE>try {<NEW_LINE>HttpURLConnection connection = openConnection(url, "PUT");<NEW_LINE>connection.setRequestProperty("Content-type", "application/octet-stream");<NEW_LINE>connection.setDoOutput(true);<NEW_LINE>connection.connect();<NEW_LINE>BufferedOutputStream bos = ne... | url), new Exception()); |
1,705,790 | public static Tuple2<Double, Vector> parseLibSvmFormat(String line, int startIndex) {<NEW_LINE>if (StringUtils.isNullOrWhitespaceOnly(line)) {<NEW_LINE>return Tuple2.of(null, null);<NEW_LINE>}<NEW_LINE>int firstSpacePos = line.indexOf(' ');<NEW_LINE>if (firstSpacePos < 0) {<NEW_LINE>return Tuple2.of(Double.valueOf(line... | , VectorUtil.getVector("")); |
1,825,560 | private static List<ECPublicKey> parseTrustedSigningKeysJson(String protocolVersion, String trustedSigningKeysJson) throws GeneralSecurityException {<NEW_LINE>List<ECPublicKey> senderVerifyingKeys = new ArrayList<>();<NEW_LINE>try {<NEW_LINE>JsonArray keys = JsonParser.parseString(trustedSigningKeysJson).getAsJsonObjec... | get(i).getAsJsonObject(); |
401,562 | public double evaluate(PiecewisePolynomialResult2D pp, double x0Key, double x1Key) {<NEW_LINE>ArgChecker.notNull(pp, "pp");<NEW_LINE>ArgChecker.isFalse(Double.isNaN(x0Key), "x0Key containing NaN");<NEW_LINE>ArgChecker.isFalse(Double.isInfinite(x0Key), "x0Key containing Infinity");<NEW_LINE>ArgChecker.isFalse(Double.isN... | .isNaN(res), "Too large input"); |
755,053 | final ListFeaturesResult executeListFeatures(ListFeaturesRequest listFeaturesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listFeaturesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | invoke(request, responseHandler, executionContext); |
1,416,181 | public CompletableFuture<VoteResponse> onVote(VoteRequest request) {<NEW_LINE>raft.checkThread();<NEW_LINE>logRequest(request);<NEW_LINE>// If the request indicates a term that is greater than the current term then<NEW_LINE>// assign that term and leader to the current context and step down as a candidate.<NEW_LINE>if ... | false).build())); |
1,628,731 | void annotate(final List<Location> locations) {<NEW_LINE>doc.render(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>StyledDocument sd = (StyledDocument) doc;<NEW_LINE>elementAnnotations = new HashMap<Integer, Location>();<NEW_LINE>for (Location loc : locations) {<NEW_LINE>int line = ... | elementAnnotations.put(line, loc); |
21,037 | public void printBrokerRuntimeStats(final DefaultMQAdminExt defaultMQAdminExt, final String brokerAddr, final boolean printBroker) throws InterruptedException, MQBrokerException, RemotingTimeoutException, RemotingSendRequestException, RemotingConnectException {<NEW_LINE>KVTable <MASK><NEW_LINE>TreeMap<String, String> t... | kvTable = defaultMQAdminExt.fetchBrokerRuntimeStats(brokerAddr); |
523,134 | protected boolean changeConnectionState(final HostStatusEvent event, Runnable runnable) {<NEW_LINE>String hostUuid = self.getUuid();<NEW_LINE>self = dbf.reload(self);<NEW_LINE>if (self == null) {<NEW_LINE>throw new CloudRuntimeException(String.format("change host connection state fail, can not find the host[%s]", hostU... | next = before.nextStatus(event); |
396,073 | public int dfs(int[] prices, Map<String, Integer> cache, int index, boolean buying) {<NEW_LINE>if (index >= prices.length) {<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>String key = index + "-" + buying;<NEW_LINE>if (cache.containsKey(key)) {<NEW_LINE>return cache.get(key);<NEW_LINE>}<NEW_LINE>int cooldown = dfs(prices, <MA... | cache, index + 1, buying); |
718,108 | public synchronized void checkTrace(ITool tool, final Supplier<StateVec> trace) {<NEW_LINE>stateTrace = trace.get();<NEW_LINE>for (int soln = 0; soln < solutions.length; soln++) {<NEW_LINE>OrderOfSolution os = solutions[soln];<NEW_LINE>Vect<BEGraphNode> <MASK><NEW_LINE>// Liveness.printTBGraph(os.tableau);<NEW_LINE>// ... | initNodes = constructBEGraph(tool, os); |
1,514,527 | public void createPublisher(boolean shouldPublish) throws CompileExceptionError {<NEW_LINE>try {<NEW_LINE>// if no value set use old hardcoded path (backward compatability)<NEW_LINE>String settingsPath = this.getProjectProperties().getStringValue("liveupdate", "settings", "/liveupdate.settings");<NEW_LINE>IResource pub... | this.fileSystem.get(settingsPath); |
572,101 | public void removeCard(final int boardId, final int cardId) {<NEW_LINE>final BoardDescriptor board = getBoardDescriptor(boardId);<NEW_LINE>final <MASK><NEW_LINE>Services.get(ITrxManager.class).run(ITrx.TRXNAME_ThreadInherited, () -> {<NEW_LINE>final int laneId = getLaneIdForCardId(boardId, cardId);<NEW_LINE>final int d... | JSONBoardChangedEventsListBuilder eventsCollector = JSONBoardChangedEventsList.builder(); |
760,085 | final StopResourceResult executeStopResource(StopResourceRequest stopResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(stopResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
939,815 | public static void main(String[] args) throws Exception {<NEW_LINE>ClassPathResource resource = new ClassPathResource("/raw_sentences.txt");<NEW_LINE>File file = resource.getFile();<NEW_LINE>SentenceIterator iter = new BasicLineIterator(file);<NEW_LINE>AbstractCache<VocabWord> cache = new AbstractCache<>();<NEW_LINE>To... | LabelsSource source = new LabelsSource("DOC_"); |
1,297,176 | final CancelRotateSecretResult executeCancelRotateSecret(CancelRotateSecretRequest cancelRotateSecretRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(cancelRotateSecretRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CancelRotateSec... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
827,363 | public Optional<Record> consumeSingleRecord(String clusterId, Topic topic, Options options) throws ExecutionException, InterruptedException {<NEW_LINE>return Debug.call(() -> {<NEW_LINE>Optional<Record> singleRecord = Optional.empty();<NEW_LINE>KafkaConsumer<byte[], byte[]> consumer = kafkaModule.getConsumer(clusterId,... | records = this.poll(consumer); |
1,128,578 | public static VmwareContext create(String vCenterAddress, String vCenterUserName, String vCenterPassword) throws Exception {<NEW_LINE>assert (vCenterAddress != null);<NEW_LINE>assert (vCenterUserName != null);<NEW_LINE>assert (vCenterPassword != null);<NEW_LINE>String serviceUrl = "https://" + vCenterAddress + "/sdk/vi... | registerStockObject(VmwareManager.CONTEXT_STOCK_NAME, s_vmwareMgr); |
120,438 | public static JetSubmitJobCodec.RequestParameters decodeRequest(ClientMessage clientMessage) {<NEW_LINE>ClientMessage.ForwardFrameIterator iterator = clientMessage.frameIterator();<NEW_LINE>RequestParameters request = new RequestParameters();<NEW_LINE>ClientMessage.<MASK><NEW_LINE>request.jobId = decodeLong(initialFram... | Frame initialFrame = iterator.next(); |
1,035,619 | public <T> Optional<TypeHandler<T>> create(TypeInfo<T> typeInfo, TypeHandlerContext context) {<NEW_LINE>if (!Map.class.isAssignableFrom(typeInfo.getRawType())) {<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>Type keyType = ReflectionUtil.getTypeParameterForSuper(typeInfo.getType(), Map.class, 0);<NEW_LINE>Type ... | getTypeHandlerLibrary().getTypeHandler(keyType); |
1,238,048 | public Bitmap queryQR() {<NEW_LINE>Map<EncodeHintType, ErrorCorrectionLevel> hints = new HashMap<>();<NEW_LINE>hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);<NEW_LINE>BitMatrix bitMatrix;<NEW_LINE>try {<NEW_LINE>bitMatrix = new MultiFormatWriter().encode(contactLink, BarcodeFormat.QR_CODE, WIDTH, W... | 0, WIDTH, WIDTH, paint); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.