Bug 99725 [typing] Moving first line of header comment increases indentation
Given a class like this: /** * Header comment */ class Foo { } Put the cursor on the first line, and use Alt+Down, Alt+Up to move it down, and then up. An extra space is added in front. If you now select the entire file and use Source > Indent, the whole file is shifted one character to the right.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/IndentUtil.java
String indent= null;
		if (offset < document.getLength()) {
			ITypedRegion partition= TextUtilities.getPartition(document, IJavaPartitions.JAVA_PARTITIONING, offset, true);
			ITypedRegion startingPartition= TextUtilities.getPartition(document, IJavaPartitions.JAVA_PARTITIONING, offset, false);
			String type= partition.getType();
			if (type.equals(IJavaPartitions.JAVA_DOC) || type.equals(IJavaPartitions.JAVA_MULTI_LINE_COMMENT)) {
				
				
				
				int start= 0;
				if (line > 0) {
					IRegion previousLine= document.getLineInformation(line - 1);
					start= previousLine.getOffset() + previousLine.getLength();
				}
				DocumentCommand command= new DocumentCommand() {};
				
				command.text= "\n"; 
				command.offset= start;
				new JavaDocAutoIndentStrategy(IJavaPartitions.JAVA_PARTITIONING).customizeDocumentCommand(document, command);
				int to= 1;
				while (to < command.text.length() && Character.isWhitespace(command.text.charAt(to)))
					to++;
				indent= command.text.substring(1, to);
				
			} else if (!commentLines[lineIndex] && startingPartition.getOffset() == offset && startingPartition.getType().equals(IJavaPartitions.JAVA_SINGLE_LINE_COMMENT)) {
				
				
				int max= document.getLength() - offset;
				int slashes= 2;