idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
141,015 | private void includeConfStarted(Attributes attributes) throws SAXException, IOException, ParserConfigurationException, ParseException {<NEW_LINE>URL url = relativeUrlResolver.getURL(descriptorURL, substitute(attributes.getValue("file")), substitute(attributes.getValue("url")));<NEW_LINE>if (url == null) {<NEW_LINE>thro... | setDefaultConfMapping(parser.getDefaultConfMapping()); |
1,368,161 | public static void main(String[] args) {<NEW_LINE><MASK><NEW_LINE>if (args.length > 0) {<NEW_LINE>configBuilder.withMasterUrl(args[0]);<NEW_LINE>}<NEW_LINE>try (KubernetesClient client = new KubernetesClientBuilder().withConfig(configBuilder.build()).build()) {<NEW_LINE>String namespace = NAMESPACE;<NEW_LINE>if (args.l... | final ConfigBuilder configBuilder = new ConfigBuilder(); |
287,335 | private long computeNextScheduledExecutionTimeStartingAt(long startTime) {<NEW_LINE>if (startTime <= 0) {<NEW_LINE>// has never been run<NEW_LINE>return mStartDate;<NEW_LINE>}<NEW_LINE>int multiplier = mRecurrence.getMultiplier();<NEW_LINE>LocalDateTime nextScheduledExecution = LocalDateTime.<MASK><NEW_LINE>switch(mRec... | fromDateFields(new Date(startTime)); |
527,034 | private void handleTag(String tag, String tagContent) {<NEW_LINE>tagContent = tagContent.trim();<NEW_LINE>if (TagElement.TAG_PARAM.equals(tag)) {<NEW_LINE>fParameters.add(tagContent);<NEW_LINE>} else if (TagElement.TAG_RETURN.equals(tag)) {<NEW_LINE>fReturn = tagContent;<NEW_LINE>} else if (TagElement.TAG_EXCEPTION.equ... | .add(substituteQualification(tagContent)); |
1,151,981 | final DeleteLanguageModelResult executeDeleteLanguageModel(DeleteLanguageModelRequest deleteLanguageModelRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteLanguageModelRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
340,082 | protected void readSetCursor(int width, int height, Point hotspot) {<NEW_LINE>int data_len = width * height * (handler.server.pf().bpp / 8);<NEW_LINE>int mask_len = ((width + 7) / 8) * height;<NEW_LINE>ByteBuffer data = ByteBuffer.allocate(data_len);<NEW_LINE>ByteBuffer mask = ByteBuffer.allocate(mask_len);<NEW_LINE>in... | is.readBytes(data, data_len); |
1,202,792 | public StartLifecyclePolicyPreviewResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>StartLifecyclePolicyPreviewResult startLifecyclePolicyPreviewResult = new StartLifecyclePolicyPreviewResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = c... | class).unmarshall(context)); |
1,159,101 | public static DescribeInstanceAccountsResponse unmarshall(DescribeInstanceAccountsResponse describeInstanceAccountsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeInstanceAccountsResponse.setRequestId(_ctx.stringValue("DescribeInstanceAccountsResponse.RequestId"));<NEW_LINE>describeInstanceAccountsResponse.setSu... | = new ArrayList<DbPrivilege>(); |
761,126 | protected TypedQuery<T> internalSetParameter(int position, Object value, boolean implicitConversions) {<NEW_LINE>checkState();<NEW_LINE>DbmsFeatures dbmsFeatures = DbmsSpecificFactory.getDbmsFeatures();<NEW_LINE>if (isNative && (value instanceof UUID) && (dbmsFeatures.getUuidTypeClassName() != null)) {<NEW_LINE>Class c... | throw new RuntimeException("Error setting parameter value", e); |
1,095,422 | public void marshall(ProvisionedProductPlanSummary provisionedProductPlanSummary, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (provisionedProductPlanSummary == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marsha... | e.getMessage(), e); |
1,201,227 | public void cleanupTemplateSR(final Connection conn) {<NEW_LINE>Set<PBD> pbds = null;<NEW_LINE>try {<NEW_LINE>final Host host = Host.getByUuid(conn, _host.getUuid());<NEW_LINE><MASK><NEW_LINE>} catch (final XenAPIException e) {<NEW_LINE>s_logger.warn("Unable to get the SRs " + e.toString(), e);<NEW_LINE>throw new Cloud... | pbds = host.getPBDs(conn); |
1,557,109 | // Private Methods<NEW_LINE>private void visitFlowFolders(final Path flowFolder, final String packagePath) throws FrameworkException {<NEW_LINE>// Start at flows base folder<NEW_LINE>final File rootDir = new File(flowFolder.<MASK><NEW_LINE>// Start import for each flow and their respective __children<NEW_LINE>File[] ch... | toAbsolutePath().toString()); |
1,652,683 | public VirtualGatewayHttpConnectionPool unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>VirtualGatewayHttpConnectionPool virtualGatewayHttpConnectionPool = new VirtualGatewayHttpConnectionPool();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = conte... | class).unmarshall(context)); |
1,156,642 | public void copyFrom(LongBuffer source) throws CudaException {<NEW_LINE>final <MASK><NEW_LINE>final int toIndex = source.limit();<NEW_LINE>lengthCheck(toIndex - fromIndex, 3);<NEW_LINE>if (source.isDirect()) {<NEW_LINE>// <br/><NEW_LINE>// <br/><NEW_LINE>copyFromHostDirect(// <br/><NEW_LINE>deviceId, getAddress(), sour... | int fromIndex = source.position(); |
874,789 | public void handleInboundPingReq(@NotNull final ChannelHandlerContext ctx, @NotNull final PINGREQ pingreq) {<NEW_LINE>final Channel channel = ctx.channel();<NEW_LINE>final ClientConnection clientConnection = channel.attr(ChannelAttributes.CLIENT_CONNECTION).get();<NEW_LINE>final String clientId = clientConnection.getCl... | ClientContextImpl clientContext = clientConnection.getExtensionClientContext(); |
83,758 | public boolean createJob(String slurmScript, String heronExec, String[] commandArgs, String topologyWorkingDirectory, long containers, String partition) {<NEW_LINE>// get the command to run the job on Slurm cluster<NEW_LINE>List<String> slurmCmd = slurmCommand(<MASK><NEW_LINE>// change the empty strings of command args... | slurmScript, heronExec, containers, partition); |
1,630,089 | public static boolean shouldRun(Description desc) {<NEW_LINE>Class<?> c = desc == null ? KerberosPlatformRule.class : desc.getTestClass();<NEW_LINE>String m = (desc == null || desc.getMethodName() == null) ? "shouldRun" : desc.getMethodName();<NEW_LINE>// Kerberos is only supported on certain operating systems<NEW_LINE... | KeyTab.getInstance(princ, keytabFile); |
879,011 | public Map<String, Object> createDefaultFindProperties() {<NEW_LINE>HashMap<String, Object> <MASK><NEW_LINE>props.put(FIND_WHAT, null);<NEW_LINE>props.put(FIND_REPLACE_WITH, null);<NEW_LINE>props.put(FIND_HIGHLIGHT_SEARCH, Boolean.TRUE);<NEW_LINE>props.put(FIND_INC_SEARCH, Boolean.TRUE);<NEW_LINE>props.put(FIND_BACKWAR... | props = new HashMap<>(); |
1,250,364 | public void onTracksInfoChanged(TracksInfo tracksInfo) {<NEW_LINE>// Suppress the update if transitioning to an unprepared period within the same window. This<NEW_LINE>// is necessary to avoid closing the shutter when such a transition occurs. See:<NEW_LINE>// https://github.com/google/ExoPlayer/issues/5507.<NEW_LINE>P... | getPeriod(lastPeriodIndexWithTracks, period).windowIndex; |
879,361 | public void processMessage(final WebSocketMessage webSocketData) throws FrameworkException {<NEW_LINE>setDoTransactionNotifications(true);<NEW_LINE>final SecurityContext securityContext = getWebSocket().getSecurityContext();<NEW_LINE>final String code = webSocketData.getNodeDataStringValue("code");<NEW_LINE>final Strin... | ).build(), true); |
1,074,281 | private void alignExactMatching(IntList subLines1, IntList subLines2) {<NEW_LINE>int n = Math.max(subLines1.size(), subLines2.size());<NEW_LINE>// we use brute-force algorithm (C_n_k). This will limit search space by ~250 cases.<NEW_LINE>boolean // we use brute-force algorithm (C_n_k). This will limit search space by ~... | index2 = subLines2.get(i); |
581,070 | protected Scope visitDelete(Delete node, Optional<Scope> scope) {<NEW_LINE>Table table = node.getTable();<NEW_LINE>QualifiedObjectName tableName = createQualifiedObjectName(session, table, table.getName());<NEW_LINE>if (metadata.getView(session, tableName).isPresent()) {<NEW_LINE>throw new SemanticException(NOT_SUPPORT... | AllowAllAccessControl(), session, warningCollector); |
575,072 | public void open() {<NEW_LINE>allRepositories.forEach(DataSourceRepository::open);<NEW_LINE>addAll(localRepository.listExistingSources(CONFIG));<NEW_LINE>addAll(findMultipleSources(config.osmFiles(), OSM));<NEW_LINE>addAll(findMultipleSources(config.demFiles(), DEM));<NEW_LINE>addAll(findMultipleCompositeSources(config... | (streetGraph, graph, buildReportDir)); |
199,647 | public void initializeDefaultPreferences() {<NEW_LINE>IEclipsePreferences prefs = DefaultScope.INSTANCE.getNode(CommonEditorPlugin.PLUGIN_ID);<NEW_LINE>prefs.putBoolean(IPreferenceConstants.ENABLE_CHARACTER_PAIR_COLORING, true);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>prefs.put(IPreferenceConstants.CHARACTER_PAIR_COLOR, "128,... | putInt(IPreferenceConstants.EDITOR_MAX_COLORED_COLUMNS, maxCols); |
156,229 | private void orientAroundTaskView(TaskView taskView) {<NEW_LINE>PagedOrientationHandler orientationHandler = taskView.getPagedOrientationHandler();<NEW_LINE>measure(MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED);<NEW_LINE>orientationHandler.setTaskMenuAroundTaskView(this, mTaskInsetMargin);<NEW_LINE>// Get Position<... | getDimensionPixelSize(R.dimen.task_menu_vertical_padding); |
807,573 | Predicate createPredicateNumeric(String theResourceName, String theParamName, From<?, ? extends BaseResourceIndexedSearchParam> theFrom, CriteriaBuilder builder, IQueryParameterType theParam, ParamPrefixEnum thePrefix, BigDecimal theValue, final Expression<BigDecimal> thePath, String invalidMessageName, RequestPartitio... | , theParam.getValueAsQueryToken(myContext)); |
1,598,365 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>View rootview = inflater.inflate(R.layout.fragment_home, container, false);<NEW_LINE><MASK><NEW_LINE>mFragmentManager = getFragmentManager();<NEW_LINE>mHotelBookingView.setOnClickListener(v -> {<NEW_LINE>Intent ... | ButterKnife.bind(this, rootview); |
1,676,829 | public void authenticate() throws AlluxioStatusException {<NEW_LINE>LOG.debug("Authenticating channel: {}. AuthType: {}", mChannelKey.toStringShort(), mAuthType);<NEW_LINE>ChannelAuthenticationScheme authScheme = getChannelAuthScheme(mAuthType, mParentSubject, mChannelKey.getServerAddress().getSocketAddress());<NEW_LIN... | , authScheme, mParentSubject), mChannelKey); |
1,725,361 | private Person updatePerson(Business business, PullResult result, Person person, User user) throws Exception {<NEW_LINE>EntityManagerContainer emc = business.entityManagerContainer();<NEW_LINE>emc.beginTransaction(Person.class);<NEW_LINE>person.setWeLinkHash(DigestUtils.sha256Hex(XGsonBuilder.toJson(user)));<NEW_LINE><... | String employee = user.getCorpUserId(); |
306,072 | public FrequentItemsetsResult run(final Relation<BitVector> relation) {<NEW_LINE>// TODO: implement with resizable arrays, to not need dim.<NEW_LINE>final int dim = RelationUtil.dimensionality(relation);<NEW_LINE>final VectorFieldTypeInformation<BitVector> meta = RelationUtil.assumeVectorField(relation);<NEW_LINE>// Co... | statistics(ctime.end()); |
866,637 | private Long count(EffectivePerson effectivePerson, Business business, String keyString) throws Exception {<NEW_LINE>EntityManager em = business.entityManagerContainer().get(PersonCard.class);<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<Long> cq = cb.createQuery(Long.class);<NEW_LINE>R... | root)).where(pe); |
283,194 | public static void prepareResponse(final HttpServletResponse response, final String fileName, String mimeType, final int fileSize) {<NEW_LINE>if ((mimeType == null) && (fileName != null)) {<NEW_LINE>final String extension = FileNameUtil.getExtension(fileName);<NEW_LINE>mimeType = MimeTypes.getMimeType(extension);<NEW_L... | "attachment;filename=\"" + name + "\";filename*=utf8''" + encodedFileName); |
1,731,898 | private void collectionAction(RESTRequest request, RESTResponse response) {<NEW_LINE>RESTHelper.ensureConsumesJson(request);<NEW_LINE>InputStream is = RESTHelper.getInputStream(request);<NEW_LINE>try {<NEW_LINE>JSONObject obj = (<MASK><NEW_LINE>JSONArray filesArray = (JSONArray) obj.get("delete");<NEW_LINE>final int si... | JSONObject) JSON.parse(is); |
1,012,046 | /*<NEW_LINE>Call This function from any activity to set notification:<NEW_LINE>Example:<NEW_LINE>MiscUtils.showNotification(getApplicationContext(),<NEW_LINE>getResources().getString(R.string.app_name_short),<NEW_LINE>getResources().getString(R.string.app_name_short)+" - "+getResources().getString(R.string.status_good)... | setContentIntent(contentIntent).build(); |
1,490,339 | public void updateIndices(SegmentDirectory.Writer segmentWriter, IndexCreatorProvider indexCreatorProvider) throws IOException {<NEW_LINE>// Remove indices not set in table config any more<NEW_LINE>String segmentName = _segmentMetadata.getName();<NEW_LINE>Set<String> existingColumns = segmentWriter.toSegmentDirectory()... | info("Removing existing range index from segment: {}, column: {}", segmentName, column); |
1,373,376 | public HttpMessage handleApiOther(HttpMessage msg, String name, JSONObject params) throws ApiException {<NEW_LINE>if (OTHER_GENERATE_FORM.equals(name)) {<NEW_LINE>String hrefIdStr = params.getString(OTHER_GENERATE_FORM_PARAM_HREFID);<NEW_LINE>if (hrefIdStr == null || hrefIdStr.length() == 0) {<NEW_LINE>throw new ApiExc... | .getDefaultResponseHeader("text/html; " + charset)); |
929,997 | public void commitStateHash(final int stateHash) throws StateDeltaTrackerException {<NEW_LINE>synchronized (this) {<NEW_LINE>if (capacityExceeded) {<NEW_LINE>throw new StateDeltaTrackerException("Memory capacity exceeded for StateDeltaTracker, so states cannot be reliably committed");<NEW_LINE>}<NEW_LINE>if (committedS... | .format("State hash %d was already committed, likely indicating a state hash collision", stateHash)); |
531,658 | public void handleOutboundUnsuback(@NotNull final ChannelHandlerContext ctx, @NotNull final UNSUBACK unsuback, @NotNull final ChannelPromise promise) {<NEW_LINE>final Channel channel = ctx.channel();<NEW_LINE>final ClientConnection clientConnection = channel.attr(ChannelAttributes.CLIENT_CONNECTION).get();<NEW_LINE>fin... | = new ExtensionParameterHolder<>(input); |
42,846 | private void registerWellKnownModulesIfAvailable(MultiValueMap<Object, Module> modulesToRegister) {<NEW_LINE>try {<NEW_LINE>Class<? extends Module> jdk8ModuleClass = (Class<? extends Module>) ClassUtils.forName("com.fasterxml.jackson.datatype.jdk8.Jdk8Module", this.moduleClassLoader);<NEW_LINE>Module jdk8Module = BeanU... | javaTimeModule = BeanUtils.instantiateClass(javaTimeModuleClass); |
1,042,298 | public void addRecord(@NonNull Transaction transaction, UpdateMethod updateMethod) {<NEW_LINE>Log.d(LOG_TAG, "Adding transaction to the db via " + updateMethod.name());<NEW_LINE>mDb.beginTransaction();<NEW_LINE>try {<NEW_LINE>Split imbalanceSplit = transaction.createAutoBalanceSplit();<NEW_LINE>if (imbalanceSplit != nu... | getSplits().size()); |
1,100,827 | public static TokenInfo createNewAccessToken(@Nonnull Main main, @Nonnull String sessionHandle, @Nonnull String userId, @Nonnull String refreshTokenHash1, @Nullable String parentRefreshTokenHash1, @Nonnull JsonObject userData, @Nullable String antiCsrfToken, long lmrt, @Nullable Long expiryTime) throws StorageQueryExce... | long now = System.currentTimeMillis(); |
424,628 | protected Object readProperty(String path, RedisData source, RedisPersistentProperty persistentProperty) {<NEW_LINE>String currentPath = !path.isEmpty() ? path + "." + persistentProperty.getName() : persistentProperty.getName();<NEW_LINE>TypeInformation<?> typeInformation = persistentProperty.getTypeInformation();<NEW_... | ), source.getBucket()); |
551,603 | private StorageCommand createSchemaUpgradeCommand(LogCommandSerialization serialization, InjectedNLIUpgradeCallback injectedNLIUpgradeCallback) {<NEW_LINE>// Pass in callback with new id here and modify<NEW_LINE>try (var cursorContext = new CursorContext(cacheTracer.createPageCursorTracer(SCHEMA_UPGRADE_TAG))) {<NEW_LI... | nliId = schemaStore.nextId(cursorContext); |
1,158,590 | // reloads the element on all open panels and adds it to the custom element panel if not already there.<NEW_LINE>private void updateElement(GridElement element) {<NEW_LINE>// if a new element has been created add it to current diagram<NEW_LINE>if (originalElement == null) {<NEW_LINE>DiagramHandler current = null;<NEW_L... | .getCurrentDiagram().getHandler(); |
575,399 | public List<List<Integer>> zigzagLevelOrder(TreeNode root) {<NEW_LINE>Queue<TreeNode> queue = new LinkedList();<NEW_LINE>List<List<Integer>> levels = new ArrayList();<NEW_LINE>if (root == null) {<NEW_LINE>return levels;<NEW_LINE>}<NEW_LINE>queue.offer(root);<NEW_LINE>boolean forward = true;<NEW_LINE>while (!queue.isEmp... | Integer> level = new ArrayList(); |
1,186,858 | public void confirmOfflinePayment(Event event, String reservationId, String username) {<NEW_LINE>TicketReservation ticketReservation = findById(reservationId).orElseThrow(IllegalArgumentException::new);<NEW_LINE>ticketReservationRepository.lockReservationForUpdate(reservationId);<NEW_LINE>Validate.isTrue(ticketReservat... | ), event.mustUseFirstAndLastName()); |
435,996 | private String generateAdditionalItems(Set<FullyQualifiedJavaType> imports, IntrospectedColumn introspectedColumn, boolean idColumn) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>if (stringHasValue(introspectedColumn.getTypeHandler())) {<NEW_LINE>FullyQualifiedJavaType fqjt = new <MASK><NEW_LINE>imports.a... | FullyQualifiedJavaType(introspectedColumn.getTypeHandler()); |
878,051 | public ChartPlotter plot(ChartPlotter plotter, boolean withZero, int x1, int x2) {<NEW_LINE>// Peaks<NEW_LINE>if ((getPeaks() != null) && !peaks.isEmpty()) {<NEW_LINE>plotter.add(getPeakSeries(x1, x2), Colors.CHART_PEAK);<NEW_LINE>}<NEW_LINE>// HiLos<NEW_LINE>if (hilos != null) {<NEW_LINE>// With shapes<NEW_LINE>plotte... | , x2), Colors.CHART_DERIVATIVE); |
1,284,556 | static Object readFromXml(InputStream bufferedInput) throws IOException {<NEW_LINE>final XStream xstream = createXStream(false);<NEW_LINE>// see http://x-stream.github.io/security.html<NEW_LINE>// clear out existing permissions and set own ones<NEW_LINE>xstream.addPermission(NoTypePermission.NONE);<NEW_LINE>// allow so... | [] { PACKAGE_NAME + ".*" }); |
499,650 | final ListGameServerGroupsResult executeListGameServerGroups(ListGameServerGroupsRequest listGameServerGroupsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listGameServerGroupsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
496,815 | private String toZQLConditionString(QueryCondition c) {<NEW_LINE>// make every condition value as string, the ZQL<NEW_LINE>// will put them in right type because it knows every field's type<NEW_LINE>QueryOp op = QueryOp.valueOf(c.getOp());<NEW_LINE>if (c.getValue() == null) {<NEW_LINE>return String.format("%s %s", c.ge... | .join(values, ",")); |
226,287 | private void processSyncMessageChunk(CommsByteBuffer buffer, Conversation conversation, boolean connectionMessage) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(this, tc, "processSyncMessageChunk", new Object[] { buffer, conversation, connectionMessage });<NEW_LINE>// ... | tc, "Consumer Session Id:", "" + consumerSessionId); |
1,511,867 | private NotificationMessageFormatter prepareMessageFormatter(final UserNotificationRequest request) {<NEW_LINE>final NotificationMessageFormatter formatter = NotificationMessageFormatter.newInstance();<NEW_LINE>final TargetAction targetAction = request.getTargetAction();<NEW_LINE>if (targetAction instanceof TargetRecor... | ), targetViewAction.getViewId()); |
9,055 | public void animateTick(BlockState state, Level level, BlockPos pos, Random r) {<NEW_LINE>if (!AEConfig.instance().isEnableEffects()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final VibrationChamberBlockEntity tc = this.getBlockEntity(level, pos);<NEW_LINE>if (tc != null && tc.isOn) {<NEW_LINE>double f1 = pos.getX() + 0.5... | * (0.3 * ox - 0.15); |
966,123 | private void initTextArea(JPanel centerPanel) {<NEW_LINE>GridBagConstraints constraints = new GridBagConstraints();<NEW_LINE>editorPane.setContentType("text/html");<NEW_LINE>editorPane.putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES, Boolean.TRUE);<NEW_LINE>editorPane.setCaretPosition(0);<NEW_LINE>editorPane.set... | setTransferHandler(new ChatTransferHandler(chatPanel)); |
1,295,069 | private static TableFieldSchema convertProtoFieldDescriptorToBigQueryField(FieldDescriptor fieldDescriptor, boolean preserveProtoFieldNames, @Nullable FieldDescriptor parent, int nestingLevel) {<NEW_LINE>TableFieldSchema schema = new TableFieldSchema();<NEW_LINE>String jsonName = fieldDescriptor.getJsonName();<NEW_LINE... | ).collect(toList()); |
992,350 | //<NEW_LINE>@Trivial<NEW_LINE>public void logClassInfo(Logger useLogger) {<NEW_LINE>String methodName = "logClassInfo";<NEW_LINE>if (useLogger.isLoggable(Level.FINER)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>UtilImpl_InternMap useClassNameInternMap = getClassNameInternMap();<NEW_LINE>TargetsTableClassesMultiImpl useClas... | ().size())); |
623,508 | static <T, A1, A2, D1, D2> Collector<T, Tuple2<A1, A2>, Tuple2<D1, D2>> collectors(Collector<? super T, A1, D1> collector1, Collector<? super T, A2, D2> collector2) {<NEW_LINE>return Collector.<T, Tuple2<A1, A2>, Tuple2<D1, D2>>of(() -> tuple(collector1.supplier().get(), collector2.supplier().get()), (a, t) -> {<NEW_LI... | apply(a.v2))); |
1,749,973 | private void togglePredefinedLocation(@SuppressWarnings("unused") ObservableValue<? extends Toggle> observable, @SuppressWarnings("unused") Toggle oldValue, Toggle newValue) {<NEW_LINE>if (iclouddriveRadioButton.equals(newValue)) {<NEW_LINE>vaultPath.set(locationPresets.getIclouddriveLocation().resolve(vaultName.get())... | (vaultName.get())); |
853,535 | public // ---------------------<NEW_LINE>void runTests() {<NEW_LINE>// Count vertices and edges grouped by labels.<NEW_LINE>// This example shows how a HashMap can be passed to a query<NEW_LINE>// using a side effect.<NEW_LINE>final Map<String, Long> <MASK><NEW_LINE>g.withSideEffect("m", map).V().groupCount("m").by(T.l... | map = new HashMap<>(); |
180,468 | final ListCandidatesForAutoMLJobResult executeListCandidatesForAutoMLJob(ListCandidatesForAutoMLJobRequest listCandidatesForAutoMLJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listCandidatesForAutoMLJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRe... | addHandlerContext(HandlerContextKey.SERVICE_ID, "SageMaker"); |
321,566 | public SearchCriteria buildSearchCriteria(HttpServletRequest request) {<NEW_LINE>SearchCriteria searchCriteria = createSearchCriteria();<NEW_LINE>searchCriteria.setPageSize(getDefaultPageSize());<NEW_LINE>Map<String, String[]> facets = new HashMap<>();<NEW_LINE>for (Entry<String, String[]> entry : request.getParameterM... | key, entry.getValue()); |
1,080,157 | ImmutableList<CToolchain.Builder> createCrosstools() {<NEW_LINE>ImmutableList.Builder<CToolchain.Builder> toolchains = ImmutableList.builder();<NEW_LINE>toolchains.add(createAarch64Toolchain());<NEW_LINE>// The flags for aarch64 clang 3.5 and 3.6 are the same, they differ only in the LLVM version<NEW_LINE>// given in t... | .add(createAarch64ClangToolchain("3.5")); |
374,750 | public synchronized <T> ClassLoader create(RegisterKey key, DistributeCache distributeCache, Class<T> service, Predicate<T> serviceFilter, Function<Tuple2<T, PluginDescriptor>, String> versionGetter) {<NEW_LINE>ClassLoader <MASK><NEW_LINE>if (hit != null) {<NEW_LINE>return hit;<NEW_LINE>}<NEW_LINE>hit = registeredClass... | hit = registeredClassLoaders.get(key); |
1,576,611 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String eplCreate = namedWindow ? "@public create window MyInfra#keepall as (c0 string, c1 int)" : "@public create table MyInfra(c0 string primary key, c1 int)";<NEW_LINE>env.compileDeploy(eplCreate, path);<NEW_LIN... | sendEventBean(new SupportBean_S0(0)); |
908,859 | protected // NOSONAR<NEW_LINE>// NOSONAR<NEW_LINE>boolean // NOSONAR<NEW_LINE>copyFileToLocalDirectory(String remoteDirectoryPath, @Nullable EvaluationContext localFileEvaluationContext, F remoteFile, File localDirectory, Session<F> session) throws IOException {<NEW_LINE>String remoteFileName = getFilename(remoteFile);... | colonIndex = hostPort.lastIndexOf(':'); |
434,293 | private void asyncCallJSEventWithResult(final EventResult eventCallback, final String method, final String instanceId, final List<Object> params, final Object... args) {<NEW_LINE>post(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>Object result = null;<NEW_LINE>try {<NEW_LINE>if (ar... | JSONArray) WXWsonJSONSwitch.parseWsonOrJSON(result); |
1,544,537 | public void run() {<NEW_LINE>final FileChooserDescriptor descriptor = myDirectorySelector ? FileChooserDescriptorFactory.createSingleFolderDescriptor() : FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor();<NEW_LINE>descriptor.setTitle(String.format("Select %s Base", myDirectorySelector ? "Directory" : "Fil... | chooseFile(descriptor, myProject, null); |
722,486 | public static File resolveFile(File basedir, String filename) throws IllegalArgumentException {<NEW_LINE>if (basedir == null) {<NEW_LINE>// NOI18N<NEW_LINE>throw new NullPointerException("null basedir passed to resolveFile");<NEW_LINE>}<NEW_LINE>if (filename == null) {<NEW_LINE>// NOI18N<NEW_LINE>throw new NullPointerE... | length()) + FileObjects.CLASS; |
579,500 | private void parseFetcherConfiguration(Element configuration) {<NEW_LINE>_fetchersConfDataList = new ArrayList<FetcherConfigurationData>();<NEW_LINE>NodeList nodes = configuration.getChildNodes();<NEW_LINE>int n = 0;<NEW_LINE>for (int i = 0; i < nodes.getLength(); i++) {<NEW_LINE>// Each heuristic node<NEW_LINE>Node no... | throw new RuntimeException("No tag 'classname' in fetcher " + n); |
328,247 | final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(tagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | endClientExecution(awsRequestMetrics, request, response); |
1,166,590 | protected Control createDialogArea(Composite parent) {<NEW_LINE>Composite composite = (Composite) super.createDialogArea(parent);<NEW_LINE>Label tagNameLabel = new Label(composite, SWT.NONE);<NEW_LINE>tagNameLabel.setText(Messages.CreateTagDialog_Message);<NEW_LINE>tagNameText = new Text(composite, SWT.MULTI | SWT.BORD... | .GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL)); |
637,473 | public static void main(String[] args) throws Throwable {<NEW_LINE>String cp = System.getProperty("java.class.path", null);<NEW_LINE><MASK><NEW_LINE>Manifest manifest = mainJar.getManifest();<NEW_LINE>if (manifest == null) {<NEW_LINE>System.err.println("JAR file is missing manifest; cannot start JVM.");<NEW_LINE>} else... | JarFile mainJar = new JarFile(cp); |
37,250 | private void pasteAfterCopy(PsiElement[] elements, Module module, PsiElement target, boolean tryFromFiles) {<NEW_LINE>PsiDirectory targetDirectory = elements.length == 1 && elements[0] == target ? null : getTargetDirectory(module, target);<NEW_LINE>try {<NEW_LINE>if (CopyHandler.canCopy(elements)) {<NEW_LINE>CopyHandle... | items, module, target, false); |
1,661,703 | private static Class<?> generateArrayCast(TypeManager typeManager, FunctionMetadata elementCastFunctionMetadata, JavaScalarFunctionImplementation elementCast) {<NEW_LINE>CallSiteBinder binder = new CallSiteBinder();<NEW_LINE>ClassDefinition definition = new ClassDefinition(a(PUBLIC, FINAL), makeClassName(Joiner.on("$")... | Scope scope = method.getScope(); |
849,853 | public void resultReceived(SearchInstance search, SearchResult result) {<NEW_LINE>if (min_seeds > 0) {<NEW_LINE>Number seeds = ((Number) result.getProperty(SearchResult.PR_SEED_COUNT));<NEW_LINE>if (seeds != null && seeds.intValue() < min_seeds) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (min_leechers > 0) {<... | "results=" + num_results.incrementAndGet()); |
969,782 | public String createNewPolicyForResourceSet(@PathVariable(value = "rsid") Long rsid, @RequestBody String jsonString, Model m, Authentication auth) {<NEW_LINE>ResourceSet rs = resourceSetService.getById(rsid);<NEW_LINE>if (rs == null) {<NEW_LINE>m.addAttribute(HttpCodeView.CODE, HttpStatus.NOT_FOUND);<NEW_LINE>return Ht... | HttpCodeView.CODE, HttpStatus.BAD_REQUEST); |
1,015,691 | final AssociateAwsAccountWithPartnerAccountResult executeAssociateAwsAccountWithPartnerAccount(AssociateAwsAccountWithPartnerAccountRequest associateAwsAccountWithPartnerAccountRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(associateAwsAccountWithPartnerAccountRequest);<NEW_LINE>AWSReque... | endClientExecution(awsRequestMetrics, request, response); |
525,536 | public void createGetChildResourceForListResources(String keyAttributeName, String childResourceClassName) {<NEW_LINE>MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "get" + childResourceClassName, "(Ljava/lang/String;)L" + generatedPath + childResourceClassName + ";", null, null);<NEW_LINE>RestLogging.restLogger.log(<MA... | Level.FINE, "Creating resource with path {0} (5)", keyAttributeName); |
1,084,826 | public static String convertUTF8WithBuf(byte[] buf, char[] out, int offset, int utfSize) throws UTFDataFormatException {<NEW_LINE>int count <MASK><NEW_LINE>while (count < utfSize) {<NEW_LINE>if ((out[s] = (char) buf[offset + count++]) < '\u0080')<NEW_LINE>s++;<NEW_LINE>else if (((a = out[s]) & 0xe0) == 0xc0) {<NEW_LINE... | = 0, s = 0, a; |
1,552,761 | final ModifyIpamResult executeModifyIpam(ModifyIpamRequest modifyIpamRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(modifyIpamRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
1,156,215 | public static Object[] removeElement(Object[] arr, Object toRemove) {<NEW_LINE>Assert.isNotNull(arr);<NEW_LINE>int index = -1;<NEW_LINE>for (int i = 0; i < arr.length; i++) {<NEW_LINE>if (arr[i].equals(toRemove)) {<NEW_LINE>index = i;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (index >= 0) {<NEW_LINE>Object[] ne... | ), arr.length - 1); |
1,319,134 | public void mediaPlayerError(PlayerErrorEvent event) {<NEW_LINE>final AlertDialog.Builder errorDialog = new <MASK><NEW_LINE>errorDialog.setTitle(R.string.error_label);<NEW_LINE>errorDialog.setMessage(event.getMessage());<NEW_LINE>errorDialog.setPositiveButton(android.R.string.ok, (dialog, which) -> ((MainActivity) getA... | AlertDialog.Builder(getContext()); |
859,205 | public void run() {<NEW_LINE>Result<MASK><NEW_LINE>if (res.isPartial()) {<NEW_LINE>// we will ignore any rare occurances of repository being added after the groupId result is<NEW_LINE>// processed.. this is the only way of ensuring that the completion gets refreshed.<NEW_LINE>res.waitForSkipped();<NEW_LINE>populateGrou... | <String> res = populateGroupId(); |
639,866 | boolean contains(Point p) {<NEW_LINE>Point extreme = new Point(Integer.MAX_VALUE, p.y);<NEW_LINE>Segment pToExtreme <MASK><NEW_LINE>// Count intersections of the above line with sides of polygon<NEW_LINE>int count = 0;<NEW_LINE>int i = 0;<NEW_LINE>do {<NEW_LINE>int next = (i + 1) % points.size();<NEW_LINE>Segment iToNe... | = new Segment(p, extreme); |
365,079 | private void putBytesPositiveToIntegers(byte[] byteValues) {<NEW_LINE>int bytesLen = byteValues.length;<NEW_LINE>int highBytes = bytesLen & 3;<NEW_LINE>numberLength = (bytesLen >> 2) + ((highBytes == 0) ? 0 : 1);<NEW_LINE>digits = new int[numberLength];<NEW_LINE>int i = 0;<NEW_LINE>// Put bytes to the int array startin... | (byteValues[j] & 0xFF); |
108,931 | final RefreshTokenResult executeRefreshToken(RefreshTokenRequest refreshTokenRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(refreshTokenRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,007,418 | public void run(RegressionEnvironment env) {<NEW_LINE>String epl = "@name('window') create window RecentWindow#time(30 seconds) (id string, currentSewid SimpleEventWithId, prevSewid SimpleEventWithId);\n" + "on SimpleEventWithId as sewid\n" + " merge RecentWindow as recent where recent.id = sewid.id\n" + " when not m... | Object[] { "id", "B" }; |
1,839,900 | public boolean updateMicroserviceProperties(String microserviceId, Map<String, String> serviceProperties) {<NEW_LINE>Holder<HttpClientResponse> <MASK><NEW_LINE>IpPort ipPort = ipPortManager.getAvailableAddress();<NEW_LINE>try {<NEW_LINE>UpdatePropertiesRequest request = new UpdatePropertiesRequest();<NEW_LINE>request.s... | holder = new Holder<>(); |
928,540 | public Object invoke(Exchange exchange, Object o) {<NEW_LINE>final Object serviceObject = getServiceObject(exchange);<NEW_LINE>try {<NEW_LINE>BindingOperationInfo bop = exchange.getBindingOperationInfo();<NEW_LINE>// Liberty Change: exchange.getService() causes an NPE since it returns null when an EJB service is being ... | exchange, serviceObject, m, params); |
912,283 | static Request update(UpdateRequest updateRequest) throws IOException {<NEW_LINE>String endpoint = endpoint(updateRequest.index(), updateRequest.type(), updateRequest.id(), "_update");<NEW_LINE>Request request = new Request(HttpPost.METHOD_NAME, endpoint);<NEW_LINE>Params parameters = new Params(request);<NEW_LINE>para... | withVersion(updateRequest.version()); |
653,105 | public void prepare(PreparedStatement statement) throws SQLException {<NEW_LINE>statement.setString(1, information.getName());<NEW_LINE>statement.setString(2, information.getTableColor().name());<NEW_LINE>setStringOrNull(statement, 3, columns[0]);<NEW_LINE>setStringOrNull(statement, 4, columns[1]);<NEW_LINE>setStringOr... | , 5, columns[2]); |
968,707 | final GetReservedNodeExchangeOfferingsResult executeGetReservedNodeExchangeOfferings(GetReservedNodeExchangeOfferingsRequest getReservedNodeExchangeOfferingsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getReservedNodeExchangeOfferingsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetri... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,078,107 | public ChannelTargetInfo unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ChannelTargetInfo channelTargetInfo = new ChannelTargetInfo();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = ori... | class).unmarshall(context)); |
228,498 | private boolean craftRecipe() {<NEW_LINE>// (1) Find the items to craft with and put a copy into a temp crafting grid;<NEW_LINE>// also record what was used to destroy it later<NEW_LINE>InventoryCrafting inv = new InventoryCrafting(new Container() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean canInteractWith(@... | CraftingManager.findMatchingRecipe(inv, world); |
1,603,776 | private // Only hosts is supported right now<NEW_LINE>HttpResponse doAssessment(HttpRequest request) {<NEW_LINE>Inspector inspector = inspectorOrThrow(request);<NEW_LINE>// For now; mandatory fields<NEW_LINE>Inspector <MASK><NEW_LINE>Inspector switchArray = inspector.field("switches");<NEW_LINE>// The impacted hostname... | hostArray = inspector.field("hosts"); |
1,012,720 | public NetworkInterfaceCount unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>NetworkInterfaceCount networkInterfaceCount = new NetworkInterfaceCount();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetDepth += 1;<NEW_LINE>whil... | int originalDepth = context.getCurrentDepth(); |
912,813 | private void handleNetworkSettings() {<NEW_LINE>if (isInCreateMode()) {<NEW_LINE>NetworkInterface primaryNetworkInterface = null;<NEW_LINE>if (this.creatablePrimaryNetworkInterfaceKey != null) {<NEW_LINE>primaryNetworkInterface = this.taskResult(this.creatablePrimaryNetworkInterfaceKey);<NEW_LINE>} else if (this.existi... | networkInterfaces().add(nicReference); |
86,893 | public static String encode(byte[] buf) {<NEW_LINE>int size = buf.length;<NEW_LINE>char[] ar = new char[((size + 2) / 3) * 4];<NEW_LINE>int a = 0;<NEW_LINE>int i = 0;<NEW_LINE>while (i < size) {<NEW_LINE>byte b0 = buf[i++];<NEW_LINE>byte b1 = (i < size) ? buf[i++] : 0;<NEW_LINE>byte b2 = (i < size) <MASK><NEW_LINE>int ... | ? buf[i++] : 0; |
922,967 | public InstancePrivateIpAddress unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>InstancePrivateIpAddress instancePrivateIpAddress = new InstancePrivateIpAddress();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOf... | int xmlEvent = context.nextEvent(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.