[Demonstration 1]

[Buggy Method]
public static PRVE LireModeleBeasley(String filename) {
    /**
     * a {@link File} to open the file, and get model data.
     */
    File file = new File(filename);
    /**
     * a {@link FileReader} for a file reader.
     */
    FileReader fileReader = null;
    /**
     * a {@link BufferedReader} for a buffered reader.
     */
    BufferedReader bufferedReader = null;
    /**
     * a {@link PRVE} for the model.
     */
    PRVE modele = null;
    /**
     * a {@link Tournee} for a tour in the model.
     */
    Tournee tournee;
    /**
     * a {@link Chargement} for a charging in a tour.
     */
    Chargement chargement;
    /**
     * the number of charging station in the model.
     */
    int iNbBornne;
    /**
     * the number of tour in the model.
     */
    int iNbTournee;
    /**
     * the num of charging station in a charging.
     */
    int iNumBornee;
    /**
     * the charging time in a charging.
     */
    int iTempsRechargement;
    String line;
    try {
        fileReader = new FileReader(file);
        bufferedReader = new BufferedReader(fileReader);
        /**
         * read the first line, denote the number of {@link Tournee} and the number of Bornee.
         */
        line = bufferedReader.readLine();
        //System.out.println(line);
        if (line != null) {
            String[] objets = line.split("[\\s]+");
            if (objets.length == 3) {
                iNbTournee = Integer.parseInt(objets[1]);
                iNbBornne = Integer.parseInt(objets[2]);
                modele = new PRVE(iNbBornne, iNbTournee);
            } else {
                System.out.println("length:" + objets.length);
                close(bufferedReader, fileReader);
                return null;
            }
        } else {
            close(bufferedReader, fileReader);
            return null;
        }
        for (int i = 0; i < iNbTournee; i++) {
            line = bufferedReader.readLine();
            //System.out.println(line);
            if (line != null) {
                String[] objets = line.split("[\\s]+");
                tournee = new Tournee();
                if (objets.length == iNbBornne * 2 + 1) {
                    for (int u = 1; u < iNbBornne + 1; u++) {
                        iNumBornee = Integer.parseInt(objets[u * 2 - 1]);
                        //System.out.println(iNumBornee);
                        iTempsRechargement = Integer.parseInt(objets[u * 2]);
                        chargement = new Chargement(iNumBornee, iTempsRechargement);
                        tournee.addChargement(chargement);
                    }
                } else {
                    close(bufferedReader, fileReader);
                    return null;
                }
                modele.addTournees(tournee);
            } else {
                close(bufferedReader, fileReader);
                return null;
            }
        }
    } catch (FileNotFoundException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    } finally {
        close(bufferedReader, fileReader);
    }
    return modele;
}

[Buggy Hunk]
iNumBornee  = Integer.parseInt(objets[u * 2 - 1]);

[Patch]
iNumBornee  = Integer.parseInt(objets[u * 2 - 1]) + 1;

[Demonstration 2]

[Buggy Method]
private ClassDecl visiClassDecl(ClassDeclarationContext c) {
    Identifier id = this.visiIdentifier(c.Identifier(0));
    VarDeclList varList = this.visiVarDeclList(c.varDeclaration());
    MethodDeclList ml = this.visitMethodDeclList(c.methodDeclaration());
    return new ClassDeclSimple(id, varList, ml);
}

[Buggy Hunk]
Identifier id = this.visiIdentifier(c.Identifier(0));

[Patch]
Identifier id = this.visitIdentifier(c.Identifier(0));

[Demonstration 3]

[Buggy Method]
public Object readResolve() {
    if (graphConfiguration == null) {
        graphConfiguration = new ArrayList<>();
    }
    if (getParserUniqueName() == null || getParserUniqueName() == null) {
        logger.log(Level.FINE, "Entering 1.x compatibility block, assigning name: Default");
        setParserUniqueName("Default");
    }
    return this;
}

[Buggy Hunk]
if (getParserUniqueName() == null || getParserUniqueName() == null) {

[Patch]
if (getParserUniqueName() == null) {