Search in sources :

Example 1 with Literal

use of de.fraunhofer.aisec.cpg.graph.statements.expressions.Literal in project cpg by Fraunhofer-AISEC.

the class VariableResolverJavaTest method initTests.

@BeforeAll
void initTests() throws ExecutionException, InterruptedException {
    final String topLevelPath = "src/test/resources/variables_extended/java/";
    List<String> fileNames = Arrays.asList("ScopeVariables.java", "ExternalClass.java");
    List<File> fileLocations = fileNames.stream().map(fileName -> new File(topLevelPath + fileName)).collect(Collectors.toList());
    TranslationConfiguration config = TranslationConfiguration.builder().sourceLocations(fileLocations.toArray(new File[fileNames.size()])).topLevel(new File(topLevelPath)).defaultPasses().defaultLanguages().debugParser(true).failOnError(true).build();
    TranslationManager analyzer = TranslationManager.builder().config(config).build();
    List<TranslationUnitDeclaration> tu = analyzer.analyze().get().getTranslationUnits();
    List<Node> nodes = tu.stream().flatMap(tUnit -> SubgraphWalker.flattenAST(tUnit).stream()).collect(Collectors.toList());
    List<CallExpression> calls = TestUtils.findByName(Util.filterCast(nodes, CallExpression.class), "printLog");
    calls.sort(new NodeComparator());
    List<RecordDeclaration> records = Util.filterCast(nodes, RecordDeclaration.class);
    // Extract all Variable declarations and field declarations for matching
    externalClass = TestUtils.getOfTypeWithName(nodes, RecordDeclaration.class, "variables_extended.ExternalClass");
    externVarName = TestUtils.getSubnodeOfTypeWithName(externalClass, FieldDeclaration.class, "varName");
    externStaticVarName = TestUtils.getSubnodeOfTypeWithName(externalClass, FieldDeclaration.class, "staticVarName");
    outerClass = TestUtils.getOfTypeWithName(nodes, RecordDeclaration.class, "variables_extended.ScopeVariables");
    outerVarName = outerClass.getFields().stream().filter(n -> n.getName().equals("varName")).findFirst().get();
    outerStaticVarName = outerClass.getFields().stream().filter(n -> n.getName().equals("staticVarName")).findFirst().get();
    outerImpThis = outerClass.getFields().stream().filter(n -> n.getName().equals("this")).findFirst().get();
    // Inner class and its fields
    innerClass = TestUtils.getOfTypeWithName(nodes, RecordDeclaration.class, "variables_extended.ScopeVariables.InnerClass");
    innerVarName = innerClass.getFields().stream().filter(n -> n.getName().equals("varName")).findFirst().get();
    innerStaticVarName = TestUtils.getSubnodeOfTypeWithName(innerClass, FieldDeclaration.class, "staticVarName");
    innerImpThis = TestUtils.getSubnodeOfTypeWithName(innerClass, FieldDeclaration.class, "this");
    innerImpOuter = TestUtils.getSubnodeOfTypeWithName(innerClass, FieldDeclaration.class, "ScopeVariables.this");
    main = TestUtils.getSubnodeOfTypeWithName(outerClass, MethodDeclaration.class, "main");
    outerFunction1 = outerClass.getMethods().stream().filter(method -> method.getName().equals("function1")).collect(Collectors.toList()).get(0);
    forStatements = Util.filterCast(SubgraphWalker.flattenAST(outerFunction1), ForStatement.class);
    // Functions i nthe outer and inner object
    outerFunction2 = outerClass.getMethods().stream().filter(method -> method.getName().equals("function2")).collect(Collectors.toList()).get(0);
    outerFunction3 = outerClass.getMethods().stream().filter(method -> method.getName().equals("function3")).collect(Collectors.toList()).get(0);
    outerFunction4 = outerClass.getMethods().stream().filter(method -> method.getName().equals("function4")).collect(Collectors.toList()).get(0);
    innerFunction1 = innerClass.getMethods().stream().filter(method -> method.getName().equals("function1")).collect(Collectors.toList()).get(0);
    innerFunction2 = innerClass.getMethods().stream().filter(method -> method.getName().equals("function2")).collect(Collectors.toList()).get(0);
    innerFunction3 = innerClass.getMethods().stream().filter(method -> method.getName().equals("function3")).collect(Collectors.toList()).get(0);
    for (CallExpression call : calls) {
        Expression first = call.getArguments().get(0);
        String logId = ((Literal) first).getValue().toString();
        Expression second = call.getArguments().get(1);
        callParamMap.put(logId, second);
    }
}
Also used : Arrays(java.util.Arrays) FieldDeclaration(de.fraunhofer.aisec.cpg.graph.declarations.FieldDeclaration) HashMap(java.util.HashMap) BaseTest(de.fraunhofer.aisec.cpg.BaseTest) NodeComparator(de.fraunhofer.aisec.cpg.helpers.NodeComparator) Literal(de.fraunhofer.aisec.cpg.graph.statements.expressions.Literal) ForStatement(de.fraunhofer.aisec.cpg.graph.statements.ForStatement) TestInstance(org.junit.jupiter.api.TestInstance) BeforeAll(org.junit.jupiter.api.BeforeAll) Util(de.fraunhofer.aisec.cpg.helpers.Util) Map(java.util.Map) SubgraphWalker(de.fraunhofer.aisec.cpg.helpers.SubgraphWalker) Node(de.fraunhofer.aisec.cpg.graph.Node) ParamVariableDeclaration(de.fraunhofer.aisec.cpg.graph.declarations.ParamVariableDeclaration) MethodDeclaration(de.fraunhofer.aisec.cpg.graph.declarations.MethodDeclaration) VariableDeclaration(de.fraunhofer.aisec.cpg.graph.declarations.VariableDeclaration) DeclaredReferenceExpression(de.fraunhofer.aisec.cpg.graph.statements.expressions.DeclaredReferenceExpression) TestUtils(de.fraunhofer.aisec.cpg.TestUtils) RecordDeclaration(de.fraunhofer.aisec.cpg.graph.declarations.RecordDeclaration) Collectors(java.util.stream.Collectors) File(java.io.File) ExecutionException(java.util.concurrent.ExecutionException) Test(org.junit.jupiter.api.Test) Expression(de.fraunhofer.aisec.cpg.graph.statements.expressions.Expression) ValueDeclaration(de.fraunhofer.aisec.cpg.graph.declarations.ValueDeclaration) List(java.util.List) MemberExpression(de.fraunhofer.aisec.cpg.graph.statements.expressions.MemberExpression) TranslationConfiguration(de.fraunhofer.aisec.cpg.TranslationConfiguration) TranslationManager(de.fraunhofer.aisec.cpg.TranslationManager) TranslationUnitDeclaration(de.fraunhofer.aisec.cpg.graph.declarations.TranslationUnitDeclaration) CallExpression(de.fraunhofer.aisec.cpg.graph.statements.expressions.CallExpression) NodeComparator(de.fraunhofer.aisec.cpg.helpers.NodeComparator) MethodDeclaration(de.fraunhofer.aisec.cpg.graph.declarations.MethodDeclaration) Node(de.fraunhofer.aisec.cpg.graph.Node) TranslationManager(de.fraunhofer.aisec.cpg.TranslationManager) TranslationConfiguration(de.fraunhofer.aisec.cpg.TranslationConfiguration) TranslationUnitDeclaration(de.fraunhofer.aisec.cpg.graph.declarations.TranslationUnitDeclaration) FieldDeclaration(de.fraunhofer.aisec.cpg.graph.declarations.FieldDeclaration) RecordDeclaration(de.fraunhofer.aisec.cpg.graph.declarations.RecordDeclaration) DeclaredReferenceExpression(de.fraunhofer.aisec.cpg.graph.statements.expressions.DeclaredReferenceExpression) Expression(de.fraunhofer.aisec.cpg.graph.statements.expressions.Expression) MemberExpression(de.fraunhofer.aisec.cpg.graph.statements.expressions.MemberExpression) CallExpression(de.fraunhofer.aisec.cpg.graph.statements.expressions.CallExpression) ForStatement(de.fraunhofer.aisec.cpg.graph.statements.ForStatement) File(java.io.File) CallExpression(de.fraunhofer.aisec.cpg.graph.statements.expressions.CallExpression) BeforeAll(org.junit.jupiter.api.BeforeAll)

Example 2 with Literal

use of de.fraunhofer.aisec.cpg.graph.statements.expressions.Literal in project cpg by Fraunhofer-AISEC.

the class CallResolverTest method testScopedFunctionResolutionAfterRedeclaration.

void testScopedFunctionResolutionAfterRedeclaration(List<TranslationUnitDeclaration> result, List<CallExpression> calls) {
    CallExpression fn = TestUtils.findByUniquePredicate(calls, c -> c.getLocation().getRegion().getStartLine() == 13);
    Literal<?> literal7 = TestUtils.findByUniquePredicate(TestUtils.subnodesOfType(result, Literal.class), l -> l.getValue().equals(7));
    assertEquals(1, fn.getInvokes().size());
    assertFalse(fn.getInvokes().get(0).isImplicit());
    assertEquals(2, fn.getInvokes().get(0).getLocation().getRegion().getStartLine());
    assertEquals(1, fn.getArguments().size());
    assertEquals(6, ((Literal) fn.getArguments().get(0)).getValue());
    assertTrue(fn.getInvokes().get(0).getNextEOG().contains(literal7));
    for (Node node : fn.getInvokes().get(0).getNextEOG()) {
        assertTrue(node.equals(literal7) || literal7.getNextEOG().contains(node));
    }
}
Also used : Literal(de.fraunhofer.aisec.cpg.graph.statements.expressions.Literal) Node(de.fraunhofer.aisec.cpg.graph.Node) CallExpression(de.fraunhofer.aisec.cpg.graph.statements.expressions.CallExpression)

Example 3 with Literal

use of de.fraunhofer.aisec.cpg.graph.statements.expressions.Literal in project cpg by Fraunhofer-AISEC.

the class CallResolverTest method testDefaultArgumentsInDefinition.

@Test
void testDefaultArgumentsInDefinition() throws Exception {
    List<TranslationUnitDeclaration> result = TestUtils.analyze(List.of(Path.of(topLevel.toString(), "defaultargs", "defaultInDefinition.cpp").toFile()), topLevel, true);
    List<CallExpression> calls = TestUtils.subnodesOfType(result, CallExpression.class);
    List<FunctionDeclaration> functionDeclarations = TestUtils.subnodesOfType(result, FunctionDeclaration.class);
    FunctionDeclaration displayFunction = TestUtils.findByUniquePredicate(functionDeclarations, f -> f.getName().equals("display") && !f.isImplicit());
    Literal<?> literalStar = TestUtils.findByUniquePredicate(TestUtils.subnodesOfType(result, Literal.class), l -> l.getValue().equals('*'));
    Literal<?> literal3 = TestUtils.findByUniquePredicate(TestUtils.subnodesOfType(result, Literal.class), l -> l.getValue().equals(3));
    // Check defaults edge of ParamVariableDeclaration
    assertTrue(displayFunction.getDefaultParameters().get(0) instanceof Literal);
    assertTrue(displayFunction.getDefaultParameters().get(1) instanceof Literal);
    assertEquals('*', ((Literal) displayFunction.getDefaultParameters().get(0)).getValue());
    assertEquals(3, ((Literal) displayFunction.getDefaultParameters().get(1)).getValue());
    // Check call display();
    CallExpression display = TestUtils.findByUniquePredicate(calls, c -> {
        assert c.getCode() != null;
        return c.getCode().equals("display();");
    });
    assertEquals(1, display.getInvokes().size());
    assertEquals(displayFunction, display.getInvokes().get(0));
    assertEquals(0, display.getArguments().size());
    assertTrue(displayFunction.getNextEOG().contains(literalStar));
    assertTrue(displayFunction.getNextEOG().contains(literal3));
    assertTrue(literalStar.getNextEOG().contains(literal3));
    for (Node node : displayFunction.getNextEOG()) {
        assertTrue(node.equals(literal3) || node.equals(literalStar) || literal3.getNextEOG().contains(node));
    }
    // Check call display('#');
    CallExpression displayHash = TestUtils.findByUniquePredicate(calls, c -> {
        assert c.getCode() != null;
        return c.getCode().equals("display('#');");
    });
    assertEquals(1, displayHash.getInvokes().size());
    assertEquals(displayFunction, displayHash.getInvokes().get(0));
    assertEquals(1, displayHash.getArguments().size());
    assertTrue(displayHash.getArguments().get(0) instanceof Literal);
    assertEquals('#', ((Literal) displayHash.getArguments().get(0)).getValue());
    // Check call display('#');
    CallExpression display$Count = TestUtils.findByUniquePredicate(calls, c -> {
        assert c.getCode() != null;
        return c.getCode().equals("display('$', count);");
    });
    assertEquals(1, display$Count.getInvokes().size());
    assertEquals(displayFunction, display$Count.getInvokes().get(0));
    assertTrue(display$Count.getArguments().get(0) instanceof Literal);
    assertEquals('$', ((Literal) display$Count.getArguments().get(0)).getValue());
    assertEquals("count", display$Count.getArguments().get(1).getName());
}
Also used : Literal(de.fraunhofer.aisec.cpg.graph.statements.expressions.Literal) Node(de.fraunhofer.aisec.cpg.graph.Node) CallExpression(de.fraunhofer.aisec.cpg.graph.statements.expressions.CallExpression) BaseTest(de.fraunhofer.aisec.cpg.BaseTest) Test(org.junit.jupiter.api.Test)

Example 4 with Literal

use of de.fraunhofer.aisec.cpg.graph.statements.expressions.Literal in project cpg by Fraunhofer-AISEC.

the class CallResolverTest method testScopedFunctionResolutionRedeclaration.

void testScopedFunctionResolutionRedeclaration(List<TranslationUnitDeclaration> result, List<CallExpression> calls) {
    CallExpression fm1 = TestUtils.findByUniquePredicate(calls, c -> c.getLocation().getRegion().getStartLine() == 8);
    assertEquals(1, fm1.getInvokes().size());
    assertEquals(1, fm1.getArguments().size());
    assertEquals(8, ((Literal) fm1.getArguments().get(0)).getValue());
    CallExpression fm2 = TestUtils.findByUniquePredicate(calls, c -> c.getLocation().getRegion().getStartLine() == 10);
    Literal<?> literal5 = TestUtils.findByUniquePredicate(TestUtils.subnodesOfType(result, Literal.class), l -> l.getValue().equals(5));
    assertEquals(1, fm2.getInvokes().size());
    assertEquals(9, fm2.getInvokes().get(0).getLocation().getRegion().getStartLine());
    assertEquals(1, fm2.getArguments().size());
    assertEquals(4, ((Literal) fm2.getArguments().get(0)).getValue());
    assertTrue(fm2.getInvokes().get(0).getNextEOG().contains(literal5));
    for (Node node : fm2.getInvokes().get(0).getNextEOG()) {
        assertTrue(node.equals(literal5) || literal5.getNextEOG().contains(node));
    }
}
Also used : Literal(de.fraunhofer.aisec.cpg.graph.statements.expressions.Literal) Node(de.fraunhofer.aisec.cpg.graph.Node) CallExpression(de.fraunhofer.aisec.cpg.graph.statements.expressions.CallExpression)

Example 5 with Literal

use of de.fraunhofer.aisec.cpg.graph.statements.expressions.Literal in project cpg by Fraunhofer-AISEC.

the class VariableResolverCppTest method initTests.

@BeforeAll
void initTests() throws ExecutionException, InterruptedException {
    final String topLevelPath = "src/test/resources/variables_extended/cpp/";
    List<String> fileNames = Arrays.asList("scope_variables.cpp", "external_class.cpp");
    List<File> fileLocations = fileNames.stream().map(fileName -> new File(topLevelPath + fileName)).collect(Collectors.toList());
    TranslationConfiguration config = TranslationConfiguration.builder().sourceLocations(fileLocations.toArray(new File[fileNames.size()])).topLevel(new File(topLevelPath)).defaultPasses().debugParser(true).defaultLanguages().failOnError(true).loadIncludes(true).build();
    TranslationManager analyzer = TranslationManager.builder().config(config).build();
    List<TranslationUnitDeclaration> tu = analyzer.analyze().get().getTranslationUnits();
    List<Node> nodes = tu.stream().flatMap(tUnit -> SubgraphWalker.flattenAST(tUnit).stream()).collect(Collectors.toList());
    List<CallExpression> calls = TestUtils.findByName(Util.filterCast(nodes, CallExpression.class), "printLog");
    calls.sort(new NodeComparator());
    List<RecordDeclaration> records = Util.filterCast(nodes, RecordDeclaration.class);
    // Extract all Variable declarations and field declarations for matching
    externalClass = TestUtils.getOfTypeWithName(nodes, RecordDeclaration.class, "ExternalClass");
    externVarName = TestUtils.getSubnodeOfTypeWithName(externalClass, FieldDeclaration.class, "varName");
    externStaticVarName = TestUtils.getSubnodeOfTypeWithName(externalClass, FieldDeclaration.class, "staticVarName");
    outerClass = TestUtils.getOfTypeWithName(nodes, RecordDeclaration.class, "ScopeVariables");
    outerVarName = outerClass.getFields().stream().filter(n -> n.getName().equals("varName")).findFirst().get();
    outerStaticVarName = outerClass.getFields().stream().filter(n -> n.getName().equals("staticVarName")).findFirst().get();
    outerImpThis = outerClass.getFields().stream().filter(n -> n.getName().equals("this")).findFirst().get();
    List<RecordDeclaration> classes = Util.filterCast(nodes, RecordDeclaration.class);
    // Inner class and its fields
    innerClass = TestUtils.getOfTypeWithName(nodes, RecordDeclaration.class, "ScopeVariables::InnerClass");
    innerVarName = innerClass.getFields().stream().filter(n -> n.getName().equals("varName")).findFirst().get();
    innerStaticVarName = innerClass.getFields().stream().filter(n -> n.getName().equals("staticVarName")).findFirst().get();
    innerImpThis = innerClass.getFields().stream().filter(n -> n.getName().equals("this")).findFirst().get();
    main = TestUtils.getOfTypeWithName(nodes, FunctionDeclaration.class, "main");
    // Functions in the outer and inner object
    outerFunction1 = outerClass.getMethods().stream().filter(method -> method.getName().equals("function1")).collect(Collectors.toList()).get(0);
    forStatements = Util.filterCast(SubgraphWalker.flattenAST(outerFunction1), ForStatement.class);
    outerFunction2 = outerClass.getMethods().stream().filter(method -> method.getName().equals("function2")).collect(Collectors.toList()).get(0);
    outerFunction3 = outerClass.getMethods().stream().filter(method -> method.getName().equals("function3")).collect(Collectors.toList()).get(0);
    outerFunction4 = outerClass.getMethods().stream().filter(method -> method.getName().equals("function4")).collect(Collectors.toList()).get(0);
    outerFunction5 = outerClass.getMethods().stream().filter(method -> method.getName().equals("function5")).collect(Collectors.toList()).get(0);
    innerFunction1 = innerClass.getMethods().stream().filter(method -> method.getName().equals("function1")).collect(Collectors.toList()).get(0);
    innerFunction2 = innerClass.getMethods().stream().filter(method -> method.getName().equals("function2")).collect(Collectors.toList()).get(0);
    for (CallExpression call : calls) {
        Expression first = call.getArguments().get(0);
        String logId = ((Literal) first).getValue().toString();
        Expression second = call.getArguments().get(1);
        callParamMap.put(logId, second);
    }
}
Also used : Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) Arrays(java.util.Arrays) FieldDeclaration(de.fraunhofer.aisec.cpg.graph.declarations.FieldDeclaration) HashMap(java.util.HashMap) BaseTest(de.fraunhofer.aisec.cpg.BaseTest) NodeComparator(de.fraunhofer.aisec.cpg.helpers.NodeComparator) Literal(de.fraunhofer.aisec.cpg.graph.statements.expressions.Literal) ForStatement(de.fraunhofer.aisec.cpg.graph.statements.ForStatement) TestInstance(org.junit.jupiter.api.TestInstance) BeforeAll(org.junit.jupiter.api.BeforeAll) Util(de.fraunhofer.aisec.cpg.helpers.Util) Map(java.util.Map) SubgraphWalker(de.fraunhofer.aisec.cpg.helpers.SubgraphWalker) FunctionDeclaration(de.fraunhofer.aisec.cpg.graph.declarations.FunctionDeclaration) Node(de.fraunhofer.aisec.cpg.graph.Node) ParamVariableDeclaration(de.fraunhofer.aisec.cpg.graph.declarations.ParamVariableDeclaration) MethodDeclaration(de.fraunhofer.aisec.cpg.graph.declarations.MethodDeclaration) VariableDeclaration(de.fraunhofer.aisec.cpg.graph.declarations.VariableDeclaration) DeclaredReferenceExpression(de.fraunhofer.aisec.cpg.graph.statements.expressions.DeclaredReferenceExpression) TestUtils(de.fraunhofer.aisec.cpg.TestUtils) RecordDeclaration(de.fraunhofer.aisec.cpg.graph.declarations.RecordDeclaration) IfStatement(de.fraunhofer.aisec.cpg.graph.statements.IfStatement) Collectors(java.util.stream.Collectors) File(java.io.File) ExecutionException(java.util.concurrent.ExecutionException) Test(org.junit.jupiter.api.Test) Expression(de.fraunhofer.aisec.cpg.graph.statements.expressions.Expression) List(java.util.List) CompoundStatement(de.fraunhofer.aisec.cpg.graph.statements.CompoundStatement) CatchClause(de.fraunhofer.aisec.cpg.graph.statements.CatchClause) MemberExpression(de.fraunhofer.aisec.cpg.graph.statements.expressions.MemberExpression) TranslationConfiguration(de.fraunhofer.aisec.cpg.TranslationConfiguration) TranslationManager(de.fraunhofer.aisec.cpg.TranslationManager) TranslationUnitDeclaration(de.fraunhofer.aisec.cpg.graph.declarations.TranslationUnitDeclaration) CallExpression(de.fraunhofer.aisec.cpg.graph.statements.expressions.CallExpression) NodeComparator(de.fraunhofer.aisec.cpg.helpers.NodeComparator) Node(de.fraunhofer.aisec.cpg.graph.Node) TranslationManager(de.fraunhofer.aisec.cpg.TranslationManager) TranslationConfiguration(de.fraunhofer.aisec.cpg.TranslationConfiguration) TranslationUnitDeclaration(de.fraunhofer.aisec.cpg.graph.declarations.TranslationUnitDeclaration) FieldDeclaration(de.fraunhofer.aisec.cpg.graph.declarations.FieldDeclaration) RecordDeclaration(de.fraunhofer.aisec.cpg.graph.declarations.RecordDeclaration) FunctionDeclaration(de.fraunhofer.aisec.cpg.graph.declarations.FunctionDeclaration) DeclaredReferenceExpression(de.fraunhofer.aisec.cpg.graph.statements.expressions.DeclaredReferenceExpression) Expression(de.fraunhofer.aisec.cpg.graph.statements.expressions.Expression) MemberExpression(de.fraunhofer.aisec.cpg.graph.statements.expressions.MemberExpression) CallExpression(de.fraunhofer.aisec.cpg.graph.statements.expressions.CallExpression) ForStatement(de.fraunhofer.aisec.cpg.graph.statements.ForStatement) File(java.io.File) CallExpression(de.fraunhofer.aisec.cpg.graph.statements.expressions.CallExpression) BeforeAll(org.junit.jupiter.api.BeforeAll)

Aggregations

CallExpression (de.fraunhofer.aisec.cpg.graph.statements.expressions.CallExpression)7 Literal (de.fraunhofer.aisec.cpg.graph.statements.expressions.Literal)7 Node (de.fraunhofer.aisec.cpg.graph.Node)6 BaseTest (de.fraunhofer.aisec.cpg.BaseTest)4 Test (org.junit.jupiter.api.Test)4 DeclaredReferenceExpression (de.fraunhofer.aisec.cpg.graph.statements.expressions.DeclaredReferenceExpression)3 TestUtils (de.fraunhofer.aisec.cpg.TestUtils)2 TranslationConfiguration (de.fraunhofer.aisec.cpg.TranslationConfiguration)2 TranslationManager (de.fraunhofer.aisec.cpg.TranslationManager)2 FieldDeclaration (de.fraunhofer.aisec.cpg.graph.declarations.FieldDeclaration)2 MethodDeclaration (de.fraunhofer.aisec.cpg.graph.declarations.MethodDeclaration)2 ParamVariableDeclaration (de.fraunhofer.aisec.cpg.graph.declarations.ParamVariableDeclaration)2 RecordDeclaration (de.fraunhofer.aisec.cpg.graph.declarations.RecordDeclaration)2 TranslationUnitDeclaration (de.fraunhofer.aisec.cpg.graph.declarations.TranslationUnitDeclaration)2 VariableDeclaration (de.fraunhofer.aisec.cpg.graph.declarations.VariableDeclaration)2 ForStatement (de.fraunhofer.aisec.cpg.graph.statements.ForStatement)2 Expression (de.fraunhofer.aisec.cpg.graph.statements.expressions.Expression)2 MemberExpression (de.fraunhofer.aisec.cpg.graph.statements.expressions.MemberExpression)2 NodeComparator (de.fraunhofer.aisec.cpg.helpers.NodeComparator)2 SubgraphWalker (de.fraunhofer.aisec.cpg.helpers.SubgraphWalker)2