id
int32 0
10.3k
| java
stringlengths 29
1.4k
| cs
stringlengths 28
1.38k
|
---|---|---|
3,700 | public void seek(long pos) throws IOException {final long curFP = getFilePointer();final long skip = pos - curFP;if (skip < 0) {throw new IllegalStateException(getClass() + " cannot seek backwards (pos=" + pos + " getFilePointer()=" + curFP + ")");}skipBytes(skip);}
| public override void Seek(long pos){long skip = pos - GetFilePointer();if (skip < 0){throw new InvalidOperationException(this.GetType() + " cannot seek backwards");}SkipBytes(skip);}
|
3,701 | public ExternalName getExternalName(int externSheetIndex, int externNameIndex) {return _iBook.getExternalName(externSheetIndex, externNameIndex);}
| public ExternalName GetExternalName(int externSheetIndex, int externNameIndex){return _iBook.GetExternalName(externSheetIndex, externNameIndex);}
|
3,702 | public StrDocValues(ValueSource vs) {this.vs = vs;}
| public StrDocValues(ValueSource vs){this.m_vs = vs;}
|
3,703 | public int getFunctionIndex(String name) {return name.hashCode();}
| public int GetFunctionIndex(String name){return name.GetHashCode();}
|
3,704 | public int hash2(char c) {int hash = 5381;hash = ((hash << 5) + hash) + c & 0x00FF;hash = ((hash << 5) + hash) + c >> 8;return hash;}
| public virtual int Hash2(char c){int hash = 5381;hash = ((hash << 5) + hash) + c & 0x00FF;hash = ((hash << 5) + hash) + c >> 8;return hash;}
|
3,705 | public void create(String id, String title, String time, String body) throws IOException {Path d = directory(count++, null);Files.createDirectories(d);Path f = d.resolve(id + ".txt");StringBuilder contents = new StringBuilder();contents.append(time);contents.append("\n\n");contents.append(title);contents.append("\n\n");contents.append(body);contents.append("\n");try (Writer writer = Files.newBufferedWriter(f, StandardCharsets.UTF_8)) {writer.write(contents.toString());}}
| public virtual void Create(string id, string title, string time, string body){DirectoryInfo d = Directory(count++, null);d.Create();FileInfo f = new FileInfo(System.IO.Path.Combine(d.FullName, id + ".txt"));StringBuilder contents = new StringBuilder();contents.Append(time);contents.Append("\n\n");contents.Append(title);contents.Append("\n\n");contents.Append(body);contents.Append("\n");try{using (TextWriter writer = new StreamWriter(new FileStream(f.FullName, FileMode.Create, FileAccess.Write), Encoding.UTF8))writer.Write(contents.ToString());}catch (IOException ioe){throw new Exception(ioe.ToString(), ioe);}}
|
3,706 | public CharArrayWriter append(CharSequence csq) {if (csq == null) {csq = "null";}append(csq, 0, csq.length());return this;}
| public override java.io.Writer append(java.lang.CharSequence csq){if (csq == null){csq = java.lang.CharSequenceProxy.Wrap("null");}append(csq, 0, csq.Length);return this;}
|
3,707 | public PutAccountDedicatedIpWarmupAttributesResult putAccountDedicatedIpWarmupAttributes(PutAccountDedicatedIpWarmupAttributesRequest request) {request = beforeClientExecution(request);return executePutAccountDedicatedIpWarmupAttributes(request);}
| public virtual PutAccountDedicatedIpWarmupAttributesResponse PutAccountDedicatedIpWarmupAttributes(PutAccountDedicatedIpWarmupAttributesRequest request){var options = new InvokeOptions();options.RequestMarshaller = PutAccountDedicatedIpWarmupAttributesRequestMarshaller.Instance;options.ResponseUnmarshaller = PutAccountDedicatedIpWarmupAttributesResponseUnmarshaller.Instance;return Invoke<PutAccountDedicatedIpWarmupAttributesResponse>(request, options);}
|
3,708 | public static boolean equal(Object a, Object b) {return a == b || (a != null && a.equals(b));}
| public static bool equal(object a, object b){return a == b || (a != null && a.Equals(b));}
|
3,709 | public RevFlag getUnshallowFlag() {return UNSHALLOW;}
| public RevFlag GetUnshallowFlag(){return UNSHALLOW;}
|
3,710 | public DescribeSolutionVersionResult describeSolutionVersion(DescribeSolutionVersionRequest request) {request = beforeClientExecution(request);return executeDescribeSolutionVersion(request);}
| public virtual DescribeSolutionVersionResponse DescribeSolutionVersion(DescribeSolutionVersionRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeSolutionVersionRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeSolutionVersionResponseUnmarshaller.Instance;return Invoke<DescribeSolutionVersionResponse>(request, options);}
|
3,711 | public byte[] getBuffer() {return file.buf;}
| public virtual byte[] GetBuffer(){return file.buf;}
|
3,712 | public String toString() {StringBuilder buffer = new StringBuilder();buffer.append("[WRITEACCESS]\n");buffer.append(" .name = ").append(field_1_username).append("\n");buffer.append("[/WRITEACCESS]\n");return buffer.toString();}
| public override String ToString(){StringBuilder buffer = new StringBuilder();buffer.Append("[WriteACCESS]\n");buffer.Append(" .name = ").Append(field_1_username).Append("\n");buffer.Append("[/WriteACCESS]\n");return buffer.ToString();}
|
3,713 | public ModifyFpgaImageAttributeResult modifyFpgaImageAttribute(ModifyFpgaImageAttributeRequest request) {request = beforeClientExecution(request);return executeModifyFpgaImageAttribute(request);}
| public virtual ModifyFpgaImageAttributeResponse ModifyFpgaImageAttribute(ModifyFpgaImageAttributeRequest request){var options = new InvokeOptions();options.RequestMarshaller = ModifyFpgaImageAttributeRequestMarshaller.Instance;options.ResponseUnmarshaller = ModifyFpgaImageAttributeResponseUnmarshaller.Instance;return Invoke<ModifyFpgaImageAttributeResponse>(request, options);}
|
3,714 | public SubmoduleUpdateCommand(Repository repo) {super(repo);paths = new ArrayList<>();}
| protected internal SubmoduleUpdateCommand(Repository repo) : base(repo){paths = new AList<string>();}
|
3,715 | public boolean isKnown() {return type == Type.KNOWN;}
| public virtual bool IsKnown(){return type == JapaneseTokenizerType.KNOWN;}
|
3,716 | public long get(int index) {final int o = index / 10;final int b = index % 10;final int shift = b * 6;return (blocks[o] >>> shift) & 63L;}
| public override long Get(int index){int o = index / 10;int b = index % 10;int shift = b * 6;return ((long)((ulong)blocks[o] >> shift)) & 63L;}
|
3,717 | public void setValue(byte value) {setValue(FormulaError.forInt(value));}
| public void SetValue(bool value){_value = value ? 1 : 0;_isError = false;}
|
3,718 | public int getCodePoint() {return c;}
| public virtual int getCodePoint(){return c;}
|
3,719 | public GetDocumentationVersionsResult getDocumentationVersions(GetDocumentationVersionsRequest request) {request = beforeClientExecution(request);return executeGetDocumentationVersions(request);}
| public virtual GetDocumentationVersionsResponse GetDocumentationVersions(GetDocumentationVersionsRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetDocumentationVersionsRequestMarshaller.Instance;options.ResponseUnmarshaller = GetDocumentationVersionsResponseUnmarshaller.Instance;return Invoke<GetDocumentationVersionsResponse>(request, options);}
|
3,720 | public int indexOfKey(int key) {if (mGarbage) {gc();}return binarySearch(mKeys, 0, mSize, key);}
| public virtual int indexOfKey(int key){if (mGarbage){gc();}return binarySearch(mKeys, 0, mSize, key);}
|
3,721 | public void reportError(Parser recognizer,RecognitionException e){if (inErrorRecoveryMode(recognizer)) {return; }beginErrorCondition(recognizer);if ( e instanceof NoViableAltException ) {reportNoViableAlternative(recognizer, (NoViableAltException) e);}else if ( e instanceof InputMismatchException ) {reportInputMismatch(recognizer, (InputMismatchException)e);}else if ( e instanceof FailedPredicateException ) {reportFailedPredicate(recognizer, (FailedPredicateException)e);}else {System.err.println("unknown recognition error type: "+e.getClass().getName());recognizer.notifyErrorListeners(e.getOffendingToken(), e.getMessage(), e);}}
| public virtual void ReportError(Parser recognizer, RecognitionException e){if (InErrorRecoveryMode(recognizer)){return;}BeginErrorCondition(recognizer);if (e is NoViableAltException){ReportNoViableAlternative(recognizer, (NoViableAltException)e);}else{if (e is InputMismatchException){ReportInputMismatch(recognizer, (InputMismatchException)e);}else{if (e is FailedPredicateException){ReportFailedPredicate(recognizer, (FailedPredicateException)e);}else{#if !PORTABLESystem.Console.Error.WriteLine("unknown recognition error type: " + e.GetType().FullName);#endifNotifyErrorListeners(recognizer, e.Message, e);}}}}
|
3,722 | public ConstantStringFormat(String s) {str = s;}
| public ConstantStringFormat(String s){str = s;}
|
3,723 | public DoubleBuffer asReadOnlyBuffer() {return ReadOnlyDoubleArrayBuffer.copy(this, mark);}
| public override java.nio.DoubleBuffer asReadOnlyBuffer(){return java.nio.ReadOnlyDoubleArrayBuffer.copy(this, _mark);}
|
3,724 | public CacheCluster deleteCacheCluster(DeleteCacheClusterRequest request) {request = beforeClientExecution(request);return executeDeleteCacheCluster(request);}
| public virtual DeleteCacheClusterResponse DeleteCacheCluster(DeleteCacheClusterRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteCacheClusterRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteCacheClusterResponseUnmarshaller.Instance;return Invoke<DeleteCacheClusterResponse>(request, options);}
|
3,725 | public ModifyClusterSnapshotScheduleResult modifyClusterSnapshotSchedule(ModifyClusterSnapshotScheduleRequest request) {request = beforeClientExecution(request);return executeModifyClusterSnapshotSchedule(request);}
| public virtual ModifyClusterSnapshotScheduleResponse ModifyClusterSnapshotSchedule(ModifyClusterSnapshotScheduleRequest request){var options = new InvokeOptions();options.RequestMarshaller = ModifyClusterSnapshotScheduleRequestMarshaller.Instance;options.ResponseUnmarshaller = ModifyClusterSnapshotScheduleResponseUnmarshaller.Instance;return Invoke<ModifyClusterSnapshotScheduleResponse>(request, options);}
|
3,726 | public InitCommand setBare(boolean bare) {validateDirs(directory, gitDir, bare);this.bare = bare;return this;}
| public virtual InitCommand SetBare(bool bare){this.bare = bare;return this;}
|
3,727 | public TermsEnumWithSlice(int index, ReaderSlice subSlice) {this.subSlice = subSlice;this.index = index;assert subSlice.length >= 0: "length=" + subSlice.length;}
| public TermsEnumWithSlice(int index, ReaderSlice subSlice){this.SubSlice = subSlice;this.Index = index;Debug.Assert(subSlice.Length >= 0, "length=" + subSlice.Length);}
|
3,728 | public UserSViewEnd(byte[] data) {_rawData = data;}
| public UserSViewEnd(byte[] data){_rawData = data;}
|
3,729 | public SetIdentityPoolRolesResult setIdentityPoolRoles(SetIdentityPoolRolesRequest request) {request = beforeClientExecution(request);return executeSetIdentityPoolRoles(request);}
| public virtual SetIdentityPoolRolesResponse SetIdentityPoolRoles(SetIdentityPoolRolesRequest request){var options = new InvokeOptions();options.RequestMarshaller = SetIdentityPoolRolesRequestMarshaller.Instance;options.ResponseUnmarshaller = SetIdentityPoolRolesResponseUnmarshaller.Instance;return Invoke<SetIdentityPoolRolesResponse>(request, options);}
|
3,730 | public Vector( short type ) {this._type = type;}
| public Vector(short type){this._type = type;}
|
3,731 | public GetEndpointResult getEndpoint(GetEndpointRequest request) {request = beforeClientExecution(request);return executeGetEndpoint(request);}
| public virtual GetEndpointResponse GetEndpoint(GetEndpointRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetEndpointRequestMarshaller.Instance;options.ResponseUnmarshaller = GetEndpointResponseUnmarshaller.Instance;return Invoke<GetEndpointResponse>(request, options);}
|
3,732 | 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;}
| 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;}
|
3,733 | public boolean matches(int symbol, int minVocabSymbol, int maxVocabSymbol) {return false;}
| public override bool Matches(int symbol, int minVocabSymbol, int maxVocabSymbol){return false;}
|
3,734 | public DescribeClustersResult describeClusters(DescribeClustersRequest request) {request = beforeClientExecution(request);return executeDescribeClusters(request);}
| public virtual DescribeClustersResponse DescribeClusters(DescribeClustersRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeClustersRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeClustersResponseUnmarshaller.Instance;return Invoke<DescribeClustersResponse>(request, options);}
|
3,735 | 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;}
| 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;}
|
3,736 | public CellRangeAddressBase getCategoryLabelsCellRange() {return getCellRange(dataCategoryLabels);}
| public CellRangeAddressBase GetCategoryLabelsCellRange(){return GetCellRange(dataCategoryLabels);}
|
3,737 | public String getPass() {return pass;}
| public virtual string GetPass(){return pass;}
|
3,738 | public synchronized Set<Entry<K, V>> entrySet() {Set<Entry<K, V>> es = entrySet;return (es != null) ? es : (entrySet = new EntrySet());}
| 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));}}
|
3,739 | public static String toFormulaString(HSSFWorkbook book, Ptg[] ptgs) {return FormulaRenderer.toFormulaString(HSSFEvaluationWorkbook.create(book), ptgs);}
| public static String ToFormulaString(HSSFWorkbook book, Ptg[] ptgs){return FormulaRenderer.ToFormulaString(HSSFEvaluationWorkbook.Create(book), ptgs);}
|
3,740 | public CharBuffer slice() {return new CharSequenceAdapter(sequence.subSequence(position, limit));}
| public override java.nio.CharBuffer slice(){return new java.nio.CharSequenceAdapter(sequence.SubSequence(_position, _limit));}
|
3,741 | public UpdateBusinessReportScheduleResult updateBusinessReportSchedule(UpdateBusinessReportScheduleRequest request) {request = beforeClientExecution(request);return executeUpdateBusinessReportSchedule(request);}
| public virtual UpdateBusinessReportScheduleResponse UpdateBusinessReportSchedule(UpdateBusinessReportScheduleRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateBusinessReportScheduleRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateBusinessReportScheduleResponseUnmarshaller.Instance;return Invoke<UpdateBusinessReportScheduleResponse>(request, options);}
|
3,742 | 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);}}}
| 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);}}}
|
3,743 | public CreateSpotDatafeedSubscriptionResult createSpotDatafeedSubscription(CreateSpotDatafeedSubscriptionRequest request) {request = beforeClientExecution(request);return executeCreateSpotDatafeedSubscription(request);}
| public virtual CreateSpotDatafeedSubscriptionResponse CreateSpotDatafeedSubscription(CreateSpotDatafeedSubscriptionRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateSpotDatafeedSubscriptionRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateSpotDatafeedSubscriptionResponseUnmarshaller.Instance;return Invoke<CreateSpotDatafeedSubscriptionResponse>(request, options);}
|
3,744 | public final long length() {return count;}
| public long Length(){return count;}
|
3,745 | public CreateSkillGroupResult createSkillGroup(CreateSkillGroupRequest request) {request = beforeClientExecution(request);return executeCreateSkillGroup(request);}
| public virtual CreateSkillGroupResponse CreateSkillGroup(CreateSkillGroupRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateSkillGroupRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateSkillGroupResponseUnmarshaller.Instance;return Invoke<CreateSkillGroupResponse>(request, options);}
|
3,746 | public int getRightId(int wordId) {return RIGHT_ID;}
| public int GetRightId(int wordId){return RIGHT_ID;}
|
3,747 | public void setRetainBody(boolean retain) {retainBody = retain;}
| public virtual void SetRetainBody(bool retain){retainBody = retain;}
|
3,748 | public final void reset() {len =0;}
| public void Reset(){m_len = 0;}
|
3,749 | public StringBuilder insert(int offset, boolean b) {insert0(offset, b ? "true" : "false");return this;}
| public java.lang.StringBuilder insert(int offset, bool b){insert0(offset, b ? "true" : "false");return this;}
|
3,750 | public static boolean isWhitespace(byte c) {return WHITESPACE[c & 0xff];}
| public static bool IsWhitespace(byte c){return WHITESPACE[c & unchecked((int)(0xff))];}
|
3,751 | public DescribeSessionsResult describeSessions(DescribeSessionsRequest request) {request = beforeClientExecution(request);return executeDescribeSessions(request);}
| public virtual DescribeSessionsResponse DescribeSessions(DescribeSessionsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeSessionsRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeSessionsResponseUnmarshaller.Instance;return Invoke<DescribeSessionsResponse>(request, options);}
|
3,752 | public DescribeLocalGatewayVirtualInterfaceGroupsResult describeLocalGatewayVirtualInterfaceGroups(DescribeLocalGatewayVirtualInterfaceGroupsRequest request) {request = beforeClientExecution(request);return executeDescribeLocalGatewayVirtualInterfaceGroups(request);}
| public virtual DescribeLocalGatewayVirtualInterfaceGroupsResponse DescribeLocalGatewayVirtualInterfaceGroups(DescribeLocalGatewayVirtualInterfaceGroupsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeLocalGatewayVirtualInterfaceGroupsRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeLocalGatewayVirtualInterfaceGroupsResponseUnmarshaller.Instance;return Invoke<DescribeLocalGatewayVirtualInterfaceGroupsResponse>(request, options);}
|
3,753 | 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);}
| 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);}
|
3,754 | 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;}}
| 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;}}
|
3,755 | public SignalResourceResult signalResource(SignalResourceRequest request) {request = beforeClientExecution(request);return executeSignalResource(request);}
| public virtual SignalResourceResponse SignalResource(SignalResourceRequest request){var options = new InvokeOptions();options.RequestMarshaller = SignalResourceRequestMarshaller.Instance;options.ResponseUnmarshaller = SignalResourceResponseUnmarshaller.Instance;return Invoke<SignalResourceResponse>(request, options);}
|
3,756 | public int getPasswordVerifier() {return passwordVerifier;}
| public int GetPasswordVerifier(){return passwordVerifier;}
|
3,757 | public void copy(MutableValue source) {MutableValueDouble s = (MutableValueDouble) source;value = s.value;exists = s.exists;}
| public override void Copy(MutableValue source){MutableValueDouble s = (MutableValueDouble)source;Value = s.Value;Exists = s.Exists;}
|
3,758 | 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;}
| 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;}
|
3,759 | public TreeFilter getPathFilter() {return pathFilter;}
| public virtual TreeFilter GetPathFilter(){return pathFilter;}
|
3,760 | public CalcCountRecord(RecordInputStream in) {field_1_iterations = in.readShort();}
| public CalcCountRecord(RecordInputStream in1){field_1_iterations = in1.ReadShort();}
|
3,761 | public DescribeVaultRequest(String vaultName) {setVaultName(vaultName);}
| public DescribeVaultRequest(string vaultName){_vaultName = vaultName;}
|
3,762 | public final double get() {if (position == limit) {throw new BufferUnderflowException();}return backingArray[offset + position++];}
| public sealed override double get(){if (_position == _limit){throw new java.nio.BufferUnderflowException();}return backingArray[offset + _position++];}
|
3,763 | public final void write(char[] b) {write(b,0,b.length);}
| public void Write(char[] b){Write(b, 0, b.Length);}
|
3,764 | public DeleteTagsForDomainResult deleteTagsForDomain(DeleteTagsForDomainRequest request) {request = beforeClientExecution(request);return executeDeleteTagsForDomain(request);}
| public virtual DeleteTagsForDomainResponse DeleteTagsForDomain(DeleteTagsForDomainRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteTagsForDomainRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteTagsForDomainResponseUnmarshaller.Instance;return Invoke<DeleteTagsForDomainResponse>(request, options);}
|
3,765 | public SetMeRequest() {super("CloudPhoto", "2017-07-11", "SetMe", "cloudphoto");setProtocol(ProtocolType.HTTPS);}
| public SetMeRequest(): base("CloudPhoto", "2017-07-11", "SetMe", "cloudphoto", "openAPI"){Protocol = ProtocolType.HTTPS;}
|
3,766 | public LongBuffer put(long c) {if (position == limit) {throw new BufferOverflowException();}byteBuffer.putLong(position++ * SizeOf.LONG, c);return this;}
| 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;}
|
3,767 | public DisassociateFleetResult disassociateFleet(DisassociateFleetRequest request) {request = beforeClientExecution(request);return executeDisassociateFleet(request);}
| public virtual DisassociateFleetResponse DisassociateFleet(DisassociateFleetRequest request){var options = new InvokeOptions();options.RequestMarshaller = DisassociateFleetRequestMarshaller.Instance;options.ResponseUnmarshaller = DisassociateFleetResponseUnmarshaller.Instance;return Invoke<DisassociateFleetResponse>(request, options);}
|
3,768 | public String toString() {return getClass().getSimpleName() + "(" + in.toString() + ")";}
| public override string ToString(){return this.GetType().Name + "(" + m_input.ToString() + ")";}
|
3,769 | public static String fromLong(Long value) {return Long.toString(value);}
| public static string FromLong(long value){return value.ToString(CultureInfo.InvariantCulture);}
|
3,770 | 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;}
| 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;}
|
3,771 | 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;}
| 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;}
|
3,772 | 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;}}
| 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;}}
|
3,773 | public final char get() {if (position == limit) {throw new BufferUnderflowException();}return backingArray[offset + position++];}
| public sealed override char get(){if (_position == _limit){throw new java.nio.BufferUnderflowException();}return backingArray[offset + _position++];}
|
3,774 | 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);}
| 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);}
|
3,775 | @Override public E remove(int location) {synchronized (mutex) {return list.remove(location);}}
| public virtual E remove(int location){lock (mutex){return list.remove(location);}}
|
3,776 | public ExpPtg(LittleEndianInput in) {field_1_first_row = in.readShort();field_2_first_col = in.readShort();}
| public ExpPtg(ILittleEndianInput in1){field_1_first_row = in1.ReadShort();field_2_first_col = in1.ReadShort();}
|
3,777 | public TokenStream create(TokenStream input) {return new CJKBigramFilter(input, flags, outputUnigrams);}
| public override TokenStream Create(TokenStream input){return new CJKBigramFilter(input, flags, outputUnigrams);}
|
3,778 | public FuzzySet getSetForField(SegmentWriteState state,FieldInfo info) {return FuzzySet.createSetBasedOnQuality(state.segmentInfo.maxDoc(), 0.10f);}
| public override FuzzySet GetSetForField(SegmentWriteState state, FieldInfo info){return FuzzySet.CreateSetBasedOnQuality(state.SegmentInfo.DocCount, 0.10f);}
|
3,779 | public static int[] grow(int[] array) {return grow(array, 1 + array.length);}
| public static short[] Grow(short[] array){return Grow(array, 1 + array.Length);}
|
3,780 | 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;}
| 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;}
|
3,781 | 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();}}
| 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();}}}
|
3,782 | public DescribeIdentityPoolUsageResult describeIdentityPoolUsage(DescribeIdentityPoolUsageRequest request) {request = beforeClientExecution(request);return executeDescribeIdentityPoolUsage(request);}
| public virtual DescribeIdentityPoolUsageResponse DescribeIdentityPoolUsage(DescribeIdentityPoolUsageRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeIdentityPoolUsageRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeIdentityPoolUsageResponseUnmarshaller.Instance;return Invoke<DescribeIdentityPoolUsageResponse>(request, options);}
|
3,783 | public ClusterSecurityGroup createClusterSecurityGroup(CreateClusterSecurityGroupRequest request) {request = beforeClientExecution(request);return executeCreateClusterSecurityGroup(request);}
| public virtual CreateClusterSecurityGroupResponse CreateClusterSecurityGroup(CreateClusterSecurityGroupRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateClusterSecurityGroupRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateClusterSecurityGroupResponseUnmarshaller.Instance;return Invoke<CreateClusterSecurityGroupResponse>(request, options);}
|
3,784 | public K nextElement() { return nextEntryNotFailFast().key; }
| public K nextElement(){return this.nextEntryNotFailFast().key;}
|
3,785 | 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;}}}
| 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;}}}
|
3,786 | public SoraniStemFilterFactory(Map<String,String> args) {super(args);if (!args.isEmpty()) {throw new IllegalArgumentException("Unknown parameters: " + args);}}
| public SoraniStemFilterFactory(IDictionary<string, string> args): base(args){if (args.Count > 0){throw new System.ArgumentException("Unknown parameters: " + args);}}
|
3,787 | public SetAlbumCoverRequest() {super("CloudPhoto", "2017-07-11", "SetAlbumCover", "cloudphoto");setProtocol(ProtocolType.HTTPS);}
| public SetAlbumCoverRequest(): base("CloudPhoto", "2017-07-11", "SetAlbumCover", "cloudphoto", "openAPI"){Protocol = ProtocolType.HTTPS;}
|
3,788 | 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;}
| 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;}
|
3,789 | public void finish() {if (!sorted)resort();replace();}
| public override void Finish(){if (!sorted){Resort();}Replace();}
|
3,790 | public void map(K key, V value) {List<V> elementsForKey = get(key);if ( elementsForKey==null ) {elementsForKey = new ArrayList<V>();super.put(key, elementsForKey);}elementsForKey.add(value);}
| public virtual void Map(K key, V value){IList<V> elementsForKey;if (!TryGetValue(key, out elementsForKey)){elementsForKey = new ArrayList<V>();this[key] = elementsForKey;}elementsForKey.Add(value);}
|
3,791 | public DescribeImportSnapshotTasksResult describeImportSnapshotTasks(DescribeImportSnapshotTasksRequest request) {request = beforeClientExecution(request);return executeDescribeImportSnapshotTasks(request);}
| public virtual DescribeImportSnapshotTasksResponse DescribeImportSnapshotTasks(DescribeImportSnapshotTasksRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeImportSnapshotTasksRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeImportSnapshotTasksResponseUnmarshaller.Instance;return Invoke<DescribeImportSnapshotTasksResponse>(request, options);}
|
3,792 | public ListEventSourcesResult listEventSources(ListEventSourcesRequest request) {request = beforeClientExecution(request);return executeListEventSources(request);}
| public virtual ListEventSourcesResponse ListEventSources(ListEventSourcesRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListEventSourcesRequestMarshaller.Instance;options.ResponseUnmarshaller = ListEventSourcesResponseUnmarshaller.Instance;return Invoke<ListEventSourcesResponse>(request, options);}
|
3,793 | public static double getExcelDate(Calendar date, boolean use1904windowing) {int year = date.get(Calendar.YEAR);int dayOfYear = date.get(Calendar.DAY_OF_YEAR);int hour = date.get(Calendar.HOUR_OF_DAY);int minute = date.get(Calendar.MINUTE);int second = date.get(Calendar.SECOND);int milliSecond = date.get(Calendar.MILLISECOND);return internalGetExcelDate(year, dayOfYear, hour, minute, second, milliSecond, use1904windowing);}
| public static double GetExcelDate(DateTime date, bool use1904windowing){if ((!use1904windowing && date.Year < 1900) || (use1904windowing && date.Year < 1904)) {return BAD_DATE;}DateTime startdate;if (use1904windowing){startdate = new DateTime(1904, 1, 1);}else{startdate = new DateTime(1900, 1, 1);}double value = (date - startdate).TotalDays + 1;if (!use1904windowing && value >= 60){value++;}else if (use1904windowing){value--;}return value;}
|
3,794 | public TimeSpec(char type, int pos, int len, double factor) {this.type = type;this.pos = pos;this.len = len;this.factor = factor;modBy = 0;}
| public TimeSpec(char type, int pos, int len, double factor){this.type = type;this.pos = pos;this.len = len;this.factor = factor;modBy = 0;}
|
3,795 | public DeleteApiMappingResult deleteApiMapping(DeleteApiMappingRequest request) {request = beforeClientExecution(request);return executeDeleteApiMapping(request);}
| public virtual DeleteApiMappingResponse DeleteApiMapping(DeleteApiMappingRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteApiMappingRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteApiMappingResponseUnmarshaller.Instance;return Invoke<DeleteApiMappingResponse>(request, options);}
|
3,796 | public static String typeString(int typeCode) {switch (typeCode) {case OBJ_COMMIT:return TYPE_COMMIT;case OBJ_TREE:return TYPE_TREE;case OBJ_BLOB:return TYPE_BLOB;case OBJ_TAG:return TYPE_TAG;default:throw new IllegalArgumentException(MessageFormat.format(JGitText.get().badObjectType, Integer.valueOf(typeCode)));}}
| public static string TypeString(int typeCode){switch (typeCode){case OBJ_COMMIT:{return TYPE_COMMIT;}case OBJ_TREE:{return TYPE_TREE;}case OBJ_BLOB:{return TYPE_BLOB;}case OBJ_TAG:{return TYPE_TAG;}default:{throw new ArgumentException(MessageFormat.Format(JGitText.Get().badObjectType, Sharpen.Extensions.ValueOf(typeCode)));}}}
|
3,797 | public long addAndGet(long delta) {return count.addAndGet(delta);}
| public override long AddAndGet(long delta){return count.AddAndGet(delta);}
|
3,798 | public String toString() {StringBuilder sb = new StringBuilder(super.toString());sb.append(" fields=");sb.append(Arrays.toString(fields));return sb.toString();}
| public override string ToString(){StringBuilder sb = new StringBuilder(base.ToString());sb.Append(" fields=");sb.Append(Arrays.ToString(fields));return sb.ToString();}
|
3,799 | public UpdateTemplateActiveVersionResult updateTemplateActiveVersion(UpdateTemplateActiveVersionRequest request) {request = beforeClientExecution(request);return executeUpdateTemplateActiveVersion(request);}
| public virtual UpdateTemplateActiveVersionResponse UpdateTemplateActiveVersion(UpdateTemplateActiveVersionRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateTemplateActiveVersionRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateTemplateActiveVersionResponseUnmarshaller.Instance;return Invoke<UpdateTemplateActiveVersionResponse>(request, options);}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.