replaced.put(name,newFields);
replacedFields.put(name,newFields);
    public void destroyFieldArrays(SIRCodeUnit unit) {        replaced.clear();  // no replacements yet        // loop over all array names from targetsField map.        for(String name : targetsField.keySet()) {            // array variable definition            JVariableDefinition var = getDefn(name, unit.getFields());            CType arrayType = var.getType();            if(arrayType==null) { continue; }            assert arrayType instanceof CArrayType;            // type of elements of array            CType baseType = ((CArrayType)arrayType).getBaseType();            JExpression init = var.getValue();            // array initialializer for each element, or null array.            JExpression[] elems;            if (init == null) {                elems = null; // default, but make it explicit            } else if (init instanceof JArrayInitializer) {                elems = ((JArrayInitializer)init).getElems();            } else {                throw new AssertionError("unexpected array field initialization " + init.getClass());            }                        // set of array offsets guaranteed to be constant            // (some code above makes me think that his had better be all            // the offsets or else we will find more bugs)            Set<Integer> keySet = targetsField.get(name).keySet();            int top = Collections.max(keySet);            assert top + 1 == keySet.size();            // will be filled with names of fields guaranteed to be constant            String[] newFields=new String[top+1];            // create new field names for all constant fields            for (int j : keySet) {                JFieldDeclaration newField = toField(name,j,baseType,elems);                unit.addField(newField);                newFields[j] = newField.getVariable().getIdent();            }            replaced.put(name,newFields);        }                // Iterate over all methods, updating references to constant fields.        for(JMethodDeclaration method : unit.getMethods()) {            method.getBody().accept(this);        }    }