yijunyu/c-to-rust huggingface dataset:
// Original:
public HSSFSimpleShape createSimpleShape(HSSFClientAnchor anchor) {HSSFSimpleShape shape = new HSSFSimpleShape(null, anchor);addShape(shape);onCreate(shape);return shape;}

// Translation:
public HSSFSimpleShape CreateSimpleShape(HSSFClientAnchor anchor){HSSFSimpleShape shape = new HSSFSimpleShape(null, anchor);AddShape(shape);OnCreate(shape);return shape;}
// Original:
public synchronized V remove(Object key) {int hash = secondaryHash(key.hashCode());HashtableEntry<K, V>[] tab = table;int index = hash & (tab.length - 1);for (HashtableEntry<K, V> e = tab[index], prev = null;e != null; prev = e, e = e.next) {if (e.hash == hash && key.equals(e.key)) {if (prev == null) {tab[index] = e.next;} else {prev.next = e.next;}modCount++;size--;return e.value;}}return null;}

// Translation:
public override V remove(object key){lock (this){int hash = secondaryHash(key.GetHashCode());java.util.Hashtable.HashtableEntry<K, V>[] tab = table;int index = hash & (tab.Length - 1);{java.util.Hashtable.HashtableEntry<K, V> e = tab[index];java.util.Hashtable.HashtableEntry<K, V> prev = null;for (; e != null; prev = e, e = e.next){if (e.hash == hash && key.Equals(e.key)){if (prev == null){tab[index] = e.next;}else{prev.next = e.next;}modCount++;_size--;return e.value;}}}return default(V);}}
// Original:
public final ValueEval getValue(int sheetIndex, int row, int col) {return getRelativeValue(sheetIndex, row, col);}

// Translation:
public ValueEval GetValue(int sheetIndex, int row, int col){return GetRelativeValue(sheetIndex, row, col);}
// Original:
public SetIdentityNotificationTopicResult setIdentityNotificationTopic(SetIdentityNotificationTopicRequest request) {request = beforeClientExecution(request);return executeSetIdentityNotificationTopic(request);}

// Translation:
public virtual SetIdentityNotificationTopicResponse SetIdentityNotificationTopic(SetIdentityNotificationTopicRequest request){var options = new InvokeOptions();options.RequestMarshaller = SetIdentityNotificationTopicRequestMarshaller.Instance;options.ResponseUnmarshaller = SetIdentityNotificationTopicResponseUnmarshaller.Instance;return Invoke<SetIdentityNotificationTopicResponse>(request, options);}
// Original:
public void serialize(LittleEndianOutput out) {out.write(_rawData);}

// Translation:
public override void Serialize(ILittleEndianOutput out1){out1.Write(_rawData);}
// Original:
public BlockJoinWeight(Query joinQuery, Weight childWeight, BitSetProducer parentsFilter, ScoreMode scoreMode) {super(joinQuery, childWeight);this.parentsFilter = parentsFilter;this.scoreMode = scoreMode;}

// Translation:
public BlockJoinWeight(Query joinQuery, Weight childWeight, Filter parentsFilter, ScoreMode scoreMode): base(){this.joinQuery = joinQuery;this.childWeight = childWeight;this.parentsFilter = parentsFilter;this.scoreMode = scoreMode;}
// Original:
public Builder() {this.field = null;this.termArrays = new ArrayList<>();this.positions = new ArrayList<>();this.slop = 0;}

// Translation:
public Builder(){data = new GrowableByteArrayDataOutput(128);bufferSize = 0;previousDoc = -1;indexInterval = 2;cardinality = 0;numBlocks = 0;}
// Original:
public CreateGameSessionQueueResult createGameSessionQueue(CreateGameSessionQueueRequest request) {request = beforeClientExecution(request);return executeCreateGameSessionQueue(request);}

// Translation:
public virtual CreateGameSessionQueueResponse CreateGameSessionQueue(CreateGameSessionQueueRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateGameSessionQueueRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateGameSessionQueueResponseUnmarshaller.Instance;return Invoke<CreateGameSessionQueueResponse>(request, options);}
// Original:
public DescribeMetricCollectionTypesResult describeMetricCollectionTypes() {return describeMetricCollectionTypes(new DescribeMetricCollectionTypesRequest());}

// Translation:
public virtual DescribeMetricCollectionTypesResponse DescribeMetricCollectionTypes(){return DescribeMetricCollectionTypes(new DescribeMetricCollectionTypesRequest());}
// Original:
@Override public boolean contains(Object o) {if (o instanceof Entry) {Entry<?> entry = (Entry<?>) o;int count = count(entry.getElement());return (count == entry.getCount()) && (count > 0);}return false;}

// Translation:
public override bool contains(object o){if (!(o is java.util.MapClass.Entry<K, V>)){return false;}java.util.MapClass.Entry<object, object> e = (java.util.MapClass.Entry<object, object>)o;return this._enclosing.containsMapping(e.getKey(), e.getValue());}
// Original:
public synchronized int get(FacetLabel categoryPath) {Integer res = cache.get(categoryPath);if (res == null) {return -1;}return res.intValue();}

// Translation:
public virtual int Get(FacetLabel categoryPath){lock (this){int result;if (!cache.TryGetValue(categoryPath, out result)){return -1;}return result;}}
// Original:
@Override public boolean containsKey(Object key) {if (key == null) {return entryForNullKey != null;}int hash = key.hashCode();hash ^= (hash >>> 20) ^ (hash >>> 12);hash ^= (hash >>> 7) ^ (hash >>> 4);HashMapEntry<K, V>[] tab = table;for (HashMapEntry<K, V> e = tab[hash & (tab.length - 1)];e != null; e = e.next) {K eKey = e.key;if (eKey == key || (e.hash == hash && key.equals(eKey))) {return true;}}return false;}

// Translation:
public override bool containsKey(object key){if (key == null){return entryForNullKey != null;}int hash = key.GetHashCode();hash ^= ((int)(((uint)hash) >> 20)) ^ ((int)(((uint)hash) >> 12));hash ^= ((int)(((uint)hash) >> 7)) ^ ((int)(((uint)hash) >> 4));java.util.HashMap.HashMapEntry<K, V>[] tab = table;{for (java.util.HashMap.HashMapEntry<K, V> e = tab[hash & (tab.Length - 1)]; e !=null; e = e.next){K eKey = e.key;if (Sharpen.Util.Equals(eKey, key) || (e.hash == hash && key.Equals(eKey))){return true;}}}return false;}
// Original:
public boolean equals(Object obj) {if (obj instanceof Point) {Point that = (Point) obj;return this.x == that.x && this.y == that.y;}return false;}

// Translation:
public override bool Equals(object o){if (o is android.graphics.Point){android.graphics.Point p = (android.graphics.Point)o;return this.x == p.x && this.y == p.y;}return false;}
// Original:
public void message(String component, String message) {assert false: "message() should not be called when isEnabled returns false";}

// Translation:
public override void Message(string component, string message){Debug.Assert(false, "message() should not be called when isEnabled returns false");}
// Original:
public ListWorkerBlocksResult listWorkerBlocks(ListWorkerBlocksRequest request) {request = beforeClientExecution(request);return executeListWorkerBlocks(request);}

// Translation:
public virtual ListWorkerBlocksResponse ListWorkerBlocks(ListWorkerBlocksRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListWorkerBlocksRequestMarshaller.Instance;options.ResponseUnmarshaller = ListWorkerBlocksResponseUnmarshaller.Instance;return Invoke<ListWorkerBlocksResponse>(request, options);}
// Original:
public ListProvisionedCapacityResult listProvisionedCapacity(ListProvisionedCapacityRequest request) {request = beforeClientExecution(request);return executeListProvisionedCapacity(request);}

// Translation:
public virtual ListProvisionedCapacityResponse ListProvisionedCapacity(ListProvisionedCapacityRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListProvisionedCapacityRequestMarshaller.Instance;options.ResponseUnmarshaller = ListProvisionedCapacityResponseUnmarshaller.Instance;return Invoke<ListProvisionedCapacityResponse>(request, options);}
// Original:
@Override public boolean contains(Object value) {return containsValue(value);}

// Translation:
public override bool contains(object o){return this._enclosing.containsValue(o);}
// Original:
public void exitEveryRule(ParserRuleContext ctx) {if (ctx.children instanceof ArrayList) {((ArrayList<?>)ctx.children).trimToSize();}}

// Translation:
public virtual void ExitEveryRule(ParserRuleContext ctx){if (ctx.children is List<IParseTree>){((List<IParseTree>)ctx.children).TrimExcess();}}
// Original:
public int lookup(char[] text, int offset, int len) {if(!characterDefinition.isGroup(text[offset])) {return 1;}byte characterIdOfFirstCharacter = characterDefinition.getCharacterClass(text[offset]);int length = 1;for (int i = 1; i < len; i++) {if (characterIdOfFirstCharacter == characterDefinition.getCharacterClass(text[offset+i])){length++;} else {break;}}return length;}

// Translation:
public virtual int Lookup(char[] text, int offset, int len){if (!characterDefinition.IsGroup(text[offset])){return 1;}byte characterIdOfFirstCharacter = characterDefinition.GetCharacterClass(text[offset]);int length = 1;for (int i = 1; i < len; i++){if (characterIdOfFirstCharacter == characterDefinition.GetCharacterClass(text[offset + i])){length++;}else{break;}}return length;}
// Original:
public GetJobOutputResult getJobOutput(GetJobOutputRequest request) {request = beforeClientExecution(request);return executeGetJobOutput(request);}

// Translation:
public virtual GetJobOutputResponse GetJobOutput(GetJobOutputRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetJobOutputRequestMarshaller.Instance;options.ResponseUnmarshaller = GetJobOutputResponseUnmarshaller.Instance;return Invoke<GetJobOutputResponse>(request, options);}
// Original:
public void write(char b[], int off, int len) {reserve(len);unsafeWrite(b, off, len);}

// Translation:
public virtual void Write(char[] b, int off, int len){EnsureCapacity(len);UnsafeWrite(b, off, len);}
// Original:
public String toString() {return "weight(" + TermQuery.this + ")";}

// Translation:
public override string ToString(){return "weight(" + outerInstance + ")";}
// Original:
public int[] grow() {ParallelPostingsArray postingsArray = perField.postingsArray;final int oldSize = perField.postingsArray.size;postingsArray = perField.postingsArray = postingsArray.grow();perField.newPostingsArray();bytesUsed.addAndGet((postingsArray.bytesPerPosting() * (postingsArray.size - oldSize)));return postingsArray.textStarts;}

// Translation:
public override int[] Grow(){ParallelPostingsArray postingsArray = perField.postingsArray;int oldSize = perField.postingsArray.size;postingsArray = perField.postingsArray = postingsArray.Grow();bytesUsed.AddAndGet((postingsArray.BytesPerPosting() * (postingsArray.size - oldSize)));return postingsArray.textStarts;}
// Original:
public String toString() {return "'"+text+"'";}

// Translation:
public override string ToString(){return ruleName + ":" + bypassTokenType;}
// Original:
public boolean isMatch() {if (heads.isEmpty())return false;final ListIterator<Head> headIterator = heads.listIterator(heads.size());while (headIterator.hasPrevious()) {final Head head = headIterator.previous();if (head == LastHead.INSTANCE) {return true;}}return false;}

// Translation:
public virtual bool IsMatch(){ListIterator<Head> headIterator = heads.ListIterator(heads.Count);while (headIterator.HasPrevious()){Head head = headIterator.Previous();if (head == LastHead.INSTANCE){return true;}}return false;}
// Original:
public CRNRecord[] getCrns() {return _crns.clone();}

// Translation:
public CRNRecord[] GetCrns(){return (CRNRecord[])_crns.Clone();}
// Original:
public String toString() {return "slot:" + slot + " " + super.toString();}

// Translation:
public override string ToString(){return "slot:" + Slot + " " + base.ToString();}
// Original:
public int apply(char s[], int len) {if (len < min)return len;if (suffixes != null) {boolean found = false;for (int i = 0; i < suffixes.length; i++)if (endsWith(s, len, suffixes[i])) {found = true;break;}if (!found) return len;}for (int i = 0; i < rules.length; i++) {if (rules[i].matches(s, len))return rules[i].replace(s, len);}return len;}

// Translation:
public virtual int Apply(char[] s, int len){if (len < m_min){return len;}if (m_suffixes != null){bool found = false;for (int i = 0; i < m_suffixes.Length; i++){if (StemmerUtil.EndsWith(s, len, m_suffixes[i])){found = true;break;}}if (!found){return len;}}for (int i = 0; i < m_rules.Length; i++){if (m_rules[i].Matches(s, len)){return m_rules[i].Replace(s, len);}}return len;}
// Original:
public ModifyInstanceAttributeRequest(String instanceId, InstanceAttributeName attribute) {setInstanceId(instanceId);setAttribute(attribute.toString());}

// Translation:
public ModifyInstanceAttributeRequest(string instanceId, InstanceAttributeName attribute){_instanceId = instanceId;_attribute = attribute;}
// Original:
public ListEventTrackersResult listEventTrackers(ListEventTrackersRequest request) {request = beforeClientExecution(request);return executeListEventTrackers(request);}

// Translation:
public virtual ListEventTrackersResponse ListEventTrackers(ListEventTrackersRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListEventTrackersRequestMarshaller.Instance;options.ResponseUnmarshaller = ListEventTrackersResponseUnmarshaller.Instance;return Invoke<ListEventTrackersResponse>(request, options);}
// Original:
public boolean isNewFragment() {boolean isNewFrag = offsetAtt.endOffset() >= (fragmentSize * currentNumFrags);if (isNewFrag) {currentNumFrags++;}return isNewFrag;}

// Translation:
public virtual bool IsNewFragment(){bool isNewFrag = offsetAtt.EndOffset >= (FragmentSize*currentNumFrags);if (isNewFrag){currentNumFrags++;}return isNewFrag;}
// Original:
public BatchGetQueryExecutionResult batchGetQueryExecution(BatchGetQueryExecutionRequest request) {request = beforeClientExecution(request);return executeBatchGetQueryExecution(request);}

// Translation:
public virtual BatchGetQueryExecutionResponse BatchGetQueryExecution(BatchGetQueryExecutionRequest request){var options = new InvokeOptions();options.RequestMarshaller = BatchGetQueryExecutionRequestMarshaller.Instance;options.ResponseUnmarshaller = BatchGetQueryExecutionResponseUnmarshaller.Instance;return Invoke<BatchGetQueryExecutionResponse>(request, options);}
// Original:
public static double cos(double a) {if (a < 0.0) {a = -a;}if (a > SIN_COS_MAX_VALUE_FOR_INT_MODULO) {return Math.cos(a);}int index = (int)(a * SIN_COS_INDEXER + 0.5);double delta = (a - index * SIN_COS_DELTA_HI) - index * SIN_COS_DELTA_LO;index &= (SIN_COS_TABS_SIZE-2); double indexCos = cosTab[index];double indexSin = sinTab[index];return indexCos + delta * (-indexSin + delta * (-indexCos * ONE_DIV_F2 + delta * (indexSin * ONE_DIV_F3 + delta * indexCos * ONE_DIV_F4)));}

// Translation:
public static double Cos(double a){if (a < 0.0){a = -a;}if (a > SIN_COS_MAX_VALUE_FOR_INT_MODULO){return Math.Cos(a);}int index = (int)(a * SIN_COS_INDEXER + 0.5);double delta = (a - index * SIN_COS_DELTA_HI) - index * SIN_COS_DELTA_LO;index &= (SIN_COS_TABS_SIZE - 2); double indexCos = cosTab[index];double indexSin = sinTab[index];return indexCos + delta * (-indexSin + delta * (-indexCos * ONE_DIV_F2 + delta * (indexSin * ONE_DIV_F3 + delta * indexCos * ONE_DIV_F4)));}
// Original:
public ByteBuffer putLong(long value) {throw new ReadOnlyBufferException();}

// Translation:
public override java.nio.ByteBuffer putLong(long value){throw new System.NotImplementedException();}
// Original:
public String toString() {StringBuilder sb = new StringBuilder();sb.append(getClass().getName());sb.append(" [");sb.append("sheetIx=").append(getExternSheetIndex());sb.append(" ! ");sb.append(formatReferenceAsString());sb.append("]");return sb.toString();}

// Translation:
public override String ToString(){StringBuilder sb = new StringBuilder();sb.Append(GetType().Name);sb.Append(" [");sb.Append("sheetIx=").Append(ExternSheetIndex);sb.Append(" ! ");sb.Append(FormatReferenceAsString());sb.Append("]");return sb.ToString();}
// Original:
public STSAssumeRoleSessionCredentialsProvider(AlibabaCloudCredentials longLivedCredentials,String roleArn, IClientProfile clientProfile) {this(new StaticCredentialsProvider(longLivedCredentials), roleArn, clientProfile);}

// Translation:
public STSAssumeRoleSessionCredentialsProvider(AlibabaCloudCredentials longLivedCredentials,string roleArn,IClientProfile clientProfile){AlibabaCloudCredentialsProvider longLivedCredentialsProvider =new StaticCredentialsProvider(longLivedCredentials);this.roleArn = roleArn;roleSessionName = GetNewRoleSessionName();stsClient = new DefaultAcsClient(clientProfile, longLivedCredentialsProvider);}
// Original:
public SessionToken(String id, Revision revision) {this.id = id;this.version = revision.getVersion();this.sourceFiles = revision.getSourceFiles();}

// Translation:
public SessionToken(string id, IRevision revision){Id = id;Version = revision.Version;SourceFiles = revision.SourceFiles;}
// Original:
public Collection<String> call() throws GitAPIException {checkCallable();try (SubmoduleWalk generator = SubmoduleWalk.forIndex(repo)) {if (!paths.isEmpty())generator.setFilter(PathFilterGroup.createFromStrings(paths));StoredConfig config = repo.getConfig();List<String> initialized = new ArrayList<>();while (generator.next()) {if (generator.getConfigUrl() != null)continue;String path = generator.getPath();String name = generator.getModuleName();String url = generator.getRemoteUrl();String update = generator.getModulesUpdate();if (url != null)config.setString(ConfigConstants.CONFIG_SUBMODULE_SECTION,name, ConfigConstants.CONFIG_KEY_URL, url);if (update != null)config.setString(ConfigConstants.CONFIG_SUBMODULE_SECTION,name, ConfigConstants.CONFIG_KEY_UPDATE, update);if (url != null || update != null)initialized.add(path);}if (!initialized.isEmpty())config.save();return initialized;} catch (IOException | ConfigInvalidException e) {throw new JGitInternalException(e.getMessage(), e);}}

// Translation:
public override ICollection<string> Call(){CheckCallable();try{SubmoduleWalk generator = SubmoduleWalk.ForIndex(repo);if (!paths.IsEmpty()){generator.SetFilter(PathFilterGroup.CreateFromStrings(paths));}StoredConfig config = repo.GetConfig();IList<string> initialized = new AList<string>();while (generator.Next()){if (generator.GetConfigUrl() != null){continue;}string path = generator.GetPath();string url = generator.GetRemoteUrl();string update = generator.GetModulesUpdate();if (url != null){config.SetString(ConfigConstants.CONFIG_SUBMODULE_SECTION, path, ConfigConstants.CONFIG_KEY_URL, url);}if (update != null){config.SetString(ConfigConstants.CONFIG_SUBMODULE_SECTION, path, ConfigConstants.CONFIG_KEY_UPDATE, update);}if (url != null || update != null){initialized.AddItem(path);}}if (!initialized.IsEmpty()){config.Save();}return initialized;}catch (IOException e){throw new JGitInternalException(e.Message, e);}catch (ConfigInvalidException e){throw new JGitInternalException(e.Message, e);}}
// Original:
public CreateVaultRequest(String accountId, String vaultName) {setAccountId(accountId);setVaultName(vaultName);}

// Translation:
public CreateVaultRequest(string accountId, string vaultName){_accountId = accountId;_vaultName = vaultName;}
// Original:
public BooleanQueryNode(List<QueryNode> clauses) {setLeaf(false);allocate();set(clauses);}

// Translation:
public BooleanQueryNode(IList<IQueryNode> clauses){IsLeaf = false;Allocate();Set(clauses);}
// Original:
public DVALRecord() {field_cbo_id = 0xFFFFFFFF;field_5_dv_no = 0x00000000;}

// Translation:
public DVALRecord(){field_cbo_id = unchecked((int)0xFFFFFFFF);field_5_dv_no = 0x00000000;}
// Original:
public ListConfigurationsResult listConfigurations(ListConfigurationsRequest request) {request = beforeClientExecution(request);return executeListConfigurations(request);}

// Translation:
public virtual ListConfigurationsResponse ListConfigurations(ListConfigurationsRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListConfigurationsRequestMarshaller.Instance;options.ResponseUnmarshaller = ListConfigurationsResponseUnmarshaller.Instance;return Invoke<ListConfigurationsResponse>(request, options);}
// Original:
public String toFormulaString() {throw new RuntimeException("3D references need a workbook to determine formula text");}

// Translation:
public override String ToFormulaString(){throw new Exception("3D references need a workbook to determine formula text");}
// Original:
public int LA(int i) { return LT(i).getType(); }

// Translation:
public virtual int LA(int i){return LT(i).Type;}
// Original:
public void setCellValue(boolean value) {int row=_record.getRow();short col=_record.getColumn();short styleIndex=_record.getXFIndex();switch (_cellType) {default:setCellType(CellType.BOOLEAN, false, row, col, styleIndex);case BOOLEAN:(( BoolErrRecord ) _record).setValue(value);break;case FORMULA:((FormulaRecordAggregate)_record).setCachedBooleanResult(value);break;}}

// Translation:
public void SetCellValue(bool value){int row = _record.Row;int col = _record.Column;short styleIndex = _record.XFIndex;switch (cellType){case CellType.Boolean:((BoolErrRecord)_record).SetValue(value);break;case CellType.Formula:((FormulaRecordAggregate)_record).SetCachedBooleanResult(value);break;default:SetCellType(CellType.Boolean, false, row, col, styleIndex);((BoolErrRecord)_record).SetValue(value);break;}}
// Original:
public UntagDeliveryStreamResult untagDeliveryStream(UntagDeliveryStreamRequest request) {request = beforeClientExecution(request);return executeUntagDeliveryStream(request);}

// Translation:
public virtual UntagDeliveryStreamResponse UntagDeliveryStream(UntagDeliveryStreamRequest request){var options = new InvokeOptions();options.RequestMarshaller = UntagDeliveryStreamRequestMarshaller.Instance;options.ResponseUnmarshaller = UntagDeliveryStreamResponseUnmarshaller.Instance;return Invoke<UntagDeliveryStreamResponse>(request, options);}
// Original:
public CJKBigramFilterFactory(Map<String,String> args) {super(args);int flags = 0;if (getBoolean(args, "han", true)) {flags |= CJKBigramFilter.HAN;}if (getBoolean(args, "hiragana", true)) {flags |= CJKBigramFilter.HIRAGANA;}if (getBoolean(args, "katakana", true)) {flags |= CJKBigramFilter.KATAKANA;}if (getBoolean(args, "hangul", true)) {flags |= CJKBigramFilter.HANGUL;}this.flags = flags;this.outputUnigrams = getBoolean(args, "outputUnigrams", false);if (!args.isEmpty()) {throw new IllegalArgumentException("Unknown parameters: " + args);}}

// Translation:
public CJKBigramFilterFactory(IDictionary<string, string> args): base(args){CJKScript flags = 0;if (GetBoolean(args, "han", true)){flags |= CJKScript.HAN;}if (GetBoolean(args, "hiragana", true)){flags |= CJKScript.HIRAGANA;}if (GetBoolean(args, "katakana", true)){flags |= CJKScript.KATAKANA;}if (GetBoolean(args, "hangul", true)){flags |= CJKScript.HANGUL;}this.flags = flags;this.outputUnigrams = GetBoolean(args, "outputUnigrams", false);if (args.Count > 0){throw new System.ArgumentException("Unknown parameters: " + args);}}
// Original:
public static int toChars(int[] src, int srcOff, int srcLen, char[] dest, int destOff) {if (srcLen < 0) {throw new IllegalArgumentException("srcLen must be >= 0");}int written = 0;for (int i = 0; i < srcLen; ++i) {written += Character.toChars(src[srcOff + i], dest, destOff + written);}return written;}

// Translation:
public int ToChars(int[] src, int srcOff, int srcLen, char[] dest, int destOff){if (srcLen < 0){throw new ArgumentException("srcLen must be >= 0");}int written = 0;for (int i = 0; i < srcLen; ++i){written += Character.ToChars(src[srcOff + i], dest, destOff + written);}return written;}
// Original:
public StoredField(String name, long value) {super(name, TYPE);fieldsData = value;}

// Translation:
public StoredField(string name, float value): base(name, TYPE){FieldsData = new Single(value);}
// Original:
public static CFRuleRecord create(HSSFSheet sheet, byte comparisonOperation,String formulaText1, String formulaText2) {Ptg[] formula1 = parseFormula(formulaText1, sheet);Ptg[] formula2 = parseFormula(formulaText2, sheet);return new CFRuleRecord(CONDITION_TYPE_CELL_VALUE_IS, comparisonOperation, formula1, formula2);}

// Translation:
public static CFRuleRecord Create(HSSFSheet sheet, byte comparisonOperation,String formulaText1, String formulaText2){Ptg[] formula1 = ParseFormula(formulaText1, sheet);Ptg[] formula2 = ParseFormula(formulaText2, sheet);return new CFRuleRecord(CONDITION_TYPE_CELL_VALUE_IS, (ComparisonOperator)comparisonOperation, formula1, formula2);}