Removes duplicated depsInfo from jsFiles if this info already present in
some of the parsed deps.js

@param depsFiles DepsInfo from deps.js dependencies
@param jsFiles DepsInfo from some of jsSources
503304
protected void cleanUpDuplicatedFiles(Map<String, DependencyInfo> depsFiles,
      Map<String, DependencyInfo> jsFiles) {
    Set<String> depsPathsCopy = new HashSet<>(depsFiles.keySet());
    for (String path : depsPathsCopy) {
      if (mergeStrategy != InclusionStrategy.WHEN_IN_SRCS) {
        jsFiles.remove(path);
      }
    }

    for (String path : jsFiles.keySet()) {
      // If a generated file appears in both the jsFiles and in depsFiles, then
      // remove it from depsFiles in order to get the full path the generated
      // file.
      depsFiles.remove(path);
    }
  }
1117237
def _remove_duplicate_slices(dicoms):
    
    # Loop overall files and build dict

    dicoms_dict = {}
    filtered_dicoms = []
    for dicom_ in dicoms:
        if tuple(dicom_.ImagePositionPatient) not in dicoms_dict:
            dicoms_dict[tuple(dicom_.ImagePositionPatient)] = dicom_
            filtered_dicoms.append(dicom_)
        else:
            if numpy.array_equal(dicom_.pixel_array,
                                 dicoms_dict[tuple(dicom_.ImagePositionPatient)].pixel_array):
                logger.warning('Removing duplicate slice from series')
            else:
                filtered_dicoms.append(dicom_)
    return filtered_dicoms
1327872
public void setDeleteFiles(java.util.Collection<DeleteFileEntry> deleteFiles) {
        if (deleteFiles == null) {
            this.deleteFiles = null;
            return;
        }

        this.deleteFiles = new java.util.ArrayList<DeleteFileEntry>(deleteFiles);
    }
26785
@GwtIncompatible("Unnecessary")
  public static ImmutableList<JSError> removeDuplicateZipEntries(
      List<SourceFile> sourceFiles, List<JsModuleSpec> jsModuleSpecs) throws IOException {
    ImmutableList.Builder<JSError> errors = ImmutableList.builder();
    Map<String, SourceFile> sourceFilesByName = new HashMap<>();
    Iterator<SourceFile> fileIterator = sourceFiles.iterator();
    int currentFileIndex = 0;
    Iterator<JsModuleSpec> moduleIterator = jsModuleSpecs.iterator();
    // Tracks the total number of js files for current module and all the previous modules.
    int cumulatedJsFileNum = 0;
    JsModuleSpec currentModule = null;
    while (fileIterator.hasNext()) {
      SourceFile sourceFile = fileIterator.next();
      currentFileIndex++;
      // Check whether we reached the next module.
      if (moduleIterator.hasNext() && currentFileIndex > cumulatedJsFileNum) {
        currentModule = moduleIterator.next();
        cumulatedJsFileNum += currentModule.numJsFiles;
      }
      String fullPath = sourceFile.getName();
      if (!fullPath.contains("!/")) {
        // Not a zip file
        continue;
      }
      String relativePath = fullPath.split("!")[1];
      if (!sourceFilesByName.containsKey(relativePath)) {
        sourceFilesByName.put(relativePath, sourceFile);
      } else {
        SourceFile firstSourceFile = sourceFilesByName.get(relativePath);
        if (firstSourceFile.getCode().equals(sourceFile.getCode())) {
          fileIterator.remove();
          if (currentModule != null) {
            currentModule.numJsFiles--;
          }
        } else {
          errors.add(
              JSError.make(
                  CONFLICTING_DUPLICATE_ZIP_CONTENTS,
                  firstSourceFile.getName(),
                  sourceFile.getName()));
        }
      }
    }
    return errors.build();
  }
163906
public function removeTmpFiles()
	{
		if (file_exists($this->getHTMLPath()))
		{
			@unlink($this->getHTMLPath());
		}
		if (file_exists($this->getPDFPath()))
		{
			@unlink($this->getPDFPath());
		}
	}
923130
function _deleteTmpFiles(files, done) {
        var keys;
        if (files) {
          keys = Object.keys(files);
        }
        if (keys && keys.length) {
          fs.unlink(files[keys[0]].path, function(err) {
                delete files[keys[0]];
                if (err) {
                  done(err);
                }
                else {
                  _deleteTmpFiles(files, done);
                }
            });
        }
        else {
          done(null);
        }
      }
228213
public static void refreshedFiles(String[] filePaths) {
    for (String filePath : filePaths) {
      IFile file = CommonServices.getFileSystem().getIFile(new File(filePath));
      if (file != null) {
        TypeSystem.refreshed(file);
      }
    }
  }
760298
function removeCachedFiles(params, cb) {
  //Cleaning Up Any Files Cached To Render The Submission.
  logger.debug("cacheFiles: mergeSubmissionFiles Removing Cached Files For PDF Generation: ", params.submissionFiles);
  async.eachSeries(params.submissionFiles || [], function(submissionFileDetails, cb) {
    logger.debug("Removing Cached File: ", submissionFileDetails);
    fs.unlink(submissionFileDetails.url, function(err) {
      if (err) {
        logger.error('Error Removing File At' + submissionFileDetails.url);
      }

      return cb();
    });
  }, cb);
}
71653
private void removeFileEntries(OMMapBufferEntry[] fileEntries) {
    if (fileEntries != null) {
      for (OMMapBufferEntry entry : fileEntries) {
        removeEntry(entry);
      }
    }
  }
999351
@Override
    public boolean fileDeleted(File file) {
        FileUtils.deleteQuietly(getOutputFile(file, "js"));
        FileUtils.deleteQuietly(getOutputFile(file, "js.map"));
        FileUtils.deleteQuietly(getOutputFile(file, "d.ts"));
        return true;
    }
54869
function removeDuplicates(files, duplicates) {
        var i;
        var ret = [];
        var found = {};

        if (duplicates) {
            for (i=0; i < duplicates.length; i++) {
                found[duplicates[i].dst] = true;
            }
        }

        for (i=0; i < files.length; i++) {
            if (!found[files[i].dst]) {
                found[files[i].dst] = true;
                ret.push(files[i]);
            }
        }
        return ret;
    }
148110
function (classpath, dependencies) {
            if (this.__cssDependencies[classpath]) {
                dependencies = this.__cssDependencies[classpath];
            }

            this.unloadClassPathDependencies(classpath, dependencies);
        }
311797
private function checkDuplicates(iterable $adapterFactories): void
    {
        $dupes = [];
        foreach ($adapterFactories as $adapter) {
            $type = strtolower($adapter->getType());
            if (array_key_exists($type, $dupes)) {
                throw new DuplicateFilesystemFactoryException($type);
            }

            $dupes[$type] = 1;
        }
    }
706795
@SuppressWarnings("checkstyle:npathcomplexity")
	public void removeSREs(ISREInstall... sres) {
		final ISREInstall defaultSRE = getDefaultSRE();
		final String defaultId = defaultSRE == null ? null : defaultSRE.getId();
		int defaultIndex = -1;
		if (defaultId != null) {
			for (int i = 0; defaultIndex == -1 && i < this.sreTable.getItemCount(); ++i) {
				if (defaultId.equals(
						((ISREInstall) this.sreTable.getItem(i).getData()).getId())) {
					defaultIndex = i;
				}
			}
		}
		final String normedDefaultId = Strings.nullToEmpty(defaultId);
		boolean defaultIsRemoved = false;
		for (final ISREInstall sre : sres) {
			if (this.sreArray.remove(sre) && sre.getId().equals(normedDefaultId)) {
				defaultIsRemoved = true;
			}
		}
		refreshSREListUI();
		// Update the default SRE
		if (defaultIsRemoved) {
			if (this.sreTable.getItemCount() == 0) {
				setSelection(null);
			} else {
				if (defaultIndex < 0) {
					defaultIndex = 0;
				} else if (defaultIndex >= this.sreTable.getItemCount()) {
					defaultIndex = this.sreTable.getItemCount() - 1;
				}
				setSelection(new StructuredSelection(
						this.sreTable.getItem(defaultIndex).getData()));
			}
		}
		this.sresList.refresh(true);
		if (defaultIsRemoved) {
			fireDefaultSREChanged();
		}
		updateUI();
	}
574239
public static void deleteFirst(@NonNull File[] files, @NonNull Comparator<File> sortedBy, int numFiles) {
    Arrays.sort(files, sortedBy);
    int size = Math.min(files.length, numFiles);
    for (int i = 0; i < size; i++) {
      if (!files[i].delete()) {
        Log.w(LOG_TAG, "Failed to delete file: " + files[i]);
      }
    }
  }
227840
protected int checkForChangedIncludeFiles(final Map<String, TargetInfo> targets) {
    int potentialTargets = 0;
    int definiteTargets = 0;
    Iterator<TargetInfo> targetEnum = targets.values().iterator();
    while (targetEnum.hasNext()) {
      final TargetInfo target = targetEnum.next();
      if (!target.getRebuild()) {
        potentialTargets++;
      } else {
        definiteTargets++;
      }
    }
    //
    // If there were remaining targets that
    // might be out of date
    //
    if (potentialTargets > 0) {
      log("Starting dependency analysis for " + Integer.toString(potentialTargets) + " files.");
      final DependencyTable dependencyTable = new DependencyTable(this._objDir);
      try {
        dependencyTable.load();
      } catch (final Exception ex) {
        log("Problem reading dependencies.xml: " + ex.toString());
      }
      targetEnum = targets.values().iterator();
      while (targetEnum.hasNext()) {
    	  final TargetInfo target = targetEnum.next();
    	  if (!target.getRebuild() && dependencyTable.needsRebuild(this, target, this.dependencyDepth)) {
    		  target.mustRebuild();
    	  }
      }
      dependencyTable.commit(this);
    }
    //
    // count files being rebuilt now
    //
    int currentTargets = 0;
    targetEnum = targets.values().iterator();
    while (targetEnum.hasNext()) {
      final TargetInfo target = targetEnum.next();
      if (target.getRebuild()) {
        currentTargets++;
      }
    }
    if (potentialTargets > 0) {
      log(Integer.toString(potentialTargets - currentTargets + definiteTargets) + " files are up to date.");
      log(Integer.toString(currentTargets - definiteTargets) + " files to be recompiled from dependency analysis.");
    }
    log(Integer.toString(currentTargets) + " total files to be compiled.");
    return currentTargets;
  }
1010682
protected void addJsFiles(JavaScriptObject files) {

        JsArray<CmsFileInfo> cmsFiles = files.cast();
        List<CmsFileInfo> fileObjects = new ArrayList<CmsFileInfo>();
        for (int i = 0; i < cmsFiles.length(); ++i) {
            fileObjects.add(cmsFiles.get(i));
        }
        addFiles(fileObjects);
    }