[Demonstration 1]

[Buggy Method]
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_about_us);
    getSupportActionBar().setDisplayShowHomeEnabled(true);
    getSupportActionBar().setBackgroundDrawable(new ColorDrawable(Color.argb(255, 0, 121, 107)));
    final_activate = (Button) findViewById(R.id.final_activate);
    final_activate.setOnClickListener(this);
    SharedPreferences appdata = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
    SharedPreferences.Editor editor = appdata.edit();
    int daysLeft = appdata.getInt("daysLeft", 0);
    if (daysLeft == 0) {
        editor.putBoolean("FullVersionActive", false);
        editor.commit();
    } else if (daysLeft == -1) {
        editor.putBoolean("FullVersionActive", true);
        editor.commit();
    }
    FullVersionActive = appdata.getBoolean("FullVersionActive", false);
    trial = (TextView) findViewById(R.id.trialDays);
    internetTxt = (TextView) findViewById(R.id.textView6);
    detailsTxt = (TextView) findViewById(R.id.textView5);
    if (FullVersionActive) {
        trial.setText("Full Version!");
        trial.setTextColor(Color.parseColor("#ff008174"));
        final_activate.setEnabled(false);
        final_activate.setVisibility(View.GONE);
        internetTxt.setVisibility(View.GONE);
        detailsTxt.setVisibility(View.GONE);
    } else {
        trial.setText("Trial Version");
        trial.setTextColor(Color.parseColor("#ffc00200"));
        final_activate.setEnabled(true);
        final_activate.setVisibility(View.VISIBLE);
        internetTxt.setVisibility(View.VISIBLE);
        detailsTxt.setVisibility(View.VISIBLE);
    }
}

[Buggy Hunk]
int daysLeft = appdata.getInt("daysLeft", 0);

[Patch]
daysLeft = appdata.getInt("daysLeft", 0);

[Demonstration 2]

[Buggy Method]
@Test
public void testSingleConcept() {
    INLPService nlpService = new NLPService();
    ISemanticText singleSemText = nlpService.runNLP(Arrays.asList("Cabinovia"), null).get(0);
    assertEquals(1, singleSemText.getSentences().get(0).getWords().size());
    IWord word = singleSemText.getSentences().get(0).getWords().get(0);
    assertEquals(MeaningStatus.SELECTED, word.getMeaningStatus());
    IMeaning m = word.getSelectedMeaning();
    KnowledgeService ks = new KnowledgeService();
    IConcept concept = ks.getConcept(word.getSelectedMeaning().getURL());
    assertTrue(concept != null);
    assertEquals(word.getSelectedMeaning().getURL(), concept.getURL());
    assertEquals(MeaningKind.CONCEPT, m.getKind());
    assertTrue(m.getName().getString(Locale.ENGLISH).length() > 0);
}

[Buggy Hunk]
IConcept concept = ks.getConcept(word.getSelectedMeaning().getURL());

[Patch]
IConcept concept = ks.readConcept(word.getSelectedMeaning().getURL());

[Demonstration 3]

[Buggy Method]
@Override
public List<Map<String, Object>> findTopN(Specification specification) {
    TopNSpecification topNSpecification = (TopNSpecification) specification;
    String groupBy = topNSpecification.getGroupByColumn();
    return getJdbcTemplate().query(topNSpecification.toSqlClause(), rs -> {
        String table, column;
        switch(groupBy) {
            case Columns.ORGANIZATION_ID:
                table = Tables.ORGANIZATIONS;
                column = Columns.ORGANIZATION;
                break;
            case Columns.PROJECT_ID:
                table = Tables.PROJECTS;
                column = Columns.PROJECT;
                break;
            default:
                throw new IllegalArgumentException("Unsupported column: " + groupBy);
        }
        List<Map<String, Object>> rows = new ArrayList<>();
        while (rs.next()) {
            Map<String, Object> row = new LinkedHashMap<>();
            row.put("key", getValue(table, column, rs.getString(1)));
            row.put("value", rs.getLong(2));
            rows.add(row);
        }
        return rows;
    });
}

[Buggy Hunk]
public List<Map<String, Object>> findTopN(Specification specification) {

[Patch]
public final List<Map<String, Object>> findTopN(final Specification specification) {