Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
71,100 | String () { return JavaBundle.message("inspection.data.flow.use.computeifpresent.quickfix"); } | getFamilyName |
71,101 | void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { PsiLambdaExpression lambda = PsiTreeUtil.getParentOfType(element, PsiLambdaExpression.class); if (lambda == null) return; PsiMethodCallExpression call = PsiTreeUtil.getParentOfType(lambda, PsiMethodCallExpression.class); if (... | applyFix |
71,102 | ReplaceComputeWithComputeIfPresentFix (PsiElement reference) { if (!(reference instanceof PsiReferenceExpression)) return null; PsiParameter parameter = tryCast(((PsiReferenceExpression)reference).resolve(), PsiParameter.class); if (parameter == null) return null; PsiParameterList parameterList = tryCast(parameter.getP... | makeFix |
71,103 | String () { return JavaBundle.message("inspection.surround.if.quickfix", myText, mySuffix); } | getName |
71,104 | void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { PsiElement anchorStatement = CommonJavaRefactoringUtil.getParentStatement(element, false); LOG.assertTrue(anchorStatement != null); if (anchorStatement.getParent() instanceof PsiLambdaExpression) { final PsiCodeBlock body = C... | applyFix |
71,105 | String () { return JavaBundle.message("inspection.surround.if.family"); } | getFamilyName |
71,106 | boolean (PsiExpression qualifier) { if (!qualifier.isValid() || qualifier.getText() == null) { return false; } PsiStatement statement = PsiTreeUtil.getParentOfType(qualifier, PsiStatement.class); if (statement == null) return false; PsiElement parent = statement.getParent(); return !(parent instanceof PsiForStatement);... | isAvailable |
71,107 | PsiElementVisitor (@NotNull final ProblemsHolder holder, boolean isOnTheFly) { return new JavaElementVisitor() { @Override public void visitMethodReferenceExpression(@NotNull PsiMethodReferenceExpression expression) { final PsiExpression qualifierExpression = expression.getQualifierExpression(); final PsiElement refere... | buildVisitor |
71,108 | void (@NotNull PsiMethodReferenceExpression expression) { final PsiExpression qualifierExpression = expression.getQualifierExpression(); final PsiElement referenceNameElement = expression.getReferenceNameElement(); doCheckCall(expression, () -> expression.resolve(), qualifierExpression, referenceNameElement, Inspection... | visitMethodReferenceExpression |
71,109 | void (@NotNull PsiLambdaExpression lambdaExpression) { PsiElement body = lambdaExpression.getBody(); PsiExpression asMethodReference = LambdaCanBeMethodReferenceInspection .canBeMethodReferenceProblem(body, lambdaExpression.getParameterList().getParameters(), lambdaExpression.getFunctionalInterfaceType(), null); if (as... | visitLambdaExpression |
71,110 | void (PsiFunctionalExpression expression, Supplier<? extends PsiElement> resolver, PsiExpression qualifierExpression, PsiElement referenceNameElement, final @InspectionMessage String errorMessage) { if (qualifierExpression != null && referenceNameElement != null && !(qualifierExpression instanceof PsiSuperExpression)) ... | doCheckCall |
71,111 | String () { return InspectionGadgetsBundle.message("replace.method.ref.with.qualifier.fix.family.name"); } | getFamilyName |
71,112 | void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { PsiElement parent = element.getParent(); if (parent instanceof PsiMethodReferenceExpression) { final PsiExpression qualifierExpression = ((PsiMethodReferenceExpression)parent).getQualifierExpression(); if (qualifierExpression... | applyFix |
71,113 | String () { return JavaBundle.message("inspection.unused.assignment.remove.assignment.quickfix"); } | getFamilyName |
71,114 | ModCommand (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { final PsiElement element = descriptor.getPsiElement(); PsiAssignmentExpression parentExpr = getAssignment(descriptor); if (parentExpr == null) return ModCommand.nop(); if (!ExpressionUtils.isVoidContext(parentExpr)) { return ModCommand.psiUp... | perform |
71,115 | PsiExpression (@NotNull PsiAssignmentExpression assignmentExpr) { final IElementType operationSign = assignmentExpr.getOperationTokenType(); PsiExpression result = assignmentExpr.getRExpression(); if (JavaTokenType.EQ != operationSign && result != null) { result = DeclarationJoinLinesHandler.getInitializerExpression(as... | getInitializer |
71,116 | PsiElement (@NotNull PsiElement expr, @NotNull PsiAssignmentExpression parentExpr) { PsiElement result = null; if (expr instanceof PsiReferenceExpression) { result = ((PsiReferenceExpression)expr).resolve(); } else { final PsiExpression lExpr = PsiUtil.deparenthesizeExpression(parentExpr.getLExpression()); if (lExpr in... | resolveExpression |
71,117 | String () { return JavaBundle.message("inspection.unused.return.value.make.void.quickfix"); } | getFamilyName |
71,118 | void (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { PsiMethod psiMethod = null; if (myProcessor != null) { RefElement refElement = (RefElement)myProcessor.getElement(descriptor); if (refElement instanceof RefMethod refMethod && refElement.isValid()) { psiMethod = refMethod.getUastElement().getJavaP... | applyFix |
71,119 | IntentionPreviewInfo (@NotNull Project project, @NotNull ProblemDescriptor previewDescriptor) { PsiMethod method = PsiTreeUtil.getParentOfType(previewDescriptor.getPsiElement(), PsiMethod.class); if (method == null) return IntentionPreviewInfo.EMPTY; PsiTypeElement returnTypeElement = method.getReturnTypeElement(); if ... | generatePreview |
71,120 | boolean () { return false; } | startInWriteAction |
71,121 | PsiElement (@NotNull PsiFile currentFile) { return currentFile; } | getElementToMakeWritable |
71,122 | void (Project project, @NotNull PsiMethod psiMethod) { SmartList<PsiMethod> methodsToModify = new SmartList<>(psiMethod); if (!ProgressManager.getInstance().runProcessWithProgressSynchronously(() -> { methodsToModify.addAll(OverridingMethodsSearch.search(psiMethod).findAll()); }, JavaBundle.message("psi.search.overridi... | makeMethodHierarchyVoid |
71,123 | void (@NotNull final PsiMethod method) { final PsiReturnStatement[] statements = PsiUtil.findReturnStatements(method); if (statements.length > 0) { for (int i = statements.length - 1; i >= 0; i--) { PsiReturnStatement returnStatement = statements[i]; try { final PsiExpression expression = returnStatement.getReturnValue... | replaceReturnStatements |
71,124 | boolean (@NotNull PsiElement element) { return SyntaxTraverser.psiApi() .parents(element) .takeWhile(e -> !(e instanceof PsiExpression)) .find(e -> e instanceof PsiImportStatementBase || e instanceof PsiPackageStatement) != null; } | ignoreLongLineFor |
71,125 | PsiLocalVariable () { return myIterator; } | getIterator |
71,126 | boolean (PsiExpression condition) { return isIteratorMethodCall(condition, "hasNext"); } | isHasNextCall |
71,127 | PsiElement (PsiExpression parent) { PsiElement element = PsiUtil.getVariableCodeBlock(myIterator, null); PsiCodeBlock block = element instanceof PsiCodeBlock ? (PsiCodeBlock)element : PsiTreeUtil.getParentOfType(element, PsiCodeBlock.class); if (block == null) return null; return StreamEx.of(DefUseUtil.getRefs(block, m... | findOnlyIteratorRef |
71,128 | boolean (PsiElement candidate, String method) { while (candidate instanceof PsiParenthesizedExpression) { candidate = ((PsiParenthesizedExpression)candidate).getExpression(); } if (!(candidate instanceof PsiMethodCallExpression call)) return false; if (!call.getArgumentList().isEmpty()) return false; PsiReferenceExpres... | isIteratorMethodCall |
71,129 | boolean (PsiExpression candidate) { return isIteratorMethodCall(candidate, "remove"); } | isRemoveCall |
71,130 | PsiVariable (PsiStatement statement) { PsiLocalVariable var = getDeclaredVariable(statement); if (var == null || !isIteratorMethodCall(var.getInitializer(), "next")) return null; return var; } | getNextElementVariable |
71,131 | PsiLocalVariable (PsiStatement statement) { if (!(statement instanceof PsiDeclarationStatement declaration)) return null; PsiElement[] elements = declaration.getDeclaredElements(); if (elements.length != 1) return null; return ObjectUtils.tryCast(elements[0], PsiLocalVariable.class); } | getDeclaredVariable |
71,132 | IteratorDeclaration (PsiStatement statement) { PsiLocalVariable variable = getDeclaredVariable(statement); if (variable == null) return null; PsiExpression initializer = PsiUtil.skipParenthesizedExprDown(variable.getInitializer()); if (!(initializer instanceof PsiMethodCallExpression call)) return null; if (!call.getAr... | extract |
71,133 | IteratorDeclaration (PsiForStatement statement) { if (statement.getUpdate() != null) return null; PsiStatement initialization = statement.getInitialization(); IteratorDeclaration declaration = extract(initialization); if (declaration == null || !declaration.isHasNextCall(statement.getCondition())) return null; return d... | fromForLoop |
71,134 | IteratorDeclaration (PsiWhileStatement statement) { PsiElement previous = PsiTreeUtil.skipWhitespacesAndCommentsBackward(statement); if (!(previous instanceof PsiDeclarationStatement)) return null; IteratorDeclaration declaration = extract((PsiStatement)previous); if (declaration == null || !declaration.isHasNextCall(s... | fromWhileLoop |
71,135 | IteratorDeclaration (PsiLoopStatement statement) { if(statement instanceof PsiWhileStatement) { return fromWhileLoop((PsiWhileStatement)statement); } if(statement instanceof PsiForStatement) { return fromForLoop((PsiForStatement)statement); } return null; } | fromLoop |
71,136 | PsiExpression () { return myIterable; } | getIterable |
71,137 | boolean () { return myCollection; } | isCollection |
71,138 | JPanel (final List<String> list, final @NlsContexts.Label String borderTitle, final boolean acceptPatterns) { return createSpecialAnnotationsListControl(list, borderTitle, acceptPatterns, aClass -> aClass.isAnnotationType()); } | createSpecialAnnotationsListControl |
71,139 | JPanel (final List<String> list, final @NlsContexts.Label String borderTitle, final boolean acceptPatterns, final Predicate<? super PsiClass> isApplicable) { @SuppressWarnings("Convert2Diamond") SortedListModel<String> listModel = new SortedListModel<String>(Comparator.naturalOrder()); for (String s : list) { listModel... | createSpecialAnnotationsListControl |
71,140 | void (ListDataEvent e) { listChanged(); } | intervalAdded |
71,141 | void () { list.clear(); for (int i = 0; i < listModel.getSize(); i++) { list.add(listModel.getElementAt(i)); } } | listChanged |
71,142 | void (ListDataEvent e) { listChanged(); } | intervalRemoved |
71,143 | void (ListDataEvent e) { listChanged(); } | contentsChanged |
71,144 | JPanel (final @NlsContexts.Label String borderTitle, final boolean acceptPatterns, final SortedListModel<String> listModel, final Predicate<? super PsiClass> isApplicable) { final JList<String> injectionList = new JBList<>(listModel); injectionList.setBorder(JBUI.Borders.empty()); injectionList.setSelectionMode(ListSel... | createSpecialAnnotationsListControl |
71,145 | void (AnActionButton button) { Project project = CommonDataKeys.PROJECT.getData(DataManager.getInstance().getDataContext(injectionList)); if (project == null) project = ProjectManager.getInstance().getDefaultProject(); TreeClassChooser chooser = TreeClassChooserFactory.getInstance(project) .createWithInnerClassesScopeC... | run |
71,146 | boolean (PsiClass aClass) { return isApplicable.test(aClass); } | isAccepted |
71,147 | void (@NotNull AnActionEvent e) { String selectedPattern = Messages.showInputDialog(JavaBundle.message("special.annotations.list.annotation.pattern.message"), JavaBundle.message("special.annotations.list.annotation.pattern"), Messages.getQuestionIcon()); if (selectedPattern != null) { listModel.add(selectedPattern); } ... | actionPerformed |
71,148 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
71,149 | IntentionAction (final @IntentionName String text, final @IntentionFamilyName String family, final @Nls String listTitle, final List<String> targetList, final String qualifiedName) { return new IntentionAction() { @Override @NotNull public String getText() { return text; } @Override @NotNull public String getFamilyName... | createAddToSpecialAnnotationsListIntentionAction |
71,150 | String () { return text; } | getText |
71,151 | String () { return family; } | getFamilyName |
71,152 | boolean (@NotNull Project project, Editor editor, PsiFile file) { return true; } | isAvailable |
71,153 | boolean () { return false; } | startInWriteAction |
71,154 | IntentionPreviewInfo (@NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) { List<@NlsSafe String> prefixes = StreamEx.of(targetList).append(qualifiedName).sorted().toList(); return IntentionPreviewInfo.addListOption(prefixes, qualifiedName, listTitle); } | generatePreview |
71,155 | String (String qualifier, PsiVariable var, @NotNull PsiExpression trueExpression, PsiExpression falseExpression, @Nullable PsiType targetType, boolean useOrElseGet) { PsiExpression stripped = PsiUtil.skipParenthesizedExprDown(trueExpression); PsiType trueType = trueExpression.getType(); boolean trivialMap = ExpressionU... | generateOptionalUnwrap |
71,156 | String (PsiExpression expression, PsiType type) { return getMapTypeArgument(expression, type, null); } | getMapTypeArgument |
71,157 | String (PsiExpression expression, PsiType type, PsiExpression falseExpression) { if (!(type instanceof PsiClassType)) return ""; String text = expression.getText(); // PsiEmptyExpressionImpl might be passed here if (text.isEmpty()) return ""; PsiExpression copy = JavaPsiFacade.getElementFactory(expression.getProject())... | getMapTypeArgument |
71,158 | PsiParameter () { return myParameter; } | getParameter |
71,159 | boolean (PsiExpression candidate) { candidate = PsiUtil.skipParenthesizedExprDown(candidate); if (!(candidate instanceof PsiMethodCallExpression call)) return false; if (!COLLECTION_REMOVE.test(call)) return false; PsiExpression qualifier = call.getMethodExpression().getQualifierExpression(); if (!EquivalenceChecker.ge... | isRemoveCall |
71,160 | ForEachCollectionTraversal (@NotNull PsiForeachStatement loop) { PsiExpression collection = extractCollectionExpression(loop.getIteratedValue()); if (collection == null) return null; PsiType collectionElement = PsiUtil.substituteTypeParameter(collection.getType(), JAVA_UTIL_COLLECTION, 0, false); if (collectionElement ... | fromLoop |
71,161 | PsiExpression (PsiExpression expression) { expression = PsiUtil.skipParenthesizedExprDown(expression); if (expression instanceof PsiMethodCallExpression && COLLECTION_TO_ARRAY.test((PsiMethodCallExpression)expression)) { return PsiUtil.skipParenthesizedExprDown(((PsiMethodCallExpression)expression).getMethodExpression(... | extractCollectionExpression |
71,162 | LocalQuickFix (PsiParameter parameter) { return new NavigateToNullLiteralArguments(parameter); } | createNavigateToNullParameterUsagesFix |
71,163 | OptPane () { return pane( checkbox("REPORT_NOTNULL_PARAMETER_OVERRIDES_NULLABLE", JavaBundle.message("inspection.nullable.problems.method.overrides.notnull.option")), checkbox("REPORT_NOT_ANNOTATED_METHOD_OVERRIDES_NOTNULL", JavaBundle.message("inspection.nullable.problems.method.overrides.option"), checkbox("IGNORE_EX... | getOptionsPane |
71,164 | OptionController () { return super.getOptionController() .onValueSet((bindId, value) -> REPORT_ANNOTATION_NOT_PROPAGATED_TO_OVERRIDERS = REPORT_NOT_ANNOTATED_METHOD_OVERRIDES_NOTNULL); } | getOptionController |
71,165 | String () { return getFamilyName(); } | getText |
71,166 | String () { return JavaBundle.message("nullable.stuff.inspection.navigate.null.argument.usages.fix.family.name"); } | getFamilyName |
71,167 | void (@NotNull Project project, @NotNull PsiFile file, @NotNull PsiElement startElement, @NotNull PsiElement endElement) { PsiParameter p = (PsiParameter)startElement; final PsiMethod method = PsiTreeUtil.getParentOfType(p, PsiMethod.class); if (method == null) return; final int parameterIdx = ArrayUtil.find(method.get... | invoke |
71,168 | void (@NotNull final Processor<? super Usage> processor) { ReadAction.run(() -> JavaNullMethodArgumentUtil.searchNullArgument(method, parameterIdx, (arg) -> processor.process(new UsageInfo2UsageAdapter(new UsageInfo(arg))))); } | generate |
71,169 | boolean () { return false; } | startInWriteAction |
71,170 | IntentionPreviewInfo (@NotNull Project project, @NotNull ProblemDescriptor previewDescriptor) { return new IntentionPreviewInfo.Html( JavaBundle.message("nullable.stuff.inspection.navigate.null.argument.usages.fix.family.preview") ); } | generatePreview |
71,171 | OptPane () { return pane( checkbox(IGNORE_IMPLICITLY_WRITTEN_FIELDS_NAME, JavaBundle.message("inspection.notnull.field.not.initialized.option.implicit")) .description(HtmlChunk.raw(JavaBundle.message("inspection.notnull.field.not.initialized.option.implicit.description"))), checkbox(IGNORE_FIELDS_WRITTEN_IN_SETUP_NAME,... | getOptionsPane |
71,172 | PsiElementVisitor (@NotNull ProblemsHolder holder, boolean isOnTheFly) { return new JavaElementVisitor() { @Override public void visitField(@NotNull PsiField field) { NullableNotNullManager manager = NullableNotNullManager.getInstance(holder.getProject()); NullabilityAnnotationInfo info = manager.findEffectiveNullabili... | buildVisitor |
71,173 | void (@NotNull PsiField field) { NullableNotNullManager manager = NullableNotNullManager.getInstance(holder.getProject()); NullabilityAnnotationInfo info = manager.findEffectiveNullabilityInfo(field); if (info == null || info.getNullability() != Nullability.NOT_NULL || HighlightControlFlowUtil.isFieldInitializedAfterOb... | visitField |
71,174 | void (@NotNull ProblemsHolder holder, PsiElement anchor, @InspectionMessage String message, List<LocalQuickFix> fixes) { holder.registerProblem(anchor, message, fixes.toArray(LocalQuickFix.EMPTY_ARRAY)); } | reportProblem |
71,175 | boolean (PsiField field) { PsiMethod method = TestFrameworks.getInstance().findSetUpMethod(field.getContainingClass()); if (method != null) { PsiCodeBlock body = method.getBody(); if (body != null && HighlightControlFlowUtil.variableDefinitelyAssignedIn(field, body)) { return true; } } return false; } | isWrittenInSetup |
71,176 | boolean (@NotNull PsiReferenceExpression ref) { if (mayHaveSideEffect(ref.getQualifierExpression())) { return true; } PsiElement resolved = ref.resolve(); if (resolved instanceof PsiLocalVariable || resolved instanceof PsiParameter || resolved instanceof PsiClass || resolved instanceof PsiPackage) { return false; } if ... | calculateReferenceSideEffect |
71,177 | boolean (@NotNull PsiMethodCallExpression call) { PsiMethod method = call.resolveMethod(); return methodMayHaveSideEffect(method) || calculateSideEffect(call, call.getMethodExpression().getQualifierExpression()); } | calculateCallSideEffect |
71,178 | boolean (@NotNull PsiNewExpression newExpr) { if (newExpr.getAnonymousClass() != null || mayHaveSideEffect(newExpr.getArrayInitializer())) { return true; } PsiJavaCodeReferenceElement ref = newExpr.getClassReference(); return ref == null || !(ref.resolve() instanceof PsiClass psiClass) || !ClassUtils.isImmutableClass(p... | calculateNewSideEffect |
71,179 | boolean (@NotNull PsiCallExpression call, @Nullable PsiExpression qualifier) { PsiExpressionList argumentList = call.getArgumentList(); if (argumentList != null) { for (PsiExpression argument : argumentList.getExpressions()) { if (mayHaveSideEffect(argument)) return true; } } return mayHaveSideEffect(qualifier); } | calculateSideEffect |
71,180 | boolean (@Nullable PsiMethod method) { if (method == null) return true; PsiClass psiClass = method.getContainingClass(); if (psiClass == null) return true; String className = psiClass.getQualifiedName(); if (className == null) { return true; } if (MethodUtils.isEquals(method) || MethodUtils.isHashCode(method) || Method... | methodMayHaveSideEffect |
71,181 | boolean (@Nullable PsiExpression expression) { return expression instanceof PsiAssignmentExpression || PsiUtil.isIncrementDecrementOperation(expression); } | isDefinitelyWithSideEffect |
71,182 | PsiElementVisitor (@NotNull ProblemsHolder holder, boolean isOnTheFly, @NotNull LocalInspectionToolSession session) { return new JavaElementVisitor() { @Override public void visitExpression(@NotNull PsiExpression expression) { super.visitExpression(expression); if (expression instanceof PsiParenthesizedExpression) { re... | buildVisitor |
71,183 | void (@NotNull PsiExpression expression) { super.visitExpression(expression); if (expression instanceof PsiParenthesizedExpression) { return; } visitExpressionImpl(expression); } | visitExpression |
71,184 | void (@NotNull PsiReferenceExpression expression) { super.visitReferenceExpression(expression); if (expression.getParent() instanceof PsiCallExpression) { return; } visitExpressionImpl(expression); } | visitReferenceExpression |
71,185 | void (PsiExpression expression) { if (ComplexityCalculator.isDefinitelySimple(expression) || SideEffectCalculator.isDefinitelyWithSideEffect(expression) || expression instanceof PsiLambdaExpression || ExpressionUtils.isVoidContext(expression)) { return; } DuplicateExpressionsContext context = DuplicateExpressionsContex... | visitExpressionImpl |
71,186 | void (@NotNull PsiMethod method) { super.visitMethod(method); PsiCodeBlock body = method.getBody(); if (body != null) { registerProblemsForExpressions(body, session); } } | visitMethod |
71,187 | void (@NotNull PsiClassInitializer initializer) { super.visitClassInitializer(initializer); registerProblemsForExpressions(initializer.getBody(), session); } | visitClassInitializer |
71,188 | void (@NotNull PsiLambdaExpression expression) { super.visitLambdaExpression(expression); PsiElement body = expression.getBody(); if (body instanceof PsiCodeBlock) { registerProblemsForExpressions((PsiCodeBlock)body, session); } } | visitLambdaExpression |
71,189 | void (@NotNull PsiCodeBlock body, @NotNull UserDataHolder session) { DuplicateExpressionsContext context = DuplicateExpressionsContext.getContext(body, session); if (context == null) return; Set<PsiExpression> processed = new HashSet<>(); context.forEach((pattern, occurrences) -> { if (!processed.contains(pattern)) { p... | registerProblemsForExpressions |
71,190 | void (@NotNull List<? extends PsiExpression> occurrences, @NotNull PsiCodeBlock body) { if (occurrences.size() > 1 && areSafeToExtract(occurrences, body)) { Map<PsiExpression, List<PsiVariable>> reusableVariables = collectReusableVariables(occurrences); for (PsiExpression occurrence : occurrences) { List<LocalQuickFix>... | registerProblems |
71,191 | boolean (@NotNull List<? extends PsiExpression> occurrences, @NotNull PsiCodeBlock body) { if (occurrences.isEmpty()) return false; Project project = occurrences.get(0).getProject(); Set<PsiVariable> variables = collectVariablesSafeToExtract(occurrences); if (variables == null) return false; if (variables.isEmpty()) re... | areSafeToExtract |
71,192 | Set<PsiVariable> (@NotNull List<? extends PsiExpression> occurrences) { Set<PsiVariable> variables = new HashSet<>(); Ref<Boolean> refFailed = new Ref<>(Boolean.FALSE); JavaRecursiveElementWalkingVisitor visitor = new JavaRecursiveElementWalkingVisitor() { @Override public void visitReferenceElement(@NotNull PsiJavaCod... | collectVariablesSafeToExtract |
71,193 | void (@NotNull PsiJavaCodeReferenceElement reference) { super.visitReferenceElement(reference); PsiElement resolved = reference.resolve(); if (PsiUtil.isJvmLocalVariable(resolved)) { variables.add((PsiVariable)resolved); } else if (resolved instanceof PsiVariable && !((PsiVariable)resolved).hasModifierProperty(PsiModif... | visitReferenceElement |
71,194 | boolean (@NotNull PsiExpression originalOccurrence, @NotNull List<? extends PsiExpression> occurrences, @NotNull PsiVariable variable) { return ContainerUtil.exists(occurrences, occurrence -> occurrence != originalOccurrence && canReplaceWith(occurrence, variable)); } | canReplaceOtherOccurrences |
71,195 | boolean (@NotNull PsiExpression occurrence, @NotNull PsiVariable variable) { String variableName = variable.getName(); if (variableName == null) { return false; } PsiElementFactory factory = JavaPsiFacade.getElementFactory(variable.getProject()); PsiExpression refExpr; try { refExpr = factory.createExpressionFromText(v... | canReplaceWith |
71,196 | PsiVariable (@NotNull PsiExpression expression) { PsiElement parent = PsiUtil.skipParenthesizedExprUp(expression.getParent()); if (parent instanceof PsiVariable variable && PsiTreeUtil.isAncestor(variable.getInitializer(), expression, false)) { return variable; } return null; } | findVariableByInitializer |
71,197 | OptPane () { return pane( number("complexityThreshold", JavaBundle.message("inspection.duplicate.expressions.complexity.threshold"), 1, 1000)); } | getOptionsPane |
71,198 | String () { return JavaBundle.message("inspection.duplicate.expressions.introduce.variable.fix.family.name"); } | getFamilyName |
71,199 | String () { return JavaBundle.message("inspection.duplicate.expressions.introduce.variable.fix.name", myExpressionText); } | getName |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.