nus-yam/ex-repair huggingface dataset:
Program: 2203
Project: 2203
Buggy source:
/** 
 * asynchronously notify all listeners about a removed notification
 */
private void notifyRemovedLocked(NotificationRecord n){
  final StatusBarNotification sbn=n.sbn;
  for (  final NotificationListenerInfo info : mListeners) {
    mHandler.post(new Runnable(){
      @Override public void run(){
        info.notifyRemovedIfUserMatch(sbn);
      }
    }
);
  }
}

Fixed version (ground truth):
/** 
 * asynchronously notify all listeners about a removed notification
 */
private void notifyRemovedLocked(NotificationRecord n){
  final StatusBarNotification sbn_light=n.sbn.cloneLight();
  for (  final NotificationListenerInfo info : mListeners) {
    mHandler.post(new Runnable(){
      @Override public void run(){
        info.notifyRemovedIfUserMatch(sbn_light);
      }
    }
);
  }
}
Program: 2204
Project: 2204
Buggy source:
public void notifyPostedIfUserMatch(StatusBarNotification sbn){
  if (!enabledAndUserMatches(sbn)) {
    return;
  }
  try {
    listener.onNotificationPosted(sbn);
  }
 catch (  RemoteException ex) {
  }
}

Fixed version (ground truth):
public void notifyPostedIfUserMatch(StatusBarNotification sbn){
  if (!enabledAndUserMatches(sbn)) {
    return;
  }
  try {
    listener.onNotificationPosted(sbn);
  }
 catch (  RemoteException ex) {
    Log.e(TAG,"String_Node_Str" + listener,ex);
  }
}
Program: 2205
Project: 2205
Buggy source:
/** 
 * Apply this Builder to an existing   {@link Notification} object.
 * @hide
 */
public Notification buildInto(Notification n){
  build().cloneInto(n);
  return n;
}

Fixed version (ground truth):
/** 
 * Apply this Builder to an existing   {@link Notification} object.
 * @hide
 */
public Notification buildInto(Notification n){
  build().cloneInto(n,true);
  return n;
}
Program: 2207
Project: 2207
Buggy source:
@Override public Notification clone(){
  Notification that=new Notification();
  cloneInto(that);
  return that;
}

Fixed version (ground truth):
@Override public Notification clone(){
  Notification that=new Notification();
  cloneInto(that,true);
  return that;
}
Program: 2208
Project: 2208
Buggy source:
@Override public void run(){
  info.notifyRemovedIfUserMatch(sbn);
}

Fixed version (ground truth):
@Override public void run(){
  info.notifyRemovedIfUserMatch(sbn_light);
}
Program: 2209
Project: 2209
Buggy source:
public void record(StatusBarNotification nr){
  nr.notification.tickerView=null;
  nr.notification.contentView=null;
  nr.notification.bigContentView=null;
  nr.notification.largeIcon=null;
  final Bundle extras=nr.notification.extras;
  extras.remove(Notification.EXTRA_LARGE_ICON);
  extras.remove(Notification.EXTRA_LARGE_ICON_BIG);
  extras.remove(Notification.EXTRA_PICTURE);
  if (mBuffer.size() == BUFFER_SIZE) {
    mBuffer.removeFirst();
  }
  mBuffer.addLast(nr);
}

Fixed version (ground truth):
public void record(StatusBarNotification nr){
  nr.notification.lightenPayload();
  if (mBuffer.size() == BUFFER_SIZE) {
    mBuffer.removeFirst();
  }
  mBuffer.addLast(nr);
}
Program: 2210
Project: 2210
Buggy source:
public void notifyRemovedIfUserMatch(StatusBarNotification sbn){
  if (!enabledAndUserMatches(sbn))   return;
  try {
    listener.onNotificationRemoved(sbn);
  }
 catch (  RemoteException ex) {
  }
}

Fixed version (ground truth):
public void notifyRemovedIfUserMatch(StatusBarNotification sbn){
  if (!enabledAndUserMatches(sbn))   return;
  try {
    listener.onNotificationRemoved(sbn);
  }
 catch (  RemoteException ex) {
    Log.e(TAG,"String_Node_Str" + listener,ex);
  }
}
Program: 2211
Project: 2211
Buggy source:
/** 
 * asynchronously notify all listeners about a new notification
 */
private void notifyPostedLocked(NotificationRecord n){
  final StatusBarNotification sbn=n.sbn;
  for (  final NotificationListenerInfo info : mListeners) {
    mHandler.post(new Runnable(){
      @Override public void run(){
        info.notifyPostedIfUserMatch(sbn);
      }
    }
);
  }
}

Fixed version (ground truth):
/** 
 * asynchronously notify all listeners about a new notification
 */
private void notifyPostedLocked(NotificationRecord n){
  final StatusBarNotification sbn=n.sbn.clone();
  for (  final NotificationListenerInfo info : mListeners) {
    mHandler.post(new Runnable(){
      @Override public void run(){
        info.notifyPostedIfUserMatch(sbn);
      }
    }
);
  }
}
Program: 2212
Project: 2212
Buggy source:
/** 
 * asynchronously notify all listeners about a removed notification
 */
private void notifyRemovedLocked(NotificationRecord n){
  final StatusBarNotification sbn=n.sbn;
  for (  final NotificationListenerInfo info : mListeners) {
    mHandler.post(new Runnable(){
      @Override public void run(){
        info.notifyRemovedIfUserMatch(sbn);
      }
    }
);
  }
}

Fixed version (ground truth):
/** 
 * asynchronously notify all listeners about a removed notification
 */
private void notifyRemovedLocked(NotificationRecord n){
  final StatusBarNotification sbn_light=n.sbn.cloneLight();
  for (  final NotificationListenerInfo info : mListeners) {
    mHandler.post(new Runnable(){
      @Override public void run(){
        info.notifyRemovedIfUserMatch(sbn_light);
      }
    }
);
  }
}
Program: 2213
Project: 2213
Buggy source:
public void notifyPostedIfUserMatch(StatusBarNotification sbn){
  if (!enabledAndUserMatches(sbn)) {
    return;
  }
  try {
    listener.onNotificationPosted(sbn);
  }
 catch (  RemoteException ex) {
  }
}

Fixed version (ground truth):
public void notifyPostedIfUserMatch(StatusBarNotification sbn){
  if (!enabledAndUserMatches(sbn)) {
    return;
  }
  try {
    listener.onNotificationPosted(sbn);
  }
 catch (  RemoteException ex) {
    Log.e(TAG,"String_Node_Str" + listener,ex);
  }
}
Program: 2214
Project: 2214
Buggy source:
/** 
 * Writes the audio data to the audio sink for playback (streaming mode), or copies audio data for later playback (static buffer mode). In streaming mode, will block until all data has been written to the audio sink. In static buffer mode, copies the data to the buffer starting at offset 0. Note that the actual playback of this data might occur after this function returns. This function is thread safe with respect to   {@link #stop} calls,in which case all of the specified data might not be written to the audio sink.
 * @param audioData the array that holds the data to play.
 * @param offsetInShorts the offset expressed in shorts in audioData where the data to playstarts.
 * @param sizeInShorts the number of bytes to read in audioData after the offset.
 * @return the number of shorts that were written or {@link #ERROR_INVALID_OPERATION}if the object wasn't properly initialized, or   {@link #ERROR_BAD_VALUE} ifthe parameters don't resolve to valid data and indexes.
 */
public int write(short[] audioData,int offsetInShorts,int sizeInShorts){
  if (mState == STATE_UNINITIALIZED) {
    return ERROR_INVALID_OPERATION;
  }
  if ((audioData == null) || (offsetInShorts < 0) || (sizeInShorts < 0)|| (offsetInShorts + sizeInShorts < 0)|| (offsetInShorts + sizeInShorts > audioData.length)) {
    return ERROR_BAD_VALUE;
  }
  int ret=native_write_short(audioData,offsetInShorts,sizeInShorts,mAudioFormat);
  if ((mDataLoadMode == MODE_STATIC) && (mState == STATE_NO_STATIC_DATA) && (ret > 0)) {
    mState=STATE_INITIALIZED;
  }
  return ret;
}

Fixed version (ground truth):
/** 
 * Writes the audio data to the audio sink for playback (streaming mode), or copies audio data for later playback (static buffer mode). In streaming mode, will block until all data has been written to the audio sink. In static buffer mode, copies the data to the buffer starting at offset 0. Note that the actual playback of this data might occur after this function returns. This function is thread safe with respect to   {@link #stop} calls,in which case all of the specified data might not be written to the audio sink.
 * @param audioData the array that holds the data to play.
 * @param offsetInShorts the offset expressed in shorts in audioData where the data to playstarts.
 * @param sizeInShorts the number of shorts to read in audioData after the offset.
 * @return the number of shorts that were written or {@link #ERROR_INVALID_OPERATION}if the object wasn't properly initialized, or   {@link #ERROR_BAD_VALUE} ifthe parameters don't resolve to valid data and indexes.
 */
public int write(short[] audioData,int offsetInShorts,int sizeInShorts){
  if (mState == STATE_UNINITIALIZED) {
    return ERROR_INVALID_OPERATION;
  }
  if ((audioData == null) || (offsetInShorts < 0) || (sizeInShorts < 0)|| (offsetInShorts + sizeInShorts < 0)|| (offsetInShorts + sizeInShorts > audioData.length)) {
    return ERROR_BAD_VALUE;
  }
  int ret=native_write_short(audioData,offsetInShorts,sizeInShorts,mAudioFormat);
  if ((mDataLoadMode == MODE_STATIC) && (mState == STATE_NO_STATIC_DATA) && (ret > 0)) {
    mState=STATE_INITIALIZED;
  }
  return ret;
}
Program: 2215
Project: 2215
Buggy source:
/** 
 * Writes the audio data to the audio sink for playback (streaming mode), or copies audio data for later playback (static buffer mode). In streaming mode, will block until all data has been written to the audio sink. In static buffer mode, copies the data to the buffer starting at offset 0. Note that the actual playback of this data might occur after this function returns. This function is thread safe with respect to   {@link #stop} calls,in which case all of the specified data might not be written to the audio sink.
 * @param audioData the array that holds the data to play.
 * @param offsetInShorts the offset expressed in shorts in audioData where the data to playstarts.
 * @param sizeInShorts the number of bytes to read in audioData after the offset.
 * @return the number of shorts that were written or {@link #ERROR_INVALID_OPERATION}if the object wasn't properly initialized, or   {@link #ERROR_BAD_VALUE} ifthe parameters don't resolve to valid data and indexes.
 */
public int write(short[] audioData,int offsetInShorts,int sizeInShorts){
  if (mState == STATE_UNINITIALIZED) {
    return ERROR_INVALID_OPERATION;
  }
  if ((audioData == null) || (offsetInShorts < 0) || (sizeInShorts < 0)|| (offsetInShorts + sizeInShorts < 0)|| (offsetInShorts + sizeInShorts > audioData.length)) {
    return ERROR_BAD_VALUE;
  }
  int ret=native_write_short(audioData,offsetInShorts,sizeInShorts,mAudioFormat);
  if ((mDataLoadMode == MODE_STATIC) && (mState == STATE_NO_STATIC_DATA) && (ret > 0)) {
    mState=STATE_INITIALIZED;
  }
  return ret;
}

Fixed version (ground truth):
/** 
 * Writes the audio data to the audio sink for playback (streaming mode), or copies audio data for later playback (static buffer mode). In streaming mode, will block until all data has been written to the audio sink. In static buffer mode, copies the data to the buffer starting at offset 0. Note that the actual playback of this data might occur after this function returns. This function is thread safe with respect to   {@link #stop} calls,in which case all of the specified data might not be written to the audio sink.
 * @param audioData the array that holds the data to play.
 * @param offsetInShorts the offset expressed in shorts in audioData where the data to playstarts.
 * @param sizeInShorts the number of shorts to read in audioData after the offset.
 * @return the number of shorts that were written or {@link #ERROR_INVALID_OPERATION}if the object wasn't properly initialized, or   {@link #ERROR_BAD_VALUE} ifthe parameters don't resolve to valid data and indexes.
 */
public int write(short[] audioData,int offsetInShorts,int sizeInShorts){
  if (mState == STATE_UNINITIALIZED) {
    return ERROR_INVALID_OPERATION;
  }
  if ((audioData == null) || (offsetInShorts < 0) || (sizeInShorts < 0)|| (offsetInShorts + sizeInShorts < 0)|| (offsetInShorts + sizeInShorts > audioData.length)) {
    return ERROR_BAD_VALUE;
  }
  int ret=native_write_short(audioData,offsetInShorts,sizeInShorts,mAudioFormat);
  if ((mDataLoadMode == MODE_STATIC) && (mState == STATE_NO_STATIC_DATA) && (ret > 0)) {
    mState=STATE_INITIALIZED;
  }
  return ret;
}
Program: 2216
Project: 2216
Buggy source:
private boolean verifyPreloadConfig(int changingConfigurations,int resourceId,String name){
  if (((changingConfigurations & ~(ActivityInfo.CONFIG_FONT_SCALE | ActivityInfo.CONFIG_DENSITY)) & VARYING_CONFIGS) != 0) {
    String resName;
    try {
      resName=getResourceName(resourceId);
    }
 catch (    NotFoundException e) {
      resName="String_Node_Str";
    }
    Log.w(TAG,"String_Node_Str" + name + "String_Node_Str"+ Integer.toHexString(resourceId)+ "String_Node_Str"+ resName+ "String_Node_Str");
    return false;
  }
  return true;
}

Fixed version (ground truth):
private boolean verifyPreloadConfig(int changingConfigurations,int resourceId,String name){
  if (((changingConfigurations & ~(ActivityInfo.CONFIG_FONT_SCALE | ActivityInfo.CONFIG_DENSITY)) & VARYING_CONFIGS) != 0) {
    String resName;
    try {
      resName=getResourceName(resourceId);
    }
 catch (    NotFoundException e) {
      resName="String_Node_Str";
    }
    Log.w(TAG,"String_Node_Str" + name + "String_Node_Str"+ Integer.toHexString(resourceId)+ "String_Node_Str"+ resName+ "String_Node_Str");
    return false;
  }
  if (TRACE_FOR_PRELOAD) {
    String resName;
    try {
      resName=getResourceName(resourceId);
    }
 catch (    NotFoundException e) {
      resName="String_Node_Str";
    }
    Log.w(TAG,"String_Node_Str" + name + "String_Node_Str"+ Integer.toHexString(resourceId)+ "String_Node_Str"+ resName+ "String_Node_Str");
  }
  return true;
}
Program: 2218
Project: 2218
Buggy source:
private boolean verifyPreloadConfig(int changingConfigurations,int resourceId,String name){
  if (((changingConfigurations & ~(ActivityInfo.CONFIG_FONT_SCALE | ActivityInfo.CONFIG_DENSITY)) & VARYING_CONFIGS) != 0) {
    String resName;
    try {
      resName=getResourceName(resourceId);
    }
 catch (    NotFoundException e) {
      resName="String_Node_Str";
    }
    Log.w(TAG,"String_Node_Str" + name + "String_Node_Str"+ Integer.toHexString(resourceId)+ "String_Node_Str"+ resName+ "String_Node_Str");
    return false;
  }
  return true;
}

Fixed version (ground truth):
private boolean verifyPreloadConfig(int changingConfigurations,int resourceId,String name){
  if (((changingConfigurations & ~(ActivityInfo.CONFIG_FONT_SCALE | ActivityInfo.CONFIG_DENSITY)) & VARYING_CONFIGS) != 0) {
    String resName;
    try {
      resName=getResourceName(resourceId);
    }
 catch (    NotFoundException e) {
      resName="String_Node_Str";
    }
    Log.w(TAG,"String_Node_Str" + name + "String_Node_Str"+ Integer.toHexString(resourceId)+ "String_Node_Str"+ resName+ "String_Node_Str");
    return false;
  }
  if (TRACE_FOR_PRELOAD) {
    String resName;
    try {
      resName=getResourceName(resourceId);
    }
 catch (    NotFoundException e) {
      resName="String_Node_Str";
    }
    Log.w(TAG,"String_Node_Str" + name + "String_Node_Str"+ Integer.toHexString(resourceId)+ "String_Node_Str"+ resName+ "String_Node_Str");
  }
  return true;
}
Program: 2220
Project: 2220
Buggy source:
/** 
 * Specify a X.509 certificate that identifies the server. <p>A default name is automatically assigned to the certificate and used with this configuration. The framework takes care of installing the certificate when the config is saved and removing the certificate when the config is removed.
 * @param cert X.509 CA certificate
 * @throws IllegalArgumentException if not a CA certificate
 */
public void setCaCertificate(X509Certificate cert){
  if (cert.getBasicConstraints() >= 0) {
    mCaCert=cert;
  }
 else {
    throw new IllegalArgumentException("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Specify a X.509 certificate that identifies the server. <p>A default name is automatically assigned to the certificate and used with this configuration. The framework takes care of installing the certificate when the config is saved and removing the certificate when the config is removed.
 * @param cert X.509 CA certificate
 * @throws IllegalArgumentException if not a CA certificate
 */
public void setCaCertificate(X509Certificate cert){
  if (cert != null) {
    if (cert.getBasicConstraints() >= 0) {
      mCaCert=cert;
    }
 else {
      throw new IllegalArgumentException("String_Node_Str");
    }
  }
 else {
    mCaCert=null;
  }
}
Program: 2221
Project: 2221
Buggy source:
private String removeDoubleQuotes(String string){
  int length=string.length();
  if ((length > 1) && (string.charAt(0) == '"') && (string.charAt(length - 1) == '"')) {
    return string.substring(1,length - 1);
  }
  return string;
}

Fixed version (ground truth):
private String removeDoubleQuotes(String string){
  if (TextUtils.isEmpty(string))   return "String_Node_Str";
  int length=string.length();
  if ((length > 1) && (string.charAt(0) == '"') && (string.charAt(length - 1) == '"')) {
    return string.substring(1,length - 1);
  }
  return string;
}
Program: 2222
Project: 2222
Buggy source:
/** 
 * Specify a X.509 certificate that identifies the server. <p>A default name is automatically assigned to the certificate and used with this configuration. The framework takes care of installing the certificate when the config is saved and removing the certificate when the config is removed.
 * @param cert X.509 CA certificate
 * @throws IllegalArgumentException if not a CA certificate
 */
public void setCaCertificate(X509Certificate cert){
  if (cert.getBasicConstraints() >= 0) {
    mCaCert=cert;
  }
 else {
    throw new IllegalArgumentException("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Specify a X.509 certificate that identifies the server. <p>A default name is automatically assigned to the certificate and used with this configuration. The framework takes care of installing the certificate when the config is saved and removing the certificate when the config is removed.
 * @param cert X.509 CA certificate
 * @throws IllegalArgumentException if not a CA certificate
 */
public void setCaCertificate(X509Certificate cert){
  if (cert != null) {
    if (cert.getBasicConstraints() >= 0) {
      mCaCert=cert;
    }
 else {
      throw new IllegalArgumentException("String_Node_Str");
    }
  }
 else {
    mCaCert=null;
  }
}
Program: 2223
Project: 2223
Buggy source:
private String removeDoubleQuotes(String string){
  int length=string.length();
  if ((length > 1) && (string.charAt(0) == '"') && (string.charAt(length - 1) == '"')) {
    return string.substring(1,length - 1);
  }
  return string;
}

Fixed version (ground truth):
private String removeDoubleQuotes(String string){
  if (TextUtils.isEmpty(string))   return "String_Node_Str";
  int length=string.length();
  if ((length > 1) && (string.charAt(0) == '"') && (string.charAt(length - 1) == '"')) {
    return string.substring(1,length - 1);
  }
  return string;
}
Program: 2224
Project: 2224
Buggy source:
/** 
 * Specify a X.509 certificate that identifies the server. <p>A default name is automatically assigned to the certificate and used with this configuration. The framework takes care of installing the certificate when the config is saved and removing the certificate when the config is removed.
 * @param cert X.509 CA certificate
 * @throws IllegalArgumentException if not a CA certificate
 */
public void setCaCertificate(X509Certificate cert){
  if (cert.getBasicConstraints() >= 0) {
    mCaCert=cert;
  }
 else {
    throw new IllegalArgumentException("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Specify a X.509 certificate that identifies the server. <p>A default name is automatically assigned to the certificate and used with this configuration. The framework takes care of installing the certificate when the config is saved and removing the certificate when the config is removed.
 * @param cert X.509 CA certificate
 * @throws IllegalArgumentException if not a CA certificate
 */
public void setCaCertificate(X509Certificate cert){
  if (cert != null) {
    if (cert.getBasicConstraints() >= 0) {
      mCaCert=cert;
    }
 else {
      throw new IllegalArgumentException("String_Node_Str");
    }
  }
 else {
    mCaCert=null;
  }
}
Program: 2225
Project: 2225
Buggy source:
private String removeDoubleQuotes(String string){
  int length=string.length();
  if ((length > 1) && (string.charAt(0) == '"') && (string.charAt(length - 1) == '"')) {
    return string.substring(1,length - 1);
  }
  return string;
}

Fixed version (ground truth):
private String removeDoubleQuotes(String string){
  if (TextUtils.isEmpty(string))   return "String_Node_Str";
  int length=string.length();
  if ((length > 1) && (string.charAt(0) == '"') && (string.charAt(length - 1) == '"')) {
    return string.substring(1,length - 1);
  }
  return string;
}
Program: 2226
Project: 2226
Buggy source:
/** 
 * Specify a X.509 certificate that identifies the server. <p>A default name is automatically assigned to the certificate and used with this configuration. The framework takes care of installing the certificate when the config is saved and removing the certificate when the config is removed.
 * @param cert X.509 CA certificate
 * @throws IllegalArgumentException if not a CA certificate
 */
public void setCaCertificate(X509Certificate cert){
  if (cert.getBasicConstraints() >= 0) {
    mCaCert=cert;
  }
 else {
    throw new IllegalArgumentException("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Specify a X.509 certificate that identifies the server. <p>A default name is automatically assigned to the certificate and used with this configuration. The framework takes care of installing the certificate when the config is saved and removing the certificate when the config is removed.
 * @param cert X.509 CA certificate
 * @throws IllegalArgumentException if not a CA certificate
 */
public void setCaCertificate(X509Certificate cert){
  if (cert != null) {
    if (cert.getBasicConstraints() >= 0) {
      mCaCert=cert;
    }
 else {
      throw new IllegalArgumentException("String_Node_Str");
    }
  }
 else {
    mCaCert=null;
  }
}
Program: 2227
Project: 2227
Buggy source:
private String removeDoubleQuotes(String string){
  int length=string.length();
  if ((length > 1) && (string.charAt(0) == '"') && (string.charAt(length - 1) == '"')) {
    return string.substring(1,length - 1);
  }
  return string;
}

Fixed version (ground truth):
private String removeDoubleQuotes(String string){
  if (TextUtils.isEmpty(string))   return "String_Node_Str";
  int length=string.length();
  if ((length > 1) && (string.charAt(0) == '"') && (string.charAt(length - 1) == '"')) {
    return string.substring(1,length - 1);
  }
  return string;
}
Program: 2228
Project: 2228
Buggy source:
private boolean verifyPreloadConfig(int changingConfigurations,int resourceId,String name){
  if (((changingConfigurations & ~(ActivityInfo.CONFIG_FONT_SCALE | ActivityInfo.CONFIG_DENSITY)) & VARYING_CONFIGS) != 0) {
    String resName;
    try {
      resName=getResourceName(resourceId);
    }
 catch (    NotFoundException e) {
      resName="String_Node_Str";
    }
    Log.w(TAG,"String_Node_Str" + name + "String_Node_Str"+ Integer.toHexString(resourceId)+ "String_Node_Str"+ resName+ "String_Node_Str");
    return false;
  }
  return true;
}

Fixed version (ground truth):
private boolean verifyPreloadConfig(int changingConfigurations,int resourceId,String name){
  if (((changingConfigurations & ~(ActivityInfo.CONFIG_FONT_SCALE | ActivityInfo.CONFIG_DENSITY)) & VARYING_CONFIGS) != 0) {
    String resName;
    try {
      resName=getResourceName(resourceId);
    }
 catch (    NotFoundException e) {
      resName="String_Node_Str";
    }
    Log.w(TAG,"String_Node_Str" + name + "String_Node_Str"+ Integer.toHexString(resourceId)+ "String_Node_Str"+ resName+ "String_Node_Str");
    return false;
  }
  if (TRACE_FOR_PRELOAD) {
    String resName;
    try {
      resName=getResourceName(resourceId);
    }
 catch (    NotFoundException e) {
      resName="String_Node_Str";
    }
    Log.w(TAG,"String_Node_Str" + name + "String_Node_Str"+ Integer.toHexString(resourceId)+ "String_Node_Str"+ resName+ "String_Node_Str");
  }
  return true;
}
Program: 2230
Project: 2230
Buggy source:
/** 
 * Resolve padding depending on layout direction.
 * @hide
 */
public void resolvePadding(){
  if (!isRtlCompatibilityMode()) {
    int resolvedLayoutDirection=getLayoutDirection();
    mUserPaddingLeft=mUserPaddingLeftInitial;
    mUserPaddingRight=mUserPaddingRightInitial;
switch (resolvedLayoutDirection) {
case LAYOUT_DIRECTION_RTL:
      if (mUserPaddingStart != UNDEFINED_PADDING) {
        mUserPaddingRight=mUserPaddingStart;
      }
    if (mUserPaddingEnd != UNDEFINED_PADDING) {
      mUserPaddingLeft=mUserPaddingEnd;
    }
  break;
case LAYOUT_DIRECTION_LTR:
default :
if (mUserPaddingStart != UNDEFINED_PADDING) {
  mUserPaddingLeft=mUserPaddingStart;
}
if (mUserPaddingEnd != UNDEFINED_PADDING) {
mUserPaddingRight=mUserPaddingEnd;
}
}
mUserPaddingBottom=(mUserPaddingBottom >= 0) ? mUserPaddingBottom : mPaddingBottom;
internalSetPadding(mUserPaddingLeft,mPaddingTop,mUserPaddingRight,mUserPaddingBottom);
onRtlPropertiesChanged(resolvedLayoutDirection);
}
mPrivateFlags2|=PFLAG2_PADDING_RESOLVED;
}

Fixed version (ground truth):
/** 
 * Resolve padding depending on layout direction.
 * @hide
 */
public void resolvePadding(){
  if (!isRtlCompatibilityMode()) {
    int resolvedLayoutDirection=getLayoutDirection();
switch (resolvedLayoutDirection) {
case LAYOUT_DIRECTION_RTL:
      if (mUserPaddingStart != UNDEFINED_PADDING) {
        mUserPaddingRight=mUserPaddingStart;
      }
 else {
        mUserPaddingRight=mUserPaddingRightInitial;
      }
    if (mUserPaddingEnd != UNDEFINED_PADDING) {
      mUserPaddingLeft=mUserPaddingEnd;
    }
 else {
      mUserPaddingLeft=mUserPaddingLeftInitial;
    }
  break;
case LAYOUT_DIRECTION_LTR:
default :
if (mUserPaddingStart != UNDEFINED_PADDING) {
  mUserPaddingLeft=mUserPaddingStart;
}
 else {
  mUserPaddingLeft=mUserPaddingLeftInitial;
}
if (mUserPaddingEnd != UNDEFINED_PADDING) {
mUserPaddingRight=mUserPaddingEnd;
}
 else {
mUserPaddingRight=mUserPaddingRightInitial;
}
}
mUserPaddingBottom=(mUserPaddingBottom >= 0) ? mUserPaddingBottom : mPaddingBottom;
internalSetPadding(mUserPaddingLeft,mPaddingTop,mUserPaddingRight,mUserPaddingBottom);
onRtlPropertiesChanged(resolvedLayoutDirection);
}
mPrivateFlags2|=PFLAG2_PADDING_RESOLVED;
}
Program: 2231
Project: 2231
Buggy source:
/** 
 * Resolve padding depending on layout direction.
 * @hide
 */
public void resolvePadding(){
  if (!isRtlCompatibilityMode()) {
    int resolvedLayoutDirection=getLayoutDirection();
    mUserPaddingLeft=mUserPaddingLeftInitial;
    mUserPaddingRight=mUserPaddingRightInitial;
switch (resolvedLayoutDirection) {
case LAYOUT_DIRECTION_RTL:
      if (mUserPaddingStart != UNDEFINED_PADDING) {
        mUserPaddingRight=mUserPaddingStart;
      }
    if (mUserPaddingEnd != UNDEFINED_PADDING) {
      mUserPaddingLeft=mUserPaddingEnd;
    }
  break;
case LAYOUT_DIRECTION_LTR:
default :
if (mUserPaddingStart != UNDEFINED_PADDING) {
  mUserPaddingLeft=mUserPaddingStart;
}
if (mUserPaddingEnd != UNDEFINED_PADDING) {
mUserPaddingRight=mUserPaddingEnd;
}
}
mUserPaddingBottom=(mUserPaddingBottom >= 0) ? mUserPaddingBottom : mPaddingBottom;
internalSetPadding(mUserPaddingLeft,mPaddingTop,mUserPaddingRight,mUserPaddingBottom);
onRtlPropertiesChanged(resolvedLayoutDirection);
}
mPrivateFlags2|=PFLAG2_PADDING_RESOLVED;
}

Fixed version (ground truth):
/** 
 * Resolve padding depending on layout direction.
 * @hide
 */
public void resolvePadding(){
  if (!isRtlCompatibilityMode()) {
    int resolvedLayoutDirection=getLayoutDirection();
switch (resolvedLayoutDirection) {
case LAYOUT_DIRECTION_RTL:
      if (mUserPaddingStart != UNDEFINED_PADDING) {
        mUserPaddingRight=mUserPaddingStart;
      }
 else {
        mUserPaddingRight=mUserPaddingRightInitial;
      }
    if (mUserPaddingEnd != UNDEFINED_PADDING) {
      mUserPaddingLeft=mUserPaddingEnd;
    }
 else {
      mUserPaddingLeft=mUserPaddingLeftInitial;
    }
  break;
case LAYOUT_DIRECTION_LTR:
default :
if (mUserPaddingStart != UNDEFINED_PADDING) {
  mUserPaddingLeft=mUserPaddingStart;
}
 else {
  mUserPaddingLeft=mUserPaddingLeftInitial;
}
if (mUserPaddingEnd != UNDEFINED_PADDING) {
mUserPaddingRight=mUserPaddingEnd;
}
 else {
mUserPaddingRight=mUserPaddingRightInitial;
}
}
mUserPaddingBottom=(mUserPaddingBottom >= 0) ? mUserPaddingBottom : mPaddingBottom;
internalSetPadding(mUserPaddingLeft,mPaddingTop,mUserPaddingRight,mUserPaddingBottom);
onRtlPropertiesChanged(resolvedLayoutDirection);
}
mPrivateFlags2|=PFLAG2_PADDING_RESOLVED;
}
Program: 2232
Project: 2232
Buggy source:
/** 
 * Resolve padding depending on layout direction.
 * @hide
 */
public void resolvePadding(){
  if (!isRtlCompatibilityMode()) {
    int resolvedLayoutDirection=getLayoutDirection();
    mUserPaddingLeft=mUserPaddingLeftInitial;
    mUserPaddingRight=mUserPaddingRightInitial;
switch (resolvedLayoutDirection) {
case LAYOUT_DIRECTION_RTL:
      if (mUserPaddingStart != UNDEFINED_PADDING) {
        mUserPaddingRight=mUserPaddingStart;
      }
    if (mUserPaddingEnd != UNDEFINED_PADDING) {
      mUserPaddingLeft=mUserPaddingEnd;
    }
  break;
case LAYOUT_DIRECTION_LTR:
default :
if (mUserPaddingStart != UNDEFINED_PADDING) {
  mUserPaddingLeft=mUserPaddingStart;
}
if (mUserPaddingEnd != UNDEFINED_PADDING) {
mUserPaddingRight=mUserPaddingEnd;
}
}
mUserPaddingBottom=(mUserPaddingBottom >= 0) ? mUserPaddingBottom : mPaddingBottom;
internalSetPadding(mUserPaddingLeft,mPaddingTop,mUserPaddingRight,mUserPaddingBottom);
onRtlPropertiesChanged(resolvedLayoutDirection);
}
mPrivateFlags2|=PFLAG2_PADDING_RESOLVED;
}

Fixed version (ground truth):
/** 
 * Resolve padding depending on layout direction.
 * @hide
 */
public void resolvePadding(){
  if (!isRtlCompatibilityMode()) {
    int resolvedLayoutDirection=getLayoutDirection();
switch (resolvedLayoutDirection) {
case LAYOUT_DIRECTION_RTL:
      if (mUserPaddingStart != UNDEFINED_PADDING) {
        mUserPaddingRight=mUserPaddingStart;
      }
 else {
        mUserPaddingRight=mUserPaddingRightInitial;
      }
    if (mUserPaddingEnd != UNDEFINED_PADDING) {
      mUserPaddingLeft=mUserPaddingEnd;
    }
 else {
      mUserPaddingLeft=mUserPaddingLeftInitial;
    }
  break;
case LAYOUT_DIRECTION_LTR:
default :
if (mUserPaddingStart != UNDEFINED_PADDING) {
  mUserPaddingLeft=mUserPaddingStart;
}
 else {
  mUserPaddingLeft=mUserPaddingLeftInitial;
}
if (mUserPaddingEnd != UNDEFINED_PADDING) {
mUserPaddingRight=mUserPaddingEnd;
}
 else {
mUserPaddingRight=mUserPaddingRightInitial;
}
}
mUserPaddingBottom=(mUserPaddingBottom >= 0) ? mUserPaddingBottom : mPaddingBottom;
internalSetPadding(mUserPaddingLeft,mPaddingTop,mUserPaddingRight,mUserPaddingBottom);
onRtlPropertiesChanged(resolvedLayoutDirection);
}
mPrivateFlags2|=PFLAG2_PADDING_RESOLVED;
}
Program: 2233
Project: 2233
Buggy source:
/** 
 * Resolve padding depending on layout direction.
 * @hide
 */
public void resolvePadding(){
  if (!isRtlCompatibilityMode()) {
    int resolvedLayoutDirection=getLayoutDirection();
    mUserPaddingLeft=mUserPaddingLeftInitial;
    mUserPaddingRight=mUserPaddingRightInitial;
switch (resolvedLayoutDirection) {
case LAYOUT_DIRECTION_RTL:
      if (mUserPaddingStart != UNDEFINED_PADDING) {
        mUserPaddingRight=mUserPaddingStart;
      }
    if (mUserPaddingEnd != UNDEFINED_PADDING) {
      mUserPaddingLeft=mUserPaddingEnd;
    }
  break;
case LAYOUT_DIRECTION_LTR:
default :
if (mUserPaddingStart != UNDEFINED_PADDING) {
  mUserPaddingLeft=mUserPaddingStart;
}
if (mUserPaddingEnd != UNDEFINED_PADDING) {
mUserPaddingRight=mUserPaddingEnd;
}
}
mUserPaddingBottom=(mUserPaddingBottom >= 0) ? mUserPaddingBottom : mPaddingBottom;
internalSetPadding(mUserPaddingLeft,mPaddingTop,mUserPaddingRight,mUserPaddingBottom);
onRtlPropertiesChanged(resolvedLayoutDirection);
}
mPrivateFlags2|=PFLAG2_PADDING_RESOLVED;
}

Fixed version (ground truth):
/** 
 * Resolve padding depending on layout direction.
 * @hide
 */
public void resolvePadding(){
  if (!isRtlCompatibilityMode()) {
    int resolvedLayoutDirection=getLayoutDirection();
switch (resolvedLayoutDirection) {
case LAYOUT_DIRECTION_RTL:
      if (mUserPaddingStart != UNDEFINED_PADDING) {
        mUserPaddingRight=mUserPaddingStart;
      }
 else {
        mUserPaddingRight=mUserPaddingRightInitial;
      }
    if (mUserPaddingEnd != UNDEFINED_PADDING) {
      mUserPaddingLeft=mUserPaddingEnd;
    }
 else {
      mUserPaddingLeft=mUserPaddingLeftInitial;
    }
  break;
case LAYOUT_DIRECTION_LTR:
default :
if (mUserPaddingStart != UNDEFINED_PADDING) {
  mUserPaddingLeft=mUserPaddingStart;
}
 else {
  mUserPaddingLeft=mUserPaddingLeftInitial;
}
if (mUserPaddingEnd != UNDEFINED_PADDING) {
mUserPaddingRight=mUserPaddingEnd;
}
 else {
mUserPaddingRight=mUserPaddingRightInitial;
}
}
mUserPaddingBottom=(mUserPaddingBottom >= 0) ? mUserPaddingBottom : mPaddingBottom;
internalSetPadding(mUserPaddingLeft,mPaddingTop,mUserPaddingRight,mUserPaddingBottom);
onRtlPropertiesChanged(resolvedLayoutDirection);
}
mPrivateFlags2|=PFLAG2_PADDING_RESOLVED;
}
Program: 2234
Project: 2234
Buggy source:
private boolean verifyPreloadConfig(int changingConfigurations,int resourceId,String name){
  if (((changingConfigurations & ~(ActivityInfo.CONFIG_FONT_SCALE | ActivityInfo.CONFIG_DENSITY)) & VARYING_CONFIGS) != 0) {
    String resName;
    try {
      resName=getResourceName(resourceId);
    }
 catch (    NotFoundException e) {
      resName="String_Node_Str";
    }
    Log.w(TAG,"String_Node_Str" + name + "String_Node_Str"+ Integer.toHexString(resourceId)+ "String_Node_Str"+ resName+ "String_Node_Str");
    return false;
  }
  return true;
}

Fixed version (ground truth):
private boolean verifyPreloadConfig(int changingConfigurations,int resourceId,String name){
  if (((changingConfigurations & ~(ActivityInfo.CONFIG_FONT_SCALE | ActivityInfo.CONFIG_DENSITY)) & VARYING_CONFIGS) != 0) {
    String resName;
    try {
      resName=getResourceName(resourceId);
    }
 catch (    NotFoundException e) {
      resName="String_Node_Str";
    }
    Log.w(TAG,"String_Node_Str" + name + "String_Node_Str"+ Integer.toHexString(resourceId)+ "String_Node_Str"+ resName+ "String_Node_Str");
    return false;
  }
  if (TRACE_FOR_PRELOAD) {
    String resName;
    try {
      resName=getResourceName(resourceId);
    }
 catch (    NotFoundException e) {
      resName="String_Node_Str";
    }
    Log.w(TAG,"String_Node_Str" + name + "String_Node_Str"+ Integer.toHexString(resourceId)+ "String_Node_Str"+ resName+ "String_Node_Str");
  }
  return true;
}
Program: 2236
Project: 2236
Buggy source:
/** 
 * Handle a request by the system to show the soft input area.
 */
public void showSoftInput(int flags,ResultReceiver resultReceiver){
  if (DEBUG)   Log.v(TAG,"String_Node_Str");
  boolean wasVis=isInputViewShown();
  mShowInputFlags=0;
  if (onShowInputRequested(flags,false)) {
    try {
      showWindow(true);
    }
 catch (    BadTokenException e) {
      if (DEBUG)       Log.v(TAG,"String_Node_Str");
      mWindowVisible=false;
      mWindowAdded=false;
    }
  }
  boolean showing=onEvaluateInputViewShown();
  mImm.setImeWindowStatus(mToken,IME_ACTIVE | (showing ? IME_VISIBLE : 0),mBackDisposition);
  if (resultReceiver != null) {
    resultReceiver.send(wasVis != isInputViewShown() ? InputMethodManager.RESULT_SHOWN : (wasVis ? InputMethodManager.RESULT_UNCHANGED_SHOWN : InputMethodManager.RESULT_UNCHANGED_HIDDEN),null);
  }
}

Fixed version (ground truth):
/** 
 * Handle a request by the system to show the soft input area.
 */
public void showSoftInput(int flags,ResultReceiver resultReceiver){
  if (DEBUG)   Log.v(TAG,"String_Node_Str");
  boolean wasVis=isInputViewShown();
  mShowInputFlags=0;
  if (onShowInputRequested(flags,false)) {
    try {
      showWindow(true);
    }
 catch (    BadTokenException e) {
      if (DEBUG)       Log.v(TAG,"String_Node_Str");
      mWindowVisible=false;
      mWindowAdded=false;
    }
  }
  boolean showing=isInputViewShown();
  mImm.setImeWindowStatus(mToken,IME_ACTIVE | (showing ? IME_VISIBLE : 0),mBackDisposition);
  if (resultReceiver != null) {
    resultReceiver.send(wasVis != isInputViewShown() ? InputMethodManager.RESULT_SHOWN : (wasVis ? InputMethodManager.RESULT_UNCHANGED_SHOWN : InputMethodManager.RESULT_UNCHANGED_HIDDEN),null);
  }
}
Program: 2238
Project: 2238
Buggy source:
/** 
 * Handle a request by the system to show the soft input area.
 */
public void showSoftInput(int flags,ResultReceiver resultReceiver){
  if (DEBUG)   Log.v(TAG,"String_Node_Str");
  boolean wasVis=isInputViewShown();
  mShowInputFlags=0;
  if (onShowInputRequested(flags,false)) {
    try {
      showWindow(true);
    }
 catch (    BadTokenException e) {
      if (DEBUG)       Log.v(TAG,"String_Node_Str");
      mWindowVisible=false;
      mWindowAdded=false;
    }
  }
  boolean showing=onEvaluateInputViewShown();
  mImm.setImeWindowStatus(mToken,IME_ACTIVE | (showing ? IME_VISIBLE : 0),mBackDisposition);
  if (resultReceiver != null) {
    resultReceiver.send(wasVis != isInputViewShown() ? InputMethodManager.RESULT_SHOWN : (wasVis ? InputMethodManager.RESULT_UNCHANGED_SHOWN : InputMethodManager.RESULT_UNCHANGED_HIDDEN),null);
  }
}

Fixed version (ground truth):
/** 
 * Handle a request by the system to show the soft input area.
 */
public void showSoftInput(int flags,ResultReceiver resultReceiver){
  if (DEBUG)   Log.v(TAG,"String_Node_Str");
  boolean wasVis=isInputViewShown();
  mShowInputFlags=0;
  if (onShowInputRequested(flags,false)) {
    try {
      showWindow(true);
    }
 catch (    BadTokenException e) {
      if (DEBUG)       Log.v(TAG,"String_Node_Str");
      mWindowVisible=false;
      mWindowAdded=false;
    }
  }
  boolean showing=isInputViewShown();
  mImm.setImeWindowStatus(mToken,IME_ACTIVE | (showing ? IME_VISIBLE : 0),mBackDisposition);
  if (resultReceiver != null) {
    resultReceiver.send(wasVis != isInputViewShown() ? InputMethodManager.RESULT_SHOWN : (wasVis ? InputMethodManager.RESULT_UNCHANGED_SHOWN : InputMethodManager.RESULT_UNCHANGED_HIDDEN),null);
  }
}
Program: 2240
Project: 2240
Buggy source:
/** 
 * Handle a request by the system to show the soft input area.
 */
public void showSoftInput(int flags,ResultReceiver resultReceiver){
  if (DEBUG)   Log.v(TAG,"String_Node_Str");
  boolean wasVis=isInputViewShown();
  mShowInputFlags=0;
  if (onShowInputRequested(flags,false)) {
    showWindow(true);
  }
  boolean showing=onEvaluateInputViewShown();
  mImm.setImeWindowStatus(mToken,IME_ACTIVE | (showing ? IME_VISIBLE : 0),mBackDisposition);
  if (resultReceiver != null) {
    resultReceiver.send(wasVis != isInputViewShown() ? InputMethodManager.RESULT_SHOWN : (wasVis ? InputMethodManager.RESULT_UNCHANGED_SHOWN : InputMethodManager.RESULT_UNCHANGED_HIDDEN),null);
  }
}

Fixed version (ground truth):
/** 
 * Handle a request by the system to show the soft input area.
 */
public void showSoftInput(int flags,ResultReceiver resultReceiver){
  if (DEBUG)   Log.v(TAG,"String_Node_Str");
  boolean wasVis=isInputViewShown();
  mShowInputFlags=0;
  if (onShowInputRequested(flags,false)) {
    showWindow(true);
  }
  boolean showing=isInputViewShown();
  mImm.setImeWindowStatus(mToken,IME_ACTIVE | (showing ? IME_VISIBLE : 0),mBackDisposition);
  if (resultReceiver != null) {
    resultReceiver.send(wasVis != isInputViewShown() ? InputMethodManager.RESULT_SHOWN : (wasVis ? InputMethodManager.RESULT_UNCHANGED_SHOWN : InputMethodManager.RESULT_UNCHANGED_HIDDEN),null);
  }
}
Program: 2242
Project: 2242
Buggy source:
@Override public void onCreate(Bundle icicle){
  super.onCreate(icicle);
  mDisconnectedReceiver=new UsbDisconnectedReceiver(this);
  Intent intent=getIntent();
  String fingerprints=intent.getStringExtra("String_Node_Str");
  mKey=intent.getStringExtra("String_Node_Str");
  if (fingerprints == null || mKey == null) {
    finish();
    return;
  }
  final AlertController.AlertParams ap=mAlertParams;
  ap.mTitle=getString(R.string.usb_debugging_title);
  ap.mIconId=com.android.internal.R.drawable.ic_dialog_usb;
  ap.mMessage=getString(R.string.usb_debugging_message,fingerprints);
  ap.mPositiveButtonText=getString(android.R.string.ok);
  ap.mNegativeButtonText=getString(android.R.string.cancel);
  ap.mPositiveButtonListener=this;
  ap.mNegativeButtonListener=this;
  LayoutInflater inflater=LayoutInflater.from(ap.mContext);
  View checkbox=inflater.inflate(com.android.internal.R.layout.always_use_checkbox,null);
  mAlwaysAllow=(CheckBox)checkbox.findViewById(com.android.internal.R.id.alwaysUse);
  mAlwaysAllow.setText(getString(R.string.usb_debugging_always));
  ap.mView=checkbox;
  setupAlert();
}

Fixed version (ground truth):
@Override public void onCreate(Bundle icicle){
  super.onCreate(icicle);
  if (SystemProperties.getInt("String_Node_Str",0) == 0) {
    mDisconnectedReceiver=new UsbDisconnectedReceiver(this);
  }
  Intent intent=getIntent();
  String fingerprints=intent.getStringExtra("String_Node_Str");
  mKey=intent.getStringExtra("String_Node_Str");
  if (fingerprints == null || mKey == null) {
    finish();
    return;
  }
  final AlertController.AlertParams ap=mAlertParams;
  ap.mTitle=getString(R.string.usb_debugging_title);
  ap.mIconId=com.android.internal.R.drawable.ic_dialog_usb;
  ap.mMessage=getString(R.string.usb_debugging_message,fingerprints);
  ap.mPositiveButtonText=getString(android.R.string.ok);
  ap.mNegativeButtonText=getString(android.R.string.cancel);
  ap.mPositiveButtonListener=this;
  ap.mNegativeButtonListener=this;
  LayoutInflater inflater=LayoutInflater.from(ap.mContext);
  View checkbox=inflater.inflate(com.android.internal.R.layout.always_use_checkbox,null);
  mAlwaysAllow=(CheckBox)checkbox.findViewById(com.android.internal.R.id.alwaysUse);
  mAlwaysAllow.setText(getString(R.string.usb_debugging_always));
  ap.mView=checkbox;
  setupAlert();
}
Program: 2243
Project: 2243
Buggy source:
@Override public void onCreate(Bundle icicle){
  super.onCreate(icicle);
  mDisconnectedReceiver=new UsbDisconnectedReceiver(this);
  Intent intent=getIntent();
  String fingerprints=intent.getStringExtra("String_Node_Str");
  mKey=intent.getStringExtra("String_Node_Str");
  if (fingerprints == null || mKey == null) {
    finish();
    return;
  }
  final AlertController.AlertParams ap=mAlertParams;
  ap.mTitle=getString(R.string.usb_debugging_title);
  ap.mIconId=com.android.internal.R.drawable.ic_dialog_usb;
  ap.mMessage=getString(R.string.usb_debugging_message,fingerprints);
  ap.mPositiveButtonText=getString(android.R.string.ok);
  ap.mNegativeButtonText=getString(android.R.string.cancel);
  ap.mPositiveButtonListener=this;
  ap.mNegativeButtonListener=this;
  LayoutInflater inflater=LayoutInflater.from(ap.mContext);
  View checkbox=inflater.inflate(com.android.internal.R.layout.always_use_checkbox,null);
  mAlwaysAllow=(CheckBox)checkbox.findViewById(com.android.internal.R.id.alwaysUse);
  mAlwaysAllow.setText(getString(R.string.usb_debugging_always));
  ap.mView=checkbox;
  setupAlert();
}

Fixed version (ground truth):
@Override public void onCreate(Bundle icicle){
  super.onCreate(icicle);
  if (SystemProperties.getInt("String_Node_Str",0) == 0) {
    mDisconnectedReceiver=new UsbDisconnectedReceiver(this);
  }
  Intent intent=getIntent();
  String fingerprints=intent.getStringExtra("String_Node_Str");
  mKey=intent.getStringExtra("String_Node_Str");
  if (fingerprints == null || mKey == null) {
    finish();
    return;
  }
  final AlertController.AlertParams ap=mAlertParams;
  ap.mTitle=getString(R.string.usb_debugging_title);
  ap.mIconId=com.android.internal.R.drawable.ic_dialog_usb;
  ap.mMessage=getString(R.string.usb_debugging_message,fingerprints);
  ap.mPositiveButtonText=getString(android.R.string.ok);
  ap.mNegativeButtonText=getString(android.R.string.cancel);
  ap.mPositiveButtonListener=this;
  ap.mNegativeButtonListener=this;
  LayoutInflater inflater=LayoutInflater.from(ap.mContext);
  View checkbox=inflater.inflate(com.android.internal.R.layout.always_use_checkbox,null);
  mAlwaysAllow=(CheckBox)checkbox.findViewById(com.android.internal.R.id.alwaysUse);
  mAlwaysAllow.setText(getString(R.string.usb_debugging_always));
  ap.mView=checkbox;
  setupAlert();
}
Program: 2245
Project: 2245
Buggy source:
@Override public void onCreate(Bundle icicle){
  super.onCreate(icicle);
  mDisconnectedReceiver=new UsbDisconnectedReceiver(this);
  Intent intent=getIntent();
  String fingerprints=intent.getStringExtra("String_Node_Str");
  mKey=intent.getStringExtra("String_Node_Str");
  if (fingerprints == null || mKey == null) {
    finish();
    return;
  }
  final AlertController.AlertParams ap=mAlertParams;
  ap.mTitle=getString(R.string.usb_debugging_title);
  ap.mIconId=com.android.internal.R.drawable.ic_dialog_usb;
  ap.mMessage=getString(R.string.usb_debugging_message,fingerprints);
  ap.mPositiveButtonText=getString(android.R.string.ok);
  ap.mNegativeButtonText=getString(android.R.string.cancel);
  ap.mPositiveButtonListener=this;
  ap.mNegativeButtonListener=this;
  LayoutInflater inflater=LayoutInflater.from(ap.mContext);
  View checkbox=inflater.inflate(com.android.internal.R.layout.always_use_checkbox,null);
  mAlwaysAllow=(CheckBox)checkbox.findViewById(com.android.internal.R.id.alwaysUse);
  mAlwaysAllow.setText(getString(R.string.usb_debugging_always));
  ap.mView=checkbox;
  setupAlert();
}

Fixed version (ground truth):
@Override public void onCreate(Bundle icicle){
  super.onCreate(icicle);
  if (SystemProperties.getInt("String_Node_Str",0) == 0) {
    mDisconnectedReceiver=new UsbDisconnectedReceiver(this);
  }
  Intent intent=getIntent();
  String fingerprints=intent.getStringExtra("String_Node_Str");
  mKey=intent.getStringExtra("String_Node_Str");
  if (fingerprints == null || mKey == null) {
    finish();
    return;
  }
  final AlertController.AlertParams ap=mAlertParams;
  ap.mTitle=getString(R.string.usb_debugging_title);
  ap.mIconId=com.android.internal.R.drawable.ic_dialog_usb;
  ap.mMessage=getString(R.string.usb_debugging_message,fingerprints);
  ap.mPositiveButtonText=getString(android.R.string.ok);
  ap.mNegativeButtonText=getString(android.R.string.cancel);
  ap.mPositiveButtonListener=this;
  ap.mNegativeButtonListener=this;
  LayoutInflater inflater=LayoutInflater.from(ap.mContext);
  View checkbox=inflater.inflate(com.android.internal.R.layout.always_use_checkbox,null);
  mAlwaysAllow=(CheckBox)checkbox.findViewById(com.android.internal.R.id.alwaysUse);
  mAlwaysAllow.setText(getString(R.string.usb_debugging_always));
  ap.mView=checkbox;
  setupAlert();
}