Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
62,300
File (@NotNull JpsModule m) { File outputDirectory = JpsJavaExtensionService.getInstance().getOutputDirectory(m, false); File file = new File(outputDirectory, getTestName(false) + ".class"); assertTrue(file.getAbsolutePath() + " not found", file.exists()); return file; }
getActualFile
62,301
void (byte[] classData, byte[] instrumentedClassData) { System.out.println(classDataToText(classData)); System.out.println(); System.out.println(classDataToText(instrumentedClassData)); }
printDebugInfo
62,302
String (byte[] data) { ByteArrayOutputStream buffer = new ByteArrayOutputStream(); @SuppressWarnings("ImplicitDefaultCharsetUsage") PrintWriter printWriter = new PrintWriter(buffer); TraceClassVisitor visitor = new TraceClassVisitor(printWriter); new ClassReader(data).accept(visitor, 0); return buffer.toString(); }
classDataToText
62,303
boolean (byte @NotNull [] classBytes, final @NotNull String methodName) { Ref<Boolean> contains = Ref.create(Boolean.FALSE); ClassVisitor visitor = new ClassVisitor(Opcodes.API_VERSION) { @Override public MethodVisitor visitMethod(int access, String name, String descriptor, String signature, String[] exceptions) { retu...
containsMethodCall
62,304
MethodVisitor (int access, String name, String descriptor, String signature, String[] exceptions) { return new MethodVisitor(Opcodes.API_VERSION) { @Override public void visitMethodInsn(int opcode, String owner, String name, String descriptor, boolean isInterface) { if (name.equals(methodName)) { contains.set(Boolean.T...
visitMethod
62,305
void (int opcode, String owner, String name, String descriptor, boolean isInterface) { if (name.equals(methodName)) { contains.set(Boolean.TRUE); } }
visitMethodInsn
62,306
List<Integer> (byte @NotNull [] classBytes) { List<Integer> lineNumbers = new ArrayList<>(); ClassVisitor visitor = new ClassVisitor(Opcodes.API_VERSION) { @Override public MethodVisitor visitMethod(int access, String name, String descriptor, String signature, String[] exceptions) { return new MethodVisitor(Opcodes.API...
getLineNumbers
62,307
MethodVisitor (int access, String name, String descriptor, String signature, String[] exceptions) { return new MethodVisitor(Opcodes.API_VERSION) { @Override public void visitLineNumber(int line, Label start) { lineNumbers.add(line); } }; }
visitMethod
62,308
void (int line, Label start) { lineNumbers.add(line); }
visitLineNumber
62,309
void (@NotNull Class<?> testClass) { rethrowExceptions(() -> { Object instance = testClass.getDeclaredConstructor().newInstance(); Method method = testClass.getMethod("test"); method.invoke(instance); }); }
invokeMethod
62,310
void (@NotNull ThrowableRunnable<? extends Throwable> runnable) { try { runnable.run(); } catch (Throwable e) { //noinspection InstanceofCatchParameter if (e instanceof InvocationTargetException) { ExceptionUtil.rethrowAllAsUnchecked(e.getCause()); } ExceptionUtil.rethrowAllAsUnchecked(e); } }
rethrowExceptions
62,311
void () { loadProject("plugins/devkit/jps-plugin/testData/pluginProject/pluginProject.ipr"); JpsModule module = assertOneElement(myProject.getModules()); assertEquals(JpsPluginModuleType.INSTANCE, module.getModuleType()); JpsTypedModule<JpsSimpleElement<JpsPluginModuleProperties>> pluginModule = module.asTyped(JpsPlugi...
testLoadProject
62,312
LightServiceAppLevelArray () { return ApplicationManager.getApplication().getService(LightServiceAppLevelArray.class); }
getInstance
62,313
LightServiceEmpty () { return ApplicationManager.getApplication().getService(LightServiceEmpty.class); }
getInstance
62,314
LightServiceProjectLevel (Project project) { return project.getService(LightServiceProjectLevel.class); }
getInstance
62,315
RegisteredApplicationService () { return ApplicationManager.getApplication().getService(RegisteredApplicationService.class); }
getInstance
62,316
RegisteredModuleService (Module module) { return module.getService(RegisteredModuleService.class); }
getInstance
62,317
LightServiceAppAndProjectLevelRepeatedArray () { return ApplicationManager.getApplication().getService(LightServiceAppAndProjectLevelRepeatedArray.class); }
getInstance
62,318
LightServiceEmptyArray () { return ApplicationManager.getApplication().getService(LightServiceEmptyArray.class); }
getInstance
62,319
RegisteredProjectService (Project project) { return project.getService(RegisteredProjectService.class); }
getInstance
62,320
NonService () { return new NonService(); }
getInstance
62,321
void () { }
foo
62,322
LightServiceProjectLevelArray (Project project) { return project.getService(LightServiceProjectLevelArray.class); }
getInstance
62,323
LightServiceAppLevel () { return ApplicationManager.getApplication().getService(LightServiceAppLevel.class); }
getInstance
62,324
LightServiceAppAndProjectLevelArray () { return ApplicationManager.getApplication().getService(LightServiceAppAndProjectLevelArray.class); }
getInstance
62,325
void ( <error descr="'library.RecentClass' is available only since 2.0 but the module is targeted for 1.0 - 999.0. It may lead to compatibility problems with IDEs prior to 2.0. Note that this type might have had a different fully qualified name in the previous IDEs.">RecentClass</error> rc, <error descr="'library.Recen...
parameters
62,326
void () { <error descr="'library.RecentClass' is available only since 2.0 but the module is targeted for 1.0 - 999.0. It may lead to compatibility problems with IDEs prior to 2.0. Note that this type might have had a different fully qualified name in the previous IDEs.">RecentClass</error>[] a1 = new <error descr="'lib...
array
62,327
void () { Class<<error descr="'library.RecentClass' is available only since 2.0 but the module is targeted for 1.0 - 999.0. It may lead to compatibility problems with IDEs prior to 2.0. Note that this type might have had a different fully qualified name in the previous IDEs.">RecentClass</error>> o = <error descr="'lib...
classAccess
62,328
void (OldClass oc, OldKotlinClass okc) { String s = oc.<error descr="'recentField' is available only since 2.0 but the module is targeted for 1.0 - 999.0. It may lead to compatibility problems with IDEs prior to 2.0. Note that this field might have had a different full signature in the previous IDEs.">recentField</erro...
m1
62,329
void (OldClass oc, OldKotlinClass okc) { oc.<error descr="'recentMethod()' is available only since 2.0 but the module is targeted for 1.0 - 999.0. It may lead to compatibility problems with IDEs prior to 2.0. Note that this method might have had a different full signature in the previous IDEs.">recentMethod</error>(); ...
m2
62,330
void () { OldClass.<error descr="'recentStaticMethod()' is available only since 2.0 but the module is targeted for 1.0 - 999.0. It may lead to compatibility problems with IDEs prior to 2.0. Note that this method might have had a different full signature in the previous IDEs.">recentStaticMethod</error>(); OldKotlinClas...
m3
62,331
void () { Object o = new <error descr="'OldClass(java.lang.String)' is available only since 2.0 but the module is targeted for 1.0 - 999.0. It may lead to compatibility problems with IDEs prior to 2.0. Note that this method might have had a different full signature in the previous IDEs.">OldClass</error>(""); Object o2...
m4
62,332
void () { //anonymous class Object o = new <error descr="'OldClass()' is available only since 2.0 but the module is targeted for 1.0 - 999.0. It may lead to compatibility problems with IDEs prior to 2.0. Note that this method might have had a different full signature in the previous IDEs.">OldClass</error>() { }; }
m5
62,333
void () { Supplier<OldClass> s = OldClass::<error descr="'OldClass()' is available only since 2.0 but the module is targeted for 1.0 - 999.0. It may lead to compatibility problems with IDEs prior to 2.0. Note that this method might have had a different full signature in the previous IDEs.">new</error>; Supplier<OldKotl...
m6
62,334
void (String s) { RecentKotlinUtilsKt.<error descr="'recentTopLevelFunction()' is available only since 2.0 but the module is targeted for 1.0 - 999.0. It may lead to compatibility problems with IDEs prior to 2.0. Note that this method might have had a different full signature in the previous IDEs.">recentTopLevelFuncti...
m7
62,335
String () { return null; }
invoke
62,336
void () { Consumer<OldClass> methodReference = OldClass::<error descr="'recentMethod()' is available only since 2.0 but the module is targeted for 1.0 - 999.0. It may lead to compatibility problems with IDEs prior to 2.0. Note that this method might have had a different full signature in the previous IDEs.">recentMetho...
m8
62,337
void () { }
recentMethod
62,338
void () { }
recentMethod
62,339
void () { }
m1
62,340
void () { }
m1k
62,341
void () { }
m2
62,342
void () { }
m2k
62,343
RegisteredApplicationService () { return ApplicationManager.getApplication().getService(RegisteredApplicationService.class); }
getInstance
62,344
LightServiceAppAndProjectLevelAnnotation () { return ApplicationManager.getApplication().getService(LightServiceAppAndProjectLevelAnnotation.class); }
getInstance
62,345
LightServiceAppLevelAnnotation () { return ApplicationManager.getApplication().getService(LightServiceAppLevelAnnotation.class); }
getInstance
62,346
LightServiceEmptyAnnotation () { return ApplicationManager.getApplication().getService(LightServiceEmptyAnnotation.class); }
getInstance
62,347
RegisteredProjectService () { return ApplicationManager.getApplication().getService(RegisteredProjectService.class); }
getInstance
62,348
LightServiceProjecLevelAnnotation () { return ApplicationManager.getApplication().getService(LightServiceProjecLevelAnnotation.class); }
getInstance
62,349
NonService () { return new NonService(); }
getInstance
62,350
void () { }
foo
62,351
void () { MyExtensionImpl.staticFoo(); MyExtensionImpl.getStaticVal(); }
main
62,352
void () { MoveJvmStaticDeclarationsKt.staticFoo(); MoveJvmStaticDeclarationsKt.getStaticVal(); }
main
62,353
String () { return DevkitKtTestsUtil.TESTDATA_PATH + "navigation/extensionPointDeclaration"; }
getBasePath
62,354
String () { return ".kt"; }
getExtension
62,355
void () { assertStringEP(); }
testMyStringEP
62,356
void () { assertStringEP(); }
testMyStringEPInterface
62,357
void () { assertStringEP(); }
testMyStringEPViaConstant
62,358
void () { assertStringEP(); }
testMyStringEPConstructor
62,359
void () { assertStringEP(); }
testMyStringEPLanguageExtension
62,360
void () { assertStringEP(); }
testMyStringProjectEP
62,361
void () { assertStringEP(); }
testMyStringEPViaLanguageExtensionSuperCall
62,362
String () { return DevkitKtTestsUtil.TESTDATA_PATH + "navigation/extensionDeclaration"; }
getBasePath
62,363
void () { doTestInvalidExtension("MyInvalidKtExtension.kt"); }
testInvalidKtExtension
62,364
void () { doTestExtension("MyKtExtension.kt", "<myEp implementation=\"MyKtExtension\"/>"); }
testKtExtension
62,365
String () { return DevkitKtTestsUtil.TESTDATA_PATH + "navigation/descriptionType"; }
getBasePath
62,366
void () { doTestInspectionDescription("MyKtWithDescriptionInspection.kt", "MyKtWithDescription.html"); }
testKtInspectionDescription
62,367
String () { return DevkitKtTestsUtil.TESTDATA_PATH + "codeInsight"; }
getBasePath
62,368
void (JavaModuleFixtureBuilder moduleBuilder) { moduleBuilder.addLibrary("platform-util", PathUtil.getJarPathForClass(XCollection.class)); moduleBuilder.addLibrary("platform-analysis", PathUtil.getJarPathForClass(CompletionContributorEP.class)); }
tuneFixture
62,369
void (String... filePaths) { myFixture.testHighlighting(true, false, false, filePaths); }
doHighlightingTest
62,370
void () { configureLanguageAttributeTest(); doHighlightingTest("languageAttribute.xml", "MyLanguageAttributeEPBean.kt"); }
testLanguageAttributeHighlighting
62,371
void () { configureLanguageAttributeTest(); myFixture.allowTreeAccessForFile(myFixture.copyFileToProject("MyLanguageAttributeEPBean.kt")); myFixture.configureByFile("languageAttribute.xml"); List<LookupElement> lookupElements = Arrays.stream(myFixture.complete(CompletionType.BASIC)) .sorted(Comparator.comparing(item ->...
testLanguageAttributeCompletion
62,372
void (LookupElement element, String lookupString, String typeText) { LookupElementPresentation presentation = new LookupElementPresentation(); element.renderElement(presentation); assertEquals(lookupString, presentation.getItemText()); assertEquals(typeText, presentation.getTypeText()); }
assertLookupElement
62,373
void () { myFixture.addClass("package com.intellij.lang; " + "public class Language { " + " protected Language(String id) {}" + "}"); myFixture.allowTreeAccessForFile(myFixture.copyFileToProject("MyLanguage.kt")); }
configureLanguageAttributeTest
62,374
String () { return DevkitKtTestsUtil.TESTDATA_PATH + "inspections/registrationProblems/code"; }
getBasePath
62,375
void () { setPluginXml("ComponentAbstractImplementation.xml"); myFixture.testHighlighting("AbstractApplicationComponent.kt"); }
testComponentAbstractImplementation
62,376
void () { setPluginXml("ApplicationComponentMustNotInherit.xml"); myFixture.testHighlighting("MyApplicationComponentMustNotInherit.kt"); }
testApplicationComponentMustNotInherit
62,377
void () { setPluginXml("ActionAbstractClass.xml"); myFixture.testHighlighting("MyAbstractAction.kt"); }
testActionAbstractClass
62,378
void () { setPluginXml("ActionWithoutDefaultCtor.xml"); myFixture.testHighlighting("MyActionWithoutDefaultCtor.kt"); }
testActionWithoutDefaultCtor
62,379
void () { setPluginXml("ActionWrongClass.xml"); myFixture.testHighlighting("MyActionWrongClass.kt"); }
testActionWrongClass
62,380
String () { return DevkitKtTestsUtil.TESTDATA_PATH + "inspections/leakableMapKey"; }
getBasePath
62,381
void () { myFixture.testHighlighting("Service.kt"); }
testHighlighting
62,382
String () { return DevkitKtTestsUtil.TESTDATA_PATH + "inspections/useGray"; }
getBasePath
62,383
String () { return "kt"; }
getFileExtension
62,384
void () { doTest(); }
testUseGrayConstantWhenAwtColorUsed
62,385
String () { return DevkitKtTestsUtil.TESTDATA_PATH + "inspections/unspecifiedActionsPlace"; }
getBasePath
62,386
String () { return "kt"; }
getFileExtension
62,387
void () { doTest(); }
testUnspecifiedActionPlaces
62,388
String () { return "kt"; }
getSourceFileExtension
62,389
String () { return DevkitKtTestsUtil.TESTDATA_PATH + "inspections/componentNotRegistered"; }
getBasePath
62,390
String () { return DevkitKtTestsUtil.TESTDATA_PATH + "inspections/registrationProblems/xml/actions"; }
getBasePath
62,391
void () { myFixture.testHighlighting("ActionAbstractClass.xml", "MyAbstractAction.kt"); }
testActionAbstractClass
62,392
void () { myFixture.testHighlighting("ActionUnresolvedClass.xml"); }
testActionUnresolvedClass
62,393
void () { myFixture.testHighlighting("ActionWithoutDefaultCtor.xml", "MyActionWithoutDefaultCtor.kt"); }
testActionWithoutDefaultCtor
62,394
void () { myFixture.testHighlighting("ActionWrongClass.xml"); }
testActionWrongClass
62,395
void () { myFixture.copyFileToProject("MyBundle.properties"); myFixture.copyFileToProject("AnotherBundle.properties"); addKotlinClass("foo/bar/BarAction.kt", """ package foo.bar class BarAction : com.intellij.openapi.actionSystem.AnAction() {}"""); addKotlinClass("foo/InternalActionBase.kt", """ package foo internal cl...
testActionComplexHighlighting
62,396
String () { return DevkitKtTestsUtil.TESTDATA_PATH + "inspections/getFamilyNameViolation"; }
getBasePath
62,397
String () { return "kt"; }
getFileExtension
62,398
void () { doTest(); }
testNotViolatedByField
62,399
void () { doTest(); }
testNotViolatedByGetName