[Demonstration 1]

[Buggy Method]
public void execute(ApplicationTransaction tx, DocumentGenerationDestination dest, Map<ParameterName, String> params, boolean transform) throws DocumentTemplateInvalidException, TransformationFailedException {
    Map<String, String> stringParams = new HashMap<String, String>();
    params.entrySet().forEach(e -> stringParams.put(e.getKey().name, e.getValue()));
    Document dataSourceResult = source.execute(tx, params);
    Document xsltInput = DomVariableExpander.expand(dataSourceResult, stringParams);
    generator.transform(dest, xsltInput, transform);
}

[Buggy Hunk]
Document xsltInput = DomVariableExpander.expand(dataSourceResult, stringParams);

[Patch]
Document xsltInput = DomVariableExpander.expand(VariableSyntax.dollarThenBraces, stringParams, dataSourceResult);

[Demonstration 2]

[Buggy Method]
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_growth_chart, container, false);
    mGrowthChart = (CombinedChart) rootView.findViewById(R.id.growth_chart);
    mKidsId = BabysInfo.getCurrentBabyId();
    ixChart = getArguments().getInt(ARG_X_AXIS);
    iyChart = getArguments().getInt(ARG_Y_AXIS);
    ChartData.ChartType yChart = ChartData.fromInt(iyChart);
    Cursor c1 = GrowthDataProvider.get().queryTable(IDataInfo.kBabyInfoTable, null, "_id=" + mKidsId, null, null, null, null);
    if (c1 == null || c1.getCount() < 1)
        return rootView;
    if (c1.moveToNext()) {
        mKidsDob = c1.getLong(IDataInfo.INDEX_DOB_DATE);
        mKidsGen = c1.getInt(IDataInfo.INDEX_GENDER);
    }
    mGrowthChart.setDescription("");
    mGrowthChart.setBackgroundColor(Color.WHITE);
    mGrowthChart.setDrawGridBackground(true);
    mGrowthChart.setDrawBarShadow(false);
    mGrowthChart.setDrawOrder(new CombinedChart.DrawOrder[] { CombinedChart.DrawOrder.LINE, CombinedChart.DrawOrder.SCATTER });
    XAxis xAxis = mGrowthChart.getXAxis();
    xAxis.setPosition(XAxis.XAxisPosition.BOTH_SIDED);
    return rootView;
}

[Buggy Hunk]
mKidsId = BabysInfo.getCurrentBabyId();

[Patch]
mKidsId = BabiesInfo.getCurrentBabyId();

[Demonstration 3]

[Buggy Method]
public static boolean isNormalTask(String command) {
    return hasStartAndEndDateTime(command) || isDateInNaturalLang(command) || isDatesInNaturalLangs(command);
}

[Buggy Hunk]
return hasStartAndEndDateTime(command) || isDateInNaturalLang(command) || isDatesInNaturalLangs(command);

[Patch]
return (hasStartAndEndDateTime(command) || isDateInNaturalLang(command) || isDatesInNaturalLangs(command)) && (!isDeadlineTask(command));