Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
54,000 | int () { return 1; } | getP |
54,001 | void (int value) { } | setP |
54,002 | void () { new A().getP(); new A().setP(1); new AA().getP(); new AA().setP(1); new J().getP(); new J().setP(1); new B().getP(); new B().setP(1); } | test |
54,003 | int () { return 1; } | getP |
54,004 | void (int value) { } | setP |
54,005 | void () { new A().getP(); new A().setP(1); new AA().getP(); new AA().setP(1); new J().getP(); new J().setP(1); new B().getP(); new B().setP(1); } | test |
54,006 | int () { return 1; } | getP |
54,007 | void (int value) { } | setP |
54,008 | void () { new A().getP(); new A().setP(1); new AA().getP(); new AA().setP(1); new J().getP(); new J().setP(1); new B().getP(); new B().setP(1); } | test |
54,009 | void (JavaSAM sam) { } | takeSAM |
54,010 | NestedPublic () { return (NestedPublic) new Object(); } | getNested |
54,011 | List<A> () { A a = new A(1, "", ""); return Collections.singletonList(a); } | getA |
54,012 | void (A a) { } | takeA |
54,013 | A () { return new A(1, "", ""); } | getAPrivate |
54,014 | void (A a) { } | takeAPrivate |
54,015 | String () { return "//"; } | getLineCommentPrefix |
54,016 | String () { return "/*"; } | getBlockCommentPrefix |
54,017 | String () { return "*/"; } | getBlockCommentSuffix |
54,018 | String () { return null; } | getCommentedBlockCommentPrefix |
54,019 | String () { return null; } | getCommentedBlockCommentSuffix |
54,020 | IElementType () { return KtTokens.EOL_COMMENT; } | getLineCommentTokenType |
54,021 | IElementType () { return KtTokens.BLOCK_COMMENT; } | getBlockCommentTokenType |
54,022 | IElementType () { return KtTokens.DOC_COMMENT; } | getDocumentationCommentTokenType |
54,023 | String () { return "/**"; } | getDocumentationCommentPrefix |
54,024 | String () { return "*"; } | getDocumentationCommentLinePrefix |
54,025 | String () { return "*/"; } | getDocumentationCommentSuffix |
54,026 | boolean (PsiComment element) { return element instanceof KDoc; } | isDocumentationComment |
54,027 | boolean (PsiReference ref) { // copied from Java if (!(ref instanceof PsiReferenceExpression || ref instanceof KtReference)) { if (!(ref instanceof PsiElement)) { return true; } PsiElement parent = ((PsiElement) ref).getParent(); if (parent instanceof PsiNewExpression) { if (((PsiNewExpression) parent).getClassReferenc... | processInReadAction |
54,028 | void (@NotNull KtElement element) { if (deepTraversal || !(element instanceof KtClassOrObject || element instanceof KtNamedFunction)) { super.visitKtElement(element); } } | visitKtElement |
54,029 | void (@NotNull KtSimpleNameExpression expression) { DeclarationDescriptor descriptor = bindingContext.get(BindingContext.REFERENCE_TARGET, expression); if (descriptor == null) return; PsiElement declaration = DescriptorToSourceUtils.descriptorToDeclaration(descriptor); if (declaration == null) return; if (isProperty(de... | visitSimpleNameExpression |
54,030 | boolean (DeclarationDescriptor descriptor, PsiElement declaration, KtSimpleNameExpression reference) { KtCallElement callElement = PsiTreeUtil.getParentOfType(reference, KtCallElement.class); if (callElement == null || !PsiTreeUtil.isAncestor(callElement.getCalleeExpression(), reference, false)) return false; return de... | isCallable |
54,031 | boolean (DeclarationDescriptor descriptor, PsiElement declaration) { return descriptor instanceof PropertyDescriptor && declaration instanceof KtProperty; } | isProperty |
54,032 | boolean (@Nullable LongRunningReadTask<RequestInfo, ResultData> previousTask) { ThreadingAssertions.assertEventDispatchThread(); if (currentState != State.INITIALIZED) { throw new IllegalStateException("Task should be initialized state. Call init() method."); } // Cancel previous task if necessary if (previousTask != n... | shouldStart |
54,033 | void () { ThreadingAssertions.assertEventDispatchThread(); if (currentState != State.INITIALIZED) { throw new IllegalStateException("Task should be initialized with init() method"); } if (requestInfo == null) { throw new IllegalStateException("Invalid request for task beginning"); } currentState = State.STARTED; before... | run |
54,034 | boolean () { ThreadingAssertions.assertEventDispatchThread(); requestInfo = prepareRequestInfo(); currentState = State.INITIALIZED; return requestInfo != null; } | init |
54,035 | void (ResultData resultData) { ThreadingAssertions.assertEventDispatchThread(); currentState = State.FINISHED; if (resultData != null) { RequestInfo actualInfo = prepareRequestInfo(); if (requestInfo.equals(actualInfo)) { currentState = State.FINISHED_WITH_ACTUAL_DATA; onResultReady(actualInfo, resultData); } } } | resultReady |
54,036 | RequestInfo (@NotNull RequestInfo requestInfo) { RequestInfo cloneRequestInfo = prepareRequestInfo(); if (cloneRequestInfo == null) { throw new IllegalStateException("Cloned request object can't be null"); } return cloneRequestInfo; } | cloneRequestInfo |
54,037 | void () {} | hideResultOnInvalidLocation |
54,038 | void () {} | beforeRun |
54,039 | void (@NotNull RequestInfo requestInfo, @Nullable ResultData resultData) {} | onResultReady |
54,040 | void ( @NotNull final ProgressIndicator indicator, @NotNull Disposable parentDisposable, @NotNull final Runnable action ) { Disposable disposable = Disposer.newDisposable(); Disposer.register(parentDisposable, disposable); ApplicationListener listener = new ApplicationListener() { @Override public void beforeWriteActio... | runWithWriteActionPriority |
54,041 | void (@NotNull Object action) { indicator.cancel(); } | beforeWriteActionStart |
54,042 | JComponent () { panelScriptDefinitionsChooser.setLayout(new VerticalLayout(0)); panelScriptDefinitionsChooser.add(new TitledSeparator(KotlinBundle.message("kotlin.script.definitions.title"))); JLabel commentLabel = new JLabel(KotlinBundle.message("kotlin.script.definitions.model.name.autoReloadScriptDependencies.descri... | createComponent |
54,043 | boolean () { for (UnnamedConfigurable supportSpecificSetting : scriptingSupportSettingsConfigurables) { if (supportSpecificSetting.isModified()) { return true; } } return isScriptDefinitionsChanged(); } | isModified |
54,044 | void () { model.setDefinitions(manager.getAllDefinitions(), settings); for (UnnamedConfigurable supportSpecificSetting : scriptingSupportSettingsConfigurables) { supportSpecificSetting.reset(); } } | reset |
54,045 | boolean () { for (ModelDescriptor item : model.getItems()) { if (settings.isScriptDefinitionEnabled(item.getDefinition()) != item.isEnabled()) { return true; } if (settings.autoReloadConfigurations(item.getDefinition()) != item.getAutoReloadConfigurations()) { return true; } } return !model.getDefinitions().equals(mana... | isScriptDefinitionsChanged |
54,046 | String () { return KotlinBundle.message("script.name.kotlin.scripting"); } | getDisplayName |
54,047 | String () { return ID; } | getId |
54,048 | StructureViewBuilder (@NotNull PsiFile psiFile) { if (!(psiFile instanceof KtFile file)) { return null; } boolean isSingleClassFile = KotlinIconProvider.Companion.isSingleClassFile(file); return new TreeBasedStructureViewBuilder() { @Override public @NotNull StructureViewModel createStructureViewModel(@Nullable Editor ... | getStructureViewBuilder |
54,049 | StructureViewModel (@Nullable Editor editor) { return new KotlinStructureViewModel(file, editor, new KotlinStructureViewElement(file, false)) { @Override public @NotNull Collection<NodeProvider<?>> getNodeProviders() { return NODE_PROVIDERS; } }; } | createStructureViewModel |
54,050 | boolean () { return !isSingleClassFile; } | isRootNodeShown |
54,051 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
54,052 | void (AnActionEvent event) { Presentation p = event.getPresentation(); boolean hasProject = event.getData(CommonDataKeys.PROJECT) != null; p.setVisible(hasProject); } | update |
54,053 | Component ( JList list, Object value, int index, boolean isSelected, boolean cellHasFocus ) { super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); @NlsSafe String text = ((KotlinGenerateToStringAction.Generator) value).getText(); setText(text); return this; } | getListCellRendererComponent |
54,054 | boolean () { return generateSuperCheckBox != null && generateSuperCheckBox.isSelected(); } | isGenerateSuperCall |
54,055 | Component (JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { Component result = super.getListCellRendererComponent(list, "", index, isSelected, cellHasFocus); if (value == null) return result; TestFramework framework = (TestFramework) value; setIcon(framework.getIcon()); setText(framework... | getListCellRendererComponent |
54,056 | KotlinType (@NotNull CallableDescriptor descriptor) { KotlinType matchingReturnType = null; for (CallableDescriptor overriddenDescriptor : descriptor.getOverriddenDescriptors()) { KotlinType overriddenReturnType = overriddenDescriptor.getReturnType(); if (overriddenReturnType == null) { return null; } if (matchingRetur... | findLowerBoundOfOverriddenCallablesReturnTypes |
54,057 | boolean (KtExpression block, KtExpression expression) { if (block == expression) return true; return block instanceof KtBlockExpression && expression.getParent() == block && PsiTreeUtil.getNextSiblingOfType(expression, KtExpression.class) == null; } | equalOrLastInBlock |
54,058 | KtIfExpression (@Nullable KtExpression expression) { KtIfExpression ifExpression = PsiTreeUtil.getParentOfType(expression, KtIfExpression.class, true); if (ifExpression == null) return null; if (equalOrLastInBlock(ifExpression.getThen(), expression) || equalOrLastInBlock(ifExpression.getElse(), expression)) { return if... | getParentIfForBranch |
54,059 | KtWhenExpression (@Nullable KtExpression expression) { KtWhenEntry whenEntry = PsiTreeUtil.getParentOfType(expression, KtWhenEntry.class, true); if (whenEntry == null) return null; KtExpression whenEntryExpression = whenEntry.getExpression(); if (whenEntryExpression == null) return null; if (!equalOrLastInBlock(whenEnt... | getParentWhenForBranch |
54,060 | KtExpression (@Nullable KtExpression expression) { KtExpression parent = getParentIfForBranch(expression); if (parent != null) return parent; return getParentWhenForBranch(expression); } | getParentForBranch |
54,061 | boolean (KtExpression parent, KtExpression child) { if (parent == null || child == null) { return false; } while (parent != child) { PsiElement childParent = child.getParent(); if (childParent instanceof KtParenthesizedExpression) { child = (KtExpression) childParent; continue; } if (childParent instanceof KtDotQualifi... | canEvaluateTo |
54,062 | boolean (@NotNull KtDeclaration functionOrGetter, @NotNull KtExpression expression) { if (functionOrGetter instanceof KtFunctionLiteral) { KtBlockExpression functionLiteralBody = ((KtFunctionLiteral) functionOrGetter).getBodyExpression(); PsiElement returnedElement = null; if (functionLiteralBody != null) { PsiElement[... | canFunctionOrGetterReturnExpression |
54,063 | boolean () { return false; } | canNavigate |
54,064 | boolean () { return false; } | canNavigateToSource |
54,065 | void (@NotNull SliceUsageCellRendererBase renderer, @NotNull JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { renderer.append(myClassName, SimpleTextAttributes.DARK_TEXT); } | customizeCellRenderer |
54,066 | String () { return myClassName; } | getNodeText |
54,067 | void (NullAnalysisResult result, SliceRootNode oldRoot, final Map<SliceNode, NullAnalysisResult> map) { SliceRootNode root = createNewTree(result, oldRoot, map); SliceUsage rootUsage = oldRoot.getCachedChildren().get(0).getValue(); SliceManager.getInstance(root.getProject()) .createToolWindow(true, root, true, SliceMan... | groupByNullness |
54,068 | SliceRootNode (NullAnalysisResult result, SliceRootNode oldRoot, final Map<SliceNode, NullAnalysisResult> map) { SliceRootNode root = oldRoot.copy(); assert oldRoot.getCachedChildren().size() == 1; SliceNode oldRootStart = oldRoot.getCachedChildren().get(0); root.setChanged(); root.targetEqualUsages.clear(); List<Hacke... | createNewTree |
54,069 | HackedSliceLeafValueClassNode ( NullAnalysisResult result, SliceRootNode oldRoot, final Map<SliceNode, NullAnalysisResult> map, SliceRootNode root, SliceNode oldRootStart, String nodeName, final int group) { Collection<PsiElement> groupedByValue = result.groupedByValue[group]; if (groupedByValue.isEmpty()) { return nul... | createValueRootNode |
54,070 | void (@NotNull AbstractTreeStructure treeStructure, @NotNull Runnable finish) { final SliceRootNode root = (SliceRootNode)treeStructure.getRootElement(); final Ref<NullAnalysisResult> leafExpressions = Ref.create(null); final Map<SliceNode, NullAnalysisResult> map = createMap(); ProgressManager.getInstance().run(new Ta... | startAnalyzeNullness |
54,071 | void (@NotNull final ProgressIndicator indicator) { NullAnalysisResult l = calcNullableLeaves(root, treeStructure, map); leafExpressions.set(l); } | run |
54,072 | void () { finish.run(); } | onCancel |
54,073 | void () { try { NullAnalysisResult leaves = leafExpressions.get(); if (leaves == null) return; //cancelled groupByNullness(leaves, root, map); } finally { finish.run(); } } | onSuccess |
54,074 | NullAnalysisResult (@NotNull SliceNode node, @NotNull Map<SliceNode, NullAnalysisResult> nulls) { return nulls.get(node); } | node |
54,075 | Collection<PsiElement> (@NotNull SliceNode node, @NotNull Map<SliceNode, NullAnalysisResult> nulls, int group) { return nulls.get(node).groupedByValue[group]; } | group |
54,076 | NullAnalysisResult (@NotNull final SliceNode root, @NotNull AbstractTreeStructure treeStructure, @NotNull final Map<SliceNode, NullAnalysisResult> map) { final SliceLeafAnalyzer.SliceNodeGuide guide = new SliceLeafAnalyzer.SliceNodeGuide(treeStructure); WalkingState<SliceNode> walkingState = new WalkingState<SliceNode>... | calcNullableLeaves |
54,077 | void (@NotNull final SliceNode element) { element.calculateDupNode(); node(element, map).clear(); SliceNode duplicate = element.getDuplicate(); if (duplicate != null) { node(element, map).add(node(duplicate, map)); } else { final PsiElement value = ReadAction.compute(() -> element.getValue().getElement()); boolean canB... | visit |
54,078 | void (@NotNull SliceNode element) { SliceNode parent = guide.getParent(element); if (parent != null) { node(parent, map).add(node(element, map)); } } | elementFinished |
54,079 | Nullability (final PsiElement element) { throw new UnsupportedOperationException(); } | checkNullability |
54,080 | void () { for (Collection<PsiElement> elements : groupedByValue) { elements.clear(); } } | clear |
54,081 | void (NullAnalysisResult duplicate) { for (int i = 0; i < groupedByValue.length; i++) { Collection<PsiElement> elements = groupedByValue[i]; Collection<PsiElement> other = duplicate.groupedByValue[i]; elements.addAll(other); } } | add |
54,082 | void () { mySelectedElements = myList.getSelectedValuesList().toArray(new Object[0]); super.doOKAction(); } | doOKAction |
54,083 | JComponent () { final JPanel panel = new JPanel(new BorderLayout(UIUtil.DEFAULT_HGAP, UIUtil.DEFAULT_VGAP)); myList = new JBList(myNamedElements); myList.setCellRenderer(new KotlinImportListRenderer()); panel.add(ScrollPaneFactory.createScrollPane(myList), BorderLayout.CENTER); panel.add(new JBLabel(myContainsClassesOn... | createCenterPanel |
54,084 | String () { return "#com.intellij.codeInsight.editorActions.RestoreReferencesDialog"; } | getDimensionServiceKey |
54,085 | Object[] () { return mySelectedElements; } | getSelectedElements |
54,086 | Component (JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { Component component = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); setIcon(null); return component; } | getListCellRendererComponent |
54,087 | JComponent () { return panel; } | createCenterPanel |
54,088 | Container () { return panel; } | getContentPane |
54,089 | void () { if (donTShowThisCheckBox.isSelected()) { KotlinEditorOptions.getInstance().setDonTShowConversionDialog(true); } super.doOKAction(); } | doOKAction |
54,090 | void () { super.dispose(); } | dispose |
54,091 | BitSet (boolean applyDefaults) { BitSet state = new BitSet(5); state.set(0, applyDefaults || cbSearchInComments.isSelected()); //cbSearchInComments default is true state.set(1, applyDefaults || cbSearchTextOccurrences.isSelected()); //cbSearchTextOccurrences default is true state.set(2, applyDefaults || cbDeleteEmptySo... | getCheckboxesState |
54,092 | List<KtFile> (@NotNull Collection<KtNamedDeclaration> elementsToMove) { return CollectionsKt.distinct( CollectionsKt.map( elementsToMove, KtPureElement::getContainingKtFile ) ); } | getSourceFiles |
54,093 | List<KtNamedDeclaration> (Collection<KtFile> sourceFiles) { return CollectionsKt.filterIsInstance( CollectionsKt.flatMap( sourceFiles, KtPsiUtilKt::getFileOrScriptDeclarations ), KtNamedDeclaration.class ); } | getAllDeclarations |
54,094 | void ( @NotNull Set<KtNamedDeclaration> elementsToMove, @NotNull List<KtNamedDeclaration> declarations ) { //KotlinMemberInfo run resolve on declaration so it is good to place it to the process List<KotlinMemberInfo> memberInfos = MoveUtilKt.mapWithReadActionInProcess(declarations, myProject, MoveHandler.getRefactoring... | initMemberInfo |
54,095 | void () { tfFileNameInPackage.setText(MoveUtilKt.guessNewFileName(getSelectedElementsToMove())); } | updateSuggestedFileName |
54,096 | void () { boolean movingSingleFileToPackage = rbMoveToPackage.isSelected() && getSourceFiles(getSelectedElementsToMove()).size() == 1; tfFileNameInPackage.setEnabled(movingSingleFileToPackage); } | updateFileNameInPackageField |
54,097 | void ( String targetPackageName, PsiDirectory targetDirectory, List<KtFile> sourceFiles ) { if (targetPackageName != null) { classPackageChooser.prependItem(targetPackageName); classPackageChooser.setEnabled(freezeTargets); } ((KotlinDestinationFolderComboBox) destinationFolderCB).setData( myProject, targetDirectory, s... | initPackageChooser |
54,098 | void ( boolean searchInComments, boolean searchForTextOccurences, boolean deleteEmptySourceFiles, boolean moveMppDeclarations, List<KtNamedDeclaration> allDeclarations ) { cbSearchInComments.setSelected(searchInComments); cbSearchTextOccurrences.setSelected(searchForTextOccurences); cbDeleteEmptySourceFiles.setSelected... | initSearchOptions |
54,099 | void (boolean moveToPackage) { if (moveToPackage) { rbMoveToPackage.setSelected(true); } else { rbMoveToFile.setSelected(true); } rbMoveToPackage.addActionListener( e -> { classPackageChooser.requestFocus(); updateControls(); } ); rbMoveToFile.addActionListener( e -> { fileChooser.requestFocus(); updateControls(); } );... | initMoveToButtons |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.