File tree 4 files changed +11
-11
lines changed
java/ql/test/library-tests
python/ql/lib/semmle/python
4 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ class JaxRsTest extends InlineExpectationsTest {
55
55
or
56
56
tag = "ResourceMethodOnResourceClass" and
57
57
exists ( JaxRsResourceMethod resourceMethod |
58
- resourceMethod = any ( JaxRsResourceClass ResourceClass ) .getAResourceMethod ( )
58
+ resourceMethod = any ( JaxRsResourceClass resourceClass ) .getAResourceMethod ( )
59
59
|
60
60
resourceMethod .getLocation ( ) = location and
61
61
element = resourceMethod .toString ( ) and
Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ import semmle.code.java.Type
2
2
3
3
predicate typeIsInCU ( Type tpe , CompilationUnit cu ) { tpe .getCompilationUnit ( ) = cu }
4
4
5
- from Type tpe , CompilationUnit Ajava
5
+ from Type tpe , CompilationUnit aJava
6
6
where
7
- Ajava .hasName ( "A" ) and
8
- typeIsInCU ( tpe , Ajava )
7
+ aJava .hasName ( "A" ) and
8
+ typeIsInCU ( tpe , aJava )
9
9
select tpe
Original file line number Diff line number Diff line change @@ -27,9 +27,9 @@ class FunctionMetrics extends Function {
27
27
* P = the number of connected components, which for a single function is 1.
28
28
*/
29
29
int getCyclomaticComplexity ( ) {
30
- exists ( int E , int N |
31
- N = count ( BasicBlock b | b = this .getABasicBlock ( ) and b .likelyReachable ( ) ) and
32
- E =
30
+ exists ( int e , int n |
31
+ n = count ( BasicBlock b | b = this .getABasicBlock ( ) and b .likelyReachable ( ) ) and
32
+ e =
33
33
count ( BasicBlock b1 , BasicBlock b2 |
34
34
b1 = this .getABasicBlock ( ) and
35
35
b1 .likelyReachable ( ) and
@@ -39,7 +39,7 @@ class FunctionMetrics extends Function {
39
39
not b1 .unlikelySuccessor ( b2 )
40
40
)
41
41
|
42
- result = E - N + 2
42
+ result = e - n + 2
43
43
)
44
44
}
45
45
Original file line number Diff line number Diff line change @@ -18,9 +18,9 @@ predicate mapping_format(StrConst e) {
18
18
*/
19
19
20
20
private string conversion_specifier_string ( StrConst e , int number , int position ) {
21
- exists ( string s , string REGEX | s = e .getText ( ) |
22
- REGEX = "%(\\([^)]*\\))?[#0\\- +]*(\\*|[0-9]*)(\\.(\\*|[0-9]*))?(h|H|l|L)?[badiouxXeEfFgGcrs%]" and
23
- result = s .regexpFind ( REGEX , number , position )
21
+ exists ( string s , string regex | s = e .getText ( ) |
22
+ regex = "%(\\([^)]*\\))?[#0\\- +]*(\\*|[0-9]*)(\\.(\\*|[0-9]*))?(h|H|l|L)?[badiouxXeEfFgGcrs%]" and
23
+ result = s .regexpFind ( regex , number , position )
24
24
)
25
25
}
26
26
You can’t perform that action at this time.
0 commit comments