Move these key fields to the other file (return true if they were already the same!).
(Not tested!)
198608
public boolean setupKey(boolean reverse)
    {
        boolean sameFlag = true;
        for (int index = 1; index < m_rgiFldLeft.length; index++)
        {
            BaseField fldLeft = this.getLeftField(index);
            BaseField fldRight = this.getRightField(index);
            if (fldRight == null)
                break;
            if (fldLeft == fldRight)
            {
            }
            else
            {
                sameFlag = false;
                if (reverse)
                {
                    if (fldLeft != null)
                        fldLeft.moveFieldToThis(fldRight, DBConstants.DONT_DISPLAY, DBConstants.SCREEN_MOVE);
                }
                else
                {
                    if (fldLeft == null)
                        fldRight.setString(this.getLeftFieldNameOrValue(index, true, true), DBConstants.DONT_DISPLAY, DBConstants.SCREEN_MOVE);
                    else
                        fldRight.moveFieldToThis(fldLeft, DBConstants.DONT_DISPLAY, DBConstants.SCREEN_MOVE);
                }
            }
        }
        return sameFlag;
    }
389121
def move(self, source, destination):
        
        if source.isfile():
            source.copy(destination)
            source.remove()
        else:
            source.copy(destination, recursive=True)
            source.remove('r')
713733
public void copyFrom(PolicyInfo other) {
    if (other.conf != null) {
      this.conf = other.conf;
    }
    if (other.policyName != null && other.policyName.length() > 0) {
      this.policyName = other.policyName;
    }
    if (other.description != null && other.description.length() > 0) {
      this.description = other.description;
    }
    if (other.codecId != null) {
      this.codecId = other.codecId;
    }
    if (other.srcPath != null) {
      this.srcPath = other.srcPath;
    }
    if (other.fileListPath != null) {
      this.fileListPath = other.fileListPath;
    }
    for (Object key : other.properties.keySet()) {
      String skey = (String) key;
      this.properties.setProperty(skey, other.properties.getProperty(skey));
    }
    LOG.info(this.policyName + ".codecId " + codecId);
    LOG.info(this.policyName + ".fileListPath " + fileListPath);
    LOG.info(this.policyName + ".srcpath " + srcPath);
  }
478125
def copy(self, keep_fields=None):
        
        keep_fields = self.fields.keys() or keep_fields
        return self.__class__(OrderedDict([(name, data[:]) for name, data in self.fields.items() if name in keep_fields]))
891651
def save_key_file(self):
        """"""
        if self.client_key is None:
            return

        if self.key_file_path:
            key_file_path = self.key_file_path
        else:
            key_file_path = self._get_key_file_path()

        logger.debug('save keyfile to %s', key_file_path);

        with open(key_file_path, 'w+') as f:
            raw_data = f.read()
            key_dict = {}

            if raw_data:
                key_dict = json.loads(raw_data)

            key_dict[self.ip] = self.client_key

            f.write(json.dumps(key_dict))
1168646
def add_fields(self, fields):
        
        for k, v in fields.items():
            if k not in self._fields:
                self._fields[k] = v
413875
public function moveDataFiles()
    {
        $this->config->get('moveable')->each(function ($to, $from) {
            $this->moveDataFile($from, $to);
        });
    }
787484
public static <T, K> boolean move(List<T> list, K key,
			Function<T, K> keyMapper, int n) {
		if (n == 0)
			return false;

		if (n > 0)
			return moveDown(list, key, keyMapper, n);

		return moveUp(list, key, keyMapper, -n);
	}
131386
def move(self, filename, target):
        '''
        
        '''
        self.copy(filename, target)
        self.delete(filename)
385472
def copy(self, key=None):
        
        other = self.__class__(
            self.__iter__(),
            self.maxlen,
            redis=self.redis,
            key=key,
            writeback=self.writeback,
        )

        return other
615432
def copy_from(self, other):
        
        # Need to copy all attributes, fields, relations
        self.__attributes__ = {k: v.copy() for k, v in other.__attributes__.items()}
        self.__fields__ = {k: v.copy() for k, v in other.__fields__.items()}
        self.__relations__ = {k: v.copy() for k, v in other.__relations__.items()}
        self.maps = {k: m.copy() for k, m in other.maps.items()}
        self.dimensions = other.dimensions.copy()
769797
public boolean copyToScan(UpdateScan s) {
		if (!this.next())
			return false;
		s.insert();
		for (String fldName : sch.fields()) {
			s.setVal(fldName, this.getVal(fldName));
		}
		return true;
	}
600666
public void setupKeys()
    {
        KeyAreaInfo keyArea = null;
        keyArea = new KeyAreaInfo(this, Constants.UNIQUE, ID_KEY);
        keyArea.addKeyField(ID, Constants.ASCENDING);
        keyArea = new KeyAreaInfo(this, Constants.NOT_UNIQUE, FIELD_FILE_NAME_KEY);
        keyArea.addKeyField(FIELD_FILE_NAME, Constants.ASCENDING);
        keyArea.addKeyField(FIELD_SEQ_NO, Constants.ASCENDING);
        keyArea = new KeyAreaInfo(this, Constants.UNIQUE, FIELD_NAME_KEY);
        keyArea.addKeyField(FIELD_FILE_NAME, Constants.ASCENDING);
        keyArea.addKeyField(FIELD_NAME, Constants.ASCENDING);
    }
1128002
protected function move()
    {
        if ($this->compress) {
            $gzip = new Compress($this->config);
            $gzip->pack($this->temp, $this->config->file);
            unlink($this->temp);
            return true;
        }

        if (@rename($this->temp, $this->config->file)) {
            return true;
        }

        if (@copy($this->temp, $this->config->file) && unlink($this->temp)) {
            return true;
        }

        throw new Exception('Unable to move the temporary file.');
    }
172084
public static void move(String srcPath, String dstPath) throws IOException {
    Files.move(Paths.get(srcPath), Paths.get(dstPath), StandardCopyOption.REPLACE_EXISTING);
  }
537322
def create_from(cls, another, **kwargs):
        
        reused_fields = {}
        for field, value in another.get_fields():
            if field in cls.FIELDS:
                reused_fields[field] = value
        reused_fields.update(kwargs)
        return cls(**reused_fields)
1098918
private void copyKeys(int upToKeyPosition)
    {
        if (copyFromKeyPosition >= upToKeyPosition)
            return;

        int len = upToKeyPosition - copyFromKeyPosition;
        assert len <= FAN_FACTOR : upToKeyPosition + "," + copyFromKeyPosition;

        ensureRoom(buildKeyPosition + len);
        if (len > 0)
        {
            System.arraycopy(copyFrom, copyFromKeyPosition, buildKeys, buildKeyPosition, len);
            copyFromKeyPosition = upToKeyPosition;
            buildKeyPosition += len;
        }
    }