Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
77,400 | void (String name) { if (type == null || !type.isValid()) return; JavaStatisticsManager.incVariableNameUseCount(name, kind, propertyName, type); } | nameChosen |
77,401 | String (@NotNull String name) { if (!isIdentifier(name)) { return StringUtil.fixVariableNameDerivedFromPropertyName(name); } return name; } | changeIfNotIdentifier |
77,402 | boolean (@NotNull String name) { return PsiNameHelper.getInstance(myProject).isIdentifier(name, LanguageLevel.HIGHEST); } | isIdentifier |
77,403 | JavaCodeStyleSettings () { return CodeStyle.getSettings(myProject).getCustomSettings(JavaCodeStyleSettings.class); } | getJavaSettings |
77,404 | PsiElement (@NotNull PsiElement source, @NotNull CodeStyleSettings settings) { return new ImportsFormatter(settings, source.getContainingFile()).process(source); } | processElement |
77,405 | TextRange (@NotNull PsiFile source, @NotNull TextRange rangeToReformat, @NotNull CodeStyleSettings settings) { return new ImportsFormatter(settings, source.getContainingFile()).processText(source, rangeToReformat); } | processText |
77,406 | record (@NotNull String name, @Nullable String desc) { } | TagDescription |
77,407 | String () { return "@" + myTag + " "; } | getWithEndWhitespace |
77,408 | boolean (@Nullable String tag) { return myTag.equals(tag); } | tagEqual |
77,409 | void (@NotNull String prefix, @NotNull StringBuilder sb) { super.generateSpecial(prefix, sb); for (String returnTag : myReturnTags) { if (myFormatter.getSettings().JD_KEEP_EMPTY_RETURN || !returnTag.trim().isEmpty()) { JDTag tag = JDTag.RETURN; sb.append(myFormatter.getParser().formatJDTagDescription(returnTag, prefix ... | generateSpecial |
77,410 | void (@NotNull String returnTag) { myReturnTags.add(returnTag); } | addReturnTag |
77,411 | void (@NotNull String className, @Nullable String description) { if (myThrowsList == null) { myThrowsList = new ArrayList<>(); } myThrowsList.add(new TagDescription(className, description)); } | addThrow |
77,412 | void (@NotNull String prefix, @NotNull StringBuilder sb) { super.generateSpecial(prefix, sb); String continuationPrefix = prefix + javadocContinuationIndent(); if (!isNull(myAuthorsList)) { JDTag tag = JDTag.AUTHOR; for (String author : myAuthorsList) { sb.append(myFormatter.getParser().formatJDTagDescription(author, p... | generateSpecial |
77,413 | void (@NotNull String author) { if (myAuthorsList == null) { myAuthorsList = new ArrayList<>(); } myAuthorsList.add(author); } | addAuthor |
77,414 | String () { return myVersion; } | getVersion |
77,415 | void (@NotNull String version) { this.myVersion = version; } | setVersion |
77,416 | void (@NotNull String prefix, @NotNull StringBuilder sb) { if (myParamsList != null) { int before = sb.length(); generateList(prefix, sb, myParamsList, JDTag.PARAM.getWithEndWhitespace(), myFormatter.getSettings().JD_ALIGN_PARAM_COMMENTS, myFormatter.getSettings().JD_KEEP_EMPTY_PARAMETER, myFormatter.getSettings().JD_P... | generateSpecial |
77,417 | TagDescription (@Nullable String name) { return getNameDesc(name, myParamsList); } | getParameter |
77,418 | void (@NotNull String name, @Nullable String description) { if (myParamsList == null) { myParamsList = new ArrayList<>(); } myParamsList.add(new TagDescription(name, description)); } | addParameter |
77,419 | TagDescription (@Nullable String name, @Nullable List<TagDescription> list) { if (list == null) return null; for (TagDescription aList : list) { if (aList.name().equals(name)) { return aList; } } return null; } | getNameDesc |
77,420 | void (@NotNull final String prefix, @NotNull StringBuilder sb, @NotNull List<? extends TagDescription> tagBlocks, @NotNull String tag, boolean align_comments, boolean generate_empty_tags, boolean descriptionOnNewLine) { int maxNameLength = maxTagDescriptionNameLength(tagBlocks, align_comments, generate_empty_tags, desc... | generateList |
77,421 | int (@NotNull List<? extends TagDescription> tagBlocks, boolean align_comments, boolean generate_empty_tags, boolean descriptionOnNewLine) { int max = 0; if (align_comments && !descriptionOnNewLine) { for (TagDescription tagDescription: tagBlocks) { int current = tagDescription.name().length(); if (isNull(tagDescriptio... | maxTagDescriptionNameLength |
77,422 | StringBuilder (@Nullable String description, @NotNull CharSequence firstLinePrefix, @NotNull CharSequence continuationPrefix) { return myFormatter.getParser().formatJDTagDescription(description, firstLinePrefix, continuationPrefix); } | formatJDTagDescription |
77,423 | StringBuilder (@Nullable String description, @NotNull CharSequence prefix) { return formatJDTagDescription(description, prefix, prefix); } | formatJDTagDescription |
77,424 | boolean (@Nullable String s) { return s == null || s.trim().isEmpty(); } | isNull |
77,425 | boolean (@Nullable List<?> l) { return l == null || l.isEmpty(); } | isNull |
77,426 | void (boolean value) { myMultiLineComment = value; } | setMultiLine |
77,427 | String () { if (!myFormatter.getSettings().JD_INDENT_ON_CONTINUATION) return ""; return continuationIndent(); } | javadocContinuationIndent |
77,428 | String () { CodeStyleSettings settings = myFormatter.getSettings().getContainer(); CommonCodeStyleSettings.IndentOptions indentOptions = settings.getIndentOptions(JavaFileType.INSTANCE); return new IndentInfo(0, indentOptions.CONTINUATION_INDENT_SIZE, 0).generateNewWhiteSpace(indentOptions); } | continuationIndent |
77,429 | String (@NotNull String indent) { final String prefix; if (myFormatter.getSettings().JD_LEADING_ASTERISKS_ARE_ENABLED) { prefix = indent + " * "; } else { prefix = indent; } StringBuilder sb = new StringBuilder(); if (!isNull(myDescription)) { sb.append(myFormatter.getParser().formatJDTagDescription(myDescription, pref... | generate |
77,430 | void (@NotNull String prefix, @NotNull StringBuilder sb) { } | generateSpecial |
77,431 | void (@NotNull String firstCommentLine) { myFirstLine = firstCommentLine; } | setFirstCommentLine |
77,432 | void (@NotNull String lastCommentLine) { myEndLine = lastCommentLine; } | setLastCommentLine |
77,433 | void (@NotNull String seeAlso) { if (mySeeAlsoList == null) mySeeAlsoList = new ArrayList<>(); mySeeAlsoList.add(seeAlso); } | addSeeAlso |
77,434 | void (@NotNull String unknownTag) { if (myUnknownList == null) myUnknownList = new ArrayList<>(); myUnknownList.add(unknownTag); } | addUnknownTag |
77,435 | void (@NotNull String since) { if (mySinceList == null) mySinceList = new ArrayList<>(); mySinceList.add(since); } | addSince |
77,436 | void (@Nullable String deprecated) { this.myDeprecated = deprecated; } | setDeprecated |
77,437 | String () { return myDescription; } | getDescription |
77,438 | void (@Nullable String description) { this.myDescription = description; } | setDescription |
77,439 | JavaCodeStyleSettings () { return mySettings.getCustomSettings(JavaCodeStyleSettings.class); } | getSettings |
77,440 | JDParser () { return myParser; } | getParser |
77,441 | void (@Nullable ASTNode element) { if (!getSettings().ENABLE_JAVADOC_FORMATTING) return; PsiElement psiElement = SourceTreeToPsiMap.treeElementToPsi(element); if (psiElement != null) { getParser().formatCommentText(psiElement, this); } } | processComment |
77,442 | void (@Nullable String newCommentText, @Nullable PsiDocComment oldComment) { if (newCommentText != null) newCommentText = stripSpaces(newCommentText); if (newCommentText == null || oldComment == null || newCommentText.equals(oldComment.getText())) { return; } try { PsiComment newComment = JavaPsiFacade.getElementFactor... | replaceCommentText |
77,443 | String (String text) { String[] lines = LineTokenizer.tokenize(text.toCharArray(), false); return Arrays.stream(lines).map(CommentFormatter::rTrim).collect(Collectors.joining("\n")); } | stripSpaces |
77,444 | String (String text) { int idx = text.length(); while (idx > 0) { if (!Character.isWhitespace(text.charAt(idx-1))) break; idx--; } return text.substring(0, idx); } | rTrim |
77,445 | int (@NotNull PsiElement element) { if (!(element instanceof PsiMember)) { return 0; } int indentSize = mySettings.getIndentSize(JavaFileType.INSTANCE); boolean doNotIndentTopLevelClassMembers = mySettings.getCommonSettings(JavaLanguage.INSTANCE).DO_NOT_INDENT_TOP_LEVEL_CLASS_MEMBERS; int indent = 0; PsiClass top = Psi... | getIndentSpecial |
77,446 | String (@NotNull PsiElement element) { return StringUtil.repeatSymbol(' ', getIndentSpecial(element)); } | getIndent |
77,447 | void (@NotNull PsiElement element, @NotNull CommentFormatter formatter) { CommentInfo info = getElementsCommentInfo(element); if (info == null || !isJavadoc(info)) return; JDComment comment = parse(info, formatter); String indent = formatter.getIndent(info.commentOwner); String commentText = comment.generate(indent); f... | formatCommentText |
77,448 | boolean (CommentInfo info) { return JAVADOC_HEADER.equals(info.commentHeader); } | isJavadoc |
77,449 | CommentInfo (@Nullable PsiElement psiElement) { if (psiElement instanceof PsiDocComment) { PsiDocComment docComment = (PsiDocComment)psiElement; PsiJavaDocumentedElement owner = docComment.getOwner(); if (owner != null) { return getCommentInfo(docComment, owner); } PsiElement parent = docComment.getParent(); if (parent... | getElementsCommentInfo |
77,450 | CommentInfo (@NotNull PsiDocComment docComment, @NotNull PsiElement owner) { String commentHeader = null; String commentFooter = null; StringBuilder sb = new StringBuilder(); boolean first = true; PsiElement e = docComment; while (true) { if (e instanceof PsiDocComment) { PsiComment cm = (PsiComment)e; String text = cm... | getCommentInfo |
77,451 | JDComment (@NotNull CommentInfo info, @NotNull CommentFormatter formatter) { JDComment comment = createComment(info.commentOwner, formatter); parse(info.comment, comment); if (info.commentHeader != null) { comment.setFirstCommentLine(info.commentHeader); } if (info.commentFooter != null) { comment.setLastCommentLine(in... | parse |
77,452 | JDComment (@NotNull PsiElement commentOwner, @NotNull CommentFormatter formatter) { if (commentOwner instanceof PsiClass) { return new JDClassComment(formatter); } else if (commentOwner instanceof PsiMethod) { return new JDMethodComment(formatter); } else { return new JDComment(formatter); } } | createComment |
77,453 | void (@Nullable String text, @NotNull JDComment comment) { if (text == null) return; List<Boolean> markers = new ArrayList<>(); List<String> l = toArray(text, markers); //if it is - we are dealing with multiline comment: // /** // * comment // */ //which shouldn't be wrapped into one line comment like /** comment */ if... | parse |
77,454 | List<String> (@Nullable String s, @Nullable List<Boolean> markers) { if (s == null) return null; s = s.trim(); if (s.isEmpty()) return null; boolean p2nl = markers != null && mySettings.JD_P_AT_EMPTY_LINES; List<String> list = new ArrayList<>(); StringTokenizer st = new StringTokenizer(s, "\n", true); boolean first = t... | toArray |
77,455 | boolean (@NotNull String line) { String tag = HtmlUtil.getStartTag(line); return tag != null && ArrayUtil.contains(tag, TAGS_TO_KEEP_INDENTS_AFTER); } | containsTagToKeepIndentsAfter |
77,456 | boolean (@NotNull String line) { if (TodoConfiguration.getInstance().isMultiLine()) { for (TodoPattern todoPattern : TodoConfiguration.getInstance().getTodoPatterns()) { Pattern p = todoPattern.getPattern(); if (p != null && p.matcher(line.trim()).matches()) { return true; } } } return false; } | isMultilineTodoStart |
77,457 | int (@NotNull String line) { int indentWhitespaces = 0; for (int i = 0; i < line.length(); i++) { char c = line.charAt(i); switch (c) { case ' ', '\t' -> indentWhitespaces++; case '\n' -> { return Integer.MAX_VALUE; } default -> { return indentWhitespaces; } } } return Integer.MAX_VALUE; } | getIndentWhitespaces |
77,458 | String (@NotNull String line) { int asteriskPos = line.indexOf('*'); return asteriskPos >= 0 ? line.substring(asteriskPos + 1) : line; } | getLineWithoutAsterisk |
77,459 | boolean (String token) { String withoutWS = StringUtil.toLowerCase(removeWhiteSpacesFrom(token)); return withoutWS.equals(SELF_CLOSED_P_TAG) || withoutWS.equals(P_START_TAG); } | isParaTag |
77,460 | boolean (String token) { return StringUtil.toLowerCase(removeWhiteSpacesFrom(token)).equals(SELF_CLOSED_P_TAG); } | isSelfClosedPTag |
77,461 | boolean (String str, int maxLength) { if (str == null) return false; for (String s : str.split("\n")) { if (s.length() > maxLength) { return true; } } return false; } | hasLineLongerThan |
77,462 | String (@NotNull final String token) { final StringBuilder result = new StringBuilder(); for (char c : token.toCharArray()) { if (c != ' ') result.append(c); } return result.toString(); } | removeWhiteSpacesFrom |
77,463 | List<String> (@Nullable String s, int width) { List<String> list = new ArrayList<>(); List<Pair<String, Boolean>> pairs = splitToParagraphs(s); if (pairs == null) { return null; } for (Pair<String, Boolean> pair : pairs) { String seq = pair.getFirst(); boolean isMarked = pair.getSecond(); if (seq.isEmpty()) { // keep e... | toArrayWrapping |
77,464 | int (String line, int width) { if (line.length() < width) { return line.length(); } int preferredBreakPoint = -1; int backupBreakPoint = -1; int tagBraceBalance = 0; for (int i = 0; i < line.length() && (i <= width || backupBreakPoint < 0); i++) { char c = line.charAt(i); if (tagBraceBalance > 0) { if (c == '{') { tagB... | computeWrapPosition |
77,465 | boolean (@NotNull String line) { return mySettings.JD_PRESERVE_LINE_FEEDS || HtmlUtil.startsWithTag(line); } | isKeepLineFeedsIn |
77,466 | void (@NotNull List<? super Pair<String, Boolean>> result, @NotNull StringBuilder sb) { if (sb.length() > 0) { result.add(new Pair<>(sb.toString(), false)); sb.setLength(0); } } | endParagraph |
77,467 | boolean (@NotNull String line) { return getOccurenceCount(line, PRE_TAG_START_PATTERN) > StringUtil.getOccurrenceCount(line, PRE_TAG_END); } | lineHasUnclosedPreTag |
77,468 | int (@NotNull String line) { int balance = 0; for (int i = 0; i < line.length(); i++) { var ch = line.charAt(i); if (ch == '}') { balance--; } else if (ch == '{') { balance++; } } return balance; } | getLineSnippetTagBraceBalance |
77,469 | boolean (@NotNull String line) { var matcher = SNIPPET_START_PATTERN.matcher(line); var hasResult = false; var lastEnd = -1; do { hasResult = matcher.find(); if (hasResult) { lastEnd = matcher.end(); } } while (hasResult); return lastEnd == line.length(); } | lineHasUnclosedSnippetTag |
77,470 | boolean (@NotNull String line) { return StringUtil.getOccurrenceCount(line, PRE_TAG_END) > getOccurenceCount(line, PRE_TAG_START_PATTERN); } | lineHasClosingPreTag |
77,471 | int (@NotNull String line, @NotNull Pattern pattern) { Matcher matcher = pattern.matcher(line); int count = 0; while (matcher.find()) { count++; } return count; } | getOccurenceCount |
77,472 | StringBuilder (@Nullable String str, @NotNull CharSequence prefix) { return formatJDTagDescription(str, prefix, prefix); } | formatJDTagDescription |
77,473 | StringBuilder (@Nullable String str, @NotNull CharSequence firstLinePrefix, @NotNull CharSequence continuationPrefix) { final int rightMargin = myCommonSettings.getRootSettings().getRightMargin(JavaLanguage.INSTANCE); final int maxCommentLength = rightMargin - continuationPrefix.length(); final int firstLinePrefixLengt... | formatJDTagDescription |
77,474 | boolean (List<String> lines, int currLine) { for (int i = currLine + 1; i < lines.size(); i ++) { String line = lines.get(i); if (!line.isEmpty()) { return HtmlUtil.startsWithTag(line); } } return false; } | isFollowedByTagLine |
77,475 | record (PsiDocComment docComment, PsiElement commentOwner, String commentHeader, String comment, String commentFooter) { } | CommentInfo |
77,476 | Lexer (@NotNull final OccurrenceConsumer consumer) { return createIndexingLexer(consumer); } | createLexer |
77,477 | Lexer (OccurrenceConsumer consumer) { Lexer javaLexer = JavaParserDefinition.createLexer(LanguageLevel.JDK_1_3); return new JavaFilterLexer(javaLexer, consumer); } | createIndexingLexer |
77,478 | void () { final IElementType tokenType = myDelegate.getTokenType(); if (tokenType == JavaTokenType.IDENTIFIER || tokenType == JavaTokenType.LONG_LITERAL || tokenType == JavaTokenType.INTEGER_LITERAL || tokenType == JavaTokenType.CHARACTER_LITERAL || tokenType == JavaTokenType.ARROW || tokenType == JavaTokenType.DOUBLE_... | advance |
77,479 | Lexer (@NotNull OccurrenceConsumer consumer) { return JavaIdIndexer.createIndexingLexer(consumer); } | createLexer |
77,480 | PsiClass (@NotNull String qualifiedName, @NotNull GlobalSearchScope scope) { PsiMigrationImpl migration = PsiMigrationManager.getInstance(myProject).getCurrentMigration(); if (migration != null) { return migration.getMigrationClass(qualifiedName); } return null; } | findClass |
77,481 | PsiPackage (@NotNull String qualifiedName) { PsiMigrationImpl migration = PsiMigrationManager.getInstance(myProject).getCurrentMigration(); if (migration != null) { return migration.getMigrationPackage(qualifiedName); } return null; } | findPackage |
77,482 | String () { return "MigrationClass:" + myQualifiedName; } | toString |
77,483 | String () { return "class " + myName + " {}"; } | getText |
77,484 | void (@NotNull PsiElementVisitor visitor) { if (visitor instanceof JavaElementVisitor) { ((JavaElementVisitor)visitor).visitClass(this); } else { visitor.visitElement(this); } } | accept |
77,485 | PsiElement () { return new MigrationClassImpl(myMigration, myQualifiedName); } | copy |
77,486 | boolean () { return myMigration.isValid(); } | isValid |
77,487 | String () { return myQualifiedName; } | getQualifiedName |
77,488 | boolean () { return false; } | isInterface |
77,489 | boolean () { return false; } | isAnnotationType |
77,490 | boolean () { return false; } | isEnum |
77,491 | PsiReferenceList () { return null; } | getExtendsList |
77,492 | PsiReferenceList () { return null; } | getImplementsList |
77,493 | PsiClass () { return JavaPsiFacade.getInstance(myManager.getProject()) .findClass(CommonClassNames.JAVA_LANG_OBJECT, GlobalSearchScope.allScope(myManager.getProject())); } | getSuperClass |
77,494 | PsiClass () { return null; } | getContainingClass |
77,495 | Collection<HierarchicalMethodSignature> () { return Collections.emptySet(); } | getVisibleSignatures |
77,496 | PsiField (String name, boolean checkBases) { return null; } | findFieldByName |
77,497 | PsiMethod (@NotNull PsiMethod patternMethod, boolean checkBases) { return null; } | findMethodBySignature |
77,498 | PsiClass (String name, boolean checkBases) { return null; } | findInnerClassByName |
77,499 | PsiTypeParameterList () { return null; } | getTypeParameterList |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.