[Demonstration 1]

[Buggy Method]
@Override
protected void configure() {
    bind(Crawler.class).toProvider(StockDetailCrawlerProvider.class);
    bind(KeywordMainDao.class).to(KeywordMainDaoImpl.class);
    bind(StockDetailDao.class).to(StockDetailDaoImpl.class);
    bind(StockKeywordDao.class).to(StockKeywordDaoImpl.class);
    bind(StockDetailKeywordDao.class).to(StockDetailKeywordDaoImpl.class);
    bind(KeywordLinkQueueDao.class).to(KeywordLinkQueueDaoImpl.class);
    bind(RelatedKeywordLinkDao.class).to(RelatedKeywordLinkDaoImpl.class);
    bind(PageReader.class).to(PageReaderImpl.class);
    bind(StockFetcher.class).to(StockFetcherImpl.class);
    bind(StockKeywordParser.class).to(StockKeywordParserImpl.class);
    bind(StockDetailParser.class).to(StockDetailParserImpl.class);
    bind(StockDetailsFactory.class).to(StockDetailsFactoryImpl.class);
    bind(StockKeywordGenerator.class).to(StockKeywordGeneratorImpl.class);
}

[Buggy Hunk]
bind(Crawler.class).toProvider(StockDetailCrawlerProvider.class);

[Patch]
bind(Crawler.class).toProvider(StockKeywordCrawlerProvider.class);

[Demonstration 2]

[Buggy Method]
protected Properties getConnectionProperties(String connectionPropertyFile) throws EvaluationException {
    Properties properties = Context.getRuntimeProperties();
    if (StringUtils.isNotBlank(connectionPropertyFile)) {
        properties = new Properties();
        InputStream is = null;
        try {
            File file = new File(OpenmrsConstants.APPLICATION_DATA_DIRECTORY, connectionPropertyFile);
            is = new FileInputStream(file);
            properties.load(is);
        } catch (Exception e) {
            throw new EvaluationException("Unable to load connection properties from file <" + connectionPropertyFile + ">", e);
        } finally {
            IOUtils.closeQuietly(is);
        }
    }
    return properties;
}

[Buggy Hunk]
File file = new File(OpenmrsConstants.APPLICATION_DATA_DIRECTORY, connectionPropertyFile);

[Patch]
File file = new File(OpenmrsUtil.getApplicationDataDirectory(), connectionPropertyFile);

[Demonstration 3]

[Buggy Method]
@Override
protected void configure() {
    bind(Client.class).toProvider(ClientProvider.class).in(Singleton.class);
    bind(IndexConfiguration.class).to(IndexConfigurationImpl.class).in(Singleton.class);
    bind(Indexer.class).annotatedWith(Names.named("newsIndexer")).to(NewsIndexer.class).in(Singleton.class);
}

[Buggy Hunk]
bind(IndexConfiguration.class).to(IndexConfigurationImpl.class).in(Singleton.class);

[Patch]
bind(IndexConfiguration.class).to(IndexConfigurationImpl.class).asEagerSingleton();