idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
336,391 | public static void cleanBucket(OSS oss, String bucket) throws Exception {<NEW_LINE>ListObjectsRequest listRequest = new ListObjectsRequest(bucket);<NEW_LINE>listRequest.setMaxKeys(1000);<NEW_LINE>ListObjectsResult <MASK><NEW_LINE>List<OSSObjectSummary> objectSummaries = listObjectsResult.getObjectSummaries();<NEW_LINE>... | listObjectsResult = oss.listObjects(listRequest); |
396,909 | public void readSettings(Object settings) {<NEW_LINE>wizardDescriptor = (WizardDescriptor) settings;<NEW_LINE>// NOI18N<NEW_LINE>wizardDescriptor.putProperty("NewProjectWizard_Title", component.getClientProperty("NewProjectWizard_Title"));<NEW_LINE>// guess webapps well-known locations and preset them<NEW_LINE>File bas... | webPagesFO = FileSearchUtility.guessDocBase(fo); |
813,452 | // -------------------------------------------------------------------------<NEW_LINE>@Override<NEW_LINE>public PortfolioItemSummary summarize() {<NEW_LINE>// 5Y USD 2mm Rec USD-LIBOR-6M Cap 1% / Pay Premium : 21Jan17-21Jan22<NEW_LINE>StringBuilder buf = new StringBuilder(96);<NEW_LINE><MASK><NEW_LINE>buf.append(Summar... | IborCapFloorLeg mainLeg = product.getCapFloorLeg(); |
172,159 | public static void main(String[] args) {<NEW_LINE>CommandSpec spec = CommandSpec.create();<NEW_LINE>spec.addOption(OptionSpec.builder("-V", "--verbose").build());<NEW_LINE>spec.addOption(// so, this option is of type List<File><NEW_LINE>OptionSpec.builder("-f", "--file").paramLabel("FILES").type(List.class).// so, this... | (args).equals(originalArgs); |
934,075 | private void fillMinusHitsFromOneField(String fieldName, Set<Object> fieldValues, SearchHit someHit) {<NEW_LINE>List<SearchHit> minusHitsList = new ArrayList<>();<NEW_LINE>int currentId = 1;<NEW_LINE>for (Object result : fieldValues) {<NEW_LINE>Map<String, DocumentField> fields = new HashMap<>();<NEW_LINE>ArrayList<Obj... | getSourceAsMap().putAll(sourceAsMap); |
1,454,155 | private void visitSetConstVar(Node node, Node child, boolean needValue) {<NEW_LINE>if (!hasVarsInRegs)<NEW_LINE>Kit.codeBug();<NEW_LINE>int varIndex = fnCurrent.getVarIndex(node);<NEW_LINE>generateExpression(child.getNext(), node);<NEW_LINE>boolean isNumber = (node.getIntProp(Node.ISNUMBER_PROP, -1) != -1);<NEW_LINE>sh... | int beyond = cfw.acquireLabel(); |
1,146,408 | Object repr(PDeque self) {<NEW_LINE>PythonContext ctxt = PythonContext.get(this);<NEW_LINE>if (!ctxt.reprEnter(self)) {<NEW_LINE>return "[...]";<NEW_LINE>}<NEW_LINE>EncapsulatingNodeReference ref = EncapsulatingNodeReference.getCurrent();<NEW_LINE>Node outerNode = ref.set(this);<NEW_LINE>try {<NEW_LINE>Object[] items =... | int maxLength = self.getMaxLength(); |
1,575,926 | public static JFreeChart buildHistogram(final Number[] numbers, final String dataName, final int divisions) {<NEW_LINE>if (numbers == null || numbers.length == 0) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>HistogramDataset dataset = new HistogramDataset();<NEW_LINE><MASK><NEW_LINE>double[] doubleNumbers = new double[n... | dataset.setType(HistogramType.FREQUENCY); |
1,773,054 | public static ListDigitalTemplatesResponse unmarshall(ListDigitalTemplatesResponse listDigitalTemplatesResponse, UnmarshallerContext _ctx) {<NEW_LINE>listDigitalTemplatesResponse.setRequestId(_ctx.stringValue("ListDigitalTemplatesResponse.RequestId"));<NEW_LINE>listDigitalTemplatesResponse.setErrorCode(_ctx.stringValue... | (_ctx.stringValue("ListDigitalTemplatesResponse.ErrorDesc")); |
1,745,022 | private Task<Void> verifyBeforeUpdateEmail(Map<String, Object> arguments) {<NEW_LINE>return Tasks.call(cachedThreadPool, () -> {<NEW_LINE>FirebaseUser firebaseUser = getCurrentUser(arguments);<NEW_LINE>if (firebaseUser == null) {<NEW_LINE>throw FlutterFirebaseAuthPluginException.noUser();<NEW_LINE>}<NEW_LINE>String new... | newEmail, getActionCodeSettings(actionCodeSettings))); |
1,265,549 | public static <T extends Model> int apply(Class<? extends Model> modelClass, Collection<? extends Number> ids, ThrowConsumer<T> consumer) {<NEW_LINE>Preconditions.checkNotNull(ids, I18n.get("The collection of IDs cannot be null."));<NEW_LINE>Preconditions.checkNotNull(consumer, I18n.get("The consumer cannot be null."))... | , String.valueOf(id)); |
1,714,055 | public static boolean canUseAsync(boolean async, boolean expunge, OS os, Reporter reporter) {<NEW_LINE>// TODO(dmarting): Deactivate expunge_async on non-Linux platform until we completely fix it<NEW_LINE>// for non-Linux platforms (https://github.com/bazelbuild/bazel/issues/1906).<NEW_LINE>// MacOS and FreeBSD support... | boolean asyncSupport = os == OS.LINUX; |
62,865 | final DeleteProfileObjectTypeResult executeDeleteProfileObjectType(DeleteProfileObjectTypeRequest deleteProfileObjectTypeRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteProfileObjectTypeRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,145,956 | public ValidationResult validate(Properties properties) {<NEW_LINE>final ValidationResult result = new ValidationResult();<NEW_LINE>final String readAccessString = properties.getProperty(ScriptingPermissions.RESOURCES_EXECUTE_SCRIPTS_WITHOUT_READ_RESTRICTION);<NEW_LINE>final String writeAccessString = properties.getPro... | && classpath.length() > 0; |
1,700,507 | protected byte[] serializeWebPayload(final OJwtPayload payload) throws Exception {<NEW_LINE>if (payload == null)<NEW_LINE>throw new IllegalArgumentException("Token payload is null");<NEW_LINE><MASK><NEW_LINE>doc.field("username", payload.getUserName());<NEW_LINE>doc.field("iss", payload.getIssuer());<NEW_LINE>doc.field... | final ODocument doc = new ODocument(); |
208,971 | private void importSms(final Message message) throws IOException, MessagingException {<NEW_LINE>if (LOCAL_LOGV)<NEW_LINE>Log.v(TAG, "importSms(" + message + ")");<NEW_LINE>final ContentValues values = converter.messageToContentValues(message);<NEW_LINE>final Integer type = values.getAsInteger(Telephony.TextBasedSmsColu... | getAsLong(Telephony.TextBasedSmsColumns.DATE); |
1,343,326 | public com.amazonaws.services.ecr.model.ValidationException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.ecr.model.ValidationException validationException = new com.amazonaws.services.ecr.model.ValidationException(null);<NEW_LINE>int originalDepth = context.g... | JsonToken token = context.getCurrentToken(); |
557,087 | public ArrayList<PEPeer> rankPeers(int max_to_unchoke, ArrayList<PEPeer> all_peers) {<NEW_LINE>ArrayList<PEPeer> <MASK><NEW_LINE>// ensure we never rank more peers than needed<NEW_LINE>long[] bests = new long[max_to_unchoke];<NEW_LINE>// fill slots with peers who we are currently downloading the fastest from<NEW_LINE>f... | best_peers = new ArrayList<>(); |
812,772 | final DeleteTestGridProjectResult executeDeleteTestGridProject(DeleteTestGridProjectRequest deleteTestGridProjectRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteTestGridProjectRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | invoke(request, responseHandler, executionContext); |
51,631 | private void addItem(DefaultConfigurableFileCollection owner, PathToFileResolver resolver, Factory<PatternSet> patternSetFactory, TaskDependencyFactory taskDependencyFactory, PropertyHost propertyHost, Object path, ImmutableList<Object> oldItems) {<NEW_LINE>// Unpack to deal with DSL syntax: collection += someFiles<NEW... | FileCollectionInternal) oldItems.get(0); |
252,046 | public AutoMLS3DataSource unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AutoMLS3DataSource autoMLS3DataSource = new AutoMLS3DataSource();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.get... | String currentParentElement = context.getCurrentParentElement(); |
946,034 | static Object index(StarlarkThread starlarkThread, Object object, Object key) throws EvalException {<NEW_LINE>Mutability mu = starlarkThread.mutability();<NEW_LINE>StarlarkSemantics semantics = starlarkThread.getSemantics();<NEW_LINE>if (object instanceof StarlarkIndexable.Threaded) {<NEW_LINE>return ((StarlarkIndexabl... | Starlark.fromJava(result, mu); |
1,117,501 | public MLMethod createML(int inputs, int outputs) {<NEW_LINE>BasicNetwork network = new BasicNetwork();<NEW_LINE>if (this.dropoutRates != null) {<NEW_LINE>// (inputs));<NEW_LINE>network.addLayer(new BasicLayer(activation, false, inputs, <MASK><NEW_LINE>} else {<NEW_LINE>// (inputs));<NEW_LINE>network.addLayer(new Basic... | dropoutRates.get(0))); |
1,324,671 | public void run() {<NEW_LINE>try {<NEW_LINE>boolean success = false;<NEW_LINE><MASK><NEW_LINE>Throwable ex = null;<NEW_LINE>try {<NEW_LINE>haContext.getHaLock().writeLock().lock();<NEW_LINE>success = submitGroupHaSwitchTasks(haContext, newStorageNodeHaInfoMap, storageHaManager);<NEW_LINE>} catch (Throwable e) {<NEW_LIN... | long startTs = System.currentTimeMillis(); |
1,074,921 | public void estimateElimCount() {<NEW_LINE>// long ts = System.currentTimeMillis();<NEW_LINE>// the function is applied to both columns<NEW_LINE>// if hash is equal, they are not going to be eliminated<NEW_LINE>// filter on hash equal and count<NEW_LINE>LOG.debug("Applying " + function.getName());<NEW_LINE>dupeRemainin... | = new ArrayList<Row>(); |
946,976 | private void boxIfNecessary(SourceWriter writer, ValueType type, Fragment fragment) throws IOException {<NEW_LINE>boolean boxed = false;<NEW_LINE>if (type instanceof ValueType.Primitive) {<NEW_LINE>switch(((ValueType.Primitive) type).getKind()) {<NEW_LINE>case BOOLEAN:<NEW_LINE>writer.appendMethodBody(new MethodReferen... | .class, Float.class)); |
521,803 | public void drawTextFieldCursor(Graphics g, TextArea ta) {<NEW_LINE>Style style = ta.getStyle();<NEW_LINE>Font f = style.getFont();<NEW_LINE>int cursorY;<NEW_LINE>if (ta.isSingleLineTextArea()) {<NEW_LINE>switch(ta.getVerticalAlignment()) {<NEW_LINE>case Component.BOTTOM:<NEW_LINE>cursorY = ta.getY() + ta.getHeight() -... | ) + f.getHeight()); |
1,738,960 | public ECPoint twicePlus(ECPoint b) {<NEW_LINE>if (this.isInfinity()) {<NEW_LINE>return b;<NEW_LINE>}<NEW_LINE>if (b.isInfinity()) {<NEW_LINE>return twice();<NEW_LINE>}<NEW_LINE>ECCurve curve = this.getCurve();<NEW_LINE>ECFieldElement X1 = this.x;<NEW_LINE>if (X1.isZero()) {<NEW_LINE>// A point with X == 0 is its own a... | new ECFieldElement[] { Z3 }); |
1,518,338 | public int generateTypeAnnotationsOnCodeAttribute() {<NEW_LINE>int attributesNumber = 0;<NEW_LINE>List allTypeAnnotationContexts = ((TypeAnnotationCodeStream) this.codeStream).allTypeAnnotationContexts;<NEW_LINE>int invisibleTypeAnnotationsCounter = 0;<NEW_LINE>int visibleTypeAnnotationsCounter = 0;<NEW_LINE>for (int i... | int size = allTypeAnnotationContexts.size(); |
105,603 | public void solve() {<NEW_LINE>solution = new int[mazeSize][mazeSize];<NEW_LINE>if (this.isNoValidPoint(this.startX, this.startZ)) {<NEW_LINE>System.out.println("No valid start found.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (this.isNoValidPoint(this.endX, this.endZ)) {<NEW_LINE><MASK><NEW_LINE>return;<NEW_LINE>}<NEW... | System.out.println("No valid end found."); |
1,648,385 | final GetRecoveryGroupResult executeGetRecoveryGroup(GetRecoveryGroupRequest getRecoveryGroupRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getRecoveryGroupRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetRecoveryGroupRequest> ... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
509,247 | public void computeColorLog(double dx, double dy) {<NEW_LINE>red = blue = green = 0;<NEW_LINE>if (dx > 0) {<NEW_LINE>red = Math.max(0, (int) (255 * Math.log(logBase + logScale * <MASK><NEW_LINE>} else {<NEW_LINE>green = Math.max(0, (int) (255 * Math.log(logBase - logScale * dx / maxVelocity) / maxLog));<NEW_LINE>}<NEW_... | dx / maxVelocity) / maxLog)); |
1,061,530 | public static String doGet(String url, Map<String, String> params, Map<String, String> headers) {<NEW_LINE>try {<NEW_LINE>String paramStr = encodingParams(params, DEFAULT_ENCODING);<NEW_LINE>String fullUrl = (paramStr == null) <MASK><NEW_LINE>URL u = new URL(fullUrl);<NEW_LINE>HttpURLConnection conn = (HttpURLConnectio... | ? url : url + "?" + paramStr; |
951,247 | public static boolean exactlyEqual(final Sketch sketchA, final Sketch sketchB) {<NEW_LINE>// Corner case checks<NEW_LINE>if (sketchA == null || sketchB == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (sketchA == sketchB) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if (sketchA.isEmpty() && sketchB.isEmpty()) {<... | long thetaLongA = sketchA.getThetaLong(); |
1,657,804 | private void handleNeedAuthorization(String projectName, String userName, int statusCode, HttpServletRequest servletRequest, HttpServletResponse servletResponse) throws IOException {<NEW_LINE>Log.info("[{}] Unauthorized, User '{}' status={} ip={}", projectName, userName, <MASK><NEW_LINE>HttpServletResponse response = s... | statusCode, servletRequest.getRemoteAddr()); |
943,651 | public void rollbackNicForMigration(final VirtualMachineProfile src, final VirtualMachineProfile dst) {<NEW_LINE>for (final NicProfile nicDst : dst.getNics()) {<NEW_LINE>final NetworkVO network = _networksDao.findById(nicDst.getNetworkId());<NEW_LINE>final NetworkGuru guru = AdapterBase.getAdapterByName(networkGurus, n... | getReservationId(), null, null); |
116,324 | private TileSet unmarshalTilesetFile(InputStream in, URL file) throws Exception {<NEW_LINE>TileSet set = null;<NEW_LINE>Node tsNode;<NEW_LINE>DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();<NEW_LINE>try {<NEW_LINE>DocumentBuilder builder = factory.newDocumentBuilder();<NEW_LINE>// builder.setErro... | + ": " + e.getLocalizedMessage(); |
1,071,994 | static ByteBuf encode(ByteBufAllocator allocator, boolean isEmpty, long traceIdHigh, long traceId, boolean extendedTraceId, long spanId, long parentId, boolean includesParent, Flags flag) {<NEW_LINE>int size = 1 + (isEmpty ? 0 : (Long.BYTES + Long.BYTES + (extendedTraceId ? Long.BYTES : 0) + (includesParent ? Long.BYTE... | buffer = allocator.buffer(size); |
793,509 | protected RouteResultset tryMergeBuild() {<NEW_LINE>try {<NEW_LINE>this.needWhereHandler = false;<NEW_LINE>this.canPushDown = !node.existUnPushDownGroup();<NEW_LINE>PushDownVisitor pdVisitor = new PushDownVisitor(node, true);<NEW_LINE>RouteResultset rrs = pdVisitor.buildRouteResultset();<NEW_LINE>SchemaConfig schemaCon... | = new MergeBuilder(session, node); |
1,225,853 | public static QueryOrganizationWorkspaceListResponse unmarshall(QueryOrganizationWorkspaceListResponse queryOrganizationWorkspaceListResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryOrganizationWorkspaceListResponse.setRequestId(_ctx.stringValue("QueryOrganizationWorkspaceListResponse.RequestId"));<NEW_LINE>queryOrg... | (_ctx.integerValue("QueryOrganizationWorkspaceListResponse.Result.TotalNum")); |
678,322 | private void loadNode426() throws IOException, SAXException {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.CertificateGroupFolderType_DefaultUserTokenGroup_TrustList_OpenWithMasks_OutputArguments, new QualifiedName(0, "OutputArguments"), new LocalizedText("en", "OutputArguments"), Loc... | .expanded(), false)); |
407,420 | public void add(int index, Dependency dependency) {<NEW_LINE>if (index > size() || index < 0) {<NEW_LINE>throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + size());<NEW_LINE>}<NEW_LINE>int elementIndex = index;<NEW_LINE>if (index > 0) {<NEW_LINE>Element previousElement = ((JDomDependency) get(index - ... | getParent().getJDomElement()); |
1,382,838 | final ContinueDeploymentResult executeContinueDeployment(ContinueDeploymentRequest continueDeploymentRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(continueDeploymentRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri... | endClientExecution(awsRequestMetrics, request, response); |
1,798,131 | public static Map<String, Object> checkResourceIdBypolicyName(String esUrl, Map<String, Object> mustFilter) throws Exception {<NEW_LINE>JsonParser jsonParser = new JsonParser();<NEW_LINE>Map<String, Object> mustNotFilter = new HashMap<>();<NEW_LINE>HashMultimap<String, Object> shouldFilter = HashMultimap.create();<NEW_... | .RESOURCEID).getAsString()); |
378,100 | private void resetSymbols() {<NEW_LINE>synchronized (values) {<NEW_LINE>values.clear();<NEW_LINE>Map<String, SymbolDef> stringSymbolDefMap = SymbolDefTable.getInstance().GetAllSymbolDefs(RendererSettings.getInstance().getSymbologyStandard());<NEW_LINE>for (SymbolDef def : stringSymbolDefMap.values()) {<NEW_LINE>SimpleS... | (SimpleSymbol.createFrom(def)); |
284,487 | final GetCoipPoolUsageResult executeGetCoipPoolUsage(GetCoipPoolUsageRequest getCoipPoolUsageRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getCoipPoolUsageRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,736,381 | public void simulateFull(boolean isFull) throws ObjectManagerException {<NEW_LINE>final String methodName = "simulateFull";<NEW_LINE>if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())<NEW_LINE>trace.entry(this, cclass, methodName, new Object[] { new Boolean(isFull) });<NEW_LINE>if (isFull) {<NEW_LINE>// Clear... | .addAndGet((int) available); |
1,687,654 | public static GetEditingProjectMaterialsResponse unmarshall(GetEditingProjectMaterialsResponse getEditingProjectMaterialsResponse, UnmarshallerContext _ctx) {<NEW_LINE>getEditingProjectMaterialsResponse.setRequestId(_ctx.stringValue("GetEditingProjectMaterialsResponse.RequestId"));<NEW_LINE>List<Material> materialList ... | ("GetEditingProjectMaterialsResponse.MaterialList[" + i + "].CoverURL")); |
1,356,863 | static void testGrams(Path root, Path test, String labelTarget, String name) throws IOException {<NEW_LINE>Path modelPath = root.resolve(name + ".model");<NEW_LINE>Path predictions = root.resolve(name + ".predictions");<NEW_LINE>FastTextClassifier classifier = FastTextClassifier.load(modelPath);<NEW_LINE>try (PrintWrit... | (" ").splitToList(s); |
1,583,026 | void onOk() {<NEW_LINE>searchCriteria.onOk();<NEW_LINE>final FindDialogMemory memory = FindDialogMemory.getDefault();<NEW_LINE>if (searchCriteria.isTextPatternUsable()) {<NEW_LINE>SearchHistory.getDefault().add(getCurrentSearchPattern());<NEW_LINE>memory.setTextPatternSpecified(true);<NEW_LINE>} else {<NEW_LINE>memory.... | setPreserveCase(chkPreserveCase.isSelected()); |
1,046,553 | private static boolean isValidExecutor(KeycloakSession session, ClientPolicyExecutorRepresentation executorRep) {<NEW_LINE>String executorProviderId = executorRep.getExecutorProviderId();<NEW_LINE>Set<String> providerSet = session.listProviderIds(ClientPolicyExecutorProvider.class);<NEW_LINE>if (providerSet != null && ... | executorProviderId, executorRep.getConfiguration()); |
193,317 | public void fullRedraw() {<NEW_LINE>makeLayerElement();<NEW_LINE>// addCSSClasses();<NEW_LINE>SilhouettePlot silhouettesplot = silhouette.getSilhouettePlot(context);<NEW_LINE>String ploturi = silhouettesplot.getSVGPlotURI();<NEW_LINE>Element itag = svgp.svgElement(SVGConstants.SVG_IMAGE_TAG);<NEW_LINE>SVGUtil.setAtt(it... | itag, SVGConstants.SVG_X_ATTRIBUTE, 0); |
1,658,083 | protected void installApkFiles(ApkSource aApkSource) {<NEW_LINE>cleanOldSessions();<NEW_LINE>PackageInstaller.Session session = null;<NEW_LINE>try (ApkSource apkSource = aApkSource) {<NEW_LINE>PackageInstaller.SessionParams sessionParams = new PackageInstaller.SessionParams(PackageInstaller.SessionParams.MODE_FULL_INST... | sessionParams.setInstallReason(PackageManager.INSTALL_REASON_USER); |
371,485 | public synchronized boolean isAllSegmentsLoaded() {<NEW_LINE>if (_allSegmentsLoaded) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>PropertyKey.Builder keyBuilder = dataAccessor.keyBuilder();<NEW_LINE>IdealState idealState = dataAccessor.getProperty(keyBuilder.idealStates(_tableNameWithType));<NEW_LINE>if ... | HelixDataAccessor dataAccessor = _helixManager.getHelixDataAccessor(); |
1,357,291 | public void addTags(Map<String, String> tagsMap, PartialPath fullPath, IMeasurementMNode leafMNode) throws MetadataException, IOException {<NEW_LINE>Pair<Map<String, String>, Map<String, String>> pair = tagLogFile.read(config.getTagAttributeTotalSize(), leafMNode.getOffset());<NEW_LINE>for (Map.Entry<String, String> en... | left.put(key, value); |
1,157,673 | // entry of processing replace table<NEW_LINE>private void processReplaceTable(Database db, OlapTable origTable, List<AlterClause> alterClauses) throws UserException {<NEW_LINE>ReplaceTableClause clause = (<MASK><NEW_LINE>String newTblName = clause.getTblName();<NEW_LINE>boolean swapTable = clause.isSwapTable();<NEW_LI... | ReplaceTableClause) alterClauses.get(0); |
1,303,839 | public static String normalize(String str) {<NEW_LINE>if (str == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>StringBuilder sb = null;<NEW_LINE>boolean inWhitespace = false;<NEW_LINE>char c = '\0';<NEW_LINE>boolean special = false;<NEW_LINE>for (int i = 0; i < str.length(); ++i) {<NEW_LINE>c = str.charAt(i);<NEW_L... | .substring(0, i)); |
866,046 | public ChannelFlowCallbackResult channelFlowCallback(ChannelFlowCallbackRequest channelFlowCallbackRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(channelFlowCallbackRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionCont... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
658,455 | public static FeedbackResponseCommentAttributes valueOf(FeedbackResponseComment comment) {<NEW_LINE>FeedbackResponseCommentAttributes frca = new FeedbackResponseCommentAttributes();<NEW_LINE>frca.courseId = comment.getCourseId();<NEW_LINE>frca.feedbackSessionName = comment.getFeedbackSessionName();<NEW_LINE>frca.commen... | .feedbackQuestionId = comment.getFeedbackQuestionId(); |
632,763 | private List<VirtualRouterOfferingInventory> findOfferingByGuestL3Network(L3NetworkInventory guestL3) {<NEW_LINE>String sql = "select offering from VirtualRouterOfferingVO offering, SystemTagVO stag where " + "offering.uuid = stag.resourceUuid and stag.resourceType = :type and offering.zoneUuid = :zoneUuid and stag.tag... | null : VirtualRouterOfferingInventory.valueOf1(vos); |
1,021,174 | final GetComponentResult executeGetComponent(GetComponentRequest getComponentRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getComponentRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | addHandlerContext(HandlerContextKey.SERVICE_ID, "AmplifyUIBuilder"); |
696,889 | private CompletableFuture<Void> startJobIfNotStartedOrCompleted(@Nonnull JobRecord jobRecord, @Nonnull JobExecutionRecord jobExecutionRecord, String reason) {<NEW_LINE>// the order of operations is important.<NEW_LINE>long jobId = jobRecord.getJobId();<NEW_LINE>MasterContext masterContext;<NEW_LINE>MasterContext oldMas... | jobResult = jobRepository.getJobResult(jobId); |
1,024,758 | private boolean checkEdgeCount(SquareGrid grid) {<NEW_LINE>int left = 0, right = grid.columns - 1;<NEW_LINE>int top = 0, bottom = grid.rows - 1;<NEW_LINE>for (int row = 0; row < grid.rows; row++) {<NEW_LINE>boolean skip = grid.get(row, 0) == null;<NEW_LINE>for (int col = 0; col < grid.columns; col++) {<NEW_LINE>SquareN... | grid.get(row, col); |
68,001 | // Infer the time period covered by the transit feed<NEW_LINE>public void updateTransitFeedValidity(CalendarServiceData data, DataImportIssueStore issueStore) {<NEW_LINE>long now = new Date().getTime() / 1000;<NEW_LINE>final <MASK><NEW_LINE>HashSet<String> agenciesWithFutureDates = new HashSet<>();<NEW_LINE>HashSet<Str... | long SEC_IN_DAY = 24 * 60 * 60; |
1,124,218 | // XXX should be moved into the GeneratorUtils:<NEW_LINE>private static BlockTree createDefaultMethodBody(WorkingCopy wc, TreePath targetTree, TypeMirror returnType, String name) {<NEW_LINE>TreeUtilities tu = wc.getTreeUtilities();<NEW_LINE>TypeElement targetClazz = (TypeElement) wc.getTrees().getElement(targetTree);<N... | "();}}", new SourcePositions[1]); |
1,265,068 | public void run(RegressionEnvironment env) {<NEW_LINE>String epl = "@name('s0') select longPrimitive as c0, sum(intPrimitive) as c1 " + "from SupportBean group by rollup(case when longPrimitive > 0 then 1 else 0 end)";<NEW_LINE>env.compileDeploy(epl).addListener("s0");<NEW_LINE>env.assertStatement("s0", statement -> as... | ).getPropertyType("c0"))); |
551,014 | protected <T> boolean match(int bid, SequenceMatcher.MatchedStates<T> matchedStates, boolean consume, State prevState) {<NEW_LINE>// Try to match previous node/nodes exactly<NEW_LINE>if (consume) {<NEW_LINE>// First element is group that is matched, second is number of nodes matched so far<NEW_LINE>Pair<SequenceMatcher... | bid, matchedStates, matchedGroup, 0); |
1,476,985 | private static BuildInfo readBuildPropertiesClass(Class<?> clazz, BuildInfo upstreamBuildInfo, Overrides overrides) {<NEW_LINE>String version = readStaticStringField(clazz, "VERSION");<NEW_LINE>String build = readStaticStringField(clazz, "BUILD");<NEW_LINE>String revision = readStaticStringField(clazz, "REVISION");<NEW... | distribution = readStaticStringField(clazz, "DISTRIBUTION"); |
1,505,721 | public List<ThreadObjectData> retrieveThreadList(int objHash, Server server) {<NEW_LINE>List<ThreadObjectData> dataList = new ArrayList<>();<NEW_LINE>try (TcpProxy tcp = TcpProxy.getTcpProxy(server)) {<NEW_LINE>MapPack param = new MapPack();<NEW_LINE>param.put(ParamConstant.OBJ_HASH, objHash);<NEW_LINE>MapPack mapPack ... | threadObjectMap = new HashMap<>(); |
1,045,271 | public static RelNode optimizeByMysqlImpl(RelNode rel) {<NEW_LINE>HepProgramBuilder builder = new HepProgramBuilder();<NEW_LINE>builder.addMatchOrder(HepMatchOrder.BOTTOM_UP);<NEW_LINE>builder.addGroupBegin();<NEW_LINE>builder.addRuleInstance(MysqlTableScanRule.FILTER_TABLESCAN);<NEW_LINE>builder.addGroupEnd();<NEW_LIN... | builder.addRuleInstance(MysqlCorrelateRule.INSTANCE); |
1,613,307 | public void disableSGR(SGR sgr) throws IOException {<NEW_LINE>switch(sgr) {<NEW_LINE>case BLINK:<NEW_LINE>writeCSISequenceToTerminal((byte) '2', (byte) '5', (byte) 'm');<NEW_LINE>break;<NEW_LINE>case BOLD:<NEW_LINE>writeCSISequenceToTerminal((byte) '2', (byte) '2', (byte) 'm');<NEW_LINE>break;<NEW_LINE>case BORDERED:<N... | ) '4', (byte) 'm'); |
232,258 | public void updateCarNavigation() {<NEW_LINE>OsmandApplication app = getApp();<NEW_LINE>RoutingHelper routingHelper = app.getRoutingHelper();<NEW_LINE>TripHelper tripHelper = this.tripHelper;<NEW_LINE>if (carNavigationActive && tripHelper != null && routingHelper.isRouteCalculated() && routingHelper.isFollowingMode()) ... | .getSurfaceRenderer().getDensity(); |
1,239,272 | public static double[][] inverse(double[][] matrix) {<NEW_LINE>double[][] inverse = new double[matrix.length][matrix.length];<NEW_LINE>// minors and cofactors<NEW_LINE>for (int i = 0; i < matrix.length; i++) {<NEW_LINE>for (int j = 0; j < matrix[i].length; j++) {<NEW_LINE>inverse[i][j] = Math.pow(-1, i + j) * determina... | [j][i] * det; |
871,852 | public static void main(String[] args) throws Exception {<NEW_LINE>File clientConfig = File.createTempFile("client", ".xml");<NEW_LINE>System.out.println("Created temporary file: " + clientConfig);<NEW_LINE>if (!clientConfig.exists()) {<NEW_LINE>throw new Exception("Failed to create tmp file");<NEW_LINE>}<NEW_LINE>Clie... | marshal(client, System.out); |
1,443,922 | private void load() {<NEW_LINE>Log.d(TAG, "load()");<NEW_LINE>if (webViewLoader != null) {<NEW_LINE>webViewLoader.dispose();<NEW_LINE>}<NEW_LINE>webViewLoader = Maybe.<String>create(emitter -> {<NEW_LINE>Playable media = controller.getMedia();<NEW_LINE>if (media == null) {<NEW_LINE>emitter.onComplete();<NEW_LINE>return... | Log.getStackTraceString(error))); |
199,808 | private void runOrBufferActionItem(ActionItem actionItem) throws IOException {<NEW_LINE>WriteState curState = writeState.get();<NEW_LINE>// TODO: Liberty currently needs to check isReady() BEFORE doing the write, as it puts context on the<NEW_LINE>// thread during that call. We should get rid of that requirement.<NEW_... | , curState.withReadyAndEmpty(false)); |
817,158 | public void removeEdgeInternal(final OrientEdge edge) {<NEW_LINE>// OUT VERTEX<NEW_LINE>final OIdentifiable inVertexEdge = edge.vIn != null ? edge.vIn : edge.rawElement;<NEW_LINE>final String edgeClassName = OrientBaseGraph.encodeClassName(edge.getLabel());<NEW_LINE>final boolean useVertexFieldsForEdgeLabels = settings... | , inVertexRecord.field(inFieldName)); |
623,687 | public static MethodOutcome process2xxResponse(FhirContext theContext, int theResponseStatusCode, String theResponseMimeType, InputStream theResponseReader, Map<String, List<String>> theHeaders) {<NEW_LINE>List<String> locationHeaders = new ArrayList<>();<NEW_LINE>List<String> lh = <MASK><NEW_LINE>if (lh != null) {<NEW... | theHeaders.get(Constants.HEADER_LOCATION_LC); |
976,710 | public void build() {<NEW_LINE>List<Parameter> listEncrypt = new ArrayList<>();<NEW_LINE>add(new LabelParameterImpl("ConfigView.section.connection.encryption.encrypt.info"), listEncrypt);<NEW_LINE>add(new HyperlinkParameterImpl("ConfigView.section.connection.encryption.encrypt.info.link", Wiki.AVOID_TRAFFIC_SHAPING), l... | !paramFallbackIncoming.getValue() && required; |
1,351,674 | public void validateReferences(Version indexVersionCreated, Function<String, MappedFieldType> fieldResolver) {<NEW_LINE>if (fieldName != null) {<NEW_LINE>MappedFieldType mappedFieldType = fieldResolver.apply(fieldName);<NEW_LINE>if (mappedFieldType == null) {<NEW_LINE>if (indexVersionCreated.before(Version.V_7_0_0)) {<... | name, mappedFieldType.typeName()); |
1,075,045 | protected void assemble(Level world, BlockPos pos, AbstractMinecart cart) {<NEW_LINE>if (!cart.getPassengers().isEmpty())<NEW_LINE>return;<NEW_LINE>LazyOptional<MinecartController> optional = cart.getCapability(CapabilityMinecartController.MINECART_CONTROLLER_CAPABILITY);<NEW_LINE>if (optional.isPresent() && optional.o... | nbt.putDouble("PushX", 0); |
1,317,076 | public AnimatorSet createDefaultColorChangeAnimatorSet(int newColor) {<NEW_LINE>Animator backgroundAnimator = ViewUtil.createBackgroundColorTransition(fragment.playbackControlsFragment.getView(<MASK><NEW_LINE>Animator statusBarAnimator = ViewUtil.createBackgroundColorTransition(fragment.playerStatusBar, fragment.lastCo... | ), fragment.lastColor, newColor); |
1,621,010 | public Pair<Collection, List<NewEnvironemtKey>> importCollection(String content, List<Environment> environments) throws IOException {<NEW_LINE>SwaggerParseResult res = new OpenAPIV3Parser().readContents(content);<NEW_LINE><MASK><NEW_LINE>LinkedList<RequestContainer> requests = new LinkedList<>();<NEW_LINE>LinkedList<Fo... | OpenAPI spec = res.getOpenAPI(); |
56,398 | private void marshal(APIGetPortForwardingAttachableVmNicsReply msg) {<NEW_LINE>if (msg.getInventories().isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<String> nicUuids = msg.getInventories().stream().map(VmNicInventory::getUuid).collect(Collectors.toList());<NEW_LINE>String sql = "select nic.uuid from VmNicVO n... | > uuids = q.getResultList(); |
910,476 | public UpgradeElasticsearchDomainResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>UpgradeElasticsearchDomainResult upgradeElasticsearchDomainResult = new UpgradeElasticsearchDomainResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>i... | int originalDepth = context.getCurrentDepth(); |
249,302 | protected void dgemm(char Order, char TransA, char TransB, int M, int N, int K, double alpha, INDArray A, int lda, INDArray B, int ldb, double beta, INDArray C, int ldc) {<NEW_LINE>if (!Nd4j.isFallbackModeEnabled()) {<NEW_LINE>nativeOps.call("cblas_dgemm", convertOrder('f'), convertTranspose(TransA), convertTranspose(T... | , beta, C, ldc)); |
1,744,276 | public void finalizeQuotation(SaleOrder saleOrder) throws AxelorException {<NEW_LINE>if (saleOrder.getStatusSelect() == null || saleOrder.getStatusSelect() != SaleOrderRepository.STATUS_DRAFT_QUOTATION) {<NEW_LINE>throw new AxelorException(TraceBackRepository.CATEGORY_INCONSISTENCY, I18n.get(IExceptionMessage.SALE_ORDE... | Partner partner = saleOrder.getClientPartner(); |
228,161 | public int pauseAllWithType(TransferType type) {<NEW_LINE>final ContentValues values = new ContentValues();<NEW_LINE>values.put(TransferTable.COLUMN_STATE, TransferState.PENDING_PAUSE.toString());<NEW_LINE>String selection = null;<NEW_LINE>String[] selectionArgs = null;<NEW_LINE>if (type == TransferType.ANY) {<NEW_LINE... | ), values, selection, selectionArgs); |
191,923 | public void beanRemoveInTransaction() throws RemoteException, RemoveException {<NEW_LINE>// Current the method is already in a global tx - TX_Required.<NEW_LINE>SFRa ejb2 = null;<NEW_LINE>SFRaHome fhome2 = (SFRaHome) getSessionContext().getEJBHome();<NEW_LINE>try {<NEW_LINE>ejb2 = fhome2.create();<NEW_LINE>} catch (Thr... | getClass().getName()); |
1,501,965 | public GaussianQuadratureData generate(int n) {<NEW_LINE>ArgChecker.isTrue(n > 0);<NEW_LINE>double[] x = new double[n];<NEW_LINE>double[] w = new double[n];<NEW_LINE>boolean odd = n % 2 != 0;<NEW_LINE>int m = (n + 1) / 2 - (odd ? 1 : 0);<NEW_LINE>Pair<DoubleFunction1D, DoubleFunction1D>[] polynomials = HERMITE.getPolyn... | root, i, n, x); |
1,437,802 | public static String textLocalPlan(ExecutionContext context, RelNode relNode, ExecutorMode type) {<NEW_LINE>if (context.getMemoryPool() == null) {<NEW_LINE>context.setMemoryPool(MemoryManager.getInstance().createQueryMemoryPool(WorkloadUtil.isApWorkload(context.getWorkloadType()), context.getTraceId(), context.getExtra... | getTypes(relNode.getRowType()); |
1,769,863 | void deprecated(final Set<ThreadContext> threadContexts, final String message, final boolean log, final Object... params) {<NEW_LINE>final Iterator<ThreadContext> iterator = threadContexts.iterator();<NEW_LINE>if (iterator.hasNext()) {<NEW_LINE>final String formattedMessage = LoggerMessageFormat.format(message, params)... | matcher(warningHeaderValue).matches(); |
376,429 | public static JSONObject stringifyByObject(long byteNumber) {<NEW_LINE>JSONObject object = new JSONObject();<NEW_LINE>if (byteNumber / TB_IN_BYTES > 0) {<NEW_LINE>object.put("size", df.format((double) byteNumber / (double) TB_IN_BYTES));<NEW_LINE>object.put("type", "TB");<NEW_LINE>return object;<NEW_LINE>} else if (byt... | byteNumber / (double) MB_IN_BYTES)); |
560,651 | public PlanNode visitTableScan(TableScanNode tableScan, Void context) {<NEW_LINE>if (!isPushdownFilterSupported(session, tableScan.getTable())) {<NEW_LINE>return tableScan;<NEW_LINE>}<NEW_LINE>TableHandle handle = tableScan.getTable();<NEW_LINE>HiveMetadata hiveMetadata = getMetadata(handle);<NEW_LINE>ConnectorPushdown... | ), ImmutableList.of()); |
1,097,575 | private boolean tryArraySet(ArrayOptimization optimization, Statement statement) {<NEW_LINE>int expectedIndex = optimization.index + 2 + optimization.arrayElementIndex;<NEW_LINE>if (resultSequence.size() - 1 != expectedIndex) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (!(statement instanceof AssignmentStatement)) ... | arrayVariable || v == optimization.unwrappedArrayVariable); |
261,283 | private boolean isCertificateTrusted(final X509Certificate signerCertificate, final CMSSignedData cmsSignedData) {<NEW_LINE>LOGGER.trace("Starting CMS certificate validation");<NEW_LINE>try {<NEW_LINE>final CertPathBuilder cpb = CertPathBuilder.getInstance("PKIX");<NEW_LINE>// Define CMS signer certificate as the start... | (PKIXRevocationChecker) cpb.getRevocationChecker(); |
958,435 | public void decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations) {<NEW_LINE>for (int i = 0; i < iterations; ++i) {<NEW_LINE>final long byte0 = blocks[blocksOffset++] & 0xFF;<NEW_LINE>final long byte1 = blocks[blocksOffset++] & 0xFF;<NEW_LINE>final long byte2 = blocks[blocksOffset++] ... | = blocks[blocksOffset++] & 0xFF; |
113,668 | private ScrollablePicture buildScrollablePicture() {<NEW_LINE>final GeneratedImage generatedImage = simpleLine.getGeneratedImage();<NEW_LINE>if (generatedImage == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final File png = generatedImage.getPngFile();<NEW_LINE>BufferedImage image = null;<NEW_LINE>try {<NEW_LINE>... | .asList(msg), false); |
348,000 | public static CreateContactFlowResponse unmarshall(CreateContactFlowResponse createContactFlowResponse, UnmarshallerContext context) {<NEW_LINE>createContactFlowResponse.setRequestId(context.stringValue("CreateContactFlowResponse.RequestId"));<NEW_LINE>createContactFlowResponse.setSuccess(context.booleanValue("CreateCo... | ("CreateContactFlowResponse.ContactFlow.Versions[" + i + "].Canvas")); |
885,929 | private Optional<SqlType> resolveCommonStructType(final TypedExpression exp, final SqlType targetType) {<NEW_LINE>final SqlType sourceType = exp.type().orElse(null);<NEW_LINE>if (targetType.baseType() != SqlBaseType.STRUCT) {<NEW_LINE>throw coercionFailureException(exp.expression(), sourceType, <MASK><NEW_LINE>}<NEW_LI... | targetType, Optional.empty()); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.