yijunyu/c-to-rust huggingface dataset:
// Original:
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0, ValueEval arg1) {double result;try {double d0 = singleOperandEvaluate(arg0, srcRowIndex, srcColumnIndex);double d1 = singleOperandEvaluate(arg1, srcRowIndex, srcColumnIndex);double multi = Math.pow(10d,d1);if(d0 < 0) result = -Math.floor(-d0 * multi) / multi;else result = Math.floor(d0 * multi) / multi;checkValue(result);}catch (EvaluationException e) {return e.getErrorEval();}return new NumberEval(result);}

// Translation:
public override ValueEval Evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0, ValueEval arg1){double result;try{double d0 = NumericFunction.SingleOperandEvaluate(arg0, srcRowIndex, srcColumnIndex);double d1 = NumericFunction.SingleOperandEvaluate(arg1, srcRowIndex, srcColumnIndex);result = Evaluate(d0, d1);NumericFunction.CheckValue(result);}catch (EvaluationException e){return e.GetErrorEval();}return new NumberEval(result);}
// Original:
public DoubleBuffer put(double[] src, int srcOffset, int doubleCount) {if (doubleCount > remaining()) {throw new BufferOverflowException();}System.arraycopy(src, srcOffset, backingArray, offset + position, doubleCount);position += doubleCount;return this;}

// Translation:
public override java.nio.DoubleBuffer put(double[] src, int srcOffset, int doubleCount){if (doubleCount > remaining()){throw new java.nio.BufferOverflowException();}System.Array.Copy(src, srcOffset, backingArray, offset + _position, doubleCount);_position += doubleCount;return this;}
// Original:
public CharSequence toQueryString(EscapeQuerySyntax escaper) {if (isDefaultField(this.field)) {return getTermEscaped(escaper) + "~" + this.similarity;} else {return this.field + ":" + getTermEscaped(escaper) + "~" + this.similarity;}}

// Translation:
public override string ToQueryString(IEscapeQuerySyntax escaper){if (IsDefaultField(this.m_field)){return GetTermEscaped(escaper) + "~" + this.similarity;}else{return this.m_field + ":" + GetTermEscaped(escaper) + "~" + this.similarity;}}
// Original:
public AbstractBlockPackedWriter(DataOutput out, int blockSize) {checkBlockSize(blockSize, MIN_BLOCK_SIZE, MAX_BLOCK_SIZE);reset(out);values = new long[blockSize];}

// Translation:
public AbstractBlockPackedWriter(DataOutput @out, int blockSize){PackedInt32s.CheckBlockSize(blockSize, MIN_BLOCK_SIZE, MAX_BLOCK_SIZE);Reset(@out);m_values = new long[blockSize];}
// Original:
public String getMessage() {return message;}

// Translation:
public virtual string GetMessage(){return message;}
// Original:
public ListAttendeesResult listAttendees(ListAttendeesRequest request) {request = beforeClientExecution(request);return executeListAttendees(request);}

// Translation:
public virtual ListAttendeesResponse ListAttendees(ListAttendeesRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListAttendeesRequestMarshaller.Instance;options.ResponseUnmarshaller = ListAttendeesResponseUnmarshaller.Instance;return Invoke<ListAttendeesResponse>(request, options);}
// Original:
public void reset() {upto = count = 0;posIncr = 1;}

// Translation:
public virtual void Reset(){upto = count = 0;posIncr = 1;}
// Original:
public FeatHdrRecord clone() {return copy();}

// Translation:
public override Object Clone(){return CloneViaReserialise();}
// Original:
public synchronized void addElement(E object) {if (elementCount == elementData.length) {growByOne();}elementData[elementCount++] = object;modCount++;}

// Translation:
public virtual void addElement(E @object){lock (this){if (elementCount == elementData.Length){growByOne();}elementData[elementCount++] = @object;modCount++;}}
// Original:
public long fileLength(String name) throws IOException {ensureOpen();if (pendingDeletes.contains(name)) {throw new NoSuchFileException("file \"" + name + "\" is pending delete");}return Files.size(directory.resolve(name));}

// Translation:
public override long FileLength(string name){EnsureOpen();FileInfo file = new FileInfo(Path.Combine(m_directory.FullName, name));long len = file.Length;if (len == 0 && !file.Exists){throw new FileNotFoundException(name);}else{return len;}}
// Original:
public PutExternalModelResult putExternalModel(PutExternalModelRequest request) {request = beforeClientExecution(request);return executePutExternalModel(request);}

// Translation:
public virtual PutExternalModelResponse PutExternalModel(PutExternalModelRequest request){var options = new InvokeOptions();options.RequestMarshaller = PutExternalModelRequestMarshaller.Instance;options.ResponseUnmarshaller = PutExternalModelResponseUnmarshaller.Instance;return Invoke<PutExternalModelResponse>(request, options);}
// Original:
public PutConferencePreferenceResult putConferencePreference(PutConferencePreferenceRequest request) {request = beforeClientExecution(request);return executePutConferencePreference(request);}

// Translation:
public virtual PutConferencePreferenceResponse PutConferencePreference(PutConferencePreferenceRequest request){var options = new InvokeOptions();options.RequestMarshaller = PutConferencePreferenceRequestMarshaller.Instance;options.ResponseUnmarshaller = PutConferencePreferenceResponseUnmarshaller.Instance;return Invoke<PutConferencePreferenceResponse>(request, options);}
// Original:
public int size() {return size;}

// Translation:
public override int size(){return _size;}
// Original:
public CreateApiMappingResult createApiMapping(CreateApiMappingRequest request) {request = beforeClientExecution(request);return executeCreateApiMapping(request);}

// Translation:
public virtual CreateApiMappingResponse CreateApiMapping(CreateApiMappingRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateApiMappingRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateApiMappingResponseUnmarshaller.Instance;return Invoke<CreateApiMappingResponse>(request, options);}
// Original:
public CharBlockArray append(CharSequence chars, int start, int length) {int end = start + length;for (int i = start; i < end; i++) {append(chars.charAt(i));}return this;}

// Translation:
public virtual CharBlockArray Append(ICharSequence chars, int start, int length){int end = start + length;for (int i = start; i < end; i++){Append(chars[i]);}return this;}
// Original:
public UpdateAdmChannelResult updateAdmChannel(UpdateAdmChannelRequest request) {request = beforeClientExecution(request);return executeUpdateAdmChannel(request);}

// Translation:
public virtual UpdateAdmChannelResponse UpdateAdmChannel(UpdateAdmChannelRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateAdmChannelRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateAdmChannelResponseUnmarshaller.Instance;return Invoke<UpdateAdmChannelResponse>(request, options);}
// Original:
public DirCacheIterator(DirCache dc) {cache = dc;tree = dc.getCacheTree(true);treeStart = 0;treeEnd = tree.getEntrySpan();subtreeId = new byte[Constants.OBJECT_ID_LENGTH];if (!eof())parseEntry();}

// Translation:
public DirCacheIterator(DirCache dc){cache = dc;tree = dc.GetCacheTree(true);treeStart = 0;treeEnd = tree.GetEntrySpan();subtreeId = new byte[Constants.OBJECT_ID_LENGTH];if (!Eof){ParseEntry();}}
// Original:
public void setBytesRef(BytesRef term, int textStart) {final byte[] bytes = term.bytes = buffers[textStart >> BYTE_BLOCK_SHIFT];int pos = textStart & BYTE_BLOCK_MASK;if ((bytes[pos] & 0x80) == 0) {term.length = bytes[pos];term.offset = pos+1;} else {term.length = (bytes[pos]&0x7f) + ((bytes[pos+1]&0xff)<<7);term.offset = pos+2;}assert term.length >= 0;}

// Translation:
public void SetBytesRef(BytesRef term, int textStart){var bytes = term.Bytes = buffers[textStart >> BYTE_BLOCK_SHIFT];var pos = textStart & BYTE_BLOCK_MASK;if ((bytes[pos] & 0x80) == 0){term.Length = bytes[pos];term.Offset = pos + 1;}else{term.Length = (bytes[pos] & 0x7f) + ((bytes[pos + 1] & 0xff) << 7);term.Offset = pos + 2;}Debug.Assert(term.Length >= 0);}
// Original:
public Restrictions(GeoRestriction geoRestriction) {setGeoRestriction(geoRestriction);}

// Translation:
public Restrictions(GeoRestriction geoRestriction){_geoRestriction = geoRestriction;}
// Original:
public DisableRuleResult disableRule(DisableRuleRequest request) {request = beforeClientExecution(request);return executeDisableRule(request);}

// Translation:
public virtual DisableRuleResponse DisableRule(DisableRuleRequest request){var options = new InvokeOptions();options.RequestMarshaller = DisableRuleRequestMarshaller.Instance;options.ResponseUnmarshaller = DisableRuleResponseUnmarshaller.Instance;return Invoke<DisableRuleResponse>(request, options);}
// Original:
public GetSuppressedDestinationResult getSuppressedDestination(GetSuppressedDestinationRequest request) {request = beforeClientExecution(request);return executeGetSuppressedDestination(request);}

// Translation:
public virtual GetSuppressedDestinationResponse GetSuppressedDestination(GetSuppressedDestinationRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetSuppressedDestinationRequestMarshaller.Instance;options.ResponseUnmarshaller = GetSuppressedDestinationResponseUnmarshaller.Instance;return Invoke<GetSuppressedDestinationResponse>(request, options);}
// Original:
public ListDomainsResult listDomains(ListDomainsRequest request) {request = beforeClientExecution(request);return executeListDomains(request);}

// Translation:
public virtual ListDomainsResponse ListDomains(ListDomainsRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListDomainsRequestMarshaller.Instance;options.ResponseUnmarshaller = ListDomainsResponseUnmarshaller.Instance;return Invoke<ListDomainsResponse>(request, options);}
// Original:
public StartLifecyclePolicyPreviewResult startLifecyclePolicyPreview(StartLifecyclePolicyPreviewRequest request) {request = beforeClientExecution(request);return executeStartLifecyclePolicyPreview(request);}

// Translation:
public virtual StartLifecyclePolicyPreviewResponse StartLifecyclePolicyPreview(StartLifecyclePolicyPreviewRequest request){var options = new InvokeOptions();options.RequestMarshaller = StartLifecyclePolicyPreviewRequestMarshaller.Instance;options.ResponseUnmarshaller = StartLifecyclePolicyPreviewResponseUnmarshaller.Instance;return Invoke<StartLifecyclePolicyPreviewResponse>(request, options);}
// Original:
public CreateDiskFromSnapshotResult createDiskFromSnapshot(CreateDiskFromSnapshotRequest request) {request = beforeClientExecution(request);return executeCreateDiskFromSnapshot(request);}

// Translation:
public virtual CreateDiskFromSnapshotResponse CreateDiskFromSnapshot(CreateDiskFromSnapshotRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateDiskFromSnapshotRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateDiskFromSnapshotResponseUnmarshaller.Instance;return Invoke<CreateDiskFromSnapshotResponse>(request, options);}
// Original:
public SubmoduleSyncCommand submoduleSync() {return new SubmoduleSyncCommand(repo);}

// Translation:
public virtual SubmoduleSyncCommand SubmoduleSync(){return new SubmoduleSyncCommand(repo);}
// Original:
public DeleteConfigurationSetTrackingOptionsResult deleteConfigurationSetTrackingOptions(DeleteConfigurationSetTrackingOptionsRequest request) {request = beforeClientExecution(request);return executeDeleteConfigurationSetTrackingOptions(request);}

// Translation:
public virtual DeleteConfigurationSetTrackingOptionsResponse DeleteConfigurationSetTrackingOptions(DeleteConfigurationSetTrackingOptionsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteConfigurationSetTrackingOptionsRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteConfigurationSetTrackingOptionsResponseUnmarshaller.Instance;return Invoke<DeleteConfigurationSetTrackingOptionsResponse>(request, options);}
// Original:
public V setValue(V value) {if (!allowModify)throw new UnsupportedOperationException();V old = values[lastPos];values[lastPos] = value;return old;}

// Translation:
public virtual TValue SetValue(TValue value){if (!allowModify){throw new NotSupportedException();}TValue old = outerInstance.values[lastPos].Value;outerInstance.values[lastPos].Value = value;return old;}
// Original:
public String toString() {StringBuilder buffer = new StringBuilder();buffer.append("[FtPioGrbit ]\n");buffer.append("  size     = ").append(length).append("\n");buffer.append("  flags    = ").append(HexDump.toHex(flags)).append("\n");buffer.append("[/FtPioGrbit ]\n");return buffer.toString();}

// Translation:
public override String ToString(){StringBuilder buffer = new StringBuilder();buffer.Append("[FtPioGrbit ]\n");buffer.Append("  size     = ").Append(length).Append("\n");buffer.Append("  flags    = ").Append(HexDump.ToHex(flags)).Append("\n");buffer.Append("[/FtPioGrbit ]\n");return buffer.ToString();}
// Original:
static public double ipmt(double r, int per, int nper, double pv, double fv, int type) {double ipmt = fv(r, per - 1, pmt(r, nper, pv, fv, type), pv, type) * r;if (type==1) ipmt /= (1 + r);return ipmt;}

// Translation:
static public double IPMT(double r, int per, int nper, double pv, double fv, int type){double ipmt = FV(r, per - 1, PMT(r, nper, pv, fv, type), pv, type) * r;if (type == 1) ipmt /= (1 + r);return ipmt;}
// Original:
public FileDictionary(InputStream dictFile, String fieldDelimiter) {in = new BufferedReader(IOUtils.getDecodingReader(dictFile, StandardCharsets.UTF_8));this.fieldDelimiter = fieldDelimiter;}

// Translation:
public FileDictionary(Stream dictFile, string fieldDelimiter){@in = IOUtils.GetDecodingReader(dictFile, Encoding.UTF8);this.fieldDelimiter = fieldDelimiter;}
// Original:
public DocumentSummaryInformation(final PropertySet ps)throws UnexpectedPropertySetTypeException {super(ps);if (!isDocumentSummaryInformation()) {throw new UnexpectedPropertySetTypeException("Not a " + getClass().getName());}}

// Translation:
public DocumentSummaryInformation(PropertySet ps): base(ps){if (!IsDocumentSummaryInformation)throw new UnexpectedPropertySetTypeException("Not a " + GetType().Name);}
// Original:
public EscherBSERecord getBSERecord(int pictureIndex) {return escherBSERecords.get(pictureIndex-1);}

// Translation:
public EscherBSERecord GetBSERecord(int pictureIndex){return (EscherBSERecord)escherBSERecords[pictureIndex - 1];}
// Original:
public CreateDetectorVersionResult createDetectorVersion(CreateDetectorVersionRequest request) {request = beforeClientExecution(request);return executeCreateDetectorVersion(request);}

// Translation:
public virtual CreateDetectorVersionResponse CreateDetectorVersion(CreateDetectorVersionRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateDetectorVersionRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateDetectorVersionResponseUnmarshaller.Instance;return Invoke<CreateDetectorVersionResponse>(request, options);}
// Original:
public static DVConstraint createExplicitListConstraint(String[] explicitListValues) {return new DVConstraint(null, explicitListValues);}

// Translation:
public static DVConstraint CreateExplicitListConstraint(String[] explicitListValues){return new DVConstraint(null, explicitListValues);}
// Original:
public ListGroupsResult listGroups(ListGroupsRequest request) {request = beforeClientExecution(request);return executeListGroups(request);}

// Translation:
public virtual ListGroupsResponse ListGroups(ListGroupsRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListGroupsRequestMarshaller.Instance;options.ResponseUnmarshaller = ListGroupsResponseUnmarshaller.Instance;return Invoke<ListGroupsResponse>(request, options);}
// Original:
public DeleteScriptResult deleteScript(DeleteScriptRequest request) {request = beforeClientExecution(request);return executeDeleteScript(request);}

// Translation:
public virtual DeleteScriptResponse DeleteScript(DeleteScriptRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteScriptRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteScriptResponseUnmarshaller.Instance;return Invoke<DeleteScriptResponse>(request, options);}
// Original:
public DescribeSpotDatafeedSubscriptionResult describeSpotDatafeedSubscription(DescribeSpotDatafeedSubscriptionRequest request) {request = beforeClientExecution(request);return executeDescribeSpotDatafeedSubscription(request);}

// Translation:
public virtual DescribeSpotDatafeedSubscriptionResponse DescribeSpotDatafeedSubscription(DescribeSpotDatafeedSubscriptionRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeSpotDatafeedSubscriptionRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeSpotDatafeedSubscriptionResponseUnmarshaller.Instance;return Invoke<DescribeSpotDatafeedSubscriptionResponse>(request, options);}
// Original:
public CharArrayReader(char[] buf) {this.buf = buf;this.count = buf.length;}

// Translation:
public CharArrayReader(char[] buf){this.buf = buf;this.count = buf.Length;}
// Original:
public CharSequence subSequence(int start, int end) {return substring(start, end);}

// Translation:
public virtual java.lang.CharSequence SubSequence(int start, int end){return java.lang.CharSequenceProxy.Wrap(substring(start, end));}
// Original:
public Builder(boolean dedup) {this.dedup = dedup;}

// Translation:
public Builder(bool ignoreCase){this.ignoreCase = ignoreCase;}
// Original:
public synchronized void setPerfObject(String key, Object obj) {perfObjects.put(key, obj);}

// Translation:
public virtual void SetPerfObject(string key, object obj){lock (this){perfObjects[key] = obj;}}
// Original:
public String toString(){StringBuilder buffer = new StringBuilder();buffer.append("[DIMENSIONS]\n");buffer.append("    .firstrow       = ").append(Integer.toHexString(getFirstRow())).append("\n");buffer.append("    .lastrow        = ").append(Integer.toHexString(getLastRow())).append("\n");buffer.append("    .firstcol       = ").append(Integer.toHexString(getFirstCol())).append("\n");buffer.append("    .lastcol        = ").append(Integer.toHexString(getLastCol())).append("\n");buffer.append("    .zero           = ").append(Integer.toHexString(field_5_zero)).append("\n");buffer.append("[/DIMENSIONS]\n");return buffer.toString();}

// Translation:
public override String ToString(){StringBuilder buffer = new StringBuilder();buffer.Append("[DIMENSIONS]\n");buffer.Append("    .firstrow       = ").Append(StringUtil.ToHexString(FirstRow)).Append("\n");buffer.Append("    .lastrow        = ").Append(StringUtil.ToHexString(LastRow)).Append("\n");buffer.Append("    .firstcol       = ").Append(StringUtil.ToHexString(FirstCol)).Append("\n");buffer.Append("    .lastcol        = ").Append(StringUtil.ToHexString(LastCol)).Append("\n");buffer.Append("    .zero           = ").Append(StringUtil.ToHexString(field_5_zero)).Append("\n");buffer.Append("[/DIMENSIONS]\n");return buffer.ToString();}
// Original:
public ExitStandbyResult exitStandby(ExitStandbyRequest request) {request = beforeClientExecution(request);return executeExitStandby(request);}

// Translation:
public virtual ExitStandbyResponse ExitStandby(ExitStandbyRequest request){var options = new InvokeOptions();options.RequestMarshaller = ExitStandbyRequestMarshaller.Instance;options.ResponseUnmarshaller = ExitStandbyResponseUnmarshaller.Instance;return Invoke<ExitStandbyResponse>(request, options);}
// Original:
public String toString() {return "MultiDocsAndPositionsEnum(" + Arrays.toString(getSubs()) + ")";}

// Translation:
public override string ToString(){return "MultiDocsEnum(" + Arrays.ToString(Subs) + ")";}
// Original:
public MergeException(Throwable exc, Directory dir) {super(exc);this.dir = dir;}

// Translation:
public MergeException(Exception exc, Directory dir): base(exc.ToString(), exc){this.dir = dir;}
// Original:
public int read(CharBuffer target) throws IOException {int remaining = remaining();if (target == this) {if (remaining == 0) {return -1;}throw new IllegalArgumentException();}if (remaining == 0) {return limit > 0 && target.remaining() == 0 ? 0 : -1;}remaining = Math.min(target.remaining(), remaining);if (remaining > 0) {char[] chars = new char[remaining];get(chars);target.put(chars);}return remaining;}

// Translation:
public virtual int read(java.nio.CharBuffer target){int remaining_1 = remaining();if (target == this){if (remaining_1 == 0){return -1;}throw new System.ArgumentException();}if (remaining_1 == 0){return _limit > 0 && target.remaining() == 0 ? 0 : -1;}remaining_1 = System.Math.Min(target.remaining(), remaining_1);if (remaining_1 > 0){char[] chars = new char[remaining_1];get(chars);target.put(chars);}return remaining_1;}
// Original:
public final float getFloat() {return Float.intBitsToFloat(getInt());}

// Translation:
public sealed override float getFloat(){return Sharpen.Util.IntBitsToFloat(getInt());}
// Original:
public UpdateApplicationRequest(String applicationName) {setApplicationName(applicationName);}

// Translation:
public UpdateApplicationRequest(string applicationName){_applicationName = applicationName;}
// Original:
public void initReader(ByteSliceReader reader, int termID, int stream) {assert stream < streamCount;int intStart = postingsArray.intStarts[termID];final int[] ints = intPool.buffers[intStart >> IntBlockPool.INT_BLOCK_SHIFT];final int upto = intStart & IntBlockPool.INT_BLOCK_MASK;reader.init(bytePool,postingsArray.byteStarts[termID]+stream*ByteBlockPool.FIRST_LEVEL_SIZE,ints[upto+stream]);}

// Translation:
public void InitReader(ByteSliceReader reader, int termID, int stream){Debug.Assert(stream < streamCount);int intStart = postingsArray.intStarts[termID];int[] ints = intPool.Buffers[intStart >> Int32BlockPool.INT32_BLOCK_SHIFT];int upto = intStart & Int32BlockPool.INT32_BLOCK_MASK;reader.Init(bytePool, postingsArray.byteStarts[termID] + stream * ByteBlockPool.FIRST_LEVEL_SIZE, ints[upto + stream]);}
// Original:
public T next() {if (size <= index)throw new NoSuchElementException();T res = block[blkIdx];if (++blkIdx == BLOCK_SIZE) {if (++dirIdx < directory.length)block = directory[dirIdx];elseblock = null;blkIdx = 0;}index++;return res;}

// Translation:
public override T Next(){if (this._enclosing.size <= this.index){throw new NoSuchElementException();}T res = this.block[this.blkIdx];if (++this.blkIdx == BlockList<T>.BLOCK_SIZE){if (++this.dirIdx < this._enclosing.directory.Length){this.block = this._enclosing.directory[this.dirIdx];}else{this.block = null;}this.blkIdx = 0;}this.index++;return res;}
// Original:
public DescribeOptionGroupOptionsResult describeOptionGroupOptions(DescribeOptionGroupOptionsRequest request) {request = beforeClientExecution(request);return executeDescribeOptionGroupOptions(request);}

// Translation:
public virtual DescribeOptionGroupOptionsResponse DescribeOptionGroupOptions(DescribeOptionGroupOptionsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeOptionGroupOptionsRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeOptionGroupOptionsResponseUnmarshaller.Instance;return Invoke<DescribeOptionGroupOptionsResponse>(request, options);}
// Original:
public int alloc(int size) {int index = n;int len = array.length;if (n + size >= len) {byte[] aux = new byte[len + blockSize];System.arraycopy(array, 0, aux, 0, len);array = aux;}n += size;return index;}

// Translation:
public virtual int Alloc(int size){int index = n;int len = array.Length;if (n + size >= len){byte[] aux = new byte[len + blockSize];System.Array.Copy(array, 0, aux, 0, len);array = aux;}n += size;return index;}
// Original:
public String getText() {StringBuilder text = new StringBuilder();for ( TermInfo ti: termsInfos ) {text.append( ti.getText() );}return text.toString();}

// Translation:
public virtual string GetText(){StringBuilder text = new StringBuilder();foreach (TermInfo ti in termsInfos){text.Append(ti.Text);}return text.ToString();}
// Original:
public ReplaceableItem(String name) {setName(name);}

// Translation:
public ReplaceableItem(string name){_name = name;}
// Original:
public NamePtg(LittleEndianInput in)  {field_1_label_index = in.readUShort();field_2_zero = in.readShort();}

// Translation:
public NamePtg(ILittleEndianInput in1){field_1_label_index = in1.ReadShort();field_2_zero = in1.ReadShort();}