Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
273,800 | List<EventLogFile> () { return myFiles; } | getFilesToSend |
273,801 | String () { return myTemplateUrl; } | getTemplateUrl |
273,802 | String () { return myProductCode; } | getProductCode |
273,803 | String () { return myProductVersion; } | getProductVersion |
273,804 | int () { return myBaselineVersion; } | getBaselineVersion |
273,805 | EventLogConnectionSettings () { return myConnectionSettings; } | getConnectionSettings |
273,806 | boolean () { return myIsInternal; } | isInternal |
273,807 | boolean () { return myIsTestConfig; } | isTestConfig |
273,808 | boolean () { return myIsTestSendEndpoint; } | isTestSendEndpoint |
273,809 | boolean () { return myIsEAP; } | isEAP |
273,810 | DataCollectorDebugLogger () { return myLogger; } | getLogger |
273,811 | DataCollectorSystemEventLogger () { return myEventLogger; } | getEventLogger |
273,812 | String (@NotNull String recorderId, @NotNull String productCode, @NotNull String templateUrl, boolean isTestConfig) { if (isTestConfig) { return String.format(templateUrl, "test/" + recorderId, productCode); } return String.format(templateUrl, recorderId, productCode); } | getConfigUrl |
273,813 | String () { return getEndpointValue(SEND); } | getServiceUrl |
273,814 | String () { return getEndpointValue(DICTIONARY); } | getDictionaryServiceUrl |
273,815 | boolean () { return getExternalSettings() != null; } | isSettingsReachable |
273,816 | boolean () { final EventLogExternalSendSettings settings = getExternalSettings(); return settings != null && settings.isSendEnabled(); } | isSendEnabled |
273,817 | LogEventFilter () { return new LogEventMetadataFilter(notNull(loadApprovedGroupsRules(), EventGroupsFilterRules.empty())); } | getBaseEventFilter |
273,818 | LogEventFilter (@NotNull LogEventFilter base, @NotNull EventLogBuildType type) { final EventLogSendConfiguration configuration = getConfiguration(type); if (configuration == null) { DataCollectorDebugLogger logger = myApplicationInfo.getLogger(); if (logger.isTraceEnabled()) { logger.trace("Cannot find send configurati... | getEventFilter |
273,819 | EventGroupsFilterRules<EventLogBuild> (@Nullable EventGroupsFilterRules<EventLogBuild> groupFilterConditions, @NotNull EventGroupsFilterRules<EventLogBuild> defaultValue) { return groupFilterConditions != null ? groupFilterConditions : defaultValue; } | notNull |
273,820 | EventLogApplicationInfo () { return myApplicationInfo; } | getApplicationInfo |
273,821 | EventGroupsFilterRules<EventLogBuild> () { final String productUrl = getMetadataProductUrl(); if (productUrl == null) return null; EventLogConnectionSettings settings = myApplicationInfo.getConnectionSettings(); return EventLogMetadataUtils.loadAndParseGroupsFilterRules(productUrl, settings); } | loadApprovedGroupsRules |
273,822 | String () { String baseMetadataUrl = getEndpointValue(METADATA); if (baseMetadataUrl == null) return null; return baseMetadataUrl + myApplicationInfo.getBaselineVersion() + "/" + myApplicationInfo.getProductCode() + ".json"; } | getMetadataProductUrl |
273,823 | StatisticsResult () { return send(myConfiguration, mySettingsService, new EventLogCounterResultDecorator(mySendListener)); } | send |
273,824 | StatisticsResult (@NotNull EventLogResultDecorator decorator) { return send(myConfiguration, mySettingsService, decorator); } | send |
273,825 | StatisticsResult (@NotNull EventLogSendConfig config, @NotNull EventLogSettingsService settings, @NotNull EventLogResultDecorator decorator) { final EventLogApplicationInfo info = settings.getApplicationInfo(); final DataCollectorDebugLogger logger = info.getLogger(); final List<EventLogFile> logs = getLogFiles(config,... | send |
273,826 | MachineId (@NotNull MachineId machineId, @NotNull EventLogSettingsService settings) { if (machineId == MachineId.DISABLED) { return MachineId.DISABLED; } Map<String, String> options = settings.getOptions(); String machineIdSaltOption = options.get(EventLogOptions.MACHINE_ID_SALT); if (EventLogOptions.MACHINE_ID_DISABLE... | getActualOrDisabledMachineId |
273,827 | EventLogBuildType (boolean isEap) { return isEap ? EventLogBuildType.EAP : EventLogBuildType.RELEASE; } | getDefaultBuildType |
273,828 | ValidationErrorInfo (@Nullable LogEventRecordRequest request, @NotNull File file) { if (request == null) { return new ValidationErrorInfo("File is empty or has invalid format: " + file.getName(), 1); } if (isEmpty(request.getDevice())) { return new ValidationErrorInfo("Cannot upload event log, device ID is empty", 2); ... | validate |
273,829 | List<EventLogFile> (@NotNull EventLogSendConfig config, @NotNull DataCollectorDebugLogger logger) { try { return config.getFilesToSendProvider().getFilesToSend(); } catch (Exception e) { final String message = e.getMessage(); logger.info(message != null ? message : "", e); } return Collections.emptyList(); } | getLogFiles |
273,830 | void (@NotNull List<EventLogFile> toRemove, @NotNull DataCollectorDebugLogger logger) { List<File> filesToRemove = new ArrayList<>(); for (EventLogFile file : toRemove) { filesToRemove.add(file.getFile()); } cleanupFiles(filesToRemove, logger); } | cleanupEventLogFiles |
273,831 | void (@NotNull List<? extends File> toRemove, @NotNull DataCollectorDebugLogger logger) { for (File file : toRemove) { if (!file.delete()) { logger.warn("Failed deleting event log: " + file.getName()); } if (logger.isTraceEnabled()) { logger.trace("Removed sent log: " + file.getName()); } } } | cleanupFiles |
273,832 | int () { return myCode; } | getCode |
273,833 | String () { return myError; } | getMessage |
273,834 | void (int localFiles) { myLocalFiles = localFiles; } | onLogsLoaded |
273,835 | void (@NotNull LogEventRecordRequest request, @NotNull String content, @NotNull String logPath) { mySuccessfullySentFiles.add(logPath); } | onSucceed |
273,836 | void (@Nullable LogEventRecordRequest request, int error, @Nullable String content) { myErrors.add(error); } | onFailed |
273,837 | StatisticsResult () { if (myListener != null) { myListener.onLogsSend(mySuccessfullySentFiles, myErrors, myLocalFiles); } int succeed = mySuccessfullySentFiles.size(); int failed = myErrors.size(); int total = succeed + failed; if (total == 0) { return new StatisticsResult(ResultCode.NOTHING_TO_SEND, "No files to uploa... | onFinished |
273,838 | String () { return description; } | getDescription |
273,839 | ResultCode () { return code; } | getCode |
273,840 | EventLogSendConfiguration (@NotNull EventLogBuildType type) { EventLogExternalSendSettings settings = getExternalSettings(); return settings != null ? settings.getConfiguration(type) : null; } | getConfiguration |
273,841 | String (@NotNull String attribute) { EventLogExternalSendSettings settings = getExternalSettings(); return settings != null ? settings.getEndpoint(attribute) : null; } | getEndpointValue |
273,842 | EventLogExternalSendSettings (@NotNull String recorderId, @NotNull String configUrl, @NotNull String appVersion) { try { return StatsHttpRequests.request(configUrl, myApplicationInfo.getConnectionSettings()).send(r -> { try { InputStream content = r.read(); if (content != null) { InputStreamReader reader = new InputStr... | loadSettings |
273,843 | void (@NotNull String recorderId, Exception e) { final String message = String.format(Locale.ENGLISH, "%s: %s", e.getClass().getName(), Objects.requireNonNullElse(e.getMessage(), "No message provided")); if (e instanceof ConnectException || e instanceof HttpTimeoutException || e instanceof SSLHandshakeException || e in... | logError |
273,844 | String () { return getMessage(); } | getErrorType |
273,845 | int () { return myErrorCode; } | getErrorCode |
273,846 | EventLogMetadataUpdateStage () { return EventLogMetadataUpdateStage.LOADING; } | getUpdateStage |
273,847 | EventGroupsFilterRules<EventLogBuild> (@NotNull String serviceUrl, @NotNull EventLogConnectionSettings settings) { try { String content = loadMetadataFromServer(serviceUrl, settings); EventGroupRemoteDescriptors groups = parseGroupRemoteDescriptors(content); return EventGroupsFilterRules.create(groups, EventLogBuild.EV... | loadAndParseGroupsFilterRules |
273,848 | long (@Nullable String serviceUrl, @NotNull EventLogConnectionSettings settings) { if (isEmptyOrSpaces(serviceUrl)) return 0; try { StatsRequestResult<Long> result = StatsHttpRequests.head(serviceUrl, settings).send(r -> r.lastModified()); return result.getResult() != null ? result.getResult() : 0L; } catch (StatsRespo... | lastModifiedMetadata |
273,849 | T () { return myResult; } | getResult |
273,850 | int () { return myErrorCode; } | getError |
273,851 | boolean () { return myResult != null; } | isSucceed |
273,852 | StatsRequestBuilder (@NotNull String url, @NotNull EventLogConnectionSettings settings) { return new StatsRequestBuilder("GET", url, settings); } | request |
273,853 | StatsRequestBuilder (@NotNull String url, @NotNull EventLogConnectionSettings settings) { return new StatsRequestBuilder("HEAD", url, settings); } | head |
273,854 | StatsRequestBuilder (@NotNull String url, @NotNull EventLogConnectionSettings settings) { return new StatsRequestBuilder("POST", url, settings); } | post |
273,855 | boolean () { return myProxy == Proxy.NO_PROXY; } | isNoProxy |
273,856 | Proxy () { return myProxy; } | getProxy |
273,857 | StatsProxyAuthProvider () { return myProxyAuth; } | getProxyAuth |
273,858 | int () { return myCode; } | getStatusCode |
273,859 | Long () { return myHttpResponse == null ? null : myHttpResponse.headers(). allValues("Last-Modified").stream(). map(value -> parseDate(value)).filter(date -> date != null).map(date -> date.getTime()). max(Long::compareTo).orElse(null); } | lastModified |
273,860 | StatsRequestBuilder (@NotNull String body, @NotNull String contentType, @NotNull Charset charset) { if (StatisticsStringUtil.isEmptyOrSpaces(body)) { throw new EmptyHttpRequestBody(); } myContent = body; myContentType = contentType; myCharset = charset; return this; } | withBody |
273,861 | StatsRequestBuilder (@NotNull StatsResponseHandler processor) { onFail = processor; return this; } | fail |
273,862 | StatsRequestBuilder (@NotNull StatsResponseHandler processor) { onSucceed = processor; return this; } | succeed |
273,863 | HttpClient () { HttpClient.Builder builder = HttpClient.newBuilder(); builder.followRedirects(HttpClient.Redirect.NORMAL); if (myProxyInfo != null && !myProxyInfo.isNoProxy()) { configureProxy(builder, myProxyInfo); } if (mySSLContext != null) { builder.sslContext(mySSLContext); } return builder.build(); } | newClient |
273,864 | void (HttpClient.Builder builder, @NotNull StatsProxyInfo info) { Proxy proxy = info.getProxy(); if (proxy.type() == Proxy.Type.HTTP || proxy.type() == Proxy.Type.SOCKS) { SocketAddress proxyAddress = proxy.address(); if (proxyAddress instanceof InetSocketAddress address) { String hostName = address.getHostString(); in... | configureProxy |
273,865 | PasswordAuthentication () { return new PasswordAuthentication(login, Objects.requireNonNullElse(auth.getProxyPassword(), "").toCharArray()); } | getPasswordAuthentication |
273,866 | HttpRequest () { HttpRequest.Builder builder = HttpRequest.newBuilder(). setHeader("User-Agent", myUserAgent). timeout(Duration.ofSeconds(10)). uri(URI.create(myUrl)); if ("HEAD".equals(myMethod)) { builder.method(myMethod, HttpRequest.BodyPublishers.noBody()); } else if ("POST".equals(myMethod)) { if (myContent == nul... | newRequest |
273,867 | byte[] () { try (ByteArrayOutputStream gZippedBody = new ByteArrayOutputStream()) { GZIPOutputStream gZipper = new GZIPOutputStream(gZippedBody); gZipper.write(myContent.getBytes(myCharset)); gZippedBody.flush(); gZipper.close(); return gZippedBody.toByteArray(); } catch (IOException e) { throw new HttpRequestBodyGzipE... | getCompressedContent |
273,868 | int () { return myCode; } | getCode |
273,869 | Icon (@NotNull String path, int cacheKey, int flags) { return IconManager.getInstance().loadRasterizedIcon(path, PlatformStatisticsDevkitIcons.class.getClassLoader(), cacheKey, flags); } | load |
273,870 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
273,871 | void (@NotNull AnActionEvent e) { e.getPresentation().setEnabledAndVisible(e.getProject() != null); } | update |
273,872 | void (@NotNull AnActionEvent e) { final Project project = e.getProject(); if (project == null) { return; } final EventLogFile logFile = StatisticsEventLogProviderUtil.getEventLogProvider(myRecorderId).getActiveLogFile(); final VirtualFile logVFile = logFile != null ? LocalFileSystem.getInstance().refreshAndFindFileByIo... | actionPerformed |
273,873 | void (@NotNull Project project, @NotNull String message) { String title = StatisticsBundle.message("stats.feature.usage.statistics"); new Notification(STATISTICS_NOTIFICATION_GROUP_ID, title, message, NotificationType.WARNING) .addAction(NotificationAction.createSimple( StatisticsBundle.message("stats.enable.data.shari... | showNotification |
273,874 | void (@NotNull AnActionEvent e) { final Project project = e.getProject(); if (project != null) { final PsiFile fileType = e.getData(CommonDataKeys.PSI_FILE); final Editor editor = fileType != null && StringUtil.equalsIgnoreCase(fileType.getFileType().getName(), "json") ? e.getData(CommonDataKeys.EDITOR) : null; new Tes... | actionPerformed |
273,875 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
273,876 | void (@NotNull AnActionEvent e) { boolean enabled = isEnabled(e.getProject()); e.getPresentation().setEnabledAndVisible(enabled); } | update |
273,877 | boolean (@Nullable Project project) { return project != null && ApplicationManager.getApplication().isInternal(); } | isEnabled |
273,878 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
273,879 | void (@NotNull AnActionEvent e) { String recorderId = StringUtil.trim(Registry.stringValue("usage.statistics.test.action.recorder.id")); e.getPresentation().setEnabledAndVisible(e.getProject() != null && StatisticsRecorderUtil.isTestModeEnabled(recorderId)); } | update |
273,880 | void (@NotNull AnActionEvent e) { final Project project = e.getProject(); if (project == null) { return; } ProgressManager.getInstance().run(new Task.Backgroundable(project, StatisticsBundle.message("stats.send.feature.usage.event.log"), false) { @Override public void run(@NotNull ProgressIndicator indicator) { final S... | actionPerformed |
273,881 | void (@NotNull ProgressIndicator indicator) { final StatisticsResult result = send(); final StatisticsResult.ResultCode code = result.getCode(); if (code == StatisticsResult.ResultCode.SENT_WITH_ERRORS || code == StatisticsResult.ResultCode.SEND) { final boolean succeed = tryToOpenInScratch(project, result.getDescripti... | run |
273,882 | StatisticsResult () { String recorderId = StringUtil.trim(Registry.stringValue("usage.statistics.test.action.recorder.id")); return EventLogStatisticsService.send( EventLogInternalSendConfig.createByRecorder(recorderId, true), new EventLogTestSettingsService(recorderId), new EventLogTestResultDecorator() ); } | send |
273,883 | LogEventFilter (@NotNull LogEventFilter base, @NotNull EventLogBuildType type) { LogEventFilter filter = super.getEventFilter(base, type); if (filter instanceof LogEventCompositeFilter) { LogEventFilter[] withoutSnapshot = Arrays.stream(((LogEventCompositeFilter)filter).getFilters()) .filter(f -> f != LogEventSnapshotB... | getEventFilter |
273,884 | boolean () { return true; } | isInternal |
273,885 | void (@NotNull LogEventRecordRequest request, @NotNull String content, @NotNull String logPath) { mySucceed.add(request); } | onSucceed |
273,886 | void (@Nullable LogEventRecordRequest request, int error, @Nullable String content) { if (request != null) { myFailed.add(request); } else { myFailed.add(new LogEventRecordRequest("INVALID", "INVALID", "INVALID", ContainerUtil.emptyList(), true)); } } | onFailed |
273,887 | StatisticsResult () { int total = mySucceed.size() + myFailed.size(); if (mySucceed.isEmpty() && myFailed.isEmpty()) { return new StatisticsResult(StatisticsResult.ResultCode.NOTHING_TO_SEND, "No files to upload."); } else if (!myFailed.isEmpty()) { final StringBuilder out = new StringBuilder("{\"total\":"); out.append... | onFinished |
273,888 | void (@NotNull StringBuilder out, @NotNull List<LogEventRecordRequest> requests) { boolean isFirst = true; for (LogEventRecordRequest request : requests) { if (isFirst) { isFirst = false; } else { out.append(","); } out.append(LogEventSerializer.INSTANCE.toString(request)); } } | append |
273,889 | boolean (@NotNull Project project, @NotNull String request) { final String fileName = "fus-event-log.json"; try { final ThrowableComputable<NavigatablePsiElement, Exception> computable = () -> { final ScratchFileService fileService = ScratchFileService.getInstance(); final VirtualFile file = fileService.findFile(RootTy... | tryToOpenInScratch |
273,890 | EditorEx (@Nullable Editor selectedEditor, @NotNull String fileName, @NotNull String templateText) { if (selectedEditor != null) { return (EditorEx)EditorFactory.getInstance().createEditor(selectedEditor.getDocument(), myProject); } final PsiFile file = createTempFile(myProject, fileName, templateText); assert file != ... | initEditor |
273,891 | PsiFile (@NotNull Project project, @NotNull String filename, @NotNull String request) { final String fileName = PathUtil.makeFileName(filename, "json"); try { final ThrowableComputable<PsiFile, Exception> computable = () -> { final ScratchFileService fileService = ScratchFileService.getInstance(); final VirtualFile fil... | createTempFile |
273,892 | void () { configEditorPanel(myProject, myEventsSchemePanel, myEventsSchemeEditor); configEditorPanel(myProject, myResultPanel, myResultEditor); myInputDataSplitPane.setDividerLocation(IN_DIVIDER_LOCATION); myInputOutputSplitPane.setDividerLocation(IN_OUT_DIVIDER_LOCATION); super.init(); } | init |
273,893 | void (@NotNull Project project, @NotNull JPanel panel, @NotNull EditorEx editor) { panel.setLayout(new BorderLayout()); panel.add(editor.getComponent(), BorderLayout.CENTER); editor.getSettings().setFoldingOutlineShown(false); final FileType fileType = FileTypeManager.getInstance().findFileTypeByName("JSON"); final Lig... | configEditorPanel |
273,894 | String () { return TestParseEventsSchemeDialog.class.getCanonicalName(); } | getDimensionServiceKey |
273,895 | void () { myEventsSchemeEditor.getSelectionModel().removeSelection(); myResultEditor.getSelectionModel().removeSelection(); updateResultRequest("{}"); try { EventGroupRemoteDescriptors groups = EventLogMetadataUtils.parseGroupRemoteDescriptors(myEventsSchemeEditor.getDocument().getText()); EventGroupsFilterRules<EventL... | doOKAction |
273,896 | void (@NotNull String text) { writeCommandAction(myProject).run(() -> { final DocumentEx document = myResultEditor.getDocument(); document.setText(text); PsiDocumentManager.getInstance(myProject).commitDocument(myResultEditor.getDocument()); }); } | updateResultRequest |
273,897 | JComponent () { return myMainPanel; } | createCenterPanel |
273,898 | JComponent () { return myEventLogPanel; } | getPreferredFocusedComponent |
273,899 | void () { writeCommandAction(myProject).run(() -> { for (PsiFile file : myTempFiles) { try { file.delete(); } catch (IncorrectOperationException e) { LOG.warn(e); } } }); if (!myEventsSchemeEditor.isDisposed()) { EditorFactory.getInstance().releaseEditor(myEventsSchemeEditor); } if (!myResultEditor.isDisposed()) { Edit... | dispose |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.