Bug 43248 "Assign statement to local variable" removes preceeding comment [quick assist] [ast rewrite]
Consider the method public void a() { // here is a comment System.getenv("");X } where X denotes the cursor. If the quick fix "Assign statement to local variable" is used the comment disapears...
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/AssistQuickFixTest.java
List proposals= collectAssists(context, FILTER_EQ);
        
        assertNumberOf("proposals", proposals.size(), 1);
        assertCorrectLabels(proposals);
        
        CUCorrectionProposal proposal= (CUCorrectionProposal) proposals.get(0);
        String preview= proposal.getCompilationUnitChange().getPreviewContent();
        buf= new StringBuffer();
        buf.append("package test1;\n");
        buf.append("public class E {\n");
        buf.append("    public void foo() {\n");
        buf.append("        String s= \"a\";\n");
        buf.append("        \"a\".equals(s);\n");
        buf.append("    }\n");
        buf.append("}\n");
        assertEqualString(preview, buf.toString());
        
        cu= pack1.createCompilationUnit("E.java", buf.toString(), true, null);
        context= getCorrectionContext(cu, buf.toString().indexOf(str), 0);
        proposals= collectAssists(context, FILTER_EQ);
        
        assertNumberOf("proposals", proposals.size(), 1);
        assertCorrectLabels(proposals);
        
        proposal= (CUCorrectionProposal) proposals.get(0);
        preview= proposal.getCompilationUnitChange().getPreviewContent();
        buf= new StringBuffer();
        buf.append("package test1;\n");
        buf.append("public class E {\n");
        buf.append("    public void foo() {\n");