Buggy code:
public class MainService extends Service { public static final String ACTION_MOUNT = "com.kokufu.android.apps.fusedroid.intent.action.MOUNT" ; public static final String ACTION_UMOUNT = "com.kokufu.android.apps.fusedroid.intent.action.UMOUNT" ; private static final String TAG = "MainService" ; private static final String MOUNT_COMMAND = "mount.fusedroid" ; private static final String MOUNT_COMMAND_ASSETS = ( ( Build . CPU_ABI ) + "//" ) + ( MainService . MOUNT_COMMAND ) ; private static final AtomicInteger sMountId = new AtomicInteger ( 1 ) ; private final Map < String , MainService . MountInfo > mMountInfoMap = new HashMap < String , MainService . MountInfo > ( ) ; private boolean sIsInitialized = false ; private File sMountCommandFile ; @ Override public IBinder onBind ( Intent intent ) { } @ Override public int onStartCommand ( Intent intent , int flags , int startId ) { String action = intent . getAction ( ) ; String targetDirPath = intent . getExtras ( ) . getString ( EXTRA_TARGET_DIR ) ; String mountPointDirPath = intent . getExtras ( ) . getString ( EXTRA_MOUNT_PINT_DIR ) ; boolean isWritable = intent . getExtras ( ) . getBoolean ( EXTRA_WRITABLE ) ; if ( MainService . ACTION_MOUNT . equals ( action ) ) { if ( ! ( mMountInfoMap . containsKey ( mountPointDirPath ) ) ) { MainService . MountInfo info = new MainService . MountInfo ( MainService . sMountId . getAndIncrement ( ) , targetDirPath , mountPointDirPath , isWritable ) ; new MainService . MountTask ( info ) . execute ( ) ; } else { Toast . makeText ( this , getString ( error_already_mounted ) , LENGTH_SHORT ) . show ( ) ; } } else if ( MainService . ACTION_UMOUNT . equals ( action ) ) { MainService . MountInfo info = mMountInfoMap . get ( mountPointDirPath ) ; if ( info == null ) { info = new MainService . MountInfo ( 0 , targetDirPath , mountPointDirPath , isWritable ) ; } new MainService . UmountTask ( info ) . execute ( ) ; } else { throw new IllegalArgumentException ( ( ( "Action<seq2seq4repair_space>" + action ) + "<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>supported." ) ) ; } <START_BUG> return super . onStartCommand ( intent , flags , startId ) ; <END_BUG> } private boolean initialize ( ) { } private static String readFirstLine ( File targetFile ) throws IOException { } private static void writeFirstLine ( File targetFile , String line ) throws IOException { } private void copyFileFromAssets ( String path , File targetFile ) throws IOException { } private static boolean mkdir ( File dir ) { } private static boolean rmdir ( File dir ) { } private static int execCommmandAsRoot ( String command ) throws IOException { } @ SuppressWarnings ( "deprecation" ) private Notification makeNotification ( String ticker , String title , String text , PendingIntent intent ) { } @ SuppressWarnings ( "deprecation" ) @ TargetApi ( VERSION_CODES . HONEYCOMB ) private Notification makeNotification11 ( String ticker , String title , String text , PendingIntent intent ) { } @ TargetApi ( VERSION_CODES . JELLY_BEAN ) private Notification makeNotification16 ( String ticker , String title , String text , PendingIntent intent ) { } private static class MountInfo { public final int mId ; public final String mTargetDirPath ; public final String mMountPintDirPath ; public final boolean mIsWritable ; public MountInfo ( int id , String targetDirPath , String mountPointDirPath , boolean isWritable ) { } } private class MountTask extends AsyncTask < Void , Void , Boolean > { private final MainService . MountInfo mInfo ; public MountTask ( MainService . MountInfo info ) { } @ Override protected Boolean doInBackground ( Void ... params ) { } protected void onPostExecute ( Boolean result ) { } } private class UmountTask extends AsyncTask < Void , Void , Boolean > { private final MainService . MountInfo mInfo ; public UmountTask ( MainService . MountInfo info ) { } @ Override protected Boolean doInBackground ( Void ... params ) { } protected void onPostExecute ( Boolean result ) { } } }

Fix:
return START_STICKY_COMPATIBILITY ;