private Taint getMethodTaint(TaintMethodSummary methodSummary) {
   if (methodSummary == null) {
     return getDefaultValue();
   }
   if (methodSummary.hasConstantOutputTaint()) {
     Taint taint = new Taint(methodSummary.getOutputTaint());
     if (taint.getState() == Taint.State.TAINTED) {
       taint.addTaintLocation(getLocation(), true);
     }
     return taint;
   }
   if (methodSummary.hasTransferParameters()) {
     return mergeTransferParameters(methodSummary.getTransferParameters());
   }
   throw new IllegalStateException("invalid method summary");
 }