@ Override public void visitMethod ( Method obj ) { LocalVariableTable lvt = obj . getLocalVariableTable ( ) ; if ( lvt != null ) { LocalVariable [ ] lvs = lvt . getLocalVariableTable ( ) ; for ( LocalVariable lv : lvs ) { if ( checkConfusedName ( lv . getName ( ) , lv . getSignature ( ) ) ) { bugReporter . reportBug ( new BugInstance ( this , BugType . CNC_COLLECTION_NAMING_CONFUSION . name ( ) , NORMAL_PRIORITY ) . addClass ( this ) . addString ( lv . getName ( ) ) . addSourceLine ( this . clsContext , this , lv . getStartPC ( ) ) ) ; } } } }
overrides the visitor to look for local variables where the name has Map Set List in it but the type of that field isn t that . note that this only is useful if compiled with debug labels .