question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Discarded (popped) expressions can cause "not a statement" if not consumed into ignored locals.

See original GitHub issue

FILE (no copyright materials): o_test.zip

CFR:

public static String fib(String a) {
    int n = a.length();
    int n2 = n - 1;
    char[] arrc = new char[n];
    int n3 = (3 ^ 5) << 4 ^ 1;
    (3 ^ 5) << 3 ^ (3 ^ 5);
    int n4 = n2;
    int n5 = (2 ^ 5) << 3 ^ 2;
    while (n4 >= 0) {
        int n6 = n2--;
        arrc[n6] = (char)(a.charAt(n6) ^ n5);
        if (n2 < 0) break;
        int n7 = n2--;
        arrc[n7] = (char)(a.charAt(n7) ^ n3);
        n4 = n2;
    }
    return new String(arrc);
}

Fernflower:

public static String fib(String a) {
    int var10000 = (2 ^ 5) << 3 ^ 2;
    int var10001 = (3 ^ 5) << 3 ^ 3 ^ 5;
    int var10002 = (3 ^ 5) << 4 ^ 1;
    int var10003 = a.length();
    char[] var10004 = new char[var10003];
    boolean var10006 = true;
    int var5 = var10003 - 1;
    var10003 = var10002;
    int var3;
    var10002 = var3 = var5;
    char[] var1 = var10004;
    int var4 = var10003;
    var10001 = var10000;
    var10000 = var10002;

    for(int var2 = var10001; var10000 >= 0; var10000 = var3) {
        var10001 = var3;
        char var6 = a.charAt(var3);
        --var3;
        var1[var10001] = (char)(var6 ^ var2);
        if (var3 < 0) {
            break;
        }

        var10002 = var3--;
        var1[var10002] = (char)(a.charAt(var10002) ^ var4);
    }

    return new String(var1);
}

Optimizations are ok, but that line with the mathematical operation looks weird.😃

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lab313rucommented, Jun 20, 2019

It would be great to comment it or even don’t show any such info. It doesn’t give you any interesting info, but in case of trying to compile it will give you an error.

0reactions
lab313rucommented, Jun 20, 2019

Thanks:) Ok, you’re right.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Discarded (popped) expressions can cause "not a statement" if not ...
Discarded (popped) expressions can cause "not a statement" if not consumed into ignored locals.
Read more >
Idealize, Devalue, Discard: The Dizzying Cycle of Narcissism
By being in a relationship with such a nurturing, loving person, the person with narcissism is able to consume that person's authentic love ......
Read more >
TextView - Android Developers
When set to true, the view will not receive touches whenever a toast, dialog or other window appears above the view's window. Refer...
Read more >
How to Use Inline Assembly Language in C Code - Fedora
Since GCC does not parse the AssemblerInstructions, it has no visibility of any symbols it references. This may result in GCC discarding those...
Read more >
Documentation - Apache Kafka
The way consumption is implemented in Kafka is by dividing up the ... Headers will be ignored if the configured serializer and deserializer...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found