idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,549,791 | final DeleteImageResult executeDeleteImage(DeleteImageRequest deleteImageRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteImageRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
672,573 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String stmtOrigText = "@name('split') @public on SupportBean as mystream " + "insert into AStream34 select mystream.theString||'_1' as theString where intPrimitive=1 " + "insert into BStream34 select mystream.theS... | , path).addListener("split"); |
611,302 | public void sessionClosed(boolean deleteSubscriptions) {<NEW_LINE>Iterator<Subscription> iterator = subscriptions.values().iterator();<NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>Subscription s = iterator.next();<NEW_LINE>s.setStateListener(null);<NEW_LINE>if (deleteSubscriptions) {<NEW_LINE>server.getSubscriptions(... | publishService.setServiceFault(StatusCodes.Bad_SessionClosed); |
1,138,730 | private void executeStep(DataFrameAnalyticsTask task, DataFrameAnalyticsConfig config, DataFrameAnalyticsStep step) {<NEW_LINE>task.setStep(step);<NEW_LINE>ActionListener<StepResponse> stepListener = ActionListener.wrap(stepResponse -> {<NEW_LINE>if (stepResponse.isTaskComplete()) {<NEW_LINE>// We always want to perfor... | inferenceStep), task::setFailed)); |
1,335,895 | public CopyRatioState.SegmentMeans sample(final RandomGenerator rng, final CopyRatioState state, final CopyRatioSegmentedData data) {<NEW_LINE>final List<Double> means = new ArrayList<>(data.getNumSegments());<NEW_LINE>final BiFunction<CopyRatioSegmentedData.IndexedCopyRatio, Double, Double> logConditionalPDF = (icr, n... | indexedCopyRatiosInSegment = data.getIndexedCopyRatiosInSegment(segmentIndex); |
1,424,899 | public LookupValuesPage retrieveEntities(final LookupDataSourceContext evalCtx) {<NEW_LINE>logger.trace("Retrieving entries for: {}", evalCtx);<NEW_LINE>if (evalCtx.isAnyFilter()) {<NEW_LINE>// usually that's the case of dropdowns. In that case we don't want to use elasticsearch.<NEW_LINE>logger.trace("Fallback to data... | final QueryBuilder query = createElasticsearchQuery(evalCtx); |
293,696 | public static ElementSplitUtil.ElementSegment[][] doSplit(long[] elementCounts, int numSplits) {<NEW_LINE>Preconditions.checkArgument(elementCounts != null && allPositive(elementCounts), "element counts is null or contain illegal element! ");<NEW_LINE>Preconditions.checkArgument(numSplits > 0, "num splits is less than ... | elementBoundaries[partId][1]); |
1,800,708 | public static double crossTrackDistanceRad(double lat1, double lon1, double lat2, double lon2, double latQ, double lonQ, double dist1Q) {<NEW_LINE>final double dlon12 = lon2 - lon1;<NEW_LINE>final double dlon1Q = lonQ - lon1;<NEW_LINE>// Compute trigonometric functions only once.<NEW_LINE>// To return cosine<NEW_LINE>f... | tmp), clat2 = tmp.value; |
1,721,640 | public void undo(DiagramHandler handler) {<NEW_LINE>super.undo(handler);<NEW_LINE>// We must zoom to the defaultGridsize before execution<NEW_LINE>int oldZoom = handler.getGridSize();<NEW_LINE>handler.setGridAndZoom(Constants.DEFAULTGRIDSIZE, false);<NEW_LINE>int offsetX = origin.x - handler.getDrawPanel().getOriginAtD... | handler.setGridAndZoom(oldZoom, false); |
1,453,787 | final GetSegmentResult executeGetSegment(GetSegmentRequest getSegmentRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getSegmentRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,065,425 | protected void executeImpl() throws MojoExecutionException, MojoFailureException {<NEW_LINE>Zip zip = (Zip) antProject.createTask("zip");<NEW_LINE>File testOutputs = new File(project.<MASK><NEW_LINE>if (!testOutputs.exists()) {<NEW_LINE>testOutputs.mkdir();<NEW_LINE>}<NEW_LINE>File dummy = new File(testOutputs, project... | getBuild().getTestOutputDirectory()); |
598,556 | private void readPairPositioningAdjustmentFormat1(long subTablePosition) throws IOException {<NEW_LINE>int coverageOffset = input.readUnsignedShort();<NEW_LINE>int valueFormat1 = input.readUnsignedShort();<NEW_LINE>int valueFormat2 = input.readUnsignedShort();<NEW_LINE>int pairSetCount = input.readUnsignedShort();<NEW_... | int[] coverage = readCoverageTable(); |
1,283,856 | private void expireScript(AeiObjects aeiObjects, Manual manual, Task task) throws Exception {<NEW_LINE>ExpireScriptResult expire = new ExpireScriptResult();<NEW_LINE>ScriptContext scriptContext = aeiObjects.scriptContext();<NEW_LINE>CompiledScript cs = aeiObjects.business().element().getCompiledScript(aeiObjects.getWor... | add(Calendar.MINUTE, m); |
677,663 | private synchronized void addToQuadStore_BNode(Object subject, URI predicate, Object object, Resource... contexts) throws RepositoryException {<NEW_LINE>if (contexts.length == 0)<NEW_LINE>return;<NEW_LINE>verifyIsOpen();<NEW_LINE>try {<NEW_LINE>int transactional = quadStoreConnection.getAutoCommit() ? 0 : 1;<NEW_LINE>f... | 1, sb.toString()); |
1,643,117 | public static void registerJsfAjaxDefaultResource(FaceletContext ctx, UIComponent parent) {<NEW_LINE>// Register the standard ajax library on the current page in this way:<NEW_LINE>//<NEW_LINE>// <h:outputScript name="jsf.js" library="javax.faces" target="head"/><NEW_LINE>//<NEW_LINE>// If no h:head component is in the... | put(JSFAttr.TARGET_ATTR, "head"); |
1,563,648 | private void handleTunnel() {<NEW_LINE>viaCheckbox.setEnabled(tunnelCheckbox.isSelected());<NEW_LINE>extSSHCheckbox.setEnabled(tunnelCheckbox.isSelected());<NEW_LINE>if (tunnelCheckbox.isSelected()) {<NEW_LINE>JComponent[] components = { viaUserInput, viaHostInput, viaPortInput };<NEW_LINE>for (JComponent c : component... | setEnabled(extSSHCheckbox.isSelected()); |
1,356,131 | final DisableKeyResult executeDisableKey(DisableKeyRequest disableKeyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(disableKeyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<... | invoke(request, responseHandler, executionContext); |
626,766 | public License sign(License licenseSpec) throws IOException {<NEW_LINE>XContentBuilder contentBuilder = XContentFactory.contentBuilder(XContentType.JSON);<NEW_LINE>final Map<String, String> licenseSpecViewMode = Collections.singletonMap(License.LICENSE_SPEC_VIEW_MODE, "true");<NEW_LINE>licenseSpec.toXContent(contentBui... | ref.offset, ref.length); |
345,204 | private Object readState(Decoder decoder) throws Exception {<NEW_LINE>byte stateType = decoder.readByte();<NEW_LINE>if (stateType == NULL_TYPE) {<NEW_LINE>return null;<NEW_LINE>} else if (stateType == ISOLATABLE_TYPE) {<NEW_LINE>return readIsolatable(decoder);<NEW_LINE>} else if (stateType == ARRAY_TYPE) {<NEW_LINE><MA... | String stateClassName = decoder.readString(); |
371,082 | public String toReverbString(String docid, CoreMap sentence) {<NEW_LINE>int sentIndex = -1;<NEW_LINE>int subjIndex = -1;<NEW_LINE>int relationIndex = -1;<NEW_LINE>int objIndex = -1;<NEW_LINE>int subjIndexEnd = -1;<NEW_LINE>int relationIndexEnd = -1;<NEW_LINE>int objIndexEnd = -1;<NEW_LINE>if (!relation.isEmpty()) {<NEW... | get(0).sentIndex(); |
359,498 | public CodegenExpression make(CodegenMethodScope parent, ModuleTableInitializeSymbol symbols, CodegenClassScope classScope) {<NEW_LINE>CodegenMethod method = parent.makeChild(TableMetaData.EPTYPE, this.getClass(), classScope);<NEW_LINE>method.getBlock().declareVarNewInstance(TableMetaData.EPTYPE, "meta").exprDotMethod(... | .methodReturn(ref("meta")); |
166,918 | private SettingsGroup makeOtherGroup() {<NEW_LINE>JComboBox<LangLocale> languageCbx = new JComboBox<>(NLS.getLangLocales());<NEW_LINE>for (LangLocale locale : NLS.getLangLocales()) {<NEW_LINE>if (locale.equals(settings.getLangLocale())) {<NEW_LINE>languageCbx.setSelectedItem(locale);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE... | getStateChange() == ItemEvent.SELECTED); |
840,203 | private static void dispatchEvent(Child c, Event event) {<NEW_LINE>boolean crash = false;<NEW_LINE>boolean terminated = false;<NEW_LINE>if (event instanceof ChildEnd) {<NEW_LINE>c.exitValue = ((ChildEnd) event).exit_status;<NEW_LINE>Logger.debug("Child #" + c.id + " exited ( exitValue=" + c.exitValue + " )");<NEW_LINE>... | receiver.onEnd(c.exitValue); |
991,873 | /*<NEW_LINE>* This method calls the full-archive search endpoint with a the search term passed to it as a query parameter<NEW_LINE>* */<NEW_LINE>private static String search(String searchString, String bearerToken) throws IOException, URISyntaxException {<NEW_LINE>String searchResponse = null;<NEW_LINE>HttpClient httpC... | build()).build(); |
301,227 | void exportAuthFile(ServicePrincipalImpl servicePrincipal) {<NEW_LINE>if (authFile == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>AzureEnvironment environment = AzureEnvironment.AZURE;<NEW_LINE>StringBuilder builder = new StringBuilder("{\n");<NEW_LINE>builder.append(" ").append(String.format("\"clientId\": \"%s\",",... | ))).append("\n"); |
1,402,596 | private static long hashLen33to64(byte[] byteArray) {<NEW_LINE>int len = byteArray.length;<NEW_LINE>long mul = k2 + len * 2L;<NEW_LINE>long a = fetch64(byteArray, 0) * k2;<NEW_LINE>long b = fetch64(byteArray, 8);<NEW_LINE>long c = fetch64(byteArray, len - 24);<NEW_LINE>long d = fetch64(byteArray, len - 32);<NEW_LINE>lo... | long z = e + f + c; |
1,457,289 | private void sendPointerEvent(int x, int y, int metaState, boolean isMoving) {<NEW_LINE>int combinedMetaState = metaState | canvas.getKeyboard().getMetaState();<NEW_LINE>if (relativeEvents) {<NEW_LINE>int relX = x - pointerX;<NEW_LINE>int relY = y - pointerY;<NEW_LINE>// android.util.Log.d(TAG, "Sending relative mouse ... | pointerY, combinedMetaState, pointerMask, relativeEvents); |
1,639,377 | public static CMap quantize(int[][] pixels, int maxcolors) {<NEW_LINE>// short-circuit<NEW_LINE>if (pixels.length == 0 || maxcolors < 2 || maxcolors > 256) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>int[] histo = getHisto(pixels);<NEW_LINE>// get the beginning vbox from the colors<NEW_LINE>VBox <MASK><NEW_LINE>ArrayLi... | vbox = vboxFromPixels(pixels, histo); |
250,374 | public ListContactChannelsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListContactChannelsResult listContactChannelsResult = new ListContactChannelsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement()... | JsonToken token = context.getCurrentToken(); |
1,714,917 | public void testTaskIsRunning(HttpServletRequest request, PrintWriter out) throws Exception {<NEW_LINE>String <MASK><NEW_LINE>long taskId = Long.parseLong(request.getParameter("taskId"));<NEW_LINE>boolean cancel = Boolean.parseBoolean(request.getParameter("cancel"));<NEW_LINE>PersistentExecutor executor = (PersistentEx... | jndiName = request.getParameter("jndiName"); |
1,723,233 | private static ReferenceResolver<NestableInput<?>> createPartitionColumnResolver(Index index, Schemas schemas) {<NEW_LINE>PartitionName partitionName;<NEW_LINE>try {<NEW_LINE>partitionName = PartitionName.fromIndexOrTemplate(index.getName());<NEW_LINE>} catch (IllegalArgumentException e) {<NEW_LINE>throw new UnhandledS... | RelationName relationName = partitionName.relationName(); |
1,389,360 | private void processPhysicalPartitionStats(StatsCollectors<DbusEventsStatisticsCollector> statsCollectors, String prefix, DatabusRequest request) throws IOException, RequestProcessingException {<NEW_LINE>if (null == statsCollectors)<NEW_LINE>return;<NEW_LINE>String category = request.getParams().getProperty(DatabusRequ... | "prefix=" + prefix + "source ids " + sourceIdStr); |
430,021 | public static JavaSourceSet build(String sourceSetName, Collection<Path> classpath, JavaTypeCache typeCache, boolean fullTypeInformation) {<NEW_LINE>List<JavaType.FullyQualified> types;<NEW_LINE>// Load JRE-provided types<NEW_LINE>try (ScanResult scanResult = new ClassGraph().enableClassInfo().enableSystemJarsAndModule... | , typeCache, classpath, fullTypeInformation)); |
1,248,062 | public void performOperation(Random rnd, Genome[] parents, int parentIndex, Genome[] offspring, int offspringIndex) {<NEW_LINE>int countTrysToAddLink = this.getOwner().getMaxTries();<NEW_LINE>NEATGenome target = this.obtainGenome(parents, parentIndex, offspring, offspringIndex);<NEW_LINE>// the link will be between the... | neuron2 = chooseRandomNeuron(target, false); |
1,143,190 | public static RemovePrivilegesFromRoleResponse unmarshall(RemovePrivilegesFromRoleResponse removePrivilegesFromRoleResponse, UnmarshallerContext context) {<NEW_LINE>removePrivilegesFromRoleResponse.setRequestId(context.stringValue("RemovePrivilegesFromRoleResponse.RequestId"));<NEW_LINE>removePrivilegesFromRoleResponse... | (context.integerValue("RemovePrivilegesFromRoleResponse.HttpStatusCode")); |
1,170,198 | private void processOptionalFeatures(@Nullable XmlDocument document, @NonNull MergingReport.Builder mergingReport) {<NEW_LINE>if (document == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// perform tools: annotations removal if requested.<NEW_LINE>if (mOptionalFeatures.contains(Invoker.Feature.REMOVE_TOOLS_DECLARATIONS... | MergingReport.MergedManifestKind.MERGED, document); |
751,194 | public AirbyteConnectionStatus check(final JsonNode config) {<NEW_LINE>try (final JdbcDatabase database = getDatabase(config)) {<NEW_LINE>final MariadbColumnstoreSqlOperations mariadbColumnstoreSqlOperations = (MariadbColumnstoreSqlOperations) getSqlOperations();<NEW_LINE>final String outputSchema = getNamingResolver()... | ("database").asText()); |
1,572,767 | private static String resolveHostToIpIfNecessary(String host) {<NEW_LINE>String schemaDelimiter = "://";<NEW_LINE>String schema = StringUtils.EMPTY;<NEW_LINE>if (host.contains(schemaDelimiter)) {<NEW_LINE>int index = host.indexOf(schemaDelimiter);<NEW_LINE>schema = host.substring(0, index);<NEW_LINE>host = host.substri... | index + schemaDelimiter.length()); |
1,816,791 | protected boolean createAndLoad(ScriptFileReference ref) {<NEW_LINE>String fileName = ref.getScriptFileURL().getFile();<NEW_LINE>Optional<String> scriptType = ref.getScriptType();<NEW_LINE>assert scriptType.isPresent();<NEW_LINE>try (InputStreamReader reader = new InputStreamReader(new BufferedInputStream(ref.getScript... | addLibForScript(scriptIdentifier, dependency))); |
161,453 | private void searchContent(ProvisioningFeatureDefinition feature, ContentBasedLocalBundleRepository cbr, Set<String> enabledFeatureNames, Set<File> bundles, Map<File, Map<String, String>> apiJars, Map<File, Map<String, String>> spiJars) {<NEW_LINE>for (FeatureResource fr : feature.getConstituents(SubsystemContentType.F... | add(other.getFeatureName()); |
1,392,206 | public SampledDataSource sampleDataPoints(int timeWindowIndex, long timestamp, List<DataSourceBo> dataSourceBoList, DataSourceBo previousDataSourceBo) {<NEW_LINE>if (CollectionUtils.isEmpty(dataSourceBoList)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final List<Integer> activeConnectionSizes = new ArrayList<>(dataSou... | >(dataSourceBoList.size()); |
309,566 | public void marshall(Cluster cluster, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (cluster == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(cluster.getName(), NAME_BINDING);<NEW_LINE>protocolMarshaller.m... | e.getMessage(), e); |
752,040 | public static void main(final String[] args) throws IOException {<NEW_LINE>final ByteArrayOutputStream output = new ByteArrayOutputStream();<NEW_LINE>final CompactBinaryWriter writer = new CompactBinaryWriter(output, 1);<NEW_LINE>final Serializer<SchemaDef> serializer = new Serializer<>();<NEW_LINE>serializer.serialize... | default_value.string_value.equals("this is a string"); |
68,183 | public void visitOnEntry(ImmutableTransition<?, ?, ?, ?> visitable) {<NEW_LINE>ImmutableState<?, ?, ?, ?> sourceState = visitable.getSourceState();<NEW_LINE>ImmutableState<?, ?, ?, ?<MASK><NEW_LINE>String sourceStateId = getName(sourceState.getStateId());<NEW_LINE>String targetStateId = getName(targetState.getStateId()... | > targetState = visitable.getTargetState(); |
464,929 | public static void main(String[] args) throws Exception {<NEW_LINE>// get server configuration<NEW_LINE>String path = new File(new File(".").getAbsolutePath()).getCanonicalPath() + "/src/main/d2Config/d2Config.json";<NEW_LINE>JSONParser parser = new JSONParser();<NEW_LINE>Object object = parser.parse(new FileReader(pat... | String) json.get("zkConnectString"); |
1,051,899 | public UriUploaderResultCode uploadUris() {<NEW_LINE>try {<NEW_LINE>List<Uri> contentUris = new ArrayList<>();<NEW_LINE>List<String> <MASK><NEW_LINE>int schemeFileCounter = 0;<NEW_LINE>for (Parcelable sourceStream : mUrisToUpload) {<NEW_LINE>Uri sourceUri = (Uri) sourceStream;<NEW_LINE>if (sourceUri != null) {<NEW_LINE... | contentRemotePaths = new ArrayList<>(); |
596,297 | private void initView() {<NEW_LINE>mRemoteUserIdList = new ArrayList<>();<NEW_LINE>mRemoteVideoList = new ArrayList<>();<NEW_LINE>mEditRoomId = findViewById(R.id.et_room_id);<NEW_LINE>mEdituserId = findViewById(R.id.et_user_id);<NEW_LINE>mImageBack = findViewById(R.id.iv_back);<NEW_LINE>mTextTitle = findViewById(R.id.t... | findViewById(R.id.btn_reverb_low); |
949,087 | public List<QualifiedName> listNames(final ConnectorRequestContext requestContext, final QualifiedName name, @Nullable final QualifiedName prefix, @Nullable final Sort sort, @Nullable final Pageable pageable) {<NEW_LINE>try {<NEW_LINE>final List<QualifiedName> qualifiedNames = Lists.newArrayList();<NEW_LINE>final Strin... | ("Failed listName hive database %s", name), exception); |
368,241 | public static void createProjectExprs(Project projRel, RelNode joinChild, int adjustmentAmount, RexBuilder rexBuilder, List<RelDataTypeField> joinChildrenFields, List<Pair<RexNode, String>> projects) {<NEW_LINE>List<RelDataTypeField> childFields = joinChild.getRowType().getFieldList();<NEW_LINE>if (projRel != null) {<N... | field = childFields.get(i); |
390,363 | public void example74(Vertx vertx, Router router) {<NEW_LINE>// create an OAuth2 provider, clientID and clientSecret<NEW_LINE>// should be requested to github<NEW_LINE>OAuth2Auth gitHubAuthProvider = GithubAuth.create(vertx, "CLIENT_ID", "CLIENT_SECRET");<NEW_LINE>// create a oauth2 handler on our running server<NEW_LI... | ctx.fail(401))); |
1,401,970 | public static void main(String[] args) {<NEW_LINE>BufferedImage imageA, imageB;<NEW_LINE>imageA = UtilImageIO.loadImageNotNull(UtilIO.pathExample("stitch/mountain_rotate_01.jpg"));<NEW_LINE>imageB = UtilImageIO.loadImageNotNull(UtilIO.pathExample("stitch/mountain_rotate_03.jpg"));<NEW_LINE>stitch(imageA, imageB, GrayF3... | imageA, imageB, GrayF32.class); |
1,527,649 | private void showDeepLinkNotification(DiagnosticsNode property, String errorSummary) {<NEW_LINE>// TODO(helin24): We can register a notification group in plugin.xml for 2020.3<NEW_LINE>// (see https://plugins.jetbrains.com/docs/intellij/notifications.html?from=jetbrains.org#top-level-notifications)<NEW_LINE>final Notif... | NotificationGroup(DEEP_LINK_GROUP_ID, NotificationDisplayType.STICKY_BALLOON); |
728,329 | private void init() {<NEW_LINE>exceptionUnmarshallers.add(new InvalidFirehoseDestinationExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshallers.add(new InvalidS3ConfigurationExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshallers.add(new InvalidDeliveryOptionsExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshaller... | .add(new AccountSendingPausedExceptionUnmarshaller()); |
518,665 | public SourceAuth unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>SourceAuth sourceAuth = new SourceAuth();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MA... | JsonToken token = context.getCurrentToken(); |
1,709,021 | private UserDetails fetchUserDetails(User user, String emailId) throws PacManException {<NEW_LINE>UserDetails userDetails = new UserDetails();<NEW_LINE>try {<NEW_LINE>if (user == null) {<NEW_LINE>List<String> roles = Lists.newArrayList();<NEW_LINE>roles.add("ROLE_USER");<NEW_LINE>userDetails.setUserRoles(roles);<NEW_LI... | setEmail(user.getEmail()); |
431,089 | void percentiles() {<NEW_LINE>LongTaskTimer t = LongTaskTimer.builder("my.timer").publishPercentiles(0.5, 0.7, 0.91, 0.999, 1).register(registry);<NEW_LINE>// Using the example of percentile interpolation from https://statisticsbyjim.com/basics/percentiles/<NEW_LINE>List<Integer> samples = Arrays.asList(48, 42, 40, 35,... | SECONDS)).isEqualTo(16); |
1,711,065 | protected Component createFeedItemComponent(FeedItem item) {<NEW_LINE>JPanel panel = new JPanel(new GridBagLayout());<NEW_LINE>panel.setOpaque(false);<NEW_LINE>int row = 0;<NEW_LINE>if (item.dateTime != null) {<NEW_LINE>JLabel label = new JLabel();<NEW_LINE>label.setFont(RSS_DESCRIPTION_FONT);<NEW_LINE>label.setForegro... | setForeground(Utils.getRssDetailsColor()); |
1,069,532 | public static GetServiceProvidersPageResponse unmarshall(GetServiceProvidersPageResponse getServiceProvidersPageResponse, UnmarshallerContext _ctx) {<NEW_LINE>getServiceProvidersPageResponse.setCode(_ctx.integerValue("GetServiceProvidersPageResponse.Code"));<NEW_LINE>getServiceProvidersPageResponse.setMessage(_ctx.stri... | (_ctx.integerValue("GetServiceProvidersPageResponse.Data.Size")); |
330,796 | public Change createChange(IProgressMonitor pm) throws CoreException {<NEW_LINE>final Map<String, String> arguments = new HashMap<>();<NEW_LINE>String project = null;<NEW_LINE>IJavaProject javaProject = fField.getJavaProject();<NEW_LINE>if (javaProject != null) {<NEW_LINE>project = javaProject.getElementName();<NEW_LIN... | BasicElementLabels.getJavaElementName(fGetterName))); |
1,779,325 | private static IType resolveType(IType baseType, String refTypeName) throws JavaModelException {<NEW_LINE>if (refTypeName.length() == 0) {<NEW_LINE>return baseType;<NEW_LINE>}<NEW_LINE>String[][] resolvedNames = baseType.resolveType(refTypeName);<NEW_LINE>if (resolvedNames != null && resolvedNames.length > 0) {<NEW_LIN... | '.'), (IProgressMonitor) null); |
1,475,255 | public void run() {<NEW_LINE>// Find the actual scope that needs to be destroyed.<NEW_LINE>// This could be the incoming execution, or the first parent execution where isScope = true<NEW_LINE>// Find parent scope execution<NEW_LINE>ExecutionEntity scopeExecution = execution.isScope() ? execution : findFirstParentScopeE... | VariableInstanceEntityManager variableInstanceEntityManager = commandContext.getVariableInstanceEntityManager(); |
344,315 | public final void paint(Graphics g) {<NEW_LINE>Theme currentTheme = ThemeFactory.getCurrentTheme();<NEW_LINE>super.paint(g);<NEW_LINE>Graphics2D g2 = (Graphics2D) g;<NEW_LINE>if (translateForExport) {<NEW_LINE>g2.translate(Constants.EXPORT_DISPLACEMENT, Constants.EXPORT_DISPLACEMENT);<NEW_LINE>}<NEW_LINE>boolean select... | Theme.PredefinedColors.BLACK))); |
1,034,337 | private void checkInvalidLogins(Query post, Authorization authorization, JsonObjectWithDefault permissions) throws APIException {<NEW_LINE>// is already blocked?<NEW_LINE>long blockedUntil = permissions.getLong("blockedUntil", 0);<NEW_LINE>if (blockedUntil != 0) {<NEW_LINE>if (blockedUntil > Instant.now().getEpochSecon... | .getEpochSecond()) + " seconds"); |
1,454,762 | public static JTransaction from(TransactionPair<?> transaction) {<NEW_LINE>JTransaction jtx = new JTransaction();<NEW_LINE>TransactionOwner<?> owner = transaction.getOwner();<NEW_LINE>if (owner instanceof Account)<NEW_LINE>fillFromAccountTransaction((TransactionPair<AccountTransaction>) transaction, jtx);<NEW_LINE>else... | getDateTime().toLocalDate()); |
117,648 | public void handleApplicationCommandRequest(SerialMessage serialMessage, int offset, int endpoint) {<NEW_LINE>logger.debug("NODE {}: Received CLOCK command V{}", getNode().getNodeId(), getVersion());<NEW_LINE>int command = serialMessage.getMessagePayloadByte(offset);<NEW_LINE>switch(command) {<NEW_LINE>case CLOCK_REPOR... | getController().notifyEventListeners(zEvent); |
213,485 | public void marshall(LightsailDistribution lightsailDistribution, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (lightsailDistribution == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(lightsailDistribution... | lightsailDistribution.getBundleId(), BUNDLEID_BINDING); |
1,662 | public void addInputText(String name, String id) {<NEW_LINE>if (id == null || id.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ArrayList<String> nameList = new ArrayList<String>() {<NEW_LINE><NEW_LINE>{<NEW_LINE>add(name);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>ArrayList<String> idList = new ArrayList<String>() {<NEW_LINE... | TIMMentionEditText.TIM_MENTION_TAG + displayInputString, id); |
1,095,646 | public Object evaluateEnumMethod(EventBean[] eventsLambda, Collection enumcoll, boolean isNewData, ExprEvaluatorContext context) {<NEW_LINE>if (enumcoll.isEmpty()) {<NEW_LINE>return enumcoll;<NEW_LINE>}<NEW_LINE>Collection<EventBean> beans <MASK><NEW_LINE>ObjectArrayEventBean indexEvent = new ObjectArrayEventBean(new O... | = (Collection<EventBean>) enumcoll; |
744,813 | private void addNamedNativeQueryMetadata(Class clazz) {<NEW_LINE>ApplicationMetadata appMetadata = kunderaMetadata.getApplicationMetadata();<NEW_LINE>String name, query = null;<NEW_LINE>if (clazz.isAnnotationPresent(NamedQuery.class)) {<NEW_LINE>NamedQuery ann = (NamedQuery) clazz.getAnnotation(NamedQuery.class);<NEW_L... | ] anns = ann.value(); |
817,574 | public BVarSymbol defineVarSymbol(Location pos, Set<Flag> flagSet, BType varType, Name varName, Name origName, SymbolEnv env, boolean isInternal) {<NEW_LINE>// Create variable symbol<NEW_LINE>Scope enclScope = env.scope;<NEW_LINE>BVarSymbol varSymbol = createVarSymbol(flagSet, varType, varName, env, pos, isInternal);<N... | define(varSymbol.name, varSymbol); |
1,522,697 | protected void onCreate(@Nullable Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.contact_friend_profile_activity);<NEW_LINE>FriendProfileLayout layout = <MASK><NEW_LINE>presenter = new FriendProfilePresenter();<NEW_LINE>layout.setPresenter(presenter);<NEW_LINE... | findViewById(R.id.friend_profile); |
892,468 | private InterpreterContext buildModuleOrClassBody(Node bodyNode, int startLine, int endLine) {<NEW_LINE>addInstr(new TraceInstr(RubyEvent.CLASS, null, getFileName(), startLine + 1));<NEW_LINE>// recv_self, add frame block, etc)<NEW_LINE>prepareImplicitState();<NEW_LINE>// %current_module<NEW_LINE>addCurrentModule();<NE... | addInstr(new ReturnInstr(bodyReturnValue)); |
1,159,539 | public void marshall(TranscriptionJob transcriptionJob, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (transcriptionJob == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.m... | transcriptionJob.getTranscriptionJobName(), TRANSCRIPTIONJOBNAME_BINDING); |
1,626,494 | private boolean isWebService(TypeElement typeElement, CompilationController controller, Set<String> result) {<NEW_LINE>boolean isWebService = false;<NEW_LINE>List<? extends AnnotationMirror> allAnnotationMirrors = controller.getElements().getAllAnnotationMirrors(typeElement);<NEW_LINE>for (AnnotationMirror annotationMi... | .getAnnotationType().asElement(); |
1,374,125 | public void run() throws Exception {<NEW_LINE>File ubiFile = askFile("Select Universal Binary File", "C'mon, Do it! Push da bahtahn!");<NEW_LINE>File outputDirectory = askDirectory("Select Output Directory", "GO");<NEW_LINE>ByteProvider provider = new RandomAccessByteProvider(ubiFile);<NEW_LINE>FatHeader header = new F... | , offset + size - i)); |
1,503,986 | public void addNewConsumerForExpression(String topicExpression, MonitoredConsumer mc, boolean selector, boolean isWildcarded) {<NEW_LINE>if (tc.isEntryEnabled())<NEW_LINE>SibTr.entry(tc, "addNewConsumerForExpression", new Object[] { topicExpression, mc, new Boolean(selector), new Boolean(isWildcarded) });<NEW_LINE>Arra... | SibTr.exit(tc, "addNewConsumerForExpression"); |
1,115,995 | public void marshall(Cluster cluster, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (cluster == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(cluster.getBackupPolicy(), BACKUPPOLICY_BINDING);<NEW_LINE>prot... | cluster.getHsms(), HSMS_BINDING); |
1,358,211 | public void validate() {<NEW_LINE>if (phredGpValues != DEFAULT_PHRED_GP_VALUES) {<NEW_LINE>for (final double d : phredGpValues.toDoubleArray()) {<NEW_LINE>if (!Double.isFinite(d) || d < 0) {<NEW_LINE>throw new CommandLineException.BadArgumentValue(GP_VALUES_ARGUMENT_FULL_NAME, "Not a valid Phred value: " + d);<NEW_LINE... | BadArgumentValue(MIN_LOCI_COUNT_FULL_NAME, "must be greater than 0 but found " + minLociCount); |
975,443 | public PlanNode visitAggregation(AggregationNode node, RewriteContext<LimitContext> context) {<NEW_LINE>LimitContext limit = context.get();<NEW_LINE>if (limit != null && node.getAggregations().isEmpty() && node.getOutputVariables().size() == node.getGroupingKeys().size() && node.getOutputVariables().containsAll(node.ge... | ), limit.getStep()); |
713,534 | private static void writeMetricLists(PrintWriter out) {<NEW_LINE>ArrayList<String> metricList <MASK><NEW_LINE>Iterator<String> it = xmlFileList.iterator();<NEW_LINE>while (it.hasNext()) {<NEW_LINE>String fileName = it.next();<NEW_LINE>try {<NEW_LINE>DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newI... | = new ArrayList<String>(); |
1,613,645 | protected synchronized void paintDeterminate(Graphics g, JComponent c) {<NEW_LINE>Insets b = progressBar.getInsets();<NEW_LINE>int w = progressBar.getWidth() - (b.right + b.left);<NEW_LINE>int h = progressBar.getHeight() - (b.top + b.bottom);<NEW_LINE>if (w < 1 || h < 1) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int max =... | replace("{}", "" + total); |
958,785 | /* GRECLIPSE edit<NEW_LINE>private boolean checkIfLastStatementIsReturnOrThrow(Statement code) {<NEW_LINE>if (code instanceof BlockStatement) {<NEW_LINE>BlockStatement blockStatement = (BlockStatement) code;<NEW_LINE>List<Statement> statementList = blockStatement.getStatements();<NEW_LINE>int statementCnt = statementLi... | av.visit(null, t); |
511,526 | public void onResourceReady(@NonNull Bitmap imageBitmap, @Nullable Transition<? super Bitmap> transition) {<NEW_LINE>try {<NEW_LINE>String title = file.getName() + "." + (page + 1) + ".jpg";<NEW_LINE>File oFile = new File(CacheZipUtils.ATTACHMENTS_CACHE_DIR, title);<NEW_LINE>oFile.getParentFile().mkdirs();<NEW_LINE>Str... | shareIntent.setAction(Intent.ACTION_SEND); |
1,073,446 | public ImageDataOp build(ImageData<BufferedImage> imageData, PixelCalibration resolution) {<NEW_LINE>if (selectedFeatures == null || selectedSigmas == null)<NEW_LINE>throw new IllegalArgumentException("Features and scales must be selected!");<NEW_LINE>// Extract features, removing any that are incompatible<NEW_LINE>Mul... | Normalize.localNormalization(localNormalizeSigma, 0); |
1,109,539 | public ChangesetErrorInfo unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ChangesetErrorInfo changesetErrorInfo = new ChangesetErrorInfo();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken t... | int originalDepth = context.getCurrentDepth(); |
302,256 | public void onError(java.lang.Exception e) {<NEW_LINE>byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;<NEW_LINE>org.apache.thrift.TSerializable msg;<NEW_LINE>getList_result result = new getList_result();<NEW_LINE>if (e instanceof InvalidOperationException) {<NEW_LINE><MASK><NEW_LINE>result.setEIsSet(true);... | result.e = (InvalidOperationException) e; |
286,812 | final CreateAccountCustomizationResult executeCreateAccountCustomization(CreateAccountCustomizationRequest createAccountCustomizationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createAccountCustomizationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRe... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
1,456,275 | private static void drawPeerLoadPicture(final int width, final int height, final CircleThreadPiece[] pieces, final CircleThreadPiece fillRest) {<NEW_LINE>// prepare image<NEW_LINE>peerloadPicture = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);<NEW_LINE>final Graphics2D g = peerloadPicture.createGraphics... | [i].getAngle()); |
311,768 | public static Query<Integer> countNewPlayersTurnedRegular(long after, long before, ServerUUID serverUUID, Long threshold) {<NEW_LINE>String selectActivityIndex = selectActivityIndexSQL();<NEW_LINE>String selectActivePlayerCount = SELECT + "COUNT(1) as count" + FROM + '(' + selectActivityIndex + ") q2" + INNER_JOIN + Us... | 1, threshold, serverUUID, before); |
977,044 | public ApiResponse<ExtendedUser> usersPostInviteWithHttpInfo(InviteUserRequest inviteUserRequest) throws ApiException {<NEW_LINE>Object localVarPostBody = inviteUserRequest;<NEW_LINE>// verify the required parameter 'inviteUserRequest' is set<NEW_LINE>if (inviteUserRequest == null) {<NEW_LINE>throw new ApiException(400... | HashMap<String, Object>(); |
1,833,238 | // -------------------------------------------------------------------------<NEW_LINE>private static List<WebFragment> sortFragmentsAbsolutely(WebApp webXml, List<WebFragment> list) {<NEW_LINE>assert webXml != null;<NEW_LINE>AbsoluteOrdering[] order = null;<NEW_LINE>try {<NEW_LINE>order = webXml.getAbsoluteOrdering();<... | Level.SEVERE, "sortFragmentsAbsolutely failed", e); |
175,629 | // readability of this method would decrease signigicantly if splitted across submethods<NEW_LINE>@SuppressWarnings("PMD.NPathComplexity")<NEW_LINE>private String constructSqlInternal(final String columnString, final boolean includeOrderBy, final boolean includeLimit) {<NEW_LINE>final StringBuilder sb = new StringBuild... | (" LIMIT ").append(limit); |
710,291 | private void createAnchoringSubmenu(JMenu menu) {<NEW_LINE>Node[] nodes = getActivatedNodes();<NEW_LINE>List components = FormUtils.getSelectedLayoutComponents(nodes);<NEW_LINE>if ((components == null) || (components.size() < 1)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!(menu.getMenuComponentCount() > 0)) {<NEW_LINE... | SetAnchoringAction.class.getName()); |
1,681,111 | private void processFilesPerRequest(List<String> fPR) {<NEW_LINE>if (fPR.isEmpty())<NEW_LINE>return;<NEW_LINE>try {<NEW_LINE>File tmpFile = File.createTempFile(tmpPrefix, tmpSuffix, tmpDir);<NEW_LINE>tmpFile.deleteOnExit();<NEW_LINE>StowChunk stowChunk = new StowChunk(tmpFile);<NEW_LINE>try (FileOutputStream out = new ... | info("Failed to scan {} in tmp file\n", fPR, e); |
371,574 | public void reload() {<NEW_LINE>try {<NEW_LINE>StringBuffer stringBufferTitle = new StringBuffer();<NEW_LINE>if (contact != null) {<NEW_LINE>Contact updatedInfoContact = appContactService.<MASK><NEW_LINE>contact.setImageURL(updatedInfoContact.getImageURL());<NEW_LINE>contact.setLocalImageUrl(updatedInfoContact.getLocal... | getContactById(contact.getContactIds()); |
742,583 | void sendMetric(String service, String serviceInstance, long minuteTimeBucket, CLRMetric metrics) {<NEW_LINE>final String serviceId = IDManager.ServiceID.buildId(service, true);<NEW_LINE>final String serviceInstanceId = IDManager.ServiceInstanceID.buildId(serviceId, serviceInstance);<NEW_LINE>CPU cpu = metrics.getCpu()... | setHeapMemory(gc.getHeapMemory()); |
199,469 | public void runOnce() {<NEW_LINE>log.finest("Polling for next package");<NEW_LINE>final PrintPackage printPackage = connection.getNextPrintPackage();<NEW_LINE>if (printPackage == null) {<NEW_LINE>log.finest("No print package found. Returning");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>InputStream in = null;<NEW_LINE>try {<... | printingEngine.print(printPackage, in); |
975,957 | public synchronized void insertUpdate(DocumentEvent e) {<NEW_LINE>try {<NEW_LINE>int offset = Utilities.getRowStart(doc, e.getOffset());<NEW_LINE>Set<Position> modifiedLines <MASK><NEW_LINE>int index = findPositionGE(offset);<NEW_LINE>if (index == knownPositions.size())<NEW_LINE>return;<NEW_LINE>Position line = knownPo... | = new HashSet<Position>(); |
1,601,077 | public void mouseReleased(MouseEvent e) {<NEW_LINE>editorLabel.setBorder(etchedBorder);<NEW_LINE>if (parentContainer.isEnabled()) {<NEW_LINE>if (dialog == null) {<NEW_LINE>if (parentContainer.isCanEditExp()) {<NEW_LINE>colorExpField = new JTextField();<NEW_LINE>}<NEW_LINE>final ActionListener okListener = new ActionLis... | .getGBC(1, 1)); |
638,443 | private JComponent createColorButtonsPanel(final FileColorConfiguration configuration) {<NEW_LINE>final JPanel result = new JPanel(new BorderLayout());<NEW_LINE>result.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));<NEW_LINE>final JPanel inner = new JPanel();<NEW_LINE>inner.setLayout(new BoxLayout(inner, BoxLay... | (Box.createHorizontalStrut(5)); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.