Source:
<code>public int add(InputRow row) throws IndexSizeExceededException { row = formatRow(row); if (row.getTimestampFromEpoch() < minTimestamp) { throw new IAE("Cannot add row[%s] because it is below the minTimestamp[%s]", row, new DateTime(minTimestamp)); } final List<String> rowDimensions = row.getDimensions(); String[][] dims; List<String[]> overflow = null; synchronized (dimensionOrder) { dims = new String[dimensionOrder.size()][]; for (String dimension : rowDimensions) { List<String> dimensionValues = row.getDimension(dimension); ColumnCapabilitiesImpl capabilities = columnCapabilities.get(dimension); if (capabilities == null) { capabilities = new ColumnCapabilitiesImpl(); capabilities.setType(ValueType.STRING); columnCapabilities.put(dimension, capabilities); } if (dimensionValues.size() > 1) { capabilities.setHasMultipleValues(true); } Integer index = dimensionOrder.get(dimension); if (index == null) { dimensionOrder.put(dimension, dimensionOrder.size()); dimensions.add(dimension); if (overflow == null) { overflow = Lists.newArrayList(); } overflow.add(getDimVals(dimValues.add(dimension), dimensionValues)); } else if (index > dims.length || dims[index] != null) { <START> throw new ISE("Dimension: \"" + dimension + "\" occured more than once in InputRow"); <END> } else { dims[index] = getDimVals(dimValues.get(dimension), dimensionValues); } } } if (overflow != null) { String[][] newDims = new String[dims.length + overflow.size()][]; System.arraycopy(dims, 0, newDims, 0, dims.length); for (int i = 0; i < overflow.size(); ++i) { newDims[dims.length + i] = overflow.get(i); } dims = newDims; } final TimeAndDims key = new TimeAndDims(Math.max(gran.truncate(row.getTimestampFromEpoch()), minTimestamp), dims); final Integer rv = addToFacts(metrics, deserializeComplexMetrics, row, numEntries, key, in, rowSupplier); updateMaxIngestedTime(row.getTimestamp()); return rv; }</code><technical_language>string interpolation new ISE(format, ...)</technical_language>

Target:
public int add(InputRow row) throws IndexSizeExceededException { row = formatRow(row); if (row.getTimestampFromEpoch() < minTimestamp) { throw new IAE("Cannot add row[%s] because it is below the minTimestamp[%s]", row, new DateTime(minTimestamp)); } final List<String> rowDimensions = row.getDimensions(); String[][] dims; List<String[]> overflow = null; synchronized (dimensionOrder) { dims = new String[dimensionOrder.size()][]; for (String dimension : rowDimensions) { List<String> dimensionValues = row.getDimension(dimension); ColumnCapabilitiesImpl capabilities = columnCapabilities.get(dimension); if (capabilities == null) { capabilities = new ColumnCapabilitiesImpl(); capabilities.setType(ValueType.STRING); columnCapabilities.put(dimension, capabilities); } if (dimensionValues.size() > 1) { capabilities.setHasMultipleValues(true); } Integer index = dimensionOrder.get(dimension); if (index == null) { dimensionOrder.put(dimension, dimensionOrder.size()); dimensions.add(dimension); if (overflow == null) { overflow = Lists.newArrayList(); } overflow.add(getDimVals(dimValues.add(dimension), dimensionValues)); } else if (index > dims.length || dims[index] != null) { throw new ISE("Dimension[%s] occurred more than once in InputRow", dimension); } else { dims[index] = getDimVals(dimValues.get(dimension), dimensionValues); } } } if (overflow != null) { String[][] newDims = new String[dims.length + overflow.size()][]; System.arraycopy(dims, 0, newDims, 0, dims.length); for (int i = 0; i < overflow.size(); ++i) { newDims[dims.length + i] = overflow.get(i); } dims = newDims; } final TimeAndDims key = new TimeAndDims(Math.max(gran.truncate(row.getTimestampFromEpoch()), minTimestamp), dims); final Integer rv = addToFacts(metrics, deserializeComplexMetrics, row, numEntries, key, in, rowSupplier); updateMaxIngestedTime(row.getTimestamp()); return rv; }