Buggy code:
public class AriesApplicationManagerImpl implements AriesApplicationManager { private ApplicationMetadataFactory _applicationMetadataFactory ; private DeploymentMetadataFactory _deploymentMetadataFactory ; private List < BundleConverter > _bundleConverters ; private AriesApplicationResolver _resolver ; private LocalPlatform _localPlatform ; private AriesApplicationContextManager _applicationContextManager ; private static final Logger _logger = LoggerFactory . getLogger ( "org.apache.aries.application.management.impl" ) ; public void setApplicationMetadataFactory ( ApplicationMetadataFactory amf ) { } public void setDeploymentMetadataFactory ( DeploymentMetadataFactory dmf ) { } public void setBundleConverters ( List < BundleConverter > bcs ) { } public void setResolver ( AriesApplicationResolver resolver ) { } public void setLocalPlatform ( LocalPlatform lp ) { } public void setApplicationContextManager ( AriesApplicationContextManager acm ) { } public AriesApplication createApplication ( IDirectory ebaFile ) throws ManagementException { ApplicationMetadata applicationMetadata = null ; DeploymentMetadata deploymentMetadata = null ; Map < String , InputStream > modifiedBundles = new HashMap < String , InputStream > ( ) ; AriesApplicationImpl application = null ; try { Manifest applicationManifest = parseApplicationManifest ( ebaFile ) ; ManifestDefaultsInjector . updateManifest ( applicationManifest , ebaFile . getName ( ) , ebaFile ) ; applicationMetadata = _applicationMetadataFactory . createApplicationMetadata ( applicationManifest ) ; IFile deploymentManifest = ebaFile . getFile ( DEPLOYMENT_MF ) ; if ( deploymentManifest != null ) { deploymentMetadata = _deploymentMetadataFactory . createDeploymentMetadata ( deploymentManifest ) ; String appSymbolicName = applicationMetadata . getApplicationSymbolicName ( ) ; <START_BUG> String depSymbolicName = applicationMetadata . getApplicationSymbolicName ( ) ; <END_BUG> if ( ! ( appSymbolicName . equals ( depSymbolicName ) ) ) { throw new ManagementException ( MessageUtil . getMessage ( "APPMANAGEMENT0002E" , ebaFile . getName ( ) , appSymbolicName , depSymbolicName ) ) ; } } Set < BundleInfo > extraBundlesInfo = new HashSet < BundleInfo > ( ) ; for ( IFile f : ebaFile ) { if ( f . isDirectory ( ) ) { continue ; } BundleManifest bm = getBundleManifest ( f ) ; if ( bm != null ) { if ( bm . isValid ( ) ) { extraBundlesInfo . add ( new org . apache . aries . application . utils . management . SimpleBundleInfo ( _applicationMetadataFactory , bm , f . toURL ( ) . toExternalForm ( ) ) ) ; } else if ( deploymentMetadata != null ) { throw new ManagementException ( MessageUtil . getMessage ( "APPMANAGEMENT0003E" , f . getName ( ) , ebaFile . getName ( ) ) ) ; } else { InputStream convertedBinary = null ; Iterator < BundleConverter > converters = _bundleConverters . iterator ( ) ; List < ConversionException > conversionExceptions = Collections . emptyList ( ) ; while ( ( converters . hasNext ( ) ) && ( convertedBinary == null ) ) { try { convertedBinary = converters . next ( ) . convert ( ebaFile , f ) ; } catch ( ServiceException sx ) { } catch ( ConversionException cx ) { conversionExceptions . add ( cx ) ; } } if ( ( conversionExceptions . size ( ) ) > 0 ) { for ( ConversionException cx : conversionExceptions ) { AriesApplicationManagerImpl . _logger . error ( "APPMANAGEMENT0004E" , new Object [ ] { f . getName ( ) , ebaFile . getName ( ) , cx } ) ; } throw new ManagementException ( MessageUtil . getMessage ( "APPMANAGEMENT0005E" , ebaFile . getName ( ) ) ) ; } if ( convertedBinary != null ) { modifiedBundles . put ( f . getName ( ) , convertedBinary ) ; bm = BundleManifest . fromBundle ( f ) ; extraBundlesInfo . add ( new org . apache . aries . application . utils . management . SimpleBundleInfo ( _applicationMetadataFactory , bm , f . getName ( ) ) ) ; } } } } application = new AriesApplicationImpl ( applicationMetadata , extraBundlesInfo , _localPlatform ) ; application . setDeploymentMetadata ( deploymentMetadata ) ; application . setModifiedBundles ( modifiedBundles ) ; } catch ( IOException iox ) { AriesApplicationManagerImpl . _logger . error ( "APPMANAGEMENT0006E" , new Object [ ] { ebaFile . getName ( ) , iox } ) ; throw new ManagementException ( iox ) ; } return application ; } public AriesApplication createApplication ( URL url ) throws ManagementException { } public AriesApplication resolve ( AriesApplication originalApp , ResolveConstraint ... constraints ) throws ResolverException { } public AriesApplicationContext install ( AriesApplication app ) throws ManagementException , ResolverException , BundleException { } public void uninstall ( AriesApplicationContext app ) throws BundleException { } public void addApplicationListener ( AriesApplicationListener l ) { } public void removeApplicationListener ( AriesApplicationListener l ) { } private Manifest parseApplicationManifest ( IDirectory source ) throws IOException { } private BundleManifest getBundleManifest ( IFile file ) throws IOException { } }

Fix:
String depSymbolicName = deploymentMetadata . getApplicationSymbolicName ( ) ;