Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
57,700
SimpleTag (AbstractJavaFxPackager packager, String deployOutDir, String relativeToBaseDirPath) { String htmlTemplate = packager.getHtmlTemplateFile(); if (!StringUtil.isEmpty(htmlTemplate)) { final String shortName = new File(htmlTemplate).getName(); if (!StringUtil.isEmpty(relativeToBaseDirPath)) { htmlTemplate = "${b...
createTemplateTag
57,701
void (final List<Pair> pairs, final String propertyName, final String propValue) { if (!StringUtil.isEmptyOrSpaces(propValue)) { pairs.add(Couple.of(propertyName, propValue)); } }
appendIfNotEmpty
57,702
void (final SimpleTag applicationTag, final String paramFile, final String paramTagName, final boolean allowNoNamed) { if (!StringUtil.isEmptyOrSpaces(paramFile)) { final Properties properties = new Properties(); try (FileInputStream paramsInputStream = new FileInputStream(paramFile)) { properties.load(paramsInputStrea...
appendValuesFromPropertiesFile
57,703
void (StringBuilder buf) { buf.append("<").append(getName()).append(">").append(propName).append("</").append(getName()).append(">"); }
generate
57,704
void (Pair attr) { myPairs.add(attr); }
addAttribute
57,705
void (SimpleTag tag) { mySubTags.add(tag); }
add
57,706
String () { return myName; }
getName
57,707
Pair[] () { return myPairs.toArray(new Pair[0]); }
getPairs
57,708
String () { return myValue; }
getValue
57,709
List<SimpleTag> () { return mySubTags; }
getSubTags
57,710
void (StringBuilder buf) { buf.append("<").append(getName()); for (Pair pair : getPairs()) { buf.append(" ").append(pair.first).append("=\"").append(pair.second).append("\""); } buf.append(">\n"); for (SimpleTag tag : getSubTags()) { tag.generate(buf); } buf.append("</").append(getName()).append(">\n"); }
generate
57,711
String () { return myName; }
getName
57,712
void (String name) { myName = name; }
setName
57,713
String () { return myValue; }
getValue
57,714
void (String value) { myValue = value; }
setValue
57,715
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; JavaFxManifestAttribute attribute = (JavaFxManifestAttribute)o; if (!myName.equals(attribute.myName)) return false; if (!myValue.equals(attribute.myValue)) return false; return true; }
equals
57,716
int () { int result = myName.hashCode(); result = 31 * result + myValue.hashCode(); return result; }
hashCode
57,717
String () { return myLinuxIcon; }
getLinuxIcon
57,718
String (String relativeToPath) { return getRelativeIcon(relativeToPath, myLinuxIcon); }
getLinuxIcon
57,719
void (String linuxIcon) { myLinuxIcon = linuxIcon; }
setLinuxIcon
57,720
String () { return myMacIcon; }
getMacIcon
57,721
String (String relativeToPath) { return getRelativeIcon(relativeToPath, myMacIcon); }
getMacIcon
57,722
void (String macIcon) { myMacIcon = macIcon; }
setMacIcon
57,723
String () { return myWindowsIcon; }
getWindowsIcon
57,724
String (String relativeToPath) { return getRelativeIcon(relativeToPath, myWindowsIcon); }
getWindowsIcon
57,725
void (String windowsIcon) { myWindowsIcon = windowsIcon; }
setWindowsIcon
57,726
boolean () { return StringUtil.isEmpty(myLinuxIcon) && StringUtil.isEmpty(myMacIcon) && StringUtil.isEmpty(myWindowsIcon); }
isEmpty
57,727
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; JavaFxApplicationIcons icons = (JavaFxApplicationIcons)o; if (myLinuxIcon != null ? !myLinuxIcon.equals(icons.myLinuxIcon) : icons.myLinuxIcon != null) return false; if (myMacIcon != null ? !myMacIcon.equals(icon...
equals
57,728
int () { int result = myLinuxIcon != null ? myLinuxIcon.hashCode() : 0; result = 31 * result + (myMacIcon != null ? myMacIcon.hashCode() : 0); result = 31 * result + (myWindowsIcon != null ? myWindowsIcon.hashCode() : 0); return result; }
hashCode
57,729
String (String relativeToPath, String icon) { if (!StringUtil.isEmpty(icon) && !StringUtil.isEmpty(relativeToPath)) { return FileUtil.getRelativePath(relativeToPath, icon, '/'); } return icon; }
getRelativeIcon
57,730
void (@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) { addJavaFxJarAsLibrary(model); ArtifactManager.getInstance(model.getProject()).addArtifact("fake-javafx", JavaFxApplicationArtifactType.getInstance(), null); super.configureModule(module, model, contentEntry); }
configureModule
57,731
void (@NotNull Module module) { ModuleRootModificationUtil.updateModel(module, m -> addJavaFxJarAsLibrary(m)); }
addJavaFxJarAsLibrary
57,732
void (@Nullable ModifiableRootModel model) { MavenDependencyUtil.addFromMaven(model, "org.openjfx:javafx-fxml:11.0.1"); }
addJavaFxJarAsLibrary
57,733
LightProjectDescriptor () { return JAVA_FX_DESCRIPTOR; }
getProjectDescriptor
57,734
void () {}
enableInspections
57,735
void (final String tagName) { myFixture.configureByFiles(getTestName(true) + ".fxml"); final IntentionAction singleIntention = myFixture.findSingleIntention(getHint(tagName)); assertNotNull(singleIntention); myFixture.launchAction(singleIntention); myFixture.checkResultByFile(getTestName(true) + "_after.fxml"); }
doLaunchQuickfixTest
57,736
void (String tagName) { myFixture.configureByFiles(getTestName(true) + ".fxml"); final List<IntentionAction> intentions = myFixture.getAvailableIntentions(); final IntentionAction intention = CodeInsightTestUtil.findIntentionByText(intentions, getHint(tagName)); assertNull(intention); }
checkQuickFixNotAvailable
57,737
void (final String newName) { final PsiElement element = myFixture.getElementAtCaret(); doRenameWithAutomaticRenamers(element, newName); }
doRenameWithAutomaticRenamers
57,738
void (PsiElement elementAtCaret, String newName) { final RenameProcessor processor = new RenameProcessor(getProject(), elementAtCaret, newName, false, false); for (AutomaticRenamerFactory factory : AutomaticRenamerFactory.EP_NAME.getExtensionList()) { processor.addRenamerFactory(factory); } processor.run(); }
doRenameWithAutomaticRenamers
57,739
void () { Baz z = new Baz(); }
testMethod
57,740
void () { Baz z = new Baz(); }
testMethod
57,741
void () { Baz z = new Baz(); }
testMethod
57,742
void (Set<String> allNames, Test suite) { if (suite instanceof TestRunnerUtil.SuiteMethodWrapper) { final Test test = ((TestRunnerUtil.SuiteMethodWrapper)suite).getSuite(); final String currentSuiteName = ((TestRunnerUtil.SuiteMethodWrapper)suite).getClassName(); skipSubtests(allNames, test, currentSuiteName); } }
skipSuiteComponents
57,743
void (Set<String> allNames, Test test, String currentSuiteName) { if (test instanceof TestSuite) { for (int idx = 0; idx < ((TestSuite)test).testCount(); idx++) { Test childTest = ((TestSuite)test).testAt(idx); final String testName = childTest.toString(); if (!currentSuiteName.equals(testName)) { allNames.remove(testN...
skipSubtests
57,744
void (Test test, String name) { if (test instanceof TestSuite) { TestSuite testSuite = (TestSuite)test; if (testSuite.getName() == null) testSuite.setName(name); } }
attachSuiteInfo
57,745
void (ArrayList<String> listeners, int count) { myTestsListener = new SMTestListener(); myListeners = listeners; }
createListeners
57,746
int (String[] args, String name, int count, boolean sendTree) { setPrinter(new MockResultPrinter()); try { Test suite = TestRunnerUtil.getTestSuite(this, args); if (suite == null) return -1; return doRun(suite).wasSuccessful() ? 0 : -1; } catch (Exception e) { e.printStackTrace(System.err); return -2; } }
startRunnerWithArgs
57,747
void () { super.clearStatus(); }
clearStatus
57,748
void (String message) { super.runFailed(message); }
runFailed
57,749
Test (String[] args, String name) { return TestRunnerUtil.getTestSuite(this, args); }
getTestToStart
57,750
List<Test> (Test description) { return getTestCasesOf(description); }
getChildTests
57,751
String (Test child) { return child instanceof TestSuite ? ((TestSuite)child).getName() : child.getClass().getName(); }
getTestClassName
57,752
String (Test child) { if (child instanceof TestCase) { return child.getClass().getName() + "," + ((TestCase)child).getName(); } return child.toString(); }
getStartDescription
57,753
TestResult () { TestResult testResult = super.createTestResult(); testResult.addListener(myTestsListener); try { for (String listener : myListeners) { final IDEAJUnitListener junitListener = Class.forName(listener).asSubclass(IDEAJUnitListener.class).getConstructor().newInstance(); testResult.addListener(new TestListen...
createTestResult
57,754
void (Test test, Throwable t) {}
addError
57,755
void (Test test, AssertionFailedError t) {}
addFailure
57,756
void (Test test) { if (test instanceof TestCase) { junitListener.testFinished(test.getClass().getName(), ((TestCase)test).getName()); } }
endTest
57,757
void (Test test) { if (test instanceof TestCase) { junitListener.testStarted(test.getClass().getName(), ((TestCase)test).getName()); } }
startTest
57,758
TestResult (Test suite, boolean wait) { //todo final TestResult testResult = super.doRun(suite, wait); myTestsListener.finishSuite(); return testResult; }
doRun
57,759
List<Test> (Test test) { List<Test> testCases = new ArrayList<>(); if (test instanceof TestRunnerUtil.SuiteMethodWrapper) { test = ((TestRunnerUtil.SuiteMethodWrapper)test).getSuite(); } if (test instanceof TestSuite) { TestSuite testSuite = (TestSuite)test; for (Enumeration<Test> each = testSuite.tests(); each.hasMore...
getTestCasesOf
57,760
void (Test test, Throwable e) { testFailure(e, MapSerializerUtil.TEST_FAILED, getMethodName(test)); }
addError
57,761
void (Throwable failure, String messageName, String methodName) { final Map<String, String> attrs = new HashMap<>(); attrs.put("name", methodName); final long duration = System.currentTimeMillis() - myCurrentTestStart; if (duration > 0) { attrs.put("duration", Long.toString(duration)); } try { final String trace = getT...
testFailure
57,762
String (Throwable failure) { StringWriter stringWriter = new StringWriter(); PrintWriter writer = new PrintWriter(stringWriter); failure.printStackTrace(writer); return stringWriter.toString(); }
getTrace
57,763
String (Test test) { final String toString = test.toString(); final int braceIdx = toString.indexOf("("); return braceIdx > 0 ? toString.substring(0, braceIdx) : toString; }
getMethodName
57,764
String (Test test) { final String toString = test.toString(); final int braceIdx = toString.indexOf("("); return braceIdx > 0 && toString.endsWith(")") ? toString.substring(braceIdx + 1, toString.length() - 1) : null; }
getClassName
57,765
void (Test test, AssertionFailedError e) { addError(test, e); }
addFailure
57,766
void (Test test) { final long duration = System.currentTimeMillis() - myCurrentTestStart; System.out.println("\n##teamcity[testFinished name='" + escapeName(getMethodName(test)) + (duration > 0 ? "' duration='" + duration : "") + "']"); }
endTest
57,767
void (Test test) { myCurrentTestStart = System.currentTimeMillis(); final String className = getClassName(test); if (className != null && !className.equals(myClassName)) { finishSuite(); myClassName = className; System.out.println("##teamcity[testSuiteStarted name ='" + escapeName(myClassName) + "' locationHint='java:s...
startTest
57,768
void () { if (myClassName != null) { System.out.println("##teamcity[testSuiteFinished name='" + escapeName(myClassName) + "']"); } }
finishSuite
57,769
String (String str) { return MapSerializerUtil.escapeStr(str, MapSerializerUtil.STD_ESCAPER); }
escapeName
57,770
Test (JUnit3IdeaTestRunner runner, String[] suiteClassNames) { if (suiteClassNames.length == 0) { return null; } ArrayList<Test> result = new ArrayList<>(); for (String suiteClassName : suiteClassNames) { Test test; if (suiteClassName.charAt(0) == '@') { // all tests in the package specified String[] classNames; String...
getTestSuite
57,771
Test (JUnit3IdeaTestRunner runner, String suiteClassName) { String methodName = null; int index = suiteClassName.indexOf(','); if (index != -1) { methodName = suiteClassName.substring(index + 1); suiteClassName = suiteClassName.substring(0, index); } Class<?> testClass = loadTestClass(runner, suiteClassName); if (testC...
createClassOrMethodSuite
57,772
Test (JUnit3IdeaTestRunner runner, Class<?> testClass, String methodName) { runner.clearStatus(); try { Constructor<?> constructor = testClass.getConstructor(String.class); return (Test)constructor.newInstance(methodName); } catch (NoSuchMethodException e) { try { Constructor<?> constructor = testClass.getConstructor()...
createMethodSuite
57,773
String (int testCount, String name) { return MessageFormat.format(ourBundle.getString("tests.found.in.package"), Integer.valueOf(testCount), name); }
testsFoundInPackageMessage
57,774
String () { return myMethodName; }
getMethodName
57,775
String () { return myMessage; }
getMessage
57,776
void () { try { throw new RuntimeException(myMessage, myThrowable); } catch (NoSuchMethodError e) { throw new RuntimeException(myMessage); } }
runTest
57,777
String () { return myClassName; }
getClassName
57,778
int () { return mySuite.countTestCases(); }
countTestCases
57,779
void (TestResult result) { mySuite.run(result); }
run
57,780
Test () { return mySuite; }
getSuite
57,781
void (int b) { }
write
57,782
void (String[] args) { List<String> argList = new ArrayList<>(Arrays.asList(args)); final ArrayList<String> listeners = new ArrayList<>(); final String[] name = new String[1]; String agentName = processParameters(argList, listeners, name); if (!JUNIT5_RUNNER_NAME.equals(agentName) && !canWorkWithJUnitVersion(System.err...
main
57,783
String (List<String> args, final List<? super String> listeners, String[] params) { String agentName = isJUnit5Preferred() ? JUNIT5_RUNNER_NAME : JUNIT4_RUNNER_NAME; List<String> result = new ArrayList<>(args.size()); for (String arg : args) { if (arg.startsWith(IDE_VERSION)) { //ignore } else if (arg.equals(JUNIT3_PAR...
processParameters
57,784
boolean () { return Boolean.parseBoolean(System.getProperty(JUNIT5_KEY)); }
isJUnit5Preferred
57,785
boolean (String[] args, PrintStream printStream) { for (String arg : args) { if (arg.startsWith(IDE_VERSION)) { int ideVersion = Integer.parseInt(arg.substring(IDE_VERSION.length())); if (ideVersion != VERSION) { printStream.println("Wrong agent version: " + VERSION + ". IDE expects version: " + ideVersion); printStrea...
checkVersion
57,786
boolean (PrintStream printStream, String agentName) { try { junitVersionChecks(agentName); } catch (Throwable e) { printStream.println("!!! JUnit version 3.8 or later expected:"); printStream.println(); e.printStackTrace(printStream); printStream.flush(); return false; } finally { printStream.flush(); } return true; }
canWorkWithJUnitVersion
57,787
int (String[] args, final String agentName, ArrayList<String> listeners, String name) { try { IdeaTestRunner<?> testRunner = (IdeaTestRunner<?>)getAgentClass(agentName).newInstance(); if (ourCommandFileName != null) { if (!"none".equals(ourForkMode) || ourWorkingDirs != null && new File(ourWorkingDirs).length() > 0) { ...
prepareStreamsAndStart
57,788
String () { return JUnitForkedStarter.class.getName(); }
getStarterName
57,789
String (T child) { return myTestRunner.getTestClassName(child); }
getTestClassName
57,790
List<String> (T child) { List<String> newArgs = new ArrayList<>(); newArgs.add(myTestRunner.getStartDescription(child)); newArgs.addAll(myNewArgs); return newArgs; }
createChildArgs
57,791
List<T> (T child) { return myTestRunner.getChildTests(child); }
getChildren
57,792
int (final IdeaTestRunner<?> testRunner, final String[] args, ArrayList<String> listeners, final String name, final int count, boolean sendTree) { testRunner.createListeners(listeners, count); try { return TestsRepeater.repeat(count, sendTree, new TestsRepeater.TestRun() { @Override public int execute(boolean sendTree)...
startRunnerWithArgs
57,793
int (boolean sendTree) { return testRunner.startRunnerWithArgs(args, name, count, sendTree); }
execute
57,794
String () { return "j"; }
getFrameworkId
57,795
void (String className, String methodName) { testFinished(className, methodName, true); }
testFinished
57,796
Request (String[] suiteClassNames, final String programParameters, boolean notForked) { if (suiteClassNames.length == 0) { return null; } ArrayList<Class<?>> result = new ArrayList<>(); for (String suiteClassName : suiteClassNames) { if (suiteClassName.charAt(0) == '@') { // all tests in the package specified try { fin...
buildRequest
57,797
boolean (Description description) { if (description.isTest()) { final Set<String> methods = classMethods.get(JUnit4ReflectionUtil.getClassName(description)); if (methods == null) { return true; } String methodName = JUnit4ReflectionUtil.getMethodName(description); if (methods.contains(methodName)) { return true; } if (...
shouldRun
57,798
String () { return "Tests"; }
describe
57,799
boolean (Description description) { return ignoredTestFilter.shouldRun(description); }
shouldRun