yijunyu/c-to-rust huggingface dataset:
// Original:
public Builder add(int docId) {if (docId <= lastDocId) {throw new IllegalArgumentException("Doc ids must be added in-order, got " + docId + " which is <= lastDocID=" + lastDocId);}final int block = docId >>> 16;if (block != currentBlock) {flush();currentBlock = block;}if (currentBlockCardinality < MAX_ARRAY_LENGTH) {buffer[currentBlockCardinality] = (short) docId;} else {if (denseBuffer == null) {final int numBits = Math.min(1 << 16, maxDoc - (block << 16));denseBuffer = new FixedBitSet(numBits);for (short doc : buffer) {denseBuffer.set(doc & 0xFFFF);}}denseBuffer.set(docId & 0xFFFF);}lastDocId = docId;currentBlockCardinality += 1;return this;}

// Translation:
public Builder Add(int docID){if (docID <= lastDocID){throw new System.ArgumentException("Doc ids must be added in-order, got " + docID + " which is <= lastDocID=" + lastDocID);}int wordNum = WordNum(docID);if (this.wordNum == -1){this.wordNum = wordNum;word = 1 << (docID & 0x07);}else if (wordNum == this.wordNum){word |= 1 << (docID & 0x07);}else{AddWord(this.wordNum, (byte)word);this.wordNum = wordNum;word = 1 << (docID & 0x07);}lastDocID = docID;return this;}
// Original:
public boolean matches(int symbol, int minVocabSymbol, int maxVocabSymbol) {return false;}

// Translation:
public override bool Matches(int symbol, int minVocabSymbol, int maxVocabSymbol){return false;}
// Original:
public DescribeClustersResult describeClusters(DescribeClustersRequest request) {request = beforeClientExecution(request);return executeDescribeClusters(request);}

// Translation:
public virtual DescribeClustersResponse DescribeClusters(DescribeClustersRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeClustersRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeClustersResponseUnmarshaller.Instance;return Invoke<DescribeClustersResponse>(request, options);}
// Original:
public Trie reduce(Reduce by) {List<Trie> h = new ArrayList<>();for (Trie trie : tries)h.add(trie.reduce(by));MultiTrie2 m = new MultiTrie2(forward);m.tries = h;return m;}

// Translation:
public override Trie Reduce(Reduce by){List<Trie> h = new List<Trie>();foreach (Trie trie in m_tries)h.Add(trie.Reduce(by));MultiTrie2 m = new MultiTrie2(forward);m.m_tries = h;return m;}
// Original:
public CellRangeAddressBase getCategoryLabelsCellRange() {return getCellRange(dataCategoryLabels);}

// Translation:
public CellRangeAddressBase GetCategoryLabelsCellRange(){return GetCellRange(dataCategoryLabels);}
// Original:
public String getPass() {return pass;}

// Translation:
public virtual string GetPass(){return pass;}
// Original:
public synchronized Set<Entry<K, V>> entrySet() {Set<Entry<K, V>> es = entrySet;return (es != null) ? es : (entrySet = new EntrySet());}

// Translation:
public virtual java.util.Set<java.util.MapClass.Entry<K, V>> entrySet(){lock (this){java.util.Set<java.util.MapClass.Entry<K, V>> es = _entrySet;return (es != null) ? es : (_entrySet = new java.util.Hashtable<K, V>.EntrySet(this));}}
// Original:
public static String toFormulaString(HSSFWorkbook book, Ptg[] ptgs) {return FormulaRenderer.toFormulaString(HSSFEvaluationWorkbook.create(book), ptgs);}

// Translation:
public static String ToFormulaString(HSSFWorkbook book, Ptg[] ptgs){return FormulaRenderer.ToFormulaString(HSSFEvaluationWorkbook.Create(book), ptgs);}
// Original:
public CharBuffer slice() {return new CharSequenceAdapter(sequence.subSequence(position, limit));}

// Translation:
public override java.nio.CharBuffer slice(){return new java.nio.CharSequenceAdapter(sequence.SubSequence(_position, _limit));}
// Original:
public UpdateBusinessReportScheduleResult updateBusinessReportSchedule(UpdateBusinessReportScheduleRequest request) {request = beforeClientExecution(request);return executeUpdateBusinessReportSchedule(request);}

// Translation:
public virtual UpdateBusinessReportScheduleResponse UpdateBusinessReportSchedule(UpdateBusinessReportScheduleRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateBusinessReportScheduleRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateBusinessReportScheduleResponseUnmarshaller.Instance;return Invoke<UpdateBusinessReportScheduleResponse>(request, options);}
// Original:
public void append(byte[] nameBuf, int namePos, int nameLen, FileMode mode,byte[] idBuf, int idPos) {if (fmtBuf(nameBuf, namePos, nameLen, mode)) {System.arraycopy(idBuf, idPos, buf, ptr, OBJECT_ID_LENGTH);ptr += OBJECT_ID_LENGTH;} else {try {fmtOverflowBuffer(nameBuf, namePos, nameLen, mode);overflowBuffer.write(idBuf, idPos, OBJECT_ID_LENGTH);} catch (IOException badBuffer) {throw new RuntimeException(badBuffer);}}}

// Translation:
public virtual void Append(byte[] nameBuf, int namePos, int nameLen, FileMode mode, byte[] idBuf, int idPos){if (FmtBuf(nameBuf, namePos, nameLen, mode)){System.Array.Copy(idBuf, idPos, buf, ptr, Constants.OBJECT_ID_LENGTH);ptr += Constants.OBJECT_ID_LENGTH;}else{try{FmtOverflowBuffer(nameBuf, namePos, nameLen, mode);overflowBuffer.Write(idBuf, idPos, Constants.OBJECT_ID_LENGTH);}catch (IOException badBuffer){throw new RuntimeException(badBuffer);}}}
// Original:
public CreateSpotDatafeedSubscriptionResult createSpotDatafeedSubscription(CreateSpotDatafeedSubscriptionRequest request) {request = beforeClientExecution(request);return executeCreateSpotDatafeedSubscription(request);}

// Translation:
public virtual CreateSpotDatafeedSubscriptionResponse CreateSpotDatafeedSubscription(CreateSpotDatafeedSubscriptionRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateSpotDatafeedSubscriptionRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateSpotDatafeedSubscriptionResponseUnmarshaller.Instance;return Invoke<CreateSpotDatafeedSubscriptionResponse>(request, options);}
// Original:
public final long length() {return count;}

// Translation:
public long Length(){return count;}
// Original:
public CreateSkillGroupResult createSkillGroup(CreateSkillGroupRequest request) {request = beforeClientExecution(request);return executeCreateSkillGroup(request);}

// Translation:
public virtual CreateSkillGroupResponse CreateSkillGroup(CreateSkillGroupRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateSkillGroupRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateSkillGroupResponseUnmarshaller.Instance;return Invoke<CreateSkillGroupResponse>(request, options);}
// Original:
public int getRightId(int wordId) {return RIGHT_ID;}

// Translation:
public int GetRightId(int wordId){return RIGHT_ID;}
// Original:
public void setRetainBody(boolean retain) {retainBody = retain;}

// Translation:
public virtual void SetRetainBody(bool retain){retainBody = retain;}
// Original:
public final void reset() {len =0;}

// Translation:
public void Reset(){m_len = 0;}
// Original:
public StringBuilder insert(int offset, boolean b) {insert0(offset, b ? "true" : "false");return this;}

// Translation:
public java.lang.StringBuilder insert(int offset, bool b){insert0(offset, b ? "true" : "false");return this;}
// Original:
public static boolean isWhitespace(byte c) {return WHITESPACE[c & 0xff];}

// Translation:
public static bool IsWhitespace(byte c){return WHITESPACE[c & unchecked((int)(0xff))];}
// Original:
public DescribeSessionsResult describeSessions(DescribeSessionsRequest request) {request = beforeClientExecution(request);return executeDescribeSessions(request);}

// Translation:
public virtual DescribeSessionsResponse DescribeSessions(DescribeSessionsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeSessionsRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeSessionsResponseUnmarshaller.Instance;return Invoke<DescribeSessionsResponse>(request, options);}
// Original:
public DescribeLocalGatewayVirtualInterfaceGroupsResult describeLocalGatewayVirtualInterfaceGroups(DescribeLocalGatewayVirtualInterfaceGroupsRequest request) {request = beforeClientExecution(request);return executeDescribeLocalGatewayVirtualInterfaceGroups(request);}

// Translation:
public virtual DescribeLocalGatewayVirtualInterfaceGroupsResponse DescribeLocalGatewayVirtualInterfaceGroups(DescribeLocalGatewayVirtualInterfaceGroupsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeLocalGatewayVirtualInterfaceGroupsRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeLocalGatewayVirtualInterfaceGroupsResponseUnmarshaller.Instance;return Invoke<DescribeLocalGatewayVirtualInterfaceGroupsResponse>(request, options);}
// Original:
public static String pathToString(String dim, String[] path) {String[] fullPath = new String[1+path.length];fullPath[0] = dim;System.arraycopy(path, 0, fullPath, 1, path.length);return pathToString(fullPath, fullPath.length);}

// Translation:
public static string PathToString(string dim, string[] path){string[] fullPath = new string[1 + path.Length];fullPath[0] = dim;Array.Copy(path, 0, fullPath, 1, path.Length);return PathToString(fullPath, fullPath.Length);}
// Original:
public void decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations) {for (int j = 0; j < iterations; ++j) {final byte block = blocks[blocksOffset++];values[valuesOffset++] = (block >>> 6) & 3;values[valuesOffset++] = (block >>> 4) & 3;values[valuesOffset++] = (block >>> 2) & 3;values[valuesOffset++] = block & 3;}}

// Translation:
public override void Decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations){for (int j = 0; j < iterations; ++j){var block = blocks[blocksOffset++];values[valuesOffset++] = ((int)((uint)block >> 6)) & 3;values[valuesOffset++] = ((int)((uint)block >> 4)) & 3;values[valuesOffset++] = ((int)((uint)block >> 2)) & 3;values[valuesOffset++] = block & 3;}}
// Original:
public SignalResourceResult signalResource(SignalResourceRequest request) {request = beforeClientExecution(request);return executeSignalResource(request);}

// Translation:
public virtual SignalResourceResponse SignalResource(SignalResourceRequest request){var options = new InvokeOptions();options.RequestMarshaller = SignalResourceRequestMarshaller.Instance;options.ResponseUnmarshaller = SignalResourceResponseUnmarshaller.Instance;return Invoke<SignalResourceResponse>(request, options);}
// Original:
public int getPasswordVerifier() {return passwordVerifier;}

// Translation:
public int GetPasswordVerifier(){return passwordVerifier;}
// Original:
public void copy(MutableValue source) {MutableValueDouble s = (MutableValueDouble) source;value = s.value;exists = s.exists;}

// Translation:
public override void Copy(MutableValue source){MutableValueDouble s = (MutableValueDouble)source;Value = s.Value;Exists = s.Exists;}
// Original:
public int read(byte[] buffer, int offset, int length) throws IOException {Arrays.checkOffsetAndCount(buffer.length, offset, length);for (int i = 0; i < length; i++) {int c;try {if ((c = read()) == -1) {return i == 0 ? -1 : i;}} catch (IOException e) {if (i != 0) {return i;}throw e;}buffer[offset + i] = (byte) c;}return length;}

// Translation:
public virtual int read(byte[] buffer, int offset, int length){java.util.Arrays.checkOffsetAndCount(buffer.Length, offset, length);{for (int i = 0; i < length; i++){int c;try{if ((c = read()) == -1){return i == 0 ? -1 : i;}}catch (System.IO.IOException e){if (i != 0){return i;}throw;}buffer[offset + i] = unchecked((byte)c);}}return length;}
// Original:
public TreeFilter getPathFilter() {return pathFilter;}

// Translation:
public virtual TreeFilter GetPathFilter(){return pathFilter;}
// Original:
public CalcCountRecord(RecordInputStream in) {field_1_iterations = in.readShort();}

// Translation:
public CalcCountRecord(RecordInputStream in1){field_1_iterations = in1.ReadShort();}
// Original:
public DescribeVaultRequest(String vaultName) {setVaultName(vaultName);}

// Translation:
public DescribeVaultRequest(string vaultName){_vaultName = vaultName;}
// Original:
public final double get() {if (position == limit) {throw new BufferUnderflowException();}return backingArray[offset + position++];}

// Translation:
public sealed override double get(){if (_position == _limit){throw new java.nio.BufferUnderflowException();}return backingArray[offset + _position++];}
// Original:
public final void write(char[] b) {write(b,0,b.length);}

// Translation:
public void Write(char[] b){Write(b, 0, b.Length);}
// Original:
public DeleteTagsForDomainResult deleteTagsForDomain(DeleteTagsForDomainRequest request) {request = beforeClientExecution(request);return executeDeleteTagsForDomain(request);}

// Translation:
public virtual DeleteTagsForDomainResponse DeleteTagsForDomain(DeleteTagsForDomainRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteTagsForDomainRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteTagsForDomainResponseUnmarshaller.Instance;return Invoke<DeleteTagsForDomainResponse>(request, options);}
// Original:
public SetMeRequest() {super("CloudPhoto", "2017-07-11", "SetMe", "cloudphoto");setProtocol(ProtocolType.HTTPS);}

// Translation:
public SetMeRequest(): base("CloudPhoto", "2017-07-11", "SetMe", "cloudphoto", "openAPI"){Protocol = ProtocolType.HTTPS;}
// Original:
public LongBuffer put(long c) {if (position == limit) {throw new BufferOverflowException();}byteBuffer.putLong(position++ * SizeOf.LONG, c);return this;}

// Translation:
public override java.nio.LongBuffer put(long c){if (_position == _limit){throw new java.nio.BufferOverflowException();}byteBuffer.putLong(_position++ * libcore.io.SizeOf.LONG, c);return this;}
// Original:
public DisassociateFleetResult disassociateFleet(DisassociateFleetRequest request) {request = beforeClientExecution(request);return executeDisassociateFleet(request);}

// Translation:
public virtual DisassociateFleetResponse DisassociateFleet(DisassociateFleetRequest request){var options = new InvokeOptions();options.RequestMarshaller = DisassociateFleetRequestMarshaller.Instance;options.ResponseUnmarshaller = DisassociateFleetResponseUnmarshaller.Instance;return Invoke<DisassociateFleetResponse>(request, options);}
// Original:
public String toString() {return getClass().getSimpleName() + "(" + in.toString() + ")";}

// Translation:
public override string ToString(){return this.GetType().Name + "(" + m_input.ToString() + ")";}
// Original:
public static String fromLong(Long value) {return Long.toString(value);}

// Translation:
public static string FromLong(long value){return value.ToString(CultureInfo.InvariantCulture);}
// Original:
public BytesRefArray(Counter bytesUsed) {this.pool = new ByteBlockPool(new ByteBlockPool.DirectTrackingAllocator(bytesUsed));pool.nextBuffer();bytesUsed.addAndGet(RamUsageEstimator.NUM_BYTES_ARRAY_HEADER * Integer.BYTES);this.bytesUsed = bytesUsed;}

// Translation:
public BytesRefArray(Counter bytesUsed){this.pool = new ByteBlockPool(new ByteBlockPool.DirectTrackingAllocator(bytesUsed));pool.NextBuffer();bytesUsed.AddAndGet(RamUsageEstimator.NUM_BYTES_ARRAY_HEADER + RamUsageEstimator.NUM_BYTES_INT32);this.bytesUsed = bytesUsed;}
// Original:
public FloatBuffer put(float[] src, int srcOffset, int floatCount) {if (floatCount > remaining()) {throw new BufferOverflowException();}System.arraycopy(src, srcOffset, backingArray, offset + position, floatCount);position += floatCount;return this;}

// Translation:
public override java.nio.FloatBuffer put(float[] src, int srcOffset, int floatCount){if (floatCount > remaining()){throw new java.nio.BufferOverflowException();}System.Array.Copy(src, srcOffset, backingArray, offset + _position, floatCount);_position += floatCount;return this;}
// Original:
public void skipBytes(final long numBytes) throws IOException {if (numBytes < 0) {throw new IllegalArgumentException("numBytes must be >= 0, got " + numBytes);}if (skipBuffer == null) {skipBuffer = new byte[SKIP_BUFFER_SIZE];}assert skipBuffer.length == SKIP_BUFFER_SIZE;for (long skipped = 0; skipped < numBytes; ) {final int step = (int) Math.min(SKIP_BUFFER_SIZE, numBytes - skipped);readBytes(skipBuffer, 0, step, false);skipped += step;}}

// Translation:
public virtual void SkipBytes(long numBytes){if (numBytes < 0){throw new ArgumentException("numBytes must be >= 0, got " + numBytes);}if (skipBuffer == null){skipBuffer = new byte[SKIP_BUFFER_SIZE];}Debug.Assert(skipBuffer.Length == SKIP_BUFFER_SIZE);for (long skipped = 0; skipped < numBytes; ){var step = (int)Math.Min(SKIP_BUFFER_SIZE, numBytes - skipped);ReadBytes(skipBuffer, 0, step, false);skipped += step;}}
// Original:
public final char get() {if (position == limit) {throw new BufferUnderflowException();}return backingArray[offset + position++];}

// Translation:
public sealed override char get(){if (_position == _limit){throw new java.nio.BufferUnderflowException();}return backingArray[offset + _position++];}
// Original:
public String quote(String in) {if (in.matches("^~[A-Za-z0-9_-]+$")) { return in + "/"; }.*$")) { final int i = in.indexOf('/') + 1;if (i == in.length())return in;return in.substring(0, i) + super.quote(in.substring(i));}return super.quote(in);}

// Translation:
public override string Quote(string @in){if (@in.Matches("^~[A-Za-z0-9_-]+$")){return @in + "/";}.*$")){int i = @in.IndexOf('/') + 1;if (i == @in.Length){return @in;}return Sharpen.Runtime.Substring(@in, 0, i) + base.Quote(Sharpen.Runtime.Substring(@in, i));}return base.Quote(@in);}
// Original:
@Override public E remove(int location) {synchronized (mutex) {return list.remove(location);}}

// Translation:
public virtual E remove(int location){lock (mutex){return list.remove(location);}}
// Original:
public ExpPtg(LittleEndianInput in) {field_1_first_row = in.readShort();field_2_first_col = in.readShort();}

// Translation:
public ExpPtg(ILittleEndianInput in1){field_1_first_row = in1.ReadShort();field_2_first_col = in1.ReadShort();}
// Original:
public TokenStream create(TokenStream input) {return new CJKBigramFilter(input, flags, outputUnigrams);}

// Translation:
public override TokenStream Create(TokenStream input){return new CJKBigramFilter(input, flags, outputUnigrams);}
// Original:
public FuzzySet getSetForField(SegmentWriteState state,FieldInfo info) {return FuzzySet.createSetBasedOnQuality(state.segmentInfo.maxDoc(), 0.10f);}

// Translation:
public override FuzzySet GetSetForField(SegmentWriteState state, FieldInfo info){return FuzzySet.CreateSetBasedOnQuality(state.SegmentInfo.DocCount, 0.10f);}
// Original:
public static int[] grow(int[] array) {return grow(array, 1 + array.length);}

// Translation:
public static short[] Grow(short[] array){return Grow(array, 1 + array.Length);}
// Original:
public void setLength(int length) {if (length < 0) {throw new StringIndexOutOfBoundsException("length < 0: " + length);}if (length > value.length) {enlargeBuffer(length);} else {if (shared) {char[] newData = new char[value.length];System.arraycopy(value, 0, newData, 0, count);value = newData;shared = false;} else {if (count < length) {Arrays.fill(value, count, length, (char) 0);}}}count = length;}

// Translation:
public virtual void setLength(int length_1){if (length_1 < 0){throw new java.lang.StringIndexOutOfBoundsException("length < 0: " + length_1);}if (length_1 > value.Length){enlargeBuffer(length_1);}else{if (shared){char[] newData = new char[value.Length];System.Array.Copy(value, 0, newData, 0, count);value = newData;shared = false;}else{if (count < length_1){java.util.Arrays.fill(value, count, length_1, (char)0);}}}count = length_1;}
// Original:
public void sync() {boolean interrupted = false;try {while (true) {MergeThread toSync = null;synchronized (this) {for (MergeThread t : mergeThreads) {if (t.isAlive() && t != Thread.currentThread()) {toSync = t;break;}}}if (toSync != null) {try {toSync.join();} catch (InterruptedException ie) {interrupted = true;}} else {break;}}} finally {if (interrupted) Thread.currentThread().interrupt();}}

// Translation:
public virtual void Sync(){bool interrupted = false;try{while (true){MergeThread toSync = null;lock (this){foreach (MergeThread t in m_mergeThreads){if (t != null && t.IsAlive){toSync = t;break;}}}if (toSync != null){try{toSync.Join();}#pragma warning disable 168catch (ThreadInterruptedException ie)#pragma warning restore 168{interrupted = true;}}else{break;}}}finally{if (interrupted){Thread.CurrentThread.Interrupt();}}}
// Original:
public DescribeIdentityPoolUsageResult describeIdentityPoolUsage(DescribeIdentityPoolUsageRequest request) {request = beforeClientExecution(request);return executeDescribeIdentityPoolUsage(request);}

// Translation:
public virtual DescribeIdentityPoolUsageResponse DescribeIdentityPoolUsage(DescribeIdentityPoolUsageRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeIdentityPoolUsageRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeIdentityPoolUsageResponseUnmarshaller.Instance;return Invoke<DescribeIdentityPoolUsageResponse>(request, options);}
// Original:
public ClusterSecurityGroup createClusterSecurityGroup(CreateClusterSecurityGroupRequest request) {request = beforeClientExecution(request);return executeCreateClusterSecurityGroup(request);}

// Translation:
public virtual CreateClusterSecurityGroupResponse CreateClusterSecurityGroup(CreateClusterSecurityGroupRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateClusterSecurityGroupRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateClusterSecurityGroupResponseUnmarshaller.Instance;return Invoke<CreateClusterSecurityGroupResponse>(request, options);}
// Original:
public K nextElement() { return nextEntryNotFailFast().key; }

// Translation:
public K nextElement(){return this.nextEntryNotFailFast().key;}
// Original:
public HSSFShapeGroup(EscherContainerRecord spgrContainer, ObjRecord objRecord) {super(spgrContainer, objRecord);EscherContainerRecord spContainer = spgrContainer.getChildContainers().get(0);_spgrRecord = (EscherSpgrRecord) spContainer.getChild(0);for (EscherRecord ch : spContainer.getChildRecords()) {switch (EscherRecordTypes.forTypeID(ch.getRecordId())) {case SPGR:break;case CLIENT_ANCHOR:anchor = new HSSFClientAnchor((EscherClientAnchorRecord) ch);break;case CHILD_ANCHOR:anchor = new HSSFChildAnchor((EscherChildAnchorRecord) ch);break;default:break;}}}

// Translation:
public HSSFShapeGroup(EscherContainerRecord spgrContainer, ObjRecord objRecord): base(spgrContainer, objRecord){EscherContainerRecord spContainer = spgrContainer.ChildContainers[0];_spgrRecord = (EscherSpgrRecord)spContainer.GetChild(0);foreach (EscherRecord ch in spContainer.ChildRecords){switch (ch.RecordId){case EscherSpgrRecord.RECORD_ID:break;case EscherClientAnchorRecord.RECORD_ID:anchor = new HSSFClientAnchor((EscherClientAnchorRecord)ch);break;case EscherChildAnchorRecord.RECORD_ID:anchor = new HSSFChildAnchor((EscherChildAnchorRecord)ch);break;}}}
// Original:
public SoraniStemFilterFactory(Map<String,String> args) {super(args);if (!args.isEmpty()) {throw new IllegalArgumentException("Unknown parameters: " + args);}}

// Translation:
public SoraniStemFilterFactory(IDictionary<string, string> args): base(args){if (args.Count > 0){throw new System.ArgumentException("Unknown parameters: " + args);}}
// Original:
public SetAlbumCoverRequest() {super("CloudPhoto", "2017-07-11", "SetAlbumCover", "cloudphoto");setProtocol(ProtocolType.HTTPS);}

// Translation:
public SetAlbumCoverRequest(): base("CloudPhoto", "2017-07-11", "SetAlbumCover", "cloudphoto", "openAPI"){Protocol = ProtocolType.HTTPS;}
// Original:
public boolean equals(final Object o){boolean rval = false;if ((o != null) && (o.getClass() == this.getClass())){if (this == o){rval = true;}else{DocumentDescriptor descriptor = ( DocumentDescriptor ) o;rval = this.path.equals(descriptor.path)&& this.name.equals(descriptor.name);}}return rval;}

// Translation:
public override bool Equals(Object o){bool rval = false;if ((o != null) && (o.GetType()== this.GetType())){if (this == o){rval = true;}else{DocumentDescriptor descriptor = ( DocumentDescriptor ) o;rval = this.path.Equals(descriptor.path)&& this.name.Equals(descriptor.name);}}return rval;}
// Original:
public void finish() {if (!sorted)resort();replace();}

// Translation:
public override void Finish(){if (!sorted){Resort();}Replace();}