nus-yam/ex-repair huggingface dataset:
Program: 183730
Project: 183730
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: 183731
Project: 183731
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: 183732
Project: 183732
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: 183733
Project: 183733
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: 183734
Project: 183734
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: 183735
Project: 183735
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: 183736
Project: 183736
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: 183737
Project: 183737
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: 183738
Project: 183738
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: 183739
Project: 183739
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: 183740
Project: 183740
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: 183741
Project: 183741
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: 183742
Project: 183742
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: 183743
Project: 183743
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: 183744
Project: 183744
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: 183745
Project: 183745
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: 183746
Project: 183746
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: 183747
Project: 183747
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: 183748
Project: 183748
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: 183749
Project: 183749
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: 183750
Project: 183750
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: 183751
Project: 183751
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: 183752
Project: 183752
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: 183753
Project: 183753
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: 183754
Project: 183754
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: 183755
Project: 183755
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: 183756
Project: 183756
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: 183757
Project: 183757
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: 183758
Project: 183758
Buggy source:
@Override protected void finalize() throws Throwable {
  clear();
}

Fixed version (ground truth):
@Override protected void finalize() throws Throwable {
  release();
}
Program: 183759
Project: 183759
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: 183760
Project: 183760
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: 183761
Project: 183761
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: 183762
Project: 183762
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: 183764
Project: 183764
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: 183765
Project: 183765
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: 183766
Project: 183766
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: 183767
Project: 183767
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: 183768
Project: 183768
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: 183769
Project: 183769
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: 183771
Project: 183771
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());
  }
}