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
else
				indent= new String();
		}
		
		
		
		int lineLength= currentLine.getLength();
		int end= scanner.findNonWhitespaceForwardInAnyPartition(wsStart, offset + lineLength);
		if (end == JavaHeuristicScanner.NOT_FOUND)
			end= offset + lineLength;
		int length= end - offset;
		String currentIndent= document.get(offset, length);
		
		if (length > 0) {
			ITypedRegion partition= TextUtilities.getPartition(document, IJavaPartitions.JAVA_PARTITIONING, end, false);
			if (partition.getOffset() == end && IJavaPartitions.JAVA_SINGLE_LINE_COMMENT.equals(partition.getType())) {
				commentLines[lineIndex]= true;
			}
		}
		
		
		if (!indent.equals(currentIndent)) {
			document.replace(offset, length, indent);
			return true;
		}
		
		return false;
	}
}