Buggy code:
@ SuppressWarnings ( "serial" ) public class DataAccessorGaeImpl implements DataAccessor { private static final Logger logger = Logger . getLogger ( DataAccessorGaeImpl . class . getName ( ) ) ; private static final PersistenceManagerFactory pmfInstance = JDOHelper . getPersistenceManagerFactory ( "transactions-optional" ) ; protected final PersistenceManager pm ; public DataAccessorGaeImpl ( ) { } @ Override public PersistenceManager getPersistenceManager ( ) { } protected < T > T getEntity ( Class < T > clazz , Object id ) { } protected < T > T createOrUpdateEntity ( T entity ) { } protected < T > List < T > createOrUpdateEntityList ( List < T > entityList ) { } protected < T > void deleteEntity ( Class < T > clazz , Object id ) { } @ Override public AppProperty newAppProperty ( String id ) { } @ Override public AppProperty getAppProperty ( String id ) { if ( id == null ) return null ; try { <START_BUG> return getEntity ( AppProperty . class , id ) ; <END_BUG> } catch ( JDOObjectNotFoundException e ) { return null ; } } @ Override public AppProperty createOrUpdateAppProperty ( AppProperty appProperty ) { } @ Override public User newUser ( ) { } @ Override public User getUser ( Long id ) { } @ Override public User getUserByEmail ( String email ) { } @ SuppressWarnings ( "unchecked" ) @ Override public List < User > getUserList ( ) { } @ Override public User createOrUpdateUser ( User user ) { } @ Override public Role newRole ( ) { } @ Override public Role getRole ( Long id ) { } @ Override public Role createOrUpdateRole ( Role role ) { } @ Override public UserRole newUserRole ( ) { } @ Override public List < UserRole > getUserRoleList ( Long userId ) { } @ Override public UserRole createOrUpdateUserRole ( UserRole userRole ) { } @ Override public RoleAccess newRoleAccess ( ) { } @ Override public RoleAccess getRoleAccess ( String roleId , String accessId ) { } @ Override public RoleAccess createOrUpdateRoleAccess ( RoleAccess roleAccess ) { } @ Override public Page newPage ( ) { } @ Override public Page getPage ( Long id ) { } @ SuppressWarnings ( "unchecked" ) @ Override public Page getPage ( String uri ) { } @ Override public Page getPage ( String pageType , Long primaryContentId ) { } @ Override public DataListCursorTuple < Page > getPageList ( String cursorStr , Integer resultCount ) { } @ Override public Page createOrUpdatePage ( Page page ) { } @ Override public PageContent getPageContent ( Long id ) { } @ Override public List < PageContent > getPageContentList ( Long pageId ) { } @ Override public DataListCursorTuple < BlogPostContent > getBlogPostContentList ( Long blogId , String cursorStr , int resultCount ) { } @ Override public PageContent createOrUpdatePageContent ( PageContent pageContent ) { } @ Override public PageLayout newPageLayout ( ) { } @ Override public PageLayout getPageLayout ( Long id ) { } @ Override public PageLayout createOrUpdatePageLayout ( PageLayout pageLayout ) { } @ Override public EmailTemplate newEmailTemplate ( ) { } @ Override public Comment newComment ( ) { } @ Override public DataListCursorTuple < Comment > getCommentList ( String refId , String cursorStr , int resultCount ) { } @ Override public Comment createOrUpdateComment ( Comment comment ) { } @ Override public AccessToken newAccessToken ( ) { } @ Override public AccessToken getAccessToken ( String accessTokenId ) { } @ Override public AccessToken getAccessTokenById ( String accessTokenId ) { } @ Override public AccessToken createAccessToken ( AccessToken accessToken ) { } @ Override public AccessToken updateAccessToken ( AccessToken accessToken ) { } @ Override public AuditLog newAuditLog ( ) { } @ Override public AuditLog createAuditLog ( AuditLog auditLog ) { } @ Override public DataListCursorTuple < AuditLog > getAuditLogList ( String cursorStr , Integer resultCount ) { } @ Override public void destroy ( ) { } }

Fix:
return getEntity ( AppPropertyEntity . class , id ) ;