package ex;
import java.util.Random;

public class SEO_Sample {

    public void seo() {
        int a = calcA();
        int b = calcB();
        
        System.out.println(a + b);
        
        if (hasC() && (a == 0) && (b > 3)) {
            System.out.println(a - b);
        }
    }
    
    
    private int calcA() {
        Random r = new Random();
        return r.nextInt(10);
    }
    
    private int calcB() {
        Random r = new Random();
        return r.nextInt(10);
    }
    
    private boolean hasC() {
        Random r = new Random();
        return r.nextBoolean();
    }
}

@@ -5,16 +5,17 @@
 age ex;%0A
+%0A
 import j
@@ -59,20 +59,17 @@
 mple %7B%0A%0A
-    
+%09
 public v
@@ -80,24 +80,18 @@
 seo() %7B%0A
-        
+%09%09
 int a = 
@@ -99,24 +99,18 @@
 alcA();%0A
-        
+%09%09
 int b = 
@@ -118,33 +118,19 @@
 alcB();%0A
-        %0A        
+%0A%09%09
 System.o
@@ -152,25 +152,11 @@
 b);%0A
-        %0A        
+%0A%09%09
 if (
@@ -192,20 +192,11 @@
 ) %7B%0A
-            
+%09%09%09
 Syst
@@ -222,38 +222,17 @@
 b);%0A
-        %7D%0A    %7D%0A    %0A    %0A    
+%09%09%7D%0A%09%7D%0A%0A%09
 priv
@@ -245,32 +245,26 @@
 t calcA() %7B%0A
-        
+%09%09
 Random r = n
@@ -272,32 +272,26 @@
 w Random();%0A
-        
+%09%09
 return r.nex
@@ -296,39 +296,29 @@
 extInt(10);%0A
-    %7D%0A    %0A    
+%09%7D%0A%0A%09
 private int 
@@ -323,32 +323,26 @@
 t calcB() %7B%0A
-        
+%09%09
 Random r = n
@@ -350,32 +350,26 @@
 w Random();%0A
-        
+%09%09
 return r.nex
@@ -382,23 +382,13 @@
 0);%0A
-    %7D%0A    %0A    
+%09%7D%0A%0A%09
 priv
@@ -408,24 +408,18 @@
 asC() %7B%0A
-        
+%09%09
 Random r
@@ -439,44 +439,345 @@
 ();%0A
-        return r.nextBoolean();%0A    
+%09%09return r.nextBoolean();%0A%09%7D%0A%0A%09private void fp223Aliasing() %7B%0A%09%09Holder h = new Holder();%0A%09%09int%5B%5D data = h.getData();%0A%0A%09%09if (h.checkIt() && data%5B0%5D == 1) %7B%0A%09%09%09System.out.println(%22Got It%22);%0A%09%09%7D%0A%09%7D%0A%0A%09class Holder %7B%0A%09%09private int%5B%5D data;%0A%0A%09%09public int%5B%5D getData() %7B%0A%09%09%09return data;%0A%09%09%7D%0A%0A%09%09boolean checkIt() %7B%0A%09%09%09return data.length %3E 0;%0A%09%09%7D%0A%09
 %7D%0A%7D%0A

add example fp for aliasing problem with SEO, as reported by #223