This document contains the results of auditing A_Team-finalproject at 5/13/17 12:43 PM, using the default audit rule set CodePro Core.
+DefaultNumberRuleTest contains tests for the class {@link DefaultNumberRule}.
+ *
+ * @generatedBy CodePro at 5/15/17 8:35 AM
+ * @author michaeldavies
+ * @version $Revision: 1.0 $
+ */
+public class DefaultNumberRuleTest {
+ /**
+ * Run the DefaultNumberRule() constructor test.
+ *
+ * @generatedBy CodePro at 5/15/17 8:35 AM
+ */
+ @Test
+ public void testDefaultNumberRule_1()
+ throws Exception {
+ DefaultNumberRule result = new DefaultNumberRule();
+ assertNotNull(result);
+ // add additional test code here
+ }
+
+ /**
+ * Run the void addRule(Category,String) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 8:35 AM
+ */
+ @Test
+ public void testAddRule_1()
+ throws Exception {
+ DefaultNumberRule fixture = new DefaultNumberRule();
+ Number.Category number = Number.Category.two;
+ String input = "Test";
+
+ fixture.addRule(number, input);
+
+ }
+
+ /**
+ * Run the void addRule(Category,Rule) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 8:35 AM
+ */
+ @Test
+ public void testAddRule_2()
+ throws Exception {
+ DefaultNumberRule fixture = new DefaultNumberRule();
+ Number.Category number = Number.Category.one;
+ Rule rule = new Rule("Test");
+
+ fixture.addRule(number, rule);
+
+
+ }
+
+ /**
+ * Run the int countRules() method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 8:35 AM
+ */
+ @Test
+ public void testCountRules_1()
+ throws Exception {
+ DefaultNumberRule fixture = new DefaultNumberRule();
+
+ int result = fixture.countRules();
+
+ // add additional test code here
+ assertEquals(0, result);
+ }
+
+ /**
+ * Run the Number.Category getCategory(double) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 8:35 AM
+ */
+ @Test
+ public void testGetCategory_1()
+ throws Exception {
+ DefaultNumberRule fixture = new DefaultNumberRule();
+ double input = 1.0;
+
+ Number.Category result = fixture.getCategory(input);
+
+ // add additional test code here
+ assertNotNull(result);
+ assertEquals("other", result.name());
+ assertEquals("other", result.toString());
+ assertEquals(5, result.ordinal());
+ }
+
+ /**
+ * Run the Rule getRule(Category) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 8:35 AM
+ */
+ @Test
+ public void testGetRule_1()
+ throws Exception {
+ DefaultNumberRule fixture = new DefaultNumberRule();
+ Number.Category category = Number.Category.few;
+
+ Rule result = fixture.getRule(category);
+
+ // add additional test code here
+ assertEquals(null, result);
+ }
+
+ /**
+ * Perform pre-test initialization.
+ *
+ * @throws Exception
+ * if the initialization fails for some reason
+ *
+ * @generatedBy CodePro at 5/15/17 8:35 AM
+ */
+ @Before
+ public void setUp()
+ throws Exception {
+ // add additional set up code here
+ }
+
+ /**
+ * Perform post-test clean-up.
+ *
+ * @throws Exception
+ * if the clean-up fails for some reason
+ *
+ * @generatedBy CodePro at 5/15/17 8:35 AM
+ */
+ @After
+ public void tearDown()
+ throws Exception {
+ // Add additional tear down code here
+ }
+
+ /**
+ * Launch the test.
+ *
+ * @param args the command line arguments
+ *
+ * @generatedBy CodePro at 5/15/17 8:35 AM
+ */
+ public static void main(String[] args) {
+ new org.junit.runner.JUnitCore().run(DefaultNumberRuleTest.class);
+ }
+}
\ No newline at end of file
diff --git a/DualNumberRuleTest.java b/DualNumberRuleTest.java
new file mode 100644
index 00000000..95ba776b
--- /dev/null
+++ b/DualNumberRuleTest.java
@@ -0,0 +1,118 @@
+package net.sf.freecol.common.i18n;
+
+import org.junit.*;
+import static org.junit.Assert.*;
+
+/**
+ * The class DualNumberRuleTest contains tests for the class {@link DualNumberRule}.
+ *
+ * @generatedBy CodePro at 5/15/17 8:10 AM
+ * @author michaeldavies
+ * @version $Revision: 1.0 $
+ */
+public class DualNumberRuleTest {
+ /**
+ * Run the Number.Category getCategory(double) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 8:10 AM
+ */
+ @Test
+ public void testGetCategory_1()
+ throws Exception {
+ DualNumberRule fixture = new DualNumberRule();
+ double input = 1;
+
+ Number.Category result = fixture.getCategory(input);
+
+ // add additional test code here
+ assertNotNull(result);
+ assertEquals("one", result.name());
+ assertEquals("one", result.toString());
+ assertEquals(1, result.ordinal());
+ }
+
+ /**
+ * Run the Number.Category getCategory(double) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 8:10 AM
+ */
+ @Test
+ public void testGetCategory_2()
+ throws Exception {
+ DualNumberRule fixture = new DualNumberRule();
+ double input = 2;
+
+ Number.Category result = fixture.getCategory(input);
+
+ // add additional test code here
+ assertNotNull(result);
+ assertEquals("two", result.name());
+ assertEquals("two", result.toString());
+ assertEquals(2, result.ordinal());
+ }
+
+ /**
+ * Run the Number.Category getCategory(double) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 8:10 AM
+ */
+ @Test
+ public void testGetCategory_3()
+ throws Exception {
+ DualNumberRule fixture = new DualNumberRule();
+ double input = 5;
+
+ Number.Category result = fixture.getCategory(input);
+
+ // add additional test code here
+ assertNotNull(result);
+ assertEquals("other", result.name());
+ assertEquals("other", result.toString());
+ assertEquals(5, result.ordinal());
+ }
+
+ /**
+ * Perform pre-test initialization.
+ *
+ * @throws Exception
+ * if the initialization fails for some reason
+ *
+ * @generatedBy CodePro at 5/15/17 8:10 AM
+ */
+ @Before
+ public void setUp()
+ throws Exception {
+ // add additional set up code here
+ }
+
+ /**
+ * Perform post-test clean-up.
+ *
+ * @throws Exception
+ * if the clean-up fails for some reason
+ *
+ * @generatedBy CodePro at 5/15/17 8:10 AM
+ */
+ @After
+ public void tearDown()
+ throws Exception {
+ // Add additional tear down code here
+ }
+
+ /**
+ * Launch the test.
+ *
+ * @param args the command line arguments
+ *
+ * @generatedBy CodePro at 5/15/17 8:10 AM
+ */
+ public static void main(String[] args) {
+ new org.junit.runner.JUnitCore().run(DualNumberRuleTest.class);
+ }
+}
\ No newline at end of file
diff --git a/FreeCol.jar b/FreeCol.jar
index ed0bb8bf..9edd8e2b 100644
Binary files a/FreeCol.jar and b/FreeCol.jar differ
diff --git a/FreeColTest/.classpath b/FreeColTest/.classpath
new file mode 100644
index 00000000..7c1519cd
--- /dev/null
+++ b/FreeColTest/.classpath
@@ -0,0 +1,15 @@
+
+TestAll builds a suite that can be used to run all
+ * of the tests within its package as well as within any subpackages of its
+ * package.
+ *
+ * @generatedBy CodePro at 5/15/17 8:35 AM
+ * @author michaeldavies
+ * @version $Revision: 1.0 $
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ net.sf.freecol.common.i18n.TestAll.class,
+})
+public class TestAll {
+
+ /**
+ * Launch the test.
+ *
+ * @param args the command line arguments
+ *
+ * @generatedBy CodePro at 5/15/17 8:35 AM
+ */
+ public static void main(String[] args) {
+ JUnitCore.runClasses(new Class[] { TestAll.class });
+ }
+}
diff --git a/FreeColTest/src/net/sf/freecol/common/i18n/DefaultNumberRuleTest.java b/FreeColTest/src/net/sf/freecol/common/i18n/DefaultNumberRuleTest.java
new file mode 100644
index 00000000..7c68322d
--- /dev/null
+++ b/FreeColTest/src/net/sf/freecol/common/i18n/DefaultNumberRuleTest.java
@@ -0,0 +1,126 @@
+package net.sf.freecol.common.i18n;
+
+import org.junit.*;
+import static org.junit.Assert.*;
+
+/**
+ * The class DefaultNumberRuleTest contains tests for the class {@link DefaultNumberRule}.
+ *
+ * @generatedBy CodePro at 5/15/17 8:35 AM
+ * @author michaeldavies
+ * @version $Revision: 1.0 $
+ */
+public class DefaultNumberRuleTest {
+ /**
+ * Run the DefaultNumberRule() constructor test.
+ *
+ * @generatedBy CodePro at 5/15/17 8:35 AM
+ */
+ @Test
+ public void testDefaultNumberRule_1()
+ throws Exception {
+ DefaultNumberRule result = new DefaultNumberRule();
+ assertNotNull(result);
+ // add additional test code here
+ }
+
+
+
+ /**
+ * Run the int countRules() method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 8:35 AM
+ */
+ @Test
+ public void testCountRules_1()
+ throws Exception {
+ DefaultNumberRule fixture = new DefaultNumberRule();
+
+ int result = fixture.countRules();
+
+ // add additional test code here
+ assertEquals(0, result);
+ }
+
+ /**
+ * Run the Number.Category getCategory(double) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 8:35 AM
+ */
+ @Test
+ public void testGetCategory_1()
+ throws Exception {
+ DefaultNumberRule fixture = new DefaultNumberRule();
+ double input = 1.0;
+
+ Number.Category result = fixture.getCategory(input);
+
+ // add additional test code here
+ assertNotNull(result);
+ assertEquals("other", result.name());
+ assertEquals("other", result.toString());
+ assertEquals(5, result.ordinal());
+ }
+
+ /**
+ * Run the Rule getRule(Category) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 8:35 AM
+ */
+ @Test
+ public void testGetRule_1()
+ throws Exception {
+ DefaultNumberRule fixture = new DefaultNumberRule();
+ Number.Category category = Number.Category.few;
+
+ Rule result = fixture.getRule(category);
+
+ // add additional test code here
+ assertEquals(null, result);
+ }
+
+ /**
+ * Perform pre-test initialization.
+ *
+ * @throws Exception
+ * if the initialization fails for some reason
+ *
+ * @generatedBy CodePro at 5/15/17 8:35 AM
+ */
+ @Before
+ public void setUp()
+ throws Exception {
+ // add additional set up code here
+ }
+
+ /**
+ * Perform post-test clean-up.
+ *
+ * @throws Exception
+ * if the clean-up fails for some reason
+ *
+ * @generatedBy CodePro at 5/15/17 8:35 AM
+ */
+ @After
+ public void tearDown()
+ throws Exception {
+ // Add additional tear down code here
+ }
+
+ /**
+ * Launch the test.
+ *
+ * @param args the command line arguments
+ *
+ * @generatedBy CodePro at 5/15/17 8:35 AM
+ */
+ public static void main(String[] args) {
+ new org.junit.runner.JUnitCore().run(DefaultNumberRuleTest.class);
+ }
+}
\ No newline at end of file
diff --git a/FreeColTest/src/net/sf/freecol/common/i18n/DualNumberRuleTest.java b/FreeColTest/src/net/sf/freecol/common/i18n/DualNumberRuleTest.java
new file mode 100644
index 00000000..95ba776b
--- /dev/null
+++ b/FreeColTest/src/net/sf/freecol/common/i18n/DualNumberRuleTest.java
@@ -0,0 +1,118 @@
+package net.sf.freecol.common.i18n;
+
+import org.junit.*;
+import static org.junit.Assert.*;
+
+/**
+ * The class DualNumberRuleTest contains tests for the class {@link DualNumberRule}.
+ *
+ * @generatedBy CodePro at 5/15/17 8:10 AM
+ * @author michaeldavies
+ * @version $Revision: 1.0 $
+ */
+public class DualNumberRuleTest {
+ /**
+ * Run the Number.Category getCategory(double) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 8:10 AM
+ */
+ @Test
+ public void testGetCategory_1()
+ throws Exception {
+ DualNumberRule fixture = new DualNumberRule();
+ double input = 1;
+
+ Number.Category result = fixture.getCategory(input);
+
+ // add additional test code here
+ assertNotNull(result);
+ assertEquals("one", result.name());
+ assertEquals("one", result.toString());
+ assertEquals(1, result.ordinal());
+ }
+
+ /**
+ * Run the Number.Category getCategory(double) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 8:10 AM
+ */
+ @Test
+ public void testGetCategory_2()
+ throws Exception {
+ DualNumberRule fixture = new DualNumberRule();
+ double input = 2;
+
+ Number.Category result = fixture.getCategory(input);
+
+ // add additional test code here
+ assertNotNull(result);
+ assertEquals("two", result.name());
+ assertEquals("two", result.toString());
+ assertEquals(2, result.ordinal());
+ }
+
+ /**
+ * Run the Number.Category getCategory(double) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 8:10 AM
+ */
+ @Test
+ public void testGetCategory_3()
+ throws Exception {
+ DualNumberRule fixture = new DualNumberRule();
+ double input = 5;
+
+ Number.Category result = fixture.getCategory(input);
+
+ // add additional test code here
+ assertNotNull(result);
+ assertEquals("other", result.name());
+ assertEquals("other", result.toString());
+ assertEquals(5, result.ordinal());
+ }
+
+ /**
+ * Perform pre-test initialization.
+ *
+ * @throws Exception
+ * if the initialization fails for some reason
+ *
+ * @generatedBy CodePro at 5/15/17 8:10 AM
+ */
+ @Before
+ public void setUp()
+ throws Exception {
+ // add additional set up code here
+ }
+
+ /**
+ * Perform post-test clean-up.
+ *
+ * @throws Exception
+ * if the clean-up fails for some reason
+ *
+ * @generatedBy CodePro at 5/15/17 8:10 AM
+ */
+ @After
+ public void tearDown()
+ throws Exception {
+ // Add additional tear down code here
+ }
+
+ /**
+ * Launch the test.
+ *
+ * @param args the command line arguments
+ *
+ * @generatedBy CodePro at 5/15/17 8:10 AM
+ */
+ public static void main(String[] args) {
+ new org.junit.runner.JUnitCore().run(DualNumberRuleTest.class);
+ }
+}
\ No newline at end of file
diff --git a/FreeColTest/src/net/sf/freecol/common/i18n/NameCacheTest.java b/FreeColTest/src/net/sf/freecol/common/i18n/NameCacheTest.java
new file mode 100644
index 00000000..5b79b987
--- /dev/null
+++ b/FreeColTest/src/net/sf/freecol/common/i18n/NameCacheTest.java
@@ -0,0 +1,399 @@
+package net.sf.freecol.common.i18n;
+
+import java.util.List;
+import java.util.Random;
+import javax.imageio.metadata.IIOMetadataNode;
+import net.sf.freecol.common.model.Specification;
+import org.junit.*;
+import net.sf.freecol.common.model.Game;
+import net.sf.freecol.common.FreeColSeed;
+import net.sf.freecol.common.ServerInfo;
+import net.sf.freecol.common.model.Colony;
+import net.sf.freecol.common.model.Settlement;
+import net.sf.freecol.common.model.UnitType;
+import static org.junit.Assert.*;
+import org.w3c.dom.Element;
+import net.sf.freecol.common.model.Player;
+import net.sf.freecol.common.model.Region;
+
+/**
+ * The class NameCacheTest contains tests for the class {@link NameCache}.
+ *
+ * @generatedBy CodePro at 5/15/17 9:03 AM
+ * @author michaeldavies
+ * @version $Revision: 1.0 $
+ */
+public class NameCacheTest {
+ /**
+ * Run the NameCache() constructor test.
+ *
+ * @generatedBy CodePro at 5/15/17 9:03 AM
+ */
+ @Test
+ public void testNameCache_1()
+ throws Exception {
+ NameCache result = new NameCache();
+ assertNotNull(result);
+ // add additional test code here
+ }
+
+ /**
+ * Run the void addCityOfCibola(String) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 9:03 AM
+ */
+ @Test
+ public void testAddCityOfCibola_1()
+ throws Exception {
+ String key = "Test";
+
+ NameCache.addCityOfCibola(key);
+
+ // add additional test code here
+ }
+
+ /**
+ * Run the void addCityOfCibola(String) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 9:03 AM
+ */
+ @Test
+ public void testAddCityOfCibola_2()
+ throws Exception {
+ String key = "Test";
+
+ NameCache.addCityOfCibola(key);
+
+ // add additional test code here
+ }
+
+ /**
+ * Run the void clearCitiesOfCibola() method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 9:03 AM
+ */
+ @Test
+ public void testClearCitiesOfCibola_1()
+ throws Exception {
+
+ NameCache.clearCitiesOfCibola();
+
+ // add additional test code here
+ }
+
+ /**
+ * Run the void clearCitiesOfCibola() method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 9:03 AM
+ */
+ @Test
+ public void testClearCitiesOfCibola_2()
+ throws Exception {
+
+ NameCache.clearCitiesOfCibola();
+
+ // add additional test code here
+ }
+
+
+ /**
+ * Run the ListNumberRulesTest contains tests for the class {@link NumberRules}.
+ *
+ * @generatedBy CodePro at 5/15/17 11:45 AM
+ * @author michaeldavies
+ * @version $Revision: 1.0 $
+ */
+public class NumberRulesTest {
+
+
+ /**
+ * Run the Number getNumberForLanguage(String) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 11:45 AM
+ */
+ @Test
+ public void testGetNumberForLanguage_1()
+ throws Exception {
+ String lang = "Test";
+
+ Number result = NumberRules.getNumberForLanguage(lang);
+
+ // add additional test code here
+ assertNotNull(result);
+ }
+
+ /**
+ * Run the Number getNumberForLanguage(String) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 11:45 AM
+ */
+ @Test
+ public void testGetNumberForLanguage_2()
+ throws Exception {
+ String lang = "";
+
+ Number result = NumberRules.getNumberForLanguage(lang);
+
+ // add additional test code here
+ assertNotNull(result);
+ }
+
+ /**
+ * Run the boolean isInitialized() method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 11:45 AM
+ */
+ @Test
+ public void testIsInitialized_1()
+ throws Exception {
+
+ boolean result = NumberRules.isInitialized();
+
+ // add additional test code here
+ assertEquals(false, result);
+ }
+
+ /**
+ * Run the boolean isInitialized() method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 11:45 AM
+ */
+ @Test
+ public void testIsInitialized_2()
+ throws Exception {
+
+ boolean result = NumberRules.isInitialized();
+
+ // add additional test code here
+ assertEquals(false, result);
+ }
+
+
+ /**
+ * Perform pre-test initialization.
+ *
+ * @throws Exception
+ * if the initialization fails for some reason
+ *
+ * @generatedBy CodePro at 5/15/17 11:45 AM
+ */
+ @Before
+ public void setUp()
+ throws Exception {
+ // add additional set up code here
+ }
+
+ /**
+ * Perform post-test clean-up.
+ *
+ * @throws Exception
+ * if the clean-up fails for some reason
+ *
+ * @generatedBy CodePro at 5/15/17 11:45 AM
+ */
+ @After
+ public void tearDown()
+ throws Exception {
+ // Add additional tear down code here
+ }
+
+ /**
+ * Launch the test.
+ *
+ * @param args the command line arguments
+ *
+ * @generatedBy CodePro at 5/15/17 11:45 AM
+ */
+ public static void main(String[] args) {
+ new org.junit.runner.JUnitCore().run(NumberRulesTest.class);
+ }
+}
\ No newline at end of file
diff --git a/FreeColTest/src/net/sf/freecol/common/i18n/NumberTest.java b/FreeColTest/src/net/sf/freecol/common/i18n/NumberTest.java
new file mode 100644
index 00000000..df374913
--- /dev/null
+++ b/FreeColTest/src/net/sf/freecol/common/i18n/NumberTest.java
@@ -0,0 +1,111 @@
+package net.sf.freecol.common.i18n;
+
+import org.junit.*;
+import static org.junit.Assert.*;
+
+/**
+ * The class NumberTest contains tests for the class {@link Number}.
+ *
+ * @generatedBy CodePro at 5/15/17 10:02 AM
+ * @author michaeldavies
+ * @version $Revision: 1.0 $
+ */
+public class NumberTest {
+ /**
+ * Run the String getKey(double) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 10:02 AM
+ */
+ @Test
+ public void testGetKey_1()
+ throws Exception {
+ Number fixture = new DefaultNumberRule();
+ double selector = 1.0;
+
+ String result = fixture.getKey(selector);
+
+ // add additional test code here
+ assertEquals("other", result);
+ }
+
+ /**
+ * Run the String getKey(String,String) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 10:02 AM
+ */
+ @Test
+ public void testGetKey_2()
+ throws Exception {
+ Number fixture = new DefaultNumberRule();
+ String selector = "";
+ String template = "";
+
+ String result = fixture.getKey(selector, template);
+
+ // add additional test code here
+ assertEquals("other", result);
+ }
+
+ /**
+ * Run the String getKey(String,String) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 10:02 AM
+ */
+ @Test
+ public void testGetKey_3()
+ throws Exception {
+ Number fixture = new DefaultNumberRule();
+ String selector = "";
+ String template = "";
+
+ String result = fixture.getKey(selector, template);
+
+ // add additional test code here
+ assertEquals("other", result);
+ }
+
+ /**
+ * Perform pre-test initialization.
+ *
+ * @throws Exception
+ * if the initialization fails for some reason
+ *
+ * @generatedBy CodePro at 5/15/17 10:02 AM
+ */
+ @Before
+ public void setUp()
+ throws Exception {
+ // add additional set up code here
+ }
+
+ /**
+ * Perform post-test clean-up.
+ *
+ * @throws Exception
+ * if the clean-up fails for some reason
+ *
+ * @generatedBy CodePro at 5/15/17 10:02 AM
+ */
+ @After
+ public void tearDown()
+ throws Exception {
+ // Add additional tear down code here
+ }
+
+ /**
+ * Launch the test.
+ *
+ * @param args the command line arguments
+ *
+ * @generatedBy CodePro at 5/15/17 10:02 AM
+ */
+ public static void main(String[] args) {
+ new org.junit.runner.JUnitCore().run(NumberTest.class);
+ }
+}
\ No newline at end of file
diff --git a/FreeColTest/src/net/sf/freecol/common/i18n/OtherNumberRuleTest.java b/FreeColTest/src/net/sf/freecol/common/i18n/OtherNumberRuleTest.java
new file mode 100644
index 00000000..732fcef6
--- /dev/null
+++ b/FreeColTest/src/net/sf/freecol/common/i18n/OtherNumberRuleTest.java
@@ -0,0 +1,74 @@
+package net.sf.freecol.common.i18n;
+
+import org.junit.*;
+import static org.junit.Assert.*;
+
+/**
+ * The class OtherNumberRuleTest contains tests for the class {@link OtherNumberRule}.
+ *
+ * @generatedBy CodePro at 5/15/17 12:16 PM
+ * @author michaeldavies
+ * @version $Revision: 1.0 $
+ */
+public class OtherNumberRuleTest {
+ /**
+ * Run the Number.Category getCategory(double) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 12:16 PM
+ */
+ @Test
+ public void testGetCategory_1()
+ throws Exception {
+ OtherNumberRule fixture = new OtherNumberRule();
+ double input = 1.0;
+
+ Number.Category result = fixture.getCategory(input);
+
+ // add additional test code here
+ assertNotNull(result);
+ assertEquals("other", result.name());
+ assertEquals("other", result.toString());
+ assertEquals(5, result.ordinal());
+ }
+
+ /**
+ * Perform pre-test initialization.
+ *
+ * @throws Exception
+ * if the initialization fails for some reason
+ *
+ * @generatedBy CodePro at 5/15/17 12:16 PM
+ */
+ @Before
+ public void setUp()
+ throws Exception {
+ // add additional set up code here
+ }
+
+ /**
+ * Perform post-test clean-up.
+ *
+ * @throws Exception
+ * if the clean-up fails for some reason
+ *
+ * @generatedBy CodePro at 5/15/17 12:16 PM
+ */
+ @After
+ public void tearDown()
+ throws Exception {
+ // Add additional tear down code here
+ }
+
+ /**
+ * Launch the test.
+ *
+ * @param args the command line arguments
+ *
+ * @generatedBy CodePro at 5/15/17 12:16 PM
+ */
+ public static void main(String[] args) {
+ new org.junit.runner.JUnitCore().run(OtherNumberRuleTest.class);
+ }
+}
\ No newline at end of file
diff --git a/FreeColTest/src/net/sf/freecol/common/i18n/PluralNumberRuleTest.java b/FreeColTest/src/net/sf/freecol/common/i18n/PluralNumberRuleTest.java
new file mode 100644
index 00000000..721b55c0
--- /dev/null
+++ b/FreeColTest/src/net/sf/freecol/common/i18n/PluralNumberRuleTest.java
@@ -0,0 +1,96 @@
+package net.sf.freecol.common.i18n;
+
+import org.junit.*;
+import static org.junit.Assert.*;
+
+/**
+ * The class PluralNumberRuleTest contains tests for the class {@link PluralNumberRule}.
+ *
+ * @generatedBy CodePro at 5/15/17 6:39 PM
+ * @author michaeldavies
+ * @version $Revision: 1.0 $
+ */
+public class PluralNumberRuleTest {
+ /**
+ * Run the Number.Category getCategory(double) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 6:39 PM
+ */
+ @Test
+ public void testGetCategory_1()
+ throws Exception {
+ PluralNumberRule fixture = new PluralNumberRule();
+ double input = 1;
+
+ Number.Category result = fixture.getCategory(input);
+
+ // add additional test code here
+ assertNotNull(result);
+ assertEquals("one", result.name());
+ assertEquals("one", result.toString());
+ assertEquals(1, result.ordinal());
+ }
+
+ /**
+ * Run the Number.Category getCategory(double) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 6:39 PM
+ */
+ @Test
+ public void testGetCategory_2()
+ throws Exception {
+ PluralNumberRule fixture = new PluralNumberRule();
+ double input = 2;
+
+ Number.Category result = fixture.getCategory(input);
+
+ // add additional test code here
+ assertNotNull(result);
+ assertEquals("other", result.name());
+ assertEquals("other", result.toString());
+ assertEquals(5, result.ordinal());
+ }
+
+ /**
+ * Perform pre-test initialization.
+ *
+ * @throws Exception
+ * if the initialization fails for some reason
+ *
+ * @generatedBy CodePro at 5/15/17 6:39 PM
+ */
+ @Before
+ public void setUp()
+ throws Exception {
+ // add additional set up code here
+ }
+
+ /**
+ * Perform post-test clean-up.
+ *
+ * @throws Exception
+ * if the clean-up fails for some reason
+ *
+ * @generatedBy CodePro at 5/15/17 6:39 PM
+ */
+ @After
+ public void tearDown()
+ throws Exception {
+ // Add additional tear down code here
+ }
+
+ /**
+ * Launch the test.
+ *
+ * @param args the command line arguments
+ *
+ * @generatedBy CodePro at 5/15/17 6:39 PM
+ */
+ public static void main(String[] args) {
+ new org.junit.runner.JUnitCore().run(PluralNumberRuleTest.class);
+ }
+}
\ No newline at end of file
diff --git a/FreeColTest/src/net/sf/freecol/common/i18n/RelationTest.java b/FreeColTest/src/net/sf/freecol/common/i18n/RelationTest.java
new file mode 100644
index 00000000..88c2e20e
--- /dev/null
+++ b/FreeColTest/src/net/sf/freecol/common/i18n/RelationTest.java
@@ -0,0 +1,267 @@
+package net.sf.freecol.common.i18n;
+
+import java.util.LinkedList;
+import java.util.List;
+import org.junit.*;
+import static org.junit.Assert.*;
+
+/**
+ * The class RelationTest contains tests for the class {@link Relation}.
+ *
+ * @generatedBy CodePro at 5/15/17 6:41 PM
+ * @author michaeldavies
+ * @version $Revision: 1.0 $
+ */
+public class RelationTest {
+
+
+ /**
+ * Run the Relation(int,int) constructor test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 6:41 PM
+ */
+ @Test
+ public void testRelation_2()
+ throws Exception {
+ int low = 1;
+ int high = 1;
+
+ Relation result = new Relation(low, high);
+
+ // add additional test code here
+ assertNotNull(result);
+ assertEquals("n is 1", result.toString());
+ }
+
+ /**
+ * Run the boolean matches(double) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 6:41 PM
+ */
+ @Test
+ public void testMatches_1()
+ throws Exception {
+ Relation fixture = new Relation(1, 1);
+ fixture.setNegated(true);
+ fixture.setInteger(true);
+ fixture.setMod(1);
+ double number = 1.0;
+
+ boolean result = fixture.matches(number);
+
+ // add additional test code here
+ assertEquals(false, result);
+ }
+
+ /**
+ * Run the boolean matches(double) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 6:41 PM
+ */
+ @Test
+ public void testMatches_2()
+ throws Exception {
+ Relation fixture = new Relation(1, 1);
+ fixture.setNegated(true);
+ fixture.setInteger(false);
+ fixture.setMod(2);
+ double number = 1.0;
+
+ boolean result = fixture.matches(number);
+
+ // add additional test code here
+ assertEquals(false, result);
+ }
+
+ /**
+ * Run the void setInteger(boolean) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 6:41 PM
+ */
+ @Test
+ public void testSetInteger_1()
+ throws Exception {
+ Relation fixture = new Relation(1, 1);
+ fixture.setNegated(true);
+ fixture.setInteger(true);
+ fixture.setMod(1);
+ boolean value = true;
+
+ fixture.setInteger(value);
+
+ // add additional test code here
+ }
+
+ /**
+ * Run the void setMod(int) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 6:41 PM
+ */
+ @Test
+ public void testSetMod_1()
+ throws Exception {
+ Relation fixture = new Relation(1, 1);
+ fixture.setNegated(true);
+ fixture.setInteger(true);
+ fixture.setMod(1);
+ int mod = 1;
+
+ fixture.setMod(mod);
+
+ // add additional test code here
+ }
+
+ /**
+ * Run the void setNegated(boolean) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 6:41 PM
+ */
+ @Test
+ public void testSetNegated_1()
+ throws Exception {
+ Relation fixture = new Relation(1, 1);
+ fixture.setNegated(true);
+ fixture.setInteger(true);
+ fixture.setMod(1);
+ boolean value = true;
+
+ fixture.setNegated(value);
+
+ // add additional test code here
+ }
+
+ /**
+ * Run the String toString() method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 6:41 PM
+ */
+ @Test
+ public void testToString_1()
+ throws Exception {
+ Relation fixture = new Relation(1, 1);
+ fixture.setNegated(true);
+ fixture.setInteger(false);
+ fixture.setMod(1);
+
+ String result = fixture.toString();
+
+ // add additional test code here
+ assertEquals("n is not 1", result);
+ }
+
+ /**
+ * Run the String toString() method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 6:41 PM
+ */
+ @Test
+ public void testToString_2()
+ throws Exception {
+ Relation fixture = new Relation(1, 1);
+ fixture.setNegated(false);
+ fixture.setInteger(true);
+ fixture.setMod(1);
+
+ String result = fixture.toString();
+
+ // add additional test code here
+ assertEquals("n is 1", result);
+ }
+
+ /**
+ * Run the String toString() method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 6:41 PM
+ */
+ @Test
+ public void testToString_3()
+ throws Exception {
+ Relation fixture = new Relation(1, 1);
+ fixture.setNegated(true);
+ fixture.setInteger(true);
+ fixture.setMod(2);
+
+ String result = fixture.toString();
+
+ // add additional test code here
+ assertEquals("n mod 2 is not 1", result);
+ }
+
+ /**
+ * Run the String toString() method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 6:41 PM
+ */
+ @Test
+ public void testToString_4()
+ throws Exception {
+ Relation fixture = new Relation(1, 1);
+ fixture.setNegated(false);
+ fixture.setInteger(true);
+ fixture.setMod(2);
+
+ String result = fixture.toString();
+
+ // add additional test code here
+ assertEquals("n mod 2 is 1", result);
+ }
+
+ /**
+ * Perform pre-test initialization.
+ *
+ * @throws Exception
+ * if the initialization fails for some reason
+ *
+ * @generatedBy CodePro at 5/15/17 6:41 PM
+ */
+ @Before
+ public void setUp()
+ throws Exception {
+ // add additional set up code here
+ }
+
+ /**
+ * Perform post-test clean-up.
+ *
+ * @throws Exception
+ * if the clean-up fails for some reason
+ *
+ * @generatedBy CodePro at 5/15/17 6:41 PM
+ */
+ @After
+ public void tearDown()
+ throws Exception {
+ // Add additional tear down code here
+ }
+
+ /**
+ * Launch the test.
+ *
+ * @param args the command line arguments
+ *
+ * @generatedBy CodePro at 5/15/17 6:41 PM
+ */
+ public static void main(String[] args) {
+ new org.junit.runner.JUnitCore().run(RelationTest.class);
+ }
+}
\ No newline at end of file
diff --git a/FreeColTest/src/net/sf/freecol/common/i18n/TestAll.java b/FreeColTest/src/net/sf/freecol/common/i18n/TestAll.java
new file mode 100644
index 00000000..7fb7c523
--- /dev/null
+++ b/FreeColTest/src/net/sf/freecol/common/i18n/TestAll.java
@@ -0,0 +1,39 @@
+package net.sf.freecol.common.i18n;
+
+import org.junit.runner.JUnitCore;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * The class TestAll builds a suite that can be used to run all
+ * of the tests within its package as well as within any subpackages of its
+ * package.
+ *
+ * @generatedBy CodePro at 5/15/17 6:48 PM
+ * @author michaeldavies
+ * @version $Revision: 1.0 $
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ PluralNumberRuleTest.class,
+ DefaultNumberRuleTest.class,
+ NumberTest.class,
+ DualNumberRuleTest.class,
+ NameCacheTest.class,
+ OtherNumberRuleTest.class,
+ NumberRulesTest.class,
+ RelationTest.class,
+})
+public class TestAll {
+
+ /**
+ * Launch the test.
+ *
+ * @param args the command line arguments
+ *
+ * @generatedBy CodePro at 5/15/17 6:48 PM
+ */
+ public static void main(String[] args) {
+ JUnitCore.runClasses(new Class[] { TestAll.class });
+ }
+}
diff --git a/FreeColTest/src/net/sf/freecol/common/i18n/cldrTest.java b/FreeColTest/src/net/sf/freecol/common/i18n/cldrTest.java
new file mode 100644
index 00000000..8b137891
--- /dev/null
+++ b/FreeColTest/src/net/sf/freecol/common/i18n/cldrTest.java
@@ -0,0 +1 @@
+
diff --git a/NameCacheTest.java b/NameCacheTest.java
new file mode 100644
index 00000000..54c12166
--- /dev/null
+++ b/NameCacheTest.java
@@ -0,0 +1,818 @@
+package net.sf.freecol.common.i18n;
+
+import java.util.List;
+import java.util.Random;
+import javax.imageio.metadata.IIOMetadataNode;
+import net.sf.freecol.common.model.Specification;
+import org.junit.*;
+import net.sf.freecol.common.model.Game;
+import net.sf.freecol.common.model.Colony;
+import net.sf.freecol.common.model.Settlement;
+import net.sf.freecol.common.model.UnitType;
+import static org.junit.Assert.*;
+import org.w3c.dom.Element;
+import net.sf.freecol.common.model.Player;
+import net.sf.freecol.common.model.Region;
+
+/**
+ * The class NameCacheTest contains tests for the class {@link NameCache}.
+ *
+ * @generatedBy CodePro at 5/15/17 9:03 AM
+ * @author michaeldavies
+ * @version $Revision: 1.0 $
+ */
+public class NameCacheTest {
+ /**
+ * Run the NameCache() constructor test.
+ *
+ * @generatedBy CodePro at 5/15/17 9:03 AM
+ */
+ @Test
+ public void testNameCache_1()
+ throws Exception {
+ NameCache result = new NameCache();
+ assertNotNull(result);
+ // add additional test code here
+ }
+
+ /**
+ * Run the void addCityOfCibola(String) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 9:03 AM
+ */
+ @Test
+ public void testAddCityOfCibola_1()
+ throws Exception {
+ String key = "Test";
+
+ NameCache.addCityOfCibola(key);
+
+ // add additional test code here
+ }
+
+ /**
+ * Run the void addCityOfCibola(String) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 9:03 AM
+ */
+ @Test
+ public void testAddCityOfCibola_2()
+ throws Exception {
+ String key = "Test";
+
+ NameCache.addCityOfCibola(key);
+
+ // add additional test code here
+ }
+
+ /**
+ * Run the void clearCitiesOfCibola() method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 9:03 AM
+ */
+ @Test
+ public void testClearCitiesOfCibola_1()
+ throws Exception {
+
+ NameCache.clearCitiesOfCibola();
+
+ // add additional test code here
+ }
+
+ /**
+ * Run the void clearCitiesOfCibola() method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 9:03 AM
+ */
+ @Test
+ public void testClearCitiesOfCibola_2()
+ throws Exception {
+
+ NameCache.clearCitiesOfCibola();
+
+ // add additional test code here
+ }
+
+ /**
+ * Run the String getCapitalName(Player,Random) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 9:03 AM
+ */
+ @Test
+ public void testGetCapitalName_1()
+ throws Exception {
+ Player player = new Player(new Game(new IIOMetadataNode(), "Test"), new IIOMetadataNode());
+ Random random = new Random();
+
+ String result = NameCache.getCapitalName(player, random);
+
+ assertNotNull(result);
+ }
+
+ /**
+ * Run the ListNumberRulesTest contains tests for the class {@link NumberRules}.
+ *
+ * @generatedBy CodePro at 5/15/17 11:45 AM
+ * @author michaeldavies
+ * @version $Revision: 1.0 $
+ */
+public class NumberRulesTest {
+ /**
+ * Run the NumberRules(InputStream) constructor test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 11:45 AM
+ */
+ @Test
+ public void testNumberRules_1()
+ throws Exception {
+ InputStream in = new PipedInputStream();
+
+ NumberRules result = new NumberRules(in);
+ assertNotNull(result);
+ }
+
+ /**
+ * Run the Number getNumberForLanguage(String) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 11:45 AM
+ */
+ @Test
+ public void testGetNumberForLanguage_1()
+ throws Exception {
+ String lang = "Test";
+
+ Number result = NumberRules.getNumberForLanguage(lang);
+
+ // add additional test code here
+ assertNotNull(result);
+ }
+
+ /**
+ * Run the Number getNumberForLanguage(String) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 11:45 AM
+ */
+ @Test
+ public void testGetNumberForLanguage_2()
+ throws Exception {
+ String lang = "";
+
+ Number result = NumberRules.getNumberForLanguage(lang);
+
+ // add additional test code here
+ assertNotNull(result);
+ }
+
+ /**
+ * Run the boolean isInitialized() method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 11:45 AM
+ */
+ @Test
+ public void testIsInitialized_1()
+ throws Exception {
+
+ boolean result = NumberRules.isInitialized();
+
+ // add additional test code here
+ assertEquals(false, result);
+ }
+
+ /**
+ * Run the boolean isInitialized() method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 11:45 AM
+ */
+ @Test
+ public void testIsInitialized_2()
+ throws Exception {
+
+ boolean result = NumberRules.isInitialized();
+
+ // add additional test code here
+ assertEquals(false, result);
+ }
+
+ /**
+ * Run the void load(InputStream) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 11:45 AM
+ */
+ @Test
+ public void testLoad_1()
+ throws Exception {
+ InputStream in = new PipedInputStream();
+
+ NumberRules.load(in);
+
+
+ }
+
+ /**
+ * Perform pre-test initialization.
+ *
+ * @throws Exception
+ * if the initialization fails for some reason
+ *
+ * @generatedBy CodePro at 5/15/17 11:45 AM
+ */
+ @Before
+ public void setUp()
+ throws Exception {
+ // add additional set up code here
+ }
+
+ /**
+ * Perform post-test clean-up.
+ *
+ * @throws Exception
+ * if the clean-up fails for some reason
+ *
+ * @generatedBy CodePro at 5/15/17 11:45 AM
+ */
+ @After
+ public void tearDown()
+ throws Exception {
+ // Add additional tear down code here
+ }
+
+ /**
+ * Launch the test.
+ *
+ * @param args the command line arguments
+ *
+ * @generatedBy CodePro at 5/15/17 11:45 AM
+ */
+ public static void main(String[] args) {
+ new org.junit.runner.JUnitCore().run(NumberRulesTest.class);
+ }
+}
\ No newline at end of file
diff --git a/NumberRulesTest.java b/NumberRulesTest.java
new file mode 100644
index 00000000..8ce51f94
--- /dev/null
+++ b/NumberRulesTest.java
@@ -0,0 +1,157 @@
+package net.sf.freecol.common.i18n;
+
+import java.io.InputStream;
+import java.io.PipedInputStream;
+import org.junit.*;
+import static org.junit.Assert.*;
+
+/**
+ * The class NumberRulesTest contains tests for the class {@link NumberRules}.
+ *
+ * @generatedBy CodePro at 5/15/17 11:45 AM
+ * @author michaeldavies
+ * @version $Revision: 1.0 $
+ */
+public class NumberRulesTest {
+ /**
+ * Run the NumberRules(InputStream) constructor test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 11:45 AM
+ */
+ @Test
+ public void testNumberRules_1()
+ throws Exception {
+ InputStream in = new PipedInputStream();
+
+ NumberRules result = new NumberRules(in);
+ assertNotNull(result);
+ }
+
+ /**
+ * Run the Number getNumberForLanguage(String) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 11:45 AM
+ */
+ @Test
+ public void testGetNumberForLanguage_1()
+ throws Exception {
+ String lang = "Test";
+
+ Number result = NumberRules.getNumberForLanguage(lang);
+
+ // add additional test code here
+ assertNotNull(result);
+ }
+
+ /**
+ * Run the Number getNumberForLanguage(String) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 11:45 AM
+ */
+ @Test
+ public void testGetNumberForLanguage_2()
+ throws Exception {
+ String lang = "";
+
+ Number result = NumberRules.getNumberForLanguage(lang);
+
+ // add additional test code here
+ assertNotNull(result);
+ }
+
+ /**
+ * Run the boolean isInitialized() method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 11:45 AM
+ */
+ @Test
+ public void testIsInitialized_1()
+ throws Exception {
+
+ boolean result = NumberRules.isInitialized();
+
+ // add additional test code here
+ assertEquals(false, result);
+ }
+
+ /**
+ * Run the boolean isInitialized() method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 11:45 AM
+ */
+ @Test
+ public void testIsInitialized_2()
+ throws Exception {
+
+ boolean result = NumberRules.isInitialized();
+
+ // add additional test code here
+ assertEquals(false, result);
+ }
+
+ /**
+ * Run the void load(InputStream) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 11:45 AM
+ */
+ @Test
+ public void testLoad_1()
+ throws Exception {
+ InputStream in = new PipedInputStream();
+
+ NumberRules.load(in);
+
+
+ }
+
+ /**
+ * Perform pre-test initialization.
+ *
+ * @throws Exception
+ * if the initialization fails for some reason
+ *
+ * @generatedBy CodePro at 5/15/17 11:45 AM
+ */
+ @Before
+ public void setUp()
+ throws Exception {
+ // add additional set up code here
+ }
+
+ /**
+ * Perform post-test clean-up.
+ *
+ * @throws Exception
+ * if the clean-up fails for some reason
+ *
+ * @generatedBy CodePro at 5/15/17 11:45 AM
+ */
+ @After
+ public void tearDown()
+ throws Exception {
+ // Add additional tear down code here
+ }
+
+ /**
+ * Launch the test.
+ *
+ * @param args the command line arguments
+ *
+ * @generatedBy CodePro at 5/15/17 11:45 AM
+ */
+ public static void main(String[] args) {
+ new org.junit.runner.JUnitCore().run(NumberRulesTest.class);
+ }
+}
\ No newline at end of file
diff --git a/NumberTest.java b/NumberTest.java
new file mode 100644
index 00000000..df374913
--- /dev/null
+++ b/NumberTest.java
@@ -0,0 +1,111 @@
+package net.sf.freecol.common.i18n;
+
+import org.junit.*;
+import static org.junit.Assert.*;
+
+/**
+ * The class NumberTest contains tests for the class {@link Number}.
+ *
+ * @generatedBy CodePro at 5/15/17 10:02 AM
+ * @author michaeldavies
+ * @version $Revision: 1.0 $
+ */
+public class NumberTest {
+ /**
+ * Run the String getKey(double) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 10:02 AM
+ */
+ @Test
+ public void testGetKey_1()
+ throws Exception {
+ Number fixture = new DefaultNumberRule();
+ double selector = 1.0;
+
+ String result = fixture.getKey(selector);
+
+ // add additional test code here
+ assertEquals("other", result);
+ }
+
+ /**
+ * Run the String getKey(String,String) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 10:02 AM
+ */
+ @Test
+ public void testGetKey_2()
+ throws Exception {
+ Number fixture = new DefaultNumberRule();
+ String selector = "";
+ String template = "";
+
+ String result = fixture.getKey(selector, template);
+
+ // add additional test code here
+ assertEquals("other", result);
+ }
+
+ /**
+ * Run the String getKey(String,String) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 10:02 AM
+ */
+ @Test
+ public void testGetKey_3()
+ throws Exception {
+ Number fixture = new DefaultNumberRule();
+ String selector = "";
+ String template = "";
+
+ String result = fixture.getKey(selector, template);
+
+ // add additional test code here
+ assertEquals("other", result);
+ }
+
+ /**
+ * Perform pre-test initialization.
+ *
+ * @throws Exception
+ * if the initialization fails for some reason
+ *
+ * @generatedBy CodePro at 5/15/17 10:02 AM
+ */
+ @Before
+ public void setUp()
+ throws Exception {
+ // add additional set up code here
+ }
+
+ /**
+ * Perform post-test clean-up.
+ *
+ * @throws Exception
+ * if the clean-up fails for some reason
+ *
+ * @generatedBy CodePro at 5/15/17 10:02 AM
+ */
+ @After
+ public void tearDown()
+ throws Exception {
+ // Add additional tear down code here
+ }
+
+ /**
+ * Launch the test.
+ *
+ * @param args the command line arguments
+ *
+ * @generatedBy CodePro at 5/15/17 10:02 AM
+ */
+ public static void main(String[] args) {
+ new org.junit.runner.JUnitCore().run(NumberTest.class);
+ }
+}
\ No newline at end of file
diff --git a/OtherNumberRuleTest.java b/OtherNumberRuleTest.java
new file mode 100644
index 00000000..732fcef6
--- /dev/null
+++ b/OtherNumberRuleTest.java
@@ -0,0 +1,74 @@
+package net.sf.freecol.common.i18n;
+
+import org.junit.*;
+import static org.junit.Assert.*;
+
+/**
+ * The class OtherNumberRuleTest contains tests for the class {@link OtherNumberRule}.
+ *
+ * @generatedBy CodePro at 5/15/17 12:16 PM
+ * @author michaeldavies
+ * @version $Revision: 1.0 $
+ */
+public class OtherNumberRuleTest {
+ /**
+ * Run the Number.Category getCategory(double) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 12:16 PM
+ */
+ @Test
+ public void testGetCategory_1()
+ throws Exception {
+ OtherNumberRule fixture = new OtherNumberRule();
+ double input = 1.0;
+
+ Number.Category result = fixture.getCategory(input);
+
+ // add additional test code here
+ assertNotNull(result);
+ assertEquals("other", result.name());
+ assertEquals("other", result.toString());
+ assertEquals(5, result.ordinal());
+ }
+
+ /**
+ * Perform pre-test initialization.
+ *
+ * @throws Exception
+ * if the initialization fails for some reason
+ *
+ * @generatedBy CodePro at 5/15/17 12:16 PM
+ */
+ @Before
+ public void setUp()
+ throws Exception {
+ // add additional set up code here
+ }
+
+ /**
+ * Perform post-test clean-up.
+ *
+ * @throws Exception
+ * if the clean-up fails for some reason
+ *
+ * @generatedBy CodePro at 5/15/17 12:16 PM
+ */
+ @After
+ public void tearDown()
+ throws Exception {
+ // Add additional tear down code here
+ }
+
+ /**
+ * Launch the test.
+ *
+ * @param args the command line arguments
+ *
+ * @generatedBy CodePro at 5/15/17 12:16 PM
+ */
+ public static void main(String[] args) {
+ new org.junit.runner.JUnitCore().run(OtherNumberRuleTest.class);
+ }
+}
\ No newline at end of file
diff --git a/PluralNumberRuleTest.java b/PluralNumberRuleTest.java
new file mode 100644
index 00000000..721b55c0
--- /dev/null
+++ b/PluralNumberRuleTest.java
@@ -0,0 +1,96 @@
+package net.sf.freecol.common.i18n;
+
+import org.junit.*;
+import static org.junit.Assert.*;
+
+/**
+ * The class PluralNumberRuleTest contains tests for the class {@link PluralNumberRule}.
+ *
+ * @generatedBy CodePro at 5/15/17 6:39 PM
+ * @author michaeldavies
+ * @version $Revision: 1.0 $
+ */
+public class PluralNumberRuleTest {
+ /**
+ * Run the Number.Category getCategory(double) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 6:39 PM
+ */
+ @Test
+ public void testGetCategory_1()
+ throws Exception {
+ PluralNumberRule fixture = new PluralNumberRule();
+ double input = 1;
+
+ Number.Category result = fixture.getCategory(input);
+
+ // add additional test code here
+ assertNotNull(result);
+ assertEquals("one", result.name());
+ assertEquals("one", result.toString());
+ assertEquals(1, result.ordinal());
+ }
+
+ /**
+ * Run the Number.Category getCategory(double) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/15/17 6:39 PM
+ */
+ @Test
+ public void testGetCategory_2()
+ throws Exception {
+ PluralNumberRule fixture = new PluralNumberRule();
+ double input = 2;
+
+ Number.Category result = fixture.getCategory(input);
+
+ // add additional test code here
+ assertNotNull(result);
+ assertEquals("other", result.name());
+ assertEquals("other", result.toString());
+ assertEquals(5, result.ordinal());
+ }
+
+ /**
+ * Perform pre-test initialization.
+ *
+ * @throws Exception
+ * if the initialization fails for some reason
+ *
+ * @generatedBy CodePro at 5/15/17 6:39 PM
+ */
+ @Before
+ public void setUp()
+ throws Exception {
+ // add additional set up code here
+ }
+
+ /**
+ * Perform post-test clean-up.
+ *
+ * @throws Exception
+ * if the clean-up fails for some reason
+ *
+ * @generatedBy CodePro at 5/15/17 6:39 PM
+ */
+ @After
+ public void tearDown()
+ throws Exception {
+ // Add additional tear down code here
+ }
+
+ /**
+ * Launch the test.
+ *
+ * @param args the command line arguments
+ *
+ * @generatedBy CodePro at 5/15/17 6:39 PM
+ */
+ public static void main(String[] args) {
+ new org.junit.runner.JUnitCore().run(PluralNumberRuleTest.class);
+ }
+}
\ No newline at end of file
diff --git a/RelationTest.java b/RelationTest.java
new file mode 100644
index 00000000..7833efe3
--- /dev/null
+++ b/RelationTest.java
@@ -0,0 +1,283 @@
+package net.sf.freecol.common.i18n;
+
+import java.util.LinkedList;
+import java.util.List;
+import org.junit.*;
+import static org.junit.Assert.*;
+
+/**
+ * The class RelationTest contains tests for the class {@link Relation}.
+ *
+ * @generatedBy CodePro at 5/15/17 6:41 PM
+ * @author michaeldavies
+ * @version $Revision: 1.0 $
+ */
+public class RelationTest {
+ /**
+ * Run the Relation(ListPowered by + CodePro Server and + Eclipse +
+ +Project Analysis |
+[projects] [packages] [explanations] + |
+++ +
+++
+ +Project +Total Classes +Abstract Classes +Concrete Classes +Afferent Coupling +Efferent Coupling +Abstractness +Instability +Distance ++ +A_Team-finalproject-3c34732ca41925ce8300b7051cc05707ac4c330d + +1034 + +92 + +942 + +0 + +891 + +0.09 + +1.0 + +0.09 +
++A_Team-finalproject-3c34732ca41925ce8300b7051cc05707ac4c330d
++
+ Afferent Couplings: 0 +Efferent Couplings: 891 +Abstractness: 0.09 +Instability: 1.0 +Distance: 0.09 +
Package Analysis |
+[projects] [packages] [explanations] + |
+++ +
+++
+ +Package +Total Classes +Abstract Classes +Concrete Classes +Afferent Coupling +Efferent Coupling +Abstractness +Instability +Distance ++ +net.sf.freecol + +2 + +0 + +2 + +18 + +2 + +0.0 + +0.1 + +-0.9 + + +net.sf.freecol.client + +8 + +0 + +8 + +10 + +8 + +0.0 + +0.44 + +-0.56 + + +net.sf.freecol.client.control + +23 + +2 + +21 + +4 + +13 + +0.09 + +0.76 + +-0.15 + + +net.sf.freecol.client.gui + +37 + +2 + +35 + +11 + +32 + +0.05 + +0.74 + +-0.2 + + +net.sf.freecol.client.gui.action + +82 + +4 + +78 + +5 + +80 + +0.05 + +0.94 + +-0.01 + + +net.sf.freecol.client.gui.animation + +4 + +0 + +4 + +0 + +4 + +0.0 + +1.0 + +0.0 + + +net.sf.freecol.client.gui.menu + +6 + +1 + +5 + +1 + +6 + +0.17 + +0.86 + +0.02 + + +net.sf.freecol.client.gui.option + +26 + +3 + +23 + +2 + +24 + +0.12 + +0.92 + +0.04 + + +net.sf.freecol.client.gui.panel + +231 + +14 + +217 + +8 + +214 + +0.06 + +0.96 + +0.02 + + +net.sf.freecol.client.gui.plaf + +26 + +0 + +26 + +2 + +26 + +0.0 + +0.93 + +-0.07 + + +net.sf.freecol.client.gui.video + +2 + +1 + +1 + +1 + +1 + +0.5 + +0.5 + +0.0 + + +net.sf.freecol.client.networking + +1 + +0 + +1 + +1 + +1 + +0.0 + +0.5 + +-0.5 + + +net.sf.freecol.common + +5 + +1 + +4 + +18 + +5 + +0.2 + +0.22 + +-0.58 + + +net.sf.freecol.common.debug + +3 + +0 + +3 + +15 + +2 + +0.0 + +0.12 + +-0.88 + + +net.sf.freecol.common.i18n + +20 + +2 + +18 + +17 + +19 + +0.1 + +0.53 + +-0.37 + + +net.sf.freecol.common.io + +12 + +0 + +12 + +23 + +10 + +0.0 + +0.3 + +-0.7 + + +net.sf.freecol.common.io.sza + +4 + +2 + +2 + +2 + +3 + +0.5 + +0.6 + +0.1 + + +net.sf.freecol.common.logging + +2 + +0 + +2 + +1 + +2 + +0.0 + +0.67 + +-0.33 + + +net.sf.freecol.common.model + +213 + +26 + +187 + +28 + +158 + +0.12 + +0.85 + +-0.03 + + +net.sf.freecol.common.model.mission + +7 + +2 + +5 + +0 + +6 + +0.29 + +1.0 + +0.29 + + +net.sf.freecol.common.model.pathfinding + +10 + +2 + +8 + +4 + +10 + +0.2 + +0.71 + +-0.09 + + +net.sf.freecol.common.networking + +77 + +5 + +72 + +12 + +75 + +0.06 + +0.86 + +-0.07 + + +net.sf.freecol.common.option + +25 + +3 + +22 + +17 + +24 + +0.12 + +0.59 + +-0.29 + + +net.sf.freecol.common.resources + +21 + +4 + +17 + +9 + +17 + +0.19 + +0.65 + +-0.16 + + +net.sf.freecol.common.sound + +8 + +0 + +8 + +3 + +7 + +0.0 + +0.7 + +-0.3 + + +net.sf.freecol.common.util + +10 + +1 + +9 + +17 + +10 + +0.1 + +0.37 + +-0.53 + + +net.sf.freecol.common.utils + +2 + +0 + +2 + +1 + +2 + +0.0 + +0.67 + +-0.33 + + +net.sf.freecol.metaserver + +4 + +0 + +4 + +0 + +4 + +0.0 + +1.0 + +0.0 + + +net.sf.freecol.server + +5 + +0 + +5 + +13 + +4 + +0.0 + +0.24 + +-0.76 + + +net.sf.freecol.server.ai + +36 + +5 + +31 + +5 + +34 + +0.14 + +0.87 + +0.01 + + +net.sf.freecol.server.ai.goal + +5 + +2 + +3 + +1 + +4 + +0.4 + +0.8 + +0.2 + + +net.sf.freecol.server.ai.mission + +24 + +1 + +23 + +2 + +23 + +0.04 + +0.92 + +-0.04 + + +net.sf.freecol.server.control + +30 + +4 + +26 + +6 + +29 + +0.13 + +0.83 + +-0.04 + + +net.sf.freecol.server.generator + +13 + +3 + +10 + +4 + +12 + +0.23 + +0.75 + +-0.02 + + +net.sf.freecol.server.model + +22 + +2 + +20 + +12 + +21 + +0.09 + +0.64 + +-0.27 + + +net.sf.freecol.server.networking + +2 + +0 + +2 + +3 + +2 + +0.0 + +0.4 + +-0.6 + + +net.sf.freecol.tools + +19 + +0 + +19 + +0 + +18 + +0.0 + +1.0 + +0.0 + + +net.sf.freecol.util.test + +7 + +0 + +7 + +14 + +7 + +0.0 + +0.33 + +-0.67 +
+++ +
net.sf.freecol
+net.sf.freecol.client
+net.sf.freecol.client.control
+net.sf.freecol.client.gui
+net.sf.freecol.client.gui.action
+net.sf.freecol.client.gui.menu
+net.sf.freecol.client.gui.option
+net.sf.freecol.client.gui.panel
+net.sf.freecol.client.gui.plaf
+net.sf.freecol.client.gui.video
++
+ +Type +Referencing Types +Referenced Types ++ +net.sf.freecol.client.gui.video.VideoComponent + +net.sf.freecol.client.gui.SwingGUI + + +net.sf.freecol.client.gui.panel.FreeColImageBorder +
+net.sf.freecol.common.resources.Video + ++ +net.sf.freecol.client.gui.video.VideoListener + +net.sf.freecol.client.gui.SwingGUI$AbortListener + + +None + net.sf.freecol.client.networking
++
+ +Type +Referencing Types +Referenced Types ++ +net.sf.freecol.client.networking.UserServerAPI + +net.sf.freecol.client.FreeColClient + + +net.sf.freecol.common.debug.FreeColDebugger +
+net.sf.freecol.common.networking.ServerAPI +
+net.sf.freecol.client.gui.GUI +
+net.sf.freecol.common.debug.FreeColDebugger$DebugMode + +net.sf.freecol.common
+net.sf.freecol.common.debug
+net.sf.freecol.common.i18n
+net.sf.freecol.common.io
+net.sf.freecol.common.logging
++
+ +Type +Referencing Types +Referenced Types ++ +net.sf.freecol.common.logging.DefaultHandler + +net.sf.freecol.FreeCol + + +net.sf.freecol.common.debug.FreeColDebugger +
+net.sf.freecol.common.FreeColException +
+net.sf.freecol.common.util.Utils +
+net.sf.freecol.FreeCol +
+net.sf.freecol.common.networking.DOMMessage + +net.sf.freecol.common.model
+net.sf.freecol.common.model.pathfinding
+net.sf.freecol.common.networking
+net.sf.freecol.common.option
+net.sf.freecol.common.resources
+net.sf.freecol.common.sound
+net.sf.freecol.common.util
+net.sf.freecol.common.utils
++
+ +Type +Referencing Types +Referenced Types ++ +net.sf.freecol.common.utils.AllTests + +net.sf.freecol.common.AllTests + + +None + + +net.sf.freecol.common.utils.UtilsTest + +None + +net.sf.freecol.common.util.CollectionUtils +
+net.sf.freecol.util.test.FreeColTestCase + +net.sf.freecol.server
+net.sf.freecol.server.ai
+net.sf.freecol.server.ai.goal
+net.sf.freecol.server.ai.mission
+net.sf.freecol.server.control
+net.sf.freecol.server.generator
+net.sf.freecol.server.model
+net.sf.freecol.server.networking
+net.sf.freecol.util.test
+
++net.sf.freecol
++
+ Afferent Couplings: 18 +Efferent Couplings: 2 +Abstractness: 0.0 +Instability: 0.1 +Distance: -0.9 +net.sf.freecol.client
++
+ Afferent Couplings: 10 +Efferent Couplings: 8 +Abstractness: 0.0 +Instability: 0.44 +Distance: -0.56 +net.sf.freecol.client.control
++
+ Afferent Couplings: 4 +Efferent Couplings: 13 +Abstractness: 0.09 +Instability: 0.76 +Distance: -0.15 +net.sf.freecol.client.gui
++
+ Afferent Couplings: 11 +Efferent Couplings: 32 +Abstractness: 0.05 +Instability: 0.74 +Distance: -0.2 +net.sf.freecol.client.gui.action
++
+ Afferent Couplings: 5 +Efferent Couplings: 80 +Abstractness: 0.05 +Instability: 0.94 +Distance: -0.01 +net.sf.freecol.client.gui.animation
++
+ Afferent Couplings: 0 +Efferent Couplings: 4 +Abstractness: 0.0 +Instability: 1.0 +Distance: 0.0 ++
+ Abstract Classes +Concrete Classes +Referencing Packages +Referenced Packages ++ + +net.sf.freecol.client.gui.animation.Animations +
net.sf.freecol.client.gui.animation.UnitAttackAnimation +
net.sf.freecol.client.gui.animation.UnitImageAnimation +
net.sf.freecol.client.gui.animation.UnitMoveAnimation ++None + +java.awt +
+java.lang +
+net.sf.freecol.client +
+net.sf.freecol.client.gui +
+net.sf.freecol.common.io.sza +
+net.sf.freecol.common.model +
+net.sf.freecol.common.resources + +net.sf.freecol.client.gui.menu
++
+ Afferent Couplings: 1 +Efferent Couplings: 6 +Abstractness: 0.17 +Instability: 0.86 +Distance: 0.02 ++
+ Abstract Classes +Concrete Classes +Referencing Packages +Referenced Packages ++ +net.sf.freecol.client.gui.menu.FreeColMenuBar + +net.sf.freecol.client.gui.menu.DebugMenu +
net.sf.freecol.client.gui.menu.FreeColMenuTest +
net.sf.freecol.client.gui.menu.InGameMenuBar +
net.sf.freecol.client.gui.menu.MapEditorMenuBar +
net.sf.freecol.client.gui.menu.MenuMouseMotionListener ++net.sf.freecol.client.gui + + +java.awt +
+java.awt.event +
+java.awt.geom +
+java.lang +
+java.net +
+java.util.logging +
+javax.swing +
+net.sf.freecol.client +
+net.sf.freecol.client.gui +
+net.sf.freecol.client.gui.action +
+net.sf.freecol.client.gui.panel +
+net.sf.freecol.common.debug +
+net.sf.freecol.common.i18n +
+net.sf.freecol.common.model + +net.sf.freecol.client.gui.option
++
+ Afferent Couplings: 2 +Efferent Couplings: 24 +Abstractness: 0.12 +Instability: 0.92 +Distance: 0.04 +net.sf.freecol.client.gui.panel
++
+ Afferent Couplings: 8 +Efferent Couplings: 214 +Abstractness: 0.06 +Instability: 0.96 +Distance: 0.02 +net.sf.freecol.client.gui.plaf
++
+ Afferent Couplings: 2 +Efferent Couplings: 26 +Abstractness: 0.0 +Instability: 0.93 +Distance: -0.07 +net.sf.freecol.client.gui.video
++
+ Afferent Couplings: 1 +Efferent Couplings: 1 +Abstractness: 0.5 +Instability: 0.5 +Distance: 0.0 ++
+ Abstract Classes +Concrete Classes +Referencing Packages +Referenced Packages ++ +net.sf.freecol.client.gui.video.VideoListener + +net.sf.freecol.client.gui.video.VideoComponent + +net.sf.freecol.client.gui + + +com.fluendo.player +
+java.awt +
+java.awt.event +
+java.lang +
+java.util.logging +
+javax.swing +
+javax.swing.border +
+net.sf.freecol.client.gui.panel +
+net.sf.freecol.common.resources + +net.sf.freecol.client.networking
++
+ Afferent Couplings: 1 +Efferent Couplings: 1 +Abstractness: 0.0 +Instability: 0.5 +Distance: -0.5 ++
+ Abstract Classes +Concrete Classes +Referencing Packages +Referenced Packages ++ + +net.sf.freecol.client.networking.UserServerAPI + +net.sf.freecol.client + + +java.lang +
+net.sf.freecol.client.gui +
+net.sf.freecol.common.debug +
+net.sf.freecol.common.networking +
+org.w3c.dom + +net.sf.freecol.common
++
+ Afferent Couplings: 18 +Efferent Couplings: 5 +Abstractness: 0.2 +Instability: 0.22 +Distance: -0.58 +net.sf.freecol.common.debug
++
+ Afferent Couplings: 15 +Efferent Couplings: 2 +Abstractness: 0.0 +Instability: 0.12 +Distance: -0.88 +net.sf.freecol.common.i18n
++
+ Afferent Couplings: 17 +Efferent Couplings: 19 +Abstractness: 0.1 +Instability: 0.53 +Distance: -0.37 +net.sf.freecol.common.io
++
+ Afferent Couplings: 23 +Efferent Couplings: 10 +Abstractness: 0.0 +Instability: 0.3 +Distance: -0.7 +net.sf.freecol.common.io.sza
++
+ Afferent Couplings: 2 +Efferent Couplings: 3 +Abstractness: 0.5 +Instability: 0.6 +Distance: 0.1 ++
+ Abstract Classes +Concrete Classes +Referencing Packages +Referenced Packages ++ +net.sf.freecol.common.io.sza.AnimationEvent +
net.sf.freecol.common.io.sza.ImageAnimationEvent ++net.sf.freecol.common.io.sza.SimpleZippedAnimation +
net.sf.freecol.common.io.sza.SimpleZippedAnimation$ImageAnimationEventImpl ++net.sf.freecol.client.gui.animation +
+net.sf.freecol.common.resources + ++java.awt +
+java.awt.image +
+java.io +
+java.lang +
+java.net +
+java.util +
+java.util.zip +
+javax.imageio + +net.sf.freecol.common.logging
++
+ Afferent Couplings: 1 +Efferent Couplings: 2 +Abstractness: 0.0 +Instability: 0.67 +Distance: -0.33 ++
+ Abstract Classes +Concrete Classes +Referencing Packages +Referenced Packages ++ + +net.sf.freecol.common.logging.DefaultHandler +
net.sf.freecol.common.logging.TextFormatter ++net.sf.freecol + + +java.io +
+java.lang +
+java.util +
+java.util.logging +
+net.sf.freecol +
+net.sf.freecol.common +
+net.sf.freecol.common.debug +
+net.sf.freecol.common.networking +
+net.sf.freecol.common.util + +net.sf.freecol.common.model
++
+ Afferent Couplings: 28 +Efferent Couplings: 158 +Abstractness: 0.12 +Instability: 0.85 +Distance: -0.03 +net.sf.freecol.common.model.mission
++
+ Afferent Couplings: 0 +Efferent Couplings: 6 +Abstractness: 0.29 +Instability: 1.0 +Distance: 0.29 ++
+ Abstract Classes +Concrete Classes +Referencing Packages +Referenced Packages ++ +net.sf.freecol.common.model.mission.AbstractMission +
net.sf.freecol.common.model.mission.Mission ++net.sf.freecol.common.model.mission.CompoundMission +
net.sf.freecol.common.model.mission.GoToMission +
net.sf.freecol.common.model.mission.ImprovementMission +
net.sf.freecol.common.model.mission.Mission$MissionState +
net.sf.freecol.common.model.mission.MissionManager ++None + +java.lang +
+java.util.logging +
+javax.xml.stream +
+net.sf.freecol.common.io +
+net.sf.freecol.common.model +
+org.w3c.dom + +net.sf.freecol.common.model.pathfinding
++
+ Afferent Couplings: 4 +Efferent Couplings: 10 +Abstractness: 0.2 +Instability: 0.71 +Distance: -0.09 +net.sf.freecol.common.networking
++
+ Afferent Couplings: 12 +Efferent Couplings: 75 +Abstractness: 0.06 +Instability: 0.86 +Distance: -0.07 +net.sf.freecol.common.option
++
+ Afferent Couplings: 17 +Efferent Couplings: 24 +Abstractness: 0.12 +Instability: 0.59 +Distance: -0.29 +net.sf.freecol.common.resources
++
+ Afferent Couplings: 9 +Efferent Couplings: 17 +Abstractness: 0.19 +Instability: 0.65 +Distance: -0.16 +net.sf.freecol.common.sound
++
+ Afferent Couplings: 3 +Efferent Couplings: 7 +Abstractness: 0.0 +Instability: 0.7 +Distance: -0.3 ++
+ Abstract Classes +Concrete Classes +Referencing Packages +Referenced Packages ++ + +net.sf.freecol.common.sound.AllTests +
net.sf.freecol.common.sound.OggVorbisDecoderFactory +
net.sf.freecol.common.sound.OggVorbisDecoderFactory$OggStream +
net.sf.freecol.common.sound.OggVorbisDecoderFactory$OggVorbisAudioInputStream +
net.sf.freecol.common.sound.Playlist +
net.sf.freecol.common.sound.SoundPlayer +
net.sf.freecol.common.sound.SoundPlayer$SoundPlayerThread +
net.sf.freecol.common.sound.SoundTest ++net.sf.freecol.client.control +
+net.sf.freecol.common +
+net.sf.freecol.common.resources + ++com.jcraft.jogg +
+com.jcraft.jorbis +
+java.io +
+java.lang +
+java.util +
+java.util.logging +
+javax.sound.sampled +
+junit.framework +
+net.sf.freecol +
+net.sf.freecol.client +
+net.sf.freecol.common.io +
+net.sf.freecol.common.option +
+net.sf.freecol.common.resources +
+net.sf.freecol.util.test + +net.sf.freecol.common.util
++
+ Afferent Couplings: 17 +Efferent Couplings: 10 +Abstractness: 0.1 +Instability: 0.37 +Distance: -0.53 +net.sf.freecol.common.utils
++
+ Afferent Couplings: 1 +Efferent Couplings: 2 +Abstractness: 0.0 +Instability: 0.67 +Distance: -0.33 ++
+ Abstract Classes +Concrete Classes +Referencing Packages +Referenced Packages ++ + +net.sf.freecol.common.utils.AllTests +
net.sf.freecol.common.utils.UtilsTest ++net.sf.freecol.common + + +java.lang +
+java.util +
+junit.framework +
+net.sf.freecol.common.util +
+net.sf.freecol.util.test + +net.sf.freecol.metaserver
++
+ Afferent Couplings: 0 +Efferent Couplings: 4 +Abstractness: 0.0 +Instability: 1.0 +Distance: 0.0 ++
+ Abstract Classes +Concrete Classes +Referencing Packages +Referenced Packages ++ + +net.sf.freecol.metaserver.MetaItem +
net.sf.freecol.metaserver.MetaRegister +
net.sf.freecol.metaserver.MetaServer +
net.sf.freecol.metaserver.NetworkHandler ++None + +java.io +
+java.lang +
+java.net +
+java.util +
+java.util.logging +
+net.sf.freecol +
+net.sf.freecol.common +
+net.sf.freecol.common.networking +
+org.w3c.dom + +net.sf.freecol.server
++
+ Afferent Couplings: 13 +Efferent Couplings: 4 +Abstractness: 0.0 +Instability: 0.24 +Distance: -0.76 +net.sf.freecol.server.ai
++
+ Afferent Couplings: 5 +Efferent Couplings: 34 +Abstractness: 0.14 +Instability: 0.87 +Distance: 0.01 +net.sf.freecol.server.ai.goal
++
+ Afferent Couplings: 1 +Efferent Couplings: 4 +Abstractness: 0.4 +Instability: 0.8 +Distance: 0.2 ++
+ Abstract Classes +Concrete Classes +Referencing Packages +Referenced Packages ++ +net.sf.freecol.server.ai.goal.Goal +
net.sf.freecol.server.ai.goal.GoalConstants ++net.sf.freecol.server.ai.goal.CreateMissionAtSettlementGoal +
net.sf.freecol.server.ai.goal.GotoAdjacentGoal +
net.sf.freecol.server.ai.goal.ManageMissionariesGoal ++net.sf.freecol.server.ai + + +java.lang +
+java.util.logging +
+javax.xml.stream +
+net.sf.freecol.common.io +
+net.sf.freecol.common.model +
+net.sf.freecol.server.ai + +net.sf.freecol.server.ai.mission
++
+ Afferent Couplings: 2 +Efferent Couplings: 23 +Abstractness: 0.04 +Instability: 0.92 +Distance: -0.04 +net.sf.freecol.server.control
++
+ Afferent Couplings: 6 +Efferent Couplings: 29 +Abstractness: 0.13 +Instability: 0.83 +Distance: -0.04 +net.sf.freecol.server.generator
++
+ Afferent Couplings: 4 +Efferent Couplings: 12 +Abstractness: 0.23 +Instability: 0.75 +Distance: -0.02 +net.sf.freecol.server.model
++
+ Afferent Couplings: 12 +Efferent Couplings: 21 +Abstractness: 0.09 +Instability: 0.64 +Distance: -0.27 +net.sf.freecol.server.networking
++
+ Afferent Couplings: 3 +Efferent Couplings: 2 +Abstractness: 0.0 +Instability: 0.4 +Distance: -0.6 ++
+ Abstract Classes +Concrete Classes +Referencing Packages +Referenced Packages ++ + +net.sf.freecol.server.networking.DummyConnection +
net.sf.freecol.server.networking.Server ++net.sf.freecol.server +
+net.sf.freecol.server.ai +
+net.sf.freecol.server.control + ++java.io +
+java.lang +
+java.net +
+java.util.logging +
+net.sf.freecol +
+net.sf.freecol.common +
+net.sf.freecol.common.networking +
+net.sf.freecol.server +
+org.w3c.dom + +net.sf.freecol.tools
++
+ Afferent Couplings: 0 +Efferent Couplings: 18 +Abstractness: 0.0 +Instability: 1.0 +Distance: 0.0 +net.sf.freecol.util.test
++
+ Afferent Couplings: 14 +Efferent Couplings: 7 +Abstractness: 0.0 +Instability: 0.33 +Distance: -0.67 +
Explanations |
+[projects] [packages] [explanations] + |
++ + + + diff --git a/doc/Dependencies_files/Dependencies-cycle1.gif b/doc/Dependencies_files/Dependencies-cycle1.gif new file mode 100644 index 00000000..cd7c7d3e Binary files /dev/null and b/doc/Dependencies_files/Dependencies-cycle1.gif differ diff --git a/doc/Dependencies_files/Dependencies-package.gif b/doc/Dependencies_files/Dependencies-package.gif new file mode 100644 index 00000000..b6c54685 Binary files /dev/null and b/doc/Dependencies_files/Dependencies-package.gif differ diff --git a/doc/Dependencies_files/Dependencies-project.gif b/doc/Dependencies_files/Dependencies-project.gif new file mode 100644 index 00000000..a936c2b5 Binary files /dev/null and b/doc/Dependencies_files/Dependencies-project.gif differ diff --git a/reports/AuditViolations1.html b/reports/AuditViolations1.html new file mode 100644 index 00000000..0be8c968 --- /dev/null +++ b/reports/AuditViolations1.html @@ -0,0 +1,8410 @@ + + + + + + ++The following are definitions of some of the terms used +in this report. For the most part, these definitions +are taken from the paper +OO Design Quality Metrics +by Robert Martin. +
++
+- Scope +
- +Anything that can contain types; either a package or project. +
+
+- Number of Types +
- +The total number of types defined within a scope. +
+
+- Afferent Coupling +
- +The number of types outside a scope that depend on +types defined in the scope. (Sometimes abreviated as +
Ca.) ++
+- Efferent Coupling +
- +The number of types in a scope that depend on types +defined outside the scope. (Sometimes abreviated as +
Ce.) ++
+- Abstractness +
- +The number of abstract types (abstract classes and +interfaces) divided by the total number of types. +It ranges between zero (0.0) and one (1.0), +where zero indicates a completely concrete scope +and one indicates a completely abstract scope. +
+
+- Instability +
- +The ratio of efferent coupling to the total coupling. +This value is computed as
Ce / (Ca + Ce)+and represents the resiliance of the scope to change. +It ranges between zero (0.0) and one (1.0), +where zero indicates a maximally stable scope +and one indicates a maximally instable scope. ++
+- Distance +
- +The normalized distance of a scope (computed as +
| A + I - 1 |) from the main sequence +(A + I = 1). This value represents the +degree to which stability and abstractness are balanced. +It ranges between zero (0.0) and one (1.0), +where zero indicates a maximally balanced scope +and one indicates a maximally unbalanced scope. +
This document contains the results of auditing A_Team-finalproject at 5/13/17 12:43 PM, using the default audit rule set CodePro Core.
+|
+
+
+
+
+
+ | ||||
| Violation | +Recommendation | +Severity | +Resource | +Line | +
|---|---|---|---|---|
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ColonyPanel.java | ++646 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ColonyPanel.java | ++647 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ColonyPanel.java | ++649 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ColonyPanel.java | ++650 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ColonyPanel.java | ++657 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ColonyPanel.java | ++658 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ColonyPanel.java | ++659 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ColonyPanel.java | ++667 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ColonyPanel.java | ++668 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ColonyPanel.java | ++669 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ColonyPanel.java | ++672 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ColonyPanel.java | ++673 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ReportTradePanel.java | ++197 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++DebugUtils.java | ++864 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Relation.java | ++90 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++FreeColXMLReader.java | ++262 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++FreeColXMLReader.java | ++263 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Ability.java | ++555 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++AbstractUnit.java | ++259 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++AbstractUnit.java | ++260 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Building.java | ++650 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Building.java | ++651 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Building.java | ++653 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Building.java | ++654 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++BuildQueue.java | ++239 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++BuildQueue.java | ++241 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++BuildQueue.java | ++243 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ColonyTile.java | ++527 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ColonyTile.java | ++528 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ColonyTile.java | ++529 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ColonyTile.java | ++530 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ColonyTradeItem.java | ++189 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ColonyTradeItem.java | ++190 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ColonyTradeItem.java | ++190 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++DiplomaticTrade.java | ++522 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++DiplomaticTrade.java | ++523 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++DiplomaticTrade.java | ++524 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++DiplomaticTrade.java | ++529 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Disaster.java | ++208 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Disaster.java | ++210 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Disaster.java | ++212 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Effect.java | ++209 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Effect.java | ++210 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Effect.java | ++211 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Effect.java | ++212 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++FeatureContainer.java | ++490 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++FeatureContainer.java | ++492 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++FeatureContainer.java | ++498 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++FeatureContainer.java | ++500 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++FeatureContainer.java | ++502 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++GoldTradeItem.java | ++174 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++GoldTradeItem.java | ++174 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++GoldTradeItem.java | ++174 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++GoodsContainer.java | ++612 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++GoodsContainer.java | ++615 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++GoodsContainer.java | ++621 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++GoodsTradeItem.java | ++204 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++GoodsTradeItem.java | ++205 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++GoodsTradeItem.java | ++205 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++GoodsTradeItem.java | ++206 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++HistoryEvent.java | ++320 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++HistoryEvent.java | ++321 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++HistoryEvent.java | ++322 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++HistoryEvent.java | ++327 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++HistoryEvent.java | ++327 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++InciteTradeItem.java | ++180 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++InciteTradeItem.java | ++181 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++InciteTradeItem.java | ++181 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++IndianSettlement.java | ++1,585 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++IndianSettlement.java | ++1,585 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++LastSale.java | ++173 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++LastSale.java | ++176 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Limit.java | ++367 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Limit.java | ++368 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Map.java | ++1,322 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Market.java | ++566 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Market.java | ++569 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Market.java | ++571 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++MarketData.java | ++465 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++MarketData.java | ++466 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++MarketData.java | ++477 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Modifier.java | ++658 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Modifier.java | ++659 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Modifier.java | ++666 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Modifier.java | ++669 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++NationOptions.java | ++329 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++NationOptions.java | ++331 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++NationOptions.java | ++332 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++NationOptions.java | ++333 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Occupation.java | ++184 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Occupation.java | ++185 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ProductionInfo.java | ++169 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ProductionMap.java | ++130 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ProductionMap.java | ++130 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ProductionMap.java | ++132 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ProductionMap.java | ++212 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ProductionMap.java | ++214 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ProductionMap.java | ++215 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ProductionType.java | ++511 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ProductionType.java | ++511 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ProductionType.java | ++513 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ProductionType.java | ++534 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Region.java | ++628 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Region.java | ++629 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Region.java | ++631 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Region.java | ++632 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Region.java | ++633 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Role.java | ++397 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Role.java | ++397 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Role.java | ++399 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Scope.java | ++383 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Scope.java | ++383 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Scope.java | ++386 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Scope.java | ++386 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Scope.java | ++390 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++StanceTradeItem.java | ++179 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++StanceTradeItem.java | ++180 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++StanceTradeItem.java | ++180 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++StringTemplate.java | ++584 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++StringTemplate.java | ++589 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++StringTemplate.java | ++590 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++StringTemplate.java | ++593 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++StringTemplate.java | ++598 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Tile.java | ++2,247 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Tile.java | ++2,248 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Tile.java | ++2,749 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Tile.java | ++2,750 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Tile.java | ++2,751 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Tile.java | ++2,751 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Tile.java | ++2,753 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++TileImprovement.java | ++669 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++TileImprovement.java | ++673 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++TileImprovement.java | ++674 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++TileImprovementStyle.java | ++127 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++TileItemContainer.java | ++662 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++TileItemContainer.java | ++663 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++TileItemContainer.java | ++664 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++TradeRoute.java | ++403 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++TradeRoute.java | ++404 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++TradeRoute.java | ++407 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++TradeRoute.java | ++408 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++TradeRouteStop.java | ++322 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++TradeRouteStop.java | ++323 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++TradeRouteStop.java | ++325 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++TradeRouteStop.java | ++327 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++TypeCountMap.java | ++99 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++TypeCountMap.java | ++102 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++TypeCountMap.java | ++102 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++TypeCountMap.java | ++104 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Unit.java | ++2,366 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Unit.java | ++2,368 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Unit.java | ++3,937 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Unit.java | ++3,939 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Unit.java | ++3,941 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Unit.java | ++4,547 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Unit.java | ++4,553 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Unit.java | ++4,554 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Unit.java | ++4,556 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Unit.java | ++4,558 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Unit.java | ++4,560 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++Unit.java | ++4,562 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++UnitTradeItem.java | ++167 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++UnitTradeItem.java | ++168 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++UnitTradeItem.java | ++168 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++UnitTypeChange.java | ++351 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++UnitTypeChange.java | ++352 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++UnitTypeChange.java | ++354 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++UnitTypeChange.java | ++355 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++UnitTypeChange.java | ++357 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++AbstractUnitOption.java | ++273 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++AbstractUnitOption.java | ++274 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++AbstractUnitOption.java | ++274 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++BooleanOption.java | ++129 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++BooleanOption.java | ++131 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++FileOption.java | ++134 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++FileOption.java | ++136 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++IntegerOption.java | ++212 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++IntegerOption.java | ++214 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ListOption.java | ++296 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ListOption.java | ++300 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ListOption.java | ++304 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ModOption.java | ++178 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ModOption.java | ++178 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++OptionGroup.java | ++609 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++OptionGroup.java | ++611 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++PercentageOption.java | ++57 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++PercentageOption.java | ++58 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++SelectOption.java | ++227 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++SelectOption.java | ++230 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++StringOption.java | ++201 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++StringOption.java | ++205 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++TextOption.java | ++130 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++TextOption.java | ++132 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++UnitTypeOption.java | ++315 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++UnitTypeOption.java | ++319 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++LogBuilder.java | ++199 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++RandomUtils.java | ++70 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ProductionCache.java | ++418 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ProductionCache.java | ++425 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++TileImprovementPlan.java | ++369 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++TileImprovementPlan.java | ++370 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++TileImprovementPlan.java | ++373 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++TileImprovementPlan.java | ++374 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++WorkLocationPlan.java | ++130 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++WorkLocationPlan.java | ++131 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++WorkLocationPlan.java | ++133 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++204 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++207 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++210 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++431 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++432 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++434 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++435 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++436 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++437 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++438 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++439 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++513 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++514 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++516 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++517 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++518 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++579 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++580 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++582 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++583 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++705 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++706 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++708 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++709 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++710 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++711 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++812 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++813 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++815 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++816 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++872 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++873 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++875 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++876 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++877 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++940 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++941 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++943 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++944 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++1,037 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++1,038 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++1,040 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++1,042 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++1,044 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++1,044 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++1,105 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++1,106 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++1,108 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++1,109 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++1,178 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++1,179 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++1,181 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++1,182 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++1,183 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++1,184 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++1,185 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++1,248 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++1,249 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++1,251 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++1,252 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++1,319 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++1,320 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++1,322 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++1,323 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++1,324 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++1,325 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ChangeSet.java | ++1,926 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++UserConnectionHandler.java | ++228 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++UserConnectionHandler.java | ++230 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ServerPlayer.java | ++1,168 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ServerPlayer.java | ++1,171 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ServerPlayer.java | ++1,604 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ServerPlayer.java | ++1,610 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ServerPlayer.java | ++1,617 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ServerPlayer.java | ++1,624 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ServerPlayer.java | ++4,341 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ServerPlayer.java | ++4,342 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ServerPlayer.java | ++4,343 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ServerRegion.java | ++543 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ServerRegion.java | ++543 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ServerRegion.java | ++544 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ColonizationMapReader.java | ++171 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++ColonizationMapReader.java | ++173 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++TranslationReport.java | ++259 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++TranslationReport.java | ++261 | +
| String literal can be replaced by a character literal | ++Replace the string literal with a character literal. | +Medium | ++TranslationReport.java | ++263 | +
|
+
+
+
+
+
+ | ||||
| Violation | +Recommendation | +Severity | +Resource | +Line | +
| Octal literal | ++Remove all leading zeros so that it will no longer be an octal representation. | +Low | ++ColonizationMapLoader.java | ++133 | +
| Octal literal | ++Remove all leading zeros so that it will no longer be an octal representation. | +Low | ++ColonizationMapLoader.java | ++144 | +
|
+
+
+
+
+
+ | ||||
| Violation | +Recommendation | +Severity | +Resource | +Line | +
| Do not use Runtime.exec() to execute commands | ++Find a platform independent way of causing the same behavior. | +Medium | ++AboutPanel.java | ++189 | +
|
+
+
+
+
+
+ | ||||
| Violation | +Recommendation | +Severity | +Resource | +Line | +
| Duplicate import: import static net.sf.freecol.common.util.CollectionUtils.*; | ++Delete the duplicate import. | +Medium | ++WorkLocation.java | ++36 | +
|
+
+
+
+
+
+ | ||||
| Violation | +Recommendation | +Severity | +Resource | +Line | +
| Duplicate property name: model.option.landUnitCheat.shortDescription | ++Delete the duplicate property. | +High | ++FreeColMessages.properties | ++665 | +
| Duplicate property name: mapGeneratorOptions.terrainGenerator.name | ++Delete the duplicate property. | +High | ++FreeColMessages.properties | ++866 | +
| Duplicate property name: mapGeneratorOptions.terrainGenerator.shortDescription | ++Delete the duplicate property. | +High | ++FreeColMessages.properties | ++867 | +
|
+
+
+
+
+
+ | ||||
| Violation | +Recommendation | +Severity | +Resource | +Line | +
| Empty catch clause for exception e | ++Delete the empty catch clause. | +Medium | ++InGameController.java | ++1,626 | +
| Empty catch clause for exception ex | ++Delete the empty catch clause. | +Medium | ++PreGameInputHandler.java | ++283 | +
| Empty catch clause for exception e | ++Delete the empty catch clause. | +Medium | ++Canvas.java | ++153 | +
| Empty catch clause for exception e | ++Delete the empty catch clause. | +Medium | ++Canvas.java | ++560 | +
| Empty catch clause for exception e | ++Delete the empty catch clause. | +Medium | ++Canvas.java | ++817 | +
| Empty catch clause for exception e | ++Delete the empty catch clause. | +Medium | ++Canvas.java | ++842 | +
| Empty catch clause for exception e | ++Delete the empty catch clause. | +Medium | ++Canvas.java | ++937 | +
| Empty catch clause for exception e | ++Delete the empty catch clause. | +Medium | ++Canvas.java | ++954 | +
| Empty catch clause for exception cce | ++Delete the empty catch clause. | +Medium | ++Canvas.java | ++1,173 | +
| Empty catch clause for exception x | ++Delete the empty catch clause. | +Medium | ++AboutPanel.java | ++190 | +
| Empty catch clause for exception e | ++Delete the empty catch clause. | +Medium | ++BuildingDetailPanel.java | ++159 | +
| Empty catch clause for exception e | ++Delete the empty catch clause. | +Medium | ++RecruitPanel.java | ++136 | +
| Empty catch clause for exception e | ++Delete the empty catch clause. | +Medium | ++UnitDetailPanel.java | ++187 | +
| Empty catch clause for exception he | ++Delete the empty catch clause. | +Medium | ++SwingGUI.java | ++353 | +
| Empty catch clause for exception he | ++Delete the empty catch clause. | +Medium | ++SwingGUI.java | ++359 | +
| Empty catch clause for exception npe | ++Delete the empty catch clause. | +Medium | ++DebugUtils.java | ++595 | +
| Empty catch clause for exception nfe | ++Delete the empty catch clause. | +Medium | ++FreeColDebugger.java | ++164 | +
| Empty catch clause for exception e | ++Delete the empty catch clause. | +Medium | ++FreeColDebugger.java | ++271 | +
| Empty catch clause for exception nfe | ++Delete the empty catch clause. | +Medium | ++FreeColSeed.java | ++60 | +
| Empty catch clause for exception e | ++Delete the empty catch clause. | +Medium | ++Messages.java | ++271 | +
| Empty catch clause for exception e | ++Delete the empty catch clause. | +Medium | ++Messages.java | ++290 | +
| Empty catch clause for exception e | ++Delete the empty catch clause. | +Medium | ++SimpleZippedAnimation.java | ++112 | +
| Empty catch clause for exception cce | ++Delete the empty catch clause. | +Medium | ++Colony.java | ++626 | +
| Empty catch clause for exception cce | ++Delete the empty catch clause. | +Medium | ++Colony.java | ++655 | +
| Empty catch clause for exception nfe | ++Delete the empty catch clause. | +Medium | ++EuropeWas.java | ++64 | +
| Empty catch clause for exception nfe | ++Delete the empty catch clause. | +Medium | ++FreeColObject.java | ++202 | +
| Empty catch clause for exception e | ++Delete the empty catch clause. | +Medium | ++ClaimLandMessage.java | ++103 | +
| Empty catch clause for exception e | ++Delete the empty catch clause. | +Medium | ++ClaimLandMessage.java | ++108 | +
| Empty catch clause for exception nfe | ++Delete the empty catch clause. | +Medium | ++FirstContactMessage.java | ++111 | +
| Empty catch clause for exception nfe | ++Delete the empty catch clause. | +Medium | ++IndianDemandMessage.java | ++128 | +
| Empty catch clause for exception ie | ++Delete the empty catch clause. | +Medium | ++NetworkReplyObject.java | ++72 | +
| Empty catch clause for exception e | ++Delete the empty catch clause. | +Medium | ++ServerAPI.java | ++523 | +
| Empty catch clause for exception e | ++Delete the empty catch clause. | +Medium | ++ServerAPI.java | ++979 | +
| Empty catch clause for exception e | ++Delete the empty catch clause. | +Medium | ++ServerAPI.java | ++1,262 | +
| Empty catch clause for exception e | ++Delete the empty catch clause. | +Medium | ++AudioMixerOption.java | ++108 | +
| Empty catch clause for exception e | ++Delete the empty catch clause. | +Medium | ++SoundPlayer.java | ++221 | +
| Empty catch clause for exception nfe | ++Delete the empty catch clause. | +Medium | ++FreeCol.java | ++1,078 | +
| Empty catch clause for exception ioe | ++Delete the empty catch clause. | +Medium | ++FreeCol.java | ++1,193 | +
| Empty catch clause for exception nfe | ++Delete the empty catch clause. | +Medium | ++FreeCol.java | ++1,225 | +
| Empty catch clause for exception nfe | ++Delete the empty catch clause. | +Medium | ++FreeCol.java | ++1,255 | +
| Empty catch clause for exception e | ++Delete the empty catch clause. | +Medium | ++NetworkHandler.java | ++155 | +
| Empty catch clause for exception e | ++Delete the empty catch clause. | +Medium | ++UserConnectionHandler.java | ++190 | +
| Empty catch clause for exception e | ++Delete the empty catch clause. | +Medium | ++DummyConnection.java | ++104 | +
| Empty catch clause for exception e | ++Delete the empty catch clause. | +Medium | ++GenerateDocumentation.java | ++143 | +
| Empty catch clause for exception e | ++Delete the empty catch clause. | +Medium | ++InstallerTranslations.java | ++203 | +
| Empty catch clause for exception e | ++Delete the empty catch clause. | +Medium | ++MergeTranslations.java | ++120 | +
|
+
+
+
+
+
+ | ||||
| Violation | +Recommendation | +Severity | +Resource | +Line | +
| Empty for loop | ++Restructure the for loop so that it is more obvious what is suppose to be happening each time through the loop. | +Medium | ++PathNode.java | ++229 | +
| Empty for loop | ++Restructure the for loop so that it is more obvious what is suppose to be happening each time through the loop. | +Medium | ++PathNode.java | ++240 | +
|
+
+
+
+
+
+ | ||||
| Violation | +Recommendation | +Severity | +Resource | +Line | +
| Empty statement | ++Delete the empty statement. | +High | ++NameCache.java | ++489 | +
| Empty statement | ++Delete the empty statement. | +High | ++NameCache.java | ++520 | +
| Empty statement | ++Delete the empty statement. | +High | ++NameCache.java | ++553 | +
| Empty statement | ++Delete the empty statement. | +High | ++PathNode.java | ++229 | +
| Empty statement | ++Delete the empty statement. | +High | ++PathNode.java | ++240 | +
| Empty statement | ++Delete the empty statement. | +High | ++AIMain.java | ++623 | +
| Empty statement | ++Delete the empty statement. | +High | ++Mission.java | ++591 | +
| Empty statement | ++Delete the empty statement. | +High | ++ServerPlayer.java | ++1,813 | +
|
+
+
+
+
+
+ | ||||
| Violation | +Recommendation | +Severity | +Resource | +Line | +
| Empty while statement | ++Remove the while statement or fix the code so that its body is no longer empty. | +Medium | ++NameCache.java | ++489 | +
| Empty while statement | ++Remove the while statement or fix the code so that its body is no longer empty. | +Medium | ++NameCache.java | ++520 | +
| Empty while statement | ++Remove the while statement or fix the code so that its body is no longer empty. | +Medium | ++NameCache.java | ++553 | +
| Empty while statement | ++Remove the while statement or fix the code so that its body is no longer empty. | +Medium | ++AIColony.java | ++786 | +
| Empty while statement | ++Remove the while statement or fix the code so that its body is no longer empty. | +Medium | ++AIMain.java | ++623 | +
| Empty while statement | ++Remove the while statement or fix the code so that its body is no longer empty. | +Medium | ++Mission.java | ++591 | +
| Empty while statement | ++Remove the while statement or fix the code so that its body is no longer empty. | +Medium | ++ServerPlayer.java | ++1,813 | +
|
+
+
+
+
+
+ | ||||
| Violation | +Recommendation | +Severity | +Resource | +Line | +
| Do not use System.getenv() to access environment variables | ++Use system properties instead of environment variables. | +High | ++FreeColDirectories.java | ++253 | +
|
+
+
+
+
+
+ | ||||
| Violation | +Recommendation | +Severity | +Resource | +Line | +
| Equality test with boolean literal: false | ++Remove the comparison with false. | +Medium | ++ListOptionUI.java | ++224 | +
| Equality test with boolean literal: true | ++Remove the comparison with true. | +Medium | ++LandMap.java | ++442 | +
|
+
+
+
+
+
+ | ||||
| Violation | +Recommendation | +Severity | +Resource | +Line | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++InGameController.java | ++327 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++InGameController.java | ++330 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++InGameController.java | ++1,020 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++InGameController.java | ++2,935 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++InGameController.java | ++4,580 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++ErrorPanel.java | ++85 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++LabourData.java | ++542 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++SelectDestinationDialog.java | ++183 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++DebugUtils.java | ++618 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++DebugUtils.java | ++628 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++FreeColDebugger.java | ++380 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++FreeColModFile.java | ++77 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++FreeColSavegameFile.java | ++91 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++Colony.java | ++626 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++Game.java | ++374 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++Game.java | ++1,272 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++CostDeciders.java | ++98 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++Player.java | ++1,364 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++Player.java | ++2,935 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++Resource.java | ++166 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++SimpleCombatModel.java | ++270 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++SimpleCombatModel.java | ++364 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++Specification.java | ++2,010 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++Unit.java | ++2,521 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++Unit.java | ++2,533 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++Unit.java | ++3,778 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++AttackMessage.java | ++106 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++BuildColonyMessage.java | ++101 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++Connection.java | ++322 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++DemandTributeMessage.java | ++98 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++EquipForRoleMessage.java | ++98 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++FirstContactMessage.java | ++141 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++FreeCol.java | ++626 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++FreeCol.java | ++629 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++ColonyPlan.java | ++802 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++EuropeanAIPlayer.java | ++839 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++EuropeanAIPlayer.java | ++1,566 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++BuildColonyMission.java | ++470 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++NativeAIPlayer.java | ++287 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++NativeAIPlayer.java | ++294 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++NativeAIPlayer.java | ++304 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++ServerColony.java | ++213 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++ServerPlayer.java | ++2,712 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++ServerUnit.java | ++683 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++ServerUnit.java | ++874 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++ServerUnit.java | ++990 | +
| Extra semicolon | ++Delete the extra semicolon. | +Low | ++ColonizationMapReader.java | ++167 | +
|
+
+
+
+
+
+ | ||||
| Violation | +Recommendation | +Severity | +Resource | +Line | +
| Cannot compare floating-point values using the equals (==) operator | ++Compare the two float values to see if they are close in value. | +Medium | ++MapViewer.java | ++1,193 | +
| Cannot compare floating-point values using the equals (==) operator | ++Compare the two float values to see if they are close in value. | +Medium | ++MapViewer.java | ++1,197 | +
| Cannot compare floating-point values using the equals (==) operator | ++Compare the two float values to see if they are close in value. | +Medium | ++ModifierFormat.java | ++52 | +
| Cannot compare floating-point values using the equals (==) operator | ++Compare the two float values to see if they are close in value. | +Medium | ++ModifierFormat.java | ++64 | +
| Cannot compare floating-point values using the equals (==) operator | ++Compare the two float values to see if they are close in value. | +Medium | ++Colony.java | ++803 | +
| Cannot compare floating-point values using the equals (==) operator | ++Compare the two float values to see if they are close in value. | +Medium | ++FeatureContainer.java | ++290 | +
| Cannot compare floating-point values using the equals (==) operator | ++Compare the two float values to see if they are close in value. | +Medium | ++Modifier.java | ++559 | +
| Cannot compare floating-point values using the equals (==) operator | ++Compare the two float values to see if they are close in value. | +Medium | ++Modifier.java | ++560 | +
| Cannot compare floating-point values using the equals (==) operator | ++Compare the two float values to see if they are close in value. | +Medium | ++Player.java | ++3,094 | +
| Cannot compare floating-point values using the equals (==) operator | ++Compare the two float values to see if they are close in value. | +Medium | ++SimpleCombatModel.java | ++101 | +
| Cannot compare floating-point values using the equals (==) operator | ++Compare the two float values to see if they are close in value. | +Medium | ++SimpleCombatModel.java | ++101 | +
| Cannot compare floating-point values using the equals (==) operator | ++Compare the two float values to see if they are close in value. | +Medium | ++Unit.java | ++405 | +
| Cannot compare floating-point values using the equals (==) operator | ++Compare the two float values to see if they are close in value. | +Medium | ++ImageResource.java | ++117 | +
| Cannot compare floating-point values using the equals (==) operator | ++Compare the two float values to see if they are close in value. | +Medium | ++SZAResource.java | ++101 | +
| Cannot compare floating-point values using the equals (==) operator | ++Compare the two float values to see if they are close in value. | +Medium | ++EuropeanAIPlayer.java | ++1,671 | +
|
+
+
+
+
+
+ | ||||
| Violation | +Recommendation | +Severity | +Resource | +Line | +
| Explicit import of type from "net.sf.freecol.common.io": "FreeColModFile" | ++Delete the import. | +Medium | ++Mods.java | ++32 | +
| Explicit import of type from "net.sf.freecol.common.model": "GoodsType" | ++Delete the import. | +Medium | ++AbstractGoods.java | ++29 | +
| Explicit import of type from "net.sf.freecol.common.model": "StringTemplate" | ++Delete the import. | +Medium | ++BuildableType.java | ++35 | +
| Explicit import of type from "net.sf.freecol.common.model": "Occupation" | ++Delete the import. | +Medium | ++Colony.java | ++40 | +
| Explicit import of type from "net.sf.freecol.common.model": "Stance" | ++Delete the import. | +Medium | ++Colony.java | ++41 | +
| Explicit import of type from "net.sf.freecol.common.model": "Stance" | ++Delete the import. | +Medium | ++DiplomaticTrade.java | ++31 | +
| Explicit import of type from "net.sf.freecol.common.model": "Stance" | ++Delete the import. | +Medium | ++HistoryEvent.java | ++27 | +
| Explicit import of type from "net.sf.freecol.common.model": "Player" | ++Delete the import. | +Medium | ++InciteTradeItem.java | ++27 | +
| Explicit import of type from "net.sf.freecol.common.model": "Direction" | ++Delete the import. | +Medium | ++LandMap.java | ++28 | +
| Explicit import of type from "net.sf.freecol.common.model": "ModelMessage" | ++Delete the import. | +Medium | ++LostCityRumour.java | ++33 | +
| Explicit import of type from "net.sf.freecol.common.model": "AbstractGoods" | ++Delete the import. | +Medium | ++MarketWas.java | ++27 | +
| Explicit import of type from "net.sf.freecol.common.model": "GoodsType" | ++Delete the import. | +Medium | ++MarketWas.java | ++28 | +
| Explicit import of type from "net.sf.freecol.common.model": "Market" | ++Delete the import. | +Medium | ++MarketWas.java | ++29 | +
| Explicit import of type from "net.sf.freecol.common.model": "MarketData" | ++Delete the import. | +Medium | ++MarketWas.java | ++30 | +
| Explicit import of type from "net.sf.freecol.common.model": "Player" | ++Delete the import. | +Medium | ++MarketWas.java | ++31 | +
| Explicit import of type from "net.sf.freecol.common.model": "TransactionListener" | ++Delete the import. | +Medium | ++MarketWas.java | ++32 | +
| Explicit import of type from "net.sf.freecol.common.model": "Stance" | ++Delete the import. | +Medium | ++NationSummary.java | ++26 | +
| Explicit import of type from "net.sf.freecol.common.model": "Direction" | ++Delete the import. | +Medium | ++PathNode.java | ++23 | +
| Explicit import of type from "net.sf.freecol.common.model": "Named" | ++Delete the import. | +Medium | ++Stance.java | ++23 | +
| Explicit import of type from "net.sf.freecol.common.model": "Tension" | ++Delete the import. | +Medium | ++Stance.java | ++24 | +
| Explicit import of type from "net.sf.freecol.common.model": "Stance" | ++Delete the import. | +Medium | ++StanceTradeItem.java | ++27 | +
| Explicit import of type from "net.sf.freecol.common.model": "Direction" | ++Delete the import. | +Medium | ++Tile.java | ++40 | +
| Explicit import of type from "net.sf.freecol.common.model": "Direction" | ++Delete the import. | +Medium | ++TileImprovement.java | ++33 | +
| Explicit import of type from "net.sf.freecol.common.model": "Direction" | ++Delete the import. | +Medium | ++TileItemContainer.java | ++32 | +
| Explicit import of type from "net.sf.freecol.common.model": "Stance" | ++Delete the import. | +Medium | ++TradeItem.java | ++26 | +
| Explicit import of type from "net.sf.freecol.common.model": "CombatModel" | ++Delete the import. | +Medium | ++Unit.java | ++39 | +
| Explicit import of type from "net.sf.freecol.common.model": "Direction" | ++Delete the import. | +Medium | ++Unit.java | ++40 | +
| Explicit import of type from "net.sf.freecol.server.model": "ServerPlayer" | ++Delete the import. | +Medium | ++ServerColony.java | ++60 | +
| + + | ||||
| Violation | +Recommendation | +Severity | +Resource | +Line | +
| Integer division in a floating-point expression | ++Cast one of the integers to a float. This will prevent round off error. | +Medium | ++Flag.java | ++656 | +
| Integer division in a floating-point expression | ++Cast one of the integers to a float. This will prevent round off error. | +Medium | ++Flag.java | ++664 | +
| Integer division in a floating-point expression | ++Cast one of the integers to a float. This will prevent round off error. | +Medium | ++Flag.java | ++728 | +
| Integer division in a floating-point expression | ++Cast one of the integers to a float. This will prevent round off error. | +Medium | ++Flag.java | ++806 | +
| Integer division in a floating-point expression | ++Cast one of the integers to a float. This will prevent round off error. | +Medium | ++Flag.java | ++807 | +
| Integer division in a floating-point expression | ++Cast one of the integers to a float. This will prevent round off error. | +Medium | ++Flag.java | ++822 | +
| Integer division in a floating-point expression | ++Cast one of the integers to a float. This will prevent round off error. | +Medium | ++Flag.java | ++1,053 | +
| Integer division in a floating-point expression | ++Cast one of the integers to a float. This will prevent round off error. | +Medium | ++Flag.java | ++1,055 | +
| Integer division in a floating-point expression | ++Cast one of the integers to a float. This will prevent round off error. | +Medium | ++Flag.java | ++1,058 | +
| Integer division in a floating-point expression | ++Cast one of the integers to a float. This will prevent round off error. | +Medium | ++Flag.java | ++1,065 | +
| Integer division in a floating-point expression | ++Cast one of the integers to a float. This will prevent round off error. | +Medium | ++Flag.java | ++1,067 | +
| Integer division in a floating-point expression | ++Cast one of the integers to a float. This will prevent round off error. | +Medium | ++Flag.java | ++1,070 | +
| Integer division in a floating-point expression | ++Cast one of the integers to a float. This will prevent round off error. | +Medium | ++Flag.java | ++1,076 | +
| Integer division in a floating-point expression | ++Cast one of the integers to a float. This will prevent round off error. | +Medium | ++Flag.java | ++1,077 | +
| Integer division in a floating-point expression | ++Cast one of the integers to a float. This will prevent round off error. | +Medium | ++Flag.java | ++1,080 | +
| Integer division in a floating-point expression | ++Cast one of the integers to a float. This will prevent round off error. | +Medium | ++Flag.java | ++1,081 | +
| Integer division in a floating-point expression | ++Cast one of the integers to a float. This will prevent round off error. | +Medium | ++Flag.java | ++1,084 | +
| Integer division in a floating-point expression | ++Cast one of the integers to a float. This will prevent round off error. | +Medium | ++Flag.java | ++1,085 | +
| Integer division in a floating-point expression | ++Cast one of the integers to a float. This will prevent round off error. | +Medium | ++FreeCol.java | ++1,043 | +
|
+
+
+
+
+
+ | ||||
| Violation | +Recommendation | +Severity | +Resource | +Line | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++ConnectController.java | ++533 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++ConnectController.java | ++735 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++InGameController.java | ++643 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++InGameController.java | ++1,626 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++InGameInputHandler.java | ++149 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++MapEditorController.java | ++118 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++MapEditorController.java | ++223 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++PreGameInputHandler.java | ++316 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++FreeColClient.java | ++826 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++Canvas.java | ++560 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++Canvas.java | ++817 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++Canvas.java | ++823 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++Canvas.java | ++842 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++Canvas.java | ++848 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++Canvas.java | ++937 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++Canvas.java | ++954 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++Canvas.java | ++1,173 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++Canvas.java | ++2,613 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++AboutPanel.java | ++190 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++BuildingDetailPanel.java | ++159 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++ChatPanel.java | ++111 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++ColonyPanel.java | ++964 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++ColopediaGameObjectTypePanel.java | ++229 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++DefaultTransferHandler.java | ++131 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++DefaultTransferHandler.java | ++141 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++ErrorPanel.java | ++84 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++FatherDetailPanel.java | ++112 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++MapSizeDialog.java | ++83 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++NewPanel.java | ++424 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++ParametersDialog.java | ++121 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++ParametersDialog.java | ++127 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++RecruitPanel.java | ++136 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++ScaleMapSizeDialog.java | ++121 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++ScaleMapSizeDialog.java | ++127 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++SelectTributeAmountDialog.java | ++84 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++ServerListPanel.java | ++202 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++StartGamePanel.java | ++353 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++UnitDetailPanel.java | ++187 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++ScrollThread.java | ++83 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++ScrollThread.java | ++89 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++SwingGUI.java | ++353 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++SwingGUI.java | ++359 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++DebugUtils.java | ++213 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++DebugUtils.java | ++242 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++DebugUtils.java | ++269 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++DebugUtils.java | ++395 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++DebugUtils.java | ++595 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++DebugUtils.java | ++957 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++DebugUtils.java | ++1,045 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++FreeColDebugger.java | ++164 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++FreeColDebugger.java | ++172 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++FreeColDebugger.java | ++191 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++FreeColDebugger.java | ++271 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++FreeColDebugger.java | ++379 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++FreeColSeed.java | ++60 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++Messages.java | ++226 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++Messages.java | ++271 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++Messages.java | ++290 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++Number.java | ++54 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++FreeColDataFile.java | ++221 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++FreeColModFile.java | ++76 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++FreeColSavegameFile.java | ++90 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++FreeColXMLReader.java | ++306 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++FreeColXMLReader.java | ++327 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++FreeColXMLReader.java | ++348 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++FreeColXMLReader.java | ++387 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++SimpleZippedAnimation.java | ++112 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++Colony.java | ++626 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++Colony.java | ++655 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++EuropeWas.java | ++64 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++FreeColObject.java | ++202 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++Game.java | ++320 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++Game.java | ++1,004 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++Game.java | ++1,271 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++NationOptions.java | ++275 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++Specification.java | ++664 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++Specification.java | ++1,894 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++Tile.java | ++2,577 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++TileImprovementStyle.java | ++122 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++Unit.java | ++1,434 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++BuyMessage.java | ++98 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++BuyPropositionMessage.java | ++98 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++ClaimLandMessage.java | ++103 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++ClaimLandMessage.java | ++108 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++ClaimLandMessage.java | ++127 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++Connection.java | ++321 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++EmigrateUnitMessage.java | ++86 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++EquipForRoleMessage.java | ++114 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++FirstContactMessage.java | ++111 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++InciteMessage.java | ++143 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++IndianDemandMessage.java | ++128 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++LoadGoodsMessage.java | ++126 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++MonarchActionMessage.java | ++134 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++NetworkReplyObject.java | ++72 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++RearrangeColonyMessage.java | ++81 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++RearrangeColonyMessage.java | ++179 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++ReceivingThread.java | ++300 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++SellMessage.java | ++98 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++SellPropositionMessage.java | ++97 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++ServerAPI.java | ++182 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++ServerAPI.java | ++523 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++ServerAPI.java | ++979 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++ServerAPI.java | ++1,262 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++SetBuildQueueMessage.java | ++79 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++SetBuildQueueMessage.java | ++123 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++SetCurrentStopMessage.java | ++99 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++UnloadGoodsMessage.java | ++110 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++AudioMixerOption.java | ++108 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++ColorResource.java | ++99 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++SoundPlayer.java | ++205 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++SoundPlayer.java | ++221 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++SoundPlayer.java | ++238 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++FreeCol.java | ++793 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++FreeCol.java | ++1,044 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++FreeCol.java | ++1,078 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++FreeCol.java | ++1,159 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++FreeCol.java | ++1,193 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++FreeCol.java | ++1,225 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++FreeCol.java | ++1,255 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++MetaServer.java | ++79 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++NetworkHandler.java | ++128 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++NetworkHandler.java | ++155 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++AIInGameInputHandler.java | ++268 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++AIMain.java | ++262 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++AIUnit.java | ++307 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++TransportMission.java | ++1,169 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++InGameController.java | ++443 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++InGameController.java | ++493 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++PreGameInputHandler.java | ++227 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++UserConnectionHandler.java | ++190 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++FreeColServer.java | ++615 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++DummyConnection.java | ++104 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++DummyConnection.java | ++140 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++GenerateDocumentation.java | ++143 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++InstallerTranslations.java | ++203 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++MapConverter.java | ++60 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++MergeTranslations.java | ++120 | +
| Caught exception not logged | ++Use one of the logging methods to log the exception. | +Medium | ++SaveGameValidator.java | ++76 | +
|
+
+
+
+
+
+ | ||||
| Violation | +Recommendation | +Severity | +Resource | +Line | +
| Missing inheritance check | ++Add an instanceof test. | +Medium | ++TileViewer.java | ++96 | +
| Missing inheritance check | ++Add an instanceof test. | +Medium | ++ColonyTradeItem.java | ++133 | +
| Missing inheritance check | ++Add an instanceof test. | +Medium | ++EquipmentType.java | ++201 | +
| Missing inheritance check | ++Add an instanceof test. | +Medium | ++GoldTradeItem.java | ++125 | +
| Missing identity check | ++Add a test for object identity. | +Medium | ++Goods.java | ++211 | +
| Missing inheritance check | ++Add an instanceof test. | +Medium | ++GoodsTradeItem.java | ++141 | +
| Missing inheritance check | ++Add an instanceof test. | +Medium | ++InciteTradeItem.java | ++130 | +
| Missing inheritance check | ++Add an instanceof test. | +Medium | ++StanceTradeItem.java | ++140 | +
| Missing inheritance check | ++Add an instanceof test. | +Medium | ++TileTypeChange.java | ++126 | +
| Missing inheritance check | ++Add an instanceof test. | +Medium | ++TradeItem.java | ++241 | +
| Missing identity check | ++Add a test for object identity. | +Medium | ++Turn.java | ++266 | +
| Missing inheritance check | ++Add an instanceof test. | +Medium | ++UnitTradeItem.java | ++128 | +
| Missing inheritance check | ++Add an instanceof test. | +Medium | ++UnitWas.java | ++220 | +
| Missing inheritance check | ++Add an instanceof test. | +Medium | ++REFAIPlayer.java | ++116 | +
| Missing inheritance check | ++Add an instanceof test. | +Medium | ++ServerGame.java | ++457 | +
| Missing inheritance check | ++Add an instanceof test. | +Medium | ++ForestMaker.java | ++99 | +
|
+
+
+
+
+
+ | ||||
| Violation | +Recommendation | +Severity | +Resource | +Line | +
| Missing implementation of the method hashCode() | ++Add the missing hashCode() method. | +Medium | ++HistoryEvent.java | ++261 | +
| Missing implementation of the method hashCode() | ++Add the missing hashCode() method. | +Medium | ++Operand.java | ++321 | +
| Missing implementation of the method hashCode() | ++Add the missing hashCode() method. | +Medium | ++ServerGame.java | ++457 | +
| + + | ||||
| Violation | +Recommendation | +Severity | +Resource | +Line | +
| Non-synchronized method should not override a synchronized method | ++Make the method synchronized. | +Medium | ++FreeColCheckBoxUI.java | ++47 | +
| Non-synchronized method should not override a synchronized method | ++Make the method synchronized. | +Medium | ++FreeColRadioButtonUI.java | ++47 | +
| Non-synchronized method should not override a synchronized method | ++Make the method synchronized. | +Medium | ++VideoComponent.java | ++122 | +
| Non-synchronized method should not override a synchronized method | ++Make the method synchronized. | +Medium | ++VideoComponent.java | ++129 | +
| Non-synchronized method should not override a synchronized method | ++Make the method synchronized. | +Medium | ++OggVorbisDecoderFactory.java | ++195 | +
|
+
+
+
+
+
+ | ||||
| Violation | +Recommendation | +Severity | +Resource | +Line | +
| An if-statement always return true or false | ++Replace the if-statement with a return-statement whose return value is the expression tested in the if-statement. | +Medium | ++Playlist.java | ++241 | +
| An if-statement always return true or false | ++Replace the if-statement with a return-statement whose return value is the expression tested in the if-statement. | +Medium | ++Playlist.java | ++252 | +
|
+
+
+
+
+
+ | ||||
| Violation | +Recommendation | +Severity | +Resource | +Line | +
| Cannot compare strings using the not equals (!=) operator | ++Replace the comparison with equals(). | +Medium | ++Scope.java | ++235 | +
|
+
+
+
+
+
+ | ||||
| Violation | +Recommendation | +Severity | +Resource | +Line | +
| Unnecessary instanceof test comparing to FreeColObject | ++Remove the "instanceof" test. | +Medium | ++Scope.java | ++182 | +
|
+
+
+
+
+
+ | ||||
| Violation | +Recommendation | +Severity | +Resource | +Line | +
| Unnecessary import: import net.sf.freecol.common.model.Location; | ++Delete the import. | +Medium | ++ClientOptions.java | ++45 | +
| Unnecessary import: import net.sf.freecol.common.FreeColException; | ++Delete the import. | +Medium | ++ConnectController.java | ++42 | +
| Unnecessary import: import net.sf.freecol.common.io.FreeColXMLReader; | ++Delete the import. | +Medium | ++ConnectController.java | ++48 | +
| Unnecessary import: import java.io.FileNotFoundException; | ++Delete the import. | +Medium | ++MapEditorController.java | ++24 | +
| Unnecessary import: import javax.xml.stream.XMLStreamException; | ++Delete the import. | +Medium | ++MapEditorController.java | ++29 | +
| Unnecessary import: import net.sf.freecol.common.FreeColException; | ++Delete the import. | +Medium | ++MapEditorController.java | ++34 | +
| Unnecessary import: import net.sf.freecol.common.io.FreeColSavegameFile; | ++Delete the import. | +Medium | ++MapEditorController.java | ++37 | +
| Unnecessary import: import net.sf.freecol.client.gui.action.ColopediaAction.PanelType; | ++Delete the import. | +Medium | ++ActionManager.java | ++27 | +
| Unnecessary import: import net.sf.freecol.client.gui.action.DisplayTileTextAction.DisplayText; | ++Delete the import. | +Medium | ++ActionManager.java | ++28 | +
| Unnecessary import: import java.awt.Image; | ++Delete the import. | +Medium | ++UnitImageAnimation.java | ++22 | +
| Unnecessary import: import javax.swing.ImageIcon; | ++Delete the import. | +Medium | ++UnitImageAnimation.java | ++25 | +
| Unnecessary import: import javax.swing.JLabel; | ++Delete the import. | +Medium | ++UnitImageAnimation.java | ++26 | +
| Unnecessary import: import net.sf.freecol.client.gui.ImageLibrary; | ++Delete the import. | +Medium | ++UnitImageAnimation.java | ++28 | +
| Unnecessary import: import net.sf.freecol.common.io.sza.AnimationEvent; | ++Delete the import. | +Medium | ++UnitImageAnimation.java | ++30 | +
| Unnecessary import: import net.sf.freecol.common.io.sza.ImageAnimationEvent; | ++Delete the import. | +Medium | ++UnitImageAnimation.java | ++31 | +
| Unnecessary import: import javax.swing.JLabel; | ++Delete the import. | +Medium | ++UnitMoveAnimation.java | ++25 | +
| Unnecessary import: import net.sf.freecol.client.gui.ImageLibrary; | ++Delete the import. | +Medium | ++UnitMoveAnimation.java | ++28 | +
| Unnecessary import: import java.lang.reflect.InvocationTargetException; | ++Delete the import. | +Medium | ++GUI.java | ++28 | +
| Unnecessary import: import java.awt.event.ActionEvent; | ++Delete the import. | +Medium | ++MapViewer.java | ++31 | +
| Unnecessary import: import java.awt.event.ActionEvent; | ++Delete the import. | +Medium | ++DebugMenu.java | ++23 | +
| Unnecessary import: import java.util.Map; | ++Delete the import. | +Medium | ++DebugMenu.java | ++26 | +
| Unnecessary import: import java.util.Map.Entry; | ++Delete the import. | +Medium | ++DebugMenu.java | ++27 | +
| Unnecessary import: import net.sf.freecol.common.model.Monarch; | ++Delete the import. | +Medium | ++DebugMenu.java | ++44 | +
| Unnecessary import: import net.sf.freecol.common.resources.ImageResource; | ++Delete the import. | +Medium | ++DebugMenu.java | ++47 | +
| Unnecessary import: import net.sf.freecol.common.resources.ResourceManager; | ++Delete the import. | +Medium | ++DebugMenu.java | ++48 | +
| Unnecessary import: import static net.sf.freecol.common.util.CollectionUtils.*; | ++Delete the import. | +Medium | ++DebugMenu.java | ++50 | +
| Unnecessary import: import java.awt.event.ActionEvent; | ++Delete the import. | +Medium | ++MapEditorMenuBar.java | ++22 | +
| Unnecessary import: import java.io.File; | ++Delete the import. | +Medium | ++MapEditorMenuBar.java | ++25 | +
| Unnecessary import: import java.io.FileNotFoundException; | ++Delete the import. | +Medium | ++MapEditorMenuBar.java | ++26 | +
| Unnecessary import: import net.sf.freecol.common.io.FreeColDirectories; | ++Delete the import. | +Medium | ++MapEditorMenuBar.java | ++37 | +
| Unnecessary import: import net.sf.freecol.common.option.FileOption; | ++Delete the import. | +Medium | ++MapEditorMenuBar.java | ++38 | +
| Unnecessary import: import net.sf.freecol.common.option.MapGeneratorOptions; | ++Delete the import. | +Medium | ++MapEditorMenuBar.java | ++39 | +
| Unnecessary import: import net.sf.freecol.common.option.OptionGroup; | ++Delete the import. | +Medium | ++MapEditorMenuBar.java | ++40 | +
| Unnecessary import: import java.awt.event.ActionEvent; | ++Delete the import. | +Medium | ++AudioMixerOptionUI.java | ++23 | +
| Unnecessary import: import java.awt.event.ActionEvent; | ++Delete the import. | +Medium | ++FileOptionUI.java | ++22 | +
| Unnecessary import: import java.awt.event.ActionEvent; | ++Delete the import. | +Medium | ++ListOptionUI.java | ++22 | +
| Unnecessary import: import net.sf.freecol.common.option.Option; | ++Delete the import. | +Medium | ++ListOptionUI.java | ++44 | +
| Unnecessary import: import java.awt.event.ActionEvent; | ++Delete the import. | +Medium | ++CaptureGoodsDialog.java | ++23 | +
| Unnecessary import: import java.awt.event.ActionEvent; | ++Delete the import. | +Medium | ++CompactLabourReport.java | ++24 | +
| Unnecessary import: import net.sf.freecol.client.gui.panel.Flag.Background; | ++Delete the import. | +Medium | ++ConfirmDeclarationDialog.java | ++46 | +
| Unnecessary import: import net.sf.freecol.client.gui.panel.Flag.Decoration; | ++Delete the import. | +Medium | ++ConfirmDeclarationDialog.java | ++47 | +
| Unnecessary import: import net.sf.freecol.client.gui.panel.Flag.UnionPosition; | ++Delete the import. | +Medium | ++ConfirmDeclarationDialog.java | ++48 | +
| Unnecessary import: import net.sf.freecol.client.gui.panel.Flag.UnionShape; | ++Delete the import. | +Medium | ++ConfirmDeclarationDialog.java | ++49 | +
| Unnecessary import: import java.util.Arrays; | ++Delete the import. | +Medium | ++DefaultTransferHandler.java | ++40 | +
| Unnecessary import: import java.awt.event.ActionEvent; | ++Delete the import. | +Medium | ++DifficultyDialog.java | ++22 | +
| Unnecessary import: import java.io.File; | ++Delete the import. | +Medium | ++DifficultyDialog.java | ++23 | +
| Unnecessary import: import java.io.BufferedInputStream; | ++Delete the import. | +Medium | ++ErrorPanel.java | ++23 | +
| Unnecessary import: import java.io.FileInputStream; | ++Delete the import. | +Medium | ++ErrorPanel.java | ++25 | +
| Unnecessary import: import net.sf.freecol.client.gui.panel.MapEditorTransformPanel.MapTransform; | ++Delete the import. | +Medium | ++InfoPanel.java | ++48 | +
| Unnecessary import: import java.awt.event.ActionEvent; | ++Delete the import. | +Medium | ++InformationPanel.java | ++24 | +
| Unnecessary import: import java.awt.event.ActionEvent; | ++Delete the import. | +Medium | ++LoadDialog.java | ++22 | +
| Unnecessary import: import net.sf.freecol.client.gui.panel.MapEditorTransformPanel.MapTransform; | ++Delete the import. | +Medium | ++MapControls.java | ++43 | +
| Unnecessary import: import java.awt.event.ActionEvent; | ++Delete the import. | +Medium | ++MapEditorTransformPanel.java | ++27 | +
| Unnecessary import: import java.awt.event.ActionEvent; | ++Delete the import. | +Medium | ++MapGeneratorOptionsDialog.java | ++24 | +
| Unnecessary import: import net.sf.freecol.common.model.Scope; | ++Delete the import. | +Medium | ++ModifierFormat.java | ++36 | +
| Unnecessary import: import java.awt.event.ActionEvent; | ++Delete the import. | +Medium | ++MonarchDialog.java | ++22 | +
| Unnecessary import: import java.awt.event.ActionEvent; | ++Delete the import. | +Medium | ++ParametersDialog.java | ++23 | +
| Unnecessary import: import java.awt.event.ActionEvent; | ++Delete the import. | +Medium | ++PlayersTable.java | ++24 | +
| Unnecessary import: import net.sf.freecol.client.gui.action.ColopediaAction.PanelType; | ++Delete the import. | +Medium | ++PlayersTable.java | ++54 | +
| Unnecessary import: import java.awt.event.ActionEvent; | ++Delete the import. | +Medium | ++QuickActionMenu.java | ++23 | +
| Unnecessary import: import net.sf.freecol.client.gui.panel.ColonyPanel.TilesPanel.ASingleTilePanel; | ++Delete the import. | +Medium | ++QuickActionMenu.java | ++47 | +
| Unnecessary import: import net.sf.freecol.client.gui.panel.UnitLabel.UnitAction; | ++Delete the import. | +Medium | ++QuickActionMenu.java | ++48 | +
| Unnecessary import: import java.util.Comparator; | ++Delete the import. | +Medium | ++ReportPanel.java | ++25 | +
| Unnecessary import: import java.awt.event.ActionEvent; | ++Delete the import. | +Medium | ++ReportProductionPanel.java | ++22 | +
| Unnecessary import: import java.awt.event.ActionEvent; | ++Delete the import. | +Medium | ++ReportTurnPanel.java | ++24 | +
| Unnecessary import: import java.util.ArrayList; | ++Delete the import. | +Medium | ++ResourcesDetailPanel.java | ++22 | +
| Unnecessary import: import net.sf.freecol.common.model.FreeColGameObjectType; | ++Delete the import. | +Medium | ++ResourcesDetailPanel.java | ++36 | +
| Unnecessary import: import net.sf.freecol.common.model.Scope; | ++Delete the import. | +Medium | ++ResourcesDetailPanel.java | ++40 | +
| Unnecessary import: import static net.sf.freecol.common.util.StringUtils.*; | ++Delete the import. | +Medium | ++ResourcesDetailPanel.java | ++42 | +
| Unnecessary import: import java.awt.event.ActionEvent; | ++Delete the import. | +Medium | ++SaveDialog.java | ++22 | +
| Unnecessary import: import java.awt.event.ActionEvent; | ++Delete the import. | +Medium | ++ScaleMapSizeDialog.java | ++24 | +
| Unnecessary import: import java.awt.event.ItemEvent; | ++Delete the import. | +Medium | ++SelectDestinationDialog.java | ++23 | +
| Unnecessary import: import javax.swing.event.ChangeEvent; | ++Delete the import. | +Medium | ++SelectDestinationDialog.java | ++42 | +
| Unnecessary import: import java.awt.datatransfer.UnsupportedFlavorException; | ++Delete the import. | +Medium | ++TradeRouteInputPanel.java | ++27 | +
| Unnecessary import: import java.util.Arrays; | ++Delete the import. | +Medium | ++TradeRouteInputPanel.java | ++34 | +
| Unnecessary import: import javax.swing.event.ListSelectionEvent; | ++Delete the import. | +Medium | ++TradeRoutePanel.java | ++39 | +
| Unnecessary import: import net.sf.freecol.common.model.StringTemplate; | ++Delete the import. | +Medium | ++TradeRoutePanel.java | ++47 | +
| Unnecessary import: import static net.sf.freecol.common.util.CollectionUtils.*; | ++Delete the import. | +Medium | ++UnitDetailPanel.java | ++53 | +
| Unnecessary import: import net.sf.freecol.common.util.RandomChoice; | ++Delete the import. | +Medium | ++UnitDetailPanel.java | ++54 | +
| Unnecessary import: import java.awt.event.HierarchyEvent; | ++Delete the import. | +Medium | ++FreeColOptionPaneUI.java | ++27 | +
| Unnecessary import: import net.sf.freecol.common.model.TileImprovement; | ++Delete the import. | +Medium | ++RoadPainter.java | ++39 | +
| Unnecessary import: import java.beans.PropertyChangeEvent; | ++Delete the import. | +Medium | ++SwingGUI.java | ++40 | +
| Unnecessary import: import java.util.Locale; | ++Delete the import. | +Medium | ++SwingGUI.java | ++44 | +
| Unnecessary import: import net.sf.freecol.common.option.LanguageOption.Language; | ++Delete the import. | +Medium | ++SwingGUI.java | ++101 | +
| Unnecessary import: import java.awt.event.ActionEvent; | ++Delete the import. | +Medium | ++TilePopup.java | ++25 | +
| Unnecessary import: import java.util.Collections; | ++Delete the import. | +Medium | ++TilePopup.java | ++26 | +
| Unnecessary import: import net.sf.freecol.client.gui.panel.ReportPanel; | ++Delete the import. | +Medium | ++TilePopup.java | ++39 | +
| Unnecessary import: import net.sf.freecol.common.debug.DebugUtils; | ++Delete the import. | +Medium | ++TilePopup.java | ++41 | +
| Unnecessary import: import net.sf.freecol.common.model.Map; | ++Delete the import. | +Medium | ++TilePopup.java | ++47 | +
| Unnecessary import: import net.sf.freecol.common.model.PathNode; | ++Delete the import. | +Medium | ++TilePopup.java | ++48 | +
| Unnecessary import: import net.sf.freecol.common.util.LogBuilder; | ++Delete the import. | +Medium | ++TilePopup.java | ++55 | +
| Unnecessary import: import javax.swing.event.ChangeEvent; | ++Delete the import. | +Medium | ++DebugUtils.java | ++33 | +
| Unnecessary import: import java.io.FileOutputStream; | ++Delete the import. | +Medium | ++FreeColDebugger.java | ++23 | +
| Unnecessary import: import java.io.PrintStream; | ++Delete the import. | +Medium | ++FreeColDebugger.java | ++25 | +
| Unnecessary import: import net.sf.freecol.common.i18n.Number.Category; | ++Delete the import. | +Medium | ++NumberRules.java | ++31 | +
| Unnecessary import: import java.io.InputStream; | ++Delete the import. | +Medium | ++FreeColDataFile.java | ++27 | +
| Unnecessary import: import java.util.Arrays; | ++Delete the import. | +Medium | ++FreeColDataFile.java | ++32 | +
| Unnecessary import: import java.util.jar.JarFile; | ++Delete the import. | +Medium | ++FreeColDataFile.java | ++38 | +
| Unnecessary import: import static net.sf.freecol.common.util.CollectionUtils.*; | ++Delete the import. | +Medium | ++FreeColDataFile.java | ++46 | +
| Unnecessary import: import java.io.FileInputStream; | ++Delete the import. | +Medium | ++FreeColDirectories.java | ++22 | +
| Unnecessary import: import java.io.FileOutputStream; | ++Delete the import. | +Medium | ++FreeColDirectories.java | ++23 | +
| Unnecessary import: import java.lang.reflect.InvocationTargetException; | ++Delete the import. | +Medium | ++FreeColXMLReader.java | ++27 | +
| Unnecessary import: import net.sf.freecol.common.io.FreeColModFile; | ++Delete the import. | +Medium | ++Mods.java | ++32 | +
| Unnecessary import: import net.sf.freecol.common.model.GoodsType; | ++Delete the import. | +Medium | ++AbstractGoods.java | ++29 | +
| Unnecessary import: import java.util.Arrays; | ++Delete the import. | +Medium | ++BuildableType.java | ++23 | +
| Unnecessary import: import java.util.stream.Collectors; | ++Delete the import. | +Medium | ++BuildableType.java | ++29 | +
| Unnecessary import: import net.sf.freecol.common.model.StringTemplate; | ++Delete the import. | +Medium | ++BuildableType.java | ++35 | +
| Unnecessary import: import net.sf.freecol.common.model.UnitLocation.NoAddReason; | ++Delete the import. | +Medium | ++BuildingType.java | ++30 | +
| Unnecessary import: import net.sf.freecol.common.model.Occupation; | ++Delete the import. | +Medium | ++Colony.java | ++40 | +
| Unnecessary import: import net.sf.freecol.common.model.Stance; | ++Delete the import. | +Medium | ++Colony.java | ++41 | +
| Unnecessary import: import net.sf.freecol.common.model.Player.NoClaimReason; | ++Delete the import. | +Medium | ++ColonyTile.java | ++31 | +
| Unnecessary import: import net.sf.freecol.common.model.Colony.ColonyChangeEvent; | ++Delete the import. | +Medium | ++ColonyWas.java | ++26 | +
| Unnecessary import: import net.sf.freecol.common.model.Stance; | ++Delete the import. | +Medium | ++DiplomaticTrade.java | ++31 | +
| Unnecessary import: import net.sf.freecol.common.model.Unit.UnitState; | ++Delete the import. | +Medium | ++Europe.java | ++33 | +
| Unnecessary import: import java.io.FileOutputStream; | ++Delete the import. | +Medium | ++FreeColObject.java | ++27 | +
| Unnecessary import: import javax.xml.parsers.ParserConfigurationException; | ++Delete the import. | +Medium | ++FreeColObject.java | ++44 | +
| Unnecessary import: import javax.xml.transform.TransformerException; | ++Delete the import. | +Medium | ++FreeColObject.java | ++48 | +
| Unnecessary import: import org.xml.sax.SAXException; | ++Delete the import. | +Medium | ++FreeColObject.java | ++65 | +
| Unnecessary import: import net.sf.freecol.common.model.NationOptions.NationState; | ++Delete the import. | +Medium | ++Game.java | ++42 | +
| Unnecessary import: import java.io.FileInputStream; | ++Delete the import. | +Medium | ++HighScore.java | ++23 | +
| Unnecessary import: import java.io.FileOutputStream; | ++Delete the import. | +Medium | ++HighScore.java | ++25 | +
| Unnecessary import: import net.sf.freecol.common.model.Stance; | ++Delete the import. | +Medium | ++HistoryEvent.java | ++27 | +
| Unnecessary import: import net.sf.freecol.common.model.Player; | ++Delete the import. | +Medium | ++InciteTradeItem.java | ++27 | +
| Unnecessary import: import java.util.Arrays; | ++Delete the import. | +Medium | ++LandMap.java | ++23 | +
| Unnecessary import: import net.sf.freecol.common.model.Direction; | ++Delete the import. | +Medium | ++LandMap.java | ++28 | +
| Unnecessary import: import net.sf.freecol.common.model.Map.Position; | ++Delete the import. | +Medium | ++LandMap.java | ++29 | +
| Unnecessary import: import net.sf.freecol.common.model.Operand.OperandType; | ++Delete the import. | +Medium | ++Limit.java | ++26 | +
| Unnecessary import: import net.sf.freecol.common.model.ModelMessage; | ++Delete the import. | +Medium | ++LostCityRumour.java | ++33 | +
| Unnecessary import: import net.sf.freecol.common.model.AbstractGoods; | ++Delete the import. | +Medium | ++MarketWas.java | ++27 | +
| Unnecessary import: import net.sf.freecol.common.model.GoodsType; | ++Delete the import. | +Medium | ++MarketWas.java | ++28 | +
| Unnecessary import: import net.sf.freecol.common.model.Market; | ++Delete the import. | +Medium | ++MarketWas.java | ++29 | +
| Unnecessary import: import net.sf.freecol.common.model.MarketData; | ++Delete the import. | +Medium | ++MarketWas.java | ++30 | +
| Unnecessary import: import net.sf.freecol.common.model.Player; | ++Delete the import. | +Medium | ++MarketWas.java | ++31 | +
| Unnecessary import: import net.sf.freecol.common.model.TransactionListener; | ++Delete the import. | +Medium | ++MarketWas.java | ++32 | +
| Unnecessary import: import net.sf.freecol.common.model.Player.PlayerType; | ++Delete the import. | +Medium | ++Monarch.java | ++35 | +
| Unnecessary import: import net.sf.freecol.common.model.Stance; | ++Delete the import. | +Medium | ++NationSummary.java | ++26 | +
| Unnecessary import: import net.sf.freecol.common.model.Direction; | ++Delete the import. | +Medium | ++PathNode.java | ++23 | +
| Unnecessary import: import net.sf.freecol.common.model.NationOptions.NationState; | ++Delete the import. | +Medium | ++Player.java | ++44 | +
| Unnecessary import: import net.sf.freecol.common.model.Modifier.ModifierType; | ++Delete the import. | +Medium | ++SimpleCombatModel.java | ++31 | +
| Unnecessary import: import net.sf.freecol.common.model.UnitTypeChange.ChangeType; | ++Delete the import. | +Medium | ++SimpleCombatModel.java | ++32 | +
| Unnecessary import: import java.io.FileInputStream; | ++Delete the import. | +Medium | ++Specification.java | ++23 | +
| Unnecessary import: import java.util.Arrays; | ++Delete the import. | +Medium | ++Specification.java | ++28 | +
| Unnecessary import: import net.sf.freecol.common.model.NationOptions.Advantages; | ++Delete the import. | +Medium | ++Specification.java | ++50 | +
| Unnecessary import: import static net.sf.freecol.common.util.StringUtils.*; | ++Delete the import. | +Medium | ++Specification.java | ++63 | +
| Unnecessary import: import net.sf.freecol.common.model.Named; | ++Delete the import. | +Medium | ++Stance.java | ++23 | +
| Unnecessary import: import net.sf.freecol.common.model.Tension; | ++Delete the import. | +Medium | ++Stance.java | ++24 | +
| Unnecessary import: import net.sf.freecol.common.model.Stance; | ++Delete the import. | +Medium | ++StanceTradeItem.java | ++27 | +
| Unnecessary import: import net.sf.freecol.common.model.Direction; | ++Delete the import. | +Medium | ++Tile.java | ++40 | +
| Unnecessary import: import net.sf.freecol.common.model.Direction; | ++Delete the import. | +Medium | ++TileImprovement.java | ++33 | +
| Unnecessary import: import net.sf.freecol.common.model.Direction; | ++Delete the import. | +Medium | ++TileItemContainer.java | ++32 | +
| Unnecessary import: import net.sf.freecol.common.model.Map.Layer; | ++Delete the import. | +Medium | ++TileItemContainer.java | ++33 | +
| Unnecessary import: import net.sf.freecol.common.model.Stance; | ++Delete the import. | +Medium | ++TradeItem.java | ++26 | +
| Unnecessary import: import net.sf.freecol.common.model.CombatModel; | ++Delete the import. | +Medium | ++Unit.java | ++39 | +
| Unnecessary import: import net.sf.freecol.common.model.Direction; | ++Delete the import. | +Medium | ++Unit.java | ++40 | +
| Unnecessary import: import net.sf.freecol.common.model.UnitTypeChange.ChangeType; | ++Delete the import. | +Medium | ++Unit.java | ++45 | +
| Unnecessary import: import net.sf.freecol.common.model.UnitTypeChange.ChangeType; | ++Delete the import. | +Medium | ++UnitType.java | ++32 | +
| Unnecessary import: import net.sf.freecol.common.model.Colony.ColonyChangeEvent; | ++Delete the import. | +Medium | ++UnitWas.java | ++26 | +
| Unnecessary import: import net.sf.freecol.common.option.UnitTypeOption.TypeSelector; | ++Delete the import. | +Medium | ++AbstractUnitOption.java | ++33 | +
| Unnecessary import: import java.beans.PropertyChangeEvent; | ++Delete the import. | +Medium | ++SoundPlayer.java | ++22 | +
| Unnecessary import: import java.lang.reflect.InvocationTargetException; | ++Delete the import. | +Medium | ++Introspector.java | ++23 | +
| Unnecessary import: import org.xml.sax.SAXException; | ++Delete the import. | +Medium | ++Xml.java | ++37 | +
| Unnecessary import: import net.sf.freecol.FreeCol; | ++Delete the import. | +Medium | ++MetaRegister.java | ++27 | +
| Unnecessary import: import net.sf.freecol.common.networking.Connection; | ++Delete the import. | +Medium | ++MetaRegister.java | ++28 | +
| Unnecessary import: import java.util.concurrent.ExecutionException; | ++Delete the import. | +Medium | ++InGameController.java | ++34 | +
| Unnecessary import: import net.sf.freecol.server.control.ChangeSet.ChangePriority; | ++Delete the import. | +Medium | ++InGameController.java | ++128 | +
| Unnecessary import: import net.sf.freecol.server.control.ChangeSet.See; | ++Delete the import. | +Medium | ++InGameController.java | ++129 | +
| Unnecessary import: import net.sf.freecol.common.networking.ChatMessage; | ++Delete the import. | +Medium | ++InputHandler.java | ++31 | +
| Unnecessary import: import java.util.logging.Level; | ++Delete the import. | +Medium | ++UserConnectionHandler.java | ++22 | +
| Unnecessary import: import java.io.FileOutputStream; | ++Delete the import. | +Medium | ++FreeColServer.java | ++24 | +
| Unnecessary import: import java.util.jar.JarOutputStream; | ++Delete the import. | +Medium | ++FreeColServer.java | ++37 | +
| Unnecessary import: import net.sf.freecol.server.model.ServerPlayer; | ++Delete the import. | +Medium | ++ServerColony.java | ++60 | +
| Unnecessary import: import java.util.Arrays; | ++Delete the import. | +Medium | ++ServerGame.java | ++24 | +
| Unnecessary import: import java.io.RandomAccessFile; | ++Delete the import. | +Medium | ++ColonizationSaveGameReader.java | ++22 | +
| Unnecessary import: import java.io.FileWriter; | ++Delete the import. | +Medium | ++DesktopEntry.java | ++25 | +
| Unnecessary import: import java.io.FileInputStream; | ++Delete the import. | +Medium | ++FSGConverter.java | ++25 | +
| Unnecessary import: import java.io.FileOutputStream; | ++Delete the import. | +Medium | ++FSGConverter.java | ++27 | +
| Unnecessary import: import java.io.BufferedReader; | ++Delete the import. | +Medium | ++GenerateDocumentation.java | ++22 | +
| Unnecessary import: import java.io.FileReader; | ++Delete the import. | +Medium | ++GenerateDocumentation.java | ++24 | +
| Unnecessary import: import java.io.FileWriter; | ++Delete the import. | +Medium | ++GenerateDocumentation.java | ++25 | +
| Unnecessary import: import java.io.BufferedReader; | ++Delete the import. | +Medium | ++InstallerTranslations.java | ++22 | +
| Unnecessary import: import java.io.FileReader; | ++Delete the import. | +Medium | ++InstallerTranslations.java | ++24 | +
| Unnecessary import: import java.io.FileWriter; | ++Delete the import. | +Medium | ++InstallerTranslations.java | ++25 | +
| Unnecessary import: import javax.xml.stream.XMLStreamException; | ++Delete the import. | +Medium | ++MapConverter.java | ++28 | +
| Unnecessary import: import net.sf.freecol.common.FreeColException; | ++Delete the import. | +Medium | ++MapConverter.java | ++31 | +
| Unnecessary import: import java.io.BufferedReader; | ++Delete the import. | +Medium | ++MergeTranslations.java | ++22 | +
| Unnecessary import: import java.io.FileReader; | ++Delete the import. | +Medium | ++MergeTranslations.java | ++25 | +
| Unnecessary import: import org.xml.sax.SAXException; | ++Delete the import. | +Medium | ++SaveGameValidator.java | ++35 | +
|
+
+
+
+
+
+ | ||||
| Violation | +Recommendation | +Severity | +Resource | +Line | +
| Unnecessary Override: installUI | ++Delete the unused method. | +Medium | ++FreeColListUI.java | ++42 | +
| Unnecessary Override: complete | ++Delete the unused method. | +Medium | ++LootSession.java | ++47 | +
| Unnecessary Override: complete | ++Delete the unused method. | +Medium | ++TradeSession.java | ++68 | +
|
+
+
+
+
+
+ | ||||
| Violation | +Recommendation | +Severity | +Resource | +Line | +
| Unnecessary return | ++Recommendation... | +Medium | ++EuropeanAIPlayer.java | ++807 | +
| Unnecessary return | ++Recommendation... | +Medium | ++EuropeanAIPlayer.java | ++818 | +
|
+
+
+
+
+
+ | ||||
| Violation | +Recommendation | +Severity | +Resource | +Line | +
| Unnecessary type cast from null to T | ++Delete the unnecessary cast. | +Medium | ++FreeColChoiceDialog.java | ++80 | +
| Unnecessary type cast from null to T | ++Delete the unnecessary cast. | +Medium | ++FreeColInputDialog.java | ++87 | +
| Unnecessary type cast from null to T | ++Delete the unnecessary cast. | +Medium | ++FreeColInputDialog.java | ++89 | +
| Unnecessary type cast from Class<> to Class<T> | ++Delete the unnecessary cast. | +Medium | ++Game.java | ++1,071 | +
| Unnecessary type cast from Unit to FreeColGameObject | ++Delete the unnecessary cast. | +Medium | ++DiplomacyMessage.java | ++89 | +
| Unnecessary type cast from Unit to FreeColGameObject | ++Delete the unnecessary cast. | +Medium | ++DiplomacyMessage.java | ++89 | +
| Unnecessary type cast from Unit to FreeColGameObject | ++Delete the unnecessary cast. | +Medium | ++DiplomacyMessage.java | ++101 | +
| Unnecessary type cast from Colony to FreeColGameObject | ++Delete the unnecessary cast. | +Medium | ++DiplomacyMessage.java | ++101 | +
| Unnecessary type cast from Colony to FreeColGameObject | ++Delete the unnecessary cast. | +Medium | ++DiplomacyMessage.java | ++113 | +
| Unnecessary type cast from Unit to FreeColGameObject | ++Delete the unnecessary cast. | +Medium | ++DiplomacyMessage.java | ++113 | +
| Unnecessary type cast from ServerPlayer to Player | ++Delete the unnecessary cast. | +Medium | ++DiplomacyMessage.java | ++285 | +
| Unnecessary type cast from AbstractOption to AbstractOption<T> | ++Delete the unnecessary cast. | +Medium | ++ListOption.java | ++275 | +
| Unnecessary type cast from AbstractOption to AbstractOption<T> | ++Delete the unnecessary cast. | +Medium | ++ListOption.java | ++281 | +
| Unnecessary type cast from TransportableAIObject to AIObject | ++Delete the unnecessary cast. | +Medium | ++Cargo.java | ++671 | +
|
+
+
+
+
+
+ | ||||
| Violation | +Recommendation | +Severity | +Resource | +Line | +
| Loop used to copy an array | ++Use the method arraycopy defined in java.lang.System instead. | +Medium | ++DeclarationPanel.java | ++185 | +
| Loop used to copy an array | ++Use the method arraycopy defined in java.lang.System instead. | +Medium | ++ColonizationMapReader.java | ++116 | +
|
+
+
+
+
+
+ | ||||
| Violation | +Recommendation | +Severity | +Resource | +Line | +
| Use charAt() rather than startsWith() | ++Replace with a call to charAt(). | +Medium | ++Messages.java | ++792 | +
| Use charAt() rather than startsWith() | ++Replace with a call to charAt(). | +Medium | ++Messages.java | ++818 | +
| Use charAt() rather than startsWith() | ++Replace with a call to charAt(). | +Medium | ++LanguageOption.java | ++213 | +
|
+
+
+
+
+
+ | ||||
| Violation | +Recommendation | +Severity | +Resource | +Line | +
| Use of instanceof with this | ++Distribute the conditional code to the subclasses being tested for. | +Medium | ++FreeColGameObject.java | ++71 | +
| Use of instanceof with this | ++Distribute the conditional code to the subclasses being tested for. | +Medium | ++FreeColGameObject.java | ++257 | +
| Use of instanceof with this | ++Distribute the conditional code to the subclasses being tested for. | +Medium | ++WorkLocation.java | ++355 | +
| Use of instanceof with this | ++Distribute the conditional code to the subclasses being tested for. | +Medium | ++WorkLocation.java | ++360 | +
| + + | + |
This document contains the results of running metrics for A_Team-finalproject at 5/13/17 2:09 PM.
|
+
+
+
+
+
+
+
+ Global Results+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
+
+
+
+
+
+
+
+
+
+
|
| + + | + |
Tile the defence takes place on.
* @param success True if the attack succeeds.
*/
- public void animateAttack(Unit attacker, Unit defender,
+ void animateAttack(Unit attacker, Unit defender,
Tile attackerTile, Tile defenderTile,
boolean success) {
// Note: we used to focus the map on the unit even when
@@ -2600,7 +2599,7 @@ public void animateAttack(Unit attacker, Unit defender,
* @param oldTile The Tile the move begins at.
* @param newTile The Tile the move ends at.
*/
- public void animateMove(Unit unit, Tile oldTile, Tile newTile) {
+ void animateMove(Unit unit, Tile oldTile, Tile newTile) {
// Note: we used to focus the map on the unit even when
// animation is off as long as the center-active-unit option
// was set. However IR#115 requested that if animation is off
@@ -2703,8 +2702,7 @@ public boolean boardShip(Unit unit, Unit carrier) {
public boolean buildColony(Unit unit) {
if (!requireOurTurn() || unit == null) return false;
- // Check unit, which must be on the map and able to build.
- if (unit == null) return false;
+
final Tile tile = unit.getTile();
if (tile == null) return false;
if (!unit.canBuildColony()) {
@@ -2712,7 +2710,7 @@ public boolean buildColony(Unit unit) {
.template("buildColony.badUnit")
.addName("%unit%", unit.getName()));
return false;
- }
+ }
// Join existing colony if present
final Colony colony = tile.getColony();
@@ -2815,7 +2813,7 @@ public boolean buyGoods(GoodsType type, int amount, Unit carrier) {
* @param message What to say.
* @param pri If true, the message is private.
*/
- public void chat(Player player, String message, boolean pri) {
+ void chat(Player player, String message, boolean pri) {
gui.displayChatMessage(player, message, pri);
}
@@ -2968,7 +2966,7 @@ public boolean checkCashInTreasureTrain(Unit unit) {
* @param ff The chosen FoundingFather (may be null).
* @return True if a father was chosen.
*/
- public boolean chooseFoundingFather(ListFoundingFathers to choose from.
*/
- public void chooseFoundingFather(ListmessageId
* is unavailable.
*/
- public void error(String messageId, String message) {
+ void error(String messageId, String message) {
gui.showErrorMessage(messageId, message);
}
@@ -3419,7 +3417,7 @@ public boolean executeGotoOrders() {
* @param result Whether the initial treaty was accepted.
* @return True if first contact occurs.
*/
- public boolean firstContact(Player player, Player other, Tile tile,
+ private boolean firstContact(Player player, Player other, Tile tile,
boolean result) {
if (player == null || player == null || player == other
|| tile == null) return false;
@@ -3442,7 +3440,7 @@ public boolean firstContact(Player player, Player other, Tile tile,
* they have made a first landing.
* @param n The number of settlements claimed by the native player.
*/
- public void firstContact(Player player, Player other, Tile tile, int n) {
+ void firstContact(Player player, Player other, Tile tile, int n) {
gui.showFirstContactDialog(player, other, tile, n,
(Boolean b) -> firstContact(player, other, tile, b));
}
@@ -3454,7 +3452,7 @@ public void firstContact(Player player, Player other, Tile tile, int n) {
*
* @param n The number of migrants available for selection.
*/
- public void fountainOfYouth(int n) {
+ void fountainOfYouth(int n) {
Player player = freeColClient.getMyPlayer();
final boolean fountainOfYouth = true;
gui.showEmigrationDialog(player, fountainOfYouth,
@@ -3583,7 +3581,7 @@ public boolean ignoreMessage(ModelMessage message, boolean flag) {
* @param amount The amount of goods/gold demanded.
* @return Whether the demand was accepted or not.
*/
- public boolean indianDemand(Unit unit, Colony colony,
+ boolean indianDemand(Unit unit, Colony colony,
GoodsType type, int amount) {
if (unit == null || colony == null) return false;
@@ -3784,7 +3782,7 @@ public void loadGame() {
* @param defenderId The identifier of the defender unit (may have sunk).
* @return True if looting occurs.
*/
- public boolean lootCargo(Unit unit, ListGoods to choose from.
* @param defenderId The identifier of the defender unit (may have sunk).
*/
- public void loot(Unit unit, ListStringTemplate describing the action.
* @param monarchKey A key for the monarch involved.
*/
- public void monarch(MonarchAction action, StringTemplate template,
+ void monarch(MonarchAction action, StringTemplate template,
String monarchKey) {
gui.showMonarchDialog(action, template, monarchKey,
(Boolean b) -> monarchAction(action, b));
@@ -3928,8 +3926,6 @@ public boolean moveUnit(Unit unit, Direction direction) {
if (!askClearGotoOrders(unit)) return false;
- final int unitCount = unit.getUnitCount(),
- goodsCount = unit.getGoodsList().size();
final Tile oldTile = unit.getTile();
UnitWas unitWas = new UnitWas(unit);
ColonyWas colonyWas = (unit.getColony() == null) ? null
@@ -3980,7 +3976,7 @@ public boolean moveTileCursor(Direction direction) {
* @param name The name to use.
* @return True if the new land was named.
*/
- public boolean nameNewLand(Unit unit, String name) {
+ private boolean nameNewLand(Unit unit, String name) {
if (unit == null || name == null) return false;
// Respond to the server.
@@ -4017,7 +4013,7 @@ public boolean nameNewLand(Unit unit, String name) {
* @param name The name to offer.
* @return True if the new region was named.
*/
- public boolean nameNewRegion(final Tile tile, final Unit unit,
+ private boolean nameNewRegion(final Tile tile, final Unit unit,
final Region region, final String name) {
if (tile == null || unit == null || region == null) return false;
@@ -4032,7 +4028,7 @@ public boolean nameNewRegion(final Tile tile, final Unit unit,
* @param defaultName The default name to use.
* @param unit The Unit that has landed.
*/
- public void newLandName(String defaultName, Unit unit) {
+ void newLandName(String defaultName, Unit unit) {
gui.showNamingDialog(
StringTemplate.key("newLand.text"), defaultName, unit,
(String name) -> {
@@ -4051,7 +4047,7 @@ public void newLandName(String defaultName, Unit unit) {
* @param tile The Tile the unit landed at.
* @param unit The Unit that has landed.
*/
- public void newRegionName(Region region, String defaultName, Tile tile,
+ void newRegionName(Region region, String defaultName, Tile tile,
Unit unit) {
if (region.hasName()) {
if (region.isPacific()) {
@@ -4079,7 +4075,7 @@ public void newRegionName(Region region, String defaultName, Tile tile,
* @param turn The turn number.
* @return True if the new turn occurs.
*/
- public boolean newTurn(int turn) {
+ boolean newTurn(int turn) {
final Game game = freeColClient.getGame();
final Player player = freeColClient.getMyPlayer();
@@ -4100,7 +4096,7 @@ public boolean newTurn(int turn) {
player.addModelMessage(new ModelMessage(MessageType.WARNING,
"twoTurnsPerYear", player)
.addStringTemplate("%year%", currTurn.getLabel())
- .addAmount("%amount%", currTurn.getSeasonNumber()));
+ .addAmount("%amount%", Turn.getSeasonNumber()));
}
return true;
}
@@ -4284,7 +4280,7 @@ public boolean recruitUnitInEurope(int index) {
*
* @param objects A list of FreeColGameObjects to remove.
*/
- public void remove(ListPlayer to be the new current player.
* @return True if the current player changes.
*/
- public boolean setCurrentPlayer(Player player) {
+ boolean setCurrentPlayer(Player player) {
if (FreeColDebugger.isInDebugMode(FreeColDebugger.DebugMode.MENUS)
&& freeColClient.currentPlayerIsMyPlayer()) {
gui.closeMenus();
@@ -4569,7 +4565,7 @@ public boolean setCurrentPlayer(Player player) {
* @param dead The dead Player.
* @return True if the player is marked as dead.
*/
- public boolean setDead(Player dead) {
+ boolean setDead(Player dead) {
if (dead == null) return false;
final Player player = freeColClient.getMyPlayer();
@@ -4603,7 +4599,7 @@ public boolean setDead(Player dead) {
*
* No status returned to connect controller.
*/
- public void setGameConnected () {
+ void setGameConnected () {
final Player player = freeColClient.getMyPlayer();
if (player != null) {
player.refilterModelMessages(freeColClient.getClientOptions());
@@ -4649,7 +4645,7 @@ public boolean setInDebugMode() {
* @param second The second Player.
* @return True if the stance change succeeds.
*/
- public boolean setStance(Stance stance, Player first, Player second) {
+ boolean setStance(Stance stance, Player first, Player second) {
if (stance == null || first == null || second == null) return false;
final Player player = freeColClient.getMyPlayer();
@@ -4689,7 +4685,7 @@ public boolean setTradeRoutes(ListRunnable to restore the normal
* player view of the tile when the spying colony panel is closed.
*/
- public void spyColony(Tile tile, Runnable recover) {
+ void spyColony(Tile tile, Runnable recover) {
gui.showSpyColonyPanel(tile, recover);
}
@@ -4827,7 +4823,7 @@ public boolean updateTradeRoute(TradeRoute route) {
*
* @param score If "true", a new high score was reached.
*/
- public void victory(String score) {
+ void victory(String score) {
displayHighScores("true".equalsIgnoreCase(score));
gui.showVictoryDialog((Boolean result) -> victory(result));
}
@@ -4840,7 +4836,7 @@ public void victory(String score) {
* @param quit If true, leave this game and start a new one.
* @return True.
*/
- public boolean victory(Boolean quit) {
+ private boolean victory(Boolean quit) {
if (quit) {
freeColClient.newGame(false);
} else {
@@ -4878,7 +4874,6 @@ public boolean work(Unit unit, WorkLocation workLocation) {
if (!requireOurTurn() || unit == null
|| workLocation == null) return false;
- StringTemplate template;
if (unit.getStudent() != null
&& !gui.confirmAbandonEducation(unit, false)) return false;
diff --git a/src/net/sf/freecol/client/control/InGameInputHandler.java b/src/net/sf/freecol/client/control/InGameInputHandler.java
index 3f95b68a..034caed2 100644
--- a/src/net/sf/freecol/client/control/InGameInputHandler.java
+++ b/src/net/sf/freecol/client/control/InGameInputHandler.java
@@ -576,35 +576,6 @@ private Element diplomacy(Element element) {
: message.toXMLElement();
}
- /**
- * Disposes of the Units which are the children of this
- * Element.
- *
- * @param element The element (root element in a DOM-parsed XML
- * tree) that holds all the information.
- * @return Null.
- */
- private Element disposeUnits(Element element) {
- Game game = getGame();
- NodeList nodes = element.getChildNodes();
-
- for (int i = 0; i < nodes.getLength(); i++) {
- // Do not read the whole unit out of the element as we are
- // only going to dispose of it, not forgetting that the
- // server may have already done so and its view will only
- // mislead us here in the client.
- Element e = (Element) nodes.item(i);
- String id = FreeColObject.readId(e);
- Unit u = game.getFreeColGameObject(id, Unit.class);
- if (u == null) {
- logger.warning("Object is not a unit");
- } else {
- u.dispose();
- }
- }
- return null;
- }
-
/**
* Handle an "error"-message.
*
@@ -613,9 +584,10 @@ private Element disposeUnits(Element element) {
* @return Null.
*/
private Element error(Element element) {
- final String messageId = element.getAttribute("messageID");
+
final String message = element.getAttribute("message");
-
+ final String messageId = element.getAttribute("messageId");
+
invokeLater(() -> { igc().error(messageId, message); });
return null;
}
@@ -903,7 +875,7 @@ private Element newTurn(Element element) {
* tree) that holds all the information.
* @return Null.
*/
- private Element reconnect(@SuppressWarnings("unused") Element element) {
+ private Element reconnect(Element element) {
logger.finest("Entered reconnect.");
invokeLater(reconnectRunnable);
@@ -928,10 +900,6 @@ private Element remove(Element element) {
String idString = FreeColObject.readId(e);
FreeColGameObject fcgo = game.getFreeColGameObject(idString);
if (fcgo == null) {
- // This can happen legitimately when an update that
- // removes pointers to a disappearing unit happens,
- // then a gc which drops the weak reference in
- // freeColGameObjects, before this remove is processed.
continue;
}
objects.add(fcgo);
diff --git a/src/net/sf/freecol/client/control/InputHandler.java b/src/net/sf/freecol/client/control/InputHandler.java
index da1b4aa7..3e15d37c 100644
--- a/src/net/sf/freecol/client/control/InputHandler.java
+++ b/src/net/sf/freecol/client/control/InputHandler.java
@@ -33,7 +33,7 @@
/**
* Provides common methods for input handlers.
*/
-public abstract class InputHandler implements MessageHandler {
+abstract class InputHandler implements MessageHandler {
private static final Logger logger = Logger.getLogger(InputHandler.class.getName());
@@ -46,11 +46,11 @@ public abstract class InputHandler implements MessageHandler {
*
* @param freeColClient The FreeColClient for the game.
*/
- public InputHandler(FreeColClient freeColClient) {
+ InputHandler(FreeColClient freeColClient) {
this.freeColClient = freeColClient;
}
-
+
/**
* Gets the main freecol client object.
*
@@ -121,7 +121,7 @@ protected Element disconnect(Element element) {
* holds all the information.
* @return Null.
*/
- protected Element unknown(Element element) {
+ public Element unknown(Element element) {
logger.warning("Unknown message type: " + element.getTagName());
return null;
}
diff --git a/src/net/sf/freecol/client/control/MapEditorController.java b/src/net/sf/freecol/client/control/MapEditorController.java
index 4142d64e..bc4ef3a6 100644
--- a/src/net/sf/freecol/client/control/MapEditorController.java
+++ b/src/net/sf/freecol/client/control/MapEditorController.java
@@ -44,7 +44,6 @@
import net.sf.freecol.common.model.Tile;
import net.sf.freecol.common.option.MapGeneratorOptions;
import net.sf.freecol.common.option.OptionGroup;
-import net.sf.freecol.common.util.LogBuilder;
import net.sf.freecol.server.FreeColServer;
import net.sf.freecol.server.generator.MapGenerator;
import net.sf.freecol.server.model.ServerPlayer;
@@ -172,14 +171,10 @@ public void transform(Tile t) {
*/
public void newMap() {
final Game game = freeColClient.getGame();
- final Specification spec = game.getSpecification();
-
gui.removeInGameComponents();
OptionGroup mgo = gui.showMapGeneratorOptionsDialog(true);
if (mgo == null) return;
game.setMapGeneratorOptions(mgo);
- Map map = freeColClient.getFreeColServer().getMapGenerator()
- .createMap(new LogBuilder(-1));
requireNativeNations(game);
gui.setFocus(game.getMap().getTile(1,1));
gui.updateMenuBar();
@@ -237,6 +232,7 @@ public void run() {
public void loadGame() {
File file = gui.showLoadSaveFileDialog();
if (file != null) loadGame(file);
+
}
/**
@@ -244,7 +240,7 @@ public void loadGame() {
*
* @param game The Game to add native nations to.
*/
- public void requireNativeNations(Game game) {
+ private void requireNativeNations(Game game) {
final Specification spec = game.getSpecification();
for (Nation n : spec.getIndianNations()) {
Player p = game.getPlayerByNation(n);
@@ -268,7 +264,7 @@ public void loadGame(File file) {
class ErrorJob implements Runnable {
private final StringTemplate template;
- ErrorJob(StringTemplate template) {
+ private ErrorJob(StringTemplate template) {
this.template = template;
}
diff --git a/src/net/sf/freecol/client/control/PreGameController.java b/src/net/sf/freecol/client/control/PreGameController.java
index 6a36aa63..c2d3c23a 100644
--- a/src/net/sf/freecol/client/control/PreGameController.java
+++ b/src/net/sf/freecol/client/control/PreGameController.java
@@ -21,8 +21,6 @@
import java.awt.Color;
-import java.util.logging.Logger;
-
import net.sf.freecol.client.FreeColClient;
import net.sf.freecol.client.gui.GUI;
import net.sf.freecol.common.debug.FreeColDebugger;
@@ -42,8 +40,6 @@
*/
public final class PreGameController {
- private static final Logger logger = Logger.getLogger(PreGameController.class.getName());
-
/** The main client. */
private final FreeColClient freeColClient;
@@ -150,7 +146,7 @@ public void setNationType(NationType nationType) {
* @return True if the player should continue, false if we are in
* a debug run and should be skipping turns.
*/
- public boolean startGame() {
+ boolean startGame() {
final Player player = freeColClient.getMyPlayer();
if (!freeColClient.isHeadless()) {
gui.closeMainPanel();
diff --git a/src/net/sf/freecol/client/control/PreGameInputHandler.java b/src/net/sf/freecol/client/control/PreGameInputHandler.java
index 1e9e309d..0b518d6f 100644
--- a/src/net/sf/freecol/client/control/PreGameInputHandler.java
+++ b/src/net/sf/freecol/client/control/PreGameInputHandler.java
@@ -195,7 +195,7 @@ private Element logout(Element element) {
* holds all the information.
* @return The result of handling the last Element.
*/
- public Element multiple(Connection connection, Element element) {
+ private Element multiple(Connection connection, Element element) {
NodeList nodes = element.getChildNodes();
Element reply = null;
@@ -273,8 +273,8 @@ private Element setAvailable(Element element) {
* tree) that holds all the information.
* @return Null.
*/
- private Element startGame(@SuppressWarnings("unused") Element element) {
- new Thread(FreeCol.CLIENT_THREAD + "Starting game") {
+ private Element startGame(Element element){
+ new Thread(FreeCol.CLIENT_THREAD + "Starting game") {
@Override
public void run() {
while (getFreeColClient().getGame().getMap() == null) {
diff --git a/src/net/sf/freecol/client/control/SoundController.java b/src/net/sf/freecol/client/control/SoundController.java
index 276d5309..f3f46c68 100644
--- a/src/net/sf/freecol/client/control/SoundController.java
+++ b/src/net/sf/freecol/client/control/SoundController.java
@@ -42,7 +42,7 @@ public class SoundController {
private static final Logger logger = Logger.getLogger(SoundController.class.getName());
- private SoundPlayer soundPlayer;
+ public SoundPlayer soundPlayer;
/**
@@ -55,8 +55,9 @@ public SoundController(FreeColClient freeColClient, boolean sound) {
final ClientOptions opts = freeColClient.getClientOptions();
if (sound) {
this.soundPlayer = null;
- Option amo = opts.getOption(ClientOptions.AUDIO_MIXER);
- Option vo = opts.getOption(ClientOptions.AUDIO_VOLUME);
+
+ Option amo = opts.getOption(ClientOptions.AUDIO_MIXER);
+ Option vo = opts.getOption(ClientOptions.AUDIO_VOLUME);
if (!(amo instanceof AudioMixerOption)) {
logger.warning(ClientOptions.AUDIO_MIXER + " is not an AudioMixerOption");
} else if (!(vo instanceof PercentageOption)) {
diff --git a/src/net/sf/freecol/client/gui/MapViewer.java b/src/net/sf/freecol/client/gui/MapViewer.java
index b5dedd73..97f68925 100644
--- a/src/net/sf/freecol/client/gui/MapViewer.java
+++ b/src/net/sf/freecol/client/gui/MapViewer.java
@@ -126,7 +126,11 @@ public TextSpecification(String newText, Font newFont) {
// Helper variables for displaying the map.
private int tileHeight, tileWidth, halfHeight, halfWidth,
topSpace, topRows, /*bottomSpace,*/ bottomRows, leftSpace, rightSpace;
+
+ //For hex grid
+ private double testHeight, testWidth;
+
// The y-coordinate of the Tiles that will be drawn at the bottom
private int bottomRow = -1;
@@ -1242,7 +1246,11 @@ private void setImageLibraryAndUpdateData(ImageLibrary lib) {
tileWidth = tileSize.width;
halfHeight = tileHeight/2;
halfWidth = tileWidth/2;
+ testWidth = tileWidth * .204;
+ testWidth = tileWidth * .204;
+
+
int dx = tileWidth/16;
int dy = tileHeight/16;
int ddx = dx + dx/2;
@@ -1335,20 +1343,23 @@ void displayMap(Graphics2D g) {
g.translate(-xt, -yt);
});
- // Draw the grid, if needed
+ // Draw the grid, if needed
if (options.getBoolean(ClientOptions.DISPLAY_GRID)) {
// Generate a zigzag GeneralPath
- GeneralPath gridPath = new GeneralPath();
- gridPath.moveTo(0, 0);
- int nextX = halfWidth;
- int nextY = -halfHeight;
- for (int i = 0; i <= ((lastColumn - firstColumn) * 2 + 1); i++) {
- gridPath.lineTo(nextX, nextY);
- nextX += halfWidth;
- nextY = (nextY == 0 ? -halfHeight : 0);
+ GeneralPath gridPath = new GeneralPath();
+ gridPath.moveTo(0, 0);
+ double startX = halfWidth + 0.0;
+ double nextX = testWidth;
+ double startY = -halfHeight + 0.0;
+ double nextY = -testHeight;
+ for (int i = 0; i <= ((lastColumn - firstColumn) * 2 + 1); i++) {
+ gridPath.lineTo(startX + nextX, startY);
+ startX += halfWidth;
+ startY = (startY == 0 ? -halfHeight : 0);
+ gridPath.lineTo(startX + - nextX, startY);
+ gridPath.lineTo(startX, startY);
}
- // Display the grid
g.setStroke(gridStroke);
g.setColor(Color.BLACK);
for (int row = firstRow; row <= lastRow; row++) {
@@ -1361,8 +1372,10 @@ void displayMap(Graphics2D g) {
g.setTransform(rowTransform);
}
g.setTransform(baseTransform);
+
}
+
// Paint full region borders
if (options.getInteger(ClientOptions.DISPLAY_TILE_TEXT) ==
ClientOptions.DISPLAY_TILE_TEXT_REGIONS) {
diff --git a/src/net/sf/freecol/common/ServerInfo.java b/src/net/sf/freecol/common/ServerInfo.java
index 8e39d290..5c5c8202 100644
--- a/src/net/sf/freecol/common/ServerInfo.java
+++ b/src/net/sf/freecol/common/ServerInfo.java
@@ -47,7 +47,7 @@ public class ServerInfo {
/**
* Empty constructor that can be used by subclasses.
*/
- protected ServerInfo() {}
+ public ServerInfo() {}
/**
* Creates a new object with the given information.
diff --git a/src/net/sf/freecol/common/i18n/Relation.java b/src/net/sf/freecol/common/i18n/Relation.java
index 4337be8d..c864eb8d 100644
--- a/src/net/sf/freecol/common/i18n/Relation.java
+++ b/src/net/sf/freecol/common/i18n/Relation.java
@@ -76,7 +76,8 @@ public void setInteger(boolean value) {
*/
public boolean matches(double number) {
double value = (mod == 1) ? number : number % mod;
- if (integer && value != (int) value) {
+
+ if (integer) {
return false;
}
return (low <= value && value <= high) != negated;
diff --git a/src/net/sf/freecol/server/generator/ColonizationMapLoader.java b/src/net/sf/freecol/server/generator/ColonizationMapLoader.java
index f49801c3..1ac465e1 100644
--- a/src/net/sf/freecol/server/generator/ColonizationMapLoader.java
+++ b/src/net/sf/freecol/server/generator/ColonizationMapLoader.java
@@ -19,159 +19,148 @@
package net.sf.freecol.server.generator;
-import java.io.File;
-import java.io.RandomAccessFile;
-import net.sf.freecol.common.model.Game;
-import net.sf.freecol.common.model.Tile;
-import net.sf.freecol.common.model.TileImprovement;
-import net.sf.freecol.common.model.TileImprovementType;
-import net.sf.freecol.common.model.TileItemContainer;
-import net.sf.freecol.common.model.TileType;
-import net.sf.freecol.common.model.Map.Layer;
-import net.sf.freecol.common.model.Specification;
-
-
-/**
- * Just pass the name of a Colonization map file (with extension ".MP").
- *
- * The map file starts with a six-byte header. Byte zero encodes the
- * map width, byte two encodes the map height. The function of the
- * other bytes is unknown, their values, however, are fixed. The
- * header is followed by three "layers", each the size of the map. The
- * first "layer" encodes the terrain type. The function of the other
- * layers is unknown. They are filled with zero bytes.
- *
- * It seems that the least significant three bits encode the basic
- * terrain type, the next two bits encode the forest overlay and
- * the special tile types ice, ocean and sea lanes. The three most
- * significant bits encode combinations of the hill, mountain and
- * river overlays.
- *
- * bits 0-2: tile type
- * bit 3 (8): forest
- * bit 4 (16): forest
- * bits 3+4 (24): special, values larger than 26 are not defined
- *
- * bits 5-7: overlays
- * 0: nothing
- * 1: hill
- * 2: minor river
- * 3: hill + minor river (extremely rare)
- * 4: nothing
- * 5: mountain
- * 6: major river
- * 7: mountain + major river (never seen)
- */
-public class ColonizationMapLoader implements MapLoader {
-
- public static final int WIDTH = 0;
- public static final int HEIGHT = 2;
- public static final int OCEAN = 25;
- public static final int HIGH_SEAS = 26;
-
- private static final String[] tiletypes = {
- "tundra",
- "desert",
- "plains",
- "prairie",
- "grassland",
- "savannah",
- "marsh",
- "swamp",
- "borealForest",
- "scrubForest",
- "mixedForest",
- "broadleafForest",
- "coniferForest",
- "tropicalForest",
- "wetlandForest",
- "rainForest",
- "borealForest",
- "scrubForest",
- "mixedForest",
- "broadleafForest",
- "coniferForest",
- "tropicalForest",
- "wetlandForest",
- "rainForest",
- "arctic",
- "ocean",
- "highSeas",
- };
-
-
- private static final byte[] header = {
- 58, 0, 72, 0, 4, 0
- };
- private static byte[] layer1;
-
- public ColonizationMapLoader(File file) throws Exception {
-
- RandomAccessFile reader = new RandomAccessFile(file, "r");
- reader.read(header);
-
- int size = header[WIDTH] * header[HEIGHT];
- layer1 = new byte[size];
- reader.read(layer1);
-
- }
-
- @Override
- public Layer loadMap(Game game, Layer layer) {
- Specification spec = game.getSpecification();
- Tile[][] tiles = new Tile[header[WIDTH]][header[HEIGHT]];
- Layer highestLayer = layer.compareTo(getHighestLayer()) < 0
- ? layer : getHighestLayer();
- int index = 0;
- TileType tileType = null;
- if (highestLayer == Layer.LAND) {
- // import only the land / water distinction
- for (int y = 0; y < header[HEIGHT]; y++) {
- for (int x = 0; x < header[WIDTH]; x++) {
- int decimal = layer1[index] & 0xff;
- int terrain = decimal & 0b11111;
- tileType = (terrain == OCEAN || terrain == HIGH_SEAS) ?
- TileType.WATER : TileType.LAND;
- index++;
- }
- }
- } else {
- TileImprovementType riverType = spec.getTileImprovementType("model.improvement.river");
- for (int y = 0; y < header[HEIGHT]; y++) {
- for (int x = 0; x < header[WIDTH]; x++) {
- int decimal = layer1[index] & 0xff;
- int terrain = decimal & 0b11111;
- int overlay = decimal >> 5;
-
- if (terrain < tiletypes.length) {
- tileType = spec.getTileType("model.tile." + tiletypes[terrain]);
- } else if (overlay == 1 || overlay == 3) {
- tileType = spec.getTileType("model.tile.hills");
- } else if (overlay == 5 || overlay == 7) {
- tileType = spec.getTileType("model.tile.mountains");
- }
- tiles[x][y] = new Tile(game, tileType, x, y);
- if (highestLayer == Layer.RIVERS
- && (overlay == 2 || overlay == 3 || overlay == 6 || overlay == 7)) {
- TileItemContainer container = new TileItemContainer(game, tiles[x][y]);
- TileImprovement river =
- new TileImprovement(game, tiles[x][y], riverType);
- river.setMagnitude (overlay <= 3 ? 1 : 2);
- container.addTileItem(river);
- tiles[x][y].setTileItemContainer(container);
- }
- index++;
- }
- }
- }
- return highestLayer;
- }
-
- @Override
- public Layer getHighestLayer() {
- return Layer.RIVERS;
- }
-
-
-}
+// TODO Remove unused code found by UCDetector
+// /**
+// * Just pass the name of a Colonization map file (with extension ".MP").
+// *
+// * The map file starts with a six-byte header. Byte zero encodes the
+// * map width, byte two encodes the map height. The function of the
+// * other bytes is unknown, their values, however, are fixed. The
+// * header is followed by three "layers", each the size of the map. The
+// * first "layer" encodes the terrain type. The function of the other
+// * layers is unknown. They are filled with zero bytes.
+// *
+// * It seems that the least significant three bits encode the basic
+// * terrain type, the next two bits encode the forest overlay and
+// * the special tile types ice, ocean and sea lanes. The three most
+// * significant bits encode combinations of the hill, mountain and
+// * river overlays.
+// *
+// * bits 0-2: tile type
+// * bit 3 (8): forest
+// * bit 4 (16): forest
+// * bits 3+4 (24): special, values larger than 26 are not defined
+// *
+// * bits 5-7: overlays
+// * 0: nothing
+// * 1: hill
+// * 2: minor river
+// * 3: hill + minor river (extremely rare)
+// * 4: nothing
+// * 5: mountain
+// * 6: major river
+// * 7: mountain + major river (never seen)
+// */
+// public class ColonizationMapLoader implements MapLoader {
+//
+// public static final int WIDTH = 0;
+// public static final int HEIGHT = 2;
+// public static final int OCEAN = 25;
+// public static final int HIGH_SEAS = 26;
+//
+// private static final String[] tiletypes = {
+// "tundra",
+// "desert",
+// "plains",
+// "prairie",
+// "grassland",
+// "savannah",
+// "marsh",
+// "swamp",
+// "borealForest",
+// "scrubForest",
+// "mixedForest",
+// "broadleafForest",
+// "coniferForest",
+// "tropicalForest",
+// "wetlandForest",
+// "rainForest",
+// "borealForest",
+// "scrubForest",
+// "mixedForest",
+// "broadleafForest",
+// "coniferForest",
+// "tropicalForest",
+// "wetlandForest",
+// "rainForest",
+// "arctic",
+// "ocean",
+// "highSeas",
+// };
+//
+//
+// private static final byte[] header = {
+// 58, 0, 72, 0, 4, 0
+// };
+// private static byte[] layer1;
+//
+// public ColonizationMapLoader(File file) throws Exception {
+//
+// RandomAccessFile reader = new RandomAccessFile(file, "r");
+// reader.read(header);
+//
+// int size = header[WIDTH] * header[HEIGHT];
+// layer1 = new byte[size];
+// reader.read(layer1);
+//
+// }
+//
+// @Override
+// public Layer loadMap(Game game, Layer layer) {
+// Specification spec = game.getSpecification();
+// Tile[][] tiles = new Tile[header[WIDTH]][header[HEIGHT]];
+// Layer highestLayer = layer.compareTo(getHighestLayer()) < 0
+// ? layer : getHighestLayer();
+// int index = 0;
+// TileType tileType = null;
+// if (highestLayer == Layer.LAND) {
+// // import only the land / water distinction
+// for (int y = 0; y < header[HEIGHT]; y++) {
+// for (int x = 0; x < header[WIDTH]; x++) {
+// int decimal = layer1[index] & 0xff;
+// int terrain = decimal & 0b11111;
+// tileType = (terrain == OCEAN || terrain == HIGH_SEAS) ?
+// TileType.WATER : TileType.LAND;
+// index++;
+// }
+// }
+// } else {
+// TileImprovementType riverType = spec.getTileImprovementType("model.improvement.river");
+// for (int y = 0; y < header[HEIGHT]; y++) {
+// for (int x = 0; x < header[WIDTH]; x++) {
+// int decimal = layer1[index] & 0xff;
+// int terrain = decimal & 0b11111;
+// int overlay = decimal >> 5;
+//
+// if (terrain < tiletypes.length) {
+// tileType = spec.getTileType("model.tile." + tiletypes[terrain]);
+// } else if (overlay == 1 || overlay == 3) {
+// tileType = spec.getTileType("model.tile.hills");
+// } else if (overlay == 5 || overlay == 7) {
+// tileType = spec.getTileType("model.tile.mountains");
+// }
+// tiles[x][y] = new Tile(game, tileType, x, y);
+// if (highestLayer == Layer.RIVERS
+// && (overlay == 2 || overlay == 3 || overlay == 6 || overlay == 7)) {
+// TileItemContainer container = new TileItemContainer(game, tiles[x][y]);
+// TileImprovement river =
+// new TileImprovement(game, tiles[x][y], riverType);
+// river.setMagnitude (overlay <= 3 ? 1 : 2);
+// container.addTileItem(river);
+// tiles[x][y].setTileItemContainer(container);
+// }
+// index++;
+// }
+// }
+// }
+// return highestLayer;
+// }
+//
+// @Override
+// public Layer getHighestLayer() {
+// return Layer.RIVERS;
+// }
+//
+//
+// }
diff --git a/src/net/sf/freecol/server/generator/FreeColMapLoader.java b/src/net/sf/freecol/server/generator/FreeColMapLoader.java
index 71b0f9a4..123a025e 100644
--- a/src/net/sf/freecol/server/generator/FreeColMapLoader.java
+++ b/src/net/sf/freecol/server/generator/FreeColMapLoader.java
@@ -17,123 +17,104 @@
* along with FreeCol. If not, see Game value
- * @return a boolean value
- */
- public boolean generateLayer(Game game);
-
- /**
- * Returns the Layer this MapLayerGenerator is able to generate.
- *
- * @return a Layer value
- */
- public Layer getLayer();
-
-}
\ No newline at end of file
+// TODO Remove unused code found by UCDetector
+// /**
+// * Generates a map layer.
+// */
+// public interface MapLayerGenerator {
+//
+// /**
+// * Generates the layer in the map of the given game. Returns true
+// * if the layer was generated, and false otherwise.
+// *
+// * @param game a Game value
+// * @return a boolean value
+// */
+// public boolean generateLayer(Game game);
+//
+// /**
+// * Returns the Layer this MapLayerGenerator is able to generate.
+// *
+// * @return a Layer value
+// */
+// public Layer getLayer();
+//
+// }
\ No newline at end of file
diff --git a/src/net/sf/freecol/server/generator/MapLoader.java b/src/net/sf/freecol/server/generator/MapLoader.java
index 0c2a10c0..175e8c72 100644
--- a/src/net/sf/freecol/server/generator/MapLoader.java
+++ b/src/net/sf/freecol/server/generator/MapLoader.java
@@ -23,7 +23,7 @@
import net.sf.freecol.common.model.Map.Layer;
-public interface MapLoader {
+interface MapLoader {
/**
* Load a map into the given game, copying all layers up to the
diff --git a/src/net/sf/freecol/server/generator/River.java b/src/net/sf/freecol/server/generator/River.java
index 58377080..f1025162 100644
--- a/src/net/sf/freecol/server/generator/River.java
+++ b/src/net/sf/freecol/server/generator/River.java
@@ -38,7 +38,7 @@
/**
* A river for the map generator.
*/
-public class River {
+class River {
private static final Logger logger = Logger.getLogger(SimpleMapGenerator.class.getName());
@@ -137,7 +137,7 @@ public Direction getNewDirection(Direction oldDirection) {
* @param region The region for this river.
* @param random The Random number source to use.
*/
- public River(Map map, java.util.MapTile where this section is located.
- * @param direction The Direction the river is flowing in.
- */
- public void add(Tile tile, Direction direction) {
- this.sections.add(new RiverSection(tile, direction));
- }
+// TODO Remove unused code found by UCDetector
+// /**
+// * Adds a new section to this river.
+// *
+// * @param tile The Tile where this section is located.
+// * @param direction The Direction the river is flowing in.
+// */
+// public void add(Tile tile, Direction direction) {
+// this.sections.add(new RiverSection(tile, direction));
+// }
/**
* Increases the size of this river.
@@ -201,7 +202,7 @@ public void add(Tile tile, Direction direction) {
* @param lastSection The last section of the river flowing into this one.
* @param tile The Tile of the confluence.
*/
- public void grow(RiverSection lastSection, Tile tile) {
+ private void grow(RiverSection lastSection, Tile tile) {
boolean found = false;
@@ -229,7 +230,7 @@ public void grow(RiverSection lastSection, Tile tile) {
* @param tile A map tile.
* @return true if the given tile is next to this river.
*/
- public boolean isNextToSelf(Tile tile) {
+ private boolean isNextToSelf(Tile tile) {
return any(Direction.longSides,
d -> this.contains(tile.getNeighbourOrNull(d)));
}
@@ -240,7 +241,7 @@ public boolean isNextToSelf(Tile tile) {
* @param tile A map tile.
* @return true if the given tile is next to a river, lake or sea.
*/
- public boolean isNextToWater(Tile tile) {
+ private boolean isNextToWater(Tile tile) {
return any(Direction.longSides,
d -> {
Tile t = tile.getNeighbourOrNull(d);
@@ -254,7 +255,7 @@ public boolean isNextToWater(Tile tile) {
* @param tile A map tile.
* @return true if this river already contains the given tile.
*/
- public boolean contains(Tile tile) {
+ private boolean contains(Tile tile) {
return any(getSections(), rs -> rs.getTile() == tile);
}
@@ -264,7 +265,7 @@ public boolean contains(Tile tile) {
* @param tile An origin map Tile.
* @return True if a river was created, false otherwise.
*/
- public boolean flowFromSource(Tile tile) {
+ boolean flowFromSource(Tile tile) {
TileImprovementType riverType =
map.getSpecification().getTileImprovementType("model.improvement.river");
if (!riverType.isTileTypeAllowed(tile.getType())) {
diff --git a/src/net/sf/freecol/server/generator/RiverSection.java b/src/net/sf/freecol/server/generator/RiverSection.java
index 137d615b..07d9d40d 100644
--- a/src/net/sf/freecol/server/generator/RiverSection.java
+++ b/src/net/sf/freecol/server/generator/RiverSection.java
@@ -37,15 +37,9 @@
* manipulation of individual stream(s) to neighboring Tiles (there
* are many in case of confluence)
*/
-public class RiverSection {
+class RiverSection {
-// private static final Logger logger = Logger.getLogger(RiverImprovementBuilder.class.getName());
-
- private static final char[] template = {
- '0', '1', '2', '3'
- };
-
- /**
+/**
* River magnitude (size) for each direction toward the edges of the tile
*/
private java.util.MapRandom number source.
* @see #createMap
*/
- public TerrainGenerator(Game game, Game importGame, Random random) {
+ TerrainGenerator(Game game, Game importGame, Random random) {
this.game = game;
this.importGame = importGame;
this.random = random;
@@ -431,7 +431,8 @@ private ListServerRegions.
*/
private ListLogBuilder to log to.
* @return The new Map.
*/
- public Map createMap(LandMap landMap, LogBuilder lb) {
+ Map createMap(LandMap landMap, LogBuilder lb) {
final int width = landMap.getWidth();
final int height = landMap.getHeight();
final boolean importTerrain = (importGame != null)
diff --git a/test/src/net/sf/freecol/client/gui/FontTest.java b/test/src/net/sf/freecol/client/gui/FontTest.java
index c2a90334..8d8471a2 100644
--- a/test/src/net/sf/freecol/client/gui/FontTest.java
+++ b/test/src/net/sf/freecol/client/gui/FontTest.java
@@ -19,12 +19,43 @@
package net.sf.freecol.client.gui;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.awt.Color;
+import java.awt.Container;
import java.awt.Font;
+import java.awt.event.ActionEvent;
+import java.awt.event.MouseEvent;
+import java.awt.geom.GeneralPath;
+import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileFilter;
+import java.util.ArrayList;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
+import javax.swing.ImageIcon;
+import javax.swing.JInternalFrame;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import net.sf.freecol.client.FreeColClient;
+import net.sf.freecol.client.gui.menu.FreeColMenuTest;
+import net.sf.freecol.client.gui.panel.AboutPanel;
+import net.sf.freecol.client.gui.panel.ClassicMapControls;
+import net.sf.freecol.client.gui.panel.ColopediaTreeCellRenderer;
+import net.sf.freecol.client.gui.panel.Flag;
+
+import net.sf.freecol.client.gui.panel.MapControls;
+import net.sf.freecol.common.model.IndianNationType;
+import net.sf.freecol.common.model.Specification;
import net.sf.freecol.util.test.FreeColTestCase;
@@ -46,6 +77,112 @@ public boolean accept(File pathname) {
}
+ public void testFreeColMenuTest_1()
+ throws Exception {
+ FreeColMenuTest result = new FreeColMenuTest();
+ assertNotNull(result);
+ // add additional test code here
+ }
+
+ /*
+ public void testCreateContentPane_1()
+ throws Exception {
+ FreeColMenuTest fixture = new FreeColMenuTest();
+ fixture.output = new JTextArea();
+ fixture.scrollPane = new JScrollPane();
+
+ Container result = fixture.createContentPane();
+
+ // add additional test code here
+ assertNotNull(result);
+ assertEquals(1, result.getComponentCount());
+ assertEquals(0.5f, result.getAlignmentX(), 1.0f);
+ assertEquals(0.5f, result.getAlignmentY(), 1.0f);
+ assertEquals(null, result.getFocusTraversalPolicy());
+ assertEquals(false, result.isFocusCycleRoot());
+ assertEquals(false, result.isValidateRoot());
+ //assertEquals(1, result.countComponents());
+ assertEquals(false, result.isFocusTraversalPolicyProvider());
+ assertEquals(false, result.isFocusTraversalPolicySet());
+ assertEquals("javax.swing.JPanel[,0,0,0x0,invalid,layout=java.awt.BorderLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=16777225,maximumSize=,minimumSize=,preferredSize=]", result.toString());
+ assertEquals(null, result.getName());
+ assertEquals(null, result.getParent());
+ assertEquals(true, result.isOpaque());
+ assertEquals(false, result.isValid());
+ assertEquals(0, result.getY());
+ assertEquals(true, result.isEnabled());
+ assertEquals(false, result.requestFocusInWindow());
+ assertEquals(null, result.getInputContext());
+ assertEquals(0, result.getWidth());
+ assertEquals(false, result.hasFocus());
+ assertEquals(false, result.isShowing());
+ assertEquals(true, result.isVisible());
+ assertEquals(null, result.getMousePosition());
+ assertEquals(null, result.getGraphics());
+ assertEquals(null, result.getFocusCycleRootAncestor());
+ // assertEquals(null, result.getPeer());
+ assertEquals(false, result.isDisplayable());
+ assertEquals(true, result.isDoubleBuffered());
+ assertEquals(false, result.isMaximumSizeSet());
+ assertEquals(false, result.isMinimumSizeSet());
+ assertEquals(false, result.isPreferredSizeSet());
+ assertEquals(0, result.getX());
+ assertEquals(0, result.getHeight());
+ assertEquals(null, result.getGraphicsConfiguration());
+ assertEquals(false, result.isFocusOwner());
+ assertEquals(true, result.isFocusable());
+ assertEquals(false, result.isLightweight());
+ assertEquals(null, result.getDropTarget());
+ assertEquals(true, result.getFocusTraversalKeysEnabled());
+ assertEquals(false, result.getIgnoreRepaint());
+ assertEquals(null, result.getInputMethodRequests());
+ assertEquals(true, result.isBackgroundSet());
+ assertEquals(false, result.isCursorSet());
+
+ assertEquals(true, result.isFontSet());
+ assertEquals(true, result.isForegroundSet());
+ }
+
+ public void testGetClassName_1()
+ throws Exception {
+ FreeColMenuTest fixture = new FreeColMenuTest();
+ fixture.output = new JTextArea();
+ fixture.scrollPane = new JScrollPane();
+ Object o = new Object();
+
+ String result = fixture.getClassName(o);
+
+ // add additional test code here
+ assertEquals("Object", result);
+ }
+*/
+ /**
+ * Run the void itemStateChanged(ItemEvent) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/16/17 1:20 AM
+ */
+
+ /**
+ * Run the void itemStateChanged(ItemEvent) method test.
+ *
+ * @throws Exception
+ *
+ * @generatedBy CodePro at 5/16/17 1:20 AM
+ */
+
+ @Test
+ public void testMain_1()
+ throws Exception {
+ String[] args = new String[] {};
+
+ FreeColMenuTest.main(args);
+
+ // add additional test code here
+ }
+
+
public void testLogicalSerif() {
try {
@@ -60,21 +197,977 @@ public void testLogicalSerif() {
}
}
- /*
- public void testLiberationSerif() {
+ public void testFlag_1()
+ throws Exception {
+ Flag.Background background = Flag.Background.FESSES;
+ Flag.Decoration decoration = Flag.Decoration.BEND;
+ Flag.UnionPosition unionPosition = Flag.UnionPosition.BOTTOM;
- File liberationSerif = new File("data/base/resources/fonts/LiberationSerif-Regular.ttf");
- try {
- Font font = Font.createFont(Font.TRUETYPE_FONT, liberationSerif);
- assertNotNull(font);
- for (Map.Entry