yijunyu/c-to-rust huggingface dataset:
// Original:
public String format(Passage passages[], String content) {StringBuilder sb = new StringBuilder();int pos = 0;for (Passage passage : passages) {if (passage.getStartOffset() > pos && pos > 0) {sb.append(ellipsis);}pos = passage.getStartOffset();for (int i = 0; i < passage.getNumMatches(); i++) {int start = passage.getMatchStarts()[i];assert start >= pos && start < passage.getEndOffset();append(sb, content, pos, start);int end = passage.getMatchEnds()[i];assert end > start;while (i + 1 < passage.getNumMatches() && passage.getMatchStarts()[i+1] < end) {end = passage.getMatchEnds()[++i];}end = Math.min(end, passage.getEndOffset()); sb.append(preTag);append(sb, content, start, end);sb.append(postTag);pos = end;}append(sb, content, pos, Math.max(pos, passage.getEndOffset()));pos = passage.getEndOffset();}return sb.toString();}

// Translation:
public override object Format(Passage[] passages, string content){StringBuilder sb = new StringBuilder();int pos = 0;foreach (Passage passage in passages){if (passage.startOffset > pos && pos > 0){sb.Append(m_ellipsis);}pos = passage.startOffset;for (int i = 0; i < passage.numMatches; i++){int start = passage.matchStarts[i];int end = passage.matchEnds[i];if (start > pos){Append(sb, content, pos, start);}if (end > pos){sb.Append(m_preTag);Append(sb, content, Math.Max(pos, start), end);sb.Append(m_postTag);pos = end;}}Append(sb, content, pos, Math.Max(pos, passage.endOffset));pos = passage.endOffset;}return sb.ToString();}
// Original:
public DrillSidewaysResult(Facets facets, TopDocs hits) {this.facets = facets;this.hits = hits;}

// Translation:
public DrillSidewaysResult(Facets facets, TopDocs hits){this.Facets = facets;this.Hits = hits;}
// Original:
public ListTrafficPolicyInstancesByPolicyResult listTrafficPolicyInstancesByPolicy(ListTrafficPolicyInstancesByPolicyRequest request) {request = beforeClientExecution(request);return executeListTrafficPolicyInstancesByPolicy(request);}

// Translation:
public virtual ListTrafficPolicyInstancesByPolicyResponse ListTrafficPolicyInstancesByPolicy(ListTrafficPolicyInstancesByPolicyRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListTrafficPolicyInstancesByPolicyRequestMarshaller.Instance;options.ResponseUnmarshaller = ListTrafficPolicyInstancesByPolicyResponseUnmarshaller.Instance;return Invoke<ListTrafficPolicyInstancesByPolicyResponse>(request, options);}
// Original:
public ComplexPhraseQuery(String field, String phrasedQueryStringContents,int slopFactor, boolean inOrder) {this.field = Objects.requireNonNull(field);this.phrasedQueryStringContents = Objects.requireNonNull(phrasedQueryStringContents);this.slopFactor = slopFactor;this.inOrder = inOrder;}

// Translation:
public ComplexPhraseQuery(string field, string phrasedQueryStringContents,int slopFactor, bool inOrder){this.field = field;this.phrasedQueryStringContents = phrasedQueryStringContents;this.slopFactor = slopFactor;this.inOrder = inOrder;}
// Original:
public String toString(String field) {StringBuilder buffer = new StringBuilder();if (!term.field().equals(field)) {buffer.append(term.field());buffer.append(":");}buffer.append(getClass().getSimpleName());buffer.append(" {");buffer.append('\n');buffer.append(automaton.toString());buffer.append("}");return buffer.toString();}

// Translation:
public override string ToString(string field){StringBuilder buffer = new StringBuilder();if (!m_term.Field.Equals(field, StringComparison.Ordinal)){buffer.Append(m_term.Field);buffer.Append(":");}buffer.Append(this.GetType().Name);buffer.Append(" {");buffer.Append('\n');buffer.Append(m_automaton.ToString());buffer.Append("}");buffer.Append(ToStringUtils.Boost(Boost));return buffer.ToString();}
// Original:
public final String toFormulaString() {return getName();}

// Translation:
public override String ToFormulaString(){return Name;}
// Original:
public AreaRecord clone() {return copy();}

// Translation:
public override Object Clone(){AreaRecord rec = new AreaRecord();rec.field_1_formatFlags = field_1_formatFlags;return rec;}
// Original:
public long ramBytesUsed() {return TERMS_BASE_RAM_BYTES_USED + (fst!=null ? fst.ramBytesUsed() : 0)+ RamUsageEstimator.sizeOf(scratch.bytes()) + RamUsageEstimator.sizeOf(scratchUTF16.chars());}

// Translation:
public override long RamBytesUsed(){return _termsCache.Values.Sum(simpleTextTerms => (simpleTextTerms != null) ? simpleTextTerms.RamBytesUsed() : 0);}
// Original:
public DeleteConfigurationTemplateRequest(String applicationName, String templateName) {setApplicationName(applicationName);setTemplateName(templateName);}

// Translation:
public DeleteConfigurationTemplateRequest(string applicationName, string templateName){_applicationName = applicationName;_templateName = templateName;}
// Original:
public List<Token> getTokens(int start, int stop, int ttype) {HashSet<Integer> s = new HashSet<Integer>(ttype);s.add(ttype);return getTokens(start,stop, s);}

// Translation:
public virtual IList<IToken> GetTokens(int start, int stop, int ttype){BitSet s = new BitSet(ttype);s.Set(ttype);return GetTokens(start, stop, s);}
// Original:
public DescribeIamInstanceProfileAssociationsResult describeIamInstanceProfileAssociations(DescribeIamInstanceProfileAssociationsRequest request) {request = beforeClientExecution(request);return executeDescribeIamInstanceProfileAssociations(request);}

// Translation:
public virtual DescribeIamInstanceProfileAssociationsResponse DescribeIamInstanceProfileAssociations(DescribeIamInstanceProfileAssociationsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeIamInstanceProfileAssociationsRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeIamInstanceProfileAssociationsResponseUnmarshaller.Instance;return Invoke<DescribeIamInstanceProfileAssociationsResponse>(request, options);}
// Original:
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval textArg) {ValueEval veText1;try {veText1 = OperandResolver.getSingleValue(textArg, srcRowIndex, srcColumnIndex);} catch (EvaluationException e) {return e.getErrorEval();}String text = OperandResolver.coerceValueToString(veText1);if (text.length() == 0) {return ErrorEval.VALUE_INVALID;}int code = text.charAt(0);return new StringEval(String.valueOf(code));}

// Translation:
public override ValueEval Evaluate(int srcRowIndex, int srcColumnIndex, ValueEval textArg){ValueEval veText1;try{veText1 = OperandResolver.GetSingleValue(textArg, srcRowIndex, srcColumnIndex);}catch (EvaluationException e){return e.GetErrorEval();}String text = OperandResolver.CoerceValueToString(veText1);if (text.Length == 0){return ErrorEval.VALUE_INVALID;}int code = (int)text[0];return new StringEval(code.ToString());}
// Original:
public AttachVpnGatewayResult attachVpnGateway(AttachVpnGatewayRequest request) {request = beforeClientExecution(request);return executeAttachVpnGateway(request);}

// Translation:
public virtual AttachVpnGatewayResponse AttachVpnGateway(AttachVpnGatewayRequest request){var options = new InvokeOptions();options.RequestMarshaller = AttachVpnGatewayRequestMarshaller.Instance;options.ResponseUnmarshaller = AttachVpnGatewayResponseUnmarshaller.Instance;return Invoke<AttachVpnGatewayResponse>(request, options);}
// Original:
public int compareTo(FloatBuffer otherBuffer) {int compareRemaining = (remaining() < otherBuffer.remaining()) ? remaining(): otherBuffer.remaining();int thisPos = position;int otherPos = otherBuffer.position;float thisFloat, otherFloat;while (compareRemaining > 0) {thisFloat = get(thisPos);otherFloat = otherBuffer.get(otherPos);if ((thisFloat != otherFloat)&& ((thisFloat == thisFloat) || (otherFloat == otherFloat))) {return thisFloat < otherFloat ? -1 : 1;}thisPos++;otherPos++;compareRemaining--;}return remaining() - otherBuffer.remaining();}

// Translation:
public virtual int compareTo(java.nio.FloatBuffer otherBuffer){int compareRemaining = (remaining() < otherBuffer.remaining()) ? remaining() : otherBuffer.remaining();int thisPos = _position;int otherPos = otherBuffer._position;float thisFloat;float otherFloat;while (compareRemaining > 0){thisFloat = get(thisPos);otherFloat = otherBuffer.get(otherPos);if ((thisFloat != otherFloat) && ((thisFloat == thisFloat) || (otherFloat == otherFloat))){return thisFloat < otherFloat ? -1 : 1;}thisPos++;otherPos++;compareRemaining--;}return remaining() - otherBuffer.remaining();}
// Original:
public Matcher useTransparentBounds(boolean value) {transparentBounds = value;useTransparentBoundsImpl(address, value);return this;}

// Translation:
public java.util.regex.Matcher useTransparentBounds(bool value){transparentBounds = value;useTransparentBoundsImpl(address, value);return this;}
// Original:
public void remove() {if (lastEntryReturned == null)throw new IllegalStateException();if (modCount != expectedModCount)throw new ConcurrentModificationException();Hashtable.this.remove(lastEntryReturned.key);lastEntryReturned = null;expectedModCount = modCount;}

// Translation:
public virtual void remove(){if (this.lastEntryReturned == null){throw new System.InvalidOperationException();}if (this._enclosing.modCount != this.expectedModCount){throw new java.util.ConcurrentModificationException();}this._enclosing.remove(this.lastEntryReturned.key);this.lastEntryReturned = null;this.expectedModCount = this._enclosing.modCount;}
// Original:
public String toFormulaString() {StringBuilder sb = new StringBuilder(64);if (externalWorkbookNumber >= 0) {sb.append('[');sb.append(externalWorkbookNumber);sb.append(']');}if (sheetName != null) {SheetNameFormatter.appendFormat(sb, sheetName);}sb.append('!');sb.append(FormulaError.REF.getString());return sb.toString();}

// Translation:
public override String ToFormulaString(){StringBuilder sb = new StringBuilder();if (externalWorkbookNumber >= 0){sb.Append('[');sb.Append(externalWorkbookNumber);sb.Append(']');}if (sheetName != null){sb.Append(sheetName);}sb.Append('!');sb.Append(ErrorConstants.GetText(ErrorConstants.ERROR_REF));return sb.ToString();}
// Original:
public String toString() {return slice.toString()+":"+ postingsEnum;}

// Translation:
public override string ToString(){return "MultiDocsEnum(" + Arrays.ToString(Subs) + ")";}
// Original:
public CreateVpnConnectionRouteResult createVpnConnectionRoute(CreateVpnConnectionRouteRequest request) {request = beforeClientExecution(request);return executeCreateVpnConnectionRoute(request);}

// Translation:
public virtual CreateVpnConnectionRouteResponse CreateVpnConnectionRoute(CreateVpnConnectionRouteRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateVpnConnectionRouteRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateVpnConnectionRouteResponseUnmarshaller.Instance;return Invoke<CreateVpnConnectionRouteResponse>(request, options);}
// Original:
public boolean hasNext() {return next != null;}

// Translation:
public virtual bool hasNext(){return this._next != null;}
// Original:
public DeleteDBSecurityGroupRequest(String dBSecurityGroupName) {setDBSecurityGroupName(dBSecurityGroupName);}

// Translation:
public DeleteDBSecurityGroupRequest(string dbSecurityGroupName){_dbSecurityGroupName = dbSecurityGroupName;}
// Original:
public int compare(Property o1, Property o2){String VBA_PROJECT = "_VBA_PROJECT";String name1  = o1.getName();String name2  = o2.getName();int  result = name1.length() - name2.length();if (result == 0){if (name1.compareTo(VBA_PROJECT) == 0)result = 1;else if (name2.compareTo(VBA_PROJECT) == 0)result = -1;else{if (name1.startsWith("__") && name2.startsWith("__")){result = name1.compareToIgnoreCase(name2);}else if (name1.startsWith("__")){result = 1;}else if (name2.startsWith("__")){result = -1;}elseresult = name1.compareToIgnoreCase(name2);}}return result;}

// Translation:
public int Compare(Property o1, Property o2){String VBA_PROJECT = "_VBA_PROJECT";String name1 = ((Property)o1).Name;String name2 = ((Property)o2).Name;int num = name1.Length - name2.Length;if (num == 0){if (name1.Equals(VBA_PROJECT, StringComparison.CurrentCulture)){num = 1;}else if (name2.Equals(VBA_PROJECT, StringComparison.CurrentCulture)){num = -1;}else{if (name1.StartsWith("__", StringComparison.Ordinal) && name2.StartsWith("__", StringComparison.Ordinal)){num = String.Compare(name1, name2, StringComparison.OrdinalIgnoreCase);}else if (name1.StartsWith("__", StringComparison.Ordinal)){num = 1;}else if (name2.StartsWith("__", StringComparison.Ordinal)){num = -1;}else{num = String.Compare(name1, name2, StringComparison.OrdinalIgnoreCase);}}}return num;}
// Original:
public DoubleBuffer get(double[] dst, int dstOffset, int doubleCount) {Arrays.checkOffsetAndCount(dst.length, dstOffset, doubleCount);if (doubleCount > remaining()) {throw new BufferUnderflowException();}for (int i = dstOffset; i < dstOffset + doubleCount; ++i) {dst[i] = get();}return this;}

// Translation:
public virtual java.nio.DoubleBuffer get(double[] dst, int dstOffset, int doubleCount){java.util.Arrays.checkOffsetAndCount(dst.Length, dstOffset, doubleCount);if (doubleCount > remaining()){throw new java.nio.BufferUnderflowException();}{for (int i = dstOffset; i < dstOffset + doubleCount; ++i){dst[i] = get();}}return this;}
// Original:
public CharsRef add(CharsRef prefix, CharsRef output) {assert prefix != null;assert output != null;if (prefix == NO_OUTPUT) {return output;} else if (output == NO_OUTPUT) {return prefix;} else {assert prefix.length > 0;assert output.length > 0;CharsRef result = new CharsRef(prefix.length + output.length);System.arraycopy(prefix.chars, prefix.offset, result.chars, 0, prefix.length);System.arraycopy(output.chars, output.offset, result.chars, prefix.length, output.length);result.length = prefix.length + output.length;return result;}}

// Translation:
public override CharsRef Add(CharsRef prefix, CharsRef output){Debug.Assert(prefix != null);Debug.Assert(output != null);if (prefix == NO_OUTPUT){return output;}else if (output == NO_OUTPUT){return prefix;}else{Debug.Assert(prefix.Length > 0);Debug.Assert(output.Length > 0);var result = new CharsRef(prefix.Length + output.Length);Array.Copy(prefix.Chars, prefix.Offset, result.Chars, 0, prefix.Length);Array.Copy(output.Chars, output.Offset, result.Chars, prefix.Length, output.Length);result.Length = prefix.Length + output.Length;return result;}}
// Original:
public UpdateProfileResult updateProfile(UpdateProfileRequest request) {request = beforeClientExecution(request);return executeUpdateProfile(request);}

// Translation:
public virtual UpdateProfileResponse UpdateProfile(UpdateProfileRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateProfileRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateProfileResponseUnmarshaller.Instance;return Invoke<UpdateProfileResponse>(request, options);}
// Original:
public LikeThisQueryBuilder(Analyzer analyzer, String[] defaultFieldNames) {this.analyzer = analyzer;this.defaultFieldNames = defaultFieldNames;}

// Translation:
public LikeThisQueryBuilder(Analyzer analyzer, string[] defaultFieldNames){this.analyzer = analyzer;this.defaultFieldNames = defaultFieldNames;}
// Original:
public StringBuffer insert(int index, long l) {return insert(index, Long.toString(l));}

// Translation:
public java.lang.StringBuffer insert(int index, long l){return insert(index, System.Convert.ToString(l));}
// Original:
public Field(String name, BytesRef bytes, IndexableFieldType type) {if (name == null) {throw new IllegalArgumentException("name must not be null");}if (bytes == null) {throw new IllegalArgumentException("bytes must not be null");}if (type == null) {throw new IllegalArgumentException("type must not be null");}this.name = name;this.fieldsData = bytes;this.type = type;}

// Translation:
public Field(string name, BytesRef bytes, FieldType type){if (name == null){throw new System.ArgumentNullException("name", "name cannot be null");}if (type == null){throw new System.ArgumentNullException("type", "type cannot be null");}if (type.IsIndexed){throw new System.ArgumentException("Fields with BytesRef values cannot be indexed");}this.FieldsData = bytes;this.m_type = type;this.m_name = name;}
// Original:
public void clear() {mSize = 0;}

// Translation:
public virtual void clear(){mSize = 0;}
// Original:
public SrndQuery parse2(String query) throws ParseException {ReInit(new FastCharStream(new StringReader(query)));try {return TopSrndQuery();} catch (TokenMgrError tme) {throw new ParseException(tme.getMessage());}}

// Translation:
public virtual SrndQuery Parse2(string query){ReInit(new FastCharStream(new StringReader(query)));try{return TopSrndQuery();}catch (TokenMgrError tme){throw new ParseException(tme.Message);}}
// Original:
@Override public int size() {return (int) Math.min(this.size, Integer.MAX_VALUE);}

// Translation:
public override int size(){return this._enclosing._size;}
// Original:
public DescribeConfigurationResult describeConfiguration(DescribeConfigurationRequest request) {request = beforeClientExecution(request);return executeDescribeConfiguration(request);}

// Translation:
public virtual DescribeConfigurationResponse DescribeConfiguration(DescribeConfigurationRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeConfigurationRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeConfigurationResponseUnmarshaller.Instance;return Invoke<DescribeConfigurationResponse>(request, options);}
// Original:
public String getCharErrorDisplay(int c) {String s = getErrorDisplay(c);return "'"+s+"'";}

// Translation:
public virtual string GetCharErrorDisplay(int c){string s = GetErrorDisplay(c);return "'" + s + "'";}
// Original:
public DescribeHumanTaskUiResult describeHumanTaskUi(DescribeHumanTaskUiRequest request) {request = beforeClientExecution(request);return executeDescribeHumanTaskUi(request);}

// Translation:
public virtual DescribeHumanTaskUiResponse DescribeHumanTaskUi(DescribeHumanTaskUiRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeHumanTaskUiRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeHumanTaskUiResponseUnmarshaller.Instance;return Invoke<DescribeHumanTaskUiResponse>(request, options);}
// Original:
public void run() {try {int n = task.runAndMaybeStats(letChildReport);if (anyExhaustibleTasks) {updateExhausted(task);}count += n;} catch (NoMoreDataException e) {exhausted = true;} catch (Exception e) {throw new RuntimeException(e);}}

// Translation:
public override void Run(){try{int n = task.RunAndMaybeStats(outerInstance.letChildReport);if (outerInstance.anyExhaustibleTasks){outerInstance.UpdateExhausted(task);}count += n;}catch (NoMoreDataException){outerInstance.exhausted = true;}catch (Exception e){throw new Exception(e.ToString(), e);}}
// Original:
public DescribeImagePermissionsResult describeImagePermissions(DescribeImagePermissionsRequest request) {request = beforeClientExecution(request);return executeDescribeImagePermissions(request);}

// Translation:
public virtual DescribeImagePermissionsResponse DescribeImagePermissions(DescribeImagePermissionsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeImagePermissionsRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeImagePermissionsResponseUnmarshaller.Instance;return Invoke<DescribeImagePermissionsResponse>(request, options);}
// Original:
public SrndQuery clone() {try {return (SrndQuery)super.clone();} catch (CloneNotSupportedException cns) {throw new Error(cns);}}

// Translation:
public virtual object Clone(){object clone = null;try{clone = base.MemberwiseClone();}catch (Exception e){throw new InvalidOperationException(e.Message, e); }return clone;}
// Original:
public void recycleByteBlocks(byte[][] blocks, int start, int end) {final int numBlocks = Math.min(maxBufferedBlocks - freeBlocks, end - start);final int size = freeBlocks + numBlocks;if (size >= freeByteBlocks.length) {final byte[][] newBlocks = new byte[ArrayUtil.oversize(size,RamUsageEstimator.NUM_BYTES_OBJECT_REF)][];System.arraycopy(freeByteBlocks, 0, newBlocks, 0, freeBlocks);freeByteBlocks = newBlocks;}final int stop = start + numBlocks;for (int i = start; i < stop; i++) {freeByteBlocks[freeBlocks++] = blocks[i];blocks[i] = null;}for (int i = stop; i < end; i++) {blocks[i] = null;}bytesUsed.addAndGet(-(end - stop) * blockSize);assert bytesUsed.get() >= 0;}

// Translation:
public override void RecycleByteBlocks(byte[][] blocks, int start, int end){int numBlocks = Math.Min(maxBufferedBlocks - freeBlocks, end - start);int size = freeBlocks + numBlocks;if (size >= freeByteBlocks.Length){var newBlocks = new byte[ArrayUtil.Oversize(size, RamUsageEstimator.NUM_BYTES_OBJECT_REF)][];Array.Copy(freeByteBlocks, 0, newBlocks, 0, freeBlocks);freeByteBlocks = newBlocks;}int stop = start + numBlocks;for (int i = start; i < stop; i++){freeByteBlocks[freeBlocks++] = blocks[i];blocks[i] = null;}for (int i = stop; i < end; i++){blocks[i] = null;}bytesUsed.AddAndGet(-(end - stop) * m_blockSize);Debug.Assert(bytesUsed.Get() >= 0);}
// Original:
public GeohashPrefixTree(SpatialContext ctx, int maxLevels) {super(ctx, maxLevels);Rectangle bounds = ctx.getWorldBounds();if (bounds.getMinX() != -180)throw new IllegalArgumentException("Geohash only supports lat-lon world bounds. Got "+bounds);int MAXP = getMaxLevelsPossible();if (maxLevels <= 0 || maxLevels > MAXP)throw new IllegalArgumentException("maxLevels must be [1-"+MAXP+"] but got "+ maxLevels);}

// Translation:
public GeohashPrefixTree(SpatialContext ctx, int maxLevels): base(ctx, maxLevels){IRectangle bounds = ctx.WorldBounds;if (bounds.MinX != -180){throw new ArgumentException("Geohash only supports lat-lon world bounds. Got " + bounds);}int Maxp = MaxLevelsPossible;if (maxLevels <= 0 || maxLevels > Maxp){throw new ArgumentException("maxLen must be [1-" + Maxp + "] but got " + maxLevels);}}
// Original:
public void removeName(int namenum) {_definedNames.remove(namenum);}

// Translation:
public void RemoveName(int namenum){_definedNames.RemoveAt(namenum);}
// Original:
public CancelSpotFleetRequestsResult cancelSpotFleetRequests(CancelSpotFleetRequestsRequest request) {request = beforeClientExecution(request);return executeCancelSpotFleetRequests(request);}

// Translation:
public virtual CancelSpotFleetRequestsResponse CancelSpotFleetRequests(CancelSpotFleetRequestsRequest request){var options = new InvokeOptions();options.RequestMarshaller = CancelSpotFleetRequestsRequestMarshaller.Instance;options.ResponseUnmarshaller = CancelSpotFleetRequestsResponseUnmarshaller.Instance;return Invoke<CancelSpotFleetRequestsResponse>(request, options);}
// Original:
public GetIndustryInfoLineageListRequest() {super("industry-brain", "2018-07-12", "GetIndustryInfoLineageList");setProtocol(ProtocolType.HTTPS);}

// Translation:
public GetIndustryInfoLineageListRequest(): base("industry-brain", "2018-07-12", "GetIndustryInfoLineageList"){Protocol = ProtocolType.HTTPS;}
// Original:
public static double[] grow(double[] array, int minSize) {assert minSize >= 0: "size must be positive (got " + minSize + "): likely integer overflow?";if (array.length < minSize) {return growExact(array, oversize(minSize, Double.BYTES));} elsereturn array;}

// Translation:
public static double[] Grow(double[] array, int minSize){Debug.Assert(minSize >= 0, "size must be positive (got " + minSize + "): likely integer overflow?");if (array.Length < minSize){double[] newArray = new double[Oversize(minSize, RamUsageEstimator.NUM_BYTES_DOUBLE)];Array.Copy(array, 0, newArray, 0, array.Length);return newArray;}else{return array;}}
// Original:
public void setResult(RefUpdate.Result status) {result = status;super.setResult(status);}

// Translation:
public override void SetResult(RefUpdate.Result status){this._enclosing.result = status;base.SetResult(status);}