<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://www.typea.info/tips_/index.php?action=history&amp;feed=atom&amp;title=Java_%E4%B8%A6%E8%A1%8C%E5%87%A6%E7%90%86</id>
	<title>Java 並行処理 - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://www.typea.info/tips_/index.php?action=history&amp;feed=atom&amp;title=Java_%E4%B8%A6%E8%A1%8C%E5%87%A6%E7%90%86"/>
	<link rel="alternate" type="text/html" href="https://www.typea.info/tips_/index.php?title=Java_%E4%B8%A6%E8%A1%8C%E5%87%A6%E7%90%86&amp;action=history"/>
	<updated>2026-04-26T17:53:05Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.34.0</generator>
	<entry>
		<id>https://www.typea.info/tips_/index.php?title=Java_%E4%B8%A6%E8%A1%8C%E5%87%A6%E7%90%86&amp;diff=6187&amp;oldid=prev</id>
		<title>2020年2月16日 (日) 04:27にPirotoによる</title>
		<link rel="alternate" type="text/html" href="https://www.typea.info/tips_/index.php?title=Java_%E4%B8%A6%E8%A1%8C%E5%87%A6%E7%90%86&amp;diff=6187&amp;oldid=prev"/>
		<updated>2020-02-16T04:27:24Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://www.typea.info/tips_/index.php?title=Java_%E4%B8%A6%E8%A1%8C%E5%87%A6%E7%90%86&amp;amp;diff=6187&amp;amp;oldid=5036&quot;&gt;差分を表示&lt;/a&gt;</summary>
		<author><name>Piroto</name></author>
		
	</entry>
	<entry>
		<id>https://www.typea.info/tips_/index.php?title=Java_%E4%B8%A6%E8%A1%8C%E5%87%A6%E7%90%86&amp;diff=5036&amp;oldid=prev</id>
		<title>2020年2月15日 (土) 08:36にPirotoによる</title>
		<link rel="alternate" type="text/html" href="https://www.typea.info/tips_/index.php?title=Java_%E4%B8%A6%E8%A1%8C%E5%87%A6%E7%90%86&amp;diff=5036&amp;oldid=prev"/>
		<updated>2020-02-15T08:36:35Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2020年2月15日 (土) 08:36時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;1行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;1行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Java 並行処理==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Java 並行処理==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Java]]{{category 並行処理}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Java]] &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;| &lt;/ins&gt;{{category 並行処理}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==非同期に grep を実施する例1==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==非同期に grep を実施する例1==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Piroto</name></author>
		
	</entry>
	<entry>
		<id>https://www.typea.info/tips_/index.php?title=Java_%E4%B8%A6%E8%A1%8C%E5%87%A6%E7%90%86&amp;diff=3338&amp;oldid=prev</id>
		<title>2020年2月15日 (土) 08:03にPirotoによる</title>
		<link rel="alternate" type="text/html" href="https://www.typea.info/tips_/index.php?title=Java_%E4%B8%A6%E8%A1%8C%E5%87%A6%E7%90%86&amp;diff=3338&amp;oldid=prev"/>
		<updated>2020-02-15T08:03:27Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2020年2月15日 (土) 08:03時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;1行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;1行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Java 並行処理==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Java 並行処理==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[Java]{{category 並行処理}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[&lt;/ins&gt;[Java&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;]&lt;/ins&gt;]{{category 並行処理}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==非同期に grep を実施する例1==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==非同期に grep を実施する例1==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l38&quot; &gt;38行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;38行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      public static void main(String[] args) throws Exception {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      public static void main(String[] args) throws Exception {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          if (args.length &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;&lt;/del&gt;=2) {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          if (args.length &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;lt;&lt;/ins&gt;=2) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              System.out.println(&amp;quot;Usage: java JGrep 対象ディレクトリ  正規表現  [ファイルフィルタ]&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              System.out.println(&amp;quot;Usage: java JGrep 対象ディレクトリ  正規表現  [ファイルフィルタ]&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              System.exit(-1);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              System.exit(-1);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l44&quot; &gt;44行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;44行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          String fileFilter = &amp;quot;&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          String fileFilter = &amp;quot;&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          if (args.length &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt; &lt;/del&gt;2) {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          if (args.length &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;gt; &lt;/ins&gt;2) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              fileFilter = args[2];&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              fileFilter = args[2];&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l75&quot; &gt;75行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;75行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;           &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;           &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          int filesInBuketCnt = 0;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          int filesInBuketCnt = 0;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          List&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;&lt;/del&gt;List&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;&lt;/del&gt;File&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt;&amp;gt; &lt;/del&gt;buketBuket = new ArrayList&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;&lt;/del&gt;List&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;&lt;/del&gt;File&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt;&amp;gt;&lt;/del&gt;();&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          List&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;lt;&lt;/ins&gt;List&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;lt;&lt;/ins&gt;File&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;gt;&amp;amp;gt; &lt;/ins&gt;buketBuket = new ArrayList&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;lt;&lt;/ins&gt;List&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;lt;&lt;/ins&gt;File&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;gt;&amp;amp;gt;&lt;/ins&gt;();&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          List&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;&lt;/del&gt;File&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt; &lt;/del&gt;fileBuket = null;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          List&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;lt;&lt;/ins&gt;File&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;gt; &lt;/ins&gt;fileBuket = null;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;           &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;           &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          for (File file : files) {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          for (File file : files) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              if (filesInBuketCnt == 0) {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              if (filesInBuketCnt == 0) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                  fileBuket = new ArrayList&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;&lt;/del&gt;File&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt;&lt;/del&gt;();&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                  fileBuket = new ArrayList&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;lt;&lt;/ins&gt;File&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;gt;&lt;/ins&gt;();&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              fileBuket.add(file);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              fileBuket.add(file);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              filesInBuketCnt++;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              filesInBuketCnt++;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              if (filesInBuketCnt &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt; &lt;/del&gt;buketSize) {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              if (filesInBuketCnt &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;gt; &lt;/ins&gt;buketSize) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                  buketBuket.add(fileBuket);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                  buketBuket.add(fileBuket);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                  filesInBuketCnt = 0;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                  filesInBuketCnt = 0;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l90&quot; &gt;90行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;90行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          if (files !=null &amp;amp;&amp;amp; filesInBuketCnt &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt; &lt;/del&gt;0) {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          if (files !=null &amp;amp;&amp;amp; filesInBuketCnt &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;gt; &lt;/ins&gt;0) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              buketBuket.add(fileBuket);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              buketBuket.add(fileBuket);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l105&quot; &gt;105行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;105行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;           &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;           &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          int threadId = 1;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          int threadId = 1;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          for (List&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;&lt;/del&gt;File&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt; &lt;/del&gt;lstFiles : buketBuket) {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          for (List&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;lt;&lt;/ins&gt;File&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;gt; &lt;/ins&gt;lstFiles : buketBuket) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              executer.execute(&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              executer.execute(&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                  new GrepCommand(threadId++,&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                  new GrepCommand(threadId++,&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l183&quot; &gt;183行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;183行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                  int remain = workingThreadCount.addAndGet(-1);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                  int remain = workingThreadCount.addAndGet(-1);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                  System.out.println(&amp;quot;残りのスレッド数... &amp;quot; + remain);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                  System.out.println(&amp;quot;残りのスレッド数... &amp;quot; + remain);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                  if ( remain &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;&lt;/del&gt;= 0) {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                  if ( remain &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;lt;&lt;/ins&gt;= 0) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                      System.out.println(&amp;quot;終了しました。&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                      System.out.println(&amp;quot;終了しました。&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                  }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                  }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l192&quot; &gt;192行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;192行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=====実行例11=====&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=====実行例11=====&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt; &lt;/del&gt;java JGrep &amp;quot;C:\\work\\&amp;quot; &amp;quot;.*TEST.*&amp;quot; &amp;quot;.*\.txt$&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;gt; &lt;/ins&gt;java JGrep &amp;quot;C:\\work\\&amp;quot; &amp;quot;.*TEST.*&amp;quot; &amp;quot;.*\.txt$&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  [006]処理中 ... WORK16.txt&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  [006]処理中 ... WORK16.txt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l275&quot; &gt;275行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;275行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      public static void main(String[] args) throws Exception {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      public static void main(String[] args) throws Exception {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          if (args.length &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;&lt;/del&gt;=2) {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          if (args.length &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;lt;&lt;/ins&gt;=2) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              System.out.println(&amp;quot;Usage: java JGrep 対象ディレクトリ  正規表現  [ファイルフィルタ]&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              System.out.println(&amp;quot;Usage: java JGrep 対象ディレクトリ  正規表現  [ファイルフィルタ]&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              System.exit(-1);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              System.exit(-1);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l281&quot; &gt;281行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;281行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          String fileFilter = &amp;quot;&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          String fileFilter = &amp;quot;&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          if (args.length &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt; &lt;/del&gt;2) {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          if (args.length &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;gt; &lt;/ins&gt;2) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              fileFilter = args[2];&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              fileFilter = args[2];&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l318&quot; &gt;318行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;318行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;           &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;           &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          int filesInBuketCnt = 0;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          int filesInBuketCnt = 0;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          List&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;&lt;/del&gt;List&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;&lt;/del&gt;File&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt;&amp;gt; &lt;/del&gt;buketBuket = new ArrayList&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;&lt;/del&gt;List&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;&lt;/del&gt;File&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt;&amp;gt;&lt;/del&gt;();&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          List&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;lt;&lt;/ins&gt;List&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;lt;&lt;/ins&gt;File&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;gt;&amp;amp;gt; &lt;/ins&gt;buketBuket = new ArrayList&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;lt;&lt;/ins&gt;List&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;lt;&lt;/ins&gt;File&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;gt;&amp;amp;gt;&lt;/ins&gt;();&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          List&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;&lt;/del&gt;File&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt; &lt;/del&gt;fileBuket = null;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          List&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;lt;&lt;/ins&gt;File&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;gt; &lt;/ins&gt;fileBuket = null;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;           &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;           &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          for (File file : files) {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          for (File file : files) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              if (filesInBuketCnt == 0) {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              if (filesInBuketCnt == 0) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                  fileBuket = new ArrayList&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;&lt;/del&gt;File&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt;&lt;/del&gt;();&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                  fileBuket = new ArrayList&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;lt;&lt;/ins&gt;File&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;gt;&lt;/ins&gt;();&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              fileBuket.add(file);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              fileBuket.add(file);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              filesInBuketCnt++;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              filesInBuketCnt++;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              if (filesInBuketCnt &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt; &lt;/del&gt;buketSize) {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              if (filesInBuketCnt &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;gt; &lt;/ins&gt;buketSize) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                  buketBuket.add(fileBuket);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                  buketBuket.add(fileBuket);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                  filesInBuketCnt = 0;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                  filesInBuketCnt = 0;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l333&quot; &gt;333行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;333行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          if (files !=null &amp;amp;&amp;amp; filesInBuketCnt &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt; &lt;/del&gt;0) {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          if (files !=null &amp;amp;&amp;amp; filesInBuketCnt &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;gt; &lt;/ins&gt;0) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              buketBuket.add(fileBuket);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              buketBuket.add(fileBuket);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l339&quot; &gt;339行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;339行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          // Callable は、Runnabla と同じような役割を担うが、&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          // Callable は、Runnabla と同じような役割を担うが、&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          // Runnable と異なり、結果を返し、例外をスローすることができる&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          // Runnable と異なり、結果を返し、例外をスローすることができる&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          List&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;&lt;/del&gt;Callable&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;&lt;/del&gt;Long&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt;&amp;gt; &lt;/del&gt;tasks = new ArrayList&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;&lt;/del&gt;Callable&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;&lt;/del&gt;Long&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt;&amp;gt;&lt;/del&gt;();&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          List&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;lt;&lt;/ins&gt;Callable&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;lt;&lt;/ins&gt;Long&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;gt;&amp;amp;gt; &lt;/ins&gt;tasks = new ArrayList&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;lt;&lt;/ins&gt;Callable&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;lt;&lt;/ins&gt;Long&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;gt;&amp;amp;gt;&lt;/ins&gt;();&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          threadPool = Executors.newFixedThreadPool(THREAD_SIZE);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          threadPool = Executors.newFixedThreadPool(THREAD_SIZE);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          int threadId = 1;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          int threadId = 1;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          for (List&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;&lt;/del&gt;File&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt; &lt;/del&gt;lstFiles : buketBuket) {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          for (List&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;lt;&lt;/ins&gt;File&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;gt; &lt;/ins&gt;lstFiles : buketBuket) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              tasks.add(&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              tasks.add(&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                  new GrepCommand(threadId++,&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                  new GrepCommand(threadId++,&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l352&quot; &gt;352行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;352行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;           &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;           &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          // 指定されたタスクを実行し、すべて完了すると、ステータスと結果を含む Future のリストを返す&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          // 指定されたタスクを実行し、すべて完了すると、ステータスと結果を含む Future のリストを返す&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          List&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;&lt;/del&gt;Future&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;&lt;/del&gt;Long&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt;&amp;gt; &lt;/del&gt;results = threadPool.invokeAll(tasks);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          List&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;lt;&lt;/ins&gt;Future&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;lt;&lt;/ins&gt;Long&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;gt;&amp;amp;gt; &lt;/ins&gt;results = threadPool.invokeAll(tasks);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          for (Future&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;&lt;/del&gt;Long&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt; &lt;/del&gt;f : results) {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          for (Future&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;lt;&lt;/ins&gt;Long&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;gt; &lt;/ins&gt;f : results) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              System.out.printf(&amp;quot;一致件数 %d 件\n&amp;quot;, f.get().longValue());&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              System.out.printf(&amp;quot;一致件数 %d 件\n&amp;quot;, f.get().longValue());&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l363&quot; &gt;363行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;363行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       * grep を実行する&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       * grep を実行する&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       */&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       */&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      public static class GrepCommand implements Callable&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;&lt;/del&gt;Long&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt; &lt;/del&gt;{&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      public static class GrepCommand implements Callable&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;lt;&lt;/ins&gt;Long&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;gt; &lt;/ins&gt;{&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          private int threadId;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          private int threadId;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          private File[] files;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          private File[] files;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Piroto</name></author>
		
	</entry>
	<entry>
		<id>https://www.typea.info/tips_/index.php?title=Java_%E4%B8%A6%E8%A1%8C%E5%87%A6%E7%90%86&amp;diff=2095&amp;oldid=prev</id>
		<title>Piroto: ページの作成:「==Java 並行処理==  [Java]{{category 並行処理}}    ==非同期に grep を実施する例1==  ===内容===  *Thread ではなく、Executor を使って、Runnable…」</title>
		<link rel="alternate" type="text/html" href="https://www.typea.info/tips_/index.php?title=Java_%E4%B8%A6%E8%A1%8C%E5%87%A6%E7%90%86&amp;diff=2095&amp;oldid=prev"/>
		<updated>2020-02-15T07:33:11Z</updated>

		<summary type="html">&lt;p&gt;ページの作成:「==Java 並行処理==  [Java]{{category 並行処理}}    ==非同期に grep を実施する例1==  ===内容===  *Thread ではなく、Executor を使って、Runnable…」&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Java 並行処理==&lt;br /&gt;
[Java]{{category 並行処理}}&lt;br /&gt;
&lt;br /&gt;
==非同期に grep を実施する例1==&lt;br /&gt;
===内容===&lt;br /&gt;
*Thread ではなく、Executor を使って、Runnable を非同期に実行する&lt;br /&gt;
*共有データにスレッドセーフな単一の変数([http://java.sun.com/javase/ja/6/docs/ja/api/ java.util.concurrent.atomic])を使用する&lt;br /&gt;
====[http://java.sun.com/javase/ja/6/docs/ja/api/ java.util.concurrent.atomic]====&lt;br /&gt;
*単一の変数に対するロックフリーでスレッドセーフなプログラミングをサポートするクラスの小規模なツールキット&lt;br /&gt;
====[http://java.sun.com/javase/ja/6/docs/ja/api/java/util/concurrent/Executor.html Executor]====&lt;br /&gt;
*[http://java.sun.com/javase/ja/6/docs/ja/api/ java.util.concurrent]&lt;br /&gt;
*送信された Runnable タスクを実行するオブジェクト&lt;br /&gt;
*通常、executor は、明示的にスレッドを作成する代わりに使用&lt;br /&gt;
====ソース====&lt;br /&gt;
 import java.io.BufferedReader;&lt;br /&gt;
 import java.io.BufferedWriter;&lt;br /&gt;
 import java.io.File;&lt;br /&gt;
 import java.io.FileInputStream;&lt;br /&gt;
 import java.io.FileOutputStream;&lt;br /&gt;
 import java.io.FilenameFilter;&lt;br /&gt;
 import java.io.InputStreamReader;&lt;br /&gt;
 import java.io.OutputStreamWriter;&lt;br /&gt;
 import java.util.ArrayList;&lt;br /&gt;
 import java.util.List;&lt;br /&gt;
 import java.util.concurrent.Executor;&lt;br /&gt;
 import java.util.concurrent.atomic.AtomicInteger;&lt;br /&gt;
 &lt;br /&gt;
 /**&lt;br /&gt;
  * &lt;br /&gt;
  */&lt;br /&gt;
 public class JGrep {&lt;br /&gt;
 &lt;br /&gt;
     // 同期された変数&lt;br /&gt;
     //volatile int workingThreadCount;&lt;br /&gt;
     static AtomicInteger workingThreadCount = null;&lt;br /&gt;
     &lt;br /&gt;
     private static final int THREAD_SIZE = 10;&lt;br /&gt;
     public static void main(String[] args) throws Exception {&lt;br /&gt;
     &lt;br /&gt;
         if (args.length &amp;lt;=2) {&lt;br /&gt;
             System.out.println(&amp;quot;Usage: java JGrep 対象ディレクトリ  正規表現  [ファイルフィルタ]&amp;quot;);&lt;br /&gt;
             System.exit(-1);&lt;br /&gt;
         }&lt;br /&gt;
 &lt;br /&gt;
         String fileFilter = &amp;quot;&amp;quot;;&lt;br /&gt;
         if (args.length &amp;gt; 2) {&lt;br /&gt;
             fileFilter = args[2];&lt;br /&gt;
         }&lt;br /&gt;
         (new JGrep()).grep(args[0], args[1], fileFilter);&lt;br /&gt;
     }&lt;br /&gt;
     &lt;br /&gt;
     public void grep(String dirName, String expr, String filter) throws Exception {&lt;br /&gt;
         &lt;br /&gt;
         // 対象ファイルを取得&lt;br /&gt;
         File dir = new File(dirName);&lt;br /&gt;
         final String fltr = filter;&lt;br /&gt;
         File[] files = dir.listFiles(&lt;br /&gt;
                 new FilenameFilter(){&lt;br /&gt;
                     public boolean accept(File dir, String name) {&lt;br /&gt;
                         return name.matches(fltr);&lt;br /&gt;
                     }&lt;br /&gt;
                 });&lt;br /&gt;
         &lt;br /&gt;
         // 出力先ディレクトリ&lt;br /&gt;
         File outDir = new File(dir.getAbsolutePath() + File.separator + &amp;quot;out&amp;quot;);&lt;br /&gt;
         if (!outDir.exists()) {&lt;br /&gt;
             if (!outDir.mkdirs()) {&lt;br /&gt;
                 throw new IllegalStateException(&amp;quot;出力ディレクトリが作成できません&amp;quot;);&lt;br /&gt;
             }&lt;br /&gt;
         }&lt;br /&gt;
         &lt;br /&gt;
         // スレッドで処理させる単位(バケツ)のサイズを決定&lt;br /&gt;
         int buketSize = files.length / THREAD_SIZE;&lt;br /&gt;
         buketSize++;&lt;br /&gt;
         &lt;br /&gt;
         int filesInBuketCnt = 0;&lt;br /&gt;
         List&amp;lt;List&amp;lt;File&amp;gt;&amp;gt; buketBuket = new ArrayList&amp;lt;List&amp;lt;File&amp;gt;&amp;gt;();&lt;br /&gt;
         List&amp;lt;File&amp;gt; fileBuket = null;&lt;br /&gt;
         &lt;br /&gt;
         for (File file : files) {&lt;br /&gt;
             if (filesInBuketCnt == 0) {&lt;br /&gt;
                 fileBuket = new ArrayList&amp;lt;File&amp;gt;();&lt;br /&gt;
             }&lt;br /&gt;
             fileBuket.add(file);&lt;br /&gt;
             filesInBuketCnt++;&lt;br /&gt;
             if (filesInBuketCnt &amp;gt; buketSize) {&lt;br /&gt;
                 buketBuket.add(fileBuket);&lt;br /&gt;
                 filesInBuketCnt = 0;&lt;br /&gt;
                 fileBuket = null;&lt;br /&gt;
             }&lt;br /&gt;
         }&lt;br /&gt;
         if (files !=null &amp;amp;&amp;amp; filesInBuketCnt &amp;gt; 0) {&lt;br /&gt;
             buketBuket.add(fileBuket);&lt;br /&gt;
         }&lt;br /&gt;
         &lt;br /&gt;
         // スレッド数を登録&lt;br /&gt;
         workingThreadCount = new AtomicInteger(buketBuket.size());&lt;br /&gt;
 &lt;br /&gt;
         // 非同期処理を行う&lt;br /&gt;
         Executor executer = new Executor() {&lt;br /&gt;
             public void execute(Runnable command) {&lt;br /&gt;
                 new Thread(command).start();&lt;br /&gt;
             }&lt;br /&gt;
         };&lt;br /&gt;
         &lt;br /&gt;
         int threadId = 1;&lt;br /&gt;
         for (List&amp;lt;File&amp;gt; lstFiles : buketBuket) {&lt;br /&gt;
             executer.execute(&lt;br /&gt;
                 new GrepCommand(threadId++,&lt;br /&gt;
                         (File[])lstFiles.toArray(new File[0]),&lt;br /&gt;
                         outDir, &lt;br /&gt;
                         expr));&lt;br /&gt;
         }&lt;br /&gt;
     }&lt;br /&gt;
     &lt;br /&gt;
     /**&lt;br /&gt;
      * grep を実行する&lt;br /&gt;
      */&lt;br /&gt;
     public static class GrepCommand implements Runnable {&lt;br /&gt;
         private int threadId;&lt;br /&gt;
         private File[] files;&lt;br /&gt;
         private File outDir;&lt;br /&gt;
         private String expr;&lt;br /&gt;
         &lt;br /&gt;
         /**&lt;br /&gt;
          * 対象ファイルから、正規表現に一致する行を、出力ディレクトリにスレッド識別用IDファイル名にて結果出力する&lt;br /&gt;
          * @param threadId スレッド識別用ID&lt;br /&gt;
          * @param files grep 対象ファイル&lt;br /&gt;
          * @param outDir 結果出力ディレクトリ&lt;br /&gt;
          * @param expr 正規表現(Java)&lt;br /&gt;
          */&lt;br /&gt;
         public GrepCommand(int threadId, File[] files, File outDir, String expr) {&lt;br /&gt;
             if (outDir == null || !outDir.isDirectory()) {&lt;br /&gt;
                 throw new IllegalArgumentException(&amp;quot;不正な出力先&amp;quot;);&lt;br /&gt;
             }&lt;br /&gt;
             this.threadId = threadId;&lt;br /&gt;
             this.files = files;&lt;br /&gt;
             this.outDir = outDir;&lt;br /&gt;
             this.expr = expr;&lt;br /&gt;
         }&lt;br /&gt;
         &lt;br /&gt;
         /* (non-Javadoc)&lt;br /&gt;
          * @see java.lang.Runnable#run()&lt;br /&gt;
          */&lt;br /&gt;
         public void run() {&lt;br /&gt;
             try {&lt;br /&gt;
                 File outFile = new File(this.outDir.getAbsolutePath() &lt;br /&gt;
                         + File.separator&lt;br /&gt;
                         + String.format(&amp;quot;%03d.txt&amp;quot;, this.threadId));&lt;br /&gt;
                 BufferedWriter writer = new BufferedWriter(&lt;br /&gt;
                         new OutputStreamWriter(new FileOutputStream(outFile)));&lt;br /&gt;
                 &lt;br /&gt;
                 for (File file : files) {&lt;br /&gt;
                     System.out.printf(&amp;quot;[%03d]処理中 ... %s\n&amp;quot;, this.threadId, file.getName());&lt;br /&gt;
                     BufferedReader reader = new BufferedReader(&lt;br /&gt;
                             new InputStreamReader(new FileInputStream(file)));&lt;br /&gt;
                     &lt;br /&gt;
                     long lineno = 0;&lt;br /&gt;
                     boolean isFirstMatch = false;&lt;br /&gt;
                     String line = null;&lt;br /&gt;
                     while((line = reader.readLine()) != null) {&lt;br /&gt;
                         lineno++;&lt;br /&gt;
                         if (line.matches(this.expr)) {&lt;br /&gt;
                             if (!isFirstMatch) {&lt;br /&gt;
                                 writer.write(&amp;quot;\n--------------------------------\n&amp;quot;);&lt;br /&gt;
                                 writer.write(file.getAbsolutePath());&lt;br /&gt;
                                 writer.write(&amp;quot;\n--------------------------------\n&amp;quot;);&lt;br /&gt;
                                 isFirstMatch = true;&lt;br /&gt;
                             }&lt;br /&gt;
                             writer.write(line + &amp;quot;\n&amp;quot;);&lt;br /&gt;
                         }&lt;br /&gt;
                     }&lt;br /&gt;
                     reader.close();&lt;br /&gt;
                 }&lt;br /&gt;
                 &lt;br /&gt;
                 writer.close();&lt;br /&gt;
                 &lt;br /&gt;
             } catch (Exception e) {&lt;br /&gt;
                 System.out.println(e);&lt;br /&gt;
                 System.exit(-1);&lt;br /&gt;
             } finally {&lt;br /&gt;
                 // 動いているスレッドが無くなったら、終了メッセージを出力&lt;br /&gt;
                 int remain = workingThreadCount.addAndGet(-1);&lt;br /&gt;
                 System.out.println(&amp;quot;残りのスレッド数... &amp;quot; + remain);&lt;br /&gt;
                 if ( remain &amp;lt;= 0) {&lt;br /&gt;
                     System.out.println(&amp;quot;終了しました。&amp;quot;);&lt;br /&gt;
                 }&lt;br /&gt;
             }&lt;br /&gt;
         }&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
=====実行例11=====&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; java JGrep &amp;quot;C:\\work\\&amp;quot; &amp;quot;.*TEST.*&amp;quot; &amp;quot;.*\.txt$&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 [006]処理中 ... WORK16.txt&lt;br /&gt;
 [005]処理中 ... WORK11.txt&lt;br /&gt;
 [007]処理中 ... WORK21.txt&lt;br /&gt;
 [001]処理中 ... TEST1028.txt&lt;br /&gt;
 [002]処理中 ... TEST2085.txt&lt;br /&gt;
 [002]処理中 ... TEST2089.txt&lt;br /&gt;
 [002]処理中 ... TEST2096.txt&lt;br /&gt;
 [001]処理中 ... TEST1135.txt&lt;br /&gt;
 [006]処理中 ... WORK17.txt&lt;br /&gt;
 [007]処理中 ... WORK23.txt&lt;br /&gt;
 [008]処理中 ... WORK25_M25.txt&lt;br /&gt;
 残りのスレッド数... 7&lt;br /&gt;
 [006]処理中 ... WORK17.h.txt&lt;br /&gt;
 [001]処理中 ... TEST2076.txt&lt;br /&gt;
 [007]処理中 ... WORK24.txt&lt;br /&gt;
 [006]処理中 ... WORK19.txt&lt;br /&gt;
 [002]処理中 ... TEST2097Z.txt&lt;br /&gt;
 残りのスレッド数... 6&lt;br /&gt;
 [007]処理中 ... WORK25#.txt&lt;br /&gt;
 残りのスレッド数... 5&lt;br /&gt;
 [005]処理中 ... WORK11_M24.txt&lt;br /&gt;
 残りのスレッド数... 4&lt;br /&gt;
 残りのスレッド数... 3&lt;br /&gt;
 [008]処理中 ... WORK27.txt&lt;br /&gt;
 [005]処理中 ... WORK11_NEW.txt&lt;br /&gt;
 [008]処理中 ... コピー ～ TEST2085.txt&lt;br /&gt;
 [005]処理中 ... WORK11_W.txt&lt;br /&gt;
 [007]処理中 ... WORK25.20090630.txt&lt;br /&gt;
 残りのスレッド数... 2&lt;br /&gt;
 [007]処理中 ... WORK25.txt&lt;br /&gt;
 [005]処理中 ... WORK11_WW.txt&lt;br /&gt;
 [005]処理中 ... WORK12.txt&lt;br /&gt;
 残りのスレッド数... 1&lt;br /&gt;
 残りのスレッド数... 0&lt;br /&gt;
 終了しました。&lt;br /&gt;
&lt;br /&gt;
==非同期に grep を実施する例2==&lt;br /&gt;
===内容===&lt;br /&gt;
*上記例を書き換え&lt;br /&gt;
*ExecutorService を使って複数スレッドを管理&lt;br /&gt;
*Runnable の代わりに、Callableを利用して、結果を受け取る&lt;br /&gt;
*Future にて結果を表示&lt;br /&gt;
====[http://java.sun.com/javase/ja/6/docs/ja/api/java/util/concurrent/ExecutorService.html ExecutorService]====&lt;br /&gt;
*終了を管理するメソッド、および 1 つ以上の非同期タスクの進行状況を追跡する Future を生成できるメソッドを提供&lt;br /&gt;
====[http://java.sun.com/javase/ja/6/docs/ja/api/java/util/concurrent/Future.html Future]====&lt;br /&gt;
*非同期計算の結果を表す&lt;br /&gt;
*計算が完了したかどうかのチェック、完了までの待機、計算結果の取得などを行うためのメソッドを用意&lt;br /&gt;
====[http://java.sun.com/javase/ja/6/docs/ja/api/java/util/concurrent/Callable.html Callable]====&lt;br /&gt;
*結果を返し、例外をスローすることがあるタスク&lt;br /&gt;
*Runnable と似ていて、どちらもインスタンスが別のスレッドによって実行される可能性があるクラス用に設計&lt;br /&gt;
*Runnable は結果を返さず、チェック例外をスローすることはできません&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====ソース====&lt;br /&gt;
&lt;br /&gt;
 import java.io.BufferedReader;&lt;br /&gt;
 import java.io.BufferedWriter;&lt;br /&gt;
 import java.io.File;&lt;br /&gt;
 import java.io.FileInputStream;&lt;br /&gt;
 import java.io.FileOutputStream;&lt;br /&gt;
 import java.io.FilenameFilter;&lt;br /&gt;
 import java.io.InputStreamReader;&lt;br /&gt;
 import java.io.OutputStreamWriter;&lt;br /&gt;
 import java.util.ArrayList;&lt;br /&gt;
 import java.util.List;&lt;br /&gt;
 import java.util.concurrent.Callable;&lt;br /&gt;
 import java.util.concurrent.ExecutorService;&lt;br /&gt;
 import java.util.concurrent.Executors;&lt;br /&gt;
 import java.util.concurrent.Future;&lt;br /&gt;
 &lt;br /&gt;
 /**&lt;br /&gt;
  * &lt;br /&gt;
  */&lt;br /&gt;
 public class JGrep {&lt;br /&gt;
 &lt;br /&gt;
     private static final int THREAD_SIZE = 10;&lt;br /&gt;
     // スレッドプール&lt;br /&gt;
     private ExecutorService threadPool;&lt;br /&gt;
     &lt;br /&gt;
     public static void main(String[] args) throws Exception {&lt;br /&gt;
     &lt;br /&gt;
         if (args.length &amp;lt;=2) {&lt;br /&gt;
             System.out.println(&amp;quot;Usage: java JGrep 対象ディレクトリ  正規表現  [ファイルフィルタ]&amp;quot;);&lt;br /&gt;
             System.exit(-1);&lt;br /&gt;
         }&lt;br /&gt;
 &lt;br /&gt;
         String fileFilter = &amp;quot;&amp;quot;;&lt;br /&gt;
         if (args.length &amp;gt; 2) {&lt;br /&gt;
             fileFilter = args[2];&lt;br /&gt;
         }&lt;br /&gt;
         (new JGrep()).grep(args[0], args[1], fileFilter);&lt;br /&gt;
     }&lt;br /&gt;
     &lt;br /&gt;
     /**&lt;br /&gt;
      * @param dirName&lt;br /&gt;
      * @param expr&lt;br /&gt;
      * @param filter&lt;br /&gt;
      * @throws Exception&lt;br /&gt;
      */&lt;br /&gt;
     public void grep(String dirName, String expr, String filter) throws Exception {&lt;br /&gt;
         &lt;br /&gt;
         // 対象ファイルを取得&lt;br /&gt;
         File dir = new File(dirName);&lt;br /&gt;
         final String fltr = filter;&lt;br /&gt;
         File[] files = dir.listFiles(&lt;br /&gt;
                 new FilenameFilter(){&lt;br /&gt;
                     public boolean accept(File dir, String name) {&lt;br /&gt;
                         return name.matches(fltr);&lt;br /&gt;
                     }&lt;br /&gt;
                 });&lt;br /&gt;
         &lt;br /&gt;
         // 出力先ディレクトリ&lt;br /&gt;
         File outDir = new File(dir.getAbsolutePath() + File.separator + &amp;quot;out&amp;quot;);&lt;br /&gt;
         if (!outDir.exists()) {&lt;br /&gt;
             if (!outDir.mkdirs()) {&lt;br /&gt;
                 throw new IllegalStateException(&amp;quot;出力ディレクトリが作成できません&amp;quot;);&lt;br /&gt;
             }&lt;br /&gt;
         }&lt;br /&gt;
         &lt;br /&gt;
         // スレッドで処理させる単位(バケツ)のサイズを決定&lt;br /&gt;
         int buketSize = files.length / THREAD_SIZE;&lt;br /&gt;
         buketSize++;&lt;br /&gt;
         &lt;br /&gt;
         int filesInBuketCnt = 0;&lt;br /&gt;
         List&amp;lt;List&amp;lt;File&amp;gt;&amp;gt; buketBuket = new ArrayList&amp;lt;List&amp;lt;File&amp;gt;&amp;gt;();&lt;br /&gt;
         List&amp;lt;File&amp;gt; fileBuket = null;&lt;br /&gt;
         &lt;br /&gt;
         for (File file : files) {&lt;br /&gt;
             if (filesInBuketCnt == 0) {&lt;br /&gt;
                 fileBuket = new ArrayList&amp;lt;File&amp;gt;();&lt;br /&gt;
             }&lt;br /&gt;
             fileBuket.add(file);&lt;br /&gt;
             filesInBuketCnt++;&lt;br /&gt;
             if (filesInBuketCnt &amp;gt; buketSize) {&lt;br /&gt;
                 buketBuket.add(fileBuket);&lt;br /&gt;
                 filesInBuketCnt = 0;&lt;br /&gt;
                 fileBuket = null;&lt;br /&gt;
             }&lt;br /&gt;
         }&lt;br /&gt;
         if (files !=null &amp;amp;&amp;amp; filesInBuketCnt &amp;gt; 0) {&lt;br /&gt;
             buketBuket.add(fileBuket);&lt;br /&gt;
         }&lt;br /&gt;
         &lt;br /&gt;
         // Callable は、Runnabla と同じような役割を担うが、&lt;br /&gt;
         // Runnable と異なり、結果を返し、例外をスローすることができる&lt;br /&gt;
         List&amp;lt;Callable&amp;lt;Long&amp;gt;&amp;gt; tasks = new ArrayList&amp;lt;Callable&amp;lt;Long&amp;gt;&amp;gt;();&lt;br /&gt;
         threadPool = Executors.newFixedThreadPool(THREAD_SIZE);&lt;br /&gt;
 &lt;br /&gt;
         int threadId = 1;&lt;br /&gt;
         for (List&amp;lt;File&amp;gt; lstFiles : buketBuket) {&lt;br /&gt;
             tasks.add(&lt;br /&gt;
                 new GrepCommand(threadId++,&lt;br /&gt;
                         (File[])lstFiles.toArray(new File[0]),&lt;br /&gt;
                         outDir, &lt;br /&gt;
                         expr));&lt;br /&gt;
         }&lt;br /&gt;
         &lt;br /&gt;
         // 指定されたタスクを実行し、すべて完了すると、ステータスと結果を含む Future のリストを返す&lt;br /&gt;
         List&amp;lt;Future&amp;lt;Long&amp;gt;&amp;gt; results = threadPool.invokeAll(tasks);&lt;br /&gt;
         for (Future&amp;lt;Long&amp;gt; f : results) {&lt;br /&gt;
             System.out.printf(&amp;quot;一致件数 %d 件\n&amp;quot;, f.get().longValue());&lt;br /&gt;
         }&lt;br /&gt;
         System.out.println(&amp;quot;終了しました。&amp;quot;);&lt;br /&gt;
         &lt;br /&gt;
     }&lt;br /&gt;
     &lt;br /&gt;
     /**&lt;br /&gt;
      * grep を実行する&lt;br /&gt;
      */&lt;br /&gt;
     public static class GrepCommand implements Callable&amp;lt;Long&amp;gt; {&lt;br /&gt;
         private int threadId;&lt;br /&gt;
         private File[] files;&lt;br /&gt;
         private File outDir;&lt;br /&gt;
         private String expr;&lt;br /&gt;
         &lt;br /&gt;
         /**&lt;br /&gt;
          * 対象ファイルから、正規表現に一致する行を、出力ディレクトリにスレッド識別用IDファイル名にて結果出力する&lt;br /&gt;
          * @param threadId スレッド識別用ID&lt;br /&gt;
          * @param files grep 対象ファイル&lt;br /&gt;
          * @param outDir 結果出力ディレクトリ&lt;br /&gt;
          * @param expr 正規表現(Java)&lt;br /&gt;
          */&lt;br /&gt;
         public GrepCommand(int threadId, File[] files, File outDir, String expr) {&lt;br /&gt;
             if (outDir == null || !outDir.isDirectory()) {&lt;br /&gt;
                 throw new IllegalArgumentException(&amp;quot;不正な出力先&amp;quot;);&lt;br /&gt;
             }&lt;br /&gt;
             this.threadId = threadId;&lt;br /&gt;
             this.files = files;&lt;br /&gt;
             this.outDir = outDir;&lt;br /&gt;
             this.expr = expr;&lt;br /&gt;
         }&lt;br /&gt;
 &lt;br /&gt;
         /* (non-Javadoc)&lt;br /&gt;
          * @see java.util.concurrent.Callable#call()&lt;br /&gt;
          */&lt;br /&gt;
         public Long call() throws Exception {&lt;br /&gt;
             File outFile = new File(this.outDir.getAbsolutePath() &lt;br /&gt;
                     + File.separator&lt;br /&gt;
                     + String.format(&amp;quot;%03d.txt&amp;quot;, this.threadId));&lt;br /&gt;
             &lt;br /&gt;
             BufferedWriter writer = new BufferedWriter(&lt;br /&gt;
                     new OutputStreamWriter(new FileOutputStream(outFile)));&lt;br /&gt;
             &lt;br /&gt;
             long match = 0L;&lt;br /&gt;
             for (File file : files) {&lt;br /&gt;
                 System.out.printf(&amp;quot;[%03d]処理中 ... %s\n&amp;quot;, this.threadId, file.getName());&lt;br /&gt;
                 BufferedReader reader = new BufferedReader(&lt;br /&gt;
                         new InputStreamReader(new FileInputStream(file)));&lt;br /&gt;
                 &lt;br /&gt;
                 long lineno = 0;&lt;br /&gt;
                 boolean isFirstMatch = false;&lt;br /&gt;
                 String line = null;&lt;br /&gt;
                 while((line = reader.readLine()) != null) {&lt;br /&gt;
                     lineno++;&lt;br /&gt;
                     if (line.matches(this.expr)) {&lt;br /&gt;
                         if (!isFirstMatch) {&lt;br /&gt;
                             writer.write(&amp;quot;\n--------------------------------\n&amp;quot;);&lt;br /&gt;
                             writer.write(file.getAbsolutePath());&lt;br /&gt;
                             writer.write(&amp;quot;\n--------------------------------\n&amp;quot;);&lt;br /&gt;
                             isFirstMatch = true;&lt;br /&gt;
                         }&lt;br /&gt;
                         writer.write(line + &amp;quot;\n&amp;quot;);&lt;br /&gt;
                         match++;&lt;br /&gt;
                     }&lt;br /&gt;
                 }&lt;br /&gt;
                 reader.close();&lt;br /&gt;
             }&lt;br /&gt;
             &lt;br /&gt;
             writer.close();&lt;br /&gt;
             &lt;br /&gt;
             // 結果を返す&lt;br /&gt;
             return new Long(match);&lt;br /&gt;
         }&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Piroto</name></author>
		
	</entry>
</feed>