@@ -894,7 +894,7 @@ private static List<CallSite> getCallSites(Optional<BlockStmt> callableBody) {
894894 + exception .getMessage ());
895895 }
896896 // resolve arguments of the method call to types
897- List <String > arguments = methodCallExpr .getArguments ().stream ().map (SymbolTable ::resolveExpression )
897+ List <String > argumentTypes = methodCallExpr .getArguments ().stream ().map (SymbolTable ::resolveExpression )
898898 .collect (Collectors .toList ());
899899 // Get argument string from the callsite
900900 List <String > listOfArgumentStrings = methodCallExpr .getArguments ().stream ().map (Expression ::toString )
@@ -930,7 +930,7 @@ private static List<CallSite> getCallSites(Optional<BlockStmt> callableBody) {
930930
931931
932932 callSites .add (createCallSite (methodCallExpr , methodCallExpr .getNameAsString (), receiverName , declaringType ,
933- arguments , returnType , calleeSignature , isStaticCall , false , crudOperation , crudQuery ,
933+ argumentTypes , listOfArgumentStrings , returnType , calleeSignature , isStaticCall , false , crudOperation , crudQuery ,
934934 accessSpecifier ));
935935 }
936936
@@ -939,7 +939,11 @@ private static List<CallSite> getCallSites(Optional<BlockStmt> callableBody) {
939939 String instantiatedType = resolveType (objectCreationExpr .getType ());
940940
941941 // resolve arguments of the constructor call to types
942- List <String > arguments = objectCreationExpr .getArguments ().stream ().map (SymbolTable ::resolveExpression )
942+ List <String > argumentTypes = objectCreationExpr .getArguments ().stream ().map (SymbolTable ::resolveExpression )
943+ .collect (Collectors .toList ());
944+
945+ // get argument expressions for constructor call
946+ List <String > argumentExpressions = objectCreationExpr .getArguments ().stream ().map (Expression ::toString )
943947 .collect (Collectors .toList ());
944948
945949 // resolve callee and get signature
@@ -955,7 +959,7 @@ private static List<CallSite> getCallSites(Optional<BlockStmt> callableBody) {
955959 .add (createCallSite (objectCreationExpr , "<init>" ,
956960 objectCreationExpr .getScope ().isPresent () ? objectCreationExpr .getScope ().get ().toString ()
957961 : "" ,
958- instantiatedType , arguments , instantiatedType , calleeSignature , false , true , null , null ,
962+ instantiatedType , argumentTypes , argumentExpressions , instantiatedType , calleeSignature , false , true , null , null ,
959963 AccessSpecifier .NONE ));
960964 }
961965
@@ -1006,17 +1010,24 @@ private static Optional<CRUDOperationType> findCRUDOperation(String declaringTyp
10061010 * @param calleeName
10071011 * @param receiverExpr
10081012 * @param receiverType
1009- * @param arguments
1013+ * @param argumentTypes
1014+ * @param argumentExpr
1015+ * @param returnType
1016+ * @param calleeSignature
10101017 * @param isStaticCall
10111018 * @param isConstructorCall
1019+ * @param crudOperation,
1020+ * @param crudQuery,
1021+ * @param accessSpecifier
10121022 * @return
10131023 */
10141024 private static CallSite createCallSite (
10151025 Expression callExpr ,
10161026 String calleeName ,
10171027 String receiverExpr ,
10181028 String receiverType ,
1019- List <String > arguments ,
1029+ List <String > argumentTypes ,
1030+ List <String > argumentExpr ,
10201031 String returnType ,
10211032 String calleeSignature ,
10221033 boolean isStaticCall ,
@@ -1042,7 +1053,8 @@ private static CallSite createCallSite(
10421053 callSite .setMethodName (calleeName );
10431054 callSite .setReceiverExpr (receiverExpr );
10441055 callSite .setReceiverType (receiverType );
1045- callSite .setArgumentTypes (arguments );
1056+ callSite .setArgumentTypes (argumentTypes );
1057+ callSite .setArgumentExpr (argumentExpr );
10461058 callSite .setReturnType (returnType );
10471059 callSite .setCalleeSignature (calleeSignature );
10481060 callSite .setStaticCall (isStaticCall );
0 commit comments