Bug 21183 Class javadoc created during "New Class" operation doesn't fill in variables properly [javadoc] [code manipulation]
If you use the enclosing_type variable in your javadoc comment template, it is not properly filled in when you make a new class (using the New Class dialog). Probably the class should be created, then after creating and saving, javadoc should be added. I suspect the variables don't have valid values yet at the time the javadoc is prepended to the class.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewTypeWizardPage.java
indent= StubUtility.getIndentUsed(enclosingType) + 1;
			}
			
			
			imports.create(false, new SubProgressMonitor(monitor, 1));
	
			ICompilationUnit cu= createdType.getCompilationUnit();	
			synchronized(cu) {
				cu.reconcile();
			}			
			createTypeMembers(createdType, new ImportsManager(imports), new SubProgressMonitor(monitor, 1));
	
			
			imports.create(false, new SubProgressMonitor(monitor, 1));
			
			synchronized(cu) {
				cu.reconcile();
			}
			ISourceRange range= createdType.getSourceRange();
			
			IBuffer buf= cu.getBuffer();
			String originalContent= buf.getText(range.getOffset(), range.getLength());
			String formattedContent= StubUtility.codeFormat(originalContent, indent, lineDelimiter);
			buf.replace(range.getOffset(), range.getLength(), formattedContent);
			if (!isInnerClass) {
				String fileComment= getFileComment(cu);
				if (fileComment != null && fileComment.length() > 0) {
					buf.replace(0, 0, fileComment + lineDelimiter);
				}
				cu.commit(false, new SubProgressMonitor(monitor, 1));