should this (and the others as well) be

if (operation.has(attribute.getName()) {

?