yijunyu/c-to-rust huggingface dataset:
// Original:
public SpanNotQuery(SpanQuery include, SpanQuery exclude, int pre, int post) {this.include = Objects.requireNonNull(include);this.exclude = Objects.requireNonNull(exclude);this.pre = pre;this.post = post;if (include.getField() != null && exclude.getField() != null && !include.getField().equals(exclude.getField()))throw new IllegalArgumentException("Clauses must have same field.");}

// Translation:
public SpanNotQuery(SpanQuery include, SpanQuery exclude, int pre, int post){this.include = include;this.exclude = exclude;this.pre = (pre >= 0) ? pre : 0;this.post = (post >= 0) ? post : 0;if (include.Field != null && exclude.Field != null && !include.Field.Equals(exclude.Field, StringComparison.Ordinal)){throw new System.ArgumentException("Clauses must have same field.");}}
// Original:
public void visitContainedRecords(RecordVisitor rv) {if (_validationList.isEmpty()) {return;}rv.visitRecord(_headerRec);_validationList.forEach(rv::visitRecord);}

// Translation:
public override void VisitContainedRecords(RecordVisitor rv){if (_validationList.Count == 0){return;}rv.VisitRecord(_headerRec);for (int i = 0; i < _validationList.Count; i++){rv.VisitRecord((Record)_validationList[i]);}}
// Original:
public void addArea(int rowFrom, int colFrom, int rowTo, int colTo) {_mergedRegions.add(new CellRangeAddress(rowFrom, rowTo, colFrom, colTo));}

// Translation:
public void AddArea(int rowFrom, int colFrom, int rowTo, int colTo){_mergedRegions.Add(new CellRangeAddress(rowFrom, rowTo, colFrom, colTo));}
// Original:
public HungarianLightStemFilterFactory(Map<String,String> args) {super(args);if (!args.isEmpty()) {throw new IllegalArgumentException("Unknown parameters: " + args);}}

// Translation:
public HungarianLightStemFilterFactory(IDictionary<string, string> args): base(args){if (args.Count > 0){throw new System.ArgumentException("Unknown parameters: " + args);}}
// Original:
public int readDataSize() {return _lei.readUShort();}

// Translation:
public int ReadDataSize(){return _lei.ReadUShort();}
// Original:
public DescribeAdjustmentTypesResult describeAdjustmentTypes(DescribeAdjustmentTypesRequest request) {request = beforeClientExecution(request);return executeDescribeAdjustmentTypes(request);}

// Translation:
public virtual DescribeAdjustmentTypesResponse DescribeAdjustmentTypes(DescribeAdjustmentTypesRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeAdjustmentTypesRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeAdjustmentTypesResponseUnmarshaller.Instance;return Invoke<DescribeAdjustmentTypesResponse>(request, options);}
// Original:
public DefineSuggesterResult defineSuggester(DefineSuggesterRequest request) {request = beforeClientExecution(request);return executeDefineSuggester(request);}

// Translation:
public virtual DefineSuggesterResponse DefineSuggester(DefineSuggesterRequest request){var options = new InvokeOptions();options.RequestMarshaller = DefineSuggesterRequestMarshaller.Instance;options.ResponseUnmarshaller = DefineSuggesterResponseUnmarshaller.Instance;return Invoke<DefineSuggesterResponse>(request, options);}
// Original:
public GetJourneyDateRangeKpiResult getJourneyDateRangeKpi(GetJourneyDateRangeKpiRequest request) {request = beforeClientExecution(request);return executeGetJourneyDateRangeKpi(request);}

// Translation:
public virtual GetJourneyDateRangeKpiResponse GetJourneyDateRangeKpi(GetJourneyDateRangeKpiRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetJourneyDateRangeKpiRequestMarshaller.Instance;options.ResponseUnmarshaller = GetJourneyDateRangeKpiResponseUnmarshaller.Instance;return Invoke<GetJourneyDateRangeKpiResponse>(request, options);}
// Original:
public PushCommand add(String nameOrSpec) {if (0 <= nameOrSpec.indexOf(':')) {refSpecs.add(new RefSpec(nameOrSpec));} else {Ref src;try {src = repo.findRef(nameOrSpec);} catch (IOException e) {throw new JGitInternalException(JGitText.get().exceptionCaughtDuringExecutionOfPushCommand,e);}if (src != null)add(src);}return this;}

// Translation:
public virtual NGit.Api.PushCommand Add(string nameOrSpec){if (0 <= nameOrSpec.IndexOf(':')){refSpecs.AddItem(new RefSpec(nameOrSpec));}else{Ref src;try{src = repo.GetRef(nameOrSpec);}catch (IOException e){throw new JGitInternalException(JGitText.Get().exceptionCaughtDuringExecutionOfPushCommand, e);}if (src != null){Add(src);}}return this;}
// Original:
public DescribeDataSourceResult describeDataSource(DescribeDataSourceRequest request) {request = beforeClientExecution(request);return executeDescribeDataSource(request);}

// Translation:
public virtual DescribeDataSourceResponse DescribeDataSource(DescribeDataSourceRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeDataSourceRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeDataSourceResponseUnmarshaller.Instance;return Invoke<DescribeDataSourceResponse>(request, options);}
// Original:
public AutoCRLFInputStream(InputStream in, boolean detectBinary) {this.in = in;this.detectBinary = detectBinary;}

// Translation:
public AutoCRLFInputStream(InputStream @in, bool detectBinary){this.@in = @in;this.detectBinary = detectBinary;}
// Original:
public byte[] getRawRecord(){return _rawData;}

// Translation:
public byte[] GetRawRecord(){return _rawData;}
// Original:
public LongBuffer put(LongBuffer buf) {throw new ReadOnlyBufferException();}

// Translation:
public override java.nio.LongBuffer put(java.nio.LongBuffer buf){throw new java.nio.ReadOnlyBufferException();}
// Original:
@Override public E set(int location, E object) {synchronized (mutex) {return list.set(location, object);}}

// Translation:
public virtual E set(int location, E @object){lock (mutex){return list.set(location, @object);}}
// Original:
public void jumpDrawablesToCurrentState() {super.jumpDrawablesToCurrentState();if (mProgressDrawable != null) mProgressDrawable.jumpToCurrentState();if (mIndeterminateDrawable != null) mIndeterminateDrawable.jumpToCurrentState();}

// Translation:
public override void jumpDrawablesToCurrentState(){base.jumpDrawablesToCurrentState();if (mProgressDrawable != null){mProgressDrawable.jumpToCurrentState();}if (mIndeterminateDrawable != null){mIndeterminateDrawable.jumpToCurrentState();}}
// Original:
public boolean contains(Object object) {Link<E> link = voidLink.next;if (object != null) {while (link != voidLink) {if (object.equals(link.data)) {return true;}link = link.next;}} else {while (link != voidLink) {if (link.data == null) {return true;}link = link.next;}}return false;}

// Translation:
public override bool contains(object @object){java.util.LinkedList.Link<E> link = voidLink.next;if (@object != null){while (link != voidLink){if (@object.Equals(link.data)){return true;}link = link.next;}}else{while (link != voidLink){if ((object)link.data == null){return true;}link = link.next;}}return false;}
// Original:
public static double[] copyOf(double[] original, int newLength) {if (newLength < 0) {throw new NegativeArraySizeException();}return copyOfRange(original, 0, newLength);}

// Translation:
public static double[] copyOf(double[] original, int newLength){if (newLength < 0){throw new java.lang.NegativeArraySizeException();}return copyOfRange(original, 0, newLength);}
// Original:
public IndexSearcher acquire(long version) {ensureOpen();final SearcherTracker tracker = searchers.get(version);if (tracker != null &&tracker.searcher.getIndexReader().tryIncRef()) {return tracker.searcher;}return null;}

// Translation:
public virtual IndexSearcher Acquire(long version){EnsureOpen();Lazy<SearcherTracker> tracker;if (_searchers.TryGetValue(version, out tracker) && tracker.IsValueCreated && tracker.Value.Searcher.IndexReader.TryIncRef()){return tracker.Value.Searcher;}return null;}
// Original:
public void setDateToBeFormatted(double date) {this.dateToBeFormatted = date;}

// Translation:
public void SetDateToBeFormatted(double date){this.dateToBeFormatted = date;}
// Original:
public CreateIntegrationResponseResult createIntegrationResponse(CreateIntegrationResponseRequest request) {request = beforeClientExecution(request);return executeCreateIntegrationResponse(request);}

// Translation:
public virtual CreateIntegrationResponseResponse CreateIntegrationResponse(CreateIntegrationResponseRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateIntegrationResponseRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateIntegrationResponseResponseUnmarshaller.Instance;return Invoke<CreateIntegrationResponseResponse>(request, options);}
// Original:
public PhraseWildcardQuery build() {return new PhraseWildcardQuery(field, phraseTerms, slop, maxMultiTermExpansions, segmentOptimizationEnabled);}

// Translation:
public CompositeReaderContext Build(){return (CompositeReaderContext)Build(null, reader, 0, 0);}
// Original:
public synchronized void dropChanges() {pendingDeletes.dropChanges();dropMergingUpdates();}

// Translation:
public virtual void DropChanges(){lock (this){pendingDeleteCount = 0;DropMergingUpdates();}}
// Original:
public static int footerLength() {return 16;}

// Translation:
public static int FooterLength(){return 16;}
// Original:
public DeleteDBParameterGroupRequest(String dBParameterGroupName) {setDBParameterGroupName(dBParameterGroupName);}

// Translation:
public DeleteDBParameterGroupRequest(string dbParameterGroupName){_dbParameterGroupName = dbParameterGroupName;}
// Original:
public GetDedicatedIpsResult getDedicatedIps(GetDedicatedIpsRequest request) {request = beforeClientExecution(request);return executeGetDedicatedIps(request);}

// Translation:
public virtual GetDedicatedIpsResponse GetDedicatedIps(GetDedicatedIpsRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetDedicatedIpsRequestMarshaller.Instance;options.ResponseUnmarshaller = GetDedicatedIpsResponseUnmarshaller.Instance;return Invoke<GetDedicatedIpsResponse>(request, options);}
// Original:
public DeleteArchiveResult deleteArchive(DeleteArchiveRequest request) {request = beforeClientExecution(request);return executeDeleteArchive(request);}

// Translation:
public virtual DeleteArchiveResponse DeleteArchive(DeleteArchiveRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteArchiveRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteArchiveResponseUnmarshaller.Instance;return Invoke<DeleteArchiveResponse>(request, options);}
// Original:
public ResourceRecordSet(String name, RRType type) {setName(name);setType(type.toString());}

// Translation:
public ResourceRecordSet(string name, RRType type){_name = name;_type = type;}
// Original:
public ArabicNormalizationFilter(TokenStream input) {super(input);}

// Translation:
public ArabicNormalizationFilter(TokenStream input): base(input){termAtt = AddAttribute<ICharTermAttribute>();}
// Original:
public ReceiveMessageResult receiveMessage(ReceiveMessageRequest request) {request = beforeClientExecution(request);return executeReceiveMessage(request);}

// Translation:
public virtual ReceiveMessageResponse ReceiveMessage(ReceiveMessageRequest request){var options = new InvokeOptions();options.RequestMarshaller = ReceiveMessageRequestMarshaller.Instance;options.ResponseUnmarshaller = ReceiveMessageResponseUnmarshaller.Instance;return Invoke<ReceiveMessageResponse>(request, options);}
// Original:
public CharSequence getFully(CharSequence key) {Row now = getRow(root);int w;Cell c;int cmd = -1;StrEnum e = new StrEnum(key, forward);Character ch = null;Character aux = null;for (int i = 0; i < key.length();) {ch = e.next();i++;c = now.at(ch);if (c == null) {return null;}cmd = c.cmd;for (int skip = c.skip; skip > 0; skip--) {if (i < key.length()) {aux = e.next();} else {return null;}i++;}w = now.getRef(ch);if (w >= 0) {now = getRow(w);} else if (i < key.length()) {return null;}}return (cmd == -1) ? null : cmds.get(cmd);}

// Translation:
public virtual string GetFully(string key){Row now = GetRow(root);int w;Cell c;int cmd = -1;StrEnum e = new StrEnum(key, forward);char ch;char aux;for (int i = 0; i < key.Length;){ch = e.Next();i++;c = now.At(ch);if (c == null){return null;}cmd = c.cmd;for (int skip = c.skip; skip > 0; skip--){if (i < key.Length){aux = e.Next();}else{return null;}i++;}w = now.GetRef(ch);if (w >= 0){now = GetRow(w);}else if (i < key.Length){return null;}}return (cmd == -1) ? null : cmds[cmd];}
// Original:
public Span[] getNames(String[] words) {Span[] names = nameFinder.find(words);return names;}

// Translation:
public virtual Span[] GetNames(string[] words){Span[] names = nameFinder.find(words);return names;}
// Original:
public void reset() {used = false;}

// Translation:
public override void Reset(){used = false;}
// Original:
public AnalyticsPrefixPredicate(String prefix) {this.prefix = prefix;}

// Translation:
public AnalyticsPrefixPredicate(string prefix){this.prefix = prefix;}
// Original:
public byte readByte() {return (byte) readUByte();}

// Translation:
public override int ReadByte(){return delegate1.ReadByte();}
// Original:
public CreateImportJobResult createImportJob(CreateImportJobRequest request) {request = beforeClientExecution(request);return executeCreateImportJob(request);}

// Translation:
public virtual CreateImportJobResponse CreateImportJob(CreateImportJobRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateImportJobRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateImportJobResponseUnmarshaller.Instance;return Invoke<CreateImportJobResponse>(request, options);}
// Original:
public byte[] build() {ByteArrayOutputStream os = new ByteArrayOutputStream();try (OutputStreamWriter w = new OutputStreamWriter(os,UTF_8)) {w.write("object "); getObjectId().copyTo(w);w.write('\n');w.write("type "); w.write(Constants.typeString(getObjectType()));w.write("\n"); w.write("tag "); w.write(getTag());w.write("\n"); if (getTagger() != null) {w.write("tagger "); w.write(getTagger().toExternalString());w.write('\n');}w.write('\n');if (getMessage() != null)w.write(getMessage());} catch (IOException err) {throw new RuntimeException(err);}return os.toByteArray();}

// Translation:
public virtual byte[] Build(){ByteArrayOutputStream os = new ByteArrayOutputStream();OutputStreamWriter w = new OutputStreamWriter(os, Constants.CHARSET);try{w.Write("object ");GetObjectId().CopyTo(w);w.Write('\n');w.Write("type ");w.Write(Constants.TypeString(GetObjectType()));w.Write("\n");w.Write("tag ");w.Write(GetTag());w.Write("\n");if (GetTagger() != null){w.Write("tagger ");w.Write(GetTagger().ToExternalString());w.Write('\n');}w.Write('\n');if (GetMessage() != null){w.Write(GetMessage());}w.Close();}catch (IOException err){throw new RuntimeException(err);}return os.ToByteArray();}
// Original:
public boolean equals(ATNConfig a, ATNConfig b) {if ( a==b ) return true;if ( a==null || b==null ) return false;return a.state.stateNumber==b.state.stateNumber&& a.alt==b.alt&& a.semanticContext.equals(b.semanticContext);}

// Translation:
public bool Equals(ATNConfig a, ATNConfig b){if (a == b) return true;if (a == null || b == null) return false;return a.state.stateNumber == b.state.stateNumber&& a.alt == b.alt&& a.semanticContext.Equals(b.semanticContext);}
// Original:
public CreateMemberResult createMember(CreateMemberRequest request) {request = beforeClientExecution(request);return executeCreateMember(request);}

// Translation:
public virtual CreateMemberResponse CreateMember(CreateMemberRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateMemberRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateMemberResponseUnmarshaller.Instance;return Invoke<CreateMemberResponse>(request, options);}
// Original:
public void removeParCount() {remove1stProperty(PropertyIDMap.PID_PARCOUNT);}

// Translation:
public void RemoveParCount(){MutableSection s = (MutableSection)FirstSection;s.RemoveProperty(PropertyIDMap.PID_PARCOUNT);}
// Original:
public DeleteDeliveryStreamResult deleteDeliveryStream(DeleteDeliveryStreamRequest request) {request = beforeClientExecution(request);return executeDeleteDeliveryStream(request);}

// Translation:
public virtual DeleteDeliveryStreamResponse DeleteDeliveryStream(DeleteDeliveryStreamRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteDeliveryStreamRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteDeliveryStreamResponseUnmarshaller.Instance;return Invoke<DeleteDeliveryStreamResponse>(request, options);}
// Original:
public static RevFilter create(int maxCount) {if (maxCount < 0)throw new IllegalArgumentException(JGitText.get().maxCountMustBeNonNegative);return new MaxCountRevFilter(maxCount);}

// Translation:
public static RevFilter Create(int maxCount){if (maxCount < 0){throw new ArgumentException(JGitText.Get().maxCountMustBeNonNegative);}return new NGit.Revwalk.Filter.MaxCountRevFilter(maxCount);}
// Original:
public PeerVpcResult peerVpc(PeerVpcRequest request) {request = beforeClientExecution(request);return executePeerVpc(request);}

// Translation:
public virtual PeerVpcResponse PeerVpc(PeerVpcRequest request){var options = new InvokeOptions();options.RequestMarshaller = PeerVpcRequestMarshaller.Instance;options.ResponseUnmarshaller = PeerVpcResponseUnmarshaller.Instance;return Invoke<PeerVpcResponse>(request, options);}
// Original:
public GetResolverRuleResult getResolverRule(GetResolverRuleRequest request) {request = beforeClientExecution(request);return executeGetResolverRule(request);}

// Translation:
public virtual GetResolverRuleResponse GetResolverRule(GetResolverRuleRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetResolverRuleRequestMarshaller.Instance;options.ResponseUnmarshaller = GetResolverRuleResponseUnmarshaller.Instance;return Invoke<GetResolverRuleResponse>(request, options);}
// Original:
public DeleteScalingPolicyResult deleteScalingPolicy(DeleteScalingPolicyRequest request) {request = beforeClientExecution(request);return executeDeleteScalingPolicy(request);}

// Translation:
public virtual DeleteScalingPolicyResponse DeleteScalingPolicy(DeleteScalingPolicyRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteScalingPolicyRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteScalingPolicyResponseUnmarshaller.Instance;return Invoke<DeleteScalingPolicyResponse>(request, options);}
// Original:
public TokenStream create(TokenStream input) {return new SwedishLightStemFilter(input);}

// Translation:
public override TokenStream Create(TokenStream input){return new SwedishLightStemFilter(input);}
// Original:
public void serialize(LittleEndianOutput out) {out.writeShort(getRowNumber());out.writeShort(getFirstCol() == -1 ? (short)0 : getFirstCol());out.writeShort(getLastCol() == -1 ? (short)0 : getLastCol());out.writeShort(getHeight());out.writeShort(getOptimize());out.writeShort(field_6_reserved);out.writeShort(getOptionFlags());out.writeShort(getOptionFlags2());}

// Translation:
public override void Serialize(ILittleEndianOutput out1){out1.WriteShort(RowNumber);out1.WriteShort(FirstCol == -1 ? (short)0 : FirstCol);out1.WriteShort(LastCol == -1 ? (short)0 : LastCol);out1.WriteShort(Height);out1.WriteShort(Optimize);out1.WriteShort(field_6_reserved);out1.WriteShort(OptionFlags);out1.WriteShort(OptionFlags2);}
// Original:
public GetCredentialsForIdentityResult getCredentialsForIdentity(GetCredentialsForIdentityRequest request) {request = beforeClientExecution(request);return executeGetCredentialsForIdentity(request);}

// Translation:
public virtual GetCredentialsForIdentityResponse GetCredentialsForIdentity(GetCredentialsForIdentityRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetCredentialsForIdentityRequestMarshaller.Instance;options.ResponseUnmarshaller = GetCredentialsForIdentityResponseUnmarshaller.Instance;return Invoke<GetCredentialsForIdentityResponse>(request, options);}
// Original:
public DeleteFileSystemResult deleteFileSystem(DeleteFileSystemRequest request) {request = beforeClientExecution(request);return executeDeleteFileSystem(request);}

// Translation:
public virtual DeleteFileSystemResponse DeleteFileSystem(DeleteFileSystemRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteFileSystemRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteFileSystemResponseUnmarshaller.Instance;return Invoke<DeleteFileSystemResponse>(request, options);}
// Original:
public DeleteGameServerGroupResult deleteGameServerGroup(DeleteGameServerGroupRequest request) {request = beforeClientExecution(request);return executeDeleteGameServerGroup(request);}

// Translation:
public virtual DeleteGameServerGroupResponse DeleteGameServerGroup(DeleteGameServerGroupRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteGameServerGroupRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteGameServerGroupResponseUnmarshaller.Instance;return Invoke<DeleteGameServerGroupResponse>(request, options);}
// Original:
public AutoCRLFOutputStream(OutputStream out) {this(out, true);}

// Translation:
public AutoCRLFOutputStream(OutputStream @out){this.@out = @out;}
// Original:
public DescribeLocationsResult describeLocations(DescribeLocationsRequest request) {request = beforeClientExecution(request);return executeDescribeLocations(request);}

// Translation:
public virtual DescribeLocationsResponse DescribeLocations(DescribeLocationsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeLocationsRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeLocationsResponseUnmarshaller.Instance;return Invoke<DescribeLocationsResponse>(request, options);}
// Original:
public CopyWorkspaceImageResult copyWorkspaceImage(CopyWorkspaceImageRequest request) {request = beforeClientExecution(request);return executeCopyWorkspaceImage(request);}

// Translation:
public virtual CopyWorkspaceImageResponse CopyWorkspaceImage(CopyWorkspaceImageRequest request){var options = new InvokeOptions();options.RequestMarshaller = CopyWorkspaceImageRequestMarshaller.Instance;options.ResponseUnmarshaller = CopyWorkspaceImageResponseUnmarshaller.Instance;return Invoke<CopyWorkspaceImageResponse>(request, options);}
// Original:
public UpdateAliasResult updateAlias(UpdateAliasRequest request) {request = beforeClientExecution(request);return executeUpdateAlias(request);}

// Translation:
public virtual UpdateAliasResponse UpdateAlias(UpdateAliasRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateAliasRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateAliasResponseUnmarshaller.Instance;return Invoke<UpdateAliasResponse>(request, options);}
// Original:
public static final int nextLF(byte[] b, int ptr, char chrA) {final int sz = b.length;while (ptr < sz) {final byte c = b[ptr++];if (c == chrA || c == '\n')return ptr;}return ptr;}

// Translation:
public static int NextLF(byte[] b, int ptr, char chrA){int sz = b.Length;while (ptr < sz){byte c = b[ptr++];if (c == chrA || c == '\n'){return ptr;}}return ptr;}
// Original:
public static long checkFooter(ChecksumIndexInput in) throws IOException {validateFooter(in);long actualChecksum = in.getChecksum();long expectedChecksum = readCRC(in);if (expectedChecksum != actualChecksum) {throw new CorruptIndexException("checksum failed (hardware problem?) : expected=" + Long.toHexString(expectedChecksum) +" actual=" + Long.toHexString(actualChecksum), in);}return actualChecksum;}

// Translation:
public static long CheckFooter(ChecksumIndexInput @in){ValidateFooter(@in);long actualChecksum = @in.Checksum;long expectedChecksum = @in.ReadInt64();if (expectedChecksum != actualChecksum){throw new System.IO.IOException("checksum failed (hardware problem?) : expected=" + expectedChecksum.ToString("x") + " actual=" + actualChecksum.ToString("x") + " (resource=" + @in + ")");}if (@in.GetFilePointer() != @in.Length){throw new System.IO.IOException("did not read all bytes from file: read " + @in.GetFilePointer() + " vs size " + @in.Length + " (resource: " + @in + ")");}return actualChecksum;}