From 997c220549ef5108dad21f968ef5fc8b9d73b9a8 Mon Sep 17 00:00:00 2001 From: Sin-Mim <146531533+Sin-Mim@users.noreply.github.com> Date: Thu, 7 Mar 2024 01:58:03 +0300 Subject: [PATCH] Fix issue #259 Handle null value of spoon.reflect.code.CtInvocation.getTarget() when Spoon fails to parse input accurately. --- .../codefeatures/codeanalyze/LogicalExpressionAnalyzer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/fr/inria/coming/codefeatures/codeanalyze/LogicalExpressionAnalyzer.java b/src/main/java/fr/inria/coming/codefeatures/codeanalyze/LogicalExpressionAnalyzer.java index 12051ac3f..e1b47f875 100755 --- a/src/main/java/fr/inria/coming/codefeatures/codeanalyze/LogicalExpressionAnalyzer.java +++ b/src/main/java/fr/inria/coming/codefeatures/codeanalyze/LogicalExpressionAnalyzer.java @@ -681,7 +681,7 @@ public void visitCtBinaryOperator(CtBinaryOperator operator) { for (CtInvocation invocation : invocationssInStatement) { - if(!invocation.getTarget().toString().isEmpty()) { + if(invocation.getTarget() != null && !invocation.getTarget().toString().isEmpty()) { continue; }