Program: 198613
Project: 198613
Buggy source:
private void onOpenEntry(Uri logUri,long channelId,long watchStarttime,SessionState sessionState){
  if (!isChannelSearchable(channelId)) {
synchronized (mLock) {
      sessionState.mLogUri=null;
    }
    mContentResolver.delete(logUri,null,null);
    return;
  }
  String[] projection={TvContract.Programs.COLUMN_TITLE,TvContract.Programs.COLUMN_START_TIME_UTC_MILLIS,TvContract.Programs.COLUMN_END_TIME_UTC_MILLIS,TvContract.Programs.COLUMN_SHORT_DESCRIPTION};
  String selection=TvContract.Programs.COLUMN_CHANNEL_ID + "String_Node_Str" + TvContract.Programs.COLUMN_START_TIME_UTC_MILLIS+ "String_Node_Str"+ TvContract.Programs.COLUMN_END_TIME_UTC_MILLIS+ "String_Node_Str";
  String[] selectionArgs={String.valueOf(channelId),String.valueOf(watchStarttime),String.valueOf(watchStarttime)};
  String sortOrder=TvContract.Programs.COLUMN_START_TIME_UTC_MILLIS + "String_Node_Str";
  Cursor cursor=null;
  try {
    cursor=mContentResolver.query(TvContract.Programs.CONTENT_URI,projection,selection,selectionArgs,sortOrder);
    if (cursor != null && cursor.moveToNext()) {
      ContentValues values=new ContentValues();
      values.put(TvContract.WatchedPrograms.COLUMN_TITLE,cursor.getString(0));
      values.put(TvContract.WatchedPrograms.COLUMN_START_TIME_UTC_MILLIS,cursor.getLong(1));
      long endTime=cursor.getLong(2);
      values.put(TvContract.WatchedPrograms.COLUMN_END_TIME_UTC_MILLIS,endTime);
      values.put(TvContract.WatchedPrograms.COLUMN_DESCRIPTION,cursor.getString(3));
      mContentResolver.update(logUri,values,null,null);
      SomeArgs args=SomeArgs.obtain();
      args.arg1=logUri;
      args.arg2=channelId;
      args.arg3=endTime;
      Message msg=obtainMessage(LogHandler.MSG_UPDATE_ENTRY,args);
      sendMessageDelayed(msg,endTime - System.currentTimeMillis());
    }
  }
  finally {
    if (cursor != null) {
      cursor.close();
    }
  }
}

Fixed version (ground truth):
private void onOpenEntry(Uri logUri,long channelId,long watchStarttime,SessionState sessionState){
  if (!isChannelSearchable(channelId)) {
synchronized (mLock) {
      sessionState.mLogUri=null;
    }
    mContentResolver.delete(logUri,null,null);
    return;
  }
  String[] projection={TvContract.Programs.COLUMN_TITLE,TvContract.Programs.COLUMN_START_TIME_UTC_MILLIS,TvContract.Programs.COLUMN_END_TIME_UTC_MILLIS,TvContract.Programs.COLUMN_SHORT_DESCRIPTION};
  String selection=TvContract.Programs.COLUMN_CHANNEL_ID + "String_Node_Str" + TvContract.Programs.COLUMN_START_TIME_UTC_MILLIS+ "String_Node_Str"+ TvContract.Programs.COLUMN_END_TIME_UTC_MILLIS+ "String_Node_Str";
  String[] selectionArgs={String.valueOf(channelId),String.valueOf(watchStarttime),String.valueOf(watchStarttime)};
  String sortOrder=TvContract.Programs.COLUMN_START_TIME_UTC_MILLIS + "String_Node_Str";
  Cursor cursor=null;
  try {
    cursor=mContentResolver.query(TvContract.Programs.CONTENT_URI,projection,selection,selectionArgs,sortOrder);
    if (cursor != null && cursor.moveToNext()) {
      ContentValues values=new ContentValues();
      values.put(TvContract.WatchedPrograms.COLUMN_TITLE,cursor.getString(0));
      values.put(TvContract.WatchedPrograms.COLUMN_START_TIME_UTC_MILLIS,cursor.getLong(1));
      long endTime=cursor.getLong(2);
      values.put(TvContract.WatchedPrograms.COLUMN_END_TIME_UTC_MILLIS,endTime);
      values.put(TvContract.WatchedPrograms.COLUMN_DESCRIPTION,cursor.getString(3));
      mContentResolver.update(logUri,values,null,null);
      SomeArgs args=SomeArgs.obtain();
      args.arg1=logUri;
      args.arg2=channelId;
      args.arg3=endTime;
      args.arg4=sessionState;
      Message msg=obtainMessage(LogHandler.MSG_UPDATE_ENTRY,args);
      sendMessageDelayed(msg,endTime - System.currentTimeMillis());
    }
  }
  finally {
    if (cursor != null) {
      cursor.close();
    }
  }
}