public boolean isAssertionInstruction ( Instruction ins , ConstantPoolGen cpg ) { if ( ins instanceof InvokeInstruction ) { return isAssertionCall ( ( InvokeInstruction ) ins ) ; } if ( ins instanceof GETSTATIC ) { GETSTATIC getStatic = ( GETSTATIC ) ins ; String className = getStatic . getClassName ( cpg ) ; String fieldName = getStatic . getFieldName ( cpg ) ; if ( "java.util.logging.Level" . equals ( className ) && "SEVERE" . equals ( fieldName ) ) { return true ; } return "org.apache.log4j.Level" . equals ( className ) && ( "ERROR" . equals ( fieldName ) || "FATAL" . equals ( fieldName ) ) ; } return false ; }
Does the given instruction refer to a likely assertion method?