Buggy code:
public abstract class AbstractRemoteServiceClientContainer extends AbstractContainer implements IRemoteServiceClientContainerAdapter { protected ID containerID ; protected ID connectedID ; protected Object connectLock = new Object ( ) ; protected IConnectContext connectContext ; protected Object remoteResponseDeserializerLock = new Object ( ) ; protected IRemoteResponseDeserializer remoteResponseDeserializer = null ; protected Object parameterSerializerLock = new Object ( ) ; protected IRemoteCallParameterSerializer parameterSerializer = null ; protected RemoteServiceClientRegistry registry ; protected List remoteServiceListeners = new ArrayList ( ) ; private List referencesInUse = new ArrayList ( ) ; public AbstractRemoteServiceClientContainer ( ID containerID ) { } public void setConnectContextForAuthentication ( IConnectContext connectContext ) { } public IConnectContext getConnectContextForAuthentication ( ) { } public void setResponseDeserializer ( IRemoteResponseDeserializer resource ) { } public IRemoteResponseDeserializer getResponseDeserializer ( ) { } public void setParameterSerializer ( IRemoteCallParameterSerializer serializer ) { } protected IRemoteCallParameterSerializer getParameterSerializer ( ) { } protected IRemoteResponseDeserializer getResponseDeserializer ( IRemoteCall call , IRemoteCallable callable , Map responseHeaders ) { } protected IRemoteCallParameterSerializer getParameterSerializer ( IRemoteCallParameter parameter , Object value ) { } public void addRemoteServiceListener ( IRemoteServiceListener listener ) { } public IFuture asyncGetRemoteServiceReferences ( final ID [ ] idFilter , final String clazz , final String filter ) { } public IFuture asyncGetRemoteServiceReferences ( final ID target , final String clazz , final String filter ) { } public IRemoteFilter createRemoteFilter ( String filter ) throws InvalidSyntaxException { } public IRemoteServiceReference [ ] getAllRemoteServiceReferences ( String clazz , String filter ) throws InvalidSyntaxException { } public IRemoteService getRemoteService ( IRemoteServiceReference reference ) { } public IRemoteServiceID getRemoteServiceID ( ID containerID1 , long containerRelativeID ) { } public Namespace getRemoteServiceNamespace ( ) { } public IRemoteServiceReference getRemoteServiceReference ( IRemoteServiceID serviceID ) { } public IRemoteServiceReference [ ] getRemoteServiceReferences ( ID [ ] idFilter , String clazz , String filter ) throws InvalidSyntaxException { } public IRemoteServiceReference [ ] getRemoteServiceReferences ( ID target , String clazz , String filter ) throws ContainerConnectException , InvalidSyntaxException { } public IRemoteServiceRegistration registerRemoteService ( final String [ ] clazzes , Object service , Dictionary properties ) { } public void removeRemoteServiceListener ( IRemoteServiceListener listener ) { } public boolean ungetRemoteService ( final IRemoteServiceReference reference ) { } public IRemoteServiceRegistration registerCallables ( IRemoteCallable [ ] restCallables , Dictionary properties ) { } public IRemoteServiceRegistration registerCallables ( String [ ] clazzes , IRemoteCallable [ ] [ ] restCallables , Dictionary properties ) { } public IRemoteServiceRegistration registerRemoteCallables ( Class [ ] clazzes , List callables , Dictionary properties ) { } public IRemoteServiceRegistration registerRemoteCallables ( String [ ] clazzes , List callables , Dictionary properties ) { } public IRemoteCallable [ ] [ ] createCallablesFromClasses ( Class [ ] cls , List callables ) { } protected IRemoteCallable [ ] getCallablesForMethods ( Method [ ] methods , List callables ) { } protected IRemoteCallable findCallableForName ( String fqMethodName , List callables ) { } private Method [ ] getMethodsForClass ( Class class1 ) { } public Class [ ] getClazzesFromStrings ( String [ ] clazzes ) throws IllegalArgumentException { } public Class getClazzFromString ( String className ) throws IllegalArgumentException { } public void connect ( ID targetID , IConnectContext connectContext1 ) throws ContainerConnectException { } public void disconnect ( ) { } public ID getConnectedID ( ) { } public ID getID ( ) { } public void dispose ( ) { } void fireRemoteServiceEvent ( IRemoteServiceEvent event ) { } protected RemoteServiceClientRegistration createRestServiceRegistration ( String [ ] clazzes , IRemoteCallable [ ] [ ] callables , Dictionary properties ) { } protected RemoteServiceClientRegistration createRestServiceRegistration ( IRemoteCallable [ ] callables , Dictionary properties ) { } protected void logException ( String string , Throwable e ) { } protected ID getRemoteCallTargetID ( ) { } protected IRemoteCallParameter [ ] prepareParametersForRequest ( String uri , IRemoteCall call , IRemoteCallable callable ) throws NotSerializableException { List results = new ArrayList ( ) ; Object [ ] callParameters = call . getParameters ( ) ; IRemoteCallParameter [ ] defaultCallableParameters = callable . getDefaultParameters ( ) ; if ( callParameters == null ) return defaultCallableParameters ; for ( int i = 0 ; i < ( callParameters . length ) ; i ++ ) { Object p = callParameters [ i ] ; if ( p instanceof IRemoteCallParameter ) { results . add ( p ) ; continue ; } String name = null ; if ( ( defaultCallableParameters != null ) && ( i < ( defaultCallableParameters . length ) ) ) { if ( p == null ) results . add ( defaultCallableParameters [ i ] ) ; name = defaultCallableParameters [ i ] . getName ( ) ; IRemoteCallParameterSerializer serializer = getParameterSerializer ( ) ; <START_BUG> String val = ( serializer == null ) ? null : serializer . serializeParameter ( uri , call , callable , p , defaultCallableParameters [ i ] ) ; <END_BUG> if ( val != null ) results . add ( new RemoteCallParameter ( name , val ) ) ; } } return ( ( IRemoteCallParameter [ ] ) ( results . toArray ( new IRemoteCallParameter [ ] { } ) ) ) ; } protected Object processResponse ( String uri , IRemoteCall call , IRemoteCallable callable , Map responseHeaders , String responseBody ) throws NotSerializableException { } protected abstract IRemoteService createRemoteService ( RemoteServiceClientRegistration registration ) { } protected abstract String prepareURIForRequest ( IRemoteCall call , IRemoteCallable callable ) { } }

Fix:
IRemoteCallParameter val = ( serializer == null ) ? null : serializer . serializeParameter ( uri , call , callable , defaultCallableParameters [ i ] , p ) ;