yijunyu/c-to-rust huggingface dataset:
// Original:
public boolean stem() {limit_backward = cursor;cursor = limit;int v_1 = limit - cursor;r_endings();cursor = limit - v_1;int v_2 = limit - cursor;r_undouble();cursor = limit - v_2;int v_3 = limit - cursor;r_respell();cursor = limit - v_3;cursor = limit_backward;return true;}

// Translation:
public override bool Stem(){int v_1;int v_2;int v_3;m_limit_backward = m_cursor; m_cursor = m_limit;v_1 = m_limit - m_cursor;do{if (!r_endings()){goto lab0;}} while (false);lab0:m_cursor = m_limit - v_1;v_2 = m_limit - m_cursor;do{if (!r_undouble()){goto lab1;}} while (false);lab1:m_cursor = m_limit - v_2;v_3 = m_limit - m_cursor;do{if (!r_respell()){goto lab2;}} while (false);lab2:m_cursor = m_limit - v_3;m_cursor = m_limit_backward; return true;}
// Original:
public IntervalSet[] getDecisionLookahead(ATNState s) {if ( s==null ) {return null;}IntervalSet[] look = new IntervalSet[s.getNumberOfTransitions()];for (int alt = 0; alt < s.getNumberOfTransitions(); alt++) {look[alt] = new IntervalSet();Set<ATNConfig> lookBusy = new HashSet<ATNConfig>();boolean seeThruPreds = false; _LOOK(s.transition(alt).target, null, PredictionContext.EMPTY,look[alt], lookBusy, new BitSet(), seeThruPreds, false);if ( look[alt].size()==0 || look[alt].contains(HIT_PRED) ) {look[alt] = null;}}return look;}

// Translation:
public virtual IntervalSet[] GetDecisionLookahead(ATNState s){if (s == null){return null;}IntervalSet[] look = new IntervalSet[s.NumberOfTransitions];for (int alt = 0; alt < s.NumberOfTransitions; alt++){look[alt] = new IntervalSet();HashSet<ATNConfig> lookBusy = new HashSet<ATNConfig>();bool seeThruPreds = false;Look(s.Transition(alt).target, null, PredictionContext.EMPTY, look[alt], lookBusy, new BitSet(), seeThruPreds, false);if (look[alt].Count == 0 || look[alt].Contains(HitPred)){look[alt] = null;}}return look;}
// Original:
public static Ptg createPtg(LittleEndianInput in) {byte id = in.readByte();if (id < 0x20) {return createBasePtg(id, in);}Ptg  retval = createClassifiedPtg(id, in);if (id >= 0x60) {retval.setClass(CLASS_ARRAY);} else if (id >= 0x40) {retval.setClass(CLASS_VALUE);} else {retval.setClass(CLASS_REF);}return retval;}

// Translation:
public static Ptg CreatePtg(ILittleEndianInput in1){byte id = (byte)in1.ReadByte();if (id < 0x20){return CreateBasePtg(id, in1);}Ptg retval = CreateClassifiedPtg(id, in1);if (id >= 0x60){retval.PtgClass = CLASS_ARRAY;}else if (id >= 0x40){retval.PtgClass = CLASS_VALUE;}else{retval.PtgClass = CLASS_REF;}return retval;}
// Original:
public ListEntitiesDetectionJobsResult listEntitiesDetectionJobs(ListEntitiesDetectionJobsRequest request) {request = beforeClientExecution(request);return executeListEntitiesDetectionJobs(request);}

// Translation:
public virtual ListEntitiesDetectionJobsResponse ListEntitiesDetectionJobs(ListEntitiesDetectionJobsRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListEntitiesDetectionJobsRequestMarshaller.Instance;options.ResponseUnmarshaller = ListEntitiesDetectionJobsResponseUnmarshaller.Instance;return Invoke<ListEntitiesDetectionJobsResponse>(request, options);}
// Original:
public ListReviewableHITsResult listReviewableHITs(ListReviewableHITsRequest request) {request = beforeClientExecution(request);return executeListReviewableHITs(request);}

// Translation:
public virtual ListReviewableHITsResponse ListReviewableHITs(ListReviewableHITsRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListReviewableHITsRequestMarshaller.Instance;options.ResponseUnmarshaller = ListReviewableHITsResponseUnmarshaller.Instance;return Invoke<ListReviewableHITsResponse>(request, options);}
// Original:
public OperationEvaluationContext(WorkbookEvaluator bookEvaluator, EvaluationWorkbook workbook, int sheetIndex, int srcRowNum,int srcColNum, EvaluationTracker tracker) {this(bookEvaluator, workbook, sheetIndex, srcRowNum, srcColNum, tracker, true);}

// Translation:
public OperationEvaluationContext(WorkbookEvaluator bookEvaluator, IEvaluationWorkbook workbook, int sheetIndex, int srcRowNum,int srcColNum, EvaluationTracker tracker){_bookEvaluator = bookEvaluator;_workbook = workbook;_sheetIndex = sheetIndex;_rowIndex = srcRowNum;_columnIndex = srcColNum;_tracker = tracker;}
// Original:
public void setMaxDocFreqPct(int maxPercentage) {setMaxDocFreq(Math.toIntExact((long) maxPercentage * ir.maxDoc() / 100));}

// Translation:
public void SetMaxDocFreqPct(int maxPercentage){this.MaxDocFreq = maxPercentage * ir.NumDocs / 100;}
// Original:
public final void lazySet(V newValue) {unsafe.putOrderedObject(this, valueOffset, newValue);}

// Translation:
public void lazySet(V newValue){value = newValue;}
// Original:
public UpdateVpcLinkResult updateVpcLink(UpdateVpcLinkRequest request) {request = beforeClientExecution(request);return executeUpdateVpcLink(request);}

// Translation:
public virtual UpdateVpcLinkResponse UpdateVpcLink(UpdateVpcLinkRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateVpcLinkRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateVpcLinkResponseUnmarshaller.Instance;return Invoke<UpdateVpcLinkResponse>(request, options);}
// Original:
public void removeNoteCount() {remove1stProperty(PropertyIDMap.PID_NOTECOUNT);}

// Translation:
public void RemoveNoteCount(){MutableSection s = (MutableSection)FirstSection;s.RemoveProperty(PropertyIDMap.PID_NOTECOUNT);}
// Original:
public Ref setValue(Ref value) {Ref prior = put(getKey(), value);ref = value;return prior;}

// Translation:
public virtual Ref SetValue(Ref value){Ref prior = this._enclosing.Put(this.Key, value);this.@ref = value;return prior;}
// Original:
public RevCommit getSourceCommit(int idx) {return sourceCommits[idx];}

// Translation:
public virtual RevCommit GetSourceCommit(int idx){return sourceCommits[idx];}
// Original:
public ClassicTokenizerFactory(Map<String,String> args) {super(args);maxTokenLength = getInt(args, "maxTokenLength", StandardAnalyzer.DEFAULT_MAX_TOKEN_LENGTH);if (!args.isEmpty()) {throw new IllegalArgumentException("Unknown parameters: " + args);}}

// Translation:
public ClassicTokenizerFactory(IDictionary<string, string> args): base(args){AssureMatchVersion();maxTokenLength = GetInt32(args, "maxTokenLength", StandardAnalyzer.DEFAULT_MAX_TOKEN_LENGTH);if (args.Count > 0){throw new System.ArgumentException("Unknown parameters: " + args);}}
// Original:
public GetDistributionResult getDistribution(GetDistributionRequest request) {request = beforeClientExecution(request);return executeGetDistribution(request);}

// Translation:
public virtual GetDistributionResponse GetDistribution(GetDistributionRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetDistributionRequestMarshaller.Instance;options.ResponseUnmarshaller = GetDistributionResponseUnmarshaller.Instance;return Invoke<GetDistributionResponse>(request, options);}
// Original:
public long seek(long ord) {long idx = ord / indexInterval;assert idx < fieldIndex.numIndexTerms;final long offset = fieldIndex.termOffsets.get(idx);final int length = (int) (fieldIndex.termOffsets.get(1+idx) - offset);termBytesReader.fillSlice(term, fieldIndex.termBytesStart + offset, length);this.ord = idx * indexInterval;return fieldIndex.termsStart + fieldIndex.termsDictOffsets.get(idx);}

// Translation:
public override long Seek(long ord){int idx = (int)(ord / outerInstance.totalIndexInterval);Debug.Assert(idx < fieldIndex.numIndexTerms);long offset = fieldIndex.termOffsets.Get(idx);int length = (int)(fieldIndex.termOffsets.Get(1 + idx) - offset);outerInstance.termBytesReader.FillSlice(term, fieldIndex.termBytesStart + offset, length);this.ord = idx * outerInstance.totalIndexInterval;return fieldIndex.termsStart + fieldIndex.termsDictOffsets.Get(idx);}
// Original:
public DescribeInterconnectsResult describeInterconnects(DescribeInterconnectsRequest request) {request = beforeClientExecution(request);return executeDescribeInterconnects(request);}

// Translation:
public virtual DescribeInterconnectsResponse DescribeInterconnects(DescribeInterconnectsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeInterconnectsRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeInterconnectsResponseUnmarshaller.Instance;return Invoke<DescribeInterconnectsResponse>(request, options);}
// Original:
public static EvaluationException invalidValue() {return new EvaluationException(ErrorEval.VALUE_INVALID);}

// Translation:
public static EvaluationException InvalidValue(){return new EvaluationException(ErrorEval.VALUE_INVALID);}
// Original:
public static String escapeWhitespace(String s, boolean escapeSpaces) {StringBuilder buf = new StringBuilder();for (char c : s.toCharArray()) {if ( c==' ' && escapeSpaces ) buf.append('\u00B7');else if ( c=='\t' ) buf.append("\\t");else if ( c=='\n' ) buf.append("\\n");else if ( c=='\r' ) buf.append("\\r");else buf.append(c);}return buf.toString();}

// Translation:
public static string EscapeWhitespace(string s, bool escapeSpaces){StringBuilder buf = new StringBuilder();foreach (char c in s.ToCharArray()){if (c == ' ' && escapeSpaces){buf.Append('\u00B7');}else{if (c == '\t'){buf.Append("\\t");}else{if (c == '\n'){buf.Append("\\n");}else{if (c == '\r'){buf.Append("\\r");}else{buf.Append(c);}}}}}return buf.ToString();}
// Original:
public DescribeOrderableClusterOptionsResult describeOrderableClusterOptions(DescribeOrderableClusterOptionsRequest request) {request = beforeClientExecution(request);return executeDescribeOrderableClusterOptions(request);}

// Translation:
public virtual DescribeOrderableClusterOptionsResponse DescribeOrderableClusterOptions(DescribeOrderableClusterOptionsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeOrderableClusterOptionsRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeOrderableClusterOptionsResponseUnmarshaller.Instance;return Invoke<DescribeOrderableClusterOptionsResponse>(request, options);}
// Original:
public DeleteArchiveRequest(String vaultName, String archiveId) {setVaultName(vaultName);setArchiveId(archiveId);}

// Translation:
public DeleteArchiveRequest(string vaultName, string archiveId){_vaultName = vaultName;_archiveId = archiveId;}
// Original:
public DescribeSnapshotsResult describeSnapshots(DescribeSnapshotsRequest request) {request = beforeClientExecution(request);return executeDescribeSnapshots(request);}

// Translation:
public virtual DescribeSnapshotsResponse DescribeSnapshots(DescribeSnapshotsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeSnapshotsRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeSnapshotsResponseUnmarshaller.Instance;return Invoke<DescribeSnapshotsResponse>(request, options);}
// Original:
public BatchDeleteClusterSnapshotsResult batchDeleteClusterSnapshots(BatchDeleteClusterSnapshotsRequest request) {request = beforeClientExecution(request);return executeBatchDeleteClusterSnapshots(request);}

// Translation:
public virtual BatchDeleteClusterSnapshotsResponse BatchDeleteClusterSnapshots(BatchDeleteClusterSnapshotsRequest request){var options = new InvokeOptions();options.RequestMarshaller = BatchDeleteClusterSnapshotsRequestMarshaller.Instance;options.ResponseUnmarshaller = BatchDeleteClusterSnapshotsResponseUnmarshaller.Instance;return Invoke<BatchDeleteClusterSnapshotsResponse>(request, options);}
// Original:
public DescribeClientVpnRoutesResult describeClientVpnRoutes(DescribeClientVpnRoutesRequest request) {request = beforeClientExecution(request);return executeDescribeClientVpnRoutes(request);}

// Translation:
public virtual DescribeClientVpnRoutesResponse DescribeClientVpnRoutes(DescribeClientVpnRoutesRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeClientVpnRoutesRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeClientVpnRoutesResponseUnmarshaller.Instance;return Invoke<DescribeClientVpnRoutesResponse>(request, options);}
// Original:
public String toString() {String padd = getPadding();StringBuilder sb = new StringBuilder(super.toString());sb.append(parallel ? " [" : " {");sb.append(NEW_LINE);for (final PerfTask task : tasks) {sb.append(task.toString());sb.append(NEW_LINE);}sb.append(padd);sb.append(!letChildReport ? ">" : (parallel ? "]" : "}"));if (fixedTime) {sb.append(' ').append(NumberFormat.getNumberInstance(Locale.ROOT).format(runTimeSec)).append('s');} else if (repetitions>1) {sb.append(" * ").append(repetitions);} else if (repetitions==REPEAT_EXHAUST) {sb.append(" * EXHAUST");}if (rate>0) {sb.append(",  rate: ").append(rate).append('/').append(perMin ? "min" : "sec");}if (getRunInBackground()) {sb.append(" &");int x = getBackgroundDeltaPriority();if (x != 0) {sb.append(x);}}return sb.toString();}

// Translation:
public override string ToString(){string padd = GetPadding();StringBuilder sb = new StringBuilder(base.ToString());sb.Append(parallel ? " [" : " {");sb.Append(NEW_LINE);foreach (PerfTask task in tasks){sb.Append(task.ToString());sb.Append(NEW_LINE);}sb.Append(padd);sb.Append(!letChildReport ? ">" : (parallel ? "]" : "}"));if (fixedTime){sb.AppendFormat(CultureInfo.InvariantCulture, " {0:N}s", runTimeSec);}else if (repetitions > 1){sb.Append(" * " + repetitions);}else if (repetitions == REPEAT_EXHAUST){sb.Append(" * EXHAUST");}if (rate > 0){sb.Append(",  rate: " + rate + "/" + (perMin ? "min" : "sec"));}if (RunInBackground){sb.Append(" &");int x = BackgroundDeltaPriority;if (x != 0){sb.Append(x);}}return sb.ToString();}
// Original:
public void serialize(LittleEndianOutput out) {out.writeDouble(field_1_minimumAxisValue);out.writeDouble(field_2_maximumAxisValue);out.writeDouble(field_3_majorIncrement);out.writeDouble(field_4_minorIncrement);out.writeDouble(field_5_categoryAxisCross);out.writeShort(field_6_options);}

// Translation:
public override void Serialize(ILittleEndianOutput out1){out1.WriteDouble(field_1_minimumAxisValue);out1.WriteDouble(field_2_maximumAxisValue);out1.WriteDouble(field_3_majorIncrement);out1.WriteDouble(field_4_minorIncrement);out1.WriteDouble(field_5_categoryAxisCross);out1.WriteShort(field_6_options);}
// Original:
public final void makeReadOnly() {readOnly = true;}

// Translation:
public void MakeReadOnly(){readOnly = true;}
// Original:
public DescribeDirectConnectGatewaysResult describeDirectConnectGateways(DescribeDirectConnectGatewaysRequest request) {request = beforeClientExecution(request);return executeDescribeDirectConnectGateways(request);}

// Translation:
public virtual DescribeDirectConnectGatewaysResponse DescribeDirectConnectGateways(DescribeDirectConnectGatewaysRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeDirectConnectGatewaysRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeDirectConnectGatewaysResponseUnmarshaller.Instance;return Invoke<DescribeDirectConnectGatewaysResponse>(request, options);}
// Original:
public GetUsagePlanKeyResult getUsagePlanKey(GetUsagePlanKeyRequest request) {request = beforeClientExecution(request);return executeGetUsagePlanKey(request);}

// Translation:
public virtual GetUsagePlanKeyResponse GetUsagePlanKey(GetUsagePlanKeyRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetUsagePlanKeyRequestMarshaller.Instance;options.ResponseUnmarshaller = GetUsagePlanKeyResponseUnmarshaller.Instance;return Invoke<GetUsagePlanKeyResponse>(request, options);}
// Original:
public DescribeVpcEndpointConnectionNotificationsResult describeVpcEndpointConnectionNotifications(DescribeVpcEndpointConnectionNotificationsRequest request) {request = beforeClientExecution(request);return executeDescribeVpcEndpointConnectionNotifications(request);}

// Translation:
public virtual DescribeVpcEndpointConnectionNotificationsResponse DescribeVpcEndpointConnectionNotifications(DescribeVpcEndpointConnectionNotificationsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeVpcEndpointConnectionNotificationsRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeVpcEndpointConnectionNotificationsResponseUnmarshaller.Instance;return Invoke<DescribeVpcEndpointConnectionNotificationsResponse>(request, options);}
// Original:
public UpdateGatewayGroupResult updateGatewayGroup(UpdateGatewayGroupRequest request) {request = beforeClientExecution(request);return executeUpdateGatewayGroup(request);}

// Translation:
public virtual UpdateGatewayGroupResponse UpdateGatewayGroup(UpdateGatewayGroupRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateGatewayGroupRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateGatewayGroupResponseUnmarshaller.Instance;return Invoke<UpdateGatewayGroupResponse>(request, options);}
// Original:
public DetachClassicLinkVpcResult detachClassicLinkVpc(DetachClassicLinkVpcRequest request) {request = beforeClientExecution(request);return executeDetachClassicLinkVpc(request);}

// Translation:
public virtual DetachClassicLinkVpcResponse DetachClassicLinkVpc(DetachClassicLinkVpcRequest request){var options = new InvokeOptions();options.RequestMarshaller = DetachClassicLinkVpcRequestMarshaller.Instance;options.ResponseUnmarshaller = DetachClassicLinkVpcResponseUnmarshaller.Instance;return Invoke<DetachClassicLinkVpcResponse>(request, options);}
// Original:
public ListOperationsResult listOperations() {return listOperations(new ListOperationsRequest());}

// Translation:
public virtual ListOperationsResponse ListOperations(){return ListOperations(new ListOperationsRequest());}
// Original:
public BatchDeletePhoneNumberResult batchDeletePhoneNumber(BatchDeletePhoneNumberRequest request) {request = beforeClientExecution(request);return executeBatchDeletePhoneNumber(request);}

// Translation:
public virtual BatchDeletePhoneNumberResponse BatchDeletePhoneNumber(BatchDeletePhoneNumberRequest request){var options = new InvokeOptions();options.RequestMarshaller = BatchDeletePhoneNumberRequestMarshaller.Instance;options.ResponseUnmarshaller = BatchDeletePhoneNumberResponseUnmarshaller.Instance;return Invoke<BatchDeletePhoneNumberResponse>(request, options);}
// Original:
public void setExpireAgeMillis(long expireAgeMillis) {this.expireAgeMillis = expireAgeMillis;expire = null;}

// Translation:
public virtual void SetExpireAgeMillis(long expireAgeMillis){this.expireAgeMillis = expireAgeMillis;expire = null;}
// Original:
public DeactivateEventSourceResult deactivateEventSource(DeactivateEventSourceRequest request) {request = beforeClientExecution(request);return executeDeactivateEventSource(request);}

// Translation:
public virtual DeactivateEventSourceResponse DeactivateEventSource(DeactivateEventSourceRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeactivateEventSourceRequestMarshaller.Instance;options.ResponseUnmarshaller = DeactivateEventSourceResponseUnmarshaller.Instance;return Invoke<DeactivateEventSourceResponse>(request, options);}
// Original:
public void readBytes(byte[] b, int offset, int len) {System.arraycopy(bytes, pos, b, offset, len);pos += len;}

// Translation:
public override void ReadBytes(byte[] b, int offset, int len){Array.Copy(bytes, pos, b, offset, len);pos += len;}
// Original:
public IntBuffer put(int index, int c) {throw new ReadOnlyBufferException();}

// Translation:
public override java.nio.IntBuffer put(int index, int c){throw new java.nio.ReadOnlyBufferException();}
// Original:
public SendUsersMessagesResult sendUsersMessages(SendUsersMessagesRequest request) {request = beforeClientExecution(request);return executeSendUsersMessages(request);}

// Translation:
public virtual SendUsersMessagesResponse SendUsersMessages(SendUsersMessagesRequest request){var options = new InvokeOptions();options.RequestMarshaller = SendUsersMessagesRequestMarshaller.Instance;options.ResponseUnmarshaller = SendUsersMessagesResponseUnmarshaller.Instance;return Invoke<SendUsersMessagesResponse>(request, options);}
// Original:
public MissingFormatWidthException(String s) {if (s == null) {throw new NullPointerException();}this.s = s;}

// Translation:
public MissingFormatWidthException(string s){if (s == null){throw new System.ArgumentNullException();}this.s = s;}
// Original:
public DescribeVolumesRequest(java.util.List<String> volumeIds) {setVolumeIds(volumeIds);}

// Translation:
public DescribeVolumesRequest(List<string> volumeIds){_volumeIds = volumeIds;}
// Original:
public SubmitCutoutTaskRequest() {super("lubancloud", "2018-05-09", "SubmitCutoutTask", "luban");setMethod(MethodType.POST);}

// Translation:
public SubmitCutoutTaskRequest(): base("lubancloud", "2018-05-09", "SubmitCutoutTask", "luban", "openAPI"){Method = MethodType.POST;}
// Original:
public DoubleBuffer asReadOnlyBuffer() {return duplicate();}

// Translation:
public override java.nio.DoubleBuffer asReadOnlyBuffer(){return duplicate();}
// Original:
@Override public int size() {return subMap.size();}

// Translation:
public override int size(){return this._enclosing._size;}
// Original:
public CreateLabelsResult createLabels(CreateLabelsRequest request) {request = beforeClientExecution(request);return executeCreateLabels(request);}

// Translation:
public virtual CreateLabelsResponse CreateLabels(CreateLabelsRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateLabelsRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateLabelsResponseUnmarshaller.Instance;return Invoke<CreateLabelsResponse>(request, options);}
// Original:
public boolean isEmpty() {return size == 0;}

// Translation:
public bool isEmpty(){return size == 0;}
// Original:
public int getRenameScore() {return outCandidate.renameScore;}

// Translation:
public virtual int GetRenameScore(){return currentSource.renameScore;}
// Original:
public SeriesTextRecord() {field_4_text = "";is16bit = false;}

// Translation:
public SeriesTextRecord(){field_4_text = "";is16bit = false;}
// Original:
public char get() {if (position == limit) {throw new BufferUnderflowException();}return sequence.charAt(position++);}

// Translation:
public override char get(){if (_position == _limit){throw new java.nio.BufferUnderflowException();}return sequence[_position++];}
// Original:
public static double irr(double[] values, double guess) {double x0 = guess;for (int i = 0; i < MAX_ITERATION_COUNT; i++) {final double factor = 1.0 + x0;double denominator = factor;if (denominator == 0) {return Double.NaN;}double fValue = values[0];double fDerivative = 0;for (int k = 1; k < values.length; k++) {final double value = values[k];fValue += value / denominator;denominator *= factor;fDerivative -= k * value / denominator;}if (fDerivative == 0) {return Double.NaN;}double x1 =  x0 - fValue/fDerivative;if (Math.abs(x1 - x0) <= ABSOLUTE_ACCURACY) {return x1;}x0 = x1;}return Double.NaN;}

// Translation:
public static double irr(double[] values, double guess){int maxIterationCount = 20;double absoluteAccuracy = 1E-7;double x0 = guess;double x1;int i = 0;while (i < maxIterationCount){double fValue = 0;double fDerivative = 0;for (int k = 0; k < values.Length; k++){fValue += values[k] / Math.Pow(1.0 + x0, k);fDerivative += -k * values[k] / Math.Pow(1.0 + x0, k + 1);}x1 = x0 - fValue / fDerivative;if (Math.Abs(x1 - x0) <= absoluteAccuracy){return x1;}x0 = x1;++i;}return Double.NaN;}
// Original:
public static String toHex(long value) {StringBuilder sb = new StringBuilder(16);writeHex(sb, value, 16, "");return sb.toString();}

// Translation:
public static string ToHex(short value){return ToHex((long)value, 4);}
// Original:
public void skip() {_type = SKIP;}

// Translation:
public virtual void Skip(){_type = TokenTypes.Skip;}
// Original:
public HSSFClientAnchor getPreferredSize(){return getPreferredSize(1.0);}

// Translation:
public IClientAnchor GetPreferredSize(){return GetPreferredSize(1.0);}
// Original:
public void fromRaw(int[] ints) {fromRaw(ints, 0);}

// Translation:
public virtual void FromRaw(int[] ints){FromRaw(ints, 0);}