===================================================================== Found a 35 line (173 tokens) duplication in the following files: Starting at line 22 of /home/tom/pmd/pmd-web/src/foedus/src/java/foedus/management/CreateUserServlet.java Starting at line 33 of /home/tom/pmd/pmd-web/src/foedus/src/java/foedus/management/ManagementServlet.java protected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { String username = req.getParameter("user"); String pass = req.getParameter("pass"); try { UserManager manager = (UserManager) getServletContext().getAttribute( "userManager"); manager.createUser(username, FileboxManager.class.getName(), pass); res.setContentType("text/html"); PrintWriter out = res.getWriter(); out.print("\r\n"); out.print("User " + username + " was created
"); out.print("\r\n"); out.close(); } catch (Exception e) { res.setStatus(res.SC_INTERNAL_SERVER_ERROR); res.setContentType("text/html"); PrintWriter out = res.getWriter(); out.print("\r\n"); out.print("Error
\r\n
");
            e.printStackTrace(out);
            out.print("

"); out.print("\r\n"); out.close(); } } } ===================================================================== Found a 32 line (129 tokens) duplication in the following files: Starting at line 17 of /home/tom/pmd/pmd-web/src/foedus/src/java/foedus/pop3/commands/ListCommand.java Starting at line 18 of /home/tom/pmd/pmd-web/src/foedus/src/java/foedus/pop3/commands/UidlCommand.java extends Pop3Command { public boolean isValidForState(Pop3State state) { return state.isAuthenticated(); } public void execute(Pop3Connection conn, Pop3State state, String cmd) { try { MailFolder inbox = state.getFolder(); String[] cmdLine = cmd.split(" "); List messages; if (cmdLine.length > 1) { String msgNumStr = cmdLine[1]; List msgList = inbox.getMessages(new MsgRangeFilter( msgNumStr, false)); if (msgList.size() != 1) { conn.println("-ERR no such message"); return; } StoredMessage msg = (StoredMessage) msgList.get(0); conn.println("+OK " + msgNumStr + " " + msg.getUID()); ===================================================================== Found a 46 line (121 tokens) duplication in the following files: Starting at line 73 of /home/tom/pmd/pmd-web/src/foedus/src/java/foedus/mailbox/filebox/MsgFlags.java Starting at line 31 of /home/tom/pmd/pmd-web/src/foedus/src/java/foedus/mailbox/FloatingFlagList.java } public boolean isRecent() { return _recent; } public boolean isDeleted() { return _deleted; } public boolean isSeen() { return _seen; } public void setDeleted(boolean deleted) { this._deleted = deleted; } public void setSeen(boolean seen) { this._seen = seen; } public String toFlagString() { StringBuffer flagBuffer = new StringBuffer(); if (isSeen()) flagBuffer.append("\\Seen "); if (isRecent()) flagBuffer.append("\\Recent "); if (isDeleted()) flagBuffer.append("\\Deleted"); return "(" + flagBuffer.toString().trim() + ")"; } } ===================================================================== Found a 27 line (106 tokens) duplication in the following files: Starting at line 17 of /home/tom/pmd/pmd-web/src/foedus/src/java/foedus/pop3/commands/RetrCommand.java Starting at line 16 of /home/tom/pmd/pmd-web/src/foedus/src/java/foedus/pop3/commands/DeleCommand.java extends Pop3Command { public boolean isValidForState(Pop3State state) { return state.isAuthenticated(); } public void execute(Pop3Connection conn, Pop3State state, String cmd) { try { MailFolder inbox = state.getFolder(); String[] cmdLine = cmd.split(" "); String msgNumStr = cmdLine[1]; List msgList = inbox.getMessages(new MsgRangeFilter( msgNumStr, false)); if (msgList.size() != 1) { conn.println("-ERR no such message"); return; } StoredMessage msg = (StoredMessage) msgList.get(0);