JavaClass jclass = getJavaClass(); String className = jclass.getClassName();
	public void report() {		int noLocked = 0, noUnlocked = 0, nPublic = 0, nVolatileOrFinal = 0, couldBeFinal = 0,			mostlyUnlocked = 0, noLocalLocks = 0;		JavaClass jclass = getJavaClass();		String className = jclass.getClassName();		Iterator<Map.Entry<FieldAnnotation, FieldStats>> i = statMap.entrySet().iterator();		while (i.hasNext()) {			Map.Entry<FieldAnnotation, FieldStats> entry = i.next();			FieldAnnotation field = entry.getKey();			FieldStats stats = entry.getValue();			// The following code is adapted from edu.umd.cs.pugh.visitclass.LockedFields			int locked =  stats.nReadLocked + stats.nWriteLocked;			int biasedLocked =  stats.nReadLocked + 2*stats.nWriteLocked;			int unlocked =  stats.nReadUnlocked + stats.nWriteUnlocked;			int biasedUnlocked =  stats.nReadUnlocked + 2*stats.nWriteUnlocked;			int writes =  stats.nWriteLocked + stats.nWriteUnlocked;			if (locked == 0) {				noLocked++;				continue;			}			if (unlocked == 0)  {				noUnlocked++;				continue;			}			if (stats.nReadUnlocked > 0 && 2*biasedUnlocked > biasedLocked) {				mostlyUnlocked++;				continue;			}			if (publicFields.contains(field)) {				++nPublic;				continue;			}			if (volatileAndFinalFields.contains(field)) {				++nVolatileOrFinal;				continue;			}			if (!writtenOutsideOfConstructor.contains(field)) {				++couldBeFinal;				continue;			}			if (!localLocks.contains(field)) {				noLocalLocks++;				continue;			}			// At this point, we report the field as being inconsistently synchronized			int freq = (100 * locked) / (locked + unlocked);			BugInstance bugInstance = new BugInstance("IS2_INCONSISTENT_SYNC", NORMAL_PRIORITY)				.addClass(field.getClassName())				.addField(field)				.addInt(freq).describe("INT_SYNC_PERCENT");			// Add source lines for all of the instructions where			// unsynchronized accesses occur.			for (Iterator<SourceLineAnnotation> j = stats.unsyncAccessList.iterator(); j.hasNext(); ) {				SourceLineAnnotation accessSourceLine = j.next();				bugInstance.addSourceLine(accessSourceLine).describe("SOURCE_LINE_UNSYNC_ACCESS");			}			bugReporter.reportBug(bugInstance);			if (DEBUG) {				System.out.println(freq + "\t" + stats.nReadLocked + "\t" + stats.nWriteLocked + "\t" + stats.nReadUnlocked + "\t"					+ stats.nWriteUnlocked + "\t" + field.toString());			}/*			System.out.println("Field " + field + ":");			System.out.println("\tread unlocked    : " + stats.nReadUnlocked);			System.out.println("\tread locked      : " + stats.nReadLocked);			System.out.println("\twrite unlocked   : " + stats.nWriteUnlocked);			System.out.println("\twrite locked     : " + stats.nWriteLocked);			System.out.println("\tunlocked accesses: " + (stats.nReadUnlocked + stats.nWriteUnlocked));			System.out.println("\tlocked accesses  : " + (stats.nReadLocked + stats.nWriteLocked));*/		}		if (DEBUG) {			int total = statMap.size();			System.out.println("        Total fields: " + total);			System.out.println("  No locked accesses: " + noLocked);			System.out.println("No unlocked accesses: " + noUnlocked);			System.out.println("     Mostly unlocked: " + mostlyUnlocked);			System.out.println("       public fields: " + nPublic);			if (couldBeFinal > 0) 				System.out.println("      could be Final: " + couldBeFinal);			System.out.println("   volatile or final: " + nVolatileOrFinal);			System.out.println("      no local locks: " + noLocalLocks);			System.out.println(" questionable fields: " + (total - noLocked - noUnlocked - nPublic - nVolatileOrFinal - couldBeFinal - noLocalLocks - mostlyUnlocked));		}	}