nus-yam/ex-repair huggingface dataset:
Program: 24271
Project: 24271
Buggy source:
@Suppress public void testStartUpTime() throws Exception {
  createDB();
  audioPlaybackStartupTime(MediaNames.MP3FILES);
  audioPlaybackStartupTime(MediaNames.AACFILES);
}

Fixed version (ground truth):
@Suppress public void testStartUpTime() throws Exception {
  createDB();
  audioPlaybackStartupTime(MediaNames.MP3FILES);
  audioPlaybackStartupTime(MediaNames.AACFILES);
  if (mDB.isOpen()) {
    mDB.close();
  }
}
Program: 24272
Project: 24272
Buggy source:
public void createDB(){
  mDB=SQLiteDatabase.openOrCreateDatabase("String_Node_Str",null);
  mDB.execSQL("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}

Fixed version (ground truth):
public void createDB(){
  mDB=SQLiteDatabase.openOrCreateDatabase("String_Node_Str",null);
  mDB.execSQL("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  mDB.execSQL("String_Node_Str");
}
Program: 24273
Project: 24273
Buggy source:
@SuppressWarnings({"String_Node_Str"}) protected void performFiltering(CharSequence text,int keyCode){
  mFilter.filter(text,this);
}

Fixed version (ground truth):
/** 
 * <p>Starts filtering the content of the drop down list. The filtering pattern is the content of the edit box. Subclasses should override this method to filter with a different pattern, for instance a substring of <code>text</code>.</p>
 * @param text the filtering pattern
 * @param keyCode the last character inserted in the edit box; beware thatthis will be null when text is being added through a soft input method.
 */
@SuppressWarnings({"String_Node_Str"}) protected void performFiltering(CharSequence text,int keyCode){
  mFilter.filter(text,this);
}
Program: 24275
Project: 24275
Buggy source:
/** 
 * Play a sound from a sound ID <p>Play the sound specified by the soundID. This is the value  returned by the load() function. Returns a non-zero streamID if successful, zero if it fails. The streamID can be used to further control playback. Note that calling play() may cause another sound to stop playing if the maximum number of active streams is exceeded.</p>
 * @param soundID a soundID returned by the load() function
 * @return non-zero streamID if successful, zero if failed
 */
public native final int play(int soundID,float leftVolume,float rightVolume,int priority,int loop,float rate);

Fixed version (ground truth):
/** 
 * Play a sound from a sound ID. Play the sound specified by the soundID. This is the value  returned by the load() function. Returns a non-zero streamID if successful, zero if it fails. The streamID can be used to further control playback. Note that calling play() may cause another sound to stop playing if the maximum number of active streams is exceeded. A loop value of -1 means loop forever, a value of 0 means don't loop, other values indicate the number of repeats, e.g. a value of 1 plays the audio twice. The playback rate allows the application to vary the playback rate (pitch) of the sound. A value of 1.0 means play back at the original frequency. A value of 2.0 means play back twice as fast, and a value of 0.5 means playback at half speed.
 * @param soundID a soundID returned by the load() function
 * @param leftVolume left volume value (range = 0.0 to 1.0)
 * @param rightVolume right volume value (range = 0.0 to 1.0)
 * @param priority stream priority (0 = lowest priority)
 * @param loop loop mode (0 = no loop, -1 = loop forever)
 * @param rate playback rate (1.0 = normal playback, range 0.5 to 2.0)
 * @return non-zero streamID if successful, zero if failed
 */
public native final int play(int soundID,float leftVolume,float rightVolume,int priority,int loop,float rate);
Program: 24276
Project: 24276
Buggy source:
/** 
 * Resume a playback stream <p>Resume the stream specified by the streamID. This is the value returned by the play() function. If the stream is paused, this will resume playback. If the stream was not previously paused, calling this function will have no effect.</p>
 * @param streamID a streamID returned by the play() function
 */
public native final void resume(int streamID);

Fixed version (ground truth):
/** 
 * Resume a playback stream. Resume the stream specified by the streamID. This is the value returned by the play() function. If the stream is paused, this will resume playback. If the stream was not previously paused, calling this function will have no effect.
 * @param streamID a streamID returned by the play() function
 */
public native final void resume(int streamID);
Program: 24277
Project: 24277
Buggy source:
public native final void release();

Fixed version (ground truth):
/** 
 * Release the SoundPool resources. Release all memory and native resources used by the SoundPool object. The SoundPool can no longer be used and the reference should be set to null.
 */
public native final void release();
Program: 24278
Project: 24278
Buggy source:
/** 
 * Change stream priority <p>Change the priority of the stream specified by the streamID. This is the value returned by the play() function. Affects the order in which streams are re-used to play new sounds.
 * @param streamID a streamID returned by the play() function
 */
public native final void setLoop(int streamID,int loop);

Fixed version (ground truth):
/** 
 * Set loop mode. Change the loop mode. A loop value of -1 means loop forever, a value of 0 means don't loop, other values indicate the number of repeats, e.g. a value of 1 plays the audio twice. If the stream does not exist, it will have no effect.
 * @param streamID a streamID returned by the play() function
 * @param loop loop mode (0 = no loop, -1 = loop forever)
 */
public native final void setLoop(int streamID,int loop);
Program: 24279
Project: 24279
Buggy source:
/** 
 * Set stream volume <p>Sets the volume on the stream specified by the streamID. This is the value returned by the play() function. The value must be in the range of 0.0 to 1.0. If the stream does not exist, it will have no effect.</p>
 * @param streamID a streamID returned by the play() function
 * @param leftVolume left volume value (range = 0.0 to 1.0)
 * @param rightVolume right volume value (range = 0.0 to 1.0)
 */
public native final void setVolume(int streamID,float leftVolume,float rightVolume);

Fixed version (ground truth):
/** 
 * Set stream volume. Sets the volume on the stream specified by the streamID. This is the value returned by the play() function. The value must be in the range of 0.0 to 1.0. If the stream does not exist, it will have no effect.
 * @param streamID a streamID returned by the play() function
 * @param leftVolume left volume value (range = 0.0 to 1.0)
 * @param rightVolume right volume value (range = 0.0 to 1.0)
 */
public native final void setVolume(int streamID,float leftVolume,float rightVolume);
Program: 24280
Project: 24280
Buggy source:
public native final void setRate(int streamID,float rate);

Fixed version (ground truth):
/** 
 * Change playback rate. The playback rate allows the application to vary the playback rate (pitch) of the sound. A value of 1.0 means playback at the original frequency. A value of 2.0 means playback twice as fast, and a value of 0.5 means playback at half speed. If the stream does not exist, it will have no effect.
 * @param streamID a streamID returned by the play() function
 * @param rate playback rate (1.0 = normal playback, range 0.5 to 2.0)
 */
public native final void setRate(int streamID,float rate);
Program: 24281
Project: 24281
Buggy source:
/** 
 * Pause a playback stream <p>Pause the stream specified by the streamID. This is the value returned by the play() function. If the stream is playing, it will be paused. If the stream is not playing (e.g. is stopped or was previously paused), calling this function will have no effect.</p>
 * @param streamID a streamID returned by the play() function
 */
public native final void pause(int streamID);

Fixed version (ground truth):
/** 
 * Pause a playback stream. Pause the stream specified by the streamID. This is the value returned by the play() function. If the stream is playing, it will be paused. If the stream is not playing (e.g. is stopped or was previously paused), calling this function will have no effect.
 * @param streamID a streamID returned by the play() function
 */
public native final void pause(int streamID);
Program: 24282
Project: 24282
Buggy source:
/** 
 * Load the sound from a FileDescriptor <p>This version is useful if you store multiple sounds in a single binary. The offset specifies the offset from the start of the file and the length specifies the length of the sound within the file.</p>
 * @param fd a FileDescriptor object
 * @param offset offset to the start of the sound
 * @param length length of the sound
 * @param priority the priority of the sound. Currently has no effect.
 * @return a sound ID. This value can be used to play or unload the sound.
 */
public int load(FileDescriptor fd,long offset,long length,int priority){
  return _load(fd,offset,length,priority);
}

Fixed version (ground truth):
/** 
 * Load the sound from a FileDescriptor. This version is useful if you store multiple sounds in a single binary. The offset specifies the offset from the start of the file and the length specifies the length of the sound within the file.
 * @param fd a FileDescriptor object
 * @param offset offset to the start of the sound
 * @param length length of the sound
 * @param priority the priority of the sound. Currently has no effect. Usea value of 1 for future compatibility.
 * @return a sound ID. This value can be used to play or unload the sound.
 */
public int load(FileDescriptor fd,long offset,long length,int priority){
  return _load(fd,offset,length,priority);
}
Program: 24283
Project: 24283
Buggy source:
/** 
 * Stop a playback stream <p>Stop the stream specified by the streamID. This is the value returned by the play() function. If the stream is playing, it will be stopped. It also releases any native resources associated with this stream. If the stream is not playing, it will have no effect.</p>
 * @param streamID a streamID returned by the play() function
 */
public native final void stop(int streamID);

Fixed version (ground truth):
/** 
 * Stop a playback stream. Stop the stream specified by the streamID. This is the value returned by the play() function. If the stream is playing, it will be stopped. It also releases any native resources associated with this stream. If the stream is not playing, it will have no effect.
 * @param streamID a streamID returned by the play() function
 */
public native final void stop(int streamID);
Program: 24284
Project: 24284
Buggy source:
/** 
 * Unload a sound from a sound ID <p>Unloads the sound specified by the soundID. This is the value returned by the load() function. Returns true if the sound is successfully unloaded, false if the sound was already unloaded.</p>
 * @param soundID a soundID returned by the load() function
 * @return true if just unloaded, false if previously unloaded
 */
public native final boolean unload(int soundID);

Fixed version (ground truth):
/** 
 * Unload a sound from a sound ID. Unloads the sound specified by the soundID. This is the value returned by the load() function. Returns true if the sound is successfully unloaded, false if the sound was already unloaded.
 * @param soundID a soundID returned by the load() function
 * @return true if just unloaded, false if previously unloaded
 */
public native final boolean unload(int soundID);
Program: 24285
Project: 24285
Buggy source:
/** 
 * Change stream priority <p>Change the priority of the stream specified by the streamID. This is the value returned by the play() function. Affects the order in which streams are re-used to play new sounds.
 * @param streamID a streamID returned by the play() function
 */
public native final void setPriority(int streamID,int priority);

Fixed version (ground truth):
/** 
 * Change stream priority. Change the priority of the stream specified by the streamID. This is the value returned by the play() function. Affects the order in which streams are re-used to play new sounds. If the stream does not exist, it will have no effect.
 * @param streamID a streamID returned by the play() function
 */
public native final void setPriority(int streamID,int priority);
Program: 24286
Project: 24286
Buggy source:
/** 
 * Play a sound from a sound ID <p>Play the sound specified by the soundID. This is the value  returned by the load() function. Returns a non-zero streamID if successful, zero if it fails. The streamID can be used to further control playback. Note that calling play() may cause another sound to stop playing if the maximum number of active streams is exceeded.</p>
 * @param soundID a soundID returned by the load() function
 * @return non-zero streamID if successful, zero if failed
 */
public native final int play(int soundID,float leftVolume,float rightVolume,int priority,int loop,float rate);

Fixed version (ground truth):
/** 
 * Play a sound from a sound ID. Play the sound specified by the soundID. This is the value  returned by the load() function. Returns a non-zero streamID if successful, zero if it fails. The streamID can be used to further control playback. Note that calling play() may cause another sound to stop playing if the maximum number of active streams is exceeded. A loop value of -1 means loop forever, a value of 0 means don't loop, other values indicate the number of repeats, e.g. a value of 1 plays the audio twice. The playback rate allows the application to vary the playback rate (pitch) of the sound. A value of 1.0 means play back at the original frequency. A value of 2.0 means play back twice as fast, and a value of 0.5 means playback at half speed.
 * @param soundID a soundID returned by the load() function
 * @param leftVolume left volume value (range = 0.0 to 1.0)
 * @param rightVolume right volume value (range = 0.0 to 1.0)
 * @param priority stream priority (0 = lowest priority)
 * @param loop loop mode (0 = no loop, -1 = loop forever)
 * @param rate playback rate (1.0 = normal playback, range 0.5 to 2.0)
 * @return non-zero streamID if successful, zero if failed
 */
public native final int play(int soundID,float leftVolume,float rightVolume,int priority,int loop,float rate);
Program: 24287
Project: 24287
Buggy source:
/** 
 * Resume a playback stream <p>Resume the stream specified by the streamID. This is the value returned by the play() function. If the stream is paused, this will resume playback. If the stream was not previously paused, calling this function will have no effect.</p>
 * @param streamID a streamID returned by the play() function
 */
public native final void resume(int streamID);

Fixed version (ground truth):
/** 
 * Resume a playback stream. Resume the stream specified by the streamID. This is the value returned by the play() function. If the stream is paused, this will resume playback. If the stream was not previously paused, calling this function will have no effect.
 * @param streamID a streamID returned by the play() function
 */
public native final void resume(int streamID);
Program: 24288
Project: 24288
Buggy source:
public native final void release();

Fixed version (ground truth):
/** 
 * Release the SoundPool resources. Release all memory and native resources used by the SoundPool object. The SoundPool can no longer be used and the reference should be set to null.
 */
public native final void release();
Program: 24289
Project: 24289
Buggy source:
/** 
 * Change stream priority <p>Change the priority of the stream specified by the streamID. This is the value returned by the play() function. Affects the order in which streams are re-used to play new sounds.
 * @param streamID a streamID returned by the play() function
 */
public native final void setLoop(int streamID,int loop);

Fixed version (ground truth):
/** 
 * Set loop mode. Change the loop mode. A loop value of -1 means loop forever, a value of 0 means don't loop, other values indicate the number of repeats, e.g. a value of 1 plays the audio twice. If the stream does not exist, it will have no effect.
 * @param streamID a streamID returned by the play() function
 * @param loop loop mode (0 = no loop, -1 = loop forever)
 */
public native final void setLoop(int streamID,int loop);
Program: 24290
Project: 24290
Buggy source:
/** 
 * Set stream volume <p>Sets the volume on the stream specified by the streamID. This is the value returned by the play() function. The value must be in the range of 0.0 to 1.0. If the stream does not exist, it will have no effect.</p>
 * @param streamID a streamID returned by the play() function
 * @param leftVolume left volume value (range = 0.0 to 1.0)
 * @param rightVolume right volume value (range = 0.0 to 1.0)
 */
public native final void setVolume(int streamID,float leftVolume,float rightVolume);

Fixed version (ground truth):
/** 
 * Set stream volume. Sets the volume on the stream specified by the streamID. This is the value returned by the play() function. The value must be in the range of 0.0 to 1.0. If the stream does not exist, it will have no effect.
 * @param streamID a streamID returned by the play() function
 * @param leftVolume left volume value (range = 0.0 to 1.0)
 * @param rightVolume right volume value (range = 0.0 to 1.0)
 */
public native final void setVolume(int streamID,float leftVolume,float rightVolume);
Program: 24291
Project: 24291
Buggy source:
public native final void setRate(int streamID,float rate);

Fixed version (ground truth):
/** 
 * Change playback rate. The playback rate allows the application to vary the playback rate (pitch) of the sound. A value of 1.0 means playback at the original frequency. A value of 2.0 means playback twice as fast, and a value of 0.5 means playback at half speed. If the stream does not exist, it will have no effect.
 * @param streamID a streamID returned by the play() function
 * @param rate playback rate (1.0 = normal playback, range 0.5 to 2.0)
 */
public native final void setRate(int streamID,float rate);
Program: 24292
Project: 24292
Buggy source:
/** 
 * Pause a playback stream <p>Pause the stream specified by the streamID. This is the value returned by the play() function. If the stream is playing, it will be paused. If the stream is not playing (e.g. is stopped or was previously paused), calling this function will have no effect.</p>
 * @param streamID a streamID returned by the play() function
 */
public native final void pause(int streamID);

Fixed version (ground truth):
/** 
 * Pause a playback stream. Pause the stream specified by the streamID. This is the value returned by the play() function. If the stream is playing, it will be paused. If the stream is not playing (e.g. is stopped or was previously paused), calling this function will have no effect.
 * @param streamID a streamID returned by the play() function
 */
public native final void pause(int streamID);
Program: 24293
Project: 24293
Buggy source:
/** 
 * Load the sound from a FileDescriptor <p>This version is useful if you store multiple sounds in a single binary. The offset specifies the offset from the start of the file and the length specifies the length of the sound within the file.</p>
 * @param fd a FileDescriptor object
 * @param offset offset to the start of the sound
 * @param length length of the sound
 * @param priority the priority of the sound. Currently has no effect.
 * @return a sound ID. This value can be used to play or unload the sound.
 */
public int load(FileDescriptor fd,long offset,long length,int priority){
  return _load(fd,offset,length,priority);
}

Fixed version (ground truth):
/** 
 * Load the sound from a FileDescriptor. This version is useful if you store multiple sounds in a single binary. The offset specifies the offset from the start of the file and the length specifies the length of the sound within the file.
 * @param fd a FileDescriptor object
 * @param offset offset to the start of the sound
 * @param length length of the sound
 * @param priority the priority of the sound. Currently has no effect. Usea value of 1 for future compatibility.
 * @return a sound ID. This value can be used to play or unload the sound.
 */
public int load(FileDescriptor fd,long offset,long length,int priority){
  return _load(fd,offset,length,priority);
}
Program: 24294
Project: 24294
Buggy source:
/** 
 * Stop a playback stream <p>Stop the stream specified by the streamID. This is the value returned by the play() function. If the stream is playing, it will be stopped. It also releases any native resources associated with this stream. If the stream is not playing, it will have no effect.</p>
 * @param streamID a streamID returned by the play() function
 */
public native final void stop(int streamID);

Fixed version (ground truth):
/** 
 * Stop a playback stream. Stop the stream specified by the streamID. This is the value returned by the play() function. If the stream is playing, it will be stopped. It also releases any native resources associated with this stream. If the stream is not playing, it will have no effect.
 * @param streamID a streamID returned by the play() function
 */
public native final void stop(int streamID);
Program: 24295
Project: 24295
Buggy source:
/** 
 * Unload a sound from a sound ID <p>Unloads the sound specified by the soundID. This is the value returned by the load() function. Returns true if the sound is successfully unloaded, false if the sound was already unloaded.</p>
 * @param soundID a soundID returned by the load() function
 * @return true if just unloaded, false if previously unloaded
 */
public native final boolean unload(int soundID);

Fixed version (ground truth):
/** 
 * Unload a sound from a sound ID. Unloads the sound specified by the soundID. This is the value returned by the load() function. Returns true if the sound is successfully unloaded, false if the sound was already unloaded.
 * @param soundID a soundID returned by the load() function
 * @return true if just unloaded, false if previously unloaded
 */
public native final boolean unload(int soundID);
Program: 24296
Project: 24296
Buggy source:
/** 
 * Change stream priority <p>Change the priority of the stream specified by the streamID. This is the value returned by the play() function. Affects the order in which streams are re-used to play new sounds.
 * @param streamID a streamID returned by the play() function
 */
public native final void setPriority(int streamID,int priority);

Fixed version (ground truth):
/** 
 * Change stream priority. Change the priority of the stream specified by the streamID. This is the value returned by the play() function. Affects the order in which streams are re-used to play new sounds. If the stream does not exist, it will have no effect.
 * @param streamID a streamID returned by the play() function
 */
public native final void setPriority(int streamID,int priority);
Program: 24297
Project: 24297
Buggy source:
/** 
 * Play a sound from a sound ID <p>Play the sound specified by the soundID. This is the value  returned by the load() function. Returns a non-zero streamID if successful, zero if it fails. The streamID can be used to further control playback. Note that calling play() may cause another sound to stop playing if the maximum number of active streams is exceeded.</p>
 * @param soundID a soundID returned by the load() function
 * @return non-zero streamID if successful, zero if failed
 */
public native final int play(int soundID,float leftVolume,float rightVolume,int priority,int loop,float rate);

Fixed version (ground truth):
/** 
 * Play a sound from a sound ID. Play the sound specified by the soundID. This is the value  returned by the load() function. Returns a non-zero streamID if successful, zero if it fails. The streamID can be used to further control playback. Note that calling play() may cause another sound to stop playing if the maximum number of active streams is exceeded. A loop value of -1 means loop forever, a value of 0 means don't loop, other values indicate the number of repeats, e.g. a value of 1 plays the audio twice. The playback rate allows the application to vary the playback rate (pitch) of the sound. A value of 1.0 means play back at the original frequency. A value of 2.0 means play back twice as fast, and a value of 0.5 means playback at half speed.
 * @param soundID a soundID returned by the load() function
 * @param leftVolume left volume value (range = 0.0 to 1.0)
 * @param rightVolume right volume value (range = 0.0 to 1.0)
 * @param priority stream priority (0 = lowest priority)
 * @param loop loop mode (0 = no loop, -1 = loop forever)
 * @param rate playback rate (1.0 = normal playback, range 0.5 to 2.0)
 * @return non-zero streamID if successful, zero if failed
 */
public native final int play(int soundID,float leftVolume,float rightVolume,int priority,int loop,float rate);
Program: 24298
Project: 24298
Buggy source:
/** 
 * Resume a playback stream <p>Resume the stream specified by the streamID. This is the value returned by the play() function. If the stream is paused, this will resume playback. If the stream was not previously paused, calling this function will have no effect.</p>
 * @param streamID a streamID returned by the play() function
 */
public native final void resume(int streamID);

Fixed version (ground truth):
/** 
 * Resume a playback stream. Resume the stream specified by the streamID. This is the value returned by the play() function. If the stream is paused, this will resume playback. If the stream was not previously paused, calling this function will have no effect.
 * @param streamID a streamID returned by the play() function
 */
public native final void resume(int streamID);
Program: 24299
Project: 24299
Buggy source:
public native final void release();

Fixed version (ground truth):
/** 
 * Release the SoundPool resources. Release all memory and native resources used by the SoundPool object. The SoundPool can no longer be used and the reference should be set to null.
 */
public native final void release();
Program: 24300
Project: 24300
Buggy source:
/** 
 * Change stream priority <p>Change the priority of the stream specified by the streamID. This is the value returned by the play() function. Affects the order in which streams are re-used to play new sounds.
 * @param streamID a streamID returned by the play() function
 */
public native final void setLoop(int streamID,int loop);

Fixed version (ground truth):
/** 
 * Set loop mode. Change the loop mode. A loop value of -1 means loop forever, a value of 0 means don't loop, other values indicate the number of repeats, e.g. a value of 1 plays the audio twice. If the stream does not exist, it will have no effect.
 * @param streamID a streamID returned by the play() function
 * @param loop loop mode (0 = no loop, -1 = loop forever)
 */
public native final void setLoop(int streamID,int loop);
Program: 24301
Project: 24301
Buggy source:
/** 
 * Set stream volume <p>Sets the volume on the stream specified by the streamID. This is the value returned by the play() function. The value must be in the range of 0.0 to 1.0. If the stream does not exist, it will have no effect.</p>
 * @param streamID a streamID returned by the play() function
 * @param leftVolume left volume value (range = 0.0 to 1.0)
 * @param rightVolume right volume value (range = 0.0 to 1.0)
 */
public native final void setVolume(int streamID,float leftVolume,float rightVolume);

Fixed version (ground truth):
/** 
 * Set stream volume. Sets the volume on the stream specified by the streamID. This is the value returned by the play() function. The value must be in the range of 0.0 to 1.0. If the stream does not exist, it will have no effect.
 * @param streamID a streamID returned by the play() function
 * @param leftVolume left volume value (range = 0.0 to 1.0)
 * @param rightVolume right volume value (range = 0.0 to 1.0)
 */
public native final void setVolume(int streamID,float leftVolume,float rightVolume);
Program: 24302
Project: 24302
Buggy source:
public native final void setRate(int streamID,float rate);

Fixed version (ground truth):
/** 
 * Change playback rate. The playback rate allows the application to vary the playback rate (pitch) of the sound. A value of 1.0 means playback at the original frequency. A value of 2.0 means playback twice as fast, and a value of 0.5 means playback at half speed. If the stream does not exist, it will have no effect.
 * @param streamID a streamID returned by the play() function
 * @param rate playback rate (1.0 = normal playback, range 0.5 to 2.0)
 */
public native final void setRate(int streamID,float rate);
Program: 24303
Project: 24303
Buggy source:
/** 
 * Pause a playback stream <p>Pause the stream specified by the streamID. This is the value returned by the play() function. If the stream is playing, it will be paused. If the stream is not playing (e.g. is stopped or was previously paused), calling this function will have no effect.</p>
 * @param streamID a streamID returned by the play() function
 */
public native final void pause(int streamID);

Fixed version (ground truth):
/** 
 * Pause a playback stream. Pause the stream specified by the streamID. This is the value returned by the play() function. If the stream is playing, it will be paused. If the stream is not playing (e.g. is stopped or was previously paused), calling this function will have no effect.
 * @param streamID a streamID returned by the play() function
 */
public native final void pause(int streamID);
Program: 24304
Project: 24304
Buggy source:
/** 
 * Load the sound from a FileDescriptor <p>This version is useful if you store multiple sounds in a single binary. The offset specifies the offset from the start of the file and the length specifies the length of the sound within the file.</p>
 * @param fd a FileDescriptor object
 * @param offset offset to the start of the sound
 * @param length length of the sound
 * @param priority the priority of the sound. Currently has no effect.
 * @return a sound ID. This value can be used to play or unload the sound.
 */
public int load(FileDescriptor fd,long offset,long length,int priority){
  return _load(fd,offset,length,priority);
}

Fixed version (ground truth):
/** 
 * Load the sound from a FileDescriptor. This version is useful if you store multiple sounds in a single binary. The offset specifies the offset from the start of the file and the length specifies the length of the sound within the file.
 * @param fd a FileDescriptor object
 * @param offset offset to the start of the sound
 * @param length length of the sound
 * @param priority the priority of the sound. Currently has no effect. Usea value of 1 for future compatibility.
 * @return a sound ID. This value can be used to play or unload the sound.
 */
public int load(FileDescriptor fd,long offset,long length,int priority){
  return _load(fd,offset,length,priority);
}
Program: 24305
Project: 24305
Buggy source:
/** 
 * Stop a playback stream <p>Stop the stream specified by the streamID. This is the value returned by the play() function. If the stream is playing, it will be stopped. It also releases any native resources associated with this stream. If the stream is not playing, it will have no effect.</p>
 * @param streamID a streamID returned by the play() function
 */
public native final void stop(int streamID);

Fixed version (ground truth):
/** 
 * Stop a playback stream. Stop the stream specified by the streamID. This is the value returned by the play() function. If the stream is playing, it will be stopped. It also releases any native resources associated with this stream. If the stream is not playing, it will have no effect.
 * @param streamID a streamID returned by the play() function
 */
public native final void stop(int streamID);
Program: 24306
Project: 24306
Buggy source:
/** 
 * Unload a sound from a sound ID <p>Unloads the sound specified by the soundID. This is the value returned by the load() function. Returns true if the sound is successfully unloaded, false if the sound was already unloaded.</p>
 * @param soundID a soundID returned by the load() function
 * @return true if just unloaded, false if previously unloaded
 */
public native final boolean unload(int soundID);

Fixed version (ground truth):
/** 
 * Unload a sound from a sound ID. Unloads the sound specified by the soundID. This is the value returned by the load() function. Returns true if the sound is successfully unloaded, false if the sound was already unloaded.
 * @param soundID a soundID returned by the load() function
 * @return true if just unloaded, false if previously unloaded
 */
public native final boolean unload(int soundID);
Program: 24307
Project: 24307
Buggy source:
/** 
 * Change stream priority <p>Change the priority of the stream specified by the streamID. This is the value returned by the play() function. Affects the order in which streams are re-used to play new sounds.
 * @param streamID a streamID returned by the play() function
 */
public native final void setPriority(int streamID,int priority);

Fixed version (ground truth):
/** 
 * Change stream priority. Change the priority of the stream specified by the streamID. This is the value returned by the play() function. Affects the order in which streams are re-used to play new sounds. If the stream does not exist, it will have no effect.
 * @param streamID a streamID returned by the play() function
 */
public native final void setPriority(int streamID,int priority);
Program: 24308
Project: 24308
Buggy source:
@Override protected void finalize() throws Throwable {
  clear();
}

Fixed version (ground truth):
@Override protected void finalize() throws Throwable {
  release();
}
Program: 24309
Project: 24309
Buggy source:
public void dump(boolean timeout,String webkitData){
  if (mResultFile == null || mResultFile.length() == 0) {
    finished();
    return;
  }
  try {
    File parentDir=new File(mResultFile).getParentFile();
    if (!parentDir.exists()) {
      parentDir.mkdirs();
    }
    FileOutputStream os=new FileOutputStream(mResultFile);
    if (timeout) {
      Log.w("String_Node_Str",mResultFile);
      os.write(TIMEOUT_STR.getBytes());
      os.write('\n');
    }
    if (mDumpTitleChanges)     os.write(mTitleChanges.toString().getBytes());
    if (mDialogStrings != null)     os.write(mDialogStrings.toString().getBytes());
    mDialogStrings=null;
    os.write(webkitData.getBytes());
    os.flush();
    os.close();
  }
 catch (  IOException ex) {
    Log.e(LOGTAG,"String_Node_Str" + mResultFile + "String_Node_Str"+ ex.getMessage());
  }
  finished();
}

Fixed version (ground truth):
public void dump(boolean timeout,String webkitData){
  if (mResultFile == null || mResultFile.length() == 0) {
    finished();
    return;
  }
  try {
    File parentDir=new File(mResultFile).getParentFile();
    if (!parentDir.exists()) {
      parentDir.mkdirs();
    }
    FileOutputStream os=new FileOutputStream(mResultFile);
    if (timeout) {
      Log.w("String_Node_Str",mResultFile);
      os.write(TIMEOUT_STR.getBytes());
      os.write('\n');
    }
    if (mDumpTitleChanges)     os.write(mTitleChanges.toString().getBytes());
    if (mDialogStrings != null)     os.write(mDialogStrings.toString().getBytes());
    mDialogStrings=null;
    if (webkitData != null)     os.write(webkitData.getBytes());
    os.flush();
    os.close();
  }
 catch (  IOException ex) {
    Log.e(LOGTAG,"String_Node_Str" + mResultFile + "String_Node_Str"+ ex.getMessage());
  }
  finished();
}
Program: 24310
Project: 24310
Buggy source:
/** 
 * Set the data this intent is operating on.  This method automatically clears any type that was previously set by   {@link #setType}.
 * @param data The URI of the data this intent is now targeting.
 * @return Returns the same Intent object, for chaining multiple callsinto a single statement.
 * @see #getData
 * @see #setType
 * @see #setDataAndType
 */
public Intent setData(Uri data){
  mData=data;
  mType=null;
  return this;
}

Fixed version (ground truth):
/** 
 * Set the data this intent is operating on.  This method automatically clears any type that was previously set by   {@link #setType}. <p><em>Note: scheme and host name matching in the Android framework is case-sensitive, unlike the formal RFC.  As a result, you should always ensure that you write your Uri with these elements using lower case letters, and normalize any Uris you receive from outside of Android to ensure the scheme and host is lower case.</em></p>
 * @param data The URI of the data this intent is now targeting.
 * @return Returns the same Intent object, for chaining multiple callsinto a single statement.
 * @see #getData
 * @see #setType
 * @see #setDataAndType
 */
public Intent setData(Uri data){
  mData=data;
  mType=null;
  return this;
}
Program: 24311
Project: 24311
Buggy source:
/** 
 * (Usually optional) Set the data for the intent along with an explicit MIME data type.  This method should very rarely be used -- it allows you to override the MIME type that would ordinarily be inferred from the data with your own type given here.
 * @param data The URI of the data this intent is now targeting.
 * @param type The MIME type of the data being handled by this intent.
 * @return Returns the same Intent object, for chaining multiple callsinto a single statement.
 * @see #setData
 * @see #setType
 */
public Intent setDataAndType(Uri data,String type){
  mData=data;
  mType=type;
  return this;
}

Fixed version (ground truth):
/** 
 * (Usually optional) Set the data for the intent along with an explicit MIME data type.  This method should very rarely be used -- it allows you to override the MIME type that would ordinarily be inferred from the data with your own type given here. <p><em>Note: MIME type, Uri scheme, and host name matching in the Android framework is case-sensitive, unlike the formal RFC definitions. As a result, you should always write these elements with lower case letters, and normalize any MIME types or Uris you receive from outside of Android to ensure these elements are lower case before supplying them here.</em></p>
 * @param data The URI of the data this intent is now targeting.
 * @param type The MIME type of the data being handled by this intent.
 * @return Returns the same Intent object, for chaining multiple callsinto a single statement.
 * @see #setData
 * @see #setType
 */
public Intent setDataAndType(Uri data,String type){
  mData=data;
  mType=type;
  return this;
}
Program: 24312
Project: 24312
Buggy source:
/** 
 * Set an explicit MIME data type.  This is used to create intents that only specify a type and not data, for example to indicate the type of data to return.  This method automatically clears any data that was previously set by   {@link #setData}.
 * @param type The MIME type of the data being handled by this intent.
 * @return Returns the same Intent object, for chaining multiple callsinto a single statement.
 * @see #getType
 * @see #setData
 * @see #setDataAndType
 */
public Intent setType(String type){
  mData=null;
  mType=type;
  return this;
}

Fixed version (ground truth):
/** 
 * Set an explicit MIME data type.  This is used to create intents that only specify a type and not data, for example to indicate the type of data to return.  This method automatically clears any data that was previously set by   {@link #setData}. <p><em>Note: MIME type matching in the Android framework is case-sensitive, unlike formal RFC MIME types.  As a result, you should always write your MIME types with lower case letters, and any MIME types you receive from outside of Android should be converted to lower case before supplying them here.</em></p>
 * @param type The MIME type of the data being handled by this intent.
 * @return Returns the same Intent object, for chaining multiple callsinto a single statement.
 * @see #getType
 * @see #setData
 * @see #setDataAndType
 */
public Intent setType(String type){
  mData=null;
  mType=type;
  return this;
}
Program: 24313
Project: 24313
Buggy source:
/** 
 * Add a new Intent data authority to match against.  The filter must include one or more schemes (via   {@link #addDataScheme}) for the authority to be considered.  If any authorities are included in the filter, then an Intent's data must match one of them.  If no authorities are included, then only the scheme must match.
 * @param host The host part of the authority to match.  May start with asingle '*' to wildcard the front of the host name.
 * @param port Optional port part of the authority to match.  If null, anyport is allowed.
 * @see #matchData
 * @see #addDataScheme
 */
public final void addDataAuthority(String host,String port){
  if (mDataAuthorities == null)   mDataAuthorities=new ArrayList<AuthorityEntry>();
  if (port != null)   port=port.intern();
  mDataAuthorities.add(new AuthorityEntry(host.intern(),port));
}

Fixed version (ground truth):
/** 
 * Add a new Intent data authority to match against.  The filter must include one or more schemes (via   {@link #addDataScheme}) for the authority to be considered.  If any authorities are included in the filter, then an Intent's data must match one of them.  If no authorities are included, then only the scheme must match. <p><em>Note: host name in the Android framework is case-sensitive, unlike formal RFC host names.  As a result, you should always write your host names with lower case letters, and any host names you receive from outside of Android should be converted to lower case before supplying them here.</em></p>
 * @param host The host part of the authority to match.  May start with asingle '*' to wildcard the front of the host name.
 * @param port Optional port part of the authority to match.  If null, anyport is allowed.
 * @see #matchData
 * @see #addDataScheme
 */
public final void addDataAuthority(String host,String port){
  if (mDataAuthorities == null)   mDataAuthorities=new ArrayList<AuthorityEntry>();
  if (port != null)   port=port.intern();
  mDataAuthorities.add(new AuthorityEntry(host.intern(),port));
}
Program: 24315
Project: 24315
Buggy source:
/** 
 * Add a new Intent data scheme to match against.  If any schemes are included in the filter, then an Intent's data must be <em>either</em> one of these schemes <em>or</em> a matching data type.  If no schemes are included, then an Intent will match only if it includes no data.
 * @param scheme Name of the scheme to match, i.e. "http".
 * @see #matchData
 */
public final void addDataScheme(String scheme){
  if (mDataSchemes == null)   mDataSchemes=new ArrayList<String>();
  if (!mDataSchemes.contains(scheme)) {
    mDataSchemes.add(scheme.intern());
  }
}

Fixed version (ground truth):
/** 
 * Add a new Intent data scheme to match against.  If any schemes are included in the filter, then an Intent's data must be <em>either</em> one of these schemes <em>or</em> a matching data type.  If no schemes are included, then an Intent will match only if it includes no data. <p><em>Note: scheme matching in the Android framework is case-sensitive, unlike formal RFC schemes.  As a result, you should always write your schemes with lower case letters, and any schemes you receive from outside of Android should be converted to lower case before supplying them here.</em></p>
 * @param scheme Name of the scheme to match, i.e. "http".
 * @see #matchData
 */
public final void addDataScheme(String scheme){
  if (mDataSchemes == null)   mDataSchemes=new ArrayList<String>();
  if (!mDataSchemes.contains(scheme)) {
    mDataSchemes.add(scheme.intern());
  }
}
Program: 24316
Project: 24316
Buggy source:
/** 
 * Add a new Intent data type to match against.  If any types are included in the filter, then an Intent's data must be <em>either</em> one of these types <em>or</em> a matching scheme.  If no data types are included, then an Intent will only match if it specifies no data. <p>Throws   {@link MalformedMimeTypeException} if the given MIME type isnot syntactically correct.
 * @param type Name of the data type to match, i.e. "vnd.android.cursor.dir/person".
 * @see #matchData
 */
public final void addDataType(String type) throws MalformedMimeTypeException {
  final int slashpos=type.indexOf('/');
  final int typelen=type.length();
  if (slashpos > 0 && typelen >= slashpos + 2) {
    if (mDataTypes == null)     mDataTypes=new ArrayList<String>();
    if (typelen == slashpos + 2 && type.charAt(slashpos + 1) == '*') {
      String str=type.substring(0,slashpos);
      if (!mDataTypes.contains(str)) {
        mDataTypes.add(str.intern());
      }
      mHasPartialTypes=true;
    }
 else {
      if (!mDataTypes.contains(type)) {
        mDataTypes.add(type.intern());
      }
    }
    return;
  }
  throw new MalformedMimeTypeException(type);
}

Fixed version (ground truth):
/** 
 * Add a new Intent data type to match against.  If any types are included in the filter, then an Intent's data must be <em>either</em> one of these types <em>or</em> a matching scheme.  If no data types are included, then an Intent will only match if it specifies no data. <p><em>Note: MIME type matching in the Android framework is case-sensitive, unlike formal RFC MIME types.  As a result, you should always write your MIME types with lower case letters, and any MIME types you receive from outside of Android should be converted to lower case before supplying them here.</em></p> <p>Throws   {@link MalformedMimeTypeException} if the given MIME type isnot syntactically correct.
 * @param type Name of the data type to match, i.e. "vnd.android.cursor.dir/person".
 * @see #matchData
 */
public final void addDataType(String type) throws MalformedMimeTypeException {
  final int slashpos=type.indexOf('/');
  final int typelen=type.length();
  if (slashpos > 0 && typelen >= slashpos + 2) {
    if (mDataTypes == null)     mDataTypes=new ArrayList<String>();
    if (typelen == slashpos + 2 && type.charAt(slashpos + 1) == '*') {
      String str=type.substring(0,slashpos);
      if (!mDataTypes.contains(str)) {
        mDataTypes.add(str.intern());
      }
      mHasPartialTypes=true;
    }
 else {
      if (!mDataTypes.contains(type)) {
        mDataTypes.add(type.intern());
      }
    }
    return;
  }
  throw new MalformedMimeTypeException(type);
}
Program: 24317
Project: 24317
Buggy source:
/** 
 * Set the data this intent is operating on.  This method automatically clears any type that was previously set by   {@link #setType}.
 * @param data The URI of the data this intent is now targeting.
 * @return Returns the same Intent object, for chaining multiple callsinto a single statement.
 * @see #getData
 * @see #setType
 * @see #setDataAndType
 */
public Intent setData(Uri data){
  mData=data;
  mType=null;
  return this;
}

Fixed version (ground truth):
/** 
 * Set the data this intent is operating on.  This method automatically clears any type that was previously set by   {@link #setType}. <p><em>Note: scheme and host name matching in the Android framework is case-sensitive, unlike the formal RFC.  As a result, you should always ensure that you write your Uri with these elements using lower case letters, and normalize any Uris you receive from outside of Android to ensure the scheme and host is lower case.</em></p>
 * @param data The URI of the data this intent is now targeting.
 * @return Returns the same Intent object, for chaining multiple callsinto a single statement.
 * @see #getData
 * @see #setType
 * @see #setDataAndType
 */
public Intent setData(Uri data){
  mData=data;
  mType=null;
  return this;
}