idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,540,484 | public ExtensionJson toExtensionJson() {<NEW_LINE>var json = new ExtensionJson();<NEW_LINE>var extension = this.getExtension();<NEW_LINE>json.namespace = extension.getNamespace().getName();<NEW_LINE>json.name = extension.getName();<NEW_LINE>json.averageRating = extension.getAverageRating();<NEW_LINE>json.downloadCount ... | .galleryTheme = this.getGalleryTheme(); |
673,842 | public static DescribeParametersResponse unmarshall(DescribeParametersResponse describeParametersResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeParametersResponse.setRequestId(_ctx.stringValue("DescribeParametersResponse.RequestId"));<NEW_LINE>describeParametersResponse.setEngine(_ctx.stringValue("DescribeParam... | ("DescribeParametersResponse.ConfigParameters[" + i + "].CheckingCode")); |
442,090 | void customizeDescriptor(Context context, Context modelContext, FieldDescriptor descriptor, DataKind kind) {<NEW_LINE>int hintId = kind.hintId;<NEW_LINE>if (hintId != -1) {<NEW_LINE>descriptor.setHint<MASK><NEW_LINE>}<NEW_LINE>if (mDetailsLayout != -1) {<NEW_LINE>LayoutDescriptor ld = new LayoutDescriptor(mDetailsLayou... | (modelContext.getString(hintId)); |
1,639,185 | final DescribeRulesetResult executeDescribeRuleset(DescribeRulesetRequest describeRulesetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeRulesetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
1,641,635 | private void text(double x, double y, double w, double h, String str, TextAlign align, TextBaseline valign, boolean clip, double rotation) {<NEW_LINE>if (state.fillColor == null) {<NEW_LINE>state.fillColor = convertColor(state.fillColorValue);<NEW_LINE>}<NEW_LINE>if (state.fillColor != null) {<NEW_LINE>x = (state.dx + ... | margin.getY() + 0.5); |
454,047 | public Map<String, Object> mapObject() {<NEW_LINE>try {<NEW_LINE>final Field field = from();<NEW_LINE>final Map<String, Object> fieldMap = mapper.convertValue(field, HashMap.class);<NEW_LINE>fieldMap.put("fieldVariables", new JsonFieldVariableTransformer(field.fieldVariables()).mapList());<NEW_LINE>fieldMap.remove("acc... | ).getLoggedInUser(), false); |
745,083 | public Node activate() {<NEW_LINE>if (!lifecycle.moveToStarted()) {<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>logger.info("activating ...");<NEW_LINE>transportService = injector.getInstance(TransportService.class);<NEW_LINE>transportService.getTaskManager().setTaskResultsService(injector.getInstance(TaskResultsService.... | injector.getInstance(NodeConnectionsService.class); |
108,118 | public void onAnalog(String name, float value, float tpf) {<NEW_LINE>if (name.equals("sampleRadiusUp")) {<NEW_LINE>filter.setSampleRadius(filter.getSampleRadius() + 0.01f);<NEW_LINE>System.out.println("Sample Radius : " + filter.getSampleRadius());<NEW_LINE>}<NEW_LINE>if (name.equals("sampleRadiusDown")) {<NEW_LINE>fil... | "bias : " + filter.getBias()); |
1,190,023 | public AsyncFuture<List<URI>> find() {<NEW_LINE>final ImmutableList.Builder<AsyncFuture<List<URI>>> lookups = ImmutableList.builder();<NEW_LINE>for (final String record : records) {<NEW_LINE>lookups.add(async.call(() -> {<NEW_LINE>log.info("Resolving SRV records for: {}", record);<NEW_LINE>final Lookup lookup = new Loo... | ImmutableList.<URI>of(); |
985,208 | public String normalize(String path, int normalizationLevel) {<NEW_LINE>if (normalizationLevel == NORMALIZED) {<NEW_LINE>return path;<NEW_LINE>}<NEW_LINE>if (normalizationLevel == NEEDS_SHORT_PATH_NORMALIZATION) {<NEW_LINE>String resolvedPath = shortPathResolver.resolveShortPath(path);<NEW_LINE>if (resolvedPath != null... | (path), String.class); |
247,648 | public void configure() {<NEW_LINE>// @formatter:off<NEW_LINE>errorHandler(defaultErrorHandler());<NEW_LINE>onException(Exception.class).log("Exception thrown inside the error reporting route! ");<NEW_LINE>from(direct(MF_ERROR_ROUTE_ID)).routeId(MF_ERROR_ROUTE_ID).streamCaching().multicast().parallelProcessing(true).to... | MF_EXTERNAL_SYSTEM_V2_URI + "}}/externalstatus/${header." + HEADER_PINSTANCE_ID + "}/error"); |
71,034 | // The tested deployment exceptions cause FFDC so we have to allow for this.<NEW_LINE>@AllowedFFDC<NEW_LINE>public void launchTck() throws Exception {<NEW_LINE>// disable tests for Java versions 11.0.0 - 11.0.3 since there's a bug in TLS 1.3 implementation<NEW_LINE>JavaInfo javaInfo = JavaInfo.forServer(server);<NEW_LI... | .microVersion() <= 3)); |
458,980 | private Map<String, Set<String>> listPortNames(Archive archive) {<NEW_LINE>try (URLClassLoader moduleClassLoader = new BootClassLoaderFactory(archive, parent).createClassLoader()) {<NEW_LINE>Set<String> inboundPorts = new HashSet<>();<NEW_LINE>Set<String> outboundPorts = new HashSet<>();<NEW_LINE>Map<String, Set<String... | portsMap.put("outbound", outboundPorts); |
579,264 | public void notify(@NonNull final CamelEvent event) {<NEW_LINE>try {<NEW_LINE>if (event instanceof CamelEvent.ExchangeSendingEvent) {<NEW_LINE>final CamelEvent.ExchangeSendingEvent sendingEvent = (CamelEvent.ExchangeSendingEvent) event;<NEW_LINE>final Exchange exchange = ExchangeHelper.createCopy(sendingEvent.getExchan... | (sendingEvent.getEndpoint())); |
510,735 | private void collectItems(JSONObject json) throws IllegalArgumentException, JSONException {<NEW_LINE>JSONArray itemsJson = json.getJSONArray("items");<NEW_LINE>int version = json.has("version") ? json.getInt("version") : 1;<NEW_LINE>if (version > SettingsHelper.VERSION) {<NEW_LINE>throw new IllegalArgumentException("Un... | String pluginId = item.getPluginId(); |
190,149 | private void addItemsInRange(AssetInfo asset, List<FeeItem> feeItems, FeeItemsAlgorithm algorithm, int txSize, int scale) {<NEW_LINE>for (int i = algorithm.getMinPosition(); i < algorithm.getMaxPosition(); i++) {<NEW_LINE>FeeItem currFeeItem = createFeeItem(asset, txSize, algorithm<MASK><NEW_LINE>FeeItem prevFeeItem = ... | .computeValue(i), scale); |
1,061,144 | public boolean performOk() {<NEW_LINE>IPreferenceStore store = getPreferenceStore();<NEW_LINE>store.setValue(ICorePreferenceConstants.PREF_DEBUG_LEVEL, StatusLevel.values()[debugCombo.getSelectionIndex()].toString());<NEW_LINE>String[] currentOptions = EclipseUtil.getCurrentDebuggableComponents();<NEW_LINE>EclipseUtil.... | = new ArrayList<String>(); |
942,573 | private void sortTable(Table table) {<NEW_LINE>TableItem[] items = table.getItems();<NEW_LINE>Collator collator = Collator.getInstance(Locale.getDefault());<NEW_LINE>for (int i = 1; i < items.length; i++) {<NEW_LINE>String value1 = items[i].getText(0);<NEW_LINE>for (int j = 0; j < i; j++) {<NEW_LINE>String value2 = ite... | [j].getText(0); |
1,277,152 | private void validateConverterTypes(InternalIndex index, String mapName, List<QueryDataType> expectedConverterTypes, List<QueryDataType> actualConverterTypes) {<NEW_LINE>for (int i = 0; i < Math.min(expectedConverterTypes.size(), actualConverterTypes.size()); i++) {<NEW_LINE>QueryDataType expected = expectedConverterTy... | get(actualConverterTypes.size()); |
1,675,914 | public void run(RegressionEnvironment env) {<NEW_LINE>String epl = "@name('T0') create table TableZero(k0 string primary key, v0 int);\n" + "@name('T1') create table TableOne(k1 string primary key, v1 int);\n" + "on SupportBean merge TableZero " + " where theString = k0 when not matched " + " then insert select theSt... | new SupportBean("E1", 1)); |
89,641 | int removeUsagesBulk(@Nonnull Set<UsageNode> usages, @Nonnull DefaultTreeModel treeModel) {<NEW_LINE>ApplicationManager<MASK><NEW_LINE>int removed = 0;<NEW_LINE>synchronized (this) {<NEW_LINE>List<MutableTreeNode> removedNodes = new SmartList<>();<NEW_LINE>for (UsageNode usage : usages) {<NEW_LINE>if (myChildren.remove... | .getApplication().assertIsDispatchThread(); |
727,342 | private Set<Symbol> notAssignedInAnyInitializer(FieldInitEntities entities, Set<Symbol> notInitializedInConstructors, VisitorState state) {<NEW_LINE>Trees trees = getTreesInstance(state);<NEW_LINE>Symbol.ClassSymbol classSymbol = entities.classSymbol();<NEW_LINE>ImmutableSet.Builder<Element> initInSomeInitializerBuilde... | .getPath(), block)); |
932,652 | public void run() {<NEW_LINE>if (null == socket)<NEW_LINE>return;<NEW_LINE>DataInputStream input = null;<NEW_LINE>DataOutputStream output = null;<NEW_LINE>if (DEBUG) {<NEW_LINE>System.out.println("Client connected from " + socket.getRemoteSocketAddress());<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>input = new DataInputStream(... | tmp2 = result.getBytes("UTF-8"); |
1,073,026 | private Object toCommon(Class srcClass, Class targetClass, BigDecimal value) {<NEW_LINE>if (targetClass == srcClass) {<NEW_LINE>return value;<NEW_LINE>}<NEW_LINE>if (targetClass == Double.class || targetClass == double.class || targetClass == Float.class || targetClass == float.class) {<NEW_LINE>return toCommon(srcClas... | value.toString() + "]"); |
914,329 | private static void downloadFile(URL assetDownloadURL, long assetDownloadSize) {<NEW_LINE>final JFileChooser chooser = MapTool.getFrame().getSaveFileChooser();<NEW_LINE>chooser.setSelectedFile(new File(assetDownloadURL.getFile()));<NEW_LINE>chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);<NEW_LINE>File chosenLoca... | setNote(assetDownloadURL.toString()); |
1,260,936 | protected JSONObject _lapseConf(@NonNull Card card) {<NEW_LINE>DeckConfig conf = _cardConf(card);<NEW_LINE>if (!card.isInDynamicDeck()) {<NEW_LINE>return conf.getJSONObject("lapse");<NEW_LINE>}<NEW_LINE>// dynamic deck; override some attributes, use original deck for others<NEW_LINE>DeckConfig oconf = mCol.getDecks().c... | "lapse").getDouble("mult")); |
199,640 | public void handleInsert(@NotNull InsertionContext context, @NotNull LookupElement lookupElement, @NotNull TwigExtension twigExtension) {<NEW_LINE>// {{ form_javasc|() }}<NEW_LINE>// {{ form_javasc| }}<NEW_LINE>if (PhpInsertHandlerUtil.isStringAtCaret(context.getEditor(), "(")) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Fu... | context.getEditor(), "''"); |
172,944 | private void createElevatorHopEdges(ArrayList<Vertex> onboardVertices, boolean wheelchairAccessible, boolean bicycleAllowed, int levels, int travelTime) {<NEW_LINE>// -1 because we loop over onboardVertices two at a time<NEW_LINE>for (int i = 0, vSize = onboardVertices.size() - 1; i < vSize; i++) {<NEW_LINE>Vertex from... | onboardVertices.get(i + 1); |
1,838,342 | public ConfigService nacosConfigService(final NacosProperties nacosProp) throws Exception {<NEW_LINE>Properties properties = new Properties();<NEW_LINE>if (Objects.nonNull(nacosProp.getAcm()) && nacosProp.getAcm().isEnabled()) {<NEW_LINE>// Use aliyun ACM service<NEW_LINE>properties.put(PropertyKeyConst.ENDPOINT, nacos... | getAcm().getAccessKey()); |
1,166,710 | private static int toggleSubscription(CommandSourceStack source, String player_name, String logName) {<NEW_LINE>Player player = source.getServer().getPlayerList().getPlayerByName(player_name);<NEW_LINE>if (player == null) {<NEW_LINE>Messenger.m(source, "r No player specified");<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>if... | source, "r Unknown logger: ", "rb " + logName); |
768,190 | private void processType(ResolvableType type, InspectionCache cache, Consumer<TypeModel> callback) {<NEW_LINE>if (ResolvableType.NONE.equals(type) || cache.contains(type.toClass()) || !typeFilter.test(type.toClass())) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>TypeModel result = new TypeModel(type.toClass());<NEW_LINE>cach... | , type), cache, callback); |
1,691,682 | public void updateClob(int i, Reader x, long length) throws SQLException {<NEW_LINE>try {<NEW_LINE>rsetImpl.updateClob(i, x, length);<NEW_LINE>} catch (SQLException sqlX) {<NEW_LINE>FFDCFilter.processException(sqlX, getClass().getName() + ".updateClob", "3828", this);<NEW_LINE>throw WSJdbcUtil.mapException(this, sqlX);... | this, tc, "updateClob", runX); |
832,745 | public int compare(@Nullable String currentVersion, String v1, String v2) {<NEW_LINE>StringBuilder nv1 = new StringBuilder(normalizeVersion(v1));<NEW_LINE>StringBuilder nv2 = new StringBuilder(normalizeVersion(v2));<NEW_LINE>long vp1 = countVersionParts(nv1.toString());<NEW_LINE>long vp2 = countVersionParts(nv2.toStrin... | (v1Part) - parseInt(v2Part); |
1,464,242 | public boolean rangeCanBeVisible(int startOffset, int endOffset) {<NEW_LINE>assert startOffset >= 0;<NEW_LINE>assert startOffset <= endOffset;<NEW_LINE>assert endOffset <= myEditor.getDocument().getTextLength();<NEW_LINE>if (myEditor.getSettings().isUseSoftWraps())<NEW_LINE>return true;<NEW_LINE>if (startOffset < myVis... | y = myEditor.visualLineToY(visualLine); |
214,040 | public void onItemLongClick(int position, View v, TimelineModel item) {<NEW_LINE>if (getView() == null)<NEW_LINE>return;<NEW_LINE>if (item.getType() == TimelineModel.COMMENT || item.getType() == TimelineModel.HEADER) {<NEW_LINE>if (v.getId() == R.id.commentMenu && item.getType() == TimelineModel.COMMENT) {<NEW_LINE>Com... | String login = issue.getLogin(); |
1,232,761 | protected Map<String, FieldReader> assignReaders(boolean useIndexOnSingleReturn) {<NEW_LINE>Map<String, FieldReader> readers = new HashMap<>();<NEW_LINE>JRField[] fields = queryExecuter.getDataset().getFields();<NEW_LINE>Type[] returnTypes = queryExecuter.getReturnTypes();<NEW_LINE>String[<MASK><NEW_LINE>Map<String, In... | ] aliases = queryExecuter.getReturnAliases(); |
805,856 | public void cleanUpState(VirtualConnection vc) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {<NEW_LINE>Tr.entry(tc, "cleanUpState");<NEW_LINE>}<NEW_LINE>// Remove the discriminator state from the state map.<NEW_LINE>SSLDiscriminatorState discState = (SSLDiscriminatorState) vc.<MASK><NEW_L... | getStateMap().remove(SSL_DISCRIMINATOR_STATE); |
60,378 | private <T> CompletableFuture<T> retryWithCleanup(Supplier<CompletableFuture<T>> toTry) {<NEW_LINE>CompletableFuture<T> result = new CompletableFuture<>();<NEW_LINE>toTry.get().thenAccept(result::complete).exceptionally(ex -> {<NEW_LINE>// Check if the exception indicates the Metadata has reached capacity. In that case... | (ex).getMessage()); |
1,120,940 | private void restoreState(@NonNull Bundle savedInstanceState) {<NEW_LINE>boolean isInMultiSelectMode = savedInstanceState.getBoolean(BUNDLE_IN_MULTI_SELECT_MODE);<NEW_LINE>if (isInMultiSelectMode) {<NEW_LINE>getAdapter().setInMultiSelect(true);<NEW_LINE>if (savedInstanceState.containsKey(BUNDLE_SELECTED_STATES)) {<NEW_... | (savedInstanceState.getIntArray(BUNDLE_SELECTED_STATES)); |
792,340 | public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {<NEW_LINE>Map<String, Object> annotationAttributes = importingClassMetadata.getAnnotationAttributes(<MASK><NEW_LINE>boolean useJdkProxy = Boolean.parseBoolean(annotationAttributes.get(ATTRIBUTE_KEY_USE_JDK_P... | EnableAutoDataSourceProxy.class.getName()); |
1,684,784 | public void fillPadding() {<NEW_LINE>if (padding < 1)<NEW_LINE>return;<NEW_LINE>fillPadding(HillshadingBitmap.Border.EAST);<NEW_LINE>fillPadding(HillshadingBitmap.Border.WEST);<NEW_LINE>fillPadding(HillshadingBitmap.Border.NORTH);<NEW_LINE>fillPadding(HillshadingBitmap.Border.SOUTH);<NEW_LINE>// fill diagonal padding (... | bytes[x + yoff] = nw; |
1,199,857 | protected void load(String fileName) throws IOException, MaryConfigurationException {<NEW_LINE>super.load(fileName);<NEW_LINE>// Now make sense of the processing header<NEW_LINE>Properties props = new Properties();<NEW_LINE>ByteArrayInputStream bais = new ByteArrayInputStream(procHdr.getString().getBytes("latin1"));<NE... | (props.getProperty("hnm.hpfBeforeNoiseAnalysis")); |
829,481 | // eg.<NEW_LINE>// before:<NEW_LINE>// Limit 1, 5 (hit line range: 1 ~ 6, output line range: 6 ~ 11)<NEW_LINE>// |<NEW_LINE>// Limit 5, 2 (hit line range: 5 ~ 7, output line range: 5 ~ 7)<NEW_LINE>//<NEW_LINE>// after:<NEW_LINE>// Limit 6, 1 (hit line range: 6 ~ 7, output line range: 6 ~ 7)<NEW_LINE>@Override<NEW_LINE>... | 0).getInputs())); |
1,799,193 | ActionResult<Wo> execute(EffectivePerson effectivePerson, String id, String path0) throws Exception {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Wo wo = new Wo();<NEW_LINE>String executorSeed = null;<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<N... | ExceptionEntityNotExist(id, Work.class); |
1,443,163 | private BulkDataExportOptions buildBulkDataExportOptions(IPrimitiveType<String> theOutputFormat, IPrimitiveType<String> theType, IPrimitiveType<Date> theSince, List<IPrimitiveType<String>> theTypeFilter, BulkDataExportOptions.ExportStyle theExportStyle) {<NEW_LINE>String outputFormat = theOutputFormat != null <MASK><NE... | ? theOutputFormat.getValueAsString() : null; |
1,342,330 | private byte[] genCheckImage(int width, int height, int checkSize) {<NEW_LINE>int x, y;<NEW_LINE>byte[] pixels = new byte[width * height * 3];<NEW_LINE>for (y = 0; y < height; y++) for (x = 0; x < width; x++) {<NEW_LINE>byte rColor = 0;<NEW_LINE>byte bColor = 0;<NEW_LINE>if ((x / checkSize) % 2 == 0) {<NEW_LINE>rColor ... | y / checkSize) % 2)); |
150,744 | static void sortByMinZ(int leftTid, int rightTid, int[] triangleIndices, float[] minZBuffer) {<NEW_LINE>// swap pivot to the front<NEW_LINE>swap(triangleIndices, leftTid, ((<MASK><NEW_LINE>int k = leftTid;<NEW_LINE>float leftMinZ = minZBuffer[triangleIndices[leftTid]];<NEW_LINE>// sort by min z<NEW_LINE>for (int tid = ... | leftTid + rightTid) / 2)); |
1,199,244 | public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>GutenbergPropsBuilder gutenbergPropsBuilder = getArguments().getParcelable(ARG_GUTENBERG_PROPS_BUILDER);<NEW_LINE>Consumer<Exception> exceptionLogger = null;<NEW_LINE>Consumer<String> breadcrumbLogger = null;<NEW_LIN... | mWPAndroidGlueCode.onCreate(getContext()); |
728,149 | final ListHealthChecksResult executeListHealthChecks(ListHealthChecksRequest listHealthChecksRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listHealthChecksRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | addHandlerContext(HandlerContextKey.SERVICE_ID, "Route 53"); |
1,089,247 | private Mono<Response<PolicyDefinitionInner>> createOrUpdateAtManagementGroupWithResponseAsync(String policyDefinitionName, String managementGroupId, PolicyDefinitionInner parameters, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter ... | error(new IllegalArgumentException("Parameter policyDefinitionName is required and cannot be null.")); |
943,028 | public AirbyteConnectionStatus check(final JsonNode config) {<NEW_LINE>try {<NEW_LINE>final String datasetId = BigQueryUtils.getDatasetId(config);<NEW_LINE>final String datasetLocation = BigQueryUtils.getDatasetLocation(config);<NEW_LINE>final BigQuery bigquery = getBigQuery(config);<NEW_LINE>final UploadingMethod uplo... | LOGGER.info("Check failed.", e); |
341,730 | private void specialCompletion() {<NEW_LINE>// instance documents with neither schemaLocation nor<NEW_LINE>// noNamespaceSchemaLocation attribute, e.g. project.xml<NEW_LINE>if (primaryFile == null)<NEW_LINE>return;<NEW_LINE>// specialCompletion = true;<NEW_LINE>for (String temp : declaredNamespaces.values()) {<NEW_LINE... | (temp), true, this); |
1,441,678 | protected void applyPrior(double[] x, double batchScale) {<NEW_LINE>// incorporate priors<NEW_LINE>if (prior == QUADRATIC_PRIOR) {<NEW_LINE>double lambda = batchScale / (sigma * sigma);<NEW_LINE>for (int i = 0; i < x.length; i++) {<NEW_LINE>double w = x[i], wlambda = w * lambda;<NEW_LINE>value += w * wlambda * 0.5;<NEW... | * (wabs - epsilon * .5); |
139,175 | public static void collectMemoryInfo(Metrics metrics) {<NEW_LINE>if (metrics != null && Boolean.getBoolean("collect-memory")) {<NEW_LINE>MemoryMXBean memBean = ManagementFactory.getMemoryMXBean();<NEW_LINE>MemoryUsage heap = memBean.getHeapMemoryUsage();<NEW_LINE>MemoryUsage nonHeap = memBean.getNonHeapMemoryUsage();<N... | long heapUsed = heap.getUsed(); |
34,292 | public // hbase_rest("http://example. com:8000/table/scanner/","POST/GET/PUT/DELETE","UTF-8","xml or json","Accept: text/xml","Content-Type: text/xml")<NEW_LINE>Object calculate(Context ctx) {<NEW_LINE>m_ctx = ctx;<NEW_LINE>IParam param = this.param;<NEW_LINE>try {<NEW_LINE>if (param.getType() == ';') {<NEW_LINE>ArrayL... | calculate(ctx).toString(); |
480,396 | public static void commonInit() {<NEW_LINE>register(CokeOvenTileEntity.class, Lib.GUIID_CokeOven, CokeOvenContainer::new);<NEW_LINE>register(AlloySmelterTileEntity.class, Lib.GUIID_AlloySmelter, AlloySmelterContainer::new);<NEW_LINE>register(BlastFurnaceTileEntity.class, Lib.GUIID_BlastFurnace, BlastFurnaceContainer::n... | Lib.GUIID_ItemBatcher, ItemBatcherContainer::new); |
541,996 | final CreateLagResult executeCreateLag(CreateLagRequest createLagRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createLagRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_L... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
521,642 | public static List<RegressionExecution> executions() {<NEW_LINE>List<RegressionExecution> execs = new ArrayList<>();<NEW_LINE>execs.add(new EPLSpatialPREventIndexUnindexed());<NEW_LINE>execs.add(new EPLSpatialPREventIndexUnusedOnTrigger());<NEW_LINE>execs.add(new EPLSpatialPREventIndexUnusedNamedWindowFireAndForget());... | .add(new EPLSpatialPREventIndexTableSubdivideMergeDestroy()); |
902,209 | final GetMLTaskRunsResult executeGetMLTaskRuns(GetMLTaskRunsRequest getMLTaskRunsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getMLTaskRunsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | false), new GetMLTaskRunsResultJsonUnmarshaller()); |
81,086 | private void checkTooManyError(ISingleConsole singleConsole, PerfTest perfTest, IPerfTestService perfTestService, ImmutableStatisticsSet cumulativeStatistics) {<NEW_LINE>StatisticsIndexMap statisticsIndexMap = singleConsole.getStatisticsIndexMap();<NEW_LINE>long testSum = cumulativeStatistics.getCount(statisticsIndexMa... | (statisticsIndexMap.getLongIndex("errors")); |
124,383 | public Builder mergeFrom(org.mlflow.api.proto.ModelRegistry.GetLatestVersions.Response other) {<NEW_LINE>if (other == org.mlflow.api.proto.ModelRegistry.GetLatestVersions.Response.getDefaultInstance())<NEW_LINE>return this;<NEW_LINE>if (modelVersionsBuilder_ == null) {<NEW_LINE>if (!other.modelVersions_.isEmpty()) {<NE... | .alwaysUseFieldBuilders ? getModelVersionsFieldBuilder() : null; |
428,084 | public List<ActiveUser> list(String username) {<NEW_LINE>String currentSessionId = (String) SecurityUtils.getSubject().getSession().getId();<NEW_LINE>List<ActiveUser> list = new ArrayList<>();<NEW_LINE>Collection<Session<MASK><NEW_LINE>for (Session session : sessions) {<NEW_LINE>ActiveUser activeUser = new ActiveUser()... | > sessions = sessionDAO.getActiveSessions(); |
81,778 | private static Predicate<? super Throwable> createAbortedExecutionPredicate() {<NEW_LINE>Predicate<Throwable> otaPredicate = TestAbortedException.class::isInstance;<NEW_LINE>// Additionally support JUnit 4's AssumptionViolatedException?<NEW_LINE>try {<NEW_LINE>Class<?> clazz = ReflectionUtils.tryToLoadClass(ASSUMPTION_... | ASSUMPTION_VIOLATED_EXCEPTION + " requires that Hamcrest is on the classpath." : () -> COMMON_FAILURE_MESSAGE; |
1,015,250 | public void deleteById(String id) {<NEW_LINE>String vaultName = Utils.getValueFromIdByName(id, "backupVaults");<NEW_LINE>if (vaultName == null) {<NEW_LINE>throw logger.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id)));<NEW_LIN... | Utils.getValueFromIdByName(id, "resourceGroups"); |
432,012 | private UserDashboardItemId createUserDashboardItemAndSave(@NonNull final UserDashboardId dashboardId, @NonNull final UserDashboardItemAddRequest request) {<NEW_LINE>//<NEW_LINE>// Get the KPI<NEW_LINE>final int kpiId = request.getKpiId();<NEW_LINE>if (kpiId <= 0) {<NEW_LINE>throw new AdempiereException("kpiId is not s... | setName(kpi.getName()); |
603,515 | public static <T, BT extends ObjectIntProcedure<? super T>> void forEachWithIndexInListOnExecutor(List<T> list, ObjectIntProcedureFactory<BT> procedureFactory, Combiner<BT> combiner, int minForkSize, int taskCount, Executor executor) {<NEW_LINE><MASK><NEW_LINE>if (size < minForkSize) {<NEW_LINE>BT procedure = procedure... | int size = list.size(); |
1,705,956 | private RwSplitUser transformRowToUser(LinkedHashMap<String, String> map) {<NEW_LINE>if (null == map || map.isEmpty()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>check(map);<NEW_LINE>RwSplitUser rwSplitUser = new RwSplitUser();<NEW_LINE>for (Map.Entry<String, String> entry : map.entrySet()) {<NEW_LINE>switch(entry.get... | setDbGroup(entry.getValue()); |
152,525 | public static void beforeSuite() throws Exception {<NEW_LINE>// Delete the Infinispan jars that might have been left around by previous test buckets.<NEW_LINE>LibertyServer server = LibertyServerFactory.getLibertyServer("com.ibm.ws.session.cache.fat.infinispan.container.server");<NEW_LINE>Machine machine = server.getMa... | deleteLibertyDirectoryAndContents(machine, installRoot + "/usr/shared/resources/infinispan-jakarta"); |
98,609 | protected void updateStyle(@Nonnull JEditorPane editorPane, @Nullable JTree tree, Object value, boolean selected, boolean hasFocus) {<NEW_LINE>final HTMLDocument htmlDocument = (HTMLDocument) editorPane.getDocument();<NEW_LINE>final Style style = htmlDocument.getStyleSheet().getStyle(MSG_STYLE);<NEW_LINE>if (value inst... | setForeground(style, JBColor.GRAY); |
246,662 | /* (non-Javadoc)<NEW_LINE>* @see org.netbeans.modules.web.common.websocket.WebSocketChanelHandler#sendHandshake()<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void sendHandshake() throws IOException {<NEW_LINE>String acceptKey = createAcceptKey(getKey());<NEW_LINE>if (acceptKey == null) {<NEW_LINE>close();<NEW_LINE>r... | = new StringBuilder(Utils.HTTP_RESPONSE); |
1,062,508 | private void addScanProduct() {<NEW_LINE>String upc = upcField.getDisplay();<NEW_LINE>if (upc == null || upc.isEmpty())<NEW_LINE>return;<NEW_LINE>MProduct product = getMProduct(upc);<NEW_LINE>if (product == null) {<NEW_LINE>FDialog.error(form.getWindowNo(), form, Msg.parseTranslation(Env.getCtx(), "@M_Product_ID@ @NotF... | getC_UOM().getName()); |
188,358 | public int Call(lua_State thread) {<NEW_LINE>int base = LuaAPI.luaL_optinteger(thread, 2, 10);<NEW_LINE>if (base == 10) {<NEW_LINE>LuaAPI.luaL_checkany(thread, 1);<NEW_LINE>if (LuaAPI.lua_isnumber(thread, 1)) {<NEW_LINE>LuaAPI.lua_pushnumber(thread, LuaAPI.lua_tonumber(thread, 1));<NEW_LINE>return 1;<NEW_LINE>}<NEW_LIN... | base <= 36, 2, "base out of range"); |
1,268,670 | public AuthorizationRequest checkForPreApproval(AuthorizationRequest authorizationRequest, Authentication userAuthentication) {<NEW_LINE>String clientId = authorizationRequest.getClientId();<NEW_LINE>Collection<String> requestedScopes = authorizationRequest.getScope();<NEW_LINE>Set<String> approvedScopes = new HashSet<... | " and username=" + userAuthentication.getName()); |
1,125,898 | private void parseHeaderExtension() {<NEW_LINE>pesScratch.setPosition(0);<NEW_LINE>timeUs = C.TIME_UNSET;<NEW_LINE>if (ptsFlag) {<NEW_LINE>// '0010' or '0011'<NEW_LINE>pesScratch.skipBits(4);<NEW_LINE>long pts = (long) <MASK><NEW_LINE>// marker_bit<NEW_LINE>pesScratch.skipBits(1);<NEW_LINE>pts |= pesScratch.readBits(15... | pesScratch.readBits(3) << 30; |
423,819 | protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException {<NEW_LINE>initRequest(request, response);<NEW_LINE>SecurityContext securityContext = null;<NEW_LINE>setCustomResponseHeaders(response);<NEW_LINE>try (final Tx tx = StructrApp.getInstance().tx()) {<NEW_LIN... | response, securityContext, name, types); |
718,613 | public static void parseComment(Executor executor, Handler handler, String response, ArrayList<Comment> commentData, boolean expandChildren, ParseCommentListener parseCommentListener) {<NEW_LINE>executor.execute(() -> {<NEW_LINE>try {<NEW_LINE>JSONArray childrenArray = new JSONArray(response);<NEW_LINE>String parentId ... | childrenArray, newComments, moreChildrenFullnames, 0); |
602,878 | protected void drawForegroundText(@Nonnull PoseStack matrix, int mouseX, int mouseY) {<NEW_LINE>renderTitleText(matrix);<NEW_LINE>TurbineMultiblockData multiblock = tile.getMultiblock();<NEW_LINE>if (multiblock.isFormed()) {<NEW_LINE>Component limiting = GeneratorsLang.IS_LIMITING.translateColored(EnumColor.DARK_RED);<... | 8, 26, titleTextColor()); |
1,418,722 | public static void register(Application application) {<NEW_LINE>Desktop desktop = Desktop.getDesktop();<NEW_LINE>if (desktop.isSupported(Desktop.Action.APP_ABOUT)) {<NEW_LINE>desktop.setAboutHandler(e -> {<NEW_LINE>DataManager dataManager = DataManager.getInstance();<NEW_LINE>Window window = WindowManager.getInstance()... | getInstance().setPerformProjectLoad(false); |
607,125 | final DeleteNetworkInterfaceResult executeDeleteNetworkInterface(DeleteNetworkInterfaceRequest deleteNetworkInterfaceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteNetworkInterfaceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | DeleteNetworkInterfaceResult>(new DeleteNetworkInterfaceResultStaxUnmarshaller()); |
717,799 | private void hanleExceptHook(Object exceptHook, Object type, Object val, Object tb, ExcInfoNode excInfoNode, TupleBuiltins.GetItemNode getItemNode, PythonModule sys, PyErrDisplayNode errDisplayNode) {<NEW_LINE>try {<NEW_LINE>CallNode.getUncached().execute(exceptHook, type, val, tb);<NEW_LINE>} catch (PException e) {<NE... | execute(null, stdErr, "write"); |
1,452,662 | public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) {<NEW_LINE>if (args.length == 2) {<NEW_LINE>if (UserManager.getPlayer((Player) sender) == null) {<NEW_LINE>sender.sendMessage(LocaleLoader.getString("Profile.PendingLoad"));<NEW_LINE>return true;<NEW_... | (LocaleLoader.getString("Commands.Party.Alliance.None")); |
810,339 | public void readDesign(Element design, DesignContext context) {<NEW_LINE>super.readDesign(design, context);<NEW_LINE>if (design.hasAttr("center")) {<NEW_LINE>center();<NEW_LINE>}<NEW_LINE>if (design.hasAttr("position")) {<NEW_LINE>String[] position = design.attr("position").split(",");<NEW_LINE>setPositionX(Integer.par... | trim(), ShortcutAction.class); |
1,346,973 | public void refreshUpdate(final ReadDB pDB) {<NEW_LINE>mDb = checkNotNull(pDB);<NEW_LINE>mSunburstGUI.mDone = false;<NEW_LINE>mSunburstGUI.mUseDiffView = ViewType.NODIFF;<NEW_LINE>mModel = new SunburstModel(mSunburstGUI.mParent, mSunburstGUI.mDb);<NEW_LINE>final SunburstContainer container = new SunburstContainer(mSunb... | setModWeight(mSunburstGUI.getModificationWeight()); |
1,572,372 | private XML buildJREOptions(final boolean embedJava, final boolean setMemory, final Arch arch) {<NEW_LINE>log("Building JRE options.");<NEW_LINE>final <MASK><NEW_LINE>if (embedJava) {<NEW_LINE>// note that "Path" is relative to the output executable at runtime<NEW_LINE>// "java" folder is next to the<NEW_LINE>jre.addCh... | XML jre = new XML("jre"); |
588,856 | public Dialog onCreateDialog(Bundle savedInstanceState) {<NEW_LINE>int primaryColor = themeColorUtils.primaryColor(getContext());<NEW_LINE>user = getArguments().getParcelable(ARG_USER);<NEW_LINE>arbitraryDataProvider = new ArbitraryDataProvider(<MASK><NEW_LINE>// Inflate the layout for the dialog<NEW_LINE>LayoutInflate... | getContext().getContentResolver()); |
1,582,154 | private JPAQuery<FeedEntry> buildQuery(User user, FeedSubscription sub, boolean unreadOnly, List<FeedEntryKeyword> keywords, Date newerThan, int offset, int limit, ReadingOrder order, FeedEntryStatus last, String tag) {<NEW_LINE>JPAQuery<FeedEntry> query = query().selectFrom(entry).where(entry.feed.eq(sub.getFeed()));<... | status.read.isFalse()); |
130,411 | public void onCreation(PartTreeMongoQuery query) {<NEW_LINE>PartTree tree = query.getTree();<NEW_LINE>if (!tree.hasPredicate()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Index index = new Index();<NEW_LINE>index.named(query.getQueryMethod().getName());<NEW_LINE>Sort sort = tree.getSort();<NEW_LINE>for (Part part : tree.ge... | ), order.getDirection()); |
193,158 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE><MASK><NEW_LINE>setSupportActionBar((Toolbar) findViewById(R.id.toolbar));<NEW_LINE>mImageView = findViewById(R.id.image);<NEW_LINE>mToolbarView = findViewById(R.id.toolbar);<NEW_LINE>mToolbarView.setBackgroundCol... | setContentView(R.layout.activity_parallaxtoolbargridview); |
1,209,950 | public static void writeAccessRightsElement(XMLStreamWriter xmlw, DatasetVersionDTO datasetVersionDTO, String language) throws XMLStreamException {<NEW_LINE>// rightsList -> rights with rightsURI attribute<NEW_LINE>// <rightsList><NEW_LINE>xmlw.writeStartElement("rightsList");<NEW_LINE>// set terms from the info:eu-rep... | getLicense().getUri()); |
1,160,194 | static public void intensityE(GrayS32 derivX, GrayS32 derivY, GrayF32 intensity) {<NEW_LINE>final int w = derivX.width;<NEW_LINE>final int h = derivY.height;<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0,h,y->{<NEW_LINE>for (int y = 0; y < h; y++) {<NEW_LINE>int indexX = derivX.startIndex + y * derivX.stride;<... | .startIndex + y * derivY.stride; |
1,377,251 | public static DescribeNatGatewaysResponse unmarshall(DescribeNatGatewaysResponse describeNatGatewaysResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeNatGatewaysResponse.setRequestId(_ctx.stringValue("DescribeNatGatewaysResponse.RequestId"));<NEW_LINE>describeNatGatewaysResponse.setPageSize(_ctx.integerValue("Desc... | ("DescribeNatGatewaysResponse.NatGateways[" + i + "].VpcId")); |
380,109 | public void initialize(Server server, Injector injector) {<NEW_LINE>final ServletContextHandler root = new ServletContextHandler(ServletContextHandler.SESSIONS);<NEW_LINE>root.setInitParameter("org.eclipse.jetty.servlet.Default.dirAllowed", "false");<NEW_LINE>root.addServlet(new ServletHolder(new DefaultServlet()), "/*... | root.addServlet(managementForwardingServletHolder, "/proxy/*"); |
32,232 | public InteractionResultHolder<ItemStack> use(Level world, Player player, InteractionHand hand) {<NEW_LINE>ItemStack item = player.getItemInHand(hand);<NEW_LINE>CompoundTag nbt = item.getOrCreateTag();<NEW_LINE>boolean mainHand = hand == InteractionHand.MAIN_HAND;<NEW_LINE>// Shift -> Open GUI<NEW_LINE>if (player.isShi... | stateToUse = BlockHelper.setZeroAge(stateToUse); |
280,071 | public static void init() {<NEW_LINE>// Metrics registries will be initialized only if enabled<NEW_LINE>if (!Configuration.root().getBoolean("metrics", false)) {<NEW_LINE>logger.debug("Metrics not enabled in the conf file.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Metrics & healthcheck registries will be initialized o... | (autoTunerClassName, "baselineComputed", "count")); |
1,826,724 | final BatchCreateTableRowsResult executeBatchCreateTableRows(BatchCreateTableRowsRequest batchCreateTableRowsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchCreateTableRowsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | addHandlerContext(HandlerContextKey.SERVICE_ID, "Honeycode"); |
299,852 | protected void prepare() {<NEW_LINE>// Get parameters<NEW_LINE>ProcessInfoParameter[] para = getParametersAsArray();<NEW_LINE>for (int i = 0; i < para.length; i++) {<NEW_LINE>String name = para[i].getParameterName();<NEW_LINE>if (para[i].getParameter() == null)<NEW_LINE>;<NEW_LINE>else if (name.equals("M_Product_Catego... | para[i].getParameterAsInt(); |
15,400 | public void synchronizeKeyToPassive(PassiveSynchronizationChannel<EhcacheEntityMessage> syncChannel, int concurrencyKey) {<NEW_LINE>LOGGER.info("Sync started for concurrency key {}.", concurrencyKey);<NEW_LINE>if (concurrencyKey == DEFAULT_KEY) {<NEW_LINE>stateService.getStateRepositoryManager().syncMessageFor(storeIde... | LOGGER.info("Sync complete for concurrency key {}.", concurrencyKey); |
1,027,419 | public Set<ModeStructureSnapshot.SlidingModeSnapshot> createSlidingModeSnapshots() {<NEW_LINE>Set<ModeStructureSnapshot.SlidingModeSnapshot> result = new HashSet<ModeStructureSnapshot.SlidingModeSnapshot>();<NEW_LINE>for (Map.Entry<ModeImpl, String> curEntry : slidingModes2Sides.entrySet()) {<NEW_LINE>final ModeImpl ke... | .getValue(), lazy)); |
1,427,509 | public void spawnTracks() {<NEW_LINE>// If there are no tracks then associate is not called. Reset() could have been called at associate is<NEW_LINE>// in an undefined state<NEW_LINE>if (tracksAll.size == 0) {<NEW_LINE>for (int i = 0; i < dstDesc.size; i++) {<NEW_LINE>Point2D_F64 loc = dstPixels.get(i);<NEW_LINE>addNew... | , dstDesc.get(i)); |
447,767 | private void loadNode135() {<NEW_LINE>BaseDataVariableTypeNode node = new BaseDataVariableTypeNode(this.context, Identifiers.SubscriptionDiagnosticsArrayType_SubscriptionDiagnostics_RepublishMessageCount, new QualifiedName(0, "RepublishMessageCount"), new LocalizedText("en", "RepublishMessageCount"), LocalizedText.NULL... | .expanded(), true)); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.