yijunyu/c-to-rust huggingface dataset:
// Original:
public HSSFTextbox createTextbox(HSSFChildAnchor anchor) {HSSFTextbox shape = new HSSFTextbox(this, anchor);shape.setParent(this);shape.setAnchor(anchor);shapes.add(shape);onCreate(shape);return shape;}

// Translation:
public HSSFTextbox CreateTextbox(HSSFChildAnchor anchor){HSSFTextbox shape = new HSSFTextbox(this, anchor);shape.Parent = this;shape.Anchor = anchor;shapes.Add(shape);OnCreate(shape);return shape;}
// Original:
public CreateStreamProcessorResult createStreamProcessor(CreateStreamProcessorRequest request) {request = beforeClientExecution(request);return executeCreateStreamProcessor(request);}

// Translation:
public virtual CreateStreamProcessorResponse CreateStreamProcessor(CreateStreamProcessorRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateStreamProcessorRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateStreamProcessorResponseUnmarshaller.Instance;return Invoke<CreateStreamProcessorResponse>(request, options);}
// Original:
public boolean matches(char s[], int len) {return (len - suffix.length >= min && endsWith(s, len, suffix));}

// Translation:
public virtual bool Matches(char[] s, int len){return (len - m_suffix.Length >= m_min && StemmerUtil.EndsWith(s, len, m_suffix));}
// Original:
public void setFontStyle(boolean italic, boolean bold){boolean modified = italic || bold;fontFormatting.setItalic(italic);fontFormatting.setBold(bold);fontFormatting.setFontStyleModified(modified);fontFormatting.setFontWieghtModified(modified);}

// Translation:
public void SetFontStyle(bool italic, bool bold){bool modified = italic || bold;fontFormatting.IsItalic=italic;fontFormatting.IsBold=bold;fontFormatting.IsFontStyleModified=modified;fontFormatting.IsFontWeightModified=modified;}
// Original:
public void writeShort(int value) throws IOException {checkWritePrimitiveTypes();primitiveTypes.writeShort(value);}

// Translation:
public virtual void writeShort(int value){throw new System.NotImplementedException();}
// Original:
public CreateEntityRecognizerResult createEntityRecognizer(CreateEntityRecognizerRequest request) {request = beforeClientExecution(request);return executeCreateEntityRecognizer(request);}

// Translation:
public virtual CreateEntityRecognizerResponse CreateEntityRecognizer(CreateEntityRecognizerRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateEntityRecognizerRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateEntityRecognizerResponseUnmarshaller.Instance;return Invoke<CreateEntityRecognizerResponse>(request, options);}
// Original:
public DescribeContributorInsightsResult describeContributorInsights(DescribeContributorInsightsRequest request) {request = beforeClientExecution(request);return executeDescribeContributorInsights(request);}

// Translation:
public virtual DescribeContributorInsightsResponse DescribeContributorInsights(DescribeContributorInsightsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeContributorInsightsRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeContributorInsightsResponseUnmarshaller.Instance;return Invoke<DescribeContributorInsightsResponse>(request, options);}
// Original:
public CreateLaunchConfigurationResult createLaunchConfiguration(CreateLaunchConfigurationRequest request) {request = beforeClientExecution(request);return executeCreateLaunchConfiguration(request);}

// Translation:
public virtual CreateLaunchConfigurationResponse CreateLaunchConfiguration(CreateLaunchConfigurationRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateLaunchConfigurationRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateLaunchConfigurationResponseUnmarshaller.Instance;return Invoke<CreateLaunchConfigurationResponse>(request, options);}
// Original:
public int read() throws IOException {checkReadPrimitiveTypes();return primitiveData.read();}

// Translation:
public override int read(){throw new System.NotImplementedException();}
// Original:
public TokenStream create(TokenStream input) {return new LimitTokenCountFilter(input, maxTokenCount, consumeAllTokens);}

// Translation:
public override TokenStream Create(TokenStream input){return new LimitTokenCountFilter(input, maxTokenCount, consumeAllTokens);}
// Original:
public CharBuffer asReadOnlyBuffer() {return duplicate();}

// Translation:
public override java.nio.CharBuffer asReadOnlyBuffer(){return duplicate();}
// Original:
public GetConsoleScreenshotResult getConsoleScreenshot(GetConsoleScreenshotRequest request) {request = beforeClientExecution(request);return executeGetConsoleScreenshot(request);}

// Translation:
public virtual GetConsoleScreenshotResponse GetConsoleScreenshot(GetConsoleScreenshotRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetConsoleScreenshotRequestMarshaller.Instance;options.ResponseUnmarshaller = GetConsoleScreenshotResponseUnmarshaller.Instance;return Invoke<GetConsoleScreenshotResponse>(request, options);}
// Original:
public DrawingRecordForBiffViewer(DrawingRecord r){super(convertToInputStream(r));convertRawBytesToEscherRecords();}

// Translation:
public DrawingRecordForBiffViewer(DrawingRecord r): base(ConvertToInputStream(r)){ConvertRawBytesToEscherRecords();}
// Original:
public boolean hasPrevious() {return pos >= 0;}

// Translation:
public bool hasPrevious(){return this.pos >= 0;}
// Original:
public NotImplemented(String functionName) {_functionName = functionName;}

// Translation:
public NotImplemented(String functionName){_functionName = functionName;}
// Original:
public UpdateDirectoryConfigResult updateDirectoryConfig(UpdateDirectoryConfigRequest request) {request = beforeClientExecution(request);return executeUpdateDirectoryConfig(request);}

// Translation:
public virtual UpdateDirectoryConfigResponse UpdateDirectoryConfig(UpdateDirectoryConfigRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateDirectoryConfigRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateDirectoryConfigResponseUnmarshaller.Instance;return Invoke<UpdateDirectoryConfigResponse>(request, options);}
// Original:
public DeleteQualificationTypeResult deleteQualificationType(DeleteQualificationTypeRequest request) {request = beforeClientExecution(request);return executeDeleteQualificationType(request);}

// Translation:
public virtual DeleteQualificationTypeResponse DeleteQualificationType(DeleteQualificationTypeRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteQualificationTypeRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteQualificationTypeResponseUnmarshaller.Instance;return Invoke<DeleteQualificationTypeResponse>(request, options);}
// Original:
@Override public void clear() {throw new UnsupportedOperationException();}

// Translation:
public virtual void clear(){throw new System.NotSupportedException();}
// Original:
public int startNewSlice() {return offset = pool.newSlice(FIRST_LEVEL_SIZE) + pool.intOffset;}

// Translation:
public virtual int StartNewSlice(){return offset = pool.NewSlice(FIRST_LEVEL_SIZE) + pool.Int32Offset;}
// Original:
public void postInvalidate() {if (!mNoInvalidate) {super.postInvalidate();}}

// Translation:
public override void postInvalidate(){if (!mNoInvalidate){base.postInvalidate();}}
// Original:
public List<FacetEntry> getFacetEntries(int offset, int limit) {List<FacetEntry> entries = new LinkedList<>();int skipped = 0;int included = 0;for (FacetEntry facetEntry : facetEntries) {if (skipped < offset) {skipped++;continue;}if (included++ >= limit) {break;}entries.add(facetEntry);}return entries;}

// Translation:
public virtual IList<FacetEntry> GetFacetEntries(int offset, int limit){List<FacetEntry> entries = new List<FacetEntry>();int skipped = 0;int included = 0;foreach (FacetEntry facetEntry in facetEntries){if (skipped < offset){skipped++;continue;}if (included++ >= limit){break;}entries.Add(facetEntry);}return entries;}
// Original:
public static synchronized CoderResult unmappableForLength(int length)throws IllegalArgumentException {if (length > 0) {Integer key = Integer.valueOf(length);synchronized (_unmappableErrors) {CoderResult r = _unmappableErrors.get(key);if (r == null) {r = new CoderResult(TYPE_UNMAPPABLE_CHAR, length);_unmappableErrors.put(key, r);}return r;}}throw new IllegalArgumentException("Length must be greater than 0; was " + length);}

// Translation:
public static java.nio.charset.CoderResult unmappableForLength(int length_1){lock (typeof(CoderResult)){if (length_1 > 0){int key = Sharpen.Util.IntValueOf(length_1);lock (_unmappableErrors){java.nio.charset.CoderResult r = _unmappableErrors.get(key);if (r == null){r = new java.nio.charset.CoderResult(TYPE_UNMAPPABLE_CHAR, length_1);_unmappableErrors.put(key, r);}return r;}}throw new System.ArgumentException("Length must be greater than 0; was " + length_1);}}
// Original:
public UpdateDetectorVersionStatusResult updateDetectorVersionStatus(UpdateDetectorVersionStatusRequest request) {request = beforeClientExecution(request);return executeUpdateDetectorVersionStatus(request);}

// Translation:
public virtual UpdateDetectorVersionStatusResponse UpdateDetectorVersionStatus(UpdateDetectorVersionStatusRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateDetectorVersionStatusRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateDetectorVersionStatusResponseUnmarshaller.Instance;return Invoke<UpdateDetectorVersionStatusResponse>(request, options);}
// Original:
public void remove() {iterator.remove();subList.sizeChanged(false);end--;}

// Translation:
public void remove(){iterator.remove();subList.sizeChanged(false);end--;}
// Original:
public void setRef(Character way, int ref) {Cell c = at(way);if (c == null) {c = new Cell();c.ref = ref;cells.put(way, c);} else {c.ref = ref;}}

// Translation:
public void SetRef(char way, int @ref){Cell c = At(way);if (c == null){c = new Cell();c.@ref = @ref;cells[way] = c;}else{c.@ref = @ref;}}
// Original:
public QueryNodeProcessorPipeline(QueryConfigHandler queryConfigHandler) {this.queryConfig = queryConfigHandler;}

// Translation:
public QueryNodeProcessorPipeline(QueryConfigHandler queryConfigHandler){this.queryConfig = queryConfigHandler;}
// Original:
public IllegalFormatPrecisionException(int p) {this.p = p;}

// Translation:
public IllegalFormatPrecisionException(int p){this.p = p;}
// Original:
@Override public final boolean equals(Object o) {if (!(o instanceof Entry)) {return false;}Entry<?, ?> e = (Entry<?, ?>) o;return Objects.equal(e.getKey(), key)&& Objects.equal(e.getValue(), value);}

// Translation:
public sealed override bool Equals(object o){if (!(o is java.util.MapClass.Entry<K, V>)){return false;}java.util.MapClass.Entry<object, object> e = (java.util.MapClass.Entry<object, object>)o;return libcore.util.Objects.equal(e.getKey(), key) && libcore.util.Objects.equal(e.getValue(), value);}
// Original:
public ObjectId getOldObjectId() {return oldValue;}

// Translation:
public virtual ObjectId GetOldObjectId(){return oldValue;}
// Original:
public AuthorizeIpRulesResult authorizeIpRules(AuthorizeIpRulesRequest request) {request = beforeClientExecution(request);return executeAuthorizeIpRules(request);}

// Translation:
public virtual AuthorizeIpRulesResponse AuthorizeIpRules(AuthorizeIpRulesRequest request){var options = new InvokeOptions();options.RequestMarshaller = AuthorizeIpRulesRequestMarshaller.Instance;options.ResponseUnmarshaller = AuthorizeIpRulesResponseUnmarshaller.Instance;return Invoke<AuthorizeIpRulesResponse>(request, options);}
// Original:
public GetPrivateAccessUrlsRequest() {super("CloudPhoto", "2017-07-11", "GetPrivateAccessUrls", "cloudphoto");setProtocol(ProtocolType.HTTPS);}

// Translation:
public GetPrivateAccessUrlsRequest(): base("CloudPhoto", "2017-07-11", "GetPrivateAccessUrls", "cloudphoto", "openAPI"){Protocol = ProtocolType.HTTPS;}
// Original:
public boolean remove(Object o) {int oldSize = size;HashMap.this.remove(o);return size != oldSize;}

// Translation:
public override bool remove(object o){lock (this._enclosing){int oldSize = this._enclosing._size;this._enclosing.remove(o);return this._enclosing._size != oldSize;}}
// Original:
@Override public int size() {return filteredEntrySet.size();}

// Translation:
public override int size(){return this._enclosing._size;}
// Original:
public PutConfigurationSetTrackingOptionsResult putConfigurationSetTrackingOptions(PutConfigurationSetTrackingOptionsRequest request) {request = beforeClientExecution(request);return executePutConfigurationSetTrackingOptions(request);}

// Translation:
public virtual PutConfigurationSetTrackingOptionsResponse PutConfigurationSetTrackingOptions(PutConfigurationSetTrackingOptionsRequest request){var options = new InvokeOptions();options.RequestMarshaller = PutConfigurationSetTrackingOptionsRequestMarshaller.Instance;options.ResponseUnmarshaller = PutConfigurationSetTrackingOptionsResponseUnmarshaller.Instance;return Invoke<PutConfigurationSetTrackingOptionsResponse>(request, options);}
// Original:
public static final ObjectId fromString(byte[] buf, int offset) {return fromHexString(buf, offset);}

// Translation:
public static NGit.ObjectId FromString(byte[] buf, int offset){return FromHexString(buf, offset);}
// Original:
public GetRelationalDatabaseResult getRelationalDatabase(GetRelationalDatabaseRequest request) {request = beforeClientExecution(request);return executeGetRelationalDatabase(request);}

// Translation:
public virtual GetRelationalDatabaseResponse GetRelationalDatabase(GetRelationalDatabaseRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetRelationalDatabaseRequestMarshaller.Instance;options.ResponseUnmarshaller = GetRelationalDatabaseResponseUnmarshaller.Instance;return Invoke<GetRelationalDatabaseResponse>(request, options);}
// Original:
public JschSession(Session session, URIish uri) {sock = session;this.uri = uri;}

// Translation:
public JschSession(Session session, URIish uri){sock = session;this.uri = uri;}
// Original:
public SetCognitoEventsResult setCognitoEvents(SetCognitoEventsRequest request) {request = beforeClientExecution(request);return executeSetCognitoEvents(request);}

// Translation:
public virtual SetCognitoEventsResponse SetCognitoEvents(SetCognitoEventsRequest request){var options = new InvokeOptions();options.RequestMarshaller = SetCognitoEventsRequestMarshaller.Instance;options.ResponseUnmarshaller = SetCognitoEventsResponseUnmarshaller.Instance;return Invoke<SetCognitoEventsResponse>(request, options);}
// Original:
public BatchDetectEntitiesResult batchDetectEntities(BatchDetectEntitiesRequest request) {request = beforeClientExecution(request);return executeBatchDetectEntities(request);}

// Translation:
public virtual BatchDetectEntitiesResponse BatchDetectEntities(BatchDetectEntitiesRequest request){var options = new InvokeOptions();options.RequestMarshaller = BatchDetectEntitiesRequestMarshaller.Instance;options.ResponseUnmarshaller = BatchDetectEntitiesResponseUnmarshaller.Instance;return Invoke<BatchDetectEntitiesResponse>(request, options);}
// Original:
public synchronized int codePointCount(int beginIndex, int endIndex) {return super.codePointCount(beginIndex, endIndex);}

// Translation:
public override int codePointCount(int beginIndex, int endIndex){lock (this){return base.codePointCount(beginIndex, endIndex);}}
// Original:
public GenerateClientCertificateResult generateClientCertificate(GenerateClientCertificateRequest request) {request = beforeClientExecution(request);return executeGenerateClientCertificate(request);}

// Translation:
public virtual GenerateClientCertificateResponse GenerateClientCertificate(GenerateClientCertificateRequest request){var options = new InvokeOptions();options.RequestMarshaller = GenerateClientCertificateRequestMarshaller.Instance;options.ResponseUnmarshaller = GenerateClientCertificateResponseUnmarshaller.Instance;return Invoke<GenerateClientCertificateResponse>(request, options);}
// Original:
public final void writeDouble(double val) throws IOException {writeLong(Double.doubleToLongBits(val));}

// Translation:
public virtual void writeDouble(double val){throw new System.NotImplementedException();}
// Original:
public static void fill(int[] array, int start, int end, int value) {Arrays.checkStartAndEnd(array.length, start, end);for (int i = start; i < end; i++) {array[i] = value;}}

// Translation:
public static void fill(int[] array, int start, int end, int value){java.util.Arrays.checkStartAndEnd(array.Length, start, end);{for (int i = start; i < end; i++){array[i] = value;}}}
// Original:
public final char yycharat(int pos) {return zzBuffer[zzStartRead+pos];}

// Translation:
public char YyCharAt(int pos){return zzBuffer[zzStartRead + pos];}
// Original:
public void pushMode(int m) {if ( LexerATNSimulator.debug ) System.out.println("pushMode "+m);_modeStack.push(_mode);mode(m);}

// Translation:
public virtual void PushMode(int m){_modeStack.Push(_mode);Mode(m);}
// Original:
public Set<String> getCapabilities() {return command.getCapabilities();}

// Translation:
public virtual ICollection<string> GetCapabilities(){return capabilities;}
// Original:
public DescribeReservedInstancesListingsResult describeReservedInstancesListings() {return describeReservedInstancesListings(new DescribeReservedInstancesListingsRequest());}

// Translation:
public virtual DescribeReservedInstancesListingsResponse DescribeReservedInstancesListings(){return DescribeReservedInstancesListings(new DescribeReservedInstancesListingsRequest());}
// Original:
public RegisterInstanceEventNotificationAttributesResult registerInstanceEventNotificationAttributes(RegisterInstanceEventNotificationAttributesRequest request) {request = beforeClientExecution(request);return executeRegisterInstanceEventNotificationAttributes(request);}

// Translation:
public virtual RegisterInstanceEventNotificationAttributesResponse RegisterInstanceEventNotificationAttributes(RegisterInstanceEventNotificationAttributesRequest request){var options = new InvokeOptions();options.RequestMarshaller = RegisterInstanceEventNotificationAttributesRequestMarshaller.Instance;options.ResponseUnmarshaller = RegisterInstanceEventNotificationAttributesResponseUnmarshaller.Instance;return Invoke<RegisterInstanceEventNotificationAttributesResponse>(request, options);}
// Original:
public PutRuleResult putRule(PutRuleRequest request) {request = beforeClientExecution(request);return executePutRule(request);}

// Translation:
public virtual PutRuleResponse PutRule(PutRuleRequest request){var options = new InvokeOptions();options.RequestMarshaller = PutRuleRequestMarshaller.Instance;options.ResponseUnmarshaller = PutRuleResponseUnmarshaller.Instance;return Invoke<PutRuleResponse>(request, options);}
// Original:
public static char[] grow(char[] array, int minSize) {assert minSize >= 0: "size must be positive (got " + minSize + "): likely integer overflow?";if (array.length < minSize) {return growExact(array, oversize(minSize, Character.BYTES));} elsereturn array;}

// Translation:
public static byte[] Grow(byte[] array, int minSize){Debug.Assert(minSize >= 0, "size must be positive (got " + minSize + "): likely integer overflow?");if (array.Length < minSize){byte[] newArray = new byte[Oversize(minSize, 1)];Array.Copy(array, 0, newArray, 0, array.Length);return newArray;}else{return array;}}
// Original:
public CleanCommand setPaths(Set<String> paths) {this.paths = paths;return this;}

// Translation:
public virtual NGit.Api.CleanCommand SetPaths(ICollection<string> paths){this.paths = paths;return this;}
// Original:
public int getLevelForDistance(double dist) {if (dist == 0)return maxLevels;final int level = GeohashUtils.lookupHashLenForWidthHeight(dist, dist);return Math.max(Math.min(level, maxLevels), 1);}

// Translation:
protected internal override int GetLevelForDistance(double degrees){var grid = new GeohashPrefixTree(m_ctx, GeohashPrefixTree.MaxLevelsPossible);return grid.GetLevelForDistance(degrees);}
// Original:
public StartDocumentTextDetectionResult startDocumentTextDetection(StartDocumentTextDetectionRequest request) {request = beforeClientExecution(request);return executeStartDocumentTextDetection(request);}

// Translation:
public virtual StartDocumentTextDetectionResponse StartDocumentTextDetection(StartDocumentTextDetectionRequest request){var options = new InvokeOptions();options.RequestMarshaller = StartDocumentTextDetectionRequestMarshaller.Instance;options.ResponseUnmarshaller = StartDocumentTextDetectionResponseUnmarshaller.Instance;return Invoke<StartDocumentTextDetectionResponse>(request, options);}
// Original:
public String getLine() {return firstWant.getLine();}

// Translation:
public virtual string GetLine(){return line;}
// Original:
public ValueEval getItem(int index) {if(index > _size) {throw new ArrayIndexOutOfBoundsException("Specified index (" + index+ ") is outside the allowed range (0.." + (_size-1) + ")");}return _tableArray.getValue(_rowIndex, index);}

// Translation:
public ValueEval GetItem(int index){if (index > _size){throw new IndexOutOfRangeException("Specified index (" + index+ ") is outside the allowed range (0.." + (_size - 1) + ")");}return _tableArray.GetRelativeValue(_rowIndex, index);}
// Original:
public String toString(){StringBuilder buffer = new StringBuilder();buffer.append("[IFMT]\n");buffer.append("    .formatIndex          = ").append("0x").append(HexDump.toHex(  getFormatIndex ())).append(" (").append( getFormatIndex() ).append(" )");buffer.append(System.getProperty("line.separator"));buffer.append("[/IFMT]\n");return buffer.toString();}

// Translation:
public override String ToString(){StringBuilder buffer = new StringBuilder();buffer.Append("[IFMT]\n");buffer.Append("    .formatIndex          = ").Append("0x").Append(HexDump.ToHex(FormatIndex)).Append(" (").Append(FormatIndex).Append(" )");buffer.Append(Environment.NewLine);buffer.Append("[/IFMT]\n");return buffer.ToString();}
// Original:
public SubmoduleSyncCommand(Repository repo) {super(repo);paths = new ArrayList<>();}

// Translation:
protected internal SubmoduleSyncCommand(Repository repo) : base(repo){paths = new AList<string>();}
// Original:
public void registerWorkflowType(RegisterWorkflowTypeRequest request) {request = beforeClientExecution(request);executeRegisterWorkflowType(request);}

// Translation:
public virtual RegisterWorkflowTypeResponse RegisterWorkflowType(RegisterWorkflowTypeRequest request){var options = new InvokeOptions();options.RequestMarshaller = RegisterWorkflowTypeRequestMarshaller.Instance;options.ResponseUnmarshaller = RegisterWorkflowTypeResponseUnmarshaller.Instance;return Invoke<RegisterWorkflowTypeResponse>(request, options);}
// Original:
public UnescapedCharSequence(char[] chars, boolean[] wasEscaped, int offset,int length) {this.chars = new char[length];this.wasEscaped = new boolean[length];System.arraycopy(chars, offset, this.chars, 0, length);System.arraycopy(wasEscaped, offset, this.wasEscaped, 0, length);}

// Translation:
public UnescapedCharSequence(char[] chars, bool[] wasEscaped, int offset,int length){this.chars = new char[length];this.wasEscaped = new bool[length];System.Array.Copy(chars, offset, this.chars, 0, length);System.Array.Copy(wasEscaped, offset, this.wasEscaped, 0, length);}
// Original:
public CreateDatasetGroupResult createDatasetGroup(CreateDatasetGroupRequest request) {request = beforeClientExecution(request);return executeCreateDatasetGroup(request);}

// Translation:
public virtual CreateDatasetGroupResponse CreateDatasetGroup(CreateDatasetGroupRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateDatasetGroupRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateDatasetGroupResponseUnmarshaller.Instance;return Invoke<CreateDatasetGroupResponse>(request, options);}