ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d binderman <dcb...@hotmail.com>
Subject apache-ant-1.7.0: 115 * Java source code bugs
Date Thu, 11 Sep 2008 09:16:07 GMT



Hello there,

I just tried to analyse the package apache-ant-1.7.0 with the most
excellent Java static analysis tool pmd.

A subset of the results were

/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/DefaultLogger.java:249
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/input/DefaultInputHandler.java:107
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/Location.java:139	Avoid
appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/Main.java:1032	Avoid
appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java:423
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/AntStructure.java:285
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/AntStructure.java:292
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/AntStructure.java:314
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/AntStructure.java:322
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/AntStructure.java:324
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/AntStructure.java:327
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/AntStructure.java:342
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/AntStructure.java:346
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/AntStructure.java:359
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/AntStructure.java:399
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/Checksum.java:577
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/compilers/AptCompilerAdapter.java:141
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java:405
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/Copy.java:998
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/Javadoc.java:1487
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/KeySubst.java:192
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/MacroInstance.java:206
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/optional/Cab.java:254
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/optional/Cab.java:256
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/optional/Cab.java:256
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbc.java:412
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java:501
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java:505
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java:537
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/optional/extension/LibraryDisplayer.java:142
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/DefaultJspCompilerAdapter.java:54
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java:966
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java:1901
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java:769
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Add.java:123
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Change.java:109
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Fstat.java:142
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java:500
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java:504
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/RecorderEntry.java:202
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java:272
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/SQLExec.java:512
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/SQLExec.java:515
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/SQLExec.java:524
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/SQLExec.java:647
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/SQLExec.java:664
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/Commandline.java:564
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/Commandline.java:601
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/Commandline.java:603
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/Commandline.java:605
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/Commandline.java:605
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/Environment.java:118
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/PatternSet.java:127
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/PropertySet.java:464
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/selectors/AndSelector.java:46
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/selectors/ContainsRegexpSelector.java:61
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/selectors/ContainsSelector.java:72
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/selectors/DateSelector.java:82
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/selectors/DependSelector.java:60
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/selectors/DepthSelector.java:64
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/selectors/FilenameSelector.java:69
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/selectors/MajoritySelector.java:53
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ChecksumAlgorithm.java:146
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/selectors/modifiedselector/DigestAlgorithm.java:175
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/selectors/modifiedselector/DigestAlgorithm.java:199
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ModifiedSelector.java:798
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/selectors/modifiedselector/PropertiesfileCache.java:233
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/selectors/NoneSelector.java:47
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/selectors/NotSelector.java:56
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/selectors/OrSelector.java:46
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/selectors/PresentSelector.java:72
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/selectors/SelectSelector.java:62
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/selectors/SelectSelector.java:64
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/selectors/SizeSelector.java:63
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/selectors/TypeSelector.java:51
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/util/DateUtils.java:211
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/util/DateUtils.java:215
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/util/FileUtils.java:1127
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/util/regexp/JakartaOroRegexp.java:59
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexp.java:72
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/types/mappers/MapperResult.java:86
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/types/selectors/BaseSelectorTest.java:201
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/types/selectors/ModifiedSelectorTest.java:654
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/types/selectors/ModifiedSelectorTest.java:655
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/types/selectors/ModifiedSelectorTest.java:657
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/types/selectors/ModifiedSelectorTest.java:658
Avoid appending characters as strings in StringBuffer.append.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/Main.java:812	StringBuffer
constructor is initialized with size 16, but has at least 1870 characters appended.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java:742
StringBuffer constructor is initialized with size 16, but has at least 19 characters appended.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java:774
StringBuffer constructor is initialized with size 16, but has at least 25 characters appended.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ChecksumAlgorithm.java:143
StringBuffer constructor is initialized with size 16, but has at least 30 characters appended.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/selectors/modifiedselector/DigestAlgorithm.java:195
StringBuffer constructor is initialized with size 16, but has at least 38 characters appended.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/util/regexp/RegexpMatcherTest.java:155
StringBuffer constructor is initialized with size 16, but has at least 38 characters appended.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/selectors/modifiedselector/PropertiesfileCache.java:229
StringBuffer constructor is initialized with size 16, but has at least 45 characters appended.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/ComponentHelper.java:833
StringBuffer constructor is initialized with size 16, but has at least 62 characters appended.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java:495
StringBuffer constructor is initialized with size 16, but has at least 63 characters appended.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/GenerateKey.java:334
StringBuffer constructor is initialized with size 16, but has at least 64 characters appended.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/rmic/KaffeRmic.java:53
StringBuffer constructor is initialized with size 16, but has at least 94 characters appended.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java:403
StringBuffer constructor is initialized with size 20, but has at least 25 characters appended.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/DefaultJspCompilerAdapter.java:52
StringBuffer constructor is initialized with size 20, but has at least 25 characters appended.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java:269
StringBuffer constructor is initialized with size 20, but has at least 25 characters appended.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java:455
StringBuffer constructor is initialized with size 21, but has at least 23 characters appended.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/AntStructure.java:330
StringBuffer constructor is initialized with size 26, but has at least 61 characters appended.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/optional/junit/BriefJUnitResultFormatter.java:130
StringBuffer constructor is initialized with size 27, but has at least 53 characters appended.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/optional/junit/PlainJUnitResultFormatter.java:118
StringBuffer constructor is initialized with size 27, but has at least 53 characters appended.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/optional/junit/SummaryJUnitResultFormatter.java:139
StringBuffer constructor is initialized with size 27, but has at least 53 characters appended.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ModifiedSelector.java:792
StringBuffer constructor is initialized with size 33, but has at least 65 characters appended.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/selectors/DateSelector.java:74
StringBuffer constructor is initialized with size 36, but has at least 45 characters appended.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/selectors/FilenameSelector.java:55
StringBuffer constructor is initialized with size 40, but has at least 60 characters appended.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/selectors/ContainsSelector.java:66
StringBuffer constructor is initialized with size 40, but has at least 62 characters appended.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/selectors/PresentSelector.java:55
StringBuffer constructor is initialized with size 44, but has at least 46 characters appended.
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/optional/image/Image.java:200
Using equalsIgnoreCase() is cleaner than using toUpperCase/toLowerCase().equals().
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/optional/image/Image.java:202
Using equalsIgnoreCase() is cleaner than using toUpperCase/toLowerCase().equals().
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/optional/image/Arc.java:76
Using equalsIgnoreCase() is cleaner than using toUpperCase/toLowerCase().equals().
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/optional/image/Arc.java:78
Using equalsIgnoreCase() is cleaner than using toUpperCase/toLowerCase().equals().
/usr/src/packages/BUILD/apache-ant-1.7.0/src/main/org/apache/tools/ant/types/optional/image/Arc.java:80
Using equalsIgnoreCase() is cleaner than using toUpperCase/toLowerCase().equals().

In each of the 115 cases, an improvement can be made.

Regards

David Binderman


_________________________________________________________________
Get all your favourite content with the slick new MSN Toolbar - FREE
http://clk.atdmt.com/UKM/go/111354027/direct/01/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message