yijunyu/c-to-rust huggingface dataset:
// Original:
public static RevFilter create(String pattern) {if (pattern.length() == 0)throw new IllegalArgumentException(JGitText.get().cannotMatchOnEmptyString);if (SubStringRevFilter.safe(pattern))return new SubStringSearch(pattern);return new PatternSearch(pattern);}

// Translation:
public static RevFilter Create(string pattern){if (pattern.Length == 0){throw new ArgumentException(JGitText.Get().cannotMatchOnEmptyString);}if (SubStringRevFilter.Safe(pattern)){return new AuthorRevFilter.SubStringSearch(pattern);}return new AuthorRevFilter.PatternSearch(pattern);}
// Original:
public NotImplementedFunctionException(String functionName) {super(functionName);this.functionName = functionName;}

// Translation:
public NotImplementedFunctionException(string functionName): base(functionName){this.functionName = functionName;}
// Original:
public DeleteResourceResult deleteResource(DeleteResourceRequest request) {request = beforeClientExecution(request);return executeDeleteResource(request);}

// Translation:
public virtual DeleteResourceResponse DeleteResource(DeleteResourceRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteResourceRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteResourceResponseUnmarshaller.Instance;return Invoke<DeleteResourceResponse>(request, options);}
// Original:
public PaletteRecord() {PColor[] defaultPalette = createDefaultPalette();_colors.ensureCapacity(defaultPalette.length);Collections.addAll(_colors, defaultPalette);}

// Translation:
public PaletteRecord(){PColor[] defaultPalette = CreateDefaultPalette();field_2_colors = new List<PColor>(defaultPalette.Length);for (int i = 0; i < defaultPalette.Length; i++){field_2_colors.Add(defaultPalette[i]);}}
// Original:
public GetRepoBuildLogsRequest() {super("cr", "2016-06-07", "GetRepoBuildLogs", "cr");setUriPattern("/repos/[RepoNamespace]/[RepoName]/build/[BuildId]/logs");setMethod(MethodType.GET);}

// Translation:
public GetRepoBuildLogsRequest(): base("cr", "2016-06-07", "GetRepoBuildLogs", "cr", "openAPI"){UriPattern = "/repos/[RepoNamespace]/[RepoName]/build/[BuildId]/logs";Method = MethodType.GET;}
// Original:
public String toString() {return "SortedSetDocValuesFacetField(dim=" + dim + " label=" + label + ")";}

// Translation:
public override string ToString(){return "SortedSetDocValuesFacetField(dim=" + Dim + " label=" + Label + ")";}
// Original:
public Break(int main, int subFrom, int subTo) {this.main = main;this.subFrom = subFrom;this.subTo = subTo;}

// Translation:
public Break(int main, int subFrom, int subTo){this.main = main;this.subFrom = subFrom;this.subTo = subTo;}
// Original:
public void setParams(String params) {super.setParams(params);docSize = (int) Float.parseFloat(params);}

// Translation:
public override void SetParams(string @params){base.SetParams(@params);docSize = (int)float.Parse(@params, CultureInfo.InvariantCulture);}
// Original:
public static double pv(double r, double n, double y, double f, boolean t) {double retval = 0;if (r == 0) {retval = -1*((n*y)+f);}else {double r1 = r + 1;retval =(( ( 1 - Math.pow(r1, n) ) / r ) * (t ? r1 : 1)  * y - f)/Math.pow(r1, n);}return retval;}

// Translation:
public static double pv(double r, double n, double y, double f, bool t){double retval = 0;if (r == 0){retval = -1 * ((n * y) + f);}else{double r1 = r + 1;retval = (((1 - Math.Pow(r1, n)) / r) * (t ? r1 : 1) * y - f)/Math.Pow(r1, n);}return retval;}
// Original:
public int compareTo(File another) {return this.getPath().compareTo(another.getPath());}

// Translation:
public int compareTo(java.io.File another){return string.CompareOrdinal(this.getPath(), another.getPath());}
// Original:
public void writeByte(int value) throws IOException {checkWritePrimitiveTypes();primitiveTypes.writeByte(value);}

// Translation:
public virtual void writeByte(int value){throw new System.NotImplementedException();}
// Original:
public String toString() {StringBuilder buffer = new StringBuilder("[Data Table - Parent cell is an interior cell in a data table]\n");buffer.append("top left row = ").append(getRow()).append("\n");buffer.append("top left col = ").append(getColumn()).append("\n");return buffer.toString();}

// Translation:
public override String ToString(){StringBuilder buffer = new StringBuilder("[Data Table - Parent cell is an interior cell in a data table]\n");buffer.Append("top left row = ").Append(Row).Append("\n");buffer.Append("top left col = ").Append(Column).Append("\n");return buffer.ToString();}
// Original:
public Credential() {this.refreshDate = new Date();}

// Translation:
public Credential(){RefreshDate = DateTime.UtcNow;}
// Original:
public NavigableMap<K, V> subMap(K fromInclusive, K toExclusive) {return subMap(fromInclusive, INCLUSIVE, toExclusive, EXCLUSIVE);}

// Translation:
public java.util.NavigableMap<K, V> subMap(K fromInclusive, K toExclusive){return this.subMap(fromInclusive, java.util.TreeMap.Bound.INCLUSIVE, toExclusive,java.util.TreeMap.Bound.EXCLUSIVE);}
// Original:
public DescribeLedgerResult describeLedger(DescribeLedgerRequest request) {request = beforeClientExecution(request);return executeDescribeLedger(request);}

// Translation:
public virtual DescribeLedgerResponse DescribeLedger(DescribeLedgerRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeLedgerRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeLedgerResponseUnmarshaller.Instance;return Invoke<DescribeLedgerResponse>(request, options);}
// Original:
public boolean isNoPrefix() {return noPrefix;}

// Translation:
public virtual bool IsNoPrefix(){return noPrefix;}
// Original:
public static Policy fromJson(String jsonString) {return fromJson(jsonString, new PolicyReaderOptions());}

// Translation:
public static Policy FromJson(string json){return JsonPolicyReader.ReadJsonStringToPolicy(json);}
// Original:
public GetPhoneNumberResult getPhoneNumber(GetPhoneNumberRequest request) {request = beforeClientExecution(request);return executeGetPhoneNumber(request);}

// Translation:
public virtual GetPhoneNumberResponse GetPhoneNumber(GetPhoneNumberRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetPhoneNumberRequestMarshaller.Instance;options.ResponseUnmarshaller = GetPhoneNumberResponseUnmarshaller.Instance;return Invoke<GetPhoneNumberResponse>(request, options);}
// Original:
public static void writeUnicodeString(LittleEndianOutput out, String value) {int nChars = value.length();out.writeShort(nChars);boolean is16Bit = hasMultibyte(value);out.writeByte(is16Bit ? 0x01 : 0x00);if (is16Bit) {putUnicodeLE(value, out);} else {putCompressedUnicode(value, out);}}

// Translation:
public static void WriteUnicodeString(ILittleEndianOutput out1, String value){int nChars = value.Length;out1.WriteShort(nChars);bool is16Bit = HasMultibyte(value);out1.WriteByte(is16Bit ? 0x01 : 0x00);if (is16Bit){PutUnicodeLE(value, out1);}else{PutCompressedUnicode(value, out1);}}
// Original:
public DescribeCoipPoolsResult describeCoipPools(DescribeCoipPoolsRequest request) {request = beforeClientExecution(request);return executeDescribeCoipPools(request);}

// Translation:
public virtual DescribeCoipPoolsResponse DescribeCoipPools(DescribeCoipPoolsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeCoipPoolsRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeCoipPoolsResponseUnmarshaller.Instance;return Invoke<DescribeCoipPoolsResponse>(request, options);}
// Original:
public void removeRow(Row row) {HSSFRow hrow = (HSSFRow) row;if (row.getSheet() != this) {throw new IllegalArgumentException("Specified row does not belong to this sheet");}for (Cell cell : row) {HSSFCell xcell = (HSSFCell) cell;if (xcell.isPartOfArrayFormulaGroup()) {String msg = "Row[rownum=" + row.getRowNum() + "] contains cell(s) included in a multi-cell array formula. You cannot change part of an array.";xcell.tryToDeleteArrayFormula(msg);}}if (_rows.size() > 0) {Integer key = Integer.valueOf(row.getRowNum());HSSFRow removedRow = _rows.remove(key);if (removedRow != row) {throw new IllegalArgumentException("Specified row does not belong to this sheet");}if (hrow.getRowNum() == getLastRowNum()) {_lastrow = findLastRow(_lastrow);}if (hrow.getRowNum() == getFirstRowNum()) {_firstrow = findFirstRow(_firstrow);}_sheet.removeRow(hrow.getRowRecord());if(_rows.size() == 0) {_firstrow = -1;_lastrow = -1;}}}

// Translation:
public void RemoveRow(IRow row){if (row.Sheet != this){throw new ArgumentException("Specified row does not belong to this sheet");}foreach (ICell cell in row){HSSFCell xcell = (HSSFCell)cell;if (xcell.IsPartOfArrayFormulaGroup){String msg = "Row[rownum=" + row.RowNum + "] contains cell(s) included in a multi-cell array formula. You cannot change part of an array.";xcell.NotifyArrayFormulaChanging(msg);}}if (rows.Count > 0){int key = row.RowNum;HSSFRow removedRow = (HSSFRow)rows[key];rows.Remove(key);if (removedRow != row){if (removedRow != null){rows[key] = removedRow;}throw new InvalidOperationException("Specified row does not belong to this _sheet");}if (row.RowNum == LastRowNum){lastrow = FindLastRow(lastrow);}if (row.RowNum == FirstRowNum){firstrow = FindFirstRow(firstrow);}CellValueRecordInterface[] cellvaluerecods = _sheet.GetValueRecords();for (int i = 0; i < cellvaluerecods.Length; i++){if (cellvaluerecods[i].Row == key){_sheet.RemoveValueRecord(key, cellvaluerecods[i]);}}_sheet.RemoveRow(((HSSFRow)row).RowRecord);}}
// Original:
public static TreeFilter create(Collection<TreeFilter> list) {if (list.size() < 2)throw new IllegalArgumentException(JGitText.get().atLeastTwoFiltersNeeded);final TreeFilter[] subfilters = new TreeFilter[list.size()];list.toArray(subfilters);if (subfilters.length == 2)return create(subfilters[0], subfilters[1]);return new List(subfilters);}

// Translation:
public static TreeFilter Create(ICollection<TreeFilter> list){if (list.Count < 2){throw new ArgumentException(JGitText.Get().atLeastTwoFiltersNeeded);}TreeFilter[] subfilters = new TreeFilter[list.Count];Sharpen.Collections.ToArray(list, subfilters);if (subfilters.Length == 2){return Create(subfilters[0], subfilters[1]);}return new OrTreeFilter.List(subfilters);}
// Original:
public SpanOrTermsBuilder(Analyzer analyzer) {this.analyzer = analyzer;}

// Translation:
public SpanOrTermsBuilder(Analyzer analyzer){this.analyzer = analyzer;}
// Original:
public boolean isReadOnly() {return byteBuffer.isReadOnly();}

// Translation:
public override bool isReadOnly(){return byteBuffer.isReadOnly();}
// Original:
public void setValuesCellRange(CellRangeAddressBase range) {Integer count = setVerticalCellRange(dataValues, range);if (count == null){return;}series.setNumValues((short)(int)count);}

// Translation:
public void SetValuesCellRange(CellRangeAddressBase range){int count = SetVerticalCellRange(dataValues, range);series.NumValues = (short)count;}
// Original:
public GlobalReplicationGroup modifyGlobalReplicationGroup(ModifyGlobalReplicationGroupRequest request) {request = beforeClientExecution(request);return executeModifyGlobalReplicationGroup(request);}

// Translation:
public virtual ModifyGlobalReplicationGroupResponse ModifyGlobalReplicationGroup(ModifyGlobalReplicationGroupRequest request){var options = new InvokeOptions();options.RequestMarshaller = ModifyGlobalReplicationGroupRequestMarshaller.Instance;options.ResponseUnmarshaller = ModifyGlobalReplicationGroupResponseUnmarshaller.Instance;return Invoke<ModifyGlobalReplicationGroupResponse>(request, options);}
// Original:
public CreateTrialResult createTrial(CreateTrialRequest request) {request = beforeClientExecution(request);return executeCreateTrial(request);}

// Translation:
public virtual CreateTrialResponse CreateTrial(CreateTrialRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateTrialRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateTrialResponseUnmarshaller.Instance;return Invoke<CreateTrialResponse>(request, options);}
// Original:
public void preWrite() {List<Property> pList = new ArrayList<>();int i=0;for (Property p : _properties) {if (p == null) continue;p.setIndex(i++);pList.add(p);}for (Property p : pList) p.preWrite();}

// Translation:
public void PreWrite(){List<Property> properties = new List<Property>(_properties.Count);for (int i = 0; i < _properties.Count; i++)properties.Add(_properties[i]);for (int k = 0; k < properties.Count; k++){properties[ k ].Index = k;}_blocks = PropertyBlock.CreatePropertyBlockArray(_bigBigBlockSize, properties);for (int k = 0; k < properties.Count; k++){properties[ k ].PreWrite();}}
// Original:
public E first() {return backingMap.firstKey();}

// Translation:
public virtual E first(){return backingMap.firstKey();}
// Original:
public int available() {return data.length - ptr;}

// Translation:
public override int Available(){return data.Length - ptr;}
// Original:
public GetHostedZoneCountResult getHostedZoneCount(GetHostedZoneCountRequest request) {request = beforeClientExecution(request);return executeGetHostedZoneCount(request);}

// Translation:
public virtual GetHostedZoneCountResponse GetHostedZoneCount(GetHostedZoneCountRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetHostedZoneCountRequestMarshaller.Instance;options.ResponseUnmarshaller = GetHostedZoneCountResponseUnmarshaller.Instance;return Invoke<GetHostedZoneCountResponse>(request, options);}
// Original:
public LookupResult[] getResults() {int size = size();LookupResult[] res = new LookupResult[size];for (int i = size - 1; i >= 0; i--) {res[i] = pop();}return res;}

// Translation:
public LookupResult[] GetResults(){int size = Count;var res = new LookupResult[size];for (int i = size - 1; i >= 0; i--){res[i] = Pop();}return res;}
// Original:
public void add(Transition t) {if (transitions.length < next+3) {transitions = ArrayUtil.grow(transitions, next+3);}transitions[next] = t.dest;transitions[next+1] = t.min;transitions[next+2] = t.max;next += 3;}

// Translation:
public void Add(Transition t){if (transitions.Length == count){Transition[] newArray = new Transition[ArrayUtil.Oversize(1 + count, RamUsageEstimator.NUM_BYTES_OBJECT_REF)];Array.Copy(transitions, 0, newArray, 0, count);transitions = newArray;}transitions[count++] = t;}
// Original:
public String getFormatString(int formatIndex) {String format = null;if (formatIndex >= HSSFDataFormat.getNumberOfBuiltinBuiltinFormats()) {FormatRecord tfr = _customFormatRecords.get(Integer.valueOf(formatIndex));if (tfr == null) {logger.log( POILogger.ERROR, "Requested format at index " + formatIndex+ ", but it wasn't found");} else {format = tfr.getFormatString();}} else {format = HSSFDataFormat.getBuiltinFormat((short) formatIndex);}return format;}

// Translation:
public String GetFormatString(int formatIndex){String format = null;if (formatIndex >= HSSFDataFormat.NumberOfBuiltinBuiltinFormats){FormatRecord tfr = (FormatRecord)customFormatRecords[formatIndex];if (tfr == null){logger.Log(POILogger.ERROR, "Requested format at index " + formatIndex + ", but it wasn't found");}else{format = tfr.FormatString;}}else{format = HSSFDataFormat.GetBuiltinFormat((short)formatIndex);}return format;}
// Original:
public DisassociateDelegateFromResourceResult disassociateDelegateFromResource(DisassociateDelegateFromResourceRequest request) {request = beforeClientExecution(request);return executeDisassociateDelegateFromResource(request);}

// Translation:
public virtual DisassociateDelegateFromResourceResponse DisassociateDelegateFromResource(DisassociateDelegateFromResourceRequest request){var options = new InvokeOptions();options.RequestMarshaller = DisassociateDelegateFromResourceRequestMarshaller.Instance;options.ResponseUnmarshaller = DisassociateDelegateFromResourceResponseUnmarshaller.Instance;return Invoke<DisassociateDelegateFromResourceResponse>(request, options);}
// Original:
public void readFully(byte[] dst, int offset, int byteCount) throws IOException {primitiveTypes.readFully(dst, offset, byteCount);}

// Translation:
public virtual void readFully(byte[] dst, int offset, int byteCount){throw new System.NotImplementedException();}
// Original:
public StartDocumentClassificationJobResult startDocumentClassificationJob(StartDocumentClassificationJobRequest request) {request = beforeClientExecution(request);return executeStartDocumentClassificationJob(request);}

// Translation:
public virtual StartDocumentClassificationJobResponse StartDocumentClassificationJob(StartDocumentClassificationJobRequest request){var options = new InvokeOptions();options.RequestMarshaller = StartDocumentClassificationJobRequestMarshaller.Instance;options.ResponseUnmarshaller = StartDocumentClassificationJobResponseUnmarshaller.Instance;return Invoke<StartDocumentClassificationJobResponse>(request, options);}
// Original:
public final float[] array() {return protectedArray();}

// Translation:
public sealed override object array(){return protectedArray();}
// Original:
public void prunePacked() throws IOException {ObjectDirectory objdb = repo.getObjectDatabase();Collection<PackFile> packs = objdb.getPacks();File objects = repo.getObjectsDirectory();String[] fanout = objects.list();if (fanout != null && fanout.length > 0) {pm.beginTask(JGitText.get().pruneLoosePackedObjects, fanout.length);try {for (String d : fanout) {checkCancelled();pm.update(1);if (d.length() != 2)continue;String[] entries = new File(objects, d).list();if (entries == null)continue;for (String e : entries) {checkCancelled();if (e.length() != Constants.OBJECT_ID_STRING_LENGTH - 2)continue;ObjectId id;try {id = ObjectId.fromString(d + e);} catch (IllegalArgumentException notAnObject) {continue;}boolean found = false;for (PackFile p : packs) {checkCancelled();if (p.hasObject(id)) {found = true;break;}}if (found)FileUtils.delete(objdb.fileFor(id), FileUtils.RETRY| FileUtils.SKIP_MISSING| FileUtils.IGNORE_ERRORS);}}} finally {pm.endTask();}}}

// Translation:
public virtual void PrunePacked(){ObjectDirectory objdb = ((ObjectDirectory)repo.ObjectDatabase);ICollection<PackFile> packs = objdb.GetPacks();FilePath objects = repo.ObjectsDirectory;string[] fanout = objects.List();if (fanout != null && fanout.Length > 0){pm.BeginTask(JGitText.Get().pruneLoosePackedObjects, fanout.Length);try{foreach (string d in fanout){pm.Update(1);if (d.Length != 2){continue;}string[] entries = new FilePath(objects, d).List();if (entries == null){continue;}foreach (string e in entries){if (e.Length != Constants.OBJECT_ID_STRING_LENGTH - 2){continue;}ObjectId id;try{id = ObjectId.FromString(d + e);}catch (ArgumentException){continue;}bool found = false;foreach (PackFile p in packs){if (p.HasObject(id)){found = true;break;}}if (found){FileUtils.Delete(objdb.FileFor(id), FileUtils.RETRY | FileUtils.SKIP_MISSING | FileUtils.IGNORE_ERRORS);}}}}finally{pm.EndTask();}}}
// Original:
public ListJobsByPipelineResult listJobsByPipeline(ListJobsByPipelineRequest request) {request = beforeClientExecution(request);return executeListJobsByPipeline(request);}

// Translation:
public virtual ListJobsByPipelineResponse ListJobsByPipeline(ListJobsByPipelineRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListJobsByPipelineRequestMarshaller.Instance;options.ResponseUnmarshaller = ListJobsByPipelineResponseUnmarshaller.Instance;return Invoke<ListJobsByPipelineResponse>(request, options);}
// Original:
public SaveTaskForSubmittingDomainRealNameVerificationByIdentityCredentialRequest() {super("Domain", "2018-01-29", "SaveTaskForSubmittingDomainRealNameVerificationByIdentityCredential");setMethod(MethodType.POST);}

// Translation:
public SaveTaskForSubmittingDomainRealNameVerificationByIdentityCredentialRequest(): base("Domain-intl", "2017-12-18", "SaveTaskForSubmittingDomainRealNameVerificationByIdentityCredential", "domain", "openAPI"){Method = MethodType.POST;}
// Original:
public DeleteDhcpOptionsResult deleteDhcpOptions(DeleteDhcpOptionsRequest request) {request = beforeClientExecution(request);return executeDeleteDhcpOptions(request);}

// Translation:
public virtual DeleteDhcpOptionsResponse DeleteDhcpOptions(DeleteDhcpOptionsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteDhcpOptionsRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteDhcpOptionsResponseUnmarshaller.Instance;return Invoke<DeleteDhcpOptionsResponse>(request, options);}
// Original:
public String getSheetLastNameByExternSheet(int externSheetIndex) {return _iBook.findSheetLastNameFromExternSheet(externSheetIndex);}

// Translation:
public String GetSheetLastNameByExternSheet(int externSheetIndex){return _iBook.FindSheetLastNameFromExternSheet(externSheetIndex);}
// Original:
public InMemorySorter(Comparator<BytesRef> comparator) {this.comparator = comparator;}

// Translation:
public InMemorySorter(IComparer<BytesRef> comparer){this.comparer = comparer;}
// Original:
public boolean isSymbolic() {return true;}

// Translation:
public virtual bool IsSymbolic(){return true;}
// Original:
public static ValueEval chooseSingleElementFromArea(AreaEval ae,int srcCellRow, int srcCellCol) throws EvaluationException {ValueEval result = chooseSingleElementFromAreaInternal(ae, srcCellRow, srcCellCol);if (result instanceof ErrorEval) {throw new EvaluationException((ErrorEval) result);}return result;}

// Translation:
public static ValueEval ChooseSingleElementFromArea(AreaEval ae,int srcCellRow, int srcCellCol){ValueEval result = ChooseSingleElementFromAreaInternal(ae, srcCellRow, srcCellCol);if (result is ErrorEval){throw new EvaluationException((ErrorEval)result);}return result;}
// Original:
public int freeBlocks(int num) {assert num >= 0 : "free blocks must be >= 0 but was: "+ num;final int stop;final int count;if (num > freeBlocks) {stop = 0;count = freeBlocks;} else {stop = freeBlocks - num;count = num;}while (freeBlocks > stop) {freeByteBlocks[--freeBlocks] = null;}bytesUsed.addAndGet(-count*blockSize);assert bytesUsed.get() >= 0;return count;}

// Translation:
public int FreeBlocks(int num){Debug.Assert(num >= 0, "free blocks must be >= 0 but was: " + num);int stop;int count;if (num > freeBlocks){stop = 0;count = freeBlocks;}else{stop = freeBlocks - num;count = num;}while (freeBlocks > stop){freeByteBlocks[--freeBlocks] = null;}bytesUsed.AddAndGet(-count * m_blockSize);Debug.Assert(bytesUsed.Get() >= 0);return count;}
// Original:
public final static String htmlEncode(String plainText){if (plainText == null || plainText.length() == 0){return "";}StringBuilder result = new StringBuilder(plainText.length());for (int index=0; index<plainText.length(); index++){char ch = plainText.charAt(index);switch (ch) {case '"':result.append("&quot;");break;case '&':result.append("&amp;");break;case '<':result.append("&lt;");break;case '>':result.append("&gt;");break;case '\'':result.append("&#x27;");break;case '/':result.append("&#x2F;");break;default:result.append(ch);}}return result.toString();}

// Translation:
public static string HtmlEncode(string plainText){if (string.IsNullOrEmpty(plainText)){return string.Empty;}var result = new StringBuilder(plainText.Length);for (int index = 0; index < plainText.Length; index++){char ch = plainText[index];switch (ch){case '"':result.Append("&quot;");break;case '&':result.Append("&amp;");break;case '<':result.Append("&lt;");break;case '>':result.Append("&gt;");break;case '\'':result.Append("&#x27;");break;case '/':result.Append("&#x2F;");break;default:if (ch < 128){result.Append(ch);}else{result.Append("&#").Append((int)ch).Append(";");}break;}}return result.ToString();}
// Original:
public boolean isReuseDeltas() {return reuseDeltas;}

// Translation:
public virtual bool IsReuseDeltas(){return reuseDeltas;}
// Original:
public static int headerLength(String codec) {return 9+codec.length();}

// Translation:
public static int HeaderLength(string codec){return 9 + codec.Length;}