// Path: app/src/main/java/io/rapidpro/surveyor/Logger.java
// public class Logger {
// 
//     private static final String TAG = "Surveyor";
// 
//     public static void e(String message, Throwable t) {
//         Log.e(TAG, message, t);
//     }
// 
//     public static void w(String message) {
//         Log.w(TAG, message);
//     }
// 
//     public static void d(String message) {
//         Log.d(TAG, message);
//     }
// }
// 
// Path: app/src/main/java/io/rapidpro/surveyor/utils/SurveyUtils.java
// public class SurveyUtils {
//     /**
//      * Creates a nested directory
//      *
//      * @param root    the root directory
//      * @param folders the nested directory names
//      * @return the directory
//      * @throws IOException if any directory couldn't be created
//      */
//     public static File mkdir(File root, String... folders) throws IOException {
//         File current = root;
//         for (String folder : folders) {
//             current = new File(current, folder);
// 
//             if (!current.exists() && !current.mkdirs()) {
//                 throw new IOException("Unable to create directory: " + current.getAbsolutePath());
//             }
//         }
//         return current;
//     }
// }


import org.apache.commons.io.FileUtils;
import org.apache.commons.io.filefilter.DirectoryFileFilter;
import java.io.File;
import java.io.FileFilter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import io.rapidpro.surveyor.Logger;
import io.rapidpro.surveyor.utils.SurveyUtils;
                completed.add(sub);
            }
        }
        return completed;
    }

    /**
     * Return the count of completed submissions across all flows for the given org
     *
     * @param org the org
     * @return the count of submissions
     */
    public int getCompletedCount(Org org) {
        return getCompleted(org).size();
    }

    /**
     * Return the count of completed submissions for the given flow in the given org
     *
     * @param org  the org
     * @param flow the flow
     * @return the count of submissions
     */
    public int getCompletedCount(Org org, Flow flow) {
        return getCompleted(org, flow).size();
    }

    /**
     * Clear all submissions
     */
// Path: app/src/main/java/io/rapidpro/surveyor/Logger.java
// public class Logger {
// 
//     private static final String TAG = "Surveyor";
// 
//     public static void e(String message, Throwable t) {
//         Log.e(TAG, message, t);
//     }
// 
//     public static void w(String message) {
//         Log.w(TAG, message);
//     }
// 
//     public static void d(String message) {
//         Log.d(TAG, message);
//     }
// }
// 
// Path: app/src/main/java/io/rapidpro/surveyor/utils/SurveyUtils.java
// public class SurveyUtils {
//     /**
//      * Creates a nested directory
//      *
//      * @param root    the root directory
//      * @param folders the nested directory names
//      * @return the directory
//      * @throws IOException if any directory couldn't be created
//      */
//     public static File mkdir(File root, String... folders) throws IOException {
//         File current = root;
//         for (String folder : folders) {
//             current = new File(current, folder);
// 
//             if (!current.exists() && !current.mkdirs()) {
//                 throw new IOException("Unable to create directory: " + current.getAbsolutePath());
//             }
//         }
//         return current;
//     }
// }


// Path: app/src/main/java/io/rapidpro/surveyor/data/SubmissionService.java
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.filefilter.DirectoryFileFilter;
import java.io.File;
import java.io.FileFilter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import io.rapidpro.surveyor.Logger;
import io.rapidpro.surveyor.utils.SurveyUtils;

                completed.add(sub);
            }
        }
        return completed;
    }

    /**
     * Return the count of completed submissions across all flows for the given org
     *
     * @param org the org
     * @return the count of submissions
     */
    public int getCompletedCount(Org org) {
        return getCompleted(org).size();
    }

    /**
     * Return the count of completed submissions for the given flow in the given org
     *
     * @param org  the org
     * @param flow the flow
     * @return the count of submissions
     */
    public int getCompletedCount(Org org, Flow flow) {
        return getCompleted(org, flow).size();
    }

    /**
     * Clear all submissions
     */
    public void clearAll() throws IOException {