<commit_before>package com.twu.biblioteca;

import java.util.ArrayList;

/**
 * Created by jessieleung on 30/12/14.
 */
public class MovieCollection extends MediaCollection {

    public MovieCollection(){
        super();
    }

    /**
     * Method to add a movie to library
     */
    public void add(String title, String director, String year, String rating){
        Movie newMovie = new Movie(title,director,year,rating);
        library.add(newMovie);
    }

    /**
     * Method to get a move from library
     */
    public Movie get(int idx){
        try{
            Movie thisMovie = (Movie) library.get(idx);
            return thisMovie;
        }
        catch(IndexOutOfBoundsException ex){
            return null;
        }
    }

    public void list(){

    }

    public Movie checkout(){
        return null;
    }

    public Movie returnItem(){
        return null;
    }
}<commit_msg>Adding in list movies method, passing test<commit_after>package com.twu.biblioteca;

import java.util.ArrayList;

/**
 * Created by jessieleung on 30/12/14.
 */
public class MovieCollection extends MediaCollection {

    public MovieCollection(){
        super();
    }

    /**
     * Method to add a movie to library
     */
    public void add(String title, String director, String year, String rating){
        Movie newMovie = new Movie(title,director,year,rating);
        library.add(newMovie);
    }

    /**
     * Method to get a move from library
     */
    public Movie get(int idx){
        try{
            Movie thisMovie = (Movie) library.get(idx);
            return thisMovie;
        }
        catch(IndexOutOfBoundsException ex){
            return null;
        }
    }

    /**
     * Get all movies from the movie library
     */
    public void list(){
        for(MediaItem item:library) {
            Movie m = (Movie) item;
            if (m.getStatus().equals("Available")) {
                System.out.format("%4d %-50s %-50s %-4s %-7s%n", library.indexOf(m), m.getTitle(), m.getDirector(),
                        m.getYear(), m.getRating());
            }
        }
    }

    public Movie checkout(){
        return null;
    }

    public Movie returnItem(){
        return null;
    }
}
{'fraction_non_alphanumeric': 0.109717868338558, 'fraction_numerical': 0.00850873264666368, 'mean_word_length': 1.9088541666666667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4729356', 'n_tokens_mistral': 661, 'n_tokens_neox': 616, 'n_words': 179}