Unnamed: 0
int64 0
305k
| body
stringlengths 7
52.9k
| name
stringlengths 1
185
|
---|---|---|
4,000 |
void () { doTest().assertFailed(); }
|
testChangePackagePrivateToPublic
|
4,001 |
void () { doTest().assertFailed(); }
|
testChangeProtectedToPublic
|
4,002 |
void () { doTest(); }
|
testSetAbstract
|
4,003 |
void () { doTest(); }
|
testSetFinal
|
4,004 |
void () { doTest(); }
|
testSetPrivate
|
4,005 |
void () { doTest(); }
|
testSetProtected
|
4,006 |
void () { doTest(); }
|
testSetProtectedFromPublic
|
4,007 |
void () { doTest(); }
|
testUnsetFinal
|
4,008 |
void () { doTest(); }
|
testUnsetAbstractForSAMInterface
|
4,009 |
void () { doTest(); }
|
testUnsetStatic
|
4,010 |
void () { doTest(); }
|
testSetStatic
|
4,011 |
void () { doTest(); }
|
testAddMethodToBase
|
4,012 |
void () { doTest(); }
|
testAddParameterizedMethodToBase
|
4,013 |
void () { doTest(); }
|
testChangeBound
|
4,014 |
void () { doTest(); }
|
testChangeBound1
|
4,015 |
void () { doTest(); }
|
testChangeBoundClass1
|
4,016 |
void () { doTest(); }
|
testChangeBoundedClass
|
4,017 |
void () { doTest(); }
|
testChangeBoundInterface1
|
4,018 |
void () { doTest(); }
|
testChangeExtends
|
4,019 |
void () { doTest(); }
|
testChangeExtends1
|
4,020 |
void () { doTest(); }
|
testChangeExtends2
|
4,021 |
void () { doTest(); }
|
testChangeImplements
|
4,022 |
void () { doTest(); }
|
testChangeInterfaceTypeParameter
|
4,023 |
void () { doTest(); }
|
testChangeToCovariantMethodInBase
|
4,024 |
void () { doTest(); }
|
testChangeToCovariantMethodInBase2
|
4,025 |
void () { // Strictly speaking, recompilation of "IImpl" is not necessary, since all needed bridge methods will be included by the compiler into its base "Mediator" class (see the test's classes). // However, at the moment when decision is made, both Mediator and IImpl do not have necessary bridge methods, so the corresponding rule affects both classes. // At the moment we assume that it is fine to recompile more classes rather than make the rule to be more complicated. doTest(); }
|
testChangeToCovariantMethodInBase3
|
4,026 |
void () { doTest(); }
|
testChangeToCovariantMethodInBase4
|
4,027 |
void () { doTest(); }
|
testChangeVarargSignature
|
4,028 |
void () { doTest(); }
|
testChangeVarargSignature1
|
4,029 |
void () { doTest(); }
|
testCovariance
|
4,030 |
void () { doTest(); }
|
testCovariance1
|
4,031 |
void () { doTest(); }
|
testCovariance2
|
4,032 |
void () { doTest(); }
|
testCovarianceNoChanges
|
4,033 |
void () { doTest(); }
|
testDegenerify
|
4,034 |
void () { doTest(); }
|
testDegenerify1
|
4,035 |
void () { doTest(); }
|
testFieldTypeChange
|
4,036 |
void () { doTest(); }
|
testOverrideAnnotatedAnonymous
|
4,037 |
void () { doTest(); }
|
testOverrideAnnotatedAnonymousNotRecompile
|
4,038 |
void () { doTest(); }
|
testOverrideAnnotatedInner
|
4,039 |
void () { doTest(); }
|
testParamTypes
|
4,040 |
void () { doTest(); }
|
testReturnType
|
4,041 |
void () { doTest(); }
|
testArgumentContainment
|
4,042 |
void () { doTest(); }
|
testArgumentContainment2
|
4,043 |
void () { doTest(); }
|
testArgumentContainment3
|
4,044 |
boolean () { // java9 is not supported anymore and javac9 contains some problems that are already fixed in java10+ // It is expected that for JPMS-related features javac10 or better will be used final JavaSdkVersion sdkVersion = JavaSdkVersion.fromVersionString(SystemInfo.JAVA_VERSION); if (sdkVersion == null || !sdkVersion.isAtLeast(JavaSdkVersion.JDK_10)) { System.out.println("Test '" + getTestName(false) + "' skipped because it requires at least java 10 runtime"); return false; } return super.shouldRunTest(); }
|
shouldRunTest
|
4,045 |
BuildResult (int makesCount) { setupModules(); return super.doTestBuild(makesCount); }
|
doTestBuild
|
4,046 |
void () { // expected result: the whole target is recompiled after the module-info.java file was newly added // because necessary 'require' directives may be missing from the newly added module-info file final BuildResult buildResult = doTest(); buildResult.assertSuccessful(); }
|
testModuleInfoAdded
|
4,047 |
void () { final BuildResult buildResult = doTest(); buildResult.assertFailed(); }
|
testRemoveModuleRequires
|
4,048 |
void () { final BuildResult buildResult = doTest(); buildResult.assertFailed(); }
|
testRemoveTransitiveModuleRequires
|
4,049 |
void () { final BuildResult buildResult = doTest(); buildResult.assertFailed(); }
|
testChangeTransitiveModuleRequires
|
4,050 |
void () { final BuildResult buildResult = doTest(); buildResult.assertSuccessful(); }
|
testChangeQualifiedTransitiveModuleRequires
|
4,051 |
void () { final BuildResult buildResult = doTest(); buildResult.assertSuccessful(); }
|
testRemoveModuleExports
|
4,052 |
void () { final BuildResult buildResult = doTest(); buildResult.assertFailed(); }
|
testRemoveTransitiveModuleExports
|
4,053 |
void () { final BuildResult buildResult = doTest(); buildResult.assertSuccessful(); }
|
testRemoveQualifiedModuleExports
|
4,054 |
void () { final BuildResult buildResult = doTest(); buildResult.assertFailed(); }
|
testRemoveQualifiedTransitiveModuleExports
|
4,055 |
void () { final BuildResult buildResult = doTest(); buildResult.assertSuccessful(); }
|
testChangeQualifiedTransitiveModuleExportsNoRebuild
|
4,056 |
void () { final BuildResult buildResult = doTest(); buildResult.assertFailed(); }
|
testChangeQualifiedTransitiveModuleExportsRebuildIndirectDeps
|
4,057 |
void () { final BuildResult buildResult = doTest(); buildResult.assertSuccessful(); }
|
testChangeQualifiedTransitiveModuleExportsRebuildDirectDeps
|
4,058 |
void () { setupInitialProject(); setupModules(); doBuild(CompileScopeTestBuilder.rebuild().allModules()).assertFailed(); modify(0); doBuild(CompileScopeTestBuilder.make().allModules()).assertSuccessful(); modify(1); doBuild(CompileScopeTestBuilder.make().allModules()).assertFailed(); }
|
testIntegrateAfterErrors
|
4,059 |
void () { setupInitialProject(); final Map<String, JpsModule> modules = setupModules(); assertEquals(1, modules.size()); final JpsModule module = modules.values().iterator().next(); final ModuleBuildTarget target = new ModuleBuildTarget(module, JavaModuleBuildTargetType.PRODUCTION); final File outputDir = target.getOutputDir(); final File libDir = new File(getAbsolutePath("lib")); for (File jarFile : libDir.listFiles((dir, name) -> name.endsWith(".jar"))) { JpsLibrary lib = addLibrary(jarFile.getName(), jarFile); JpsModuleRootModificationUtil.addDependency(module, lib, JpsJavaDependencyScope.COMPILE, false); } final File moduleInfoPath = new File(getAbsolutePath("moduleA/src/module-info.java")); final ModulePathSplitter splitter = new ModulePathSplitter(); final Collection<File> dependencies = ProjectPaths.getCompilationModulePath(new ModuleChunk(Collections.singleton(target)), false); final Pair<ModulePath, Collection<File>> split = splitter.splitPath(moduleInfoPath, Collections.singleton(outputDir), dependencies); final ModulePath modulePath = split.first; final Collection<File> classpath = split.second; final Collection<? extends File> modPath = modulePath.getPath(); assertEquals(4, modPath.size()); assertTrue(modPath.contains(outputDir)); assertTrue(modPath.contains(new File(libDir, "module_lib_1.jar"))); assertTrue(modPath.contains(new File(libDir, "module_lib_2.jar"))); assertTrue(modPath.contains(new File(libDir, "module_lib_util.jar"))); assertEquals(1, classpath.size()); assertTrue(classpath.contains(new File(libDir, "module_lib_3.jar"))); }
|
testSplitModulePath
|
4,060 |
void () { setupInitialProject(); final Map<String, JpsModule> modules = setupModules(); assertEquals(2, modules.size()); assertTrue(modules.containsKey("A")); assertTrue(modules.containsKey("B")); doBuild(CompileScopeTestBuilder.rebuild().allModules()).assertSuccessful(); }
|
testExplodedAutoModule
|
4,061 |
void () { setupInitialProject(); final Map<String, JpsModule> modules = setupModules(); JpsJavaExtensionService.getInstance().getCompilerConfiguration(myProject).addResourcePattern("*.MF"); assertEquals(2, modules.size()); assertTrue(modules.containsKey("A")); assertTrue(modules.containsKey("B")); doBuild(CompileScopeTestBuilder.rebuild().allModules()).assertSuccessful(); }
|
testExplodedAutoModuleWithManifest
|
4,062 |
File () { return workDir; }
|
doGetProjectDir
|
4,063 |
String (final String pathRelativeToProjectRoot) { return FileUtil.toSystemIndependentName(workDir.getAbsolutePath()) + "/" + pathRelativeToProjectRoot; }
|
getAbsolutePath
|
4,064 |
void (int stage) { final String removedSuffix = stage == 0? ".remove" : ".remove" + stage; final String newSuffix = stage == 0? ".new" : ".new" + stage; FileUtil.processFilesRecursively(baseDir, file -> { if (file.getName().endsWith(removedSuffix)) { FileUtil.delete(getTargetFile(file, removedSuffix)); } return true; }); final long[] timestamp = {0}; FileUtil.processFilesRecursively(baseDir, file -> { try { if (file.getName().endsWith(newSuffix)) { File targetFile = getTargetFile(file, newSuffix); FileUtil.copyContent(file, targetFile); timestamp[0] = Math.max(timestamp[0], FSOperations.lastModified(targetFile)); } } catch (IOException e) { throw new RuntimeException(e); } return true; }); sleepUntil(timestamp[0]); }
|
modify
|
4,065 |
File (File sourceFile, final String suffix) { String path = FileUtil.getRelativePath(baseDir, sourceFile); assertNotNull(path); if (!path.contains(File.separator)) { path = "src" + File.separator + path; } return new File(workDir, StringUtil.trimEnd(path, suffix)); }
|
getTargetFile
|
4,066 |
BuildResult () { setupInitialProject(); return doTestBuild(1); }
|
doTest
|
4,067 |
void () { if (new File(workDir, PathMacroUtil.DIRECTORY_STORE_NAME).exists()) { getOrCreateJdk(); loadProject(workDir.getAbsolutePath()); } else { addModule(); } }
|
setupInitialProject
|
4,068 |
JpsModule () { return addModule(StringUtil.capitalize(getProjectName()), "src"); }
|
addModule
|
4,069 |
JpsModule (final String moduleName, final String srcRootRelativePath) { String srcPath = getAbsolutePath(srcRootRelativePath); return addModule(moduleName, new String[]{srcPath}, null, null, getOrCreateJdk()); }
|
addModule
|
4,070 |
boolean () { return true; }
|
useCachedProjectDescriptorOnEachMake
|
4,071 |
BuildResult (int makesCount) { StringBuilder log = new StringBuilder(); String rootPath = FileUtil.toSystemIndependentName(workDir.getAbsolutePath()) + "/"; ProjectDescriptor pd = createProjectDescriptor(new BuildLoggingManager(new StringProjectBuilderLogger(rootPath, log))); BuildResult result = null; try { final boolean reuseProjectId = useCachedProjectDescriptorOnEachMake(); doBuild(pd, CompileScopeTestBuilder.rebuild().allModules()).assertSuccessful(); for (int idx = 0; idx < makesCount; idx++) { // this will save the current build data state before any changes were done to the project model if (!reuseProjectId) { pd.release(); } modify(idx); if (!reuseProjectId) { pd = createProjectDescriptor(new BuildLoggingManager(new StringProjectBuilderLogger(rootPath, log))); } result = doBuild(pd, createCompileScope(idx)); } File logFile = new File(baseDir.getAbsolutePath() + ".log"); if (!logFile.exists()) { logFile = new File(baseDir, "build.log"); } assertSameLinesWithFile(logFile.getAbsolutePath(), log.toString()); } finally { pd.release(); } assertNotNull(result); if (result.isSuccessful()) { checkMappingsAreSameAfterRebuild(result); } return result; }
|
doTestBuild
|
4,072 |
CompileScopeTestBuilder (int stage) { return CompileScopeTestBuilder.make().allModules(); }
|
createCompileScope
|
4,073 |
JpsSdk<JpsDummyElement> () { if (myJdk == null) { myJdk = addJdk("IDEA jdk"); } return myJdk; }
|
getOrCreateJdk
|
4,074 |
JpsLibrary (final String jarPath) { return addLibrary("l", new File(getAbsolutePath(jarPath))); }
|
addLibrary
|
4,075 |
JpsLibrary (final String libraryName, final File jarFile) { JpsLibrary library = myProject.addLibrary(libraryName, JpsJavaLibraryType.INSTANCE); library.addRoot(jarFile, JpsOrderRootType.COMPILED); return library; }
|
addLibrary
|
4,076 |
void (JpsModule module, final String testRootRelativePath) { module.addSourceRoot(getUrl(testRootRelativePath), JavaSourceRootType.TEST_SOURCE); }
|
addTestRoot
|
4,077 |
boolean () { return true; }
|
isEnabled
|
4,078 |
void (String line) { myLog.append(StringUtil.trimStart(line, myRoot)).append('\n'); }
|
logLine
|
4,079 |
void () { doTest(); }
|
testSetFinal
|
4,080 |
void () { doTest(); }
|
testSetPrivate
|
4,081 |
void () { doTest(); }
|
testSetPrivateToConstantField
|
4,082 |
void () { doTest(); }
|
testSetProtected
|
4,083 |
void () { doTest(); }
|
testSetPackagePrivate
|
4,084 |
void () { doTest(); }
|
testSetStatic
|
4,085 |
void () { doTest(); }
|
testUnsetStatic
|
4,086 |
void () { doTest(); }
|
testUnsetStaticFinal
|
4,087 |
void () { doTest(); }
|
testHidePackagePrivateWithPackagePrivate
|
4,088 |
void () { doTest(); }
|
testHidePackagePrivateWithProtected
|
4,089 |
void () { doTest(); }
|
testHidePackagePrivateWithPublic
|
4,090 |
void () { doTest(); }
|
testHideProtectedWithPackagePrivate
|
4,091 |
void () { doTest(); }
|
testHideProtectedWithProtected
|
4,092 |
void () { doTest(); }
|
testHideProtectedWithPublic
|
4,093 |
void () { doTest(); }
|
testHidePublicWithPackagePrivate
|
4,094 |
void () { doTest(); }
|
testHidePublicWithProtected
|
4,095 |
void () { doTest(); }
|
testHidePublicWithPublic
|
4,096 |
void () { doTest().assertSuccessful(); }
|
testChangeClassName
|
4,097 |
void () { doTest().assertSuccessful(); }
|
testChangeCaseOfName
|
4,098 |
void () { doTest(); }
|
testAnonymous
|
4,099 |
void () { doTest(); }
|
testChangeDefinitionToClass
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.