[Soot-list] NoSuchElementException while running dava

Steffen Pingel steffenp at gmx.de
Wed Jan 11 17:47:13 EST 2006


Hi,

when I try to decompile this method with dava:

   public void continueLoop(int i) {
        while (true) {
            System.out.print("a");
            do {
                System.out.print("b");
            } while (i > 10);
        }
    }

I get a NoSuchElementException:

 Exception in thread "main" java.util.NoSuchElementException
 	at soot.util.HashChain.getFirst(HashChain.java:288)
	at soot.dava.toolkits.base.finders.CycleFinder.find(CycleFinder.java:79)
	... 

The cause of the problem is in the find() method of CycleFinder. When the 
outer loop is detected wasg.remove_AugmentedStmt( entry_point) is invoked and 
the statement System.out.print("a") is removed from the graph. 

On the next loop iteration the inner loop is detected but it does not have an 
entry point anymore, since the System.out.print("a") statement was removed 
during the first iteration. Therefore get_EntryPoint( IterableSet nodeList) 
returns an empty list which causes the Exception when the first element of 
the returned Set is requested.

I am not sure how to fix this properly. Can anyone provide a hint :)?

Steffen


P.S.: Bugzilla is available again and I have created an account but have not 
received the email with the generated password, so I am unable to login. I 
have tried multiple email addresses but none worked. Can someone help?

-- 
Steffen Pingel - steffenp at gmx.de - http://steffenpingel.de


More information about the Soot-list mailing list