package seedu.address.logic.commands;

import java.util.List;
import java.util.Set;

import seedu.address.model.task.ReadOnlyTask;

/**
 * Finds and lists all persons in address book whose name contains any of the argument keywords.
 * Keyword matching is case sensitive.
 */
public class FindCommand extends Command {

    public static final String COMMAND_WORD = "find";

    public static final String MESSAGE_USAGE = COMMAND_WORD + ": Finds all persons whose names contain any of "
            + "the specified keywords (case-sensitive) and displays them as a list with index numbers.\n"
            + "Parameters: KEYWORD [MORE_KEYWORDS]...\n"
            + "Example: " + COMMAND_WORD + " alice bob charlie";

    private final String keywords;

    public FindCommand(String keywords) {
        this.keywords = keywords;
    }

    @Override
    public CommandResult execute() {
/*        
        List<ReadOnlyTask> matchingTasks = model.getFilteredTaskListFromTaskName(keywords);
        Set<String> keywordList = model.getKeywordsFromList(matchingTasks);
        model.updateFilteredPersonList(keywordList);
        //model.updateFilteredPersonList(keywords);
        return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));
*/
        return null;
    }

}

package seedu.address.logic.commands;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

import seedu.address.commons.core.UnmodifiableObservableList;
import seedu.address.model.task.ReadOnlyTask;
import seedu.address.model.task.UniqueTaskList.PersonNotFoundException;

/**
 * Finds and lists all persons in address book whose name contains any of the argument keywords.
 * Keyword matching is case sensitive.
 */
public class FindCommand extends Command {

    public static final String COMMAND_WORD = "find";

    public static final String MESSAGE_USAGE = COMMAND_WORD + ": Finds all persons whose names contain any of "
            + "the specified keywords (case-sensitive) and displays them as a list with index numbers.\n"
            + "Parameters: KEYWORD [MORE_KEYWORDS]...\n"
            + "Example: " + COMMAND_WORD + " alice bob charlie";

    public static final String MESSAGE_FIND_TASK_FAILURE = "No such task was found.";
    private final String keywords;
    
    public FindCommand(String keywords) {
        this.keywords = keywords;
    }

    @Override
    public CommandResult execute() {
        Set<String> taskNameSet = new HashSet<String>();
        taskNameSet.add(keywords);
        model.updateFilteredPersonList(taskNameSet);
        UnmodifiableObservableList<ReadOnlyTask> matchingTasks = model.getFilteredPersonList();
        
        // No tasks match string
        if (matchingTasks.isEmpty()){
            model.updateFilteredListToShowAll();
            return new CommandResult(String.format(MESSAGE_FIND_TASK_FAILURE));
        }
        
        // One or more tasks match string
        else {
            Set<String> words = new HashSet<String>();
            words.add(keywords);
            model.updateFilteredPersonList(words);
            return new CommandResult(String.format(getMessageForPersonListShownSummary(model.getFilteredPersonList().size())));
        }
    }

}

Change FindCommand.java to search through tasks using keywords