JVariableDefinition var=toVar((JArrayAccessExpression)left,newRight); replaced.put(new VarIndex(((JLocalVariableExpression)prefix).getVariable(),((JIntLiteral)accessor).intValue()),var); return new JVariableDeclarationStatement(self.getTokenReference(),var,null);
VarIndex index=new VarIndex(((JLocalVariableExpression)prefix).getVariable(),((JIntLiteral)accessor).intValue()); JVariableDefinition var=(JVariableDefinition)replaced.get(index); if(var==null) { var=toVar((JArrayAccessExpression)left,newRight); replaced.put(index,var); return new JVariableDeclarationStatement(null,var,null); } else { return new JAssignmentExpression(null,new JLocalVariableExpression(null,var),right); }
    public Object visitAssignmentExpression(JAssignmentExpression self,                                            JExpression left,                                            JExpression right) {	JExpression newRight=(JExpression)right.accept(this);	if (newRight!=null && newRight!=right) {	    self.setRight(newRight);	}	if(left instanceof JArrayAccessExpression) {	    JExpression prefix=((JArrayAccessExpression)left).getPrefix();	    JExpression accessor=((JArrayAccessExpression)left).getAccessor();	    if((prefix instanceof JLocalVariableExpression)&&(accessor instanceof JIntLiteral)&&(targets.containsKey(((JLocalVariableExpression)prefix).getVariable()))) {		JVariableDefinition var=toVar((JArrayAccessExpression)left,newRight);		replaced.put(new VarIndex(((JLocalVariableExpression)prefix).getVariable(),((JIntLiteral)accessor).intValue()),var);		return new JVariableDeclarationStatement(self.getTokenReference(),var,null);	    }	}	return self;    }