[Demonstration 1]

[Buggy Method]
private void resetTitle() {
    switch(mScope) {
        case 1:
            getActivity().setTitle(R.string.nav_movies);
            break;
        case 2:
            getActivity().setTitle(R.string.nav_tv);
            break;
        case 3:
            getActivity().setTitle(R.string.nav_fav);
            break;
        default:
            getActivity().setTitle(R.string.nav_movies);
            Log.e(LOG_TAG, "Error resetting toolbar title");
            break;
    }
}

[Buggy Hunk]
private void resetTitle(){

[Patch]
private void resetTitle() throws  NullPointerException{

[Demonstration 2]

[Buggy Method]
private MiningInfo getMiningInfo(String server) {
    MiningInfo result = null;
    try {
        ContentResponse response;
        response = httpClient.newRequest(server + "/burst?requestType=getMiningInfo").timeout(ObserverProperties.getConnectionTimeout(), TimeUnit.MILLISECONDS).send();
        result = objectMapper.readValue(response.getContentAsString(), MiningInfo.class);
    } catch (TimeoutException timeoutException) {
        LOG.warn("Unable to get mining info caused by connectionTimeout, currently '" + (ObserverProperties.getConnectionTimeout() / 1000) + " sec.' try increasing it!");
    } catch (Exception e) {
        LOG.trace("Unable to get mining info from wallet (maybe devV2): " + e.getMessage());
    }
    if (result == null) {
        try {
            // maybe server is dev v2 pool api
            ContentResponse response = httpClient.newRequest(server + "/pool/getMiningInfo").timeout(ObserverProperties.getConnectionTimeout(), TimeUnit.MILLISECONDS).send();
            result = objectMapper.readValue(response.getContentAsString(), MiningInfo.class);
        } catch (TimeoutException timeoutException) {
            LOG.warn("Unable to get mining info caused by connectionTimeout, currently '" + (ObserverProperties.getConnectionTimeout() / 1000) + " sec.' try increasing it!");
        } catch (Exception e) {
            LOG.warn("Unable to get mining info from wallet for '" + server + "': " + e.getMessage());
        }
    }
    return result;
}

[Buggy Hunk]
LOG.warn("Unable to get mining info from wallet for '" + server + "': " + e.getMessage());

[Patch]
LOG.info("Unable to get mining info from wallet for '" + server + "'");

[Demonstration 3]

[Buggy Method]
@Override
public void configureTask(Task task, BinarySpec binarySpec, LanguageSourceSet sourceSet, ServiceRegistry serviceRegistry) {
    PlayApplicationBinarySpecInternal playBinarySpec = (PlayApplicationBinarySpecInternal) binarySpec;
    LessSourceSet lessSourceSet = (LessSourceSet) sourceSet;
    CssSourceSet cssSourceSet = (CssSourceSet) playBinarySpec.getInputs().matching(inputSourceSet -> inputSourceSet.getName().equals(getCssSourceSetName(lessSourceSet))).iterator().next();
    PlayLessCompile lessCompile = (PlayLessCompile) task;
    lessCompile.setDescription("Compiles the " + lessSourceSet.getDisplayName() + ".");
    File generatedSourceDir = playBinarySpec.getNamingScheme().getOutputDirectory(task.getProject().getBuildDir(), "src");
    File cssSourceSetDir = new File(generatedSourceDir, cssSourceSet.getName());
    cssSourceSet.getSource().srcDir(cssSourceSetDir);
    playBinarySpec.getAssets().addAssetDir(cssSourceSetDir);
    lessCompile.setOutputDirectory(cssSourceSetDir);
    lessCompile.setSource(lessSourceSet.getSource());
    cssSourceSet.builtBy(lessCompile);
    playBinarySpec.getAssets().builtBy(lessCompile);
}

[Buggy Hunk]
PlayLessCompile lessCompile = (PlayLessCompile) task;

[Patch]
LessCompile lessCompile = (LessCompile) task;