static-analysis

JSR-305 annotations replacement for Java 9

雨燕双飞 提交于 2019-11-29 01:51:49
问题 So far we have been using the Findbugs JSR-305 annotations (com.google.code.findbugs:jsr305) and everything including tool support (Sonar, Eclipse, Findbugs, …) has been working fine. However it is our understanding that Jigsaw in Java 9 is going to break JSR-305 annotations (one package in two modules is not allowed). This was confirmed at JavaOne 2015. Oracle's reasoning is JSR-305 never happened and JSR-250 would have to endorse these annotations. We're looking for replacements for JSR-305

Do tools exist which automatically find copy-and-paste code? [closed]

青春壹個敷衍的年華 提交于 2019-11-29 00:10:18
问题 Are there tools out there which could automatically find copy-and-paste code among a set of files? I was thinking of writing a script for this, which would just search for equal strings, but such script would find mostly irrelevant equalities. (Such as private final static ... ). 回答1: Yes, try the Copy Paste Detector. 回答2: http://patterninsight.com/products/cp-miner.php Related paper - http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.123.113 回答3: Our CloneDR is a tool for finding exact

How to test binary compatibility automatically?

…衆ロ難τιáo~ 提交于 2019-11-28 23:30:28
Can it be done before compiling, by comparing code? Is there any tools already doing this? okun You might find this interesting: Static analysis tool to detect ABI breaks in C++ ABI Compliance Checker — a tool for checking backward API/ABI compatibility of a C/C++ library: abi-compliance-checker -lib NAME -old OLD.abidump -new NEW.abidump *.abidump files are ABI dumps of OLD and NEW library versions generated by the ABI Dumper tool. icheck - C interface ABI/API checker: icheck --canonify -o old_version -I/usr/include/foo/ bar.h icheck --compare -o results.txt old_version new_version shlib

Any Static Code Analysis Tools for Stored Procedures? [closed]

戏子无情 提交于 2019-11-28 18:47:48
Are there any static code analysis tools for stored procedures written particularly in PL/SQL and T-SQL ? For T-SQL, Microsoft has the database edition of VS Team Suite (although, I believe its now in the dev SKU). This link talks about writing your own static code analysis rule for T-SQL: http://blogs.msdn.com/gertd/archive/2009/01/01/creating-t-sql-static-code-analysis-rules.aspx Oracle has some little-known stuff built in. Try this in 10g Release 2 or above: ALTER SESSION PLSQL_WARNINGS = 'ENABLE:ALL'; Then compile your PL/SQL package (not an anonymous block). Toad features the CodeXpert

How do commercial Java static analysis tools compare with the free ones? [closed]

一笑奈何 提交于 2019-11-28 17:27:29
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 8 years ago . I'm familiar with a handful of the free static analysis tools available for Java, such as FindBugs and PMD. What I'd like to know is

How to search for Java API methods by type signature?

让人想犯罪 __ 提交于 2019-11-28 17:16:01
Are there any open-source tools available which support searching for Java methods by the set of parameter types and return type? As an example, say I'm looking for a method to generate a hash code for an array of ints. I search for a method which takes an int[] parameter and returns an int: int[] -> int yielding java.util.Arrays#hashCode(int[]) ... Or I may want to find a method which takes a String, and character to replace, and the character to replace it with. So I search for a matching method: String, char, char -> String yielding java.lang.String#replace(char, char) ... Ideally I'd like

Tools for generating Haskell function dependency (control flow) graph?

五迷三道 提交于 2019-11-28 17:04:18
问题 Note not "functional dependency". Are there tools available that allow me to build a static function dependency graph from source code? Something which indicates to me which functions depend on which other ones in a graphical manner. 回答1: Yes, there certainly are. If you look in the Development category on Hackage, you'll find tools for: graphing package dependencies -- n.b requres older cabal graphing module dependencies graphing function calls graphing running data structures In particular,

code examples for learning LLVM backend programming

雨燕双飞 提交于 2019-11-28 16:52:03
问题 I am learning programming LLVM backends. Currently I am interested in analysis passes, later program transformations. (I assume as I will be more fluent with analysis then will be time for program transformations). Could you recommend resources for learning ? (I know LLVM Programmers manual and Dragon Book ;) ). By resources I mean not only tutorials, books, but especially small well-written projects . I'd like to read code examples , compile them and play with them (hack a little bit) to

Are C++ static code analyis tools worth it?

感情迁移 提交于 2019-11-28 16:42:34
Our management has recently been talking to some people selling C++ static analysis tools . Of course the sales people say they will find tons of bugs, but I'm skeptical. How do such tools work in the real world? Do they find real bugs? Do they help more junior programmers learn? Are they worth the trouble? Static code analysis is almost always worth it. The issue with an existing code base is that it will probably report far too many errors to make it useful out of the box. I once worked on a project that had 100,000+ warnings from the compiler... no point in running Lint tools on that code

Where can I find an actively developed lint tool for Ruby?

时光怂恿深爱的人放手 提交于 2019-11-28 16:31:28
Most of the code I write is in Ruby, and every once in a while, I make some typo which only gets caught after a while. This is irritating when I have my scripts running long tasks, and return to find I had a typo. Is there an actively developed lint tool for Ruby that could help me overcome this? Would it be possible to use it across a system that works with a lot of source files, some of them loaded dynamically? Take this snippet as an example: a = 20 b = 30 puts c To win bounty, show me a tool that will detect the c variable as not created/undefined. You could give Diamondback Ruby a try. It