[Demonstration 1]

[Buggy Method]
public Object getFieldOrProviderValue(Class<?> c) {
    Object fieldValue = getFieldValue(c);
    if (fieldValue == null) {
        fieldValue = getProviderFieldValue(c);
        if (fieldValue == null) {
            throw new RuntimeException(c.getName() + " field not found in class " + getValue().getClass().getName() + ", it's defined as parameter in InjectFromComponent annotation");
        }
    }
    return fieldValue;
}

[Buggy Hunk]
throw new RuntimeException(c.getName() + " field not found in class " + getValue().getClass().getName() + ", it's defined as parameter in InjectFromComponent annotation");

[Patch]
throw new RuntimeException(c.getName() + " field not found in class " + getValueClass().getName() + ", it's defined as parameter in InjectFromComponent annotation");

[Demonstration 2]

[Buggy Method]
String readData(File path) {
    File file = new File(path, FILENAME);
    StringBuilder text = new StringBuilder();
    graphViewManager.NumerOfValues = 0;
    try {
        BufferedReader br = new BufferedReader(new FileReader(file));
        String line;
        while ((line = br.readLine()) != null) {
            text.append(line);
            graphViewManager.extractData(line);
            text.append('\n');
        }
        br.close();
    } catch (IOException e) {
        Log.e("Exception", "File read failed: " + e.toString());
    }
    return text.toString();
}

[Buggy Hunk]
String readData(File path){

[Patch]
public String readData(File path){

[Demonstration 3]

[Buggy Method]
public static KerboScriptInstruction instruction(Project project, String text) {
    KerboScriptFile file = file(project, text);
    PsiElement child = file.getFirstChild();
    if (child instanceof KerboScriptInstruction) {
        return ((KerboScriptInstruction) child);
    } else {
        throw new RuntimeException(text + " is not instruction");
    }
}

[Buggy Hunk]
throw new RuntimeException(text+" is not instruction");

[Patch]
throw new IllegalArgumentException(text+" is not instruction");