Buggy code:
public static final int AttrAlfrescoFiles = 16 ; public static final int AttrAlfrescoFolders = 32 ; public static final int AttrMultiplePaths = 64 ; public static final int AttrAllowNoParams = 128 ; public static final int AttrAnyFiles = ( ( DesktopAction . AttrTargetFiles ) + ( DesktopAction . AttrClientFiles ) ) + ( DesktopAction . AttrAlfrescoFiles ) ; public static final int AttrAnyFolders = ( ( DesktopAction . AttrTargetFolders ) + ( DesktopAction . AttrClientFolders ) ) + ( DesktopAction . AttrAlfrescoFolders ) ; public static final int AttrAnyFilesFolders = ( DesktopAction . AttrAnyFiles ) + ( DesktopAction . AttrAnyFolders ) ; public static final int PreCopyToTarget = 1 ; public static final int PreConfirmAction = 2 ; public static final int PreLocalToWorkingCopy = 4 ; public static final int StsSuccess = 0 ; public static final int StsError = 1 ; public static final int StsFileNotFound = 2 ; public static final int StsAccessDenied = 3 ; public static final int StsBadParameter = 4 ; public static final int StsNotWorkingCopy = 5 ; public static final int StsNoSuchAction = 6 ; public static final int StsLaunchURL = 7 ; public static final int StsCommandLine = 8 ; public static final int StsAuthTicket = 9 ; private String m_name ; private PseudoFile m_pseudoFile ; private String m_filename ; private String m_path ; private int m_attributes ; private int m_clientPreActions ; private AlfrescoContext m_filesysContext ; private String m_webappURL ; private boolean m_debug ; protected DesktopAction ( ) { } protected DesktopAction ( int attr , int preActions ) { } protected DesktopAction ( String name ) { } public final int getAttributes ( ) { } public final boolean hasAttribute ( int attr ) { } public final int getPreProcessActions ( ) { } public final boolean hasPreProcessAction ( int pre ) { } public final String getName ( ) { } public final boolean hasPseudoFile ( ) { } public final PseudoFile getPseudoFile ( ) { } public final AlfrescoContext getContext ( ) { } public String getConfirmationString ( ) { } ServiceRegistry serviceRegistry ; public final ServiceRegistry getServiceRegistry ( ) { } public final void setServiceRegistry ( ServiceRegistry serviceRegistry ) { } public final boolean hasDebug ( ) { } public final boolean hasWebappURL ( ) { } public final String getWebappURL ( ) { } public void initializeAction ( ConfigElement global , ConfigElement config , DiskSharedDevice fileSys ) throws DesktopActionException { } public void standardInitialize ( ConfigElement global , ConfigElement config , DiskSharedDevice fileSys ) throws DesktopActionException { } public void initializeAction ( ServiceRegistry serviceRegistry , AlfrescoContext filesysContext ) throws DesktopActionException { this . serviceRegistry = serviceRegistry ; m_filesysContext = filesysContext ; if ( ( ( m_name ) == null ) || ( ( m_name . length ( ) ) == 0 ) ) throw new DesktopActionException ( "Desktop<seq2seq4repair_space>action<seq2seq4repair_space>name<seq2seq4repair_space>not<seq2seq4repair_space>specified" ) ; if ( ( m_pseudoFile ) == null ) { if ( ( ( m_filename ) == null ) || ( ( m_filename . length ( ) ) == 0 ) ) throw new DesktopActionException ( "Desktop<seq2seq4repair_space>action<seq2seq4repair_space>pseudo<seq2seq4repair_space>name<seq2seq4repair_space>not<seq2seq4repair_space>specified" ) ; if ( ( ( m_path ) == null ) || ( ( m_path . length ( ) ) == 0 ) ) { m_path = m_filesysContext . getGlobalDesktopActionConfig ( ) . getPath ( ) ; } if ( ( ( m_path ) == null ) || ( ( m_path . length ( ) ) == 0 ) ) throw new DesktopActionException ( "Desktop<seq2seq4repair_space>action<seq2seq4repair_space>executable<seq2seq4repair_space>path<seq2seq4repair_space>not<seq2seq4repair_space>specified" ) ; Resource resource = new ResourceFinder ( ) . getResource ( m_path ) ; if ( ! ( resource . exists ( ) ) ) { throw new DesktopActionException ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>find<seq2seq4repair_space>drag<seq2seq4repair_space>and<seq2seq4repair_space>drop<seq2seq4repair_space>application,<seq2seq4repair_space>" + ( m_path ) ) ) ; } PseudoFile pseudoFile = null ; try { pseudoFile = new org . alfresco . jlan . server . filesys . pseudo . MemoryPseudoFile ( m_filename , IOUtils . toByteArray ( resource . getInputStream ( ) ) ) ; } catch ( IOException e ) { throw new DesktopActionException ( ( "Drag<seq2seq4repair_space>and<seq2seq4repair_space>drop<seq2seq4repair_space>application<seq2seq4repair_space>resource<seq2seq4repair_space>is<seq2seq4repair_space>invalid,<seq2seq4repair_space>" + ( resource . getDescription ( ) ) ) ) ; } setPseudoFile ( pseudoFile ) ; } if ( ( m_filesysContext . getGlobalDesktopActionConfig ( ) . getNoConfirm ( ) ) && ( hasPreProcessAction ( DesktopAction . PreConfirmAction ) ) ) setPreProcessActions ( ( ( getPreProcessActions ( ) ) - ( DesktopAction . PreConfirmAction ) ) ) ; SysAdminParams sysAdminParams = m_filesysContext . getSysAdminParams ( ) ; if ( ( ( m_webappURL ) == null ) || ( ( m_webappURL . length ( ) ) == 0 ) ) { <START_BUG> m_webappURL = m_filesysContext . getURLPrefix ( ) ; <END_BUG> } else { m_webappURL = sysAdminParams . subsituteHost ( m_webappURL ) ; if ( ! ( m_webappURL . endsWith ( "//" ) ) ) { m_webappURL = ( m_webappURL ) + "//" ; } } if ( m_filesysContext . getGlobalDesktopActionConfig ( ) . getDebug ( ) ) setDebug ( true ) ; if ( ( DesktopAction . logger . isDebugEnabled ( ) ) && ( hasDebug ( ) ) ) DesktopAction . logger . debug ( ( ( ( "Initialized<seq2seq4repair_space>desktop<seq2seq4repair_space>action<seq2seq4repair_space>" + ( getName ( ) ) ) + ",<seq2seq4repair_space>pseudo<seq2seq4repair_space>name<seq2seq4repair_space>" ) + ( m_pseudoFile . getFileName ( ) ) ) ) ; } private final ConfigElement findConfigElement ( String name , ConfigElement global , ConfigElement local ) { } public abstract DesktopResponse runAction ( DesktopParams params ) throws DesktopActionException { } protected final void setAttributes ( int attr ) { } public final void setPreProcessActions ( int pre ) { } public final void setName ( String name ) { } public final void setPseudoFile ( PseudoFile pseudoFile ) { } public void setFilename ( String filename ) { } public void setPath ( String path ) { } public final void setDebug ( boolean ena ) { } public final void setWebappURL ( String urlStr ) { } @ Override public boolean equals ( Object obj ) { } public String toString ( ) { } }

Fix:
m_webappURL = m_filesysContext . getShareUrlPrefix ( ) ;