Bug 82536 Surround with doesn't use OLD ast rewrite anymore
therefore the following // SurroundWithTryCatchRefactoring still uses modifying rewrite - pass in a copy ASTParser parser= ASTParser.newParser(ASTProvider.AST_LEVEL); parser.setSource(cu); parser.setResolveBindings(true); parser.setFocalPosition(selectedNode.getStartPosition()); CompilationUnit newRoot= (CompilationUnit) parser.createAST(null); could be removed form LocalCorrectionsSubProcessor
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java
public static void getUnnecessaryElseProposals(IInvocationContext context, IProblemLocation problem, Collection proposals) {
		CompilationUnit root= context.getASTRoot();
		ASTNode selectedNode= problem.getCoveringNode(root);
		if (selectedNode == null) {
			return;
		}
		if (!(selectedNode.getParent() instanceof IfStatement)) {
			return;
		}
		IfStatement ifStatement= (IfStatement) selectedNode.getParent();
		ASTNode ifParent= ifStatement.getParent();
		if (!(ifParent instanceof Block)) {
			return;
		}
		
		ASTRewrite rewrite= ASTRewrite.create(root.getAST());
		ASTNode placeholder=QuickAssistProcessor.getCopyOfInner(rewrite, ifStatement.getElseStatement(), false);
		if (placeholder == null) {
			return;
		}
		rewrite.remove(ifStatement.getElseStatement(), null);
		
		ListRewrite listRewrite= rewrite.getListRewrite(ifParent, Block.STATEMENTS_PROPERTY);
		listRewrite.insertAfter(placeholder, ifStatement, null);
		
		String label= CorrectionMessages.getString("LocalCorrectionsSubProcessor.removeelse.description"); 
		Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);
		ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal(label, context.getCompilationUnit(), rewrite, 5, image); 
		proposals.add(proposal);
	}