yijunyu/c-to-rust huggingface dataset:
// Original:
public void ReInit(CharStream stream) {token_source.ReInit(stream);token = new Token();jj_ntk = -1;jj_gen = 0;for (int i = 0; i < 10; i++) jj_la1[i] = -1;for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();}

// Translation:
public virtual void ReInit(ICharStream stream){TokenSource.ReInit(stream);Token = new Token();jj_ntk = -1;jj_gen = 0;for (int i = 0; i < 10; i++) jj_la1[i] = -1;for (int i = 0; i < jj_2_rtns.Length; i++) jj_2_rtns[i] = new JJCalls();}
// Original:
public void serialize(LittleEndianOutput out) {out.writeShort(rtFirst);out.writeShort(rtLast);}

// Translation:
public void Serialize(ILittleEndianOutput out1){out1.WriteShort(rtFirst);out1.WriteShort(rtLast);}
// Original:
public DBCluster restoreDBClusterFromS3(RestoreDBClusterFromS3Request request) {request = beforeClientExecution(request);return executeRestoreDBClusterFromS3(request);}

// Translation:
public virtual RestoreDBClusterFromS3Response RestoreDBClusterFromS3(RestoreDBClusterFromS3Request request){var options = new InvokeOptions();options.RequestMarshaller = RestoreDBClusterFromS3RequestMarshaller.Instance;options.ResponseUnmarshaller = RestoreDBClusterFromS3ResponseUnmarshaller.Instance;return Invoke<RestoreDBClusterFromS3Response>(request, options);}
// Original:
public void println(boolean b) {println(String.valueOf(b));}

// Translation:
public virtual void println(bool b){println(b.ToString());}
// Original:
public ThrowingPrintWriter(Writer out) {this.out = out;LF = AccessController.doPrivileged((PrivilegedAction<String>) () -> SystemReader.getInstance().getProperty("line.separator") );}

// Translation:
public ThrowingPrintWriter(TextWriter @out){this.@out = @out;LF = AccessController.DoPrivileged(new _PrivilegedAction_69());}
// Original:
public DescribeResourceResult describeResource(DescribeResourceRequest request) {request = beforeClientExecution(request);return executeDescribeResource(request);}

// Translation:
public virtual DescribeResourceResponse DescribeResource(DescribeResourceRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeResourceRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeResourceResponseUnmarshaller.Instance;return Invoke<DescribeResourceResponse>(request, options);}
// Original:
public String getFlags() {return flags;}

// Translation:
public virtual string getFlags(){return flags;}
// Original:
public GetAccountSettingsResult getAccountSettings(GetAccountSettingsRequest request) {request = beforeClientExecution(request);return executeGetAccountSettings(request);}

// Translation:
public virtual GetAccountSettingsResponse GetAccountSettings(GetAccountSettingsRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetAccountSettingsRequestMarshaller.Instance;options.ResponseUnmarshaller = GetAccountSettingsResponseUnmarshaller.Instance;return Invoke<GetAccountSettingsResponse>(request, options);}
// Original:
public UpdateClusterSettingsResult updateClusterSettings(UpdateClusterSettingsRequest request) {request = beforeClientExecution(request);return executeUpdateClusterSettings(request);}

// Translation:
public virtual UpdateClusterSettingsResponse UpdateClusterSettings(UpdateClusterSettingsRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateClusterSettingsRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateClusterSettingsResponseUnmarshaller.Instance;return Invoke<UpdateClusterSettingsResponse>(request, options);}
// Original:
public GetRelationalDatabaseSnapshotsResult getRelationalDatabaseSnapshots(GetRelationalDatabaseSnapshotsRequest request) {request = beforeClientExecution(request);return executeGetRelationalDatabaseSnapshots(request);}

// Translation:
public virtual GetRelationalDatabaseSnapshotsResponse GetRelationalDatabaseSnapshots(GetRelationalDatabaseSnapshotsRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetRelationalDatabaseSnapshotsRequestMarshaller.Instance;options.ResponseUnmarshaller = GetRelationalDatabaseSnapshotsResponseUnmarshaller.Instance;return Invoke<GetRelationalDatabaseSnapshotsResponse>(request, options);}
// Original:
public ByteBuffer putShort(short value) {int newPosition = position + SizeOf.SHORT;if (newPosition > limit) {throw new BufferOverflowException();}Memory.pokeShort(backingArray, offset + position, value, order);position = newPosition;return this;}

// Translation:
public override java.nio.ByteBuffer putShort(short value){int newPosition = _position + libcore.io.SizeOf.SHORT;if (newPosition > _limit){throw new java.nio.BufferOverflowException();}libcore.io.Memory.pokeShort(backingArray, offset + _position, value, _order);_position = newPosition;return this;}
// Original:
public DescribeProcessingJobResult describeProcessingJob(DescribeProcessingJobRequest request) {request = beforeClientExecution(request);return executeDescribeProcessingJob(request);}

// Translation:
public virtual DescribeProcessingJobResponse DescribeProcessingJob(DescribeProcessingJobRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeProcessingJobRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeProcessingJobResponseUnmarshaller.Instance;return Invoke<DescribeProcessingJobResponse>(request, options);}
// Original:
public UnbindInstance2VpcRequest() {super("Ots", "2016-06-20", "UnbindInstance2Vpc", "ots");setMethod(MethodType.POST);}

// Translation:
public UnbindInstance2VpcRequest(): base("Ots", "2016-06-20", "UnbindInstance2Vpc", "ots", "openAPI"){Method = MethodType.POST;}
// Original:
public ByteArrayBackedDataSource(byte[] data, int size) { this.buffer = data;this.size = size;}

// Translation:
public ByteArrayBackedDataSource(byte[] data, int size){this.buffer = data;this.size = size;}
// Original:
public Set<String> getSchemes() {return Collections.emptySet();}

// Translation:
public virtual ICollection<string> GetSchemes(){return Sharpen.Collections.EmptySet<string>();}
// Original:
public void seekExact(long ord) {termOrd = (int) ord;setTerm();}

// Translation:
public override void SeekExact(long ord){termOrd = (int) ord;SetTerm();}
// Original:
public QueryConfigHandler getQueryConfigHandler() {return queryConfigHandler;}

// Translation:
public virtual QueryConfigHandler GetQueryConfigHandler(){return queryConfigHandler;}
// Original:
public void set(int index, long value) {final int o = index / 9;final int b = index % 9;final int shift = b * 7;blocks[o] = (blocks[o] & ~(127L << shift)) | (value << shift);}

// Translation:
public override void Set(int index, long value){int o = index / 9;int b = index % 9;int shift = b * 7;blocks[o] = (blocks[o] & ~(127L << shift)) | (value << shift);}
// Original:
public UpdateDocumentationPartResult updateDocumentationPart(UpdateDocumentationPartRequest request) {request = beforeClientExecution(request);return executeUpdateDocumentationPart(request);}

// Translation:
public virtual UpdateDocumentationPartResponse UpdateDocumentationPart(UpdateDocumentationPartRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateDocumentationPartRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateDocumentationPartResponseUnmarshaller.Instance;return Invoke<UpdateDocumentationPartResponse>(request, options);}
// Original:
public DBCluster deleteDBCluster(DeleteDBClusterRequest request) {request = beforeClientExecution(request);return executeDeleteDBCluster(request);}

// Translation:
public virtual DeleteDBClusterResponse DeleteDBCluster(DeleteDBClusterRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteDBClusterRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteDBClusterResponseUnmarshaller.Instance;return Invoke<DeleteDBClusterResponse>(request, options);}
// Original:
public Drawable getProgressDrawable() {return mProgressDrawable;}

// Translation:
public virtual android.graphics.drawable.Drawable getProgressDrawable(){return mProgressDrawable;}
// Original:
public ConfigureHealthCheckRequest(String loadBalancerName, HealthCheck healthCheck) {setLoadBalancerName(loadBalancerName);setHealthCheck(healthCheck);}

// Translation:
public ConfigureHealthCheckRequest(string loadBalancerName, HealthCheck healthCheck){_loadBalancerName = loadBalancerName;_healthCheck = healthCheck;}
// Original:
public Row(Row old) {cells = old.cells;}

// Translation:
public Row(Row old){cells = old.cells;}
// Original:
public void incrementShapeCount(){this.field_1_numShapes++;}

// Translation:
public void IncrementShapeCount(){this.field_1_numShapes++;}
// Original:
public EnableEbsEncryptionByDefaultResult enableEbsEncryptionByDefault(EnableEbsEncryptionByDefaultRequest request) {request = beforeClientExecution(request);return executeEnableEbsEncryptionByDefault(request);}

// Translation:
public virtual EnableEbsEncryptionByDefaultResponse EnableEbsEncryptionByDefault(EnableEbsEncryptionByDefaultRequest request){var options = new InvokeOptions();options.RequestMarshaller = EnableEbsEncryptionByDefaultRequestMarshaller.Instance;options.ResponseUnmarshaller = EnableEbsEncryptionByDefaultResponseUnmarshaller.Instance;return Invoke<EnableEbsEncryptionByDefaultResponse>(request, options);}
// Original:
public void setValueNoCopy(char[] newValue) {clear();value = newValue;}

// Translation:
public virtual void SetValueNoCopy(char[] newValue){Clear();value = newValue;}
// Original:
public String toString() {return "(" + a.toString() + " AND " + b.toString() + ")";}

// Translation:
public override string ToString(){return "(" + a.ToString() + " AND " + b.ToString() + ")";}
// Original:
public DeleteIntegrationResponseResult deleteIntegrationResponse(DeleteIntegrationResponseRequest request) {request = beforeClientExecution(request);return executeDeleteIntegrationResponse(request);}

// Translation:
public virtual DeleteIntegrationResponseResponse DeleteIntegrationResponse(DeleteIntegrationResponseRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteIntegrationResponseRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteIntegrationResponseResponseUnmarshaller.Instance;return Invoke<DeleteIntegrationResponseResponse>(request, options);}
// Original:
public boolean contains(CharSequence cs) {return map.containsKey(cs);}

// Translation:
public virtual bool Contains(ICharSequence cs){return map.ContainsKey(cs);}
// Original:
public String getLocalizedMessage(Locale locale) {return this.message.getLocalizedMessage(locale);}

// Translation:
public virtual string GetLocalizedMessage(CultureInfo locale){return this.m_message.GetLocalizedMessage(locale);}
// Original:
public static long nextHighestPowerOfTwo(long v) {v--;v |= v >> 1;v |= v >> 2;v |= v >> 4;v |= v >> 8;v |= v >> 16;v |= v >> 32;v++;return v;}

// Translation:
public static long NextHighestPowerOfTwo(long v){v--;v |= v >> 1;v |= v >> 2;v |= v >> 4;v |= v >> 8;v |= v >> 16;v |= v >> 32;v++;return v;}
// Original:
public CreateTransitGatewayMulticastDomainResult createTransitGatewayMulticastDomain(CreateTransitGatewayMulticastDomainRequest request) {request = beforeClientExecution(request);return executeCreateTransitGatewayMulticastDomain(request);}

// Translation:
public virtual CreateTransitGatewayMulticastDomainResponse CreateTransitGatewayMulticastDomain(CreateTransitGatewayMulticastDomainRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateTransitGatewayMulticastDomainRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateTransitGatewayMulticastDomainResponseUnmarshaller.Instance;return Invoke<CreateTransitGatewayMulticastDomainResponse>(request, options);}
// Original:
public DisassociateDomainResult disassociateDomain(DisassociateDomainRequest request) {request = beforeClientExecution(request);return executeDisassociateDomain(request);}

// Translation:
public virtual DisassociateDomainResponse DisassociateDomain(DisassociateDomainRequest request){var options = new InvokeOptions();options.RequestMarshaller = DisassociateDomainRequestMarshaller.Instance;options.ResponseUnmarshaller = DisassociateDomainResponseUnmarshaller.Instance;return Invoke<DisassociateDomainResponse>(request, options);}
// Original:
public String toString() {StringBuilder sb = new StringBuilder();sb.append("arn:");sb.append(this.partition);sb.append(":");sb.append(this.service);sb.append(":");sb.append(region);sb.append(":");sb.append(this.accountId);sb.append(":");sb.append(this.resource);return sb.toString();}

// Translation:
public override string ToString(){var sb = new StringBuilder();sb.Append("arn:");sb.Append(this.Partition);sb.Append(":");sb.Append(this.Service);sb.Append(":");sb.Append(this.Region);sb.Append(":");sb.Append(this.AccountId);sb.Append(":");sb.Append(this.Resource);return sb.ToString();}
// Original:
public CellWalk(Sheet sheet, CellRangeAddress range) {this.sheet = sheet;this.range = range;this.traverseEmptyCells = false;}

// Translation:
public CellWalk(ISheet sheet, CellRangeAddress range){this.sheet = sheet;this.range = range;this.traverseEmptyCells = false;}
// Original:
public SendMessageBatchResult sendMessageBatch(String queueUrl, java.util.List<SendMessageBatchRequestEntry> entries) {return sendMessageBatch(new SendMessageBatchRequest().withQueueUrl(queueUrl).withEntries(entries));}

// Translation:
public virtual SendMessageBatchResponse SendMessageBatch(string queueUrl, List<SendMessageBatchRequestEntry> entries){var request = new SendMessageBatchRequest();request.QueueUrl = queueUrl;request.Entries = entries;return SendMessageBatch(request);}
// Original:
public GetImportJobsResult getImportJobs(GetImportJobsRequest request) {request = beforeClientExecution(request);return executeGetImportJobs(request);}

// Translation:
public virtual GetImportJobsResponse GetImportJobs(GetImportJobsRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetImportJobsRequestMarshaller.Instance;options.ResponseUnmarshaller = GetImportJobsResponseUnmarshaller.Instance;return Invoke<GetImportJobsResponse>(request, options);}
// Original:
public float docScore(int docId, String field, int numPayloadsSeen, float payloadScore) {return numPayloadsSeen > 0 ? payloadScore : 1;}

// Translation:
public override float DocScore(int docId, string field, int numPayloadsSeen, float payloadScore){return numPayloadsSeen > 0 ? payloadScore : 1;}
// Original:
public CreateRelationalDatabaseResult createRelationalDatabase(CreateRelationalDatabaseRequest request) {request = beforeClientExecution(request);return executeCreateRelationalDatabase(request);}

// Translation:
public virtual CreateRelationalDatabaseResponse CreateRelationalDatabase(CreateRelationalDatabaseRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateRelationalDatabaseRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateRelationalDatabaseResponseUnmarshaller.Instance;return Invoke<CreateRelationalDatabaseResponse>(request, options);}
// Original:
public Arc<T> copyFrom(Arc<T> other) {label = other.label();target = other.target();flags = other.flags();output = other.output();nextFinalOutput = other.nextFinalOutput();nextArc = other.nextArc();nodeFlags = other.nodeFlags();bytesPerArc = other.bytesPerArc();if (bytesPerArc() != 0) {posArcsStart = other.posArcsStart();arcIdx = other.arcIdx();numArcs = other.numArcs();if (nodeFlags() == ARCS_FOR_DIRECT_ADDRESSING) {bitTable = other.bitTable() == null ? null : other.bitTable().copy();firstLabel = other.firstLabel();}}return this;}

// Translation:
public Arc<T> CopyFrom(Arc<T> other){Node = other.Node;Label = other.Label;Target = other.Target;Flags = other.Flags;Output = other.Output;NextFinalOutput = other.Output;NextFinalOutput = other.NextFinalOutput;NextArc = other.NextArc;BytesPerArc = other.BytesPerArc;if (BytesPerArc != 0){PosArcsStart = other.PosArcsStart;ArcIdx = other.ArcIdx;NumArcs = other.NumArcs;}return this;}
// Original:
public AbbreviatedObjectId getOldId() {return oldId;}

// Translation:
public virtual AbbreviatedObjectId GetOldId(){return oldId;}
// Original:
public ContinueUpdateRollbackResult continueUpdateRollback(ContinueUpdateRollbackRequest request) {request = beforeClientExecution(request);return executeContinueUpdateRollback(request);}

// Translation:
public virtual ContinueUpdateRollbackResponse ContinueUpdateRollback(ContinueUpdateRollbackRequest request){var options = new InvokeOptions();options.RequestMarshaller = ContinueUpdateRollbackRequestMarshaller.Instance;options.ResponseUnmarshaller = ContinueUpdateRollbackResponseUnmarshaller.Instance;return Invoke<ContinueUpdateRollbackResponse>(request, options);}
// Original:
public ListDataSourcesResult listDataSources(ListDataSourcesRequest request) {request = beforeClientExecution(request);return executeListDataSources(request);}

// Translation:
public virtual ListDataSourcesResponse ListDataSources(ListDataSourcesRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListDataSourcesRequestMarshaller.Instance;options.ResponseUnmarshaller = ListDataSourcesResponseUnmarshaller.Instance;return Invoke<ListDataSourcesResponse>(request, options);}
// Original:
public void execute(Lexer lexer) {lexer.setChannel(channel);}

// Translation:
public void Execute(Lexer lexer){lexer.Channel = channel;}
// Original:
public int LA(int i) {if ( i==-1 ) return lastChar; sync(i);int index = p + i - 1;if ( index < 0 ) throw new IndexOutOfBoundsException();if ( index >= n ) return IntStream.EOF;return data[index];}

// Translation:
public virtual int LA(int i){if (i == -1){return lastChar;}Sync(i);int index = p + i - 1;if (index < 0){throw new ArgumentOutOfRangeException();}if (index >= n){return IntStreamConstants.EOF;}return data[index];}
// Original:
public final int[] array() {return protectedArray();}

// Translation:
public sealed override object array(){return protectedArray();}
// Original:
public String toFormulaString(String[] operands) {StringBuilder buffer = new StringBuilder();buffer.append(operands[ 0 ]);buffer.append("-");buffer.append(operands[ 1 ]);return buffer.toString();}

// Translation:
public override String ToFormulaString(String[] operands){StringBuilder buffer = new StringBuilder();buffer.Append(operands[0]);buffer.Append("-");buffer.Append(operands[1]);return buffer.ToString();}
// Original:
public RefWriter(RefList<Ref> refs) {this.refs = refs.asList();}

// Translation:
public RefWriter(RefList<Ref> refs){this.refs = refs.AsList();}
// Original:
public long get(int index) {final int o = index / 6;final int b = index % 6;final int shift = b * 10;return (blocks[o] >>> shift) & 1023L;}

// Translation:
public override long Get(int index){int o = index / 6;int b = index % 6;int shift = b * 10;return ((long)((ulong)blocks[o] >> shift)) & 1023L;}
// Original:
public SubmoduleUpdateCommand setProgressMonitor(final ProgressMonitor monitor) {this.monitor = monitor;return this;}

// Translation:
public virtual NGit.Api.SubmoduleUpdateCommand SetProgressMonitor(ProgressMonitormonitor){this.monitor = monitor;return this;}
// Original:
public DescribeDatasetGroupResult describeDatasetGroup(DescribeDatasetGroupRequest request) {request = beforeClientExecution(request);return executeDescribeDatasetGroup(request);}

// Translation:
public virtual DescribeDatasetGroupResponse DescribeDatasetGroup(DescribeDatasetGroupRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeDatasetGroupRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeDatasetGroupResponseUnmarshaller.Instance;return Invoke<DescribeDatasetGroupResponse>(request, options);}
// Original:
public ListGameServerGroupsResult listGameServerGroups(ListGameServerGroupsRequest request) {request = beforeClientExecution(request);return executeListGameServerGroups(request);}

// Translation:
public virtual ListGameServerGroupsResponse ListGameServerGroups(ListGameServerGroupsRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListGameServerGroupsRequestMarshaller.Instance;options.ResponseUnmarshaller = ListGameServerGroupsResponseUnmarshaller.Instance;return Invoke<ListGameServerGroupsResponse>(request, options);}
// Original:
public NameRecord getSpecificBuiltinRecord(byte name, int sheetNumber){return getOrCreateLinkTable().getSpecificBuiltinRecord(name, sheetNumber);}

// Translation:
public NameRecord GetSpecificBuiltinRecord(byte name, int sheetIndex){return OrCreateLinkTable.GetSpecificBuiltinRecord(name, sheetIndex);}
// Original:
public long readLong(){int b0 = _in.readUByte();int b1 = _in.readUByte();int b2 = _in.readUByte();int b3 = _in.readUByte();int b4 = _in.readUByte();int b5 = _in.readUByte();int b6 = _in.readUByte();int b7 = _in.readUByte();return (((long)b7 << 56) +((long)b6 << 48) +((long)b5 << 40) +((long)b4 << 32) +((long)b3 << 24) +(b2 << 16) +(b1 <<  8) +(b0 <<  0));}

// Translation:
public long ReadLong(){int b0 = _in.ReadUByte();int b1 = _in.ReadUByte();int b2 = _in.ReadUByte();int b3 = _in.ReadUByte();int b4 = _in.ReadUByte();int b5 = _in.ReadUByte();int b6 = _in.ReadUByte();int b7 = _in.ReadUByte();return (((long)b7 << 56) +((long)b6 << 48) +((long)b5 << 40) +((long)b4 << 32) +((long)b3 << 24) +(b2 << 16) +(b1 << 8) +(b0 << 0));}
// Original:
public static ValueVector createVector(TwoDEval ae) {if (ae.isColumn()) {return createColumnVector(ae, 0);}if (ae.isRow()) {return createRowVector(ae, 0);}return null;}

// Translation:
public static ValueVector CreateVector(TwoDEval ae){if (ae.IsColumn){return CreateColumnVector(ae, 0);}if (ae.IsRow){return CreateRowVector(ae, 0);}return null;}
// Original:
public boolean isSupported(int bitsPerValue) {return bitsPerValue >= 1 && bitsPerValue <= 64;}

// Translation:
public virtual bool IsSupported(int bitsPerValue){return bitsPerValue >= 1 && bitsPerValue <= 64;}
// Original:
public String toString() {return "{" +"decision=" + decision +", contextSensitivities=" + contextSensitivities.size() +", errors=" + errors.size() +", ambiguities=" + ambiguities.size() +", SLL_lookahead=" + SLL_TotalLook +", SLL_ATNTransitions=" + SLL_ATNTransitions +", SLL_DFATransitions=" + SLL_DFATransitions +", LL_Fallback=" + LL_Fallback +", LL_lookahead=" + LL_TotalLook +", LL_ATNTransitions=" + LL_ATNTransitions +'}';}

// Translation:
public override string ToString(){return "{" +"decision=" + decision +", contextSensitivities=" + contextSensitivities.Count +", errors=" + errors.Count +", ambiguities=" + ambiguities.Count +", SLL_lookahead=" + SLL_TotalLook +", SLL_ATNTransitions=" + SLL_ATNTransitions +", SLL_DFATransitions=" + SLL_DFATransitions +", LL_Fallback=" + LL_Fallback +", LL_lookahead=" + LL_TotalLook +", LL_ATNTransitions=" + LL_ATNTransitions +'}';}
// Original:
public RemoveNoteCommand notesRemove() {return new RemoveNoteCommand(repo);}

// Translation:
public virtual RemoveNoteCommand NotesRemove(){return new RemoveNoteCommand(repo);}