<commit_before>[[functional:Default]]
[role=group,includesConstraints="functional:Cycles", includesConcepts="functional:Slice, functional:SliceDependency.graphml, functional:ExistingRelations"]
== Functional Slices Rules

The program is splittet into the following slices
- "admin"
- "converter"
- "document"
- "zeugnis",
- "zeugnisconfig"
- "stammdaten"
- "calendar"
Which could be referenced from top to bottom.

[[functional:Slice]]
.Create the node `Slice`.
[source,cypher,role=concept,requiresConcepts="structure:RootPackage"]
----
MATCH (artifact:Artifact)
WHERE
   artifact.type <> "test-jar"
MATCH
  (artifact:Artifact)-[:CONTAINS]->(root:Package{fqn:"net.sf.sze.dao.api"})-[:CONTAINS]->(slice:Package)
WITH COLLECT(slice) AS rows1
MATCH
  (artifact:Artifact)-[:CONTAINS]->(root:Package{fqn:"net.sf.sze.frontend"})-[:CONTAINS]->(slice:Package)
WITH rows1 + COLLECT(slice) AS rows2
MATCH
  (artifact:Artifact)-[:CONTAINS]->(root:Package{fqn:"net.sf.sze.service"})-[:CONTAINS *2..2]->(slice:Package)
WITH rows2 + COLLECT(slice) AS rows3
UNWIND rows3 AS slice
MERGE (sn:Slice{name:slice.name})
MERGE (sn)-[:SLICE_CONTAINS]-> (slice)
RETURN
  sn
----

[[functional:ExistingRelations]]
.Adds the relation `SLICE_USE` for all Slices which contains classes which depends on each other. Add the information `allowed`, `count` (nr of dependencies), `dependencies`.
[source,cypher,role=concept,requiresConcepts="functional:Slice"]
----
MATCH
    (L1:Slice)-[]->()-[:CONTAINS*]->(t1:Type),
    (L2:Slice)-[]->()-[:CONTAINS*]->(t2:Type),
    (t1)-[:DEPENDS_ON]->(t2)
WHERE L1.name <> L2.name<commit_msg>Label Artifact und property fqn ergänzt, damit die Knoten bezeichnet werden.<commit_after>[[functional:Default]]
[role=group,includesConstraints="functional:Cycles", includesConcepts="functional:Slice, functional:SliceDependency.graphml, functional:ExistingRelations"]
== Functional Slices Rules

The program is splittet into the following slices
- "admin"
- "converter"
- "document"
- "zeugnis",
- "zeugnisconfig"
- "stammdaten"
- "calendar"
Which could be referenced from top to bottom.

[[functional:Slice]]
.Create the node `Slice`.
[source,cypher,role=concept,requiresConcepts="structure:RootPackage"]
----
MATCH (artifact:Artifact)
WHERE
   artifact.type <> "test-jar"
MATCH
  (artifact:Artifact)-[:CONTAINS]->(root:Package{fqn:"net.sf.sze.dao.api"})-[:CONTAINS]->(slice:Package)
WITH COLLECT(slice) AS rows1
MATCH
  (artifact:Artifact)-[:CONTAINS]->(root:Package{fqn:"net.sf.sze.frontend"})-[:CONTAINS]->(slice:Package)
WITH rows1 + COLLECT(slice) AS rows2
MATCH
  (artifact:Artifact)-[:CONTAINS]->(root:Package{fqn:"net.sf.sze.service"})-[:CONTAINS *2..2]->(slice:Package)
WITH rows2 + COLLECT(slice) AS rows3
UNWIND rows3 AS slice
MERGE (sn:Artifact:Slice{name:slice.name, fqn:slice.name})
MERGE (sn)-[:SLICE_CONTAINS]-> (slice)
RETURN
  sn
----

[[functional:ExistingRelations]]
.Adds the relation `SLICE_USE` for all Slices which contains classes which depends on each other. Add the information `allowed`, `count` (nr of dependencies), `dependencies`.
[source,cypher,role=concept,requiresConcepts="functional:Slice"]
----
MATCH
    (L1:Slice)-[]->()-[:CONTAINS*]->(t1:Type),
    (L2:Slice)-[]->()-[:CONTAINS*]->(t2:Type),
    (t1)-[:DEPENDS_ON]->(t2)
WHERE L1.name <> L2.name
{'fraction_non_alphanumeric': 0.18015824710894704, 'fraction_numerical': 0.009738283627510651, 'mean_word_length': 6.4366515837104075, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3799868', 'n_tokens_mistral': 1213, 'n_tokens_neox': 1135, 'n_words': 224}