@ Override public void sawOpcode ( int seen ) { try { stack . precomputation ( this ) ; if ( ( seen == Const . INVOKEVIRTUAL ) || ( seen == Const . INVOKEINTERFACE ) ) { FQMethod key = new FQMethod ( getClassConstantOperand ( ) , getNameConstantOperand ( ) , getSigConstantOperand ( ) ) ; Object posObject = characterMethods . get ( key ) ; if ( posObject instanceof Integer ) { if ( checkSingleParamMethod ( ( ( Integer ) posObject ) . intValue ( ) ) && ! isInlineAppend ( key ) ) { reportBug ( ) ; } } else if ( ( posObject instanceof IntPair ) && checkDoubleParamMethod ( ( IntPair ) posObject ) ) { reportBug ( ) ; } } else if ( seen == Const . DUP ) { if ( stack . getStackDepth ( ) > 0 ) { OpcodeStack . Item itm = stack . getStackItem ( 0 ) ; String duppedSig = itm . getSignature ( ) ; if ( Values . SIG_JAVA_UTIL_STRINGBUILDER . equals ( duppedSig ) || Values . SIG_JAVA_UTIL_STRINGBUFFER . equals ( duppedSig ) ) { itm . setUserValue ( UCPMUserValue . INLINE ) ; } } } else if ( ( seen == Const . PUTFIELD ) || ( ( ( seen == Const . PUTSTATIC ) || OpcodeUtils . isAStore ( seen ) ) && ( stack . getStackDepth ( ) > 0 ) ) ) { OpcodeStack . Item itm = stack . getStackItem ( 0 ) ; itm . setUserValue ( null ) ; } } finally { UCPMUserValue uv = callHasInline ( seen ) ; stack . sawOpcode ( this , seen ) ; if ( ( uv == UCPMUserValue . INLINE ) && ( stack . getStackDepth ( ) > 0 ) ) { OpcodeStack . Item itm = stack . getStackItem ( 0 ) ; itm . setUserValue ( uv ) ; } } }
implements the visitor to look for method calls that pass a constant string as a parameter when the string is only one character long and there is an alternate method passing a character .