Snapshot 568f05589922685b8c8f9a2f2f465043b8128542 from master branch of git://git.jetbrains.org/idea/community.git

Change-Id: I47fe8cb5d8a3c9876cd4c313dca1a8cc531288ec
diff --git a/java/java-tests/java-tests.iml b/java/java-tests/java-tests.iml
index d74dcea..eb7ea31 100644
--- a/java/java-tests/java-tests.iml
+++ b/java/java-tests/java-tests.iml
@@ -30,6 +30,7 @@
     <orderEntry type="module" module-name="IntentionPowerPackPlugin" scope="TEST" />
     <orderEntry type="module" module-name="InspectionGadgetsPlugin" scope="TEST" />
     <orderEntry type="module" module-name="java-indexing-api" scope="TEST" />
+    <orderEntry type="module" module-name="external-system-impl" scope="RUNTIME" />
   </component>
 </module>
 
diff --git a/java/java-tests/testData/codeInsight/completion/normal/MethodCallBeforeAnnotation.java b/java/java-tests/testData/codeInsight/completion/normal/MethodCallBeforeAnnotation.java
new file mode 100644
index 0000000..2cb308f
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/completion/normal/MethodCallBeforeAnnotation.java
@@ -0,0 +1,6 @@
+class MyClass {
+  String hc = this.<caret>
+
+  @Annotation
+  public void myAnnotatedMethod() {}
+}
diff --git a/java/java-tests/testData/codeInsight/completion/normal/MethodCallBeforeAnnotation_After.java b/java/java-tests/testData/codeInsight/completion/normal/MethodCallBeforeAnnotation_After.java
new file mode 100644
index 0000000..71da13a
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/completion/normal/MethodCallBeforeAnnotation_After.java
@@ -0,0 +1,6 @@
+class MyClass {
+  String hc = this.toString()<caret>
+
+  @Annotation
+  public void myAnnotatedMethod() {}
+}
diff --git a/java/java-tests/testData/codeInsight/completion/normal/MethodNoPairBrace_after.java b/java/java-tests/testData/codeInsight/completion/normal/MethodNoPairBrace_after.java
index c976d92..b7841df 100644
--- a/java/java-tests/testData/codeInsight/completion/normal/MethodNoPairBrace_after.java
+++ b/java/java-tests/testData/codeInsight/completion/normal/MethodNoPairBrace_after.java
@@ -3,6 +3,6 @@
 void foo() {}
 
 {
-  foo(<caret>
+  foo();<caret>
 }
 }
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/completion/normal/MethodWithLeftParTailTypeNoPairBrace_after2.java b/java/java-tests/testData/codeInsight/completion/normal/MethodWithLeftParTailTypeNoPairBrace_after2.java
index c976d92..b7841df 100644
--- a/java/java-tests/testData/codeInsight/completion/normal/MethodWithLeftParTailTypeNoPairBrace_after2.java
+++ b/java/java-tests/testData/codeInsight/completion/normal/MethodWithLeftParTailTypeNoPairBrace_after2.java
@@ -3,6 +3,6 @@
 void foo() {}
 
 {
-  foo(<caret>
+  foo();<caret>
 }
 }
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/completion/smartType/NewByteArray2.java b/java/java-tests/testData/codeInsight/completion/smartType/NewByteArray2.java
new file mode 100644
index 0000000..646b108
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/completion/smartType/NewByteArray2.java
@@ -0,0 +1,10 @@
+public class Bug17 {
+
+  private void f(byte[] d) {
+  }
+
+  private void g() {
+    f(new <caret>);
+  }
+
+}
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/completion/smartType/NoTailWhenNoPairBracket-out.java b/java/java-tests/testData/codeInsight/completion/smartType/NoTailWhenNoPairBracket-out.java
index 6d72b12..3580d9c 100644
--- a/java/java-tests/testData/codeInsight/completion/smartType/NoTailWhenNoPairBracket-out.java
+++ b/java/java-tests/testData/codeInsight/completion/smartType/NoTailWhenNoPairBracket-out.java
@@ -1,6 +1,6 @@
 class A {
   {
     String x;
-    Class c = x.getClass(<caret>
+    Class c = x.getClass()<caret>
   }
 }
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/completion/smartType/NoTailWhenNoPairBracket2-out.java b/java/java-tests/testData/codeInsight/completion/smartType/NoTailWhenNoPairBracket2-out.java
index 5dbeaa6..63fd0d5 100644
--- a/java/java-tests/testData/codeInsight/completion/smartType/NoTailWhenNoPairBracket2-out.java
+++ b/java/java-tests/testData/codeInsight/completion/smartType/NoTailWhenNoPairBracket2-out.java
@@ -1,6 +1,6 @@
 class A {
   {
-    Class c = this.xxxxx(<caret>
+    Class c = this.xxxxx()<caret>
   }
 
   Class xxxxx() {}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/IDEA78916.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/IDEA78916.java
index 214a3ae..fa1ed55 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/IDEA78916.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/IDEA78916.java
@@ -35,4 +35,14 @@
     public abstract void execute();
 
     private void firstMethod() {}
+}
+
+class Test {
+    private class Foo {
+        private Foo() {}
+
+        {
+          new  Foo(){};
+        }
+    }
 }
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA105846.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA105846.java
index 8b9c700..04d39bd 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA105846.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA105846.java
@@ -1,5 +1,6 @@
 class MyClass {
     public static void main(Class<? extends MyClass> clazz){
         clazz = (Class<? extends MyClass>) clazz.getSuperclass();
+        <error descr="Incompatible types. Found: 'java.lang.Class<capture<? super capture<? extends MyClass>>>', required: 'java.lang.Class<? extends MyClass>'">clazz = clazz.getSuperclass()</error>;
     }
 }
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA106964.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA106964.java
new file mode 100644
index 0000000..8c8603e
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA106964.java
@@ -0,0 +1,12 @@
+import java.io.Serializable;
+
+public abstract class Test {
+
+    abstract <T> T test(Class<T> cls);
+
+    abstract <T> T test(Serializable type);
+
+    private void call(){
+        <error descr="Incompatible types. Found: 'java.lang.String[]', required: 'java.lang.String'">String s = test(String[].class);</error>
+    }
+}
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA107782.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA107782.java
new file mode 100644
index 0000000..a078c65
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA107782.java
@@ -0,0 +1,15 @@
+public class Test {
+  {
+    final <error descr="Incompatible types. Found: 'java.lang.Object', required: 'MyResult'">MyResult hello = parseXML(new Parser());</error>
+  }
+  public <R, P extends AbstractParser & Result<R>> R parseXML(P parser) {
+    R result = null;
+    return result;
+  }
+}
+class MyResult {}
+
+class AbstractParser {}
+interface Result<T> {}
+class Parser extends AbstractParser implements Result {}
+
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA107957.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA107957.java
new file mode 100644
index 0000000..1228be1
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA107957.java
@@ -0,0 +1,37 @@
+class Test1 {
+
+  private static final Foo<Boolean> test = new Foo().method(Boolean.TRUE);
+
+  public static void main(String[] args) {
+    System.out.println(test);
+  }
+
+  public static class Foo<T> {
+    public Foo<Boolean> method(boolean arg) {
+      return null;
+    }
+
+    public <T extends Enum<T>> Foo<T> method(T arg) {
+      return null;
+    }
+  }
+}
+
+class Test2 {
+
+  private static final Foo<Boolean> test = Foo.method(Boolean.TRUE);
+
+  public static void main(String[] args) {
+    System.out.println(test);
+  }
+
+  public static class Foo<T> {
+    public static Foo<Boolean> method(boolean arg) {
+      return null;
+    }
+
+    public static <T extends Enum<T>> Foo<T> method(T arg) {
+      return null;
+    }
+  }
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/completion/normal/SelfStaticsOnly.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/completion/normal/SelfStaticsOnly.java
new file mode 100644
index 0000000..b9f90eb
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/completion/normal/SelfStaticsOnly.java
@@ -0,0 +1,14 @@
+interface Function<T, R> {
+  public R apply(T t);
+
+  static <K> Function<K, K> baz() {
+    return k -> k;
+  }
+}
+
+interface IFunction extends Function<Integer, Integer> {
+  static void bar() {}
+  static void ba() {
+    ba<caret>
+  }
+}
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/interfaceMethods/StaticMethodCalls.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/interfaceMethods/StaticMethodCalls.java
new file mode 100644
index 0000000..0c517e9
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/interfaceMethods/StaticMethodCalls.java
@@ -0,0 +1,25 @@
+
+class Bug {
+
+  interface Function<T, R> {
+    public R apply(T t);
+
+    static <K> Function<K, K> identity() {
+      return k -> k;
+    }
+  }
+
+  interface IFunction extends Function<Integer, Integer> {
+    static void a() {
+      Function<Integer, Integer> identity = <error descr="Static method may be invoked on containing interface class only">identity();</error>
+    }
+  }
+
+  public void foo() {
+    Function<Integer, Integer> f = Function.identity();
+
+    Function<Integer, Integer> g = <error descr="Static method may be invoked on containing interface class only">f.identity();</error>
+
+    Function<Integer, Integer> h = <error descr="Static method may be invoked on containing interface class only">IFunction.identity();</error>
+  }
+}
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/RefOnArrayDeclaration.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/RefOnArrayDeclaration.java
index 3ed7e3e..0fa9c84 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/RefOnArrayDeclaration.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/RefOnArrayDeclaration.java
@@ -45,3 +45,16 @@
         ObjectArrayReturnType a5 = Foo<? extends String>[]::new;
     }
 }
+
+
+class IDEA106973 {
+  interface Function<T, R> {
+    R apply(T t);
+  }
+  
+  {
+    Function<Integer, String[]> a  = String[] :: new;
+    <error descr="Incompatible types. Found: '<method reference>', required: 'IDEA106973.Function<java.lang.String,java.lang.String[]>'">Function<String, String[]> a1  = String[] :: new;</error>
+    Function<Short, String[]> a2  = String[] :: new;
+  }
+}
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/VarargsMethodRef.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/VarargsMethodRef.java
new file mode 100644
index 0000000..7edfd28
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/VarargsMethodRef.java
@@ -0,0 +1,26 @@
+import java.util.List;
+
+class Test {
+  void a(List<String> range1, List<String> range2) {
+    zip(range1, range2, Test::<String>asList);
+    I1<String> i = Test :: asList;
+  }
+
+  public static <A, B, C> List<C> zip(List<? extends A> a,
+                                      List<? extends B> b,
+                                      BiFunction<? super A, ? super B, ? extends C> zipper) {
+    return null;
+  }
+
+  public interface BiFunction<T, U, R> {
+    R apply(T t, U u);
+  }
+
+  public static <T> List<T> asList(T... a) {
+    return null;
+  }
+
+  interface I1<T> {
+    List<T> a(T... t);
+  }
+}
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createPropertyFromUsage/afterFieldExist.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createPropertyFromUsage/afterFieldExist.java
index e9baac3..f20329a 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createPropertyFromUsage/afterFieldExist.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createPropertyFromUsage/afterFieldExist.java
@@ -6,7 +6,7 @@
         setI(0);
     }
 
-    public void setI(int i) {
+    void setI(int i) {
         this.i = i;
     }
 
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createPropertyFromUsage/afterSimple.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createPropertyFromUsage/afterSimple.java
index b28d93d..69c33eb 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createPropertyFromUsage/afterSimple.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createPropertyFromUsage/afterSimple.java
@@ -6,7 +6,7 @@
         setI(0);
     }
 
-    public void setI(int i) {
+    void setI(int i) {
         this.i = i;
     }
 
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/iterateOver/before4.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/iterateOver/before4.java
new file mode 100644
index 0000000..a355f5b
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/iterateOver/before4.java
@@ -0,0 +1,6 @@
+// "Iterate" "false"
+class Test {
+  void foo() {
+    java.lang.thi<caret>s
+  }
+}
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/replaceWithTernaryOperator/afterChain.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/replaceWithTernaryOperator/afterChain.java
index 7d3370d..cd556b8 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/replaceWithTernaryOperator/afterChain.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/replaceWithTernaryOperator/afterChain.java
@@ -5,6 +5,6 @@
 class A{
   void test(){
     Integer integer = null;
-    int i = integer != null ? integer.toString().length() : <selection>0</selection>;
+    int i = integer != null ? integer.toString().length() : <caret><selection>0</selection>;
   }
 }
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/after1.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/after1.java
index a89027d..f5d44db 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/after1.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/after1.java
@@ -1,4 +1,4 @@
-// "Change 'list' type to 'List<java.lang.Integer>'" "true"
+// "Change variable 'list' type to 'List<java.lang.Integer>'" "true"
 public class Test {
   void foo()  {
     List<Integer> list = new List<>();
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/after2TypeParamsInOneCall.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/after2TypeParamsInOneCall.java
index 622c3e2..a7a54e2 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/after2TypeParamsInOneCall.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/after2TypeParamsInOneCall.java
@@ -1,4 +1,4 @@
-// "Change 'list' type to 'Lost<java.lang.String,java.lang.Integer>'" "true"
+// "Change variable 'list' type to 'Lost<java.lang.String,java.lang.Integer>'" "true"
 public class Test {
   void foo()  {
     Lost<String, Integer> list = new Lost<>();
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/afterAnotherParamTypeChange.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/afterAnotherParamTypeChange.java
index 1b85916..fbae0b9 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/afterAnotherParamTypeChange.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/afterAnotherParamTypeChange.java
@@ -1,4 +1,4 @@
-// "Change 'list' type to 'Lost<java.lang.Integer>'" "true"
+// "Change variable 'list' type to 'Lost<java.lang.Integer>'" "true"
 public class Test {
   void foo()  {
     Lost<Integer> list = new Lost<>();
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/afterBoxing.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/afterBoxing.java
index 1b43850..0818ad2 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/afterBoxing.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/afterBoxing.java
@@ -1,4 +1,4 @@
-// "Change 'list' type to 'List<java.lang.Integer>'" "true"
+// "Change variable 'list' type to 'List<java.lang.Integer>'" "true"
 public class Test {
   void foo()  {
     List<Integer> list = new List<>();
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/afterCompound.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/afterCompound.java
index a6e6d60..67cc9ed 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/afterCompound.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/afterCompound.java
@@ -1,4 +1,4 @@
-// "Change 'list' type to 'Lost<java.lang.Integer>'" "true"
+// "Change variable 'list' type to 'Lost<java.lang.Integer>'" "true"
 public class Test {
   void foo()  {
     Lost<Integer> list = new Lost<>();
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/afterMixed.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/afterMixed.java
index 802baaf..ce1f568 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/afterMixed.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/afterMixed.java
@@ -1,4 +1,4 @@
-// "Change 'list' type to 'Lost<java.lang.Integer>'" "true"
+// "Change variable 'list' type to 'Lost<java.lang.Integer>'" "true"
 public class Test {
   void foo()  {
     Lost<Integer> list = new Lost<>();
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/before1.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/before1.java
index c14b834..d35d424 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/before1.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/before1.java
@@ -1,4 +1,4 @@
-// "Change 'list' type to 'List<java.lang.Integer>'" "true"
+// "Change variable 'list' type to 'List<java.lang.Integer>'" "true"
 public class Test {
   void foo()  {
     List<String> list = new List<String>();
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/before2TypeParamsInOneCall.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/before2TypeParamsInOneCall.java
index ee27ed3..9dd0ab1 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/before2TypeParamsInOneCall.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/before2TypeParamsInOneCall.java
@@ -1,4 +1,4 @@
-// "Change 'list' type to 'Lost<java.lang.String,java.lang.Integer>'" "true"
+// "Change variable 'list' type to 'Lost<java.lang.String,java.lang.Integer>'" "true"
 public class Test {
   void foo()  {
     Lost<String, String> list = new Lost<String, String>();
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/beforeAnotherParamTypeChange.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/beforeAnotherParamTypeChange.java
index 61e8684..f4558d1 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/beforeAnotherParamTypeChange.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/beforeAnotherParamTypeChange.java
@@ -1,4 +1,4 @@
-// "Change 'list' type to 'Lost<java.lang.Integer>'" "true"
+// "Change variable 'list' type to 'Lost<java.lang.Integer>'" "true"
 public class Test {
   void foo()  {
     Lost<String> list = new Lost<String>();
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/beforeBoxing.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/beforeBoxing.java
index 1d02b91..88778ca 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/beforeBoxing.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/beforeBoxing.java
@@ -1,4 +1,4 @@
-// "Change 'list' type to 'List<java.lang.Integer>'" "true"
+// "Change variable 'list' type to 'List<java.lang.Integer>'" "true"
 public class Test {
   void foo()  {
     List<String> list = new List<String>();
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/beforeChangeSignatureAvailable.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/beforeChangeSignatureAvailable.java
index 9f5ec3b..a2206b0 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/beforeChangeSignatureAvailable.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/beforeChangeSignatureAvailable.java
@@ -1,4 +1,4 @@
-// "Change 'var' type to 'Foo" "false"
+// "Change variable 'var' type to 'Foo" "false"
 public class Test {
   void foo()  {
     final Foo var = new Foo();
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/beforeCompound.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/beforeCompound.java
index aa2eb0c..7f2dc11 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/beforeCompound.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/beforeCompound.java
@@ -1,4 +1,4 @@
-// "Change 'list' type to 'Lost<java.lang.Integer>'" "true"
+// "Change variable 'list' type to 'Lost<java.lang.Integer>'" "true"
 public class Test {
   void foo()  {
     Lost<String> list = new Lost<String>();
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/beforeMixed.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/beforeMixed.java
index b0d6cab..074e647 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/beforeMixed.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall/beforeMixed.java
@@ -1,4 +1,4 @@
-// "Change 'list' type to 'Lost<java.lang.Integer>'" "true"
+// "Change variable 'list' type to 'Lost<java.lang.Integer>'" "true"
 public class Test {
   void foo()  {
     Lost<String> list = new Lost<String>();
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/after1.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/after1.java
index b7f7e63..06c81a4 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/after1.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/after1.java
@@ -1,4 +1,4 @@
-// "Change 'test' type to 'int[][]'" "true"
+// "Change variable 'test' type to 'int[][]'" "true"
 class A {
     void m() {
         final int[][] test = {new int<caret>[]{1}};
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/after2.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/after2.java
index 1cadb61..2f4ebd3 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/after2.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/after2.java
@@ -1,4 +1,4 @@
-// "Change 'test' type to 'int[][]'" "true"
+// "Change variable 'test' type to 'int[][]'" "true"
 class A {
     void m() {
         int[][] test = new int[][]{<caret>{1}, {2}};
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/after3.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/after3.java
index 1cadb61..2f4ebd3 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/after3.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/after3.java
@@ -1,4 +1,4 @@
-// "Change 'test' type to 'int[][]'" "true"
+// "Change variable 'test' type to 'int[][]'" "true"
 class A {
     void m() {
         int[][] test = new int[][]{<caret>{1}, {2}};
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/after4.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/after4.java
index 89ddf94..0a68cc2 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/after4.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/after4.java
@@ -1,4 +1,4 @@
-// "Change 'test' type to 'int[][]'" "true"
+// "Change variable 'test' type to 'int[][]'" "true"
 class A {
     void m() {
         int[][] test = new int[][]{{<caret>1}, {2}};
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/after5.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/after5.java
index 8893a91..9534a4f 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/after5.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/after5.java
@@ -1,4 +1,4 @@
-// "Change 'test' type to 'char[]'" "true"
+// "Change variable 'test' type to 'char[]'" "true"
 class A {
     void m() {
         final char[] test = new char[]{<caret>'a'};
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/after6.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/after6.java
index 0debead..5aec9e2 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/after6.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/after6.java
@@ -1,4 +1,4 @@
-// "Change 'test' type to 'char[]'" "true"
+// "Change variable 'test' type to 'char[]'" "true"
 class A {
     void m() {
         final char[] test = {<caret>'a'};
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/after9.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/after9.java
index a74a518..896709f 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/after9.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/after9.java
@@ -1,4 +1,4 @@
-// "Change 'myArr' type to 'char[][]'" "true"
+// "Change field 'myArr' type to 'char[][]'" "true"
 class A extends B {
     void m() {
         myArr = new char[][]{{<caret>'a'}};
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before1.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before1.java
index 34cc492..e61ec51 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before1.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before1.java
@@ -1,4 +1,4 @@
-// "Change 'test' type to 'int[][]'" "true"
+// "Change variable 'test' type to 'int[][]'" "true"
 class A {
     void m() {
         final Long[][] test = {new int<caret>[]{1}};
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before2.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before2.java
index be9e287..e79fc74 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before2.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before2.java
@@ -1,4 +1,4 @@
-// "Change 'test' type to 'int[][]'" "true"
+// "Change variable 'test' type to 'int[][]'" "true"
 class A {
     void m() {
         Long[][][] test = new Long[]{<caret>{1}, {2}};
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before3.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before3.java
index 35e45cd..c191198 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before3.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before3.java
@@ -1,4 +1,4 @@
-// "Change 'test' type to 'int[][]'" "true"
+// "Change variable 'test' type to 'int[][]'" "true"
 class A {
     void m() {
         Long[] test = new Long[]{<caret>{1}, {2}};
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before4.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before4.java
index 007800e..4fa4be4 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before4.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before4.java
@@ -1,4 +1,4 @@
-// "Change 'test' type to 'int[][]'" "true"
+// "Change variable 'test' type to 'int[][]'" "true"
 class A {
     void m() {
         Long test = new Long[][][][]{{<caret>1}, {2}};
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before5.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before5.java
index a048c22..f9e177a 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before5.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before5.java
@@ -1,4 +1,4 @@
-// "Change 'test' type to 'char[]'" "true"
+// "Change variable 'test' type to 'char[]'" "true"
 class A {
     void m() {
         final Long[] test = new Long[]{<caret>'a'};
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before6.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before6.java
index 2e5b97f..be8d3f8 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before6.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before6.java
@@ -1,4 +1,4 @@
-// "Change 'test' type to 'char[]'" "true"
+// "Change variable 'test' type to 'char[]'" "true"
 class A {
     void m() {
         final Long[] test = {<caret>'a'};
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before7.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before7.java
index 769d870..ca5e5ea 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before7.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before7.java
@@ -1,4 +1,4 @@
-// "Change 'test' type to 'char[]'" "false"
+// "Change variable 'test' type to 'char[]'" "false"
 class A {
     void m() {
         final Long[] test = {<caret>'a', 1};
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before8.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before8.java
index 0d64ee5..cd07ae8 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before8.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before8.java
@@ -1,4 +1,4 @@
-// "Change 'test' type to 'char[][]'" "false"
+// "Change variable 'test' type to 'char[][]'" "false"
 class A {
     void m() {
         final Long[] test = {<caret>{'a'}, {1}};
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before9.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before9.java
index de63666..24cc6b3 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before9.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType/before9.java
@@ -1,4 +1,4 @@
-// "Change 'myArr' type to 'char[][]'" "true"
+// "Change field 'myArr' type to 'char[][]'" "true"
 class A extends B {
     void m() {
         myArr = new String[][]{{<caret>'a'}};
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableParameterizedType/after1.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableParameterizedType/after1.java
index ea910a3..7c815dc 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableParameterizedType/after1.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableParameterizedType/after1.java
@@ -1,4 +1,4 @@
-// "Change 'i' type to 'a.i.ii<java.lang.String>'" "true"
+// "Change variable 'i' type to 'a.i.ii<java.lang.String>'" "true"
 class a
 {
   class i {
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableParameterizedType/before1.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableParameterizedType/before1.java
index defc656..74da8a6 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableParameterizedType/before1.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableParameterizedType/before1.java
@@ -1,4 +1,4 @@
-// "Change 'i' type to 'a.i.ii<java.lang.String>'" "true"
+// "Change variable 'i' type to 'a.i.ii<java.lang.String>'" "true"
 class a
 {
   class i {
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableParameterizedType/before2.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableParameterizedType/before2.java
index 88cad2e..c3533aa 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableParameterizedType/before2.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableParameterizedType/before2.java
@@ -1,4 +1,4 @@
-// "Change 's' type to 'O.f<java.lang.String>'" "false"
+// "Change variable 's' type to 'O.f<java.lang.String>'" "false"
 
 class O {
 
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/after1.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/after1.java
index a588bf7..4a73de6 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/after1.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/after1.java
@@ -1,4 +1,4 @@
-// "Change 'i' type to 'double'" "true"
+// "Change variable 'i' type to 'double'" "true"
 import java.io.*;
 
 class a {
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/after2.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/after2.java
index 3ee033e..d2f02db 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/after2.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/after2.java
@@ -1,4 +1,4 @@
-// "Change 'i' type to 'java.lang.String'" "true"
+// "Change variable 'i' type to 'java.lang.String'" "true"
 import java.io.*;
 
 class a {
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/after3.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/after3.java
index 61d52c1..e29ef26 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/after3.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/after3.java
@@ -1,4 +1,4 @@
-// "Change 'i' type to 'char'" "true"
+// "Change variable 'i' type to 'char'" "true"
 import java.io.*;
 
 class a {
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/after4.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/after4.java
index d7b4163..4b4f439 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/after4.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/after4.java
@@ -1,4 +1,4 @@
-// "Change 's' type to 'java.lang.Runnable'" "true"
+// "Change field 's' type to 'java.lang.Runnable'" "true"
 
 class a {
     Runnable s = new Runnable() {
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/after5.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/after5.java
index 6a7f841..84d6850 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/after5.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/after5.java
@@ -1,4 +1,4 @@
-// "Change 'i' type to 'java.lang.String'" "true"
+// "Change parameter 'i' type to 'java.lang.String'" "true"
 
 class Base {
  void foo(String i) {}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/afterInCall.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/afterInCall.java
index 35b2904..f707135 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/afterInCall.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/afterInCall.java
@@ -1,4 +1,4 @@
-// "Change 'i' type to 'java.lang.String'" "true"
+// "Change parameter 'i' type to 'java.lang.String'" "true"
 
 class Ex{
  void foo(String i) {
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/before1.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/before1.java
index 4e8742b..245c148 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/before1.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/before1.java
@@ -1,4 +1,4 @@
-// "Change 'i' type to 'double'" "true"
+// "Change variable 'i' type to 'double'" "true"
 import java.io.*;
 
 class a {
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/before2.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/before2.java
index 6b80da6..9591611 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/before2.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/before2.java
@@ -1,4 +1,4 @@
-// "Change 'i' type to 'java.lang.String'" "true"
+// "Change variable 'i' type to 'java.lang.String'" "true"
 import java.io.*;
 
 class a {
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/before3.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/before3.java
index f94ad9a..de69713 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/before3.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/before3.java
@@ -1,4 +1,4 @@
-// "Change 'i' type to 'char'" "true"
+// "Change variable 'i' type to 'char'" "true"
 import java.io.*;
 
 class a {
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/before4.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/before4.java
index 6265e56..b93daef 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/before4.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/before4.java
@@ -1,4 +1,4 @@
-// "Change 's' type to 'java.lang.Runnable'" "true"
+// "Change field 's' type to 'java.lang.Runnable'" "true"
 
 class a {
     String s = <caret>new Runnable() {
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/before5.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/before5.java
index 7ead738..e2ce5b4 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/before5.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/before5.java
@@ -1,4 +1,4 @@
-// "Change 'i' type to 'java.lang.String'" "true"
+// "Change parameter 'i' type to 'java.lang.String'" "true"
 
 class Base {
  void foo(int i) {}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/beforeInCall.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/beforeInCall.java
index 92a32c9..4c4999a 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/beforeInCall.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/beforeInCall.java
@@ -1,4 +1,4 @@
-// "Change 'i' type to 'java.lang.String'" "true"
+// "Change parameter 'i' type to 'java.lang.String'" "true"
 
 class Ex{
  void foo(int i) {
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/beforeInLibCall.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/beforeInLibCall.java
index 337af8a..62fde5e 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/beforeInLibCall.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/variableType/beforeInLibCall.java
@@ -1,4 +1,4 @@
-// "Change 'i' type to 'long'" "false"
+// "Change parameter 'i' type to 'long'" "false"
 
 class M extends Thread {
   @Override
diff --git a/java/java-tests/testData/codeInsight/generation/javaMethodsOverridingStatistics/Methods.java b/java/java-tests/testData/codeInsight/generation/javaMethodsOverridingStatistics/Methods.java
new file mode 100644
index 0000000..b7c36e9
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/generation/javaMethodsOverridingStatistics/Methods.java
@@ -0,0 +1,30 @@
+import java.lang.Override;
+import java.lang.String;
+
+class BaseClass {
+  public void method() {
+    //do nothing
+  }
+
+  public void method2() {
+
+  }
+}
+
+class ClassEx1 extends BaseClass {
+  @Override
+  public void method() {
+  }
+}
+
+class ClassEx2 extends BaseClass {
+  public void method() {
+  }
+
+  public void method(String aString) {
+  }
+}
+
+class MyClass extends B<caret>aseClass {
+
+}
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/generation/javaMethodsOverridingStatistics/Methods2.java b/java/java-tests/testData/codeInsight/generation/javaMethodsOverridingStatistics/Methods2.java
new file mode 100644
index 0000000..931d40b
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/generation/javaMethodsOverridingStatistics/Methods2.java
@@ -0,0 +1,31 @@
+import java.lang.Override;
+import java.lang.String;
+
+class BaseClass {
+  public void method() {
+    //do nothing
+  }
+
+  public void method(String s) {
+    //do nothing
+  }
+}
+
+class ClassEx1 extends BaseClass {
+  @Override
+  public void method() {
+  }
+
+  @Override
+  public void method(String s) {
+  }
+}
+
+class ClassEx2 extends BaseClass {
+  public void method() {
+  }
+}
+
+class MyClass extends B<caret>aseClass {
+
+}
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/generation/javaMethodsOverridingStatistics/Methods3.java b/java/java-tests/testData/codeInsight/generation/javaMethodsOverridingStatistics/Methods3.java
new file mode 100644
index 0000000..d79ab2f
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/generation/javaMethodsOverridingStatistics/Methods3.java
@@ -0,0 +1,39 @@
+import java.lang.Override;
+import java.lang.String;
+
+class BaseClass {
+  public void method() {
+    //do nothing
+  }
+
+  public void method(String s) {
+    //do nothing
+  }
+}
+
+class ClassEx1 extends BaseClass {
+  @Override
+  public void method() {
+  }
+
+  @Override
+  public void method(String s) {
+  }
+
+  public void method2() {
+  }
+}
+
+class ClassEx11 extends ClassEx1 {
+  public void method2() {
+  }
+}
+
+class ClassEx2 extends BaseClass {
+  public void method() {
+  }
+}
+
+class MyClass extends Cl<caret>assEx1 {
+
+}
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/generation/javaMethodsOverridingStatistics/Methods4.java b/java/java-tests/testData/codeInsight/generation/javaMethodsOverridingStatistics/Methods4.java
new file mode 100644
index 0000000..0295f9f
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/generation/javaMethodsOverridingStatistics/Methods4.java
@@ -0,0 +1,40 @@
+import java.lang.Override;
+import java.lang.String;
+
+class BaseClass {
+  public void method() {
+    //do nothing
+  }
+
+  public void method(String s) {
+    //do nothing
+  }
+}
+
+class ClassEx1 extends BaseClass {
+  @Override
+  public void method(String s) {
+  }
+
+  public void method2() {
+  }
+}
+
+class ClassEx11 extends ClassEx1 {
+  public void method2() {
+  }
+}
+
+class ClassEx2 extends BaseClass {
+  public void method() {
+  }
+}
+
+class ClassEx3 extends BaseClass {
+  public void method() {
+  }
+}
+
+class MyClass extends Cl<caret>assEx1 {
+
+}
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/generation/javaMethodsOverridingStatistics/Methods5.java b/java/java-tests/testData/codeInsight/generation/javaMethodsOverridingStatistics/Methods5.java
new file mode 100644
index 0000000..a330bf3
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/generation/javaMethodsOverridingStatistics/Methods5.java
@@ -0,0 +1,63 @@
+import java.lang.Override;
+import java.lang.String;
+
+class BaseClass {
+  public void method() {
+    //do nothing
+  }
+
+  public void method(String s) {
+    //do nothing
+  }
+}
+
+class ClassEx2 extends BaseClass {
+  public void method() {
+  }
+}
+
+class ClassEx3 extends BaseClass {
+  public void method() {
+  }
+}
+
+class ClassEx1 extends BaseClass {
+  @Override
+  public void method(String s) {
+  }
+
+  public void method2() {
+  }
+}
+
+class ClassEx11 extends ClassEx1 {
+  @Override
+  public void method(String s) {
+  }
+
+  public void method2() {
+  }
+}
+
+class ClassEx12 extends ClassEx1 {
+  @Override
+  public void method(String s) {
+  }
+
+  public void method2() {
+  }
+}
+
+class ClassEx13 extends ClassEx1 {
+  @Override
+  public void method(String s) {
+  }
+
+  public void method2() {
+  }
+}
+
+
+class MyClass extends Cl<caret>assEx1 {
+
+}
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/invertIfCondition/afterParenthesis.java b/java/java-tests/testData/codeInsight/invertIfCondition/afterParenthesis.java
new file mode 100644
index 0000000..19bb377
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/invertIfCondition/afterParenthesis.java
@@ -0,0 +1,10 @@
+// "Invert If Condition" "true"
+class A {
+    public boolean foo(boolean a, boolean b, boolean c, boolean d) {
+
+        if ((a || b) && !c && !d) {
+            return true;
+        }
+        return false;
+    }
+}
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/invertIfCondition/beforeParenthesis.java b/java/java-tests/testData/codeInsight/invertIfCondition/beforeParenthesis.java
new file mode 100644
index 0000000..269790e
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/invertIfCondition/beforeParenthesis.java
@@ -0,0 +1,9 @@
+// "Invert If Condition" "true"
+class A {
+    public boolean foo(boolean a, boolean b, boolean c, boolean d) {
+
+      if (!(a |<caret>| b) || c || d)
+        return false;
+      return true;
+    }
+}
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/javadocIG/literal.html b/java/java-tests/testData/codeInsight/javadocIG/literal.html
new file mode 100644
index 0000000..bc3d265
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/javadocIG/literal.html
@@ -0,0 +1,2 @@
+<html><head>    <style type="text/css">        #error {            background-color: #eeeeee;            margin-bottom: 10px;        }        p {            margin: 5px 0;        }    </style></head><body><small><b><a href="psi_element://Foo"><code>Foo</code></a></b></small><PRE>int <b>foo</b></PRE>
+     foo&lt;&gt;</body></html>
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/javadocIG/literal.java b/java/java-tests/testData/codeInsight/javadocIG/literal.java
new file mode 100644
index 0000000..a6413f5
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/javadocIG/literal.java
@@ -0,0 +1,6 @@
+class Foo {
+  /**
+   * foo{@literal <>}
+   */
+  int foo;
+}
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/overrideImplement/afterRawInheritance.java b/java/java-tests/testData/codeInsight/overrideImplement/afterRawInheritance.java
new file mode 100644
index 0000000..75297f7
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/overrideImplement/afterRawInheritance.java
@@ -0,0 +1,11 @@
+class Obj<T> {}
+abstract class A1<X>{
+    abstract void foo(Obj<String> x);
+}
+
+class B1 extends A1{
+    @Override
+    void foo(Obj x) {
+        <caret>
+    }
+}
diff --git a/java/java-tests/testData/codeInsight/overrideImplement/beforeRawInheritance.java b/java/java-tests/testData/codeInsight/overrideImplement/beforeRawInheritance.java
new file mode 100644
index 0000000..f546cae
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/overrideImplement/beforeRawInheritance.java
@@ -0,0 +1,8 @@
+class Obj<T> {}
+abstract class A1<X>{
+    abstract void foo(Obj<String> x);
+}
+
+class B1 extends A1{
+  <caret>
+}
diff --git a/java/java-tests/testData/inspection/dataFlow/fixture/EqualsHasNoSideEffects.java b/java/java-tests/testData/inspection/dataFlow/fixture/EqualsHasNoSideEffects.java
index 20d33e1..a3780aa 100644
--- a/java/java-tests/testData/inspection/dataFlow/fixture/EqualsHasNoSideEffects.java
+++ b/java/java-tests/testData/inspection/dataFlow/fixture/EqualsHasNoSideEffects.java
@@ -13,7 +13,7 @@
       else if (((user == null && <warning descr="Condition 'identifier.user == null' is always 'true' when reached">identifier.user == null</warning>)
                 || (this.user.equals(identifier.user)))
                &&
-               ((requestorClass == null && <warning descr="Condition 'identifier.requestorClass == null' is always 'true' when reached">identifier.requestorClass == null</warning>)
+               ((requestorClass == null && identifier.requestorClass == null)
                 || this.requestorClass.equals(identifier.requestorClass)))
         return true;
       else
diff --git a/java/java-tests/testData/inspection/dataFlow/fixture/FieldChangedBetweenSynchronizedBlocks.java b/java/java-tests/testData/inspection/dataFlow/fixture/FieldChangedBetweenSynchronizedBlocks.java
index 411e3a0..63e606b 100644
--- a/java/java-tests/testData/inspection/dataFlow/fixture/FieldChangedBetweenSynchronizedBlocks.java
+++ b/java/java-tests/testData/inspection/dataFlow/fixture/FieldChangedBetweenSynchronizedBlocks.java
@@ -12,7 +12,7 @@
       if (field != null) {
         return;
       }
-      if (<warning descr="Condition 'field == null' is always 'true'">field == null</warning>) {
+      if (field == null) {
         System.out.println();
       }
     }
diff --git a/java/java-tests/testData/inspection/dataFlow/fixture/MutableNotAnnotatedFieldsTreatment.java b/java/java-tests/testData/inspection/dataFlow/fixture/MutableNotAnnotatedFieldsTreatment.java
index c542ba8..038315f 100644
--- a/java/java-tests/testData/inspection/dataFlow/fixture/MutableNotAnnotatedFieldsTreatment.java
+++ b/java/java-tests/testData/inspection/dataFlow/fixture/MutableNotAnnotatedFieldsTreatment.java
@@ -54,12 +54,12 @@
     System.out.println(data.hashCode());
   }
 
-  void warnWhenDoubleChecked_This_WithMethodCall() {
+  void doNotWarnWhenDoubleChecked_This_WithMethodCall() {
     if (data == null) {
       return;
     }
     System.out.println(data.hashCode());
-    if (<warning descr="Condition 'data == null' is always 'false'">data == null</warning>) {
+    if (data == null) {
       return;
     }
     System.out.println(data.hashCode());
diff --git a/java/java-tests/testData/inspection/dataFlow/fixture/MutableNullableFieldsTreatment.java b/java/java-tests/testData/inspection/dataFlow/fixture/MutableNullableFieldsTreatment.java
index 107d11f..282c63e 100644
--- a/java/java-tests/testData/inspection/dataFlow/fixture/MutableNullableFieldsTreatment.java
+++ b/java/java-tests/testData/inspection/dataFlow/fixture/MutableNullableFieldsTreatment.java
@@ -56,12 +56,12 @@
     System.out.println(data.hashCode());
   }
   
-  void warnWhenDoubleChecked_This_WithMethodCall() {
+  void doNotWarnWhenDoubleChecked_This_WithMethodCall() {
     if (data == null) {
       return;
     }
     System.out.println(data.hashCode());
-    if (<warning descr="Condition 'data == null' is always 'false'">data == null</warning>) {
+    if (data == null) {
       return;
     }
     System.out.println(data.hashCode());
diff --git a/java/java-tests/testData/inspection/dataFlow/fixture/NotNullPrimitive.java b/java/java-tests/testData/inspection/dataFlow/fixture/NotNullPrimitive.java
new file mode 100644
index 0000000..d76f214
--- /dev/null
+++ b/java/java-tests/testData/inspection/dataFlow/fixture/NotNullPrimitive.java
@@ -0,0 +1,24 @@
+import org.jetbrains.annotations.NotNull;
+
+class Foo {
+  public int getValue() {
+    return 5;
+  }
+
+  public void nullcheck() {
+    Integer x = getValue();
+    System.out.println(<warning descr="Condition 'x == null' is always 'false'">x == null</warning> ? "NULL" : Integer.toHexString(x));
+  }
+}
+
+class Bar {
+  @NotNull
+  public Integer getValue() {
+    return 5;
+  }
+
+  public void nullcheck() {
+    Integer x = getValue();
+    System.out.println(<warning descr="Condition 'x == null' is always 'false'">x == null</warning> ? "NULL" : Integer.toHexString(x));
+  }
+}
diff --git a/java/java-tests/testData/inspection/dataFlow/fixture/OtherCallMayChangeFields.java b/java/java-tests/testData/inspection/dataFlow/fixture/OtherCallMayChangeFields.java
new file mode 100644
index 0000000..9b7ee85
--- /dev/null
+++ b/java/java-tests/testData/inspection/dataFlow/fixture/OtherCallMayChangeFields.java
@@ -0,0 +1,26 @@
+class Ref {
+  int i;
+  Object obj;
+}
+
+class Modifier {
+  void foo(Ref r) { r.i = 239; r.obj = null; }
+}
+
+class Test {
+  void foo(Ref r, Modifier m) {
+    if (r.i == 0) {
+      m.foo(r);
+      if (r.i == 0) {
+        return;
+      }
+    }
+    if (r.obj == null) {
+      m.foo(r);
+      if (r.obj == null) {
+        return;
+      }
+    }
+  }
+
+}
\ No newline at end of file
diff --git a/java/java-tests/testData/inspection/dataFlow/fixture/StringConcatAlwaysNotNull.java b/java/java-tests/testData/inspection/dataFlow/fixture/StringConcatAlwaysNotNull.java
new file mode 100644
index 0000000..dd38e5a
--- /dev/null
+++ b/java/java-tests/testData/inspection/dataFlow/fixture/StringConcatAlwaysNotNull.java
@@ -0,0 +1,15 @@
+import org.jetbrains.annotations.NotNull;
+
+class X {
+  @NotNull
+  String foo() {return "";}
+
+  void bar() {
+    String o = foo();
+    o += "";
+    if (<warning descr="Condition 'o != null' is always 'true'">o != null</warning>) {
+
+    }
+  }
+
+}
\ No newline at end of file
diff --git a/java/java-tests/testData/psi/cls/mirror/ClassRefs.txt b/java/java-tests/testData/psi/cls/mirror/ClassRefs.txt
index ce11e0e..f0da4d5 100644
--- a/java/java-tests/testData/psi/cls/mirror/ClassRefs.txt
+++ b/java/java-tests/testData/psi/cls/mirror/ClassRefs.txt
@@ -5,7 +5,8 @@
 package pkg;
 
 class ClassRefs {
-    @pkg.AnnWithTypeLocal(type = java.lang.String.class)
+    @pkg.DefaultArgAnno(java.lang.String.class)
+    @pkg.NamedArgAnno(type = java.lang.String.class)
     public static final java.lang.Class<?> cls;
 
     ClassRefs() { /* compiled code */ }
diff --git a/java/java-tests/testData/psi/cls/mirror/ValuedEnum.txt b/java/java-tests/testData/psi/cls/mirror/ValuedEnum.txt
new file mode 100644
index 0000000..eec6980
--- /dev/null
+++ b/java/java-tests/testData/psi/cls/mirror/ValuedEnum.txt
@@ -0,0 +1,19 @@
+
+  // IntelliJ API Decompiler stub source generated from a class file
+  // Implementation of methods is not available
+
+package org.apache.commons.lang.enum;
+
+public abstract class ValuedEnum extends org.apache.commons.lang.enum.Enum {
+    private final int iValue;
+
+    protected ValuedEnum(java.lang.String name, int value) { /* compiled code */ }
+
+    protected static org.apache.commons.lang.enum.Enum getEnum(java.lang.Class enumClass, int value) { /* compiled code */ }
+
+    public final int getValue() { /* compiled code */ }
+
+    public int compareTo(java.lang.Object other) { /* compiled code */ }
+
+    public java.lang.String toString() { /* compiled code */ }
+}
\ No newline at end of file
diff --git a/java/java-tests/testData/psi/cls/mirror/pkg/AnnWithTypeLocal.class b/java/java-tests/testData/psi/cls/mirror/pkg/AnnWithTypeLocal.class
deleted file mode 100644
index 9252a8e..0000000
--- a/java/java-tests/testData/psi/cls/mirror/pkg/AnnWithTypeLocal.class
+++ /dev/null
Binary files differ
diff --git a/java/java-tests/testData/psi/cls/mirror/pkg/ClassRefs.class b/java/java-tests/testData/psi/cls/mirror/pkg/ClassRefs.class
index ca03e1b..693426f 100644
--- a/java/java-tests/testData/psi/cls/mirror/pkg/ClassRefs.class
+++ b/java/java-tests/testData/psi/cls/mirror/pkg/ClassRefs.class
Binary files differ
diff --git a/java/java-tests/testData/psi/cls/mirror/pkg/DefaultArgAnno.class b/java/java-tests/testData/psi/cls/mirror/pkg/DefaultArgAnno.class
new file mode 100644
index 0000000..1709f6e
--- /dev/null
+++ b/java/java-tests/testData/psi/cls/mirror/pkg/DefaultArgAnno.class
Binary files differ
diff --git a/java/java-tests/testData/psi/cls/mirror/pkg/NamedArgAnno.class b/java/java-tests/testData/psi/cls/mirror/pkg/NamedArgAnno.class
new file mode 100644
index 0000000..ae31837
--- /dev/null
+++ b/java/java-tests/testData/psi/cls/mirror/pkg/NamedArgAnno.class
Binary files differ
diff --git a/java/java-tests/testData/psi/cls/mirror/pkg/ValuedEnum.class b/java/java-tests/testData/psi/cls/mirror/pkg/ValuedEnum.class
new file mode 100644
index 0000000..5dbc74d
--- /dev/null
+++ b/java/java-tests/testData/psi/cls/mirror/pkg/ValuedEnum.class
Binary files differ
diff --git a/java/java-tests/testData/psi/cls/mirror/src/pkg/ClassRefs.java b/java/java-tests/testData/psi/cls/mirror/src/pkg/ClassRefs.java
index af3784c..9bbfe0d 100644
--- a/java/java-tests/testData/psi/cls/mirror/src/pkg/ClassRefs.java
+++ b/java/java-tests/testData/psi/cls/mirror/src/pkg/ClassRefs.java
@@ -1,10 +1,15 @@
 package pkg;
 
 class ClassRefs {
-  @AnnWithTypeLocal(type = String.class)
+  @DefaultArgAnno(String.class)
+  @NamedArgAnno(type = String.class)
   public static final Class<?> cls = String.class;  // class refs are set from class initaializer
 }
 
-@interface AnnWithTypeLocal {
-  Class type();
+@interface DefaultArgAnno {
+  Class<?> value();
+}
+
+@interface NamedArgAnno {
+  Class<?> type();
 }
diff --git a/java/java-tests/testData/refactoring/extractMethod/TargetAnonymous.java b/java/java-tests/testData/refactoring/extractMethod/TargetAnonymous.java
new file mode 100644
index 0000000..fa5180a
--- /dev/null
+++ b/java/java-tests/testData/refactoring/extractMethod/TargetAnonymous.java
@@ -0,0 +1,13 @@
+public class Foo {
+  public void update() {}
+}
+
+class FooBar {
+  {
+    Foo tm = new Foo() {
+      {
+        <selection>update()</selection>;
+      }
+    };
+  }
+}
diff --git a/java/java-tests/testData/refactoring/extractMethod/TargetAnonymous_after.java b/java/java-tests/testData/refactoring/extractMethod/TargetAnonymous_after.java
new file mode 100644
index 0000000..575b821
--- /dev/null
+++ b/java/java-tests/testData/refactoring/extractMethod/TargetAnonymous_after.java
@@ -0,0 +1,17 @@
+public class Foo {
+  public void update() {}
+}
+
+class FooBar {
+  {
+    Foo tm = new Foo() {
+      {
+        newMethod();
+      }
+
+        private void newMethod() {
+            update();
+        }
+    };
+  }
+}
diff --git a/java/java-tests/testData/refactoring/introduceParameterObject/copyJavadoc1/after/Test.java b/java/java-tests/testData/refactoring/introduceParameterObject/copyJavadoc1/after/Test.java
new file mode 100644
index 0000000..8152842
--- /dev/null
+++ b/java/java-tests/testData/refactoring/introduceParameterObject/copyJavadoc1/after/Test.java
@@ -0,0 +1,27 @@
+class Test {
+  /**
+   * foo comment
+   * @param param
+   * @param s1 long1 description1
+   */
+  void foo(Param param, String s1) {
+    bar(param.getS(), s1);
+  }
+
+  void bar(String s, String s1){}
+
+    private static class Param {
+        private final String s;
+
+        /**
+         * @param s long description
+         */
+        private Param(String s) {
+            this.s = s;
+        }
+
+        public String getS() {
+            return s;
+        }
+    }
+}
diff --git a/java/java-tests/testData/refactoring/introduceParameterObject/copyJavadoc1/before/Test.java b/java/java-tests/testData/refactoring/introduceParameterObject/copyJavadoc1/before/Test.java
new file mode 100644
index 0000000..af7c82f
--- /dev/null
+++ b/java/java-tests/testData/refactoring/introduceParameterObject/copyJavadoc1/before/Test.java
@@ -0,0 +1,12 @@
+class Test {
+  /**
+   * foo comment
+   * @param s long description
+   * @param s1 long1 description1
+   */
+  void foo(String s, String s1) {
+    bar(s, s1);
+  }
+
+  void bar(String s, String s1){}
+}
diff --git a/java/java-tests/testData/refactoring/renameInplace/Incomplete.java b/java/java-tests/testData/refactoring/renameInplace/Incomplete.java
new file mode 100644
index 0000000..78eaf1b
--- /dev/null
+++ b/java/java-tests/testData/refactoring/renameInplace/Incomplete.java
@@ -0,0 +1,3 @@
+class Klaz {
+  final static Class K = Klaz<caret>
+}
\ No newline at end of file
diff --git a/java/java-tests/testData/refactoring/renameInplace/Incomplete_after.java b/java/java-tests/testData/refactoring/renameInplace/Incomplete_after.java
new file mode 100644
index 0000000..93fbccb
--- /dev/null
+++ b/java/java-tests/testData/refactoring/renameInplace/Incomplete_after.java
@@ -0,0 +1,3 @@
+class Klazz {
+  final static Class K = Klazz<caret>
+}
\ No newline at end of file
diff --git a/java/java-tests/testData/refactoring/safeDelete/InterfaceAsTypeParameterBound.java b/java/java-tests/testData/refactoring/safeDelete/InterfaceAsTypeParameterBound.java
new file mode 100644
index 0000000..855ed15
--- /dev/null
+++ b/java/java-tests/testData/refactoring/safeDelete/InterfaceAsTypeParameterBound.java
@@ -0,0 +1,3 @@
+interface Foo1 {}
+interface FooTo<caret>Delete extends Foo1 {}
+class TypeParamOwner<B extends FooToDelete> {}
\ No newline at end of file
diff --git a/java/java-tests/testData/refactoring/safeDelete/InterfaceAsTypeParameterBound_after.java b/java/java-tests/testData/refactoring/safeDelete/InterfaceAsTypeParameterBound_after.java
new file mode 100644
index 0000000..c0c81b0
--- /dev/null
+++ b/java/java-tests/testData/refactoring/safeDelete/InterfaceAsTypeParameterBound_after.java
@@ -0,0 +1,3 @@
+interface Foo1 {}
+
+class TypeParamOwner<B extends Foo1> {}
\ No newline at end of file
diff --git a/java/java-tests/testSrc/com/intellij/TestClassesFilterTest.java b/java/java-tests/testSrc/com/intellij/TestClassesFilterTest.java
index 2a00e76..2bbdb91 100644
--- a/java/java-tests/testSrc/com/intellij/TestClassesFilterTest.java
+++ b/java/java-tests/testSrc/com/intellij/TestClassesFilterTest.java
@@ -1,49 +1,35 @@
 /*
- * Copyright (c) 2004 JetBrains s.r.o. All  Rights Reserved.
+ * Copyright 2000-2013 JetBrains s.r.o.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * -Redistributions of source code must retain the above copyright
- *  notice, this list of conditions and the following disclaimer.
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * -Redistribution in binary form must reproduct the above copyright
- *  notice, this list of conditions and the following disclaimer in
- *  the documentation and/or other materials provided with the distribution.
- *
- * Neither the name of JetBrains or IntelliJ IDEA
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
- * ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
- * OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. JETBRAINS AND ITS LICENSORS SHALL NOT
- * BE LIABLE FOR ANY DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT
- * OF OR RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THE SOFTWARE OR ITS
- * DERIVATIVES. IN NO EVENT WILL JETBRAINS OR ITS LICENSORS BE LIABLE FOR ANY LOST
- * REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
- * INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY
- * OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN
- * IF JETBRAINS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 package com.intellij;
 
 import com.intellij.openapi.diagnostic.Logger;
-import junit.framework.TestCase;
+import org.junit.Test;
 
 import java.io.ByteArrayInputStream;
-import java.io.IOException;
 import java.io.InputStreamReader;
+import java.io.UnsupportedEncodingException;
 
-public class TestClassesFilterTest extends TestCase {
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+public class TestClassesFilterTest {
   private static final Logger LOG = Logger.getInstance("#com.intellij.TestClassesFilterTest");
 
-  @SuppressWarnings({"IOResourceOpenedButNotSafelyClosed"})
-  public void test() throws IOException {
-
+  @Test
+  public void test() throws Exception {
     LOG.info("test");
 
     String filterText = "[Group1]\n" +
@@ -55,9 +41,7 @@
                         "com.intellij.package6.ExcludedTest\n" +
                         "com.intellij.package7.*package8";
 
-
-    TestClassesFilter classesFilter = GroupBasedTestClassFilter
-      .createOn(new InputStreamReader(new ByteArrayInputStream(filterText.getBytes())), "Group1");
+    TestClassesFilter classesFilter = GroupBasedTestClassFilter.createOn(getReader(filterText), "Group1");
     assertTrue(classesFilter.matches("com.intellij.package1.Test"));
     assertTrue(classesFilter.matches("com.intellij.package1.Test2"));
     assertFalse(classesFilter.matches("com.intellij.package2.Test"));
@@ -67,7 +51,6 @@
     assertFalse(classesFilter.matches("com.intellij.package3"));
     assertFalse(classesFilter.matches("com.intellij"));
     assertFalse(classesFilter.matches("com.intellij.Test"));
-
     assertFalse(classesFilter.matches("com.intellij.package5.Test"));
     assertFalse(classesFilter.matches("com.intellij.package5.Test2"));
     assertFalse(classesFilter.matches("com.intellij.package6.Test"));
@@ -76,8 +59,7 @@
     assertFalse(classesFilter.matches("com.intellij.package7.package5.package8"));
     assertFalse(classesFilter.matches("com.intellij.package7"));
 
-    classesFilter = GroupBasedTestClassFilter
-      .createOn(new InputStreamReader(new ByteArrayInputStream(filterText.getBytes())), "Group2");
+    classesFilter = GroupBasedTestClassFilter.createOn(getReader(filterText), "Group2");
     assertFalse(classesFilter.matches("com.intellij.package1.Test"));
     assertFalse(classesFilter.matches("com.intellij.package1.Test2"));
     assertFalse(classesFilter.matches("com.intellij.package2.Test"));
@@ -87,7 +69,6 @@
     assertFalse(classesFilter.matches("com.intellij.package3"));
     assertFalse(classesFilter.matches("com.intellij"));
     assertFalse(classesFilter.matches("com.intellij.Test"));
-
     assertTrue(classesFilter.matches("com.intellij.package5.Test"));
     assertTrue(classesFilter.matches("com.intellij.package5.Test2"));
     assertFalse(classesFilter.matches("com.intellij.package6.Test"));
@@ -96,14 +77,18 @@
     assertTrue(classesFilter.matches("com.intellij.package7.package5.package8"));
     assertFalse(classesFilter.matches("com.intellij.package7"));
 
-    checkForNullGroup(filterText, null);
-    checkForNullGroup(filterText, GroupBasedTestClassFilter.ALL_EXCLUDE_DEFINED);
+    classesFilter = GroupBasedTestClassFilter.createOn(getReader(filterText), null);
+    checkForNullGroup(classesFilter);
 
+    classesFilter = GroupBasedTestClassFilter.createOn(getReader(filterText), GroupBasedTestClassFilter.ALL_EXCLUDE_DEFINED);
+    checkForNullGroup(classesFilter);
   }
 
-  private static void checkForNullGroup(String filterText, String group0Name) {
-    TestClassesFilter classesFilter = GroupBasedTestClassFilter.createOn(new InputStreamReader(new ByteArrayInputStream(filterText.getBytes())), group0Name);
+  private static InputStreamReader getReader(String filterText) throws UnsupportedEncodingException {
+    return new InputStreamReader(new ByteArrayInputStream(filterText.getBytes("UTF-8")));
+  }
 
+  private static void checkForNullGroup(TestClassesFilter classesFilter) {
     assertFalse(classesFilter.matches("com.intellij.package1.Test"));
     assertFalse(classesFilter.matches("com.intellij.package1.Test2"));
     assertTrue(classesFilter.matches("com.intellij.package2.Test"));
@@ -113,7 +98,6 @@
     assertTrue(classesFilter.matches("com.intellij.package3"));
     assertTrue(classesFilter.matches("com.intellij"));
     assertTrue(classesFilter.matches("com.intellij.Test"));
-
     assertFalse(classesFilter.matches("com.intellij.package5.Test"));
     assertFalse(classesFilter.matches("com.intellij.package5.Test2"));
     assertTrue(classesFilter.matches("com.intellij.package6.Test"));
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/CopyReferenceTest.groovy b/java/java-tests/testSrc/com/intellij/codeInsight/CopyReferenceTest.groovy
index 2ec1ed6..7cc14eb 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/CopyReferenceTest.groovy
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/CopyReferenceTest.groovy
@@ -38,6 +38,28 @@
   public void testIdentifierSeparator() throws Exception { doTest(); }
   public void testMethodFromAnonymousClass() throws Exception { doTest(); }
 
+  public void testAddImport() {
+    myFixture.addClass("package foo; public class Foo {}")
+    myFixture.configureByText "a.java", "import foo.F<caret>oo;"
+    performCopy();
+    myFixture.configureByText "b.java", "class Goo { <caret> }"
+    performPaste();
+    myFixture.checkResult """import foo.Foo;
+
+class Goo { Foo }"""
+
+  }
+  
+  public void testFqnInImport() {
+    myFixture.addClass("package foo; public class Foo {}")
+    myFixture.configureByText "a.java", "import foo.F<caret>oo;"
+    performCopy();
+    myFixture.configureByText "b.java", "import <caret>"
+    performPaste();
+    myFixture.checkResult """import foo.Foo<caret>"""
+
+  }
+
   public void testCopyFile() throws Exception {
     PsiFile psiFile = myFixture.addFileToProject("x/x.txt", "");
     assertTrue(CopyReferenceAction.doCopy(psiFile, getProject()));
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/OverrideImplementTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/OverrideImplementTest.java
index 3ed1526..95de823 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/OverrideImplementTest.java
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/OverrideImplementTest.java
@@ -65,6 +65,7 @@
   public void testErasureWildcard() { doTest(false); }
   public void testMultipleInterfaceInheritance() { doTest(false); }
   public void testResolveTypeParamConflict() { doTest(false); }
+  public void testRawInheritance() { doTest(false); }
 
   public void testImplementExtensionMethods() { doTest8(false, true); }
   public void testOverrideExtensionMethods() { doTest8(false, false); }
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/completion/JavaAutoPopupTest.groovy b/java/java-tests/testSrc/com/intellij/codeInsight/completion/JavaAutoPopupTest.groovy
index 11cfb31..226dbfb 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/completion/JavaAutoPopupTest.groovy
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/completion/JavaAutoPopupTest.groovy
@@ -385,50 +385,64 @@
     assert !lookup
   }
 
-  void testArrow(boolean up, boolean cycleScrolling, boolean lookupAbove, int index) {
-    myFixture.configureByText("a.java", """
-    class A {
-      { ArrayIndexOutOfBoundsException <caret> }
-    }
-    """)
+  void testArrows(String toType, int indexDown, int indexUp) {
+    Closure checkArrow = { String action, int expectedIndex ->
+      myFixture.configureByText("a.java", """
+      class A {
+        void foo() {}
+        void farObject() {}
+        void fzrObject() {}
+        { <caret> }
+      }
+      """)
 
-    type 'ind'
-    assert lookup
-    assert !lookup.focused
-    assert lookup.items.size() == 2
+      type toType
+      assert lookup
+      assert !lookup.focused
 
-    lookup.positionedAbove = lookupAbove
-    UISettings.instance.CYCLE_SCROLLING = cycleScrolling
-
-    def action = up ? IdeActions.ACTION_EDITOR_MOVE_CARET_UP : IdeActions.ACTION_EDITOR_MOVE_CARET_DOWN
-    try {
       edt { myFixture.performEditorAction(action) }
       if (lookup) {
         assert lookup.focused
-        assert index >= 0
-        assert lookup.items[index] == lookup.currentItem
+        assert expectedIndex >= 0
+        assert lookup.items[expectedIndex] == lookup.currentItem
         edt { lookup.hide() }
       } else {
-        assert index == -1
+        assert expectedIndex == -1
       }
       type '\b'
     }
+
+    checkArrow(IdeActions.ACTION_EDITOR_MOVE_CARET_UP, indexUp)
+    checkArrow(IdeActions.ACTION_EDITOR_MOVE_CARET_DOWN, indexDown)
+  }
+
+  public void "test vertical arrows in non-focused lookup"() {
+    String toType = "ArrayIndexOutOfBoundsException ind"
+    testArrows toType, 0, 1
+
+    UISettings.instance.CYCLE_SCROLLING = false
+    try {
+      testArrows toType, 0, -1
+    }
     finally {
       UISettings.instance.CYCLE_SCROLLING = true
     }
-
   }
 
-  void testArrows(boolean cycleScrolling, boolean lookupAbove, int indexDown, int indexUp) {
-    testArrow true, cycleScrolling, lookupAbove, indexUp
-    testArrow false, cycleScrolling, lookupAbove, indexDown
-  }
+  public void "test vertical arrows in semi-focused lookup"() {
+    CodeInsightSettings.instance.SELECT_AUTOPOPUP_SUGGESTIONS_BY_CHARS = false
+    UISettings.getInstance().SORT_LOOKUP_ELEMENTS_LEXICOGRAPHICALLY = true
 
-  public void testVerticalArrows() {
-    testArrows false, false, 0, -1
-    testArrows false, true, 0, -1
-    testArrows true, false, 0, 1
-    testArrows true, true, 0, 1
+    String toType = "fo"
+    testArrows toType, 2, 0
+
+    UISettings.instance.CYCLE_SCROLLING = false
+    try {
+      testArrows toType, 2, 0
+    }
+    finally {
+      UISettings.instance.CYCLE_SCROLLING = true
+    }
   }
 
   public void testHideOnOnePrefixVariant() {
@@ -517,7 +531,7 @@
     @Override
     void fillCompletionVariants(CompletionParameters parameters, CompletionResultSet result) {
       result.runRemainingContributors(parameters, true)
-      Thread.sleep 1000
+      Thread.sleep 500
     }
   }
 
@@ -634,9 +648,9 @@
   }
 
   public void testNoSingleTemplateLookup() {
-    myFixture.configureByText 'a.java', 'class Foo {{ ite<caret> }}'
-    type 'r'
-    assert !lookup
+    myFixture.configureByText 'a.java', 'class Foo { psv<caret> }'
+    type 'm'
+    assert !lookup : myFixture.lookupElementStrings
   }
 
   public void testTemplatesWithNonImportedClasses() {
@@ -666,7 +680,7 @@
 }
 """)
     type 'er '
-    assert myFixture.editor.document.text.contains('iter ')
+    assert !myFixture.editor.document.text.contains('for ')
   }
 
   public void testNewClassParenthesis() {
@@ -780,24 +794,21 @@
 
   private void joinSomething(int degree) {
     if (degree == 0) return
-    joinAlarm()
+    joinCommit()
     if (degree == 1) return
     joinCommit()
     if (degree == 2) return
-    joinCommit()
-    if (degree == 3) return
     edt {}
-    if (degree == 4) return
+    if (degree == 3) return
     joinCompletion()
   }
 
   public void testEveryPossibleWayToTypeIf() {
     def src = "class Foo { { int ifa; <caret> } }"
     def result = "class Foo { { int ifa; if <caret> } }"
-    int actions = 5
+    int actions = 4
 
     for (a1 in 0..actions) {
-      println "a1 = $a1"
       for (a2 in 0..actions) {
         myFixture.configureByText("$a1 $a2 .java", src)
         myFixture.type 'i'
@@ -1140,9 +1151,7 @@
     myFixture.addClass("package bar; public class Abcdefg {}")
     myFixture.configureByText 'a.java', 'class Foo extends <caret>'
     type 'Abcde'
-    assert lookup.items.size() == 1
-    type ' '
-    myFixture.checkResult 'class Foo extends Abcdefg <caret>'
+    assert lookup.items.size() == 2
   }
 
   public void testClassNameInProperties() {
@@ -1186,8 +1195,8 @@
   public void testAmbiguousClassQualifier() {
     myFixture.addClass("package foo; public class Util<T> { public static void foo() {}; public static final int CONSTANT = 2; }")
     myFixture.addClass("package bar; public class Util { public static void bar() {} }")
-    myFixture.configureByText 'a.java', 'class Foo {{ <caret> }}'
-    type 'Util.'
+    myFixture.configureByText 'a.java', 'class Foo {{ Util<caret> }}'
+    type '.'
     assert myFixture.lookupElementStrings == ['Util.bar', 'Util.CONSTANT', 'Util.foo']
 
     def p = LookupElementPresentation.renderElement(myFixture.lookupElements[1])
@@ -1231,7 +1240,7 @@
 }
 '''
     type 'File('
-    assert myFixture.file.text.contains('new File()')
+    assert myFixture.editor.document.text.contains('new File()')
   }
 
   public void "test inaccessible class in another package shouldn't prevent choosing by space"() {
@@ -1289,7 +1298,7 @@
     type 'System.out.pr'
     assert lookup.currentItem.lookupString == 'println'
     type '\n2'
-    assert myFixture.file.text.contains('.println();2')
+    assert myFixture.editor.document.text.contains('.println();2')
   }
 
   public void testQuickBackspaceEnter() {
@@ -1312,10 +1321,6 @@
     myTester.joinAutopopup()
   }
 
-  protected def joinAlarm() {
-    myTester.joinAlarm()
-  }
-
   public void "test new primitive array in Object variable"() {
     CodeInsightSettings.instance.COMPLETION_CASE_SENSITIVE = CodeInsightSettings.NONE
     myFixture.configureByText 'a.java', '''
@@ -1402,7 +1407,37 @@
 '''
     type 'sette'
     myFixture.assertPreferredCompletionItems 1, 'setHorizontalText', 'setText'
+    edt { myFixture.performEditorAction IdeActions.ACTION_EDITOR_MOVE_CARET_UP }
+    myFixture.assertPreferredCompletionItems 0, 'setHorizontalText', 'setText'
   }
 
+  public void "test pressing enter while autopopup is calculating variants should cancel autopopup"() {
+    registerContributor(LongContributor, LoadingOrder.FIRST)
+    myFixture.configureByText "a.java", "class Foo {{ <caret> }}"
+    myFixture.type('a')
+    joinAutopopup()
+    type('\n')
+    assert !lookup
+  }
+
+  public void "test pressing enter and a letter while autopopup is calculating variants should restart autopopup"() {
+    registerContributor(LongContributor, LoadingOrder.FIRST)
+    myFixture.configureByText "a.java", "class Foo {{ <caret> }}"
+    myFixture.type('a')
+    joinAutopopup()
+    myFixture.type('\na')
+    joinCompletion()
+    assert lookup
+  }
+
+  public void "test a random write action shouldn't cancel autopopup"() {
+    registerContributor(LongContributor, LoadingOrder.FIRST)
+    myFixture.configureByText "a.java", "class Foo {{ <caret> }}"
+    myFixture.type('a')
+    joinAutopopup()
+    edt { ApplicationManager.application.runWriteAction {} }
+    joinCompletion()
+    assert lookup
+  }
 
 }
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/completion/NormalCompletionTest.groovy b/java/java-tests/testSrc/com/intellij/codeInsight/completion/NormalCompletionTest.groovy
index 0ce04d2..4882f8b 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/completion/NormalCompletionTest.groovy
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/completion/NormalCompletionTest.groovy
@@ -536,7 +536,11 @@
   }
 
   public void testNoThisInComment() throws Throwable { doAntiTest() }
-  public void testIncNull() throws Throwable { doAntiTest() }
+  public void testIncNull() throws Throwable {
+    configure()
+    checkResultByFile(getTestName(false) + ".java")
+    assert !('null' in myFixture.lookupElementStrings)
+  }
 
   public void testLastExpressionInFor() throws Throwable { doTest(); }
 
@@ -1363,6 +1367,32 @@
 }}'''
   }
 
+  public void "test complete lowercase class name"() {
+    myFixture.addClass("package foo; public class myClass {}")
+    myFixture.configureByText "a.java", """
+class Foo extends my<caret>
+"""
+    myFixture.completeBasic()
+    myFixture.type('\n')
+    myFixture.checkResult '''import foo.myClass;
 
+class Foo extends myClass
+'''
+  }
+
+  public void "test don't show static inner class after instance qualifier"() {
+    myFixture.configureByText "a.java", """
+class Foo {
+  static class Inner {}
+}
+class Bar {
+  void foo(Foo f) {
+    f.<caret>
+  }
+}  
+"""
+    myFixture.completeBasic()
+    assert !('Inner' in myFixture.lookupElementStrings)
+  }
 
 }
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/completion/SmartTypeCompletionTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/completion/SmartTypeCompletionTest.java
index a8fc06a..ed7e90d 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/completion/SmartTypeCompletionTest.java
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/completion/SmartTypeCompletionTest.java
@@ -613,7 +613,13 @@
     configureByTestName();
     assertStringItems("byte");
     assertEquals("[]", LookupElementPresentation.renderElement(myItems[0]).getTailText());
+  }
 
+  public void testNewByteArray2() {
+    configureByTestName();
+    assertStringItems("byte", "byte");
+    assertEquals("[]", LookupElementPresentation.renderElement(myItems[0]).getTailText());
+    assertEquals("[]{...}", LookupElementPresentation.renderElement(myItems[1]).getTailText());
   }
 
   public void testInsideStringLiteral() throws Throwable { doAntiTest(); }
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/completion/TabCompletionTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/completion/TabCompletionTest.java
index a2481a4..212ced5 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/completion/TabCompletionTest.java
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/completion/TabCompletionTest.java
@@ -14,6 +14,14 @@
     checkResultByFile("MethodLookup3_After.java");
   }
 
+  public void _testMethodCallBeforeAnnotation() {
+    String name = getTestName(false);
+    myFixture.configureByFile(name + ".java");
+    myFixture.completeBasic();
+    myFixture.type("tos\t");
+    checkResultByFile(name + "_After.java");
+  }
+
   public void testReplaceThisWithSuper() throws Throwable {
     configureByFile("ReplaceThisWithSuper.java");
     checkResultByFile("ReplaceThisWithSuper_After.java");
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/GenericsHighlightingTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/GenericsHighlightingTest.java
index ca4c17a..dd144e5 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/GenericsHighlightingTest.java
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/GenericsHighlightingTest.java
@@ -236,6 +236,9 @@
   public void testIDEA20244() throws Exception { doTest5(false);}
   public void testIDEA22005() throws Exception { doTest5(false);}
   public void testIDEA57259() throws Exception { doTest5(false);}
+  public void testIDEA107957() throws Exception { doTest6(false);}
+  public void testIDEA106964() throws Exception { doTest5(false);}
+  public void testIDEA107782() throws Exception { doTest5(false);}
   public void testInheritedWithDifferentArgsInTypeParams() throws Exception { doTest5(false);}
   public void testIllegalForwardReferenceInTypeParameterDefinition() throws Exception { doTest5(false);}
 
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/ImportHelperTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/ImportHelperTest.java
index a66134f..9761eb4 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/ImportHelperTest.java
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/ImportHelperTest.java
@@ -228,7 +228,7 @@
       ((UndoManagerImpl)UndoManager.getInstance(getProject())).clearUndoRedoQueueInTests(getFile().getVirtualFile());
       type(" ");
       backspace();
-      
+
       assertOneElement(highlightErrors());
 
       int offset = myEditor.getCaretModel().getOffset();
@@ -260,7 +260,7 @@
       ((UndoManagerImpl)UndoManager.getInstance(getProject())).clearUndoRedoQueueInTests(getFile().getVirtualFile());
       type(" ");
       backspace();
-      
+
       assertEquals(2, highlightErrors().size());
       UIUtil.dispatchAllInvocationEvents();
 
@@ -429,6 +429,30 @@
      }
    }
 
+   public void testAutoImportSkipsClassReferenceInMethodPosition() throws Throwable {
+     @NonNls String text = "package x; import java.util.HashMap; class S { HashMap<String,String> f(){ return  Hash<caret>Map <String, String >();} }  ";
+     configureByText(StdFileTypes.JAVA, text);
+
+     boolean old = CodeInsightSettings.getInstance().ADD_UNAMBIGIOUS_IMPORTS_ON_THE_FLY;
+     CodeInsightSettings.getInstance().ADD_UNAMBIGIOUS_IMPORTS_ON_THE_FLY = true;
+     DaemonCodeAnalyzerSettings.getInstance().setImportHintEnabled(true);
+
+     try {
+       List<HighlightInfo> errs = highlightErrors();
+       assertTrue(errs.size() > 1);
+
+       PsiJavaFile javaFile = (PsiJavaFile)getFile();
+       assertEquals(1, javaFile.getImportList().getAllImportStatements().length);
+
+       PsiReference ref = javaFile.findReferenceAt(getEditor().getCaretModel().getOffset());
+       ImportClassFix fix = new ImportClassFix((PsiJavaCodeReferenceElement)ref);
+       assertFalse(fix.isAvailable(getProject(), getEditor(), getFile()));
+     }
+     finally {
+        CodeInsightSettings.getInstance().ADD_UNAMBIGIOUS_IMPORTS_ON_THE_FLY = old;
+     }
+   }
+
    public void testAutoImportDoNotBreakCode() throws Throwable {
      @NonNls String text = "package x; class S {{ S.<caret>\n Runnable r; }}";
      configureByText(StdFileTypes.JAVA, text);
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/Interface8MethodsHighlightingTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/Interface8MethodsHighlightingTest.java
index e77dff3..cf99110 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/Interface8MethodsHighlightingTest.java
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/Interface8MethodsHighlightingTest.java
@@ -30,6 +30,7 @@
   public void testStaticMethodsInFunctionalInterface() { doTest(false, false); }
   public void testCyclicSubstitutor() { doTest(false, false); }
   public void testThisAccessibility() { doTest(false, false); }
+  public void testStaticMethodCalls() { doTest(false, false); }
 
   private void doTest() {
     doTest(false, false);
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/MethodRefHighlightingTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/MethodRefHighlightingTest.java
index fb83e99..c47059e 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/MethodRefHighlightingTest.java
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/MethodRefHighlightingTest.java
@@ -78,6 +78,7 @@
   public void testGetClassSpecifics() { doTest(); }
   public void testAbstractMethod() { doTest(); }
   public void testMethodRefAcceptance() { doTest(); }
+  public void testVarargsMethodRef() { doTest(); }
 
   public void testTypeParameterWithExtendsList() throws Exception {
     doTest();
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/Normal8CompletionTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/Normal8CompletionTest.java
new file mode 100644
index 0000000..bb5f0a2
--- /dev/null
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/Normal8CompletionTest.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.intellij.codeInsight.daemon.lambda;
+
+import com.intellij.JavaTestUtil;
+import com.intellij.codeInsight.completion.LightFixtureCompletionTestCase;
+import com.intellij.testFramework.LightProjectDescriptor;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * User: anna
+ */
+public class Normal8CompletionTest extends LightFixtureCompletionTestCase {
+  @NotNull
+  @Override
+  protected LightProjectDescriptor getProjectDescriptor() {
+    return JAVA_LATEST;
+  }
+
+  @Override
+  protected String getBasePath() {
+    return JavaTestUtil.getRelativeJavaTestDataPath() + "/codeInsight/daemonCodeAnalyzer/lambda/completion/normal/";
+  }
+
+  public void testSelfStaticsOnly() throws Exception {
+    configureByFile("SelfStaticsOnly.java");
+    assertStringItems("ba", "bar");
+  }
+}
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/AnnotateMethodTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/AnnotateMethodTest.java
index f285ee4..1b92a0c 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/AnnotateMethodTest.java
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/AnnotateMethodTest.java
@@ -24,7 +24,7 @@
       protected AnnotateMethodFix createAnnotateMethodFix(String defaultNotNull, String[] annotationsToRemove) {
         return new AnnotateMethodFix(defaultNotNull, annotationsToRemove){
           @Override
-          public int annotateBaseMethod(final PsiMethod method, final PsiMethod superMethod, final Project project) {
+          public int shouldAnnotateBaseMethod(final PsiMethod method, final PsiMethod superMethod, final Project project) {
             @NonNls String name = method.getName();
             int ret = name.startsWith("annotateBase") ? 0  // yes, annotate all
                       : name.startsWith("dontAnnotateBase") ? 1 // do not annotate base
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/generation/methodsOverridingStatistics/JavaMethodsOverridingStatisticsTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/generation/methodsOverridingStatistics/JavaMethodsOverridingStatisticsTest.java
new file mode 100644
index 0000000..e41125c
--- /dev/null
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/generation/methodsOverridingStatistics/JavaMethodsOverridingStatisticsTest.java
@@ -0,0 +1,77 @@
+package com.intellij.codeInsight.generation.methodsOverridingStatistics;
+
+import com.intellij.JavaTestUtil;
+import com.intellij.codeInsight.generation.OverrideImplementExploreUtil;
+import com.intellij.codeInsight.generation.OverrideImplementUtil;
+import com.intellij.codeInsight.generation.PsiMethodWithOverridingPercentMember;
+import com.intellij.openapi.util.Pair;
+import com.intellij.psi.PsiClass;
+import com.intellij.psi.infos.CandidateInfo;
+import com.intellij.testFramework.fixtures.JavaCodeInsightFixtureTestCase;
+import com.intellij.util.containers.ContainerUtil;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
+ */
+@SuppressWarnings("unchecked")
+public class JavaMethodsOverridingStatisticsTest extends JavaCodeInsightFixtureTestCase {
+
+  @Override
+  protected String getTestDataPath() {
+    return JavaTestUtil.getJavaTestDataPath() + "/codeInsight/generation/javaMethodsOverridingStatistics/";
+  }
+
+  public void testMethods() {
+    doTest(1, pair("method", 100));
+  }
+
+  public void testMethods2() {
+    doTest(2, pair("method", 50), pair("method", 100));
+  }
+
+  public void testMethods3() {
+    doTest(1, pair("method2", 100));
+  }
+
+  public void testMethods4() {
+    doTest(2, pair("method2", 100), pair("method", 50));
+  }
+
+  public void testMethods5() {
+    doTest(3, pair("method", 100), pair("method2", 100), pair("method", 33));
+  }
+
+  private void doTest(final int resultSize, final Pair<String, Integer>... expectedValues) {
+    myFixture.configureByFile(getTestName(false) + ".java");
+
+    final PsiClass contextClass =
+      OverrideImplementUtil.getContextClass(myFixture.getProject(), myFixture.getEditor(), myFixture.getFile(), true);
+    assert contextClass != null;
+
+    if (OverrideImplementExploreUtil.getMethodSignaturesToOverride(contextClass).isEmpty() && expectedValues.length != 0) {
+      fail();
+    }
+
+    final Collection<CandidateInfo> candidateInfos = OverrideImplementExploreUtil.getMethodsToOverrideImplement(contextClass, false);
+    final PsiMethodWithOverridingPercentMember[] searchResults = PsiMethodWithOverridingPercentMember
+      .calculateOverridingPercents(candidateInfos);
+    assertSize(resultSize, searchResults);
+
+    final Set<Pair<String, Integer>> actualValues = new HashSet<Pair<String, Integer>>();
+    for (PsiMethodWithOverridingPercentMember searchResult : searchResults) {
+      actualValues.add(Pair.<String, Integer>create(searchResult.getElement().getName(), searchResult.getOverridingPercent()));
+    }
+
+    final Set<Pair<String, Integer>> expectedValuesSet = ContainerUtil.newHashSet(expectedValues);
+
+    assertEquals(expectedValuesSet, actualValues);
+  }
+
+  private static Pair<String, Integer> pair(final String methodName, final int percent) {
+    return Pair.create(methodName, percent);
+  }
+}
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/javadoc/JavaDocInfoGeneratorTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/javadoc/JavaDocInfoGeneratorTest.java
index 9fefc23..28644e9 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/javadoc/JavaDocInfoGeneratorTest.java
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/javadoc/JavaDocInfoGeneratorTest.java
@@ -64,6 +64,10 @@
     doTestField();
   }
 
+  public void testLiteral() throws Exception {
+    doTestField();
+  }
+
   public void testEnumConstantOrdinal() throws Exception {
     PsiClass psiClass = getTestClass();
     PsiField field = psiClass.getFields() [0];
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/template/LiveTemplateTest.groovy b/java/java-tests/testSrc/com/intellij/codeInsight/template/LiveTemplateTest.groovy
index 372c180..af208b0 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/template/LiveTemplateTest.groovy
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/template/LiveTemplateTest.groovy
@@ -540,4 +540,15 @@
     }
   }
 
+  public void "test expand current live template on no suggestions in lookup"() {
+    myFixture.configureByText "a.java", "class Foo {{ <caret> }}"
+    myFixture.completeBasic()
+    assert myFixture.lookup
+    myFixture.type("sout")
+    assert myFixture.lookup
+    assert myFixture.lookupElementStrings == []
+    myFixture.type('\t')
+    myFixture.checkResult "class Foo {{\n    System.out.println(<caret>); }}"
+  }
+
 }
diff --git a/java/java-tests/testSrc/com/intellij/codeInspection/DataFlowInspectionTest.java b/java/java-tests/testSrc/com/intellij/codeInspection/DataFlowInspectionTest.java
index 82650d6..fc5824c 100644
--- a/java/java-tests/testSrc/com/intellij/codeInspection/DataFlowInspectionTest.java
+++ b/java/java-tests/testSrc/com/intellij/codeInspection/DataFlowInspectionTest.java
@@ -68,7 +68,9 @@
   public void testIDEA84489() throws Throwable { doTest(); }
   public void testComparingToNotNullShouldNotAffectNullity() throws Throwable { doTest(); }
   public void testStringTernaryAlwaysTrue() throws Throwable { doTest(); }
+  public void testStringConcatAlwaysNotNull() throws Throwable { doTest(); }
 
+  public void testNotNullPrimitive() throws Throwable { doTest(); }
   public void testBoxing128() throws Throwable { doTest(); }
   public void testFinalFieldsInitializedByAnnotatedParameters() throws Throwable { doTest(); }
   public void testMultiCatch() throws Throwable { doTest(); }
@@ -147,6 +149,7 @@
   public void testMutableVolatileNullableFieldsTreatment() { doTest(); }
   public void testMutableNotAnnotatedFieldsTreatment() { doTest(); }
   public void testSuperCallMayChangeFields() { doTest(); }
+  public void testOtherCallMayChangeFields() { doTest(); }
 
   public void testMethodCallFlushesField() { doTest(); }
   public void testUnknownFloatMayBeNaN() { doTest(); }
diff --git a/java/java-tests/testSrc/com/intellij/ide/fileStructure/JavaFileStructureFilteringTest.java b/java/java-tests/testSrc/com/intellij/ide/fileStructure/JavaFileStructureFilteringTest.java
index abbb152..75c7bf1 100644
--- a/java/java-tests/testSrc/com/intellij/ide/fileStructure/JavaFileStructureFilteringTest.java
+++ b/java/java-tests/testSrc/com/intellij/ide/fileStructure/JavaFileStructureFilteringTest.java
@@ -38,10 +38,10 @@
   public void testSelectLeafFirst3()  throws Exception {checkTree("clear");}
   public void testSelectLeafFirst4()  throws Exception {checkTree("clear");}
 
-  @Bombed(user = "peter", month = Calendar.MAY, day = 10)
+  @Bombed(user = "peter", month = Calendar.JUNE, day = 10)
   public void testMatcher1()          throws Exception {checkTree("ico");}
-  @Bombed(user = "peter", month = Calendar.MAY, day = 10)
+  @Bombed(user = "peter", month = Calendar.JUNE, day = 10)
   public void testMatcher2()          throws Exception {checkTree("ico");}
-  @Bombed(user = "peter", month = Calendar.MAY, day = 10)
+  @Bombed(user = "peter", month = Calendar.JUNE, day = 10)
   public void testAnonymousMatcher2() throws Exception {checkTree("ico");}
 }
diff --git a/java/java-tests/testSrc/com/intellij/psi/ClsMirrorBuildingTest.java b/java/java-tests/testSrc/com/intellij/psi/ClsMirrorBuildingTest.java
index 14c2e29..0217607 100644
--- a/java/java-tests/testSrc/com/intellij/psi/ClsMirrorBuildingTest.java
+++ b/java/java-tests/testSrc/com/intellij/psi/ClsMirrorBuildingTest.java
@@ -42,6 +42,7 @@
   public void testEA40568() { doTest(); }
   public void testBooleans() { doTest(); }
   public void testClassRefs() { doTest(); }
+  public void testEA46236() { doTest("ValuedEnum"); }
 
   private void doTest() {
     doTest(getTestName(false));
diff --git a/java/java-tests/testSrc/com/intellij/psi/codeStyle/arrangement/JavaRearrangerSpecialRuleTest.groovy b/java/java-tests/testSrc/com/intellij/psi/codeStyle/arrangement/JavaRearrangerSpecialRuleTest.groovy
new file mode 100644
index 0000000..024f0cd
--- /dev/null
+++ b/java/java-tests/testSrc/com/intellij/psi/codeStyle/arrangement/JavaRearrangerSpecialRuleTest.groovy
@@ -0,0 +1,115 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.intellij.psi.codeStyle.arrangement
+
+import static com.intellij.psi.codeStyle.arrangement.std.StdArrangementTokens.Modifier.*
+import static com.intellij.psi.codeStyle.arrangement.std.StdArrangementTokens.Order.BY_NAME
+
+import org.junit.Before
+
+/**
+ * @author Svetlana.Zemlyanskaya
+ */
+
+class JavaRearrangerSpecialRuleTest extends AbstractJavaRearrangerTest {
+
+  @Before
+  void setUp() {
+    super.setUp()
+    commonSettings.BLANK_LINES_AROUND_METHOD = 0
+    commonSettings.BLANK_LINES_AROUND_CLASS = 0
+  }
+
+  void "test name and visibility conditions"() {
+    doTest(
+      initial: '''\
+class Test {
+  public void getI() {}
+  public void setI() {}
+  private void test() {}
+}''',
+      expected: '''\
+class Test {
+  public void setI() {}
+  public void getI() {}
+  private void test() {}
+}''',
+      rules: [rule(PUBLIC), nameRule("get.*", PUBLIC)]
+    )
+  }
+
+  void "test modifier conditions"() {
+    doTest(
+      initial: '''\
+class Test {
+  public static void a() {}
+  public voic b() {}
+}
+''',
+      expected: '''\
+class Test {
+  public voic b() {}
+  public static void a() {}
+}
+''',
+      rules: [rule(PUBLIC), rule(PUBLIC, STATIC)]
+    )
+  }
+
+  void "test multi modifier condition"() {
+    doTest(
+      initial: '''\
+class Test {
+  public abstract void a() {}
+  public static void b() {}
+  public voic c() {}
+}
+''',
+      expected: '''\
+class Test {
+  public voic c() {}
+  public static void b() {}
+  public abstract void a() {}
+}
+''',
+      rules: [rule(PUBLIC), rule(PUBLIC, STATIC), rule(PUBLIC, ABSTRACT)]
+    )
+  }
+
+  void "test modifier conditions with sort"() {
+    doTest(
+      initial: '''\
+class Test {
+  public void e() {}
+  public static void d() {}
+  public void c() {}
+  public static void b() {}
+  public void a() {}
+}
+''',
+      expected: '''\
+class Test {
+  public void a() {}
+  public void c() {}
+  public void e() {}
+  public static void b() {}
+  public static void d() {}
+}
+''',
+      rules: [ruleWithOrder(BY_NAME, rule(PUBLIC)), ruleWithOrder(BY_NAME, rule(PUBLIC, STATIC))]
+    )
+  }
+}
diff --git a/java/java-tests/testSrc/com/intellij/psi/impl/source/tree/java/JavadocParamTagsTest.java b/java/java-tests/testSrc/com/intellij/psi/impl/source/tree/java/JavadocParamTagsTest.java
index 2cb329b..5fa7fa8 100644
--- a/java/java-tests/testSrc/com/intellij/psi/impl/source/tree/java/JavadocParamTagsTest.java
+++ b/java/java-tests/testSrc/com/intellij/psi/impl/source/tree/java/JavadocParamTagsTest.java
@@ -1,6 +1,6 @@
 package com.intellij.psi.impl.source.tree.java;
 
-import com.intellij.codeInsight.CodeInsightUtilBase;
+import com.intellij.codeInsight.CodeInsightUtilCore;
 import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.command.CommandProcessor;
 import com.intellij.psi.*;
@@ -163,7 +163,7 @@
             final PsiDocTag[] tags = docComment.getTags();
             final PsiDocTag tag2 = factory.createParamTag("p2", "");
             docComment.addAfter(tag2, tags[0]);
-            docComment = CodeInsightUtilBase.forcePsiPostprocessAndRestoreElement(docComment);
+            docComment = CodeInsightUtilCore.forcePsiPostprocessAndRestoreElement(docComment);
             assertEquals(
               "/**\n" +
               " * Javadoc\n" +
diff --git a/java/java-tests/testSrc/com/intellij/refactoring/ExtractMethodTest.java b/java/java-tests/testSrc/com/intellij/refactoring/ExtractMethodTest.java
index 3191c09..3639cbd 100644
--- a/java/java-tests/testSrc/com/intellij/refactoring/ExtractMethodTest.java
+++ b/java/java-tests/testSrc/com/intellij/refactoring/ExtractMethodTest.java
@@ -583,6 +583,10 @@
     doDuplicatesTest();
   }
 
+  public void testTargetAnonymous() throws Exception {
+    doTest();
+  }
+
   private void doTestDisabledParam() throws PrepareFailedException {
     final CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(getProject());
     settings.ELSE_ON_NEW_LINE = true;
diff --git a/java/java-tests/testSrc/com/intellij/refactoring/IntroduceParameterObjectTest.java b/java/java-tests/testSrc/com/intellij/refactoring/IntroduceParameterObjectTest.java
index bd70e5d..905f87e 100644
--- a/java/java-tests/testSrc/com/intellij/refactoring/IntroduceParameterObjectTest.java
+++ b/java/java-tests/testSrc/com/intellij/refactoring/IntroduceParameterObjectTest.java
@@ -27,7 +27,7 @@
 import com.intellij.psi.*;
 import com.intellij.psi.search.GlobalSearchScope;
 import com.intellij.refactoring.introduceparameterobject.IntroduceParameterObjectProcessor;
-import com.intellij.refactoring.util.ParameterTablePanel;
+import com.intellij.refactoring.util.VariableData;
 import com.intellij.util.Function;
 import com.intellij.util.VisibilityUtil;
 
@@ -46,9 +46,9 @@
   }
 
   private void doTest(final boolean delegate, final boolean createInner) throws Exception {
-    doTest(delegate, createInner, new Function<PsiMethod, ParameterTablePanel.VariableData[]>() {
+    doTest(delegate, createInner, new Function<PsiMethod, VariableData[]>() {
       @Override
-      public ParameterTablePanel.VariableData[] fun(PsiMethod psiMethod) {
+      public VariableData[] fun(PsiMethod psiMethod) {
         return generateParams(psiMethod);
       }
     });
@@ -56,7 +56,7 @@
 
   private void doTest(final boolean delegate,
                       final boolean createInner,
-                      final Function<PsiMethod, ParameterTablePanel.VariableData[]> function) throws Exception {
+                      final Function<PsiMethod, VariableData[]> function) throws Exception {
     doTest(new PerformAction() {
       @Override
       public void performAction(final VirtualFile rootDir, final VirtualFile rootAfter) throws Exception {
@@ -65,7 +65,7 @@
         assertNotNull("Class Test not found", aClass);
 
         final PsiMethod method = aClass.findMethodsByName("foo", false)[0];
-        final ParameterTablePanel.VariableData[] datas = function.fun(method);
+        final VariableData[] datas = function.fun(method);
 
         IntroduceParameterObjectProcessor processor = new IntroduceParameterObjectProcessor("Param", "", null, method, datas, delegate, false,
                                                                                             createInner, null, false);
@@ -74,13 +74,13 @@
     });
   }
 
-  private static ParameterTablePanel.VariableData[] generateParams(final PsiMethod method) {
+  private static VariableData[] generateParams(final PsiMethod method) {
     final PsiParameter[] parameters = method.getParameterList().getParameters();
 
-    final ParameterTablePanel.VariableData[] datas = new ParameterTablePanel.VariableData[parameters.length];
+    final VariableData[] datas = new VariableData[parameters.length];
     for (int i = 0; i < parameters.length; i++) {
       PsiParameter parameter = parameters[i];
-      datas[i] = new ParameterTablePanel.VariableData(parameter);
+      datas[i] = new VariableData(parameter);
       datas[i].name = parameter.getName();
       datas[i].passAsParameter = true;
     }
@@ -132,15 +132,33 @@
   }
 
   public void testSameTypeAndVarargs() throws Exception {
-    doTest(false, false, new Function<PsiMethod, ParameterTablePanel.VariableData[]>() {
+    doTest(false, false, new Function<PsiMethod, VariableData[]>() {
       @Override
-      public ParameterTablePanel.VariableData[] fun(PsiMethod method) {
+      public VariableData[] fun(PsiMethod method) {
         final PsiParameter[] parameters = method.getParameterList().getParameters();
 
-        final ParameterTablePanel.VariableData[] datas = new ParameterTablePanel.VariableData[parameters.length - 1];
+        final VariableData[] datas = new VariableData[parameters.length - 1];
         for (int i = 0; i < parameters.length - 1; i++) {
           PsiParameter parameter = parameters[i];
-          datas[i] = new ParameterTablePanel.VariableData(parameter);
+          datas[i] = new VariableData(parameter);
+          datas[i].name = parameter.getName();
+          datas[i].passAsParameter = true;
+        }
+        return datas;
+      }
+    });
+  }
+
+  public void testCopyJavadoc1() throws Exception {
+    doTest(false, true, new Function<PsiMethod, VariableData[]>() {
+      @Override
+      public VariableData[] fun(PsiMethod method) {
+        final PsiParameter[] parameters = method.getParameterList().getParameters();
+
+        final VariableData[] datas = new VariableData[parameters.length - 1];
+        for (int i = 0; i < parameters.length - 1; i++) {
+          PsiParameter parameter = parameters[i];
+          datas[i] = new VariableData(parameter);
           datas[i].name = parameter.getName();
           datas[i].passAsParameter = true;
         }
@@ -150,16 +168,16 @@
   }
 
   public void testTypeParametersWithChosenSubtype() throws Exception {
-    doTest(false, true, new Function<PsiMethod, ParameterTablePanel.VariableData[]>() {
+    doTest(false, true, new Function<PsiMethod, VariableData[]>() {
       @Override
-      public ParameterTablePanel.VariableData[] fun(PsiMethod psiMethod) {
+      public VariableData[] fun(PsiMethod psiMethod) {
         final PsiParameter parameter = psiMethod.getParameterList().getParameters()[0];
         final PsiClass collectionClass = getJavaFacade().findClass(CommonClassNames.JAVA_UTIL_COLLECTION);
-        final ParameterTablePanel.VariableData variableData =
-          new ParameterTablePanel.VariableData(parameter, JavaPsiFacade.getElementFactory(getProject()).createType(collectionClass));
+        final VariableData variableData =
+          new VariableData(parameter, JavaPsiFacade.getElementFactory(getProject()).createType(collectionClass));
         variableData.name = parameter.getName();
         variableData.passAsParameter = true;
-        return new ParameterTablePanel.VariableData[]{variableData};
+        return new VariableData[]{variableData};
       }
     });
   }
diff --git a/java/java-tests/testSrc/com/intellij/refactoring/MakeClassStaticTest.java b/java/java-tests/testSrc/com/intellij/refactoring/MakeClassStaticTest.java
index af309f3..e8121b1 100644
--- a/java/java-tests/testSrc/com/intellij/refactoring/MakeClassStaticTest.java
+++ b/java/java-tests/testSrc/com/intellij/refactoring/MakeClassStaticTest.java
@@ -12,7 +12,7 @@
 import com.intellij.refactoring.makeStatic.MakeClassStaticProcessor;
 import com.intellij.refactoring.makeStatic.MakeStaticUtil;
 import com.intellij.refactoring.makeStatic.Settings;
-import com.intellij.refactoring.util.ParameterTablePanel;
+import com.intellij.refactoring.util.VariableData;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.ArrayList;
@@ -83,7 +83,7 @@
     PsiElement element = TargetElementUtilBase.findTargetElement(myEditor, TargetElementUtilBase.ELEMENT_NAME_ACCEPTED);
     assertTrue(element instanceof PsiClass);
     PsiClass aClass = (PsiClass)element;
-    final ArrayList<ParameterTablePanel.VariableData> parametersForFields = new ArrayList<ParameterTablePanel.VariableData>();
+    final ArrayList<VariableData> parametersForFields = new ArrayList<VariableData>();
     final boolean addClassParameter = MakeStaticUtil.buildVariableData(aClass, parametersForFields);
 
     new MakeClassStaticProcessor(
@@ -91,7 +91,7 @@
             aClass,
             new Settings(true, addClassParameter ? "anObject" : null,
                          parametersForFields.toArray(
-                           new ParameterTablePanel.VariableData[parametersForFields.size()]))).run();
+                           new VariableData[parametersForFields.size()]))).run();
     checkResultByFile(TEST_ROOT + getTestName(false) + "_after.java");
   }
 }
diff --git a/java/java-tests/testSrc/com/intellij/refactoring/MakeMethodStaticTest.java b/java/java-tests/testSrc/com/intellij/refactoring/MakeMethodStaticTest.java
index db89b94..0ef8510 100644
--- a/java/java-tests/testSrc/com/intellij/refactoring/MakeMethodStaticTest.java
+++ b/java/java-tests/testSrc/com/intellij/refactoring/MakeMethodStaticTest.java
@@ -22,7 +22,7 @@
 import com.intellij.refactoring.makeStatic.MakeMethodStaticProcessor;
 import com.intellij.refactoring.makeStatic.MakeStaticUtil;
 import com.intellij.refactoring.makeStatic.Settings;
-import com.intellij.refactoring.util.ParameterTablePanel;
+import com.intellij.refactoring.util.VariableData;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.ArrayList;
@@ -176,7 +176,7 @@
     configureByFile("/refactoring/makeMethodStatic/beforePreserveTypeParams.java");
     performWithFields();
     checkResultByFile("/refactoring/makeMethodStatic/afterPreserveTypeParams.java");
-  } 
+  }
 
   public void testInnerStaticClassUsed() throws Exception {
     configureByFile("/refactoring/makeMethodStatic/beforeInnerStaticClassUsed.java");
@@ -218,7 +218,7 @@
     PsiElement element = TargetElementUtilBase.findTargetElement(myEditor, TargetElementUtilBase.ELEMENT_NAME_ACCEPTED);
     assertTrue(element instanceof PsiMethod);
     PsiMethod method = (PsiMethod) element;
-    final ArrayList<ParameterTablePanel.VariableData> parametersForFields = new ArrayList<ParameterTablePanel.VariableData>();
+    final ArrayList<VariableData> parametersForFields = new ArrayList<VariableData>();
     final boolean addClassParameter = MakeStaticUtil.buildVariableData(method, parametersForFields);
 
     new MakeMethodStaticProcessor(
@@ -226,6 +226,6 @@
             method,
             new Settings(true, addClassParameter ? "anObject" : null,
                          parametersForFields.toArray(
-                           new ParameterTablePanel.VariableData[parametersForFields.size()]))).run();
+                           new VariableData[parametersForFields.size()]))).run();
   }
 }
diff --git a/java/java-tests/testSrc/com/intellij/refactoring/RenameDirectoryTest.groovy b/java/java-tests/testSrc/com/intellij/refactoring/RenameDirectoryTest.groovy
index 401de72..7794c69 100644
--- a/java/java-tests/testSrc/com/intellij/refactoring/RenameDirectoryTest.groovy
+++ b/java/java-tests/testSrc/com/intellij/refactoring/RenameDirectoryTest.groovy
@@ -26,12 +26,12 @@
   public void testRenameSrcRootWithTextOccurrences() {
     VirtualFile srcRoot = myFixture.tempDirFixture.findOrCreateDir("")
 
-    def fooClass = myFixture.addClass """
+    def fooClass = myFixture.addClass("""
 // PsiPackage:
 class Foo {
   String s1 = "PsiPackage:"
 }
-"""
+""")
     myFixture.configureFromExistingVirtualFile(fooClass.containingFile.virtualFile)
 
     new RenameProcessor(getProject(), psiManager.findDirectory(srcRoot), "newName", true, true).run();
diff --git a/java/java-tests/testSrc/com/intellij/refactoring/RenameMembersInplaceTest.java b/java/java-tests/testSrc/com/intellij/refactoring/RenameMembersInplaceTest.java
index 314f6ed..f72add5 100644
--- a/java/java-tests/testSrc/com/intellij/refactoring/RenameMembersInplaceTest.java
+++ b/java/java-tests/testSrc/com/intellij/refactoring/RenameMembersInplaceTest.java
@@ -40,6 +40,10 @@
     doTestInplaceRename("NEW_NAME");
   }
   
+  public void testIncomplete() throws Exception {
+    doTestInplaceRename("Klazz");
+  }
+  
   public void testConstructor() throws Exception {
     doTestInplaceRename("Bar");
   }
diff --git a/java/java-tests/testSrc/com/intellij/refactoring/SafeDeleteTest.java b/java/java-tests/testSrc/com/intellij/refactoring/SafeDeleteTest.java
index 44f927f..0cf3fc3 100644
--- a/java/java-tests/testSrc/com/intellij/refactoring/SafeDeleteTest.java
+++ b/java/java-tests/testSrc/com/intellij/refactoring/SafeDeleteTest.java
@@ -127,6 +127,10 @@
     doTest("Super");
   }
 
+  public void testInterfaceAsTypeParameterBound() throws Exception {
+    doSingleFileTest();   
+  }
+
   public void testLocalVariableSideEffect() throws Exception {
     myDoCompare = false;
     try {
diff --git a/java/java-tests/testSrc/com/intellij/refactoring/SuggestedParamTypesTest.java b/java/java-tests/testSrc/com/intellij/refactoring/SuggestedParamTypesTest.java
index 28f0935..57582d5 100644
--- a/java/java-tests/testSrc/com/intellij/refactoring/SuggestedParamTypesTest.java
+++ b/java/java-tests/testSrc/com/intellij/refactoring/SuggestedParamTypesTest.java
@@ -31,6 +31,7 @@
 import com.intellij.refactoring.ui.TypeSelectorManager;
 import com.intellij.refactoring.ui.TypeSelectorManagerImpl;
 import com.intellij.refactoring.util.ParameterTablePanel;
+import com.intellij.refactoring.util.VariableData;
 import com.intellij.testFramework.LightCodeInsightTestCase;
 import org.jetbrains.annotations.NonNls;
 import org.jetbrains.annotations.NotNull;
@@ -110,7 +111,7 @@
 
     processor.prepare();
 
-    for (final ParameterTablePanel.VariableData data : processor.getInputVariables().getInputVariables()) {
+    for (final VariableData data : processor.getInputVariables().getInputVariables()) {
       final PsiExpression[] occurrences = ParameterTablePanel.findVariableOccurrences(elements, data.variable);
       final TypeSelectorManager manager = new TypeSelectorManagerImpl(project, data.type, occurrences, true) {
         @Override
diff --git a/java/java-tests/testSrc/com/intellij/util/indexing/FileBasedIndexTest.java b/java/java-tests/testSrc/com/intellij/util/indexing/FileBasedIndexTest.java
new file mode 100644
index 0000000..426afcb
--- /dev/null
+++ b/java/java-tests/testSrc/com/intellij/util/indexing/FileBasedIndexTest.java
@@ -0,0 +1,18 @@
+package com.intellij.util.indexing;
+
+import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase;
+
+/**
+ * @author Dmitry Avdeev
+ *         Date: 5/23/13
+ */
+public class FileBasedIndexTest extends LightCodeInsightFixtureTestCase {
+
+  public void testSurviveOnFileTypeChange() throws Exception {
+    myFixture.configureByText("Foo.java", "class Foo { String bar; }");
+    myFixture.testHighlighting();
+    FileTypeIndexTest.addAndRemoveFileType();
+    myFixture.configureByText("Bar.java", "class Bar { String bar; }");
+    myFixture.testHighlighting();
+  }
+}