<commit_before><%@ page import="org.apache.log4j.*" %>
<%@ page import="com.ecyrd.jspwiki.*" %>
<%@ page import="java.util.Calendar,java.util.Date" %>

<%! 
    public void jspInit()
    {
        wiki = WikiEngine.getInstance( getServletConfig() );
    }

    Category log = Category.getInstance("JSPWiki");
    WikiEngine wiki;

%>


<%
    String pagereq = wiki.safeGetParameter( request, "page" );
    String headerTitle = "Concurrent modification of ";

    if( pagereq == null )
    {
        throw new ServletException("No page defined");
    }

    String pageurl = wiki.encodeName( pagereq );
    String usertext = wiki.safeGetParameter( request, "text" );

    response.setContentType("text/html; charset="+wiki.getContentEncoding() );

    usertext = TextUtil.replaceString( usertext, "<", "&lt;" );
    usertext = TextUtil.replaceString( usertext, ">", "&gt;" );

    String conflicttext = wiki.getText(pagereq);

    conflicttext = TextUtil.replaceString( conflicttext, "<", "&lt;" );
    conflicttext = TextUtil.replaceString( conflicttext, ">", "&gt;" );

    log.info("Page concurrently modified "+pagereq);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">

<HTML>

<HEAD>
  <TITLE><%=wiki.getApplicationName()%> Error - Concurrent modification of <%=pagereq%></TITLE>
  <META NAME="ROBOTS" CONTENT="NOINDEX">
  <%@ include file="cssinclude.js" %>
</HEAD>

<BODY BGCOLOR="#FFFFFF">

<TABLE BORDER="0" CELLSPACING="8">

  <TR>
    <TD CLASS="leftmenu" WIDTH="15%" VALIGN="top" NOWRAP="true">
       <%@ include file="LeftMenu.jsp" %>
       <BR><BR>
       <P>
       <A HREF="<%=wiki.getBaseURL()%>Edit.jsp?page=<%=pageurl%>">Go edit <%=pagereq%></A>
       </P>
       <P>
       <%@ include file="LeftMenuFooter.jsp" %>
       </P>
    </TD>
    <TD CLASS="page" WIDTH="85%" VALIGN="top">
      <%@ include file="PageHeader.jsp" %>

      <P>
      <B>Oops!  Someone modified the page while you were editing it!</B>
      </P>

      <P>Since I am stupid and can't figure out what the difference
      between those pages is, you will need to do that for me.  I've
      printed here the text (in Wiki) of the new page, and the
      modifications you made.  You'll now need to copy the text onto a
      scratch pad (Notepad or emacs will do just fine), and then edit
      the page again.</P>

      <P>Note that when you go back into the editing mode, someone might have
      changed the page again.  So be quick.</P>

      <P><font color="#0000FF">Here is the modified text (by someone else):</FONT></P>

      <P><HR></P>

      <PRE>
        <%=conflicttext%>
      </PRE>      

      <P><HR></P>

      <P><FONT COLOR="#0000FF">And here's your text:</FONT></P>

      <PRE>
        <%=usertext%>
      </PRE>
<commit_msg>Slightly modified to provide word wrapping.<commit_after><%@ page import="org.apache.log4j.*" %>
<%@ page import="com.ecyrd.jspwiki.*" %>
<%@ page import="java.util.Calendar,java.util.Date" %>

<%! 
    public void jspInit()
    {
        wiki = WikiEngine.getInstance( getServletConfig() );
    }

    Category log = Category.getInstance("JSPWiki");
    WikiEngine wiki;

%>


<%
    String pagereq = wiki.safeGetParameter( request, "page" );
    String headerTitle = "Concurrent modification of ";

    if( pagereq == null )
    {
        throw new ServletException("No page defined");
    }

    String pageurl = wiki.encodeName( pagereq );
    String usertext = wiki.safeGetParameter( request, "text" );

    response.setContentType("text/html; charset="+wiki.getContentEncoding() );

    usertext = TextUtil.replaceString( usertext, "<", "&lt;" );
    usertext = TextUtil.replaceString( usertext, ">", "&gt;" );
    usertext = TextUtil.replaceString( usertext, "\n", "<BR />" );

    String conflicttext = wiki.getText(pagereq);

    conflicttext = TextUtil.replaceString( conflicttext, "<", "&lt;" );
    conflicttext = TextUtil.replaceString( conflicttext, ">", "&gt;" );
    conflicttext = TextUtil.replaceString( conflicttext, "\n", "<BR />" );

    log.info("Page concurrently modified "+pagereq);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">

<HTML>

<HEAD>
  <TITLE><%=wiki.getApplicationName()%> Error - Concurrent modification of <%=pagereq%></TITLE>
  <META NAME="ROBOTS" CONTENT="NOINDEX">
  <%@ include file="cssinclude.js" %>
</HEAD>

<BODY BGCOLOR="#FFFFFF">

<TABLE BORDER="0" CELLSPACING="8">

  <TR>
    <TD CLASS="leftmenu" WIDTH="15%" VALIGN="top" NOWRAP="true">
       <%@ include file="LeftMenu.jsp" %>
       <BR><BR>
       <P>
       <A HREF="<%=wiki.getBaseURL()%>Edit.jsp?page=<%=pageurl%>">Go edit <%=pagereq%></A>
       </P>
       <P>
       <%@ include file="LeftMenuFooter.jsp" %>
       </P>
    </TD>
    <TD CLASS="page" WIDTH="85%" VALIGN="top">
      <%@ include file="PageHeader.jsp" %>

      <P>
      <B>Oops!  Someone modified the page while you were editing it!</B>
      </P>

      <P>Since I am stupid and can't figure out what the difference
      between those pages is, you will need to do that for me.  I've
      printed here the text (in Wiki) of the new page, and the
      modifications you made.  You'll now need to copy the text onto a
      scratch pad (Notepad or emacs will do just fine), and then edit
      the page again.</P>

      <P>Note that when you go back into the editing mode, someone might have
      changed the page again.  So be quick.</P>

      <P><font color="#0000FF">Here is the modified text (by someone else):</FONT></P>

      <P><HR></P>

      <TT>
        <%=conflicttext%>
      </TT>      

      <P><HR></P>

      <P><FONT COLOR="#0000FF">And here's your text:</FONT></P>

      <TT>
        <%=usertext%>
      </TT>

{'fraction_non_alphanumeric': 0.16856452726017943, 'fraction_numerical': 0.007246376811594203, 'mean_word_length': 2.984192439862543, 'pattern_counts': {'":': 0, '<': 135, '<?xml version=': 0, '>': 135, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1050237', 'n_tokens_mistral': 2077, 'n_tokens_neox': 1885, 'n_words': 495}