Source:
<code>public List<DataAccount> getUsersDataAccounts(Collection<User> users, Pager pager) throws DataAccessException { List<Long> accountIds = new ArrayList<Long>(); StringBuffer commaDelimitedUserIds = new StringBuffer(); if (users != null && users.size() > 0) { for (User user : users) { if (commaDelimitedUserIds.length() != 0) { commaDelimitedUserIds.append("','"); } commaDelimitedUserIds.append(user.id); } } if (commaDelimitedUserIds != null && commaDelimitedUserIds.length() != 0) { String getDataAccountIdsQuery = String.format( "SELECT `dataaccountid` FROM `userdataaccount` WHERE `deleted`='n' AND `userid` IN ('%s') ORDER BY `%s` %s LIMIT %d, %d", commaDelimitedUserIds, pager.sortBy == null ? "id" : pager.sortBy, pager.sortDirection == SortDirectionType.SortDirectionTypeAscending ? "ASC" : "DESC", pager.start == null ? Pager.DEFAULT_START.longValue() <START> : pager.start.longValue(), pager.count == null ? Pager.DEFAULT_COUNT : pager.count.longValue()); <END> Connection userConnection = DatabaseServiceProvider.provide().getNamedConnection(DatabaseType.DatabaseTypeUser.toString()); try { userConnection.connect(); userConnection.executeQuery(getDataAccountIdsQuery); while (userConnection.fetchNextRow()) { Long accountId = userConnection.getCurrentRowLong("dataaccountid"); if (accountId != null) { accountIds.add(accountId); } } } finally { if (userConnection != null) { userConnection.disconnect(); } } } return accountIds.size() == 0 ? new ArrayList<DataAccount>() : DataAccountServiceProvider.provide().getIdsDataAccounts(accountIds, pager); }</code><technical_language>missing longValue() DEFAULT_COUNT</technical_language>

Target:
public List<DataAccount> getUsersDataAccounts(Collection<User> users, Pager pager) throws DataAccessException { List<Long> accountIds = new ArrayList<Long>(); StringBuffer commaDelimitedUserIds = new StringBuffer(); if (users != null && users.size() > 0) { for (User user : users) { if (commaDelimitedUserIds.length() != 0) { commaDelimitedUserIds.append("','"); } commaDelimitedUserIds.append(user.id); } } if (commaDelimitedUserIds != null && commaDelimitedUserIds.length() != 0) { String getDataAccountIdsQuery = String.format( "SELECT `dataaccountid` FROM `userdataaccount` WHERE `deleted`='n' AND `userid` IN ('%s') ORDER BY `%s` %s LIMIT %d, %d", commaDelimitedUserIds, pager.sortBy == null ? "id" : pager.sortBy, pager.sortDirection == SortDirectionType.SortDirectionTypeAscending ? "ASC" : "DESC", pager.start == null ? Pager.DEFAULT_START.longValue() : pager.start.longValue(), pager.count == null ? Pager.DEFAULT_COUNT.longValue() : pager.count.longValue()); Connection userConnection = DatabaseServiceProvider.provide().getNamedConnection(DatabaseType.DatabaseTypeUser.toString()); try { userConnection.connect(); userConnection.executeQuery(getDataAccountIdsQuery); while (userConnection.fetchNextRow()) { Long accountId = userConnection.getCurrentRowLong("dataaccountid"); if (accountId != null) { accountIds.add(accountId); } } } finally { if (userConnection != null) { userConnection.disconnect(); } } } return accountIds.size() == 0 ? new ArrayList<DataAccount>() : DataAccountServiceProvider.provide().getIdsDataAccounts(accountIds, pager); }