code: public static <T> T fill(T destination, Object source) {
          if (destination != source) {
              Class<?> stype = source.getClass();
              for (Field field: destination.getClass().getFields()) {
                  try {
                      Object value = field.get(destination);
                      if (value == null) {
                          field.set(destination, stype.getField(field.getName()).get(source));
                      }
                  } catch (Exception x) {
                  }
              }
          }
          return destination;
      }
docs: Fills empty, identically named public fields with values from another object.
  
  @param <T> the class of the destination object
  @param destination a destination object
  @param source a source object
  @return the same destination object with fields filled by source