refactoring for DirectoryProcessor (remove duplicate blocks for data processors)