id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
5073742_56
{ "fields": [ { "declarator": "entity", "modifier": "private", "original_string": "private File entity;", "type": "File", "var_name": "entity" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/entity/FileTest.java", "identifier": "FileTest", "interfaces": "...
{ "body": "@Test\n public void getPostRemoveProjectReference() {\n entity.setProject(null);\n assertNotNull(\"post remove project reference is null.\", entity\n .getPostRemoveProjectReference());\n assertNull(\"post remove project reference not null.\", entity\n ....
{ "fields": [ { "declarator": "serialVersionUID = -2001411661196642883L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -2001411661196642883L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "pro...
{ "body": "Project getPostRemoveProjectReference() {\n if (this.postRemoveProjectReference != null) {\n Project projectReference = this.postRemoveProjectReference;\n setPostRemoveProjectReference(null);\n return projectReference;\n }\n return null;\n }", "cla...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_95
{ "fields": [ { "declarator": "root", "modifier": "private", "original_string": "private HierarchyNode root;", "type": "HierarchyNode", "var_name": "root" }, { "declarator": "left", "modifier": "private", "original_string": "private HierarchyNode left;", ...
{ "body": "@Test\n public void getTopLevelNodes() {\n Hierarchy clone = (Hierarchy) SerializationUtils.clone(hierarchy);\n Set<HierarchyNode> topLevelNodes = clone.getTopLevelNodes();\n topLevelNodes.add(new HierarchyNode(new File(), null));\n assertEquals(topLevelNodes.size(), clone.ge...
{ "fields": [ { "declarator": "serialVersionUID = 6608251150623300335L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 6608251150623300335L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "proje...
{ "body": "public Set<HierarchyNode> getTopLevelNodes() {\n return topLevelNodes;\n }", "class_method_signature": "Hierarchy.getTopLevelNodes()", "constructor": false, "full_signature": "public Set<HierarchyNode> getTopLevelNodes()", "identifier": "getTopLevelNodes", "invocations": [], "modifier...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_83
{ "fields": [ { "declarator": "ci", "modifier": "private", "original_string": "private CircuitInterface ci;", "type": "CircuitInterface", "var_name": "ci" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/service/ci/CircuitInterfaceTest.java", "identifier": "...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void getPortNullArgument() {\n ci.getPort(null);\n }", "class_method_signature": "CircuitInterfaceTest.getPortNullArgument()", "constructor": false, "full_signature": "@Test(expected = IllegalArgumentException.class) public void g...
{ "fields": [ { "declarator": "serialVersionUID = -7941833394453145492L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -7941833394453145492L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "nam...
{ "body": "public Port getPort(String portName) {\n Validate.notNull(portName, \"Port name can't be null\");\n for (Port p : ports) {\n if (StringUtils.equalsIgnoreCase(p.getName(), portName)) {\n return p;\n }\n }\n return null;\n }", "class_metho...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_43
{ "fields": [ { "declarator": "entity", "modifier": "private", "original_string": "private FileHistory entity;", "type": "FileHistory", "var_name": "entity" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/entity/FileHistoryTest.java", "identifier": "FileHis...
{ "body": "@Test\n public void testToString() {\n toStringPrint(entity);\n }", "class_method_signature": "FileHistoryTest.testToString()", "constructor": false, "full_signature": "@Test public void testToString()", "identifier": "testToString", "invocations": [ "toStringPrint" ], "modif...
{ "fields": [ { "declarator": "serialVersionUID = -5509272848576278063L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -5509272848576278063L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "pro...
{ "body": "@Override\n public String toString() {\n return new ToStringBuilder(this)\n .appendSuper(super.toString())\n .append(\"projectId\", projectId)\n .append(\"history\", history)\n .toString();\n }", "class_method_signat...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_134
{ "fields": [ { "declarator": "firstProject", "modifier": "private", "original_string": "private Project firstProject;", "type": "Project", "var_name": "firstProject" }, { "declarator": "secondProject", "modifier": "private", "original_string": "private Proj...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void addFile2() {\n File file = new File();\n file.setProject(firstProject);\n workspace.addFile(file, null);\n }", "class_method_signature": "WorkspaceTest.addFile2()", "constructor": false, "full_signature": "@Test...
{ "fields": [ { "declarator": "serialVersionUID = -2455644044788201509L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -2455644044788201509L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "pro...
{ "body": "public void addFile(File file, Hierarchy hierarchy) {\n Validate.notNull(file, \"File can't be null\");\n ProjectMetadata metadata = getMetadata(file.getProject());\n Validate.notNull(metadata, \"Project must be opened:\"\n + file.getProject());\n metadata.addFile...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_14
{ "fields": [ { "declarator": "USER_ID = \"userId\"", "modifier": "private static final", "original_string": "private static final String USER_ID = \"userId\";", "type": "String", "var_name": "USER_ID" }, { "declarator": "USER_ID_2 = \"anotherUserId\"", "modifier"...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void findByNameNullUserId() {\n dao.findByName(null, NAME);\n }", "class_method_signature": "ProjectDaoImplTest.findByNameNullUserId()", "constructor": false, "full_signature": "@Test(expected = IllegalArgumentException.class) pub...
{ "fields": [], "file": "vhdllab-server/src/main/java/hr/fer/zemris/vhdllab/dao/impl/ProjectDaoImpl.java", "identifier": "ProjectDaoImpl", "interfaces": "implements\n ProjectDao", "methods": [ { "class_method_signature": "ProjectDaoImpl.ProjectDaoImpl()", "constructor": true, "ful...
{ "body": "@Override\n public Project findByName(String userId, String name) {\n Validate.notNull(userId, \"User identifier can't be null\");\n Validate.notNull(name, \"Name can't be null\");\n String query = \"select p from Project as p where p.userId = ?1 and p.name = ?2 order by p.id\";\n ...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_55
{ "fields": [ { "declarator": "entity", "modifier": "private", "original_string": "private File entity;", "type": "File", "var_name": "entity" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/entity/FileTest.java", "identifier": "FileTest", "interfaces": "...
{ "body": "@Test\n public void setProject() {\n Project anotherProject = new ProjectStub2();\n entity.setProject(anotherProject);\n assertEquals(\"projects not same.\", anotherProject, entity.getProject());\n assertNull(\"post remove project reference not null.\", entity\n ...
{ "fields": [ { "declarator": "serialVersionUID = -2001411661196642883L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -2001411661196642883L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "pro...
{ "body": "public void setProject(Project project) {\n if (project == null) {\n setPostRemoveProjectReference(this.project);\n }\n this.project = project;\n }", "class_method_signature": "File.setProject(Project project)", "constructor": false, "full_signature": "public void s...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_122
{ "fields": [ { "declarator": "report", "modifier": "private", "original_string": "private FileReport report;", "type": "FileReport", "var_name": "report" }, { "declarator": "hierarchy", "modifier": "private", "original_string": "private Hierarchy hierarchy;...
{ "body": "@Test\n public void testToString() {\n toStringPrint(report);\n }", "class_method_signature": "FileReportTest.testToString()", "constructor": false, "full_signature": "@Test public void testToString()", "identifier": "testToString", "invocations": [ "toStringPrint" ], "modifi...
{ "fields": [ { "declarator": "serialVersionUID = 2737580103123482939L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 2737580103123482939L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "file"...
{ "body": "@Override\n public String toString() {\n return ReflectionToStringBuilder.toString(this);\n }", "class_method_signature": "FileReport.toString()", "constructor": false, "full_signature": "@Override public String toString()", "identifier": "toString", "invocations": [ "toString" ...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_96
{ "fields": [ { "declarator": "root", "modifier": "private", "original_string": "private HierarchyNode root;", "type": "HierarchyNode", "var_name": "root" }, { "declarator": "left", "modifier": "private", "original_string": "private HierarchyNode left;", ...
{ "body": "@Test\n public void getBottomLevelNodes() {\n Hierarchy clone = (Hierarchy) SerializationUtils.clone(hierarchy);\n Set<HierarchyNode> bottomLevelNodes = clone.getBottomLevelNodes();\n bottomLevelNodes.add(new HierarchyNode(new File(), null));\n assertEquals(bottomLevelNodes.s...
{ "fields": [ { "declarator": "serialVersionUID = 6608251150623300335L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 6608251150623300335L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "proje...
{ "body": "public Set<HierarchyNode> getBottomLevelNodes() {\n return bottomLevelNodes;\n }", "class_method_signature": "Hierarchy.getBottomLevelNodes()", "constructor": false, "full_signature": "public Set<HierarchyNode> getBottomLevelNodes()", "identifier": "getBottomLevelNodes", "invocations": ...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_79
{ "fields": [ { "declarator": "ci", "modifier": "private", "original_string": "private CircuitInterface ci;", "type": "CircuitInterface", "var_name": "ci" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/service/ci/CircuitInterfaceTest.java", "identifier": "...
{ "body": "@Test\n public void isName() {\n assertTrue(ci.isName(null));\n ci.setName(\"name\");\n assertFalse(ci.isName(null));\n assertTrue(ci.isName(\"name\"));\n assertTrue(ci.isName(\"NAME\"));\n }", "class_method_signature": "CircuitInterfaceTest.isName()", "construc...
{ "fields": [ { "declarator": "serialVersionUID = -7941833394453145492L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -7941833394453145492L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "nam...
{ "body": "public boolean isName(String circuitName) {\n return StringUtils.equalsIgnoreCase(this.name, circuitName);\n }", "class_method_signature": "CircuitInterface.isName(String circuitName)", "constructor": false, "full_signature": "public boolean isName(String circuitName)", "identifier": "isN...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_118
{ "fields": [ { "declarator": "result", "modifier": "private", "original_string": "private Result result;", "type": "Result", "var_name": "result" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/service/result/ResultTest.java", "identifier": "ResultTest", ...
{ "body": "@Test\n public void testToString() {\n toStringPrint(result);\n }", "class_method_signature": "ResultTest.testToString()", "constructor": false, "full_signature": "@Test public void testToString()", "identifier": "testToString", "invocations": [ "toStringPrint" ], "modifiers"...
{ "fields": [ { "declarator": "serialVersionUID = 1442733792190834811L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1442733792190834811L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "data"...
{ "body": "@Override\n public String toString() {\n return new ToStringBuilder(this).append(\"dataLength\", data != null ? data.length() : 0)\n .append(\"messages\", messages, false).toString();\n }", "class_method_signature": "Result.toString()", "constructor": false, "full_signatur...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_80
{ "fields": [ { "declarator": "ci", "modifier": "private", "original_string": "private CircuitInterface ci;", "type": "CircuitInterface", "var_name": "ci" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/service/ci/CircuitInterfaceTest.java", "identifier": "...
{ "body": "@Test\n public void getPorts() {\n List<Port> ports = ci.getPorts();\n ports.add(new Port());\n assertEquals(1, ci.getPorts().size());\n }", "class_method_signature": "CircuitInterfaceTest.getPorts()", "constructor": false, "full_signature": "@Test public void getPorts()", ...
{ "fields": [ { "declarator": "serialVersionUID = -7941833394453145492L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -7941833394453145492L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "nam...
{ "body": "public List<Port> getPorts() {\n return ports;\n }", "class_method_signature": "CircuitInterface.getPorts()", "constructor": false, "full_signature": "public List<Port> getPorts()", "identifier": "getPorts", "invocations": [], "modifiers": "public", "parameters": "()", "return": "...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_38
{ "fields": [ { "declarator": "validator = new ConsistentRangeConstraintValidator()", "modifier": "private final", "original_string": "private final Validator<?> validator = new ConsistentRangeConstraintValidator();", "type": "Validator<?>", "var_name": "validator" } ], "file...
{ "body": "@Test\n public void isValid2() {\n Port port = new Port();\n port.setFrom(2);\n port.setTo(2);\n assertTrue(validator.isValid(port));\n }", "class_method_signature": "ConsistentRangeConstraintValidatorTest.isValid2()", "constructor": false, "full_signature": "@Test p...
{ "fields": [], "file": "vhdllab-common/src/main/java/hr/fer/zemris/vhdllab/validation/ConsistentRangeConstraintValidator.java", "identifier": "ConsistentRangeConstraintValidator", "interfaces": "implements\n Validator<ConsistentRangeConstraint>", "methods": [ { "class_method_signature": "Con...
{ "body": "@Override\n public boolean isValid(Object value) {\n if (value instanceof Port) {\n Port port = (Port) value;\n Integer from = port.getFrom();\n Integer to = port.getTo();\n return (from == null && to == null) || (from != null && to != null);\n }...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_138
{ "fields": [ { "declarator": "firstProject", "modifier": "private", "original_string": "private Project firstProject;", "type": "Project", "var_name": "firstProject" }, { "declarator": "secondProject", "modifier": "private", "original_string": "private Proj...
{ "body": "@SuppressWarnings(\"unchecked\")\n @Test(expected = IllegalArgumentException.class)\n public void removeFile3() {\n Project project = new Project();\n File file = new File();\n file.setProject(project);\n workspace.removeFile(file, new Hierarchy(project,\n C...
{ "fields": [ { "declarator": "serialVersionUID = -2455644044788201509L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -2455644044788201509L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "pro...
{ "body": "public void removeFile(File file, Hierarchy hierarchy) {\n Validate.notNull(file, \"File can't be null\");\n ProjectMetadata metadata = getMetadata(file.getProject());\n Validate.notNull(metadata, \"Project must be opened:\"\n + file.getProject());\n metadata.remo...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_18
{ "fields": [ { "declarator": "USER_ID = \"userId\"", "modifier": "private static final", "original_string": "private static final String USER_ID = \"userId\";", "type": "String", "var_name": "USER_ID" }, { "declarator": "USER_ID_2 = \"anotherUserId\"", "modifier"...
{ "body": "@Test\n public void findByName() {\n setupProject(project);\n assertEquals(\"project not found.\", project, dao.findByName(project\n .getUserId(), project.getName()));\n assertEquals(\"project name and user id are not case insensitive.\",\n project, dao...
{ "fields": [], "file": "vhdllab-server/src/main/java/hr/fer/zemris/vhdllab/dao/impl/ProjectDaoImpl.java", "identifier": "ProjectDaoImpl", "interfaces": "implements\n ProjectDao", "methods": [ { "class_method_signature": "ProjectDaoImpl.ProjectDaoImpl()", "constructor": true, "ful...
{ "body": "@Override\n public Project findByName(String userId, String name) {\n Validate.notNull(userId, \"User identifier can't be null\");\n Validate.notNull(name, \"Name can't be null\");\n String query = \"select p from Project as p where p.userId = ?1 and p.name = ?2 order by p.id\";\n ...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_59
{ "fields": [ { "declarator": "entity", "modifier": "private", "original_string": "private NamedEntity entity;", "type": "NamedEntity", "var_name": "entity" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/entity/NamedEntityTest.java", "identifier": "NamedEn...
{ "body": "@Test\n public void copyConstructor() {\n NamedEntity another = new NamedEntity(entity);\n assertEquals(\"name not same.\", entity.getName(), another.getName());\n }", "class_method_signature": "NamedEntityTest.copyConstructor()", "constructor": false, "full_signature": "@Test pub...
{ "fields": [ { "declarator": "serialVersionUID = -2369439762588805135L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -2369439762588805135L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "nam...
{ "body": "public String getName() {\n return name;\n }", "class_method_signature": "NamedEntity.getName()", "constructor": false, "full_signature": "public String getName()", "identifier": "getName", "invocations": [], "modifiers": "public", "parameters": "()", "return": "String", "signat...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_22
{ "fields": [ { "declarator": "USER_ID = \"userId\"", "modifier": "private static final", "original_string": "private static final String USER_ID = \"userId\";", "type": "String", "var_name": "USER_ID" }, { "declarator": "NAME = \"entity_name\"", "modifier": "priv...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void findByNameNullProjectId() {\n dao.findByName(null, NAME);\n }", "class_method_signature": "FileDaoImplTest.findByNameNullProjectId()", "constructor": false, "full_signature": "@Test(expected = IllegalArgumentException.class) ...
{ "fields": [], "file": "vhdllab-server/src/main/java/hr/fer/zemris/vhdllab/dao/impl/FileDaoImpl.java", "identifier": "FileDaoImpl", "interfaces": "implements FileDao", "methods": [ { "class_method_signature": "FileDaoImpl.FileDaoImpl()", "constructor": true, "full_signature": "public F...
{ "body": "@Override\n public File findByName(Integer projectId, String name) {\n Validate.notNull(projectId, \"Project identifier can't be null\");\n Validate.notNull(name, \"Name can't be null\");\n String query = \"select f from File as f where f.project.id = ?1 and f.name = ?2 order by f.i...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_102
{ "fields": [ { "declarator": "root", "modifier": "private", "original_string": "private HierarchyNode root;", "type": "HierarchyNode", "var_name": "root" }, { "declarator": "left", "modifier": "private", "original_string": "private HierarchyNode left;", ...
{ "body": "@Test\n public void iteratorXUsesYHierarchy() {\n Hierarchy clone = (Hierarchy) SerializationUtils.clone(hierarchy);\n Iterator<HierarchyNode> iterator = clone.iteratorXUsesYHierarchy(null);\n assertEquals(root, iterator.next());\n assertFalse(iterator.hasNext());\n\n ...
{ "fields": [ { "declarator": "serialVersionUID = 6608251150623300335L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 6608251150623300335L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "proje...
{ "body": "public Iterator<HierarchyNode> iteratorXUsesYHierarchy(HierarchyNode node) {\n if (node == null) {\n return topLevelNodes.iterator();\n }\n return getDependenciesFor(node).iterator();\n }", "class_method_signature": "Hierarchy.iteratorXUsesYHierarchy(HierarchyNode node)...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_75
{ "fields": [ { "declarator": "entity", "modifier": "private", "original_string": "private ProjectHistory entity;", "type": "ProjectHistory", "var_name": "entity" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/entity/ProjectHistoryTest.java", "identifier":...
{ "body": "@Test\n public void copyConstructor() {\n ProjectHistory another = new ProjectHistory(entity);\n assertEquals(\"userId not same.\", entity.getUserId(), another\n .getUserId());\n assertEquals(\"history not same.\", entity.getHistory(), another\n .getHis...
{ "fields": [ { "declarator": "serialVersionUID = 7347617814219101311L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 7347617814219101311L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "histo...
{ "body": "public History getHistory() {\n return history;\n }", "class_method_signature": "ProjectHistory.getHistory()", "constructor": false, "full_signature": "public History getHistory()", "identifier": "getHistory", "invocations": [], "modifiers": "public", "parameters": "()", "return":...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_114
{ "fields": [ { "declarator": "root", "modifier": "private", "original_string": "private HierarchyNode root;", "type": "HierarchyNode", "var_name": "root" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/service/hierarchy/HierarchyNodeTest.java", "identifier...
{ "body": "@Test\n public void testToString2() {\n toStringPrint(root);\n\n new HierarchyNode(new File(\"left\", null, null), root);\n toStringPrint(root);\n assertEquals(\"file_name [left]\", root.toString());\n\n new HierarchyNode(new File(\"right\", null, null), root);\n ...
{ "fields": [ { "declarator": "serialVersionUID = -2215053203067361627L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -2215053203067361627L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "fil...
{ "body": "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder((dependencies.size() + 1) * 15);\n sb.append(file.getName()).append(\" [\");\n for (File dep : dependencies) {\n sb.append(dep.getName()).append(\",\");\n }\n if (!dependencies.isE...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_0
{ "fields": [ { "declarator": "dao", "modifier": "private", "original_string": "private AbstractEntityDao<?> dao;", "type": "AbstractEntityDao<?>", "var_name": "dao" } ], "file": "vhdllab-server/src/test/java/hr/fer/zemris/vhdllab/dao/impl/AbstractEntityDaoTest.java", "iden...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void save() {\n dao.persist(null);\n }", "class_method_signature": "AbstractEntityDaoTest.save()", "constructor": false, "full_signature": "@Test(expected = IllegalArgumentException.class) public void save()", "identifier": "sav...
{ "fields": [ { "declarator": "clazz", "modifier": "protected final", "original_string": "protected final Class<T> clazz;", "type": "Class<T>", "var_name": "clazz" } ], "file": "vhdllab-server/src/main/java/hr/fer/zemris/vhdllab/dao/impl/AbstractEntityDao.java", "identifier...
{ "body": "public void persist(T entity) {\n Validate.notNull(entity, \"Entity can't be null\");\n getJpaTemplate().persist(entity);\n }", "class_method_signature": "AbstractEntityDao.persist(T entity)", "constructor": false, "full_signature": "public void persist(T entity)", "identifier": "p...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_63
{ "fields": [ { "declarator": "entity", "modifier": "private", "original_string": "private Project entity;", "type": "Project", "var_name": "entity" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/entity/ProjectTest.java", "identifier": "ProjectTest", "in...
{ "body": "@Test\n public void setFiles() throws Exception {\n entity = new Project();\n assertTrue(\"files not empty.\", entity.getFiles().isEmpty());\n entity.getFiles().add(new FileStub());\n assertFalse(\"files is empty.\", entity.getFiles().isEmpty());\n\n entity = new Proje...
{ "fields": [ { "declarator": "serialVersionUID = 7535295608182412183L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 7535295608182412183L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "files...
{ "body": "public void setFiles(Set<File> files) {\n this.files = files;\n }", "class_method_signature": "Project.setFiles(Set<File> files)", "constructor": false, "full_signature": "public void setFiles(Set<File> files)", "identifier": "setFiles", "invocations": [], "modifiers": "public", "pa...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_143
{ "fields": [ { "declarator": "firstProject", "modifier": "private", "original_string": "private Project firstProject;", "type": "Project", "var_name": "firstProject" }, { "declarator": "secondProject", "modifier": "private", "original_string": "private Proj...
{ "body": "@Test\n public void testToString() {\n toStringPrint(workspace);\n }", "class_method_signature": "WorkspaceTest.testToString()", "constructor": false, "full_signature": "@Test public void testToString()", "identifier": "testToString", "invocations": [ "toStringPrint" ], "modi...
{ "fields": [ { "declarator": "serialVersionUID = -2455644044788201509L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -2455644044788201509L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "pro...
{ "body": "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder(2000);\n sb.append(\"Project metadata:{\\n\");\n for (int i = 0; i < getProjectCount(); i++) {\n Project project = getProjects().get(i);\n ProjectMetadata metadata = getMetadata(proje...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_34
{ "fields": [ { "declarator": "validator = new DeletedOnGreaterThenCreatedOnConstraintValidator()", "modifier": "private final", "original_string": "private final Validator<?> validator = new DeletedOnGreaterThenCreatedOnConstraintValidator();", "type": "Validator<?>", "var_name": "v...
{ "body": "@Test\n public void isValidCreatedOnEqualsDeletedOn() {\n History history = new History();\n history.setCreatedOn(CREATED_ON);\n history.setDeletedOn(CREATED_ON);\n assertFalse(\"valid when created on equals deleted on.\", validator\n .isValid(history));\n }...
{ "fields": [], "file": "vhdllab-common/src/main/java/hr/fer/zemris/vhdllab/validation/DeletedOnGreaterThenCreatedOnConstraintValidator.java", "identifier": "DeletedOnGreaterThenCreatedOnConstraintValidator", "interfaces": "implements\n Validator<DeletedOnGreaterThenCreatedOnConstraint>", "methods": [ ...
{ "body": "@Override\n public boolean isValid(Object value) {\n if (value instanceof History) {\n History history = (History) value;\n Date deletedOn = history.getDeletedOn();\n Date createdOn = history.getCreatedOn();\n return deletedOn != null ? deletedOn.compar...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_142
{ "fields": [ { "declarator": "firstProject", "modifier": "private", "original_string": "private Project firstProject;", "type": "Project", "var_name": "firstProject" }, { "declarator": "secondProject", "modifier": "private", "original_string": "private Proj...
{ "body": "@Test\n public void getFiles2() {\n assertNull(workspace.getFiles(new Project()));\n assertNotNull(workspace.getFiles(firstProject));\n assertNull(workspace.getFiles(thirdProject));\n }", "class_method_signature": "WorkspaceTest.getFiles2()", "constructor": false, "full_sig...
{ "fields": [ { "declarator": "serialVersionUID = -2455644044788201509L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -2455644044788201509L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "pro...
{ "body": "public Set<File> getFiles(Project project) {\n ProjectMetadata metadata = getMetadata(project);\n if (metadata == null) {\n return null;\n }\n return metadata.getFiles();\n }", "class_method_signature": "Workspace.getFiles(Project project)", "constructor": fals...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_35
{ "fields": [ { "declarator": "validator = new DeletedOnGreaterThenCreatedOnConstraintValidator()", "modifier": "private final", "original_string": "private final Validator<?> validator = new DeletedOnGreaterThenCreatedOnConstraintValidator();", "type": "Validator<?>", "var_name": "v...
{ "body": "@Test\n public void isValidDeletedOnBeforeCreatedOnCreatedOn() {\n History history = new History();\n history.setCreatedOn(CREATED_ON);\n history.setDeletedOn(DELETED_ON_BEFORE_CREATED_ON);\n assertFalse(\"valid when deleted on before created on.\", validator\n ...
{ "fields": [], "file": "vhdllab-common/src/main/java/hr/fer/zemris/vhdllab/validation/DeletedOnGreaterThenCreatedOnConstraintValidator.java", "identifier": "DeletedOnGreaterThenCreatedOnConstraintValidator", "interfaces": "implements\n Validator<DeletedOnGreaterThenCreatedOnConstraint>", "methods": [ ...
{ "body": "@Override\n public boolean isValid(Object value) {\n if (value instanceof History) {\n History history = (History) value;\n Date deletedOn = history.getDeletedOn();\n Date createdOn = history.getCreatedOn();\n return deletedOn != null ? deletedOn.compar...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_115
{ "fields": [ { "declarator": "result", "modifier": "private", "original_string": "private Result result;", "type": "Result", "var_name": "result" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/service/result/ResultTest.java", "identifier": "ResultTest", ...
{ "body": "@Test\n public void constructorMessages() {\n List<String> messages = new ArrayList<String>(1);\n messages.add(\"message\");\n result = new Result(messages);\n assertEquals(1, result.getMessages().size());\n }", "class_method_signature": "ResultTest.constructorMessages()...
{ "fields": [ { "declarator": "serialVersionUID = 1442733792190834811L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1442733792190834811L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "data"...
{ "body": "public List<String> getMessages() {\n return messages;\n }", "class_method_signature": "Result.getMessages()", "constructor": false, "full_signature": "public List<String> getMessages()", "identifier": "getMessages", "invocations": [], "modifiers": "public", "parameters": "()", "r...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_1
{ "fields": [ { "declarator": "dao", "modifier": "private", "original_string": "private AbstractEntityDao<?> dao;", "type": "AbstractEntityDao<?>", "var_name": "dao" } ], "file": "vhdllab-server/src/test/java/hr/fer/zemris/vhdllab/dao/impl/AbstractEntityDaoTest.java", "iden...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void merge() {\n dao.merge(null);\n }", "class_method_signature": "AbstractEntityDaoTest.merge()", "constructor": false, "full_signature": "@Test(expected = IllegalArgumentException.class) public void merge()", "identifier": "me...
{ "fields": [ { "declarator": "clazz", "modifier": "protected final", "original_string": "protected final Class<T> clazz;", "type": "Class<T>", "var_name": "clazz" } ], "file": "vhdllab-server/src/main/java/hr/fer/zemris/vhdllab/dao/impl/AbstractEntityDao.java", "identifier...
{ "body": "public T merge(T entity) {\n Validate.notNull(entity, \"Entity can't be null\");\n return getJpaTemplate().merge(entity);\n }", "class_method_signature": "AbstractEntityDao.merge(T entity)", "constructor": false, "full_signature": "public T merge(T entity)", "identifier": "merge", ...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_62
{ "fields": [ { "declarator": "entity", "modifier": "private", "original_string": "private Project entity;", "type": "Project", "var_name": "entity" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/entity/ProjectTest.java", "identifier": "ProjectTest", "in...
{ "body": "@Test\n public void copyConstructor() {\n Project another = new Project(entity);\n assertEquals(\"userId not same.\", entity.getUserId(), another\n .getUserId());\n assertTrue(\"files not empty.\", another.getFiles().isEmpty());\n }", "class_method_signature": "P...
{ "fields": [ { "declarator": "serialVersionUID = 7535295608182412183L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 7535295608182412183L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "files...
{ "body": "public Set<File> getFiles() {\n return files;\n }", "class_method_signature": "Project.getFiles()", "constructor": false, "full_signature": "public Set<File> getFiles()", "identifier": "getFiles", "invocations": [], "modifiers": "public", "parameters": "()", "return": "Set<File>",...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_103
{ "fields": [ { "declarator": "root", "modifier": "private", "original_string": "private HierarchyNode root;", "type": "HierarchyNode", "var_name": "root" }, { "declarator": "left", "modifier": "private", "original_string": "private HierarchyNode left;", ...
{ "body": "@Test\n public void iteratorXUsedByYHierarchy() {\n Hierarchy clone = (Hierarchy) SerializationUtils.clone(hierarchy);\n Iterator<HierarchyNode> iterator = clone\n .iteratorXUsedByYHierarchy(null);\n assertEquals(left, iterator.next());\n assertEquals(rightDep,...
{ "fields": [ { "declarator": "serialVersionUID = 6608251150623300335L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 6608251150623300335L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "proje...
{ "body": "public Iterator<HierarchyNode> iteratorXUsedByYHierarchy(HierarchyNode node) {\n if (node == null) {\n return bottomLevelNodes.iterator();\n }\n return getParentsFor(node).iterator();\n }", "class_method_signature": "Hierarchy.iteratorXUsedByYHierarchy(HierarchyNode nod...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_74
{ "fields": [ { "declarator": "entity", "modifier": "private", "original_string": "private ProjectHistory entity;", "type": "ProjectHistory", "var_name": "entity" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/entity/ProjectHistoryTest.java", "identifier":...
{ "body": "@Test\n public void constructorProjectInfoHistory() throws Exception {\n History history = new HistoryStub();\n ProjectHistory another = new ProjectHistory(new OwnedEntityStub(),\n history);\n assertEquals(\"userId not same.\", USER_ID, another.getUserId());\n ...
{ "fields": [ { "declarator": "serialVersionUID = 7347617814219101311L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 7347617814219101311L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "histo...
{ "body": "public History getHistory() {\n return history;\n }", "class_method_signature": "ProjectHistory.getHistory()", "constructor": false, "full_signature": "public History getHistory()", "identifier": "getHistory", "invocations": [], "modifiers": "public", "parameters": "()", "return":...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_23
{ "fields": [ { "declarator": "USER_ID = \"userId\"", "modifier": "private static final", "original_string": "private static final String USER_ID = \"userId\";", "type": "String", "var_name": "USER_ID" }, { "declarator": "NAME = \"entity_name\"", "modifier": "priv...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void findByNameNullName() {\n dao.findByName(file.getProject().getId(), null);\n }", "class_method_signature": "FileDaoImplTest.findByNameNullName()", "constructor": false, "full_signature": "@Test(expected = IllegalArgumentExcept...
{ "fields": [], "file": "vhdllab-server/src/main/java/hr/fer/zemris/vhdllab/dao/impl/FileDaoImpl.java", "identifier": "FileDaoImpl", "interfaces": "implements FileDao", "methods": [ { "class_method_signature": "FileDaoImpl.FileDaoImpl()", "constructor": true, "full_signature": "public F...
{ "body": "@Override\n public File findByName(Integer projectId, String name) {\n Validate.notNull(projectId, \"Project identifier can't be null\");\n Validate.notNull(name, \"Name can't be null\");\n String query = \"select f from File as f where f.project.id = ?1 and f.name = ?2 order by f.i...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_58
{ "fields": [ { "declarator": "entity", "modifier": "private", "original_string": "private NamedEntity entity;", "type": "NamedEntity", "var_name": "entity" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/entity/NamedEntityTest.java", "identifier": "NamedEn...
{ "body": "@Test\n public void constructorName() {\n NamedEntity another = new NamedEntity(NAME);\n assertEquals(\"name not same.\", NAME, another.getName());\n }", "class_method_signature": "NamedEntityTest.constructorName()", "constructor": false, "full_signature": "@Test public void const...
{ "fields": [ { "declarator": "serialVersionUID = -2369439762588805135L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -2369439762588805135L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "nam...
{ "body": "public String getName() {\n return name;\n }", "class_method_signature": "NamedEntity.getName()", "constructor": false, "full_signature": "public String getName()", "identifier": "getName", "invocations": [], "modifiers": "public", "parameters": "()", "return": "String", "signat...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_19
{ "fields": [ { "declarator": "TEST_LOCATION = \"src/test/resources/predefined\"", "modifier": "private static final", "original_string": "private static final String TEST_LOCATION = \"src/test/resources/predefined\";", "type": "String", "var_name": "TEST_LOCATION" }, { ...
{ "body": "@Test\n public void getPredefinedFiles() {\n Set<File> files = dao.getPredefinedFiles();\n assertNotNull(files);\n assertEquals(2, files.size());\n\n File file = (File) CollectionUtils.get(files, 0);\n assertNull(file.getId());\n assertNull(file.getVersion());\n...
{ "fields": [ { "declarator": "LOG = Logger\n .getLogger(PredefinedFileDaoImpl.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger\n .getLogger(PredefinedFileDaoImpl.class);", "type": "Logger", "var_name": "L...
{ "body": "@Override\n public Set<File> getPredefinedFiles() {\n return createPredefinedFilesSet();\n }", "class_method_signature": "PredefinedFileDaoImpl.getPredefinedFiles()", "constructor": false, "full_signature": "@Override public Set<File> getPredefinedFiles()", "identifier": "getPredefined...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_139
{ "fields": [ { "declarator": "firstProject", "modifier": "private", "original_string": "private Project firstProject;", "type": "Project", "var_name": "firstProject" }, { "declarator": "secondProject", "modifier": "private", "original_string": "private Proj...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void getHierarchy() {\n workspace.getHierarchy(null);\n }", "class_method_signature": "WorkspaceTest.getHierarchy()", "constructor": false, "full_signature": "@Test(expected = IllegalArgumentException.class) public void getHierarc...
{ "fields": [ { "declarator": "serialVersionUID = -2455644044788201509L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -2455644044788201509L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "pro...
{ "body": "public Hierarchy getHierarchy(Project project) {\n ProjectMetadata metadata = getMetadata(project);\n if (metadata == null) {\n return null;\n }\n return metadata.getHierarchy();\n }", "class_method_signature": "Workspace.getHierarchy(Project project)", "constr...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_39
{ "fields": [ { "declarator": "validator = new ConsistentRangeConstraintValidator()", "modifier": "private final", "original_string": "private final Validator<?> validator = new ConsistentRangeConstraintValidator();", "type": "Validator<?>", "var_name": "validator" } ], "file...
{ "body": "@Test\n public void isValid3() {\n Port port = new Port();\n port.setFrom(null);\n port.setTo(2);\n assertFalse(validator.isValid(port));\n }", "class_method_signature": "ConsistentRangeConstraintValidatorTest.isValid3()", "constructor": false, "full_signature": "@Te...
{ "fields": [], "file": "vhdllab-common/src/main/java/hr/fer/zemris/vhdllab/validation/ConsistentRangeConstraintValidator.java", "identifier": "ConsistentRangeConstraintValidator", "interfaces": "implements\n Validator<ConsistentRangeConstraint>", "methods": [ { "class_method_signature": "Con...
{ "body": "@Override\n public boolean isValid(Object value) {\n if (value instanceof Port) {\n Port port = (Port) value;\n Integer from = port.getFrom();\n Integer to = port.getTo();\n return (from == null && to == null) || (from != null && to != null);\n }...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_119
{ "fields": [], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/service/result/CompilationMessageTest.java", "identifier": "CompilationMessageTest", "interfaces": "", "superclass": "extends ValueObjectTestSupport" }
{ "body": "@Test\n public void testToString() {\n CompilationMessage message = new CompilationMessage(\"entity_name\", 3,\n 57, \"a message text\");\n toStringPrint(message);\n assertEquals(\"[entity_name][3,57]a message text\", message.toString());\n\n message = new Comp...
{ "fields": [ { "declarator": "serialVersionUID = -6725777479857711759L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -6725777479857711759L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "row...
{ "body": "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder(text.length() + 20);\n if (!StringUtils.isEmpty(entityName)) {\n sb.append(\"[\").append(entityName).append(\"]\");\n }\n sb.append(\"[\").append(row).append(\",\").append(column).append(...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_81
{ "fields": [ { "declarator": "ci", "modifier": "private", "original_string": "private CircuitInterface ci;", "type": "CircuitInterface", "var_name": "ci" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/service/ci/CircuitInterfaceTest.java", "identifier": "...
{ "body": "@Test\n public void addAll() {\n List<Port> ports = new ArrayList<Port>(2);\n ports.add(new Port());\n ports.add(new Port());\n ci.addAll(ports);\n assertEquals(2, ci.getPorts().size());\n }", "class_method_signature": "CircuitInterfaceTest.addAll()", "construct...
{ "fields": [ { "declarator": "serialVersionUID = -7941833394453145492L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -7941833394453145492L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "nam...
{ "body": "public void addAll(List<Port> collection) {\n ports.addAll(collection);\n }", "class_method_signature": "CircuitInterface.addAll(List<Port> collection)", "constructor": false, "full_signature": "public void addAll(List<Port> collection)", "identifier": "addAll", "invocations": [ "ad...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_97
{ "fields": [ { "declarator": "root", "modifier": "private", "original_string": "private HierarchyNode root;", "type": "HierarchyNode", "var_name": "root" }, { "declarator": "left", "modifier": "private", "original_string": "private HierarchyNode left;", ...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void getDependenciesForNullArgument() {\n hierarchy.getDependenciesFor(null);\n }", "class_method_signature": "HierarchyTest.getDependenciesForNullArgument()", "constructor": false, "full_signature": "@Test(expected = IllegalArgum...
{ "fields": [ { "declarator": "serialVersionUID = 6608251150623300335L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 6608251150623300335L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "proje...
{ "body": "public Set<HierarchyNode> getDependenciesFor(HierarchyNode node) {\n Validate.notNull(node, \"Hierarchy node can't be null\");\n Set<File> nodeDependencies = node.getDependencies();\n Set<HierarchyNode> dependencies = new LinkedHashSet<HierarchyNode>(\n nodeDependencies....
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_78
{ "fields": [ { "declarator": "port", "modifier": "private", "original_string": "private Port port;", "type": "Port", "var_name": "port" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/service/ci/PortTest.java", "identifier": "PortTest", "interfaces": "",...
{ "body": "@Test\n public void testToString() {\n port.setName(\"port_name\");\n port.setDirection(PortDirection.IN);\n port.setFrom(null);\n port.setTo(null);\n toStringPrint(port);\n assertEquals(\"port_name: IN STD_LOGIC\", port.toString());\n\n port.setFrom(4);\...
{ "fields": [ { "declarator": "serialVersionUID = -3505930700727412550L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -3505930700727412550L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "TYP...
{ "body": "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder(100);\n sb.append(name).append(\": \");\n sb.append(direction).append(\" \").append(getTypeName());\n if (isVector()) {\n sb.append(\"(\").append(from).append(\" \");\n sb.appe...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_54
{ "fields": [ { "declarator": "entity", "modifier": "private", "original_string": "private File entity;", "type": "File", "var_name": "entity" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/entity/FileTest.java", "identifier": "FileTest", "interfaces": "...
{ "body": "@Test\n public void copyConstructorFileProject() {\n Project project = new Project(\"userId\", \"project_name\");\n File another = new File(entity, project);\n assertTrue(project == another.getProject());\n\n another = new File(entity, null);\n assertNull(another.getPr...
{ "fields": [ { "declarator": "serialVersionUID = -2001411661196642883L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -2001411661196642883L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "pro...
{ "body": "public Project getProject() {\n return project;\n }", "class_method_signature": "File.getProject()", "constructor": false, "full_signature": "public Project getProject()", "identifier": "getProject", "invocations": [], "modifiers": "public", "parameters": "()", "return": "Project"...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_123
{ "fields": [ { "declarator": "hierarchy", "modifier": "private", "original_string": "private Hierarchy hierarchy;", "type": "Hierarchy", "var_name": "hierarchy" }, { "declarator": "files", "modifier": "private", "original_string": "private Set<File> files;"...
{ "body": "@Test\n public void getProject() {\n Project project = metadata.getProject();\n project.setName(\"new_name\");\n assertFalse(project.equals(metadata.getProject()));\n }", "class_method_signature": "ProjectMetadataTest.getProject()", "constructor": false, "full_signature": "...
{ "fields": [ { "declarator": "serialVersionUID = 6024599240022056727L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 6024599240022056727L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "files...
{ "body": "public Project getProject() {\n return EntityUtils.lightweightClone(hierarchy.getProject());\n }", "class_method_signature": "ProjectMetadata.getProject()", "constructor": false, "full_signature": "public Project getProject()", "identifier": "getProject", "invocations": [ "lightweig...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_15
{ "fields": [ { "declarator": "USER_ID = \"userId\"", "modifier": "private static final", "original_string": "private static final String USER_ID = \"userId\";", "type": "String", "var_name": "USER_ID" }, { "declarator": "USER_ID_2 = \"anotherUserId\"", "modifier"...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void findByNameNullName() {\n dao.findByName(USER_ID, null);\n }", "class_method_signature": "ProjectDaoImplTest.findByNameNullName()", "constructor": false, "full_signature": "@Test(expected = IllegalArgumentException.class) publ...
{ "fields": [], "file": "vhdllab-server/src/main/java/hr/fer/zemris/vhdllab/dao/impl/ProjectDaoImpl.java", "identifier": "ProjectDaoImpl", "interfaces": "implements\n ProjectDao", "methods": [ { "class_method_signature": "ProjectDaoImpl.ProjectDaoImpl()", "constructor": true, "ful...
{ "body": "@Override\n public Project findByName(String userId, String name) {\n Validate.notNull(userId, \"User identifier can't be null\");\n Validate.notNull(name, \"Name can't be null\");\n String query = \"select p from Project as p where p.userId = ?1 and p.name = ?2 order by p.id\";\n ...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_42
{ "fields": [ { "declarator": "entity", "modifier": "private", "original_string": "private BaseEntity entity;", "type": "BaseEntity", "var_name": "entity" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/entity/BaseEntityTest.java", "identifier": "BaseEntity...
{ "body": "@Test\n public void testToString() {\n toStringPrint(entity);\n }", "class_method_signature": "BaseEntityTest.testToString()", "constructor": false, "full_signature": "@Test public void testToString()", "identifier": "testToString", "invocations": [ "toStringPrint" ], "modifi...
{ "fields": [ { "declarator": "serialVersionUID = 604912227799417822L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 604912227799417822L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "id", ...
{ "body": "@Override\n public String toString() {\n return new ToStringBuilder(this)\n .append(\"id\", id)\n .append(\"version\", version)\n .toString();\n }", "class_method_signature": "BaseEntity.toString()", "constructor": false, "full_sig...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_135
{ "fields": [ { "declarator": "firstProject", "modifier": "private", "original_string": "private Project firstProject;", "type": "Project", "var_name": "firstProject" }, { "declarator": "secondProject", "modifier": "private", "original_string": "private Proj...
{ "body": "@SuppressWarnings(\"unchecked\")\n @Test(expected = IllegalArgumentException.class)\n public void addFile3() {\n Project project = new Project();\n File file = new File();\n file.setProject(project);\n workspace.addFile(file, new Hierarchy(project, Collections.EMPTY_LIST))...
{ "fields": [ { "declarator": "serialVersionUID = -2455644044788201509L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -2455644044788201509L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "pro...
{ "body": "public void addFile(File file, Hierarchy hierarchy) {\n Validate.notNull(file, \"File can't be null\");\n ProjectMetadata metadata = getMetadata(file.getProject());\n Validate.notNull(metadata, \"Project must be opened:\"\n + file.getProject());\n metadata.addFile...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_49
{ "fields": [ { "declarator": "entity", "modifier": "private", "original_string": "private OwnedEntity entity;", "type": "OwnedEntity", "var_name": "entity" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/entity/OwnedEntityTest.java", "identifier": "OwnedEn...
{ "body": "@Test\n public void hashCodeAndEquals() {\n basicEqualsTest(entity);\n\n OwnedEntity another = new OwnedEntity(entity);\n assertEqualsAndHashCode(entity, another);\n\n another.setUserId(USER_ID_2);\n assertNotEqualsAndHashCode(entity, another);\n\n another.setUs...
{ "fields": [ { "declarator": "serialVersionUID = 1276623438439954593L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1276623438439954593L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "userI...
{ "body": "public void setUserId(String userId) {\n this.userId = userId;\n }", "class_method_signature": "OwnedEntity.setUserId(String userId)", "constructor": false, "full_signature": "public void setUserId(String userId)", "identifier": "setUserId", "invocations": [], "modifiers": "public", ...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_128
{ "fields": [ { "declarator": "hierarchy", "modifier": "private", "original_string": "private Hierarchy hierarchy;", "type": "Hierarchy", "var_name": "hierarchy" }, { "declarator": "files", "modifier": "private", "original_string": "private Set<File> files;"...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void setHierarchy() {\n metadata.setHierarchy(null);\n }", "class_method_signature": "ProjectMetadataTest.setHierarchy()", "constructor": false, "full_signature": "@Test(expected = IllegalArgumentException.class) public void setHi...
{ "fields": [ { "declarator": "serialVersionUID = 6024599240022056727L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 6024599240022056727L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "files...
{ "body": "public void setHierarchy(Hierarchy hierarchy) {\n Validate.notNull(hierarchy, \"Hierarchy can't be null\");\n this.hierarchy = hierarchy;\n }", "class_method_signature": "ProjectMetadata.setHierarchy(Hierarchy hierarchy)", "constructor": false, "full_signature": "public void setHiera...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_24
{ "fields": [ { "declarator": "USER_ID = \"userId\"", "modifier": "private static final", "original_string": "private static final String USER_ID = \"userId\";", "type": "String", "var_name": "USER_ID" }, { "declarator": "NAME = \"entity_name\"", "modifier": "priv...
{ "body": "@Test\n public void findByNameNonExistingProjectId() {\n assertNull(\"file already exists.\", dao.findByName(Integer.MAX_VALUE,\n NAME));\n }", "class_method_signature": "FileDaoImplTest.findByNameNonExistingProjectId()", "constructor": false, "full_signature": "@Test publ...
{ "fields": [], "file": "vhdllab-server/src/main/java/hr/fer/zemris/vhdllab/dao/impl/FileDaoImpl.java", "identifier": "FileDaoImpl", "interfaces": "implements FileDao", "methods": [ { "class_method_signature": "FileDaoImpl.FileDaoImpl()", "constructor": true, "full_signature": "public F...
{ "body": "@Override\n public File findByName(Integer projectId, String name) {\n Validate.notNull(projectId, \"Project identifier can't be null\");\n Validate.notNull(name, \"Name can't be null\");\n String query = \"select f from File as f where f.project.id = ?1 and f.name = ?2 order by f.i...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_104
{ "fields": [ { "declarator": "root", "modifier": "private", "original_string": "private HierarchyNode root;", "type": "HierarchyNode", "var_name": "root" }, { "declarator": "left", "modifier": "private", "original_string": "private HierarchyNode left;", ...
{ "body": "@Test\n public void hashCodeAndEquals() throws Exception {\n basicEqualsTest(hierarchy);\n\n Hierarchy another = new Hierarchy(hierarchy.getProject(), collection);\n assertEqualsAndHashCode(hierarchy, another);\n\n another = new Hierarchy(new Project(\"newUserId\", \"another_...
{ "fields": [ { "declarator": "serialVersionUID = 6608251150623300335L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 6608251150623300335L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "proje...
{ "body": "public Project getProject() {\n return project;\n }", "class_method_signature": "Hierarchy.getProject()", "constructor": false, "full_signature": "public Project getProject()", "identifier": "getProject", "invocations": [], "modifiers": "public", "parameters": "()", "return": "Pro...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_73
{ "fields": [ { "declarator": "entity", "modifier": "private", "original_string": "private PreferencesFile entity;", "type": "PreferencesFile", "var_name": "entity" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/entity/PreferencesFileTest.java", "identifie...
{ "body": "@Test\n public void testToString() {\n toStringPrint(entity);\n }", "class_method_signature": "PreferencesFileTest.testToString()", "constructor": false, "full_signature": "@Test public void testToString()", "identifier": "testToString", "invocations": [ "toStringPrint" ], "m...
{ "fields": [ { "declarator": "serialVersionUID = 2916992978945246032L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 2916992978945246032L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "data"...
{ "body": "@Override\n public String toString() {\n return new ToStringBuilder(this)\n .appendSuper(super.toString())\n .append(\"dataLength\", StringUtils.length(data))\n .toString();\n }", "class_method_signature": "PreferencesFile.toString()",...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_112
{ "fields": [ { "declarator": "root", "modifier": "private", "original_string": "private HierarchyNode root;", "type": "HierarchyNode", "var_name": "root" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/service/hierarchy/HierarchyNodeTest.java", "identifier...
{ "body": "@Test\n public void hashCodeAndEquals() throws Exception {\n basicEqualsTest(root);\n\n HierarchyNode newRoot = new HierarchyNode(new File(), null);\n HierarchyNode another = new HierarchyNode(root.getFile(), newRoot);\n assertEqualsAndHashCode(root, another);\n\n anot...
{ "fields": [ { "declarator": "serialVersionUID = -2215053203067361627L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -2215053203067361627L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "fil...
{ "body": "public File getFile() {\n return file;\n }", "class_method_signature": "HierarchyNode.getFile()", "constructor": false, "full_signature": "public File getFile()", "identifier": "getFile", "invocations": [], "modifiers": "public", "parameters": "()", "return": "File", "signature"...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_65
{ "fields": [ { "declarator": "entity", "modifier": "private", "original_string": "private Project entity;", "type": "Project", "var_name": "entity" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/entity/ProjectTest.java", "identifier": "ProjectTest", "in...
{ "body": "@Test\n public void addFile() throws Exception {\n Set<File> files = new HashSet<File>(entity.getFiles());\n File anotherFile = new FileStub2();\n entity.addFile(anotherFile);\n files.add(anotherFile);\n assertTrue(\"file not added.\", entity.getFiles().contains(anothe...
{ "fields": [ { "declarator": "serialVersionUID = 7535295608182412183L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 7535295608182412183L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "files...
{ "body": "public void addFile(File file) {\n Validate.notNull(file, \"File can't be null\");\n if (file.getProject() != null) {\n if (file.getProject() == this) {\n // a file is already in this project\n return;\n }\n throw new IllegalArgum...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_6
{ "fields": [ { "declarator": "dao", "modifier": "private", "original_string": "private AbstractEntityDao<?> dao;", "type": "AbstractEntityDao<?>", "var_name": "dao" } ], "file": "vhdllab-server/src/test/java/hr/fer/zemris/vhdllab/dao/impl/AbstractEntityDaoTest.java", "iden...
{ "body": "@Test(expected = IllegalStateException.class)\n public void findUniqueResultMoreThenOne() {\n setupNamedEntities();\n String query = \"select e from NamedEntityTable e\";\n dao.findUniqueResult(query);\n }", "class_method_signature": "AbstractEntityDaoTest.findUniqueResultMoreT...
{ "fields": [ { "declarator": "clazz", "modifier": "protected final", "original_string": "protected final Class<T> clazz;", "type": "Class<T>", "var_name": "clazz" } ], "file": "vhdllab-server/src/main/java/hr/fer/zemris/vhdllab/dao/impl/AbstractEntityDao.java", "identifier...
{ "body": "@SuppressWarnings(\"unchecked\")\n protected final T findUniqueResult(String queryString, Object... values) {\n List<T> list = getJpaTemplate().find(queryString, values);\n if (list.size() > 1) {\n throw new IllegalStateException(\n \"Found more matches for un...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_32
{ "fields": [ { "declarator": "validator = new DeletedOnGreaterThenCreatedOnConstraintValidator()", "modifier": "private final", "original_string": "private final Validator<?> validator = new DeletedOnGreaterThenCreatedOnConstraintValidator();", "type": "Validator<?>", "var_name": "v...
{ "body": "@Test\n public void isValidNullDeletedOn() {\n assertTrue(\"not valid when deleted on is null.\", validator\n .isValid(new History()));\n }", "class_method_signature": "DeletedOnGreaterThenCreatedOnConstraintValidatorTest.isValidNullDeletedOn()", "constructor": false, "ful...
{ "fields": [], "file": "vhdllab-common/src/main/java/hr/fer/zemris/vhdllab/validation/DeletedOnGreaterThenCreatedOnConstraintValidator.java", "identifier": "DeletedOnGreaterThenCreatedOnConstraintValidator", "interfaces": "implements\n Validator<DeletedOnGreaterThenCreatedOnConstraint>", "methods": [ ...
{ "body": "@Override\n public boolean isValid(Object value) {\n if (value instanceof History) {\n History history = (History) value;\n Date deletedOn = history.getDeletedOn();\n Date createdOn = history.getCreatedOn();\n return deletedOn != null ? deletedOn.compar...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_45
{ "fields": [ { "declarator": "entity", "modifier": "private", "original_string": "private History entity;", "type": "History", "var_name": "entity" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/entity/HistoryTest.java", "identifier": "HistoryTest", "in...
{ "body": "@Test\n public void testToString() {\n toStringPrint(entity);\n }", "class_method_signature": "HistoryTest.testToString()", "constructor": false, "full_signature": "@Test public void testToString()", "identifier": "testToString", "invocations": [ "toStringPrint" ], "modifiers...
{ "fields": [ { "declarator": "serialVersionUID = 6192687679834053487L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 6192687679834053487L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "inser...
{ "body": "@Override\n public String toString() {\n return new ToStringBuilder(this)\n .append(\"insertVersion\", insertVersion)\n .append(\"updateVersion\", updateVersion)\n .append(\"createdOn\", createdOn)\n .append(\"deletedOn\"...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_132
{ "fields": [ { "declarator": "firstProject", "modifier": "private", "original_string": "private Project firstProject;", "type": "Project", "var_name": "firstProject" }, { "declarator": "secondProject", "modifier": "private", "original_string": "private Proj...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void removeProject() {\n workspace.removeProject(null);\n }", "class_method_signature": "WorkspaceTest.removeProject()", "constructor": false, "full_signature": "@Test(expected = IllegalArgumentException.class) public void removeP...
{ "fields": [ { "declarator": "serialVersionUID = -2455644044788201509L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -2455644044788201509L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "pro...
{ "body": "public void removeProject(Project project) {\n Validate.notNull(project, \"Project can't be null\");\n projectMetadata.remove(project);\n if (projects != null) {\n projects.remove(project);\n }\n }", "class_method_signature": "Workspace.removeProject(Project proj...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_12
{ "fields": [ { "declarator": "dao", "modifier": "private", "original_string": "private AbstractOwnedEntityDao<?> dao;", "type": "AbstractOwnedEntityDao<?>", "var_name": "dao" } ], "file": "vhdllab-server/src/test/java/hr/fer/zemris/vhdllab/dao/impl/AbstractOwnedEntityDaoTest...
{ "body": "@Test\n public void findByUser3() {\n List<OwnedEntityTable> list1 = Collections\n .singletonList(setupOwnedEntity(\"user1\", \"name\"));\n List<OwnedEntityTable> list2 = Collections\n .singletonList(setupOwnedEntity(\"user2\", \"name\"));\n\n assertEqu...
{ "fields": [], "file": "vhdllab-server/src/main/java/hr/fer/zemris/vhdllab/dao/impl/AbstractOwnedEntityDao.java", "identifier": "AbstractOwnedEntityDao", "interfaces": "implements OwnedEntityDao<T>", "methods": [ { "class_method_signature": "AbstractOwnedEntityDao.AbstractOwnedEntityDao(Class<T> cl...
{ "body": "@SuppressWarnings(\"unchecked\")\n @Override\n public List<T> findByUser(String userId) {\n Validate.notNull(userId, \"User identifier can't be null\");\n String query = \"select e from \" + clazz.getSimpleName()\n + \" as e where e.userId = ?1 order by e.id\";\n r...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_53
{ "fields": [ { "declarator": "entity", "modifier": "private", "original_string": "private File entity;", "type": "File", "var_name": "entity" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/entity/FileTest.java", "identifier": "FileTest", "interfaces": "...
{ "body": "@Test\n public void copyConstructorFileBoolean() {\n File another = new File(entity, false);\n assertNull(\"project not null.\", another.getProject());\n\n another = new File(entity, true);\n assertTrue(entity.getProject() == another.getProject());\n }", "class_method_si...
{ "fields": [ { "declarator": "serialVersionUID = -2001411661196642883L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -2001411661196642883L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "pro...
{ "body": "public Project getProject() {\n return project;\n }", "class_method_signature": "File.getProject()", "constructor": false, "full_signature": "public Project getProject()", "identifier": "getProject", "invocations": [], "modifiers": "public", "parameters": "()", "return": "Project"...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_124
{ "fields": [ { "declarator": "hierarchy", "modifier": "private", "original_string": "private Hierarchy hierarchy;", "type": "Hierarchy", "var_name": "hierarchy" }, { "declarator": "files", "modifier": "private", "original_string": "private Set<File> files;"...
{ "body": "@Test(expected = UnsupportedOperationException.class)\n public void getFiles() {\n metadata.getFiles().add(new File());\n }", "class_method_signature": "ProjectMetadataTest.getFiles()", "constructor": false, "full_signature": "@Test(expected = UnsupportedOperationException.class) public ...
{ "fields": [ { "declarator": "serialVersionUID = 6024599240022056727L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 6024599240022056727L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "files...
{ "body": "public Set<File> getFiles() {\n return Collections.unmodifiableSet(files);\n }", "class_method_signature": "ProjectMetadata.getFiles()", "constructor": false, "full_signature": "public Set<File> getFiles()", "identifier": "getFiles", "invocations": [ "unmodifiableSet" ], "modifi...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_28
{ "fields": [ { "declarator": "validator = new NameFormatConstraintValidator()", "modifier": "private final", "original_string": "private final Validator<?> validator = new NameFormatConstraintValidator();", "type": "Validator<?>", "var_name": "validator" } ], "file": "vhdlla...
{ "body": "@Test\n public void isValidNameCorrect() {\n assertTrue(\"not valid when correct name format.\", validator\n .isValid(\"correct_name_format\"));\n assertTrue(\"one letter.\", validator.isValid(\"a\"));\n assertTrue(\"one letter testbench name.\", validator.isValid(\"a...
{ "fields": [ { "declarator": "NAME_PATTERN = \"\\\\p{Alpha}\\\\p{Alnum}*(_\\\\p{Alnum}+)*\"", "modifier": "private static final", "original_string": "private static final String NAME_PATTERN = \"\\\\p{Alpha}\\\\p{Alnum}*(_\\\\p{Alnum}+)*\";", "type": "String", "var_name": "NAME_PATT...
{ "body": "@Override\n public boolean isValid(Object value) {\n if (value instanceof String) {\n return isCorrectName((String) value);\n }\n return false;\n }", "class_method_signature": "NameFormatConstraintValidator.isValid(Object value)", "constructor": false, "full_sign...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_108
{ "fields": [ { "declarator": "root", "modifier": "private", "original_string": "private HierarchyNode root;", "type": "HierarchyNode", "var_name": "root" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/service/hierarchy/HierarchyNodeTest.java", "identifier...
{ "body": "@Test\n public void addDependency() throws Exception {\n File file = new File(\"a_file_name\", null, null);\n HierarchyNode node = new HierarchyNode(file, null);\n root.addDependency(node);\n assertEquals(root, node.getParent());\n assertTrue(root.getDependencies().con...
{ "fields": [ { "declarator": "serialVersionUID = -2215053203067361627L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -2215053203067361627L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "fil...
{ "body": "public void addDependency(HierarchyNode node) {\n if (dependencies.contains(node.getFile())) {\n return; // duplicate dependencies are ignored\n }\n /*\n * disallow cyclic dependencies!\n */\n if (canFormCyclicDependency(this, node)) {\n ret...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_90
{ "fields": [ { "declarator": "root", "modifier": "private", "original_string": "private HierarchyNode root;", "type": "HierarchyNode", "var_name": "root" }, { "declarator": "left", "modifier": "private", "original_string": "private HierarchyNode left;", ...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void fileHasDependency() {\n hierarchy.fileHasDependency(null, left.getFile());\n }", "class_method_signature": "HierarchyTest.fileHasDependency()", "constructor": false, "full_signature": "@Test(expected = IllegalArgumentExceptio...
{ "fields": [ { "declarator": "serialVersionUID = 6608251150623300335L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 6608251150623300335L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "proje...
{ "body": "public boolean fileHasDependency(File file, File dependency) {\n Validate.notNull(file, \"File can't be null\");\n Validate.notNull(dependency, \"Dependency can't be null\");\n HierarchyNode fileNode = getNode(file);\n Validate.notNull(fileNode, \"File isn't in hierarchy: \" + f...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_86
{ "fields": [ { "declarator": "root", "modifier": "private", "original_string": "private HierarchyNode root;", "type": "HierarchyNode", "var_name": "root" }, { "declarator": "left", "modifier": "private", "original_string": "private HierarchyNode left;", ...
{ "body": "@Test\n public void getProject() {\n Project project = hierarchy.getProject();\n project.setName(\"another_name\");\n assertEquals(\"another_name\", hierarchy.getProject().getName());\n }", "class_method_signature": "HierarchyTest.getProject()", "constructor": false, "full_...
{ "fields": [ { "declarator": "serialVersionUID = 6608251150623300335L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 6608251150623300335L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "proje...
{ "body": "public Project getProject() {\n return project;\n }", "class_method_signature": "Hierarchy.getProject()", "constructor": false, "full_signature": "public Project getProject()", "identifier": "getProject", "invocations": [], "modifiers": "public", "parameters": "()", "return": "Pro...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_69
{ "fields": [ { "declarator": "entity", "modifier": "private", "original_string": "private Project entity;", "type": "Project", "var_name": "entity" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/entity/ProjectTest.java", "identifier": "ProjectTest", "in...
{ "body": "@Test\n public void testToString() {\n toStringPrint(entity);\n }", "class_method_signature": "ProjectTest.testToString()", "constructor": false, "full_signature": "@Test public void testToString()", "identifier": "testToString", "invocations": [ "toStringPrint" ], "modifiers...
{ "fields": [ { "declarator": "serialVersionUID = 7535295608182412183L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 7535295608182412183L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "files...
{ "body": "@Override\n public String toString() {\n // referencing though getter because of lazy loading\n return new ToStringBuilder(this)\n .appendSuper(super.toString())\n .append(\"files\", getFiles(), false)\n .toString();\n }", "clas...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_87
{ "fields": [ { "declarator": "root", "modifier": "private", "original_string": "private HierarchyNode root;", "type": "HierarchyNode", "var_name": "root" }, { "declarator": "left", "modifier": "private", "original_string": "private HierarchyNode left;", ...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void getNodeNullArgument() {\n hierarchy.getNode(null);\n }", "class_method_signature": "HierarchyTest.getNodeNullArgument()", "constructor": false, "full_signature": "@Test(expected = IllegalArgumentException.class) public void g...
{ "fields": [ { "declarator": "serialVersionUID = 6608251150623300335L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 6608251150623300335L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "proje...
{ "body": "public HierarchyNode getNode(File file) {\n Validate.notNull(file);\n return nodes.get(new File(file));\n }", "class_method_signature": "Hierarchy.getNode(File file)", "constructor": false, "full_signature": "public HierarchyNode getNode(File file)", "identifier": "getNode", "inv...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_68
{ "fields": [ { "declarator": "entity", "modifier": "private", "original_string": "private Project entity;", "type": "Project", "var_name": "entity" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/entity/ProjectTest.java", "identifier": "ProjectTest", "in...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void removeFile2() throws Exception {\n File anotherFile = new FileStub2();\n entity.removeFile(anotherFile);\n }", "class_method_signature": "ProjectTest.removeFile2()", "constructor": false, "full_signature": "@Test(expec...
{ "fields": [ { "declarator": "serialVersionUID = 7535295608182412183L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 7535295608182412183L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "files...
{ "body": "public void removeFile(File file) {\n Validate.notNull(file, \"File can't be null\");\n if (file.getProject() != this) {\n throw new IllegalArgumentException(file.toString()\n + \" doesn't belong to this \" + this.toString());\n }\n // referencing t...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_109
{ "fields": [ { "declarator": "root", "modifier": "private", "original_string": "private HierarchyNode root;", "type": "HierarchyNode", "var_name": "root" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/service/hierarchy/HierarchyNodeTest.java", "identifier...
{ "body": "@Test\n public void getFile() {\n File file = root.getFile();\n file.setName(\"name\");\n assertEquals(\"name\", root.getFile().getName());\n }", "class_method_signature": "HierarchyNodeTest.getFile()", "constructor": false, "full_signature": "@Test public void getFile()", ...
{ "fields": [ { "declarator": "serialVersionUID = -2215053203067361627L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -2215053203067361627L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "fil...
{ "body": "public File getFile() {\n return file;\n }", "class_method_signature": "HierarchyNode.getFile()", "constructor": false, "full_signature": "public File getFile()", "identifier": "getFile", "invocations": [], "modifiers": "public", "parameters": "()", "return": "File", "signature"...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_91
{ "fields": [ { "declarator": "root", "modifier": "private", "original_string": "private HierarchyNode root;", "type": "HierarchyNode", "var_name": "root" }, { "declarator": "left", "modifier": "private", "original_string": "private HierarchyNode left;", ...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void fileHasDependency2() {\n hierarchy.fileHasDependency(left.getFile(), null);\n }", "class_method_signature": "HierarchyTest.fileHasDependency2()", "constructor": false, "full_signature": "@Test(expected = IllegalArgumentExcept...
{ "fields": [ { "declarator": "serialVersionUID = 6608251150623300335L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 6608251150623300335L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "proje...
{ "body": "public boolean fileHasDependency(File file, File dependency) {\n Validate.notNull(file, \"File can't be null\");\n Validate.notNull(dependency, \"Dependency can't be null\");\n HierarchyNode fileNode = getNode(file);\n Validate.notNull(fileNode, \"File isn't in hierarchy: \" + f...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_29
{ "fields": [ { "declarator": "validator = new NameFormatConstraintValidator()", "modifier": "private final", "original_string": "private final Validator<?> validator = new NameFormatConstraintValidator();", "type": "Validator<?>", "var_name": "validator" } ], "file": "vhdlla...
{ "body": "@Test\n public void isValidNameIncorrect() {\n assertFalse(\"valid with empty name.\", validator.isValid(\"\"));\n assertFalse(\"starts with illegal character.\", validator\n .isValid(\"$circuitAND\"));\n assertFalse(\"contains illegal character.\", validator\n ...
{ "fields": [ { "declarator": "NAME_PATTERN = \"\\\\p{Alpha}\\\\p{Alnum}*(_\\\\p{Alnum}+)*\"", "modifier": "private static final", "original_string": "private static final String NAME_PATTERN = \"\\\\p{Alpha}\\\\p{Alnum}*(_\\\\p{Alnum}+)*\";", "type": "String", "var_name": "NAME_PATT...
{ "body": "@Override\n public boolean isValid(Object value) {\n if (value instanceof String) {\n return isCorrectName((String) value);\n }\n return false;\n }", "class_method_signature": "NameFormatConstraintValidator.isValid(Object value)", "constructor": false, "full_sign...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_52
{ "fields": [ { "declarator": "entity", "modifier": "private", "original_string": "private File entity;", "type": "File", "var_name": "entity" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/entity/FileTest.java", "identifier": "FileTest", "interfaces": "...
{ "body": "@Test\n public void constructor() {\n File another = new File(NAME, TYPE, DATA);\n assertEquals(\"name not same.\", NAME, another.getName());\n assertEquals(\"type not same.\", TYPE, another.getType());\n assertEquals(\"data not same.\", DATA, another.getData());\n }", "...
{ "fields": [ { "declarator": "serialVersionUID = -2001411661196642883L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -2001411661196642883L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "pro...
{ "body": "@NameFormatConstraint\n @Override\n public String getName() {\n return super.getName();\n }", "class_method_signature": "File.getName()", "constructor": false, "full_signature": "@NameFormatConstraint @Override public String getName()", "identifier": "getName", "invocations": [ ...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_125
{ "fields": [ { "declarator": "hierarchy", "modifier": "private", "original_string": "private Hierarchy hierarchy;", "type": "Hierarchy", "var_name": "hierarchy" }, { "declarator": "files", "modifier": "private", "original_string": "private Set<File> files;"...
{ "body": "@Test\n public void getFiles2() {\n File file = (File) CollectionUtils.get(metadata.getFiles(), 0);\n file.setName(\"new_name\");\n File another = (File) CollectionUtils.get(metadata.getFiles(), 0);\n assertTrue(file.equals(another));\n }", "class_method_signature": "Pro...
{ "fields": [ { "declarator": "serialVersionUID = 6024599240022056727L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 6024599240022056727L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "files...
{ "body": "public Set<File> getFiles() {\n return Collections.unmodifiableSet(files);\n }", "class_method_signature": "ProjectMetadata.getFiles()", "constructor": false, "full_signature": "public Set<File> getFiles()", "identifier": "getFiles", "invocations": [ "unmodifiableSet" ], "modifi...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_13
{ "fields": [ { "declarator": "USER_ID = \"userId\"", "modifier": "private static final", "original_string": "private static final String USER_ID = \"userId\";", "type": "String", "var_name": "USER_ID" }, { "declarator": "USER_ID_2 = \"anotherUserId\"", "modifier"...
{ "body": "@Test\n public void saveAddFile() {\n dao.persist(project);\n File newFile = new File(NAME_2, FileType.AUTOMATON, \"another file data\");\n project.addFile(newFile);\n dao.persist(project);\n\n Project loadedProject = dao.load(project.getId());\n assertNotNull(\...
{ "fields": [], "file": "vhdllab-server/src/main/java/hr/fer/zemris/vhdllab/dao/impl/ProjectDaoImpl.java", "identifier": "ProjectDaoImpl", "interfaces": "implements\n ProjectDao", "methods": [ { "class_method_signature": "ProjectDaoImpl.ProjectDaoImpl()", "constructor": true, "ful...
{ "body": "@Override\n public Project findByName(String userId, String name) {\n Validate.notNull(userId, \"User identifier can't be null\");\n Validate.notNull(name, \"Name can't be null\");\n String query = \"select p from Project as p where p.userId = ?1 and p.name = ?2 order by p.id\";\n ...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_44
{ "fields": [ { "declarator": "entity", "modifier": "private", "original_string": "private FileInfo entity;", "type": "FileInfo", "var_name": "entity" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/entity/FileInfoTest.java", "identifier": "FileInfoTest", ...
{ "body": "@Test\n public void testToString() {\n toStringPrint(entity);\n }", "class_method_signature": "FileInfoTest.testToString()", "constructor": false, "full_signature": "@Test public void testToString()", "identifier": "testToString", "invocations": [ "toStringPrint" ], "modifier...
{ "fields": [ { "declarator": "serialVersionUID = -7202306767258225281L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -7202306767258225281L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "typ...
{ "body": "@Override\n public String toString() {\n return new ToStringBuilder(this)\n .appendSuper(super.toString())\n .append(\"type\", type)\n .append(\"dataLength\", StringUtils.length(data))\n .toString();\n }", "class_met...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_133
{ "fields": [ { "declarator": "firstProject", "modifier": "private", "original_string": "private Project firstProject;", "type": "Project", "var_name": "firstProject" }, { "declarator": "secondProject", "modifier": "private", "original_string": "private Proj...
{ "body": "@SuppressWarnings(\"unchecked\")\n @Test(expected = IllegalArgumentException.class)\n public void addFile() {\n workspace.addFile(null, new Hierarchy(new Project(),\n Collections.EMPTY_LIST));\n }", "class_method_signature": "WorkspaceTest.addFile()", "constructor": false...
{ "fields": [ { "declarator": "serialVersionUID = -2455644044788201509L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -2455644044788201509L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "pro...
{ "body": "public void addFile(File file, Hierarchy hierarchy) {\n Validate.notNull(file, \"File can't be null\");\n ProjectMetadata metadata = getMetadata(file.getProject());\n Validate.notNull(metadata, \"Project must be opened:\"\n + file.getProject());\n metadata.addFile...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_33
{ "fields": [ { "declarator": "validator = new DeletedOnGreaterThenCreatedOnConstraintValidator()", "modifier": "private final", "original_string": "private final Validator<?> validator = new DeletedOnGreaterThenCreatedOnConstraintValidator();", "type": "Validator<?>", "var_name": "v...
{ "body": "@Test\n public void isValid() {\n History history = new History();\n history.setCreatedOn(CREATED_ON);\n history.setDeletedOn(DELETED_ON);\n assertTrue(\"not valid when deleted on is greater then created on.\",\n validator.isValid(history));\n }", "class_m...
{ "fields": [], "file": "vhdllab-common/src/main/java/hr/fer/zemris/vhdllab/validation/DeletedOnGreaterThenCreatedOnConstraintValidator.java", "identifier": "DeletedOnGreaterThenCreatedOnConstraintValidator", "interfaces": "implements\n Validator<DeletedOnGreaterThenCreatedOnConstraint>", "methods": [ ...
{ "body": "@Override\n public boolean isValid(Object value) {\n if (value instanceof History) {\n History history = (History) value;\n Date deletedOn = history.getDeletedOn();\n Date createdOn = history.getCreatedOn();\n return deletedOn != null ? deletedOn.compar...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_113
{ "fields": [ { "declarator": "root", "modifier": "private", "original_string": "private HierarchyNode root;", "type": "HierarchyNode", "var_name": "root" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/service/hierarchy/HierarchyNodeTest.java", "identifier...
{ "body": "@Test\n public void testToString() {\n toStringPrint(root);\n assertEquals(\"file_name []\", root.toString());\n\n new HierarchyNode(new File(\"another_file\", null, null), root);\n toStringPrint(root);\n assertEquals(\"file_name [another_file]\", root.toString());\n\n...
{ "fields": [ { "declarator": "serialVersionUID = -2215053203067361627L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -2215053203067361627L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "fil...
{ "body": "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder((dependencies.size() + 1) * 15);\n sb.append(file.getName()).append(\" [\");\n for (File dep : dependencies) {\n sb.append(dep.getName()).append(\",\");\n }\n if (!dependencies.isE...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_64
{ "fields": [ { "declarator": "entity", "modifier": "private", "original_string": "private Project entity;", "type": "Project", "var_name": "entity" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/entity/ProjectTest.java", "identifier": "ProjectTest", "in...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void addFileNullArgument() {\n entity.addFile(null);\n }", "class_method_signature": "ProjectTest.addFileNullArgument()", "constructor": false, "full_signature": "@Test(expected = IllegalArgumentException.class) public void addFil...
{ "fields": [ { "declarator": "serialVersionUID = 7535295608182412183L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 7535295608182412183L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "files...
{ "body": "public void addFile(File file) {\n Validate.notNull(file, \"File can't be null\");\n if (file.getProject() != null) {\n if (file.getProject() == this) {\n // a file is already in this project\n return;\n }\n throw new IllegalArgum...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_7
{ "fields": [ { "declarator": "dao", "modifier": "private", "original_string": "private AbstractEntityDao<?> dao;", "type": "AbstractEntityDao<?>", "var_name": "dao" } ], "file": "vhdllab-server/src/test/java/hr/fer/zemris/vhdllab/dao/impl/AbstractEntityDaoTest.java", "iden...
{ "body": "@Test\n public void findUniqueResult() {\n setupNamedEntities();\n String query = \"select e from NamedEntityTable e where e.name = ?1\";\n assertNotNull(\"file not found.\", dao.findUniqueResult(query, \"name\"));\n }", "class_method_signature": "AbstractEntityDaoTest.findUniq...
{ "fields": [ { "declarator": "clazz", "modifier": "protected final", "original_string": "protected final Class<T> clazz;", "type": "Class<T>", "var_name": "clazz" } ], "file": "vhdllab-server/src/main/java/hr/fer/zemris/vhdllab/dao/impl/AbstractEntityDao.java", "identifier...
{ "body": "@SuppressWarnings(\"unchecked\")\n protected final T findUniqueResult(String queryString, Object... values) {\n List<T> list = getJpaTemplate().find(queryString, values);\n if (list.size() > 1) {\n throw new IllegalStateException(\n \"Found more matches for un...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_105
{ "fields": [ { "declarator": "root", "modifier": "private", "original_string": "private HierarchyNode root;", "type": "HierarchyNode", "var_name": "root" }, { "declarator": "left", "modifier": "private", "original_string": "private HierarchyNode left;", ...
{ "body": "@Test\n public void testToString() {\n toStringPrint(hierarchy);\n assertEquals(\n \"Hierarchy for user=userId, project=project_name {\\nroot [left,right]\\nright [right-dep]\\nleft []\\nright-dep []\\n}\",\n hierarchy.toString());\n }", "class_method_sig...
{ "fields": [ { "declarator": "serialVersionUID = 6608251150623300335L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 6608251150623300335L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "proje...
{ "body": "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder(30 + nodes.size() * 30);\n sb.append(\"Hierarchy for user=\").append(project.getUserId());\n sb.append(\", project=\").append(project.getName()).append(\" {\\n\");\n for (HierarchyNode node : nodes....
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_72
{ "fields": [ { "declarator": "entity", "modifier": "private", "original_string": "private PreferencesFile entity;", "type": "PreferencesFile", "var_name": "entity" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/entity/PreferencesFileTest.java", "identifie...
{ "body": "@Test\n public void copyConstructor() {\n PreferencesFile another = new PreferencesFile(entity);\n assertEquals(\"name not same.\", entity.getName(), another.getName());\n assertEquals(\"UserId not same.\", entity.getUserId(), another\n .getUserId());\n assertE...
{ "fields": [ { "declarator": "serialVersionUID = 2916992978945246032L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 2916992978945246032L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "data"...
{ "body": "public String getData() {\n return data;\n }", "class_method_signature": "PreferencesFile.getData()", "constructor": false, "full_signature": "public String getData()", "identifier": "getData", "invocations": [], "modifiers": "public", "parameters": "()", "return": "String", "si...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_25
{ "fields": [ { "declarator": "USER_ID = \"userId\"", "modifier": "private static final", "original_string": "private static final String USER_ID = \"userId\";", "type": "String", "var_name": "USER_ID" }, { "declarator": "NAME = \"entity_name\"", "modifier": "priv...
{ "body": "@Test\n public void findByNameNonExistingName() {\n assertNull(\"file already exists.\", dao.findByName(file.getProject()\n .getId(), NAME_2));\n }", "class_method_signature": "FileDaoImplTest.findByNameNonExistingName()", "constructor": false, "full_signature": "@Test pub...
{ "fields": [], "file": "vhdllab-server/src/main/java/hr/fer/zemris/vhdllab/dao/impl/FileDaoImpl.java", "identifier": "FileDaoImpl", "interfaces": "implements FileDao", "methods": [ { "class_method_signature": "FileDaoImpl.FileDaoImpl()", "constructor": true, "full_signature": "public F...
{ "body": "@Override\n public File findByName(Integer projectId, String name) {\n Validate.notNull(projectId, \"Project identifier can't be null\");\n Validate.notNull(name, \"Name can't be null\");\n String query = \"select f from File as f where f.project.id = ?1 and f.name = ?2 order by f.i...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_129
{ "fields": [ { "declarator": "hierarchy", "modifier": "private", "original_string": "private Hierarchy hierarchy;", "type": "Hierarchy", "var_name": "hierarchy" }, { "declarator": "files", "modifier": "private", "original_string": "private Set<File> files;"...
{ "body": "@Test\n public void testToString() {\n toStringPrint(metadata);\n }", "class_method_signature": "ProjectMetadataTest.testToString()", "constructor": false, "full_signature": "@Test public void testToString()", "identifier": "testToString", "invocations": [ "toStringPrint" ], ...
{ "fields": [ { "declarator": "serialVersionUID = 6024599240022056727L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 6024599240022056727L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "files...
{ "body": "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder(200);\n sb.append(\"files [\");\n if (!files.isEmpty()) {\n sb.append(\"\\n\");\n for (File f : files) {\n sb.append(f).append(\"\\n\");\n }\n }\n ...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
5073742_48
{ "fields": [ { "declarator": "entity", "modifier": "private", "original_string": "private OwnedEntity entity;", "type": "OwnedEntity", "var_name": "entity" } ], "file": "vhdllab-common/src/test/java/hr/fer/zemris/vhdllab/entity/OwnedEntityTest.java", "identifier": "OwnedEn...
{ "body": "@Test\n public void copyConstructor() {\n OwnedEntity another = new OwnedEntity(entity);\n assertEquals(\"userId not same.\", entity.getUserId(), another\n .getUserId());\n }", "class_method_signature": "OwnedEntityTest.copyConstructor()", "constructor": false, "ful...
{ "fields": [ { "declarator": "serialVersionUID = 1276623438439954593L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1276623438439954593L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "userI...
{ "body": "public String getUserId() {\n return userId;\n }", "class_method_signature": "OwnedEntity.getUserId()", "constructor": false, "full_signature": "public String getUserId()", "identifier": "getUserId", "invocations": [], "modifiers": "public", "parameters": "()", "return": "String",...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5073742, "size": 47526, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/mbezjak/vhdllab" }
71227768_1
{ "fields": [ { "declarator": "useCases", "modifier": "@Autowired", "original_string": "@Autowired\n ModuleUseCases useCases;", "type": "ModuleUseCases", "var_name": "useCases" }, { "declarator": "moduleQueries", "modifier": "@MockBean", "original_string"...
{ "body": "@Test(expected = DuplicateModuleException.class)\n public void createWorkingCopy_should_fail_when_working_copy_already_exists() {\n\n TemplateContainer.Key key = new Module.Key(\"x\", \"1\", TemplateContainer.VersionType.workingcopy);\n Module module = new Module(key, Collections.emptyList...
{ "fields": [ { "declarator": "DEFAULT_NB_SEARCH_RESULTS = 10", "modifier": "private static final", "original_string": "private static final int DEFAULT_NB_SEARCH_RESULTS = 10;", "type": "int", "var_name": "DEFAULT_NB_SEARCH_RESULTS" }, { "declarator": "moduleCommands",...
{ "body": "public String createWorkingCopy(Module module, User user) {\n if (moduleQueries.moduleExists(module.getKey())) {\n throw new DuplicateModuleException(module.getKey());\n }\n verifyTechnosExistence(module.getTechnos());\n return cleanCreateModule(module, user);\n }"...
{ "created": "10/18/2016 8:47:13 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 71227768, "size": null, "stargazer_count": null, "stars": 28, "updates": "2020-01-22T10:05:14+00:00", "url": "https://github.com/voyages-sncf-tec...
71227768_16
{ "fields": [], "file": "core/domain/src/test/java/org/hesperides/core/domain/templatecontainers/entities/PropertyTest.java", "identifier": "PropertyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void extractAnnotationValueLegacyStyle() {\n assertEquals(\"a\", Property.extractAnnotationValueLegacyStyle(\" @comment a comment \"));\n assertEquals(\" a comment \", Property.extractAnnotationValueLegacyStyle(\" @comment \\\" a comment \\\" \"));\n assertEquals(\" a...
{ "fields": [ { "declarator": "mustacheContent", "modifier": "", "original_string": "String mustacheContent;", "type": "String", "var_name": "mustacheContent" }, { "declarator": "isRequired", "modifier": "", "original_string": "boolean isRequired;", "t...
{ "body": "static String extractAnnotationValueLegacyStyle(String annotationDefinition) {\n String result;\n String valueAfterFirstSpace = extractValueAfterFirstSpace(annotationDefinition);\n if (startsWithQuotes(valueAfterFirstSpace)) {\n result = extractValueBetweenQuotes(valueAfterF...
{ "created": "10/18/2016 8:47:13 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 71227768, "size": null, "stargazer_count": null, "stars": 28, "updates": "2020-01-22T10:05:14+00:00", "url": "https://github.com/voyages-sncf-tec...
71227768_17
{ "fields": [], "file": "core/domain/src/test/java/org/hesperides/core/domain/templatecontainers/entities/PropertyTest.java", "identifier": "PropertyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testExtractValueBetweenQuotes() {\n assertEquals(\"Surrounded by double quotes\", Property.extractValueBetweenQuotes(\"\\\"Surrounded by double quotes\\\"\"));\n assertEquals(\"Surrounded by simple quotes\", Property.extractValueBetweenQuotes(\"'Surrounded by simple quo...
{ "fields": [ { "declarator": "mustacheContent", "modifier": "", "original_string": "String mustacheContent;", "type": "String", "var_name": "mustacheContent" }, { "declarator": "isRequired", "modifier": "", "original_string": "boolean isRequired;", "t...
{ "body": "static String extractValueBetweenQuotes(String value) {\n String result = null;\n if (value != null) {\n if (value.startsWith(\"\\\"\")) {\n result = extractBetweenFirstAndNextUnescapedQuotes(value, \"\\\"\");\n } else if (value.startsWith(\"'\")) {\n ...
{ "created": "10/18/2016 8:47:13 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 71227768, "size": null, "stargazer_count": null, "stars": 28, "updates": "2020-01-22T10:05:14+00:00", "url": "https://github.com/voyages-sncf-tec...
71227768_0
{ "fields": [], "file": "core/presentation/src/test/java/org/hesperides/core/presentation/controllers/ModulesControllerTest.java", "identifier": "ModulesControllerTest", "interfaces": "", "superclass": "extends AbstractControllerTest" }
{ "body": "@Test\n @WithMockUser\n public void getModulesNamesTest() throws Exception {\n List<String> modulesList = Arrays.asList(\"module1\", \"module2\", \"module3\");\n given(moduleUseCases.getModulesName()).willReturn(modulesList);\n\n this.mvc.perform(get(\"/modules\")\n ...
{ "fields": [ { "declarator": "moduleUseCases", "modifier": "private final", "original_string": "private final ModuleUseCases moduleUseCases;", "type": "ModuleUseCases", "var_name": "moduleUseCases" } ], "file": "core/presentation/src/main/java/org/hesperides/core/presentatio...
{ "body": "@ApiOperation(\"Get all module names\")\n @GetMapping\n public ResponseEntity<List<String>> getModulesName() {\n\n log.debug(\"getModulesName\");\n\n List<String> modulesName = moduleUseCases.getModulesName();\n log.debug(\"return getModulesName: {}\", modulesName.toString());\n\...
{ "created": "10/18/2016 8:47:13 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 71227768, "size": null, "stargazer_count": null, "stars": 28, "updates": "2020-01-22T10:05:14+00:00", "url": "https://github.com/voyages-sncf-tec...
71227768_10
{ "fields": [], "file": "core/domain/src/test/java/org/hesperides/core/domain/templatecontainers/entities/PropertyTest.java", "identifier": "PropertyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void oldCommentArobase() {\n\n // #312\n assertProperty(new Property(\"http.proxy | Format : [protocol://][user:password@]proxyhost[:port]\", \"http.proxy\", false, \"Format : [protocol://][user:password\", \"\", \"\", false),\n Property.extractProperty(\"http...
{ "fields": [ { "declarator": "mustacheContent", "modifier": "", "original_string": "String mustacheContent;", "type": "String", "var_name": "mustacheContent" }, { "declarator": "isRequired", "modifier": "", "original_string": "boolean isRequired;", "t...
{ "body": "public static Property extractProperty(String propertyDefinition) {\n Property property = null;\n if (propertyDefinition != null) {\n String[] propertyAttributes = propertyDefinition.split(PIPE_REGEX, 2);\n\n String name = propertyAttributes[NAME_INDEX].trim();\n ...
{ "created": "10/18/2016 8:47:13 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 71227768, "size": null, "stargazer_count": null, "stars": 28, "updates": "2020-01-22T10:05:14+00:00", "url": "https://github.com/voyages-sncf-tec...
71227768_7
{ "fields": [], "file": "core/domain/src/test/java/org/hesperides/core/domain/platforms/entities/PlatformTest.java", "identifier": "PlatformTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testUnusedDeployedModulesIdenticalIds() {\n new Platform(null, null, true, null, Arrays.asList(\n buildDeployedModuleWithId(null),\n buildDeployedModuleWithId(null),\n buildDeployedModuleWithId(0L),\n buildDeployedMod...
{ "fields": [ { "declarator": "GLOBAL_PROPERTIES_PATH = \"#\"", "modifier": "public static final", "original_string": "public static final String GLOBAL_PROPERTIES_PATH = \"#\";", "type": "String", "var_name": "GLOBAL_PROPERTIES_PATH" }, { "declarator": "key", "mo...
{ "body": "public Platform validateDeployedModulesDistinctIds() {\n if (deployedModules != null) {\n long nbIds = deployedModules.stream().filter(DeployedModule::isActiveModule).map(DeployedModule::getId).count();\n long nbDistinctIds = deployedModules.stream().filter(DeployedModule::isAc...
{ "created": "10/18/2016 8:47:13 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 71227768, "size": null, "stargazer_count": null, "stars": 28, "updates": "2020-01-22T10:05:14+00:00", "url": "https://github.com/voyages-sncf-tec...
71227768_6
{ "fields": [ { "declarator": "TEST_GROUPS_TREE_CACHE_NAME = \"test-authorization-groups-tree\"", "modifier": "static final", "original_string": "static final String TEST_GROUPS_TREE_CACHE_NAME = \"test-authorization-groups-tree\";", "type": "String", "var_name": "TEST_GROUPS_TREE_CA...
{ "body": "@Test\n public void testWithTwoParents() {\n String dummyGroupDN = \"CN=DUMMY\";\n String parentGroupDN1 = \"CN=PARENT1\";\n String parentGroupDN2 = \"CN=PARENT2\";\n parentGroupsTree.put(dummyGroupDN, new HashSet<>(Arrays.asList(parentGroupDN1, parentGroupDN2)));\n\n ...
{ "fields": [ { "declarator": "MAX_RECURSION = 1000", "modifier": "static final", "original_string": "static final int MAX_RECURSION = 1000;", "type": "int", "var_name": "MAX_RECURSION" }, { "declarator": "cache", "modifier": "private final", "original_strin...
{ "body": "public Set<String> retrieveParentGroups(String initialGroupDN) {\n Set<String> allParentGroups = new HashSet<>();\n Set<String> groupDNsAtCurrentLevel = Collections.singleton(initialGroupDN);\n int ancestorLevel;\n for (ancestorLevel = 1; ancestorLevel < MAX_RECURSION; ancestorL...
{ "created": "10/18/2016 8:47:13 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 71227768, "size": null, "stargazer_count": null, "stars": 28, "updates": "2020-01-22T10:05:14+00:00", "url": "https://github.com/voyages-sncf-tec...
71227768_11
{ "fields": [], "file": "core/domain/src/test/java/org/hesperides/core/domain/templatecontainers/entities/PropertyTest.java", "identifier": "PropertyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void legacyBugCases() {\n\n // #307 Annotation collée au texte\n assertProperty(new Property(\"comment typo|@commentForgot space @required @password\", \"comment typo\", true, null, \"\", \"\", true),\n Property.extractProperty(\"comment typo|@commentForgot sp...
{ "fields": [ { "declarator": "mustacheContent", "modifier": "", "original_string": "String mustacheContent;", "type": "String", "var_name": "mustacheContent" }, { "declarator": "isRequired", "modifier": "", "original_string": "boolean isRequired;", "t...
{ "body": "public static Property extractProperty(String propertyDefinition) {\n Property property = null;\n if (propertyDefinition != null) {\n String[] propertyAttributes = propertyDefinition.split(PIPE_REGEX, 2);\n\n String name = propertyAttributes[NAME_INDEX].trim();\n ...
{ "created": "10/18/2016 8:47:13 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 71227768, "size": null, "stargazer_count": null, "stars": 28, "updates": "2020-01-22T10:05:14+00:00", "url": "https://github.com/voyages-sncf-tec...
71227768_12
{ "fields": [], "file": "core/domain/src/test/java/org/hesperides/core/domain/templatecontainers/entities/PropertyTest.java", "identifier": "PropertyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testArobaseEndsWithSpaceOrIsTheEnd() {\n assertEquals(true, Property.arobaseEndsWithSpaceOrIsTheEnd(\"@foo \"));\n assertEquals(true, Property.arobaseEndsWithSpaceOrIsTheEnd(\"@foo\"));\n assertEquals(false, Property.arobaseEndsWithSpaceOrIsTheEnd(\"@foo)\"));\n ...
{ "fields": [ { "declarator": "mustacheContent", "modifier": "", "original_string": "String mustacheContent;", "type": "String", "var_name": "mustacheContent" }, { "declarator": "isRequired", "modifier": "", "original_string": "boolean isRequired;", "t...
{ "body": "static boolean arobaseEndsWithSpaceOrIsTheEnd(String value) {\n return Pattern.compile(\"^@[a-zA-Z]*( |$)\").matcher(value).find();\n }", "class_method_signature": "Property.arobaseEndsWithSpaceOrIsTheEnd(String value)", "constructor": false, "full_signature": "static boolean arobaseEndsWit...
{ "created": "10/18/2016 8:47:13 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 71227768, "size": null, "stargazer_count": null, "stars": 28, "updates": "2020-01-22T10:05:14+00:00", "url": "https://github.com/voyages-sncf-tec...
71227768_9
{ "fields": [], "file": "core/domain/src/test/java/org/hesperides/core/domain/templatecontainers/entities/PropertyTest.java", "identifier": "PropertyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testExtractProperty() {\n\n //Cas nominaux\n\n assertProperty(new Property(\" named property \", \"named property\", false, \"\", \"\", \"\", false),\n Property.extractProperty(\" named property \"));\n\n assertProperty(new Property(\"required prop...
{ "fields": [ { "declarator": "mustacheContent", "modifier": "", "original_string": "String mustacheContent;", "type": "String", "var_name": "mustacheContent" }, { "declarator": "isRequired", "modifier": "", "original_string": "boolean isRequired;", "t...
{ "body": "public static Property extractProperty(String propertyDefinition) {\n Property property = null;\n if (propertyDefinition != null) {\n String[] propertyAttributes = propertyDefinition.split(PIPE_REGEX, 2);\n\n String name = propertyAttributes[NAME_INDEX].trim();\n ...
{ "created": "10/18/2016 8:47:13 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 71227768, "size": null, "stargazer_count": null, "stars": 28, "updates": "2020-01-22T10:05:14+00:00", "url": "https://github.com/voyages-sncf-tec...
71227768_5
{ "fields": [ { "declarator": "TEST_GROUPS_TREE_CACHE_NAME = \"test-authorization-groups-tree\"", "modifier": "static final", "original_string": "static final String TEST_GROUPS_TREE_CACHE_NAME = \"test-authorization-groups-tree\";", "type": "String", "var_name": "TEST_GROUPS_TREE_CA...
{ "body": "@Test\n public void testWithSingleParent() {\n String dummyGroupDN = \"CN=DUMMY\";\n String parentGroupDN = \"CN=PARENT\";\n parentGroupsTree.put(dummyGroupDN, new HashSet<>(Collections.singletonList(parentGroupDN)));\n\n Set<String> expected = new HashSet<>(Arrays.asList(dum...
{ "fields": [ { "declarator": "MAX_RECURSION = 1000", "modifier": "static final", "original_string": "static final int MAX_RECURSION = 1000;", "type": "int", "var_name": "MAX_RECURSION" }, { "declarator": "cache", "modifier": "private final", "original_strin...
{ "body": "public Set<String> retrieveParentGroups(String initialGroupDN) {\n Set<String> allParentGroups = new HashSet<>();\n Set<String> groupDNsAtCurrentLevel = Collections.singleton(initialGroupDN);\n int ancestorLevel;\n for (ancestorLevel = 1; ancestorLevel < MAX_RECURSION; ancestorL...
{ "created": "10/18/2016 8:47:13 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 71227768, "size": null, "stargazer_count": null, "stars": 28, "updates": "2020-01-22T10:05:14+00:00", "url": "https://github.com/voyages-sncf-tec...
71227768_4
{ "fields": [ { "declarator": "TEST_GROUPS_TREE_CACHE_NAME = \"test-authorization-groups-tree\"", "modifier": "static final", "original_string": "static final String TEST_GROUPS_TREE_CACHE_NAME = \"test-authorization-groups-tree\";", "type": "String", "var_name": "TEST_GROUPS_TREE_CA...
{ "body": "@Test\n public void testWithFailingFallback() throws InterruptedException {\n String dummyGroupDN = \"CN=DUMMY\";\n Set<String> expected = Collections.singleton(dummyGroupDN);\n\n assertEquals(expected, cachedParentLdapGroupAuthorityRetriever.retrieveParentGroups(dummyGroupDN));\n ...
{ "fields": [ { "declarator": "MAX_RECURSION = 1000", "modifier": "static final", "original_string": "static final int MAX_RECURSION = 1000;", "type": "int", "var_name": "MAX_RECURSION" }, { "declarator": "cache", "modifier": "private final", "original_strin...
{ "body": "public Set<String> retrieveParentGroups(String initialGroupDN) {\n Set<String> allParentGroups = new HashSet<>();\n Set<String> groupDNsAtCurrentLevel = Collections.singleton(initialGroupDN);\n int ancestorLevel;\n for (ancestorLevel = 1; ancestorLevel < MAX_RECURSION; ancestorL...
{ "created": "10/18/2016 8:47:13 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 71227768, "size": null, "stargazer_count": null, "stars": 28, "updates": "2020-01-22T10:05:14+00:00", "url": "https://github.com/voyages-sncf-tec...
71227768_13
{ "fields": [], "file": "core/domain/src/test/java/org/hesperides/core/domain/templatecontainers/entities/PropertyTest.java", "identifier": "PropertyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void legacyAntislashes() {\n\n assertProperty(new Property(\"antislash|\\\"\\\\\\\\u\\\"\", \"antislash\", false, \"\\\"\\\\\\\\u\\\"\", \"\", \"\", false),\n Property.extractProperty(\"antislash|\\\"\\\\\\\\u\\\"\"));\n\n assertProperty(new Property(\"antisla...
{ "fields": [ { "declarator": "mustacheContent", "modifier": "", "original_string": "String mustacheContent;", "type": "String", "var_name": "mustacheContent" }, { "declarator": "isRequired", "modifier": "", "original_string": "boolean isRequired;", "t...
{ "body": "public static Property extractProperty(String propertyDefinition) {\n Property property = null;\n if (propertyDefinition != null) {\n String[] propertyAttributes = propertyDefinition.split(PIPE_REGEX, 2);\n\n String name = propertyAttributes[NAME_INDEX].trim();\n ...
{ "created": "10/18/2016 8:47:13 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 71227768, "size": null, "stargazer_count": null, "stars": 28, "updates": "2020-01-22T10:05:14+00:00", "url": "https://github.com/voyages-sncf-tec...
71227768_8
{ "fields": [], "file": "core/domain/src/test/java/org/hesperides/core/domain/platforms/entities/PlatformTest.java", "identifier": "PlatformTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = DuplicateDeployedModuleIdException.class)\n public void testValidatingDeployedModulesIdenticalIds() {\n new Platform(null, null, true, null, Arrays.asList(\n buildDeployedModuleWithId(null),\n buildDeployedModuleWithId(1L),\n buildDepl...
{ "fields": [ { "declarator": "GLOBAL_PROPERTIES_PATH = \"#\"", "modifier": "public static final", "original_string": "public static final String GLOBAL_PROPERTIES_PATH = \"#\";", "type": "String", "var_name": "GLOBAL_PROPERTIES_PATH" }, { "declarator": "key", "mo...
{ "body": "public Platform validateDeployedModulesDistinctIds() {\n if (deployedModules != null) {\n long nbIds = deployedModules.stream().filter(DeployedModule::isActiveModule).map(DeployedModule::getId).count();\n long nbDistinctIds = deployedModules.stream().filter(DeployedModule::isAc...
{ "created": "10/18/2016 8:47:13 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 71227768, "size": null, "stargazer_count": null, "stars": 28, "updates": "2020-01-22T10:05:14+00:00", "url": "https://github.com/voyages-sncf-tec...
71227768_18
{ "fields": [], "file": "core/domain/src/test/java/org/hesperides/core/domain/files/InstanceFileViewTest.java", "identifier": "InstanceFileViewTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testBuildLegacyFileLocation() {\n assertEquals(\"location/filename\", buildLegacyFileLocation(\"location\", \"filename\"));\n assertEquals(\"location//filename\", buildLegacyFileLocation(\"location/\", \"filename\"));\n assertEquals(\"location//filename\", buildL...
{ "fields": [ { "declarator": "name", "modifier": "", "original_string": "String name;", "type": "String", "var_name": "name" }, { "declarator": "filename", "modifier": "", "original_string": "String filename;", "type": "String", "var_name": "fil...
{ "body": "static String buildLegacyFileLocation(String location, String filename) {\n return location + \"/\" + filename;\n }", "class_method_signature": "InstanceFileView.buildLegacyFileLocation(String location, String filename)", "constructor": false, "full_signature": "static String buildLegacyFil...
{ "created": "10/18/2016 8:47:13 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 71227768, "size": null, "stargazer_count": null, "stars": 28, "updates": "2020-01-22T10:05:14+00:00", "url": "https://github.com/voyages-sncf-tec...
71227768_3
{ "fields": [], "file": "core/application/src/test/java/org/hesperides/core/application/files/FileUseCasesTest.java", "identifier": "FileUseCasesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(timeout = 1000)\n public void testValorizeWithModuleAndGlobalAndInstanceProperties() {\n // Cas observé : plateforme = ~ 15 globals + 1-4 instance properties + 32 deployedModules avec valued properties : 28 in range 1-45 + 4 in range 200-400\n // répartition des valorisations de prop...
{ "fields": [ { "declarator": "platformQueries", "modifier": "private final", "original_string": "private final PlatformQueries platformQueries;", "type": "PlatformQueries", "var_name": "platformQueries" }, { "declarator": "moduleQueries", "modifier": "private fin...
{ "body": "static String valorizeWithModuleAndGlobalAndInstanceProperties(String input,\n PlatformView platform,\n String modulePath,\n ...
{ "created": "10/18/2016 8:47:13 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 71227768, "size": null, "stargazer_count": null, "stars": 28, "updates": "2020-01-22T10:05:14+00:00", "url": "https://github.com/voyages-sncf-tec...
71227768_14
{ "fields": [], "file": "core/domain/src/test/java/org/hesperides/core/domain/templatecontainers/entities/PropertyTest.java", "identifier": "PropertyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testStartsWithKnownAnnotation() {\n assertEquals(true, Property.startsWithKnownAnnotation(\"@required\"));\n assertEquals(true, Property.startsWithKnownAnnotation(\" @comment x\"));\n assertEquals(true, Property.startsWithKnownAnnotation(\"@default 12\"));\n ...
{ "fields": [ { "declarator": "mustacheContent", "modifier": "", "original_string": "String mustacheContent;", "type": "String", "var_name": "mustacheContent" }, { "declarator": "isRequired", "modifier": "", "original_string": "boolean isRequired;", "t...
{ "body": "static boolean startsWithKnownAnnotation(String value) {\n return value\n .trim()\n .toLowerCase()\n // On met un espace après comment, default et pattern pour résoudre le problème de diff décrit dans l'issue 307\n .matches(\"^(@required|@c...
{ "created": "10/18/2016 8:47:13 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 71227768, "size": null, "stargazer_count": null, "stars": 28, "updates": "2020-01-22T10:05:14+00:00", "url": "https://github.com/voyages-sncf-tec...