Commit 0e03c7a0 authored by Matthieu Gayraud's avatar Matthieu Gayraud
Browse files

Fix issue #868

parent 27803354
<?xml version="1.0" encoding="ASCII"?>
<java:Model xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:java="http://www.eclipse.org/MoDisco/Java/0.2.incubation/java" name="TestProject">
<ownedElements name="(default package)">
<ownedElements xsi:type="java:ClassDeclaration" originalCompilationUnit="//@compilationUnits.0" name="A">
<modifier visibility="public"/>
<bodyDeclarations xsi:type="java:FieldDeclaration" originalCompilationUnit="//@compilationUnits.0">
<modifier visibility="private"/>
<type type="//@ownedElements.1/@ownedPackages.1/@ownedElements.2"/>
<fragments originalCompilationUnit="//@compilationUnits.0" name="foo" usageInVariableAccess="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.1/@body/@statements.0/@expression //@ownedElements.0/@ownedElements.0/@bodyDeclarations.2/@body/@statements.0/@expression/@leftHandSide //@ownedElements.0/@ownedElements.0/@bodyDeclarations.3/@body/@statements.0/@expression/@leftHandSide //@ownedElements.0/@ownedElements.0/@bodyDeclarations.4/@body/@statements.0/@expression/@leftOperand //@ownedElements.0/@ownedElements.0/@bodyDeclarations.4/@body/@statements.0/@thenStatement/@expression/@rightOperand //@ownedElements.0/@ownedElements.0/@bodyDeclarations.4/@body/@statements.1/@expression/@leftOperand //@ownedElements.0/@ownedElements.0/@bodyDeclarations.5/@body/@statements.1/@thenStatement/@expression/@rightOperand //@ownedElements.0/@ownedElements.0/@bodyDeclarations.5/@body/@statements.2/@expression/@leftOperand //@ownedElements.0/@ownedElements.0/@bodyDeclarations.6/@body/@statements.0/@thenStatement/@expression/@rightOperand //@ownedElements.0/@ownedElements.0/@bodyDeclarations.6/@body/@statements.1/@expression/@leftOperand //@ownedElements.0/@ownedElements.0/@bodyDeclarations.7/@body/@statements.0/@expression/@leftOperand/@expression/@rightHandSide //@ownedElements.0/@ownedElements.0/@bodyDeclarations.7/@body/@statements.0/@thenStatement/@expression/@rightOperand //@ownedElements.0/@ownedElements.0/@bodyDeclarations.7/@body/@statements.1/@expression/@leftOperand //@ownedElements.0/@ownedElements.0/@bodyDeclarations.18/@body/@statements.0/@expression/@leftOperand/@field //@ownedElements.0/@ownedElements.0/@bodyDeclarations.18/@body/@statements.0/@expression/@rightOperand/@field">
<initializer xsi:type="java:StringLiteral" originalCompilationUnit="//@compilationUnits.0" escapedValue="&quot;foo&quot;"/>
</fragments>
</bodyDeclarations>
<bodyDeclarations xsi:type="java:MethodDeclaration" originalCompilationUnit="//@compilationUnits.0" name="getFoo" usages="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.8/@body/@statements.0/@expression/@leftOperand //@ownedElements.0/@ownedElements.0/@bodyDeclarations.8/@body/@statements.1/@expression/@expression/@leftOperand">
<modifier visibility="public"/>
<body originalCompilationUnit="//@compilationUnits.0">
<statements xsi:type="java:ReturnStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.0/@fragments.0"/>
</statements>
</body>
<returnType type="//@ownedElements.1/@ownedPackages.1/@ownedElements.2"/>
</bodyDeclarations>
<bodyDeclarations xsi:type="java:MethodDeclaration" originalCompilationUnit="//@compilationUnits.0" name="setFoo">
<modifier visibility="public"/>
<body originalCompilationUnit="//@compilationUnits.0">
<statements xsi:type="java:ExpressionStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:Assignment" originalCompilationUnit="//@compilationUnits.0">
<leftHandSide xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.0/@fragments.0"/>
<rightHandSide xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.2/@parameters.0"/>
</expression>
</statements>
</body>
<parameters originalCompilationUnit="//@compilationUnits.0" name="a" usageInVariableAccess="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.2/@body/@statements.0/@expression/@rightHandSide">
<modifier/>
<type type="//@ownedElements.1/@ownedPackages.1/@ownedElements.2"/>
</parameters>
<returnType type="//@orphanTypes.5"/>
</bodyDeclarations>
<bodyDeclarations xsi:type="java:MethodDeclaration" originalCompilationUnit="//@compilationUnits.0" name="A">
<modifier visibility="public"/>
<body originalCompilationUnit="//@compilationUnits.0">
<statements xsi:type="java:ExpressionStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:Assignment" originalCompilationUnit="//@compilationUnits.0">
<leftHandSide xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.0/@fragments.0"/>
<rightHandSide xsi:type="java:StringLiteral" originalCompilationUnit="//@compilationUnits.0" escapedValue="&quot;A&quot;"/>
</expression>
</statements>
</body>
<returnType type="//@orphanTypes.5"/>
</bodyDeclarations>
<bodyDeclarations xsi:type="java:MethodDeclaration" originalCompilationUnit="//@compilationUnits.0" name="res0">
<comments xsi:type="java:LineComment" originalCompilationUnit="//@compilationUnits.0" content="//Test pour juste infix expression avec 2 SingleAccess" prefixOfParent="true"/>
<comments xsi:type="java:LineComment" originalCompilationUnit="//@compilationUnits.0" content="//WORKS " prefixOfParent="true"/>
<modifier visibility="public"/>
<body originalCompilationUnit="//@compilationUnits.0">
<statements xsi:type="java:IfStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:InfixExpression" originalCompilationUnit="//@compilationUnits.0" operator="==">
<rightOperand xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.4/@parameters.0"/>
<leftOperand xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.0/@fragments.0"/>
</expression>
<thenStatement xsi:type="java:ReturnStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:InfixExpression" originalCompilationUnit="//@compilationUnits.0" operator="+">
<rightOperand xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.0/@fragments.0"/>
<leftOperand xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.4/@parameters.0"/>
</expression>
</thenStatement>
</statements>
<statements xsi:type="java:ReturnStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:InfixExpression" originalCompilationUnit="//@compilationUnits.0" operator="+">
<rightOperand xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.4/@parameters.0"/>
<leftOperand xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.0/@fragments.0"/>
</expression>
</statements>
</body>
<parameters originalCompilationUnit="//@compilationUnits.0" name="t" usageInVariableAccess="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.4/@body/@statements.0/@expression/@rightOperand //@ownedElements.0/@ownedElements.0/@bodyDeclarations.4/@body/@statements.0/@thenStatement/@expression/@leftOperand //@ownedElements.0/@ownedElements.0/@bodyDeclarations.4/@body/@statements.1/@expression/@rightOperand">
<modifier/>
<type type="//@ownedElements.1/@ownedPackages.1/@ownedElements.2"/>
</parameters>
<returnType type="//@ownedElements.1/@ownedPackages.1/@ownedElements.2"/>
</bodyDeclarations>
<bodyDeclarations xsi:type="java:MethodDeclaration" originalCompilationUnit="//@compilationUnits.0" name="res1">
<comments xsi:type="java:LineComment" originalCompilationUnit="//@compilationUnits.0" content="//Test avec cast d'un c&#xf4;t&#xe9; (CastExpression)" prefixOfParent="true"/>
<comments xsi:type="java:LineComment" originalCompilationUnit="//@compilationUnits.0" content="//WORKS" prefixOfParent="true"/>
<modifier visibility="public"/>
<body originalCompilationUnit="//@compilationUnits.0">
<statements xsi:type="java:VariableDeclarationStatement" originalCompilationUnit="//@compilationUnits.0">
<type type="//@ownedElements.1/@ownedPackages.1/@ownedElements.5"/>
<fragments originalCompilationUnit="//@compilationUnits.0" name="a" usageInVariableAccess="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.5/@body/@statements.1/@expression/@leftOperand/@expression">
<initializer xsi:type="java:NumberLiteral" originalCompilationUnit="//@compilationUnits.0" tokenValue="1"/>
</fragments>
<modifier/>
</statements>
<statements xsi:type="java:IfStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:InfixExpression" originalCompilationUnit="//@compilationUnits.0" operator="!=">
<rightOperand xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.5/@parameters.0"/>
<leftOperand xsi:type="java:MethodInvocation" originalCompilationUnit="//@compilationUnits.0" method="//@ownedElements.1/@ownedPackages.1/@ownedElements.5/@bodyDeclarations.0">
<expression xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.5/@body/@statements.0/@fragments.0"/>
</leftOperand>
</expression>
<thenStatement xsi:type="java:ReturnStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:InfixExpression" originalCompilationUnit="//@compilationUnits.0" operator="+">
<rightOperand xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.0/@fragments.0"/>
<leftOperand xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.5/@parameters.0"/>
</expression>
</thenStatement>
</statements>
<statements xsi:type="java:ReturnStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:InfixExpression" originalCompilationUnit="//@compilationUnits.0" operator="+">
<rightOperand xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.5/@parameters.0"/>
<leftOperand xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.0/@fragments.0"/>
</expression>
</statements>
</body>
<parameters originalCompilationUnit="//@compilationUnits.0" name="t" usageInVariableAccess="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.5/@body/@statements.1/@expression/@rightOperand //@ownedElements.0/@ownedElements.0/@bodyDeclarations.5/@body/@statements.1/@thenStatement/@expression/@leftOperand //@ownedElements.0/@ownedElements.0/@bodyDeclarations.5/@body/@statements.2/@expression/@rightOperand">
<modifier/>
<type type="//@ownedElements.1/@ownedPackages.1/@ownedElements.2"/>
</parameters>
<returnType type="//@ownedElements.1/@ownedPackages.1/@ownedElements.2"/>
</bodyDeclarations>
<bodyDeclarations xsi:type="java:MethodDeclaration" originalCompilationUnit="//@compilationUnits.0" name="res2">
<comments xsi:type="java:LineComment" originalCompilationUnit="//@compilationUnits.0" content="//Test avec condition (ConditionExpression)" prefixOfParent="true"/>
<comments xsi:type="java:LineComment" originalCompilationUnit="//@compilationUnits.0" content="//DOES NOT WORK" prefixOfParent="true"/>
<modifier visibility="public"/>
<body originalCompilationUnit="//@compilationUnits.0">
<statements xsi:type="java:IfStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:InfixExpression" originalCompilationUnit="//@compilationUnits.0" operator="==">
<rightOperand xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.6/@parameters.0"/>
<leftOperand xsi:type="java:ParenthesizedExpression" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:ConditionalExpression" originalCompilationUnit="//@compilationUnits.0">
<elseExpression xsi:type="java:StringLiteral" originalCompilationUnit="//@compilationUnits.0" escapedValue="&quot;bar&quot;"/>
<expression xsi:type="java:InfixExpression" originalCompilationUnit="//@compilationUnits.0" operator="==">
<rightOperand xsi:type="java:NumberLiteral" originalCompilationUnit="//@compilationUnits.0" tokenValue="3"/>
<leftOperand xsi:type="java:NumberLiteral" originalCompilationUnit="//@compilationUnits.0" tokenValue="3"/>
</expression>
<thenExpression xsi:type="java:StringLiteral" originalCompilationUnit="//@compilationUnits.0" escapedValue="&quot;foo&quot;"/>
</expression>
</leftOperand>
</expression>
<thenStatement xsi:type="java:ReturnStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:InfixExpression" originalCompilationUnit="//@compilationUnits.0" operator="+">
<rightOperand xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.0/@fragments.0"/>
<leftOperand xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.6/@parameters.0"/>
</expression>
</thenStatement>
</statements>
<statements xsi:type="java:ReturnStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:InfixExpression" originalCompilationUnit="//@compilationUnits.0" operator="+">
<rightOperand xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.6/@parameters.0"/>
<leftOperand xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.0/@fragments.0"/>
</expression>
</statements>
</body>
<parameters originalCompilationUnit="//@compilationUnits.0" name="t" usageInVariableAccess="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.6/@body/@statements.0/@expression/@rightOperand //@ownedElements.0/@ownedElements.0/@bodyDeclarations.6/@body/@statements.0/@thenStatement/@expression/@leftOperand //@ownedElements.0/@ownedElements.0/@bodyDeclarations.6/@body/@statements.1/@expression/@rightOperand">
<modifier/>
<type type="//@ownedElements.1/@ownedPackages.1/@ownedElements.2"/>
</parameters>
<returnType type="//@ownedElements.1/@ownedPackages.1/@ownedElements.2"/>
</bodyDeclarations>
<bodyDeclarations xsi:type="java:MethodDeclaration" originalCompilationUnit="//@compilationUnits.0" name="res3">
<comments xsi:type="java:LineComment" originalCompilationUnit="//@compilationUnits.0" content="//Test avec assignement (Assignement)" prefixOfParent="true"/>
<comments xsi:type="java:LineComment" originalCompilationUnit="//@compilationUnits.0" content="//DOES NOT WORK" prefixOfParent="true"/>
<modifier visibility="public"/>
<body originalCompilationUnit="//@compilationUnits.0">
<statements xsi:type="java:IfStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:InfixExpression" originalCompilationUnit="//@compilationUnits.0" operator="!=">
<rightOperand xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.7/@parameters.0"/>
<leftOperand xsi:type="java:ParenthesizedExpression" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:Assignment" originalCompilationUnit="//@compilationUnits.0" operator="+=">
<leftHandSide xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.7/@parameters.0"/>
<rightHandSide xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.0/@fragments.0"/>
</expression>
</leftOperand>
</expression>
<thenStatement xsi:type="java:ReturnStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:InfixExpression" originalCompilationUnit="//@compilationUnits.0" operator="+">
<rightOperand xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.0/@fragments.0"/>
<leftOperand xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.7/@parameters.0"/>
</expression>
</thenStatement>
</statements>
<statements xsi:type="java:ReturnStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:InfixExpression" originalCompilationUnit="//@compilationUnits.0" operator="+">
<rightOperand xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.7/@parameters.0"/>
<leftOperand xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.0/@fragments.0"/>
</expression>
</statements>
</body>
<parameters originalCompilationUnit="//@compilationUnits.0" name="t" usageInVariableAccess="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.7/@body/@statements.0/@expression/@leftOperand/@expression/@leftHandSide //@ownedElements.0/@ownedElements.0/@bodyDeclarations.7/@body/@statements.0/@expression/@rightOperand //@ownedElements.0/@ownedElements.0/@bodyDeclarations.7/@body/@statements.0/@thenStatement/@expression/@leftOperand //@ownedElements.0/@ownedElements.0/@bodyDeclarations.7/@body/@statements.1/@expression/@rightOperand">
<modifier/>
<type type="//@ownedElements.1/@ownedPackages.1/@ownedElements.2"/>
</parameters>
<returnType type="//@ownedElements.1/@ownedPackages.1/@ownedElements.2"/>
</bodyDeclarations>
<bodyDeclarations xsi:type="java:MethodDeclaration" originalCompilationUnit="//@compilationUnits.0" name="res4">
<comments xsi:type="java:LineComment" originalCompilationUnit="//@compilationUnits.0" content="//WORKS" prefixOfParent="true"/>
<modifier visibility="public"/>
<body originalCompilationUnit="//@compilationUnits.0">
<statements xsi:type="java:IfStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:InfixExpression" originalCompilationUnit="//@compilationUnits.0" operator="==">
<rightOperand xsi:type="java:StringLiteral" originalCompilationUnit="//@compilationUnits.0" escapedValue="&quot;1&quot;"/>
<leftOperand xsi:type="java:MethodInvocation" originalCompilationUnit="//@compilationUnits.0" method="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.1"/>
</expression>
<thenStatement xsi:type="java:ReturnStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:BooleanLiteral" originalCompilationUnit="//@compilationUnits.0"/>
</thenStatement>
</statements>
<statements xsi:type="java:ReturnStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:ParenthesizedExpression" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:InfixExpression" originalCompilationUnit="//@compilationUnits.0" operator="==">
<rightOperand xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.8/@parameters.0"/>
<leftOperand xsi:type="java:MethodInvocation" originalCompilationUnit="//@compilationUnits.0" method="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.1"/>
</expression>
</expression>
</statements>
</body>
<parameters originalCompilationUnit="//@compilationUnits.0" name="toto" usageInVariableAccess="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.8/@body/@statements.1/@expression/@expression/@rightOperand">
<modifier/>
<type type="//@ownedElements.1/@ownedPackages.1/@ownedElements.2"/>
</parameters>
<returnType type="//@orphanTypes.4"/>
</bodyDeclarations>
<bodyDeclarations xsi:type="java:MethodDeclaration" originalCompilationUnit="//@compilationUnits.0" name="res5">
<comments xsi:type="java:LineComment" originalCompilationUnit="//@compilationUnits.0" content="//Test avec ArrayAccess" prefixOfParent="true"/>
<comments xsi:type="java:LineComment" originalCompilationUnit="//@compilationUnits.0" content="//DOES NOT WORK" prefixOfParent="true"/>
<modifier visibility="public"/>
<body originalCompilationUnit="//@compilationUnits.0">
<statements xsi:type="java:VariableDeclarationStatement" originalCompilationUnit="//@compilationUnits.0">
<type type="//@orphanTypes.9"/>
<fragments originalCompilationUnit="//@compilationUnits.0" name="toto" usageInVariableAccess="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.9/@body/@statements.1/@expression/@expression //@ownedElements.0/@ownedElements.0/@bodyDeclarations.9/@body/@statements.2/@expression/@leftOperand/@expression">
<initializer xsi:type="java:ClassInstanceCreation" originalCompilationUnit="//@compilationUnits.0" method="//@ownedElements.1/@ownedPackages.0/@ownedElements.0/@bodyDeclarations.0">
<type type="//@orphanTypes.9"/>
</initializer>
</fragments>
<modifier/>
</statements>
<statements xsi:type="java:ExpressionStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:MethodInvocation" originalCompilationUnit="//@compilationUnits.0" method="//@ownedElements.1/@ownedPackages.0/@ownedElements.0/@bodyDeclarations.1">
<arguments xsi:type="java:StringLiteral" originalCompilationUnit="//@compilationUnits.0" escapedValue="&quot;foo&quot;"/>
<expression xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.9/@body/@statements.0/@fragments.0"/>
</expression>
</statements>
<statements xsi:type="java:ReturnStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:InfixExpression" originalCompilationUnit="//@compilationUnits.0" operator="!=">
<rightOperand xsi:type="java:StringLiteral" originalCompilationUnit="//@compilationUnits.0" escapedValue="&quot;titi&quot;"/>
<leftOperand xsi:type="java:MethodInvocation" originalCompilationUnit="//@compilationUnits.0" method="//@ownedElements.1/@ownedPackages.0/@ownedElements.0/@bodyDeclarations.2">
<arguments xsi:type="java:NumberLiteral" originalCompilationUnit="//@compilationUnits.0" tokenValue="0"/>
<expression xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.9/@body/@statements.0/@fragments.0"/>
</leftOperand>
</expression>
</statements>
</body>
<returnType type="//@orphanTypes.4"/>
</bodyDeclarations>
<bodyDeclarations xsi:type="java:MethodDeclaration" originalCompilationUnit="//@compilationUnits.0" name="res6">
<comments xsi:type="java:LineComment" originalCompilationUnit="//@compilationUnits.0" content="//Test avec InfixExpression" prefixOfParent="true"/>
<comments xsi:type="java:LineComment" originalCompilationUnit="//@compilationUnits.0" content="//WORKS" prefixOfParent="true"/>
<modifier visibility="public"/>
<body originalCompilationUnit="//@compilationUnits.0">
<statements xsi:type="java:ReturnStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:ParenthesizedExpression" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:InfixExpression" originalCompilationUnit="//@compilationUnits.0" operator="==">
<rightOperand xsi:type="java:ParenthesizedExpression" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:InfixExpression" originalCompilationUnit="//@compilationUnits.0" operator="==">
<rightOperand xsi:type="java:StringLiteral" originalCompilationUnit="//@compilationUnits.0" escapedValue="&quot;tutu&quot;"/>
<leftOperand xsi:type="java:StringLiteral" originalCompilationUnit="//@compilationUnits.0" escapedValue="&quot;titi&quot;"/>
</expression>
</rightOperand>
<leftOperand xsi:type="java:ParenthesizedExpression" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:InfixExpression" originalCompilationUnit="//@compilationUnits.0" operator="!=">
<rightOperand xsi:type="java:StringLiteral" originalCompilationUnit="//@compilationUnits.0" escapedValue="&quot;bar&quot;"/>
<leftOperand xsi:type="java:StringLiteral" originalCompilationUnit="//@compilationUnits.0" escapedValue="&quot;foo&quot;"/>
</expression>
</leftOperand>
</expression>
</expression>
</statements>
</body>
<returnType type="//@orphanTypes.4"/>
</bodyDeclarations>
<bodyDeclarations xsi:type="java:MethodDeclaration" originalCompilationUnit="//@compilationUnits.0" name="res6b">
<comments xsi:type="java:LineComment" originalCompilationUnit="//@compilationUnits.0" content="//Test avec InfixExpression" prefixOfParent="true"/>
<comments xsi:type="java:LineComment" originalCompilationUnit="//@compilationUnits.0" content="//DOES NOT WORK" prefixOfParent="true"/>
<modifier visibility="public"/>
<body originalCompilationUnit="//@compilationUnits.0">
<statements xsi:type="java:ReturnStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:ParenthesizedExpression" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:InfixExpression" originalCompilationUnit="//@compilationUnits.0" operator="!=">
<rightOperand xsi:type="java:StringLiteral" originalCompilationUnit="//@compilationUnits.0" escapedValue="&quot;titi&quot;"/>
<leftOperand xsi:type="java:ParenthesizedExpression" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:InfixExpression" originalCompilationUnit="//@compilationUnits.0" operator="+">
<rightOperand xsi:type="java:StringLiteral" originalCompilationUnit="//@compilationUnits.0" escapedValue="&quot;bar&quot;"/>
<leftOperand xsi:type="java:StringLiteral" originalCompilationUnit="//@compilationUnits.0" escapedValue="&quot;foo&quot;"/>
</expression>
</leftOperand>
</expression>
</expression>
</statements>
</body>
<returnType type="//@orphanTypes.4"/>
</bodyDeclarations>
<bodyDeclarations xsi:type="java:MethodDeclaration" originalCompilationUnit="//@compilationUnits.0" name="res7">
<comments xsi:type="java:LineComment" originalCompilationUnit="//@compilationUnits.0" content="//DOES NOT WORK" prefixOfParent="true"/>
<modifier visibility="public"/>
<body originalCompilationUnit="//@compilationUnits.0">
<statements xsi:type="java:VariableDeclarationStatement" originalCompilationUnit="//@compilationUnits.0">
<type type="//@ownedElements.1/@ownedPackages.1/@ownedElements.2"/>
<fragments originalCompilationUnit="//@compilationUnits.0" name="str" usageInVariableAccess="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.12/@body/@statements.1/@expression/@leftOperand/@expression/@leftHandSide">
<initializer xsi:type="java:StringLiteral" originalCompilationUnit="//@compilationUnits.0" escapedValue="&quot;&quot;"/>
</fragments>
<modifier/>
</statements>
<statements xsi:type="java:ReturnStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:InfixExpression" originalCompilationUnit="//@compilationUnits.0" operator="==">
<rightOperand xsi:type="java:StringLiteral" originalCompilationUnit="//@compilationUnits.0" escapedValue="&quot;bar&quot;"/>
<leftOperand xsi:type="java:ParenthesizedExpression" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:Assignment" originalCompilationUnit="//@compilationUnits.0">
<leftHandSide xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.12/@body/@statements.0/@fragments.0"/>
<rightHandSide xsi:type="java:StringLiteral" originalCompilationUnit="//@compilationUnits.0" escapedValue="&quot;foo&quot;"/>
</expression>
</leftOperand>
</expression>
</statements>
</body>
<returnType type="//@orphanTypes.4"/>
</bodyDeclarations>
<bodyDeclarations xsi:type="java:MethodDeclaration" originalCompilationUnit="//@compilationUnits.0" name="res8">
<comments xsi:type="java:LineComment" originalCompilationUnit="//@compilationUnits.0" content="//WORKS" prefixOfParent="true"/>
<modifier visibility="public"/>
<body originalCompilationUnit="//@compilationUnits.0">
<statements xsi:type="java:ReturnStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:InfixExpression" originalCompilationUnit="//@compilationUnits.0" operator="==">
<rightOperand xsi:type="java:NumberLiteral" originalCompilationUnit="//@compilationUnits.0" tokenValue="4"/>
<leftOperand xsi:type="java:NumberLiteral" originalCompilationUnit="//@compilationUnits.0" tokenValue="3"/>
</expression>
</statements>
</body>
<returnType type="//@orphanTypes.4"/>
</bodyDeclarations>
<bodyDeclarations xsi:type="java:MethodDeclaration" originalCompilationUnit="//@compilationUnits.0" name="res9">
<comments xsi:type="java:LineComment" originalCompilationUnit="//@compilationUnits.0" content="//WORKS" prefixOfParent="true"/>
<modifier visibility="public"/>
<body originalCompilationUnit="//@compilationUnits.0">
<statements xsi:type="java:ReturnStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:InfixExpression" originalCompilationUnit="//@compilationUnits.0" operator="==">
<rightOperand xsi:type="java:BooleanLiteral" originalCompilationUnit="//@compilationUnits.0" value="true"/>
<leftOperand xsi:type="java:InfixExpression" originalCompilationUnit="//@compilationUnits.0" operator="!=">
<rightOperand xsi:type="java:StringLiteral" originalCompilationUnit="//@compilationUnits.0" escapedValue="&quot;toto&quot;"/>
<leftOperand xsi:type="java:StringLiteral" originalCompilationUnit="//@compilationUnits.0" escapedValue="&quot;foo&quot;"/>
</leftOperand>
</expression>
</statements>
</body>
<returnType type="//@orphanTypes.4"/>
</bodyDeclarations>
<bodyDeclarations xsi:type="java:MethodDeclaration" originalCompilationUnit="//@compilationUnits.0" name="res10">
<comments xsi:type="java:LineComment" originalCompilationUnit="//@compilationUnits.0" content="//DOES NOT WORK" prefixOfParent="true"/>
<comments xsi:type="java:LineComment" originalCompilationUnit="//@compilationUnits.0" content="//ArrayAccess" prefixOfParent="true"/>
<modifier visibility="public"/>
<body originalCompilationUnit="//@compilationUnits.0">
<statements xsi:type="java:VariableDeclarationStatement" originalCompilationUnit="//@compilationUnits.0">
<type type="//@orphanTypes.10"/>
<fragments originalCompilationUnit="//@compilationUnits.0" name="toto" usageInVariableAccess="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.15/@body/@statements.1/@expression/@leftHandSide/@array //@ownedElements.0/@ownedElements.0/@bodyDeclarations.15/@body/@statements.2/@expression/@leftOperand/@array">
<initializer xsi:type="java:ArrayCreation" originalCompilationUnit="//@compilationUnits.0">
<dimensions xsi:type="java:NumberLiteral" originalCompilationUnit="//@compilationUnits.0" tokenValue="1"/>
<type type="//@orphanTypes.10"/>
</initializer>
</fragments>
<modifier/>
</statements>
<statements xsi:type="java:ExpressionStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:Assignment" originalCompilationUnit="//@compilationUnits.0">
<leftHandSide xsi:type="java:ArrayAccess" originalCompilationUnit="//@compilationUnits.0">
<array xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.15/@body/@statements.0/@fragments.0"/>
<index xsi:type="java:NumberLiteral" originalCompilationUnit="//@compilationUnits.0" tokenValue="0"/>
</leftHandSide>
<rightHandSide xsi:type="java:StringLiteral" originalCompilationUnit="//@compilationUnits.0" escapedValue="&quot;foo&quot;"/>
</expression>
</statements>
<statements xsi:type="java:ReturnStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:InfixExpression" originalCompilationUnit="//@compilationUnits.0" operator="==">
<rightOperand xsi:type="java:StringLiteral" originalCompilationUnit="//@compilationUnits.0" escapedValue="&quot;bar&quot;"/>
<leftOperand xsi:type="java:ArrayAccess" originalCompilationUnit="//@compilationUnits.0">
<array xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.15/@body/@statements.0/@fragments.0"/>
<index xsi:type="java:NumberLiteral" originalCompilationUnit="//@compilationUnits.0" tokenValue="0"/>
</leftOperand>
</expression>
</statements>
</body>
<returnType type="//@orphanTypes.4"/>
</bodyDeclarations>
<bodyDeclarations xsi:type="java:MethodDeclaration" originalCompilationUnit="//@compilationUnits.0" name="res11">
<comments xsi:type="java:LineComment" originalCompilationUnit="//@compilationUnits.0" content="//WORKS" prefixOfParent="true"/>
<modifier visibility="public"/>
<body originalCompilationUnit="//@compilationUnits.0">
<statements xsi:type="java:VariableDeclarationStatement" originalCompilationUnit="//@compilationUnits.0">
<type type="//@ownedElements.1/@ownedPackages.1/@ownedElements.2"/>
<fragments originalCompilationUnit="//@compilationUnits.0" name="in" usageInVariableAccess="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.16/@body/@statements.1/@expression/@expression/@leftOperand/@expression">
<initializer xsi:type="java:StringLiteral" originalCompilationUnit="//@compilationUnits.0" escapedValue="&quot;foo&quot;"/>
</fragments>
<modifier/>
</statements>
<statements xsi:type="java:ReturnStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:ParenthesizedExpression" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:InfixExpression" originalCompilationUnit="//@compilationUnits.0" operator="!=">
<rightOperand xsi:type="java:StringLiteral" originalCompilationUnit="//@compilationUnits.0" escapedValue="&quot;foo&quot;"/>
<leftOperand xsi:type="java:CastExpression" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.16/@body/@statements.0/@fragments.0"/>
<type type="//@ownedElements.1/@ownedPackages.1/@ownedElements.2"/>
</leftOperand>
</expression>
</expression>
</statements>
</body>
<returnType type="//@orphanTypes.4"/>
</bodyDeclarations>
<bodyDeclarations xsi:type="java:MethodDeclaration" originalCompilationUnit="//@compilationUnits.0" name="res12">
<modifier visibility="public"/>
<body originalCompilationUnit="//@compilationUnits.0">
<statements xsi:type="java:VariableDeclarationStatement" originalCompilationUnit="//@compilationUnits.0">
<type type="//@ownedElements.1/@ownedPackages.1/@ownedElements.2"/>
<fragments originalCompilationUnit="//@compilationUnits.0" name="str" usageInVariableAccess="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.17/@body/@statements.2/@expression/@leftOperand/@expression/@leftHandSide">
<initializer xsi:type="java:StringLiteral" originalCompilationUnit="//@compilationUnits.0" escapedValue="&quot;&quot;"/>
</fragments>
<modifier/>
</statements>
<statements xsi:type="java:VariableDeclarationStatement" originalCompilationUnit="//@compilationUnits.0">
<type type="//@ownedElements.1/@ownedPackages.1/@ownedElements.2"/>
<fragments originalCompilationUnit="//@compilationUnits.0" name="str2" usageInVariableAccess="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.17/@body/@statements.2/@expression/@rightOperand/@expression/@leftHandSide">
<initializer xsi:type="java:StringLiteral" originalCompilationUnit="//@compilationUnits.0" escapedValue="&quot;&quot;"/>
</fragments>
<modifier/>
</statements>
<statements xsi:type="java:ReturnStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:InfixExpression" originalCompilationUnit="//@compilationUnits.0" operator="==">
<rightOperand xsi:type="java:ParenthesizedExpression" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:Assignment" originalCompilationUnit="//@compilationUnits.0">
<leftHandSide xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.17/@body/@statements.1/@fragments.0"/>
<rightHandSide xsi:type="java:StringLiteral" originalCompilationUnit="//@compilationUnits.0" escapedValue="&quot;bar&quot;"/>
</expression>
</rightOperand>
<leftOperand xsi:type="java:ParenthesizedExpression" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:Assignment" originalCompilationUnit="//@compilationUnits.0">
<leftHandSide xsi:type="java:SingleVariableAccess" variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.17/@body/@statements.0/@fragments.0"/>
<rightHandSide xsi:type="java:StringLiteral" originalCompilationUnit="//@compilationUnits.0" escapedValue="&quot;foo&quot;"/>
</expression>
</leftOperand>
</expression>
</statements>
</body>
<returnType type="//@orphanTypes.4"/>
</bodyDeclarations>
<bodyDeclarations xsi:type="java:MethodDeclaration" originalCompilationUnit="//@compilationUnits.0" name="res13">
<modifier visibility="public"/>
<body originalCompilationUnit="//@compilationUnits.0">
<statements xsi:type="java:ReturnStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:InfixExpression" originalCompilationUnit="//@compilationUnits.0" operator="==">
<rightOperand xsi:type="java:FieldAccess" originalCompilationUnit="//@compilationUnits.0">
<field variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.0/@fragments.0"/>
<expression xsi:type="java:ThisExpression" originalCompilationUnit="//@compilationUnits.0"/>
</rightOperand>
<leftOperand xsi:type="java:FieldAccess" originalCompilationUnit="//@compilationUnits.0">
<field variable="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.0/@fragments.0"/>
<expression xsi:type="java:ThisExpression" originalCompilationUnit="//@compilationUnits.0"/>
</leftOperand>
</expression>
</statements>
</body>
<returnType type="//@orphanTypes.4"/>
</bodyDeclarations>
</ownedElements>
</ownedElements>
<ownedElements name="java" proxy="true">
<ownedPackages name="util" proxy="true">
<ownedElements xsi:type="java:ClassDeclaration" name="ArrayList" proxy="true" usagesInImports="//@compilationUnits.0/@imports.0" usagesInTypeAccess="//@orphanTypes.9/@type">
<bodyDeclarations xsi:type="java:ConstructorDeclaration" name="ArrayList" proxy="true" usages="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.9/@body/@statements.0/@fragments.0/@initializer"/>
<bodyDeclarations xsi:type="java:MethodDeclaration" name="add" proxy="true" usages="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.9/@body/@statements.1/@expression">
<parameters name="arg0" proxy="true">
<type type="//@ownedElements.1/@ownedPackages.1/@ownedElements.7"/>
</parameters>
</bodyDeclarations>
<bodyDeclarations xsi:type="java:MethodDeclaration" name="get" proxy="true" usages="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.9/@body/@statements.2/@expression/@leftOperand">
<parameters name="arg0" proxy="true">
<type type="//@orphanTypes.0"/>
</parameters>
</bodyDeclarations>
<superInterfaces type="//@ownedElements.1/@ownedPackages.0/@ownedElements.4"/>
<superInterfaces type="//@ownedElements.1/@ownedPackages.0/@ownedElements.5"/>
<superInterfaces type="//@ownedElements.1/@ownedPackages.1/@ownedElements.1"/>
<superInterfaces type="//@ownedElements.1/@ownedPackages.2/@ownedElements.0"/>
<typeParameters name="E" proxy="true"/>
<superClass type="//@ownedElements.1/@ownedPackages.0/@ownedElements.1"/>
</ownedElements>
<ownedElements xsi:type="java:ClassDeclaration" name="AbstractList" proxy="true" usagesInTypeAccess="//@ownedElements.1/@ownedPackages.0/@ownedElements.0/@superClass">
<superInterfaces type="//@ownedElements.1/@ownedPackages.0/@ownedElements.4"/>
<typeParameters name="E" proxy="true"/>
<superClass type="//@ownedElements.1/@ownedPackages.0/@ownedElements.2"/>
</ownedElements>
<ownedElements xsi:type="java:ClassDeclaration" name="AbstractCollection" proxy="true" usagesInTypeAccess="//@ownedElements.1/@ownedPackages.0/@ownedElements.1/@superClass">
<superInterfaces type="//@ownedElements.1/@ownedPackages.0/@ownedElements.3"/>
<typeParameters name="E" proxy="true"/>
</ownedElements>
<ownedElements xsi:type="java:InterfaceDeclaration" name="Collection" proxy="true" usagesInTypeAccess="//@ownedElements.1/@ownedPackages.0/@ownedElements.2/@superInterfaces.0 //@ownedElements.1/@ownedPackages.0/@ownedElements.4/@superInterfaces.0">
<superInterfaces type="//@ownedElements.1/@ownedPackages.1/@ownedElements.0"/>
<typeParameters name="E" proxy="true"/>
</ownedElements>
<ownedElements xsi:type="java:InterfaceDeclaration" name="List" proxy="true" usagesInTypeAccess="//@ownedElements.1/@ownedPackages.0/@ownedElements.1/@superInterfaces.0 //@ownedElements.1/@ownedPackages.0/@ownedElements.0/@superInterfaces.0">
<superInterfaces type="//@ownedElements.1/@ownedPackages.0/@ownedElements.3"/>
<typeParameters name="E" proxy="true"/>
</ownedElements>
<ownedElements xsi:type="java:InterfaceDeclaration" name="RandomAccess" proxy="true" usagesInTypeAccess="//@ownedElements.1/@ownedPackages.0/@ownedElements.0/@superInterfaces.1"/>
</ownedPackages>
<ownedPackages name="lang" proxy="true">
<ownedElements xsi:type="java:InterfaceDeclaration" name="Iterable" proxy="true" usagesInTypeAccess="//@ownedElements.1/@ownedPackages.0/@ownedElements.3/@superInterfaces.0">
<typeParameters name="T" proxy="true"/>
</ownedElements>
<ownedElements xsi:type="java:InterfaceDeclaration" name="Cloneable" proxy="true" usagesInTypeAccess="//@ownedElements.1/@ownedPackages.0/@ownedElements.0/@superInterfaces.2"/>
<ownedElements xsi:type="java:ClassDeclaration" name="String" proxy="true" usagesInTypeAccess="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.0/@type //@ownedElements.0/@ownedElements.0/@bodyDeclarations.1/@returnType //@ownedElements.0/@ownedElements.0/@bodyDeclarations.2/@parameters.0/@type //@ownedElements.0/@ownedElements.0/@bodyDeclarations.4/@returnType //@ownedElements.0/@ownedElements.0/@bodyDeclarations.4/@parameters.0/@type //@ownedElements.0/@ownedElements.0/@bodyDeclarations.5/@returnType //@ownedElements.0/@ownedElements.0/@bodyDeclarations.5/@parameters.0/@type //@ownedElements.0/@ownedElements.0/@bodyDeclarations.6/@returnType //@ownedElements.0/@ownedElements.0/@bodyDeclarations.6/@parameters.0/@type //@ownedElements.0/@ownedElements.0/@bodyDeclarations.7/@returnType //@ownedElements.0/@ownedElements.0/@bodyDeclarations.7/@parameters.0/@type //@ownedElements.0/@ownedElements.0/@bodyDeclarations.8/@parameters.0/@type //@orphanTypes.9/@typeArguments.0 //@ownedElements.0/@ownedElements.0/@bodyDeclarations.12/@body/@statements.0/@type //@orphanTypes.10/@elementType //@ownedElements.0/@ownedElements.0/@bodyDeclarations.16/@body/@statements.0/@type //@ownedElements.0/@ownedElements.0/@bodyDeclarations.16/@body/@statements.1/@expression/@expression/@leftOperand/@type //@ownedElements.0/@ownedElements.0/@bodyDeclarations.17/@body/@statements.0/@type //@ownedElements.0/@ownedElements.0/@bodyDeclarations.17/@body/@statements.1/@type">
<superInterfaces type="//@ownedElements.1/@ownedPackages.2/@ownedElements.0"/>
<superInterfaces type="//@ownedElements.1/@ownedPackages.1/@ownedElements.3"/>
<superInterfaces type="//@ownedElements.1/@ownedPackages.1/@ownedElements.4"/>
</ownedElements>
<ownedElements xsi:type="java:InterfaceDeclaration" name="Comparable" proxy="true" usagesInTypeAccess="//@ownedElements.1/@ownedPackages.1/@ownedElements.2/@superInterfaces.1 //@ownedElements.1/@ownedPackages.1/@ownedElements.5/@superInterfaces.0">
<typeParameters name="T" proxy="true"/>
</ownedElements>
<ownedElements xsi:type="java:InterfaceDeclaration" name="CharSequence" proxy="true" usagesInTypeAccess="//@ownedElements.1/@ownedPackages.1/@ownedElements.2/@superInterfaces.2"/>
<ownedElements xsi:type="java:ClassDeclaration" name="Integer" proxy="true" usagesInTypeAccess="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.5/@body/@statements.0/@type">
<bodyDeclarations xsi:type="java:MethodDeclaration" name="toString" proxy="true" usages="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.5/@body/@statements.1/@expression/@leftOperand"/>
<superInterfaces type="//@ownedElements.1/@ownedPackages.1/@ownedElements.3"/>
<superClass type="//@ownedElements.1/@ownedPackages.1/@ownedElements.6"/>
</ownedElements>
<ownedElements xsi:type="java:ClassDeclaration" name="Number" proxy="true" usagesInTypeAccess="//@ownedElements.1/@ownedPackages.1/@ownedElements.5/@superClass">
<superInterfaces type="//@ownedElements.1/@ownedPackages.2/@ownedElements.0"/>
</ownedElements>
<ownedElements xsi:type="java:ClassDeclaration" name="Object" proxy="true" usagesInTypeAccess="//@ownedElements.1/@ownedPackages.0/@ownedElements.0/@bodyDeclarations.1/@parameters.0/@type"/>
</ownedPackages>
<ownedPackages name="io" proxy="true">
<ownedElements xsi:type="java:InterfaceDeclaration" name="Serializable" proxy="true" usagesInTypeAccess="//@ownedElements.1/@ownedPackages.0/@ownedElements.0/@superInterfaces.3 //@ownedElements.1/@ownedPackages.1/@ownedElements.2/@superInterfaces.0 //@ownedElements.1/@ownedPackages.1/@ownedElements.6/@superInterfaces.0"/>
</ownedPackages>
</ownedElements>
<orphanTypes xsi:type="java:PrimitiveTypeInt" name="int" usagesInTypeAccess="//@ownedElements.1/@ownedPackages.0/@ownedElements.0/@bodyDeclarations.2/@parameters.0/@type"/>
<orphanTypes xsi:type="java:PrimitiveTypeLong" name="long"/>
<orphanTypes xsi:type="java:PrimitiveTypeFloat" name="float"/>
<orphanTypes xsi:type="java:PrimitiveTypeDouble" name="double"/>
<orphanTypes xsi:type="java:PrimitiveTypeBoolean" name="boolean" usagesInTypeAccess="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.8/@returnType //@ownedElements.0/@ownedElements.0/@bodyDeclarations.9/@returnType //@ownedElements.0/@ownedElements.0/@bodyDeclarations.10/@returnType //@ownedElements.0/@ownedElements.0/@bodyDeclarations.11/@returnType //@ownedElements.0/@ownedElements.0/@bodyDeclarations.12/@returnType //@ownedElements.0/@ownedElements.0/@bodyDeclarations.13/@returnType //@ownedElements.0/@ownedElements.0/@bodyDeclarations.14/@returnType //@ownedElements.0/@ownedElements.0/@bodyDeclarations.15/@returnType //@ownedElements.0/@ownedElements.0/@bodyDeclarations.16/@returnType //@ownedElements.0/@ownedElements.0/@bodyDeclarations.17/@returnType //@ownedElements.0/@ownedElements.0/@bodyDeclarations.18/@returnType"/>
<orphanTypes xsi:type="java:PrimitiveTypeVoid" name="void" usagesInTypeAccess="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.2/@returnType //@ownedElements.0/@ownedElements.0/@bodyDeclarations.3/@returnType"/>
<orphanTypes xsi:type="java:PrimitiveTypeChar" name="char"/>
<orphanTypes xsi:type="java:PrimitiveTypeShort" name="short"/>
<orphanTypes xsi:type="java:PrimitiveTypeByte" name="byte"/>
<orphanTypes xsi:type="java:ParameterizedType" name="java.util.ArrayList&lt;java.lang.String>" usagesInTypeAccess="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.9/@body/@statements.0/@type //@ownedElements.0/@ownedElements.0/@bodyDeclarations.9/@body/@statements.0/@fragments.0/@initializer/@type">
<type type="//@ownedElements.1/@ownedPackages.0/@ownedElements.0"/>
<typeArguments type="//@ownedElements.1/@ownedPackages.1/@ownedElements.2"/>
</orphanTypes>
<orphanTypes xsi:type="java:ArrayType" name="java.lang.String[]" usagesInTypeAccess="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.15/@body/@statements.0/@type //@ownedElements.0/@ownedElements.0/@bodyDeclarations.15/@body/@statements.0/@fragments.0/@initializer/@type" dimensions="1">
<elementType type="//@ownedElements.1/@ownedPackages.1/@ownedElements.2"/>
</orphanTypes>
<compilationUnits name="A.java" originalFilePath="D:\_Fac\_Cours\M2\IngeDirigeParModele\Source_code_analyzer\TestProject\src\A.java" commentList="//@ownedElements.0/@ownedElements.0/@bodyDeclarations.4/@comments.0 //@ownedElements.0/@ownedElements.0/@bodyDeclarations.4/@comments.1 //@ownedElements.0/@ownedElements.0/@bodyDeclarations.5/@comments.0 //@ownedElements.0/@ownedElements.0/@bodyDeclarations.5/@comments.1 //@ownedElements.0/@ownedElements.0/@bodyDeclarations.6/@comments.0 //@ownedElements.0/@ownedElements.0/@bodyDeclarations.6/@comments.1 //@ownedElements.0/@ownedElements.0/@bodyDeclarations.7/@comments.0 //@ownedElements.0/@ownedElements.0/@bodyDeclarations.7/@comments.1 //@ownedElements.0/@ownedElements.0/@bodyDeclarations.8/@comments.0 //@ownedElements.0/@ownedElements.0/@bodyDeclarations.9/@comments.0 //@ownedElements.0/@ownedElements.0/@bodyDeclarations.9/@comments.1 //@ownedElements.0/@ownedElements.0/@bodyDeclarations.10/@comments.0 //@ownedElements.0/@ownedElements.0/@bodyDeclarations.10/@comments.1 //@ownedElements.0/@ownedElements.0/@bodyDeclarations.11/@comments.0 //@ownedElements.0/@ownedElements.0/@bodyDeclarations.11/@comments.1 //@ownedElements.0/@ownedElements.0/@bodyDeclarations.12/@comments.0 //@ownedElements.0/@ownedElements.0/@bodyDeclarations.13/@comments.0 //@ownedElements.0/@ownedElements.0/@bodyDeclarations.14/@comments.0 //@ownedElements.0/@ownedElements.0/@bodyDeclarations.15/@comments.0 //@ownedElements.0/@ownedElements.0/@bodyDeclarations.15/@comments.1 //@ownedElements.0/@ownedElements.0/@bodyDeclarations.16/@comments.0" types="//@ownedElements.0/@ownedElements.0">
<imports originalCompilationUnit="//@compilationUnits.0" importedElement="//@ownedElements.1/@ownedPackages.0/@ownedElements.0"/>
</compilationUnits>
</java:Model>
......@@ -130,6 +130,7 @@ helper def: allMeasures(project : java!Model): Set(smm!Measure) =
thisModule.suspiciousHashcodeMethodName(),
thisModule.testClassWithoutTest(),
thisModule.UnconditionalIfStatement(),
thisModule.useEqualsToCompareString(),
thisModule.UseProperClassLoader(),
-- Best practices rules
......@@ -1542,6 +1543,31 @@ rule MeasureUseArraysAsList(w: java!CompilationUnit) {
}
}
-- UseEqualsToCompareStrings
--- Create a new measure to show a wrongful use of == or != to compare two Strings
--- Param - expression : an infix expression (i.e. LeftOperand operation RightOperand)
rule MeasureUseEqualsToCompareStrings(expression : java!InfixExpression) {
to
om: smm!ObservedMeasure (
measure <- noc,