public  static List readSourceFromFile(File file) {
        List buffer = new ArrayList<String>();
        String temp;

        try(FileInputStream fInput = new FileInputStream(file);
            InputStreamReader streamReader = new InputStreamReader(fInput);
            BufferedReader reader = new BufferedReader(streamReader)) {

            while((temp=reader.readLine()) != null)
                buffer.add(temp);

        }catch (IOException ex){
            JOptionPane.showMessageDialog(frames.getFrameCreateAlgo(),
                    "Error #1000 " + ex.getMessage(), "Read file", JOptionPane.ERROR_MESSAGE);
        }

        return buffer;
    }