Buggy code:
@ Override public Document getContentAsDocument ( String path ) throws DocumentException { } @ Override public boolean writeContent ( String path , InputStream content ) { } @ Override public void writeContent ( String site , String path , String fileName , String contentType , InputStream input , String createFolders , String edit , String unlock ) throws ServiceException { } @ Override public void writeContentAndRename ( final String site , final String path , final String targetPath , final String fileName , final String contentType , final InputStream input , final String createFolders , final String edit , final String unlock , final boolean createFolder ) throws ServiceException { } @ Override public Map < String , Object > writeContentAsset ( String site , String path , String assetName , InputStream in , String isImage , String allowedWidth , String allowedHeight , String allowLessSize , String draft , String unlock , String systemAsset ) throws ServiceException { } @ Override public boolean writeContent ( String site , String path , InputStream content ) { } @ Override public boolean createFolder ( String site , String path , String name ) { } @ Override public boolean deleteContent ( String site , String path , String approver ) { } @ Override public boolean deleteContent ( String site , String path , boolean generateActivity , String approver ) { } protected void generateDeleteActivity ( String site , String path , String approver ) { } @ Override public boolean copyContent ( String site , String fromPath , String toPath ) { } @ Override public boolean moveContent ( String site , String fromPath , String toPath ) { } @ Override public boolean moveContent ( String site , String fromPath , String toPath , String newName ) { } protected ContentItemTO createNewContentItemTO ( String site , String contentPath ) { } protected ContentItemTO populateContentDrivenProperties ( String site , ContentItemTO item ) throws Exception { String fullContentPath = expandRelativeSitePath ( item . site , item . uri ) ; String contentPath = item . uri ; ContentServiceImpl . logger . debug ( "Pupulating<seq2seq4repair_space>page<seq2seq4repair_space>props<seq2seq4repair_space>{0}" , contentPath ) ; item . setLevelDescriptor ( item . name . equals ( servicesConfig . getLevelDescriptorName ( site ) ) ) ; item . page = ContentUtils . matchesPatterns ( item . getUri ( ) , servicesConfig . getPagePatterns ( site ) ) ; item . isPage = item . page ; item . previewable = item . page ; item . isPreviewable = item . previewable ; item . component = ( ContentUtils . matchesPatterns ( item . getUri ( ) , servicesConfig . getComponentPatterns ( site ) ) ) || ( item . isLevelDescriptor ( ) ) ; item . isComponent = item . component ; item . asset = ContentUtils . matchesPatterns ( item . getUri ( ) , servicesConfig . getAssetPatterns ( site ) ) ; item . isAsset = item . asset ; item . document = ContentUtils . matchesPatterns ( item . getUri ( ) , servicesConfig . getDocumentPatterns ( site ) ) ; item . isDocument = item . document ; item . uri = contentPath ; item . path = contentPath . substring ( 0 , contentPath . lastIndexOf ( "//" ) ) ; item . name = contentPath . substring ( ( ( contentPath . lastIndexOf ( "//" ) ) + 1 ) ) ; item . browserUri = ( item . page ) ? contentPath . replace ( "//site//website" , "" ) . replace ( "//index.xml" , "" ) : null ; Document contentDoc = this . getContentAsDocument ( fullContentPath ) ; if ( contentDoc != null ) { Element rootElement = contentDoc . getRootElement ( ) ; String internalName = rootElement . valueOf ( "internal-name" ) ; String contentType = rootElement . valueOf ( "content-type" ) ; String disabled = rootElement . valueOf ( "disabled" ) ; String savedAsDraft = rootElement . valueOf ( "savedAsDraft" ) ; String floating = rootElement . valueOf ( "placeInNav" ) ; String navigation = rootElement . valueOf ( "placeInNav" ) ; String hideInAuthoring = rootElement . valueOf ( "hideInAuthoring" ) ; String displayTemplate = rootElement . valueOf ( "display-template" ) ; item . internalName = ( internalName != null ) ? internalName : null ; <START_BUG> item . contentType = ( contentType != null ) ? internalName : null ; <END_BUG> item . disabled = ( ( disabled != null ) && ( "true" . equalsIgnoreCase ( disabled ) ) ) ? true : false ; item . savedAsDraft = ( ( savedAsDraft != null ) && ( "true" . equalsIgnoreCase ( savedAsDraft ) ) ) ? true : false ; item . hideInAuthoring = ( ( hideInAuthoring != null ) && ( "true" . equalsIgnoreCase ( hideInAuthoring ) ) ) ? true : false ; item . navigation = ( ( navigation != null ) && ( "true" . equalsIgnoreCase ( navigation ) ) ) ? true : false ; item . floating = ! ( item . navigation ) ; item . setOrders ( getItemOrders ( rootElement . selectNodes ( ( "////" + ( DmXmlConstants . ELM_ORDER_DEFAULT ) ) ) ) ) ; if ( displayTemplate != null ) { RenderingTemplateTO template = new RenderingTemplateTO ( ) ; template . uri = displayTemplate ; template . name = "DEFAULT" ; item . renderingTemplates . add ( template ) ; } } else { ContentServiceImpl . logger . error ( "no<seq2seq4repair_space>xml<seq2seq4repair_space>document<seq2seq4repair_space>could<seq2seq4repair_space>be<seq2seq4repair_space>loaded<seq2seq4repair_space>for<seq2seq4repair_space>path<seq2seq4repair_space>{0}" , fullContentPath ) ; } return item ; } protected void addOrderValue ( List < DmOrderTO > orders , String orderName , String orderStr ) { } protected List < DmOrderTO > getItemOrders ( List < Node > nodes ) { } protected ContentItemTO populateItemChildren ( ContentItemTO item , int depth ) { } @ Override public ContentItemTO getContentItem ( String site , String path ) { } @ Override public ContentItemTO getContentItem ( String site , String path , int depth ) { }

Fix:
item . contentType = ( contentType != null ) ? contentType : null ;