DormandPrince853StepInterpolator.java

Index Score
org.apache.commons.math.ode
Commons Math

View: Reasons, Metrics, Source Code

These are the metrics that contribute to the Enerjy Score for this file, ranked by impact. So the metrics listed at the top influence the score to a greater extent that the metrics listed at the bottom.

MetricDescription
DECL_COMMENTSComments in declarations
JAVA0076JAVA0076 Use of magic number
LOOPSNumber of loops
JAVA0034JAVA0034 Missing braces in if statement
UNIQUE_OPERANDSNumber of unique operands
PROGRAM_VOCABHalstead program vocabulary
SIZESize of the file in bytes
JAVA0128JAVA0128 Public constructor in non-public class
OPERATORSNumber of operators
PROGRAM_LENGTHHalstead program length
OPERANDSNumber of operands
JAVA0075JAVA0075 Method parameter hides field
DOC_COMMENTNumber of javadoc comment lines
JAVA0117JAVA0117 Missing javadoc: method 'method'
PROGRAM_VOLUMEHalstead program volume
JAVA0126JAVA0126 Method declares unchecked exception in throws
COMMENTSComment lines
JAVA0110JAVA0110 Incorrect javadoc: no @return tag
UNIQUE_OPERATORSNumber of unique operators
CYCLOMATICCyclomatic complexity
EXITSProcedure exits
LINESNumber of lines in the source file
WHITESPACENumber of whitespace lines
JAVA0108JAVA0108 Incorrect javadoc: no @param tag for 'parameter'
COMPARISONSNumber of comparison operators
FUNCTIONSNumber of function declarations
LOGICAL_LINESNumber of statements
PARAMSNumber of formal parameter declarations
JAVA0145JAVA0145 Tab character used in source file
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.commons.math.ode; import java.io.ObjectOutput; import java.io.ObjectInput; import java.io.IOException; /** * This class represents an interpolator over the last step during an * ODE integration for the 8(5,3) Dormand-Prince integrator. * * @see DormandPrince853Integrator * * @version $Revision: 620312 $ $Date: 2008-02-10 14:28:59 -0500 (Sun, 10 Feb 2008) $ * @since 1.2 */ class DormandPrince853StepInterpolator extends RungeKuttaStepInterpolator { /** Simple constructor. * This constructor builds an instance that is not usable yet, the * {@link #reinitialize} method should be called before using the * instance in order to initialize the internal arrays. This * constructor is used only in order to delay the initialization in * some cases. The {@link EmbeddedRungeKuttaIntegrator} uses the * prototyping design pattern to create the step interpolators by * cloning an uninitialized model and latter initializing the copy. */ public DormandPrince853StepInterpolator() { super(); yDotKLast = null; v = null; vectorsInitialized = false; } /** Copy constructor. * @param interpolator interpolator to copy from. The copy is a deep * copy: its arrays are separated from the original arrays of the * instance */ public DormandPrince853StepInterpolator(DormandPrince853StepInterpolator interpolator) { super(interpolator); if (interpolator.currentState == null) { yDotKLast = null; v = null; vectorsInitialized = false; } else { int dimension = interpolator.currentState.length; yDotKLast = new double[3][]; for (int k = 0; k < yDotKLast.length; ++k) { yDotKLast[k] = new double[dimension]; System.arraycopy(interpolator.yDotKLast[k], 0, yDotKLast[k], 0, dimension); } v = new double[7][]; for (int k = 0; k < v.length; ++k) { v[k] = new double[dimension]; System.arraycopy(interpolator.v[k], 0, v[k], 0, dimension); } vectorsInitialized = interpolator.vectorsInitialized; } } /** Really copy the finalized instance. * @return a copy of the finalized instance */ protected StepInterpolator doCopy() { return new DormandPrince853StepInterpolator(this); } /** Reinitialize the instance * Some embedded Runge-Kutta integrators need fewer functions * evaluations than their counterpart step interpolators. So the * interpolator should perform the last evaluations they need by * themselves. The {@link EmbeddedRungeKuttaIntegrator * EmbeddedRungeKuttaIntegrator} abstract class calls this method in * order to let the step interpolator perform the evaluations it * needs. These evaluations will be performed during the call to * <code>doFinalize</code> if any, i.e. only if the step handler * either calls the {@link AbstractStepInterpolator#finalizeStep * finalizeStep} method or the {@link * AbstractStepInterpolator#getInterpolatedState getInterpolatedState} * method (for an interpolator which needs a finalization) or if it clones * the step interpolator. * @param equations set of differential equations being integrated * @param y reference to the integrator array holding the state at * the end of the step * @param yDotK reference to the integrator array holding all the * intermediate slopes * @param forward integration direction indicator */ public void reinitialize(FirstOrderDifferentialEquations equations, double[] y, double[][] yDotK, boolean forward) { super.reinitialize(equations, y, yDotK, forward); int dimension = currentState.length; yDotKLast = new double[3][]; for (int k = 0; k < yDotKLast.length; ++k) { yDotKLast[k] = new double[dimension]; } v = new double[7][]; for (int k = 0; k < v.length; ++k) { v[k] = new double[dimension]; } vectorsInitialized = false; } /** Store the current step time. * @param t current time */ public void storeTime(double t) { super.storeTime(t); vectorsInitialized = false; } /** Compute the state at the interpolated time. * This is the main processing method that should be implemented by * the derived classes to perform the interpolation. * @param theta normalized interpolation abscissa within the step * (theta is zero at the previous time step and one at the current time step) * @param oneMinusThetaH time gap between the interpolated time and * the current time * @throws DerivativeException this exception is propagated to the caller if the * underlying user function triggers one */ protected void computeInterpolatedState(double theta, double oneMinusThetaH) throws DerivativeException { if (! vectorsInitialized) { if (v == null) { v = new double[7][]; for (int k = 0; k < 7; ++k) { v[k] = new double[interpolatedState.length]; } } // perform the last evaluations if they have not been done yet finalizeStep(); // compute the interpolation vectors for this time step for (int i = 0; i < interpolatedState.length; ++i) { v[0][i] = h * (b_01 * yDotK[0][i] + b_06 * yDotK[5][i] + b_07 * yDotK[6][i] + b_08 * yDotK[7][i] + b_09 * yDotK[8][i] + b_10 * yDotK[9][i] + b_11 * yDotK[10][i] + b_12 * yDotK[11][i]); v[1][i] = h * yDotK[0][i] - v[0][i]; v[2][i] = v[0][i] - v[1][i] - h * yDotK[12][i]; for (int k = 0; k < d.length; ++k) { v[k+3][i] = h * (d[k][0] * yDotK[0][i] + d[k][1] * yDotK[5][i] + d[k][2] * yDotK[6][i] + d[k][3] * yDotK[7][i] + d[k][4] * yDotK[8][i] + d[k][5] * yDotK[9][i] + d[k][6] * yDotK[10][i] + d[k][7] * yDotK[11][i] + d[k][8] * yDotK[12][i] + d[k][9] * yDotKLast[0][i] + d[k][10] * yDotKLast[1][i] + d[k][11] * yDotKLast[2][i]); } } vectorsInitialized = true; } double eta = oneMinusThetaH / h; for (int i = 0; i < interpolatedState.length; ++i) { interpolatedState[i] = currentState[i] - eta * (v[0][i] - theta * (v[1][i] + theta * (v[2][i] + eta * (v[3][i] + theta * (v[4][i] + eta * (v[5][i] + theta * (v[6][i]))))))); } } /** * Really finalize the step. * Perform the last 3 functions evaluations (k14, k15, k16) * @throws DerivativeException this exception is propagated to the caller if the * underlying user function triggers one */ protected void doFinalize() throws DerivativeException { if (currentState == null) { // we are finalizing an uninitialized instance return; } double s; double[] yTmp = new double[currentState.length]; // k14 for (int j = 0; j < currentState.length; ++j) { s = k14_01 * yDotK[0][j] + k14_06 * yDotK[5][j] + k14_07 * yDotK[6][j] + k14_08 * yDotK[7][j] + k14_09 * yDotK[8][j] + k14_10 * yDotK[9][j] + k14_11 * yDotK[10][j] + k14_12 * yDotK[11][j] + k14_13 * yDotK[12][j]; yTmp[j] = currentState[j] + h * s; } equations.computeDerivatives(previousTime + c14 * h, yTmp, yDotKLast[0]); // k15 for (int j = 0; j < currentState.length; ++j) { s = k15_01 * yDotK[0][j] + k15_06 * yDotK[5][j] + k15_07 * yDotK[6][j] + k15_08 * yDotK[7][j] + k15_09 * yDotK[8][j] + k15_10 * yDotK[9][j] + k15_11 * yDotK[10][j] + k15_12 * yDotK[11][j] + k15_13 * yDotK[12][j] + k15_14 * yDotKLast[0][j]; yTmp[j] = currentState[j] + h * s; } equations.computeDerivatives(previousTime + c15 * h, yTmp, yDotKLast[1]); // k16 for (int j = 0; j < currentState.length; ++j) { s = k16_01 * yDotK[0][j] + k16_06 * yDotK[5][j] + k16_07 * yDotK[6][j] + k16_08 * yDotK[7][j] + k16_09 * yDotK[8][j] + k16_10 * yDotK[9][j] + k16_11 * yDotK[10][j] + k16_12 * yDotK[11][j] + k16_13 * yDotK[12][j] + k16_14 * yDotKLast[0][j] + k16_15 * yDotKLast[1][j]; yTmp[j] = currentState[j] + h * s; } equations.computeDerivatives(previousTime + c16 * h, yTmp, yDotKLast[2]); } /** Save the state of the instance. * @param out stream where to save the state * @exception IOException in case of write error */ public void writeExternal(ObjectOutput out) throws IOException { try { // save the local attributes finalizeStep(); } catch (DerivativeException e) { throw new IOException(e.getMessage()); } out.writeInt(currentState.length); for (int i = 0; i < currentState.length; ++i) { out.writeDouble(yDotKLast[0][i]); out.writeDouble(yDotKLast[1][i]); out.writeDouble(yDotKLast[2][i]); } // save the state of the base class super.writeExternal(out); } /** Read the state of the instance. * @param in stream where to read the state from * @exception IOException in case of read error */ public void readExternal(ObjectInput in) throws IOException { // read the local attributes yDotKLast = new double[3][]; int dimension = in.readInt(); yDotKLast[0] = new double[dimension]; yDotKLast[1] = new double[dimension]; yDotKLast[2] = new double[dimension]; for (int i = 0; i < dimension; ++i) { yDotKLast[0][i] = in.readDouble(); yDotKLast[1][i] = in.readDouble(); yDotKLast[2][i] = in.readDouble(); } // read the base state super.readExternal(in); } /** Last evaluations. */ private double[][] yDotKLast; /** Vectors for interpolation. */ private double[][] v; /** Initialization indicator for the interpolation vectors. */ private boolean vectorsInitialized; /** Propagation weights, element 1. */ private static final double b_01 = 104257.0 / 1920240.0; // elements 2 to 5 are zero, so they are neither stored nor used /** Propagation weights, element 6. */ private static final double b_06 = 3399327.0 / 763840.0; /** Propagation weights, element 7. */ private static final double b_07 = 66578432.0 / 35198415.0; /** Propagation weights, element 8. */ private static final double b_08 = -1674902723.0 / 288716400.0; /** Propagation weights, element 9. */ private static final double b_09 = 54980371265625.0 / 176692375811392.0; /** Propagation weights, element 10. */ private static final double b_10 = -734375.0 / 4826304.0; /** Propagation weights, element 11. */ private static final double b_11 = 171414593.0 / 851261400.0; /** Propagation weights, element 12. */ private static final double b_12 = 137909.0 / 3084480.0; /** Time step for stage 14 (interpolation only). */ private static final double c14 = 1.0 / 10.0; /** Internal weights for stage 14, element 1. */ private static final double k14_01 = 13481885573.0 / 240030000000.0 - b_01; // elements 2 to 5 are zero, so they are neither stored nor used /** Internal weights for stage 14, element 6. */ private static final double k14_06 = 0.0 - b_06; /** Internal weights for stage 14, element 7. */ private static final double k14_07 = 139418837528.0 / 549975234375.0 - b_07; /** Internal weights for stage 14, element 8. */ private static final double k14_08 = -11108320068443.0 / 45111937500000.0 - b_08; /** Internal weights for stage 14, element 9. */ private static final double k14_09 = -1769651421925959.0 / 14249385146080000.0 - b_09; /** Internal weights for stage 14, element 10. */ private static final double k14_10 = 57799439.0 / 377055000.0 - b_10; /** Internal weights for stage 14, element 11. */ private static final double k14_11 = 793322643029.0 / 96734250000000.0 - b_11; /** Internal weights for stage 14, element 12. */ private static final double k14_12 = 1458939311.0 / 192780000000.0 - b_12; /** Internal weights for stage 14, element 13. */ private static final double k14_13 = -4149.0 / 500000.0; /** Time step for stage 15 (interpolation only). */ private static final double c15 = 1.0 / 5.0; /** Internal weights for stage 15, element 1. */ private static final double k15_01 = 1595561272731.0 / 50120273500000.0 - b_01; // elements 2 to 5 are zero, so they are neither stored nor used /** Internal weights for stage 15, element 6. */ private static final double k15_06 = 975183916491.0 / 34457688031250.0 - b_06; /** Internal weights for stage 15, element 7. */ private static final double k15_07 = 38492013932672.0 / 718912673015625.0 - b_07; /** Internal weights for stage 15, element 8. */ private static final double k15_08 = -1114881286517557.0 / 20298710767500000.0 - b_08; /** Internal weights for stage 15, element 9. */ private static final double k15_09 = 0.0 - b_09; /** Internal weights for stage 15, element 10. */ private static final double k15_10 = 0.0 - b_10; /** Internal weights for stage 15, element 11. */ private static final double k15_11 = -2538710946863.0 / 23431227861250000.0 - b_11; /** Internal weights for stage 15, element 12. */ private static final double k15_12 = 8824659001.0 / 23066716781250.0 - b_12; /** Internal weights for stage 15, element 13. */ private static final double k15_13 = -11518334563.0 / 33831184612500.0; /** Internal weights for stage 15, element 14. */ private static final double k15_14 = 1912306948.0 / 13532473845.0; /** Time step for stage 16 (interpolation only). */ private static final double c16 = 7.0 / 9.0; /** Internal weights for stage 16, element 1. */ private static final double k16_01 = -13613986967.0 / 31741908048.0 - b_01; // elements 2 to 5 are zero, so they are neither stored nor used /** Internal weights for stage 16, element 6. */ private static final double k16_06 = -4755612631.0 / 1012344804.0 - b_06; /** Internal weights for stage 16, element 7. */ private static final double k16_07 = 42939257944576.0 / 5588559685701.0 - b_07; /** Internal weights for stage 16, element 8. */ private static final double k16_08 = 77881972900277.0 / 19140370552944.0 - b_08; /** Internal weights for stage 16, element 9. */ private static final double k16_09 = 22719829234375.0 / 63689648654052.0 - b_09; /** Internal weights for stage 16, element 10. */ private static final double k16_10 = 0.0 - b_10; /** Internal weights for stage 16, element 11. */ private static final double k16_11 = 0.0 - b_11; /** Internal weights for stage 16, element 12. */ private static final double k16_12 = 0.0 - b_12; /** Internal weights for stage 16, element 13. */ private static final double k16_13 = -1199007803.0 / 857031517296.0; /** Internal weights for stage 16, element 14. */ private static final double k16_14 = 157882067000.0 / 53564469831.0; /** Internal weights for stage 16, element 15. */ private static final double k16_15 = -290468882375.0 / 31741908048.0; /** Interpolation weights. * (beware that only the non-null values are in the table) */ private static final double[][] d = { { -17751989329.0 / 2106076560.0, 4272954039.0 / 7539864640.0, -118476319744.0 / 38604839385.0, 755123450731.0 / 316657731600.0, 3692384461234828125.0 / 1744130441634250432.0, -4612609375.0 / 5293382976.0, 2091772278379.0 / 933644586600.0, 2136624137.0 / 3382989120.0, -126493.0 / 1421424.0, 98350000.0 / 5419179.0, -18878125.0 / 2053168.0, -1944542619.0 / 438351368.0}, { 32941697297.0 / 3159114840.0, 456696183123.0 / 1884966160.0, 19132610714624.0 / 115814518155.0, -177904688592943.0 / 474986597400.0, -4821139941836765625.0 / 218016305204281304.0, 30702015625.0 / 3970037232.0, -85916079474274.0 / 2800933759800.0, -5919468007.0 / 634310460.0, 2479159.0 / 157936.0, -18750000.0 / 602131.0, -19203125.0 / 2053168.0, 15700361463.0 / 438351368.0}, { 12627015655.0 / 631822968.0, -72955222965.0 / 188496616.0, -13145744952320.0 / 69488710893.0, 30084216194513.0 / 56998391688.0, -296858761006640625.0 / 25648977082856624.0, 569140625.0 / 82709109.0, -18684190637.0 / 18672891732.0, 69644045.0 / 89549712.0, -11847025.0 / 4264272.0, -978650000.0 / 16257537.0, 519371875.0 / 6159504.0, 5256837225.0 / 438351368.0}, { -450944925.0 / 17550638.0, -14532122925.0 / 94248308.0, -595876966400.0 / 2573655959.0, 188748653015.0 / 527762886.0, 2545485458115234375.0 / 27252038150535163.0, -1376953125.0 / 36759604.0, 53995596795.0 / 518691437.0, 210311225.0 / 7047894.0, -1718875.0 / 39484.0, 58000000.0 / 602131.0, -1546875.0 / 39484.0, -1262172375.0 / 8429834.0} }; /** Serializable version identifier */ private static final long serialVersionUID = 7152276390558450974L; }

The table below shows all metrics for DormandPrince853StepInterpolator.java.

MetricValueDescription
BLOCKS29.00Number of blocks
BLOCK_COMMENT16.00Number of block comment lines
COMMENTS152.00Comment lines
COMMENT_DENSITY 0.78Comment density
COMPARISONS16.00Number of comparison operators
CYCLOMATIC27.00Cyclomatic complexity
DECL_COMMENTS61.00Comments in declarations
DOC_COMMENT122.00Number of javadoc comment lines
ELOC195.00Effective lines of code
EXEC_COMMENTS10.00Comments in executable code
EXITS 8.00Procedure exits
FUNCTIONS 9.00Number of function declarations
HALSTEAD_DIFFICULTY65.79Halstead difficulty
HALSTEAD_EFFORT 0.00Halstead effort
INTERFACE_COMPLEXITY33.00Interface complexity
JAVA0001 0.00JAVA0001 Package name does not contain only lower case letters
JAVA0002 0.00JAVA0002 Package name does not begin with a top level domain name or country code
JAVA0003 0.00JAVA0003 Minimize use of on-demand (.*) imports
JAVA0004 0.00JAVA0004 Unnecessary import from java.lang
JAVA0005 1.00JAVA0005 Imports not in specified order
JAVA0006 0.00JAVA0006 Empty finally block
JAVA0007 0.00JAVA0007 Should not declare public field
JAVA0008 0.00JAVA0008 Empty catch block
JAVA0009 0.00JAVA0009 Protected member in final class
JAVA0010 0.00JAVA0010 Non-instantiable class does not contain a non-private static member
JAVA0011 0.00JAVA0011 Abstract class does not contain an abstract method
JAVA0012 0.00JAVA0012 Non-constructor method with same name as declaring class
JAVA0013 0.00JAVA0013 Non-blank final field is not static
JAVA0014 0.00JAVA0014 Class with only static members has non-private constructor
JAVA0015 0.00JAVA0015 Package class contains public nested type
JAVA0016 0.00JAVA0016 Abstract class contains public constructor
JAVA0017 0.00JAVA0017 Class name does not have required form
JAVA0018 0.00JAVA0018 Method name does not have required form
JAVA0019 0.00JAVA0019 Interface name does not have required form
JAVA0020 0.00JAVA0020 Field name does not have required form
JAVA0021 0.00JAVA0021 Interface method name does not have required form
JAVA0022 0.00JAVA0022 Static final field name does not have required form
JAVA0023 0.00JAVA0023 Empty finalize method
JAVA0024 0.00JAVA0024 Empty class
JAVA0025 0.00JAVA0025 Method override is empty
JAVA0026 0.00JAVA0026 Finalize method with parameters
JAVA0029 0.00JAVA0029 Private method not used
JAVA0030 0.00JAVA0030 Private field not used
JAVA0031 0.00JAVA0031 Case statement not properly closed
JAVA0032 0.00JAVA0032 Switch statement missing default
JAVA0033 0.00JAVA0033 default: not last case in switch statement
JAVA0034 0.00JAVA0034 Missing braces in if statement
JAVA0035 0.00JAVA0035 Missing braces in for statement
JAVA0036 0.00JAVA0036 Missing braces in while statement
JAVA0038 0.00JAVA0038 Non-case label in switch statement
JAVA0039 0.00JAVA0039 Break statement with label
JAVA0040 0.00JAVA0040 Switch statement contains N cases (maximum: M)
JAVA0041 0.00JAVA0041 Nested synchronized block
JAVA0042 0.00JAVA0042 Empty synchronized statement
JAVA0043 0.00JAVA0043 Inner class does not use outer class
JAVA0044 0.00JAVA0044 Serializable class with no instance variables
JAVA0045 0.00JAVA0045 Serializable class with only transient fields
JAVA0046 0.00JAVA0046 Name of class not derived from Exception ends with 'Exception'
JAVA0047 0.00JAVA0047 Serializable class derives from invalid base class
JAVA0048 0.00JAVA0048 Name of class derived from Exception does not end with 'Exception'
JAVA0049 0.00JAVA0049 Nested block at depth N (maximum: M)
JAVA0050 0.00JAVA0050 Class derives from java.lang.Error
JAVA0051 0.00JAVA0051 Class derives from java.lang.RuntimeException
JAVA0052 0.00JAVA0052 Class derives from java.lang.Throwable
JAVA0053 0.00JAVA0053 Unused label
JAVA0054 0.00JAVA0054 Inheritance depth N exceeds maximum M
JAVA0055 0.00JAVA0055 Class should be interface
JAVA0056 0.00JAVA0056 Unnecessary abstract modifier for interface or annotation
JAVA0057 0.00JAVA0057 Unnecessary default constructor
JAVA0058 1.00JAVA0058 Constructor calls super()
JAVA0059 0.00JAVA0059 Method override only calls super()
JAVA0061 0.00JAVA0061 Inaccessible member in anonymous class
JAVA0062 0.00JAVA0062 Public class missing public member or protected constructor
JAVA0063 0.00JAVA0063 Identifier name should not contain '$'
JAVA0064 0.00JAVA0064 N variations of identifier name (maximum: M)
JAVA0065 0.00JAVA0065 Unnecessary final modifier for method in final class
JAVA0066 0.00JAVA0066 Unnecessary modifier for interface nested type
JAVA0067 0.00JAVA0067 Array descriptor on identifier name
JAVA0068 0.00JAVA0068 Modifiers not declared in recommended order
JAVA0071 0.00JAVA0071 Strings compared with ==
JAVA0073 0.00JAVA0073 Integer division in floating-point context
JAVA0074 0.00JAVA0074 Use of Object.notify()
JAVA0075 2.00JAVA0075 Method parameter hides field
JAVA007646.00JAVA0076 Use of magic number
JAVA0077 0.00JAVA0077 Private field not used in declaring class
JAVA0078 0.00JAVA0078 Floating point values compared with ==
JAVA0079 0.00JAVA0079 Use of instance to reference static member
JAVA0080 0.00JAVA0080 Import declaration not used
JAVA0081 0.00JAVA0081 Boolean literal in comparison
JAVA0082 0.00JAVA0082 Unnecessary widening cast
JAVA0083 0.00JAVA0083 Unnecessary instanceof test
JAVA0084 0.00JAVA0084 Should use compound assignment operator
JAVA0085 0.00JAVA0085 Use of sun.* class
JAVA0087 0.00JAVA0087 Use of Thread.sleep()
JAVA0089 0.00JAVA0089 Use of restricted package
JAVA0092 0.00JAVA0092 Use of restricted type
JAVA0093 0.00JAVA0093 Redundant assignment
JAVA0094 0.00JAVA0094 Field hides a superclass field
JAVA0095 0.00JAVA0095 Uninitialized private field
JAVA0096 0.00JAVA0096 Field in nested class hides outer field
JAVA0098 0.00JAVA0098 Minimize use of implicit field initializers
JAVA0100 0.00JAVA0100 Class contains N non-final fields (maximum: M)
JAVA0101 0.00JAVA0101 Unnecessary modifier for field in interface
JAVA0102 0.00JAVA0102 Last statement in finalize() not super.finalize()
JAVA0103 0.00JAVA0103 Explicit call to finalize()
JAVA0104 0.00JAVA0104 finalize() only calls super.finalize()
JAVA0105 0.00JAVA0105 Duplicate import declaration
JAVA0106 0.00JAVA0106 Unnecessary import from current package
JAVA0108 0.00JAVA0108 Incorrect javadoc: no @param tag for 'parameter'
JAVA0109 0.00JAVA0109 Incorrect javadoc: no parameter 'parameter'
JAVA0110 0.00JAVA0110 Incorrect javadoc: no @return tag
JAVA0111 0.00JAVA0111 Incorrect javadoc: @return tag for void method
JAVA0112 0.00JAVA0112 Incorrect javadoc: no exception 'exception' in throws
JAVA0113 1.00JAVA0113 Incorrect javadoc: no @author tag
JAVA0114 0.00JAVA0114 Incorrect javadoc: no @version tag
JAVA0115 0.00JAVA0115 Incorrect javadoc: no @throws or @exception tag for 'exception'
JAVA0116 0.00JAVA0116 Missing javadoc: field 'field'
JAVA0117 0.00JAVA0117 Missing javadoc: method 'method'
JAVA0118 0.00JAVA0118 Missing javadoc: type 'type'
JAVA0119 0.00JAVA0119 Control variable changed within body of for loop
JAVA0123 0.00JAVA0123 Use all three components of for loop
JAVA0125 0.00JAVA0125 Continue statement with label
JAVA0126 0.00JAVA0126 Method declares unchecked exception in throws
JAVA0128 2.00JAVA0128 Public constructor in non-public class
JAVA0130 0.00JAVA0130 Non-static method does not use instance fields
JAVA0131 0.00JAVA0131 Compatible method does not override base
JAVA0132 0.00JAVA0132 Method overload with compatible signature
JAVA0133 0.00JAVA0133 Non-synchronized method overrides synchronized method
JAVA0135 0.00JAVA0135 Only one of Object.equals and Object.hashCode defined: missing 'method'
JAVA0136 0.00JAVA0136 N methods defined in class (maximum: M)
JAVA0137 0.00JAVA0137 Non-abstract class missing constructor
JAVA0138 0.00JAVA0138 N parameters defined for method (maximum: M)
JAVA0139 0.00JAVA0139 Definition of main other than public static void main(java.lang.String[])
JAVA0141 0.00JAVA0141 Unnecessary modifier for method in interface
JAVA0143 0.00JAVA0143 Synchronized method
JAVA0144 0.00JAVA0144 Line exceeds maximum M characters
JAVA0145 0.00JAVA0145 Tab character used in source file
JAVA0150 0.00JAVA0150 java.lang.Error (or subclass) thrown
JAVA0153 0.00JAVA0153 Inefficient conversion of integer to string
JAVA0159 0.00JAVA0159 Inefficient conversion of string to integer
JAVA0160 0.00JAVA0160 Method does not throw specified exception
JAVA0161 0.00JAVA0161 Conditional wait() not in loop
JAVA0163 0.00JAVA0163 Empty statement
JAVA0165 0.00JAVA0165 Conflicting return statement in finally block
JAVA0166 0.00JAVA0166 Generic exception caught
JAVA0167 0.00JAVA0167 ThreadDeath not rethrown
JAVA0169 0.00JAVA0169 Unnecessary catch block: exception 'exception'
JAVA0170 0.00JAVA0170 Caught exception not derived from java.lang.Exception
JAVA0171 0.00JAVA0171 Unused local variable
JAVA0173 0.00JAVA0173 Unused method parameter
JAVA0174 0.00JAVA0174 Assigned local variable never used
JAVA0175 0.00JAVA0175 Successive assignment to variable
JAVA0176 0.00JAVA0176 Local variable name does not have required form
JAVA0177 1.00JAVA0177 Variable declaration missing initializer
JAVA0179 0.00JAVA0179 Local variable hides visible field
JAVA0233 0.00JAVA0233 Definition of serialVersionUID other than 'private static final long serialVersionUID'
JAVA0234 0.00JAVA0234 Class is Serializable but does not define serialVersionUID
JAVA0235 0.00JAVA0235 Class defines serialVersionUID but does not implement Serializable
JAVA0236 0.00JAVA0236 Attempt to clone an object which does not implement Cloneable
JAVA0237 0.00JAVA0237 Class implements Cloneable but does not have public clone method
JAVA0238 0.00JAVA0238 Clone method does not call super.clone()
JAVA0239 0.00JAVA0239 Class declares 'readObject' or 'writeObject' but does not implement Serializable
JAVA0240 0.00JAVA0240 Serializable class which declares readObject or writeObject but not both
JAVA0241 0.00JAVA0241 'readObject' or 'writeObject' should be declared private in Serializable class
JAVA0242 0.00JAVA0242 Transient field in non-Serializable class
JAVA0243 0.00JAVA0243 'readResolve' or 'writeReplace' should be declared private or protected
JAVA0244 0.00JAVA0244 Field or method name in subclass differs only by case from inherited field or method
JAVA0245 0.00JAVA0245 JUnit TestCase with non-trivial constructor
JAVA0246 0.00JAVA0246 JUnit assertXXX statement missing message parameter
JAVA0247 0.00JAVA0247 JUnit 'setUp()' and 'tearDown()' should call super method
JAVA0248 0.00JAVA0248 JUnit method 'setUp' or 'tearDown' with incorrect signature
JAVA0249 0.00JAVA0249 JUnit TestCase 'suite()' should be declared static
JAVA0250 0.00JAVA0250 JUnit TestCase declares testXXX method with incorrect signature
JAVA0251 0.00JAVA0251 Use '%n' for line breaks in printf/format for platform independence
JAVA0252 0.00JAVA0252 'enum' is a Java 1.5 reserved word
JAVA0253 0.00JAVA0253 Not all enum constants consumed in switch statement
JAVA0254 0.00JAVA0254 Use enhanced for loop construct instead of Iterator
JAVA0255 0.00JAVA0255 Result of method invocation not used
JAVA0256 0.00JAVA0256 Assignment of external collection/array to field
JAVA0257 0.00JAVA0257 Use of 'Constant Interface' anti-pattern
JAVA0258 0.00JAVA0258 Implement Iterable for foreach compatibility
JAVA0259 0.00JAVA0259 Return of collection/array field
JAVA0260 0.00JAVA0260 Use 'enum' instead of Enumerated Type pattern
JAVA0261 0.00JAVA0261 Use specialized Enum collection types
JAVA0262 0.00JAVA0262 Use of char in integer context
JAVA0263 0.00JAVA0263 Long literal ends with 'l' instead of 'L'
JAVA0264 0.00JAVA0264 Integer math in long context - check for overflow
JAVA0265 0.00JAVA0265 Use of Throwable.printStackTrace()
JAVA0266 0.00JAVA0266 Use of System.out
JAVA0267 0.00JAVA0267 Use of System.err
JAVA0269 0.00JAVA0269 Contents of StringBuffer never used
JAVA0270 0.00JAVA0270 Use Java 5.0 enhanced for loop construct to iterate over all elements in an array
JAVA0271 0.00JAVA0271 Minimize use of on-demand (.*) static imports
JAVA0272 0.00JAVA0272 Thread.run() called
JAVA0273 0.00JAVA0273 Non-final derivative of Thread calls start() in constructor
JAVA0274 0.00JAVA0274 Serializable class has a synchronized readObject()
JAVA0275 0.00JAVA0275 Serializable class has a synchronized writeObject() and no other synchronized methods
JAVA0276 0.00JAVA0276 Unnecessary use of String constructor
JAVA0277 0.00JAVA0277 Iterator.next() implementation does not throw NoSuchElementException
JAVA0278 0.00JAVA0278 Unnecessary use of Boolean constructor
JAVA0279 0.00JAVA0279 Serialization method readObject or readObjectNoData calls an overridable method
JAVA0280 0.00JAVA0280 IllegalMonitorStateException caught
JAVA0281 0.00JAVA0281 Iterator.next() not called in loop
JAVA0282 0.00JAVA0282 Call to Iterator.next() in loop which does not test Iterator.hasNext()
JAVA0283 0.00JAVA0283 Control variable not updated in loop body
JAVA0284 0.00JAVA0284 Explicit garbage collection
JAVA0285 0.00JAVA0285 Dereference of potentially null variable
JAVA0286 0.00JAVA0286 Dereference of null variable
JAVA0287 0.00JAVA0287 Unnecessary null check
JAVA0288 0.00JAVA0288 Inconsistent null check
LINES484.00Number of lines in the source file
LINE_COMMENT14.00Number of line comments
LOC223.00Lines of code
LOGICAL_LINES140.00Number of statements
LOOPS13.00Number of loops
NEST_DEPTH 4.00Maximum nesting depth
OPERANDS841.00Number of operands
OPERATORS1596.00Number of operators
PARAMS10.00Number of formal parameter declarations
PROGRAM_LENGTH2437.00Halstead program length
PROGRAM_VOCAB340.00Halstead program vocabulary
PROGRAM_VOLUME 0.00Halstead program volume
RETURNS23.00Number of return points from functions
SIZE18758.00Size of the file in bytes
UNIQUE_OPERANDS294.00Number of unique operands
UNIQUE_OPERATORS46.00Number of unique operators
WHITESPACE109.00Number of whitespace lines