fixing equivTo - thanks to Michael Faes!
fix for the fix
Bugfix: getCallsFromWithin used to return only such call sites that actually have a callee; this lead to values for callee-less call sites never to be computed; the implementation is now consistent for getCallsFromWithin and for allNonCallStartNodes which should avoid this inconsistency
Fix for this problem:



Hi,

I found a performance problem and a maybe-fix for it, which speeds up my
analysis by 5x. The problem is that the active hierarchy is repeatedly
computed when calling Scene.getActiveHierarchy(). The Scene caches the
hierarchy to avoid this redundant computation, but unfortunately Body
contains the following statement (line 701):

        // FIXME: Work around for bug in soot
        Scene.v().releaseActiveHierarchy();

I.e., the cached hierarchy is deleted for each Body that is validated
(I'm using the -validate option). Is this really necessary? The
hierarchy shouldn't change while validating method bodies. As far as I
can tell from running my own analyses, removing the statement doesn't
change the behavior (except for avoiding the redundant computation).

Does anyone remember the reason for the FIXME (it's from October 2004)?
Can it be removed safely? Getting a 5x speedup with such a simple change
would be great.

Thanks,
Michael
fix: regard clinit-edges in ICFG
Do not compute string if Dexpler's debug flag is off.
update dexpler's debug print methods to avoid computing Strings if debug is disabled.
fix cast bug
bug fix: if offset == 0, must use goto/32
Merge branch 'toDexBug' into develop
Bugfix:

When -oaat and -outjar are used together, the output jar file remains empty.

That is because, even with -oaat flag, PackManager:writeOutput is called from soot.Main at line 199. I dont think there is no need for that call because with -oaat flag, the classes have already been output at that point.

The fix is to move that call to writeOutput from Soot.Main to inside the else branch in PackManager.runPacks() method.

Saswat
Merge branch 'develop' of https://github.com/Sable/soot into develop
fixing bug in coffi.ClassFile with DataInputStream.read

On a mac DataInputStream.read is only reading part
of the array. The code is expecting the whole array
to be read so that the cursor is positioned properly
for the next read.

This is triggered when using -include-all on mac
with classes.jar and ui.jar and doing a body
transformer on:
  apple.awt.CDragSourceContextPeer
  com.apple.java.BackwardsCompatibilityTest
Merge pull request #41 from pcpratts/develop

fixing bug in coffi.ClassFile with DataInputStream.read
Update FullSensitiveNode.java

Fix: this pointer filter crashes if ignore-types=true.
Update HeapInsNode.java

Fix: This pointer filter failed when ignore-types=true
Update PtInsNode.java

Fix: this pointer filter failed when ignore-types=true
improved exception class to contain more information on what went wrong
Update ClassFile.java

InputStream.read() does not guarantee actually, well, reading anything:

http://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html#read(byte[])

The original code failed for me when reading from a `.jar` file, as InputStream.read() would cut out halfway and leave the rest of the `data` array as zeroes. This cause a NPE in `resolveFromClassFile`:

```
Exception in thread "main" java.lang.NullPointerException
	at soot.coffi.method_info.toName(method_info.java:86)
	at soot.coffi.Util.resolveFromClassFile(Util.java:225)
	at soot.CoffiClassSource.resolve(CoffiClassSource.java:39)
	at soot.coffi.Test$.loadClass(Test.scala:22)
	at soot.coffi.Test$.main(Test.scala:27)
	at soot.coffi.Test.main(Test.scala)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
```

Wrapping it in a DataInputStream fixes that problem on my machine, and should have no affect otherwise
Fix for #59 as suggested by Tony Yan