HashMap<Object, Boolean> map=targetsField.get(ident);
HashMap<Integer, Boolean> map=targetsField.get(ident);
    public Object visitMethodDeclaration(JMethodDeclaration self,                                         int modifiers,                                         CType returnType,                                         String ident,                                         JFormalParameter[] parameters,                                         CClassType[] exceptions,                                         JBlock body) {        replaced.clear();        final boolean init=ident.startsWith("init");        for (int i = 0; i < parameters.length; i++) {            if (!parameters[i].isGenerated()) {                parameters[i].accept(this);            }        }        if (body != null) {            // XXX: seems to reuse targets with multiple key types: Integer, JLocalVariable, JExpression...            final HashMap<Object, HashMap<Integer, Boolean>> targets=new HashMap<Object, HashMap<Integer, Boolean>>();            final HashMap<Serializable, Boolean> unsafe=new HashMap<Serializable, Boolean>();            body.accept(new SLIRReplacingVisitor() {                    HashMap<JLocalVariable, Boolean> declared=new HashMap<JLocalVariable, Boolean>();                    /**                     * If vars used in any way except in array access then remove from targets                     */                    public Object visitLocalVariableExpression(JLocalVariableExpression self2,                                                               String ident2) {                        targets.remove(((JLocalVariableExpression)self2).getVariable());                        unsafe.put(((JLocalVariableExpression)self2).getVariable(),Boolean.TRUE);                        return self2;                    }                    /**                     * If fields used in any way except in array access then remove from targets                     */                    public Object visitFieldExpression(JFieldAccessExpression self,                                                       JExpression left,                                                       String ident) {                        if(!init) {                            targetsField.remove(self.getIdent());                            unsafe.put(self.getIdent(),Boolean.TRUE);                            return self;                        }                        return self;                    }                               public Object visitAssignmentExpression(JAssignmentExpression self,                                                            JExpression left,                                                            JExpression right) {                        if((left instanceof JLocalVariableExpression)&&(right instanceof JNewArrayExpression)) {                            JLocalVariable var=((JLocalVariableExpression)left).getVariable();                            if(!declared.containsKey(var)) {                                declared.put(var,Boolean.TRUE);                                return self;                            }                        } else if (left instanceof JFieldAccessExpression) {                            // assigning one array to another.  We do                            // not yet track the flow of values                            // through an assignment such as this.                            //                            // This means that if you pass an array of                            // coefficients to a filter and store it                            // to a field, the array cannot be                            // destroyed.  To support this, would need                            // to propagate constants from locals to                            // fields, which I don't think FieldProp                            // or Propagator currently dues.                             // SEE RT #257.  --BFT                            JFieldAccessExpression l = (JFieldAccessExpression)left;                            targetsField.remove(l.getIdent());                            unsafe.put(l.getIdent(), Boolean.TRUE);                        }                        return super.visitAssignmentExpression(self,left,right);                    }                    public Object visitMethodCallExpression(JMethodCallExpression self,                                                            JExpression prefix,                                                            String ident,                                                            JExpression[] args) {                        if(!(KjcOptions.removeglobals&&ident.equals("memset"))                           ||ident.equals("sizeof")) {                            if (prefix != null) {                                JExpression newExp = (JExpression)prefix.accept(this);                                if (newExp!=null && newExp!=prefix) {                                    self.setPrefix(newExp);                                }                            }                            visitArgs(args);                        }                        return self;                    }                    /**                     * Considers target                     */                    public Object visitArrayAccessExpression(JArrayAccessExpression self2,                                                             JExpression prefix,                                                             JExpression accessor) {                        if(!deadend) {                            accessor.accept(this);                            //if((prefix instanceof JLocalVariableExpression)&&(!unsafe.containsKey(((JLocalVariableExpression)prefix).getVariable())))                            if(prefix instanceof JLocalVariableExpression) {                                JLocalVariable var=((JLocalVariableExpression)prefix).getVariable();                                if(!unsafe.containsKey(var))                                    if(accessor instanceof JIntLiteral) {                                        HashMap<Integer, Boolean> map=targets.get(var);                                        if(map==null) {                                            map=new HashMap<Integer, Boolean>();                                            targets.put(var,map);                                        }                                        map.put(new Integer(((JIntLiteral)accessor).intValue()),Boolean.TRUE);                                    } else {                                        targets.remove(var);                                        unsafe.put(var,Boolean.TRUE);                                    }                            } else if(!init&&(prefix instanceof JFieldAccessExpression)&&(((JFieldAccessExpression)prefix).getPrefix() instanceof JThisExpression)) {                                String ident=((JFieldAccessExpression)prefix).getIdent();                                if(!unsafe.containsKey(ident))                                    if(accessor instanceof JIntLiteral) {                                        HashMap<Object, Boolean> map=targetsField.get(ident);                                        if(map==null) {                                            map=new HashMap<Object, Boolean>();                                            targetsField.put(ident,map);                                        }                                        map.put(new Integer(((JIntLiteral)accessor).intValue()),Boolean.TRUE);                                    } else {                                        targetsField.remove(ident);                                        unsafe.put(ident,Boolean.TRUE);                                    }                            } else {                                deadend=true;                                prefix.accept(this);                                deadend=false;                            }                        } else {                            prefix.accept(this);                            accessor.accept(this);                        }                        return self2;                    }                });            this.targets=targets;            // XXX: can not cast, need to clean up use of targets.            Set keySet=targets.keySet();            JLocalVariable[] vars=new JLocalVariable[keySet.size()];            keySet.toArray(vars);            for(int i=0;i<vars.length;i++) {                JLocalVariable var=vars[i];                keySet=targets.get(var).keySet();                Integer[] ints=new Integer[keySet.size()];                keySet.toArray(ints);                int top=0;                for(int j=0;j<ints.length;j++) {                    int newInt=ints[j].intValue();                    if(newInt>top)                        top=newInt;                }                JLocalVariable[] newVars=new JLocalVariable[top+1];                for(int j=0;j<ints.length;j++) {                    int newInt=ints[j].intValue();                    JVariableDefinition varDef=toVar(var,newInt);                    body.addStatementFirst(new JVariableDeclarationStatement(null,varDef,null));                    newVars[newInt]=varDef;                }                replaced.put(var,newVars);            }            body.accept(this);        }        return self;    }