Commit Graph

127 Commits

Author SHA1 Message Date
Julian Dolby b2503628a4 1) a bit more source mappimg information
2) fixes to how Contexts are combined
2018-10-13 08:42:08 -04:00
Manu Sridharan 76faa4df2d
Fix bug with method lookup (#276)
The previous lookup logic would erroneously look in superclasses for a constructor with parameters.

Bug reported on [the mailing list](https://groups.google.com/forum/#!msg/wala-sourceforge-net/6m_VmDF-lZ0/erZIYQ68BwAJ;context-place=topic/wala-sourceforge-net/TjRzdDyljjY)
2017-12-23 16:38:26 -08:00
Ben Liblit f60c164ec1 Escape "<" and ">" in Javadoc when not used as HTML tag syntax 2017-12-19 16:53:52 -06:00
Julian Dolby 7cd2a2acf8 Fixes for instrumentation of invoke dynamic 2017-12-01 20:01:16 +08:00
Ben Liblit 5b6e6aefa0 Remove some unnecessary warning suppression annotations 2017-08-28 11:55:56 -07:00
Ben Liblit c1572ec3a5 Remove unnecessary warning-suppression annotations
These annotations used to suppress real Eclipse warnings.  However,
we've now turned those warnings off for the entire project.
2017-07-26 20:08:34 -07:00
Ben Liblit 455a4a2bd6 Disable or suppress various Eclipse warnings in test data
These are all things one might consider fixing in real application
data.  Java code used as test inputs, though, serves a different
purpose.  Weird code is generally acceptable or even intentional.
2017-07-26 20:08:34 -07:00
Ben Liblit a888a49fdd Fix all Eclipse warnings about unnecessary semicolons
I have *not* upgraded this problem to be treated as an error in the
future.  Unfortunately Eclipse uses a single configuration setting for
both unnecessary semicolons and also for empty control-flow statements
like `while (p) ;`.  I'm not convinced that it's worth rewriting all
instances of the latter into `while (p) { }`.  So this is just going
to stay as a warning for now.
2017-07-14 22:39:01 -07:00
Ben Liblit e316471d88 Fix nearly all Eclipse warnings about using raw types
Along the way, I also converted many "for (;;)" loops into modern
"for (:)" loops.  I didn't systematically look for all opportunities
to do this, though.  I merely made this change where I was already
converting raw Iterator uses into modern Iterator<...> uses.

Better use of generics also allowed many casts to become statically
redundant.  I have removed all such redundant casts.

Only three raw-types warnings remain after this batch of fixes.  All
three involve raw uses of CallGraphBuilder.  I've tried to fix these
too, but it quickly snowballs into a cascade of changes that may or
may not eventually reach a statically-type-save fixed point.  I may
give these last few problem areas another go in the future.  For now,
though, the hundreds of other fixes seem worth keeping even if there
are a few stragglers.

This commit may change some public APIs, but only by making weaker
type signatures stronger by replacing raw types with generic types.
For example, we may change something like "Set" into "Set<String>",
but we're not adding new arguments, changing any
underlying (post-generics-erasure) types, etc.
2017-07-12 10:39:06 -07:00
Ben Liblit 65e6e5fbcf Suppress warnings about using raw types in test input
We shouldn't use raw types in real application code, but we often want
test inputs to do things that are simpler, or even not-quite-kosher.
2017-07-12 10:39:06 -07:00
Ben Liblit 24fb1f6d10 Suppress unused-local-variable warnings in test inputs
Test code can do many things we'd consider bad style in real
application code, including defining local variables that are never
subsequently used.
2017-05-26 14:25:03 -07:00
Manu Sridharan ed4b0e45ee add test case for mailing list issue 2017-04-16 20:40:41 -07:00
Ben Liblit 91b9c9e28b Suppress/disable some Eclipse unnecessary-code warnings in test code
Often the easiest way to create a desired test scenario is to write
code that would make no sense in a complete, realistic application.
So we generally want to let test code do oddball things.
2017-03-28 19:25:08 -05:00
Manu Sridharan b82e808b32 Merge pull request #156 from liblit/warning-fixes-unnecessary-code-uncontroversial
Fix 265 Eclipse warnings about unnecessary code
2017-03-23 17:48:10 -07:00
Ben Liblit 16492c7b78 Revert "Suppress 157 Eclipse warnings about unused exception parameters"
This reverts commit fe9f7a793a.
2017-03-23 16:32:00 -05:00
Ben Liblit e52d872e3e Fix 19 Eclipse warnings about unnecessary casts 2017-03-23 12:28:14 -05:00
Ben Liblit 323224504a Suppress several unfixable warnings about unresolved type references
Fixing these Javadoc comments would require adding packages to various
other packages' build paths.  In some of the cases suppressed,
changing build paths in that manner would create circular build
dependencies.  In other cases, it would simply add a Javadoc-motivated
dependency that does not exist for the real code, which seems
undesirable.  For a few cases, the reference seems to be to types in
code we don't even have here, such as code from "android" or
"org.mozilla" packages.
2017-03-22 20:40:52 -05:00
Ben Liblit fe9f7a793a Suppress 157 Eclipse warnings about unused exception parameters
In the cases addressed here, the caught exception is truly not needed
by the handling code.
2017-03-20 00:44:06 -05:00
Julian Dolby 7e3066b6cd bug 144 2017-03-14 10:05:18 -04:00
Julian Dolby db65c16863 Merge branch 'pull-request__typeannotations' of https://github.com/joana-team/WALA 2017-03-11 16:19:50 -05:00
Julian Dolby 2a4d24dc6f Merge branch 'pull-request__nullpointer-bugfixes' of https://github.com/joana-team/WALA 2017-03-11 14:48:13 -05:00
Julian Dolby 7b393a7da2 fix for missing Java 8 feature 2017-02-24 22:29:14 -05:00
Julian Dolby d24519e974 cross-cutting changes to make more of WALA runnable with TeaVM. The biggest change is refactoring to AnalysisCache and friends; since TeaVM does not support SoftReference, I needed to add a layer of interfaces so that I can use a more simpleminded caching implementation for TeaVM. There are other changes to Module and friends to break connections with File and URL, which also cause TeaVM grief. I also organized imports in many places to remove unused types that caused trouble. 2017-02-02 20:33:27 -05:00
Martin Hecker 4905695e4a more interprocedural NullPointerException test cases 2016-12-07 17:56:59 +01:00
Martin Hecker 7293d18a89 another test case for the NullPointerException analysis 2016-12-07 17:56:59 +01:00
Martin Hecker c7f618eb6f add some tests both for intra and inter-procedural NullPointerException Analysis 2016-12-07 17:56:59 +01:00
Martin Hecker 4fca71c595 some more simple tests for intraprocedurel NullPointerException Analysis 2016-12-07 17:56:59 +01:00
Martin Hecker 5f617c19e3 Tests for the new JSR 308 type annotations implementation. 2016-12-05 18:52:38 +01:00
Martin Hecker 1b74b906fc Add some tests that are meant to check both for precision and soundness of the intraprocedural NullPointer analyses. 2016-12-05 18:24:39 +01:00
Ben Liblit ed0ddd780f Correct HTML embedded in Javadoc comments
Most of the invalid HTML arose from bare "<" and ">" characters.
These should be escaped as "&lt;" and "&gt;" when not intended to
introduce HTML tags.  When you have many such characters close
together, "{@literal ...}" is a nice, readable alternative that
automatically escapes its contents.  If the text in question is
intended to be a code fragment, then "{@code ...}"  is appropriate:
this is essentially equivalent to "<code>{@literal ...}</code>".

There were a few other HTML violations too, but none common enough to
be worth detailing here.
2016-11-28 11:14:41 -06:00
Ben Liblit e35b205bc2 Fix numerous unescaped "<" and ">" in Javadoc @author tags
The contents of @author go straight into HTML, just like most other
Javadoc material.  So if you want to have a "<foo@bar.com>" e-mail
address as part of the author information, the angle brackets must be
escaped.  Here I've opted to do that using "{@code <foo@bar.com>}",
which has some additional styling effects that seem appropriate for
e-mail addresses.  We could also have used "&lt;foo@bar.com&gt;" for
escaping without code styling.
2016-11-27 21:24:03 -06:00
Julian Dolby 93e165e64a CPA smoke tests 2016-09-16 08:14:33 -04:00
steohan 715b1e86fe Merge pull request #1 from wala/master
Pull from Wala
2016-01-13 02:23:04 +01:00
Stephan Gocht 672876c595 Added Testcases for ExceptionAnalysis and ExceptionAnalysis2EdgeFilter. 2016-01-13 02:07:58 +01:00
Manu Sridharan 0eabfa2d05 Add slicer test
This test relates to a mailing list question from 
Gebrehiwet Biyane Welearegai:

https://groups.google.com/forum/#!topic/wala-sourceforge-net/lS7lyCHfAaw
2015-12-14 10:34:10 -08:00
Stephan Gocht 3acd97ebfb Fixed assertion fault, in case of multidimensional arrays. 2015-11-15 21:05:39 +01:00
Stephan Gocht dfaa44d111 Added quicksort example, and made larger change as it wasn't as expected
first. This change should improve the results of the analysis.
2015-11-06 18:52:11 +01:00
Stephan Gocht f8cae1b509 Added Tests and Testdata for array bounds analysis. 2015-10-19 23:20:36 +02:00
Julian Dolby 671bd98977 Java 8 suport enhancements, mostly to model lambdas compiled to
invokedynamic
2015-08-12 15:20:21 -04:00
Julian Dolby b1538aece6 Merge branch 'master' of https://github.com/wala/WALA 2015-08-09 13:47:01 -04:00
Julian Dolby 8470091225 Java 8 default methods 2015-08-09 13:46:03 -04:00
Julian Dolby 3f5ce89cb6 finalizer test 2015-08-09 13:43:40 -04:00
Manu Sridharan 13a46d8ea3 Fixes #82
PrunedCFG had been changed to always include an entry and exit node.
The logic for detecting an "empty" ExceptionPrunedCFG inside the PDG
construction code had not been updated appropriately.
2015-08-06 11:08:27 -07:00
Julian Dolby b721a3ceb0 updates to dynamic call graphs to better match static ones 2015-07-10 09:44:01 +02:00
Julian Dolby a6a060ed25 changes for handling of 'callbacks' in dynamic CGs 2015-06-28 17:06:21 -04:00
Julian Dolby 58b7c7324c test for reading java 8 2015-06-04 13:53:25 -04:00
Julian Dolby 6c47da8091 Merge branch 'master' of https://github.com/wala/WALA
Conflicts:
	com.ibm.wala.core.tests/src/com/ibm/wala/core/tests/shrike/DynamicCallGraphTestBase.java
	com.ibm.wala.ide.jdt.test/launchers/JDTJava15IRTests.launch
2014-10-06 15:43:42 -04:00
Julian Dolby 36709b9d1a java 7 support, with much pain for stack maps :) 2014-10-06 15:34:16 -04:00
Julian Dolby a1bc84356d scandriod merge 2014-10-01 21:32:36 -04:00
Juergen Graf 6f8aee80c6 Merge branch 'wala' into master 2014-07-28 17:09:02 +02:00