1import java.util.List; 2 3class Node { 4} 5 6class Comment { 7} 8 9class LocalVariableInParent { 10 11 void foo1() { 12 for (Node child : null){ 13 String s; 14 for (Object c : null){ 15 if (true){ 16 s; 17 } 18 } 19 } 20 } 21 22 void foo3() { 23 for (Node child : null){ 24 String s; 25 for (Object c : null){ 26 s; 27 } 28 } 29 } 30 31 void foo2() { 32 for (Node child : null){ 33 String s; 34 s; 35 } 36 } 37 38 void foo4() { 39 List<Node> children = node.getChildrenNodes(); 40 for (Node child : children){ 41 List<Comment> commentsInsideChild = new LinkedList<Comment>(); 42 for (Comment c : commentsToAttribute){ 43 if (true){ 44 commentsInsideChild.add(c); 45 } 46 } 47 } 48 } 49 50 void foo5() { 51 List<Comment> commentsInsideChild; 52 Comment c; 53 commentsInsideChild.add(c); 54 } 55 56 57}