File with nodes renaming mapping:

        Node,Comment
        arm-build1,remove
        arm-build2,keep
        ericsson-build3,merge into ericsson-build1
        ....

        Once set in the next enrichment the rename will be done
500362
def set_jenkins_rename_file(self, nodes_rename_file):
        
        self.nodes_rename_file = nodes_rename_file
        self.__load_node_renames()
        logger.info("Jenkis node rename file active: %s", nodes_rename_file)
1234210
public boolean rename(final File from, final File to) {
    boolean renamed = false;
    if (this.isWriteable(from)) {
      renamed = from.renameTo(to);
    } else {
      LogLog.debug(from + " is not writeable for rename (retrying)");
    }
    if (!renamed) {
      from.renameTo(to);
      renamed = (!from.exists());
    }
    return renamed;
  }
1016781
function rename(source, destination) {
  const parent = path.dirname(destination);
  if (exists(destination)) {
    if (isDirectory(destination)) {
      destination = path.join(destination, path.basename(source));
    } else {
      if (isDirectory(source)) {
        throw new Error(`Cannot rename directory ${source} into existing file ${destination}`);
      }
    }
  } else if (!exists(parent)) {
    mkdir(parent);
  }
  try {
    fs.renameSync(source, destination);
  } catch (e) {
    if (e.code !== 'EXDEV') throw e;
    // Fallback for moving across devices
    copy(source, destination);
    fileDelete(source);
  }
}
1062603
def renamed_tree(self, source, dest):
        """"""
        dirname = osp.abspath(to_text_string(source))
        tofile = to_text_string(dest)
        for fname in self.get_filenames():
            if osp.abspath(fname).startswith(dirname):
                new_filename = fname.replace(dirname, tofile)
                self.renamed(source=fname, dest=new_filename)
17921
private void removeDataNode(DiffEntry change) {
    if (checkFilePath(change.getOldPath(), NODE_FILE_DEPTH)) {
      Path nodeFilePath = new Path(this.repositoryDir, change.getOldPath());
      Config config = getNodeConfigWithOverrides(ConfigFactory.empty(), nodeFilePath);
      String nodeId = config.getString(FlowGraphConfigurationKeys.DATA_NODE_ID_KEY);
      if (!this.flowGraph.deleteDataNode(nodeId)) {
        log.warn("Could not remove DataNode {} from FlowGraph; skipping", nodeId);
      } else {
        log.info("Removed DataNode {} from FlowGraph", nodeId);
      }
    }
  }
1009313
public void renameAttachmentTo(String newAttachmentName) throws Exception {
		JSONObject doc = documentDescriptor.getJson();
		JSONObject _attachments = doc.optJSONObject("_attachments");
		JSONObject nunaliit_attachments = doc.getJSONObject(UploadConstants.KEY_DOC_ATTACHMENTS);
		JSONObject files = nunaliit_attachments.getJSONObject("files");

		// Verify no collision within nunaliit_attachments.files
		{
			Object obj = files.opt(newAttachmentName);
			if( null != obj ){
				throw new Exception("Can not rename attachment because of name collision");
			}
		}
		
		// Verify no collision within _attachments
		if( null != _attachments ){
			Object obj = _attachments.opt(newAttachmentName);
			if( null != obj ){
				throw new Exception("Can not rename attachment because of name collision");
			}
		}

		// Not allowed to move a stub		
		if( null != _attachments ){
			JSONObject att = _attachments.optJSONObject(attName);
			if( null != att ){
				throw new Exception("Can not rename attachment descriptor because file is already attached");
			}
		}
		
		// Move descriptor to new name
		String oldAttachmentName = attName;
		JSONObject descriptor = files.getJSONObject(oldAttachmentName);
		files.remove(oldAttachmentName);
		files.put(newAttachmentName, descriptor);
		attName = newAttachmentName;
		setStringAttribute(UploadConstants.ATTACHMENT_NAME_KEY,newAttachmentName);
		
		// Loop through all attachment descriptors, updating "source", "thumbnail"
		// and "original" attributes
		{
			Iterator<?> it = files.keys();
			while( it.hasNext() ){
				Object objKey = it.next();
				if( objKey instanceof String ){
					String key = (String)objKey;
					JSONObject att = files.getJSONObject(key);
					
					{
						String value = att.optString("source", null);
						if( oldAttachmentName.equals(value) ){
							att.put("source", newAttachmentName);
						}
					}

					{
						String value = att.optString("thumbnail", null);
						if( oldAttachmentName.equals(value) ){
							att.put("thumbnail", newAttachmentName);
						}
					}

					{
						String value = att.optString("originalAttachment", null);
						if( oldAttachmentName.equals(value) ){
							att.put("original", newAttachmentName);
						}
					}
				}
			}
		}
	}
823993
private void finalizeNameAssignment(Assignment a, String newName) {
    a.setNewName(newName);

    // Keep track of the mapping
    renameMap.put(a.oldName, newName);
  }
959895
public void rename(String newName) {
        URL url = FILE_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
        BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "PUT");

        JsonObject updateInfo = new JsonObject();
        updateInfo.add("name", newName);

        request.setBody(updateInfo.toString());
        BoxAPIResponse response = request.send();
        response.disconnect();
    }
566898
function renamePackageFiles () {
  return new Promise((resolve) => {
    const parents = 'android/app/src/main/java/'
    const oldPath = fullPath(parents + oldInfo.packageID.split('.').join('/'))
    const newPath = fullPath(parents + newInfo.packageID.split('.').join('/'))

    console.log('Renaming android path...')
    console.log(`From ${relative(oldPath)}`)
    fs.renameSync(oldPath, newPath)
    console.log(`  to ${relative(newPath)}`)

    resolve()
  })
}
887081
def __rename_directory(self, source, target):
        

        for node in itertools.chain(self.__script_editor.model.get_project_nodes(source),
                                    self.__script_editor.model.get_directory_nodes(source)):
            self.__script_editor.model.unregister_project_nodes(node)
            self.__script_editor.unregister_node_path(node)
            self.__rename_path(source, target)
            node.name = os.path.basename(target)
            node.path = target
            self.__script_editor.model.node_changed(node)
            self.__script_editor.register_node_path(node)
            self.__script_editor.model.set_project_nodes(node)
1109302
protected void redefine(int nodetype, String namespace, String localName, int hash)
    {
      this.nodetype = nodetype;
      this.namespace = namespace;
      this.localName = localName;
      this.hash = hash;
    }
665217
def tidy(fnames):
    
    for fname in fnames:
        try:
            node = nrml.read(fname)
        except ValueError as err:
            print(err)
            return
        with open(fname + '.bak', 'wb') as f:
            f.write(open(fname, 'rb').read())
        with open(fname, 'wb') as f:
            # make sure the xmlns i.e. the NRML version is unchanged
            nrml.write(node.nodes, f, writers.FIVEDIGITS, xmlns=node['xmlns'])
        print('Reformatted %s, original left in %s.bak' % (fname, fname))
793667
function nodeSBindUpdate(node, sBind, changes, updater) {
    if (sBind) {
        var len = changes.length;

        while (len--) {
            if (changeExprCompare(changes[len].expr, sBind.value, node.scope)) {
                var newBindData = evalExpr(sBind.value, node.scope, node.owner);
                var keys = unionKeys(newBindData, node._sbindData);

                for (var i = 0, l = keys.length; i < l; i++) {
                    var key = keys[i];
                    var value = newBindData[key];

                    if (value !== node._sbindData[key]) {
                        updater(key, value);
                    }
                }

                node._sbindData = newBindData;
                break;
            }

        }
    }
}
541433
async function renameOrDelete(srcPath, targetPath) {
  if (srcPath === targetPath) {
    return;
  }
  const srcExists = await fs.exists(srcPath);
  if (!srcExists) {
    return;
  }
  const targetExists = await fs.exists(targetPath);
  // if target file exists, then throw
  // because the target file always be renamed first.
  if (targetExists) {
    const err = new Error(`targetFile ${targetPath} exists!!!`);
    throw err;
  }
  await fs.rename(srcPath, targetPath);
}
259488
def rename(self, name):
        
        for node in self.nodes:
            node.rename(name)
        self.update(name=name)
        self.vpn.rename(name)
1037473
def _rename_file(self, line=""):
        

        if not self.all_ontologies:
            self._help_nofiles()
        else:
            out = []
            for each in self.all_ontologies:
                if line in each:
                    out += [each]
            choice = self._selectFromList(out, line)
            if choice:
                fullpath = self.LOCAL_MODELS + "/" + choice
                print(fullpath)
                if os.path.isfile(fullpath):

                    self._print("--------------")
                    self._print("Please enter a new name for <%s>, including the extension (blank=abort)"
                                % choice)
                    var = input()
                    if var:
                        try:
                            os.rename(fullpath, self.LOCAL_MODELS + "/" + var)
                            manager.rename_pickled_ontology(choice, var)
                            self._print("<%s> was renamed succesfully." % choice)
                            self.all_ontologies = manager.get_localontologies()
                        except:
                            self._print("Not a valid name. An error occurred.")
                            return
                    else:
                        return

                else:
                    self._print("File not found.")
                # delete
                if self.current and self.current['fullpath'] == fullpath:
                    self.current = None
                    self.currentEntity = None
                    self.prompt = _get_prompt()

        return
502743
function renameFilesIOS (oldPackageName, newPackageName) {
  const filesAndFolders = [
    `ios/${oldPackageName}.xcodeproj/xcshareddata/xcschemes/<?>-tvOS.xcscheme`,
    `ios/${oldPackageName}.xcodeproj/xcshareddata/xcschemes/<?>.xcscheme`,
    'ios/<?>.xcodeproj',
    `ios/${oldPackageName}/<?>.entitlements`,
    'ios/<?>',
    'ios/<?>-tvOS',
    'ios/<?>-tvOSTests',
    `ios/${oldPackageName}Tests/<?>Tests.m`,
    'ios/<?>Tests',
    'ios/<?>.xcworkspace',
  ]

  for (let i = 0; i < filesAndFolders.length; i++) {
    const element = filesAndFolders[i]
    const srcFile = fullPath(element.replace('<?>', oldPackageName))

    console.log(`From ${relative(srcFile)}`)
    if (fs.existsSync(srcFile)) {
      const destFile = fullPath(element.replace('<?>', newPackageName))

      fs.renameSync(srcFile, destFile)
      console.log(`  to ${relative(destFile)}`)
    } else {
      console.log(`${srcFile} does not exists.`)
    }
  }
}