nus-yam/ex-repair huggingface dataset:
Program: 23079
Project: 23079
Buggy source:
final void performStop(){
  if (!mStopped) {
    if (mWindow != null) {
      mWindow.closeAllPanels();
    }
    mCalled=false;
    mInstrumentation.callActivityOnStop(this);
    if (!mCalled) {
      throw new SuperNotCalledException("String_Node_Str" + mComponent.toShortString() + "String_Node_Str");
    }
    final int N=mManagedCursors.size();
    for (int i=0; i < N; i++) {
      ManagedCursor mc=mManagedCursors.get(i);
      if (!mc.mReleased) {
        mc.mCursor.deactivate();
        mc.mReleased=true;
      }
    }
    mStopped=true;
  }
  mResumed=false;
}

Fixed version (ground truth):
final void performStop(){
  if (!mStopped) {
    if (mWindow != null) {
      mWindow.closeAllPanels();
    }
    mCalled=false;
    mInstrumentation.callActivityOnStop(this);
    if (!mCalled) {
      throw new SuperNotCalledException("String_Node_Str" + mComponent.toShortString() + "String_Node_Str");
    }
synchronized (mManagedCursors) {
      final int N=mManagedCursors.size();
      for (int i=0; i < N; i++) {
        ManagedCursor mc=mManagedCursors.get(i);
        if (!mc.mReleased) {
          mc.mCursor.deactivate();
          mc.mReleased=true;
        }
      }
    }
    mStopped=true;
  }
  mResumed=false;
}
Program: 23080
Project: 23080
Buggy source:
public PasswordUnlockScreen(Context context,LockPatternUtils lockPatternUtils,KeyguardUpdateMonitor updateMonitor,KeyguardScreenCallback callback){
  super(context);
  mUpdateMonitor=updateMonitor;
  mCallback=callback;
  mCreatedWithKeyboardOpen=mUpdateMonitor.isKeyboardOpen();
  LayoutInflater layoutInflater=LayoutInflater.from(context);
  if (mUpdateMonitor.isInPortrait()) {
    layoutInflater.inflate(R.layout.keyguard_screen_password_portrait,this,true);
  }
 else {
    layoutInflater.inflate(R.layout.keyguard_screen_password_landscape,this,true);
  }
  boolean isAlpha=lockPatternUtils.getPasswordMode() == LockPatternUtils.MODE_PASSWORD;
  mKeyboardView=(PasswordEntryKeyboardView)findViewById(R.id.keyboard);
  mPasswordEntry=(EditText)findViewById(R.id.passwordEntry);
  mPasswordEntry.setOnEditorActionListener(this);
  mEmergencyCallButton=(TextView)findViewById(R.id.emergencyCall);
  mEmergencyCallButton.setOnClickListener(this);
  mUpdateMonitor.registerConfigurationChangeCallback(this);
  mLockPatternUtils=lockPatternUtils;
  mKeyboardHelper=new PasswordEntryKeyboardHelper(context,mKeyboardView,this);
  mKeyboardHelper.setKeyboardMode(isAlpha ? PasswordEntryKeyboardHelper.KEYBOARD_MODE_ALPHA : PasswordEntryKeyboardHelper.KEYBOARD_MODE_NUMERIC);
  mKeyboardView.setVisibility(mCreatedWithKeyboardOpen ? View.INVISIBLE : View.VISIBLE);
  mPasswordEntry.requestFocus();
}

Fixed version (ground truth):
public PasswordUnlockScreen(Context context,LockPatternUtils lockPatternUtils,KeyguardUpdateMonitor updateMonitor,KeyguardScreenCallback callback){
  super(context);
  mUpdateMonitor=updateMonitor;
  mCallback=callback;
  mCreatedWithKeyboardOpen=mUpdateMonitor.isKeyboardOpen();
  LayoutInflater layoutInflater=LayoutInflater.from(context);
  if (mUpdateMonitor.isInPortrait()) {
    layoutInflater.inflate(R.layout.keyguard_screen_password_portrait,this,true);
  }
 else {
    layoutInflater.inflate(R.layout.keyguard_screen_password_landscape,this,true);
  }
  boolean isAlpha=lockPatternUtils.getPasswordMode() == LockPatternUtils.MODE_PASSWORD;
  mKeyboardView=(PasswordEntryKeyboardView)findViewById(R.id.keyboard);
  mPasswordEntry=(EditText)findViewById(R.id.passwordEntry);
  mPasswordEntry.setOnEditorActionListener(this);
  mEmergencyCallButton=(TextView)findViewById(R.id.emergencyCall);
  mEmergencyCallButton.setOnClickListener(this);
  mUpdateMonitor.registerConfigurationChangeCallback(this);
  mLockPatternUtils=lockPatternUtils;
  mKeyboardHelper=new PasswordEntryKeyboardHelper(context,mKeyboardView,this);
  mKeyboardHelper.setKeyboardMode(isAlpha ? PasswordEntryKeyboardHelper.KEYBOARD_MODE_ALPHA : PasswordEntryKeyboardHelper.KEYBOARD_MODE_NUMERIC);
  mKeyboardView.setVisibility(mCreatedWithKeyboardOpen ? View.INVISIBLE : View.VISIBLE);
  mPasswordEntry.requestFocus();
  mKeyboardHelper.setVibratePattern(mLockPatternUtils.isTactileFeedbackEnabled() ? com.android.internal.R.array.config_virtualKeyVibePattern : 0);
}
Program: 23081
Project: 23081
Buggy source:
public void onPress(int primaryCode){
}

Fixed version (ground truth):
public void onPress(int primaryCode){
  if (mVibratePattern != null) {
    mVibrator.vibrate(mVibratePattern,-1);
  }
}
Program: 23082
Project: 23082
Buggy source:
public PasswordEntryKeyboardHelper(Context context,KeyboardView keyboardView,View targetView){
  mContext=context;
  mTargetView=targetView;
  mKeyboardView=keyboardView;
  createKeyboards();
  mKeyboardView.setOnKeyboardActionListener(this);
}

Fixed version (ground truth):
public PasswordEntryKeyboardHelper(Context context,KeyboardView keyboardView,View targetView){
  mContext=context;
  mTargetView=targetView;
  mKeyboardView=keyboardView;
  createKeyboards();
  mKeyboardView.setOnKeyboardActionListener(this);
  mVibrator=new Vibrator();
}
Program: 23083
Project: 23083
Buggy source:
/** 
 * Gets a value and converts it to a Float.
 * @param key the value to get
 * @return the Float value, or null if the value is missing or cannot be converted
 */
public Float getAsFloat(String key){
  Object value=mValues.get(key);
  try {
    return value != null ? ((Number)value).floatValue() : null;
  }
 catch (  ClassCastException e) {
    if (value instanceof CharSequence) {
      try {
        return Float.valueOf(value.toString());
      }
 catch (      NumberFormatException e2) {
        Log.e(TAG,"String_Node_Str" + value + "String_Node_Str"+ key);
        return null;
      }
    }
 else {
      Log.e(TAG,"String_Node_Str" + key + "String_Node_Str");
      return null;
    }
  }
}

Fixed version (ground truth):
/** 
 * Gets a value and converts it to a Float.
 * @param key the value to get
 * @return the Float value, or null if the value is missing or cannot be converted
 */
public Float getAsFloat(String key){
  Object value=mValues.get(key);
  try {
    return value != null ? ((Number)value).floatValue() : null;
  }
 catch (  ClassCastException e) {
    if (value instanceof CharSequence) {
      try {
        return Float.valueOf(value.toString());
      }
 catch (      NumberFormatException e2) {
        Log.e(TAG,"String_Node_Str" + value + "String_Node_Str"+ key);
        return null;
      }
    }
 else {
      Log.e(TAG,"String_Node_Str" + key + "String_Node_Str"+ value,e);
      return null;
    }
  }
}
Program: 23084
Project: 23084
Buggy source:
/** 
 * Gets a value and converts it to a Byte.
 * @param key the value to get
 * @return the Byte value, or null if the value is missing or cannot be converted
 */
public Byte getAsByte(String key){
  Object value=mValues.get(key);
  try {
    return value != null ? ((Number)value).byteValue() : null;
  }
 catch (  ClassCastException e) {
    if (value instanceof CharSequence) {
      try {
        return Byte.valueOf(value.toString());
      }
 catch (      NumberFormatException e2) {
        Log.e(TAG,"String_Node_Str" + value + "String_Node_Str"+ key);
        return null;
      }
    }
 else {
      Log.e(TAG,"String_Node_Str" + key + "String_Node_Str");
      return null;
    }
  }
}

Fixed version (ground truth):
/** 
 * Gets a value and converts it to a Byte.
 * @param key the value to get
 * @return the Byte value, or null if the value is missing or cannot be converted
 */
public Byte getAsByte(String key){
  Object value=mValues.get(key);
  try {
    return value != null ? ((Number)value).byteValue() : null;
  }
 catch (  ClassCastException e) {
    if (value instanceof CharSequence) {
      try {
        return Byte.valueOf(value.toString());
      }
 catch (      NumberFormatException e2) {
        Log.e(TAG,"String_Node_Str" + value + "String_Node_Str"+ key);
        return null;
      }
    }
 else {
      Log.e(TAG,"String_Node_Str" + key + "String_Node_Str"+ value,e);
      return null;
    }
  }
}
Program: 23085
Project: 23085
Buggy source:
/** 
 * Gets a value and converts it to an Integer.
 * @param key the value to get
 * @return the Integer value, or null if the value is missing or cannot be converted
 */
public Integer getAsInteger(String key){
  Object value=mValues.get(key);
  try {
    return value != null ? ((Number)value).intValue() : null;
  }
 catch (  ClassCastException e) {
    if (value instanceof CharSequence) {
      try {
        return Integer.valueOf(value.toString());
      }
 catch (      NumberFormatException e2) {
        Log.e(TAG,"String_Node_Str" + value + "String_Node_Str"+ key);
        return null;
      }
    }
 else {
      Log.e(TAG,"String_Node_Str" + key + "String_Node_Str");
      return null;
    }
  }
}

Fixed version (ground truth):
/** 
 * Gets a value and converts it to an Integer.
 * @param key the value to get
 * @return the Integer value, or null if the value is missing or cannot be converted
 */
public Integer getAsInteger(String key){
  Object value=mValues.get(key);
  try {
    return value != null ? ((Number)value).intValue() : null;
  }
 catch (  ClassCastException e) {
    if (value instanceof CharSequence) {
      try {
        return Integer.valueOf(value.toString());
      }
 catch (      NumberFormatException e2) {
        Log.e(TAG,"String_Node_Str" + value + "String_Node_Str"+ key);
        return null;
      }
    }
 else {
      Log.e(TAG,"String_Node_Str" + key + "String_Node_Str"+ value,e);
      return null;
    }
  }
}
Program: 23086
Project: 23086
Buggy source:
/** 
 * Gets a value and converts it to a Long.
 * @param key the value to get
 * @return the Long value, or null if the value is missing or cannot be converted
 */
public Long getAsLong(String key){
  Object value=mValues.get(key);
  try {
    return value != null ? ((Number)value).longValue() : null;
  }
 catch (  ClassCastException e) {
    if (value instanceof CharSequence) {
      try {
        return Long.valueOf(value.toString());
      }
 catch (      NumberFormatException e2) {
        Log.e(TAG,"String_Node_Str" + value + "String_Node_Str"+ key);
        return null;
      }
    }
 else {
      Log.e(TAG,"String_Node_Str" + key + "String_Node_Str");
      return null;
    }
  }
}

Fixed version (ground truth):
/** 
 * Gets a value and converts it to a Long.
 * @param key the value to get
 * @return the Long value, or null if the value is missing or cannot be converted
 */
public Long getAsLong(String key){
  Object value=mValues.get(key);
  try {
    return value != null ? ((Number)value).longValue() : null;
  }
 catch (  ClassCastException e) {
    if (value instanceof CharSequence) {
      try {
        return Long.valueOf(value.toString());
      }
 catch (      NumberFormatException e2) {
        Log.e(TAG,"String_Node_Str" + value + "String_Node_Str"+ key);
        return null;
      }
    }
 else {
      Log.e(TAG,"String_Node_Str" + key + "String_Node_Str"+ value,e);
      return null;
    }
  }
}
Program: 23087
Project: 23087
Buggy source:
/** 
 * Returns true if this object has the named value.
 * @param key the value to check for
 * @return {@code true} if the value is present, {@code false} otherwise 
 */
public boolean containsKey(String key){
  return mValues.containsKey(key);
}

Fixed version (ground truth):
/** 
 * Returns true if this object has the named value.
 * @param key the value to check for
 * @return {@code true} if the value is present, {@code false} otherwise
 */
public boolean containsKey(String key){
  return mValues.containsKey(key);
}
Program: 23088
Project: 23088
Buggy source:
/** 
 * Gets a value and converts it to a Double.
 * @param key the value to get
 * @return the Double value, or null if the value is missing or cannot be converted
 */
public Double getAsDouble(String key){
  Object value=mValues.get(key);
  try {
    return value != null ? ((Number)value).doubleValue() : null;
  }
 catch (  ClassCastException e) {
    if (value instanceof CharSequence) {
      try {
        return Double.valueOf(value.toString());
      }
 catch (      NumberFormatException e2) {
        Log.e(TAG,"String_Node_Str" + value + "String_Node_Str"+ key);
        return null;
      }
    }
 else {
      Log.e(TAG,"String_Node_Str" + key + "String_Node_Str");
      return null;
    }
  }
}

Fixed version (ground truth):
/** 
 * Gets a value and converts it to a Double.
 * @param key the value to get
 * @return the Double value, or null if the value is missing or cannot be converted
 */
public Double getAsDouble(String key){
  Object value=mValues.get(key);
  try {
    return value != null ? ((Number)value).doubleValue() : null;
  }
 catch (  ClassCastException e) {
    if (value instanceof CharSequence) {
      try {
        return Double.valueOf(value.toString());
      }
 catch (      NumberFormatException e2) {
        Log.e(TAG,"String_Node_Str" + value + "String_Node_Str"+ key);
        return null;
      }
    }
 else {
      Log.e(TAG,"String_Node_Str" + key + "String_Node_Str"+ value,e);
      return null;
    }
  }
}
Program: 23089
Project: 23089
Buggy source:
/** 
 * Gets a value and converts it to a Boolean.
 * @param key the value to get
 * @return the Boolean value, or null if the value is missing or cannot be converted
 */
public Boolean getAsBoolean(String key){
  Object value=mValues.get(key);
  try {
    return (Boolean)value;
  }
 catch (  ClassCastException e) {
    if (value instanceof CharSequence) {
      return Boolean.valueOf(value.toString());
    }
 else {
      Log.e(TAG,"String_Node_Str" + key + "String_Node_Str");
      return null;
    }
  }
}

Fixed version (ground truth):
/** 
 * Gets a value and converts it to a Boolean.
 * @param key the value to get
 * @return the Boolean value, or null if the value is missing or cannot be converted
 */
public Boolean getAsBoolean(String key){
  Object value=mValues.get(key);
  try {
    return (Boolean)value;
  }
 catch (  ClassCastException e) {
    if (value instanceof CharSequence) {
      return Boolean.valueOf(value.toString());
    }
 else {
      Log.e(TAG,"String_Node_Str" + key + "String_Node_Str"+ value,e);
      return null;
    }
  }
}
Program: 23090
Project: 23090
Buggy source:
/** 
 * Gets a value and converts it to a Short.
 * @param key the value to get
 * @return the Short value, or null if the value is missing or cannot be converted
 */
public Short getAsShort(String key){
  Object value=mValues.get(key);
  try {
    return value != null ? ((Number)value).shortValue() : null;
  }
 catch (  ClassCastException e) {
    if (value instanceof CharSequence) {
      try {
        return Short.valueOf(value.toString());
      }
 catch (      NumberFormatException e2) {
        Log.e(TAG,"String_Node_Str" + value + "String_Node_Str"+ key);
        return null;
      }
    }
 else {
      Log.e(TAG,"String_Node_Str" + key + "String_Node_Str");
      return null;
    }
  }
}

Fixed version (ground truth):
/** 
 * Gets a value and converts it to a Short.
 * @param key the value to get
 * @return the Short value, or null if the value is missing or cannot be converted
 */
public Short getAsShort(String key){
  Object value=mValues.get(key);
  try {
    return value != null ? ((Number)value).shortValue() : null;
  }
 catch (  ClassCastException e) {
    if (value instanceof CharSequence) {
      try {
        return Short.valueOf(value.toString());
      }
 catch (      NumberFormatException e2) {
        Log.e(TAG,"String_Node_Str" + value + "String_Node_Str"+ key);
        return null;
      }
    }
 else {
      Log.e(TAG,"String_Node_Str" + key + "String_Node_Str"+ value,e);
      return null;
    }
  }
}
Program: 23091
Project: 23091
Buggy source:
/** 
 * Gets a value and converts it to a Float.
 * @param key the value to get
 * @return the Float value, or null if the value is missing or cannot be converted
 */
public Float getAsFloat(String key){
  Object value=mValues.get(key);
  try {
    return value != null ? ((Number)value).floatValue() : null;
  }
 catch (  ClassCastException e) {
    if (value instanceof CharSequence) {
      try {
        return Float.valueOf(value.toString());
      }
 catch (      NumberFormatException e2) {
        Log.e(TAG,"String_Node_Str" + value + "String_Node_Str"+ key);
        return null;
      }
    }
 else {
      Log.e(TAG,"String_Node_Str" + key + "String_Node_Str");
      return null;
    }
  }
}

Fixed version (ground truth):
/** 
 * Gets a value and converts it to a Float.
 * @param key the value to get
 * @return the Float value, or null if the value is missing or cannot be converted
 */
public Float getAsFloat(String key){
  Object value=mValues.get(key);
  try {
    return value != null ? ((Number)value).floatValue() : null;
  }
 catch (  ClassCastException e) {
    if (value instanceof CharSequence) {
      try {
        return Float.valueOf(value.toString());
      }
 catch (      NumberFormatException e2) {
        Log.e(TAG,"String_Node_Str" + value + "String_Node_Str"+ key);
        return null;
      }
    }
 else {
      Log.e(TAG,"String_Node_Str" + key + "String_Node_Str"+ value,e);
      return null;
    }
  }
}
Program: 23092
Project: 23092
Buggy source:
/** 
 * Gets a value and converts it to a Byte.
 * @param key the value to get
 * @return the Byte value, or null if the value is missing or cannot be converted
 */
public Byte getAsByte(String key){
  Object value=mValues.get(key);
  try {
    return value != null ? ((Number)value).byteValue() : null;
  }
 catch (  ClassCastException e) {
    if (value instanceof CharSequence) {
      try {
        return Byte.valueOf(value.toString());
      }
 catch (      NumberFormatException e2) {
        Log.e(TAG,"String_Node_Str" + value + "String_Node_Str"+ key);
        return null;
      }
    }
 else {
      Log.e(TAG,"String_Node_Str" + key + "String_Node_Str");
      return null;
    }
  }
}

Fixed version (ground truth):
/** 
 * Gets a value and converts it to a Byte.
 * @param key the value to get
 * @return the Byte value, or null if the value is missing or cannot be converted
 */
public Byte getAsByte(String key){
  Object value=mValues.get(key);
  try {
    return value != null ? ((Number)value).byteValue() : null;
  }
 catch (  ClassCastException e) {
    if (value instanceof CharSequence) {
      try {
        return Byte.valueOf(value.toString());
      }
 catch (      NumberFormatException e2) {
        Log.e(TAG,"String_Node_Str" + value + "String_Node_Str"+ key);
        return null;
      }
    }
 else {
      Log.e(TAG,"String_Node_Str" + key + "String_Node_Str"+ value,e);
      return null;
    }
  }
}
Program: 23093
Project: 23093
Buggy source:
/** 
 * Gets a value and converts it to an Integer.
 * @param key the value to get
 * @return the Integer value, or null if the value is missing or cannot be converted
 */
public Integer getAsInteger(String key){
  Object value=mValues.get(key);
  try {
    return value != null ? ((Number)value).intValue() : null;
  }
 catch (  ClassCastException e) {
    if (value instanceof CharSequence) {
      try {
        return Integer.valueOf(value.toString());
      }
 catch (      NumberFormatException e2) {
        Log.e(TAG,"String_Node_Str" + value + "String_Node_Str"+ key);
        return null;
      }
    }
 else {
      Log.e(TAG,"String_Node_Str" + key + "String_Node_Str");
      return null;
    }
  }
}

Fixed version (ground truth):
/** 
 * Gets a value and converts it to an Integer.
 * @param key the value to get
 * @return the Integer value, or null if the value is missing or cannot be converted
 */
public Integer getAsInteger(String key){
  Object value=mValues.get(key);
  try {
    return value != null ? ((Number)value).intValue() : null;
  }
 catch (  ClassCastException e) {
    if (value instanceof CharSequence) {
      try {
        return Integer.valueOf(value.toString());
      }
 catch (      NumberFormatException e2) {
        Log.e(TAG,"String_Node_Str" + value + "String_Node_Str"+ key);
        return null;
      }
    }
 else {
      Log.e(TAG,"String_Node_Str" + key + "String_Node_Str"+ value,e);
      return null;
    }
  }
}
Program: 23094
Project: 23094
Buggy source:
/** 
 * Gets a value and converts it to a Long.
 * @param key the value to get
 * @return the Long value, or null if the value is missing or cannot be converted
 */
public Long getAsLong(String key){
  Object value=mValues.get(key);
  try {
    return value != null ? ((Number)value).longValue() : null;
  }
 catch (  ClassCastException e) {
    if (value instanceof CharSequence) {
      try {
        return Long.valueOf(value.toString());
      }
 catch (      NumberFormatException e2) {
        Log.e(TAG,"String_Node_Str" + value + "String_Node_Str"+ key);
        return null;
      }
    }
 else {
      Log.e(TAG,"String_Node_Str" + key + "String_Node_Str");
      return null;
    }
  }
}

Fixed version (ground truth):
/** 
 * Gets a value and converts it to a Long.
 * @param key the value to get
 * @return the Long value, or null if the value is missing or cannot be converted
 */
public Long getAsLong(String key){
  Object value=mValues.get(key);
  try {
    return value != null ? ((Number)value).longValue() : null;
  }
 catch (  ClassCastException e) {
    if (value instanceof CharSequence) {
      try {
        return Long.valueOf(value.toString());
      }
 catch (      NumberFormatException e2) {
        Log.e(TAG,"String_Node_Str" + value + "String_Node_Str"+ key);
        return null;
      }
    }
 else {
      Log.e(TAG,"String_Node_Str" + key + "String_Node_Str"+ value,e);
      return null;
    }
  }
}
Program: 23095
Project: 23095
Buggy source:
/** 
 * Returns true if this object has the named value.
 * @param key the value to check for
 * @return {@code true} if the value is present, {@code false} otherwise 
 */
public boolean containsKey(String key){
  return mValues.containsKey(key);
}

Fixed version (ground truth):
/** 
 * Returns true if this object has the named value.
 * @param key the value to check for
 * @return {@code true} if the value is present, {@code false} otherwise
 */
public boolean containsKey(String key){
  return mValues.containsKey(key);
}
Program: 23096
Project: 23096
Buggy source:
/** 
 * Gets a value and converts it to a Double.
 * @param key the value to get
 * @return the Double value, or null if the value is missing or cannot be converted
 */
public Double getAsDouble(String key){
  Object value=mValues.get(key);
  try {
    return value != null ? ((Number)value).doubleValue() : null;
  }
 catch (  ClassCastException e) {
    if (value instanceof CharSequence) {
      try {
        return Double.valueOf(value.toString());
      }
 catch (      NumberFormatException e2) {
        Log.e(TAG,"String_Node_Str" + value + "String_Node_Str"+ key);
        return null;
      }
    }
 else {
      Log.e(TAG,"String_Node_Str" + key + "String_Node_Str");
      return null;
    }
  }
}

Fixed version (ground truth):
/** 
 * Gets a value and converts it to a Double.
 * @param key the value to get
 * @return the Double value, or null if the value is missing or cannot be converted
 */
public Double getAsDouble(String key){
  Object value=mValues.get(key);
  try {
    return value != null ? ((Number)value).doubleValue() : null;
  }
 catch (  ClassCastException e) {
    if (value instanceof CharSequence) {
      try {
        return Double.valueOf(value.toString());
      }
 catch (      NumberFormatException e2) {
        Log.e(TAG,"String_Node_Str" + value + "String_Node_Str"+ key);
        return null;
      }
    }
 else {
      Log.e(TAG,"String_Node_Str" + key + "String_Node_Str"+ value,e);
      return null;
    }
  }
}
Program: 23097
Project: 23097
Buggy source:
/** 
 * Gets a value and converts it to a Boolean.
 * @param key the value to get
 * @return the Boolean value, or null if the value is missing or cannot be converted
 */
public Boolean getAsBoolean(String key){
  Object value=mValues.get(key);
  try {
    return (Boolean)value;
  }
 catch (  ClassCastException e) {
    if (value instanceof CharSequence) {
      return Boolean.valueOf(value.toString());
    }
 else {
      Log.e(TAG,"String_Node_Str" + key + "String_Node_Str");
      return null;
    }
  }
}

Fixed version (ground truth):
/** 
 * Gets a value and converts it to a Boolean.
 * @param key the value to get
 * @return the Boolean value, or null if the value is missing or cannot be converted
 */
public Boolean getAsBoolean(String key){
  Object value=mValues.get(key);
  try {
    return (Boolean)value;
  }
 catch (  ClassCastException e) {
    if (value instanceof CharSequence) {
      return Boolean.valueOf(value.toString());
    }
 else {
      Log.e(TAG,"String_Node_Str" + key + "String_Node_Str"+ value,e);
      return null;
    }
  }
}
Program: 23098
Project: 23098
Buggy source:
/** 
 * Gets a value and converts it to a Short.
 * @param key the value to get
 * @return the Short value, or null if the value is missing or cannot be converted
 */
public Short getAsShort(String key){
  Object value=mValues.get(key);
  try {
    return value != null ? ((Number)value).shortValue() : null;
  }
 catch (  ClassCastException e) {
    if (value instanceof CharSequence) {
      try {
        return Short.valueOf(value.toString());
      }
 catch (      NumberFormatException e2) {
        Log.e(TAG,"String_Node_Str" + value + "String_Node_Str"+ key);
        return null;
      }
    }
 else {
      Log.e(TAG,"String_Node_Str" + key + "String_Node_Str");
      return null;
    }
  }
}

Fixed version (ground truth):
/** 
 * Gets a value and converts it to a Short.
 * @param key the value to get
 * @return the Short value, or null if the value is missing or cannot be converted
 */
public Short getAsShort(String key){
  Object value=mValues.get(key);
  try {
    return value != null ? ((Number)value).shortValue() : null;
  }
 catch (  ClassCastException e) {
    if (value instanceof CharSequence) {
      try {
        return Short.valueOf(value.toString());
      }
 catch (      NumberFormatException e2) {
        Log.e(TAG,"String_Node_Str" + value + "String_Node_Str"+ key);
        return null;
      }
    }
 else {
      Log.e(TAG,"String_Node_Str" + key + "String_Node_Str"+ value,e);
      return null;
    }
  }
}
Program: 23099
Project: 23099
Buggy source:
public void onPress(int primaryCode){
}

Fixed version (ground truth):
public void onPress(int primaryCode){
  if (mVibratePattern != null) {
    mVibrator.vibrate(mVibratePattern,-1);
  }
}
Program: 23100
Project: 23100
Buggy source:
public PasswordEntryKeyboardHelper(Context context,KeyboardView keyboardView,View targetView){
  mContext=context;
  mTargetView=targetView;
  mKeyboardView=keyboardView;
  createKeyboards();
  mKeyboardView.setOnKeyboardActionListener(this);
}

Fixed version (ground truth):
public PasswordEntryKeyboardHelper(Context context,KeyboardView keyboardView,View targetView){
  mContext=context;
  mTargetView=targetView;
  mKeyboardView=keyboardView;
  createKeyboards();
  mKeyboardView.setOnKeyboardActionListener(this);
  mVibrator=new Vibrator();
}
Program: 23101
Project: 23101
Buggy source:
public PasswordUnlockScreen(Context context,LockPatternUtils lockPatternUtils,KeyguardUpdateMonitor updateMonitor,KeyguardScreenCallback callback){
  super(context);
  mUpdateMonitor=updateMonitor;
  mCallback=callback;
  mCreatedWithKeyboardOpen=mUpdateMonitor.isKeyboardOpen();
  LayoutInflater layoutInflater=LayoutInflater.from(context);
  if (mUpdateMonitor.isInPortrait()) {
    layoutInflater.inflate(R.layout.keyguard_screen_password_portrait,this,true);
  }
 else {
    layoutInflater.inflate(R.layout.keyguard_screen_password_landscape,this,true);
  }
  boolean isAlpha=lockPatternUtils.getPasswordMode() == LockPatternUtils.MODE_PASSWORD;
  mKeyboardView=(PasswordEntryKeyboardView)findViewById(R.id.keyboard);
  mPasswordEntry=(EditText)findViewById(R.id.passwordEntry);
  mPasswordEntry.setOnEditorActionListener(this);
  mEmergencyCallButton=(TextView)findViewById(R.id.emergencyCall);
  mEmergencyCallButton.setOnClickListener(this);
  mUpdateMonitor.registerConfigurationChangeCallback(this);
  mLockPatternUtils=lockPatternUtils;
  mKeyboardHelper=new PasswordEntryKeyboardHelper(context,mKeyboardView,this);
  mKeyboardHelper.setKeyboardMode(isAlpha ? PasswordEntryKeyboardHelper.KEYBOARD_MODE_ALPHA : PasswordEntryKeyboardHelper.KEYBOARD_MODE_NUMERIC);
  mKeyboardView.setVisibility(mCreatedWithKeyboardOpen ? View.INVISIBLE : View.VISIBLE);
  mPasswordEntry.requestFocus();
}

Fixed version (ground truth):
public PasswordUnlockScreen(Context context,LockPatternUtils lockPatternUtils,KeyguardUpdateMonitor updateMonitor,KeyguardScreenCallback callback){
  super(context);
  mUpdateMonitor=updateMonitor;
  mCallback=callback;
  mCreatedWithKeyboardOpen=mUpdateMonitor.isKeyboardOpen();
  LayoutInflater layoutInflater=LayoutInflater.from(context);
  if (mUpdateMonitor.isInPortrait()) {
    layoutInflater.inflate(R.layout.keyguard_screen_password_portrait,this,true);
  }
 else {
    layoutInflater.inflate(R.layout.keyguard_screen_password_landscape,this,true);
  }
  boolean isAlpha=lockPatternUtils.getPasswordMode() == LockPatternUtils.MODE_PASSWORD;
  mKeyboardView=(PasswordEntryKeyboardView)findViewById(R.id.keyboard);
  mPasswordEntry=(EditText)findViewById(R.id.passwordEntry);
  mPasswordEntry.setOnEditorActionListener(this);
  mEmergencyCallButton=(TextView)findViewById(R.id.emergencyCall);
  mEmergencyCallButton.setOnClickListener(this);
  mUpdateMonitor.registerConfigurationChangeCallback(this);
  mLockPatternUtils=lockPatternUtils;
  mKeyboardHelper=new PasswordEntryKeyboardHelper(context,mKeyboardView,this);
  mKeyboardHelper.setKeyboardMode(isAlpha ? PasswordEntryKeyboardHelper.KEYBOARD_MODE_ALPHA : PasswordEntryKeyboardHelper.KEYBOARD_MODE_NUMERIC);
  mKeyboardView.setVisibility(mCreatedWithKeyboardOpen ? View.INVISIBLE : View.VISIBLE);
  mPasswordEntry.requestFocus();
  mKeyboardHelper.setVibratePattern(mLockPatternUtils.isTactileFeedbackEnabled() ? com.android.internal.R.array.config_virtualKeyVibePattern : 0);
}
Program: 23102
Project: 23102
Buggy source:
/** 
 * Updates the state of   {@link android.view.accessibility.AccessibilityManager} clients.
 */
private void updateClientsLocked(){
  for (int i=0, count=mClients.size(); i < count; i++) {
    try {
      mClients.get(i).setEnabled(mIsEnabled);
    }
 catch (    RemoteException re) {
      mClients.remove(i);
      count--;
    }
  }
}

Fixed version (ground truth):
/** 
 * Updates the state of   {@link android.view.accessibility.AccessibilityManager} clients.
 */
private void updateClientsLocked(){
  for (int i=0, count=mClients.size(); i < count; i++) {
    try {
      mClients.get(i).setEnabled(mIsEnabled);
    }
 catch (    RemoteException re) {
      mClients.remove(i);
      count--;
      i--;
    }
  }
}
Program: 23103
Project: 23103
Buggy source:
/** 
 * Updates the state of   {@link android.view.accessibility.AccessibilityManager} clients.
 */
private void updateClientsLocked(){
  for (int i=0, count=mClients.size(); i < count; i++) {
    try {
      mClients.get(i).setEnabled(mIsEnabled);
    }
 catch (    RemoteException re) {
      mClients.remove(i);
      count--;
    }
  }
}

Fixed version (ground truth):
/** 
 * Updates the state of   {@link android.view.accessibility.AccessibilityManager} clients.
 */
private void updateClientsLocked(){
  for (int i=0, count=mClients.size(); i < count; i++) {
    try {
      mClients.get(i).setEnabled(mIsEnabled);
    }
 catch (    RemoteException re) {
      mClients.remove(i);
      count--;
      i--;
    }
  }
}
Program: 23104
Project: 23104
Buggy source:
SQLiteProgram(SQLiteDatabase db,String sql){
  mDatabase=db;
  mSql=sql;
  db.acquireReference();
  db.addSQLiteClosable(this);
  this.nHandle=db.mNativeHandle;
  mCompiledSql=db.getCompiledStatementForSql(sql);
  if (mCompiledSql == null) {
    mCompiledSql=new SQLiteCompiledSql(db,sql);
    db.addToCompiledQueries(sql,mCompiledSql);
  }
  nStatement=mCompiledSql.nStatement;
}

Fixed version (ground truth):
SQLiteProgram(SQLiteDatabase db,String sql){
  mDatabase=db;
  mSql=sql;
  db.acquireReference();
  db.addSQLiteClosable(this);
  this.nHandle=db.mNativeHandle;
  mCompiledSql=db.getCompiledStatementForSql(sql);
  if (mCompiledSql == null) {
    mCompiledSql=new SQLiteCompiledSql(db,sql);
    db.addToCompiledQueries(sql,mCompiledSql);
    mCompiledSql.acquire();
  }
 else {
    if (mCompiledSql.isInUse()) {
      mCompiledSql=new SQLiteCompiledSql(db,sql);
    }
 else {
      mCompiledSql.acquire();
    }
  }
  nStatement=mCompiledSql.nStatement;
}
Program: 23105
Project: 23105
Buggy source:
@Override protected void onAllReferencesReleasedFromContainer(){
  releaseCompiledSqlIfInCache();
  mDatabase.releaseReference();
}

Fixed version (ground truth):
@Override protected void onAllReferencesReleasedFromContainer(){
  releaseCompiledSqlIfNotInCache();
  mDatabase.releaseReference();
}
Program: 23106
Project: 23106
Buggy source:
@Override protected void onAllReferencesReleased(){
  releaseCompiledSqlIfInCache();
  mDatabase.releaseReference();
  mDatabase.removeSQLiteClosable(this);
}

Fixed version (ground truth):
@Override protected void onAllReferencesReleased(){
  releaseCompiledSqlIfNotInCache();
  mDatabase.releaseReference();
  mDatabase.removeSQLiteClosable(this);
}
Program: 23108
Project: 23108
Buggy source:
private void init(String rruleStr,String rdateStr,String exruleStr,String exdateStr){
  if (!TextUtils.isEmpty(rruleStr) || !TextUtils.isEmpty(rdateStr)) {
    if (!TextUtils.isEmpty(rruleStr)) {
      String[] rruleStrs=rruleStr.split(RULE_SEPARATOR);
      rrules=new EventRecurrence[rruleStrs.length];
      for (int i=0; i < rruleStrs.length; ++i) {
        EventRecurrence rrule=new EventRecurrence();
        rrule.parse(rruleStrs[i]);
        rrules[i]=rrule;
      }
    }
    if (!TextUtils.isEmpty(rdateStr)) {
      rdates=parseRecurrenceDates(rdateStr);
    }
    if (!TextUtils.isEmpty(exruleStr)) {
      String[] exruleStrs=exruleStr.split(RULE_SEPARATOR);
      exrules=new EventRecurrence[exruleStrs.length];
      for (int i=0; i < exruleStrs.length; ++i) {
        EventRecurrence exrule=new EventRecurrence();
        exrule.parse(exruleStr);
        exrules[i]=exrule;
      }
    }
    if (!TextUtils.isEmpty(exdateStr)) {
      exdates=parseRecurrenceDates(exdateStr);
    }
  }
}

Fixed version (ground truth):
private void init(String rruleStr,String rdateStr,String exruleStr,String exdateStr) throws EventRecurrence.InvalidFormatException {
  if (!TextUtils.isEmpty(rruleStr) || !TextUtils.isEmpty(rdateStr)) {
    if (!TextUtils.isEmpty(rruleStr)) {
      String[] rruleStrs=rruleStr.split(RULE_SEPARATOR);
      rrules=new EventRecurrence[rruleStrs.length];
      for (int i=0; i < rruleStrs.length; ++i) {
        EventRecurrence rrule=new EventRecurrence();
        rrule.parse(rruleStrs[i]);
        rrules[i]=rrule;
      }
    }
    if (!TextUtils.isEmpty(rdateStr)) {
      rdates=parseRecurrenceDates(rdateStr);
    }
    if (!TextUtils.isEmpty(exruleStr)) {
      String[] exruleStrs=exruleStr.split(RULE_SEPARATOR);
      exrules=new EventRecurrence[exruleStrs.length];
      for (int i=0; i < exruleStrs.length; ++i) {
        EventRecurrence exrule=new EventRecurrence();
        exrule.parse(exruleStr);
        exrules[i]=exrule;
      }
    }
    if (!TextUtils.isEmpty(exdateStr)) {
      exdates=parseRecurrenceDates(exdateStr);
    }
  }
}
Program: 23109
Project: 23109
Buggy source:
public RecurrenceSet(String rruleStr,String rdateStr,String exruleStr,String exdateStr){
  init(rruleStr,rdateStr,exruleStr,exdateStr);
}

Fixed version (ground truth):
public RecurrenceSet(String rruleStr,String rdateStr,String exruleStr,String exdateStr) throws EventRecurrence.InvalidFormatException {
  init(rruleStr,rdateStr,exruleStr,exdateStr);
}
Program: 23110
Project: 23110
Buggy source:
/** 
 * Removes a dead service.
 * @param service The service.
 * @return True if the service was removed, false otherwise.
 */
private boolean removeDeadServiceLocked(Service service){
  mServices.remove(service);
  mHandler.removeMessages(service.mId);
  if (LOGV) {
    Log.i(LOG_TAG,"String_Node_Str" + service.mService + "String_Node_Str");
  }
  if (mServices.isEmpty()) {
    mIsEnabled=false;
    updateClientsLocked();
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Removes a dead service.
 * @param service The service.
 * @return True if the service was removed, false otherwise.
 */
private boolean removeDeadServiceLocked(Service service){
  mServices.remove(service);
  mHandler.removeMessages(service.mId);
  if (Config.DEBUG) {
    Log.i(LOG_TAG,"String_Node_Str" + service.mService + "String_Node_Str");
  }
  if (mServices.isEmpty()) {
    mIsEnabled=false;
    updateClientsLocked();
  }
  return true;
}
Program: 23111
Project: 23111
Buggy source:
/** 
 * Creates a new instance.
 * @param context A {@link Context} instance.
 */
AccessibilityManagerService(Context context){
  mContext=context;
  mPackageManager=mContext.getPackageManager();
  mCaller=new HandlerCaller(context,this);
  registerPackageChangeAndBootCompletedBroadcastReceiver();
  registerSettingsContentObservers();
synchronized (mLock) {
    populateAccessibilityServiceListLocked();
  }
}

Fixed version (ground truth):
/** 
 * Creates a new instance.
 * @param context A {@link Context} instance.
 */
AccessibilityManagerService(Context context){
  mContext=context;
  mPackageManager=mContext.getPackageManager();
  mCaller=new HandlerCaller(context,this);
  registerPackageChangeAndBootCompletedBroadcastReceiver();
  registerSettingsContentObservers();
}
Program: 23112
Project: 23112
Buggy source:
/** 
 * Registers a   {@link BroadcastReceiver} for the events ofadding/changing/removing/restarting a package and boot completion.
 */
private void registerPackageChangeAndBootCompletedBroadcastReceiver(){
  Context context=mContext;
  BroadcastReceiver broadcastReceiver=new BroadcastReceiver(){
    @Override public void onReceive(    Context context,    Intent intent){
synchronized (mLock) {
        populateAccessibilityServiceListLocked();
        manageServicesLocked();
        if (intent.getAction() == Intent.ACTION_BOOT_COMPLETED) {
          mIsEnabled=Settings.Secure.getInt(mContext.getContentResolver(),Settings.Secure.ACCESSIBILITY_ENABLED,0) == 1;
          updateClientsLocked();
        }
      }
    }
  }
;
  IntentFilter packageFilter=new IntentFilter();
  packageFilter.addAction(Intent.ACTION_PACKAGE_ADDED);
  packageFilter.addAction(Intent.ACTION_PACKAGE_CHANGED);
  packageFilter.addAction(Intent.ACTION_PACKAGE_REMOVED);
  packageFilter.addAction(Intent.ACTION_PACKAGE_RESTARTED);
  packageFilter.addDataScheme("String_Node_Str");
  context.registerReceiver(broadcastReceiver,packageFilter);
  IntentFilter sdFilter=new IntentFilter();
  sdFilter.addAction(Intent.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE);
  sdFilter.addAction(Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE);
  mContext.registerReceiver(broadcastReceiver,sdFilter);
  IntentFilter bootFiler=new IntentFilter(Intent.ACTION_BOOT_COMPLETED);
  mContext.registerReceiver(broadcastReceiver,bootFiler);
}

Fixed version (ground truth):
/** 
 * Registers a   {@link BroadcastReceiver} for the events ofadding/changing/removing/restarting a package and boot completion.
 */
private void registerPackageChangeAndBootCompletedBroadcastReceiver(){
  Context context=mContext;
  BroadcastReceiver broadcastReceiver=new BroadcastReceiver(){
    @Override public void onReceive(    Context context,    Intent intent){
synchronized (mLock) {
        populateAccessibilityServiceListLocked();
        if (intent.getAction() == Intent.ACTION_BOOT_COMPLETED) {
          mIsEnabled=Settings.Secure.getInt(mContext.getContentResolver(),Settings.Secure.ACCESSIBILITY_ENABLED,0) == 1;
          if (mIsEnabled) {
            updateClientsLocked();
          }
        }
        manageServicesLocked();
      }
    }
  }
;
  IntentFilter packageFilter=new IntentFilter();
  packageFilter.addAction(Intent.ACTION_PACKAGE_ADDED);
  packageFilter.addAction(Intent.ACTION_PACKAGE_REMOVED);
  packageFilter.addAction(Intent.ACTION_PACKAGE_RESTARTED);
  packageFilter.addDataScheme("String_Node_Str");
  context.registerReceiver(broadcastReceiver,packageFilter);
  IntentFilter sdFilter=new IntentFilter();
  sdFilter.addAction(Intent.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE);
  sdFilter.addAction(Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE);
  mContext.registerReceiver(broadcastReceiver,sdFilter);
  IntentFilter bootFiler=new IntentFilter(Intent.ACTION_BOOT_COMPLETED);
  mContext.registerReceiver(broadcastReceiver,bootFiler);
}
Program: 23113
Project: 23113
Buggy source:
@Override public void onReceive(Context context,Intent intent){
synchronized (mLock) {
    populateAccessibilityServiceListLocked();
    manageServicesLocked();
    if (intent.getAction() == Intent.ACTION_BOOT_COMPLETED) {
      mIsEnabled=Settings.Secure.getInt(mContext.getContentResolver(),Settings.Secure.ACCESSIBILITY_ENABLED,0) == 1;
      updateClientsLocked();
    }
  }
}

Fixed version (ground truth):
@Override public void onReceive(Context context,Intent intent){
synchronized (mLock) {
    populateAccessibilityServiceListLocked();
    if (intent.getAction() == Intent.ACTION_BOOT_COMPLETED) {
      mIsEnabled=Settings.Secure.getInt(mContext.getContentResolver(),Settings.Secure.ACCESSIBILITY_ENABLED,0) == 1;
      if (mIsEnabled) {
        updateClientsLocked();
      }
    }
    manageServicesLocked();
  }
}
Program: 23114
Project: 23114
Buggy source:
/** 
 * Updates the state of each service by starting (or keeping running) enabled ones and stopping the rest.
 * @param installedServices All installed {@link AccessibilityService}s.
 * @param enabledServices The {@link ComponentName}s of the enabled services.
 */
private void updateServicesStateLocked(List<ServiceInfo> installedServices,Set<ComponentName> enabledServices){
  Map<ComponentName,Service> componentNameToServiceMap=mComponentNameToServiceMap;
  List<Service> services=mServices;
  for (int i=0, count=installedServices.size(); i < count; i++) {
    ServiceInfo intalledService=installedServices.get(i);
    ComponentName componentName=new ComponentName(intalledService.packageName,intalledService.name);
    Service service=componentNameToServiceMap.get(componentName);
    if (enabledServices.contains(componentName)) {
      if (service == null) {
        new Service(componentName).bind();
      }
    }
 else {
      if (service != null) {
        service.unbind();
        componentNameToServiceMap.remove(componentName);
        services.remove(service);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Updates the state of each service by starting (or keeping running) enabled ones and stopping the rest.
 * @param installedServices All installed {@link AccessibilityService}s.
 * @param enabledServices The {@link ComponentName}s of the enabled services.
 */
private void updateServicesStateLocked(List<ServiceInfo> installedServices,Set<ComponentName> enabledServices){
  Map<ComponentName,Service> componentNameToServiceMap=mComponentNameToServiceMap;
  List<Service> services=mServices;
  boolean isEnabled=mIsEnabled;
  for (int i=0, count=installedServices.size(); i < count; i++) {
    ServiceInfo intalledService=installedServices.get(i);
    ComponentName componentName=new ComponentName(intalledService.packageName,intalledService.name);
    Service service=componentNameToServiceMap.get(componentName);
    if (isEnabled && enabledServices.contains(componentName)) {
      if (service == null) {
        new Service(componentName).bind();
      }
    }
 else {
      if (service != null) {
        service.unbind();
        componentNameToServiceMap.remove(componentName);
        services.remove(service);
      }
    }
  }
}
Program: 23115
Project: 23115
Buggy source:
/** 
 * Notifies a service for a scheduled event given the event type.
 * @param service The service.
 * @param eventType The type of the event to dispatch.
 */
private void notifyEventListenerLocked(Service service,int eventType){
  IEventListener listener=service.mServiceInterface;
  AccessibilityEvent event=service.mPendingEvents.get(eventType);
  try {
    listener.onAccessibilityEvent(event);
    if (LOGV) {
      Log.i(LOG_TAG,"String_Node_Str" + event + "String_Node_Str"+ listener);
    }
  }
 catch (  RemoteException re) {
    if (re instanceof DeadObjectException) {
      Log.w(LOG_TAG,"String_Node_Str" + service.mService + "String_Node_Str");
synchronized (mLock) {
        removeDeadServiceLocked(service);
      }
    }
 else {
      Log.e(LOG_TAG,"String_Node_Str" + event + "String_Node_Str"+ service.mService,re);
    }
  }
}

Fixed version (ground truth):
/** 
 * Notifies a service for a scheduled event given the event type.
 * @param service The service.
 * @param eventType The type of the event to dispatch.
 */
private void notifyEventListenerLocked(Service service,int eventType){
  IEventListener listener=service.mServiceInterface;
  AccessibilityEvent event=service.mPendingEvents.get(eventType);
  try {
    listener.onAccessibilityEvent(event);
    if (Config.DEBUG) {
      Log.i(LOG_TAG,"String_Node_Str" + event + "String_Node_Str"+ listener);
    }
  }
 catch (  RemoteException re) {
    if (re instanceof DeadObjectException) {
      Log.w(LOG_TAG,"String_Node_Str" + service.mService + "String_Node_Str");
synchronized (mLock) {
        removeDeadServiceLocked(service);
      }
    }
 else {
      Log.e(LOG_TAG,"String_Node_Str" + event + "String_Node_Str"+ service.mService,re);
    }
  }
}
Program: 23116
Project: 23116
Buggy source:
private void init(String rruleStr,String rdateStr,String exruleStr,String exdateStr){
  if (!TextUtils.isEmpty(rruleStr) || !TextUtils.isEmpty(rdateStr)) {
    if (!TextUtils.isEmpty(rruleStr)) {
      String[] rruleStrs=rruleStr.split(RULE_SEPARATOR);
      rrules=new EventRecurrence[rruleStrs.length];
      for (int i=0; i < rruleStrs.length; ++i) {
        EventRecurrence rrule=new EventRecurrence();
        rrule.parse(rruleStrs[i]);
        rrules[i]=rrule;
      }
    }
    if (!TextUtils.isEmpty(rdateStr)) {
      rdates=parseRecurrenceDates(rdateStr);
    }
    if (!TextUtils.isEmpty(exruleStr)) {
      String[] exruleStrs=exruleStr.split(RULE_SEPARATOR);
      exrules=new EventRecurrence[exruleStrs.length];
      for (int i=0; i < exruleStrs.length; ++i) {
        EventRecurrence exrule=new EventRecurrence();
        exrule.parse(exruleStr);
        exrules[i]=exrule;
      }
    }
    if (!TextUtils.isEmpty(exdateStr)) {
      exdates=parseRecurrenceDates(exdateStr);
    }
  }
}

Fixed version (ground truth):
private void init(String rruleStr,String rdateStr,String exruleStr,String exdateStr) throws EventRecurrence.InvalidFormatException {
  if (!TextUtils.isEmpty(rruleStr) || !TextUtils.isEmpty(rdateStr)) {
    if (!TextUtils.isEmpty(rruleStr)) {
      String[] rruleStrs=rruleStr.split(RULE_SEPARATOR);
      rrules=new EventRecurrence[rruleStrs.length];
      for (int i=0; i < rruleStrs.length; ++i) {
        EventRecurrence rrule=new EventRecurrence();
        rrule.parse(rruleStrs[i]);
        rrules[i]=rrule;
      }
    }
    if (!TextUtils.isEmpty(rdateStr)) {
      rdates=parseRecurrenceDates(rdateStr);
    }
    if (!TextUtils.isEmpty(exruleStr)) {
      String[] exruleStrs=exruleStr.split(RULE_SEPARATOR);
      exrules=new EventRecurrence[exruleStrs.length];
      for (int i=0; i < exruleStrs.length; ++i) {
        EventRecurrence exrule=new EventRecurrence();
        exrule.parse(exruleStr);
        exrules[i]=exrule;
      }
    }
    if (!TextUtils.isEmpty(exdateStr)) {
      exdates=parseRecurrenceDates(exdateStr);
    }
  }
}
Program: 23117
Project: 23117
Buggy source:
public RecurrenceSet(String rruleStr,String rdateStr,String exruleStr,String exdateStr){
  init(rruleStr,rdateStr,exruleStr,exdateStr);
}

Fixed version (ground truth):
public RecurrenceSet(String rruleStr,String rdateStr,String exruleStr,String exdateStr) throws EventRecurrence.InvalidFormatException {
  init(rruleStr,rdateStr,exruleStr,exdateStr);
}
Program: 23118
Project: 23118
Buggy source:
public void writeToParcel(Parcel parcel,int flags){
  parcel.writeInt(eventTypes);
  parcel.writeStringArray(packageNames);
  parcel.writeInt(feedbackType);
  parcel.writeLong(notificationTimeout);
  parcel.writeInt(flags);
}

Fixed version (ground truth):
public void writeToParcel(Parcel parcel,int flagz){
  parcel.writeInt(eventTypes);
  parcel.writeStringArray(packageNames);
  parcel.writeInt(feedbackType);
  parcel.writeLong(notificationTimeout);
  parcel.writeInt(flags);
}