int sectionNumber = 0;
if (request.getParameter("section") != null && xwiki.hasSectionEdit(context)) {
sectionNumber = Integer.parseInt(request.getParameter("section"));
}
doc = doc.clone();
<BUG>String language = ((EditForm) form).getLanguage();
XWikiDocument tdoc;</BUG>
if (doc.isNew() || (language == null) || (language.equals("")) || (language.equals("default"))
|| (language.equals(doc.getDefaultLanguage()))) {
tdoc = doc;

int sectionNumber = 0;
if (request.getParameter("section") != null && xwiki.hasSectionEdit(context)) {
sectionNumber = Integer.parseInt(request.getParameter("section"));
}
doc = doc.clone();
String language = form.getLanguage();
XWikiDocument tdoc;
if (doc.isNew() || (language == null) || (language.equals("")) || (language.equals("default"))
|| (language.equals(doc.getDefaultLanguage()))) {
tdoc = doc;
