diff --git a/r/org.eclipse.statet.r.core/src/org/eclipse/statet/internal/r/core/rmodel/SourceAnalyzer.java b/r/org.eclipse.statet.r.core/src/org/eclipse/statet/internal/r/core/rmodel/SourceAnalyzer.java
index ab3b19e..d4a4b7f 100644
--- a/r/org.eclipse.statet.r.core/src/org/eclipse/statet/internal/r/core/rmodel/SourceAnalyzer.java
+++ b/r/org.eclipse.statet.r.core/src/org/eclipse/statet/internal/r/core/rmodel/SourceAnalyzer.java
@@ -1594,7 +1594,7 @@
 			ITER_ARGS: for (int i= 0; i < args.allocatedArgs.length; i++) {
 				final RAstNode argValue= args.getArgValueNode(i);
 				if (argValue != null) {
-					if (matchesNameType(Parameters.PACKAGE_NAME, this.params.get(i).type, argValue)) {
+					if (matchesNameType(Parameters.PACKAGE_NAME, this.params.get(i).getType(), argValue)) {
 						final ElementAccess access= new ElementAccess.Namespace(node, argValue);
 						access.nameNode= argValue;
 						@SuppressWarnings("null")
@@ -1604,7 +1604,7 @@
 						SourceAnalyzer.this.argValueToIgnore.add(argValue);
 						continue ITER_ARGS;
 					}
-					if ((this.params.get(i).type & Parameters.METHOD_NAME) != 0
+					if ((this.params.get(i).getType() & Parameters.METHOD_NAME) != 0
 							&& argValue.getNodeType() == NodeType.STRING_CONST) {
 						final ElementAccess access= new ElementAccess.Default(node);
 						access.flags= ElementAccess.A_READ | ElementAccess.A_FUNC;
@@ -1614,14 +1614,14 @@
 						SourceAnalyzer.this.argValueToIgnore.add(argValue);
 						continue ITER_ARGS;
 					}
-					if ((this.params.get(i).type & Parameters.CLASS_NAME) != 0
+					if ((this.params.get(i).getType() & Parameters.CLASS_NAME) != 0
 							&& argValue.getNodeType() == NodeType.STRING_CONST) {
 						registerSimpleClassAccessInEnvir(node, argValue);
 						
 						SourceAnalyzer.this.argValueToIgnore.add(argValue);
 						continue ITER_ARGS;
 					}
-					if ((this.params.get(i).type & Parameters.UNSPECIFIC_NAME) != 0
+					if ((this.params.get(i).getType() & Parameters.UNSPECIFIC_NAME) != 0
 							&& argValue.getNodeType() == NodeType.STRING_CONST) {
 						final ElementAccess access= new ElementAccess.Default(node);
 						access.flags= ElementAccess.A_READ;
@@ -1631,7 +1631,7 @@
 						SourceAnalyzer.this.argValueToIgnore.add(argValue);
 						continue ITER_ARGS;
 					}
-					if (matchesNameType(Parameters.HELP_TOPIC_NAME, this.params.get(i).type, argValue)) {
+					if (matchesNameType(Parameters.HELP_TOPIC_NAME, this.params.get(i).getType(), argValue)) {
 						SourceAnalyzer.this.argValueToIgnore.add(argValue);
 						continue ITER_ARGS;
 					}
@@ -2094,7 +2094,7 @@
 						// we copy the names
 						if (signatureArgNodes != null) { // explicit
 							ARGS: for (int i= 0; i < baseParams.size(); i++) {
-								final String name= baseParams.get(i).name;
+								final String name= baseParams.get(i).getName();
 								if (name != null) {
 									for (int j= 0; j < signatureArgNodes.length; j++) {
 										if (isTextEqualTo(signatureArgNodes[j], name)) {
@@ -2109,12 +2109,12 @@
 								continue ARGS;
 							}
 						}
-						else if (baseParams.size() == 1 && "...".equals(baseParams.get(0).name)) {
+						else if (baseParams.size() == 1 && "...".equals(baseParams.get(0).getName())) {
 							parametersBuilder.add("...", 0, "<?>");
 						}
 						else {
 							ARGS: for (int i= 0; i < baseParams.size(); i++) {
-								final String name= baseParams.get(i).name;
+								final String name= baseParams.get(i).getName();
 								if (name != null) {
 									if (!name.equals("...")) {
 										parametersBuilder.add(name, 0, "<?>");
diff --git a/r/org.eclipse.statet.r.core/src/org/eclipse/statet/r/core/refactoring/FunctionToS4MethodRefactoring.java b/r/org.eclipse.statet.r.core/src/org/eclipse/statet/r/core/refactoring/FunctionToS4MethodRefactoring.java
index 28e9d1e..d4e3221 100644
--- a/r/org.eclipse.statet.r.core/src/org/eclipse/statet/r/core/refactoring/FunctionToS4MethodRefactoring.java
+++ b/r/org.eclipse.statet.r.core/src/org/eclipse/statet/r/core/refactoring/FunctionToS4MethodRefactoring.java
@@ -14,6 +14,8 @@
 
 package org.eclipse.statet.r.core.refactoring;
 
+import static org.eclipse.statet.jcommons.lang.ObjectUtils.nonNullElse;
+
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -91,7 +93,7 @@
 		}
 		
 		public String getName() {
-			return  (this.parameter.name != null) ? this.parameter.name : ""; //$NON-NLS-1$
+			return nonNullElse(this.parameter.getName(), ""); //$NON-NLS-1$
 		}
 		
 		public boolean getUseAsGenericArgumentDefault() {
diff --git a/r/org.eclipse.statet.r.core/src/org/eclipse/statet/r/core/rmodel/Parameters.java b/r/org.eclipse.statet.r.core/src/org/eclipse/statet/r/core/rmodel/Parameters.java
index 9ff5d7c..7a9936b 100644
--- a/r/org.eclipse.statet.r.core/src/org/eclipse/statet/r/core/rmodel/Parameters.java
+++ b/r/org.eclipse.statet.r.core/src/org/eclipse/statet/r/core/rmodel/Parameters.java
@@ -65,18 +65,36 @@
 		
 		
 		public final int index;
-		public final @Nullable String name;
-		public final int type;
-		public final @Nullable String className;
-//		String defaultAsCode;
 		
-		Parameter(final int index, final @Nullable String name, final int type, final @Nullable String className) {
+		private final @Nullable String name;
+		
+		private final int type;
+		
+		private final @Nullable String className;
+//		private final String defaultAsCode;
+		
+		
+		Parameter(final int index, final @Nullable String name, final int type,
+				final @Nullable String className) {
 			this.index= index;
 			this.name= name;
 			this.type= type;
 			this.className= className;
 		}
 		
+		
+		public @Nullable String getName() {
+			return this.name;
+		}
+		
+		public int getType() {
+			return this.type;
+		}
+		
+		public @Nullable String getClassName() {
+			return this.className;
+		}
+		
 	}
 	
 	
diff --git a/r/org.eclipse.statet.r.core/src/org/eclipse/statet/r/core/source/ast/RAsts.java b/r/org.eclipse.statet.r.core/src/org/eclipse/statet/r/core/source/ast/RAsts.java
index 3394c43..c16dc26 100644
--- a/r/org.eclipse.statet.r.core/src/org/eclipse/statet/r/core/source/ast/RAsts.java
+++ b/r/org.eclipse.statet.r.core/src/org/eclipse/statet/r/core/source/ast/RAsts.java
@@ -629,17 +629,22 @@
 			ITER_ARGS: for (int nodeIdx= fCallArgStartIdx; nodeIdx < nodeArgCount; nodeIdx++) {
 				if (argsNode2paramIdx[nodeIdx] == TEST_PARTIAL) {
 					final FCall.Arg argNode= fCallArgs.getChild(nodeIdx - fCallArgStartIdx);
-					final String name= argNode.getNameChild().getText();
 					int matchIdx= -1;
-					for (int defIdx= 0; defIdx < testStop; defIdx++) {
-						if (allocatedArgs[defIdx] == null && parameters.get(defIdx).name.startsWith(name)) {
-							if (matchIdx < 0) {
-								matchIdx= defIdx;
-							}
-							else {
-								failCount++;
-								argsNode2paramIdx[nodeIdx]= FAIL;
-								continue ITER_ARGS;
+					final String name= argNode.getNameChild().getText();
+					if (name != null) {
+						for (int defIdx= 0; defIdx < testStop; defIdx++) {
+							final String paramName;
+							if (allocatedArgs[defIdx] == null
+									&& (paramName= parameters.get(defIdx).getName()) != null
+									&& paramName.startsWith(name) ) {
+								if (matchIdx < 0) {
+									matchIdx= defIdx;
+								}
+								else {
+									failCount++;
+									argsNode2paramIdx[nodeIdx]= FAIL;
+									continue ITER_ARGS;
+								}
 							}
 						}
 					}
diff --git a/r/org.eclipse.statet.r.debug.core/src/org/eclipse/statet/internal/r/debug/core/model/RFunctionValue.java b/r/org.eclipse.statet.r.debug.core/src/org/eclipse/statet/internal/r/debug/core/model/RFunctionValue.java
index 08e25f5..fa21580 100644
--- a/r/org.eclipse.statet.r.debug.core/src/org/eclipse/statet/internal/r/debug/core/model/RFunctionValue.java
+++ b/r/org.eclipse.statet.r.debug.core/src/org/eclipse/statet/internal/r/debug/core/model/RFunctionValue.java
@@ -44,17 +44,10 @@
 				sb.append("<unknown>"); //$NON-NLS-1$
 			}
 			else if (params.size() > 0) {
-				{	final Parameter parameter= params.get(0);
-					if (parameter.name != null) {
-						sb.append(parameter.name);
-					}
-				}
+				append(sb, params.get(0));
 				{	for (int i= 1; i < params.size(); i++) {
 						sb.append(", "); //$NON-NLS-1$
-						final Parameter param= params.get(i);
-						if (param.name != null) {
-							sb.append(param.name);
-						}
+						append(sb, params.get(i));
 					}
 				}
 			}
@@ -64,4 +57,11 @@
 		return super.getValueString();
 	}
 	
+	private void append(final StringBuilder sb, final Parameter parameter) {
+		final String name= parameter.getName();
+		if (name != null) {
+			sb.append(name);
+		}
+	}
+	
 }
diff --git a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/r/codegeneration/CodeGeneration.java b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/r/codegeneration/CodeGeneration.java
index 0be42e5..11e7247 100644
--- a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/r/codegeneration/CodeGeneration.java
+++ b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/r/codegeneration/CodeGeneration.java
@@ -122,8 +122,11 @@
 					final int count = parameters.size();
 					tags = new String[count];
 					for (int i = 0; i < count; i++) {
+						final String paramName= parameters.get(i).getName();
 						tagBuffer.append("@param "); //$NON-NLS-1$
-						tagBuffer.append(parameters.get(i).name);
+						if (paramName != null) {
+							tagBuffer.append(paramName);
+						}
 						tagBuffer.append(" "); //$NON-NLS-1$
 						tags[i] = tagBuffer.toString();
 						tagBuffer.setLength(0);
@@ -249,11 +252,11 @@
 					if (parameters != null) {
 						final int count = parameters.size();
 						for (int i = 0; i < count; i++) {
-							final var parameter= parameters.get(i);
-							if (parameter.className == null || parameter.className.equals("ANY")) { //$NON-NLS-1$
+							final var className= parameters.get(i).getClassName();
+							if (className == null || className.equals("ANY")) { //$NON-NLS-1$
 								break;
 							}
-							sb.append(parameter.className);
+							sb.append(className);
 							sb.append(","); //$NON-NLS-1$
 						}
 						if (sb.length() > 0) {
@@ -279,8 +282,11 @@
 						final int count = parameters.size();
 						paramTags = new String[count];
 						for (int i = 0; i < count; i++) {
+							final String paramName= parameters.get(i).getName();
 							sb.append("@param "); //$NON-NLS-1$
-							sb.append(parameters.get(i).name);
+							if (paramName != null) {
+								sb.append(paramName);
+							}
 							sb.append(" "); //$NON-NLS-1$
 							paramTags[i] = sb.toString();
 							sb.setLength(0);
diff --git a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/r/ui/RLabelProvider.java b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/r/ui/RLabelProvider.java
index 3d88b87..f6f085c 100644
--- a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/r/ui/RLabelProvider.java
+++ b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/r/ui/RLabelProvider.java
@@ -779,34 +779,46 @@
 	}
 	
 	private void appendParameter(final StyledString text, final Parameter parameter) {
-		if (parameter.name != null) {
-			text.append(parameter.name, this.defaultStyler);
+		{	final String name= parameter.getName();
+			if (name != null) {
+				text.append(name, this.defaultStyler);
+			}
 		}
 	}
 	
 	private void appendParameter(final StringBuilder text, final Parameter parameter) {
-		if (parameter.name != null) {
-			text.append(parameter.name);
+		{	final String name= parameter.getName();
+			if (name != null) {
+				text.append(name);
+			}
 		}
 	}
 	
 	private void appendParameterWithType(final StyledString text, final Parameter parameter) {
-		if (parameter.name != null) {
-			text.append(parameter.name, this.defaultStyler);
+		{	final String name= parameter.getName();
+			if (name != null) {
+				text.append(name, this.defaultStyler);
+			}
 		}
-		if (parameter.className != null) {
-			text.append(" : ", StyledString.DECORATIONS_STYLER); //$NON-NLS-1$
-			text.append(parameter.className, StyledString.DECORATIONS_STYLER);
+		{	final var className= parameter.getClassName();
+			if (className != null) {
+				text.append(" : ", StyledString.DECORATIONS_STYLER); //$NON-NLS-1$
+				text.append(className, StyledString.DECORATIONS_STYLER);
+			}
 		}
 	}
 	
 	private void appendParameterWithType(final StringBuilder text, final Parameter parameter) {
-		if (parameter.name != null) {
-			text.append(parameter.name);
+		{	final String name= parameter.getName();
+			if (name != null) {
+				text.append(name);
+			}
 		}
-		if (parameter.className != null) {
-			text.append(" : "); //$NON-NLS-1$
-			text.append(parameter.className);
+		{	final var className= parameter.getClassName();
+			if (className != null) {
+				text.append(" : "); //$NON-NLS-1$
+				text.append(className);
+			}
 		}
 	}
 	
@@ -834,12 +846,16 @@
 	}
 	
 	private void appendParameterLong(final StringBuilder sb, final Parameter parameter) {
-		if (parameter.name != null) {
-			sb.append(parameter.name);
+		{	final String name= parameter.getName();
+			if (name != null) {
+				sb.append(name);
+			}
 		}
-		if (parameter.className != null) {
-			sb.append(" : "); //$NON-NLS-1$
-			sb.append(parameter.className);
+		{	final var className= parameter.getClassName();
+			if (className != null) {
+				sb.append(" : "); //$NON-NLS-1$
+				sb.append(className);
+			}
 		}
 	}
 	
diff --git a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/r/ui/sourceediting/RElementCompletionComputer.java b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/r/ui/sourceediting/RElementCompletionComputer.java
index 0a5f977..639d693 100644
--- a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/r/ui/sourceediting/RElementCompletionComputer.java
+++ b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/r/ui/sourceediting/RElementCompletionComputer.java
@@ -660,7 +660,7 @@
 	}
 	
 	
-	protected final boolean isPackageArg(final String name) {
+	protected final boolean isPackageArg(final @Nullable String name) {
 		return ("package".equals(name));
 	}
 	
@@ -707,10 +707,10 @@
 			
 			private boolean isValidNameContext(final Parameters.Parameter parameter) {
 				if (RElementCompletionComputer.this.inString) {
-					return ((parameter.type & Parameters.NAME_AS_STRING) != 0);
+					return ((parameter.getType() & Parameters.NAME_AS_STRING) != 0);
 				}
 				else {
-					return ((parameter.type & Parameters.NAME_AS_SYMBOL) != 0);
+					return ((parameter.getType() & Parameters.NAME_AS_SYMBOL) != 0);
 				}
 			}
 			
@@ -718,22 +718,22 @@
 					final boolean guess, final int relevance) {
 				final var parameter= args.getParameterForFCall(argIdx);
 				if (parameter != null) {
-					final boolean typedDef= (parameter.type != 0);
+					final boolean typedDef= (parameter.getType() != 0);
 					if (RElementCompletionComputer.this.pkgNamePrio == NA_PRIO) {
 						if (typedDef) {
-							if ((parameter.type & Parameters.PACKAGE_NAME) != 0
+							if ((parameter.getType() & Parameters.PACKAGE_NAME) != 0
 									&& isValidNameContext(parameter) ) {
 								RElementCompletionComputer.this.pkgNamePrio= ARG_TYPE_PRIO + relevance;
 							}
 						}
 						else if (guess && RElementCompletionComputer.this.inString
-								&& isPackageArg(parameter.name) ) {
+								&& isPackageArg(parameter.getName()) ) {
 							RElementCompletionComputer.this.pkgNamePrio= ARG_TYPE_PRIO + relevance;
 						}
 					}
 					if (RElementCompletionComputer.this.helpTopicPrio == NA_PRIO) {
 						if (typedDef) {
-							if ((parameter.type & Parameters.HELP_TOPIC_NAME) != 0
+							if ((parameter.getType() & Parameters.HELP_TOPIC_NAME) != 0
 									&& isValidNameContext(parameter) ) {
 								RElementCompletionComputer.this.helpTopicPrio= ARG_TYPE_PRIO + relevance;
 							}
@@ -772,10 +772,11 @@
 				if (argName) {
 					for (int i= 0; i < elementParameters.size(); i++) {
 						final var param= elementParameters.get(i);
-						if (param.name != null && param.name.length() > 0 && !param.name.equals("...")) {
-							if (parameters.matchesNamePattern(param.name)
-									&& this.argNames.add(param.name)) {
-								final RElementName name= RElementName.create(RElementName.MAIN_DEFAULT, param.name);
+						final String paramName= param.getName();
+						if (paramName != null && !paramName.isEmpty() && !paramName.equals("...")) {
+							if (parameters.matchesNamePattern(paramName)
+									&& this.argNames.add(paramName) ) {
+								final RElementName name= RElementName.create(RElementName.MAIN_DEFAULT, param.getName());
 								parameters.baseRelevance= contextRelevance + ARG_NAME_PRIO;
 								parameters.replacementName= name;
 								parameters.element= element;
