Program: 2950
Project: 2950
Buggy source:
private static void wipeAssets(Uri uriBase,String authority,String[] rewriteStrings,String[] rewriteFiles){
  Cursor cursor=null;
  long _id=0;
  try {
    cursor=cr.query(uriBase,null,null,null,null);
    if (cursor != null && cursor.getCount() > 0) {
      cursor.moveToFirst();
      Log.d(ITCConstants.Log.ITC,"String_Node_Str" + cursor.getCount() + "String_Node_Str"+ uriBase.toString());
      while (!cursor.isAfterLast()) {
        _id=cursor.getLong(cursor.getColumnIndex("String_Node_Str"));
        ArrayList<ContentProviderOperation> cpo=new ArrayList<ContentProviderOperation>();
        for (        String s : rewriteStrings) {
          if (cursor.getString(cursor.getColumnIndex(s)) != null && cursor.getString(cursor.getColumnIndex(s)).length() > 0) {
            StringBuffer sb=new StringBuffer();
            for (            @SuppressWarnings("String_Node_Str") char c : cursor.getString(cursor.getColumnIndex(s)).toCharArray()) {
              sb.append(0);
            }
            cpo.add(ContentProviderOperation.newUpdate(ContentUris.withAppendedId(uriBase,_id)).withSelection(Data._ID + "String_Node_Str",new String[]{Integer.toString((int)_id)}).withValue(s,sb.toString()).build());
            Log.d(ITCConstants.Log.ITC,"String_Node_Str" + s + "String_Node_Str"+ cursor.getString(cursor.getColumnIndex(s))+ "String_Node_Str"+ s+ "String_Node_Str"+ sb.toString());
          }
        }
        if (rewriteFiles != null && rewriteFiles.length > 0) {
          for (          String s : rewriteFiles) {
            if (cursor.getString(cursor.getColumnIndex(s)) != null && cursor.getString(cursor.getColumnIndex(s)).length() > 0) {
              File f=new File(cursor.getString(cursor.getColumnIndex(s)));
              if (f.isFile())               rewriteAndDelete(f);
            }
          }
        }
        if (!cpo.isEmpty()) {
          try {
            cr.applyBatch(authority,cpo);
          }
 catch (          RemoteException e) {
            Log.d(ITCConstants.Log.ITC,"String_Node_Str" + e);
          }
catch (          OperationApplicationException e) {
            Log.d(ITCConstants.Log.ITC,"String_Node_Str" + e);
          }
catch (          UnsupportedOperationException e) {
            Log.d(ITCConstants.Log.ITC,"String_Node_Str" + e);
          }
          cpo.clear();
        }
        Log.d(ITCConstants.Log.ITC,"String_Node_Str" + ContentUris.withAppendedId(uriBase,_id).toString() + "String_Node_Str");
        try {
          cr.delete(ContentUris.withAppendedId(uriBase,_id),null,null);
        }
 catch (        UnsupportedOperationException e) {
          Log.d(ITCConstants.Log.ITC,"String_Node_Str" + e);
        }
        cursor.moveToNext();
      }
    }
    cursor.close();
  }
 catch (  NullPointerException npe) {
  }
}

Fixed version (ground truth):
private static void wipeAssets(Uri uriBase,String authority,String[] rewriteStrings,String[] rewriteFiles){
  Cursor cursor=null;
  long _id=0;
  try {
    cursor=cr.query(uriBase,null,null,null,null);
    if (cursor != null && cursor.getCount() > 0) {
      cursor.moveToFirst();
      Log.d(ITCConstants.Log.ITC,"String_Node_Str" + cursor.getCount() + "String_Node_Str"+ uriBase.toString());
      while (!cursor.isAfterLast()) {
        _id=cursor.getLong(cursor.getColumnIndex("String_Node_Str"));
        ArrayList<ContentProviderOperation> cpo=new ArrayList<ContentProviderOperation>();
        for (        String s : rewriteStrings) {
          if (cursor.getString(cursor.getColumnIndex(s)) != null && cursor.getString(cursor.getColumnIndex(s)).length() > 0) {
            StringBuffer sb=new StringBuffer();
            for (            @SuppressWarnings("String_Node_Str") char c : cursor.getString(cursor.getColumnIndex(s)).toCharArray()) {
              sb.append(0);
            }
            cpo.add(ContentProviderOperation.newUpdate(ContentUris.withAppendedId(uriBase,_id)).withSelection(Data._ID + "String_Node_Str",new String[]{Integer.toString((int)_id)}).withValue(s,sb.toString()).build());
            Log.d(ITCConstants.Log.ITC,"String_Node_Str" + s + "String_Node_Str"+ cursor.getString(cursor.getColumnIndex(s))+ "String_Node_Str"+ s+ "String_Node_Str"+ sb.toString());
          }
        }
        if (rewriteFiles != null && rewriteFiles.length > 0) {
          for (          String s : rewriteFiles) {
            if (cursor.getString(cursor.getColumnIndex(s)) != null && cursor.getString(cursor.getColumnIndex(s)).length() > 0) {
              File f=new File(cursor.getString(cursor.getColumnIndex(s)));
              if (f.isFile())               rewriteAndDelete(f);
            }
          }
        }
        if (!cpo.isEmpty()) {
          try {
            cr.applyBatch(authority,cpo);
          }
 catch (          RemoteException e) {
            Log.d(ITCConstants.Log.ITC,"String_Node_Str" + e);
          }
catch (          OperationApplicationException e) {
            Log.d(ITCConstants.Log.ITC,"String_Node_Str" + e);
          }
catch (          UnsupportedOperationException e) {
            Log.d(ITCConstants.Log.ITC,"String_Node_Str" + e);
          }
          cpo.clear();
        }
        Log.d(ITCConstants.Log.ITC,"String_Node_Str" + ContentUris.withAppendedId(uriBase,_id).toString() + "String_Node_Str");
        try {
          cr.delete(ContentUris.withAppendedId(uriBase,_id),null,null);
        }
 catch (        UnsupportedOperationException e) {
          Log.d(ITCConstants.Log.ITC,"String_Node_Str" + e);
          try {
            cr.delete(uriBase,Data._ID + "String_Node_Str",new String[]{Integer.toString((int)_id)});
          }
 catch (          UnsupportedOperationException e2) {
            Log.d(ITCConstants.Log.ITC,"String_Node_Str" + e2);
          }
        }
        cursor.moveToNext();
      }
    }
    cursor.close();
  }
 catch (  NullPointerException npe) {
  }
}