[Demonstration 1]

[Buggy Method]
private SessionTaxonomyActivity removeUnwantedFields(SessionTaxonomyActivity obj1, String depthLevel) {
    obj1.setScore(Math.round((double) (obj1.getScore() / obj1.getTotalAttemptedQuestions())));
    obj1.setTotalAttemptedQuestions(null);
    obj1.setSubjectId(null);
    obj1.setCourseId(null);
    obj1.setDomainId(null);
    if (obj1.getLearningTargetsId() != null && !obj1.getLearningTargetsId().equalsIgnoreCase(ApiConstants.NA)) {
        obj1.setStandardsId(null);
    } else {
        obj1.setLearningTargetsId(null);
    }
    obj1.setQuestionId(null);
    obj1.setQuestionType(null);
    obj1.setAnswerStatus(null);
    obj1.setAttempts(null);
    obj1.setReaction(null);
    return obj1;
}

[Buggy Hunk]
obj1.setScore(Math.round((double)(obj1.getScore()/obj1.getTotalAttemptedQuestions())));

[Patch]
obj1.setScore(Math.round((double)obj1.getScore()/obj1.getTotalAttemptedQuestions()));

[Demonstration 2]

[Buggy Method]
private Command parseSearchCommand(String strCommand) {
    //remove "search" word
    String strSearchString = removeNWords(1, strCommand);
    Search searchObj = new Search();
    //Get all dates
    while (strSearchString != null || strSearchString != "") {
        DateClass date = getDate(strSearchString);
        if (date != null) {
            searchObj.addSearchString(date.toString());
            strSearchString = removeDate(strSearchString);
        } else {
            PrettyTimeWrapper prettyTime = new PrettyTimeWrapper(strSearchString);
            date = prettyTime.getDate();
            if (date == null) {
                break;
            } else {
                searchObj.addSearchString(date.toString());
                strSearchString = strSearchString.replace(prettyTime.getParsedDateGroup().get(0), "");
            }
        }
    }
    searchObj.addSearchString(strSearchString);
    return searchObj;
}

[Buggy Hunk]
strSearchString =  strSearchString.replace(prettyTime.getParsedDateGroup().get(0), "");

[Patch]
strSearchString =  strSearchString.replace(prettyTime.getParsedDateGroup().get(0), "").trim();

[Demonstration 3]

[Buggy Method]
@Override
public final void execute(String[] args) {
    if (args.length > 0 && subCommands.keySet().contains(args[0])) {
        subCommands.get(args[0]).execute(argsSlice(args));
    } else if (args.length != 0) {
        System.err.format("%s is not a shy command!%n", args[0]);
    } else {
        System.err.format("Not enough arguments.%n");
    }
}

[Buggy Hunk]
public final void execute(String[] args) {

[Patch]
public final void execute(String[] args) throws IOException {