Bug 27512 Auto-indent levels broken for cut and paste
On M3: 1) Double-click on the opening brace '{' of a method. 2) Cut the method body. 3) Paste the method body. Problem: indentation is mangled incorrectly.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java
try {
			if (document.getNumberOfLines() > 1)
				return document.getLineDelimiter(0);
		} catch (BadLocationException e) {
			JavaPlugin.log(e);
		}
		return System.getProperty("line.separator"); 
	}
	protected void smartPaste(IDocument document, DocumentCommand command) {
		String lineDelimiter= getLineDelimiter(document);
		try {
			String pastedText= command.text;
			Assert.isNotNull(pastedText);
			Assert.isTrue(pastedText.length() > 1);
			
			
			
			String strippedParagraph= stripIndent(pastedText, lineDelimiter);
			
			int offset= command.offset;
			int line= document.getLineOfOffset(offset);
			int lineOffset= document.getLineOffset(line);
			
			String prefix= document.get(lineOffset, offset - lineOffset);
			String blockIndent= getBlockIndent(document, command);
			String insideBlockIndent= blockIndent == null ? "" : blockIndent + createIndent(1); 
			String previousIndent= getIndent(document, command);
			String indent= calculateDisplayedWidth(insideBlockIndent) < calculateDisplayedWidth(previousIndent)
				? insideBlockIndent
				: previousIndent;