id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
30044052_111 | {
"fields": [],
"file": "slideshowfx-hosting-connector/src/test/java/com/twasyl/slideshowfx/hosting/connector/io/RemoteFileTest.java",
"identifier": "RemoteFileTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test public void toStringWithParent() {\n final RemoteFile parent = new RemoteFile(\"parent\");\n final RemoteFile child = new RemoteFile(parent, \"child\");\n\n assertEquals(\"/parent/child\", child.toString());\n }",
"class_method_signature": "RemoteFileTest.toStringWithParent(... | {
"fields": [
{
"declarator": "empty = true",
"modifier": "protected",
"original_string": "protected boolean empty = true;",
"type": "boolean",
"var_name": "empty"
},
{
"declarator": "parent = null",
"modifier": "protected",
"original_string": "protected Rem... | {
"body": "@Override\n public String toString() {\n final StringBuilder builder = new StringBuilder();\n\n if(this.isRoot()) {\n builder.append(\"/\");\n } else {\n final String parentString = this.parent.toString();\n builder.append(parentString);\n\n ... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_3 | {
"fields": [],
"file": "slideshowfx-content-extension/src/test/java/com/twasyl/slideshowfx/content/extension/ResourceTest.java",
"identifier": "ResourceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testStyle() {\n final Resource resource = new Resource(ResourceType.CSS, \"h1 {\\n\\tcolor: red;\\n}\");\n final String expected = \"<style>h1 {\\n\\tcolor: red;\\n}</style>\";\n assertEquals(expected, resource.buildHTMLString(\"base/path\"));\n }",
"class_m... | {
"fields": [
{
"declarator": "content",
"modifier": "private",
"original_string": "private String content;",
"type": "String",
"var_name": "content"
},
{
"declarator": "type",
"modifier": "private",
"original_string": "private ResourceType type;",
"ty... | {
"body": "public String buildHTMLString(String location) {\n final StringBuilder builder = new StringBuilder();\n\n if (this.getType() == ResourceType.JAVASCRIPT_FILE) {\n builder.append(\"<script type=\\\"text/javascript\\\" src=\\\"\").append(location).append(\"/\").append(this.getContent(... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_110 | {
"fields": [],
"file": "slideshowfx-hosting-connector/src/test/java/com/twasyl/slideshowfx/hosting/connector/io/RemoteFileTest.java",
"identifier": "RemoteFileTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test public void isEmptyWithOnlyName() {\n final RemoteFile parent = new RemoteFile(\"parent\");\n\n assertTrue(parent.isEmpty());\n }",
"class_method_signature": "RemoteFileTest.isEmptyWithOnlyName()",
"constructor": false,
"full_signature": "@Test public void isEmptyWithOnlyName()... | {
"fields": [
{
"declarator": "empty = true",
"modifier": "protected",
"original_string": "protected boolean empty = true;",
"type": "boolean",
"var_name": "empty"
},
{
"declarator": "parent = null",
"modifier": "protected",
"original_string": "protected Rem... | {
"body": "public boolean isEmpty() { return this.empty; }",
"class_method_signature": "RemoteFile.isEmpty()",
"constructor": false,
"full_signature": "public boolean isEmpty()",
"identifier": "isEmpty",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": ... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_2 | {
"fields": [],
"file": "slideshowfx-content-extension/src/test/java/com/twasyl/slideshowfx/content/extension/ResourceTest.java",
"identifier": "ResourceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testScript() {\n final Resource resource = new Resource(ResourceType.SCRIPT, \"var s = 42;\");\n final String expected = \"<script type=\\\"text/javascript\\\">var s = 42;</script>\";\n assertEquals(expected, resource.buildHTMLString(\"base/path\"));\n }",
"... | {
"fields": [
{
"declarator": "content",
"modifier": "private",
"original_string": "private String content;",
"type": "String",
"var_name": "content"
},
{
"declarator": "type",
"modifier": "private",
"original_string": "private ResourceType type;",
"ty... | {
"body": "public String buildHTMLString(String location) {\n final StringBuilder builder = new StringBuilder();\n\n if (this.getType() == ResourceType.JAVASCRIPT_FILE) {\n builder.append(\"<script type=\\\"text/javascript\\\" src=\\\"\").append(location).append(\"/\").append(this.getContent(... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_147 | {
"fields": [
{
"declarator": "snippetExecutor = new ScalaSnippetExecutor()",
"modifier": "private final",
"original_string": "private final ScalaSnippetExecutor snippetExecutor = new ScalaSnippetExecutor();",
"type": "ScalaSnippetExecutor",
"var_name": "snippetExecutor"
}
],
... | {
"body": "@Test\n public void buildSourceCodeWithoutImportsAndWithoutWrapInMain() throws IOException {\n final CodeSnippet snippet = new CodeSnippet();\n snippet.getProperties().put(CLASS_NAME_PROPERTY, \"TestScala\");\n\n snippet.setCode(\"def main(args: Array[String]) {\\n\\tprintln(\\\"Hel... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(ScalaSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(ScalaSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOGGE... | {
"body": "protected String buildSourceCode(final CodeSnippet codeSnippet) throws IOException {\n final StringBuilder sourceCode = new StringBuilder();\n\n if (hasImports(codeSnippet)) {\n sourceCode.append(getImports(codeSnippet)).append(\"\\n\\n\");\n }\n\n sourceCode.append(g... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_151 | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(SlideshowFXHandlerTest.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(SlideshowFXHandlerTest.class.getName());",
"type": "Logger",
"var_name": "L... | {
"body": "@Test\n @DisplayName(\"should contain the proper latest log\")\n void correctLatestLog() {\n LOGGER.info(\"First message\");\n LOGGER.info(\"Second message\");\n\n assertTrue(handler.getLatestLog().contains(\"INFO: Second message\"));\n }",
"class_method_signature": "Slidesh... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(SlideshowFXHandler.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(SlideshowFXHandler.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
... | {
"body": "public String getLatestLog() {\n return latestLog;\n }",
"class_method_signature": "SlideshowFXHandler.getLatestLog()",
"constructor": false,
"full_signature": "public String getLatestLog()",
"identifier": "getLatestLog",
"invocations": [],
"modifiers": "public",
"parameters": "()",... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_106 | {
"fields": [
{
"declarator": "markup",
"modifier": "private static",
"original_string": "private static MarkdownMarkup markup;",
"type": "MarkdownMarkup",
"var_name": "markup"
}
],
"file": "slideshowfx-markdown/src/test/java/com/twasyl/slideshowfx/markup/markdown/MarkdownMar... | {
"body": "@Test\n void generateCodeBloc() {\n final String result = markup.convertAsHtml(\" final String s;\");\n\n assertEquals(\"<pre><code>final String s;\\n</code></pre>\", result);\n }",
"class_method_signature": "MarkdownMarkupTest.generateCodeBloc()",
"constructor": false,
"full_s... | {
"fields": [
{
"declarator": "extensions",
"modifier": "private final",
"original_string": "private final List<Extension> extensions;",
"type": "List<Extension>",
"var_name": "extensions"
}
],
"file": "slideshowfx-markdown/src/main/java/com/twasyl/slideshowfx/markup/markdown... | {
"body": "@Override\n public String convertAsHtml(String markupString) {\n if (markupString == null)\n throw new IllegalArgumentException(\"Can not convert \" + getName() + \" to HTML : the String is null\");\n\n final Parser parser = Parser.builder().extensions(extensions).build();\n ... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_192 | {
"fields": [
{
"declarator": "snippetExecutor = new GoSnippetExecutor()",
"modifier": "private final",
"original_string": "private final GoSnippetExecutor snippetExecutor = new GoSnippetExecutor();",
"type": "GoSnippetExecutor",
"var_name": "snippetExecutor"
}
],
"file": "sl... | {
"body": "@Test\n public void hasEmptyImports() {\n final CodeSnippet snippet = new CodeSnippet();\n snippet.getProperties().put(IMPORTS_PROPERTY, \"\");\n\n assertFalse(snippetExecutor.hasImports(snippet));\n }",
"class_method_signature": "GoSnippetExecutorTest.hasEmptyImports()",
"co... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(GoSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(GoSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
... | {
"body": "protected boolean hasImports(final CodeSnippet codeSnippet) {\n final String imports = codeSnippet.getProperties().get(IMPORTS_PROPERTY);\n return imports != null && !imports.isEmpty();\n }",
"class_method_signature": "GoSnippetExecutor.hasImports(final CodeSnippet codeSnippet)",
"cons... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_61 | {
"fields": [
{
"declarator": "snippetExecutor = new GroovySnippetExecutor()",
"modifier": "private final",
"original_string": "private final GroovySnippetExecutor snippetExecutor = new GroovySnippetExecutor();",
"type": "GroovySnippetExecutor",
"var_name": "snippetExecutor"
}
... | {
"body": "@Test\n public void formatImportWithImportKeywordAndWithoutColumn() {\n assertEquals(\"import mypackage\", snippetExecutor.formatImportLine(\"import mypackage\"));\n }",
"class_method_signature": "GroovySnippetExecutorTest.formatImportWithImportKeywordAndWithoutColumn()",
"constructor": fa... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(GroovySnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(GroovySnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOG... | {
"body": "protected String formatImportLine(final String importLine) {\n final String importLineBeginning = \"import \";\n\n String formattedImportLine;\n\n if (importLine.startsWith(importLineBeginning)) {\n formattedImportLine = importLine;\n } else {\n formattedIm... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_203 | {
"fields": [
{
"declarator": "baseLocation",
"modifier": "private static",
"original_string": "private static File baseLocation;",
"type": "File",
"var_name": "baseLocation"
},
{
"declarator": "visitor",
"modifier": "private",
"original_string": "private Li... | {
"body": "@Test\n public void testOnEmptyDir() throws IOException {\n final File emptyDir = new File(baseLocation, \"emptyDir\");\n Files.walkFileTree(emptyDir.toPath(), visitor);\n\n assertFalse(visitor.getPaths().isEmpty());\n assertEquals(emptyDir.toPath(), visitor.getPaths().get(0)... | {
"fields": [
{
"declarator": "paths = new ArrayList<>()",
"modifier": "private",
"original_string": "private List<Path> paths = new ArrayList<>();",
"type": "List<Path>",
"var_name": "paths"
},
{
"declarator": "nonEmptyDirectories = new HashSet<>()",
"modifier": ... | {
"body": "public List<Path> getPaths() {\n return paths;\n }",
"class_method_signature": "ListFilesFileVisitor.getPaths()",
"constructor": false,
"full_signature": "public List<Path> getPaths()",
"identifier": "getPaths",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_36 | {
"fields": [
{
"declarator": "snippetExecutor = new JavaSnippetExecutor()",
"modifier": "private final",
"original_string": "private final JavaSnippetExecutor snippetExecutor = new JavaSnippetExecutor();",
"type": "JavaSnippetExecutor",
"var_name": "snippetExecutor"
}
],
"fi... | {
"body": "@Test\n public void buildSourceCodeWithoutImportsAndWithoutWrapInMainAndWithoutClassName() throws IOException {\n final CodeSnippet snippet = new CodeSnippet();\n snippet.setCode(\"public static void main(String ... args) {\\n\\tSystem.out.println(\\\"Hello\\\");\\n}\");\n\n final S... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(JavaSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(JavaSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOGGER"... | {
"body": "protected String buildSourceCode(final CodeSnippet codeSnippet) throws IOException {\n final StringBuilder sourceCode = new StringBuilder();\n\n if (hasImports(codeSnippet)) {\n sourceCode.append(getImports(codeSnippet)).append(\"\\n\\n\");\n }\n\n sourceCode.append(g... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_215 | {
"fields": [
{
"declarator": "TEMP_DIRECTORY = new File(System.getProperty(\"java.io.tmpdir\"))",
"modifier": "private static final",
"original_string": "private static final File TEMP_DIRECTORY = new File(System.getProperty(\"java.io.tmpdir\"));",
"type": "File",
"var_name": "TEMP_... | {
"body": "@Test\n public void testFilesToDeleteOlderThan15Days() {\n\n final List<File> filesToDelete = Arrays.stream(TEMP_DIRECTORY.listFiles())\n .filter(file -> file.getName().startsWith(TEMP_FILE_PREFIX))\n .filter(DateTimeUtils.getFilterForFilesOlderThanGivenDays(15))\n ... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(DateTimeUtils.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(DateTimeUtils.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
}
],
... | {
"body": "public static Predicate<File> getFilterForFilesOlderThanGivenDays(final long days) {\n final Instant maxAge = Instant.now(Clock.systemUTC()).minus(days, DAYS);\n\n return file -> {\n boolean canDelete = false;\n try {\n final Instant lastModifiedTime = Fil... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_20 | {
"fields": [
{
"declarator": "snippetExecutor = new GoloSnippetExecutor()",
"modifier": "private final",
"original_string": "private final GoloSnippetExecutor snippetExecutor = new GoloSnippetExecutor();",
"type": "GoloSnippetExecutor",
"var_name": "snippetExecutor"
}
],
"fi... | {
"body": "@Test\n public void formatImportWithImportKeyword() {\n assertEquals(\"import mypackage\", snippetExecutor.formatImportLine(\"import mypackage\"));\n }",
"class_method_signature": "GoloSnippetExecutorTest.formatImportWithImportKeyword()",
"constructor": false,
"full_signature": "@Test pu... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(GoloSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(GoloSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOGGER"... | {
"body": "protected String formatImportLine(final String importLine) {\n final String importLineBeginning = \"import \";\n\n String formattedImportLine;\n\n if (importLine.startsWith(importLineBeginning)) {\n formattedImportLine = importLine;\n } else {\n formattedIm... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_98 | {
"fields": [],
"file": "slideshowfx-global-configuration/src/test/java/com/twasyl/slideshowfx/global/configuration/ContextFileWorkerTest.java",
"identifier": "ContextFileWorkerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testRecentPresentationAlreadyPresentWhenNot() {\n final RecentPresentation recentPresentation1 = new RecentPresentation(\"presentation1.sfx\", LocalDateTime.now());\n final RecentPresentation recentPresentation2 = new RecentPresentation(\"presentation2.sfx\", LocalDateT... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(ContextFileWorker.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(ContextFileWorker.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
... | {
"body": "public static boolean recentPresentationAlreadyPresent(final File contextFile, final RecentPresentation recentPresentation) throws ContextFileException {\n checkContextFileValidity(contextFile);\n\n final InputStream input;\n try {\n input = getInputStreamForFile(contextFile... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_184 | {
"fields": [
{
"declarator": "markup",
"modifier": "private static",
"original_string": "private static TextileMarkup markup;",
"type": "TextileMarkup",
"var_name": "markup"
}
],
"file": "slideshowfx-textile/src/test/java/com/twasyl/slideshowfx/markup/textile/TextileMarkupTe... | {
"body": "@Test\n public void generateCodeBloc() {\n final String result = markup.convertAsHtml(\"bc. final String s;\");\n\n assertEquals(\"<pre><code>final String s;\\n</code></pre>\", result);\n }",
"class_method_signature": "TextileMarkupTest.generateCodeBloc()",
"constructor": false,
"... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(TextileMarkup.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(TextileMarkup.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
}
],
... | {
"body": "@Override\n public String convertAsHtml(String markupString) {\n if (markupString == null)\n throw new IllegalArgumentException(\"Can not convert \" + getName() + \" to HTML : the String is null\");\n\n String result = null;\n\n try (final StringWriter writer = new String... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_77 | {
"fields": [],
"file": "slideshowfx-global-configuration/src/test/java/com/twasyl/slideshowfx/global/configuration/GlobalConfigurationObservableTest.java",
"identifier": "GlobalConfigurationObservableTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n @DisplayName(\"doesn't add a null observer\")\n void dontAddNullObserver() {\n final GlobalConfigurationObservable observable = new GlobalConfigurationObservable();\n observable.addObserver(null);\n assertEquals(0, observable.countObservers());\n }",
"class_method_si... | {
"fields": [],
"file": "slideshowfx-global-configuration/src/main/java/com/twasyl/slideshowfx/global/configuration/GlobalConfigurationObservable.java",
"identifier": "GlobalConfigurationObservable",
"interfaces": "",
"methods": [
{
"class_method_signature": "GlobalConfigurationObservable.addObserve... | {
"body": "@Override\n public synchronized void addObserver(Observer o) {\n if (o instanceof GlobalConfigurationObserver) {\n super.addObserver(o);\n }\n }",
"class_method_signature": "GlobalConfigurationObservable.addObserver(Observer o)",
"constructor": false,
"full_signature": ... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_57 | {
"fields": [
{
"declarator": "snippetExecutor = new GroovySnippetExecutor()",
"modifier": "private final",
"original_string": "private final GroovySnippetExecutor snippetExecutor = new GroovySnippetExecutor();",
"type": "GroovySnippetExecutor",
"var_name": "snippetExecutor"
}
... | {
"body": "@Test\n public void hasEmptyImports() {\n final CodeSnippet snippet = new CodeSnippet();\n snippet.getProperties().put(IMPORTS_PROPERTY, \"\");\n\n assertFalse(snippetExecutor.hasImports(snippet));\n }",
"class_method_signature": "GroovySnippetExecutorTest.hasEmptyImports()",
... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(GroovySnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(GroovySnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOG... | {
"body": "protected boolean hasImports(final CodeSnippet codeSnippet) {\n final String imports = codeSnippet.getProperties().get(IMPORTS_PROPERTY);\n return imports != null && !imports.isEmpty();\n }",
"class_method_signature": "GroovySnippetExecutor.hasImports(final CodeSnippet codeSnippet)",
"... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_41 | {
"fields": [],
"file": "slideshowfx-icons/src/test/java/com/twasyl/slideshowfx/icons/FontAwesomeTest.java",
"identifier": "FontAwesomeTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void obtainSolidFontFile() throws URISyntaxException {\n assertFontAwesomeUrl(FontAwesome.getFontAwesomeFontFile(SOLID));\n }",
"class_method_signature": "FontAwesomeTest.obtainSolidFontFile()",
"constructor": false,
"full_signature": "@Test public void obtainSolidFontFile... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(FontAwesome.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(FontAwesome.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
},
{
... | {
"body": "public static URL getFontAwesomeFontFile(final FontType type) {\n final StringBuilder path = new StringBuilder(\"fonts/fontawesome-\")\n .append(type.name().toLowerCase()).append(\".otf\");\n\n return getFontAwesomeFile(path.toString());\n }",
"class_method_signature": "Fo... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_16 | {
"fields": [
{
"declarator": "snippetExecutor = new GoloSnippetExecutor()",
"modifier": "private final",
"original_string": "private final GoloSnippetExecutor snippetExecutor = new GoloSnippetExecutor();",
"type": "GoloSnippetExecutor",
"var_name": "snippetExecutor"
}
],
"fi... | {
"body": "@Test\n public void hasNoImports() {\n final CodeSnippet snippet = new CodeSnippet();\n\n assertFalse(snippetExecutor.hasImports(snippet));\n }",
"class_method_signature": "GoloSnippetExecutorTest.hasNoImports()",
"constructor": false,
"full_signature": "@Test public void hasNoImp... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(GoloSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(GoloSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOGGER"... | {
"body": "protected boolean hasImports(final CodeSnippet codeSnippet) {\n final String imports = codeSnippet.getProperties().get(IMPORTS_PROPERTY);\n return imports != null && !imports.isEmpty();\n }",
"class_method_signature": "GoloSnippetExecutor.hasImports(final CodeSnippet codeSnippet)",
"co... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_82 | {
"fields": [],
"file": "slideshowfx-global-configuration/src/test/java/com/twasyl/slideshowfx/global/configuration/ContextFileWorkerTest.java",
"identifier": "ContextFileWorkerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void createRecentPresentationFromNodeWithoutOpenedDate() {\n final String path = \"/presentation.sfx\";\n\n final Node node = createRecentPresentationNode(createFileNode(path));\n final RecentPresentation recentPresentation = ContextFileWorker.buildRecentPresentationF... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(ContextFileWorker.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(ContextFileWorker.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
... | {
"body": "protected static RecentPresentation buildRecentPresentationFromNode(final Node node) {\n RecentPresentation recentPresentation = null;\n LocalDateTime openedDateTime = null;\n String path = null;\n\n final NodeList children = node.getChildNodes();\n int index = 0;\n\n ... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_171 | {
"fields": [],
"file": "slideshowfx-ui-controls/src/test/java/com/twasyl/slideshowfx/ui/controls/validators/ValidatorsTest.java",
"identifier": "ValidatorsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void isNotEmptyWithOnlySpaces() {\n assertFalse(isNotEmpty().isValid(\" \"));\n }",
"class_method_signature": "ValidatorsTest.isNotEmptyWithOnlySpaces()",
"constructor": false,
"full_signature": "@Test public void isNotEmptyWithOnlySpaces()",
"identifier": "isNotEmptyWi... | {
"fields": [],
"file": "slideshowfx-ui-controls/src/main/java/com/twasyl/slideshowfx/ui/controls/validators/Validators.java",
"identifier": "Validators",
"interfaces": "",
"methods": [
{
"class_method_signature": "Validators.isNotEmpty()",
"constructor": false,
"full_signature": "public... | {
"body": "public static IValidator<String> isNotEmpty() {\n return value -> value != null && !value.isBlank();\n }",
"class_method_signature": "Validators.isNotEmpty()",
"constructor": false,
"full_signature": "public static IValidator<String> isNotEmpty()",
"identifier": "isNotEmpty",
"invocatio... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_126 | {
"fields": [
{
"declarator": "snippetExecutor = new KotlinSnippetExecutor()",
"modifier": "private final",
"original_string": "private final KotlinSnippetExecutor snippetExecutor = new KotlinSnippetExecutor();",
"type": "KotlinSnippetExecutor",
"var_name": "snippetExecutor"
}
... | {
"body": "@Test\n public void hasEmptyPackage() {\n final CodeSnippet snippet = new CodeSnippet();\n snippet.getProperties().put(PACKAGE_NAME_PROPERTY, \"\");\n\n assertFalse(snippetExecutor.hasPackage(snippet));\n }",
"class_method_signature": "KotlinSnippetExecutorTest.hasEmptyPackage(... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(KotlinSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(KotlinSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOG... | {
"body": "protected boolean hasPackage(final CodeSnippet codeSnippet) {\n final String packageName = codeSnippet.getProperties().get(PACKAGE_NAME_PROPERTY);\n return packageName != null && !packageName.isEmpty();\n }",
"class_method_signature": "KotlinSnippetExecutor.hasPackage(final CodeSnippet c... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_130 | {
"fields": [
{
"declarator": "snippetExecutor = new KotlinSnippetExecutor()",
"modifier": "private final",
"original_string": "private final KotlinSnippetExecutor snippetExecutor = new KotlinSnippetExecutor();",
"type": "KotlinSnippetExecutor",
"var_name": "snippetExecutor"
}
... | {
"body": "@Test\n public void importsWithAndWithoutKeyword() throws IOException {\n final CodeSnippet snippet = new CodeSnippet();\n snippet.getProperties().put(IMPORTS_PROPERTY, \"import mypackage\\nmysecondpackage\");\n\n assertEquals(\"import mypackage\\nimport mysecondpackage\", snippetEx... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(KotlinSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(KotlinSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOG... | {
"body": "protected String getImports(final CodeSnippet codeSnippet) throws IOException {\n final StringJoiner imports = new StringJoiner(\"\\n\");\n\n try (final StringReader stringReader = new StringReader(codeSnippet.getProperties().get(IMPORTS_PROPERTY));\n final BufferedReader reader =... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_188 | {
"fields": [
{
"declarator": "snippetExecutor = new GoSnippetExecutor()",
"modifier": "private final",
"original_string": "private final GoSnippetExecutor snippetExecutor = new GoSnippetExecutor();",
"type": "GoSnippetExecutor",
"var_name": "snippetExecutor"
}
],
"file": "sl... | {
"body": "@Test\n public void noPackageName() {\n final CodeSnippet snippet = new CodeSnippet();\n\n assertEquals(\"slideshowfx\", snippetExecutor.determinePackageName(snippet));\n }",
"class_method_signature": "GoSnippetExecutorTest.noPackageName()",
"constructor": false,
"full_signature":... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(GoSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(GoSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
... | {
"body": "protected String determinePackageName(final CodeSnippet codeSnippet) {\n String packageName = codeSnippet.getProperties().get(PACKAGE_NAME_PROPERTY);\n if (packageName == null || packageName.isEmpty()) packageName = \"slideshowfx\";\n return packageName;\n }",
"class_method_signat... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_94 | {
"fields": [],
"file": "slideshowfx-global-configuration/src/test/java/com/twasyl/slideshowfx/global/configuration/ContextFileWorkerTest.java",
"identifier": "ContextFileWorkerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void createNodeFromRecentPresentation() throws Exception {\n final String xml = \"<slideshowfx></slideshowfx>\";\n final Document document = createDocumentFromString(xml);\n\n final String path = \"presentation.sfx\";\n final LocalDateTime openedDateTime = Loca... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(ContextFileWorker.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(ContextFileWorker.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
... | {
"body": "protected static Node createNodeFromRecentPresentation(final Document document, final RecentPresentation recentPresentation) {\n if (recentPresentation == null || recentPresentation.getOpenedDateTime() == null\n || recentPresentation.getAbsolutePath().trim().isEmpty()) {\n ... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_167 | {
"fields": [
{
"declarator": "quiz",
"modifier": "private static",
"original_string": "private static Quiz quiz;",
"type": "Quiz",
"var_name": "quiz"
}
],
"file": "slideshowfx-server/src/test/java/com/twasyl/slideshowfx/server/beans/quiz/QuizTest.java",
"identifier": "Quiz... | {
"body": "@Test\n public void testWithAllCorrectAnswersAndAWrongAnswer() {\n assertFalse(quiz.checkAnswers(1L, 2L, 3L));\n }",
"class_method_signature": "QuizTest.testWithAllCorrectAnswersAndAWrongAnswer()",
"constructor": false,
"full_signature": "@Test public void testWithAllCorrectAnswersAndAWr... | {
"fields": [
{
"declarator": "id = new SimpleLongProperty()",
"modifier": "private",
"original_string": "private LongProperty id = new SimpleLongProperty();",
"type": "LongProperty",
"var_name": "id"
},
{
"declarator": "question = new SimpleObjectProperty<>()",
"... | {
"body": "public boolean checkAnswers(Long... answersIDs) {\n boolean correct = answersIDs != null && answersIDs.length > 0;\n\n // Avoid unnecessary treatment and variable assignment\n if (correct) {\n final List<Answer> correctAnswers = this.getAnswers().filtered(Answer::isCorrect);... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_54 | {
"fields": [
{
"declarator": "snippetExecutor = new GroovySnippetExecutor()",
"modifier": "private final",
"original_string": "private final GroovySnippetExecutor snippetExecutor = new GroovySnippetExecutor();",
"type": "GroovySnippetExecutor",
"var_name": "snippetExecutor"
}
... | {
"body": "@Test\n public void makeScript() {\n final CodeSnippet codeSnippet = new CodeSnippet();\n codeSnippet.getProperties().put(MAKE_SCRIPT, \"true\");\n\n assertTrue(snippetExecutor.makeScript(codeSnippet));\n }",
"class_method_signature": "GroovySnippetExecutorTest.makeScript()",
... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(GroovySnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(GroovySnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOG... | {
"body": "protected boolean makeScript(final CodeSnippet codeSnippet) {\n if (codeSnippet.getProperties().containsKey(MAKE_SCRIPT)) {\n return Boolean.parseBoolean(codeSnippet.getProperties().get(MAKE_SCRIPT));\n } else {\n return false;\n }\n }",
"class_method_signatu... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_148 | {
"fields": [
{
"declarator": "snippetExecutor = new ScalaSnippetExecutor()",
"modifier": "private final",
"original_string": "private final ScalaSnippetExecutor snippetExecutor = new ScalaSnippetExecutor();",
"type": "ScalaSnippetExecutor",
"var_name": "snippetExecutor"
}
],
... | {
"body": "@Test\n public void buildSourceCodeWithoutWrapInMain() throws IOException {\n final CodeSnippet snippet = new CodeSnippet();\n snippet.getProperties().put(CLASS_NAME_PROPERTY, \"TestScala\");\n snippet.getProperties().put(IMPORTS_PROPERTY, \"import mypackage\\nmysecondpackage\");\n\... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(ScalaSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(ScalaSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOGGE... | {
"body": "protected String buildSourceCode(final CodeSnippet codeSnippet) throws IOException {\n final StringBuilder sourceCode = new StringBuilder();\n\n if (hasImports(codeSnippet)) {\n sourceCode.append(getImports(codeSnippet)).append(\"\\n\\n\");\n }\n\n sourceCode.append(g... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_42 | {
"fields": [],
"file": "slideshowfx-icons/src/test/java/com/twasyl/slideshowfx/icons/FontAwesomeTest.java",
"identifier": "FontAwesomeTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void obtainBrandFontFile() throws URISyntaxException {\n assertFontAwesomeUrl(FontAwesome.getFontAwesomeFontFile(BRAND));\n }",
"class_method_signature": "FontAwesomeTest.obtainBrandFontFile()",
"constructor": false,
"full_signature": "@Test public void obtainBrandFontFile... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(FontAwesome.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(FontAwesome.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
},
{
... | {
"body": "public static URL getFontAwesomeFontFile(final FontType type) {\n final StringBuilder path = new StringBuilder(\"fonts/fontawesome-\")\n .append(type.name().toLowerCase()).append(\".otf\");\n\n return getFontAwesomeFile(path.toString());\n }",
"class_method_signature": "Fo... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_15 | {
"fields": [
{
"declarator": "snippetExecutor = new GoloSnippetExecutor()",
"modifier": "private final",
"original_string": "private final GoloSnippetExecutor snippetExecutor = new GoloSnippetExecutor();",
"type": "GoloSnippetExecutor",
"var_name": "snippetExecutor"
}
],
"fi... | {
"body": "@Test\n public void givenModuleName() {\n final CodeSnippet snippet = new CodeSnippet();\n snippet.getProperties().put(MODULE_NAME_PROPERTY, \"sfx.Golo\");\n\n assertEquals(\"sfx.Golo\", snippetExecutor.determineModuleName(snippet));\n }",
"class_method_signature": "GoloSnippet... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(GoloSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(GoloSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOGGER"... | {
"body": "protected String determineModuleName(final CodeSnippet codeSnippet) {\n String moduleName = codeSnippet.getProperties().get(MODULE_NAME_PROPERTY);\n if (moduleName == null || moduleName.isEmpty()) moduleName = \"slideshowfx.Snippet\";\n return moduleName;\n }",
"class_method_signa... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_109 | {
"fields": [],
"file": "slideshowfx-hosting-connector/src/test/java/com/twasyl/slideshowfx/hosting/connector/io/RemoteFileTest.java",
"identifier": "RemoteFileTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void toStringWithOnlyName() {\n final RemoteFile parent = new RemoteFile(\"parent\");\n\n assertEquals(\"/parent\", parent.toString());\n }",
"class_method_signature": "RemoteFileTest.toStringWithOnlyName()",
"constructor": false,
"full_signature": "@Test public voi... | {
"fields": [
{
"declarator": "empty = true",
"modifier": "protected",
"original_string": "protected boolean empty = true;",
"type": "boolean",
"var_name": "empty"
},
{
"declarator": "parent = null",
"modifier": "protected",
"original_string": "protected Rem... | {
"body": "@Override\n public String toString() {\n final StringBuilder builder = new StringBuilder();\n\n if(this.isRoot()) {\n builder.append(\"/\");\n } else {\n final String parentString = this.parent.toString();\n builder.append(parentString);\n\n ... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_172 | {
"fields": [],
"file": "slideshowfx-ui-controls/src/test/java/com/twasyl/slideshowfx/ui/controls/validators/ValidatorsTest.java",
"identifier": "ValidatorsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void isNotEmptyWithNonEmptyString() {\n assertTrue(isNotEmpty().isValid(\"Test\"));\n }",
"class_method_signature": "ValidatorsTest.isNotEmptyWithNonEmptyString()",
"constructor": false,
"full_signature": "@Test public void isNotEmptyWithNonEmptyString()",
"identifier": ... | {
"fields": [],
"file": "slideshowfx-ui-controls/src/main/java/com/twasyl/slideshowfx/ui/controls/validators/Validators.java",
"identifier": "Validators",
"interfaces": "",
"methods": [
{
"class_method_signature": "Validators.isNotEmpty()",
"constructor": false,
"full_signature": "public... | {
"body": "public static IValidator<String> isNotEmpty() {\n return value -> value != null && !value.isBlank();\n }",
"class_method_signature": "Validators.isNotEmpty()",
"constructor": false,
"full_signature": "public static IValidator<String> isNotEmpty()",
"identifier": "isNotEmpty",
"invocatio... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_81 | {
"fields": [],
"file": "slideshowfx-global-configuration/src/test/java/com/twasyl/slideshowfx/global/configuration/ContextFileWorkerTest.java",
"identifier": "ContextFileWorkerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void createRecentPresentationFromNodeWithoutPath() {\n final LocalDateTime date = LocalDateTime.now();\n\n final Node node = createRecentPresentationNode(createOpenedDateTimeNode(date));\n final RecentPresentation recentPresentation = ContextFileWorker.buildRecentPres... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(ContextFileWorker.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(ContextFileWorker.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
... | {
"body": "protected static RecentPresentation buildRecentPresentationFromNode(final Node node) {\n RecentPresentation recentPresentation = null;\n LocalDateTime openedDateTime = null;\n String path = null;\n\n final NodeList children = node.getChildNodes();\n int index = 0;\n\n ... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_125 | {
"fields": [
{
"declarator": "snippetExecutor = new KotlinSnippetExecutor()",
"modifier": "private final",
"original_string": "private final KotlinSnippetExecutor snippetExecutor = new KotlinSnippetExecutor();",
"type": "KotlinSnippetExecutor",
"var_name": "snippetExecutor"
}
... | {
"body": "@Test\n public void hasNoPackage() {\n final CodeSnippet snippet = new CodeSnippet();\n\n assertFalse(snippetExecutor.hasPackage(snippet));\n }",
"class_method_signature": "KotlinSnippetExecutorTest.hasNoPackage()",
"constructor": false,
"full_signature": "@Test public void hasNoP... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(KotlinSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(KotlinSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOG... | {
"body": "protected boolean hasPackage(final CodeSnippet codeSnippet) {\n final String packageName = codeSnippet.getProperties().get(PACKAGE_NAME_PROPERTY);\n return packageName != null && !packageName.isEmpty();\n }",
"class_method_signature": "KotlinSnippetExecutor.hasPackage(final CodeSnippet c... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_39 | {
"fields": [
{
"declarator": "snippetExecutor = new JavaSnippetExecutor()",
"modifier": "private final",
"original_string": "private final JavaSnippetExecutor snippetExecutor = new JavaSnippetExecutor();",
"type": "JavaSnippetExecutor",
"var_name": "snippetExecutor"
}
],
"fi... | {
"body": "@Test\n public void buildSourceCode() throws IOException {\n final CodeSnippet snippet = new CodeSnippet();\n snippet.getProperties().put(CLASS_NAME_PROPERTY, \"TestJava\");\n snippet.getProperties().put(IMPORTS_PROPERTY, \"import mypackage\\nmysecondpackage\");\n snippet.get... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(JavaSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(JavaSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOGGER"... | {
"body": "protected String buildSourceCode(final CodeSnippet codeSnippet) throws IOException {\n final StringBuilder sourceCode = new StringBuilder();\n\n if (hasImports(codeSnippet)) {\n sourceCode.append(getImports(codeSnippet)).append(\"\\n\\n\");\n }\n\n sourceCode.append(g... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_133 | {
"fields": [
{
"declarator": "snippetExecutor = new KotlinSnippetExecutor()",
"modifier": "private final",
"original_string": "private final KotlinSnippetExecutor snippetExecutor = new KotlinSnippetExecutor();",
"type": "KotlinSnippetExecutor",
"var_name": "snippetExecutor"
}
... | {
"body": "@Test\n public void buildSourceCodeWithoutImportsAndWithoutWrapInMainAndWithoutPackage() throws IOException {\n final CodeSnippet snippet = new CodeSnippet();\n snippet.setCode(\"fun main(args: Array<String>) {\\n\\tprintln(\\\"Hello\\\")\\n}\");\n\n final String expected = IOUtils.... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(KotlinSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(KotlinSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOG... | {
"body": "protected String buildSourceCode(final CodeSnippet codeSnippet) throws IOException {\n final StringBuilder sourceCode = new StringBuilder();\n\n if (hasPackage(codeSnippet)) {\n sourceCode.append(getPackage(codeSnippet)).append(\"\\n\\n\");\n }\n\n if (hasImports(code... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_164 | {
"fields": [
{
"declarator": "quiz",
"modifier": "private static",
"original_string": "private static Quiz quiz;",
"type": "Quiz",
"var_name": "quiz"
}
],
"file": "slideshowfx-server/src/test/java/com/twasyl/slideshowfx/server/beans/quiz/QuizTest.java",
"identifier": "Quiz... | {
"body": "@Test\n public void testWithoutAnswers() {\n assertFalse(quiz.checkAnswers());\n }",
"class_method_signature": "QuizTest.testWithoutAnswers()",
"constructor": false,
"full_signature": "@Test public void testWithoutAnswers()",
"identifier": "testWithoutAnswers",
"invocations": [
"... | {
"fields": [
{
"declarator": "id = new SimpleLongProperty()",
"modifier": "private",
"original_string": "private LongProperty id = new SimpleLongProperty();",
"type": "LongProperty",
"var_name": "id"
},
{
"declarator": "question = new SimpleObjectProperty<>()",
"... | {
"body": "public boolean checkAnswers(Long... answersIDs) {\n boolean correct = answersIDs != null && answersIDs.length > 0;\n\n // Avoid unnecessary treatment and variable assignment\n if (correct) {\n final List<Answer> correctAnswers = this.getAnswers().filtered(Answer::isCorrect);... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_78 | {
"fields": [],
"file": "slideshowfx-global-configuration/src/test/java/com/twasyl/slideshowfx/global/configuration/GlobalConfigurationObservableTest.java",
"identifier": "GlobalConfigurationObservableTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n @DisplayName(\"doesn't add non GlobalConfigurationObserver instances\")\n void dontAcceptNonGlobalConfigurationObservers() {\n final GlobalConfigurationObservable observable = new GlobalConfigurationObservable();\n observable.addObserver((o, arg) -> {\n // We don't ca... | {
"fields": [],
"file": "slideshowfx-global-configuration/src/main/java/com/twasyl/slideshowfx/global/configuration/GlobalConfigurationObservable.java",
"identifier": "GlobalConfigurationObservable",
"interfaces": "",
"methods": [
{
"class_method_signature": "GlobalConfigurationObservable.addObserve... | {
"body": "@Override\n public synchronized void addObserver(Observer o) {\n if (o instanceof GlobalConfigurationObserver) {\n super.addObserver(o);\n }\n }",
"class_method_signature": "GlobalConfigurationObservable.addObserver(Observer o)",
"constructor": false,
"full_signature": ... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_97 | {
"fields": [],
"file": "slideshowfx-global-configuration/src/test/java/com/twasyl/slideshowfx/global/configuration/ContextFileWorkerTest.java",
"identifier": "ContextFileWorkerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testRecentPresentationAlreadyPresent() {\n final RecentPresentation recentPresentation1 = new RecentPresentation(\"presentation1.sfx\", LocalDateTime.now());\n final RecentPresentation recentPresentation2 = new RecentPresentation(\"presentation2.sfx\", LocalDateTime.now... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(ContextFileWorker.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(ContextFileWorker.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
... | {
"body": "public static boolean recentPresentationAlreadyPresent(final File contextFile, final RecentPresentation recentPresentation) throws ContextFileException {\n checkContextFileValidity(contextFile);\n\n final InputStream input;\n try {\n input = getInputStreamForFile(contextFile... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_1 | {
"fields": [],
"file": "slideshowfx-content-extension/src/test/java/com/twasyl/slideshowfx/content/extension/ResourceTest.java",
"identifier": "ResourceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCSSFile() {\n final Resource resource = new Resource(ResourceType.CSS_FILE, \"somewhere/file.css\");\n final String expected = \"<link rel=\\\"stylesheet\\\" href=\\\"base/path/somewhere/file.css\\\">\";\n assertEquals(expected, resource.buildHTMLString(\"bas... | {
"fields": [
{
"declarator": "content",
"modifier": "private",
"original_string": "private String content;",
"type": "String",
"var_name": "content"
},
{
"declarator": "type",
"modifier": "private",
"original_string": "private ResourceType type;",
"ty... | {
"body": "public String buildHTMLString(String location) {\n final StringBuilder builder = new StringBuilder();\n\n if (this.getType() == ResourceType.JAVASCRIPT_FILE) {\n builder.append(\"<script type=\\\"text/javascript\\\" src=\\\"\").append(location).append(\"/\").append(this.getContent(... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_113 | {
"fields": [],
"file": "slideshowfx-hosting-connector/src/test/java/com/twasyl/slideshowfx/hosting/connector/io/RemoteFileTest.java",
"identifier": "RemoteFileTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test public void toStringForRoot() {\n final RemoteFile root = new RemoteFile(null);\n\n assertEquals(\"/\", root.toString());\n }",
"class_method_signature": "RemoteFileTest.toStringForRoot()",
"constructor": false,
"full_signature": "@Test public void toStringForRoot()",
"ident... | {
"fields": [
{
"declarator": "empty = true",
"modifier": "protected",
"original_string": "protected boolean empty = true;",
"type": "boolean",
"var_name": "empty"
},
{
"declarator": "parent = null",
"modifier": "protected",
"original_string": "protected Rem... | {
"body": "@Override\n public String toString() {\n final StringBuilder builder = new StringBuilder();\n\n if(this.isRoot()) {\n builder.append(\"/\");\n } else {\n final String parentString = this.parent.toString();\n builder.append(parentString);\n\n ... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_144 | {
"fields": [
{
"declarator": "snippetExecutor = new ScalaSnippetExecutor()",
"modifier": "private final",
"original_string": "private final ScalaSnippetExecutor snippetExecutor = new ScalaSnippetExecutor();",
"type": "ScalaSnippetExecutor",
"var_name": "snippetExecutor"
}
],
... | {
"body": "@Test\n public void formatImportWithImportKeyword() {\n assertEquals(\"import mypackage\", snippetExecutor.formatImportLine(\"import mypackage\"));\n }",
"class_method_signature": "ScalaSnippetExecutorTest.formatImportWithImportKeyword()",
"constructor": false,
"full_signature": "@Test p... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(ScalaSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(ScalaSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOGGE... | {
"body": "protected String formatImportLine(final String importLine) {\n final String importLineBeginning = \"import \";\n String formattedImportLine;\n\n if (importLine.startsWith(importLineBeginning)) {\n formattedImportLine = importLine;\n } else {\n formattedImpo... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_58 | {
"fields": [
{
"declarator": "snippetExecutor = new GroovySnippetExecutor()",
"modifier": "private final",
"original_string": "private final GroovySnippetExecutor snippetExecutor = new GroovySnippetExecutor();",
"type": "GroovySnippetExecutor",
"var_name": "snippetExecutor"
}
... | {
"body": "@Test\n public void hasImports() {\n final CodeSnippet snippet = new CodeSnippet();\n snippet.getProperties().put(IMPORTS_PROPERTY, \"import p._\");\n\n assertTrue(snippetExecutor.hasImports(snippet));\n }",
"class_method_signature": "GroovySnippetExecutorTest.hasImports()",
... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(GroovySnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(GroovySnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOG... | {
"body": "protected boolean hasImports(final CodeSnippet codeSnippet) {\n final String imports = codeSnippet.getProperties().get(IMPORTS_PROPERTY);\n return imports != null && !imports.isEmpty();\n }",
"class_method_signature": "GroovySnippetExecutor.hasImports(final CodeSnippet codeSnippet)",
"... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_152 | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(SlideshowFXHandlerTest.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(SlideshowFXHandlerTest.class.getName());",
"type": "Logger",
"var_name": "L... | {
"body": "@Test\n @DisplayName(\"doesn't contain the latest log if the log level doesn't allow it\")\n void logLevelTooHighForLatestLog() {\n LOGGER.setLevel(WARNING);\n LOGGER.info(\"Should not be logged\");\n\n assertNull(handler.getLatestLog());\n }",
"class_method_signature": "Sli... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(SlideshowFXHandler.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(SlideshowFXHandler.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
... | {
"body": "public String getLatestLog() {\n return latestLog;\n }",
"class_method_signature": "SlideshowFXHandler.getLatestLog()",
"constructor": false,
"full_signature": "public String getLatestLog()",
"identifier": "getLatestLog",
"invocations": [],
"modifiers": "public",
"parameters": "()",... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_105 | {
"fields": [
{
"declarator": "markup",
"modifier": "private static",
"original_string": "private static MarkdownMarkup markup;",
"type": "MarkdownMarkup",
"var_name": "markup"
}
],
"file": "slideshowfx-markdown/src/test/java/com/twasyl/slideshowfx/markup/markdown/MarkdownMar... | {
"body": "@Test\n void generateInlineCode() {\n final String result = markup.convertAsHtml(\"`public class Java { }`\");\n\n assertEquals(\"<p><code>public class Java { }</code></p>\", result);\n }",
"class_method_signature": "MarkdownMarkupTest.generateInlineCode()",
"constructor": false,
... | {
"fields": [
{
"declarator": "extensions",
"modifier": "private final",
"original_string": "private final List<Extension> extensions;",
"type": "List<Extension>",
"var_name": "extensions"
}
],
"file": "slideshowfx-markdown/src/main/java/com/twasyl/slideshowfx/markup/markdown... | {
"body": "@Override\n public String convertAsHtml(String markupString) {\n if (markupString == null)\n throw new IllegalArgumentException(\"Can not convert \" + getName() + \" to HTML : the String is null\");\n\n final Parser parser = Parser.builder().extensions(extensions).build();\n ... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_19 | {
"fields": [
{
"declarator": "snippetExecutor = new GoloSnippetExecutor()",
"modifier": "private final",
"original_string": "private final GoloSnippetExecutor snippetExecutor = new GoloSnippetExecutor();",
"type": "GoloSnippetExecutor",
"var_name": "snippetExecutor"
}
],
"fi... | {
"body": "@Test\n public void formatImportWithoutImportKeyword() {\n assertEquals(\"import mypackage\", snippetExecutor.formatImportLine(\"mypackage\"));\n }",
"class_method_signature": "GoloSnippetExecutorTest.formatImportWithoutImportKeyword()",
"constructor": false,
"full_signature": "@Test pub... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(GoloSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(GoloSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOGGER"... | {
"body": "protected String formatImportLine(final String importLine) {\n final String importLineBeginning = \"import \";\n\n String formattedImportLine;\n\n if (importLine.startsWith(importLineBeginning)) {\n formattedImportLine = importLine;\n } else {\n formattedIm... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_62 | {
"fields": [
{
"declarator": "snippetExecutor = new GroovySnippetExecutor()",
"modifier": "private final",
"original_string": "private final GroovySnippetExecutor snippetExecutor = new GroovySnippetExecutor();",
"type": "GroovySnippetExecutor",
"var_name": "snippetExecutor"
}
... | {
"body": "@Test\n public void importsWithAndWithoutKeyword() throws IOException {\n final CodeSnippet snippet = new CodeSnippet();\n snippet.getProperties().put(IMPORTS_PROPERTY, \"import mypackage\\nmysecondpackage\");\n\n assertEquals(\"import mypackage\\nimport mysecondpackage\", snippetEx... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(GroovySnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(GroovySnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOG... | {
"body": "protected String getImports(final CodeSnippet codeSnippet) throws IOException {\n final StringJoiner imports = new StringJoiner(\"\\n\");\n\n try (final StringReader stringReader = new StringReader(codeSnippet.getProperties().get(IMPORTS_PROPERTY));\n final BufferedReader reader =... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_191 | {
"fields": [
{
"declarator": "snippetExecutor = new GoSnippetExecutor()",
"modifier": "private final",
"original_string": "private final GoSnippetExecutor snippetExecutor = new GoSnippetExecutor();",
"type": "GoSnippetExecutor",
"var_name": "snippetExecutor"
}
],
"file": "sl... | {
"body": "@Test\n public void hasNoImports() {\n final CodeSnippet snippet = new CodeSnippet();\n\n assertFalse(snippetExecutor.hasImports(snippet));\n }",
"class_method_signature": "GoSnippetExecutorTest.hasNoImports()",
"constructor": false,
"full_signature": "@Test public void hasNoImpor... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(GoSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(GoSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
... | {
"body": "protected boolean hasImports(final CodeSnippet codeSnippet) {\n final String imports = codeSnippet.getProperties().get(IMPORTS_PROPERTY);\n return imports != null && !imports.isEmpty();\n }",
"class_method_signature": "GoSnippetExecutor.hasImports(final CodeSnippet codeSnippet)",
"cons... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_200 | {
"fields": [
{
"declarator": "snippetExecutor = new GoSnippetExecutor()",
"modifier": "private final",
"original_string": "private final GoSnippetExecutor snippetExecutor = new GoSnippetExecutor();",
"type": "GoSnippetExecutor",
"var_name": "snippetExecutor"
}
],
"file": "sl... | {
"body": "@Test\n public void buildSourceCode() throws IOException {\n final CodeSnippet snippet = new CodeSnippet();\n snippet.getProperties().put(PACKAGE_NAME_PROPERTY, \"sfx\");\n snippet.getProperties().put(IMPORTS_PROPERTY, \"mypackage\\nmysecondpackage\");\n snippet.getProperties... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(GoSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(GoSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
... | {
"body": "protected String buildSourceCode(final CodeSnippet codeSnippet) throws IOException {\n final StringBuilder sourceCode = new StringBuilder();\n\n sourceCode.append(getStartPackageDefinition(codeSnippet)).append(\"\\n\\n\");\n\n if (hasImports(codeSnippet)) {\n sourceCode.appe... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_35 | {
"fields": [
{
"declarator": "snippetExecutor = new JavaSnippetExecutor()",
"modifier": "private final",
"original_string": "private final JavaSnippetExecutor snippetExecutor = new JavaSnippetExecutor();",
"type": "JavaSnippetExecutor",
"var_name": "snippetExecutor"
}
],
"fi... | {
"body": "@Test\n public void importsWithAndWithoutKeyword() throws IOException {\n final CodeSnippet snippet = new CodeSnippet();\n snippet.getProperties().put(IMPORTS_PROPERTY, \"import mypackage\\nmysecondpackage\");\n\n assertEquals(\"import mypackage;\\nimport mysecondpackage;\", snippet... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(JavaSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(JavaSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOGGER"... | {
"body": "protected String getImports(final CodeSnippet codeSnippet) throws IOException {\n final StringJoiner imports = new StringJoiner(\"\\n\");\n\n try (final StringReader stringReader = new StringReader(codeSnippet.getProperties().get(IMPORTS_PROPERTY));\n final BufferedReader reader =... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_129 | {
"fields": [
{
"declarator": "snippetExecutor = new KotlinSnippetExecutor()",
"modifier": "private final",
"original_string": "private final KotlinSnippetExecutor snippetExecutor = new KotlinSnippetExecutor();",
"type": "KotlinSnippetExecutor",
"var_name": "snippetExecutor"
}
... | {
"body": "@Test\n public void formatImportWithImportKeyword() {\n assertEquals(\"import mypackage\", snippetExecutor.formatImportLine(\"import mypackage\"));\n }",
"class_method_signature": "KotlinSnippetExecutorTest.formatImportWithImportKeyword()",
"constructor": false,
"full_signature": "@Test ... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(KotlinSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(KotlinSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOG... | {
"body": "protected String formatImportLine(final String importLine) {\n final String importLineBeginning = \"import \";\n String formattedImportLine;\n\n if (importLine.startsWith(importLineBeginning)) {\n formattedImportLine = importLine;\n } else {\n formattedImpo... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_216 | {
"fields": [
{
"declarator": "TEMP_DIRECTORY = new File(System.getProperty(\"java.io.tmpdir\"))",
"modifier": "private static final",
"original_string": "private static final File TEMP_DIRECTORY = new File(System.getProperty(\"java.io.tmpdir\"));",
"type": "File",
"var_name": "TEMP_... | {
"body": "@Test\n public void testFilesToDeleteOlderThan10Days() throws IOException {\n\n final List<File> filesToDelete = Arrays.stream(TEMP_DIRECTORY.listFiles())\n .filter(file -> file.getName().startsWith(TEMP_FILE_PREFIX))\n .filter(DateTimeUtils.getFilterForFilesOlderTha... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(DateTimeUtils.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(DateTimeUtils.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
}
],
... | {
"body": "public static Predicate<File> getFilterForFilesOlderThanGivenDays(final long days) {\n final Instant maxAge = Instant.now(Clock.systemUTC()).minus(days, DAYS);\n\n return file -> {\n boolean canDelete = false;\n try {\n final Instant lastModifiedTime = Fil... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_23 | {
"fields": [
{
"declarator": "snippetExecutor = new GoloSnippetExecutor()",
"modifier": "private final",
"original_string": "private final GoloSnippetExecutor snippetExecutor = new GoloSnippetExecutor();",
"type": "GoloSnippetExecutor",
"var_name": "snippetExecutor"
}
],
"fi... | {
"body": "@Test\n public void buildSourceCodeWithoutImportsAndWithoutWrapInMain() throws IOException {\n final CodeSnippet snippet = new CodeSnippet();\n snippet.getProperties().put(MODULE_NAME_PROPERTY, \"sfx.Golo\");\n\n snippet.setCode(\"function main = |args| {\\n\\tprintln(\\\"Hello\\\")... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(GoloSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(GoloSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOGGER"... | {
"body": "protected String buildSourceCode(final CodeSnippet codeSnippet) throws IOException {\n final StringBuilder sourceCode = new StringBuilder();\n\n sourceCode.append(getStartModuleDefinition(codeSnippet)).append(\"\\n\\n\");\n\n if (hasImports(codeSnippet)) {\n sourceCode.appen... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_74 | {
"fields": [],
"file": "slideshowfx-global-configuration/src/test/java/com/twasyl/slideshowfx/global/configuration/RecentPresentationTest.java",
"identifier": "RecentPresentationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n @DisplayName(\"is greater than another\")\n void compareToGreaterThanAnother() {\n final RecentPresentation presentation1 = new RecentPresentation(\"presentation1.sfx\", null);\n final RecentPresentation presentation2 = new RecentPresentation(\"presentation2.sfx\", null);\n ... | {
"fields": [
{
"declarator": "openedDateTime",
"modifier": "private",
"original_string": "private LocalDateTime openedDateTime;",
"type": "LocalDateTime",
"var_name": "openedDateTime"
},
{
"declarator": "normalizedPath",
"modifier": "private",
"original_str... | {
"body": "@Override\n public int compareTo(File o) {\n if (o != null && o instanceof RecentPresentation) {\n final RecentPresentation other = (RecentPresentation) o;\n return this.getNormalizedPath().compareTo(other.getNormalizedPath());\n }\n\n return 1;\n }",
"cla... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_168 | {
"fields": [
{
"declarator": "quiz",
"modifier": "private static",
"original_string": "private static Quiz quiz;",
"type": "Quiz",
"var_name": "quiz"
}
],
"file": "slideshowfx-server/src/test/java/com/twasyl/slideshowfx/server/beans/quiz/QuizTest.java",
"identifier": "Quiz... | {
"body": "@Test\n public void testWithCorrectAnswers() {\n assertTrue(quiz.checkAnswers(2L, 3L));\n }",
"class_method_signature": "QuizTest.testWithCorrectAnswers()",
"constructor": false,
"full_signature": "@Test public void testWithCorrectAnswers()",
"identifier": "testWithCorrectAnswers",
"... | {
"fields": [
{
"declarator": "id = new SimpleLongProperty()",
"modifier": "private",
"original_string": "private LongProperty id = new SimpleLongProperty();",
"type": "LongProperty",
"var_name": "id"
},
{
"declarator": "question = new SimpleObjectProperty<>()",
"... | {
"body": "public boolean checkAnswers(Long... answersIDs) {\n boolean correct = answersIDs != null && answersIDs.length > 0;\n\n // Avoid unnecessary treatment and variable assignment\n if (correct) {\n final List<Answer> correctAnswers = this.getAnswers().filtered(Answer::isCorrect);... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_187 | {
"fields": [
{
"declarator": "markup",
"modifier": "private static",
"original_string": "private static TextileMarkup markup;",
"type": "TextileMarkup",
"var_name": "markup"
}
],
"file": "slideshowfx-textile/src/test/java/com/twasyl/slideshowfx/markup/textile/TextileMarkupTe... | {
"body": "@Test\n public void generateTable() {\n final String result = markup.convertAsHtml(\n \"\"\"\n |_. Column 1 |_. Column 2 |\n | Value 1 | Value 2 |\"\"\");\n\n assertEquals(\"<table><tr><th>Column 1</th><th>Column 2</th></... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(TextileMarkup.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(TextileMarkup.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
}
],
... | {
"body": "@Override\n public String convertAsHtml(String markupString) {\n if (markupString == null)\n throw new IllegalArgumentException(\"Can not convert \" + getName() + \" to HTML : the String is null\");\n\n String result = null;\n\n try (final StringWriter writer = new String... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_75 | {
"fields": [],
"file": "slideshowfx-global-configuration/src/test/java/com/twasyl/slideshowfx/global/configuration/RecentPresentationTest.java",
"identifier": "RecentPresentationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n @DisplayName(\"is greater than another\")\n void compareToLowerThanAnother() {\n final RecentPresentation presentation1 = new RecentPresentation(\"presentation1.sfx\", null);\n final RecentPresentation presentation2 = new RecentPresentation(\"presentation2.sfx\", null);\n ... | {
"fields": [
{
"declarator": "openedDateTime",
"modifier": "private",
"original_string": "private LocalDateTime openedDateTime;",
"type": "LocalDateTime",
"var_name": "openedDateTime"
},
{
"declarator": "normalizedPath",
"modifier": "private",
"original_str... | {
"body": "@Override\n public int compareTo(File o) {\n if (o != null && o instanceof RecentPresentation) {\n final RecentPresentation other = (RecentPresentation) o;\n return this.getNormalizedPath().compareTo(other.getNormalizedPath());\n }\n\n return 1;\n }",
"cla... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_169 | {
"fields": [],
"file": "slideshowfx-ui-controls/src/test/java/com/twasyl/slideshowfx/ui/controls/validators/ValidatorsTest.java",
"identifier": "ValidatorsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void isNotEmptyWithNull() {\n assertFalse(isNotEmpty().isValid(null));\n }",
"class_method_signature": "ValidatorsTest.isNotEmptyWithNull()",
"constructor": false,
"full_signature": "@Test public void isNotEmptyWithNull()",
"identifier": "isNotEmptyWithNull",
"invocati... | {
"fields": [],
"file": "slideshowfx-ui-controls/src/main/java/com/twasyl/slideshowfx/ui/controls/validators/Validators.java",
"identifier": "Validators",
"interfaces": "",
"methods": [
{
"class_method_signature": "Validators.isNotEmpty()",
"constructor": false,
"full_signature": "public... | {
"body": "public static IValidator<String> isNotEmpty() {\n return value -> value != null && !value.isBlank();\n }",
"class_method_signature": "Validators.isNotEmpty()",
"constructor": false,
"full_signature": "public static IValidator<String> isNotEmpty()",
"identifier": "isNotEmpty",
"invocatio... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_186 | {
"fields": [
{
"declarator": "markup",
"modifier": "private static",
"original_string": "private static TextileMarkup markup;",
"type": "TextileMarkup",
"var_name": "markup"
}
],
"file": "slideshowfx-textile/src/test/java/com/twasyl/slideshowfx/markup/textile/TextileMarkupTe... | {
"body": "@Test\n public void generateUnorderedList() {\n final String result = markup.convertAsHtml(\"* One\\n* Two\");\n\n assertEquals(\"<ul><li>One</li><li>Two</li></ul>\", result);\n }",
"class_method_signature": "TextileMarkupTest.generateUnorderedList()",
"constructor": false,
"full_... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(TextileMarkup.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(TextileMarkup.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
}
],
... | {
"body": "@Override\n public String convertAsHtml(String markupString) {\n if (markupString == null)\n throw new IllegalArgumentException(\"Can not convert \" + getName() + \" to HTML : the String is null\");\n\n String result = null;\n\n try (final StringWriter writer = new String... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_22 | {
"fields": [
{
"declarator": "snippetExecutor = new GoloSnippetExecutor()",
"modifier": "private final",
"original_string": "private final GoloSnippetExecutor snippetExecutor = new GoloSnippetExecutor();",
"type": "GoloSnippetExecutor",
"var_name": "snippetExecutor"
}
],
"fi... | {
"body": "@Test\n public void buildSourceCodeWithoutImportsAndWithoutWrapInMainAndWithoutModuleName() throws IOException {\n final CodeSnippet snippet = new CodeSnippet();\n snippet.setCode(\"function main = |args| {\\n\\tprintln(\\\"Hello\\\")\\n}\");\n\n final String expected = IOUtils.read... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(GoloSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(GoloSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOGGER"... | {
"body": "protected String buildSourceCode(final CodeSnippet codeSnippet) throws IOException {\n final StringBuilder sourceCode = new StringBuilder();\n\n sourceCode.append(getStartModuleDefinition(codeSnippet)).append(\"\\n\\n\");\n\n if (hasImports(codeSnippet)) {\n sourceCode.appen... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_34 | {
"fields": [
{
"declarator": "snippetExecutor = new JavaSnippetExecutor()",
"modifier": "private final",
"original_string": "private final JavaSnippetExecutor snippetExecutor = new JavaSnippetExecutor();",
"type": "JavaSnippetExecutor",
"var_name": "snippetExecutor"
}
],
"fi... | {
"body": "@Test\n public void formatImportWithImportKeywordAndWithoutColumn() {\n assertEquals(\"import mypackage;\", snippetExecutor.formatImportLine(\"import mypackage\"));\n }",
"class_method_signature": "JavaSnippetExecutorTest.formatImportWithImportKeywordAndWithoutColumn()",
"constructor": fal... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(JavaSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(JavaSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOGGER"... | {
"body": "protected String formatImportLine(final String importLine) {\n final String importLineBeginning = \"import \";\n final String importLineEnding = \";\";\n\n String formattedImportLine;\n\n if (importLine.startsWith(importLineBeginning)) {\n formattedImportLine = import... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_128 | {
"fields": [
{
"declarator": "snippetExecutor = new KotlinSnippetExecutor()",
"modifier": "private final",
"original_string": "private final KotlinSnippetExecutor snippetExecutor = new KotlinSnippetExecutor();",
"type": "KotlinSnippetExecutor",
"var_name": "snippetExecutor"
}
... | {
"body": "@Test\n public void formatImportWithoutImportKeyword() {\n assertEquals(\"import mypackage\", snippetExecutor.formatImportLine(\"mypackage\"));\n }",
"class_method_signature": "KotlinSnippetExecutorTest.formatImportWithoutImportKeyword()",
"constructor": false,
"full_signature": "@Test p... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(KotlinSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(KotlinSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOG... | {
"body": "protected String formatImportLine(final String importLine) {\n final String importLineBeginning = \"import \";\n String formattedImportLine;\n\n if (importLine.startsWith(importLineBeginning)) {\n formattedImportLine = importLine;\n } else {\n formattedImpo... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_201 | {
"fields": [],
"file": "slideshowfx-utils/src/test/java/com/twasyl/slideshowfx/utils/NetworkUtilsTest.java",
"identifier": "NetworkUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetIps() {\n final List<String> ips = NetworkUtils.getIPs();\n\n assertNotNull(ips);\n assertTrue(ips.size() > 0);\n assertTrue(ips.contains(\"127.0.0.1\"));\n }",
"class_method_signature": "NetworkUtilsTest.testGetIps()",
"constructor": false,
... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(NetworkUtils.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(NetworkUtils.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
}
],
... | {
"body": "public static List<String> getIPs() {\n final List<String> ips = new ArrayList<>();\n\n final String ipAddressRegex = \"[1-9][0-9]{0,2}\\\\.[0-9]{0,3}\\\\.[0-9]{0,3}\\\\.[0-9]{0,3}\";\n final Pattern ipAddressPattern = Pattern.compile(ipAddressRegex);\n final Enumeration<Network... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_63 | {
"fields": [
{
"declarator": "snippetExecutor = new GroovySnippetExecutor()",
"modifier": "private final",
"original_string": "private final GroovySnippetExecutor snippetExecutor = new GroovySnippetExecutor();",
"type": "GroovySnippetExecutor",
"var_name": "snippetExecutor"
}
... | {
"body": "@Test\n public void buildSourceCodeWithoutImportsAndWithoutWrapInMethodRunnerAndWithoutClassName() throws IOException {\n final CodeSnippet snippet = new CodeSnippet();\n snippet.setCode(\"def static main(String ... args) {\\n\\tprintln(\\\"Hello\\\")\\n}\");\n\n final String expect... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(GroovySnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(GroovySnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOG... | {
"body": "protected String buildSourceCode(final CodeSnippet codeSnippet) throws IOException {\n final StringBuilder sourceCode = new StringBuilder();\n\n boolean someImportsPresent = false;\n\n if (makeScript(codeSnippet)) {\n sourceCode.append(getScriptImport()).append(\"\\n\");\n ... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_190 | {
"fields": [
{
"declarator": "snippetExecutor = new GoSnippetExecutor()",
"modifier": "private final",
"original_string": "private final GoSnippetExecutor snippetExecutor = new GoSnippetExecutor();",
"type": "GoSnippetExecutor",
"var_name": "snippetExecutor"
}
],
"file": "sl... | {
"body": "@Test\n public void givenPackageName() {\n final CodeSnippet snippet = new CodeSnippet();\n snippet.getProperties().put(PACKAGE_NAME_PROPERTY, \"sfx\");\n\n assertEquals(\"sfx\", snippetExecutor.determinePackageName(snippet));\n }",
"class_method_signature": "GoSnippetExecutorT... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(GoSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(GoSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
... | {
"body": "protected String determinePackageName(final CodeSnippet codeSnippet) {\n String packageName = codeSnippet.getProperties().get(PACKAGE_NAME_PROPERTY);\n if (packageName == null || packageName.isEmpty()) packageName = \"slideshowfx\";\n return packageName;\n }",
"class_method_signat... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_104 | {
"fields": [
{
"declarator": "markup",
"modifier": "private static",
"original_string": "private static MarkdownMarkup markup;",
"type": "MarkdownMarkup",
"var_name": "markup"
}
],
"file": "slideshowfx-markdown/src/test/java/com/twasyl/slideshowfx/markup/markdown/MarkdownMar... | {
"body": "@Test\n void generateH2() {\n final String result = markup.convertAsHtml(\"## A title\");\n\n assertEquals(\"<h2>A title</h2>\", result);\n }",
"class_method_signature": "MarkdownMarkupTest.generateH2()",
"constructor": false,
"full_signature": "@Test void generateH2()",
"identi... | {
"fields": [
{
"declarator": "extensions",
"modifier": "private final",
"original_string": "private final List<Extension> extensions;",
"type": "List<Extension>",
"var_name": "extensions"
}
],
"file": "slideshowfx-markdown/src/main/java/com/twasyl/slideshowfx/markup/markdown... | {
"body": "@Override\n public String convertAsHtml(String markupString) {\n if (markupString == null)\n throw new IllegalArgumentException(\"Can not convert \" + getName() + \" to HTML : the String is null\");\n\n final Parser parser = Parser.builder().extensions(extensions).build();\n ... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_18 | {
"fields": [
{
"declarator": "snippetExecutor = new GoloSnippetExecutor()",
"modifier": "private final",
"original_string": "private final GoloSnippetExecutor snippetExecutor = new GoloSnippetExecutor();",
"type": "GoloSnippetExecutor",
"var_name": "snippetExecutor"
}
],
"fi... | {
"body": "@Test\n public void hasImports() {\n final CodeSnippet snippet = new CodeSnippet();\n snippet.getProperties().put(IMPORTS_PROPERTY, \"import p.*\");\n\n assertTrue(snippetExecutor.hasImports(snippet));\n }",
"class_method_signature": "GoloSnippetExecutorTest.hasImports()",
"c... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(GoloSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(GoloSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOGGER"... | {
"body": "protected boolean hasImports(final CodeSnippet codeSnippet) {\n final String imports = codeSnippet.getProperties().get(IMPORTS_PROPERTY);\n return imports != null && !imports.isEmpty();\n }",
"class_method_signature": "GoloSnippetExecutor.hasImports(final CodeSnippet codeSnippet)",
"co... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_153 | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(SlideshowFXHandlerTest.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(SlideshowFXHandlerTest.class.getName());",
"type": "Logger",
"var_name": "L... | {
"body": "@Test\n @DisplayName(\"fires an event when the latest log changes\")\n void eventFired() throws InterruptedException, ExecutionException, TimeoutException {\n final CompletableFuture<Boolean> eventFired = new CompletableFuture<>();\n handler.addPropertyChangeListener(event -> eventFired... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(SlideshowFXHandler.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(SlideshowFXHandler.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
... | {
"body": "public void addPropertyChangeListener(PropertyChangeListener listener) {\n this.propertyChangeSupport.addPropertyChangeListener(listener);\n }",
"class_method_signature": "SlideshowFXHandler.addPropertyChangeListener(PropertyChangeListener listener)",
"constructor": false,
"full_signature":... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_145 | {
"fields": [
{
"declarator": "snippetExecutor = new ScalaSnippetExecutor()",
"modifier": "private final",
"original_string": "private final ScalaSnippetExecutor snippetExecutor = new ScalaSnippetExecutor();",
"type": "ScalaSnippetExecutor",
"var_name": "snippetExecutor"
}
],
... | {
"body": "@Test\n public void importsWithAndWithoutKeyword() throws IOException {\n final CodeSnippet snippet = new CodeSnippet();\n snippet.getProperties().put(IMPORTS_PROPERTY, \"import mypackage\\nmysecondpackage\");\n\n assertEquals(\"import mypackage\\nimport mysecondpackage\", snippetEx... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(ScalaSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(ScalaSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOGGE... | {
"body": "protected String getImports(final CodeSnippet codeSnippet) throws IOException {\n final StringJoiner imports = new StringJoiner(\"\\n\");\n\n try (final StringReader stringReader = new StringReader(codeSnippet.getProperties().get(IMPORTS_PROPERTY));\n final BufferedReader reader =... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_59 | {
"fields": [
{
"declarator": "snippetExecutor = new GroovySnippetExecutor()",
"modifier": "private final",
"original_string": "private final GroovySnippetExecutor snippetExecutor = new GroovySnippetExecutor();",
"type": "GroovySnippetExecutor",
"var_name": "snippetExecutor"
}
... | {
"body": "@Test\n public void formatImportWithoutImportKeyword() {\n assertEquals(\"import mypackage\", snippetExecutor.formatImportLine(\"mypackage\"));\n }",
"class_method_signature": "GroovySnippetExecutorTest.formatImportWithoutImportKeyword()",
"constructor": false,
"full_signature": "@Test p... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(GroovySnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(GroovySnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOG... | {
"body": "protected String formatImportLine(final String importLine) {\n final String importLineBeginning = \"import \";\n\n String formattedImportLine;\n\n if (importLine.startsWith(importLineBeginning)) {\n formattedImportLine = importLine;\n } else {\n formattedIm... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_0 | {
"fields": [],
"file": "slideshowfx-content-extension/src/test/java/com/twasyl/slideshowfx/content/extension/ResourceTest.java",
"identifier": "ResourceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testJavaScriptFile() {\n final Resource resource = new Resource(ResourceType.JAVASCRIPT_FILE, \"somewhere/file.js\");\n final String expected = \"<script type=\\\"text/javascript\\\" src=\\\"base/path/somewhere/file.js\\\">\";\n assertEquals(expected, resource.bu... | {
"fields": [
{
"declarator": "content",
"modifier": "private",
"original_string": "private String content;",
"type": "String",
"var_name": "content"
},
{
"declarator": "type",
"modifier": "private",
"original_string": "private ResourceType type;",
"ty... | {
"body": "public String buildHTMLString(String location) {\n final StringBuilder builder = new StringBuilder();\n\n if (this.getType() == ResourceType.JAVASCRIPT_FILE) {\n builder.append(\"<script type=\\\"text/javascript\\\" src=\\\"\").append(location).append(\"/\").append(this.getContent(... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_112 | {
"fields": [],
"file": "slideshowfx-hosting-connector/src/test/java/com/twasyl/slideshowfx/hosting/connector/io/RemoteFileTest.java",
"identifier": "RemoteFileTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test public void toStringWithParentWithNullName() {\n final RemoteFile parent = new RemoteFile(null);\n final RemoteFile child = new RemoteFile(parent, \"child\");\n\n assertEquals(\"/child\", child.toString());\n }",
"class_method_signature": "RemoteFileTest.toStringWithParentWi... | {
"fields": [
{
"declarator": "empty = true",
"modifier": "protected",
"original_string": "protected boolean empty = true;",
"type": "boolean",
"var_name": "empty"
},
{
"declarator": "parent = null",
"modifier": "protected",
"original_string": "protected Rem... | {
"body": "@Override\n public String toString() {\n final StringBuilder builder = new StringBuilder();\n\n if(this.isRoot()) {\n builder.append(\"/\");\n } else {\n final String parentString = this.parent.toString();\n builder.append(parentString);\n\n ... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_165 | {
"fields": [
{
"declarator": "quiz",
"modifier": "private static",
"original_string": "private static Quiz quiz;",
"type": "Quiz",
"var_name": "quiz"
}
],
"file": "slideshowfx-server/src/test/java/com/twasyl/slideshowfx/server/beans/quiz/QuizTest.java",
"identifier": "Quiz... | {
"body": "@Test\n public void testWithFalseAnswer() {\n assertFalse(quiz.checkAnswers(1L));\n }",
"class_method_signature": "QuizTest.testWithFalseAnswer()",
"constructor": false,
"full_signature": "@Test public void testWithFalseAnswer()",
"identifier": "testWithFalseAnswer",
"invocations": [... | {
"fields": [
{
"declarator": "id = new SimpleLongProperty()",
"modifier": "private",
"original_string": "private LongProperty id = new SimpleLongProperty();",
"type": "LongProperty",
"var_name": "id"
},
{
"declarator": "question = new SimpleObjectProperty<>()",
"... | {
"body": "public boolean checkAnswers(Long... answersIDs) {\n boolean correct = answersIDs != null && answersIDs.length > 0;\n\n // Avoid unnecessary treatment and variable assignment\n if (correct) {\n final List<Answer> correctAnswers = this.getAnswers().filtered(Answer::isCorrect);... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_79 | {
"fields": [],
"file": "slideshowfx-global-configuration/src/test/java/com/twasyl/slideshowfx/global/configuration/GlobalConfigurationObservableTest.java",
"identifier": "GlobalConfigurationObservableTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n @DisplayName(\"accepts GlobalConfigurationObserver instances\")\n void addGlobalConfigurationObservers() {\n final GlobalConfigurationObservable observable = new GlobalConfigurationObservable();\n observable.addObserver(new GlobalConfigurationObserver() {\n @Override\... | {
"fields": [],
"file": "slideshowfx-global-configuration/src/main/java/com/twasyl/slideshowfx/global/configuration/GlobalConfigurationObservable.java",
"identifier": "GlobalConfigurationObservable",
"interfaces": "",
"methods": [
{
"class_method_signature": "GlobalConfigurationObservable.addObserve... | {
"body": "@Override\n public synchronized void addObserver(Observer o) {\n if (o instanceof GlobalConfigurationObserver) {\n super.addObserver(o);\n }\n }",
"class_method_signature": "GlobalConfigurationObservable.addObserver(Observer o)",
"constructor": false,
"full_signature": ... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_96 | {
"fields": [],
"file": "slideshowfx-global-configuration/src/test/java/com/twasyl/slideshowfx/global/configuration/ContextFileWorkerTest.java",
"identifier": "ContextFileWorkerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void findRecentPresentationWhenMissing() throws Exception {\n final RecentPresentation recentPresentation1 = new RecentPresentation(\"presentation1.sfx\", LocalDateTime.now());\n final RecentPresentation recentPresentation2 = new RecentPresentation(\"presentation2.sfx\", rec... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(ContextFileWorker.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(ContextFileWorker.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
... | {
"body": "protected static Node findRecentPresentationNodeFromID(final Document document, final RecentPresentation recentPresentation) throws ContextFileException {\n final StringBuilder expression = new StringBuilder(\"/\").append(ROOT_TAG)\n .append(\"/\").append(RECENT_PRESENTATIONS_TAG)\n ... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_132 | {
"fields": [
{
"declarator": "snippetExecutor = new KotlinSnippetExecutor()",
"modifier": "private final",
"original_string": "private final KotlinSnippetExecutor snippetExecutor = new KotlinSnippetExecutor();",
"type": "KotlinSnippetExecutor",
"var_name": "snippetExecutor"
}
... | {
"body": "@Test\n public void formatPackageWithPackageKeyword() {\n assertEquals(\"package SlideshowFX\", snippetExecutor.formatPackageName(\"package SlideshowFX\"));\n }",
"class_method_signature": "KotlinSnippetExecutorTest.formatPackageWithPackageKeyword()",
"constructor": false,
"full_signatur... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(KotlinSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(KotlinSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOG... | {
"body": "protected String formatPackageName(final String packageName) {\n final String packageLineBeginning = \"package \";\n\n String formattedPackageLine;\n\n if (packageName.startsWith(packageLineBeginning)) {\n formattedPackageLine = packageName;\n } else {\n fo... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_124 | {
"fields": [
{
"declarator": "snippetExecutor = new KotlinSnippetExecutor()",
"modifier": "private final",
"original_string": "private final KotlinSnippetExecutor snippetExecutor = new KotlinSnippetExecutor();",
"type": "KotlinSnippetExecutor",
"var_name": "snippetExecutor"
}
... | {
"body": "@Test\n public void hasImports() {\n final CodeSnippet snippet = new CodeSnippet();\n snippet.getProperties().put(IMPORTS_PROPERTY, \"java.util.List\");\n\n assertTrue(snippetExecutor.hasImports(snippet));\n }",
"class_method_signature": "KotlinSnippetExecutorTest.hasImports()"... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(KotlinSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(KotlinSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOG... | {
"body": "protected boolean hasImports(final CodeSnippet codeSnippet) {\n final String imports = codeSnippet.getProperties().get(IMPORTS_PROPERTY);\n return imports != null && !imports.isEmpty();\n }",
"class_method_signature": "KotlinSnippetExecutor.hasImports(final CodeSnippet codeSnippet)",
"... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_38 | {
"fields": [
{
"declarator": "snippetExecutor = new JavaSnippetExecutor()",
"modifier": "private final",
"original_string": "private final JavaSnippetExecutor snippetExecutor = new JavaSnippetExecutor();",
"type": "JavaSnippetExecutor",
"var_name": "snippetExecutor"
}
],
"fi... | {
"body": "@Test\n public void buildSourceCodeWithoutWrapInMain() throws IOException {\n final CodeSnippet snippet = new CodeSnippet();\n snippet.getProperties().put(CLASS_NAME_PROPERTY, \"TestJava\");\n snippet.getProperties().put(IMPORTS_PROPERTY, \"import mypackage\\nmysecondpackage\");\n\n... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(JavaSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(JavaSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOGGER"... | {
"body": "protected String buildSourceCode(final CodeSnippet codeSnippet) throws IOException {\n final StringBuilder sourceCode = new StringBuilder();\n\n if (hasImports(codeSnippet)) {\n sourceCode.append(getImports(codeSnippet)).append(\"\\n\\n\");\n }\n\n sourceCode.append(g... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_173 | {
"fields": [],
"file": "slideshowfx-ui-controls/src/test/java/com/twasyl/slideshowfx/ui/controls/validators/ValidatorsTest.java",
"identifier": "ValidatorsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void isIntegerWithNull() {\n assertFalse(isInteger().isValid(null));\n }",
"class_method_signature": "ValidatorsTest.isIntegerWithNull()",
"constructor": false,
"full_signature": "@Test public void isIntegerWithNull()",
"identifier": "isIntegerWithNull",
"invocations":... | {
"fields": [],
"file": "slideshowfx-ui-controls/src/main/java/com/twasyl/slideshowfx/ui/controls/validators/Validators.java",
"identifier": "Validators",
"interfaces": "",
"methods": [
{
"class_method_signature": "Validators.isNotEmpty()",
"constructor": false,
"full_signature": "public... | {
"body": "public static IValidator<String> isInteger() {\n return value -> {\n try {\n Integer.parseInt(value);\n return true;\n } catch (NumberFormatException ex) {\n return false;\n }\n };\n }",
"class_method_signature... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_80 | {
"fields": [],
"file": "slideshowfx-global-configuration/src/test/java/com/twasyl/slideshowfx/global/configuration/ContextFileWorkerTest.java",
"identifier": "ContextFileWorkerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void createRecentPresentationFromNode() {\n final LocalDateTime date = LocalDateTime.now();\n final Path path = Paths.get(\"presentation.sfx\");\n final String normalizedPath = path.toAbsolutePath().toString().replaceAll(\"\\\\\\\\\", \"/\");\n final String id ... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(ContextFileWorker.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(ContextFileWorker.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
... | {
"body": "protected static RecentPresentation buildRecentPresentationFromNode(final Node node) {\n RecentPresentation recentPresentation = null;\n LocalDateTime openedDateTime = null;\n String path = null;\n\n final NodeList children = node.getChildNodes();\n int index = 0;\n\n ... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_14 | {
"fields": [
{
"declarator": "snippetExecutor = new GoloSnippetExecutor()",
"modifier": "private final",
"original_string": "private final GoloSnippetExecutor snippetExecutor = new GoloSnippetExecutor();",
"type": "GoloSnippetExecutor",
"var_name": "snippetExecutor"
}
],
"fi... | {
"body": "@Test\n public void emptyModuleName() {\n final CodeSnippet snippet = new CodeSnippet();\n snippet.getProperties().put(MODULE_NAME_PROPERTY, \"\");\n\n assertEquals(\"slideshowfx.Snippet\", snippetExecutor.determineModuleName(snippet));\n }",
"class_method_signature": "GoloSnip... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(GoloSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(GoloSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOGGER"... | {
"body": "protected String determineModuleName(final CodeSnippet codeSnippet) {\n String moduleName = codeSnippet.getProperties().get(MODULE_NAME_PROPERTY);\n if (moduleName == null || moduleName.isEmpty()) moduleName = \"slideshowfx.Snippet\";\n return moduleName;\n }",
"class_method_signa... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_108 | {
"fields": [
{
"declarator": "markup",
"modifier": "private static",
"original_string": "private static MarkdownMarkup markup;",
"type": "MarkdownMarkup",
"var_name": "markup"
}
],
"file": "slideshowfx-markdown/src/test/java/com/twasyl/slideshowfx/markup/markdown/MarkdownMar... | {
"body": "@Test\n void generateUnorderedList() {\n final String result = markup.convertAsHtml(\"* One\\n* Two\");\n\n assertEquals(\"<ul>\\n<li>One</li>\\n<li>Two</li>\\n</ul>\", result);\n }",
"class_method_signature": "MarkdownMarkupTest.generateUnorderedList()",
"constructor": false,
"fu... | {
"fields": [
{
"declarator": "extensions",
"modifier": "private final",
"original_string": "private final List<Extension> extensions;",
"type": "List<Extension>",
"var_name": "extensions"
}
],
"file": "slideshowfx-markdown/src/main/java/com/twasyl/slideshowfx/markup/markdown... | {
"body": "@Override\n public String convertAsHtml(String markupString) {\n if (markupString == null)\n throw new IllegalArgumentException(\"Can not convert \" + getName() + \" to HTML : the String is null\");\n\n final Parser parser = Parser.builder().extensions(extensions).build();\n ... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_43 | {
"fields": [],
"file": "slideshowfx-icons/src/test/java/com/twasyl/slideshowfx/icons/FontAwesomeTest.java",
"identifier": "FontAwesomeTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void obtainJavaScriptFontFile() throws URISyntaxException {\n assertFontAwesomeUrl(FontAwesome.getFontAwesomeJSFile());\n }",
"class_method_signature": "FontAwesomeTest.obtainJavaScriptFontFile()",
"constructor": false,
"full_signature": "@Test public void obtainJavaScript... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(FontAwesome.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(FontAwesome.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
},
{
... | {
"body": "public static URL getFontAwesomeJSFile() {\n return getFontAwesomeFile(\"js/\" + getFontAwesomeJSFilename());\n }",
"class_method_signature": "FontAwesome.getFontAwesomeJSFile()",
"constructor": false,
"full_signature": "public static URL getFontAwesomeJSFile()",
"identifier": "getFontAwe... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_55 | {
"fields": [
{
"declarator": "snippetExecutor = new GroovySnippetExecutor()",
"modifier": "private final",
"original_string": "private final GroovySnippetExecutor snippetExecutor = new GroovySnippetExecutor();",
"type": "GroovySnippetExecutor",
"var_name": "snippetExecutor"
}
... | {
"body": "@Test\n public void explicitlyNoScript() {\n final CodeSnippet codeSnippet = new CodeSnippet();\n codeSnippet.getProperties().put(MAKE_SCRIPT, \"false\");\n\n assertFalse(snippetExecutor.makeScript(codeSnippet));\n }",
"class_method_signature": "GroovySnippetExecutorTest.explic... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(GroovySnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(GroovySnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOG... | {
"body": "protected boolean makeScript(final CodeSnippet codeSnippet) {\n if (codeSnippet.getProperties().containsKey(MAKE_SCRIPT)) {\n return Boolean.parseBoolean(codeSnippet.getProperties().get(MAKE_SCRIPT));\n } else {\n return false;\n }\n }",
"class_method_signatu... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_149 | {
"fields": [
{
"declarator": "snippetExecutor = new ScalaSnippetExecutor()",
"modifier": "private final",
"original_string": "private final ScalaSnippetExecutor snippetExecutor = new ScalaSnippetExecutor();",
"type": "ScalaSnippetExecutor",
"var_name": "snippetExecutor"
}
],
... | {
"body": "@Test\n public void buildSourceCode() throws IOException {\n final CodeSnippet snippet = new CodeSnippet();\n snippet.getProperties().put(CLASS_NAME_PROPERTY, \"TestScala\");\n snippet.getProperties().put(IMPORTS_PROPERTY, \"import mypackage\\nmysecondpackage\");\n snippet.ge... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(ScalaSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(ScalaSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOGGE... | {
"body": "protected String buildSourceCode(final CodeSnippet codeSnippet) throws IOException {\n final StringBuilder sourceCode = new StringBuilder();\n\n if (hasImports(codeSnippet)) {\n sourceCode.append(getImports(codeSnippet)).append(\"\\n\\n\");\n }\n\n sourceCode.append(g... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_7 | {
"fields": [],
"file": "slideshowfx-plugin-manager/src/test/java/com/twasyl/slideshowfx/plugin/manager/internal/RegisteredPluginTest.java",
"identifier": "RegisteredPluginTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n void getVersionWhenNotUnzipped() throws IOException {\n final File plugin = PluginTestUtils.createDummyPlugin(\"my-plugin\", \"Awesome plugin\", \"1.0\");\n final RegisteredPlugin registeredPlugin = new RegisteredPlugin(new PluginFile(plugin));\n\n assertEquals(\"1.0\", regi... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(RegisteredPlugin.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(RegisteredPlugin.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
}... | {
"body": "public String getVersion() {\n if (this.version == null) {\n final String defaultValue = \"\";\n\n try (final Jar jar = this.file.getJar()) {\n if (jar != null) {\n this.version = jar.getManifestAttributeValue(\"Plugin-Version\", \"\");\n ... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_115 | {
"fields": [
{
"declarator": "markup",
"modifier": "private static",
"original_string": "private static HtmlMarkup markup;",
"type": "HtmlMarkup",
"var_name": "markup"
}
],
"file": "slideshowfx-html/src/test/java/com/twasyl/slideshowfx/markup/html/HtmlMarkupTest.java",
"id... | {
"body": "@Test\n public void generateWithNull() {\n assertThrows(IllegalArgumentException.class, () -> markup.convertAsHtml(null));\n }",
"class_method_signature": "HtmlMarkupTest.generateWithNull()",
"constructor": false,
"full_signature": "@Test public void generateWithNull()",
"identifier": ... | {
"fields": [],
"file": "slideshowfx-html/src/main/java/com/twasyl/slideshowfx/markup/html/HtmlMarkup.java",
"identifier": "HtmlMarkup",
"interfaces": "",
"methods": [
{
"class_method_signature": "HtmlMarkup.HtmlMarkup()",
"constructor": true,
"full_signature": "public HtmlMarkup()",
... | {
"body": "@Override\n public String convertAsHtml(String markupString) throws IllegalArgumentException {\n if (markupString == null)\n throw new IllegalArgumentException(\"Can not convert \" + getName() + \" to HTML : the String is null\");\n\n return markupString;\n }",
"class_metho... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_142 | {
"fields": [
{
"declarator": "snippetExecutor = new ScalaSnippetExecutor()",
"modifier": "private final",
"original_string": "private final ScalaSnippetExecutor snippetExecutor = new ScalaSnippetExecutor();",
"type": "ScalaSnippetExecutor",
"var_name": "snippetExecutor"
}
],
... | {
"body": "@Test\n public void hasImports() {\n final CodeSnippet snippet = new CodeSnippet();\n snippet.getProperties().put(IMPORTS_PROPERTY, \"import p._\");\n\n assertTrue(snippetExecutor.hasImports(snippet));\n }",
"class_method_signature": "ScalaSnippetExecutorTest.hasImports()",
"... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(ScalaSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(ScalaSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOGGE... | {
"body": "protected boolean hasImports(final CodeSnippet codeSnippet) {\n final String imports = codeSnippet.getProperties().get(IMPORTS_PROPERTY);\n return imports != null && !imports.isEmpty();\n }",
"class_method_signature": "ScalaSnippetExecutor.hasImports(final CodeSnippet codeSnippet)",
"c... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_154 | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(SlideshowFXHandlerTest.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(SlideshowFXHandlerTest.class.getName());",
"type": "Logger",
"var_name": "L... | {
"body": "@Test\n @DisplayName(\"allows to remove a PropertyChangeListener for the latest log\")\n void removePropertyChangeListener() {\n final CompletableFuture<Boolean> eventFired = new CompletableFuture<>();\n final PropertyChangeListener listener = event -> eventFired.completeExceptionally(n... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(SlideshowFXHandler.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(SlideshowFXHandler.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
... | {
"body": "public void removePropertyChangeListener(PropertyChangeListener listener) {\n this.propertyChangeSupport.removePropertyChangeListener(listener);\n }",
"class_method_signature": "SlideshowFXHandler.removePropertyChangeListener(PropertyChangeListener listener)",
"constructor": false,
"full_si... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_48 | {
"fields": [
{
"declarator": "FILE_LOCATION",
"modifier": "private static",
"original_string": "private static File FILE_LOCATION;",
"type": "File",
"var_name": "FILE_LOCATION"
},
{
"declarator": "MISSING_FILE",
"modifier": "private static",
"original_strin... | {
"body": "@Test\n public void isManifestAttributeInvalidWhenEmpty() {\n assertFalse(controller.isValueValid(\"\"));\n }",
"class_method_signature": "PluginCenterControllerTest.isManifestAttributeInvalidWhenEmpty()",
"constructor": false,
"full_signature": "@Test public void isManifestAttributeInva... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(PluginCenterController.class.getName())",
"modifier": "private static",
"original_string": "private static Logger LOGGER = Logger.getLogger(PluginCenterController.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
}... | {
"body": "protected boolean isValueValid(final String value) {\n return value != null && !value.trim().isEmpty();\n }",
"class_method_signature": "PluginCenterController.isValueValid(final String value)",
"constructor": false,
"full_signature": "protected boolean isValueValid(final String value)",
... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_103 | {
"fields": [
{
"declarator": "markup",
"modifier": "private static",
"original_string": "private static MarkdownMarkup markup;",
"type": "MarkdownMarkup",
"var_name": "markup"
}
],
"file": "slideshowfx-markdown/src/test/java/com/twasyl/slideshowfx/markup/markdown/MarkdownMar... | {
"body": "@Test\n void generateH1() {\n final String result = markup.convertAsHtml(\"# A title\");\n\n assertEquals(\"<h1>A title</h1>\", result);\n }",
"class_method_signature": "MarkdownMarkupTest.generateH1()",
"constructor": false,
"full_signature": "@Test void generateH1()",
"identif... | {
"fields": [
{
"declarator": "extensions",
"modifier": "private final",
"original_string": "private final List<Extension> extensions;",
"type": "List<Extension>",
"var_name": "extensions"
}
],
"file": "slideshowfx-markdown/src/main/java/com/twasyl/slideshowfx/markup/markdown... | {
"body": "@Override\n public String convertAsHtml(String markupString) {\n if (markupString == null)\n throw new IllegalArgumentException(\"Can not convert \" + getName() + \" to HTML : the String is null\");\n\n final Parser parser = Parser.builder().extensions(extensions).build();\n ... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_64 | {
"fields": [
{
"declarator": "snippetExecutor = new GroovySnippetExecutor()",
"modifier": "private final",
"original_string": "private final GroovySnippetExecutor snippetExecutor = new GroovySnippetExecutor();",
"type": "GroovySnippetExecutor",
"var_name": "snippetExecutor"
}
... | {
"body": "@Test\n public void buildSourceCodeWithoutImportsAndWithoutWrapInMethodRunner() throws IOException {\n final CodeSnippet snippet = new CodeSnippet();\n snippet.getProperties().put(CLASS_NAME_PROPERTY, \"TestGroovy\");\n\n snippet.setCode(\"def static main(String ... args) {\\n\\tpri... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(GroovySnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(GroovySnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOG... | {
"body": "protected String buildSourceCode(final CodeSnippet codeSnippet) throws IOException {\n final StringBuilder sourceCode = new StringBuilder();\n\n boolean someImportsPresent = false;\n\n if (makeScript(codeSnippet)) {\n sourceCode.append(getScriptImport()).append(\"\\n\");\n ... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_178 | {
"fields": [],
"file": "slideshowfx-ui-controls/src/test/java/com/twasyl/slideshowfx/ui/controls/validators/ValidatorsTest.java",
"identifier": "ValidatorsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void isIntegerWithDouble() {\n assertFalse(isInteger().isValid(\"10.2\"));\n }",
"class_method_signature": "ValidatorsTest.isIntegerWithDouble()",
"constructor": false,
"full_signature": "@Test public void isIntegerWithDouble()",
"identifier": "isIntegerWithDouble",
"i... | {
"fields": [],
"file": "slideshowfx-ui-controls/src/main/java/com/twasyl/slideshowfx/ui/controls/validators/Validators.java",
"identifier": "Validators",
"interfaces": "",
"methods": [
{
"class_method_signature": "Validators.isNotEmpty()",
"constructor": false,
"full_signature": "public... | {
"body": "public static IValidator<String> isInteger() {\n return value -> {\n try {\n Integer.parseInt(value);\n return true;\n } catch (NumberFormatException ex) {\n return false;\n }\n };\n }",
"class_method_signature... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_197 | {
"fields": [
{
"declarator": "snippetExecutor = new GoSnippetExecutor()",
"modifier": "private final",
"original_string": "private final GoSnippetExecutor snippetExecutor = new GoSnippetExecutor();",
"type": "GoSnippetExecutor",
"var_name": "snippetExecutor"
}
],
"file": "sl... | {
"body": "@Test\n public void buildSourceCodeWithoutImportsAndWithoutWrapInMainAndWithoutPackageName() throws IOException {\n final CodeSnippet snippet = new CodeSnippet();\n snippet.setCode(\"func main() {\\n\\tfmt.Printf(\\\"Hello, world.\\\\n\\\")\\n}\");\n\n final String expected = IOUtil... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(GoSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(GoSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
... | {
"body": "protected String buildSourceCode(final CodeSnippet codeSnippet) throws IOException {\n final StringBuilder sourceCode = new StringBuilder();\n\n sourceCode.append(getStartPackageDefinition(codeSnippet)).append(\"\\n\\n\");\n\n if (hasImports(codeSnippet)) {\n sourceCode.appe... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_206 | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(ZipUtilsTest.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(ZipUtilsTest.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
},
{
... | {
"body": "@Test\n public void unzip() throws IOException {\n final File zip = new File(resourcesDir, \"archive.zip\");\n final File unzippedFolder = new File(testResultsDir, \"unzipped\").toPath().toAbsolutePath().toFile();\n\n if (!unzippedFolder.exists()) unzippedFolder.mkdir();\n\n ... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(ZipUtils.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(ZipUtils.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
}
],
"file": ... | {
"body": "public static void unzip(File archive, File destination) throws IOException {\n if (archive == null) throw new NullPointerException(\"The ZIP file can not be null\");\n if (!archive.exists()) throw new FileNotFoundException(\"The ZIP file does not exist\");\n\n // Unzip\n LOGGER... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_33 | {
"fields": [
{
"declarator": "snippetExecutor = new JavaSnippetExecutor()",
"modifier": "private final",
"original_string": "private final JavaSnippetExecutor snippetExecutor = new JavaSnippetExecutor();",
"type": "JavaSnippetExecutor",
"var_name": "snippetExecutor"
}
],
"fi... | {
"body": "@Test\n public void formatImportWithImportKeyword() {\n assertEquals(\"import mypackage;\", snippetExecutor.formatImportLine(\"import mypackage;\"));\n }",
"class_method_signature": "JavaSnippetExecutorTest.formatImportWithImportKeyword()",
"constructor": false,
"full_signature": "@Test ... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(JavaSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(JavaSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOGGER"... | {
"body": "protected String formatImportLine(final String importLine) {\n final String importLineBeginning = \"import \";\n final String importLineEnding = \";\";\n\n String formattedImportLine;\n\n if (importLine.startsWith(importLineBeginning)) {\n formattedImportLine = import... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_210 | {
"fields": [],
"file": "slideshowfx-utils/src/test/java/com/twasyl/slideshowfx/utils/keys/SlideshowFXKeyCombinationTest.java",
"identifier": "SlideshowFXKeyCombinationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testControlA() {\n final SlideshowFXKeyCombination combination = SlideshowFXKeyCombination.valueOf(\"Ctrl+A\");\n assertCombination(UP, UP, DOWN, UP, UP, \"A\", combination);\n }",
"class_method_signature": "SlideshowFXKeyCombinationTest.testControlA()",
"constru... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(SlideshowFXKeyCombination.class.getName())",
"modifier": "public static final",
"original_string": "public static final Logger LOGGER = Logger.getLogger(SlideshowFXKeyCombination.class.getName());",
"type": "Logger",
"var_name"... | {
"body": "public static SlideshowFXKeyCombination valueOf(String value) {\n if (value == null) throw new NullPointerException(\"The value can not be null\");\n if (value.isEmpty()) throw new IllegalArgumentException(\"The value can not be empty\");\n\n String determinedText = null;\n KeyC... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_25 | {
"fields": [
{
"declarator": "snippetExecutor = new GoloSnippetExecutor()",
"modifier": "private final",
"original_string": "private final GoloSnippetExecutor snippetExecutor = new GoloSnippetExecutor();",
"type": "GoloSnippetExecutor",
"var_name": "snippetExecutor"
}
],
"fi... | {
"body": "@Test\n public void buildSourceCode() throws IOException {\n final CodeSnippet snippet = new CodeSnippet();\n snippet.getProperties().put(MODULE_NAME_PROPERTY, \"sfx.Golo\");\n snippet.getProperties().put(IMPORTS_PROPERTY, \"import mypackage\\nmysecondpackage\");\n snippet.ge... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(GoloSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(GoloSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOGGER"... | {
"body": "protected String buildSourceCode(final CodeSnippet codeSnippet) throws IOException {\n final StringBuilder sourceCode = new StringBuilder();\n\n sourceCode.append(getStartModuleDefinition(codeSnippet)).append(\"\\n\\n\");\n\n if (hasImports(codeSnippet)) {\n sourceCode.appen... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_139 | {
"fields": [
{
"declarator": "snippetExecutor = new ScalaSnippetExecutor()",
"modifier": "private final",
"original_string": "private final ScalaSnippetExecutor snippetExecutor = new ScalaSnippetExecutor();",
"type": "ScalaSnippetExecutor",
"var_name": "snippetExecutor"
}
],
... | {
"body": "@Test\n public void givenClassName() {\n final CodeSnippet snippet = new CodeSnippet();\n snippet.getProperties().put(CLASS_NAME_PROPERTY, \"ScalaTest\");\n\n assertEquals(\"ScalaTest\", snippetExecutor.determineClassName(snippet));\n }",
"class_method_signature": "ScalaSnippet... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(ScalaSnippetExecutor.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(ScalaSnippetExecutor.class.getName());",
"type": "Logger",
"var_name": "LOGGE... | {
"body": "protected String determineClassName(final CodeSnippet codeSnippet) {\n String className = codeSnippet.getProperties().get(CLASS_NAME_PROPERTY);\n if (className == null || className.isEmpty()) className = \"Snippet\";\n return className;\n }",
"class_method_signature": "ScalaSnippe... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
30044052_72 | {
"fields": [],
"file": "slideshowfx-global-configuration/src/test/java/com/twasyl/slideshowfx/global/configuration/RecentPresentationTest.java",
"identifier": "RecentPresentationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n @DisplayName(\"is equal to another with same normalized path\")\n void equalIfSameNormalizedPath() {\n final RecentPresentation presentation = new RecentPresentation(\"presentation1.sfx\", null);\n final RecentPresentation another = new RecentPresentation(\"presentation1.sfx\", ... | {
"fields": [
{
"declarator": "openedDateTime",
"modifier": "private",
"original_string": "private LocalDateTime openedDateTime;",
"type": "LocalDateTime",
"var_name": "openedDateTime"
},
{
"declarator": "normalizedPath",
"modifier": "private",
"original_str... | {
"body": "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n if (!super.equals(o)) return false;\n\n final RecentPresentation that = (RecentPresentation) o;\n\n return getNormalizedPath().equ... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 30044052,
"size": 221114,
"stargazer_count": 45,
"stars": null,
"updates": null,
"url": "https://github.com/twasyl/SlideshowFX"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.