original_string: protected function makeClearedDataObject($objectClass, array $data, $parentKey = null)
      {
          /** @var AbstractDataObject $object */
          $object = new $objectClass();
          $object->clear();
  
          try {
              $object->setAttributes($data);
  
          } catch (ModelConfigurationDataException $e) {
  
              throw $e->setDotKey(
                  $parentKey . ($e->getDotKey() ? '.' . $e->getDotKey() : null)
              );
          }
  
          return $object;
      }
code: protected function makeClearedDataObject($objectClass, array $data, $parentKey = null)
      {
          /** @var AbstractDataObject $object */
          $object = new $objectClass();
          $object->clear();
  
          try {
              $object->setAttributes($data);
  
          } catch (ModelConfigurationDataException $e) {
  
              throw $e->setDotKey(
                  $parentKey . ($e->getDotKey() ? '.' . $e->getDotKey() : null)
              );
          }
  
          return $object;
      }
code_tokens: protected function makeClearedDataObject ( $ objectClass , array $ data , $ parentKey = null ) { /** @var AbstractDataObject $object */ $ object = new $ objectClass ( ) ; $ object -> clear ( ) ; try { $ object -> setAttributes ( $ data ) ; } catch ( ModelConfigurationDataException $ e ) { throw $ e -> setDotKey ( $ parentKey . ( $ e -> getDotKey ( ) ? '.' . $ e -> getDotKey ( ) : null ) ) ; } return $ object ; }
docstring: Makes a fresh dataobject with its defaults cleared before filling it with data.
  
  @param string      $objectClass
  @param array       $data
  @param null|string $parentKey
  @return AbstractDataObject
  @throws ModelConfigurationDataException
docstring_tokens: Makes a fresh dataobject with its defaults cleared before filling it with data .