Program: 828
Project: 828
Buggy source:
/** 
 * Specifies that a sync should be requested with the specified the account, authority, and extras at the given frequency. If there is already another periodic sync scheduled with the account, authority and extras then a new periodic sync won't be added, instead the frequency of the previous one will be updated. <p> These periodic syncs honor the "syncAutomatically" and "masterSyncAutomatically" settings. Although these sync are scheduled at the specified frequency, it may take longer for it to actually be started if other syncs are ahead of it in the sync operation queue. This means that the actual start time may drift. <p> Periodic syncs are not allowed to have any of   {@link #SYNC_EXTRAS_DO_NOT_RETRY},  {@link #SYNC_EXTRAS_IGNORE_BACKOFF},   {@link #SYNC_EXTRAS_IGNORE_SETTINGS},  {@link #SYNC_EXTRAS_INITIALIZE},   {@link #SYNC_EXTRAS_FORCE},  {@link #SYNC_EXTRAS_EXPEDITED},   {@link #SYNC_EXTRAS_MANUAL} set to true.If any are supplied then an  {@link IllegalArgumentException} will be thrown.<p>As of API level 19 this function introduces a default flexibility of ~4% (up to a maximum of one hour in the day) into the requested period. Use {@link SyncRequest.Builder#syncPeriodic(long,long)} to set this flexibility manually.<p>This method requires the caller to hold the permission {@link android.Manifest.permission#WRITE_SYNC_SETTINGS}.
 * @param account the account to specify in the sync
 * @param authority the provider to specify in the sync request
 * @param extras extra parameters to go along with the sync request
 * @param pollFrequency how frequently the sync should be performed, in seconds.
 * @throws IllegalArgumentException if an illegal extra was set or if any of the parametersare null.
 */
public static void addPeriodicSync(Account account,String authority,Bundle extras,long pollFrequency){
  validateSyncExtrasBundle(extras);
  if (account == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (authority == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (extras.getBoolean(SYNC_EXTRAS_MANUAL,false) || extras.getBoolean(SYNC_EXTRAS_DO_NOT_RETRY,false) || extras.getBoolean(SYNC_EXTRAS_IGNORE_BACKOFF,false)|| extras.getBoolean(SYNC_EXTRAS_IGNORE_SETTINGS,false)|| extras.getBoolean(SYNC_EXTRAS_INITIALIZE,false)|| extras.getBoolean(SYNC_EXTRAS_FORCE,false)|| extras.getBoolean(SYNC_EXTRAS_EXPEDITED,false)) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  try {
    getContentService().addPeriodicSync(account,authority,extras,pollFrequency);
  }
 catch (  RemoteException e) {
  }
}

Fixed version (ground truth):
/** 
 * Specifies that a sync should be requested with the specified the account, authority, and extras at the given frequency. If there is already another periodic sync scheduled with the account, authority and extras then a new periodic sync won't be added, instead the frequency of the previous one will be updated. <p> These periodic syncs honor the "syncAutomatically" and "masterSyncAutomatically" settings. Although these sync are scheduled at the specified frequency, it may take longer for it to actually be started if other syncs are ahead of it in the sync operation queue. This means that the actual start time may drift. <p> Periodic syncs are not allowed to have any of   {@link #SYNC_EXTRAS_DO_NOT_RETRY},  {@link #SYNC_EXTRAS_IGNORE_BACKOFF},   {@link #SYNC_EXTRAS_IGNORE_SETTINGS},  {@link #SYNC_EXTRAS_INITIALIZE},   {@link #SYNC_EXTRAS_FORCE},  {@link #SYNC_EXTRAS_EXPEDITED},   {@link #SYNC_EXTRAS_MANUAL} set to true.If any are supplied then an  {@link IllegalArgumentException} will be thrown.<p>As of API level 19 this function introduces a default flexibility of ~4% (up to a maximum of one hour in the day) into the requested period. Use {@link SyncRequest.Builder#syncPeriodic(long,long)} to set this flexibility manually.<p>This method requires the caller to hold the permission {@link android.Manifest.permission#WRITE_SYNC_SETTINGS}.
 * @param account the account to specify in the sync
 * @param authority the provider to specify in the sync request
 * @param extras extra parameters to go along with the sync request
 * @param pollFrequency how frequently the sync should be performed, in seconds.
 * @throws IllegalArgumentException if an illegal extra was set or if any of the parametersare null.
 */
public static void addPeriodicSync(Account account,String authority,Bundle extras,long pollFrequency){
  validateSyncExtrasBundle(extras);
  if (extras.getBoolean(SYNC_EXTRAS_MANUAL,false) || extras.getBoolean(SYNC_EXTRAS_DO_NOT_RETRY,false) || extras.getBoolean(SYNC_EXTRAS_IGNORE_BACKOFF,false)|| extras.getBoolean(SYNC_EXTRAS_IGNORE_SETTINGS,false)|| extras.getBoolean(SYNC_EXTRAS_INITIALIZE,false)|| extras.getBoolean(SYNC_EXTRAS_FORCE,false)|| extras.getBoolean(SYNC_EXTRAS_EXPEDITED,false)) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  try {
    getContentService().addPeriodicSync(account,authority,extras,pollFrequency);
  }
 catch (  RemoteException e) {
  }
}