public static ElementInMove_c resolveInstance(
      ModelRoot modelRoot,
      java.util.UUID p_m_elementid,
      java.util.UUID p_m_diagramid,
      float p_m_startingx,
      float p_m_startingy) {
    InstanceList instances = modelRoot.getInstanceList(ElementInMove_c.class);
    ElementInMove_c source = null;
    synchronized (instances) {
      Object[] key = {p_m_elementid, p_m_diagramid};
      source = (ElementInMove_c) instances.get(key);
      if (source != null && !modelRoot.isCompareRoot()) {
        source.convertFromProxy();
        source.batchUnrelate();
        // pre-process the uuid so that we re-use null uuid instance rather then creating a new one.
        source.m_elementid = IdAssigner.preprocessUUID(p_m_elementid);
        // pre-process the uuid so that we re-use null uuid instance rather then creating a new one.
        source.m_diagramid = IdAssigner.preprocessUUID(p_m_diagramid);
        source.m_startingx = p_m_startingx;
        source.m_startingy = p_m_startingy;

        return source;
      }
    }
    // there is no instance matching the id
    ElementInMove_c new_inst =
        new ElementInMove_c(modelRoot, p_m_elementid, p_m_diagramid, p_m_startingx, p_m_startingy);
    return new_inst;
  }