Search in sources :

Example 31 with Assignment

use of org.eclipse.jdt.core.dom.Assignment in project evosuite by EvoSuite.

the class TestExtractingVisitor method retrieveVariableReference.

/**
 * <p>
 * retrieveVariableReference
 * </p>
 *
 * @param argument
 *            a {@link java.lang.Object} object.
 * @param varType
 *            a {@link java.lang.Class} object.
 * @return a {@link org.evosuite.testcase.VariableReference} object.
 */
protected VariableReference retrieveVariableReference(Object argument, Class<?> varType) {
    if (argument instanceof ClassInstanceCreation) {
        return retrieveVariableReference((ClassInstanceCreation) argument, varType);
    }
    if (argument instanceof VariableDeclarationFragment) {
        return retrieveVariableReference((VariableDeclarationFragment) argument);
    }
    if (argument instanceof SimpleName) {
        SimpleName simpleName = (SimpleName) argument;
        lineNumber = testReader.getLineNumber(simpleName.getStartPosition());
        return retrieveVariableReference(simpleName.resolveBinding(), varType);
    }
    if (argument instanceof IVariableBinding) {
        return retrieveVariableReference((IVariableBinding) argument, varType);
    }
    if (argument instanceof PrefixExpression) {
        return retrieveVariableReference((PrefixExpression) argument);
    }
    if (argument instanceof InfixExpression) {
        return retrieveVariableReference((InfixExpression) argument, varType);
    }
    if (argument instanceof ExpressionStatement) {
        ExpressionStatement exprStmt = (ExpressionStatement) argument;
        Expression expression = exprStmt.getExpression();
        return retrieveVariableReference(expression, varType);
    }
    if (argument instanceof NullLiteral) {
        return retrieveVariableReference((NullLiteral) argument, varType);
    }
    if (argument instanceof StringLiteral) {
        return retrieveVariableReference((StringLiteral) argument);
    }
    if (argument instanceof NumberLiteral) {
        return retrieveVariableReference((NumberLiteral) argument);
    }
    if (argument instanceof CharacterLiteral) {
        return retrieveVariableReference((CharacterLiteral) argument);
    }
    if (argument instanceof BooleanLiteral) {
        return retrieveVariableReference((BooleanLiteral) argument);
    }
    if (argument instanceof ITypeBinding) {
        if (varType != null) {
            return new ValidVariableReference(testCase.getReference(), varType);
        }
        return new ValidVariableReference(testCase.getReference(), retrieveTypeClass(argument));
    }
    if (argument instanceof QualifiedName) {
        return retrieveVariableReference((QualifiedName) argument);
    }
    if (argument instanceof MethodInvocation) {
        MethodInvocation methodInvocation = (MethodInvocation) argument;
        VariableReference result = retrieveResultReference(methodInvocation);
        nestedCallResults.push(result);
        return result;
    }
    if (argument instanceof ArrayCreation) {
        return retrieveVariableReference((ArrayCreation) argument);
    }
    if (argument instanceof VariableDeclaration) {
        return retrieveVariableReference((VariableDeclaration) argument);
    }
    if (argument instanceof ArrayAccess) {
        // argument).getArray(), null);
        return retrieveVariableReference((ArrayAccess) argument);
    }
    if (argument instanceof Assignment) {
        return retrieveVariableReference(((Assignment) argument).getLeftHandSide(), null);
    }
    if (argument instanceof CastExpression) {
        CastExpression castExpression = (CastExpression) argument;
        VariableReference result = retrieveVariableReference(castExpression.getExpression(), null);
        Class<?> castClass = retrieveTypeClass(castExpression.resolveTypeBinding());
        assert castClass.isAssignableFrom(toClass(result.getType()));
        result.setType(castClass);
        return result;
    }
    throw new UnsupportedOperationException("Argument type " + argument.getClass() + " not implemented!");
}
Also used : BooleanLiteral(org.eclipse.jdt.core.dom.BooleanLiteral) SimpleName(org.eclipse.jdt.core.dom.SimpleName) MethodInvocation(org.eclipse.jdt.core.dom.MethodInvocation) SuperMethodInvocation(org.eclipse.jdt.core.dom.SuperMethodInvocation) Assignment(org.eclipse.jdt.core.dom.Assignment) ArrayAccess(org.eclipse.jdt.core.dom.ArrayAccess) VariableDeclarationFragment(org.eclipse.jdt.core.dom.VariableDeclarationFragment) ITypeBinding(org.eclipse.jdt.core.dom.ITypeBinding) InfixExpression(org.eclipse.jdt.core.dom.InfixExpression) VariableDeclaration(org.eclipse.jdt.core.dom.VariableDeclaration) SingleVariableDeclaration(org.eclipse.jdt.core.dom.SingleVariableDeclaration) ClassInstanceCreation(org.eclipse.jdt.core.dom.ClassInstanceCreation) VariableReference(org.evosuite.testcase.VariableReference) QualifiedName(org.eclipse.jdt.core.dom.QualifiedName) IVariableBinding(org.eclipse.jdt.core.dom.IVariableBinding) StringLiteral(org.eclipse.jdt.core.dom.StringLiteral) Expression(org.eclipse.jdt.core.dom.Expression) CastExpression(org.eclipse.jdt.core.dom.CastExpression) PrefixExpression(org.eclipse.jdt.core.dom.PrefixExpression) ConditionalExpression(org.eclipse.jdt.core.dom.ConditionalExpression) PrimitiveExpression(org.evosuite.testcase.PrimitiveExpression) InfixExpression(org.eclipse.jdt.core.dom.InfixExpression) PrefixExpression(org.eclipse.jdt.core.dom.PrefixExpression) ExpressionStatement(org.eclipse.jdt.core.dom.ExpressionStatement) ArrayCreation(org.eclipse.jdt.core.dom.ArrayCreation) CastExpression(org.eclipse.jdt.core.dom.CastExpression) NullLiteral(org.eclipse.jdt.core.dom.NullLiteral) NumberLiteral(org.eclipse.jdt.core.dom.NumberLiteral) CharacterLiteral(org.eclipse.jdt.core.dom.CharacterLiteral)

Example 32 with Assignment

use of org.eclipse.jdt.core.dom.Assignment in project evosuite by EvoSuite.

the class TestExtractingVisitor method retrieveResultReference.

private VariableReference retrieveResultReference(MethodInvocation methodInvocation) {
    VariableReference result = calleeResultMap.get(methodInvocation.toString());
    if (result != null) {
        return result;
    }
    ASTNode parent = methodInvocation.getParent();
    if (parent instanceof VariableDeclarationFragment) {
        return retrieveVariableReference(parent, null);
    }
    if (parent instanceof Assignment) {
        Assignment assignment = (Assignment) parent;
        return retrieveVariableReference(assignment.getLeftHandSide(), null);
    }
    IMethodBinding methodBinding = methodInvocation.resolveMethodBinding();
    ITypeBinding returnType = methodBinding.getReturnType();
    Class<?> resultClass = null;
    try {
        resultClass = retrieveTypeClass(returnType);
    } catch (Exception exc) {
        String localClass = methodBinding.getDeclaringClass().getQualifiedName() + "." + returnType.getName();
        resultClass = loadClass(localClass);
    }
    result = retrieveVariableReference(returnType, resultClass);
    calleeResultMap.put(methodInvocation.toString(), result);
    return result;
}
Also used : Assignment(org.eclipse.jdt.core.dom.Assignment) IMethodBinding(org.eclipse.jdt.core.dom.IMethodBinding) VariableReference(org.evosuite.testcase.VariableReference) VariableDeclarationFragment(org.eclipse.jdt.core.dom.VariableDeclarationFragment) ITypeBinding(org.eclipse.jdt.core.dom.ITypeBinding) ASTNode(org.eclipse.jdt.core.dom.ASTNode) InvocationTargetException(java.lang.reflect.InvocationTargetException)

Example 33 with Assignment

use of org.eclipse.jdt.core.dom.Assignment in project evosuite by EvoSuite.

the class CodeGenerator method createFieldWriteAccessStmt.

@SuppressWarnings("unchecked")
private void createFieldWriteAccessStmt(final String packageName, final int logRecNo, final Block methodBlock, final AST ast) {
    // assumption: all necessary statements are created and there is one variable for reach referenced object
    final Object[] methodArgs = this.log.params.get(logRecNo);
    final String methodName = this.log.methodNames.get(logRecNo);
    final int oid = this.log.objectIds.get(logRecNo);
    final int captureId = this.log.captureIds.get(logRecNo);
    final String fieldName = this.log.namesOfAccessedFields.get(captureId);
    final String typeName = this.log.oidClassNames.get(this.log.oidRecMapping.get(oid));
    Class<?> type = getClassForName(typeName);
    // try {
    // type = Class.forName(typeName);
    // } catch (ClassNotFoundException e) {
    // throw new RuntimeException(e);
    // }
    final int fieldTypeModifiers = this.getFieldModifiers(type, fieldName);
    final boolean isPublic = java.lang.reflect.Modifier.isPublic(fieldTypeModifiers);
    // TODO might be nicer...
    final boolean haveSamePackage = type.getPackage().getName().equals(packageName);
    final boolean isReflectionAccessNeeded = !isPublic && !haveSamePackage;
    if (isReflectionAccessNeeded) {
        this.isSetFieldMethodNeeded = true;
        final String varName = this.oidToVarMapping.get(oid);
        final MethodInvocation setFieldCall = ast.newMethodInvocation();
        setFieldCall.setName(ast.newSimpleName("setField"));
        StringLiteral stringLiteral = ast.newStringLiteral();
        stringLiteral.setLiteralValue(typeName);
        // class name
        setFieldCall.arguments().add(stringLiteral);
        stringLiteral = ast.newStringLiteral();
        stringLiteral.setLiteralValue(fieldName);
        // field name
        setFieldCall.arguments().add(stringLiteral);
        // receiver
        setFieldCall.arguments().add(ast.newSimpleName(varName));
        final Integer arg = (Integer) methodArgs[0];
        if (arg == null) {
            // value
            setFieldCall.arguments().add(ast.newNullLiteral());
        } else {
            // value
            setFieldCall.arguments().add(ast.newSimpleName(this.oidToVarMapping.get(arg)));
        }
        methodBlock.statements().add(ast.newExpressionStatement(setFieldCall));
    } else {
        FieldAccess fa = ast.newFieldAccess();
        if (CaptureLog.PUTSTATIC.equals(methodName)) {
            // final String type = this.log.oidClassNames.get(this.log.oidRecMapping.get(oid));
            // .split("\\.")));
            fa.setExpression(ast.newName(typeName));
        } else {
            final String varName = this.oidToVarMapping.get(oid);
            fa.setExpression(ast.newSimpleName(varName));
        }
        fa.setName(ast.newSimpleName(fieldName));
        final Assignment assignment = ast.newAssignment();
        assignment.setLeftHandSide(fa);
        final Integer arg = (Integer) methodArgs[0];
        if (arg == null) {
            assignment.setRightHandSide(ast.newNullLiteral());
        } else {
            final Class<?> argType = this.oidToTypeMapping.get(arg);
            final String fieldDesc = this.log.descList.get(logRecNo);
            final Class<?> fieldType = CaptureUtil.getClassFromDesc(fieldDesc);
            if (fieldType.isAssignableFrom(argType)) {
                assignment.setRightHandSide(ast.newSimpleName(this.oidToVarMapping.get(arg)));
            } else {
                // we need an up-cast
                final CastExpression cast = ast.newCastExpression();
                cast.setType(ast.newSimpleType(ast.newName(fieldType.getName())));
                cast.setExpression(ast.newSimpleName(this.oidToVarMapping.get(arg)));
                assignment.setRightHandSide(cast);
            }
        }
        methodBlock.statements().add(ast.newExpressionStatement(assignment));
    }
}
Also used : Assignment(org.eclipse.jdt.core.dom.Assignment) StringLiteral(org.eclipse.jdt.core.dom.StringLiteral) MethodInvocation(org.eclipse.jdt.core.dom.MethodInvocation) CastExpression(org.eclipse.jdt.core.dom.CastExpression) FieldAccess(org.eclipse.jdt.core.dom.FieldAccess)

Example 34 with Assignment

use of org.eclipse.jdt.core.dom.Assignment in project evosuite by EvoSuite.

the class CodeGenerator method createMethodCallStmt.

@SuppressWarnings("unchecked")
private void createMethodCallStmt(final String packageName, final int logRecNo, final boolean postprocessing, final Block methodBlock, final AST ast) {
    // assumption: all necessary statements are created and there is one variable for reach referenced object
    final int oid = this.log.objectIds.get(logRecNo);
    final Object[] methodArgs = this.log.params.get(logRecNo);
    final String methodName = this.log.methodNames.get(logRecNo);
    final String methodDesc = this.log.descList.get(logRecNo);
    final org.objectweb.asm.Type[] methodParamTypes = org.objectweb.asm.Type.getArgumentTypes(methodDesc);
    final Class<?>[] methodParamTypeClasses = new Class[methodParamTypes.length];
    for (int i = 0; i < methodParamTypes.length; i++) {
        methodParamTypeClasses[i] = getClassForName(methodParamTypes[i].getClassName());
    }
    final String typeName = this.log.oidClassNames.get(this.log.oidRecMapping.get(oid));
    Class<?> type = getClassForName(typeName);
    // Class<?> type;
    // try {
    // type = Class.forName(typeName);
    // } catch (ClassNotFoundException e) {
    // throw new RuntimeException(e);
    // }
    // TODO might be nicer...
    final boolean haveSamePackage = type.getPackage().getName().equals(packageName);
    final Statement finalStmt;
    @SuppressWarnings("rawtypes") final List arguments;
    if (CaptureLog.OBSERVED_INIT.equals(methodName)) {
        /*
			 * Person var0 = null;
			 * {
			 *    var0 = new Person();
			 * }
			 * catch(Throwable t)
			 * {
			 *    org.uni.saarland.sw.prototype.capture.PostProcessor.captureException(<logRecNo>);
			 * }
			 */
        // e.g. Person var0 = null;
        final String varName = this.createNewVarName(oid, typeName);
        VariableDeclarationFragment vd = ast.newVariableDeclarationFragment();
        vd.setName(ast.newSimpleName(varName));
        VariableDeclarationStatement stmt = ast.newVariableDeclarationStatement(vd);
        stmt.setType(this.createAstType(typeName, ast));
        vd.setInitializer(ast.newNullLiteral());
        methodBlock.statements().add(stmt);
        try {
            this.getConstructorModifiers(type, methodParamTypeClasses);
        } catch (Exception e) {
            e.printStackTrace();
        }
        final int constructorTypeModifiers = this.getConstructorModifiers(type, methodParamTypeClasses);
        final boolean isPublic = java.lang.reflect.Modifier.isPublic(constructorTypeModifiers);
        final boolean isReflectionAccessNeeded = !isPublic && !haveSamePackage;
        if (isReflectionAccessNeeded) {
            this.isNewInstanceMethodNeeded = true;
            final MethodInvocation mi = this.createCallMethodOrNewInstanceCallStmt(true, ast, varName, typeName, methodName, methodArgs, methodParamTypes);
            arguments = null;
            final Assignment assignment = ast.newAssignment();
            assignment.setLeftHandSide(ast.newSimpleName(varName));
            assignment.setOperator(Operator.ASSIGN);
            final CastExpression cast = ast.newCastExpression();
            cast.setType(this.createAstType(typeName, ast));
            cast.setExpression(mi);
            assignment.setRightHandSide(cast);
            finalStmt = ast.newExpressionStatement(assignment);
        } else {
            // e.g. var0 = new Person();
            final ClassInstanceCreation ci = ast.newClassInstanceCreation();
            ci.setType(this.createAstType(typeName, ast));
            final Assignment assignment = ast.newAssignment();
            assignment.setLeftHandSide(ast.newSimpleName(varName));
            assignment.setOperator(Operator.ASSIGN);
            assignment.setRightHandSide(ci);
            finalStmt = ast.newExpressionStatement(assignment);
            arguments = ci.arguments();
        }
    } else // ------------------ handling for ordinary method calls e.g. var1 = var0.doSth();
    {
        String returnVarName = null;
        final String desc = this.log.descList.get(logRecNo);
        final String returnType = org.objectweb.asm.Type.getReturnType(desc).getClassName();
        final Object returnValue = this.log.returnValues.get(logRecNo);
        if (!CaptureLog.RETURN_TYPE_VOID.equals(returnValue)) {
            Integer returnValueOID = (Integer) returnValue;
            // e.g. Person var0 = null;
            returnVarName = this.createNewVarName(returnValueOID, returnType);
            VariableDeclarationFragment vd = ast.newVariableDeclarationFragment();
            vd.setName(ast.newSimpleName(returnVarName));
            VariableDeclarationStatement stmt = ast.newVariableDeclarationStatement(vd);
            stmt.setType(this.createAstType(returnType, ast));
            vd.setInitializer(ast.newNullLiteral());
            methodBlock.statements().add(stmt);
        }
        final String varName = this.oidToVarMapping.get(oid);
        final int methodTypeModifiers = this.getMethodModifiers(type, methodName, methodParamTypeClasses);
        final boolean isPublic = java.lang.reflect.Modifier.isPublic(methodTypeModifiers);
        final boolean isReflectionAccessNeeded = !isPublic && !haveSamePackage;
        // e.g. Person var0 = var1.getPerson("Ben");
        final MethodInvocation mi;
        if (isReflectionAccessNeeded) {
            this.isCallMethodMethodNeeded = true;
            mi = this.createCallMethodOrNewInstanceCallStmt(false, ast, varName, typeName, methodName, methodArgs, methodParamTypes);
            arguments = null;
            if (returnVarName != null) {
                final Assignment assignment = ast.newAssignment();
                assignment.setLeftHandSide(ast.newSimpleName(returnVarName));
                assignment.setOperator(Operator.ASSIGN);
                final CastExpression cast = ast.newCastExpression();
                cast.setType(this.createAstType(returnType, ast));
                cast.setExpression(mi);
                assignment.setRightHandSide(cast);
                finalStmt = ast.newExpressionStatement(assignment);
            } else {
                finalStmt = ast.newExpressionStatement(mi);
            }
        } else {
            mi = ast.newMethodInvocation();
            if (this.log.isStaticCallList.get(logRecNo)) {
                // can only happen, if this is a static method call (because constructor statement has been reported)
                final String tmpType = this.log.oidClassNames.get(this.log.oidRecMapping.get(oid));
                mi.setExpression(ast.newName(tmpType.split("\\.")));
            } else {
                mi.setExpression(ast.newSimpleName(varName));
            }
            mi.setName(ast.newSimpleName(methodName));
            arguments = mi.arguments();
            if (returnVarName != null) {
                final Assignment assignment = ast.newAssignment();
                assignment.setLeftHandSide(ast.newSimpleName(returnVarName));
                assignment.setOperator(Operator.ASSIGN);
                assignment.setRightHandSide(mi);
                finalStmt = ast.newExpressionStatement(assignment);
            } else {
                finalStmt = ast.newExpressionStatement(mi);
            }
        }
    }
    if (postprocessing) {
        final TryStatement tryStmt = this.createTryStatementForPostProcessing(ast, finalStmt, logRecNo);
        methodBlock.statements().add(tryStmt);
    } else {
        if (this.failedRecords.contains(logRecNo)) {
            // we just need an empty catch block to preserve program flow
            final TryStatement tryStmt = this.createTryStmtWithEmptyCatch(ast, finalStmt);
            methodBlock.statements().add(tryStmt);
        } else {
            methodBlock.statements().add(finalStmt);
        }
    }
    if (arguments != null) {
        // final  String                   methodDesc       = this.log.descList.get(logRecNo);
        // final  org.objectweb.asm.Type[] methodParamTypes = org.objectweb.asm.Type.getArgumentTypes(methodDesc);
        Class<?> methodParamType;
        Class<?> argType;
        // is either an oid or null
        Integer arg;
        for (int i = 0; i < methodArgs.length; i++) {
            arg = (Integer) methodArgs[i];
            if (arg == null) {
                arguments.add(ast.newNullLiteral());
            } else {
                methodParamType = CaptureUtil.getClassFromDesc(methodParamTypes[i].getDescriptor());
                argType = this.oidToTypeMapping.get(arg);
                if (methodParamType.isAssignableFrom(argType)) {
                    arguments.add(ast.newSimpleName(this.oidToVarMapping.get(arg)));
                } else {
                    // we need an up-cast
                    final CastExpression cast = ast.newCastExpression();
                    cast.setType(ast.newSimpleType(ast.newName(methodParamType.getName())));
                    cast.setExpression(ast.newSimpleName(this.oidToVarMapping.get(arg)));
                    arguments.add(cast);
                }
            }
        }
    }
}
Also used : ClassInstanceCreation(org.eclipse.jdt.core.dom.ClassInstanceCreation) TryStatement(org.eclipse.jdt.core.dom.TryStatement) Statement(org.eclipse.jdt.core.dom.Statement) ReturnStatement(org.eclipse.jdt.core.dom.ReturnStatement) VariableDeclarationStatement(org.eclipse.jdt.core.dom.VariableDeclarationStatement) MethodInvocation(org.eclipse.jdt.core.dom.MethodInvocation) Assignment(org.eclipse.jdt.core.dom.Assignment) SimpleType(org.eclipse.jdt.core.dom.SimpleType) Type(org.eclipse.jdt.core.dom.Type) TryStatement(org.eclipse.jdt.core.dom.TryStatement) VariableDeclarationFragment(org.eclipse.jdt.core.dom.VariableDeclarationFragment) VariableDeclarationStatement(org.eclipse.jdt.core.dom.VariableDeclarationStatement) TIntArrayList(gnu.trove.list.array.TIntArrayList) List(java.util.List) CastExpression(org.eclipse.jdt.core.dom.CastExpression)

Example 35 with Assignment

use of org.eclipse.jdt.core.dom.Assignment in project evosuite by EvoSuite.

the class JUnitCodeGenerator method createArrayInitStmt.

@Override
public void createArrayInitStmt(final CaptureLog log, final int logRecNo) {
    final int oid = log.objectIds.get(logRecNo);
    final Object[] params = log.params.get(logRecNo);
    final String arrTypeName = log.oidClassNames.get(log.oidRecMapping.get(oid));
    final Class<?> arrType = getClassForName(arrTypeName);
    // --- create array instance creation e.g. int[] var = new int[10];
    final ArrayType arrAstType = (ArrayType) createAstArrayType(arrTypeName, ast);
    final ArrayCreation arrCreationExpr = ast.newArrayCreation();
    arrCreationExpr.setType(arrAstType);
    arrCreationExpr.dimensions().add(ast.newNumberLiteral(String.valueOf(params.length)));
    final String arrVarName = this.createNewVarName(oid, arrTypeName);
    final VariableDeclarationFragment vd = ast.newVariableDeclarationFragment();
    final SimpleName arrVarNameExpr = ast.newSimpleName(arrVarName);
    vd.setName(arrVarNameExpr);
    vd.setInitializer(arrCreationExpr);
    final VariableDeclarationStatement varDeclStmt = ast.newVariableDeclarationStatement(vd);
    varDeclStmt.setType(this.createAstType(arrTypeName, ast));
    methodBlock.statements().add(varDeclStmt);
    // create array access statements var[0] = var1;
    Integer paramOID;
    Assignment assign;
    ArrayAccess arrAccessExpr;
    for (int i = 0; i < params.length; i++) {
        assign = ast.newAssignment();
        arrAccessExpr = ast.newArrayAccess();
        arrAccessExpr.setIndex(ast.newNumberLiteral(String.valueOf(i)));
        arrAccessExpr.setArray(arrVarNameExpr);
        assign.setLeftHandSide(arrAccessExpr);
        paramOID = (Integer) params[i];
        if (paramOID == null) {
            assign.setRightHandSide(ast.newNullLiteral());
        } else {
            assign.setRightHandSide(ast.newSimpleName(this.oidToVarMapping.get(paramOID)));
        }
        methodBlock.statements().add(assign);
    }
}
Also used : SimpleName(org.eclipse.jdt.core.dom.SimpleName) ArrayType(org.eclipse.jdt.core.dom.ArrayType) Assignment(org.eclipse.jdt.core.dom.Assignment) ArrayAccess(org.eclipse.jdt.core.dom.ArrayAccess) VariableDeclarationFragment(org.eclipse.jdt.core.dom.VariableDeclarationFragment) ArrayCreation(org.eclipse.jdt.core.dom.ArrayCreation) VariableDeclarationStatement(org.eclipse.jdt.core.dom.VariableDeclarationStatement)

Aggregations

Assignment (org.eclipse.jdt.core.dom.Assignment)96 VariableDeclarationFragment (org.eclipse.jdt.core.dom.VariableDeclarationFragment)42 Expression (org.eclipse.jdt.core.dom.Expression)41 SimpleName (org.eclipse.jdt.core.dom.SimpleName)37 ASTNode (org.eclipse.jdt.core.dom.ASTNode)33 CastExpression (org.eclipse.jdt.core.dom.CastExpression)29 VariableDeclarationExpression (org.eclipse.jdt.core.dom.VariableDeclarationExpression)29 AST (org.eclipse.jdt.core.dom.AST)28 ITypeBinding (org.eclipse.jdt.core.dom.ITypeBinding)26 InfixExpression (org.eclipse.jdt.core.dom.InfixExpression)25 ParenthesizedExpression (org.eclipse.jdt.core.dom.ParenthesizedExpression)24 VariableDeclarationStatement (org.eclipse.jdt.core.dom.VariableDeclarationStatement)24 PrefixExpression (org.eclipse.jdt.core.dom.PrefixExpression)23 MethodDeclaration (org.eclipse.jdt.core.dom.MethodDeclaration)21 Statement (org.eclipse.jdt.core.dom.Statement)21 ExpressionStatement (org.eclipse.jdt.core.dom.ExpressionStatement)19 MethodInvocation (org.eclipse.jdt.core.dom.MethodInvocation)19 ConditionalExpression (org.eclipse.jdt.core.dom.ConditionalExpression)18 FieldAccess (org.eclipse.jdt.core.dom.FieldAccess)18 PostfixExpression (org.eclipse.jdt.core.dom.PostfixExpression)18