Buggy code:
@ Inject private ComponentInstManager componentManager ; @ Inject private SpaceProfileInstManager spaceProfileManager ; @ Inject private SpaceEventNotifier spaceEventNotifier ; private void setup ( ) { } protected Admin ( ) { } @ PostConstruct private void initialize ( ) { } @ Override public void reloadCache ( ) { } @ Override public void startServer ( ) { } private void addSpaceInTreeCache ( SpaceInstLight space , boolean addSpaceToSuperSpace ) throws AdminException , NumberFormatException { } @ Override public String getGeneralSpaceId ( ) { } @ Override public void createSpaceIndex ( int spaceId ) { } @ Override public void createSpaceIndex ( SpaceInstLight spaceInst ) { } @ Override public void deleteSpaceIndex ( SpaceInst spaceInst ) { } @ Override public String addSpaceInst ( String userId , SpaceInst spaceInst ) throws AdminException { } @ Override public String deleteSpaceInstById ( String userId , String spaceId , boolean definitive ) throws AdminException { } @ Override public String deleteSpaceInstById ( String userId , String spaceId , boolean startNewTransaction , boolean definitive ) throws AdminException { } private void notifyOnSpaceLogicalDeletion ( String spaceId ) throws AdminException { } private void deleteSpaceProfiles ( SpaceInst spaceInst ) throws AdminException { } @ Override public void restoreSpaceFromBasket ( String spaceId ) throws AdminException { } @ Override public SpaceInst getSpaceInstById ( String spaceId ) throws AdminException { } private SpaceInst getSpaceInstById ( int spaceId ) throws AdminException { } @ Override public SpaceInst getPersonalSpace ( String userId ) throws AdminException { } @ Override public String [ ] getAllSubSpaceIds ( String domainFatherId ) throws AdminException { } @ Override public String updateSpaceInst ( SpaceInst spaceInstNew ) throws AdminException { } @ Override public void updateSpaceOrderNum ( String spaceId , int orderNum ) throws AdminException { } private void updateSpaceInheritance ( SpaceInst space , boolean inheritanceBlocked ) throws AdminException { } @ Override public boolean isSpaceInstExist ( String spaceId ) throws AdminException { } @ Override public String [ ] getAllRootSpaceIds ( ) throws AdminException { } @ Override public List < SpaceInstLight > getPathToComponent ( String componentId ) throws AdminException { } @ Override public List < SpaceInstLight > getPathToSpace ( String spaceId , boolean includeTarget ) throws AdminException { } @ Override public String [ ] getAllSpaceIds ( ) throws AdminException { } @ Override public List < SpaceInstLight > getRemovedSpaces ( ) throws AdminException { } @ Override public List < ComponentInstLight > getRemovedComponents ( ) throws AdminException { } @ Override public String [ ] getSpaceNames ( String [ ] asClientSpaceIds ) throws AdminException { } @ Override public Map < String , SpaceTemplate > getAllSpaceTemplates ( ) { } @ Override public SpaceInst getSpaceInstFromTemplate ( String templateName ) { } @ Override public Map < String , String > getAllComponentsNames ( ) { } @ Override public Map < String , WAComponent > getAllComponents ( ) { } @ Override public ComponentInst getComponentInst ( String sClientComponentId ) throws AdminException { } @ Override public ComponentInstLight getComponentInstLight ( String componentId ) throws AdminException { } private ComponentInst getComponentInst ( int componentId , Integer fatherDriverSpaceId ) throws AdminException { } @ Override public List < Parameter > getComponentParameters ( String componentId ) { } @ Override public String getComponentParameterValue ( String componentId , String parameterName ) { } @ Override public void restoreComponentFromBasket ( String componentId ) throws AdminException { } @ Override public void createComponentIndex ( String componentId ) { } @ Override public void createComponentIndex ( ComponentInstLight componentInst ) { } private void deleteComponentIndex ( String componentId ) { } private void deleteComponentData ( String componentId ) { } @ Override public String addComponentInst ( String sUserId , ComponentInst componentInst ) throws AdminException , QuotaException { } @ Override public String addComponentInst ( String userId , ComponentInst componentInst , boolean startNewTransaction ) throws AdminException , QuotaException { Connection connectionProd = null ; DomainDriverManager domainDriverManager = DomainDriverManagerProvider . getDomainDriverManager ( ) ; try { connectionProd = openConnection ( false ) ; if ( startNewTransaction ) { domainDriverManager . startTransaction ( false ) ; } SpaceInst spaceInstFather = getSpaceInstById ( componentInst . getDomainFatherId ( ) ) ; SpaceServiceProvider . getComponentSpaceQuotaService ( ) . verify ( ComponentSpaceQuotaKey . from ( spaceInstFather ) ) ; componentManager . createComponentInst ( componentInst , domainDriverManager , spaceInstFather . getLocalId ( ) ) ; spaceInstFather . addComponentInst ( componentInst ) ; String componentName = componentInst . getName ( ) ; <START_BUG> String componentId = componentName + ( componentInst . getId ( ) ) ; <END_BUG> String [ ] asCompoNames = new String [ ] { componentName } ; String [ ] asCompoIds = new String [ ] { componentId } ; instantiateComponents ( userId , asCompoIds , asCompoNames , spaceInstFather . getId ( ) , connectionProd ) ; if ( isContentManagedComponent ( componentName ) ) { ContainerManager containerManager = new ContainerManager ( ) ; ContentManager contentManager = new ContentManager ( ) ; containerManager . registerNewContainerInstance ( connectionProd , componentId , "containerPDC" , componentName ) ; contentManager . registerNewContentInstance ( connectionProd , componentId , "containerPDC" , componentName ) ; } if ( ( Admin . useProfileInheritance ) && ( ! ( componentInst . isInheritanceBlocked ( ) ) ) ) { setSpaceProfilesToComponent ( componentInst , spaceInstFather ) ; } if ( startNewTransaction ) { domainDriverManager . commit ( ) ; } connectionProd . commit ( ) ; Admin . cache . opAddComponent ( componentInst ) ; ComponentInstLight component = getComponentInstLight ( componentId ) ; TreeCache . addComponent ( component . getLocalId ( ) , component , getDriverSpaceId ( spaceInstFather . getId ( ) ) ) ; createComponentIndex ( component ) ; return componentId ; } catch ( Exception e ) { try { if ( startNewTransaction ) { domainDriverManager . rollback ( ) ; } connectionProd . rollback ( ) ; } catch ( Exception e1 ) { SilverTrace . error ( MODULE_ADMIN , "Admin.addComponentInst" , "root.EX_ERR_ROLLBACK" , e1 ) ; } if ( e instanceof QuotaException ) { throw ( ( QuotaException ) ( e ) ) ; }

Fix:
String componentId = componentInst . getId ( ) ;