ContactsContract.Data.LOOKUP_KEY},
ContactsContract.Data.MIMETYPE + "= ?",
new String[]{ContactsContract.CommonDataKinds.Nickname.CONTENT_ITEM_TYPE},
null);
if (nickCursor != null) {
<BUG>if (nickCursor.getCount() > 0) {
while (nickCursor.moveToNext()) {
String lookupKey = nickCursor.getString(

nickCursor.getColumnIndex(ContactsContract.Data.LOOKUP_KEY));
String nick = nickCursor.getString(

nickCursor.getColumnIndex(ContactsContract.CommonDataKinds.Nickname.NAME));</BUG>
if (nick != null && lookupKey != null && mapContacts.containsKey(lookupKey)) {

ContactsContract.Data.LOOKUP_KEY},
ContactsContract.Data.MIMETYPE + "= ?",
new String[]{ContactsContract.CommonDataKinds.Nickname.CONTENT_ITEM_TYPE},
null);
if (nickCursor != null) {
if (nickCursor.getCount() > 0) {
int lookupKeyIndex = nickCursor.getColumnIndex(ContactsContract.Data.LOOKUP_KEY);
int nickNameIndex = nickCursor.getColumnIndex(ContactsContract.CommonDataKinds.Nickname.NAME);
while (nickCursor.moveToNext()) {
String lookupKey = nickCursor.getString(lookupKeyIndex);
String nick = nickCursor.getString(nickNameIndex);
if (nick != null && lookupKey != null && mapContacts.containsKey(lookupKey)) {
