Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
13,600 | String (String prefix, String suffix, CapitalizationStrategy capitalizationStrategy) { if (suffix.isEmpty()) { return prefix; } if (prefix.isEmpty()) { return suffix; } return buildName(prefix, suffix, capitalizationStrategy); } | buildAccessorName |
13,601 | String (String prefix, String suffix, CapitalizationStrategy capitalizationStrategy) { CapitalizationStrategy strategy = null == capitalizationStrategy ? CapitalizationStrategy.defaultValue() : capitalizationStrategy; return prefix + strategy.capitalize(suffix); } | buildName |
13,602 | String (String fieldName) { if (fieldName == null || fieldName.isEmpty()) { return ""; } StringBuilder b = new StringBuilder(); b.append(Character.toUpperCase(fieldName.charAt(0))); for (int i = 1; i < fieldName.length(); i++) { char c = fieldName.charAt(i); if (Character.isUpperCase(c)) { b.append('_'); } b.append(Character.toUpperCase(c)); } return b.toString(); } | camelCaseToConstant |
13,603 | LombokLightMethodBuilder (@NotNull PsiClass psiClass, @NotNull LombokLightMethodBuilder methodBuilder) { final LombokNullAnnotationLibrary annotationLibrary = ConfigDiscovery.getInstance().getAddNullAnnotationLombokConfigProperty(psiClass); return createRelevantNonNullAnnotation(annotationLibrary, methodBuilder); } | createRelevantNonNullAnnotation |
13,604 | LombokLightMethodBuilder (@NotNull LombokNullAnnotationLibrary annotationLibrary, @NotNull LombokLightMethodBuilder methodBuilder) { if (StringUtil.isNotEmpty(annotationLibrary.getNonNullAnnotation())) { methodBuilder.withAnnotation(annotationLibrary.getNonNullAnnotation()); } return methodBuilder; } | createRelevantNonNullAnnotation |
13,605 | LombokLightFieldBuilder (@NotNull PsiClass psiClass, @NotNull LombokLightFieldBuilder fieldBuilder) { final LombokNullAnnotationLibrary annotationLibrary = ConfigDiscovery.getInstance().getAddNullAnnotationLombokConfigProperty(psiClass); if (StringUtil.isNotEmpty(annotationLibrary.getNonNullAnnotation())) { fieldBuilder.withAnnotation(annotationLibrary.getNonNullAnnotation()); } return fieldBuilder; } | createRelevantNonNullAnnotation |
13,606 | LombokLightParameter (@NotNull PsiClass psiClass, @NotNull LombokLightParameter lightParameter) { final LombokNullAnnotationLibrary annotationLibrary = ConfigDiscovery.getInstance().getAddNullAnnotationLombokConfigProperty(psiClass); if (StringUtil.isNotEmpty(annotationLibrary.getNullableAnnotation())) { lightParameter.withAnnotation(annotationLibrary.getNullableAnnotation()); } return lightParameter; } | createRelevantNullableAnnotation |
13,607 | String (String s) { if (s.isEmpty()) return s; if (s.length() == 1) return s.toUpperCase(Locale.ROOT); char ch = s.charAt(0); if (Character.isUpperCase(ch)) return s; return Character.toUpperCase(ch) + s.substring(1); } | capitalize |
13,608 | String (String in) { return StringUtil.capitalizeWithJavaBeanConvention(in); } | capitalize |
13,609 | CapitalizationStrategy () { return BASIC; } | defaultValue |
13,610 | CapitalizationStrategy (String someValue) { for (CapitalizationStrategy enumValue : values()) { if (enumValue.name().equalsIgnoreCase(someValue) ) { return enumValue; } } return defaultValue(); } | convertValue |
13,611 | void (@Nullable PsiAnnotation processedAnnotation, @NotNull PsiModifierList modifierList, @NotNull String onXParameterName) { if (processedAnnotation == null) { return; } Iterable<String> annotationsToAdd = LombokProcessorUtil.getOnX(processedAnnotation, onXParameterName); annotationsToAdd.forEach(modifierList::addAnnotation); } | copyOnXAnnotations |
13,612 | void (@NotNull Project project, @NotNull UUID sessionId) { ApplicationManager.getApplication().executeOnPooledThread(() -> { if (ReadAction.nonBlocking(() -> requiresAnnotationProcessing(project)).executeSynchronously()) { suggestEnableAnnotations(project); } }); } | beforeBuildProcessStarted |
13,613 | boolean (@NotNull Project project) { if (project.isDisposed()) return false; if (hasAnnotationProcessorsEnabled(project)) return false; if (!LombokLibraryUtil.hasLombokLibrary(project)) return false; return CachedValuesManager.getManager(project).getCachedValue(project, () -> { var processor = new CommonProcessors.FindFirstProcessor<PsiFile>(); var scope = getScopeRestrictedByFileTypes(projectScope(project), JavaFileType.INSTANCE); CacheManager.getInstance(project).processFilesWithWord(processor, "lombok", UsageSearchContext.IN_CODE, scope, false); return new Result<>(processor.isFound(), OuterModelsModificationTrackerManager.getInstance(project).getTracker()); }); } | requiresAnnotationProcessing |
13,614 | CompilerConfigurationImpl (@NotNull Project project) { return (CompilerConfigurationImpl)CompilerConfiguration.getInstance(project); } | getCompilerConfiguration |
13,615 | boolean (@NotNull Project project) { final CompilerConfigurationImpl compilerConfiguration = getCompilerConfiguration(project); return compilerConfiguration.getDefaultProcessorProfile().isEnabled() && ContainerUtil.and(compilerConfiguration.getModuleProcessorProfiles(), AnnotationProcessingConfiguration::isEnabled); } | hasAnnotationProcessorsEnabled |
13,616 | void (@NotNull Project project) { CompilerConfigurationImpl compilerConfiguration = getCompilerConfiguration(project); compilerConfiguration.getDefaultProcessorProfile().setEnabled(true); compilerConfiguration.getModuleProcessorProfiles().forEach(pp -> pp.setEnabled(true)); StatusBar statusBar = WindowManager.getInstance().getStatusBar(project); JBPopupFactory.getInstance() .createHtmlTextBalloonBuilder( LombokBundle.message("popup.content.java.annotation.processing.has.been.enabled"), MessageType.INFO, null ) .setFadeoutTime(3000) .createBalloon() .show(RelativePoint.getNorthEastOf(statusBar.getComponent()), Balloon.Position.atRight); } | enableAnnotationProcessors |
13,617 | void (Project project) { myNotificationManager.notify("", LombokBundle.message("config.warn.annotation-processing.disabled.title"), project, (notification) -> { notification.setSuggestionType(true); notification.addAction(new NotificationAction(LombokBundle.message("notification.enable.annotation.processing")) { @Override public void actionPerformed(@NotNull AnActionEvent e, @NotNull Notification notification) { enableAnnotationProcessors(project); notification.expire(); } }); }); } | suggestEnableAnnotations |
13,618 | void (@NotNull AnActionEvent e, @NotNull Notification notification) { enableAnnotationProcessors(project); notification.expire(); } | actionPerformed |
13,619 | String (String in) { final int inLen = in.length(); for (int i = 0; i < SINGULAR_STORE.size(); i+= 2) { final String lastPart = SINGULAR_STORE.get(i); final boolean wholeWord = Character.isUpperCase(lastPart.charAt(0)); final int endingOnly = lastPart.charAt(0) == '-' ? 1 : 0; final int len = lastPart.length(); if (inLen < len) continue; if (!in.regionMatches(true, inLen - len + endingOnly, lastPart, endingOnly, len - endingOnly)) continue; if (wholeWord && inLen != len && !Character.isUpperCase(in.charAt(inLen - len))) continue; String replacement = SINGULAR_STORE.get(i + 1); if (replacement.equals("!")) return null; boolean capitalizeFirst = !replacement.isEmpty() && Character.isUpperCase(in.charAt(inLen - len + endingOnly)); String pre = in.substring(0, inLen - len + endingOnly); String post = capitalizeFirst ? Character.toUpperCase(replacement.charAt(0)) + replacement.substring(1) : replacement; return pre + post; } return null; } | autoSingularize |
13,620 | void (File baseDir, Map<String, String> result) { readConfigFile(baseDir, File.separator + ".mvn" + File.separator + "jvm.config", result, ""); readConfigFile(baseDir, File.separator + ".mvn" + File.separator + "maven.config", result, "true"); } | readConfigFiles |
13,621 | void (File baseDir, String relativePath, Map<String, String> result, String valueIfMissing) { File configFile = new File(baseDir, relativePath); if (configFile.exists() && configFile.isFile()) { try { String text = FileUtilRt.loadFile(configFile, "UTF-8"); Matcher matcher = PROPERTY_PATTERN.matcher(text); while (matcher.find()) { if (matcher.group(1) != null) { result.put(matcher.group(1), StringUtilRt.notNullize(matcher.group(2), valueIfMissing)); } else { result.put(matcher.group(3), StringUtilRt.notNullize(matcher.group(4), valueIfMissing)); } } } catch (IOException ignore) { } } } | readConfigFile |
13,622 | void (File file, String relativePath) { myPullingQueue.add(new DownloadArtifactEvent(file.getAbsolutePath(), relativePath)); } | artifactDownloaded |
13,623 | List<DownloadArtifactEvent> () { return MavenRemotePullUtil.pull(myPullingQueue); } | pull |
13,624 | String () { return "MavenGoalExecutionResult{" + "success=" + success + ", file=" + file + '}'; } | toString |
13,625 | List<String> () { return mySources == null ? Collections.emptyList() : mySources; } | getSources |
13,626 | void (List<String> sources) { mySources = new ArrayList<>(sources); } | setSources |
13,627 | List<String> () { return myTestSources == null ? Collections.emptyList() : myTestSources; } | getTestSources |
13,628 | void (List<String> testSources) { myTestSources = new ArrayList<>(testSources); } | setTestSources |
13,629 | List<MavenResource> () { return myResources; } | getResources |
13,630 | void (List<MavenResource> resources) { myResources = new ArrayList<>(resources); } | setResources |
13,631 | List<MavenResource> () { return myTestResources; } | getTestResources |
13,632 | void (List<MavenResource> testResources) { myTestResources = new ArrayList<>(testResources); } | setTestResources |
13,633 | T () { return result; } | getResult |
13,634 | LongRunningTaskStatus () { return status; } | getStatus |
13,635 | void (Throwable e) { myPullingQueue.add(new ServerLogEvent(ServerLogEvent.Type.INFO, serialize(e))); } | info |
13,636 | void (Throwable e) { myPullingQueue.add(new ServerLogEvent(ServerLogEvent.Type.WARN, serialize(e))); } | warn |
13,637 | void (Throwable e) { myPullingQueue.add(new ServerLogEvent(ServerLogEvent.Type.ERROR, serialize(e))); } | error |
13,638 | void (String o) { myPullingQueue.add(new ServerLogEvent(ServerLogEvent.Type.PRINT, o)); } | print |
13,639 | void (String o) { myPullingQueue.add(new ServerLogEvent(ServerLogEvent.Type.DEBUG, o)); } | debug |
13,640 | List<ServerLogEvent> () { return MavenRemotePullUtil.pull(myPullingQueue); } | pull |
13,641 | String (Throwable e) { return ExceptionUtilRt.getThrowableText(wrapException(e), ""); } | serialize |
13,642 | MavenId () { return myMavenPluginId; } | getMavenPluginId |
13,643 | boolean () { return myResolved; } | isResolved |
13,644 | List<MavenArtifact> () { return myArtifacts; } | getArtifacts |
13,645 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; PluginResolutionResponse response = (PluginResolutionResponse)o; return myResolved == response.myResolved && myMavenPluginId.equals(response.myMavenPluginId) && myArtifacts.equals(response.myArtifacts); } | equals |
13,646 | int () { return Objects.hash(myMavenPluginId, myResolved, myArtifacts); } | hashCode |
13,647 | String () { return "PluginResolutionResponse{" + "pluginId=" + myMavenPluginId + ", resolved=" + myResolved + ", artifacts=" + myArtifacts + '}'; } | toString |
13,648 | LongRunningTaskStatus (@NotNull String longRunningTaskId, MavenToken token) { MavenServerUtil.checkToken(token); LongRunningTaskImpl task = myLongRunningTasks.get(longRunningTaskId); if (null == task) return LongRunningTaskStatus.EMPTY; return new LongRunningTaskStatus( task.getTotalRequests(), task.getFinishedRequests(), task.getIndicator().pullConsoleEvents(), task.getIndicator().pullDownloadEvents() ); } | getLongRunningTaskStatus |
13,649 | LongRunningTask (@NotNull String id, int totalRequests, @NotNull MavenServerConsoleIndicatorWrapper indicatorWrapper) { return new LongRunningTaskImpl(id, totalRequests, indicatorWrapper); } | newLongRunningTask |
13,650 | void () { myFinishedRequests.incrementAndGet(); } | incrementFinishedRequests |
13,651 | int () { return myFinishedRequests.get(); } | getFinishedRequests |
13,652 | int () { return myTotalRequests.get(); } | getTotalRequests |
13,653 | void (int newValue) { myTotalRequests.set(newValue); } | updateTotalRequests |
13,654 | void () { isCanceled.set(true); } | cancel |
13,655 | boolean () { return isCanceled.get(); } | isCanceled |
13,656 | void () { myLongRunningTasks.remove(myId); myIndicatorWrapper.setWrappee(null); } | close |
13,657 | MavenServerConsoleIndicatorImpl () { return myIndicator; } | getIndicator |
13,658 | File () { return file; } | file |
13,659 | MavenExplicitProfiles () { return profiles; } | profiles |
13,660 | boolean (Object obj) { if (obj == this) return true; if (obj == null || obj.getClass() != this.getClass()) return false; MavenGoalExecutionRequest that = (MavenGoalExecutionRequest)obj; return Objects.equals(this.file, that.file) && Objects.equals(this.profiles, that.profiles); } | equals |
13,661 | int () { return Objects.hash(file, profiles); } | hashCode |
13,662 | String () { return "MavenExecutionRequest[" + "file=" + file + ", " + "profiles=" + profiles + ']'; } | toString |
13,663 | int () { return level; } | getLevel |
13,664 | String () { return message; } | getMessage |
13,665 | Throwable () { return throwable; } | getThrowable |
13,666 | String () { return "MavenServerConsoleEvent{" + "message='" + message + '}'; } | toString |
13,667 | Properties () { return mySystemPropertiesCache; } | collectSystemProperties |
13,668 | File (@NotNull File workingDir) { File baseDir = workingDir; File dir = workingDir; while ((dir = dir.getParentFile()) != null) { MavenServerStatsCollector.fileRead(new File(dir, ".mvn")); if (new File(dir, ".mvn").exists()) { baseDir = dir; break; } } try { return baseDir.getCanonicalFile(); } catch (IOException e) { return baseDir.getAbsoluteFile(); } } | findMavenBasedir |
13,669 | boolean (String key) { return key.startsWith("="); } | isMagicalProperty |
13,670 | void (Runnable task) { Runtime.getRuntime().addShutdownHook(new Thread(task, "Maven-server-shutdown-hook")); } | registerShutdownTask |
13,671 | void (String propertyName, String value) { mySystemPropertiesCache.setProperty(propertyName, value); } | addProperty |
13,672 | void (String propertyName) { mySystemPropertiesCache.remove(propertyName); } | removeProperty |
13,673 | MavenToken () { return ourToken; } | getToken |
13,674 | void () { try { ourToken = new TokenReader(new Scanner(System.in), 10000).getToken(); } catch (Throwable e) { ExceptionUtilRt.rethrowUnchecked(e); } } | readToken |
13,675 | String () { return "{" + "mavenModel=" + mavenModel + '}'; } | toString |
13,676 | String () { return "{" + "projectData=" + projectData + ", problems=" + problems + ", unresolvedArtifacts=" + unresolvedArtifacts + ", unresolvedProblems=" + unresolvedProblems + '}'; } | toString |
13,677 | void (@NotNull IdeaWatchdog watchdog) { myWatchdog = watchdog; } | setWatchdog |
13,678 | Type () { return myType; } | getType |
13,679 | String () { return myString; } | getMessage |
13,680 | void (ResolveType type, String dependencyId) { myPullingQueue.add(new MavenArtifactEvent(type, MavenArtifactEvent.ArtifactEventType.DOWNLOAD_STARTED, dependencyId, null, null)); } | startedDownload |
13,681 | void (ResolveType type, String dependencyId) { myPullingQueue.add(new MavenArtifactEvent(type, MavenArtifactEvent.ArtifactEventType.DOWNLOAD_COMPLETED, dependencyId, null, null)); } | completedDownload |
13,682 | void (ResolveType type, String dependencyId, String errorMessage, String stackTrace) { myPullingQueue.add(new MavenArtifactEvent(type, MavenArtifactEvent.ArtifactEventType.DOWNLOAD_FAILED, dependencyId, errorMessage, stackTrace)); } | failedDownload |
13,683 | boolean () { return myCancelled; } | isCanceled |
13,684 | void () { myCancelled = true; } | cancel |
13,685 | List<MavenArtifactEvent> () { return MavenRemotePullUtil.pull(myPullingQueue); } | pullDownloadEvents |
13,686 | List<MavenServerConsoleEvent> () { return MavenRemotePullUtil.pull(myConsoleEventsQueue); } | pullConsoleEvents |
13,687 | void (int level, String message, Throwable throwable) { myConsoleEventsQueue.add(new MavenServerConsoleEvent(level, message, throwable)); } | printMessage |
13,688 | void (int level, String message) { printMessage(level, message, null); } | printMessage |
13,689 | void (String message) { printMessage(MavenServerConsoleIndicator.LEVEL_DEBUG, message); } | debug |
13,690 | void (String message) { printMessage(MavenServerConsoleIndicator.LEVEL_INFO, message); } | info |
13,691 | void (String message) { printMessage(MavenServerConsoleIndicator.LEVEL_WARN, message); } | warn |
13,692 | void (String message) { printMessage(MavenServerConsoleIndicator.LEVEL_ERROR, message); } | error |
13,693 | List<File> () { return pomFiles; } | getPomFiles |
13,694 | List<String> () { return activeProfiles; } | getActiveProfiles |
13,695 | List<String> () { return inactiveProfiles; } | getInactiveProfiles |
13,696 | MavenWorkspaceMap () { return workspaceMap; } | getWorkspaceMap |
13,697 | boolean () { return updateSnapshots; } | updateSnapshots |
13,698 | Properties () { return userProperties; } | getUserProperties |
13,699 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; IndexedMavenId id = (IndexedMavenId)o; if (groupId != null ? !groupId.equals(id.groupId) : id.groupId != null) return false; if (artifactId != null ? !artifactId.equals(id.artifactId) : id.artifactId != null) return false; if (version != null ? !version.equals(id.version) : id.version != null) return false; if (packaging != null ? !packaging.equals(id.packaging) : id.packaging != null) return false; if (description != null ? !description.equals(id.description) : id.description != null) return false; return true; } | equals |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.