#fixed code
                             public DuplicateResult findDuplicates(State state)
	{
		DuplicateResult result = new DuplicateResult(parameters);

		List<FileState> fileStates = new ArrayList<>(state.getFileStates());
		Collections.sort(fileStates, hashComparator);

		List<FileState> duplicatedFiles = new ArrayList<>();
		FileHash previousFileHash = new FileHash(FileState.NO_HASH, FileState.NO_HASH, FileState.NO_HASH);
		for (FileState fileState : fileStates)
		{
			if (!previousFileHash.equals(fileState.getFileHash()))
			{
				result.addDuplicatedFiles(duplicatedFiles);
				duplicatedFiles.clear();
			}

			previousFileHash = fileState.getFileHash();
			duplicatedFiles.add(fileState);
		}
		result.addDuplicatedFiles(duplicatedFiles);

		return result;
	}
#vulnerable code 
                             public DuplicateResult findDuplicates(State state)
	{
		DuplicateResult result = new DuplicateResult(parameters);

		List<FileState> fileStates = new ArrayList<>(state.getFileStates());
		Collections.sort(fileStates, fullHashComparator);

		FileHash previousHash = new FileHash(FileState.NO_HASH, FileState.NO_HASH, FileState.NO_HASH);
		for (FileState fileState : fileStates)
		{
			if (!previousHash.equals(fileState.getFileHash()))
			{
				result.addDuplicatedFiles(duplicatedFiles);
				duplicatedFiles.clear();
			}

			previousHash = fileState.getFileHash();
			duplicatedFiles.add(fileState);
		}
		result.addDuplicatedFiles(duplicatedFiles);

		return result;
	} 
                            #location 11 
                            #vulnerability type NULL_DEREFERENCE