yijunyu/c-to-rust huggingface dataset:
// Original:
public CreateDomainResult createDomain(CreateDomainRequest request) {request = beforeClientExecution(request);return executeCreateDomain(request);}

// Translation:
public virtual CreateDomainResponse CreateDomain(CreateDomainRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateDomainRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateDomainResponseUnmarshaller.Instance;return Invoke<CreateDomainResponse>(request, options);}
// Original:
public int getWeight() {return WEIGHT_UNKNOWN;}

// Translation:
public virtual int GetWeight(){return WEIGHT_UNKNOWN;}
// Original:
public ChartStartObjectRecord(RecordInputStream in) {rt = in.readShort();grbitFrt = in.readShort();iObjectKind = in.readShort();iObjectContext = in.readShort();iObjectInstance1 = in.readShort();iObjectInstance2 = in.readShort();}

// Translation:
public ChartStartObjectRecord(RecordInputStream in1){rt = in1.ReadShort();grbitFrt = in1.ReadShort();iObjectKind = in1.ReadShort();iObjectContext = in1.ReadShort();iObjectInstance1 = in1.ReadShort();iObjectInstance2 = in1.ReadShort();}
// Original:
public void remove() {if (lastReturned == null)throw new IllegalStateException();ConcurrentHashMap.this.remove(lastReturned.key);lastReturned = null;}

// Translation:
public virtual void remove(){if (this.lastEntryReturned == null){throw new System.InvalidOperationException();}if (this._enclosing.modCount != this.expectedModCount){throw new java.util.ConcurrentModificationException();}this._enclosing.remove(this.lastEntryReturned.key);this.lastEntryReturned = null;this.expectedModCount = this._enclosing.modCount;}
// Original:
public DescribeMetricCollectionTypesResult describeMetricCollectionTypes(DescribeMetricCollectionTypesRequest request) {request = beforeClientExecution(request);return executeDescribeMetricCollectionTypes(request);}

// Translation:
public virtual DescribeMetricCollectionTypesResponse DescribeMetricCollectionTypes(DescribeMetricCollectionTypesRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeMetricCollectionTypesRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeMetricCollectionTypesResponseUnmarshaller.Instance;return Invoke<DescribeMetricCollectionTypesResponse>(request, options);}
// Original:
public UpdateFieldLevelEncryptionProfileResult updateFieldLevelEncryptionProfile(UpdateFieldLevelEncryptionProfileRequest request) {request = beforeClientExecution(request);return executeUpdateFieldLevelEncryptionProfile(request);}

// Translation:
public virtual UpdateFieldLevelEncryptionProfileResponse UpdateFieldLevelEncryptionProfile(UpdateFieldLevelEncryptionProfileRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateFieldLevelEncryptionProfileRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateFieldLevelEncryptionProfileResponseUnmarshaller.Instance;return Invoke<UpdateFieldLevelEncryptionProfileResponse>(request, options);}
// Original:
public Ref getLeaf() {return this;}

// Translation:
public virtual Ref GetLeaf(){return this;}
// Original:
public int lastIndexOf(Object object) {if (object != null) {for (int i = a.length - 1; i >= 0; i--) {if (object.equals(a[i])) {return i;}}} else {for (int i = a.length - 1; i >= 0; i--) {if (a[i] == null) {return i;}}}return -1;}

// Translation:
public override int lastIndexOf(object @object){if (@object != null){{for (int i = a.Length - 1; i >= 0; i--){if (@object.Equals(a[i])){return i;}}}}else{{for (int i = a.Length - 1; i >= 0; i--){if ((object)a[i] == null){return i;}}}}return -1;}
// Original:
public DefaultBulkScorer(Scorer scorer) {if (scorer == null) {throw new NullPointerException();}this.scorer = scorer;this.iterator = scorer.iterator();this.twoPhase = scorer.twoPhaseIterator();}

// Translation:
public DefaultBulkScorer(Scorer scorer){if (scorer == null){throw new System.NullReferenceException();}this.scorer = scorer;}
// Original:
public CreateRepoAuthorizationRequest() {super("cr", "2016-06-07", "CreateRepoAuthorization", "cr");setUriPattern("/repos/[RepoNamespace]/[RepoName]/authorizations");setMethod(MethodType.PUT);}

// Translation:
public CreateRepoAuthorizationRequest(): base("cr", "2016-06-07", "CreateRepoAuthorization", "cr", "openAPI"){UriPattern = "/repos/[RepoNamespace]/[RepoName]/authorizations";Method = MethodType.PUT;}
// Original:
public TokenStream create(TokenStream input) {return new PortugueseLightStemFilter(input);}

// Translation:
public override TokenStream Create(TokenStream input){return new PortugueseLightStemFilter(input);}
// Original:
public String toString() {StringBuilder buffer = new StringBuilder();buffer.append("[TABLESTYLES]\n");buffer.append("    .rt      =").append(HexDump.shortToHex(rt)).append('\n');buffer.append("    .grbitFrt=").append(HexDump.shortToHex(grbitFrt)).append('\n');buffer.append("    .unused  =").append(HexDump.toHex(unused)).append('\n');buffer.append("    .cts=").append(HexDump.intToHex(cts)).append('\n');buffer.append("    .rgchDefListStyle=").append(rgchDefListStyle).append('\n');buffer.append("    .rgchDefPivotStyle=").append(rgchDefPivotStyle).append('\n');buffer.append("[/TABLESTYLES]\n");return buffer.toString();}

// Translation:
public override String ToString(){StringBuilder buffer = new StringBuilder();buffer.Append("[TABLESTYLES]\n");buffer.Append("    .rt      =").Append(HexDump.ShortToHex(rt)).Append('\n');buffer.Append("    .grbitFrt=").Append(HexDump.ShortToHex(grbitFrt)).Append('\n');buffer.Append("    .unused  =").Append(HexDump.ToHex(unused)).Append('\n');buffer.Append("    .cts=").Append(HexDump.IntToHex(cts)).Append('\n');buffer.Append("    .rgchDefListStyle=").Append(rgchDefListStyle).Append('\n');buffer.Append("    .rgchDefPivotStyle=").Append(rgchDefPivotStyle).Append('\n');buffer.Append("[/TABLESTYLES]\n");return buffer.ToString();}
// Original:
public synchronized Enumeration<K> keys() {return new KeyEnumeration();}

// Translation:
public override java.util.Enumeration<K> keys(){lock (this){return new java.util.Hashtable<K, V>.KeyEnumeration(this);}}
// Original:
public DescribeInstanceTypesResult describeInstanceTypes(DescribeInstanceTypesRequest request) {request = beforeClientExecution(request);return executeDescribeInstanceTypes(request);}

// Translation:
public virtual DescribeInstanceTypesResponse DescribeInstanceTypes(DescribeInstanceTypesRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeInstanceTypesRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeInstanceTypesResponseUnmarshaller.Instance;return Invoke<DescribeInstanceTypesResponse>(request, options);}
// Original:
public RefUpdate.Result getResult() {return rc;}

// Translation:
public virtual RefUpdate.Result GetResult(){return rc;}
// Original:
public UpdateBasePathMappingResult updateBasePathMapping(UpdateBasePathMappingRequest request) {request = beforeClientExecution(request);return executeUpdateBasePathMapping(request);}

// Translation:
public virtual UpdateBasePathMappingResponse UpdateBasePathMapping(UpdateBasePathMappingRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateBasePathMappingRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateBasePathMappingResponseUnmarshaller.Instance;return Invoke<UpdateBasePathMappingResponse>(request, options);}
// Original:
public UpdateDocumentResult updateDocument(UpdateDocumentRequest request) {request = beforeClientExecution(request);return executeUpdateDocument(request);}

// Translation:
public virtual UpdateDocumentResponse UpdateDocument(UpdateDocumentRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateDocumentRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateDocumentResponseUnmarshaller.Instance;return Invoke<UpdateDocumentResponse>(request, options);}
// Original:
public void setStreamFileThreshold(int newLimit) {streamFileThreshold = newLimit;}

// Translation:
public virtual void SetStreamFileThreshold(int newLimit){streamFileThreshold = newLimit;}
// Original:
public String toString() {StringBuilder buffer = new StringBuilder();buffer.append("[EXTSST]\n");buffer.append("    .dsst           = ").append(Integer.toHexString(_stringsPerBucket)).append("\n");buffer.append("    .numInfoRecords = ").append(_sstInfos.length).append("\n");for (int k = 0; k < _sstInfos.length; k++){buffer.append("    .inforecord     = ").append(k).append("\n");buffer.append("    .streampos      = ").append(Integer.toHexString(_sstInfos[k].getStreamPos())).append("\n");buffer.append("    .sstoffset      = ").append(Integer.toHexString(_sstInfos[k].getBucketSSTOffset())).append("\n");}buffer.append("[/EXTSST]\n");return buffer.toString();}

// Translation:
public override String ToString(){StringBuilder buffer = new StringBuilder();buffer.Append("[EXTSST]\n");buffer.Append("    .streampos      = ").Append(StringUtil.ToHexString(StreamPos)).Append("\n");buffer.Append("    .bucketsstoffset= ").Append(StringUtil.ToHexString(BucketSSTOffset)).Append("\n");buffer.Append("    .zero           = ").Append(StringUtil.ToHexString(field_3_zero)).Append("\n");buffer.Append("[/EXTSST]\n");return buffer.ToString();}
// Original:
public void setCRC(int crc) {this.crc = crc;}

// Translation:
public virtual void SetCRC(int crc){this.crc = crc;}
// Original:
public RevFilter getRevFilter() {return filter;}

// Translation:
public virtual RevFilter GetRevFilter(){return filter;}
// Original:
public SrndPrefixQuery(String prefix, boolean quoted, char truncator) {super(quoted);this.prefix = prefix;prefixRef = new BytesRef(prefix);this.truncator = truncator;}

// Translation:
public SrndPrefixQuery(string prefix, bool quoted, char truncator): base(quoted){this.prefix = prefix;prefixRef = new BytesRef(prefix);this.truncator = truncator;}
// Original:
public byte readByte() throws IOException {int v = is.read();if (v == -1) throw new EOFException();return (byte) v;}

// Translation:
public override byte ReadByte(){int v = _reader.ReadByte();if (v == -1){throw new EndOfStreamException();}return (byte)v;}
// Original:
public GetWorkGroupResult getWorkGroup(GetWorkGroupRequest request) {request = beforeClientExecution(request);return executeGetWorkGroup(request);}

// Translation:
public virtual GetWorkGroupResponse GetWorkGroup(GetWorkGroupRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetWorkGroupRequestMarshaller.Instance;options.ResponseUnmarshaller = GetWorkGroupResponseUnmarshaller.Instance;return Invoke<GetWorkGroupResponse>(request, options);}
// Original:
public PutBlockPublicAccessConfigurationResult putBlockPublicAccessConfiguration(PutBlockPublicAccessConfigurationRequest request) {request = beforeClientExecution(request);return executePutBlockPublicAccessConfiguration(request);}

// Translation:
public virtual PutBlockPublicAccessConfigurationResponse PutBlockPublicAccessConfiguration(PutBlockPublicAccessConfigurationRequest request){var options = new InvokeOptions();options.RequestMarshaller = PutBlockPublicAccessConfigurationRequestMarshaller.Instance;options.ResponseUnmarshaller = PutBlockPublicAccessConfigurationResponseUnmarshaller.Instance;return Invoke<PutBlockPublicAccessConfigurationResponse>(request, options);}
// Original:
public String toString() {final StringBuilder r = new StringBuilder();r.append('[');for (int i = 0; i < count; i++) {if (i > 0)r.append(", "); r.append(entries[i]);}r.append(']');return r.toString();}

// Translation:
public override string ToString(){StringBuilder r = new StringBuilder();r.Append('[');for (int i = 0; i < count; i++){if (i > 0){r.Append(", ");}r.Append(entries[i]);}r.Append(']');return r.ToString();}
// Original:
public int get(int index) {checkIndex(index);return byteBuffer.getInt(index * SizeOf.INT);}

// Translation:
public override int get(int index){checkIndex(index);return byteBuffer.getInt(index * libcore.io.SizeOf.INT);}
// Original:
public CreateAlbumRequest() {super("CloudPhoto", "2017-07-11", "CreateAlbum", "cloudphoto");setProtocol(ProtocolType.HTTPS);}

// Translation:
public CreateAlbumRequest(): base("CloudPhoto", "2017-07-11", "CreateAlbum", "cloudphoto", "openAPI"){Protocol = ProtocolType.HTTPS;}
// Original:
public FileTreeIterator(File root, FS fs, WorkingTreeOptions options) {this(root, fs, options, DefaultFileModeStrategy.INSTANCE);}

// Translation:
public FileTreeIterator(FilePath root, FS fs, WorkingTreeOptions options) : base(options){directory = root;this.fs = fs;Init(Entries());}
// Original:
public int byteAt(int idx) {return bytes[idx].value;}

// Translation:
public virtual int ByteAt(int idx){return bytes[idx].Value;}
// Original:
public DescribeTypeRegistrationResult describeTypeRegistration(DescribeTypeRegistrationRequest request) {request = beforeClientExecution(request);return executeDescribeTypeRegistration(request);}

// Translation:
public virtual DescribeTypeRegistrationResponse DescribeTypeRegistration(DescribeTypeRegistrationRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeTypeRegistrationRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeTypeRegistrationResponseUnmarshaller.Instance;return Invoke<DescribeTypeRegistrationResponse>(request, options);}
// Original:
public TerminateInstancesResult terminateInstances(TerminateInstancesRequest request) {request = beforeClientExecution(request);return executeTerminateInstances(request);}

// Translation:
public virtual TerminateInstancesResponse TerminateInstances(TerminateInstancesRequest request){var options = new InvokeOptions();options.RequestMarshaller = TerminateInstancesRequestMarshaller.Instance;options.ResponseUnmarshaller = TerminateInstancesResponseUnmarshaller.Instance;return Invoke<TerminateInstancesResponse>(request, options);}
// Original:
public DoubleBuffer duplicate() {ByteBuffer bb = byteBuffer.duplicate().order(byteBuffer.order());DoubleToByteBufferAdapter buf = new DoubleToByteBufferAdapter(bb);buf.limit = limit;buf.position = position;buf.mark = mark;return buf;}

// Translation:
public override java.nio.DoubleBuffer duplicate(){java.nio.ByteBuffer bb = byteBuffer.duplicate().order(byteBuffer.order());java.nio.DoubleToByteBufferAdapter buf = new java.nio.DoubleToByteBufferAdapter(bb);buf._limit = _limit;buf._position = _position;buf._mark = _mark;return buf;}
// Original:
public OR(SemanticContext a, SemanticContext b) {Set<SemanticContext> operands = new HashSet<SemanticContext>();if ( a instanceof OR ) operands.addAll(Arrays.asList(((OR)a).opnds));else operands.add(a);if ( b instanceof OR ) operands.addAll(Arrays.asList(((OR)b).opnds));else operands.add(b);List<PrecedencePredicate> precedencePredicates = filterPrecedencePredicates(operands);if (!precedencePredicates.isEmpty()) {PrecedencePredicate reduced = Collections.max(precedencePredicates);operands.add(reduced);}this.opnds = operands.toArray(new SemanticContext[operands.size()]);}

// Translation:
public OR(SemanticContext a, SemanticContext b){HashSet<SemanticContext> operands = new HashSet<SemanticContext>();if (a is SemanticContext.OR){operands.UnionWith(((OR)a).opnds);}else{operands.Add(a);}if (b is SemanticContext.OR){operands.UnionWith(((OR)b).opnds);}else{operands.Add(b);}IList<SemanticContext.PrecedencePredicate> precedencePredicates = FilterPrecedencePredicates(operands);if (precedencePredicates.Count > 0){SemanticContext.PrecedencePredicate reduced = precedencePredicates.Max();operands.Add(reduced);}this.opnds = operands.ToArray();}
// Original:
public void serialize(LittleEndianOutput out) {out.writeShort(_formats.length);for(int i=0; i<_formats.length; i++){_formats[i].serialize(out);}}

// Translation:
public override void Serialize(ILittleEndianOutput out1){out1.WriteShort(m_formats.Count);for (int i = 0; i < m_formats.Count; i++){((CTFormat)m_formats[i]).Serialize(out1);}}
// Original:
public DescribeAvailabilityOptionsResult describeAvailabilityOptions(DescribeAvailabilityOptionsRequest request) {request = beforeClientExecution(request);return executeDescribeAvailabilityOptions(request);}

// Translation:
public virtual DescribeAvailabilityOptionsResponse DescribeAvailabilityOptions(DescribeAvailabilityOptionsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeAvailabilityOptionsRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeAvailabilityOptionsResponseUnmarshaller.Instance;return Invoke<DescribeAvailabilityOptionsResponse>(request, options);}
// Original:
public int getOffset() {return offset;}

// Translation:
public virtual int GetOffset(){return offset;}
// Original:
public static float[] grow(float[] array) {return grow(array, 1 + array.length);}

// Translation:
public static float[] Grow(float[] array){return Grow(array, 1 + array.Length);}
// Original:
public ListMetricsResult listMetrics() {return listMetrics(new ListMetricsRequest());}

// Translation:
public virtual ListMetricsResponse ListMetrics(){return ListMetrics(new ListMetricsRequest());}
// Original:
public int findFirstRecordLocBySid(short sid) {int index = 0;for (org.apache.poi.hssf.record.Record record : records.getRecords() ) {if (record.getSid() == sid) {return index;}index ++;}return -1;}

// Translation:
public int FindFirstRecordLocBySid(short sid){int index = 0;for (IEnumerator iterator = records.GetEnumerator(); iterator.MoveNext(); ){Record record = (Record)iterator.Current;if (record.Sid == sid){return index;}index++;}return -1;}
// Original:
public DeleteVpnConnectionRouteResult deleteVpnConnectionRoute(DeleteVpnConnectionRouteRequest request) {request = beforeClientExecution(request);return executeDeleteVpnConnectionRoute(request);}

// Translation:
public virtual DeleteVpnConnectionRouteResponse DeleteVpnConnectionRoute(DeleteVpnConnectionRouteRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteVpnConnectionRouteRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteVpnConnectionRouteResponseUnmarshaller.Instance;return Invoke<DeleteVpnConnectionRouteResponse>(request, options);}