Source:
<code>public DocumentModel getEntry(String entryId, EntrySource source, boolean fetchReferences) throws DirectoryException { if (!isCacheEnabled()) { return source.getEntryFromSource(entryId, fetchReferences); } else if (isCacheEnabled() && (getEntryCache() == null || getEntryCacheWithoutReferences() == null)) { if (log.isDebugEnabled()) { if (getEntryCache() == null) { log.debug(String.format( <START> "The cache for entry is undefined for directory '%s', '%s' will be created with the default cache configuration", <END> name, entryCacheName)); } if (getEntryCacheWithoutReferences() == null) { log.debug(String.format( "The cache for entry without references is undefined for directory '%s', '%s' will be created with the default cache configuration", name, entryCacheWithoutReferencesName)); } } return source.getEntryFromSource(entryId, fetchReferences); } Cache cache = fetchReferences ? getEntryCache() : getEntryCacheWithoutReferences(); Serializable entry = cache.get(entryId); if (CACHE_MISS.equals(entry)) { negativeHitsCounter.inc(); return null; } DocumentModel dm = (DocumentModel) entry; if (dm == null) { dm = source.getEntryFromSource(entryId, fetchReferences); if (dm != null) { cache.put(entryId, dm); if (fetchReferences) { sizeCounter.inc(); } } else if (negativeCaching) { cache.put(entryId, CACHE_MISS); } missesCounter.inc(); } else { hitsCounter.inc(); } try { if (dm == null) { return null; } DocumentModel clone = dm.clone(); if (BaseSession.isReadOnlyEntry(dm)) { BaseSession.setReadOnlyEntry(clone); } return clone; } catch (CloneNotSupportedException e) { return dm; } }</code><technical_language>remove "for entry " I guess</technical_language>

Target:
public DocumentModel getEntry(String entryId, EntrySource source, boolean fetchReferences) throws DirectoryException { if (!isCacheEnabled()) { return source.getEntryFromSource(entryId, fetchReferences); } else if (isCacheEnabled() && (getEntryCache() == null || getEntryCacheWithoutReferences() == null)) { if (log.isDebugEnabled()) { if (getEntryCache() == null) { log.debug(String.format( "The cache '%s' is undefined for directory '%s', it will be created with the default cache configuration", entryCacheName, name)); } if (getEntryCacheWithoutReferences() == null) { log.debug(String.format( "The cache '%s' is undefined for directory '%s', it will be created with the default cache configuration", entryCacheWithoutReferencesName, name)); } } return source.getEntryFromSource(entryId, fetchReferences); } Cache cache = fetchReferences ? getEntryCache() : getEntryCacheWithoutReferences(); Serializable entry = cache.get(entryId); if (CACHE_MISS.equals(entry)) { negativeHitsCounter.inc(); return null; } DocumentModel dm = (DocumentModel) entry; if (dm == null) { dm = source.getEntryFromSource(entryId, fetchReferences); if (dm != null) { cache.put(entryId, dm); if (fetchReferences) { sizeCounter.inc(); } } else if (negativeCaching) { cache.put(entryId, CACHE_MISS); } missesCounter.inc(); } else { hitsCounter.inc(); } try { if (dm == null) { return null; } DocumentModel clone = dm.clone(); if (BaseSession.isReadOnlyEntry(dm)) { BaseSession.setReadOnlyEntry(clone); } return clone; } catch (CloneNotSupportedException e) { return dm; } }