1
+ package generatedtest ;
2
+
3
+ import com .google .common .cache .Cache ;
4
+ import com .google .common .cache .LoadingCache ;
5
+ import com .google .common .collect .ImmutableMap ;
6
+ import java .util .Map ;
7
+ import java .util .concurrent .ConcurrentMap ;
8
+
9
+ // Test case generated by GenerateFlowTestCase.ql
10
+ public class Test {
11
+
12
+ Object getMapKey (Object container ) { return null ; }
13
+ Object getMapValue (Object container ) { return null ; }
14
+ Object newWithElement (Object element ) { return null ; }
15
+ Object newWithMapKey (Object element ) { return null ; }
16
+ Object newWithMapValue (Object element ) { return null ; }
17
+ Object source () { return null ; }
18
+ void sink (Object o ) { }
19
+
20
+ public void test () throws Exception {
21
+
22
+ {
23
+ // "com.google.common.cache;Cache;true;asMap;();;MapKey of Argument[-1];MapKey of ReturnValue;value"
24
+ ConcurrentMap out = null ;
25
+ LoadingCache in = (LoadingCache )newWithMapKey (source ());
26
+ out = in .asMap ();
27
+ sink (getMapKey (out )); // $ hasValueFlow
28
+ }
29
+ {
30
+ // "com.google.common.cache;Cache;true;asMap;();;MapKey of Argument[-1];MapKey of ReturnValue;value"
31
+ ConcurrentMap out = null ;
32
+ Cache in = (Cache )newWithMapKey (source ());
33
+ out = in .asMap ();
34
+ sink (getMapKey (out )); // $ hasValueFlow
35
+ }
36
+ {
37
+ // "com.google.common.cache;Cache;true;asMap;();;MapValue of Argument[-1];MapValue of ReturnValue;value"
38
+ ConcurrentMap out = null ;
39
+ LoadingCache in = (LoadingCache )newWithMapValue (source ());
40
+ out = in .asMap ();
41
+ sink (getMapValue (out )); // $ hasValueFlow
42
+ }
43
+ {
44
+ // "com.google.common.cache;Cache;true;asMap;();;MapValue of Argument[-1];MapValue of ReturnValue;value"
45
+ ConcurrentMap out = null ;
46
+ Cache in = (Cache )newWithMapValue (source ());
47
+ out = in .asMap ();
48
+ sink (getMapValue (out )); // $ hasValueFlow
49
+ }
50
+ {
51
+ // "com.google.common.cache;Cache;true;get;(Object,Callable);;MapValue of Argument[-1];ReturnValue;value"
52
+ Object out = null ;
53
+ Cache in = (Cache )newWithMapValue (source ());
54
+ out = in .get (null , null );
55
+ sink (out ); // $ hasValueFlow
56
+ }
57
+ {
58
+ // "com.google.common.cache;Cache;true;getAllPresent;(Iterable);;MapValue of Argument[-1];MapValue of ReturnValue;value"
59
+ ImmutableMap out = null ;
60
+ Cache in = (Cache )newWithMapValue (source ());
61
+ out = in .getAllPresent (null );
62
+ sink (getMapValue (out )); // $ hasValueFlow
63
+ }
64
+ {
65
+ // "com.google.common.cache;Cache;true;getIfPresent;(Object);;MapValue of Argument[-1];ReturnValue;value"
66
+ Object out = null ;
67
+ Cache in = (Cache )newWithMapValue (source ());
68
+ out = in .getIfPresent (null );
69
+ sink (out ); // $ hasValueFlow
70
+ }
71
+ {
72
+ // "com.google.common.cache;Cache;true;put;(Object,Object);;Argument[0];MapKey of Argument[-1];value"
73
+ Cache out = null ;
74
+ Object in = (Object )source ();
75
+ out .put (in , null );
76
+ sink (getMapKey (out )); // $ hasValueFlow
77
+ }
78
+ {
79
+ // "com.google.common.cache;Cache;true;put;(Object,Object);;Argument[1];MapValue of Argument[-1];value"
80
+ Cache out = null ;
81
+ Object in = (Object )source ();
82
+ out .put (null , in );
83
+ sink (getMapValue (out )); // $ hasValueFlow
84
+ }
85
+ {
86
+ // "com.google.common.cache;Cache;true;putAll;(Map);;MapKey of Argument[0];MapKey of Argument[-1];value"
87
+ Cache out = null ;
88
+ Map in = (Map )newWithMapKey (source ());
89
+ out .putAll (in );
90
+ sink (getMapKey (out )); // $ hasValueFlow
91
+ }
92
+ {
93
+ // "com.google.common.cache;Cache;true;putAll;(Map);;MapValue of Argument[0];MapValue of Argument[-1];value"
94
+ Cache out = null ;
95
+ Map in = (Map )newWithMapValue (source ());
96
+ out .putAll (in );
97
+ sink (getMapValue (out )); // $ hasValueFlow
98
+ }
99
+ {
100
+ // "com.google.common.cache;LoadingCache;true;apply;(Object);;MapValue of Argument[-1];ReturnValue;value"
101
+ Object out = null ;
102
+ LoadingCache in = (LoadingCache )newWithMapValue (source ());
103
+ out = in .apply (null );
104
+ sink (out ); // $ hasValueFlow
105
+ }
106
+ {
107
+ // "com.google.common.cache;LoadingCache;true;get;(Object);;MapValue of Argument[-1];ReturnValue;value"
108
+ Object out = null ;
109
+ LoadingCache in = (LoadingCache )newWithMapValue (source ());
110
+ out = in .get (null );
111
+ sink (out ); // $ hasValueFlow
112
+ }
113
+ {
114
+ // "com.google.common.cache;LoadingCache;true;getAll;(Iterable);;Element of Argument[0];MapKey of ReturnValue;value"
115
+ ImmutableMap out = null ;
116
+ Iterable in = (Iterable )newWithElement (source ());
117
+ LoadingCache instance = null ;
118
+ out = instance .getAll (in );
119
+ sink (getMapKey (out )); // $ hasValueFlow
120
+ }
121
+ {
122
+ // "com.google.common.cache;LoadingCache;true;getAll;(Iterable);;MapValue of Argument[-1];MapValue of ReturnValue;value"
123
+ ImmutableMap out = null ;
124
+ LoadingCache in = (LoadingCache )newWithMapValue (source ());
125
+ out = in .getAll (null );
126
+ sink (getMapValue (out )); // $ hasValueFlow
127
+ }
128
+ {
129
+ // "com.google.common.cache;LoadingCache;true;getUnchecked;(Object);;MapValue of Argument[-1];ReturnValue;value"
130
+ Object out = null ;
131
+ LoadingCache in = (LoadingCache )newWithMapValue (source ());
132
+ out = in .getUnchecked (null );
133
+ sink (out ); // $ hasValueFlow
134
+ }
135
+
136
+ }
137
+
138
+ }
0 commit comments