inprogress
authorcmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Tue, 8 Oct 2013 06:34:55 +0000 (06:34 +0000)
committercmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Tue, 8 Oct 2013 06:34:55 +0000 (06:34 +0000)
forester_applications/src/org/forester/applications/genome_counts_for_once_appearing_dcs.java
forester_applications/src/org/forester/applications/simple_node_processor.java
forester_applications/src/org/forester/applications/tax_code_cleaner.java

index d7ed36a..29320bf 100644 (file)
@@ -130,7 +130,7 @@ public class genome_counts_for_once_appearing_dcs {
             System.out.println( i );
         }
         System.out.println();
-        for( String dc : appearing_once_dcs ) {
+        for( final String dc : appearing_once_dcs ) {
             System.out.println( "1\t" + dc );
         }
     }
index 6f27819..7b77a4f 100644 (file)
@@ -109,8 +109,8 @@ public class simple_node_processor {
         //        }
         if ( node.isExternal() ) {
             if ( node.getNodeData().isHasTaxonomy() ) {
-                Taxonomy t = node.getNodeData().getTaxonomy();
-                if ( !ForesterUtil.isEmpty( t.getTaxonomyCode() ) && t.getTaxonomyCode().length() == 5 ) {
+                final Taxonomy t = node.getNodeData().getTaxonomy();
+                if ( !ForesterUtil.isEmpty( t.getTaxonomyCode() ) && ( t.getTaxonomyCode().length() == 5 ) ) {
                     if ( node.getName().equalsIgnoreCase( t.getTaxonomyCode() ) ) {
                         node.setName( "" );
                     }
index 4af65fd..0bc4616 100644 (file)
@@ -184,7 +184,7 @@ public class tax_code_cleaner {
                         t.setTaxonomyCode( "" );
                     }
                     else if ( tc.length() == 6 ) {
-                        Pattern p = Pattern.compile( "[A-Z9][A-Z]{2}[A-Z0-9]{2}\\d" );
+                        final Pattern p = Pattern.compile( "[A-Z9][A-Z]{2}[A-Z0-9]{2}\\d" );
                         if ( p.matcher( tc ).matches() ) {
                             t.setTaxonomyCode( tc.substring( 0, 5 ) );
                         }