Buggy example:
public class A {
private int count = 0;
A(int count) {
count = count;
}
}
More often this is just an invocation of a method that has side effects whose return value is assigned to a variable for no particular reason:
// Test reachability of host
try {
Socket s = new Socket("www.yahoo.com", 80);
System.out.println("Yahoo is up");
}
catch (IOException ex) {
System.out.println("Yahoo is down");
}
Problem because:
Did you mean to do something else?
Severity: medium; possible bug; hard to spot