yijunyu/c-to-rust huggingface dataset:
// Original:
public void serialize(LittleEndianOutput out) {out.writeShort(field_1_id);out.writeByte(field_4_text.length());if (is16bit) {out.writeByte(0x01);StringUtil.putUnicodeLE(field_4_text, out);} else {out.writeByte(0x00);StringUtil.putCompressedUnicode(field_4_text, out);}}

// Translation:
public override void Serialize(ILittleEndianOutput out1){out1.WriteShort(field_1_id);out1.WriteByte(field_4_text.Length);if (is16bit){out1.WriteByte(0x01);StringUtil.PutUnicodeLE(field_4_text, out1);}else{out1.WriteByte(0x00);StringUtil.PutCompressedUnicode(field_4_text, out1);}}
// Original:
public UpdateVoiceTemplateResult updateVoiceTemplate(UpdateVoiceTemplateRequest request) {request = beforeClientExecution(request);return executeUpdateVoiceTemplate(request);}

// Translation:
public virtual UpdateVoiceTemplateResponse UpdateVoiceTemplate(UpdateVoiceTemplateRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateVoiceTemplateRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateVoiceTemplateResponseUnmarshaller.Instance;return Invoke<UpdateVoiceTemplateResponse>(request, options);}
// Original:
public BookBoolRecord(RecordInputStream in) {field_1_save_link_values = in.readShort();}

// Translation:
public BookBoolRecord(RecordInputStream in1){field_1_save_link_values = in1.ReadShort();}
// Original:
public final Buffer flip() {limit = position;position = 0;mark = UNSET_MARK;return this;}

// Translation:
public java.nio.Buffer flip(){_limit = _position;_position = 0;_mark = UNSET_MARK;return this;}
// Original:
public IntBuffer get(int[] dst, int dstOffset, int intCount) {Arrays.checkOffsetAndCount(dst.length, dstOffset, intCount);if (intCount > remaining()) {throw new BufferUnderflowException();}for (int i = dstOffset; i < dstOffset + intCount; ++i) {dst[i] = get();}return this;}

// Translation:
public virtual java.nio.IntBuffer get(int[] dst, int dstOffset, int intCount){java.util.Arrays.checkOffsetAndCount(dst.Length, dstOffset, intCount);if (intCount > remaining()){throw new java.nio.BufferUnderflowException();}{for (int i = dstOffset; i < dstOffset + intCount; ++i){dst[i] = get();}}return this;}
// Original:
public GroupingSearch setGroupDocsOffset(int groupDocsOffset) {this.groupDocsOffset = groupDocsOffset;return this;}

// Translation:
public virtual GroupingSearch SetGroupDocsOffset(int groupDocsOffset){this.groupDocsOffset = groupDocsOffset;return this;}
// Original:
public Builder() {this(16, 16);}

// Translation:
public Builder(){InitializeInstanceFields();}
// Original:
public String getCommandName() {return command;}

// Translation:
public virtual string GetCommandName(){return command;}
// Original:
public int getFirstInternalSheetIndexForExtIndex(int extRefIndex) {if (extRefIndex >= _externSheetRecord.getNumOfRefs() || extRefIndex < 0) {return -1;}return _externSheetRecord.getFirstSheetIndexFromRefIndex(extRefIndex);}

// Translation:
public int GetFirstInternalSheetIndexForExtIndex(int extRefIndex){if (extRefIndex >= _externSheetRecord.NumOfRefs || extRefIndex < 0){return -1;}return _externSheetRecord.GetFirstSheetIndexFromRefIndex(extRefIndex);}
// Original:
public boolean isExpired() {return this.expiredDate == null || this.expiredDate.after(new Date());}

// Translation:
public bool IsExpired(){if (null == ExpiredDate){return false;}return !(ExpiredDate < DateTime.UtcNow);}
// Original:
public ListPolicyAttachmentsResult listPolicyAttachments(ListPolicyAttachmentsRequest request) {request = beforeClientExecution(request);return executeListPolicyAttachments(request);}

// Translation:
public virtual ListPolicyAttachmentsResponse ListPolicyAttachments(ListPolicyAttachmentsRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListPolicyAttachmentsRequestMarshaller.Instance;options.ResponseUnmarshaller = ListPolicyAttachmentsResponseUnmarshaller.Instance;return Invoke<ListPolicyAttachmentsResponse>(request, options);}
// Original:
public double readDouble() {return Double.longBitsToDouble(readLong());}

// Translation:
public double ReadDouble(){return BitConverter.Int64BitsToDouble(ReadLong());}
// Original:
public UpdateLoginProfileRequest(String userName) {setUserName(userName);}

// Translation:
public UpdateLoginProfileRequest(string userName){_userName = userName;}
// Original:
public String getResultPath() {return resultPath;}

// Translation:
public virtual string GetResultPath(){return resultPath;}
// Original:
public DescribeInstanceAttributeRequest(String instanceId, InstanceAttributeName attribute) {setInstanceId(instanceId);setAttribute(attribute.toString());}

// Translation:
public DescribeInstanceAttributeRequest(string instanceId, InstanceAttributeName attribute){_instanceId = instanceId;_attribute = attribute;}
// Original:
public int previousIndex() {return index - 1;}

// Translation:
public virtual int previousIndex(){return index - 1;}
// Original:
public static RevFilter create(RevFilter[] list) {if (list.length == 2)return create(list[0], list[1]);if (list.length < 2)throw new IllegalArgumentException(JGitText.get().atLeastTwoFiltersNeeded);final RevFilter[] subfilters = new RevFilter[list.length];System.arraycopy(list, 0, subfilters, 0, list.length);return new List(subfilters);}

// Translation:
public static RevFilter Create(RevFilter[] list){if (list.Length == 2){return Create(list[0], list[1]);}if (list.Length < 2){throw new ArgumentException(JGitText.Get().atLeastTwoFiltersNeeded);}RevFilter[] subfilters = new RevFilter[list.Length];System.Array.Copy(list, 0, subfilters, 0, list.Length);return new AndRevFilter.List(subfilters);}
// Original:
public void reset() {seek(0);}

// Translation:
public virtual void Reset(){Seek(0);}
// Original:
public ListResourceRecordSetsRequest(String hostedZoneId) {setHostedZoneId(hostedZoneId);}

// Translation:
public ListResourceRecordSetsRequest(string hostedZoneId){_hostedZoneId = hostedZoneId;}
// Original:
public EventBasedExcelExtractor(POIFSFileSystem fs) {this(fs.getRoot());super.setFilesystem(fs);}

// Translation:
public EventBasedExcelExtractor(POIFSFileSystem fs): base(null){this.fs = fs;}
// Original:
public ListClustersResult listClusters() {return listClusters(new ListClustersRequest());}

// Translation:
public virtual ListClustersResponse ListClusters(){return ListClusters(new ListClustersRequest());}
// Original:
public CreateAddressResult createAddress(CreateAddressRequest request) {request = beforeClientExecution(request);return executeCreateAddress(request);}

// Translation:
public virtual CreateAddressResponse CreateAddress(CreateAddressRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateAddressRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateAddressResponseUnmarshaller.Instance;return Invoke<CreateAddressResponse>(request, options);}
// Original:
public ListFacePhotosRequest() {super("CloudPhoto", "2017-07-11", "ListFacePhotos", "cloudphoto");setProtocol(ProtocolType.HTTPS);}

// Translation:
public ListFacePhotosRequest(): base("CloudPhoto", "2017-07-11", "ListFacePhotos", "cloudphoto", "openAPI"){Protocol = ProtocolType.HTTPS;}
// Original:
public String toPrivateASCIIString() {return format(true, true);}

// Translation:
public virtual string ToPrivateASCIIString(){return Format(true, true);}
// Original:
public BatchGetNamedQueryResult batchGetNamedQuery(BatchGetNamedQueryRequest request) {request = beforeClientExecution(request);return executeBatchGetNamedQuery(request);}

// Translation:
public virtual BatchGetNamedQueryResponse BatchGetNamedQuery(BatchGetNamedQueryRequest request){var options = new InvokeOptions();options.RequestMarshaller = BatchGetNamedQueryRequestMarshaller.Instance;options.ResponseUnmarshaller = BatchGetNamedQueryResponseUnmarshaller.Instance;return Invoke<BatchGetNamedQueryResponse>(request, options);}
// Original:
public CreateProfilingGroupResult createProfilingGroup(CreateProfilingGroupRequest request) {request = beforeClientExecution(request);return executeCreateProfilingGroup(request);}

// Translation:
public virtual CreateProfilingGroupResponse CreateProfilingGroup(CreateProfilingGroupRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateProfilingGroupRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateProfilingGroupResponseUnmarshaller.Instance;return Invoke<CreateProfilingGroupResponse>(request, options);}
// Original:
@Override public String toString() {return Arrays.toString(elements);}

// Translation:
public override string ToString(){return java.util.Arrays.toString(elements);}
// Original:
public String toString() {String padd = getPadding();StringBuilder sb = new StringBuilder(padd);if (disableCounting) {sb.append('-');}sb.append(getName());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(padd);if (disableCounting){sb.Append('-');}sb.Append(GetName());if (RunInBackground){sb.Append(" &");int x = BackgroundDeltaPriority;if (x != 0){sb.Append(x);}}return sb.ToString();}
// Original:
public Counter bytesUsed() {return bytesUsed;}

// Translation:
public override Counter BytesUsed(){return bytesUsed;}
// Original:
public ListStreamingDistributionsResult listStreamingDistributions(ListStreamingDistributionsRequest request) {request = beforeClientExecution(request);return executeListStreamingDistributions(request);}

// Translation:
public virtual ListStreamingDistributionsResponse ListStreamingDistributions(ListStreamingDistributionsRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListStreamingDistributionsRequestMarshaller.Instance;options.ResponseUnmarshaller = ListStreamingDistributionsResponseUnmarshaller.Instance;return Invoke<ListStreamingDistributionsResponse>(request, options);}
// Original:
public final void writeInt(int val) throws IOException {Memory.pokeInt(scratch, 0, val, ByteOrder.BIG_ENDIAN);write(scratch, 0, SizeOf.INT);}

// Translation:
public virtual void writeInt(int val){throw new System.NotImplementedException();}
// Original:
public static ExpandedDouble fromRawBitsAndExponent(long rawBits, int exp) {return new ExpandedDouble(getFrac(rawBits), exp);}

// Translation:
public static ExpandedDouble FromRawBitsAndExponent(long rawBits, int exp){return new ExpandedDouble(GetFrac(rawBits), exp);}
// Original:
public boolean offerFirst(E e) {return addFirstImpl(e);}

// Translation:
public virtual bool offerFirst(E e){return addFirstImpl(e);}
// Original:
public BlockTermsWriter(TermsIndexWriterBase termsIndexWriter,SegmentWriteState state, PostingsWriterBase postingsWriter)throws IOException {final String termsFileName = IndexFileNames.segmentFileName(state.segmentInfo.name, state.segmentSuffix, TERMS_EXTENSION);this.termsIndexWriter = termsIndexWriter;maxDoc = state.segmentInfo.maxDoc();out = state.directory.createOutput(termsFileName, state.context);boolean success = false;try {fieldInfos = state.fieldInfos;CodecUtil.writeIndexHeader(out, CODEC_NAME, VERSION_CURRENT, state.segmentInfo.getId(), state.segmentSuffix);currentField = null;this.postingsWriter = postingsWriter;postingsWriter.init(out, state); success = true;} finally {if (!success) {IOUtils.closeWhileHandlingException(out);}}}

// Translation:
public BlockTermsWriter(TermsIndexWriterBase termsIndexWriter,SegmentWriteState state, PostingsWriterBase postingsWriter){string termsFileName = IndexFileNames.SegmentFileName(state.SegmentInfo.Name, state.SegmentSuffix, TERMS_EXTENSION);this.termsIndexWriter = termsIndexWriter;m_output = state.Directory.CreateOutput(termsFileName, state.Context);bool success = false;try{fieldInfos = state.FieldInfos;WriteHeader(m_output);currentField = null;this.postingsWriter = postingsWriter;postingsWriter.Init(m_output); success = true;}finally{if (!success){IOUtils.DisposeWhileHandlingException(m_output);}}}
// Original:
public InstanceGroupModifyConfig(String instanceGroupId, Integer instanceCount) {setInstanceGroupId(instanceGroupId);setInstanceCount(instanceCount);}

// Translation:
public InstanceGroupModifyConfig(string instanceGroupId, int instanceCount){_instanceGroupId = instanceGroupId;_instanceCount = instanceCount;}
// Original:
public void collect(int doc) {totalHits++;}

// Translation:
public virtual void Collect(int doc){totalHits++;}
// Original:
public void writeByte(int v) {try {out.write(v);} catch (IOException e) {throw new RuntimeException(e);}}

// Translation:
public void WriteByte(int v){try{out1.WriteByte((byte)v);}catch (IOException e){throw new RuntimeException(e);}}
// Original:
public int serializeComplexPart(byte[] data, int pos) {System.arraycopy(complexData, 0, data, pos, complexData.length);return complexData.length;}

// Translation:
public override int SerializeComplexPart(byte[] data, int pos){Array.Copy(_complexData, 0, data, pos, _complexData.Length);return _complexData.Length;}
// Original:
public String toString() {return "<notokenfound/>";}

// Translation:
public override string ToString(){return "<notokenfound/>";}
// Original:
public DecisionInfo(int decision) {this.decision = decision;}

// Translation:
public DecisionInfo(int decision){this.decision = decision;}
// Original:
public CFRuleRecord(RecordInputStream in) {setConditionType(in.readByte());setComparisonOperation(in.readByte());int field_3_formula1_len = in.readUShort();int field_4_formula2_len = in.readUShort();readFormatOptions(in);setFormula1(Formula.read(field_3_formula1_len, in));setFormula2(Formula.read(field_4_formula2_len, in));}

// Translation:
public CFRuleRecord(RecordInputStream in1){field_1_condition_type = (byte)in1.ReadByte();field_2_comparison_operator = (byte)in1.ReadByte();int field_3_formula1_len = in1.ReadUShort();int field_4_formula2_len = in1.ReadUShort();field_5_options = in1.ReadInt();field_6_not_used = in1.ReadShort();if (ContainsFontFormattingBlock){_fontFormatting = new FontFormatting(in1);}if (ContainsBorderFormattingBlock){_borderFormatting = new BorderFormatting(in1);}if (ContainsPatternFormattingBlock){_patternFormatting = new PatternFormatting(in1);}field_17_formula1 = FR.Formula.Read(field_3_formula1_len, in1);field_18_formula2 = FR.Formula.Read(field_4_formula2_len, in1);}
// Original:
public GroupMarkerSubRecord() {reserved = EMPTY_BYTE_ARRAY;}

// Translation:
public GroupMarkerSubRecord(){reserved = EMPTY_BYTE_ARRAY;}
// Original:
public SegToken filter(SegToken token) {switch (token.wordType) {case WordType.FULLWIDTH_NUMBER:case WordType.FULLWIDTH_STRING: for (int i = 0; i < token.charArray.length; i++) {if (token.charArray[i] >= 0xFF10)token.charArray[i] -= 0xFEE0;if (token.charArray[i] >= 0x0041 && token.charArray[i] <= 0x005A) token.charArray[i] += 0x0020;}break;case WordType.STRING:for (int i = 0; i < token.charArray.length; i++) {if (token.charArray[i] >= 0x0041 && token.charArray[i] <= 0x005A) token.charArray[i] += 0x0020;}break;case WordType.DELIMITER: token.charArray = Utility.COMMON_DELIMITER;break;default:break;}return token;}

// Translation:
public virtual SegToken Filter(SegToken token){switch (token.WordType){case WordType.FULLWIDTH_NUMBER:case WordType.FULLWIDTH_STRING: for (int i = 0; i < token.CharArray.Length; i++){if (token.CharArray[i] >= 0xFF10){token.CharArray[i] = (char)(token.CharArray[i] - 0xFEE0);}if (token.CharArray[i] >= 0x0041 && token.CharArray[i] <= 0x005A) {token.CharArray[i] = (char)(token.CharArray[i] + 0x0020);}}break;case WordType.STRING:for (int i = 0; i < token.CharArray.Length; i++){if (token.CharArray[i] >= 0x0041 && token.CharArray[i] <= 0x005A) {token.CharArray[i] = (char)(token.CharArray[i] + 0x0020);}}break;case WordType.DELIMITER: token.CharArray = Utility.COMMON_DELIMITER;break;default:break;}return token;}
// Original:
public BarRecord(RecordInputStream in) {field_1_barSpace      = in.readShort();field_2_categorySpace = in.readShort();field_3_formatFlags   = in.readShort();}

// Translation:
public BarRecord(RecordInputStream in1){field_1_barSpace = in1.ReadShort();field_2_categorySpace = in1.ReadShort();field_3_formatFlags = in1.ReadShort();}
// Original:
public final boolean tryIncRef() {int count;while ((count = refCount.get()) > 0) {if (refCount.compareAndSet(count, count+1)) {return true;}}return false;}

// Translation:
public bool TryIncRef(){int count;while ((count = refCount) > 0){if (refCount.CompareAndSet(count, count + 1)){return true;}}return false;}
// Original:
public GetStackPolicyResult getStackPolicy(GetStackPolicyRequest request) {request = beforeClientExecution(request);return executeGetStackPolicy(request);}

// Translation:
public virtual GetStackPolicyResponse GetStackPolicy(GetStackPolicyRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetStackPolicyRequestMarshaller.Instance;options.ResponseUnmarshaller = GetStackPolicyResponseUnmarshaller.Instance;return Invoke<GetStackPolicyResponse>(request, options);}
// Original:
public void removeKeywords() {remove1stProperty(PropertyIDMap.PID_KEYWORDS);}

// Translation:
public void RemoveKeywords(){MutableSection s = (MutableSection)FirstSection;s.RemoveProperty(PropertyIDMap.PID_KEYWORDS);}
// Original:
public boolean follows(TextFragment fragment){return textStartPos == fragment.textEndPos;}

// Translation:
public virtual bool Follows(TextFragment fragment){return TextStartPos == fragment.TextEndPos;}
// Original:
public DescribeHyperParameterTuningJobResult describeHyperParameterTuningJob(DescribeHyperParameterTuningJobRequest request) {request = beforeClientExecution(request);return executeDescribeHyperParameterTuningJob(request);}

// Translation:
public virtual DescribeHyperParameterTuningJobResponse DescribeHyperParameterTuningJob(DescribeHyperParameterTuningJobRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeHyperParameterTuningJobRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeHyperParameterTuningJobResponseUnmarshaller.Instance;return Invoke<DescribeHyperParameterTuningJobResponse>(request, options);}
// Original:
public CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser) {if (getChildren() == null || getChildren().size() == 0)return "";StringBuilder sb = new StringBuilder();String filler = "";for (QueryNode child : getChildren()) {sb.append(filler).append(child.toQueryString(escapeSyntaxParser));filler = " AND ";}if ((getParent() != null && getParent() instanceof GroupQueryNode)|| isRoot())return sb.toString();elsereturn "( " + sb.toString() + " )";}

// Translation:
public override string ToQueryString(IEscapeQuerySyntax escapeSyntaxParser){var children = GetChildren();if (children == null || children.Count == 0)return "";StringBuilder sb = new StringBuilder();string filler = "";foreach (IQueryNode child in children){sb.Append(filler).Append(child.ToQueryString(escapeSyntaxParser));filler = " AND ";}if ((Parent != null && Parent is GroupQueryNode)|| IsRoot)return sb.ToString();elsereturn "( " + sb.ToString() + " )";}
// Original:
public String toString() {return "State [entries=" + entries + ", hosts=" + hosts + "]";}

// Translation:
public override string ToString(){return "PackWriter.State[" + this.phase + ", memory=" + this.bytesUsed + "]";}
// Original:
public DataFormatRecord(RecordInputStream in) {field_1_pointNumber = in.readShort();field_2_seriesIndex = in.readShort();field_3_seriesNumber = in.readShort();field_4_formatFlags = in.readShort();}

// Translation:
public DataFormatRecord(RecordInputStream in1){field_1_pointNumber = in1.ReadShort();field_2_seriesIndex = in1.ReadShort();field_3_seriesNumber = in1.ReadShort();field_4_formatFlags = in1.ReadShort();}
// Original:
public ModifyVpcEndpointServiceConfigurationResult modifyVpcEndpointServiceConfiguration(ModifyVpcEndpointServiceConfigurationRequest request) {request = beforeClientExecution(request);return executeModifyVpcEndpointServiceConfiguration(request);}

// Translation:
public virtual ModifyVpcEndpointServiceConfigurationResponse ModifyVpcEndpointServiceConfiguration(ModifyVpcEndpointServiceConfigurationRequest request){var options = new InvokeOptions();options.RequestMarshaller = ModifyVpcEndpointServiceConfigurationRequestMarshaller.Instance;options.ResponseUnmarshaller = ModifyVpcEndpointServiceConfigurationResponseUnmarshaller.Instance;return Invoke<ModifyVpcEndpointServiceConfigurationResponse>(request, options);}
// Original:
public void serialize(LittleEndianOutput out) {out.writeShort(_encodedTokenLen);out.write(_byteEncoding);}

// Translation:
public void Serialize(ILittleEndianOutput out1){out1.WriteShort(_encodedTokenLen);out1.Write(_byteEncoding);}
// Original:
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0, ValueEval arg1) {AreaEval aeRange;try {aeRange = convertRangeArg(arg0);} catch (EvaluationException e) {return e.getErrorEval();}return eval(srcRowIndex, srcColumnIndex, arg1, aeRange, aeRange);}

// Translation:
public override ValueEval Evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0, ValueEval arg1){AreaEval aeRange;try{aeRange = ConvertRangeArg(arg0);}catch (EvaluationException e){return e.GetErrorEval();}return Eval(srcRowIndex, srcColumnIndex, arg1, aeRange, aeRange);}
// Original:
public RecognizeLabelRequest() {super("visionai-poc", "2020-04-08", "RecognizeLabel");setMethod(MethodType.POST);}

// Translation:
public RecognizeLabelRequest(): base("visionai-poc", "2020-04-08", "RecognizeLabel"){Method = MethodType.POST;}
// Original:
public ListStackSetsResult listStackSets(ListStackSetsRequest request) {request = beforeClientExecution(request);return executeListStackSets(request);}

// Translation:
public virtual ListStackSetsResponse ListStackSets(ListStackSetsRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListStackSetsRequestMarshaller.Instance;options.ResponseUnmarshaller = ListStackSetsResponseUnmarshaller.Instance;return Invoke<ListStackSetsResponse>(request, options);}
// Original:
public ModifyNetworkInterfaceAttributeResult modifyNetworkInterfaceAttribute(ModifyNetworkInterfaceAttributeRequest request) {request = beforeClientExecution(request);return executeModifyNetworkInterfaceAttribute(request);}

// Translation:
public virtual ModifyNetworkInterfaceAttributeResponse ModifyNetworkInterfaceAttribute(ModifyNetworkInterfaceAttributeRequest request){var options = new InvokeOptions();options.RequestMarshaller = ModifyNetworkInterfaceAttributeRequestMarshaller.Instance;options.ResponseUnmarshaller = ModifyNetworkInterfaceAttributeResponseUnmarshaller.Instance;return Invoke<ModifyNetworkInterfaceAttributeResponse>(request, options);}
// Original:
public static RevFilter create(RevFilter a) {return new NotRevFilter(a);}

// Translation:
public static RevFilter Create(RevFilter a){return new NGit.Revwalk.Filter.NotRevFilter(a);}
// Original:
public String toString() {String up = parent!=null ? parent.toString() : "";if ( up.length()==0 ) {if ( returnState == EMPTY_RETURN_STATE ) {return "$";}return String.valueOf(returnState);}return String.valueOf(returnState)+" "+up;}

// Translation:
public override string ToString(){string up = parent != null ? parent.ToString() : "";if (up.Length == 0){if (returnState == EMPTY_RETURN_STATE){return "$";}return returnState.ToString();}return returnState.ToString() + " " + up;}
// Original:
public ToParentBlockJoinQuery(Query childQuery, BitSetProducer parentsFilter, ScoreMode scoreMode) {super();this.childQuery = childQuery;this.parentsFilter = parentsFilter;this.scoreMode = scoreMode;}

// Translation:
public ToParentBlockJoinQuery(Query childQuery, Filter parentsFilter, ScoreMode scoreMode): base(){_origChildQuery = childQuery;_childQuery = childQuery;_parentsFilter = parentsFilter;_scoreMode = scoreMode;}
// Original:
public int previousIndex() {int previous = iterator.previousIndex();if (previous >= start) {return previous - start;}return -1;}

// Translation:
public int previousIndex(){int previous_1 = iterator.previousIndex();if (previous_1 >= start){return previous_1 - start;}return -1;}
// Original:
public String getSourcePath(int idx) {return sourcePaths[idx];}

// Translation:
public virtual string GetSourcePath(int idx){return sourcePaths[idx];}