mirror of
https://github.com/github/codeql.git
synced 2026-04-23 07:45:17 +02:00
C#: Add data-flow test for collections
This commit is contained in:
229
csharp/ql/test/library-tests/dataflow/arrays/ArrayFlow.cs
Normal file
229
csharp/ql/test/library-tests/dataflow/arrays/ArrayFlow.cs
Normal file
@@ -0,0 +1,229 @@
|
||||
// semmle-extractor-options: /r:System.Linq.dll
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
public class A
|
||||
{
|
||||
public void M1()
|
||||
{
|
||||
var a = new A();
|
||||
var @as = new[] { a };
|
||||
Sink(@as[0]); // flow
|
||||
SinkElem(@as); // flow
|
||||
Sink(First(@as)); // flow
|
||||
}
|
||||
|
||||
public void M2(A other)
|
||||
{
|
||||
var a = new A();
|
||||
var @as = new[] { other };
|
||||
Sink(@as[0]); // no flow
|
||||
SinkElem(@as); // no flow
|
||||
Sink(First(@as)); // no flow
|
||||
}
|
||||
|
||||
public void M3()
|
||||
{
|
||||
var a = new A();
|
||||
var @as = new A[1];
|
||||
@as[0] = a;
|
||||
Sink(@as[0]); // flow
|
||||
SinkElem(@as); // flow
|
||||
Sink(First(@as)); // flow
|
||||
}
|
||||
|
||||
public void M4(A other)
|
||||
{
|
||||
var a = new A();
|
||||
var @as = new A[1];
|
||||
@as[0] = other;
|
||||
Sink(@as[0]); // no flow
|
||||
SinkElem(@as); // no flow
|
||||
Sink(First(@as)); // no flow
|
||||
}
|
||||
|
||||
public void M5()
|
||||
{
|
||||
var a = new A();
|
||||
var list = new List<A>();
|
||||
list[0] = a;
|
||||
Sink(list[0]); // flow
|
||||
SinkListElem(list); // flow
|
||||
Sink(ListFirst(list)); // flow
|
||||
}
|
||||
|
||||
public void M6(A other)
|
||||
{
|
||||
var list = new List<A>();
|
||||
list[0] = other;
|
||||
Sink(list[0]); // no flow
|
||||
SinkListElem(list); // no flow
|
||||
Sink(ListFirst(list)); // no flow
|
||||
}
|
||||
|
||||
public void M7()
|
||||
{
|
||||
var a = new A();
|
||||
var list = new List<A>() { a };
|
||||
Sink(list[0]); // flow
|
||||
SinkListElem(list); // flow
|
||||
Sink(ListFirst(list)); // flow
|
||||
}
|
||||
|
||||
public void M8(A other)
|
||||
{
|
||||
var list = new List<A>() { other };
|
||||
Sink(list[0]); // no flow
|
||||
SinkListElem(list); // no flow
|
||||
Sink(ListFirst(list)); // no flow
|
||||
}
|
||||
|
||||
public void M9()
|
||||
{
|
||||
var a = new A();
|
||||
var list = new List<A>();
|
||||
list.Add(a);
|
||||
Sink(list[0]); // flow
|
||||
SinkListElem(list); // flow
|
||||
Sink(ListFirst(list)); // flow
|
||||
}
|
||||
|
||||
public void M10(A other)
|
||||
{
|
||||
var list = new List<A>();
|
||||
list.Add(other);
|
||||
Sink(list[0]); // no flow
|
||||
SinkListElem(list); // no flow
|
||||
Sink(ListFirst(list)); // no flow
|
||||
}
|
||||
|
||||
public void M11()
|
||||
{
|
||||
var a = new A();
|
||||
var dict = new Dictionary<int, A>();
|
||||
dict[0] = a;
|
||||
Sink(dict[0]); // flow
|
||||
SinkDictValue(dict); // flow
|
||||
Sink(DictFirstValueA(dict)); // flow
|
||||
Sink(DictFirstValueB(dict)); // flow [MISSING]
|
||||
Sink(DictFirstValueC(dict)); // flow
|
||||
}
|
||||
|
||||
public void M12(A other)
|
||||
{
|
||||
var dict = new Dictionary<int, A>();
|
||||
dict[0] = other;
|
||||
Sink(dict[0]); // no flow
|
||||
SinkDictValue(dict); // no flow
|
||||
Sink(DictFirstValueA(dict)); // no flow
|
||||
Sink(DictFirstValueB(dict)); // no flow
|
||||
Sink(DictFirstValueC(dict)); // no flow
|
||||
}
|
||||
|
||||
public void M13()
|
||||
{
|
||||
var a = new A();
|
||||
var dict = new Dictionary<int, A>() { { 0, a } };
|
||||
Sink(dict[0]); // flow
|
||||
SinkDictValue(dict); // flow
|
||||
Sink(DictFirstValueA(dict)); // flow
|
||||
Sink(DictFirstValueB(dict)); // flow [MISSING]
|
||||
Sink(DictFirstValueC(dict)); // flow
|
||||
}
|
||||
|
||||
public void M14(A other)
|
||||
{
|
||||
var dict = new Dictionary<int, A>() { { 0, other } };
|
||||
Sink(dict[0]); // no flow
|
||||
SinkDictValue(dict); // no flow
|
||||
Sink(DictFirstValueA(dict)); // no flow
|
||||
Sink(DictFirstValueB(dict)); // no flow
|
||||
Sink(DictFirstValueC(dict)); // no flow
|
||||
}
|
||||
|
||||
public void M15()
|
||||
{
|
||||
var a = new A();
|
||||
var dict = new Dictionary<A, int>() { { a, 0 } };
|
||||
Sink(dict.Keys.First()); // flow [MISSING]
|
||||
SinkDictKey(dict); // flow [MISSING]
|
||||
Sink(DictFirstKeyA(dict)); // flow [MISSING]
|
||||
Sink(DictFirstKeyB(dict)); // flow [MISSING]
|
||||
}
|
||||
|
||||
public void M16(A other)
|
||||
{
|
||||
var dict = new Dictionary<A, int>() { { other, 0 } };
|
||||
Sink(dict.Keys.First()); // no flow
|
||||
SinkDictKey(dict); // no flow
|
||||
Sink(DictFirstKeyA(dict)); // no flow
|
||||
Sink(DictFirstKeyB(dict)); // no flow
|
||||
}
|
||||
|
||||
public void M17()
|
||||
{
|
||||
var a = new A();
|
||||
var @as = new[] { a };
|
||||
foreach (var x in @as)
|
||||
Sink(x); // flow
|
||||
}
|
||||
|
||||
public void M18(A other)
|
||||
{
|
||||
var @as = new[] { other };
|
||||
foreach (var x in @as)
|
||||
Sink(x); // no flow
|
||||
}
|
||||
|
||||
public void M19()
|
||||
{
|
||||
var a = new A();
|
||||
var @as = new[] { a };
|
||||
var enumerator = @as.GetEnumerator();
|
||||
while (enumerator.MoveNext())
|
||||
Sink(enumerator.Current); // flow
|
||||
}
|
||||
|
||||
public void M20(A other)
|
||||
{
|
||||
var @as = new[] { other };
|
||||
var enumerator = @as.GetEnumerator();
|
||||
while (enumerator.MoveNext())
|
||||
Sink(enumerator.Current); // no flow
|
||||
}
|
||||
|
||||
public void M21()
|
||||
{
|
||||
var a = new A();
|
||||
var list = new List<A>();
|
||||
list.Add(a);
|
||||
var enumerator = list.GetEnumerator();
|
||||
while (enumerator.MoveNext())
|
||||
Sink(enumerator.Current); // flow [MISSING]
|
||||
}
|
||||
|
||||
public static void Sink<T>(T t) { }
|
||||
|
||||
public static void SinkElem<T>(T[] ts) => Sink(ts[0]);
|
||||
|
||||
public static void SinkListElem<T>(IList<T> list) => Sink(list[0]);
|
||||
|
||||
public static void SinkDictValue<T>(IDictionary<int, T> dict) => Sink(dict[0]);
|
||||
|
||||
public static void SinkDictKey<T>(IDictionary<T, int> dict) => Sink(dict.Keys.First());
|
||||
|
||||
public static T First<T>(T[] ts) => ts[0];
|
||||
|
||||
public static T ListFirst<T>(IList<T> list) => list[0];
|
||||
|
||||
public static T DictFirstValueA<T>(IDictionary<int, T> dict) => dict[0];
|
||||
|
||||
public static T DictFirstValueB<T>(IDictionary<int, T> dict) => dict.First().Value;
|
||||
|
||||
public static T DictFirstValueC<T>(IDictionary<int, T> dict) => dict.Values.First();
|
||||
|
||||
public static T DictFirstKeyA<T>(IDictionary<T, int> dict) => dict.Keys.First();
|
||||
|
||||
public static T DictFirstKeyB<T>(IDictionary<T, int> dict) => dict.First().Key;
|
||||
}
|
||||
235
csharp/ql/test/library-tests/dataflow/arrays/ArrayFlow.expected
Normal file
235
csharp/ql/test/library-tests/dataflow/arrays/ArrayFlow.expected
Normal file
@@ -0,0 +1,235 @@
|
||||
edges
|
||||
| ArrayFlow.cs:10:17:10:23 | object creation of type A : A | ArrayFlow.cs:12:14:12:19 | access to array element |
|
||||
| ArrayFlow.cs:10:17:10:23 | object creation of type A : A | ArrayFlow.cs:13:18:13:20 | access to local variable as : A[] |
|
||||
| ArrayFlow.cs:10:17:10:23 | object creation of type A : A | ArrayFlow.cs:14:20:14:22 | access to local variable as : A[] |
|
||||
| ArrayFlow.cs:13:18:13:20 | access to local variable as : A[] | ArrayFlow.cs:208:40:208:41 | ts : A[] |
|
||||
| ArrayFlow.cs:14:20:14:22 | access to local variable as : A[] | ArrayFlow.cs:14:14:14:23 | call to method First |
|
||||
| ArrayFlow.cs:28:17:28:23 | object creation of type A : A | ArrayFlow.cs:31:14:31:19 | access to array element |
|
||||
| ArrayFlow.cs:28:17:28:23 | object creation of type A : A | ArrayFlow.cs:32:18:32:20 | access to local variable as : A[] |
|
||||
| ArrayFlow.cs:28:17:28:23 | object creation of type A : A | ArrayFlow.cs:33:20:33:22 | access to local variable as : A[] |
|
||||
| ArrayFlow.cs:32:18:32:20 | access to local variable as : A[] | ArrayFlow.cs:208:40:208:41 | ts : A[] |
|
||||
| ArrayFlow.cs:33:20:33:22 | access to local variable as : A[] | ArrayFlow.cs:33:14:33:23 | call to method First |
|
||||
| ArrayFlow.cs:48:17:48:23 | object creation of type A : A | ArrayFlow.cs:51:14:51:20 | access to indexer |
|
||||
| ArrayFlow.cs:48:17:48:23 | object creation of type A : A | ArrayFlow.cs:52:22:52:25 | access to local variable list : List<A> |
|
||||
| ArrayFlow.cs:48:17:48:23 | object creation of type A : A | ArrayFlow.cs:53:24:53:27 | access to local variable list : List<A> |
|
||||
| ArrayFlow.cs:49:20:49:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:51:14:51:20 | access to indexer |
|
||||
| ArrayFlow.cs:49:20:49:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:52:22:52:25 | access to local variable list : List<A> |
|
||||
| ArrayFlow.cs:49:20:49:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:53:24:53:27 | access to local variable list : List<A> |
|
||||
| ArrayFlow.cs:52:22:52:25 | access to local variable list : List<A> | ArrayFlow.cs:210:49:210:52 | list : List<A> |
|
||||
| ArrayFlow.cs:53:24:53:27 | access to local variable list : List<A> | ArrayFlow.cs:53:14:53:28 | call to method ListFirst |
|
||||
| ArrayFlow.cs:58:20:58:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:60:14:60:20 | access to indexer |
|
||||
| ArrayFlow.cs:58:20:58:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:61:22:61:25 | access to local variable list : List<A> |
|
||||
| ArrayFlow.cs:58:20:58:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:62:24:62:27 | access to local variable list : List<A> |
|
||||
| ArrayFlow.cs:61:22:61:25 | access to local variable list : List<A> | ArrayFlow.cs:210:49:210:52 | list : List<A> |
|
||||
| ArrayFlow.cs:62:24:62:27 | access to local variable list : List<A> | ArrayFlow.cs:62:14:62:28 | call to method ListFirst |
|
||||
| ArrayFlow.cs:67:17:67:23 | object creation of type A : A | ArrayFlow.cs:69:14:69:20 | access to indexer |
|
||||
| ArrayFlow.cs:67:17:67:23 | object creation of type A : A | ArrayFlow.cs:70:22:70:25 | access to local variable list : List<A> |
|
||||
| ArrayFlow.cs:67:17:67:23 | object creation of type A : A | ArrayFlow.cs:71:24:71:27 | access to local variable list : List<A> |
|
||||
| ArrayFlow.cs:68:20:68:38 | object creation of type List<A> : List<A> | ArrayFlow.cs:69:14:69:20 | access to indexer |
|
||||
| ArrayFlow.cs:68:20:68:38 | object creation of type List<A> : List<A> | ArrayFlow.cs:70:22:70:25 | access to local variable list : List<A> |
|
||||
| ArrayFlow.cs:68:20:68:38 | object creation of type List<A> : List<A> | ArrayFlow.cs:71:24:71:27 | access to local variable list : List<A> |
|
||||
| ArrayFlow.cs:70:22:70:25 | access to local variable list : List<A> | ArrayFlow.cs:210:49:210:52 | list : List<A> |
|
||||
| ArrayFlow.cs:71:24:71:27 | access to local variable list : List<A> | ArrayFlow.cs:71:14:71:28 | call to method ListFirst |
|
||||
| ArrayFlow.cs:76:20:76:42 | object creation of type List<A> : List<A> | ArrayFlow.cs:77:14:77:20 | access to indexer |
|
||||
| ArrayFlow.cs:76:20:76:42 | object creation of type List<A> : List<A> | ArrayFlow.cs:78:22:78:25 | access to local variable list : List<A> |
|
||||
| ArrayFlow.cs:76:20:76:42 | object creation of type List<A> : List<A> | ArrayFlow.cs:79:24:79:27 | access to local variable list : List<A> |
|
||||
| ArrayFlow.cs:78:22:78:25 | access to local variable list : List<A> | ArrayFlow.cs:210:49:210:52 | list : List<A> |
|
||||
| ArrayFlow.cs:79:24:79:27 | access to local variable list : List<A> | ArrayFlow.cs:79:14:79:28 | call to method ListFirst |
|
||||
| ArrayFlow.cs:84:17:84:23 | object creation of type A : A | ArrayFlow.cs:87:14:87:20 | access to indexer |
|
||||
| ArrayFlow.cs:84:17:84:23 | object creation of type A : A | ArrayFlow.cs:88:22:88:25 | access to local variable list : List<A> |
|
||||
| ArrayFlow.cs:84:17:84:23 | object creation of type A : A | ArrayFlow.cs:89:24:89:27 | access to local variable list : List<A> |
|
||||
| ArrayFlow.cs:85:20:85:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:87:14:87:20 | access to indexer |
|
||||
| ArrayFlow.cs:85:20:85:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:88:22:88:25 | access to local variable list : List<A> |
|
||||
| ArrayFlow.cs:85:20:85:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:89:24:89:27 | access to local variable list : List<A> |
|
||||
| ArrayFlow.cs:88:22:88:25 | access to local variable list : List<A> | ArrayFlow.cs:210:49:210:52 | list : List<A> |
|
||||
| ArrayFlow.cs:89:24:89:27 | access to local variable list : List<A> | ArrayFlow.cs:89:14:89:28 | call to method ListFirst |
|
||||
| ArrayFlow.cs:94:20:94:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:96:14:96:20 | access to indexer |
|
||||
| ArrayFlow.cs:94:20:94:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:97:22:97:25 | access to local variable list : List<A> |
|
||||
| ArrayFlow.cs:94:20:94:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:98:24:98:27 | access to local variable list : List<A> |
|
||||
| ArrayFlow.cs:97:22:97:25 | access to local variable list : List<A> | ArrayFlow.cs:210:49:210:52 | list : List<A> |
|
||||
| ArrayFlow.cs:98:24:98:27 | access to local variable list : List<A> | ArrayFlow.cs:98:14:98:28 | call to method ListFirst |
|
||||
| ArrayFlow.cs:103:17:103:23 | object creation of type A : A | ArrayFlow.cs:106:14:106:20 | access to indexer |
|
||||
| ArrayFlow.cs:103:17:103:23 | object creation of type A : A | ArrayFlow.cs:107:23:107:26 | access to local variable dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:103:17:103:23 | object creation of type A : A | ArrayFlow.cs:108:30:108:33 | access to local variable dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:103:17:103:23 | object creation of type A : A | ArrayFlow.cs:110:30:110:33 | access to local variable dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:104:20:104:43 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:106:14:106:20 | access to indexer |
|
||||
| ArrayFlow.cs:104:20:104:43 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:107:23:107:26 | access to local variable dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:104:20:104:43 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:108:30:108:33 | access to local variable dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:104:20:104:43 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:110:30:110:33 | access to local variable dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:107:23:107:26 | access to local variable dict : Dictionary<Int32,A> | ArrayFlow.cs:212:61:212:64 | dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:108:30:108:33 | access to local variable dict : Dictionary<Int32,A> | ArrayFlow.cs:108:14:108:34 | call to method DictFirstValueA |
|
||||
| ArrayFlow.cs:110:30:110:33 | access to local variable dict : Dictionary<Int32,A> | ArrayFlow.cs:110:14:110:34 | call to method DictFirstValueC |
|
||||
| ArrayFlow.cs:115:20:115:43 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:117:14:117:20 | access to indexer |
|
||||
| ArrayFlow.cs:115:20:115:43 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:118:23:118:26 | access to local variable dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:115:20:115:43 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:119:30:119:33 | access to local variable dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:115:20:115:43 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:121:30:121:33 | access to local variable dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:118:23:118:26 | access to local variable dict : Dictionary<Int32,A> | ArrayFlow.cs:212:61:212:64 | dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:119:30:119:33 | access to local variable dict : Dictionary<Int32,A> | ArrayFlow.cs:119:14:119:34 | call to method DictFirstValueA |
|
||||
| ArrayFlow.cs:121:30:121:33 | access to local variable dict : Dictionary<Int32,A> | ArrayFlow.cs:121:14:121:34 | call to method DictFirstValueC |
|
||||
| ArrayFlow.cs:126:17:126:23 | object creation of type A : A | ArrayFlow.cs:128:14:128:20 | access to indexer |
|
||||
| ArrayFlow.cs:126:17:126:23 | object creation of type A : A | ArrayFlow.cs:129:23:129:26 | access to local variable dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:126:17:126:23 | object creation of type A : A | ArrayFlow.cs:130:30:130:33 | access to local variable dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:126:17:126:23 | object creation of type A : A | ArrayFlow.cs:132:30:132:33 | access to local variable dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:127:20:127:56 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:128:14:128:20 | access to indexer |
|
||||
| ArrayFlow.cs:127:20:127:56 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:129:23:129:26 | access to local variable dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:127:20:127:56 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:130:30:130:33 | access to local variable dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:127:20:127:56 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:132:30:132:33 | access to local variable dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:129:23:129:26 | access to local variable dict : Dictionary<Int32,A> | ArrayFlow.cs:212:61:212:64 | dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:130:30:130:33 | access to local variable dict : Dictionary<Int32,A> | ArrayFlow.cs:130:14:130:34 | call to method DictFirstValueA |
|
||||
| ArrayFlow.cs:132:30:132:33 | access to local variable dict : Dictionary<Int32,A> | ArrayFlow.cs:132:14:132:34 | call to method DictFirstValueC |
|
||||
| ArrayFlow.cs:137:20:137:60 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:138:14:138:20 | access to indexer |
|
||||
| ArrayFlow.cs:137:20:137:60 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:139:23:139:26 | access to local variable dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:137:20:137:60 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:140:30:140:33 | access to local variable dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:137:20:137:60 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:142:30:142:33 | access to local variable dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:139:23:139:26 | access to local variable dict : Dictionary<Int32,A> | ArrayFlow.cs:212:61:212:64 | dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:140:30:140:33 | access to local variable dict : Dictionary<Int32,A> | ArrayFlow.cs:140:14:140:34 | call to method DictFirstValueA |
|
||||
| ArrayFlow.cs:142:30:142:33 | access to local variable dict : Dictionary<Int32,A> | ArrayFlow.cs:142:14:142:34 | call to method DictFirstValueC |
|
||||
| ArrayFlow.cs:166:17:166:23 | object creation of type A : A | ArrayFlow.cs:169:18:169:18 | access to local variable x |
|
||||
| ArrayFlow.cs:181:17:181:23 | object creation of type A : A | ArrayFlow.cs:185:18:185:35 | access to property Current |
|
||||
| ArrayFlow.cs:208:40:208:41 | ts : A[] | ArrayFlow.cs:208:52:208:56 | access to array element |
|
||||
| ArrayFlow.cs:210:49:210:52 | list : List<A> | ArrayFlow.cs:210:63:210:69 | access to indexer |
|
||||
| ArrayFlow.cs:212:61:212:64 | dict : Dictionary<Int32,A> | ArrayFlow.cs:212:75:212:81 | access to indexer |
|
||||
nodes
|
||||
| ArrayFlow.cs:10:17:10:23 | object creation of type A : A | semmle.label | object creation of type A : A |
|
||||
| ArrayFlow.cs:12:14:12:19 | access to array element | semmle.label | access to array element |
|
||||
| ArrayFlow.cs:13:18:13:20 | access to local variable as : A[] | semmle.label | access to local variable as : A[] |
|
||||
| ArrayFlow.cs:14:14:14:23 | call to method First | semmle.label | call to method First |
|
||||
| ArrayFlow.cs:14:20:14:22 | access to local variable as : A[] | semmle.label | access to local variable as : A[] |
|
||||
| ArrayFlow.cs:28:17:28:23 | object creation of type A : A | semmle.label | object creation of type A : A |
|
||||
| ArrayFlow.cs:31:14:31:19 | access to array element | semmle.label | access to array element |
|
||||
| ArrayFlow.cs:32:18:32:20 | access to local variable as : A[] | semmle.label | access to local variable as : A[] |
|
||||
| ArrayFlow.cs:33:14:33:23 | call to method First | semmle.label | call to method First |
|
||||
| ArrayFlow.cs:33:20:33:22 | access to local variable as : A[] | semmle.label | access to local variable as : A[] |
|
||||
| ArrayFlow.cs:48:17:48:23 | object creation of type A : A | semmle.label | object creation of type A : A |
|
||||
| ArrayFlow.cs:49:20:49:32 | object creation of type List<A> : List<A> | semmle.label | object creation of type List<A> : List<A> |
|
||||
| ArrayFlow.cs:51:14:51:20 | access to indexer | semmle.label | access to indexer |
|
||||
| ArrayFlow.cs:52:22:52:25 | access to local variable list : List<A> | semmle.label | access to local variable list : List<A> |
|
||||
| ArrayFlow.cs:53:14:53:28 | call to method ListFirst | semmle.label | call to method ListFirst |
|
||||
| ArrayFlow.cs:53:24:53:27 | access to local variable list : List<A> | semmle.label | access to local variable list : List<A> |
|
||||
| ArrayFlow.cs:58:20:58:32 | object creation of type List<A> : List<A> | semmle.label | object creation of type List<A> : List<A> |
|
||||
| ArrayFlow.cs:60:14:60:20 | access to indexer | semmle.label | access to indexer |
|
||||
| ArrayFlow.cs:61:22:61:25 | access to local variable list : List<A> | semmle.label | access to local variable list : List<A> |
|
||||
| ArrayFlow.cs:62:14:62:28 | call to method ListFirst | semmle.label | call to method ListFirst |
|
||||
| ArrayFlow.cs:62:24:62:27 | access to local variable list : List<A> | semmle.label | access to local variable list : List<A> |
|
||||
| ArrayFlow.cs:67:17:67:23 | object creation of type A : A | semmle.label | object creation of type A : A |
|
||||
| ArrayFlow.cs:68:20:68:38 | object creation of type List<A> : List<A> | semmle.label | object creation of type List<A> : List<A> |
|
||||
| ArrayFlow.cs:69:14:69:20 | access to indexer | semmle.label | access to indexer |
|
||||
| ArrayFlow.cs:70:22:70:25 | access to local variable list : List<A> | semmle.label | access to local variable list : List<A> |
|
||||
| ArrayFlow.cs:71:14:71:28 | call to method ListFirst | semmle.label | call to method ListFirst |
|
||||
| ArrayFlow.cs:71:24:71:27 | access to local variable list : List<A> | semmle.label | access to local variable list : List<A> |
|
||||
| ArrayFlow.cs:76:20:76:42 | object creation of type List<A> : List<A> | semmle.label | object creation of type List<A> : List<A> |
|
||||
| ArrayFlow.cs:77:14:77:20 | access to indexer | semmle.label | access to indexer |
|
||||
| ArrayFlow.cs:78:22:78:25 | access to local variable list : List<A> | semmle.label | access to local variable list : List<A> |
|
||||
| ArrayFlow.cs:79:14:79:28 | call to method ListFirst | semmle.label | call to method ListFirst |
|
||||
| ArrayFlow.cs:79:24:79:27 | access to local variable list : List<A> | semmle.label | access to local variable list : List<A> |
|
||||
| ArrayFlow.cs:84:17:84:23 | object creation of type A : A | semmle.label | object creation of type A : A |
|
||||
| ArrayFlow.cs:85:20:85:32 | object creation of type List<A> : List<A> | semmle.label | object creation of type List<A> : List<A> |
|
||||
| ArrayFlow.cs:87:14:87:20 | access to indexer | semmle.label | access to indexer |
|
||||
| ArrayFlow.cs:88:22:88:25 | access to local variable list : List<A> | semmle.label | access to local variable list : List<A> |
|
||||
| ArrayFlow.cs:89:14:89:28 | call to method ListFirst | semmle.label | call to method ListFirst |
|
||||
| ArrayFlow.cs:89:24:89:27 | access to local variable list : List<A> | semmle.label | access to local variable list : List<A> |
|
||||
| ArrayFlow.cs:94:20:94:32 | object creation of type List<A> : List<A> | semmle.label | object creation of type List<A> : List<A> |
|
||||
| ArrayFlow.cs:96:14:96:20 | access to indexer | semmle.label | access to indexer |
|
||||
| ArrayFlow.cs:97:22:97:25 | access to local variable list : List<A> | semmle.label | access to local variable list : List<A> |
|
||||
| ArrayFlow.cs:98:14:98:28 | call to method ListFirst | semmle.label | call to method ListFirst |
|
||||
| ArrayFlow.cs:98:24:98:27 | access to local variable list : List<A> | semmle.label | access to local variable list : List<A> |
|
||||
| ArrayFlow.cs:103:17:103:23 | object creation of type A : A | semmle.label | object creation of type A : A |
|
||||
| ArrayFlow.cs:104:20:104:43 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | semmle.label | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:106:14:106:20 | access to indexer | semmle.label | access to indexer |
|
||||
| ArrayFlow.cs:107:23:107:26 | access to local variable dict : Dictionary<Int32,A> | semmle.label | access to local variable dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:108:14:108:34 | call to method DictFirstValueA | semmle.label | call to method DictFirstValueA |
|
||||
| ArrayFlow.cs:108:30:108:33 | access to local variable dict : Dictionary<Int32,A> | semmle.label | access to local variable dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:110:14:110:34 | call to method DictFirstValueC | semmle.label | call to method DictFirstValueC |
|
||||
| ArrayFlow.cs:110:30:110:33 | access to local variable dict : Dictionary<Int32,A> | semmle.label | access to local variable dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:115:20:115:43 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | semmle.label | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:117:14:117:20 | access to indexer | semmle.label | access to indexer |
|
||||
| ArrayFlow.cs:118:23:118:26 | access to local variable dict : Dictionary<Int32,A> | semmle.label | access to local variable dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:119:14:119:34 | call to method DictFirstValueA | semmle.label | call to method DictFirstValueA |
|
||||
| ArrayFlow.cs:119:30:119:33 | access to local variable dict : Dictionary<Int32,A> | semmle.label | access to local variable dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:121:14:121:34 | call to method DictFirstValueC | semmle.label | call to method DictFirstValueC |
|
||||
| ArrayFlow.cs:121:30:121:33 | access to local variable dict : Dictionary<Int32,A> | semmle.label | access to local variable dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:126:17:126:23 | object creation of type A : A | semmle.label | object creation of type A : A |
|
||||
| ArrayFlow.cs:127:20:127:56 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | semmle.label | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:128:14:128:20 | access to indexer | semmle.label | access to indexer |
|
||||
| ArrayFlow.cs:129:23:129:26 | access to local variable dict : Dictionary<Int32,A> | semmle.label | access to local variable dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:130:14:130:34 | call to method DictFirstValueA | semmle.label | call to method DictFirstValueA |
|
||||
| ArrayFlow.cs:130:30:130:33 | access to local variable dict : Dictionary<Int32,A> | semmle.label | access to local variable dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:132:14:132:34 | call to method DictFirstValueC | semmle.label | call to method DictFirstValueC |
|
||||
| ArrayFlow.cs:132:30:132:33 | access to local variable dict : Dictionary<Int32,A> | semmle.label | access to local variable dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:137:20:137:60 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | semmle.label | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:138:14:138:20 | access to indexer | semmle.label | access to indexer |
|
||||
| ArrayFlow.cs:139:23:139:26 | access to local variable dict : Dictionary<Int32,A> | semmle.label | access to local variable dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:140:14:140:34 | call to method DictFirstValueA | semmle.label | call to method DictFirstValueA |
|
||||
| ArrayFlow.cs:140:30:140:33 | access to local variable dict : Dictionary<Int32,A> | semmle.label | access to local variable dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:142:14:142:34 | call to method DictFirstValueC | semmle.label | call to method DictFirstValueC |
|
||||
| ArrayFlow.cs:142:30:142:33 | access to local variable dict : Dictionary<Int32,A> | semmle.label | access to local variable dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:166:17:166:23 | object creation of type A : A | semmle.label | object creation of type A : A |
|
||||
| ArrayFlow.cs:169:18:169:18 | access to local variable x | semmle.label | access to local variable x |
|
||||
| ArrayFlow.cs:181:17:181:23 | object creation of type A : A | semmle.label | object creation of type A : A |
|
||||
| ArrayFlow.cs:185:18:185:35 | access to property Current | semmle.label | access to property Current |
|
||||
| ArrayFlow.cs:208:40:208:41 | ts : A[] | semmle.label | ts : A[] |
|
||||
| ArrayFlow.cs:208:52:208:56 | access to array element | semmle.label | access to array element |
|
||||
| ArrayFlow.cs:210:49:210:52 | list : List<A> | semmle.label | list : List<A> |
|
||||
| ArrayFlow.cs:210:63:210:69 | access to indexer | semmle.label | access to indexer |
|
||||
| ArrayFlow.cs:212:61:212:64 | dict : Dictionary<Int32,A> | semmle.label | dict : Dictionary<Int32,A> |
|
||||
| ArrayFlow.cs:212:75:212:81 | access to indexer | semmle.label | access to indexer |
|
||||
#select
|
||||
| ArrayFlow.cs:10:17:10:23 | object creation of type A : A | ArrayFlow.cs:10:17:10:23 | object creation of type A : A | ArrayFlow.cs:12:14:12:19 | access to array element | $@ | ArrayFlow.cs:12:14:12:19 | access to array element | access to array element |
|
||||
| ArrayFlow.cs:10:17:10:23 | object creation of type A : A | ArrayFlow.cs:10:17:10:23 | object creation of type A : A | ArrayFlow.cs:14:14:14:23 | call to method First | $@ | ArrayFlow.cs:14:14:14:23 | call to method First | call to method First |
|
||||
| ArrayFlow.cs:10:17:10:23 | object creation of type A : A | ArrayFlow.cs:10:17:10:23 | object creation of type A : A | ArrayFlow.cs:208:52:208:56 | access to array element | $@ | ArrayFlow.cs:208:52:208:56 | access to array element | access to array element |
|
||||
| ArrayFlow.cs:28:17:28:23 | object creation of type A : A | ArrayFlow.cs:28:17:28:23 | object creation of type A : A | ArrayFlow.cs:31:14:31:19 | access to array element | $@ | ArrayFlow.cs:31:14:31:19 | access to array element | access to array element |
|
||||
| ArrayFlow.cs:28:17:28:23 | object creation of type A : A | ArrayFlow.cs:28:17:28:23 | object creation of type A : A | ArrayFlow.cs:33:14:33:23 | call to method First | $@ | ArrayFlow.cs:33:14:33:23 | call to method First | call to method First |
|
||||
| ArrayFlow.cs:28:17:28:23 | object creation of type A : A | ArrayFlow.cs:28:17:28:23 | object creation of type A : A | ArrayFlow.cs:208:52:208:56 | access to array element | $@ | ArrayFlow.cs:208:52:208:56 | access to array element | access to array element |
|
||||
| ArrayFlow.cs:48:17:48:23 | object creation of type A : A | ArrayFlow.cs:48:17:48:23 | object creation of type A : A | ArrayFlow.cs:51:14:51:20 | access to indexer | $@ | ArrayFlow.cs:51:14:51:20 | access to indexer | access to indexer |
|
||||
| ArrayFlow.cs:48:17:48:23 | object creation of type A : A | ArrayFlow.cs:48:17:48:23 | object creation of type A : A | ArrayFlow.cs:53:14:53:28 | call to method ListFirst | $@ | ArrayFlow.cs:53:14:53:28 | call to method ListFirst | call to method ListFirst |
|
||||
| ArrayFlow.cs:48:17:48:23 | object creation of type A : A | ArrayFlow.cs:48:17:48:23 | object creation of type A : A | ArrayFlow.cs:210:63:210:69 | access to indexer | $@ | ArrayFlow.cs:210:63:210:69 | access to indexer | access to indexer |
|
||||
| ArrayFlow.cs:49:20:49:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:49:20:49:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:51:14:51:20 | access to indexer | $@ | ArrayFlow.cs:51:14:51:20 | access to indexer | access to indexer |
|
||||
| ArrayFlow.cs:49:20:49:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:49:20:49:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:53:14:53:28 | call to method ListFirst | $@ | ArrayFlow.cs:53:14:53:28 | call to method ListFirst | call to method ListFirst |
|
||||
| ArrayFlow.cs:49:20:49:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:49:20:49:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:210:63:210:69 | access to indexer | $@ | ArrayFlow.cs:210:63:210:69 | access to indexer | access to indexer |
|
||||
| ArrayFlow.cs:58:20:58:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:58:20:58:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:60:14:60:20 | access to indexer | $@ | ArrayFlow.cs:60:14:60:20 | access to indexer | access to indexer |
|
||||
| ArrayFlow.cs:58:20:58:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:58:20:58:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:62:14:62:28 | call to method ListFirst | $@ | ArrayFlow.cs:62:14:62:28 | call to method ListFirst | call to method ListFirst |
|
||||
| ArrayFlow.cs:58:20:58:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:58:20:58:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:210:63:210:69 | access to indexer | $@ | ArrayFlow.cs:210:63:210:69 | access to indexer | access to indexer |
|
||||
| ArrayFlow.cs:67:17:67:23 | object creation of type A : A | ArrayFlow.cs:67:17:67:23 | object creation of type A : A | ArrayFlow.cs:69:14:69:20 | access to indexer | $@ | ArrayFlow.cs:69:14:69:20 | access to indexer | access to indexer |
|
||||
| ArrayFlow.cs:67:17:67:23 | object creation of type A : A | ArrayFlow.cs:67:17:67:23 | object creation of type A : A | ArrayFlow.cs:71:14:71:28 | call to method ListFirst | $@ | ArrayFlow.cs:71:14:71:28 | call to method ListFirst | call to method ListFirst |
|
||||
| ArrayFlow.cs:67:17:67:23 | object creation of type A : A | ArrayFlow.cs:67:17:67:23 | object creation of type A : A | ArrayFlow.cs:210:63:210:69 | access to indexer | $@ | ArrayFlow.cs:210:63:210:69 | access to indexer | access to indexer |
|
||||
| ArrayFlow.cs:68:20:68:38 | object creation of type List<A> : List<A> | ArrayFlow.cs:68:20:68:38 | object creation of type List<A> : List<A> | ArrayFlow.cs:69:14:69:20 | access to indexer | $@ | ArrayFlow.cs:69:14:69:20 | access to indexer | access to indexer |
|
||||
| ArrayFlow.cs:68:20:68:38 | object creation of type List<A> : List<A> | ArrayFlow.cs:68:20:68:38 | object creation of type List<A> : List<A> | ArrayFlow.cs:71:14:71:28 | call to method ListFirst | $@ | ArrayFlow.cs:71:14:71:28 | call to method ListFirst | call to method ListFirst |
|
||||
| ArrayFlow.cs:68:20:68:38 | object creation of type List<A> : List<A> | ArrayFlow.cs:68:20:68:38 | object creation of type List<A> : List<A> | ArrayFlow.cs:210:63:210:69 | access to indexer | $@ | ArrayFlow.cs:210:63:210:69 | access to indexer | access to indexer |
|
||||
| ArrayFlow.cs:76:20:76:42 | object creation of type List<A> : List<A> | ArrayFlow.cs:76:20:76:42 | object creation of type List<A> : List<A> | ArrayFlow.cs:77:14:77:20 | access to indexer | $@ | ArrayFlow.cs:77:14:77:20 | access to indexer | access to indexer |
|
||||
| ArrayFlow.cs:76:20:76:42 | object creation of type List<A> : List<A> | ArrayFlow.cs:76:20:76:42 | object creation of type List<A> : List<A> | ArrayFlow.cs:79:14:79:28 | call to method ListFirst | $@ | ArrayFlow.cs:79:14:79:28 | call to method ListFirst | call to method ListFirst |
|
||||
| ArrayFlow.cs:76:20:76:42 | object creation of type List<A> : List<A> | ArrayFlow.cs:76:20:76:42 | object creation of type List<A> : List<A> | ArrayFlow.cs:210:63:210:69 | access to indexer | $@ | ArrayFlow.cs:210:63:210:69 | access to indexer | access to indexer |
|
||||
| ArrayFlow.cs:84:17:84:23 | object creation of type A : A | ArrayFlow.cs:84:17:84:23 | object creation of type A : A | ArrayFlow.cs:87:14:87:20 | access to indexer | $@ | ArrayFlow.cs:87:14:87:20 | access to indexer | access to indexer |
|
||||
| ArrayFlow.cs:84:17:84:23 | object creation of type A : A | ArrayFlow.cs:84:17:84:23 | object creation of type A : A | ArrayFlow.cs:89:14:89:28 | call to method ListFirst | $@ | ArrayFlow.cs:89:14:89:28 | call to method ListFirst | call to method ListFirst |
|
||||
| ArrayFlow.cs:84:17:84:23 | object creation of type A : A | ArrayFlow.cs:84:17:84:23 | object creation of type A : A | ArrayFlow.cs:210:63:210:69 | access to indexer | $@ | ArrayFlow.cs:210:63:210:69 | access to indexer | access to indexer |
|
||||
| ArrayFlow.cs:85:20:85:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:85:20:85:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:87:14:87:20 | access to indexer | $@ | ArrayFlow.cs:87:14:87:20 | access to indexer | access to indexer |
|
||||
| ArrayFlow.cs:85:20:85:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:85:20:85:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:89:14:89:28 | call to method ListFirst | $@ | ArrayFlow.cs:89:14:89:28 | call to method ListFirst | call to method ListFirst |
|
||||
| ArrayFlow.cs:85:20:85:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:85:20:85:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:210:63:210:69 | access to indexer | $@ | ArrayFlow.cs:210:63:210:69 | access to indexer | access to indexer |
|
||||
| ArrayFlow.cs:94:20:94:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:94:20:94:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:96:14:96:20 | access to indexer | $@ | ArrayFlow.cs:96:14:96:20 | access to indexer | access to indexer |
|
||||
| ArrayFlow.cs:94:20:94:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:94:20:94:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:98:14:98:28 | call to method ListFirst | $@ | ArrayFlow.cs:98:14:98:28 | call to method ListFirst | call to method ListFirst |
|
||||
| ArrayFlow.cs:94:20:94:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:94:20:94:32 | object creation of type List<A> : List<A> | ArrayFlow.cs:210:63:210:69 | access to indexer | $@ | ArrayFlow.cs:210:63:210:69 | access to indexer | access to indexer |
|
||||
| ArrayFlow.cs:103:17:103:23 | object creation of type A : A | ArrayFlow.cs:103:17:103:23 | object creation of type A : A | ArrayFlow.cs:106:14:106:20 | access to indexer | $@ | ArrayFlow.cs:106:14:106:20 | access to indexer | access to indexer |
|
||||
| ArrayFlow.cs:103:17:103:23 | object creation of type A : A | ArrayFlow.cs:103:17:103:23 | object creation of type A : A | ArrayFlow.cs:108:14:108:34 | call to method DictFirstValueA | $@ | ArrayFlow.cs:108:14:108:34 | call to method DictFirstValueA | call to method DictFirstValueA |
|
||||
| ArrayFlow.cs:103:17:103:23 | object creation of type A : A | ArrayFlow.cs:103:17:103:23 | object creation of type A : A | ArrayFlow.cs:110:14:110:34 | call to method DictFirstValueC | $@ | ArrayFlow.cs:110:14:110:34 | call to method DictFirstValueC | call to method DictFirstValueC |
|
||||
| ArrayFlow.cs:103:17:103:23 | object creation of type A : A | ArrayFlow.cs:103:17:103:23 | object creation of type A : A | ArrayFlow.cs:212:75:212:81 | access to indexer | $@ | ArrayFlow.cs:212:75:212:81 | access to indexer | access to indexer |
|
||||
| ArrayFlow.cs:104:20:104:43 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:104:20:104:43 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:106:14:106:20 | access to indexer | $@ | ArrayFlow.cs:106:14:106:20 | access to indexer | access to indexer |
|
||||
| ArrayFlow.cs:104:20:104:43 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:104:20:104:43 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:108:14:108:34 | call to method DictFirstValueA | $@ | ArrayFlow.cs:108:14:108:34 | call to method DictFirstValueA | call to method DictFirstValueA |
|
||||
| ArrayFlow.cs:104:20:104:43 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:104:20:104:43 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:110:14:110:34 | call to method DictFirstValueC | $@ | ArrayFlow.cs:110:14:110:34 | call to method DictFirstValueC | call to method DictFirstValueC |
|
||||
| ArrayFlow.cs:104:20:104:43 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:104:20:104:43 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:212:75:212:81 | access to indexer | $@ | ArrayFlow.cs:212:75:212:81 | access to indexer | access to indexer |
|
||||
| ArrayFlow.cs:115:20:115:43 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:115:20:115:43 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:117:14:117:20 | access to indexer | $@ | ArrayFlow.cs:117:14:117:20 | access to indexer | access to indexer |
|
||||
| ArrayFlow.cs:115:20:115:43 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:115:20:115:43 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:119:14:119:34 | call to method DictFirstValueA | $@ | ArrayFlow.cs:119:14:119:34 | call to method DictFirstValueA | call to method DictFirstValueA |
|
||||
| ArrayFlow.cs:115:20:115:43 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:115:20:115:43 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:121:14:121:34 | call to method DictFirstValueC | $@ | ArrayFlow.cs:121:14:121:34 | call to method DictFirstValueC | call to method DictFirstValueC |
|
||||
| ArrayFlow.cs:115:20:115:43 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:115:20:115:43 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:212:75:212:81 | access to indexer | $@ | ArrayFlow.cs:212:75:212:81 | access to indexer | access to indexer |
|
||||
| ArrayFlow.cs:126:17:126:23 | object creation of type A : A | ArrayFlow.cs:126:17:126:23 | object creation of type A : A | ArrayFlow.cs:128:14:128:20 | access to indexer | $@ | ArrayFlow.cs:128:14:128:20 | access to indexer | access to indexer |
|
||||
| ArrayFlow.cs:126:17:126:23 | object creation of type A : A | ArrayFlow.cs:126:17:126:23 | object creation of type A : A | ArrayFlow.cs:130:14:130:34 | call to method DictFirstValueA | $@ | ArrayFlow.cs:130:14:130:34 | call to method DictFirstValueA | call to method DictFirstValueA |
|
||||
| ArrayFlow.cs:126:17:126:23 | object creation of type A : A | ArrayFlow.cs:126:17:126:23 | object creation of type A : A | ArrayFlow.cs:132:14:132:34 | call to method DictFirstValueC | $@ | ArrayFlow.cs:132:14:132:34 | call to method DictFirstValueC | call to method DictFirstValueC |
|
||||
| ArrayFlow.cs:126:17:126:23 | object creation of type A : A | ArrayFlow.cs:126:17:126:23 | object creation of type A : A | ArrayFlow.cs:212:75:212:81 | access to indexer | $@ | ArrayFlow.cs:212:75:212:81 | access to indexer | access to indexer |
|
||||
| ArrayFlow.cs:127:20:127:56 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:127:20:127:56 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:128:14:128:20 | access to indexer | $@ | ArrayFlow.cs:128:14:128:20 | access to indexer | access to indexer |
|
||||
| ArrayFlow.cs:127:20:127:56 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:127:20:127:56 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:130:14:130:34 | call to method DictFirstValueA | $@ | ArrayFlow.cs:130:14:130:34 | call to method DictFirstValueA | call to method DictFirstValueA |
|
||||
| ArrayFlow.cs:127:20:127:56 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:127:20:127:56 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:132:14:132:34 | call to method DictFirstValueC | $@ | ArrayFlow.cs:132:14:132:34 | call to method DictFirstValueC | call to method DictFirstValueC |
|
||||
| ArrayFlow.cs:127:20:127:56 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:127:20:127:56 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:212:75:212:81 | access to indexer | $@ | ArrayFlow.cs:212:75:212:81 | access to indexer | access to indexer |
|
||||
| ArrayFlow.cs:137:20:137:60 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:137:20:137:60 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:138:14:138:20 | access to indexer | $@ | ArrayFlow.cs:138:14:138:20 | access to indexer | access to indexer |
|
||||
| ArrayFlow.cs:137:20:137:60 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:137:20:137:60 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:140:14:140:34 | call to method DictFirstValueA | $@ | ArrayFlow.cs:140:14:140:34 | call to method DictFirstValueA | call to method DictFirstValueA |
|
||||
| ArrayFlow.cs:137:20:137:60 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:137:20:137:60 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:142:14:142:34 | call to method DictFirstValueC | $@ | ArrayFlow.cs:142:14:142:34 | call to method DictFirstValueC | call to method DictFirstValueC |
|
||||
| ArrayFlow.cs:137:20:137:60 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:137:20:137:60 | object creation of type Dictionary<Int32,A> : Dictionary<Int32,A> | ArrayFlow.cs:212:75:212:81 | access to indexer | $@ | ArrayFlow.cs:212:75:212:81 | access to indexer | access to indexer |
|
||||
| ArrayFlow.cs:166:17:166:23 | object creation of type A : A | ArrayFlow.cs:166:17:166:23 | object creation of type A : A | ArrayFlow.cs:169:18:169:18 | access to local variable x | $@ | ArrayFlow.cs:169:18:169:18 | access to local variable x | access to local variable x |
|
||||
| ArrayFlow.cs:181:17:181:23 | object creation of type A : A | ArrayFlow.cs:181:17:181:23 | object creation of type A : A | ArrayFlow.cs:185:18:185:35 | access to property Current | $@ | ArrayFlow.cs:185:18:185:35 | access to property Current | access to property Current |
|
||||
23
csharp/ql/test/library-tests/dataflow/arrays/ArrayFlow.ql
Normal file
23
csharp/ql/test/library-tests/dataflow/arrays/ArrayFlow.ql
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* @kind path-problem
|
||||
*/
|
||||
|
||||
import csharp
|
||||
import DataFlow::PathGraph
|
||||
|
||||
class Conf extends TaintTracking::Configuration {
|
||||
Conf() { this = "ArrayFlowConf" }
|
||||
|
||||
override predicate isSource(DataFlow::Node src) { src.asExpr() instanceof ObjectCreation }
|
||||
|
||||
override predicate isSink(DataFlow::Node sink) {
|
||||
exists(MethodCall mc |
|
||||
mc.getTarget().hasName("Sink") and
|
||||
mc.getAnArgument() = sink.asExpr()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
from DataFlow::PathNode source, DataFlow::PathNode sink, Conf conf
|
||||
where conf.hasFlowPath(source, sink)
|
||||
select source, source, sink, "$@", sink, sink.toString()
|
||||
Reference in New Issue
Block a user