package Ġde . plat on 4 2 . intellij . plugins . ca jon . quick fixes Ċ Ċ import Ġcom . intellij . code Inspection . Problem Descriptor Ċ import Ġcom . intellij . openapi . project . Project Ċ import Ġcom . intellij . psi . Psi Expression Ċ import Ġcom . intellij . psi . Psi MethodCall Expression Ċ import Ġcom . intellij . psi . Psi Reference Expression Ċ import Ġde . plat on 4 2 . intellij . plugins . ca jon . create Expected MethodCall Ċ import Ġde . plat on 4 2 . intellij . plugins . ca jon . first Arg Ċ import Ġde . plat on 4 2 . intellij . plugins . ca jon . qual ifier Expression Ċ import Ġde . plat on 4 2 . intellij . plugins . ca jon . replace Qualifier From MethodCall Ċ Ċ class ĠReplace Has Size MethodCall Quick Fix ( description : ĠString , Ġprivate Ġval Ġreplacement Method : ĠString ) Ġ: ĠAbstract Common Quick Fix ( description ) Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġapply Fix ( project : ĠProject , Ġdescriptor : ĠProblem Descriptor ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġmethod Call Expression Ġ= Ġdescriptor . start Element Ġas ? ĠPsi MethodCall Expression Ġ?: Ġreturn ĊĊĠĠĠĠĠĠĠ Ġreplace Collection And Map Size Or Array Length ( method Call Expression . first Arg ) ĊĊĠĠĠĠĠĠĠ Ġval Ġexpected Expression Ġ= Ġcreate Expected MethodCall ( method Call Expression , Ġreplacement Method , Ġmethod Call Expression . first Arg ) ĊĊĠĠĠĠĠĠĠ Ġexpected Expression . replace Qualifier From MethodCall ( method Call Expression ) ĊĠĠĠĠĠĠĠ Ġmethod Call Expression . replace ( expected Expression ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġreplace Collection And Map Size Or Array Length ( assert Expression : ĠPsi Expression ) Ġ{ ĊĠĠĠĠĠĠĠ Ġassert Expression . replace ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġwhen Ġ( assert Expression ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġis ĠPsi Reference Expression Ġ-> Ġassert Expression . qual ifier Expression !! ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġis ĠPsi MethodCall Expression Ġ-> Ġassert Expression . qual ifier Expression ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġelse Ġ-> Ġreturn ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} Ċ }