yijunyu/c-to-rust huggingface dataset:
// Original:
public DeleteVaultNotificationsResult deleteVaultNotifications(DeleteVaultNotificationsRequest request) {request = beforeClientExecution(request);return executeDeleteVaultNotifications(request);}

// Translation:
public virtual DeleteVaultNotificationsResponse DeleteVaultNotifications(DeleteVaultNotificationsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteVaultNotificationsRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteVaultNotificationsResponseUnmarshaller.Instance;return Invoke<DeleteVaultNotificationsResponse>(request, options);}
// Original:
public static boolean endsWith(char s[], int len, String suffix) {final int suffixLen = suffix.length();if (suffixLen > len)return false;for (int i = suffixLen - 1; i >= 0; i--)if (s[len -(suffixLen - i)] != suffix.charAt(i))return false;return true;}

// Translation:
public static bool EndsWith(char[] s, int len, string suffix){int suffixLen = suffix.Length;if (suffixLen > len){return false;}for (int i = suffixLen - 1; i >= 0; i--){if (s[len - (suffixLen - i)] != suffix[i]){return false;}}return true;}
// Original:
public synchronized void setRequireDimCount(String dimName, boolean v) {DimConfig ft = fieldTypes.get(dimName);if (ft == null) {ft = new DimConfig();fieldTypes.put(dimName, ft);}ft.requireDimCount = v;}

// Translation:
public virtual void SetRequireDimCount(string dimName, bool v){lock (this){if (!fieldTypes.TryGetValue(dimName, out DimConfig fieldType)){fieldTypes[dimName] = new DimConfig { RequireDimCount = v };}else{fieldType.RequireDimCount = v;}}}
// Original:
public HSSFName getName(String name) {int nameIndex = getNameIndex(name);if (nameIndex < 0) {return null;}return names.get(nameIndex);}

// Translation:
public NPOI.SS.UserModel.IName GetName(String name){int nameIndex = GetNameIndex(name);if (nameIndex < 0){return null;}return (HSSFName)names[nameIndex];}
// Original:
public ScriptBootstrapActionConfig(String path, java.util.List<String> args) {setPath(path);setArgs(args);}

// Translation:
public ScriptBootstrapActionConfig(string path, List<string> args){_path = path;_args = args;}
// Original:
public RegisterApplicationRevisionResult registerApplicationRevision(RegisterApplicationRevisionRequest request) {request = beforeClientExecution(request);return executeRegisterApplicationRevision(request);}

// Translation:
public virtual RegisterApplicationRevisionResponse RegisterApplicationRevision(RegisterApplicationRevisionRequest request){var options = new InvokeOptions();options.RequestMarshaller = RegisterApplicationRevisionRequestMarshaller.Instance;options.ResponseUnmarshaller = RegisterApplicationRevisionResponseUnmarshaller.Instance;return Invoke<RegisterApplicationRevisionResponse>(request, options);}
// Original:
public SendTestEventNotificationResult sendTestEventNotification(SendTestEventNotificationRequest request) {request = beforeClientExecution(request);return executeSendTestEventNotification(request);}

// Translation:
public virtual SendTestEventNotificationResponse SendTestEventNotification(SendTestEventNotificationRequest request){var options = new InvokeOptions();options.RequestMarshaller = SendTestEventNotificationRequestMarshaller.Instance;options.ResponseUnmarshaller = SendTestEventNotificationResponseUnmarshaller.Instance;return Invoke<SendTestEventNotificationResponse>(request, options);}
// Original:
public void setRefLogIdent(PersonIdent pi) {refLogIdent = pi;}

// Translation:
public virtual void SetRefLogIdent(PersonIdent pi){refLogIdent = pi;}
// Original:
public GetDomainDeliverabilityCampaignResult getDomainDeliverabilityCampaign(GetDomainDeliverabilityCampaignRequest request) {request = beforeClientExecution(request);return executeGetDomainDeliverabilityCampaign(request);}

// Translation:
public virtual GetDomainDeliverabilityCampaignResponse GetDomainDeliverabilityCampaign(GetDomainDeliverabilityCampaignRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetDomainDeliverabilityCampaignRequestMarshaller.Instance;options.ResponseUnmarshaller = GetDomainDeliverabilityCampaignResponseUnmarshaller.Instance;return Invoke<GetDomainDeliverabilityCampaignResponse>(request, options);}
// Original:
public String toFormulaString() {StringBuilder b = new StringBuilder();b.append("{");for (int y = 0; y < _nRows; y++) {if (y > 0) {b.append(";");}for (int x = 0; x < _nColumns; x++) {if (x > 0) {b.append(",");}Object o = _arrayValues[getValueIndex(x, y)];b.append(getConstantText(o));}}b.append("}");return b.toString();}

// Translation:
public override String ToFormulaString(){StringBuilder b = new StringBuilder();b.Append("{");for (int y = 0; y < RowCount; y++){if (y > 0){b.Append(";");}for (int x = 0; x < ColumnCount; x++){if (x > 0){b.Append(",");}Object o = _arrayValues.GetValue(GetValueIndex(x, y));b.Append(GetConstantText(o));}}b.Append("}");return b.ToString();}
// Original:
public ShingleFilterFactory(Map<String, String> args) {super(args);maxShingleSize = getInt(args, "maxShingleSize", ShingleFilter.DEFAULT_MAX_SHINGLE_SIZE);if (maxShingleSize < 2) {throw new IllegalArgumentException("Invalid maxShingleSize (" + maxShingleSize + ") - must be at least 2");}minShingleSize = getInt(args, "minShingleSize", ShingleFilter.DEFAULT_MIN_SHINGLE_SIZE);if (minShingleSize < 2) {throw new IllegalArgumentException("Invalid minShingleSize (" + minShingleSize + ") - must be at least 2");}if (minShingleSize > maxShingleSize) {throw new IllegalArgumentException("Invalid minShingleSize (" + minShingleSize + ") - must be no greater than maxShingleSize (" + maxShingleSize + ")");}outputUnigrams = getBoolean(args, "outputUnigrams", true);outputUnigramsIfNoShingles = getBoolean(args, "outputUnigramsIfNoShingles", false);tokenSeparator = get(args, "tokenSeparator", ShingleFilter.DEFAULT_TOKEN_SEPARATOR);fillerToken = get(args, "fillerToken", ShingleFilter.DEFAULT_FILLER_TOKEN);if (!args.isEmpty()) {throw new IllegalArgumentException("Unknown parameters: " + args);}}

// Translation:
public ShingleFilterFactory(IDictionary<string, string> args): base(args){maxShingleSize = GetInt32(args, "maxShingleSize", ShingleFilter.DEFAULT_MAX_SHINGLE_SIZE);if (maxShingleSize < 2){throw new ArgumentOutOfRangeException("Invalid maxShingleSize (" + maxShingleSize + ") - must be at least 2");}minShingleSize = GetInt32(args, "minShingleSize", ShingleFilter.DEFAULT_MIN_SHINGLE_SIZE);if (minShingleSize < 2){throw new ArgumentOutOfRangeException("Invalid minShingleSize (" + minShingleSize + ") - must be at least 2");}if (minShingleSize > maxShingleSize){throw new ArgumentOutOfRangeException("Invalid minShingleSize (" + minShingleSize + ") - must be no greater than maxShingleSize (" + maxShingleSize + ")");}outputUnigrams = GetBoolean(args, "outputUnigrams", true);outputUnigramsIfNoShingles = GetBoolean(args, "outputUnigramsIfNoShingles", false);tokenSeparator = Get(args, "tokenSeparator", ShingleFilter.DEFAULT_TOKEN_SEPARATOR);fillerToken = Get(args, "fillerToken", ShingleFilter.DEFAULT_FILLER_TOKEN);if (args.Count > 0){throw new ArgumentException("Unknown parameters: " + args);}}
// Original:
public UpdateRelationalDatabaseParametersResult updateRelationalDatabaseParameters(UpdateRelationalDatabaseParametersRequest request) {request = beforeClientExecution(request);return executeUpdateRelationalDatabaseParameters(request);}

// Translation:
public virtual UpdateRelationalDatabaseParametersResponse UpdateRelationalDatabaseParameters(UpdateRelationalDatabaseParametersRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateRelationalDatabaseParametersRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateRelationalDatabaseParametersResponseUnmarshaller.Instance;return Invoke<UpdateRelationalDatabaseParametersResponse>(request, options);}
// Original:
public static Collection<ParseTree> findAllRuleNodes(ParseTree t, int ruleIndex) {return findAllNodes(t, ruleIndex, false);}

// Translation:
public static ICollection<IParseTree> FindAllRuleNodes(IParseTree t, int ruleIndex){return FindAllNodes(t, ruleIndex, false);}
// Original:
public int getObjectCount() {return entryCount;}

// Translation:
public virtual int GetObjectCount(){return entryCount;}
// Original:
public ActionTransition(ATNState target, int ruleIndex, int actionIndex, boolean isCtxDependent) {super(target);this.ruleIndex = ruleIndex;this.actionIndex = actionIndex;this.isCtxDependent = isCtxDependent;}

// Translation:
public ActionTransition(ATNState target, int ruleIndex, int actionIndex, bool isCtxDependent): base(target){this.ruleIndex = ruleIndex;this.actionIndex = actionIndex;this.isCtxDependent = isCtxDependent;}
// Original:
public long get(int index) {final int blockOffset = index / valuesPerBlock;final long skip = ((long) blockOffset) << 3;try {in.seek(startPointer + skip);long block = in.readLong();final int offsetInBlock = index % valuesPerBlock;return (block >>> (offsetInBlock * bitsPerValue)) & mask;} catch (IOException e) {throw new IllegalStateException("failed", e);}}

// Translation:
public override long Get(int index){int blockOffset = index / valuesPerBlock;long skip = ((long)blockOffset) << 3;try{@in.Seek(startPointer + skip);long block = @in.ReadInt64();int offsetInBlock = index % valuesPerBlock;return ((long)((ulong)block >> (offsetInBlock * m_bitsPerValue))) & mask;}catch (System.IO.IOException e){throw new InvalidOperationException("failed", e);}}
// Original:
public String getSignerType() {return "BEARERTOKEN";}

// Translation:
public override string GetSignerType(){return "BEARERTOKEN";}
// Original:
public PipedOutputStream(PipedInputStream target) throws IOException {connect(target);}

// Translation:
public PipedOutputStream(java.io.PipedInputStream target){throw new System.NotImplementedException();}
// Original:
public DeleteLedgerResult deleteLedger(DeleteLedgerRequest request) {request = beforeClientExecution(request);return executeDeleteLedger(request);}

// Translation:
public virtual DeleteLedgerResponse DeleteLedger(DeleteLedgerRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteLedgerRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteLedgerResponseUnmarshaller.Instance;return Invoke<DeleteLedgerResponse>(request, options);}
// Original:
public GetCognitoEventsResult getCognitoEvents(GetCognitoEventsRequest request) {request = beforeClientExecution(request);return executeGetCognitoEvents(request);}

// Translation:
public virtual GetCognitoEventsResponse GetCognitoEvents(GetCognitoEventsRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetCognitoEventsRequestMarshaller.Instance;options.ResponseUnmarshaller = GetCognitoEventsResponseUnmarshaller.Instance;return Invoke<GetCognitoEventsResponse>(request, options);}
// Original:
public NameXPtg getNameXPtg(String name, SheetIdentifier sheet) {int sheetRefIndex = getSheetExtIx(sheet);return _iBook.getNameXPtg(name, sheetRefIndex, _uBook.getUDFFinder());}

// Translation:
public Ptg GetNameXPtg(String name, SheetIdentifier sheet){int sheetRefIndex = GetSheetExtIx(sheet);return _iBook.GetNameXPtg(name, sheetRefIndex, _uBook.GetUDFFinder());}
// Original:
public ListResolverEndpointsResult listResolverEndpoints(ListResolverEndpointsRequest request) {request = beforeClientExecution(request);return executeListResolverEndpoints(request);}

// Translation:
public virtual ListResolverEndpointsResponse ListResolverEndpoints(ListResolverEndpointsRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListResolverEndpointsRequestMarshaller.Instance;options.ResponseUnmarshaller = ListResolverEndpointsResponseUnmarshaller.Instance;return Invoke<ListResolverEndpointsResponse>(request, options);}
// Original:
public String readLine() {try {return reader.readLine();} catch (IOException e) {throw new IOError(e);}}

// Translation:
public string readLine(){try{return _reader.readLine();}catch (System.IO.IOException e){throw new java.io.IOError(e);}}
// Original:
public int hash2(char carray[]) {int hash = 5381;for (int i = 0; i < carray.length; i++) {char d = carray[i];hash = ((hash << 5) + hash) + d & 0x00FF;hash = ((hash << 5) + hash) + d >> 8;}return hash;}

// Translation:
public virtual int Hash2(char[] carray){int hash = 5381;for (int i = 0; i < carray.Length; i++){char d = carray[i];hash = ((hash << 5) + hash) + d & 0x00FF;hash = ((hash << 5) + hash) + d >> 8;}return hash;}
// Original:
public static long toBookSheetColumn(int bookIndex, int sheetIndex, int columnIndex) {return ((bookIndex   & 0xFFFFL) << 48)  +((sheetIndex  & 0xFFFFL) << 32) +((columnIndex & 0xFFFFL) << 0);}

// Translation:
public static long ToBookSheetColumn(int bookIndex, int sheetIndex, int columnIndex){return ((bookIndex & 0xFFFFL) << 48) + ((sheetIndex & 0xFFFFL) << 32) + ((columnIndex & 0xFFFFL) << 0);}
// Original:
public CreateConfigurationProfileResult createConfigurationProfile(CreateConfigurationProfileRequest request) {request = beforeClientExecution(request);return executeCreateConfigurationProfile(request);}

// Translation:
public virtual CreateConfigurationProfileResponse CreateConfigurationProfile(CreateConfigurationProfileRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateConfigurationProfileRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateConfigurationProfileResponseUnmarshaller.Instance;return Invoke<CreateConfigurationProfileResponse>(request, options);}
// Original:
public ReplicationGroup startMigration(StartMigrationRequest request) {request = beforeClientExecution(request);return executeStartMigration(request);}

// Translation:
public virtual StartMigrationResponse StartMigration(StartMigrationRequest request){var options = new InvokeOptions();options.RequestMarshaller = StartMigrationRequestMarshaller.Instance;options.ResponseUnmarshaller = StartMigrationResponseUnmarshaller.Instance;return Invoke<StartMigrationResponse>(request, options);}
// Original:
public OffsetLimitTokenFilter(TokenStream input, int offsetLimit) {super(input);this.offsetLimit = offsetLimit;}

// Translation:
public OffsetLimitTokenFilter(TokenStream input, int offsetLimit) : base(input){this.offsetLimit = offsetLimit;offsetAttrib = GetAttribute<IOffsetAttribute>();}
// Original:
public final void write(byte[] b, int off, int len)throws IOException {while (0 < len) {final int n = Math.min(len, BYTES_TO_WRITE_BEFORE_CANCEL_CHECK);count += n;if (checkCancelAt <= count) {if (writeMonitor.isCancelled()) {throw new IOException(JGitText.get().packingCancelledDuringObjectsWriting);}checkCancelAt = count + BYTES_TO_WRITE_BEFORE_CANCEL_CHECK;}out.write(b, off, n);md.update(b, off, n);off += n;len -= n;}}

// Translation:
public override void Write(byte[] b, int off, int len){while (0 < len){int n = Math.Min(len, BYTES_TO_WRITE_BEFORE_CANCEL_CHECK);count += n;if (checkCancelAt <= count){if (writeMonitor.IsCancelled()){throw new IOException(JGitText.Get().packingCancelledDuringObjectsWriting);}checkCancelAt = count + BYTES_TO_WRITE_BEFORE_CANCEL_CHECK;}@out.Write(b, off, n);crc.Update(b, off, n);md.Update(b, off, n);off += n;len -= n;}}
// Original:
public Cell merge(Cell m, Cell e) {Cell n = new Cell();if (m.skip != e.skip) {return null;}if (m.cmd >= 0) {if (e.cmd >= 0) {if (m.cmd == e.cmd) {n.cmd = m.cmd;} else {return null;}} else {n.cmd = m.cmd;}} else {n.cmd = e.cmd;}if (m.ref >= 0) {if (e.ref >= 0) {if (m.ref == e.ref) {if (m.skip == e.skip) {n.ref = m.ref;} else {return null;}} else {return null;}} else {n.ref = m.ref;}} else {n.ref = e.ref;}n.cnt = m.cnt + e.cnt;n.skip = m.skip;return n;}

// Translation:
public virtual Cell Merge(Cell m, Cell e){Cell n = new Cell();if (m.skip != e.skip){return null;}if (m.cmd >= 0){if (e.cmd >= 0){if (m.cmd == e.cmd){n.cmd = m.cmd;}else{return null;}}else{n.cmd = m.cmd;}}else{n.cmd = e.cmd;}if (m.@ref >= 0){if (e.@ref >= 0){if (m.@ref == e.@ref){if (m.skip == e.skip){n.@ref = m.@ref;}else{return null;}}else{return null;}}else{n.@ref = m.@ref;}}else{n.@ref = e.@ref;}n.cnt = m.cnt + e.cnt;n.skip = m.skip;return n;}
// Original:
public GetCampaignActivitiesResult getCampaignActivities(GetCampaignActivitiesRequest request) {request = beforeClientExecution(request);return executeGetCampaignActivities(request);}

// Translation:
public virtual GetCampaignActivitiesResponse GetCampaignActivities(GetCampaignActivitiesRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetCampaignActivitiesRequestMarshaller.Instance;options.ResponseUnmarshaller = GetCampaignActivitiesResponseUnmarshaller.Instance;return Invoke<GetCampaignActivitiesResponse>(request, options);}
// Original:
public long estimateBytesUsed() {return bytesUsed;}

// Translation:
public virtual long EstimateBytesUsed(){return this.bytesUsed;}
// Original:
public FunctionNameEval(String functionName) {_functionName = functionName;}

// Translation:
public FunctionNameEval(String functionName) {_functionName = functionName;}
// Original:
public final float averageBytesPerChar() {return averageBytesPerChar;}

// Translation:
public float averageBytesPerChar(){return _averageBytesPerChar;}
// Original:
public CreateCacheSecurityGroupRequest(String cacheSecurityGroupName, String description) {setCacheSecurityGroupName(cacheSecurityGroupName);setDescription(description);}

// Translation:
public CreateCacheSecurityGroupRequest(string cacheSecurityGroupName, string description){_cacheSecurityGroupName = cacheSecurityGroupName;_description = description;}
// Original:
public void removeAt(int index) {System.arraycopy(mKeys, index + 1, mKeys, index, mSize - (index + 1));System.arraycopy(mValues, index + 1, mValues, index, mSize - (index + 1));mSize--;}

// Translation:
public virtual void removeAt(int index){System.Array.Copy(mKeys, index + 1, mKeys, index, mSize - (index + 1));System.Array.Copy(mValues, index + 1, mValues, index, mSize - (index + 1));mSize--;}
// Original:
public DescribeIndexFieldsResult describeIndexFields(DescribeIndexFieldsRequest request) {request = beforeClientExecution(request);return executeDescribeIndexFields(request);}

// Translation:
public virtual DescribeIndexFieldsResponse DescribeIndexFields(DescribeIndexFieldsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeIndexFieldsRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeIndexFieldsResponseUnmarshaller.Instance;return Invoke<DescribeIndexFieldsResponse>(request, options);}
// Original:
public void remove(int key) {delete(key);}

// Translation:
public virtual void remove(int key){delete(key);}
// Original:
public ShortBuffer duplicate() {ByteBuffer bb = byteBuffer.duplicate().order(byteBuffer.order());ShortToByteBufferAdapter buf = new ShortToByteBufferAdapter(bb);buf.limit = limit;buf.position = position;buf.mark = mark;return buf;}

// Translation:
public override java.nio.ShortBuffer duplicate(){java.nio.ByteBuffer bb = byteBuffer.duplicate().order(byteBuffer.order());java.nio.ShortToByteBufferAdapter buf = new java.nio.ShortToByteBufferAdapter(bb);buf._limit = _limit;buf._position = _position;buf._mark = _mark;return buf;}
// Original:
public void addDbcell(int cell){if (field_5_dbcells == null){field_5_dbcells = new IntList();}field_5_dbcells.add(cell);}

// Translation:
public void AddDbcell(int cell){if (field_5_dbcells == null){field_5_dbcells = new IntList();}field_5_dbcells.Add(cell);}
// Original:
public DeleteSubnetResult deleteSubnet(DeleteSubnetRequest request) {request = beforeClientExecution(request);return executeDeleteSubnet(request);}

// Translation:
public virtual DeleteSubnetResponse DeleteSubnet(DeleteSubnetRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteSubnetRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteSubnetResponseUnmarshaller.Instance;return Invoke<DeleteSubnetResponse>(request, options);}
// Original:
public List<HSSFPictureData> getAllPictures(){List<HSSFPictureData> pictures = new ArrayList<>();for (org.apache.poi.hssf.record.Record r : workbook.getRecords()) {if (r instanceof AbstractEscherHolderRecord) {((AbstractEscherHolderRecord) r).decode();List<EscherRecord> escherRecords = ((AbstractEscherHolderRecord) r).getEscherRecords();searchForPictures(escherRecords, pictures);}}return Collections.unmodifiableList(pictures);}

// Translation:
public IList GetAllPictures(){List<HSSFPictureData> pictures = new List<HSSFPictureData>();IEnumerator recordIter = workbook.Records.GetEnumerator();while (recordIter.MoveNext()){Object obj = recordIter.Current;if (obj is AbstractEscherHolderRecord){((AbstractEscherHolderRecord)obj).Decode();IList escherRecords = ((AbstractEscherHolderRecord)obj).EscherRecords;SearchForPictures(escherRecords, pictures);}}return pictures;}
// Original:
public DescribeWorkspacesConnectionStatusResult describeWorkspacesConnectionStatus(DescribeWorkspacesConnectionStatusRequest request) {request = beforeClientExecution(request);return executeDescribeWorkspacesConnectionStatus(request);}

// Translation:
public virtual DescribeWorkspacesConnectionStatusResponse DescribeWorkspacesConnectionStatus(DescribeWorkspacesConnectionStatusRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeWorkspacesConnectionStatusRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeWorkspacesConnectionStatusResponseUnmarshaller.Instance;return Invoke<DescribeWorkspacesConnectionStatusResponse>(request, options);}
// Original:
public String toString() {return "MultiDocsAndPositionsEnum(" + Arrays.toString(getSubs()) + ")";}

// Translation:
public override string ToString(){return Slice.ToString() + ":" + DocsEnum;}
// Original:
public InvokeServiceAsyncRequest() {super("industry-brain", "2018-07-12", "InvokeServiceAsync");setMethod(MethodType.POST);}

// Translation:
public InvokeServiceAsyncRequest(): base("industry-brain", "2018-07-12", "InvokeServiceAsync"){Method = MethodType.POST;}
// Original:
public AuthorizeSecurityGroupIngressRequest(String groupName, java.util.List<IpPermission> ipPermissions) {setGroupName(groupName);setIpPermissions(ipPermissions);}

// Translation:
public AuthorizeSecurityGroupIngressRequest(string groupName, List<IpPermission> ipPermissions){_groupName = groupName;_ipPermissions = ipPermissions;}
// Original:
public static byte[] readData(InputStream stream, String section ) throws IOException {try {StringBuilder sectionText = new StringBuilder();boolean inSection = false;int c = stream.read();while ( c != -1 ) {switch ( c ) {case '[':inSection = true;break;case '\n':case '\r':inSection = false;sectionText = new StringBuilder();break;case ']':inSection = false;if ( sectionText.toString().equals( section ) ) return readData( stream, '[' );sectionText = new StringBuilder();break;default:if ( inSection ) sectionText.append( (char) c );}c = stream.read();}} finally {stream.close();}throw new IOException( "Section '" + section + "' not found" );}

// Translation:
public static byte[] ReadData(Stream stream, String section ){try{StringBuilder sectionText = new StringBuilder();bool inSection = false;int c = stream.ReadByte();while ( c != -1 ){switch ( c ){case '[':inSection = true;break;case '\n':case '\r':inSection = false;sectionText = new StringBuilder();break;case ']':inSection = false;if (sectionText.ToString().Equals(section)){return ReadData(stream, '[');}sectionText = new StringBuilder();break;default:if ( inSection ) sectionText.Append( (char) c );break;}c = stream.ReadByte();}}finally{stream.Close();}throw new IOException( "Section '" + section + "' not found" );}
// Original:
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval numberVE) {int number;try {number = OperandResolver.coerceValueToInt(numberVE);} catch (EvaluationException e) {return ErrorEval.VALUE_INVALID;}if (number < 0) {return ErrorEval.NUM_ERROR;}return new NumberEval(factorial(number).longValue());}

// Translation:
public override ValueEval Evaluate(int srcRowIndex, int srcColumnIndex, ValueEval numberVE){int number;try{number = OperandResolver.CoerceValueToInt(numberVE);}catch (EvaluationException){return ErrorEval.VALUE_INVALID;}if (number < 0){return ErrorEval.NUM_ERROR;}return new NumberEval(factorial(number).LongValue());}