Weaved code has dependency to project SpecsUtils, which can be found at https://github.com/specs-feup/specs-java-libs
public class LoggerTest {
    public double bar() {
        return 1.0;
    }
    public double foo() {
        double a = 0;
        for (int i = 0; i < 5; i++) {
            /**
             * Inserted by Kadabra
             */
            System.out.printf("Print double %f after bar\n", 2.0);;
            /**
             * Inserted by Kadabra
             */
            pt.up.fe.specs.util.SpecsIo.append(new java.io.File("log.txt"), String.format("Logging to a file\n"));;
            a += bar();
            /**
             * Inserted by Kadabra
             */
            pt.up.fe.specs.util.SpecsIo.append(new java.io.File("log.txt"), String.format("Logging again to a file\n"));;
            /**
             * Inserted by Kadabra
             */
            System.out.printf("Printing again\n");;
        }
        return a;
    }
    
    public void testAppend() {
		int a;
		/**
		 * Inserted by Kadabra
		 */
		System.out.printf("%d", 10l);;
	}
    
    public static void main(String[] args) {
        /**
         * Inserted by Kadabra
         */
        System.out.printf("Print double %f after foo\n", 2.0);;
        /**
         * Inserted by Kadabra
         */
        pt.up.fe.specs.util.SpecsIo.append(new java.io.File("log.txt"), String.format("Logging to a file\n"));;
        new LoggerTest().foo();
        /**
         * Inserted by Kadabra
         */
        pt.up.fe.specs.util.SpecsIo.append(new java.io.File("log.txt"), String.format("Logging again to a file\n"));;
        /**
         * Inserted by Kadabra
         */
        System.out.printf("Printing again\n");;
    }
}