Buggy code:
; protected PersistContext persistContext ; protected boolean readOnly ; private Map < Object , IPropertyDescriptor > propertyDescriptors ; private Map < Object , IPropertyDescriptor > hiddenPropertyDescriptors ; private Map < Object , PersistPropertySource . PropertyDescriptorWrapper > beansProperties ; public static PersistPropertySource createPersistPropertySource ( IPersist persist , IPersist context , boolean readonly ) { } public static PersistPropertySource createPersistPropertySource ( IPersist persist , boolean readonly ) { } public static PersistPropertySource createPersistPropertySource ( PersistContext persistContext , boolean readonly ) { } public PersistPropertySource ( PersistContext persistContext , boolean readonly ) { } public void setReadOnly ( boolean readOnly ) { } public IPersist getPersist ( ) { } public IPersist getContext ( ) { } public Object getSaveModel ( ) { } public Object getAdapter ( Class adapter ) { } public Object getEditableValue ( ) { } protected void init ( ) { } protected Object getValueObject ( FlattenedSolution flattenedEditingSolution , Form form ) { } protected IPropertyHandler [ ] createPropertyHandlers ( Object valueObject ) { } protected IPropertyHandler [ ] getPseudoProperties ( Class < ? > clazz ) { } private void registerProperty ( PersistPropertySource . PropertyDescriptorWrapper propertyDescriptor , FlattenedSolution flattenedEditingSolution , Form form ) throws RepositoryException { } protected PropertyCategory createPropertyCategory ( PersistPropertySource . PropertyDescriptorWrapper propertyDescriptor ) { } protected IPropertyDescriptor createPropertyDescriptor ( PersistPropertySource . PropertyDescriptorWrapper propertyDescriptorWrapper , FlattenedSolution flattenedEditingSolution , Form form , String id ) throws RepositoryException { } public IPropertyDescriptor [ ] getPropertyDescriptors ( ) { } public IPropertyDescriptor getPropertyDescriptor ( Object id ) { } protected Map < Object , PersistPropertySource . PropertyDescriptorWrapper > getBeansProperties ( ) { } public static IPropertyDescriptor createPropertyDescriptor ( IPropertySource propertySource , final String id , final PersistContext persistContext , boolean readOnly , PersistPropertySource . PropertyDescriptorWrapper propertyDescriptor , String displayName , FlattenedSolution flattenedEditingSolution , Form form ) throws RepositoryException { } private static DelegatePropertyController createDelegatePropertyControllerForInheritance ( final IPersist persist , final IPropertyDescriptor desc , final String id ) { } private static void setCategory ( IPropertyDescriptor desc , PropertyCategory category ) { } protected IPropertyDescriptor createCombinedPropertyDescriptor ( PersistPropertySource . PropertyDescriptorWrapper propertyDescriptor , Form form ) { } private String getDisplayName ( String name ) { } private static IPropertyDescriptor createPropertyDescriptor ( IPropertySource propertySource , final PersistContext persistContext , final boolean readOnly , final PersistPropertySource . PropertyDescriptorWrapper propertyDescriptor , final String id , String displayName , final FlattenedSolution flattenedEditingSolution , final Form form ) throws RepositoryException { } private static boolean allowFoundsetMethods ( PersistContext persistContext , String id ) { } public static PropertyController < String , ? > createStyleClassPropertyController ( IPersist persist , String id , String displayName , final String styleLookupname , Form form ) { } private DelegatePropertyController getCombinedPropertyDescriptor ( PersistPropertySource . PropertyDescriptorWrapper propertyDescriptor , String displayName , PropertyCategory category , Form form ) { } protected boolean shouldShow ( PersistPropertySource . PropertyDescriptorWrapper propertyDescriptor ) { } protected boolean hideForProperties ( PersistPropertySource . PropertyDescriptorWrapper propertyDescriptor ) { } public Object getPersistPropertyValue ( Object id ) { } public Object getPropertyValue ( Object id ) { } public static Object convertGetPropertyValue ( Object id , IPropertyDescriptor propertyDescriptor , Object rawValue ) { } public static Object convertSetPropertyValue ( Object id , IPropertyDescriptor propertyDescriptor , Object rawValue ) { } public Object getDefaultPersistValue ( Object id ) { init ( ) ; PersistPropertySource . PropertyDescriptorWrapper beanPropertyDescriptor = getBeansProperties ( ) . get ( id ) ; if ( beanPropertyDescriptor == null ) { ServoyLog . logError ( ( "Unknown<seq2seq4repair_space>property<seq2seq4repair_space>id<seq2seq4repair_space>" + id ) , null ) ; return null ; } if ( id instanceof String ) { AbstractRepository repository = ( ( EclipseRepository ) ( persistContext . getPersist ( ) . getRootObject ( ) . getRepository ( ) ) ) ; try { Element element = repository . getContentSpec ( ) . getPropertyForObjectTypeByName ( persistContext . getPersist ( ) . getTypeID ( ) , ( ( String ) ( id ) ) ) ; if ( element != null ) { return repository . convertArgumentStringToObject ( element . getTypeID ( ) , element . getDefaultTextualClassValue ( ) ) ; } PropertyDescription desc = beanPropertyDescriptor . propertyDescriptor . getPropertyDescription ( beanPropertyDescriptor . valueObject , this , persistContext ) ; if ( desc != null ) { if ( ( desc . getDefaultValue ( ) ) != null ) return desc . getDefaultValue ( ) ; if ( ( desc . getType ( ) ) != null ) <START_BUG> return desc . getType ( ) . defaultValue ( ) ; <END_BUG> } } catch ( RepositoryException e ) { ServoyLog . logError ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>get<seq2seq4repair_space>default<seq2seq4repair_space>value<seq2seq4repair_space>for<seq2seq4repair_space>id<seq2seq4repair_space>" + id ) , e ) ; } } if ( ( persistContext . getPersist ( ) ) == ( beanPropertyDescriptor . valueObject ) ) { ServoyLog . logError ( ( ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>content<seq2seq4repair_space>spec<seq2seq4repair_space>value<seq2seq4repair_space>for<seq2seq4repair_space>id<seq2seq4repair_space>" + id ) + "<seq2seq4repair_space>type<seq2seq4repair_space>=<seq2seq4repair_space>" ) + ( persistContext . getPersist ( ) . getTypeID ( ) ) ) , null ) ; } return null ; } public boolean isPropertySet ( Object id ) { } public void resetPropertyValue ( Object id ) { } public void setPersistPropertyValue ( Object id , Object value ) { } private boolean createOverrideElementIfNeeded ( ) throws RepositoryException { } public void setPropertyValue ( Object id , Object value ) { } @ Override public String toString ( ) { } protected String getActualComponentName ( ) { } public static String getActualComponentName ( IPersist persist ) { } public static class PropertyDescriptorWrapper { public final IPropertyHandler propertyDescriptor ; public Object valueObject ; private PropertyEditor propertyEditor ; PropertyDescriptorWrapper ( IPropertyHandler propertyDescriptor , Object valueObject ) { } public void setPropertyEditor ( PropertyEditor propertyEditor ) { } public PropertyEditor getPropertyEditor ( ) { } } private static IPropertyDescriptor getGeneralPropertyDescriptor ( PersistContext persistContext , final boolean readOnly , String id , String displayName , FlattenedSolution flattenedEditingSolution ) { } protected IPropertyDescriptor getPropertiesPropertyDescriptor ( PersistPropertySource . PropertyDescriptorWrapper propertyDescriptor , String id , String displayName , PropertyDescription propertyDescription , FlattenedSolution flattenedEditingSolution , Form form ) throws RepositoryException { }

Fix:
return desc . getType ( ) . defaultValue ( desc ) ;