private ServerSideJob pickJob(final Communicator comm) {
        ServerSideJob result = null;

        // traverse job, check complexity and cancel time
        List<JobAction> actionList;
        Calendar cal;
        synchronized (jobQueue) {
            for (ServerSideJob job : jobQueue) {
                final int maxJobComplexity;
                if (jobComplexity.containsKey(comm)) {
                    maxJobComplexity = jobComplexity.get(comm);
                } else {
                    maxJobComplexity = JobConstants.DEFAULT_COMPLEXITY;
                }
                if (job.getComplexity() > maxJobComplexity) {
                    continue;
                }

                actionList = jobHistory.get(job);
                if (actionList != null) {
                    cal = lastCancelTime(actionList, comm);
                    if (cal != null) {
                        if ((Calendar.getInstance(Locale.getDefault()).getTimeInMillis() - cal.getTimeInMillis()) > Timeout.getTimeout(Timeout.TimeoutType.JOB_CHECK)) {
                            result = job;
                            break;
                        }
                    } else {
                        result = job;
                        break;
                    }
                } else {
                    result = job;
                    break;
                }
            }
        }

        return result;
    }