diff options
Diffstat (limited to 'Domains/github-graph/bin/queries')
15 files changed, 114 insertions, 2 deletions
diff --git a/Domains/github-graph/bin/queries/.CheckAction.java._trace b/Domains/github-graph/bin/queries/.CheckAction.java._trace new file mode 100644 index 00000000..fe2295bf --- /dev/null +++ b/Domains/github-graph/bin/queries/.CheckAction.java._trace | |||
Binary files differ | |||
diff --git a/Domains/github-graph/bin/queries/.CheckUserAction.java._trace b/Domains/github-graph/bin/queries/.CheckUserAction.java._trace new file mode 100644 index 00000000..a050dc45 --- /dev/null +++ b/Domains/github-graph/bin/queries/.CheckUserAction.java._trace | |||
Binary files differ | |||
diff --git a/Domains/github-graph/bin/queries/.Committer.java._trace b/Domains/github-graph/bin/queries/.Committer.java._trace new file mode 100644 index 00000000..763f332c --- /dev/null +++ b/Domains/github-graph/bin/queries/.Committer.java._trace | |||
Binary files differ | |||
diff --git a/Domains/github-graph/bin/queries/.ConsecutiveClosesWithoutReopen.java._trace b/Domains/github-graph/bin/queries/.ConsecutiveClosesWithoutReopen.java._trace new file mode 100644 index 00000000..ab0463a3 --- /dev/null +++ b/Domains/github-graph/bin/queries/.ConsecutiveClosesWithoutReopen.java._trace | |||
Binary files differ | |||
diff --git a/Domains/github-graph/bin/queries/.ConsecutiveReopensWithoutClose.java._trace b/Domains/github-graph/bin/queries/.ConsecutiveReopensWithoutClose.java._trace new file mode 100644 index 00000000..62ed7508 --- /dev/null +++ b/Domains/github-graph/bin/queries/.ConsecutiveReopensWithoutClose.java._trace | |||
Binary files differ | |||
diff --git a/Domains/github-graph/bin/queries/.ConsecutiveSubWithoutUnSub.java._trace b/Domains/github-graph/bin/queries/.ConsecutiveSubWithoutUnSub.java._trace new file mode 100644 index 00000000..e1bbd189 --- /dev/null +++ b/Domains/github-graph/bin/queries/.ConsecutiveSubWithoutUnSub.java._trace | |||
Binary files differ | |||
diff --git a/Domains/github-graph/bin/queries/.ConsecutiveUnSubWithoutSub.java._trace b/Domains/github-graph/bin/queries/.ConsecutiveUnSubWithoutSub.java._trace new file mode 100644 index 00000000..ebd0a1e3 --- /dev/null +++ b/Domains/github-graph/bin/queries/.ConsecutiveUnSubWithoutSub.java._trace | |||
Binary files differ | |||
diff --git a/Domains/github-graph/bin/queries/.EventUser.java._trace b/Domains/github-graph/bin/queries/.EventUser.java._trace new file mode 100644 index 00000000..0fe22159 --- /dev/null +++ b/Domains/github-graph/bin/queries/.EventUser.java._trace | |||
Binary files differ | |||
diff --git a/Domains/github-graph/bin/queries/.IsClose.java._trace b/Domains/github-graph/bin/queries/.IsClose.java._trace new file mode 100644 index 00000000..c3bb3738 --- /dev/null +++ b/Domains/github-graph/bin/queries/.IsClose.java._trace | |||
Binary files differ | |||
diff --git a/Domains/github-graph/bin/queries/.IsReopen.java._trace b/Domains/github-graph/bin/queries/.IsReopen.java._trace new file mode 100644 index 00000000..592d4d12 --- /dev/null +++ b/Domains/github-graph/bin/queries/.IsReopen.java._trace | |||
Binary files differ | |||
diff --git a/Domains/github-graph/bin/queries/.IsSubscribe.java._trace b/Domains/github-graph/bin/queries/.IsSubscribe.java._trace new file mode 100644 index 00000000..1b8a39fb --- /dev/null +++ b/Domains/github-graph/bin/queries/.IsSubscribe.java._trace | |||
Binary files differ | |||
diff --git a/Domains/github-graph/bin/queries/.IsUnSubscribe.java._trace b/Domains/github-graph/bin/queries/.IsUnSubscribe.java._trace new file mode 100644 index 00000000..21db9f95 --- /dev/null +++ b/Domains/github-graph/bin/queries/.IsUnSubscribe.java._trace | |||
Binary files differ | |||
diff --git a/Domains/github-graph/bin/queries/.NoCommitter.java._trace b/Domains/github-graph/bin/queries/.NoCommitter.java._trace new file mode 100644 index 00000000..bfc00069 --- /dev/null +++ b/Domains/github-graph/bin/queries/.NoCommitter.java._trace | |||
Binary files differ | |||
diff --git a/Domains/github-graph/bin/queries/.NoUser.java._trace b/Domains/github-graph/bin/queries/.NoUser.java._trace new file mode 100644 index 00000000..0ecef3e3 --- /dev/null +++ b/Domains/github-graph/bin/queries/.NoUser.java._trace | |||
Binary files differ | |||
diff --git a/Domains/github-graph/bin/queries/github.vql b/Domains/github-graph/bin/queries/github.vql index 62853b3f..a8c68f0a 100644 --- a/Domains/github-graph/bin/queries/github.vql +++ b/Domains/github-graph/bin/queries/github.vql | |||
@@ -6,14 +6,126 @@ pattern directParent(a : Commit, b: Commit) { | |||
6 | } | 6 | } |
7 | 7 | ||
8 | @Constraint(key={a}, severity="error", message="error") | 8 | @Constraint(key={a}, severity="error", message="error") |
9 | pattern loopInParent(a){ | 9 | pattern loopInParent(a: Commit){ |
10 | find directParent+(a,a); | 10 | find directParent+(a,a); |
11 | } | 11 | } |
12 | 12 | ||
13 | pattern checkAction(i: Issue, e: IssueEvent, t: Action) { | ||
14 | Issue.issueevent(i, e); | ||
15 | IssueEvent.action(e, t); | ||
16 | a == t; | ||
17 | } | ||
18 | |||
19 | pattern checkUserAction(i: Issue, u: User, e: IssueEvent, t: Action) { | ||
20 | Issue.issueevent(i, e); | ||
21 | IssueEvent.user(e, u); | ||
22 | IssueEvent.action(e, a); | ||
23 | a == t; | ||
24 | } | ||
25 | |||
26 | pattern isReopen(i: Issue, e: IssueEvent) { | ||
27 | Issue.issueevent(i, e); | ||
28 | IssueEvent.action(e, a); | ||
29 | a == Action::REOPENED; | ||
30 | } | ||
31 | |||
32 | pattern isClose(i: Issue, e: IssueEvent) { | ||
33 | Issue.issueevent(i, e); | ||
34 | IssueEvent.action(e, a); | ||
35 | a == Action::CLOSED; | ||
36 | } | ||
37 | |||
38 | pattern isUnSubscribe(i: Issue, u: User, e: IssueEvent) { | ||
39 | Issue.issueevent(i, e); | ||
40 | IssueEvent.user(e, u); | ||
41 | IssueEvent.action(e, a); | ||
42 | a == Action::UNSUBSCRIBED; | ||
43 | } | ||
44 | |||
45 | pattern isSubscribe(i: Issue, u: User, e: IssueEvent) { | ||
46 | Issue.issueevent(i, e); | ||
47 | IssueEvent.user(e, u); | ||
48 | IssueEvent.action(e, a); | ||
49 | a == Action::SUBSCRIBED; | ||
50 | } | ||
51 | |||
52 | |||
53 | //pattern pullRequestOfIssue(i: Issue, pr: PullRequest) { | ||
54 | // Issue.pullrequest(i, pr); | ||
55 | //} | ||
56 | // | ||
57 | //@Constraint(key={i}, severity="error", message="error") | ||
58 | //pattern mergedIssueWithoutPr(i: Issue){ | ||
59 | // find checkAction(i, _, Action::MERGED); | ||
60 | // neg find pullRequestOfIssue(i, _); | ||
61 | //} | ||
62 | |||
63 | @Constraint(key={i}, severity="error", message="error") | ||
64 | pattern consecutiveClosesWithoutReopen(i: Issue) { | ||
65 | find checkAction(i, a1, Action::CLOSED); | ||
66 | find checkAction(i, a2, Action::CLOSED); | ||
67 | a1 != a2; | ||
68 | neg find isReopen(i, _); | ||
69 | } | ||
70 | |||
71 | |||
72 | @Constraint(key={i}, severity="error", message="error") | ||
73 | pattern consecutiveReopensWithoutClose(i: Issue) { | ||
74 | find checkAction(i, a1, Action::REOPENED); | ||
75 | find checkAction(i, a2, Action::REOPENED); | ||
76 | a1 != a2; | ||
77 | neg find isClose(i, _); | ||
78 | } | ||
79 | |||
80 | @Constraint(key={i, u}, severity="error", message="error") | ||
81 | pattern consecutiveSubWithoutUnSub(i: Issue, u: User) { | ||
82 | find checkUserAction(i, u, a1, Action::SUBSCRIBED); | ||
83 | find checkUserAction(i, u, a2, Action::SUBSCRIBED); | ||
84 | a1 != a2; | ||
85 | neg find isUnSubscribe(i, u, _); | ||
86 | } | ||
87 | |||
88 | @Constraint(key={i, u}, severity="error", message="error") | ||
89 | pattern consecutiveUnSubWithoutSub(i: Issue, u: User) { | ||
90 | find checkUserAction(i, u, a1, Action::UNSUBSCRIBED); | ||
91 | find checkUserAction(i, u, a2, Action::UNSUBSCRIBED); | ||
92 | a1 != a2; | ||
93 | neg find isSubscribe(i, u, _); | ||
94 | } | ||
95 | |||
96 | //pattern actionWithIssue(i: IssueEvent, a: Action) { | ||
97 | // IssueEvent.action(i, a); | ||
98 | //} | ||
99 | // | ||
100 | //@Constraint(key={i}, severity="error", message="error") | ||
101 | //pattern issueEventNoAction(i: IssueEvent) { | ||
102 | // neg find actionWithIssue(i, _); | ||
103 | //} | ||
104 | |||
105 | |||
106 | pattern committer(c: Commit, u:User) { | ||
107 | Commit.committer(c, u); | ||
108 | } | ||
109 | |||
110 | pattern eventUser(e: IssueEvent, u:User){ | ||
111 | IssueEvent.user(e, u); | ||
112 | } | ||
113 | |||
114 | @Constraint(key={c}, severity="error", message="error") | ||
115 | pattern noCommitter(c: Commit) { | ||
116 | neg find committer(c, _); | ||
117 | } | ||
118 | |||
119 | @Constraint(key={e}, severity="error", message="error") | ||
120 | pattern noUser(e: IssueEvent) { | ||
121 | neg find eventUser(e, _); | ||
122 | } | ||
123 | |||
124 | |||
13 | 125 | ||
14 | //1. issue with MERGED but no PullRequest | 126 | //1. issue with MERGED but no PullRequest |
15 | //2. issue with 2 CLOSED events without a REOPENED event | 127 | //2. issue with 2 CLOSED events without a REOPENED event |
16 | //3. issue with 2 REOPENED events without a CLOSED event | 128 | //3. issue with 2 REOPENED events without a CLOSED event |
17 | //4. user-issue pair with 2 SUBSCRIBED events without an UNSUBSCRIBED event | 129 | //4. user-issue pair with 2 SUBSCRIBED events without an UNSUBSCRIBED event |
18 | //5. user-issue pair with 2 UNSUBSCRIBED events without a SUBSCRIBED event | 130 | //5. user-issue pair with 2 UNSUBSCRIBED events without a SUBSCRIBED event |
19 | //6. User MERGED/CLOSED/REOPENED issue without being a projectMember of the Project \ No newline at end of file | 131 | //6. User MERGED/CLOSED/REOPENED issue without being a projectMember of the Project (Not possible under this condition) \ No newline at end of file |