Overview
Introduction
Test data, seed lists, and sample datasets often need the same values repeated a fixed number of times, whether for load testing, generating duplicate-heavy data, or padding out a small sample.
This tool takes a list of integers and a repeat count, and expands every value into that many consecutive copies.
What Is Integer Duplicator?
A batch list-expansion tool: every integer in the input is written out `Times` times, each repetition on its own output line.
Repetitions are grouped by the original value's position, so the output preserves the input's overall order while expanding its length.
How Integer Duplicator Works
Each line is parsed as an integer, blank lines are skipped, and any invalid line stops the tool with an error before any duplication happens.
Times is validated as a whole number of at least 1.
For each parsed value in order, the tool pushes that value's string form onto the output Times times before moving to the next input value.
When To Use Integer Duplicator
Use it to generate repeated test or seed data from a smaller list of representative values.
It's useful for building weighted sample sets, where repeating a value more times makes it appear more often in downstream random selection or shuffling.
Often used alongside Integer Digit Duplicator and Integer Rotator.
Features
Advantages
- Output length is fully predictable: exactly input-line-count times Times.
- Keeps the grouping of repeats together by source value, making it easy to see which copies came from which original line.
Limitations
- Applies the same repeat count to every value; it can't repeat different lines a different number of times in one run.
- Very large lists combined with a large Times value can produce a very long output; there's no automatic capping.
Examples
Best Practices & Notes
Best Practices
- Keep Times reasonable for large input lists, since the output size grows linearly with both list length and Times.
- Use this after Integer Filter if you only want to duplicate a subset of values matching some condition.
Developer Notes
The implementation is a straightforward nested loop (outer loop over parsed values, inner loop pushing the value's string form `times` times), which keeps memory and complexity linear in the final output size.
Integer Duplicator Use Cases
- Generating repeated seed or test data from a small representative sample
- Building a weighted list for downstream random shuffling or sampling
- Padding a short list out to a required minimum row count for a demo or template
Common Mistakes
- Expecting the duplicated copies to be interleaved (1,2,1,2) rather than grouped (1,1,2,2) — the tool always groups repeats by their source value.
- Confusing this with Integer Digit Duplicator, which repeats digits within a number rather than the whole number as separate lines.
Tips
- Set Times to 1 to quickly verify your list parses cleanly without actually duplicating anything.
- Combine with Integer Rotator afterward if you want the duplicated list reordered in a specific cyclic pattern.