// Path: src/libra/common/helpers/TimeHelper.java
// public class TimeHelper {
//     public static long getCurrentTime() {
//         return System.currentTimeMillis();
//     }
//     
//     public static String getDiffTimeString(long begin, long end) {
//         long diff = end - begin;
//         long remain = diff;
//         
//         int msec = (int) (remain % 1000);
//         remain /= 1000;
//         int sec = (int) (remain % 60);
//         remain /= 60;
//         int min = (int) (remain % 60);
//         remain /= 60;
//         int hour = (int) (remain);
//         
//         return hour + "h " + min + "m " + sec + "s";
//     }
//     
//     public static String getTimeString(long time) {
//         Date date = new Date(time);
//         Format format = new SimpleDateFormat("yyyy MM dd HH:mm:ss");
//         return format.format(date);
//     }
// }


import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;
import java.util.ArrayList;
import java.util.List;
import libra.common.helpers.TimeHelper;
    }
    
    public void writeTo(String filename) throws IOException {
        writeTo(new File("./", filename));
    }
    
    public void writeTo(File f) throws IOException {
        if(f.getParentFile() != null) {
            if(!f.getParentFile().exists()) {
                f.getParentFile().mkdirs();
            }
        }
        
        Writer writer = new FileWriter(f, true);
        boolean first = true;
        for(Job job : this.jobs) {
            if(first) {
                first = false;
            }
            writer.write(makeText(job));
            writer.write("\n\n");
        }
        
        writer.close();
    }
    
    private String makeText(Job job) {
        return "Job : " + job.getName() + "\n" +
                "JobID : " + job.getID() + "\n" + 
                "Status : " + job.getStatus() + "\n" +
// Path: src/libra/common/helpers/TimeHelper.java
// public class TimeHelper {
//     public static long getCurrentTime() {
//         return System.currentTimeMillis();
//     }
//     
//     public static String getDiffTimeString(long begin, long end) {
//         long diff = end - begin;
//         long remain = diff;
//         
//         int msec = (int) (remain % 1000);
//         remain /= 1000;
//         int sec = (int) (remain % 60);
//         remain /= 60;
//         int min = (int) (remain % 60);
//         remain /= 60;
//         int hour = (int) (remain);
//         
//         return hour + "h " + min + "m " + sec + "s";
//     }
//     
//     public static String getTimeString(long time) {
//         Date date = new Date(time);
//         Format format = new SimpleDateFormat("yyyy MM dd HH:mm:ss");
//         return format.format(date);
//     }
// }


// Path: src/libra/common/report/Report.java
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;
import java.util.ArrayList;
import java.util.List;
import libra.common.helpers.TimeHelper;

    }
    
    public void writeTo(String filename) throws IOException {
        writeTo(new File("./", filename));
    }
    
    public void writeTo(File f) throws IOException {
        if(f.getParentFile() != null) {
            if(!f.getParentFile().exists()) {
                f.getParentFile().mkdirs();
            }
        }
        
        Writer writer = new FileWriter(f, true);
        boolean first = true;
        for(Job job : this.jobs) {
            if(first) {
                first = false;
            }
            writer.write(makeText(job));
            writer.write("\n\n");
        }
        
        writer.close();
    }
    
    private String makeText(Job job) {
        return "Job : " + job.getName() + "\n" +
                "JobID : " + job.getID() + "\n" + 
                "Status : " + job.getStatus() + "\n" +
                "StartTime : " + TimeHelper.getTimeString(job.getStartTime()) + "\n" +