From f040c6e2d8d27680a42b7c33678ecd7fe8e00bed Mon Sep 17 00:00:00 2001
From: Kohei Tamura <ktamura.biz.80@gmail.com>
Date: Tue, 21 Mar 2017 18:28:08 +0900
Subject: [PATCH] Remove all checked exception servlets and add some unchecked
 exception servlets

---
 .../BufferOverflowExceptionServlet.java       |  40 +++++
 ...a => BufferUnderflowExceptionServlet.java} |   9 +-
 ...t.java => CannotRedoExceptionServlet.java} |   8 +-
 .../CannotUndoExceptionServlet.java           |  19 +++
 .../EmptyStackExceptionServlet.java           |  28 ++++
 .../FileNotFoundExceptionServlet.java         |  20 ---
 .../IllegalMonitorStateExceptionServlet.java  |  29 ++++
 .../IllegalPathStateExceptionServlet.java     |  20 +++
 .../IllegalStateExceptionServlet.java         |  25 +++
 .../exceptions/ImagingOpExceptionServlet.java |  24 +++
 ...ava => InputMismatchExceptionServlet.java} |   7 +-
 ...=> NegativeArraySizeExceptionServlet.java} |   7 +-
 .../NoSuchElementExceptionServlet.java        |  19 +++
 .../UnsupportedOperationExceptionServlet.java |  28 ++++
 .../IntegerOverflowServlet.java               |   2 +-
 .../LossOfTrailingDigitsServlet.java          |   2 +-
 .../RoundOffErrorServlet.java                 |   2 +-
 .../TruncationErrorServlet.java               |   2 +-
 src/main/resources/indexpage_en.properties    |  29 ++--
 src/main/resources/indexpage_ja.properties    |  29 ++--
 src/main/webapp/index.jsp                     | 158 ++++++++++--------
 21 files changed, 364 insertions(+), 143 deletions(-)
 create mode 100644 src/main/java/org/t246osslab/easybuggy/exceptions/BufferOverflowExceptionServlet.java
 rename src/main/java/org/t246osslab/easybuggy/exceptions/{IIOExceptionServlet.java => BufferUnderflowExceptionServlet.java} (66%)
 rename src/main/java/org/t246osslab/easybuggy/exceptions/{UnknownHostExceptionServlet.java => CannotRedoExceptionServlet.java} (69%)
 create mode 100644 src/main/java/org/t246osslab/easybuggy/exceptions/CannotUndoExceptionServlet.java
 create mode 100644 src/main/java/org/t246osslab/easybuggy/exceptions/EmptyStackExceptionServlet.java
 delete mode 100644 src/main/java/org/t246osslab/easybuggy/exceptions/FileNotFoundExceptionServlet.java
 create mode 100644 src/main/java/org/t246osslab/easybuggy/exceptions/IllegalMonitorStateExceptionServlet.java
 create mode 100644 src/main/java/org/t246osslab/easybuggy/exceptions/IllegalPathStateExceptionServlet.java
 create mode 100644 src/main/java/org/t246osslab/easybuggy/exceptions/IllegalStateExceptionServlet.java
 create mode 100644 src/main/java/org/t246osslab/easybuggy/exceptions/ImagingOpExceptionServlet.java
 rename src/main/java/org/t246osslab/easybuggy/exceptions/{UnsupportedEncodingExceptionServlet.java => InputMismatchExceptionServlet.java} (72%)
 rename src/main/java/org/t246osslab/easybuggy/exceptions/{MalformedURLExceptionServlet.java => NegativeArraySizeExceptionServlet.java} (74%)
 create mode 100644 src/main/java/org/t246osslab/easybuggy/exceptions/NoSuchElementExceptionServlet.java
 create mode 100644 src/main/java/org/t246osslab/easybuggy/exceptions/UnsupportedOperationExceptionServlet.java
 rename src/main/java/org/t246osslab/easybuggy/{others => troubles}/IntegerOverflowServlet.java (98%)
 rename src/main/java/org/t246osslab/easybuggy/{others => troubles}/LossOfTrailingDigitsServlet.java (98%)
 rename src/main/java/org/t246osslab/easybuggy/{others => troubles}/RoundOffErrorServlet.java (98%)
 rename src/main/java/org/t246osslab/easybuggy/{others => troubles}/TruncationErrorServlet.java (98%)

diff --git a/src/main/java/org/t246osslab/easybuggy/exceptions/BufferOverflowExceptionServlet.java b/src/main/java/org/t246osslab/easybuggy/exceptions/BufferOverflowExceptionServlet.java
new file mode 100644
index 00000000..82627402
--- /dev/null
+++ b/src/main/java/org/t246osslab/easybuggy/exceptions/BufferOverflowExceptionServlet.java
@@ -0,0 +1,40 @@
+package org.t246osslab.easybuggy.exceptions;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+import java.nio.MappedByteBuffer;
+import java.nio.channels.FileChannel;
+import java.nio.channels.FileChannel.MapMode;
+
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("serial")
+@WebServlet(urlPatterns = { "/boe" })
+public class BufferOverflowExceptionServlet extends HttpServlet {
+
+    private static final Logger log = LoggerFactory.getLogger(BufferOverflowExceptionServlet.class);
+
+    protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
+        try {
+            File f = new File("test.txt");
+            RandomAccessFile raf = new RandomAccessFile(f, "rw");
+            FileChannel ch = raf.getChannel();
+            MappedByteBuffer buf = ch.map(MapMode.READ_WRITE, 0, f.length());
+            final byte[] src = new byte[10];
+            buf.put(src);
+        } catch (FileNotFoundException e) {
+            log.error("FileNotFoundException occurs: ", e);
+        } catch (IOException e) {
+            log.error("IOException occurs: ", e);
+        }
+    }
+}
diff --git a/src/main/java/org/t246osslab/easybuggy/exceptions/IIOExceptionServlet.java b/src/main/java/org/t246osslab/easybuggy/exceptions/BufferUnderflowExceptionServlet.java
similarity index 66%
rename from src/main/java/org/t246osslab/easybuggy/exceptions/IIOExceptionServlet.java
rename to src/main/java/org/t246osslab/easybuggy/exceptions/BufferUnderflowExceptionServlet.java
index 9fbe3175..3997153a 100644
--- a/src/main/java/org/t246osslab/easybuggy/exceptions/IIOExceptionServlet.java
+++ b/src/main/java/org/t246osslab/easybuggy/exceptions/BufferUnderflowExceptionServlet.java
@@ -1,9 +1,8 @@
 package org.t246osslab.easybuggy.exceptions;
 
-import java.io.File;
 import java.io.IOException;
+import java.nio.ByteBuffer;
 
-import javax.imageio.ImageIO;
 import javax.servlet.ServletException;
 import javax.servlet.annotation.WebServlet;
 import javax.servlet.http.HttpServlet;
@@ -11,10 +10,10 @@
 import javax.servlet.http.HttpServletResponse;
 
 @SuppressWarnings("serial")
-@WebServlet(urlPatterns = { "/iioe" })
-public class IIOExceptionServlet extends HttpServlet {
+@WebServlet(urlPatterns = { "/bue" })
+public class BufferUnderflowExceptionServlet extends HttpServlet {
 
     protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
-        ImageIO.read(new File("not-exist-file-names"));
+        ByteBuffer.wrap(new byte[]{1}).getDouble();
     }
 }
diff --git a/src/main/java/org/t246osslab/easybuggy/exceptions/UnknownHostExceptionServlet.java b/src/main/java/org/t246osslab/easybuggy/exceptions/CannotRedoExceptionServlet.java
similarity index 69%
rename from src/main/java/org/t246osslab/easybuggy/exceptions/UnknownHostExceptionServlet.java
rename to src/main/java/org/t246osslab/easybuggy/exceptions/CannotRedoExceptionServlet.java
index 367bb7fb..0075d9c0 100644
--- a/src/main/java/org/t246osslab/easybuggy/exceptions/UnknownHostExceptionServlet.java
+++ b/src/main/java/org/t246osslab/easybuggy/exceptions/CannotRedoExceptionServlet.java
@@ -1,19 +1,19 @@
 package org.t246osslab.easybuggy.exceptions;
 
 import java.io.IOException;
-import java.net.URL;
 
 import javax.servlet.ServletException;
 import javax.servlet.annotation.WebServlet;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import javax.swing.undo.UndoManager;
 
 @SuppressWarnings("serial")
-@WebServlet(urlPatterns = { "/uhe" })
-public class UnknownHostExceptionServlet extends HttpServlet {
+@WebServlet(urlPatterns = { "/cre" })
+public class CannotRedoExceptionServlet extends HttpServlet {
 
     protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
-        new URL("https://nonexisting.com/nonexisting").openStream();
+        new UndoManager().redo();
     }
 }
diff --git a/src/main/java/org/t246osslab/easybuggy/exceptions/CannotUndoExceptionServlet.java b/src/main/java/org/t246osslab/easybuggy/exceptions/CannotUndoExceptionServlet.java
new file mode 100644
index 00000000..7231bf48
--- /dev/null
+++ b/src/main/java/org/t246osslab/easybuggy/exceptions/CannotUndoExceptionServlet.java
@@ -0,0 +1,19 @@
+package org.t246osslab.easybuggy.exceptions;
+
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.swing.undo.UndoManager;
+
+@SuppressWarnings("serial")
+@WebServlet(urlPatterns = { "/cue" })
+public class CannotUndoExceptionServlet extends HttpServlet {
+
+    protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
+        new UndoManager().undo();
+    }
+}
diff --git a/src/main/java/org/t246osslab/easybuggy/exceptions/EmptyStackExceptionServlet.java b/src/main/java/org/t246osslab/easybuggy/exceptions/EmptyStackExceptionServlet.java
new file mode 100644
index 00000000..0e268298
--- /dev/null
+++ b/src/main/java/org/t246osslab/easybuggy/exceptions/EmptyStackExceptionServlet.java
@@ -0,0 +1,28 @@
+package org.t246osslab.easybuggy.exceptions;
+
+import java.io.IOException;
+import java.util.Stack;
+
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("serial")
+@WebServlet(urlPatterns = { "/ese" })
+public class EmptyStackExceptionServlet extends HttpServlet {
+
+    private static final Logger log = LoggerFactory.getLogger(EmptyStackExceptionServlet.class);
+
+    protected void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
+        Stack<String> stack = new Stack<String>();
+        String tmp = null;
+        while (null != (tmp = (String) stack.pop())) {
+            log.debug("Stack.pop(): " + tmp);
+        }
+    }
+}
diff --git a/src/main/java/org/t246osslab/easybuggy/exceptions/FileNotFoundExceptionServlet.java b/src/main/java/org/t246osslab/easybuggy/exceptions/FileNotFoundExceptionServlet.java
deleted file mode 100644
index 6253c188..00000000
--- a/src/main/java/org/t246osslab/easybuggy/exceptions/FileNotFoundExceptionServlet.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package org.t246osslab.easybuggy.exceptions;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-
-import javax.servlet.ServletException;
-import javax.servlet.annotation.WebServlet;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-@SuppressWarnings("serial")
-@WebServlet(urlPatterns = { "/fnfe" })
-public class FileNotFoundExceptionServlet extends HttpServlet {
-
-    protected void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
-        FileInputStream in = new FileInputStream(new File("/file/does/not/exist"));
-    }
-}
diff --git a/src/main/java/org/t246osslab/easybuggy/exceptions/IllegalMonitorStateExceptionServlet.java b/src/main/java/org/t246osslab/easybuggy/exceptions/IllegalMonitorStateExceptionServlet.java
new file mode 100644
index 00000000..5b7ba83a
--- /dev/null
+++ b/src/main/java/org/t246osslab/easybuggy/exceptions/IllegalMonitorStateExceptionServlet.java
@@ -0,0 +1,29 @@
+package org.t246osslab.easybuggy.exceptions;
+
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("serial")
+@WebServlet(urlPatterns = { "/imse" })
+public class IllegalMonitorStateExceptionServlet extends HttpServlet {
+
+    private static final Logger log = LoggerFactory.getLogger(IllegalMonitorStateExceptionServlet.class);
+
+    protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
+        Thread thread = new Thread();
+        thread.start();
+        try {
+            thread.wait();
+        } catch (InterruptedException e) {
+            log.error("InterruptedException occurs: ", e);
+        }
+    }
+}
diff --git a/src/main/java/org/t246osslab/easybuggy/exceptions/IllegalPathStateExceptionServlet.java b/src/main/java/org/t246osslab/easybuggy/exceptions/IllegalPathStateExceptionServlet.java
new file mode 100644
index 00000000..1e311176
--- /dev/null
+++ b/src/main/java/org/t246osslab/easybuggy/exceptions/IllegalPathStateExceptionServlet.java
@@ -0,0 +1,20 @@
+package org.t246osslab.easybuggy.exceptions;
+
+import java.awt.geom.GeneralPath;
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@SuppressWarnings("serial")
+@WebServlet(urlPatterns = { "/ipse" })
+public class IllegalPathStateExceptionServlet extends HttpServlet {
+
+    protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
+        GeneralPath subPath = new GeneralPath(GeneralPath.WIND_EVEN_ODD, 100);
+        subPath.closePath();
+    }
+}
diff --git a/src/main/java/org/t246osslab/easybuggy/exceptions/IllegalStateExceptionServlet.java b/src/main/java/org/t246osslab/easybuggy/exceptions/IllegalStateExceptionServlet.java
new file mode 100644
index 00000000..94d8003e
--- /dev/null
+++ b/src/main/java/org/t246osslab/easybuggy/exceptions/IllegalStateExceptionServlet.java
@@ -0,0 +1,25 @@
+package org.t246osslab.easybuggy.exceptions;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@SuppressWarnings("serial")
+@WebServlet(urlPatterns = { "/iase" })
+public class IllegalStateExceptionServlet extends HttpServlet {
+
+    protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
+        List<String> alphabet = new ArrayList<String>(Arrays.asList("a", "b, c"));
+        for (final Iterator<String> itr = alphabet.iterator(); itr.hasNext();) {
+            itr.remove();
+        }
+    }
+}
diff --git a/src/main/java/org/t246osslab/easybuggy/exceptions/ImagingOpExceptionServlet.java b/src/main/java/org/t246osslab/easybuggy/exceptions/ImagingOpExceptionServlet.java
new file mode 100644
index 00000000..8f3fddda
--- /dev/null
+++ b/src/main/java/org/t246osslab/easybuggy/exceptions/ImagingOpExceptionServlet.java
@@ -0,0 +1,24 @@
+package org.t246osslab.easybuggy.exceptions;
+
+import java.awt.geom.AffineTransform;
+import java.awt.image.AffineTransformOp;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@SuppressWarnings("serial")
+@WebServlet(urlPatterns = { "/imoe" })
+public class ImagingOpExceptionServlet extends HttpServlet {
+
+    protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
+        BufferedImage img = new BufferedImage(1, 40000, BufferedImage.TYPE_INT_RGB);
+        AffineTransformOp flipAtop = new AffineTransformOp(AffineTransform.getScaleInstance(1, 1),
+                AffineTransformOp.TYPE_NEAREST_NEIGHBOR);
+        flipAtop.filter(img, null);
+    }
+}
diff --git a/src/main/java/org/t246osslab/easybuggy/exceptions/UnsupportedEncodingExceptionServlet.java b/src/main/java/org/t246osslab/easybuggy/exceptions/InputMismatchExceptionServlet.java
similarity index 72%
rename from src/main/java/org/t246osslab/easybuggy/exceptions/UnsupportedEncodingExceptionServlet.java
rename to src/main/java/org/t246osslab/easybuggy/exceptions/InputMismatchExceptionServlet.java
index b0f86039..f18f14fc 100644
--- a/src/main/java/org/t246osslab/easybuggy/exceptions/UnsupportedEncodingExceptionServlet.java
+++ b/src/main/java/org/t246osslab/easybuggy/exceptions/InputMismatchExceptionServlet.java
@@ -1,6 +1,7 @@
 package org.t246osslab.easybuggy.exceptions;
 
 import java.io.IOException;
+import java.util.Scanner;
 
 import javax.servlet.ServletException;
 import javax.servlet.annotation.WebServlet;
@@ -9,10 +10,10 @@
 import javax.servlet.http.HttpServletResponse;
 
 @SuppressWarnings("serial")
-@WebServlet(urlPatterns = { "/uee" })
-public class UnsupportedEncodingExceptionServlet extends HttpServlet {
+@WebServlet(urlPatterns = { "/ime" })
+public class InputMismatchExceptionServlet extends HttpServlet {
 
     protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
-        req.setCharacterEncoding("Unsupported-Encoding");
+        new Scanner("a").nextInt();
     }
 }
diff --git a/src/main/java/org/t246osslab/easybuggy/exceptions/MalformedURLExceptionServlet.java b/src/main/java/org/t246osslab/easybuggy/exceptions/NegativeArraySizeExceptionServlet.java
similarity index 74%
rename from src/main/java/org/t246osslab/easybuggy/exceptions/MalformedURLExceptionServlet.java
rename to src/main/java/org/t246osslab/easybuggy/exceptions/NegativeArraySizeExceptionServlet.java
index fc9dd7ca..ff1f9f55 100644
--- a/src/main/java/org/t246osslab/easybuggy/exceptions/MalformedURLExceptionServlet.java
+++ b/src/main/java/org/t246osslab/easybuggy/exceptions/NegativeArraySizeExceptionServlet.java
@@ -1,7 +1,6 @@
 package org.t246osslab.easybuggy.exceptions;
 
 import java.io.IOException;
-import java.net.URL;
 
 import javax.servlet.ServletException;
 import javax.servlet.annotation.WebServlet;
@@ -10,10 +9,10 @@
 import javax.servlet.http.HttpServletResponse;
 
 @SuppressWarnings("serial")
-@WebServlet(urlPatterns = { "/murle" })
-public class MalformedURLExceptionServlet extends HttpServlet {
+@WebServlet(urlPatterns = { "/nase" })
+public class NegativeArraySizeExceptionServlet extends HttpServlet {
 
     protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
-        new URL("test");
+        int[] intArray = new int[-1];
     }
 }
diff --git a/src/main/java/org/t246osslab/easybuggy/exceptions/NoSuchElementExceptionServlet.java b/src/main/java/org/t246osslab/easybuggy/exceptions/NoSuchElementExceptionServlet.java
new file mode 100644
index 00000000..80acb617
--- /dev/null
+++ b/src/main/java/org/t246osslab/easybuggy/exceptions/NoSuchElementExceptionServlet.java
@@ -0,0 +1,19 @@
+package org.t246osslab.easybuggy.exceptions;
+
+import java.io.IOException;
+import java.util.ArrayList;
+
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@SuppressWarnings("serial")
+@WebServlet(urlPatterns = { "/nsee" })
+public class NoSuchElementExceptionServlet extends HttpServlet {
+
+    protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
+        new ArrayList<String>().iterator().next();
+    }
+}
diff --git a/src/main/java/org/t246osslab/easybuggy/exceptions/UnsupportedOperationExceptionServlet.java b/src/main/java/org/t246osslab/easybuggy/exceptions/UnsupportedOperationExceptionServlet.java
new file mode 100644
index 00000000..ba6ddc4e
--- /dev/null
+++ b/src/main/java/org/t246osslab/easybuggy/exceptions/UnsupportedOperationExceptionServlet.java
@@ -0,0 +1,28 @@
+package org.t246osslab.easybuggy.exceptions;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@SuppressWarnings("serial")
+@WebServlet(urlPatterns = { "/uoe" })
+public class UnsupportedOperationExceptionServlet extends HttpServlet {
+
+    protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
+        List<String> alphabet = Arrays.asList("a", "b", "c");
+        Iterator<String> i = alphabet.iterator();
+        while(i.hasNext()){
+            String name = i.next();
+            if(!name.equals("a")){
+                i.remove();
+            }
+        }
+    }
+}
diff --git a/src/main/java/org/t246osslab/easybuggy/others/IntegerOverflowServlet.java b/src/main/java/org/t246osslab/easybuggy/troubles/IntegerOverflowServlet.java
similarity index 98%
rename from src/main/java/org/t246osslab/easybuggy/others/IntegerOverflowServlet.java
rename to src/main/java/org/t246osslab/easybuggy/troubles/IntegerOverflowServlet.java
index d443fa6f..763ba07b 100644
--- a/src/main/java/org/t246osslab/easybuggy/others/IntegerOverflowServlet.java
+++ b/src/main/java/org/t246osslab/easybuggy/troubles/IntegerOverflowServlet.java
@@ -1,4 +1,4 @@
-package org.t246osslab.easybuggy.others;
+package org.t246osslab.easybuggy.troubles;
 
 import java.io.IOException;
 import java.math.BigDecimal;
diff --git a/src/main/java/org/t246osslab/easybuggy/others/LossOfTrailingDigitsServlet.java b/src/main/java/org/t246osslab/easybuggy/troubles/LossOfTrailingDigitsServlet.java
similarity index 98%
rename from src/main/java/org/t246osslab/easybuggy/others/LossOfTrailingDigitsServlet.java
rename to src/main/java/org/t246osslab/easybuggy/troubles/LossOfTrailingDigitsServlet.java
index b1f6e585..3833ff39 100644
--- a/src/main/java/org/t246osslab/easybuggy/others/LossOfTrailingDigitsServlet.java
+++ b/src/main/java/org/t246osslab/easybuggy/troubles/LossOfTrailingDigitsServlet.java
@@ -1,4 +1,4 @@
-package org.t246osslab.easybuggy.others;
+package org.t246osslab.easybuggy.troubles;
 
 import java.io.IOException;
 import java.util.Locale;
diff --git a/src/main/java/org/t246osslab/easybuggy/others/RoundOffErrorServlet.java b/src/main/java/org/t246osslab/easybuggy/troubles/RoundOffErrorServlet.java
similarity index 98%
rename from src/main/java/org/t246osslab/easybuggy/others/RoundOffErrorServlet.java
rename to src/main/java/org/t246osslab/easybuggy/troubles/RoundOffErrorServlet.java
index 9dec0be2..0aa9bf1f 100644
--- a/src/main/java/org/t246osslab/easybuggy/others/RoundOffErrorServlet.java
+++ b/src/main/java/org/t246osslab/easybuggy/troubles/RoundOffErrorServlet.java
@@ -1,4 +1,4 @@
-package org.t246osslab.easybuggy.others;
+package org.t246osslab.easybuggy.troubles;
 
 import java.io.IOException;
 import java.util.Locale;
diff --git a/src/main/java/org/t246osslab/easybuggy/others/TruncationErrorServlet.java b/src/main/java/org/t246osslab/easybuggy/troubles/TruncationErrorServlet.java
similarity index 98%
rename from src/main/java/org/t246osslab/easybuggy/others/TruncationErrorServlet.java
rename to src/main/java/org/t246osslab/easybuggy/troubles/TruncationErrorServlet.java
index 35551ee2..4791eb10 100644
--- a/src/main/java/org/t246osslab/easybuggy/others/TruncationErrorServlet.java
+++ b/src/main/java/org/t246osslab/easybuggy/troubles/TruncationErrorServlet.java
@@ -1,4 +1,4 @@
-package org.t246osslab.easybuggy.others;
+package org.t246osslab.easybuggy.troubles;
 
 import java.io.IOException;
 import java.util.Locale;
diff --git a/src/main/resources/indexpage_en.properties b/src/main/resources/indexpage_en.properties
index 3c49ee1c..749747c5 100644
--- a/src/main/resources/indexpage_en.properties
+++ b/src/main/resources/indexpage_en.properties
@@ -36,6 +36,16 @@ function.name.thread.leak=Thread Leak
 function.description.thread.leak=Thread leak occurs every time you load this page.
 function.name.mojibake=Mojibake
 function.description.mojibake=Mojibake can occur.
+function.name.int.overflow=Integer Overflow
+function.description.int.overflow=Integer overflow can occur.
+function.name.round.off.error=Round Off Error
+function.description.round.off.error=Round off error can occur.
+function.name.truncation.error=Truncation Error
+function.description.truncation.error=Truncation error can occur.
+function.name.cancellation.of.significant.digits=Cancellation of Significant Digits
+function.description.cancellation.of.significant.digits=Cancellation of significant digits can occur.
+function.name.loss.of.trailing.digits=Loss of Trailing Digits
+function.description.loss.of.trailing.digits=Loss of trailing digits can occur. 
 
 
 section.performance.issue=Performance Issue
@@ -46,6 +56,7 @@ function.description.slow.regular.expression=It takes time to parse the regular
 function.name.stop.the.world=Stop the World
 function.description.stop.the.world=Stop the World occurs if you click this link.
 
+
 section.vulnerabilities=Vulnerabilities
 description.vulnerabilities=XSS, SQL Injection, LDAP injection, and so on:
 
@@ -84,21 +95,7 @@ function.name.ei.error=ExceptionInInitializerError / NoClassDefFoundError
 function.description.ei.error=ExceptionInInitializerError is thrown at first, and NoClassDefFoundError is thrown from the second if you click this link.
 
 
-section.others=Others
-description.others=Arithmetic overflow, Loss of Trailing Digits, ...:
-
-function.name.int.overflow=Integer Overflow
-function.description.int.overflow=Integer overflow can occur.
-function.name.round.off.error=Round Off Error
-function.description.round.off.error=Round off error can occur.
-function.name.truncation.error=Truncation Error
-function.description.truncation.error=Truncation error can occur.
-function.name.cancellation.of.significant.digits=Cancellation of Significant Digits
-function.description.cancellation.of.significant.digits=Cancellation of significant digits can occur.
-function.name.loss.of.trailing.digits=Loss of Trailing Digits
-function.description.loss.of.trailing.digits=Loss of trailing digits can occur. 
-
-section.exceptions=[Extra] Exceptions
-description.section.exceptions=Exceptions, extending from java.lang.Exception:
+section.exceptions=Unchecked Exception
+description.section.exceptions=Exceptions, extending from java.lang.RuntimeException:
 
 function.description.throwable={0} is thrown if you click this link.
diff --git a/src/main/resources/indexpage_ja.properties b/src/main/resources/indexpage_ja.properties
index d8dacf05..24d70a28 100644
--- a/src/main/resources/indexpage_ja.properties
+++ b/src/main/resources/indexpage_ja.properties
@@ -36,6 +36,16 @@ function.name.thread.leak=\u30b9\u30ec\u30c3\u30c9\u30ea\u30fc\u30af
 function.description.thread.leak=\u3053\u306e\u30da\u30fc\u30b8\u3092\u30ed\u30fc\u30c9\u3059\u308b\u305f\u3073\u306b\u3001\u30b9\u30ec\u30c3\u30c9\u30ea\u30fc\u30af\u304c\u767a\u751f\u3057\u307e\u3059\u3002
 function.name.mojibake=\u6587\u5b57\u5316\u3051
 function.description.mojibake=\u7279\u5b9a\u306e\u6587\u5b57\u5217\u3092\u5165\u529b\u3059\u308b\u3068\u3001\u6587\u5b57\u5316\u3051\u304c\u767a\u751f\u3057\u307e\u3059\u3002
+function.name.int.overflow=\u6574\u6570\u30aa\u30fc\u30d0\u30fc\u30d5\u30ed\u30fc
+function.description.int.overflow=\u6574\u6570\u30aa\u30fc\u30d0\u30fc\u30d5\u30ed\u30fc\u3092\u767a\u751f\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002
+function.name.round.off.error=\u4e38\u3081\u8aa4\u5dee
+function.description.round.off.error=\u4e38\u3081\u8aa4\u5dee\u3092\u767a\u751f\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002
+function.name.truncation.error=\u6253\u3061\u5207\u308a\u8aa4\u5dee
+function.description.truncation.error=\u6253\u3061\u5207\u308a\u8aa4\u5dee\u3092\u767a\u751f\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002
+function.name.cancellation.of.significant.digits=\u6841\u843d\u3061
+function.description.cancellation.of.significant.digits=\u6841\u843d\u3061\u3092\u767a\u751f\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002
+function.name.loss.of.trailing.digits=\u60c5\u5831\u843d\u3061
+function.description.loss.of.trailing.digits=\u60c5\u5831\u843d\u3061\u3092\u767a\u751f\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002
 
 
 section.performance.issue=\u6027\u80fd\u554f\u984c
@@ -85,22 +95,7 @@ function.name.ei.error=ExceptionInInitializerError / NoClassDefFoundError
 function.description.ei.error=\u3053\u306e\u30ea\u30f3\u30af\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001\u521d\u56de\u306fExceptionInInitializerError\u304c\u3001\u305d\u306e\u5f8c\u306fNoClassDefFoundError\u304c\u30b9\u30ed\u30fc\u3055\u308c\u307e\u3059\u3002
 
 
-section.others=\u305d\u306e\u4ed6
-description.others=\u7b97\u8853\u30aa\u30fc\u30d0\u30fc\u30d5\u30ed\u30fc\u3001\u60c5\u5831\u843d\u3061\u306a\u3069...
-
-function.name.int.overflow=\u6574\u6570\u30aa\u30fc\u30d0\u30fc\u30d5\u30ed\u30fc
-function.description.int.overflow=\u6574\u6570\u30aa\u30fc\u30d0\u30fc\u30d5\u30ed\u30fc\u3092\u767a\u751f\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002
-function.name.round.off.error=\u4e38\u3081\u8aa4\u5dee
-function.description.round.off.error=\u4e38\u3081\u8aa4\u5dee\u3092\u767a\u751f\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002
-function.name.truncation.error=\u6253\u3061\u5207\u308a\u8aa4\u5dee
-function.description.truncation.error=\u6253\u3061\u5207\u308a\u8aa4\u5dee\u3092\u767a\u751f\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002
-function.name.cancellation.of.significant.digits=\u6841\u843d\u3061
-function.description.cancellation.of.significant.digits=\u6841\u843d\u3061\u3092\u767a\u751f\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002
-function.name.loss.of.trailing.digits=\u60c5\u5831\u843d\u3061
-function.description.loss.of.trailing.digits=\u60c5\u5831\u843d\u3061\u3092\u767a\u751f\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002
-
-
-section.exceptions=[\u304a\u307e\u3051] \u4f8b\u5916
-description.section.exceptions=java.lang.Exception\u304b\u3089\u7d99\u627f\u3057\u305f\u4f8b\u5916
+section.exceptions=\u975e\u30c1\u30a7\u30c3\u30af\u4f8b\u5916
+description.section.exceptions=java.lang.RuntimeException\u304b\u3089\u7d99\u627f\u3057\u305f\u4f8b\u5916
 
 function.description.throwable=\u3053\u306e\u30ea\u30f3\u30af\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001{0}\u304c\u30b9\u30ed\u30fc\u3055\u308c\u307e\u3059\u3002
diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp
index d8e90eee..442605dd 100644
--- a/src/main/webapp/index.jsp
+++ b/src/main/webapp/index.jsp
@@ -104,7 +104,27 @@
 						key="function.name.mojibake" /></a>:
 			<fmt:message key="function.description.mojibake" />
 		</p></li>
-	</ul>			
+		<li><p>
+			<a href="iof" target="_blank"><fmt:message
+						key="function.name.int.overflow" /></a>:
+			<fmt:message key="function.description.int.overflow" />
+		</p></li>
+		<li><p>
+			<a href="roe" target="_blank"><fmt:message
+						key="function.name.round.off.error" /></a>:
+			<fmt:message key="function.description.round.off.error" />
+		</p></li>
+		<li><p>
+				<a href="te" target="_blank"><fmt:message
+						key="function.name.truncation.error" /></a>:
+			<fmt:message key="function.description.truncation.error" />
+		</p></li>
+		<li><p>
+			<a href="lotd" target="_blank"><fmt:message
+						key="function.name.loss.of.trailing.digits" /></a>:
+			<fmt:message key="function.description.loss.of.trailing.digits" />
+		</p></li>
+	</ul>
 
 	<h2>
 		<span class="glyphicon glyphicon-knight"></span>&nbsp;
@@ -181,6 +201,26 @@
 		</p></li>
 	</ul>
 
+	<h2>
+		<span class="glyphicon glyphicon-knight"></span>&nbsp;
+		<fmt:message key="section.performance.issue" />
+	</h2>
+	<p>
+		<fmt:message key="description.performance.issue" />
+	</p>
+	<ul>
+		<li><p>
+			<a href="slowre" target="_blank"><fmt:message
+						key="function.name.slow.regular.expression" /></a>:
+			<fmt:message key="function.description.slow.regular.expression" />
+		</p></li>
+		<!-- <li><p>
+			<fmt:message key="function.name.stop.the.world" />
+				:
+			<fmt:message key="function.description.stop.the.world" />
+		</p></li> -->
+	</ul>
+
 	<h2>
 		<span class="glyphicon glyphicon-knight"></span>&nbsp;
 		<fmt:message key="section.errors" />
@@ -232,61 +272,6 @@
 		</p></li>
 	</ul>
 
-	<h2>
-		<span class="glyphicon glyphicon-knight"></span>&nbsp;
-		<fmt:message key="section.performance.issue" />
-	</h2>
-	<p>
-		<fmt:message key="description.performance.issue" />
-	</p>
-	<ul>
-		<li><p>
-			<a href="slowre" target="_blank"><fmt:message
-						key="function.name.slow.regular.expression" /></a>:
-			<fmt:message key="function.description.slow.regular.expression" />
-		</p></li>
-		<!-- <li><p>
-			<fmt:message key="function.name.stop.the.world" />
-				:
-			<fmt:message key="function.description.stop.the.world" />
-		</p></li> -->
-	</ul>
-
-	<h2>
-		<span class="glyphicon glyphicon-knight"></span>&nbsp;
-		<fmt:message key="section.others" />
-	</h2>
-	<p>
-		<fmt:message key="description.others" />
-	</p>
-	<ul>
-		<li><p>
-			<a href="iof" target="_blank"><fmt:message
-						key="function.name.int.overflow" /></a>:
-			<fmt:message key="function.description.int.overflow" />
-		</p></li>
-		<li><p>
-			<a href="roe" target="_blank"><fmt:message
-						key="function.name.round.off.error" /></a>:
-			<fmt:message key="function.description.round.off.error" />
-		</p></li>
-		<li><p>
-				<a href="te" target="_blank"><fmt:message
-						key="function.name.truncation.error" /></a>:
-			<fmt:message key="function.description.truncation.error" />
-		</p></li>
-		<!-- <li><p>
-				<fmt:message
-						key="function.name.cancellation.of.significant.digits" />:
-			<fmt:message key="function.description.cancellation.of.significant.digits" />
-		</p></li> -->
-		<li><p>
-			<a href="lotd" target="_blank"><fmt:message
-						key="function.name.loss.of.trailing.digits" /></a>:
-			<fmt:message key="function.description.loss.of.trailing.digits" />
-		</p></li>
-	</ul>
-
 	<h2>
 		<span class="glyphicon glyphicon-knight"></span>&nbsp;
 		<fmt:message key="section.exceptions" />
@@ -307,6 +292,22 @@
 			<a href="ase" target="_blank">ArrayStoreException</a>:
 			<fmt:message key="function.description.throwable"><fmt:param value="ArrayStoreException"/></fmt:message>
 		</p></li>
+		<li><p>
+			<a href="boe" target="_blank">BufferOverflowException</a>:
+			<fmt:message key="function.description.throwable"><fmt:param value="BufferOverflowException"/></fmt:message>
+		</p></li>
+		<li><p>
+			<a href="bue" target="_blank">BufferUnderflowException</a>:
+			<fmt:message key="function.description.throwable"><fmt:param value="BufferUnderflowException"/></fmt:message>
+		</p></li>
+		<li><p>
+			<a href="cre" target="_blank">CannotRedoException</a>:
+			<fmt:message key="function.description.throwable"><fmt:param value="CannotRedoException"/></fmt:message>
+		</p></li>
+		<li><p>
+			<a href="cue" target="_blank">CannotUndoException</a>:
+			<fmt:message key="function.description.throwable"><fmt:param value="CannotUndoException"/></fmt:message>
+		</p></li>
 		<li><p>
 			<a href="cce" target="_blank">ClassCastException</a>:
 			<fmt:message key="function.description.throwable"><fmt:param value="ClassCastException"/></fmt:message>
@@ -316,33 +317,53 @@
 			<fmt:message key="function.description.throwable"><fmt:param value="ConcurrentModificationException"/></fmt:message>
 		</p></li>
 		<li><p>
-			<a href="fnfe" target="_blank">FileNotFoundException</a>:
-			<fmt:message key="function.description.throwable"><fmt:param value="FileNotFoundException"/></fmt:message>
-		</p></li>
-		<li><p>
-			<a href="iioe" target="_blank">IIOException</a>:
-			<fmt:message key="function.description.throwable"><fmt:param value="IIOException"/></fmt:message>
+			<a href="ese" target="_blank">EmptyStackException</a>:
+			<fmt:message key="function.description.throwable"><fmt:param value="EmptyStackException"/></fmt:message>
 		</p></li>
 		<li><p>
 			<a href="iae" target="_blank">IllegalArgumentException</a>:
 			<fmt:message key="function.description.throwable"><fmt:param value="IllegalArgumentException"/></fmt:message>
 		</p></li>
+		<li><p>
+			<a href="imse" target="_blank">IllegalMonitorStateException</a>:
+			<fmt:message key="function.description.throwable"><fmt:param value="IllegalMonitorStateException"/></fmt:message>
+		</p></li>
+		<li><p>
+			<a href="ipse" target="_blank">IllegalPathStateException</a>:
+			<fmt:message key="function.description.throwable"><fmt:param value="IllegalPathStateException"/></fmt:message>
+		</p></li>
+		<li><p>
+			<a href="iase" target="_blank">IllegalStateException</a>:
+			<fmt:message key="function.description.throwable"><fmt:param value="IllegalStateException"/></fmt:message>
+		</p></li>
 		<li><p>
 			<a href="itse" target="_blank">IllegalThreadStateException</a>:
 			<fmt:message key="function.description.throwable"><fmt:param value="IllegalThreadStateException"/></fmt:message>
 		</p></li>
+		<li><p>
+			<a href="imoe" target="_blank">ImagingOpException</a>:
+			<fmt:message key="function.description.throwable"><fmt:param value="ImagingOpException"/></fmt:message>
+		</p></li>
 		<li><p>
 			<a href="ioobe" target="_blank">IndexOutOfBoundsException</a>:
 			<fmt:message key="function.description.throwable"><fmt:param value="IndexOutOfBoundsException"/></fmt:message>
 		</p></li>
 		<li><p>
-			<a href="murle" target="_blank">MalformedURLException</a>:
-			<fmt:message key="function.description.throwable"><fmt:param value="MalformedURLException"/></fmt:message>
+			<a href="ime" target="_blank">InputMismatchException</a>:
+			<fmt:message key="function.description.throwable"><fmt:param value="InputMismatchException"/></fmt:message>
 		</p></li>
 		<li><p>
 			<a href="mre" target="_blank">MissingResourceException</a>:
 			<fmt:message key="function.description.throwable"><fmt:param value="MissingResourceException"/></fmt:message>
 		</p></li>
+		<li><p>
+			<a href="nase" target="_blank">NegativeArraySizeException</a>:
+			<fmt:message key="function.description.throwable"><fmt:param value="NegativeArraySizeException"/></fmt:message>
+		</p></li>
+		<li><p>
+			<a href="nsee" target="_blank">NoSuchElementException</a>:
+			<fmt:message key="function.description.throwable"><fmt:param value="NoSuchElementException"/></fmt:message>
+		</p></li>
 		<li><p>
 			<a href="npe" target="_blank">NullPointerException</a>:
 			<fmt:message key="function.description.throwable"><fmt:param value="NullPointerException"/></fmt:message>
@@ -352,14 +373,11 @@
 			<fmt:message key="function.description.throwable"><fmt:param value="NumberFormatException"/></fmt:message>
 		</p></li>
 		<li><p>
-			<a href="uhe" target="_blank">UnknownHostException</a>:
-			<fmt:message key="function.description.throwable"><fmt:param value="UnknownHostException"/></fmt:message>
-		</p></li>
-		<li><p>
-			<a href="uee" target="_blank">UnsupportedEncodingException</a>:
-			<fmt:message key="function.description.throwable"><fmt:param value="UnsupportedEncodingException"/></fmt:message>
+			<a href="uoe" target="_blank">UnsupportedOperationException</a>:
+			<fmt:message key="function.description.throwable"><fmt:param value="UnsupportedOperationException"/></fmt:message>
 		</p></li>
 	</ul>
+
 	<hr>
 	<footer>
 	<img src="images/easybuggyL.png">Copyright © 2016-17 T246 OSS Lab, all rights reserved.