Set the filelists of all RunSetResult elements so that they contain the same files
    in the same order. For missing files a dummy element is inserted.
510827
def merge_task_lists(runset_results, tasks):
    
    for runset in runset_results:
        # create mapping from id to RunResult object
        # Use reversed list such that the first instance of equal tasks end up in dic
        dic = dict([(run_result.task_id, run_result) for run_result in reversed(runset.results)])
        runset.results = [] # clear and repopulate results
        for task in tasks:
            run_result = dic.get(task)
            if run_result is None:
                logging.info("    No result for task '%s' in '%s'.",
                             task[0], Util.prettylist(runset.attributes['filename']))
                # create an empty dummy element
                run_result = RunResult(task, None, result.CATEGORY_MISSING, None, None,
                                       runset.columns, [None]*len(runset.columns))
            runset.results.append(run_result)
109741
public void setFileSystemIds(java.util.Collection<String> fileSystemIds) {
        if (fileSystemIds == null) {
            this.fileSystemIds = null;
            return;
        }

        this.fileSystemIds = new java.util.ArrayList<String>(fileSystemIds);
    }
1317615
public void setRuns(java.util.Collection<Run> runs) {
        if (runs == null) {
            this.runs = null;
            return;
        }

        this.runs = new java.util.ArrayList<Run>(runs);
    }
395723
public void pollAllToList(List<T> retList) {
    while (head != null) {
      retList.add(head.element);
      head = head.after;
    }
    this.clear();
  }
1245506
protected void addFiles(List<CmsFileInfo> fileInfos) {

        if (fileInfos != null) {
            for (CmsFileInfo file : fileInfos) {

                // store all files
                m_allFiles.put(file.getFileName(), file);

                // add those files to the list of files to upload that potential candidates
                if (!isTooLarge(file) && (file.getFileSize() != 0)) {
                    m_filesToUpload.put(file.getFileName(), file);
                }

                // remove those files from the list to upload that were previously unchecked by the user
                if ((m_listItems.get(file.getFileName()) != null)
                    && (m_listItems.get(file.getFileName()).getCheckBox() != null)
                    && !m_listItems.get(file.getFileName()).getCheckBox().isChecked()) {
                    m_filesToUpload.remove(file.getFileName());
                }
            }

            // now rebuild the list: handle all files
            m_fileList.clearList();
            List<String> sortedFileNames = new ArrayList<String>(m_allFiles.keySet());
            Collections.sort(sortedFileNames, String.CASE_INSENSITIVE_ORDER);
            for (String filename : sortedFileNames) {
                CmsFileInfo file = m_allFiles.get(filename);
                addFileToList(file, false, false, isTooLarge(file));
            }
            doResize();
        }
        loadAndShow();
    }
917584
public void initialise(File[] files, ClassLoader loader) throws MalformedURLException {
        _loader= loader;
        
        // TODO: remove this debugging stuff
        _filters= new LinkedList<IFilter>();
        _filters.add(new IgnoreFilter());
        _filters.add(new ServiceFilter());
//        _filters.add(new AgentElementFilter());
//        _filters.add(new NodeFilter());
//        _filters.add(new AgentFilter());
        
        // initialise enumerators
        _classEnumerations= new LinkedList<Enumeration<Class<?>>>();
        for(File current : files) {
            if(current.isDirectory()) {
                _classEnumerations.add(new DirectoryClassEnumerator(current, _loader));
            } else {
                _classEnumerations.add(new ArchiveClassEnumerator(current, _loader));
            }
        }
    }
696682
public ValidationPlanResult append(Collection<ValidationResult> results) {
		if (results == null) {
			return this;
		}
		for (ValidationResult message : results) {
			addResult(message);
		}
		return this;
	}
505487
public void setByteMatchSets(java.util.Collection<ByteMatchSetSummary> byteMatchSets) {
        if (byteMatchSets == null) {
            this.byteMatchSets = null;
            return;
        }

        this.byteMatchSets = new java.util.ArrayList<ByteMatchSetSummary>(byteMatchSets);
    }
994653
def append(self, resultFile, resultElem, all_columns=False):
        
        self._xml_results += [(result, resultFile) for result in _get_run_tags_from_xml(resultElem)]
        for attrib, values in RunSetResult._extract_attributes_from_result(resultFile, resultElem).items():
            self.attributes[attrib].extend(values)

        if not self.columns:
            self.columns = RunSetResult._extract_existing_columns_from_result(resultFile, resultElem, all_columns)
722016
public void setReplicationTaskAssessmentResults(java.util.Collection<ReplicationTaskAssessmentResult> replicationTaskAssessmentResults) {
        if (replicationTaskAssessmentResults == null) {
            this.replicationTaskAssessmentResults = null;
            return;
        }

        this.replicationTaskAssessmentResults = new java.util.ArrayList<ReplicationTaskAssessmentResult>(replicationTaskAssessmentResults);
    }
874567
private void moveNextResults(boolean clearPreviousResults) {
        if (clearPreviousResults) {
            allResults.clear();
        }
        allResults.addAll(nextResults);
        nextResults.clear();
    }
1327872
public void setDeleteFiles(java.util.Collection<DeleteFileEntry> deleteFiles) {
        if (deleteFiles == null) {
            this.deleteFiles = null;
            return;
        }

        this.deleteFiles = new java.util.ArrayList<DeleteFileEntry>(deleteFiles);
    }
1014073
private function _setResults( $extended = TRUE )
    {
        $this->results                 = [ ];
        $this->results[ 'file_count' ] = count( $this->fileHandles );
        $this->results[ 'dir_count' ]  = count( $this->dirHandles );
        $this->results[ 'link_count' ] = count( $this->linkHandles );

        if ( $extended )
        {
            $this->results[ 'files' ] = $this->fileHandles;
            $this->results[ 'dirs' ]  = $this->dirHandles;
            $this->results[ 'links' ] = $this->linkHandles;
        }
    }
447120
private void populateFileList(ResourceFileList list, File root, boolean recurse) 
	throws IOException {
		if(root.isDirectory()) {
			File[] files = root.listFiles();
			if(files != null) {
				for(File file : files) {
					if(file.isFile() && filter.accept(root, file.getName())) {
						ResourceFileLocation location = new ResourceFileLocation(
								file.getName(),file.getAbsolutePath());
						list.add(location);
					} else if(recurse && file.isDirectory()){
						populateFileList(list, file, recurse);
					}
				}
			}
		} else {
			LOGGER.warning(root.getAbsolutePath() +	" is not a directory.");
			return;
		}
	}
225721
private void copyResources( List fileSets )
        throws MojoExecutionException
    {
        final String[] emptyStrArray = {};
        
        for ( Iterator it = fileSets.iterator(); it.hasNext(); )
        {
            FileSet fileSet = (FileSet) it.next();

            File resourceDirectory = new File( fileSet.getDirectory() );
            if ( !resourceDirectory.isAbsolute() )
            {
                resourceDirectory = new File( project.getBasedir(), resourceDirectory.getPath() );
            }

            if ( !resourceDirectory.exists() )
            {
                getLog().info( "Additional resource directory does not exist: " + resourceDirectory );
                continue;
            }

            DirectoryScanner scanner = new DirectoryScanner();

            scanner.setBasedir( resourceDirectory );
            if ( fileSet.getIncludes() != null && !fileSet.getIncludes().isEmpty() )
            {
                scanner.setIncludes( (String[]) fileSet.getIncludes().toArray( emptyStrArray ) );
            }
            else
            {
                scanner.setIncludes( DEFAULT_INCLUDES );
            }

            if ( fileSet.getExcludes() != null && !fileSet.getExcludes().isEmpty() )
            {
                scanner.setExcludes( (String[]) fileSet.getExcludes().toArray( emptyStrArray ) );
            }

            if (fileSet.isUseDefaultExcludes())
            {
                scanner.addDefaultExcludes();
            }

            scanner.scan();

            List includedFiles = Arrays.asList( scanner.getIncludedFiles() );

            getLog().info( "Copying " + includedFiles.size() + " additional resource"
                           + ( includedFiles.size() > 1 ? "s" : "" ) );

            for ( Iterator j = includedFiles.iterator(); j.hasNext(); )
            {
                String destination = (String) j.next();
                File source = new File( resourceDirectory, destination );
                File destinationFile = new File( buildDirectory, destination );

                if ( !destinationFile.getParentFile().exists() )
                {
                    destinationFile.getParentFile().mkdirs();
                }

                try
                {
                    FileUtils.copyFile(source, destinationFile);
                }
                catch ( IOException e )
                {
                    throw new MojoExecutionException( "Error copying additional resource " + source, e );
                }
            }
        }
    }
1338418
def load_results(result_files, options, run_set_id=None, columns=None,
                 columns_relevant_for_diff=set()):
    """"""
    return parallel.map(
        load_result,
        result_files,
        itertools.repeat(options),
        itertools.repeat(run_set_id),
        itertools.repeat(columns),
        itertools.repeat(columns_relevant_for_diff))
806887
public void setFileSystems(java.util.Collection<FileSystem> fileSystems) {
        if (fileSystems == null) {
            this.fileSystems = null;
            return;
        }

        this.fileSystems = new java.util.ArrayList<FileSystem>(fileSystems);
    }