##Java 7, 133 bytes
Java 7, 133 bytes
Object f(java.util.ArrayList<Long>a){for(int i=a.size();i-->1;)if(a.get(i)==a.get(i-1)){a.remove(i--);a.set(i,a.get(i)*2);}return a;}
Input is an ArrayList, and it just loops backwards, removing and doubling where necessary.
Object f(java.util.ArrayList<Long>a){
for(int i=a.size();i-->1;)
if(a.get(i)==a.get(i-1)){
a.remove(i--);
a.set(i,a.get(i)*2);
}
return a;
}