/home/tomcat/temp/ks-1.1-perf/ks-common/ks-common-test/target/classes/home/tomcat/.m2/repository/org/apache/maven/reporting/maven-reporting-impl/2.0/maven-reporting-impl-2.0.jar/home/tomcat/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.1/plexus-utils-1.5.1.jar/home/tomcat/.m2/repository/commons-validator/commons-validator/1.1.4/commons-validator-1.1.4.jar/home/tomcat/.m2/repository/oro/oro/2.0.7/oro-2.0.7.jar/home/tomcat/.m2/repository/doxia/doxia-core/1.0-alpha-4/doxia-core-1.0-alpha-4.jar/home/tomcat/.m2/repository/org/apache/maven/shared/maven-doxia-tools/1.0/maven-doxia-tools-1.0.jar/home/tomcat/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.jar/home/tomcat/.m2/repository/org/apache/maven/doxia/doxia-decoration-model/1.0-alpha-11/doxia-decoration-model-1.0-alpha-11.jar/home/tomcat/.m2/repository/org/codehaus/plexus/plexus-i18n/1.0-beta-7/plexus-i18n-1.0-beta-7.jar/home/tomcat/.m2/repository/com/google/code/findbugs/findbugs-ant/1.3.9/findbugs-ant-1.3.9.jar/home/tomcat/.m2/repository/com/google/code/findbugs/findbugs/1.3.9/findbugs-1.3.9.jar/home/tomcat/.m2/repository/com/google/code/findbugs/bcel/1.3.9/bcel-1.3.9.jar/home/tomcat/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar/home/tomcat/.m2/repository/com/google/code/findbugs/jFormatString/1.3.9/jFormatString-1.3.9.jar/home/tomcat/.m2/repository/com/google/code/findbugs/annotations/1.3.9/annotations-1.3.9.jar/home/tomcat/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar/home/tomcat/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar/home/tomcat/.m2/repository/jaxen/jaxen/1.1.1/jaxen-1.1.1.jar/home/tomcat/.m2/repository/jdom/jdom/1.0/jdom-1.0.jar/home/tomcat/.m2/repository/xerces/xercesImpl/2.6.2/xercesImpl-2.6.2.jar/home/tomcat/.m2/repository/xom/xom/1.0/xom-1.0.jar/home/tomcat/.m2/repository/xerces/xmlParserAPIs/2.6.2/xmlParserAPIs-2.6.2.jar/home/tomcat/.m2/repository/xalan/xalan/2.6.0/xalan-2.6.0.jar/home/tomcat/.m2/repository/com/ibm/icu/icu4j/2.6.1/icu4j-2.6.1.jar/home/tomcat/.m2/repository/asm/asm/3.1/asm-3.1.jar/home/tomcat/.m2/repository/asm/asm-analysis/3.1/asm-analysis-3.1.jar/home/tomcat/.m2/repository/asm/asm-tree/3.1/asm-tree-3.1.jar/home/tomcat/.m2/repository/asm/asm-commons/3.1/asm-commons-3.1.jar/home/tomcat/.m2/repository/asm/asm-util/3.1/asm-util-3.1.jar/home/tomcat/.m2/repository/asm/asm-xml/3.1/asm-xml-3.1.jar/home/tomcat/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar/home/tomcat/.m2/repository/jgoodies/plastic/1.2.0/plastic-1.2.0.jar/home/tomcat/.m2/repository/org/codehaus/groovy/maven/gmaven-mojo/1.0-rc-3/gmaven-mojo-1.0-rc-3.jar/home/tomcat/.m2/repository/org/codehaus/groovy/maven/runtime/gmaven-runtime-api/1.0-rc-3/gmaven-runtime-api-1.0-rc-3.jar/home/tomcat/.m2/repository/org/codehaus/groovy/maven/feature/gmaven-feature-api/1.0-rc-3/gmaven-feature-api-1.0-rc-3.jar/home/tomcat/.m2/repository/org/codehaus/groovy/maven/runtime/gmaven-runtime-default/1.0-rc-3/gmaven-runtime-default-1.0-rc-3.jar/home/tomcat/.m2/repository/org/slf4j/slf4j-api/1.5.0/slf4j-api-1.5.0.jar/home/tomcat/.m2/repository/org/codehaus/groovy/maven/runtime/gmaven-runtime-1.5/1.0-rc-3/gmaven-runtime-1.5-1.0-rc-3.jar/home/tomcat/.m2/repository/org/codehaus/groovy/maven/feature/gmaven-feature-support/1.0-rc-3/gmaven-feature-support-1.0-rc-3.jar/home/tomcat/.m2/repository/org/codehaus/groovy/maven/runtime/gmaven-runtime-support/1.0-rc-3/gmaven-runtime-support-1.0-rc-3.jar/home/tomcat/.m2/repository/org/codehaus/groovy/maven/gmaven-common/1.0-rc-3/gmaven-common-1.0-rc-3.jar/home/tomcat/.m2/repository/com/thoughtworks/qdox/qdox/1.6.3/qdox-1.6.3.jar/home/tomcat/.m2/repository/org/codehaus/groovy/groovy-all-minimal/1.5.6/groovy-all-minimal-1.5.6.jar/home/tomcat/.m2/repository/org/apache/ant/ant/1.7.1/ant-1.7.1.jar/home/tomcat/.m2/repository/org/apache/ant/ant-launcher/1.7.1/ant-launcher-1.7.1.jar/home/tomcat/.m2/repository/jline/jline/0.9.94/jline-0.9.94.jar/home/tomcat/.m2/repository/org/codehaus/plexus/plexus-resources/1.0-alpha-4/plexus-resources-1.0-alpha-4.jar/opt/java/apache-maven-2.2.1/lib/maven-2.2.1-uber.jar/home/tomcat/.m2/repository/org/kuali/student/common/ks-common-util/1.1.0-SNAPSHOT/ks-common-util-1.1.0-SNAPSHOT.jar/home/tomcat/.m2/repository/javax/persistence/persistence-api/1.0/persistence-api-1.0.jar/home/tomcat/.m2/repository/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar/home/tomcat/.m2/repository/net/sf/ehcache/ehcache/1.4.1/ehcache-1.4.1.jar/home/tomcat/.m2/repository/net/sf/jsr107cache/jsr107cache/1.0/jsr107cache-1.0.jar/home/tomcat/.m2/repository/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar/home/tomcat/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar/home/tomcat/.m2/repository/commons-collections/commons-collections/3.2/commons-collections-3.2.jar/home/tomcat/.m2/repository/org/slf4j/slf4j-api/1.6.0/slf4j-api-1.6.0.jar/home/tomcat/.m2/repository/org/slf4j/slf4j-log4j12/1.6.0/slf4j-log4j12-1.6.0.jar/home/tomcat/.m2/repository/log4j/log4j/1.2.14/log4j-1.2.14.jar/home/tomcat/.m2/repository/org/springframework/spring-core/2.5.6/spring-core-2.5.6.jar/home/tomcat/.m2/repository/org/springframework/spring-aop/2.5.6/spring-aop-2.5.6.jar/home/tomcat/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar/home/tomcat/.m2/repository/org/springframework/spring-beans/2.5.6/spring-beans-2.5.6.jar/home/tomcat/.m2/repository/org/springframework/spring-orm/2.5.6/spring-orm-2.5.6.jar/home/tomcat/.m2/repository/org/springframework/spring-context/2.5.6/spring-context-2.5.6.jar/home/tomcat/.m2/repository/org/springframework/spring-tx/2.5.6/spring-tx-2.5.6.jar/home/tomcat/.m2/repository/org/springframework/spring-webmvc/2.5.6/spring-webmvc-2.5.6.jar/home/tomcat/.m2/repository/org/springframework/spring-context-support/2.5.6/spring-context-support-2.5.6.jar/home/tomcat/.m2/repository/org/springframework/spring-web/2.5.6/spring-web-2.5.6.jar/home/tomcat/.m2/repository/org/aspectj/aspectjrt/1.5.4/aspectjrt-1.5.4.jar/home/tomcat/.m2/repository/org/apache/velocity/velocity-tools/2.0/velocity-tools-2.0.jar/home/tomcat/.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar/home/tomcat/.m2/repository/commons-digester/commons-digester/1.8/commons-digester-1.8.jar/home/tomcat/.m2/repository/commons-chain/commons-chain/1.1/commons-chain-1.1.jar/home/tomcat/.m2/repository/commons-validator/commons-validator/1.3.1/commons-validator-1.3.1.jar/home/tomcat/.m2/repository/oro/oro/2.0.8/oro-2.0.8.jar/home/tomcat/.m2/repository/sslext/sslext/1.2-0/sslext-1.2-0.jar/home/tomcat/.m2/repository/org/apache/struts/struts-core/1.3.8/struts-core-1.3.8.jar/home/tomcat/.m2/repository/antlr/antlr/2.7.7/antlr-2.7.7.jar/home/tomcat/.m2/repository/org/apache/struts/struts-taglib/1.3.8/struts-taglib-1.3.8.jar/home/tomcat/.m2/repository/org/apache/struts/struts-tiles/1.3.8/struts-tiles-1.3.8.jar/home/tomcat/.m2/repository/org/apache/velocity/velocity/1.6.4/velocity-1.6.4.jar/home/tomcat/.m2/repository/commons-lang/commons-lang/2.3/commons-lang-2.3.jar/home/tomcat/.m2/repository/logkit/logkit/2.0/logkit-2.0.jar/home/tomcat/.m2/repository/org/antlr/antlr-runtime/3.1.1/antlr-runtime-3.1.1.jar/home/tomcat/.m2/repository/junit/junit/4.4/junit-4.4.jar/home/tomcat/.m2/repository/org/mortbay/jetty/jetty/6.1.6/jetty-6.1.6.jar/home/tomcat/.m2/repository/org/mortbay/jetty/jetty-util/6.1.6/jetty-util-6.1.6.jar/home/tomcat/.m2/repository/org/mortbay/jetty/servlet-api-2.5/6.1.6/servlet-api-2.5-6.1.6.jar/home/tomcat/.m2/repository/org/eclipse/persistence/eclipselink/1.0/eclipselink-1.0.jar/home/tomcat/.m2/repository/org/apache/openjpa/openjpa/1.2.1/openjpa-1.2.1.jar/home/tomcat/.m2/repository/net/sourceforge/serp/serp/1.13.1/serp-1.13.1.jar/home/tomcat/.m2/repository/commons-pool/commons-pool/1.3/commons-pool-1.3.jar/home/tomcat/.m2/repository/org/apache/geronimo/specs/geronimo-jms_1.1_spec/1.0.1/geronimo-jms_1.1_spec-1.0.1.jar/home/tomcat/.m2/repository/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1/geronimo-jta_1.1_spec-1.1.jar/home/tomcat/.m2/repository/org/apache/geronimo/specs/geronimo-jpa_3.0_spec/1.0/geronimo-jpa_3.0_spec-1.0.jar/home/tomcat/.m2/repository/com/atomikos/transactions-jta/3.4.1/transactions-jta-3.4.1.jar/home/tomcat/.m2/repository/com/atomikos/transactions-jdbc/3.4.1/transactions-jdbc-3.4.1.jar/home/tomcat/.m2/repository/com/atomikos/transactions-api/3.4.1/transactions-api-3.4.1.jar/home/tomcat/.m2/repository/com/atomikos/transactions/3.4.1/transactions-3.4.1.jar/home/tomcat/.m2/repository/com/atomikos/atomikos-util/3.4.1/atomikos-util-3.4.1.jar/home/tomcat/.m2/repository/org/springframework/spring-jdbc/2.5.6/spring-jdbc-2.5.6.jar/home/tomcat/.m2/repository/org/springframework/spring-test/2.5.6/spring-test-2.5.6.jar/home/tomcat/.m2/repository/org/springframework/spring-aspects/2.5.6/spring-aspects-2.5.6.jar/home/tomcat/.m2/repository/org/aspectj/aspectjweaver/1.6.1/aspectjweaver-1.6.1.jar/home/tomcat/temp/ks-1.1-perf/ks-common/ks-common-test/src/main/java/home/tomcat/temp/ks-1.1-perf/ks-common/ks-common-test/targetException is caught when Exception is not thrownException is caught when Exception is not thrown in org.kuali.student.common.test.spring.LoadDataBean.loadData()At LoadDataBean.java:[lines 38-159]In class org.kuali.student.common.test.spring.LoadDataBeanIn method org.kuali.student.common.test.spring.LoadDataBean.loadData()At LoadDataBean.java:[line 109]Exception is caught when Exception is not thrownException is caught when Exception is not thrown in org.kuali.student.common.test.spring.ServiceTestClassRunner.createTest()At ServiceTestClassRunner.java:[lines 43-259]In class org.kuali.student.common.test.spring.ServiceTestClassRunnerIn method org.kuali.student.common.test.spring.ServiceTestClassRunner.createTest()At ServiceTestClassRunner.java:[line 106]Method concatenates strings using + in a loopMethod org.kuali.student.common.test.spring.ServiceTestClassRunner.startServer() concatenates strings using + in a loopAt ServiceTestClassRunner.java:[lines 43-259]In class org.kuali.student.common.test.spring.ServiceTestClassRunnerIn method org.kuali.student.common.test.spring.ServiceTestClassRunner.startServer()At ServiceTestClassRunner.java:[line 175]DodgyPerformanceMethod concatenates strings using + in a loop
<p> The method seems to be building a String using concatenation in a loop. In each iteration, the String is converted to a StringBuffer/StringBuilder, appended to, and converted back to a String. This can lead to a cost quadratic in the number of iterations, as the growing string is recopied in each iteration. </p> <p>Better performance can be obtained by using a StringBuffer (or StringBuilder in Java 1.5) explicitly.</p> <p> For example:</p> <pre> // This is bad String s = ""; for (int i = 0; i &lt; field.length; ++i) { s = s + field[i]; } // This is better StringBuffer buf = new StringBuffer(); for (int i = 0; i &lt; field.length; ++i) { buf.append(field[i]); } String s = buf.toString(); </pre>
Exception is caught when Exception is not thrown
<p> This method uses a try-catch block that catches Exception objects, but Exception is not thrown within the try block, and RuntimeException is not explicitly caught. It is a common bug pattern to say try { ... } catch (Exception e) { something } as a shorthand for catching a number of types of exception each of whose catch blocks is identical, but this construct also accidentally catches RuntimeException as well, masking potential bugs. </p>
String concatenation in loop using + operatorRuntimeException capture