This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Product Version = NetBeans IDE 8.0 Beta (Build 201401141042) Operating System = Mac OS X version 10.9.1 running on x86_64 Java; VM; Vendor = 1.7.0_40 Runtime = Java HotSpot(TM) 64-Bit Server VM 24.0-b56 int year, month, currentYear = 0; for(UserAccount userAccount: userAccounts) { registrationDate = Calendar.getInstance(); registrationDate.setTime(userAccount.getRegistrationDate()); if(currentYear == 0) { currentYear = registrationDate.get(Calendar.YEAR); } year = registrationDate.get(Calendar.YEAR) - currentYear; month = registrationDate.get(Calendar.MONTH); data[year][month] += 1; if(userAccount.getDeactivationDate() != null) { deactivationDate = Calendar.getInstance(); deactivationDate.setTime(userAccount.getDeactivationDate()); year = deactivationDate.get(Calendar.YEAR) - currentYear; month = deactivationDate.get(Calendar.MONTH); data[year][month] -= 1; } } This sample was extracted from the class https://github.com/htmfilho/yougi/blob/master/src/main/java/org/cejug/yougi/web/report/MembershipGrowth.java. When I opened the project on Netbeans and opened this class the hint "Unused Assignment" appeared in the lines 114, 116, 122 and 123. However, the variables year and month are used in the data array, so their values are actually used.
Created attachment 144607 [details] IDE log
Created attachment 144608 [details] <no description>
*** This bug has been marked as a duplicate of bug 238067 ***