Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
71,700 | boolean (@NotNull RefManager manager, @NotNull GlobalJavaInspectionContext context, @NotNull ProblemDescriptionsProcessor descriptionsProcessor) { manager.iterate(new RefJavaVisitor() { @Override public void visitMethod(@NotNull RefMethod refMethod) { if (PsiModifier.PRIVATE.equals(refMethod.getAccessModifier())) retur... | queryExternalUsagesRequests |
71,701 | void (@NotNull RefMethod refMethod) { if (PsiModifier.PRIVATE.equals(refMethod.getAccessModifier())) return; if (descriptionsProcessor.getDescriptions(refMethod) != null) { //suspicious method -> need to check external usages final GlobalJavaInspectionContext.UsagesProcessor usagesProcessor = new GlobalJavaInspectionCo... | visitMethod |
71,702 | boolean (PsiReference psiReference) { final PsiReferenceExpression psiReferenceExpression = ObjectUtils.tryCast(psiReference.getElement(), PsiReferenceExpression.class); if (psiReferenceExpression == null) return false; PsiMethodCallExpression methodCallExpression = ObjectUtils.tryCast(psiReferenceExpression.getParent(... | process |
71,703 | LocalQuickFix (String hint) { return getInvertBooleanFix(false); } | getQuickFix |
71,704 | LocalInspectionTool () { return new BooleanMethodIsAlwaysInvertedLocalInspection(this); } | getSharedLocalInspectionTool |
71,705 | boolean (RefMethod refMethod) { final Boolean alwaysInverted = refMethod.getUserData(ALWAYS_INVERTED); if (alwaysInverted != Boolean.TRUE) return true; if (refMethod.isExternalOverride()) return true; for (RefMethod superMethod : refMethod.getSuperMethods()) { if (hasNonInvertedCalls(superMethod)) return true; } return... | hasNonInvertedCalls |
71,706 | void (RefMethod refMethod, GlobalJavaInspectionContext globalContext, GlobalJavaInspectionContext.UsagesProcessor processor) { final Collection<RefMethod> superMethods = refMethod.getSuperMethods(); for (RefMethod superMethod : superMethods) { traverseSuperMethods(superMethod, globalContext, processor); } globalContext... | traverseSuperMethods |
71,707 | void (RefElement refWhat, RefElement refFrom) { if (refWhat.getUserData(ALWAYS_INVERTED) != Boolean.TRUE) return; final RefMethod refMethod = (RefMethod)refWhat; final PsiElement psiElement = refMethod.getPsiElement(); if (!(psiElement instanceof PsiMethod psiMethod)) return; final PsiElement psiFrom = refFrom.getPsiEl... | checkMethodCall |
71,708 | void (@NotNull PsiMethodCallExpression call) { super.visitMethodCallExpression(call); final PsiReferenceExpression methodExpression = call.getMethodExpression(); if (methodExpression.isReferenceTo(psiMethod)) { if (isInvertedMethodCall(call, psiFrom)) return; refMethod.putUserData(ALWAYS_INVERTED, Boolean.FALSE); } } | visitMethodCallExpression |
71,709 | void (@NotNull PsiMethodReferenceExpression expression) { super.visitMethodReferenceExpression(expression); if (expression.isReferenceTo(psiElement)) { refMethod.putUserData(ALWAYS_INVERTED, Boolean.FALSE); } } | visitMethodReferenceExpression |
71,710 | boolean (@NotNull PsiMethodCallExpression methodCallExpression, @Nullable PsiElement from) { if (from instanceof PsiMethod && MethodCallUtils.isSuperMethodCall(methodCallExpression, (PsiMethod)from)) { // ignore super method calls return true; } final PsiPrefixExpression prefixExpression = ObjectUtils.tryCast(methodCal... | isInvertedMethodCall |
71,711 | void (RefElement refElement) { if (!(refElement instanceof RefMethod refMethod) || refMethod.isConstructor()) return; final UMethod method = refMethod.getUastElement(); if (!PsiTypes.booleanType().equals(method.getReturnType())) return; refElement.putUserData(ALWAYS_INVERTED, Boolean.TRUE); //initial mark boolean metho... | onInitialize |
71,712 | void (RefElement refWhat, RefElement refFrom, boolean referencedFromClassInitializer) { checkMethodCall(refWhat, refFrom); } | onMarkReferenced |
71,713 | String () { return myGlobalTool.getGroupDisplayName(); } | getGroupDisplayName |
71,714 | String () { return myGlobalTool.getShortName(); } | getShortName |
71,715 | void (final List<? super PipelineElement> elements) { elements.clear(); String guavaIterables = "com.google.common.collect.Iterables"; elements.add(new PipelineElement(guavaIterables, "transform", PseudoLambdaReplaceTemplate.MAP)); elements.add(new PipelineElement(guavaIterables, "filter", PseudoLambdaReplaceTemplate.F... | restoreDefault |
71,716 | Collection<PipelineElement> (final @NotNull String methodName) { return ContainerUtil.filter(myElements, element -> methodName.equals(element.methodName())); } | findElementsByMethodName |
71,717 | record (@NotNull String handlerClass, @NotNull String methodName, @NotNull PseudoLambdaReplaceTemplate template) { } | PipelineElement |
71,718 | PsiElementVisitor (@NotNull final ProblemsHolder holder, boolean isOnTheFly) { if (!JavaFeature.STREAMS.isFeatureSupported(holder.getFile())) { return PsiElementVisitor.EMPTY_VISITOR; } return new JavaElementVisitor() { @Override public void visitMethodCallExpression(@NotNull PsiMethodCallExpression methodCallExpressio... | buildVisitor |
71,719 | void (@NotNull PsiMethodCallExpression methodCallExpression) { String qName = methodCallExpression.getMethodExpression().getQualifiedName(); if (qName == null) { return; } qName = StringUtil.getShortName(qName); final Collection<StaticPseudoFunctionalStyleMethodOptions.PipelineElement> handlerInfos = myOptions.findElem... | visitMethodCallExpression |
71,720 | String () { return JavaBundle.message("quickfix.family.replace.with.java.stream.api.pipeline"); } | getFamilyName |
71,721 | void (@NotNull Project project, @NotNull PsiElement psiElement, @NotNull ModPsiUpdater updater) { if (psiElement instanceof PsiReferenceExpression && psiElement.getParent() instanceof PsiMethodCallExpression call) { myHandler.template().convertToStream(call, null, false); } } | applyFix |
71,722 | int () { return myLambdaPosition; } | getLambdaPosition |
71,723 | int () { return myIterablePosition; } | getIterablePosition |
71,724 | int () { return myDefaultValuePosition; } | getDefaultValuePosition |
71,725 | List<PseudoLambdaReplaceTemplate> () { return List.of(MAP, FILTER, FIND, ALL_MATCH, ANY_MATCH); } | getAllTemplates |
71,726 | ValidationInfo (final PsiMethod method) { final PsiParameter[] parameters = method.getParameterList().getParameters(); final PsiType[] parameterTypes = ContainerUtil.map2Array(Arrays.asList(parameters), new PsiType[parameters.length], parameter -> parameter.getType()); final PsiType returnType = method.getReturnType();... | validate |
71,727 | ValidationInfo (final PsiMethodCallExpression expression) { final PsiType[] argumentTypes = expression.getArgumentList().getExpressionTypes(); final PsiType methodReturnType = expression.getType(); if (methodReturnType == null) { return null; } final JavaResolveResult result = expression.getMethodExpression().advancedR... | validate |
71,728 | LambdaRole () { return myLambdaRole; } | getLambdaRole |
71,729 | boolean () { return myAcceptDefaultValue; } | isAcceptDefaultValue |
71,730 | ValidationInfo (final PsiType[] arguments, final PsiType methodReturnType, final @Nullable PsiSubstitutor methodSubstitutor, final PsiElement context) { int lambdaPosition = -1; int defaultValuePosition = -1; int iterablePosition = -1; if (!myAcceptDefaultValue) { if (arguments.length != 2) { return null; } } else { if... | validate |
71,731 | boolean (PsiType type, PsiType baseMethodReturnType, PsiSubstitutor methodSubstitutor, PsiElement context) { if (type instanceof PsiMethodReferenceType) { final PsiMethodReferenceExpression expression = ((PsiMethodReferenceType)type).getExpression(); final PsiMethod resolvedMethod = (PsiMethod)expression.resolve(); if ... | isFunction |
71,732 | boolean (PsiType lambdaReturnType, PsiType baseMethodReturnType, PsiSubstitutor methodSubstitutor, PsiElement context) { if (lambdaReturnType == null) { return false; } if (myLambdaRole == LambdaRole.PREDICATE) { final PsiClassType boxedBoolean = PsiTypes.booleanType().getBoxedType(context); if (!(PsiTypes.booleanType(... | isSuitableLambdaRole |
71,733 | boolean (PsiType type) { if (type instanceof PsiClassType) { final PsiClass resolvedClass = ((PsiClassType)type).resolve(); if (resolvedClass != null && CommonClassNames.JAVA_LANG_CLASS.equals(resolvedClass.getQualifiedName())) { return true; } } return false; } | isJavaLangClassType |
71,734 | boolean (final PsiType type, final PsiType baseMethodReturnType, final @Nullable PsiSubstitutor methodSubstitutor, final PsiElement context) { if (type instanceof PsiClassType) { final PsiClass resolvedClass = ((PsiClassType)type).resolve(); if (resolvedClass != null) { if (resolvedClass instanceof PsiAnonymousClass) {... | isSuitableFunctionalType |
71,735 | PsiExpression (@NotNull final PsiMethodCallExpression expression, @Nullable PsiMethod method, boolean force) { if (method == null) { method = expression.resolveMethod(); if (method == null) { return expression; } } final ValidationInfo validationInfo = force ? validate(method) : validate(expression); if (validationInfo... | convertToStream |
71,736 | PsiExpression (String pipelineHead, String elementText, String lambdaExpression, String pipelineTail, Project project) { final StringBuilder sb = new StringBuilder(); sb.append(pipelineHead).append(".").append(elementText); if (lambdaExpression != null) { sb.append("(").append(lambdaExpression).append(")"); } if (pipel... | createPipelineExpression |
71,737 | String (PsiMethod lambdaHandler) { final PsiType type = lambdaHandler.getReturnType(); if (type instanceof PsiArrayType arrayType) { final PsiType arrayComponentType = arrayType.getComponentType(); return "toArray(" + arrayComponentType.getCanonicalText() + "[]::new)"; } else if (type instanceof PsiClassType classType)... | findSuitableTailMethodForCollection |
71,738 | PsiExpression (PsiExpression expression) { if (expression instanceof PsiMethodReferenceExpression) { return expression; } if (expression instanceof PsiLambdaExpression) { return expression; } if (expression instanceof PsiMethodCallExpression call) { final PsiMethod method = call.resolveMethod(); if (method == null) { r... | convertToJavaLambda |
71,739 | PsiExpression (PsiExpression expression) { final PsiType type = expression.getType(); if (type instanceof PsiClassType) { final PsiClass resolvedClass = ((PsiClassType)type).resolve(); if (resolvedClass != null && CommonClassNames.JAVA_LANG_CLASS.equals(resolvedClass.getQualifiedName())) { return JavaPsiFacade.getEleme... | convertClassTypeExpression |
71,740 | PsiExpression (PsiExpression collectionExpression) { if (collectionExpression instanceof PsiNewExpression) { final PsiDiamondType.DiamondInferenceResult diamondResolveResult = PsiDiamondTypeImpl.resolveInferredTypesNoCheck((PsiNewExpression)collectionExpression, collectionExpression); if (!diamondResolveResult.getInfer... | replaceTypeParameters |
71,741 | String (PsiExpression collectionExpression, boolean force) { collectionExpression = replaceTypeParameters(collectionExpression); if (collectionExpression == null) return null; final PsiType type = collectionExpression.getType(); if (type instanceof PsiClassType) { final PsiClass resolved = ((PsiClassType)type).resolve(... | createPipelineHeadText |
71,742 | boolean (final PsiType type) { if (type instanceof PsiClassType) { return InheritanceUtil.isInheritor(type, CommonClassNames.JAVA_LANG_ITERABLE); } return type instanceof PsiArrayType; } | isIterableOrArray |
71,743 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; PseudoLambdaReplaceTemplate template = (PseudoLambdaReplaceTemplate)o; if (myAcceptDefaultValue != template.myAcceptDefaultValue) return false; if (!myStreamApiMethodName.equals(template.myStreamApiMethodName)) r... | equals |
71,744 | int () { int result = myStreamApiMethodName.hashCode(); result = 31 * result + myLambdaRole.hashCode(); result = 31 * result + (myAcceptDefaultValue ? 1 : 0); return result; } | hashCode |
71,745 | String () { return "PseudoLambdaReplaceTemplate{" + "myStreamApiMethodName='" + myStreamApiMethodName + '\'' + '}'; } | toString |
71,746 | Icon (boolean expanded) { return AllIcons.Nodes.EntryPoints; } | getIcon |
71,747 | String () { return ""; } | getTailText |
71,748 | void (@NotNull Object2IntMap<HighlightDisplayLevel> counter) { //do nothing here } | visitProblemSeverities |
71,749 | boolean () { return myExcluded; } | isExcluded |
71,750 | void () { myExcluded = true; } | excludeElement |
71,751 | void () { myExcluded = false; } | amnestyElement |
71,752 | String () { return "jcip-annotations.jar"; } | getPresentableName |
71,753 | ExternalClassResolveResult (@NotNull String shortClassName, @NotNull ThreeState isAnnotation, @NotNull Module contextModule) { if (JCiPUtil.isJCiPAnnotation(shortClassName) && isAnnotation == ThreeState.YES) { return new ExternalClassResolveResult("net.jcip.annotations." + shortClassName, JDCIP_LIBRARY_DESCRIPTOR); } r... | resolveClass |
71,754 | ExternalLibraryDescriptor (@NotNull String packageName) { if (packageName.equals("net.jcip.annotations")) { return JDCIP_LIBRARY_DESCRIPTOR; } return null; } | resolvePackage |
71,755 | OptPane () { return pane( checkbox("ignoreWhenRefactoringIsComplicated", JavaBundle.message("label.ignore.complicated.fix")), JavaInspectionControls.visibilityChooser("highestModifier", JavaBundle.message("label.maximal.reported.method.visibility")), number("minimalUsageCount", JavaBundle.message("label.minimal.reporte... | getOptionsPane |
71,756 | List<Object> (@Nullable Object rootValue) { //noinspection unchecked return rootValue == null || rootValue instanceof List<?> ? (List<Object>)rootValue : new SmartList<>(rootValue); } | valueToList |
71,757 | boolean (@NotNull RefManager manager, @NotNull GlobalJavaInspectionContext globalContext, @NotNull ProblemDescriptionsProcessor processor) { manager.iterate(new RefJavaVisitor() { @Override public void visitMethod(@NotNull RefMethod refMethod) { if (processor.getDescriptions(refMethod) == null) return; if (PsiModifier.... | queryExternalUsagesRequests |
71,758 | void (@NotNull RefMethod refMethod) { if (processor.getDescriptions(refMethod) == null) return; if (PsiModifier.PRIVATE.equals(refMethod.getAccessModifier())) return; globalContext.enqueueMethodUsagesProcessor(refMethod, new GlobalJavaInspectionContext.UsagesProcessor() { @Override public boolean process(PsiReference p... | visitMethod |
71,759 | boolean (PsiReference psiReference) { processor.ignoreElement(refMethod); return false; } | process |
71,760 | String () { return InspectionsBundle.message("group.names.declaration.redundancy"); } | getGroupDisplayName |
71,761 | String () { return "SameParameterValue"; } | getShortName |
71,762 | LocalQuickFix (String hint) { if (hint == null) return null; final int spaceIdx = hint.indexOf(' '); if (spaceIdx == -1 || spaceIdx >= hint.length() - 1) return null; //invalid hint return new InlineParameterValueFix(hint.substring(0, spaceIdx), hint.substring(spaceIdx + 1)); } | getQuickFix |
71,763 | String (@NotNull QuickFix fix) { return fix.toString(); } | getHint |
71,764 | LocalInspectionTool () { return new LocalSameParameterValueInspection(this); } | getSharedLocalInspectionTool |
71,765 | String () { return getParamName() + " " + myValue; } | toString |
71,766 | String () { return JavaBundle.message("inspection.same.parameter.fix.name", myParameterName, StringUtil.unquoteString(myValue)); } | getName |
71,767 | String () { return JavaBundle.message("inspection.same.parameter.fix.family.name"); } | getFamilyName |
71,768 | void (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { final PsiElement element = descriptor.getPsiElement(); final PsiMethod method = PsiTreeUtil.getParentOfType(element, PsiMethod.class); if (method == null) return; PsiParameter parameter = PsiTreeUtil.getParentOfType(element, PsiParameter.class, fa... | applyFix |
71,769 | IntentionPreviewInfo (@NotNull Project project, @NotNull ProblemDescriptor previewDescriptor) { applyFix(project, previewDescriptor); return IntentionPreviewInfo.DIFF; } | generatePreview |
71,770 | boolean () { return false; } | startInWriteAction |
71,771 | void (PsiMethod method, PsiParameter parameter, PsiExpression defToInline) { final MultiMap<PsiElement, @DialogMessage String> conflicts = new MultiMap<>(); Collection<PsiMethod> methods = new ArrayList<>(); methods.add(method); Project project = method.getProject(); boolean preview = IntentionPreviewUtils.isIntentionP... | inlineSameParameterValue |
71,772 | void (PsiExpression defToInline, Map<PsiParameter, Collection<PsiReference>> paramsToInline) { for (Map.Entry<PsiParameter, Collection<PsiReference>> entry : paramsToInline.entrySet()) { Collection<PsiReference> refsToInline = entry.getValue(); try { PsiExpression[] exprs = new PsiExpression[refsToInline.size()]; int i... | inlineParameters |
71,773 | void (PsiMethod method, PsiParameter parameter) { final PsiParameter[] parameters = method.getParameterList().getParameters(); final List<ParameterInfoImpl> psiParameters = new ArrayList<>(); int paramIdx = 0; final String paramName = parameter.getName(); for (PsiParameter param : parameters) { if (!Comparing.strEqual(... | removeParameter |
71,774 | String () { return myParameterName; } | getParamName |
71,775 | boolean () { return true; } | runForWholeFile |
71,776 | String () { return myGlobal.getGroupDisplayName(); } | getGroupDisplayName |
71,777 | String () { return myGlobal.getShortName(); } | getShortName |
71,778 | PsiElementVisitor (@NotNull ProblemsHolder holder, boolean isOnTheFly) { return UastHintedVisitorAdapter.create(holder.getFile().getLanguage(), new AbstractUastNonRecursiveVisitor() { private final UnusedDeclarationInspectionBase myDeadCodeTool = UnusedDeclarationInspectionBase.findUnusedDeclarationInspection(holder.ge... | buildVisitor |
71,779 | boolean (@NotNull UMethod method) { PsiMethod javaMethod = method.getJavaPsi(); if (method.isConstructor() || AccessModifier.fromModifierList(javaMethod.getModifierList()).compareTo( Objects.requireNonNullElse(myGlobal.highestModifier, DEFAULT_HIGHEST_MODIFIER)) < 0) { return true; } if (javaMethod.hasModifierProperty(... | visitMethod |
71,780 | void (JBTable table, PackageEntryTable list) { int selected = table.getSelectedRow() + 1; if (selected < 0) { selected = list.getEntryCount(); } PackageEntry entry = new PackageEntry(false, "", true); list.insertEntryAt(entry, selected); ImportLayoutPanel.refreshTableModel(selected, table); } | addPackageToPackages |
71,781 | void (JBTable table, PackageEntryTable list) { int selected = table.getSelectedRow(); if (selected < 0) return; TableUtil.stopEditing(table); list.removeEntryAt(selected); AbstractTableModel model = (AbstractTableModel)table.getModel(); model.fireTableRowsDeleted(selected, selected); if (selected >= list.getEntryCount(... | removeEntryFromPackages |
71,782 | JPanel (final JBTable packageTable, final PackageEntryTable packageList) { JPanel panel = ToolbarDecorator.createDecorator(packageTable) .setAddAction(new AnActionButtonRunnable() { @Override public void run(AnActionButton button) { addPackageToPackages(packageTable, packageList); } }).setRemoveAction(new AnActionButto... | createPackagesPanel |
71,783 | void (AnActionButton button) { addPackageToPackages(packageTable, packageList); } | run |
71,784 | void (AnActionButton button) { removeEntryFromPackages(packageTable, packageList); } | run |
71,785 | void (CodeStyleSettings settings) { super.initTabs(settings); addTab(new JavaDocFormattingPanel(settings)); addTab(new CodeStyleImportsPanelWrapper(settings)); addTab(new ArrangementSettingsPanel(settings, JavaLanguage.INSTANCE)); for (CodeStyleSettingsProvider provider : CodeStyleSettingsProvider.EXTENSION_POINT_NAME.... | initTabs |
71,786 | JComponent () { myVisibilityPanel.add(myJavaVisibilityPanel, BorderLayout.CENTER); GridBagConstraints gc = new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1, 1, GridBagConstraints.NORTHEAST, GridBagConstraints.BOTH, new JBInsets(0, 0, 0, 0), 0, 0); Predicate<PsiClass> isApplicable = PsiClass::isAnnotationT... | createComponent |
71,787 | String () { return ApplicationBundle.message("title.code.generation"); } | getDisplayName |
71,788 | String () { return "reference.settingsdialog.IDE.globalcodestyle.codegen"; } | getHelpTopic |
71,789 | void (@NotNull CodeStyleSettings settings) { JavaCodeStyleSettings javaSettings = settings.getCustomSettings(JavaCodeStyleSettings.class); myCbPreferLongerNames.setSelected(javaSettings.PREFER_LONGER_NAMES); myFieldPrefixField.setText(javaSettings.FIELD_NAME_PREFIX); myStaticFieldPrefixField.setText(javaSettings.STATIC... | reset |
71,790 | void () { reset(mySettings); } | reset |
71,791 | boolean (CodeStyleSettings settings) { JavaCodeStyleSettings javaSettings = settings.getCustomSettings(JavaCodeStyleSettings.class); boolean isModified = isCheckboxModified(myCbPreferLongerNames, javaSettings.PREFER_LONGER_NAMES); isModified |= isFieldModified(myFieldPrefixField, javaSettings.FIELD_NAME_PREFIX); isModi... | isModified |
71,792 | boolean () { return isModified(mySettings); } | isModified |
71,793 | void () { myCommenterForm = new CommenterForm(JavaLanguage.INSTANCE); myCommenterPanel = myCommenterForm.getCommenterPanel(); } | createUIComponents |
71,794 | Configurable (final @NotNull CodeStyleSettings settings, final @NotNull CodeStyleSettings originalSettings) { return new CodeStyleGenerationConfigurable(settings); } | createSettingsPage |
71,795 | String () { return ApplicationBundle.message("title.code.generation"); } | getConfigurableDisplayName |
71,796 | DisplayPriority () { return DisplayPriority.CODE_SETTINGS; } | getPriority |
71,797 | boolean () { return false; } | hasSettingsPage |
71,798 | Language () { return JavaLanguage.INSTANCE; } | getLanguage |
71,799 | void () { super.init(); myEnableCheckBox = new JCheckBox(JavaBundle.message("checkbox.enable.javadoc.formatting")); myEnableCheckBox.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { update(); } }); myPanel.setBorder(new CustomLineBorder(OnePixelDivider.BACKGROUND, 1, 0, 0,... | init |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.