idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,770,138 | public Object toJson(Object value) {<NEW_LINE>if (value == null || value instanceof Number || value instanceof String || value instanceof Boolean) {<NEW_LINE>return value;<NEW_LINE>} else if (value instanceof RexNode) {<NEW_LINE>return toJson((RexNode) value);<NEW_LINE>} else if (value instanceof RexWindow) {<NEW_LINE>... | .add(toJson(o)); |
491,347 | public static boolean isAnagrams(String s1, String s2) {<NEW_LINE>int l1 = s1.length();<NEW_LINE><MASK><NEW_LINE>s1 = s1.toLowerCase();<NEW_LINE>s2 = s2.toLowerCase();<NEW_LINE>Map<Character, Integer> charAppearances = new HashMap<>();<NEW_LINE>for (int i = 0; i < l1; i++) {<NEW_LINE>char c = s1.charAt(i);<NEW_LINE>int... | int l2 = s2.length(); |
272,240 | public Request<DisassociateKmsKeyRequest> marshall(DisassociateKmsKeyRequest disassociateKmsKeyRequest) {<NEW_LINE>if (disassociateKmsKeyRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(DisassociateKmsKeyRequest)");<NEW_LINE>}<NEW_LINE>Request<DisassociateKmsKeyRequest> r... | <DisassociateKmsKeyRequest>(disassociateKmsKeyRequest, "AmazonCloudWatchLogs"); |
877,691 | public Comparator<Replica> replicaComparator() {<NEW_LINE>return (r1, r2) -> {<NEW_LINE>boolean <MASK><NEW_LINE>boolean isR2Offline = _currentOfflineReplicas.contains(r2);<NEW_LINE>if (isR1Offline && !isR2Offline) {<NEW_LINE>return -1;<NEW_LINE>} else if (!isR1Offline && isR2Offline) {<NEW_LINE>return 1;<NEW_LINE>} els... | isR1Offline = _currentOfflineReplicas.contains(r1); |
138,035 | public static void addAnnotation(JCModifiers mods, JavacNode node, JavacNode source, String annotationTypeFqn, JCExpression arg) {<NEW_LINE>boolean isJavaLangBased;<NEW_LINE>String simpleName;<NEW_LINE>{<NEW_LINE>int idx = annotationTypeFqn.lastIndexOf('.');<NEW_LINE>simpleName = idx == -1 ? annotationTypeFqn : <MASK><... | annotationTypeFqn.substring(idx + 1); |
742,861 | public void show() {<NEW_LINE>myWindow = Window.create(myProject.getName(), WindowOptions.builder().<MASK><NEW_LINE>myStatusBar = new UnifiedStatusBarImpl(myProject.getApplication(), null);<NEW_LINE>Disposer.register(this, myStatusBar);<NEW_LINE>myStatusBar.install(this);<NEW_LINE>myRootView.setStatusBar(myStatusBar);<... | disableResize().build()); |
1,411,657 | public void loadUdfFromClass(final Class<?> theClass, final String path) {<NEW_LINE>final UdfDescription udfDescriptionAnnotation = theClass.getAnnotation(UdfDescription.class);<NEW_LINE>if (udfDescriptionAnnotation == null) {<NEW_LINE>throw new KsqlException(String.format("Cannot load class %s. Classes containing UDFs... | sensorName, "ksql-udf", functionName + " udf"); |
1,500,342 | public void executeWriteAction(Editor editor, @Nullable Caret caret, DataContext dataContext) {<NEW_LINE>assert caret != null;<NEW_LINE>DocumentEx document = (DocumentEx) editor.getDocument();<NEW_LINE>Project project = editor.getProject();<NEW_LINE>assert project != null;<NEW_LINE>PsiDocumentManager psiDocumentManager... | trim(selectionEnd, toMoveStart, toMoveEnd); |
861,506 | public ListCACertificatesResult listCACertificates(ListCACertificatesRequest listCACertificatesRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listCACertificatesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.g... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,130,543 | public Object clone() {<NEW_LINE>CrosstabBaseCloneFactory factory = new CrosstabBaseCloneFactory();<NEW_LINE>JRBaseCrosstab clone = (JRBaseCrosstab) super.clone();<NEW_LINE>clone.parameters = JRCloneUtils.cloneArray(parameters);<NEW_LINE>if (variables != null) {<NEW_LINE>clone.variables = new JRVariable[variables.lengt... | columnGroups = factory.cloneCrosstabObjects(columnGroups); |
1,638,016 | private // region private helpers<NEW_LINE>void updateOrScheduleJob(Context context, TaskInterface task, List<PersistableBundle> data) {<NEW_LINE>JobScheduler jobScheduler = (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE);<NEW_LINE>if (jobScheduler == null) {<NEW_LINE>Log.e(this.getClass().getNam... | "Unable to schedule a new job: " + e.getMessage()); |
1,134,952 | public static INDArray sortRows(final INDArray in, final int colIdx, final boolean ascending) {<NEW_LINE>if (in.rank() != 2)<NEW_LINE>throw new IllegalArgumentException("Cannot sort rows on non-2d matrix");<NEW_LINE>if (colIdx < 0 || colIdx >= in.columns())<NEW_LINE>throw new IllegalArgumentException("Cannot sort on va... | = new ArrayList<>(nRows); |
743,072 | // ------------------------------------------------------------------------------<NEW_LINE>// Method: LogFileHandle.keypointStarting<NEW_LINE>// ------------------------------------------------------------------------------<NEW_LINE>void keypointStarting(long nextRecordSequenceNumber) throws InternalLogException {<NEW_... | Tr.exit(tc, "keypointStarting"); |
1,490,599 | public Collection<MetricAnomaly<E>> metricAnomalies(Map<E, ValuesAndExtrapolations> metricsHistoryByEntity, Map<E, ValuesAndExtrapolations> currentMetricsByEntity) {<NEW_LINE>validateNotNull(metricsHistoryByEntity, "Metrics history cannot be null.");<NEW_LINE>validateNotNull(currentMetricsByEntity, "Current metrics can... | "none" : metricAnomaly.description()); |
500,181 | protected final BeanDefinitionBuilder parseHandler(Element element, ParserContext parserContext) {<NEW_LINE>Object <MASK><NEW_LINE>BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(this.getFactoryBeanClassName());<NEW_LINE>BeanComponentDefinition innerDefinition = IntegrationNamespaceUtils.par... | source = parserContext.extractSource(element); |
1,111,059 | private synchronized void refreshHomeDevices(List<HomeDevice> homeDevices) {<NEW_LINE>for (HomeDevice hd : homeDevices) {<NEW_LINE>String key = hd.getApplianceIdentifier().getApplianceId();<NEW_LINE>if (!cachedHomeDevicesByApplianceId.containsKey(key)) {<NEW_LINE>logger.<MASK><NEW_LINE>for (DiscoveryListener listener :... | debug("A new appliance with ID '{}' has been added", hd.UID); |
355,042 | // TODO: sub file cache<NEW_LINE>public static Output provideOutput(OpenDocument document, TranslationSettings settings, String cachePrefix, String cacheSuffix) throws IOException {<NEW_LINE>Output output = new Output();<NEW_LINE>FileCache cache = settings.getCache();<NEW_LINE>if (!settings.isSplitPages() || (document ... | .writer = new LWXMLMultiWriter(outs); |
1,607,122 | private static void logMessageReceived(HttpExchange exchange, String content, RendererConfiguration renderer) {<NEW_LINE>StringBuilder header = new StringBuilder();<NEW_LINE>String soapAction = null;<NEW_LINE>header.append(exchange.getRequestMethod());<NEW_LINE>header.append(" ").append(exchange.getRequestURI());<NEW_L... | rendererName = getRendererName(exchange, renderer); |
990,917 | private static File resolveNbDestDir(File root, File customNbDestDir, PropertyEvaluator eval) throws IOException {<NEW_LINE>File nbdestdir;<NEW_LINE>if (customNbDestDir == null) {<NEW_LINE>String nbdestdirS = eval.getProperty(NETBEANS_DEST_DIR);<NEW_LINE>if (nbdestdirS == null) {<NEW_LINE>// NOI18N<NEW_LINE>throw new I... | .getProperty("nbplatform.active") + "', switching to default platform"); |
937,053 | public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {<NEW_LINE>builder.startObject();<NEW_LINE>builder.field(RoleDescriptor.Fields.NAMES.getPreferredName(), indices);<NEW_LINE>builder.field(RoleDescriptor.Fields.PRIVILEGES.getPreferredName(), privileges);<NEW_LINE>if (fieldSecur... | Fields.FIELD_PERMISSIONS.getPreferredName()); |
414,503 | public void updateConfiguration(Configuration configuration, HdfsContext context, URI uri) {<NEW_LINE>if (cacheConfig.isCachingEnabled() && cacheConfig.getCacheType() == ALLUXIO) {<NEW_LINE>configuration.set("alluxio.user.local.cache.enabled", String.valueOf(cacheConfig.isCachingEnabled()));<NEW_LINE>if (cacheConfig.ge... | configuration.set("alluxio.user.client.cache.timeout.duration", "-1"); |
635,815 | private int addBootStrapTypeSwitchEntry(int localContentsOffset, SwitchStatement switchStatement, Map<String, Integer> fPtr) {<NEW_LINE>final int contentsEntries = 10;<NEW_LINE>int indexFortypeSwitch = fPtr.get(ClassFile.TYPESWITCH_STRING);<NEW_LINE>if (contentsEntries + localContentsOffset >= this.contents.length) {<N... | byte) (indexFortypeSwitch >> 8); |
1,280,165 | private StatusCode[] newErrorCode(List<String> errorCodes) {<NEW_LINE>if (CollectionUtils.isEmpty(errorCodes)) {<NEW_LINE>return new StatusCode[0];<NEW_LINE>}<NEW_LINE>List<StatusCode> statusCodeList = new ArrayList<>();<NEW_LINE>for (String errorCode : errorCodes) {<NEW_LINE>if (errorCode.equalsIgnoreCase("5xx")) {<NE... | statusCode = Integer.parseInt(errorCode); |
1,832,630 | final DBClusterSnapshotAttributesResult executeDescribeDBClusterSnapshotAttributes(DescribeDBClusterSnapshotAttributesRequest describeDBClusterSnapshotAttributesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeDBClusterSnapshotAttributesRequest);<NEW_LINE>AWSRequestMetrics awsReque... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,466,005 | private void preparePlugins() {<NEW_LINE>besuPluginContext.addService(PicoCLIOptions.class, new PicoCLIOptionsImpl(commandLine));<NEW_LINE>besuPluginContext.addService(SecurityModuleService.class, securityModuleService);<NEW_LINE>besuPluginContext.addService(StorageService.class, storageService);<NEW_LINE>besuPluginCon... | besuPluginContext.registerPlugins(pluginsDir()); |
1,374,645 | public Source resolve(String fname, String base) throws TransformerException {<NEW_LINE>try {<NEW_LINE>URL resource;<NEW_LINE>if (fname.endsWith(".xsl") || fname.endsWith(".xml")) {<NEW_LINE>// Force XSL and XML files to be located in the 'xsl' subdirectory.<NEW_LINE>String file = fname.substring(0, 5).equals("file:") ... | : "xsl" + File.separatorChar + fname; |
401,288 | public void testCaptureDebuggerThreadsPlugin() throws Throwable {<NEW_LINE>mb.createTestModel();<NEW_LINE>TestTargetProcess process = mb.testModel.addProcess(1234);<NEW_LINE>TraceRecorder recorder = modelService.recordTarget(process, new TestDebuggerTargetTraceMapper<MASK><NEW_LINE>Trace trace = recorder.getTrace();<NE... | (process), ActionSource.AUTOMATIC); |
1,585,165 | public TriState implies(boolean thisNegated, LogicNode other) {<NEW_LINE>if (other instanceof IntegerLowerThanNode) {<NEW_LINE>IntegerLowerThanNode otherLowerThan = (IntegerLowerThanNode) other;<NEW_LINE>if (getOp() == otherLowerThan.getOp() && getX() == otherLowerThan.getX()) {<NEW_LINE>// x < A => x < B?<NEW_LINE>Log... | getY(), NodeView.DEFAULT); |
531,397 | public void delete(Iterable<AllValueTypesTestRow> rows) {<NEW_LINE>List<byte[]> rowBytes = Persistables.persistAll(rows);<NEW_LINE>Set<Cell> cells = Sets.newHashSetWithExpectedSize(rowBytes.size() * 11);<NEW_LINE>cells.addAll(Cells.cellsWithConstantColumn(rowBytes, PtBytes.toCachedBytes("c0")));<NEW_LINE>cells.addAll(C... | PtBytes.toCachedBytes("c1"))); |
1,033,257 | public void marshall(ADMMessage aDMMessage, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (aDMMessage == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(aDMMessage.getAction(), ACTION_BINDING);<NEW_LINE>prot... | aDMMessage.getSound(), SOUND_BINDING); |
1,209,591 | private static Type mergeType(Type fstType, Type secType) {<NEW_LINE>TypeEnum fstTypeType = fstType.getType();<NEW_LINE><MASK><NEW_LINE>if (fstTypeType == secTypeType) {<NEW_LINE>if (fstTypeType == TypeEnum.Array) {<NEW_LINE>Type fstArrayType = ((ArrayType) fstType).getGenericType();<NEW_LINE>Type secArrayType = ((Arra... | TypeEnum secTypeType = secType.getType(); |
1,556,270 | public void readFields(DataInput in) throws IOException {<NEW_LINE>state = TEtlState.valueOf(Text.readString(in));<NEW_LINE>trackingUrl = Text.readString(in);<NEW_LINE>int statsCount = in.readInt();<NEW_LINE>for (int i = 0; i < statsCount; ++i) {<NEW_LINE>String key = Text.readString(in);<NEW_LINE>String <MASK><NEW_LIN... | value = Text.readString(in); |
1,672,204 | public void detect(FontManager fontManager, FontAdder fontAdder, boolean strict, FontEventListener eventListener, List<EmbedFontInfo> fontInfoList) throws FOPException {<NEW_LINE>try {<NEW_LINE>// search in font base if it is defined and<NEW_LINE>// is a directory but don't recurse<NEW_LINE>FontFileFinder fontFileFinde... | handleException(log, use, strict); |
764,292 | public Map<String, Object> refreshTestRunning(User user, @PathVariable long id) {<NEW_LINE>PerfTest test = checkNotNull(getOneWithPermissionCheck(user, id, false), "given test should be exist : " + id);<NEW_LINE>Map<String<MASK><NEW_LINE>SamplingModel samplingModel = hazelcastService.get(DIST_MAP_NAME_SAMPLING, test.ge... | , Object> map = newHashMap(); |
24,950 | final ImportAppCatalogResult executeImportAppCatalog(ImportAppCatalogRequest importAppCatalogRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(importAppCatalogRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | endClientExecution(awsRequestMetrics, request, response); |
287,111 | ActionResult<Wo> execute(EffectivePerson effectivePerson, JsonElement jsonElement) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Wi wi = this.convertToWrapIn(jsonElement, Wi.class);<NEW... | ExceptionQueryNotExist(wi.getQuery()); |
1,373,813 | protected void paintComponent(Graphics g) {<NEW_LINE>super.paintComponent(g);<NEW_LINE>if (instanceImage == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int lineHeight = g.getFontMetrics().getHeight();<NEW_LINE>int lineAscent = g.getFontMetrics().getAscent();<NEW_LINE>int viewWidth = getWidth() - 2 * PREVIEW_BORDER;<NE... | ((float) imgHeight / scale); |
1,621,275 | private static void externalIp(final com.typesafe.config.Config config) {<NEW_LINE>if (!config.hasPath(Constant.NODE_DISCOVERY_EXTERNAL_IP) || config.getString(Constant.NODE_DISCOVERY_EXTERNAL_IP).trim().isEmpty()) {<NEW_LINE>if (PARAMETER.nodeExternalIp == null) {<NEW_LINE>logger.info("External IP wasn't set, using ch... | .nodeExternalIp = in.readLine(); |
168,380 | private void addToNewLocation(TreeView<Node> treeView, TreeItem<Node> dropTarget, Folder draggedFolder, TreeItem<Node> draggedItem, List<RequestContainer> requestsInFolder) {<NEW_LINE>// dropping on collection makes it the first children<NEW_LINE>if (dropTarget.getValue().getUserData() instanceof Collection) {<NEW_LINE... | .getFolders().size(); |
274,579 | void initMediaSessionMetadata() {<NEW_LINE>MediaMetadataCompat.Builder metadataBuilder = new MediaMetadataCompat.Builder();<NEW_LINE>// Notification icon in card<NEW_LINE>MediaMetaData md = RemoteControlCallback.getMetaData();<NEW_LINE>if (md == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (md.getDisplayIcon() != nu... | setMetadata(metadataBuilder.build()); |
955,386 | private Item findItemByUsername(String room, String username) {<NEW_LINE>Item foundItem = null;<NEW_LINE>List<Item> items = cache.get(room);<NEW_LINE>if (items != null) {<NEW_LINE>boolean oldEnoughHistory = false;<NEW_LINE>for (int i = items.size() - 1; i >= 0; i--) {<NEW_LINE>Item <MASK><NEW_LINE>if (item.getAge() > 5... | item = items.get(i); |
78,990 | public Object readConst(final int item, final char[] buf) {<NEW_LINE>int index = items[item];<NEW_LINE>switch(b[index - 1]) {<NEW_LINE>case INT:<NEW_LINE>return readInt(index);<NEW_LINE>case FLOAT:<NEW_LINE>return Float<MASK><NEW_LINE>case LONG:<NEW_LINE>return readLong(index);<NEW_LINE>case DOUBLE:<NEW_LINE>return Dou... | .intBitsToFloat(readInt(index)); |
973,198 | public void showClientMyCompanyTickets(ActionRequest request, ActionResponse response) {<NEW_LINE>try {<NEW_LINE>ClientViewService clientViewService = Beans.get(ClientViewService.class);<NEW_LINE>User clientUser = clientViewService.getClientUser();<NEW_LINE>if (clientUser.getPartner() == null) {<NEW_LINE>response.setEr... | ()).map()); |
1,065,242 | void readItemsFromJson(@NonNull JSONObject json) throws IllegalArgumentException {<NEW_LINE>try {<NEW_LINE>if (!json.has("items")) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>JSONArray jsonArray = json.getJSONArray("items");<NEW_LINE>for (int i = 0; i < jsonArray.length(); i++) {<NEW_LINE>JSONObject <MASK><NEW_LINE>String c... | jsonPoint = jsonArray.getJSONObject(i); |
307,470 | private static // org.glowroot.common.repo.util.LazySecretKey.SymmetricEncryptionKeyMissingException<NEW_LINE>Session createMailSession(SmtpConfig smtpConfig, @Nullable String passwordOverride, LazySecretKey lazySecretKey) throws Exception {<NEW_LINE>Properties props = new Properties();<NEW_LINE>props.put("mail.smtp.ho... | props.put("mail.smtp.port", port); |
751,707 | public static void customizePrefernces() {<NEW_LINE>final IMsgBL msgBL = Services.get(IMsgBL.class);<NEW_LINE>final Border insetBorder = BorderFactory.createEmptyBorder(2, 2, 2, 0);<NEW_LINE>final FlowLayout flowLayout = new FlowLayout(FlowLayout.LEFT);<NEW_LINE>final CPanel dlmPanel = new CPanel();<NEW_LINE>dlmPanel.s... | get(IMigratorService.DLM_Level_ARCHIVE))); |
1,844,707 | public ValidationResult check(PageValidation pageValidation, String objectName, SpecCount spec) throws ValidationErrorException {<NEW_LINE>List<String> matchingNames = pageValidation.getPageSpec().<MASK><NEW_LINE>Map<String, PageElement> reportElements;<NEW_LINE>Map<String, PageElement> filteredElements;<NEW_LINE>Strin... | findOnlyExistingMatchingObjectNames(spec.getPattern()); |
581,809 | public static String makeSaveResultInfo(List<SaveResult> result) {<NEW_LINE>StringBuilder b = new StringBuilder();<NEW_LINE>int index = 0;<NEW_LINE>for (SaveResult r : result) {<NEW_LINE>if (r == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>// Regular<NEW_LINE>if (r.written) {<NEW_LINE>b.append(String.format("* File ... | getErrorMessageCompact(r.writeError))); |
667,083 | void readImplementations(SubType type) {<NEW_LINE>this.interfaces.<MASK><NEW_LINE>this.interfaces.addAll(type.getInterfaces());<NEW_LINE>AnnotationNode implementsAnnotation = Annotations.getInvisible(this.validationClassNode, Implements.class);<NEW_LINE>if (implementsAnnotation == null) {<NEW_LINE>return;<NEW_LINE>}<NE... | addAll(this.validationClassNode.interfaces); |
1,458,438 | public BatchDeleteDevicePositionHistoryResult batchDeleteDevicePositionHistory(BatchDeleteDevicePositionHistoryRequest batchDeleteDevicePositionHistoryRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchDeleteDevicePositionHistoryReque... | new JsonResponseHandler<BatchDeleteDevicePositionHistoryResult>(unmarshaller); |
858,901 | public void initFromTensorFlow(NodeDef nodeDef, SameDiff initWith, Map<String, AttrValue> attributesForNode, GraphDef graph) {<NEW_LINE>super.initFromTensorFlow(<MASK><NEW_LINE>// permute dimensions are not specified as second input<NEW_LINE>if (nodeDef.getInputCount() < 2)<NEW_LINE>return;<NEW_LINE>NodeDef permuteDims... | nodeDef, initWith, attributesForNode, graph); |
44,997 | static void testAttestSgxEnclave() {<NEW_LINE>String <MASK><NEW_LINE>AttestationClientBuilder attestationBuilder = new AttestationClientBuilder();<NEW_LINE>AttestationClient client = attestationBuilder.endpoint(endpoint).buildClient();<NEW_LINE>BinaryData decodedRuntimeData = BinaryData.fromBytes(SampleCollateral.getRu... | endpoint = System.getenv("ATTESTATION_AAD_URL"); |
1,759,432 | protected FormInfo resolveFormInfo(StartEvent startEvent, ProcessDefinition processDefinition, FormRepositoryService formRepositoryService, ProcessEngineConfigurationImpl processEngineConfiguration) {<NEW_LINE>String formKey = startEvent.getFormKey();<NEW_LINE>FormInfo formInfo;<NEW_LINE>if (tenantId == null || Process... | tenantId, processEngineConfiguration.isFallbackToDefaultTenant()); |
1,825,408 | private static int startScripts() {<NEW_LINE>int scriptCount = 0;<NEW_LINE>String p = argMap.get(STDOUT);<NEW_LINE>boolean traceToStdOut = p != null && !"false".equals(p);<NEW_LINE>if (isDebug()) {<NEW_LINE>debugPrint("stdout is " + traceToStdOut);<NEW_LINE>}<NEW_LINE>String script = argMap.get(SCRIPT);<NEW_LINE>String... | = new StringTokenizer(script, ":"); |
1,535,344 | void checkAndMaybeComplete() {<NEW_LINE>if (progressTracker.isDone()) {<NEW_LINE>if (progressTracker.hasSucceeded() && !retainChunkExceptionOnSuccess) {<NEW_LINE>chunkException = null;<NEW_LINE>} else if (chunkOperationTracker.hasFailedOnNotFound()) {<NEW_LINE>chunkException = <MASK><NEW_LINE>}<NEW_LINE>chunkCompleted ... | buildChunkException("Get Chunk failed because of BlobNotFound", RouterErrorCode.BlobDoesNotExist); |
604,879 | private List<SimpleInterval> shardIntervals(final List<SimpleInterval> raw, final int shardSize) {<NEW_LINE>final List<SimpleInterval> preSharded = sortAndMergeOverlappingIntervals(raw, dictionary);<NEW_LINE>final long size = preSharded.stream().mapToLong(SimpleInterval::size).sum();<NEW_LINE>final List<SimpleInterval>... | (), start, inEnd)); |
279,900 | protected BpmnModel executeRequestForXML(HttpUriRequest request, ServerConfig serverConfig, int expectedStatusCode) {<NEW_LINE>FlowableServiceException exception = null;<NEW_LINE>CloseableHttpClient client = clientUtil.getHttpClient(serverConfig);<NEW_LINE>try {<NEW_LINE>try (CloseableHttpResponse response = client.exe... | XMLInputFactory xif = XMLInputFactory.newInstance(); |
1,062,708 | public void run(RegressionEnvironment env) {<NEW_LINE>String epl = "insert into Pair " + "select * from SupportSensorEvent(device='A')#lastevent as a, SupportSensorEvent(device='B')#lastevent as b " + "where a.type = b.type;\n" + "" + "insert into PairDuplicatesRemoved select * from Pair(1=2);\n" + "" + "@name('s0') in... | , "A", 51, 94.5)); |
637,610 | public BytesRef toBytesRef() {<NEW_LINE>if (position <= buffer.length) {<NEW_LINE>assert overflow == null;<NEW_LINE>return new BytesRef(buffer, 0, position);<NEW_LINE>}<NEW_LINE>final byte[] newBuffer = new byte[position];<NEW_LINE>System.arraycopy(buffer, 0, <MASK><NEW_LINE>int copyPos = buffer.length;<NEW_LINE>final ... | newBuffer, 0, buffer.length); |
676,787 | protected Map<Control, IDialogueControlDescriptor> createManagedControls(Composite parent) {<NEW_LINE>Composite baseCommandArea = new Composite(parent, SWT.NONE);<NEW_LINE>GridLayoutFactory.fillDefaults().numColumns(1).applyTo(baseCommandArea);<NEW_LINE>GridDataFactory.fillDefaults().applyTo(baseCommandArea);<NEW_LINE>... | = new Button(baseCommandArea, buttonType); |
224,269 | public SaleOrder save(SaleOrder saleOrder) {<NEW_LINE>try {<NEW_LINE>AppSale appSale = Beans.get(AppSaleService.class).getAppSale();<NEW_LINE>if (appSale.getEnablePackManagement()) {<NEW_LINE>saleOrderComputeService.computePackTotal(saleOrder);<NEW_LINE>} else {<NEW_LINE>saleOrderComputeService.resetPackTotal(saleOrder... | e.getMessage(), e); |
1,008,469 | private void saveConfig(String fileName) {<NEW_LINE>// sp1 is the shared pref to copy to<NEW_LINE>SharedPreferences.Editor ed = getActivity().getSharedPreferences(fileName, MODE_PRIVATE).edit();<NEW_LINE>// The shared preferences to copy from<NEW_LINE>SharedPreferences sp = getPreferenceScreen().getSharedPreferences();... | ) v).booleanValue()); |
639,123 | public static DescribePortViewSourceCountriesResponse unmarshall(DescribePortViewSourceCountriesResponse describePortViewSourceCountriesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describePortViewSourceCountriesResponse.setRequestId(_ctx.stringValue("DescribePortViewSourceCountriesResponse.RequestId"));<NEW_LINE>Lis... | = new ArrayList<Country>(); |
1,154,237 | private BufferedImage createOverlayImage(String text) {<NEW_LINE>int size = 16;<NEW_LINE>BufferedImage image = new BufferedImage(size, size, BufferedImage.TYPE_INT_ARGB);<NEW_LINE>Graphics2D g = image.createGraphics();<NEW_LINE>g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);<NEW_... | g.setColor(Color.white); |
1,758,834 | public static void drawRoundRect(Graphics g, double x1d, double y1d, double x2d, double y2d, Color color) {<NEW_LINE>final Color oldColor = g.getColor();<NEW_LINE>g.setColor(color);<NEW_LINE>int x1 = (int) Math.round(x1d);<NEW_LINE>int x2 = (<MASK><NEW_LINE>int y1 = (int) Math.round(y1d);<NEW_LINE>int y2 = (int) Math.r... | int) Math.round(x2d); |
1,719,517 | private void writeBlobMultipart(BlobInfo blobInfo, byte[] buffer, int offset, int blobSize, boolean failIfAlreadyExists) throws IOException {<NEW_LINE>assert blobSize <= getLargeBlobThresholdInBytes() : "large blob uploads should use the resumable upload method";<NEW_LINE>try {<NEW_LINE>final Storage.BlobTargetOption[]... | null, se.getMessage()); |
724,206 | public static MonitorRuleDTO convert2MonitorRuleDTO(MonitorRuleDO monitorRuleDO, Strategy strategy) {<NEW_LINE>MonitorRuleDTO monitorRuleDTO = new MonitorRuleDTO();<NEW_LINE>monitorRuleDTO.setId(monitorRuleDO.getId());<NEW_LINE>monitorRuleDTO.setAppId(monitorRuleDO.getAppId());<NEW_LINE>monitorRuleDTO.setName(strategy.... | setPeriodDaysOfWeek(strategy.getPeriodDaysOfWeek()); |
210,186 | public ResolveResult[] multiResolve(final boolean incompleteCode) {<NEW_LINE>final PsiReference[] refs = getReferences();<NEW_LINE>Collection<ResolveResult> result = new LinkedHashSet<ResolveResult>(refs.length);<NEW_LINE>PsiElementResolveResult selfReference = null;<NEW_LINE>for (PsiReference reference : refs) {<NEW_L... | PsiElement resolved = reference.resolve(); |
1,369,380 | private void scheduleConfigurableTask(final long initialDelay, final ConfigPropertyConstants enabledConstraint, final ConfigPropertyConstants constraint, final Event event) {<NEW_LINE>try (QueryManager qm = new QueryManager()) {<NEW_LINE>final ConfigProperty enabledProperty = qm.getConfigProperty(enabledConstraint.getG... | ), enabledConstraint.getPropertyName()); |
1,776,997 | public static QueryDomainByDomainNameResponse unmarshall(QueryDomainByDomainNameResponse queryDomainByDomainNameResponse, UnmarshallerContext context) {<NEW_LINE>queryDomainByDomainNameResponse.setRequestId(context.stringValue("QueryDomainByDomainNameResponse.RequestId"));<NEW_LINE>queryDomainByDomainNameResponse.setUs... | (context.stringValue("QueryDomainByDomainNameResponse.RegistrantUpdatingStatus")); |
882,252 | private void prepareSelectableWindows(Collection<CardInfoWindowDialog> windows, Set<UUID> needSelectable, List<UUID> needChoosen, PlayableObjectsList needPlayable) {<NEW_LINE>// lookAt or reveals windows clean up on next priority, so users can see dialogs, but xmage can't restore it<NEW_LINE>// so it must be updated ma... | (cardView.getId())); |
56,302 | public boolean isRectangleCover(int[][] rectangles) {<NEW_LINE>long area = 0;<NEW_LINE>int minX = rectangles[0][0], minY = rectangles[0][1];<NEW_LINE>int maxX = rectangles[0][2], maxY = rectangles[0][3];<NEW_LINE>Map<Pair, Integer> cnt = new HashMap<>();<NEW_LINE>for (int[] r : rectangles) {<NEW_LINE>area += (r[2] - r[... | (maxY, r[3]); |
1,301,188 | final DescribeReceiptRuleSetResult executeDescribeReceiptRuleSet(DescribeReceiptRuleSetRequest describeReceiptRuleSetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeReceiptRuleSetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | invoke(request, responseHandler, executionContext); |
1,120,903 | public boolean onJsAlert(WebView view, String url, String message, JsResult jsResult) {<NEW_LINE>if (message != null && message.startsWith("selendroid<")) {<NEW_LINE>jsResult.confirm();<NEW_LINE>synchronized (syncObject) {<NEW_LINE>String res = message.replaceFirst("selendroid<", "");<NEW_LINE>int i = res.indexOf(">:")... | SelendroidLogger.debug("Original String: " + res); |
1,517,404 | public Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException {<NEW_LINE>Object localVarPostBody = body;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/fake/outer/boolean";<NEW_LINE>// query params<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>List<Pa... | HashMap<String, Object>(); |
436,460 | private JPanel initPropertyPane() {<NEW_LINE>propertyPane = new PropertyPaneView();<NEW_LINE>// NOI18N<NEW_LINE>String valueTitle = NbBundle.<MASK><NEW_LINE>propertyPane.setProperties(new Node.Property[] { new PropertySupport.ReadOnly<String>(MatchedPropertyNode.PROPERTY_VALUE, String.class, valueTitle, null) {<NEW_LIN... | getMessage(CSSStylesSelectionPanel.class, "CSSStylesSelectionPanel.value"); |
303,197 | public void connected(Mesos mesos) {<NEW_LINE>LOG.info("Connected to Mesos master.");<NEW_LINE>isConnected.set(true);<NEW_LINE>Optional<String> frameworkId = storage.read(storeProvider -> storeProvider.getSchedulerStore().fetchFrameworkId());<NEW_LINE>Protos.FrameworkInfo.Builder frameworkBuilder = infoFactory.getFrame... | ().setFrameworkInfo(frameworkBuilder)); |
1,065,231 | private static void runQuery(RegressionEnvironment env, RegressionPath path, String epl, String fields, Object[][] expected, ContextPartitionSelector[] selectors) {<NEW_LINE>// try FAF without prepare<NEW_LINE>EPCompiled compiled = env.compileFAF(epl, path);<NEW_LINE>EPFireAndForgetQueryResult result = env.runtime().ge... | .split(","), expected); |
264,367 | public void run() {<NEW_LINE>runUpgrade(() -> {<NEW_LINE>Cluster cluster = getUniverse().getUniverseDetails().getPrimaryCluster();<NEW_LINE>UserIntent userIntent = cluster.userIntent;<NEW_LINE>PlacementInfo placementInfo = cluster.placementInfo;<NEW_LINE>// Verify the request params and fail if invalid<NEW_LINE>taskPar... | ).verifyParams(getUniverse()); |
681,211 | public void marshall(CreateJobTemplateRequest createJobTemplateRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createJobTemplateRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createJobTem... | createJobTemplateRequest.getQueue(), QUEUE_BINDING); |
944,051 | public List<String> list(Business business, EffectivePerson effectivePerson, List<String> identities, List<String> units, List<String> groups, Application application, Wi wi) throws Exception {<NEW_LINE>EntityManager em = business.entityManagerContainer().get(Process.class);<NEW_LINE>CriteriaBuilder cb = em.getCriteria... | startableUnitList).in(units)); |
1,751,613 | public CompletableFuture<Void> submitLightJob(long jobId, Object deserializedJobDefinition, Data serializedJobDefinition, JobConfig jobConfig, Subject subject) {<NEW_LINE>if (deserializedJobDefinition == null) {<NEW_LINE>deserializedJobDefinition = nodeEngine().getSerializationService().toObject(serializedJobDefinition... | ("duplicate jobId " + idToString(jobId)); |
445,852 | public Dialog onCreateDialog(Bundle savedInstanceState) {<NEW_LINE>Bundle args = getArguments();<NEW_LINE>account = args.getParcelable(ARGUMENT_ACCOUNT);<NEW_LINE>if (account != null)<NEW_LINE>jid = account.getFullJid().asBareJid().toString();<NEW_LINE>LayoutInflater inflater <MASK><NEW_LINE>View view = inflater.inflat... | = getActivity().getLayoutInflater(); |
1,165,161 | private void applyChanges(final ModifyElementRulesPanel panel, final SourceElementHandle handle) {<NEW_LINE>final BaseDocument doc = (BaseDocument) Utils.getDocument(file);<NEW_LINE>final AtomicBoolean success = new AtomicBoolean();<NEW_LINE>pos = Integer.MAX_VALUE;<NEW_LINE>diff = -1;<NEW_LINE>doc.runAtomicAsUser(new ... | panel.getNewIdAttributeValue(), "id"); |
1,430,898 | void updateModel(final ModelNode operation, final ModelNode model, final boolean checkSingleton) throws OperationFailedException {<NEW_LINE>ModelNode node = config;<NEW_LINE>final List<Property> addressNodes = operation.<MASK><NEW_LINE>final int lastIndex = addressNodes.size() - 1;<NEW_LINE>for (int i = 0; i < addressN... | get("address").asPropertyList(); |
817,608 | private List<String> createPointer(String pointer) {<NEW_LINE>if (pointer.charAt(0) == '#') {<NEW_LINE>try {<NEW_LINE>pointer = URLDecoder.decode(pointer, "UTF_8");<NEW_LINE>} catch (UnsupportedEncodingException e) {<NEW_LINE>throw new JSONException(e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (pointer.isEmpty() || pointer.ch... | (1).split("/"); |
1,129,309 | public void marshall(VideoParameters videoParameters, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (videoParameters == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(videoParameters.getCodec(), CODEC_BINDI... | videoParameters.getAspectRatio(), ASPECTRATIO_BINDING); |
1,222,926 | public void regenerateAntiCsrfToken(HttpMessage message, HttpMessageSender httpSender) {<NEW_LINE>List<AntiCsrfToken> tokens = getTokens(message);<NEW_LINE>AntiCsrfToken antiCsrfToken = null;<NEW_LINE>if (tokens.size() > 0) {<NEW_LINE>antiCsrfToken = tokens.get(0);<NEW_LINE>}<NEW_LINE>if (antiCsrfToken == null) {<NEW_L... | , antiCsrfToken.getFormIndex())); |
1,396,610 | public static DynamicConfigAddMapConfigCodec.RequestParameters decodeRequest(ClientMessage clientMessage) {<NEW_LINE>ClientMessage.ForwardFrameIterator iterator = clientMessage.frameIterator();<NEW_LINE>RequestParameters request = new RequestParameters();<NEW_LINE>ClientMessage.Frame initialFrame = iterator.next();<NEW... | decodeBoolean(initialFrame.content, REQUEST_PER_ENTRY_STATS_ENABLED_FIELD_OFFSET); |
142,013 | protected TickRange findRange(long tick) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(tc, "findRange", new Object[] { new Long(tick) });<NEW_LINE>TickRange found = null;<NEW_LINE>long diff = cursor.diff(tick);<NEW_LINE>while (diff != 0) {<NEW_LINE>if (diff > 0) {<NEW_... | diff = cursor.diff(tick); |
8,161 | public EbicsCertificate updateCertificate(X509Certificate certificate, EbicsCertificate cert, boolean cleanPrivateKey) throws CertificateEncodingException, IOException {<NEW_LINE>String sha = DigestUtils.sha256Hex(certificate.getEncoded());<NEW_LINE>log.debug("sha256 HEX : {}", sha);<NEW_LINE>log.debug("certificat : {}... | ().toString(16)); |
98,839 | private void updateSegmentTree(int[] segmentTree, int index, int delta, int low, int high, int pos) {<NEW_LINE>// if index to be updated is less than low or higher than high just return.<NEW_LINE>if (index < low || index > high) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// if low and high become equal, then index will be ... | = (low + high) / 2; |
845,050 | public void formatKeyWithAddress(boolean includePrivateKeys, @Nullable KeyParameter aesKey, StringBuilder builder, NetworkParameters params, Script.ScriptType outputScriptType, @Nullable String comment) {<NEW_LINE>builder.append(" addr:");<NEW_LINE>if (outputScriptType != null) {<NEW_LINE>builder.append(Address.fromKe... | (toStringWithPrivate(aesKey, params)); |
394,354 | public void run() {<NEW_LINE>try {<NEW_LINE>String authToken = GoogleAuthUtil.getToken(TomahawkApp.getContext(), account, "sj");<NEW_LINE>Log.d(TAG, "Received auth token!");<NEW_LINE>Map<String, Object> config = mScriptResolver.getConfig();<NEW_LINE>config.put("token", authToken);<NEW_LINE>config.put("email", account.n... | "UserRecoverableAuthException: " + e.getLocalizedMessage()); |
775,080 | public com.amazonaws.services.fsx.model.UnsupportedOperationException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.fsx.model.UnsupportedOperationException unsupportedOperationException = new com.amazonaws.services.fsx.model.UnsupportedOperationException(null)... | JsonToken token = context.getCurrentToken(); |
300,591 | public StringBuilder exportEverything(JsonMeterRegistry meterRegistry) {<NEW_LINE>JsonObjectBuilder root = JSON_PROVIDER.createObjectBuilder();<NEW_LINE>List<Gauge> gauges = new ArrayList<>();<NEW_LINE>List<Counter> counters = new ArrayList<>();<NEW_LINE>List<TimeGauge> timeGauges = new ArrayList<>();<NEW_LINE>List<Fun... | ::add, meters::add)); |
1,073,588 | public static <T, V> Function2<ObjectDoubleHashMap<V>, T, ObjectDoubleHashMap<V>> sumByFloatFunction(final Function<T, V> groupBy, final FloatFunction<? super T> function) {<NEW_LINE>return new Function2<ObjectDoubleHashMap<V>, T, ObjectDoubleHashMap<V>>() {<NEW_LINE><NEW_LINE>private static final long serialVersionUID... | .get(groupKey) - adjustedValue); |
206,696 | public void write(RandomAccessFile raf, DataConverter dc) throws IOException {<NEW_LINE>raf.seek(0);<NEW_LINE>raf.writeByte(e_ident_magic_num);<NEW_LINE>raf.write(e_ident_magic_str.getBytes());<NEW_LINE>raf.writeByte(e_ident_class);<NEW_LINE>raf.writeByte(e_ident_data);<NEW_LINE>raf.writeByte(e_ident_version);<NEW_LINE... | (dc.getBytes(e_shstrndx)); |
910,928 | public <T> Option<Unfoldable<Higher<Higher<product, W1>, W2>>> unfoldable() {<NEW_LINE>if (!def1.unfoldable().isPresent() && !def2.unfoldable().isPresent())<NEW_LINE>return Maybe.nothing();<NEW_LINE>return Maybe.just(new Unfoldable<Higher<Higher<product, W1>, W2>>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public <R, T>... | ).unfold(b, fn); |
616,771 | public static void horizontal11(Kernel1D_S32 kernel, GrayU16 image, GrayI16 dest) {<NEW_LINE>final short[] dataSrc = image.data;<NEW_LINE>final short[] dataDst = dest.data;<NEW_LINE>final int k1 = kernel.data[0];<NEW_LINE>final int k2 = kernel.data[1];<NEW_LINE>final int k3 = kernel.data[2];<NEW_LINE>final int k4 = ker... | indexSrc++] & 0xFFFF) * k1; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.