id_within_dataset
int64 0
10.3k
| snippet
stringlengths 29
1.4k
| tokens
listlengths 10
314
| cs
stringlengths 28
1.38k
| split_within_dataset
stringclasses 1
value | is_duplicated
bool 2
classes |
|---|---|---|---|---|---|
968
|
public ObjectId idFor(int type, byte[] data) {return idFor(type, data, 0, data.length);}
|
[
"public",
"ObjectId",
"idFor",
"(",
"int",
"type",
",",
"byte",
"[",
"]",
"data",
")",
"{",
"return",
"idFor",
"(",
"type",
",",
"data",
",",
"0",
",",
"data",
".",
"length",
")",
";",
"}"
] |
public override ObjectId IdFor(int type, byte[] data){return Delegate().IdFor(type, data);}
|
train
| false
|
969
|
public CreateDomainNameResult createDomainName(CreateDomainNameRequest request) {request = beforeClientExecution(request);return executeCreateDomainName(request);}
|
[
"public",
"CreateDomainNameResult",
"createDomainName",
"(",
"CreateDomainNameRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCreateDomainName",
"(",
"request",
")",
";",
"}"
] |
public virtual CreateDomainNameResponse CreateDomainName(CreateDomainNameRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateDomainNameRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateDomainNameResponseUnmarshaller.Instance;return Invoke<CreateDomainNameResponse>(request, options);}
|
train
| true
|
970
|
public DeleteAddressBookResult deleteAddressBook(DeleteAddressBookRequest request) {request = beforeClientExecution(request);return executeDeleteAddressBook(request);}
|
[
"public",
"DeleteAddressBookResult",
"deleteAddressBook",
"(",
"DeleteAddressBookRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteAddressBook",
"(",
"request",
")",
";",
"}"
] |
public virtual DeleteAddressBookResponse DeleteAddressBook(DeleteAddressBookRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteAddressBookRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteAddressBookResponseUnmarshaller.Instance;return Invoke<DeleteAddressBookResponse>(request, options);}
|
train
| true
|
971
|
public void addToolPack(UDFFinder toopack){AggregatingUDFFinder udfs = (AggregatingUDFFinder)_udfFinder;udfs.add(toopack);}
|
[
"public",
"void",
"addToolPack",
"(",
"UDFFinder",
"toopack",
")",
"{",
"AggregatingUDFFinder",
"udfs",
"=",
"(",
"AggregatingUDFFinder",
")",
"_udfFinder",
";",
"udfs",
".",
"add",
"(",
"toopack",
")",
";",
"}"
] |
public void AddToolPack(UDFFinder toopack){AggregatingUDFFinder udfs = (AggregatingUDFFinder)_udfFinder;udfs.Add(toopack);}
|
train
| false
|
972
|
public SearchUsersResult searchUsers(SearchUsersRequest request) {request = beforeClientExecution(request);return executeSearchUsers(request);}
|
[
"public",
"SearchUsersResult",
"searchUsers",
"(",
"SearchUsersRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeSearchUsers",
"(",
"request",
")",
";",
"}"
] |
public virtual SearchUsersResponse SearchUsers(SearchUsersRequest request){var options = new InvokeOptions();options.RequestMarshaller = SearchUsersRequestMarshaller.Instance;options.ResponseUnmarshaller = SearchUsersResponseUnmarshaller.Instance;return Invoke<SearchUsersResponse>(request, options);}
|
train
| true
|
973
|
public String getAccessKeySecret() {return privateKeySecret;}
|
[
"public",
"String",
"getAccessKeySecret",
"(",
")",
"{",
"return",
"privateKeySecret",
";",
"}"
] |
public string GetAccessKeySecret(){return privateKeySecret;}
|
train
| false
|
974
|
public void setValueAt(int index, E value) {if (mGarbage) {gc();}mValues[index] = value;}
|
[
"public",
"void",
"setValueAt",
"(",
"int",
"index",
",",
"E",
"value",
")",
"{",
"if",
"(",
"mGarbage",
")",
"{",
"gc",
"(",
")",
";",
"}",
"mValues",
"[",
"index",
"]",
"=",
"value",
";",
"}"
] |
public virtual void setValueAt(int index, E value){if (mGarbage){gc();}mValues[index] = value;}
|
train
| false
|
975
|
public RefErrorPtg() {field_1_reserved = 0;}
|
[
"public",
"RefErrorPtg",
"(",
")",
"{",
"field_1_reserved",
"=",
"0",
";",
"}"
] |
public RefErrorPtg(){field_1_reserved = 0;}
|
train
| false
|
976
|
public boolean getFlagByBit(int bitmask) {return ((flags & bitmask) != 0);}
|
[
"public",
"boolean",
"getFlagByBit",
"(",
"int",
"bitmask",
")",
"{",
"return",
"(",
"(",
"flags",
"&",
"bitmask",
")",
"!=",
"0",
")",
";",
"}"
] |
public bool GetFlagByBit(int bitmask){return ((flags & bitmask) != 0);}
|
train
| false
|
977
|
public UpdateAccountSendingEnabledResult updateAccountSendingEnabled(UpdateAccountSendingEnabledRequest request) {request = beforeClientExecution(request);return executeUpdateAccountSendingEnabled(request);}
|
[
"public",
"UpdateAccountSendingEnabledResult",
"updateAccountSendingEnabled",
"(",
"UpdateAccountSendingEnabledRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateAccountSendingEnabled",
"(",
"request",
")",
";",
"}"
] |
public virtual UpdateAccountSendingEnabledResponse UpdateAccountSendingEnabled(UpdateAccountSendingEnabledRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateAccountSendingEnabledRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateAccountSendingEnabledResponseUnmarshaller.Instance;return Invoke<UpdateAccountSendingEnabledResponse>(request, options);}
|
train
| true
|
978
|
public AppCookieStickinessPolicy(String policyName, String cookieName) {setPolicyName(policyName);setCookieName(cookieName);}
|
[
"public",
"AppCookieStickinessPolicy",
"(",
"String",
"policyName",
",",
"String",
"cookieName",
")",
"{",
"setPolicyName",
"(",
"policyName",
")",
";",
"setCookieName",
"(",
"cookieName",
")",
";",
"}"
] |
public AppCookieStickinessPolicy(string policyName, string cookieName){_policyName = policyName;_cookieName = cookieName;}
|
train
| false
|
979
|
public GetAccountBalanceResult getAccountBalance(GetAccountBalanceRequest request) {request = beforeClientExecution(request);return executeGetAccountBalance(request);}
|
[
"public",
"GetAccountBalanceResult",
"getAccountBalance",
"(",
"GetAccountBalanceRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetAccountBalance",
"(",
"request",
")",
";",
"}"
] |
public virtual GetAccountBalanceResponse GetAccountBalance(GetAccountBalanceRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetAccountBalanceRequestMarshaller.Instance;options.ResponseUnmarshaller = GetAccountBalanceResponseUnmarshaller.Instance;return Invoke<GetAccountBalanceResponse>(request, options);}
|
train
| true
|
980
|
public DescribeConversionTasksResult describeConversionTasks(DescribeConversionTasksRequest request) {request = beforeClientExecution(request);return executeDescribeConversionTasks(request);}
|
[
"public",
"DescribeConversionTasksResult",
"describeConversionTasks",
"(",
"DescribeConversionTasksRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeConversionTasks",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeConversionTasksResponse DescribeConversionTasks(DescribeConversionTasksRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeConversionTasksRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeConversionTasksResponseUnmarshaller.Instance;return Invoke<DescribeConversionTasksResponse>(request, options);}
|
train
| true
|
981
|
public DescribeImagesResult describeImages() {return describeImages(new DescribeImagesRequest());}
|
[
"public",
"DescribeImagesResult",
"describeImages",
"(",
")",
"{",
"return",
"describeImages",
"(",
"new",
"DescribeImagesRequest",
"(",
")",
")",
";",
"}"
] |
public virtual DescribeImagesResponse DescribeImages(){return DescribeImages(new DescribeImagesRequest());}
|
train
| false
|
982
|
public void close() {_closed = true;}
|
[
"public",
"void",
"close",
"(",
")",
"{",
"_closed",
"=",
"true",
";",
"}"
] |
public override void Close(){delegate1.Close();}
|
train
| false
|
983
|
public ListSignalingChannelsResult listSignalingChannels(ListSignalingChannelsRequest request) {request = beforeClientExecution(request);return executeListSignalingChannels(request);}
|
[
"public",
"ListSignalingChannelsResult",
"listSignalingChannels",
"(",
"ListSignalingChannelsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListSignalingChannels",
"(",
"request",
")",
";",
"}"
] |
public virtual ListSignalingChannelsResponse ListSignalingChannels(ListSignalingChannelsRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListSignalingChannelsRequestMarshaller.Instance;options.ResponseUnmarshaller = ListSignalingChannelsResponseUnmarshaller.Instance;return Invoke<ListSignalingChannelsResponse>(request, options);}
|
train
| false
|
984
|
public MergeFacesRequest() {super("CloudPhoto", "2017-07-11", "MergeFaces", "cloudphoto");setProtocol(ProtocolType.HTTPS);}
|
[
"public",
"MergeFacesRequest",
"(",
")",
"{",
"super",
"(",
"\"CloudPhoto\"",
",",
"\"2017-07-11\"",
",",
"\"MergeFaces\"",
",",
"\"cloudphoto\"",
")",
";",
"setProtocol",
"(",
"ProtocolType",
".",
"HTTPS",
")",
";",
"}"
] |
public MergeFacesRequest(): base("CloudPhoto", "2017-07-11", "MergeFaces", "cloudphoto", "openAPI"){Protocol = ProtocolType.HTTPS;}
|
train
| false
|
985
|
public DetectTextResult detectText(DetectTextRequest request) {request = beforeClientExecution(request);return executeDetectText(request);}
|
[
"public",
"DetectTextResult",
"detectText",
"(",
"DetectTextRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDetectText",
"(",
"request",
")",
";",
"}"
] |
public virtual DetectTextResponse DetectText(DetectTextRequest request){var options = new InvokeOptions();options.RequestMarshaller = DetectTextRequestMarshaller.Instance;options.ResponseUnmarshaller = DetectTextResponseUnmarshaller.Instance;return Invoke<DetectTextResponse>(request, options);}
|
train
| true
|
986
|
public DoubleBuffer get(double[] dst) {return get(dst, 0, dst.length);}
|
[
"public",
"DoubleBuffer",
"get",
"(",
"double",
"[",
"]",
"dst",
")",
"{",
"return",
"get",
"(",
"dst",
",",
"0",
",",
"dst",
".",
"length",
")",
";",
"}"
] |
public virtual java.nio.DoubleBuffer get(double[] dst){return get(dst, 0, dst.Length);}
|
train
| false
|
987
|
public long getCreationTime() {return decodeTS(P_CTIME);}
|
[
"public",
"long",
"getCreationTime",
"(",
")",
"{",
"return",
"decodeTS",
"(",
"P_CTIME",
")",
";",
"}"
] |
public virtual long GetCreationTime(){return DecodeTS(P_CTIME);}
|
train
| false
|
989
|
public ByteBuffer putChar(char value) {int newPosition = position + SizeOf.CHAR;if (newPosition > limit) {throw new BufferOverflowException();}Memory.pokeShort(backingArray, offset + position, (short) value, order);position = newPosition;return this;}
|
[
"public",
"ByteBuffer",
"putChar",
"(",
"char",
"value",
")",
"{",
"int",
"newPosition",
"=",
"position",
"+",
"SizeOf",
".",
"CHAR",
";",
"if",
"(",
"newPosition",
">",
"limit",
")",
"{",
"throw",
"new",
"BufferOverflowException",
"(",
")",
";",
"}",
"Memory",
".",
"pokeShort",
"(",
"backingArray",
",",
"offset",
"+",
"position",
",",
"(",
"short",
")",
"value",
",",
"order",
")",
";",
"position",
"=",
"newPosition",
";",
"return",
"this",
";",
"}"
] |
public override java.nio.ByteBuffer putChar(char value){int newPosition = _position + libcore.io.SizeOf.CHAR;if (newPosition > _limit){throw new java.nio.BufferOverflowException();}libcore.io.Memory.pokeShort(backingArray, offset + _position, (short)value, _order);_position = newPosition;return this;}
|
train
| false
|
990
|
public String toString() {return String.format("Rect [(%d,%d)-(%d,%d): %dx%d]", x, y, x + w, y + h, w, h);}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"String",
".",
"format",
"(",
"\"Rect [(%d,%d)-(%d,%d): %dx%d]\"",
",",
"x",
",",
"y",
",",
"x",
"+",
"w",
",",
"y",
"+",
"h",
",",
"w",
",",
"h",
")",
";",
"}"
] |
public override string ToString(){java.lang.StringBuilder sb = new java.lang.StringBuilder(32);sb.append("Rect(");sb.append(left);sb.append(", ");sb.append(top);sb.append(" - ");sb.append(right);sb.append(", ");sb.append(bottom);sb.append(")");return sb.ToString();}
|
train
| false
|
991
|
public static LongBuffer wrap(long[] array) {return wrap(array, 0, array.length);}
|
[
"public",
"static",
"LongBuffer",
"wrap",
"(",
"long",
"[",
"]",
"array",
")",
"{",
"return",
"wrap",
"(",
"array",
",",
"0",
",",
"array",
".",
"length",
")",
";",
"}"
] |
public static java.nio.LongBuffer wrap(long[] array_1){return wrap(array_1, 0, array_1.Length);}
|
train
| false
|
992
|
public CharsRef clone() {return new CharsRef(chars, offset, length);}
|
[
"public",
"CharsRef",
"clone",
"(",
")",
"{",
"return",
"new",
"CharsRef",
"(",
"chars",
",",
"offset",
",",
"length",
")",
";",
"}"
] |
public object Clone(){return new CharsRef(chars, Offset, Length);}
|
train
| false
|
993
|
public SpanNearClauseFactory(IndexReader reader, String fieldName, BasicQueryFactory qf) {this.reader = reader;this.fieldName = fieldName;this.weightBySpanQuery = new HashMap<>();this.qf = qf;}
|
[
"public",
"SpanNearClauseFactory",
"(",
"IndexReader",
"reader",
",",
"String",
"fieldName",
",",
"BasicQueryFactory",
"qf",
")",
"{",
"this",
".",
"reader",
"=",
"reader",
";",
"this",
".",
"fieldName",
"=",
"fieldName",
";",
"this",
".",
"weightBySpanQuery",
"=",
"new",
"HashMap",
"<",
">",
"(",
")",
";",
"this",
".",
"qf",
"=",
"qf",
";",
"}"
] |
public SpanNearClauseFactory(IndexReader reader, string fieldName, BasicQueryFactory qf) {this.reader = reader;this.fieldName = fieldName;this.weightBySpanQuery = new JCG.Dictionary<SpanQuery, float>();this.qf = qf;}
|
train
| false
|
994
|
public BeginRecord clone() {return copy();}
|
[
"public",
"BeginRecord",
"clone",
"(",
")",
"{",
"return",
"copy",
"(",
")",
";",
"}"
] |
public override Object Clone(){BeginRecord br = new BeginRecord();return br;}
|
train
| false
|
995
|
public int start() {return start(0);}
|
[
"public",
"int",
"start",
"(",
")",
"{",
"return",
"start",
"(",
"0",
")",
";",
"}"
] |
public int start(){return start(0);}
|
train
| false
|
996
|
public DescribeGameSessionQueuesResult describeGameSessionQueues(DescribeGameSessionQueuesRequest request) {request = beforeClientExecution(request);return executeDescribeGameSessionQueues(request);}
|
[
"public",
"DescribeGameSessionQueuesResult",
"describeGameSessionQueues",
"(",
"DescribeGameSessionQueuesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeGameSessionQueues",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeGameSessionQueuesResponse DescribeGameSessionQueues(DescribeGameSessionQueuesRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeGameSessionQueuesRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeGameSessionQueuesResponseUnmarshaller.Instance;return Invoke<DescribeGameSessionQueuesResponse>(request, options);}
|
train
| true
|
997
|
public SubmitAttachmentStateChangesResult submitAttachmentStateChanges(SubmitAttachmentStateChangesRequest request) {request = beforeClientExecution(request);return executeSubmitAttachmentStateChanges(request);}
|
[
"public",
"SubmitAttachmentStateChangesResult",
"submitAttachmentStateChanges",
"(",
"SubmitAttachmentStateChangesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeSubmitAttachmentStateChanges",
"(",
"request",
")",
";",
"}"
] |
public virtual SubmitAttachmentStateChangesResponse SubmitAttachmentStateChanges(SubmitAttachmentStateChangesRequest request){var options = new InvokeOptions();options.RequestMarshaller = SubmitAttachmentStateChangesRequestMarshaller.Instance;options.ResponseUnmarshaller = SubmitAttachmentStateChangesResponseUnmarshaller.Instance;return Invoke<SubmitAttachmentStateChangesResponse>(request, options);}
|
train
| false
|
998
|
public UnicodeString getString(int id ){return field_3_strings.get( id );}
|
[
"public",
"UnicodeString",
"getString",
"(",
"int",
"id",
")",
"{",
"return",
"field_3_strings",
".",
"get",
"(",
"id",
")",
";",
"}"
] |
public UnicodeString GetString(int id){return (UnicodeString)field_3_strings[id];}
|
train
| false
|
999
|
public BigInteger getSignificand() {return _significand;}
|
[
"public",
"BigInteger",
"getSignificand",
"(",
")",
"{",
"return",
"_significand",
";",
"}"
] |
public BigInteger GetSignificand(){return _significand;}
|
train
| false
|
1,000
|
public void join( AbstractEscherHolderRecord record ){rawDataContainer.concatenate(record.getRawData());}
|
[
"public",
"void",
"join",
"(",
"AbstractEscherHolderRecord",
"record",
")",
"{",
"rawDataContainer",
".",
"concatenate",
"(",
"record",
".",
"getRawData",
"(",
")",
")",
";",
"}"
] |
public void Join(AbstractEscherHolderRecord record){rawDataContainer.Concatenate(record.RawData);}
|
train
| false
|
1,002
|
public boolean equals(Object obj) {if (this == obj)return true;if (obj == null)return false;if (getClass() != obj.getClass())return false;FlushInfo other = (FlushInfo) obj;if (estimatedSegmentSize != other.estimatedSegmentSize)return false;if (numDocs != other.numDocs)return false;return true;}
|
[
"public",
"boolean",
"equals",
"(",
"Object",
"obj",
")",
"{",
"if",
"(",
"this",
"==",
"obj",
")",
"return",
"true",
";",
"if",
"(",
"obj",
"==",
"null",
")",
"return",
"false",
";",
"if",
"(",
"getClass",
"(",
")",
"!=",
"obj",
".",
"getClass",
"(",
")",
")",
"return",
"false",
";",
"FlushInfo",
"other",
"=",
"(",
"FlushInfo",
")",
"obj",
";",
"if",
"(",
"estimatedSegmentSize",
"!=",
"other",
".",
"estimatedSegmentSize",
")",
"return",
"false",
";",
"if",
"(",
"numDocs",
"!=",
"other",
".",
"numDocs",
")",
"return",
"false",
";",
"return",
"true",
";",
"}"
] |
public override bool Equals(object obj){if (this == obj){return true;}if (obj == null){return false;}if (this.GetType() != obj.GetType()){return false;}FlushInfo other = (FlushInfo)obj;if (EstimatedSegmentSize != other.EstimatedSegmentSize){return false;}if (NumDocs != other.NumDocs){return false;}return true;}
|
train
| false
|
1,003
|
public void copyRawTo(int[] b, int o) {b[o] = w1;b[o + 1] = w2;b[o + 2] = w3;b[o + 3] = w4;b[o + 4] = w5;}
|
[
"public",
"void",
"copyRawTo",
"(",
"int",
"[",
"]",
"b",
",",
"int",
"o",
")",
"{",
"b",
"[",
"o",
"]",
"=",
"w1",
";",
"b",
"[",
"o",
"+",
"1",
"]",
"=",
"w2",
";",
"b",
"[",
"o",
"+",
"2",
"]",
"=",
"w3",
";",
"b",
"[",
"o",
"+",
"3",
"]",
"=",
"w4",
";",
"b",
"[",
"o",
"+",
"4",
"]",
"=",
"w5",
";",
"}"
] |
public virtual void CopyRawTo(int[] b, int o){b[o] = w1;b[o + 1] = w2;b[o + 2] = w3;b[o + 3] = w4;b[o + 4] = w5;}
|
train
| false
|
1,004
|
public ReadPipelineResult readPipeline(ReadPipelineRequest request) {request = beforeClientExecution(request);return executeReadPipeline(request);}
|
[
"public",
"ReadPipelineResult",
"readPipeline",
"(",
"ReadPipelineRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeReadPipeline",
"(",
"request",
")",
";",
"}"
] |
public virtual ReadPipelineResponse ReadPipeline(ReadPipelineRequest request){var options = new InvokeOptions();options.RequestMarshaller = ReadPipelineRequestMarshaller.Instance;options.ResponseUnmarshaller = ReadPipelineResponseUnmarshaller.Instance;return Invoke<ReadPipelineResponse>(request, options);}
|
train
| true
|
1,005
|
public BoostQueryNode(QueryNode query, float value) {if (query == null) {throw new QueryNodeError(new MessageImpl(QueryParserMessages.NODE_ACTION_NOT_SUPPORTED, "query", "null"));}this.value = value;setLeaf(false);allocate();add(query);}
|
[
"public",
"BoostQueryNode",
"(",
"QueryNode",
"query",
",",
"float",
"value",
")",
"{",
"if",
"(",
"query",
"==",
"null",
")",
"{",
"throw",
"new",
"QueryNodeError",
"(",
"new",
"MessageImpl",
"(",
"QueryParserMessages",
".",
"NODE_ACTION_NOT_SUPPORTED",
",",
"\"query\"",
",",
"\"null\"",
")",
")",
";",
"}",
"this",
".",
"value",
"=",
"value",
";",
"setLeaf",
"(",
"false",
")",
";",
"allocate",
"(",
")",
";",
"add",
"(",
"query",
")",
";",
"}"
] |
public BoostQueryNode(IQueryNode query, float value){if (query == null){throw new QueryNodeError(new Message(QueryParserMessages.NODE_ACTION_NOT_SUPPORTED, "query", "null"));}this.value = value;IsLeaf = false;Allocate();Add(query);}
|
train
| false
|
1,006
|
public void setFallbackAlgorithm(DiffAlgorithm alg) {fallback = alg;}
|
[
"public",
"void",
"setFallbackAlgorithm",
"(",
"DiffAlgorithm",
"alg",
")",
"{",
"fallback",
"=",
"alg",
";",
"}"
] |
public virtual void SetFallbackAlgorithm(DiffAlgorithm alg){fallback = alg;}
|
train
| false
|
1,007
|
public void add(Transition t) {find(t.min).starts.add(t);find(1+t.max).ends.add(t);}
|
[
"public",
"void",
"add",
"(",
"Transition",
"t",
")",
"{",
"find",
"(",
"t",
".",
"min",
")",
".",
"starts",
".",
"add",
"(",
"t",
")",
";",
"find",
"(",
"1",
"+",
"t",
".",
"max",
")",
".",
"ends",
".",
"add",
"(",
"t",
")",
";",
"}"
] |
public void Add(Transition t){Find(t.min).starts.Add(t);Find(1 + t.max).ends.Add(t);}
|
train
| false
|
1,008
|
public String toString() {StringBuilder buffer = new StringBuilder();buffer.append(" [FEATURE FORMULA ERRORS]\n");buffer.append(" checkCalculationErrors = ");buffer.append(" checkEmptyCellRef = ");buffer.append(" checkNumbersAsText = ");buffer.append(" checkInconsistentRanges = ");buffer.append(" checkInconsistentFormulas = ");buffer.append(" checkDateTimeFormats = ");buffer.append(" checkUnprotectedFormulas = ");buffer.append(" performDataValidation = ");buffer.append(" [/FEATURE FORMULA ERRORS]\n");return buffer.toString();}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuilder",
"buffer",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"\" [FEATURE FORMULA ERRORS]\\n\"",
")",
";",
"buffer",
".",
"append",
"(",
"\" checkCalculationErrors = \"",
")",
";",
"buffer",
".",
"append",
"(",
"\" checkEmptyCellRef = \"",
")",
";",
"buffer",
".",
"append",
"(",
"\" checkNumbersAsText = \"",
")",
";",
"buffer",
".",
"append",
"(",
"\" checkInconsistentRanges = \"",
")",
";",
"buffer",
".",
"append",
"(",
"\" checkInconsistentFormulas = \"",
")",
";",
"buffer",
".",
"append",
"(",
"\" checkDateTimeFormats = \"",
")",
";",
"buffer",
".",
"append",
"(",
"\" checkUnprotectedFormulas = \"",
")",
";",
"buffer",
".",
"append",
"(",
"\" performDataValidation = \"",
")",
";",
"buffer",
".",
"append",
"(",
"\" [/FEATURE FORMULA ERRORS]\\n\"",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}"
] |
public override String ToString(){StringBuilder buffer = new StringBuilder();buffer.Append(" [FEATURE FORMULA ERRORS]\n");buffer.Append(" checkCalculationErrors = ");buffer.Append(" checkEmptyCellRef = ");buffer.Append(" checkNumbersAsText = ");buffer.Append(" checkInconsistentRanges = ");buffer.Append(" checkInconsistentFormulas = ");buffer.Append(" checkDateTimeFormats = ");buffer.Append(" checkUnprotectedFormulas = ");buffer.Append(" performDataValidation = ");buffer.Append(" [/FEATURE FORMULA ERRORS]\n");return buffer.ToString();}
|
train
| false
|
1,009
|
public void execute(Lexer lexer) {lexer.setType(type);}
|
[
"public",
"void",
"execute",
"(",
"Lexer",
"lexer",
")",
"{",
"lexer",
".",
"setType",
"(",
"type",
")",
";",
"}"
] |
public virtual void Execute(Lexer lexer){lexer.Type = type;}
|
train
| false
|
1,010
|
public UpgradePublishedSchemaResult upgradePublishedSchema(UpgradePublishedSchemaRequest request) {request = beforeClientExecution(request);return executeUpgradePublishedSchema(request);}
|
[
"public",
"UpgradePublishedSchemaResult",
"upgradePublishedSchema",
"(",
"UpgradePublishedSchemaRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpgradePublishedSchema",
"(",
"request",
")",
";",
"}"
] |
public virtual UpgradePublishedSchemaResponse UpgradePublishedSchema(UpgradePublishedSchemaRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpgradePublishedSchemaRequestMarshaller.Instance;options.ResponseUnmarshaller = UpgradePublishedSchemaResponseUnmarshaller.Instance;return Invoke<UpgradePublishedSchemaResponse>(request, options);}
|
train
| true
|
1,011
|
public int readRecordSID() {readPlain(buffer, 0, LittleEndianConsts.SHORT_SIZE);int sid = LittleEndian.getUShort(buffer, 0);shouldSkipEncryptionOnCurrentRecord = isNeverEncryptedRecord(sid);return sid;}
|
[
"public",
"int",
"readRecordSID",
"(",
")",
"{",
"readPlain",
"(",
"buffer",
",",
"0",
",",
"LittleEndianConsts",
".",
"SHORT_SIZE",
")",
";",
"int",
"sid",
"=",
"LittleEndian",
".",
"getUShort",
"(",
"buffer",
",",
"0",
")",
";",
"shouldSkipEncryptionOnCurrentRecord",
"=",
"isNeverEncryptedRecord",
"(",
"sid",
")",
";",
"return",
"sid",
";",
"}"
] |
public int ReadRecordSID(){int sid = _le.ReadUShort();_rc4.SkipTwoBytes();_rc4.StartRecord(sid);return sid;}
|
train
| false
|
1,012
|
public CreateImageBuilderStreamingURLResult createImageBuilderStreamingURL(CreateImageBuilderStreamingURLRequest request) {request = beforeClientExecution(request);return executeCreateImageBuilderStreamingURL(request);}
|
[
"public",
"CreateImageBuilderStreamingURLResult",
"createImageBuilderStreamingURL",
"(",
"CreateImageBuilderStreamingURLRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCreateImageBuilderStreamingURL",
"(",
"request",
")",
";",
"}"
] |
public virtual CreateImageBuilderStreamingURLResponse CreateImageBuilderStreamingURL(CreateImageBuilderStreamingURLRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateImageBuilderStreamingURLRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateImageBuilderStreamingURLResponseUnmarshaller.Instance;return Invoke<CreateImageBuilderStreamingURLResponse>(request, options);}
|
train
| true
|
1,013
|
public SheetIdentifier(String bookName, NameIdentifier sheetIdentifier) {_bookName = bookName;_sheetIdentifier = sheetIdentifier;}
|
[
"public",
"SheetIdentifier",
"(",
"String",
"bookName",
",",
"NameIdentifier",
"sheetIdentifier",
")",
"{",
"_bookName",
"=",
"bookName",
";",
"_sheetIdentifier",
"=",
"sheetIdentifier",
";",
"}"
] |
public SheetIdentifier(String bookName, NameIdentifier sheetIdentifier){_bookName = bookName;_sheetIdentifier = sheetIdentifier;}
|
train
| false
|
1,014
|
public boolean equals( Object o ) {return o instanceof PortugueseStemmer;}
|
[
"public",
"boolean",
"equals",
"(",
"Object",
"o",
")",
"{",
"return",
"o",
"instanceof",
"PortugueseStemmer",
";",
"}"
] |
public override bool Equals(object o){return o is PortugueseStemmer;}
|
train
| false
|
1,015
|
public PasswordRecord clone() {return copy();}
|
[
"public",
"PasswordRecord",
"clone",
"(",
")",
"{",
"return",
"copy",
"(",
")",
";",
"}"
] |
public override Object Clone(){return new PasswordRecord(field_1_password);}
|
train
| false
|
1,016
|
public DescribeTableRequest(String tableName) {setTableName(tableName);}
|
[
"public",
"DescribeTableRequest",
"(",
"String",
"tableName",
")",
"{",
"setTableName",
"(",
"tableName",
")",
";",
"}"
] |
public DescribeTableRequest(string tableName){_tableName = tableName;}
|
train
| false
|
1,017
|
public ModifyCacheParameterGroupResult modifyCacheParameterGroup(ModifyCacheParameterGroupRequest request) {request = beforeClientExecution(request);return executeModifyCacheParameterGroup(request);}
|
[
"public",
"ModifyCacheParameterGroupResult",
"modifyCacheParameterGroup",
"(",
"ModifyCacheParameterGroupRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeModifyCacheParameterGroup",
"(",
"request",
")",
";",
"}"
] |
public virtual ModifyCacheParameterGroupResponse ModifyCacheParameterGroup(ModifyCacheParameterGroupRequest request){var options = new InvokeOptions();options.RequestMarshaller = ModifyCacheParameterGroupRequestMarshaller.Instance;options.ResponseUnmarshaller = ModifyCacheParameterGroupResponseUnmarshaller.Instance;return Invoke<ModifyCacheParameterGroupResponse>(request, options);}
|
train
| true
|
1,018
|
public E set(int location, E object) {ListIterator<E> it = listIterator(location);if (!it.hasNext()) {throw new IndexOutOfBoundsException();}E result = it.next();it.set(object);return result;}
|
[
"public",
"E",
"set",
"(",
"int",
"location",
",",
"E",
"object",
")",
"{",
"ListIterator",
"<",
"E",
">",
"it",
"=",
"listIterator",
"(",
"location",
")",
";",
"if",
"(",
"!",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"throw",
"new",
"IndexOutOfBoundsException",
"(",
")",
";",
"}",
"E",
"result",
"=",
"it",
".",
"next",
"(",
")",
";",
"it",
".",
"set",
"(",
"object",
")",
";",
"return",
"result",
";",
"}"
] |
public override E set(int location, E @object){java.util.ListIterator<E> it = listIterator(location);if (!it.hasNext()){throw new System.IndexOutOfRangeException();}E result = it.next();it.set(@object);return result;}
|
train
| false
|
1,019
|
public String toFormulaString() {return NumberToTextConverter.toText(field_1_value);}
|
[
"public",
"String",
"toFormulaString",
"(",
")",
"{",
"return",
"NumberToTextConverter",
".",
"toText",
"(",
"field_1_value",
")",
";",
"}"
] |
public override String ToFormulaString(){return NumberToTextConverter.ToText(Value);}
|
train
| false
|
1,020
|
public ListBootstrapActionsResult listBootstrapActions(ListBootstrapActionsRequest request) {request = beforeClientExecution(request);return executeListBootstrapActions(request);}
|
[
"public",
"ListBootstrapActionsResult",
"listBootstrapActions",
"(",
"ListBootstrapActionsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListBootstrapActions",
"(",
"request",
")",
";",
"}"
] |
public virtual ListBootstrapActionsResponse ListBootstrapActions(ListBootstrapActionsRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListBootstrapActionsRequestMarshaller.Instance;options.ResponseUnmarshaller = ListBootstrapActionsResponseUnmarshaller.Instance;return Invoke<ListBootstrapActionsResponse>(request, options);}
|
train
| true
|
1,021
|
public void serialize(LittleEndianOutput out) {out.writeShort(_wStyle);out.writeShort(_cLine);out.writeShort(_dxMin);StringUtil.writeUnicodeString(out, _str);if(_unused != null) {out.writeByte(_unused);}}
|
[
"public",
"void",
"serialize",
"(",
"LittleEndianOutput",
"out",
")",
"{",
"out",
".",
"writeShort",
"(",
"_wStyle",
")",
";",
"out",
".",
"writeShort",
"(",
"_cLine",
")",
";",
"out",
".",
"writeShort",
"(",
"_dxMin",
")",
";",
"StringUtil",
".",
"writeUnicodeString",
"(",
"out",
",",
"_str",
")",
";",
"if",
"(",
"_unused",
"!=",
"null",
")",
"{",
"out",
".",
"writeByte",
"(",
"_unused",
")",
";",
"}",
"}"
] |
public void Serialize(ILittleEndianOutput out1) {out1.WriteShort(_wStyle);out1.WriteShort(_cLine);out1.WriteShort(_dxMin);StringUtil.WriteUnicodeString(out1, _str);out1.WriteByte(_unused);}
|
train
| false
|
1,022
|
public SynonymFilter(TokenStream input, SynonymMap synonyms, boolean ignoreCase) {super(input);this.synonyms = synonyms;this.ignoreCase = ignoreCase;this.fst = synonyms.fst;if (fst == null) {throw new IllegalArgumentException("fst must be non-null");}this.fstReader = fst.getBytesReader();rollBufferSize = 1+synonyms.maxHorizontalContext;futureInputs = new PendingInput[rollBufferSize];futureOutputs = new PendingOutputs[rollBufferSize];for(int pos=0;pos<rollBufferSize;pos++) {futureInputs[pos] = new PendingInput();futureOutputs[pos] = new PendingOutputs();}scratchArc = new FST.Arc<>();}
|
[
"public",
"SynonymFilter",
"(",
"TokenStream",
"input",
",",
"SynonymMap",
"synonyms",
",",
"boolean",
"ignoreCase",
")",
"{",
"super",
"(",
"input",
")",
";",
"this",
".",
"synonyms",
"=",
"synonyms",
";",
"this",
".",
"ignoreCase",
"=",
"ignoreCase",
";",
"this",
".",
"fst",
"=",
"synonyms",
".",
"fst",
";",
"if",
"(",
"fst",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"fst must be non-null\"",
")",
";",
"}",
"this",
".",
"fstReader",
"=",
"fst",
".",
"getBytesReader",
"(",
")",
";",
"rollBufferSize",
"=",
"1",
"+",
"synonyms",
".",
"maxHorizontalContext",
";",
"futureInputs",
"=",
"new",
"PendingInput",
"[",
"rollBufferSize",
"]",
";",
"futureOutputs",
"=",
"new",
"PendingOutputs",
"[",
"rollBufferSize",
"]",
";",
"for",
"(",
"int",
"pos",
"=",
"0",
";",
"pos",
"<",
"rollBufferSize",
";",
"pos",
"++",
")",
"{",
"futureInputs",
"[",
"pos",
"]",
"=",
"new",
"PendingInput",
"(",
")",
";",
"futureOutputs",
"[",
"pos",
"]",
"=",
"new",
"PendingOutputs",
"(",
")",
";",
"}",
"scratchArc",
"=",
"new",
"FST",
".",
"Arc",
"<",
">",
"(",
")",
";",
"}"
] |
public SynonymFilter(TokenStream input, SynonymMap synonyms, bool ignoreCase): base(input){termAtt = AddAttribute<ICharTermAttribute>();posIncrAtt = AddAttribute<IPositionIncrementAttribute>();posLenAtt = AddAttribute<IPositionLengthAttribute>();typeAtt = AddAttribute<ITypeAttribute>();offsetAtt = AddAttribute<IOffsetAttribute>();this.synonyms = synonyms;this.ignoreCase = ignoreCase;this.fst = synonyms.Fst;if (fst == null){throw new System.ArgumentException("fst must be non-null");}this.fstReader = fst.GetBytesReader();rollBufferSize = 1 + synonyms.MaxHorizontalContext;futureInputs = new PendingInput[rollBufferSize];futureOutputs = new PendingOutputs[rollBufferSize];for (int pos = 0; pos < rollBufferSize; pos++){futureInputs[pos] = new PendingInput();futureOutputs[pos] = new PendingOutputs();}scratchArc = new FST.Arc<BytesRef>();}
|
train
| false
|
1,023
|
public CreateApiResult createApi(CreateApiRequest request) {request = beforeClientExecution(request);return executeCreateApi(request);}
|
[
"public",
"CreateApiResult",
"createApi",
"(",
"CreateApiRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCreateApi",
"(",
"request",
")",
";",
"}"
] |
public virtual CreateApiResponse CreateApi(CreateApiRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateApiRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateApiResponseUnmarshaller.Instance;return Invoke<CreateApiResponse>(request, options);}
|
train
| true
|
1,024
|
public IndexOutput createOutput(String name, IOContext context) throws IOException {ensureOpen();if (context.context != Context.MERGE || context.mergeInfo.estimatedMergeBytes < minBytesDirect) {return delegate.createOutput(name, context);} else {return new NativeUnixIndexOutput(getDirectory().resolve(name), name, mergeBufferSize);}}
|
[
"public",
"IndexOutput",
"createOutput",
"(",
"String",
"name",
",",
"IOContext",
"context",
")",
"throws",
"IOException",
"{",
"ensureOpen",
"(",
")",
";",
"if",
"(",
"context",
".",
"context",
"!=",
"Context",
".",
"MERGE",
"||",
"context",
".",
"mergeInfo",
".",
"estimatedMergeBytes",
"<",
"minBytesDirect",
")",
"{",
"return",
"delegate",
".",
"createOutput",
"(",
"name",
",",
"context",
")",
";",
"}",
"else",
"{",
"return",
"new",
"NativeUnixIndexOutput",
"(",
"getDirectory",
"(",
")",
".",
"resolve",
"(",
"name",
")",
",",
"name",
",",
"mergeBufferSize",
")",
";",
"}",
"}"
] |
public IndexOutput createOutput(string name, IOContext context) throws IOException{ensureOpen();if (context.context != Context.MERGE || context.mergeInfo.estimatedMergeBytes < minBytesDirect){return @delegate.createOutput(name, context);}else{ensureCanWrite(name);return new NativeUnixIndexOutput(new File(Directory, name), mergeBufferSize);}}
|
train
| false
|
1,026
|
public UpdateUserSettingsResult updateUserSettings(UpdateUserSettingsRequest request) {request = beforeClientExecution(request);return executeUpdateUserSettings(request);}
|
[
"public",
"UpdateUserSettingsResult",
"updateUserSettings",
"(",
"UpdateUserSettingsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateUserSettings",
"(",
"request",
")",
";",
"}"
] |
public virtual UpdateUserSettingsResponse UpdateUserSettings(UpdateUserSettingsRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateUserSettingsRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateUserSettingsResponseUnmarshaller.Instance;return Invoke<UpdateUserSettingsResponse>(request, options);}
|
train
| true
|
1,027
|
public DeleteDiskSnapshotResult deleteDiskSnapshot(DeleteDiskSnapshotRequest request) {request = beforeClientExecution(request);return executeDeleteDiskSnapshot(request);}
|
[
"public",
"DeleteDiskSnapshotResult",
"deleteDiskSnapshot",
"(",
"DeleteDiskSnapshotRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteDiskSnapshot",
"(",
"request",
")",
";",
"}"
] |
public virtual DeleteDiskSnapshotResponse DeleteDiskSnapshot(DeleteDiskSnapshotRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteDiskSnapshotRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteDiskSnapshotResponseUnmarshaller.Instance;return Invoke<DeleteDiskSnapshotResponse>(request, options);}
|
train
| true
|
1,028
|
public ColumnInfoRecord() {setColumnWidth(2275);_options = 2;_xfIndex = 0x0f;field_6_reserved = 2; }
|
[
"public",
"ColumnInfoRecord",
"(",
")",
"{",
"setColumnWidth",
"(",
"2275",
")",
";",
"_options",
"=",
"2",
";",
"_xfIndex",
"=",
"0x0f",
";",
"field_6_reserved",
"=",
"2",
";",
"}"
] |
public ColumnInfoRecord(){this.ColumnWidth = 2275;_options = 2;_xf_index = 0x0f;field_6_reserved = 2; }
|
train
| false
|
1,029
|
public final long getLong(int index) {checkIndex(index, SizeOf.LONG);return Memory.peekLong(backingArray, offset + index, order);}
|
[
"public",
"final",
"long",
"getLong",
"(",
"int",
"index",
")",
"{",
"checkIndex",
"(",
"index",
",",
"SizeOf",
".",
"LONG",
")",
";",
"return",
"Memory",
".",
"peekLong",
"(",
"backingArray",
",",
"offset",
"+",
"index",
",",
"order",
")",
";",
"}"
] |
public sealed override long getLong(int index){checkIndex(index, libcore.io.SizeOf.LONG);return libcore.io.Memory.peekLong(backingArray, offset + index, _order);}
|
train
| false
|
1,030
|
public DeleteKnownHostKeysResult deleteKnownHostKeys(DeleteKnownHostKeysRequest request) {request = beforeClientExecution(request);return executeDeleteKnownHostKeys(request);}
|
[
"public",
"DeleteKnownHostKeysResult",
"deleteKnownHostKeys",
"(",
"DeleteKnownHostKeysRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteKnownHostKeys",
"(",
"request",
")",
";",
"}"
] |
public virtual DeleteKnownHostKeysResponse DeleteKnownHostKeys(DeleteKnownHostKeysRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteKnownHostKeysRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteKnownHostKeysResponseUnmarshaller.Instance;return Invoke<DeleteKnownHostKeysResponse>(request, options);}
|
train
| true
|
1,031
|
public DeleteSigningCertificateRequest(String certificateId) {setCertificateId(certificateId);}
|
[
"public",
"DeleteSigningCertificateRequest",
"(",
"String",
"certificateId",
")",
"{",
"setCertificateId",
"(",
"certificateId",
")",
";",
"}"
] |
public DeleteSigningCertificateRequest(string certificateId){_certificateId = certificateId;}
|
train
| false
|
1,032
|
public StopProcessingJobResult stopProcessingJob(StopProcessingJobRequest request) {request = beforeClientExecution(request);return executeStopProcessingJob(request);}
|
[
"public",
"StopProcessingJobResult",
"stopProcessingJob",
"(",
"StopProcessingJobRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeStopProcessingJob",
"(",
"request",
")",
";",
"}"
] |
public virtual StopProcessingJobResponse StopProcessingJob(StopProcessingJobRequest request){var options = new InvokeOptions();options.RequestMarshaller = StopProcessingJobRequestMarshaller.Instance;options.ResponseUnmarshaller = StopProcessingJobResponseUnmarshaller.Instance;return Invoke<StopProcessingJobResponse>(request, options);}
|
train
| false
|
1,033
|
public TermsEnum getTermsEnum(Terms terms) throws IOException {switch(type) {case NONE:return TermsEnum.EMPTY;case ALL:return terms.iterator();case SINGLE:return new SingleTermsEnum(terms.iterator(), term);case NORMAL:return terms.intersect(this, null);default:throw new RuntimeException("unhandled case");}}
|
[
"public",
"TermsEnum",
"getTermsEnum",
"(",
"Terms",
"terms",
")",
"throws",
"IOException",
"{",
"switch",
"(",
"type",
")",
"{",
"case",
"NONE",
":",
"return",
"TermsEnum",
".",
"EMPTY",
";",
"case",
"ALL",
":",
"return",
"terms",
".",
"iterator",
"(",
")",
";",
"case",
"SINGLE",
":",
"return",
"new",
"SingleTermsEnum",
"(",
"terms",
".",
"iterator",
"(",
")",
",",
"term",
")",
";",
"case",
"NORMAL",
":",
"return",
"terms",
".",
"intersect",
"(",
"this",
",",
"null",
")",
";",
"default",
":",
"throw",
"new",
"RuntimeException",
"(",
"\"unhandled case\"",
")",
";",
"}",
"}"
] |
public virtual TermsEnum GetTermsEnum(Terms terms){switch (Type){case Lucene.Net.Util.Automaton.CompiledAutomaton.AUTOMATON_TYPE.NONE:return TermsEnum.EMPTY;case Lucene.Net.Util.Automaton.CompiledAutomaton.AUTOMATON_TYPE.ALL:return terms.GetIterator(null);case Lucene.Net.Util.Automaton.CompiledAutomaton.AUTOMATON_TYPE.SINGLE:return new SingleTermsEnum(terms.GetIterator(null), Term);case Lucene.Net.Util.Automaton.CompiledAutomaton.AUTOMATON_TYPE.PREFIX:return new PrefixTermsEnum(terms.GetIterator(null), Term);case Lucene.Net.Util.Automaton.CompiledAutomaton.AUTOMATON_TYPE.NORMAL:return terms.Intersect(this, null);default:throw new Exception("unhandled case");}}
|
train
| false
|
1,034
|
public void grow() {costs = ArrayUtil.grow(costs, 1+count);lastRightID = ArrayUtil.grow(lastRightID, 1+count);backPos = ArrayUtil.grow(backPos, 1+count);backWordPos = ArrayUtil.grow(backWordPos, 1+count);backIndex = ArrayUtil.grow(backIndex, 1+count);backID = ArrayUtil.grow(backID, 1+count);final Type[] newBackType = new Type[backID.length];System.arraycopy(backType, 0, newBackType, 0, backType.length);backType = newBackType;}
|
[
"public",
"void",
"grow",
"(",
")",
"{",
"costs",
"=",
"ArrayUtil",
".",
"grow",
"(",
"costs",
",",
"1",
"+",
"count",
")",
";",
"lastRightID",
"=",
"ArrayUtil",
".",
"grow",
"(",
"lastRightID",
",",
"1",
"+",
"count",
")",
";",
"backPos",
"=",
"ArrayUtil",
".",
"grow",
"(",
"backPos",
",",
"1",
"+",
"count",
")",
";",
"backWordPos",
"=",
"ArrayUtil",
".",
"grow",
"(",
"backWordPos",
",",
"1",
"+",
"count",
")",
";",
"backIndex",
"=",
"ArrayUtil",
".",
"grow",
"(",
"backIndex",
",",
"1",
"+",
"count",
")",
";",
"backID",
"=",
"ArrayUtil",
".",
"grow",
"(",
"backID",
",",
"1",
"+",
"count",
")",
";",
"final",
"Type",
"[",
"]",
"newBackType",
"=",
"new",
"Type",
"[",
"backID",
".",
"length",
"]",
";",
"System",
".",
"arraycopy",
"(",
"backType",
",",
"0",
",",
"newBackType",
",",
"0",
",",
"backType",
".",
"length",
")",
";",
"backType",
"=",
"newBackType",
";",
"}"
] |
public void Grow(){costs = ArrayUtil.Grow(costs, 1 + count);lastRightID = ArrayUtil.Grow(lastRightID, 1 + count);backPos = ArrayUtil.Grow(backPos, 1 + count);backIndex = ArrayUtil.Grow(backIndex, 1 + count);backID = ArrayUtil.Grow(backID, 1 + count);JapaneseTokenizerType[] newBackType = new JapaneseTokenizerType[backID.Length];System.Array.Copy(backType, 0, newBackType, 0, backType.Length);backType = newBackType;}
|
train
| false
|
1,035
|
public int get(final int index){if (index >= _limit){throw new IndexOutOfBoundsException(index + " not accessible in a list of length " + _limit);}return _array[ index ];}
|
[
"public",
"int",
"get",
"(",
"final",
"int",
"index",
")",
"{",
"if",
"(",
"index",
">=",
"_limit",
")",
"{",
"throw",
"new",
"IndexOutOfBoundsException",
"(",
"index",
"+",
"\" not accessible in a list of length \"",
"+",
"_limit",
")",
";",
"}",
"return",
"_array",
"[",
"index",
"]",
";",
"}"
] |
public int Get(int index){if (index >= _limit){throw new IndexOutOfRangeException(index + " not accessible in a list of length " + _limit);}return _array[index];}
|
train
| false
|
1,036
|
public LongBuffer slice() {return new ReadWriteLongArrayBuffer(remaining(), backingArray, offset + position);}
|
[
"public",
"LongBuffer",
"slice",
"(",
")",
"{",
"return",
"new",
"ReadWriteLongArrayBuffer",
"(",
"remaining",
"(",
")",
",",
"backingArray",
",",
"offset",
"+",
"position",
")",
";",
"}"
] |
public override java.nio.LongBuffer slice(){return new java.nio.ReadWriteLongArrayBuffer(remaining(), backingArray, offset +_position);}
|
train
| false
|
1,037
|
public ListProblemsResult listProblems(ListProblemsRequest request) {request = beforeClientExecution(request);return executeListProblems(request);}
|
[
"public",
"ListProblemsResult",
"listProblems",
"(",
"ListProblemsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListProblems",
"(",
"request",
")",
";",
"}"
] |
public virtual ListProblemsResponse ListProblems(ListProblemsRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListProblemsRequestMarshaller.Instance;options.ResponseUnmarshaller = ListProblemsResponseUnmarshaller.Instance;return Invoke<ListProblemsResponse>(request, options);}
|
train
| false
|
1,038
|
public static double pmt(double r, double n, double p, double f, boolean t) {double retval = 0;if (r == 0) {retval = -1*(f+p)/n;}else {double r1 = r + 1;retval = ( f + p * Math.pow(r1, n) ) * r/((t ? r1 : 1) * (1 - Math.pow(r1, n)));}return retval;}
|
[
"public",
"static",
"double",
"pmt",
"(",
"double",
"r",
",",
"double",
"n",
",",
"double",
"p",
",",
"double",
"f",
",",
"boolean",
"t",
")",
"{",
"double",
"retval",
"=",
"0",
";",
"if",
"(",
"r",
"==",
"0",
")",
"{",
"retval",
"=",
"-",
"1",
"*",
"(",
"f",
"+",
"p",
")",
"/",
"n",
";",
"}",
"else",
"{",
"double",
"r1",
"=",
"r",
"+",
"1",
";",
"retval",
"=",
"(",
"f",
"+",
"p",
"*",
"Math",
".",
"pow",
"(",
"r1",
",",
"n",
")",
")",
"*",
"r",
"/",
"(",
"(",
"t",
"?",
"r1",
":",
"1",
")",
"*",
"(",
"1",
"-",
"Math",
".",
"pow",
"(",
"r1",
",",
"n",
")",
")",
")",
";",
"}",
"return",
"retval",
";",
"}"
] |
public static double pmt(double r, double n, double p, double f, bool t){double retval = 0;if (r == 0){retval = -1 * (f + p) / n;}else{double r1 = r + 1;retval = (f + p * Math.Pow(r1, n)) * r/((t ? r1 : 1) * (1 - Math.Pow(r1, n)));}return retval;}
|
train
| false
|
1,039
|
public PrintGridlinesRecord clone() {return copy();}
|
[
"public",
"PrintGridlinesRecord",
"clone",
"(",
")",
"{",
"return",
"copy",
"(",
")",
";",
"}"
] |
public override Object Clone(){PrintGridlinesRecord rec = new PrintGridlinesRecord();rec.field_1_print_gridlines = field_1_print_gridlines;return rec;}
|
train
| false
|
1,040
|
public HSSFCellStyle getColumnStyle(int column) {short styleIndex = _sheet.getXFIndexForColAt((short) column);if (styleIndex == 0xf) {return null;}ExtendedFormatRecord xf = _book.getExFormatAt(styleIndex);return new HSSFCellStyle(styleIndex, xf, _book);}
|
[
"public",
"HSSFCellStyle",
"getColumnStyle",
"(",
"int",
"column",
")",
"{",
"short",
"styleIndex",
"=",
"_sheet",
".",
"getXFIndexForColAt",
"(",
"(",
"short",
")",
"column",
")",
";",
"if",
"(",
"styleIndex",
"==",
"0xf",
")",
"{",
"return",
"null",
";",
"}",
"ExtendedFormatRecord",
"xf",
"=",
"_book",
".",
"getExFormatAt",
"(",
"styleIndex",
")",
";",
"return",
"new",
"HSSFCellStyle",
"(",
"styleIndex",
",",
"xf",
",",
"_book",
")",
";",
"}"
] |
public NPOI.SS.UserModel.ICellStyle GetColumnStyle(int column){short styleIndex = _sheet.GetXFIndexForColAt((short)column);if (styleIndex == 0xf){return null;}ExtendedFormatRecord xf = book.GetExFormatAt(styleIndex);return new HSSFCellStyle(styleIndex, xf, book);}
|
train
| false
|
1,041
|
public Query makeLuceneQueryField(String fieldName, BasicQueryFactory qf){Query q = makeLuceneQueryFieldNoBoost(fieldName, qf);if (isWeighted()) {q = new BoostQuery(q, getWeight()); }return q;}
|
[
"public",
"Query",
"makeLuceneQueryField",
"(",
"String",
"fieldName",
",",
"BasicQueryFactory",
"qf",
")",
"{",
"Query",
"q",
"=",
"makeLuceneQueryFieldNoBoost",
"(",
"fieldName",
",",
"qf",
")",
";",
"if",
"(",
"isWeighted",
"(",
")",
")",
"{",
"q",
"=",
"new",
"BoostQuery",
"(",
"q",
",",
"getWeight",
"(",
")",
")",
";",
"}",
"return",
"q",
";",
"}"
] |
public virtual Search.Query MakeLuceneQueryField(string fieldName, BasicQueryFactory qf){Search.Query q = MakeLuceneQueryFieldNoBoost(fieldName, qf);if (IsWeighted){q.Boost=(Weight * q.Boost); }return q;}
|
train
| false
|
1,042
|
public double getPrecisionAt(int n) {if (n<1 || n>MAX_POINTS) {throw new IllegalArgumentException("n="+n+" - but it must be in [1,"+MAX_POINTS+"] range!");}if (n>numPoints) {return (numPoints * pAt[(int)numPoints])/n;}return pAt[n];}
|
[
"public",
"double",
"getPrecisionAt",
"(",
"int",
"n",
")",
"{",
"if",
"(",
"n",
"<",
"1",
"||",
"n",
">",
"MAX_POINTS",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"n=\"",
"+",
"n",
"+",
"\" - but it must be in [1,\"",
"+",
"MAX_POINTS",
"+",
"\"] range!\"",
")",
";",
"}",
"if",
"(",
"n",
">",
"numPoints",
")",
"{",
"return",
"(",
"numPoints",
"*",
"pAt",
"[",
"(",
"int",
")",
"numPoints",
"]",
")",
"/",
"n",
";",
"}",
"return",
"pAt",
"[",
"n",
"]",
";",
"}"
] |
public virtual double GetPrecisionAt(int n){if (n < 1 || n > MAX_POINTS){throw new ArgumentException("n=" + n + " - but it must be in [1," + MAX_POINTS + "] range!");}if (n > numPoints){return (numPoints * pAt[(int)numPoints]) / n;}return pAt[n];}
|
train
| false
|
1,043
|
public DescribeEngineDefaultParametersRequest(String dBParameterGroupFamily) {setDBParameterGroupFamily(dBParameterGroupFamily);}
|
[
"public",
"DescribeEngineDefaultParametersRequest",
"(",
"String",
"dBParameterGroupFamily",
")",
"{",
"setDBParameterGroupFamily",
"(",
"dBParameterGroupFamily",
")",
";",
"}"
] |
public DescribeEngineDefaultParametersRequest(string dbParameterGroupFamily){_dbParameterGroupFamily = dbParameterGroupFamily;}
|
train
| false
|
1,044
|
public DeleteClientCertificateResult deleteClientCertificate(DeleteClientCertificateRequest request) {request = beforeClientExecution(request);return executeDeleteClientCertificate(request);}
|
[
"public",
"DeleteClientCertificateResult",
"deleteClientCertificate",
"(",
"DeleteClientCertificateRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteClientCertificate",
"(",
"request",
")",
";",
"}"
] |
public virtual DeleteClientCertificateResponse DeleteClientCertificate(DeleteClientCertificateRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteClientCertificateRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteClientCertificateResponseUnmarshaller.Instance;return Invoke<DeleteClientCertificateResponse>(request, options);}
|
train
| true
|
1,046
|
public byte readByte(){return _in.readByte();}
|
[
"public",
"byte",
"readByte",
"(",
")",
"{",
"return",
"_in",
".",
"readByte",
"(",
")",
";",
"}"
] |
public int ReadByte(){return _in.ReadByte();}
|
train
| false
|
1,047
|
public SendBounceResult sendBounce(SendBounceRequest request) {request = beforeClientExecution(request);return executeSendBounce(request);}
|
[
"public",
"SendBounceResult",
"sendBounce",
"(",
"SendBounceRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeSendBounce",
"(",
"request",
")",
";",
"}"
] |
public virtual SendBounceResponse SendBounce(SendBounceRequest request){var options = new InvokeOptions();options.RequestMarshaller = SendBounceRequestMarshaller.Instance;options.ResponseUnmarshaller = SendBounceResponseUnmarshaller.Instance;return Invoke<SendBounceResponse>(request, options);}
|
train
| true
|
1,048
|
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0,ValueEval arg1) {double dn;try {ValueEval ve1 = OperandResolver.getSingleValue(arg1, srcRowIndex, srcColumnIndex);dn = OperandResolver.coerceValueToDouble(ve1);} catch (EvaluationException e1) {return ErrorEval.VALUE_INVALID;}if (dn < 0 || dn > 1) { return ErrorEval.NUM_ERROR;}double result;try {double[] ds = ValueCollector.collectValues(arg0);int N = ds.length;if (N == 0 || N > 8191) {return ErrorEval.NUM_ERROR;}double n = (N - 1) * dn + 1;if (n == 1d) {result = StatsLib.kthSmallest(ds, 1);} else if (Double.compare(n, N) == 0) {result = StatsLib.kthLargest(ds, 1);} else {int k = (int) n;double d = n - k;result = StatsLib.kthSmallest(ds, k) + d* (StatsLib.kthSmallest(ds, k + 1) - StatsLib.kthSmallest(ds, k));}NumericFunction.checkValue(result);} catch (EvaluationException e) {return e.getErrorEval();}return new NumberEval(result);}
|
[
"public",
"ValueEval",
"evaluate",
"(",
"int",
"srcRowIndex",
",",
"int",
"srcColumnIndex",
",",
"ValueEval",
"arg0",
",",
"ValueEval",
"arg1",
")",
"{",
"double",
"dn",
";",
"try",
"{",
"ValueEval",
"ve1",
"=",
"OperandResolver",
".",
"getSingleValue",
"(",
"arg1",
",",
"srcRowIndex",
",",
"srcColumnIndex",
")",
";",
"dn",
"=",
"OperandResolver",
".",
"coerceValueToDouble",
"(",
"ve1",
")",
";",
"}",
"catch",
"(",
"EvaluationException",
"e1",
")",
"{",
"return",
"ErrorEval",
".",
"VALUE_INVALID",
";",
"}",
"if",
"(",
"dn",
"<",
"0",
"||",
"dn",
">",
"1",
")",
"{",
"return",
"ErrorEval",
".",
"NUM_ERROR",
";",
"}",
"double",
"result",
";",
"try",
"{",
"double",
"[",
"]",
"ds",
"=",
"ValueCollector",
".",
"collectValues",
"(",
"arg0",
")",
";",
"int",
"N",
"=",
"ds",
".",
"length",
";",
"if",
"(",
"N",
"==",
"0",
"||",
"N",
">",
"8191",
")",
"{",
"return",
"ErrorEval",
".",
"NUM_ERROR",
";",
"}",
"double",
"n",
"=",
"(",
"N",
"-",
"1",
")",
"*",
"dn",
"+",
"1",
";",
"if",
"(",
"n",
"==",
"1d",
")",
"{",
"result",
"=",
"StatsLib",
".",
"kthSmallest",
"(",
"ds",
",",
"1",
")",
";",
"}",
"else",
"if",
"(",
"Double",
".",
"compare",
"(",
"n",
",",
"N",
")",
"==",
"0",
")",
"{",
"result",
"=",
"StatsLib",
".",
"kthLargest",
"(",
"ds",
",",
"1",
")",
";",
"}",
"else",
"{",
"int",
"k",
"=",
"(",
"int",
")",
"n",
";",
"double",
"d",
"=",
"n",
"-",
"k",
";",
"result",
"=",
"StatsLib",
".",
"kthSmallest",
"(",
"ds",
",",
"k",
")",
"+",
"d",
"*",
"(",
"StatsLib",
".",
"kthSmallest",
"(",
"ds",
",",
"k",
"+",
"1",
")",
"-",
"StatsLib",
".",
"kthSmallest",
"(",
"ds",
",",
"k",
")",
")",
";",
"}",
"NumericFunction",
".",
"checkValue",
"(",
"result",
")",
";",
"}",
"catch",
"(",
"EvaluationException",
"e",
")",
"{",
"return",
"e",
".",
"getErrorEval",
"(",
")",
";",
"}",
"return",
"new",
"NumberEval",
"(",
"result",
")",
";",
"}"
] |
public override ValueEval Evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0,ValueEval arg1){double dn;try{ValueEval ve1 = OperandResolver.GetSingleValue(arg1, srcRowIndex, srcColumnIndex);dn = OperandResolver.CoerceValueToDouble(ve1);}catch (EvaluationException){return ErrorEval.VALUE_INVALID;}if (dn < 0 || dn > 1){ return ErrorEval.NUM_ERROR;}double result;try{double[] ds = NPOI.SS.Formula.Functions.AggregateFunction.ValueCollector.CollectValues(arg0);int N = ds.Length;if (N == 0 || N > 8191){return ErrorEval.NUM_ERROR;}double n = (N - 1) * dn + 1;if (n == 1d){result = StatsLib.kthSmallest(ds, 1);}else if (n == N){result = StatsLib.kthLargest(ds, 1);}else{int k = (int)n;double d = n - k;result = StatsLib.kthSmallest(ds, k) + d* (StatsLib.kthSmallest(ds, k + 1) - StatsLib.kthSmallest(ds, k));}NumericFunction.CheckValue(result);}catch (EvaluationException e){return e.GetErrorEval();}return new NumberEval(result);}
|
train
| false
|
1,049
|
public int getIndexOfFormattingRun(int index) {FormatRun r = _string.getFormatRun(index);return r.getCharacterPos();}
|
[
"public",
"int",
"getIndexOfFormattingRun",
"(",
"int",
"index",
")",
"{",
"FormatRun",
"r",
"=",
"_string",
".",
"getFormatRun",
"(",
"index",
")",
";",
"return",
"r",
".",
"getCharacterPos",
"(",
")",
";",
"}"
] |
public int GetIndexOfFormattingRun(int index){UnicodeString.FormatRun r = _string.GetFormatRun(index);return r.CharacterPos;}
|
train
| false
|
1,050
|
public void getEntryObjectId(MutableObjectId out) {out.fromRaw(idBuffer(), idOffset());}
|
[
"public",
"void",
"getEntryObjectId",
"(",
"MutableObjectId",
"out",
")",
"{",
"out",
".",
"fromRaw",
"(",
"idBuffer",
"(",
")",
",",
"idOffset",
"(",
")",
")",
";",
"}"
] |
public virtual void GetEntryObjectId(MutableObjectId @out){@out.FromRaw(IdBuffer, IdOffset);}
|
train
| false
|
1,051
|
public static byte[] grow(byte[] array, int minSize) {assert minSize >= 0: "size must be positive (got " + minSize + "): likely integer overflow?";if (array.length < minSize) {return growExact(array, oversize(minSize, Byte.BYTES));} else return array;}
|
[
"public",
"static",
"byte",
"[",
"]",
"grow",
"(",
"byte",
"[",
"]",
"array",
",",
"int",
"minSize",
")",
"{",
"assert",
"minSize",
">=",
"0",
":",
"\"size must be positive (got \"",
"+",
"minSize",
"+",
"\"): likely integer overflow?\"",
";",
"if",
"(",
"array",
".",
"length",
"<",
"minSize",
")",
"{",
"return",
"growExact",
"(",
"array",
",",
"oversize",
"(",
"minSize",
",",
"Byte",
".",
"BYTES",
")",
")",
";",
"}",
"else",
"return",
"array",
";",
"}"
] |
public static float[] Grow(float[] array, int minSize){Debug.Assert(minSize >= 0, "size must be positive (got " + minSize + "): likely integer overflow?");if (array.Length < minSize){float[] newArray = new float[Oversize(minSize, RamUsageEstimator.NUM_BYTES_SINGLE)];Array.Copy(array, 0, newArray, 0, array.Length);return newArray;}else{return array;}}
|
train
| false
|
1,053
|
public GroupingSearch setCaching(int maxDocsToCache, boolean cacheScores) {this.maxDocsToCache = maxDocsToCache;this.maxCacheRAMMB = null;this.cacheScores = cacheScores;return this;}
|
[
"public",
"GroupingSearch",
"setCaching",
"(",
"int",
"maxDocsToCache",
",",
"boolean",
"cacheScores",
")",
"{",
"this",
".",
"maxDocsToCache",
"=",
"maxDocsToCache",
";",
"this",
".",
"maxCacheRAMMB",
"=",
"null",
";",
"this",
".",
"cacheScores",
"=",
"cacheScores",
";",
"return",
"this",
";",
"}"
] |
public virtual GroupingSearch SetCaching(int maxDocsToCache, bool cacheScores){this.maxDocsToCache = maxDocsToCache;this.maxCacheRAMMB = null;this.cacheScores = cacheScores;return this;}
|
train
| false
|
1,054
|
public boolean isValidTermOrPhrase( final List<TermInfo> phraseCandidate ){if( !terminal ) return false;if( phraseCandidate.size() == 1 ) return true;int pos = phraseCandidate.get( 0 ).getPosition();for( int i = 1; i < phraseCandidate.size(); i++ ){int nextPos = phraseCandidate.get( i ).getPosition();if( Math.abs( nextPos - pos - 1 ) > slop ) return false;pos = nextPos;}return true;}
|
[
"public",
"boolean",
"isValidTermOrPhrase",
"(",
"final",
"List",
"<",
"TermInfo",
">",
"phraseCandidate",
")",
"{",
"if",
"(",
"!",
"terminal",
")",
"return",
"false",
";",
"if",
"(",
"phraseCandidate",
".",
"size",
"(",
")",
"==",
"1",
")",
"return",
"true",
";",
"int",
"pos",
"=",
"phraseCandidate",
".",
"get",
"(",
"0",
")",
".",
"getPosition",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"1",
";",
"i",
"<",
"phraseCandidate",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"int",
"nextPos",
"=",
"phraseCandidate",
".",
"get",
"(",
"i",
")",
".",
"getPosition",
"(",
")",
";",
"if",
"(",
"Math",
".",
"abs",
"(",
"nextPos",
"-",
"pos",
"-",
"1",
")",
">",
"slop",
")",
"return",
"false",
";",
"pos",
"=",
"nextPos",
";",
"}",
"return",
"true",
";",
"}"
] |
public virtual bool IsValidTermOrPhrase(IList<TermInfo> phraseCandidate){if (!terminal) return false;if (phraseCandidate.Count == 1) return true;int pos = phraseCandidate[0].Position;for (int i = 1; i < phraseCandidate.Count; i++){int nextPos = phraseCandidate[i].Position;if (Math.Abs(nextPos - pos - 1) > slop) return false;pos = nextPos;}return true;}
|
train
| false
|
1,055
|
public Run startWorkflowExecution(StartWorkflowExecutionRequest request) {request = beforeClientExecution(request);return executeStartWorkflowExecution(request);}
|
[
"public",
"Run",
"startWorkflowExecution",
"(",
"StartWorkflowExecutionRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeStartWorkflowExecution",
"(",
"request",
")",
";",
"}"
] |
public virtual StartWorkflowExecutionResponse StartWorkflowExecution(StartWorkflowExecutionRequest request){var options = new InvokeOptions();options.RequestMarshaller = StartWorkflowExecutionRequestMarshaller.Instance;options.ResponseUnmarshaller = StartWorkflowExecutionResponseUnmarshaller.Instance;return Invoke<StartWorkflowExecutionResponse>(request, options);}
|
train
| true
|
1,056
|
public char[] nextKey() {goNext();return keys[lastPos];}
|
[
"public",
"char",
"[",
"]",
"nextKey",
"(",
")",
"{",
"goNext",
"(",
")",
";",
"return",
"keys",
"[",
"lastPos",
"]",
";",
"}"
] |
public virtual char[] NextKey(){GoNext();return outerInstance.keys[lastPos];}
|
train
| false
|
1,057
|
public ContainsResult contains(BytesRef value) {int hash = hashFunction.hash(value);if (hash < 0) {hash = hash * -1;}return mayContainValue(hash);}
|
[
"public",
"ContainsResult",
"contains",
"(",
"BytesRef",
"value",
")",
"{",
"int",
"hash",
"=",
"hashFunction",
".",
"hash",
"(",
"value",
")",
";",
"if",
"(",
"hash",
"<",
"0",
")",
"{",
"hash",
"=",
"hash",
"*",
"-",
"1",
";",
"}",
"return",
"mayContainValue",
"(",
"hash",
")",
";",
"}"
] |
public virtual ContainsResult Contains(BytesRef value){var hash = _hashFunction.Hash(value);if (hash < 0){hash = hash*-1;}return MayContainValue(hash);}
|
train
| false
|
1,058
|
public GetMethodResponseResult getMethodResponse(GetMethodResponseRequest request) {request = beforeClientExecution(request);return executeGetMethodResponse(request);}
|
[
"public",
"GetMethodResponseResult",
"getMethodResponse",
"(",
"GetMethodResponseRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetMethodResponse",
"(",
"request",
")",
";",
"}"
] |
public virtual GetMethodResponseResponse GetMethodResponse(GetMethodResponseRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetMethodResponseRequestMarshaller.Instance;options.ResponseUnmarshaller = GetMethodResponseResponseUnmarshaller.Instance;return Invoke<GetMethodResponseResponse>(request, options);}
|
train
| true
|
1,059
|
public void setValue(boolean value) {_value = value ? 1 : 0;_isError = false;}
|
[
"public",
"void",
"setValue",
"(",
"boolean",
"value",
")",
"{",
"_value",
"=",
"value",
"?",
"1",
":",
"0",
";",
"_isError",
"=",
"false",
";",
"}"
] |
public void SetValue(bool value){_value = value ? 1 : 0;_isError = false;}
|
train
| false
|
1,060
|
public synchronized E elementAt(int location) {if (location < elementCount) {return (E) elementData[location];}throw arrayIndexOutOfBoundsException(location, elementCount);}
|
[
"public",
"synchronized",
"E",
"elementAt",
"(",
"int",
"location",
")",
"{",
"if",
"(",
"location",
"<",
"elementCount",
")",
"{",
"return",
"(",
"E",
")",
"elementData",
"[",
"location",
"]",
";",
"}",
"throw",
"arrayIndexOutOfBoundsException",
"(",
"location",
",",
"elementCount",
")",
";",
"}"
] |
public virtual E elementAt(int location){lock (this){if (location < elementCount){return (E)elementData[location];}throw arrayIndexOutOfBoundsException(location, elementCount);}}
|
train
| false
|
1,062
|
public IterationRecord clone() {return copy();}
|
[
"public",
"IterationRecord",
"clone",
"(",
")",
"{",
"return",
"copy",
"(",
")",
";",
"}"
] |
public override Object Clone(){return new IterationRecord(Iteration);}
|
train
| false
|
1,063
|
public boolean requiresCommitBody() {return a.requiresCommitBody();}
|
[
"public",
"boolean",
"requiresCommitBody",
"(",
")",
"{",
"return",
"a",
".",
"requiresCommitBody",
"(",
")",
";",
"}"
] |
public override bool RequiresCommitBody(){return a.RequiresCommitBody();}
|
train
| false
|
1,064
|
public UpdateTrafficPolicyCommentResult updateTrafficPolicyComment(UpdateTrafficPolicyCommentRequest request) {request = beforeClientExecution(request);return executeUpdateTrafficPolicyComment(request);}
|
[
"public",
"UpdateTrafficPolicyCommentResult",
"updateTrafficPolicyComment",
"(",
"UpdateTrafficPolicyCommentRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateTrafficPolicyComment",
"(",
"request",
")",
";",
"}"
] |
public virtual UpdateTrafficPolicyCommentResponse UpdateTrafficPolicyComment(UpdateTrafficPolicyCommentRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateTrafficPolicyCommentRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateTrafficPolicyCommentResponseUnmarshaller.Instance;return Invoke<UpdateTrafficPolicyCommentResponse>(request, options);}
|
train
| true
|
1,065
|
public UpdatePrimaryEmailAddressResult updatePrimaryEmailAddress(UpdatePrimaryEmailAddressRequest request) {request = beforeClientExecution(request);return executeUpdatePrimaryEmailAddress(request);}
|
[
"public",
"UpdatePrimaryEmailAddressResult",
"updatePrimaryEmailAddress",
"(",
"UpdatePrimaryEmailAddressRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdatePrimaryEmailAddress",
"(",
"request",
")",
";",
"}"
] |
public virtual UpdatePrimaryEmailAddressResponse UpdatePrimaryEmailAddress(UpdatePrimaryEmailAddressRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdatePrimaryEmailAddressRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdatePrimaryEmailAddressResponseUnmarshaller.Instance;return Invoke<UpdatePrimaryEmailAddressResponse>(request, options);}
|
train
| true
|
1,066
|
public static Pattern compile(String pattern) {return new Pattern(pattern, 0);}
|
[
"public",
"static",
"Pattern",
"compile",
"(",
"String",
"pattern",
")",
"{",
"return",
"new",
"Pattern",
"(",
"pattern",
",",
"0",
")",
";",
"}"
] |
public static java.util.regex.Pattern compile(string pattern_1){return new java.util.regex.Pattern(pattern_1, 0);}
|
train
| false
|
1,067
|
public static int update(int hash, int value) {final int c1 = 0xCC9E2D51;final int c2 = 0x1B873593;final int r1 = 15;final int r2 = 13;final int m = 5;final int n = 0xE6546B64;int k = value;k = k * c1;k = (k << r1) | (k >>> (32 - r1));k = k * c2;hash = hash ^ k;hash = (hash << r2) | (hash >>> (32 - r2));hash = hash * m + n;return hash;}
|
[
"public",
"static",
"int",
"update",
"(",
"int",
"hash",
",",
"int",
"value",
")",
"{",
"final",
"int",
"c1",
"=",
"0xCC9E2D51",
";",
"final",
"int",
"c2",
"=",
"0x1B873593",
";",
"final",
"int",
"r1",
"=",
"15",
";",
"final",
"int",
"r2",
"=",
"13",
";",
"final",
"int",
"m",
"=",
"5",
";",
"final",
"int",
"n",
"=",
"0xE6546B64",
";",
"int",
"k",
"=",
"value",
";",
"k",
"=",
"k",
"*",
"c1",
";",
"k",
"=",
"(",
"k",
"<<",
"r1",
")",
"|",
"(",
"k",
">",
">",
">",
"(",
"32",
"-",
"r1",
")",
")",
";",
"k",
"=",
"k",
"*",
"c2",
";",
"hash",
"=",
"hash",
"^",
"k",
";",
"hash",
"=",
"(",
"hash",
"<<",
"r2",
")",
"|",
"(",
"hash",
">",
">",
">",
"(",
"32",
"-",
"r2",
")",
")",
";",
"hash",
"=",
"hash",
"*",
"m",
"+",
"n",
";",
"return",
"hash",
";",
"}"
] |
public static int Update(int hash, int value){int c1 = unchecked((int)(0xCC9E2D51));int c2 = unchecked((int)(0x1B873593));int r1 = 15;int r2 = 13;int m = 5;int n = unchecked((int)(0xE6546B64));int k = value;k = k * c1;k = (k << r1) | ((int)(((uint)k) >> (32 - r1)));k = k * c2;hash = hash ^ k;hash = (hash << r2) | ((int)(((uint)hash) >> (32 - r2)));hash = hash * m + n;return hash;}
|
train
| false
|
1,068
|
public void serialize(LittleEndianOutput out) {out.writeShort(getHorizontalHold());out.writeShort(getVerticalHold());out.writeShort(getWidth());out.writeShort(getHeight());out.writeShort(getOptions());out.writeShort(getActiveSheetIndex());out.writeShort(getFirstVisibleTab());out.writeShort(getNumSelectedTabs());out.writeShort(getTabWidthRatio());}
|
[
"public",
"void",
"serialize",
"(",
"LittleEndianOutput",
"out",
")",
"{",
"out",
".",
"writeShort",
"(",
"getHorizontalHold",
"(",
")",
")",
";",
"out",
".",
"writeShort",
"(",
"getVerticalHold",
"(",
")",
")",
";",
"out",
".",
"writeShort",
"(",
"getWidth",
"(",
")",
")",
";",
"out",
".",
"writeShort",
"(",
"getHeight",
"(",
")",
")",
";",
"out",
".",
"writeShort",
"(",
"getOptions",
"(",
")",
")",
";",
"out",
".",
"writeShort",
"(",
"getActiveSheetIndex",
"(",
")",
")",
";",
"out",
".",
"writeShort",
"(",
"getFirstVisibleTab",
"(",
")",
")",
";",
"out",
".",
"writeShort",
"(",
"getNumSelectedTabs",
"(",
")",
")",
";",
"out",
".",
"writeShort",
"(",
"getTabWidthRatio",
"(",
")",
")",
";",
"}"
] |
public override void Serialize(ILittleEndianOutput out1){out1.WriteShort(HorizontalHold);out1.WriteShort(VerticalHold);out1.WriteShort(Width);out1.WriteShort(Height);out1.WriteShort(Options);out1.WriteShort(ActiveSheetIndex);out1.WriteShort(FirstVisibleTab);out1.WriteShort(NumSelectedTabs);out1.WriteShort(TabWidthRatio);}
|
train
| false
|
1,069
|
public boolean lessThan(ShardRef first, ShardRef second) {assert first != second;final FieldDoc firstFD = (FieldDoc) shardHits[first.shardIndex][first.hitIndex];final FieldDoc secondFD = (FieldDoc) shardHits[second.shardIndex][second.hitIndex];for(int compIDX=0;compIDX<comparators.length;compIDX++) {final FieldComparator comp = comparators[compIDX];final int cmp = reverseMul[compIDX] * comp.compareValues(firstFD.fields[compIDX], secondFD.fields[compIDX]);if (cmp != 0) {return cmp < 0;}}return tieBreakLessThan(first, firstFD, second, secondFD, tieBreaker);}
|
[
"public",
"boolean",
"lessThan",
"(",
"ShardRef",
"first",
",",
"ShardRef",
"second",
")",
"{",
"assert",
"first",
"!=",
"second",
";",
"final",
"FieldDoc",
"firstFD",
"=",
"(",
"FieldDoc",
")",
"shardHits",
"[",
"first",
".",
"shardIndex",
"]",
"[",
"first",
".",
"hitIndex",
"]",
";",
"final",
"FieldDoc",
"secondFD",
"=",
"(",
"FieldDoc",
")",
"shardHits",
"[",
"second",
".",
"shardIndex",
"]",
"[",
"second",
".",
"hitIndex",
"]",
";",
"for",
"(",
"int",
"compIDX",
"=",
"0",
";",
"compIDX",
"<",
"comparators",
".",
"length",
";",
"compIDX",
"++",
")",
"{",
"final",
"FieldComparator",
"comp",
"=",
"comparators",
"[",
"compIDX",
"]",
";",
"final",
"int",
"cmp",
"=",
"reverseMul",
"[",
"compIDX",
"]",
"*",
"comp",
".",
"compareValues",
"(",
"firstFD",
".",
"fields",
"[",
"compIDX",
"]",
",",
"secondFD",
".",
"fields",
"[",
"compIDX",
"]",
")",
";",
"if",
"(",
"cmp",
"!=",
"0",
")",
"{",
"return",
"cmp",
"<",
"0",
";",
"}",
"}",
"return",
"tieBreakLessThan",
"(",
"first",
",",
"firstFD",
",",
"second",
",",
"secondFD",
",",
"tieBreaker",
")",
";",
"}"
] |
protected internal override bool LessThan(ShardRef first, ShardRef second){Debug.Assert(first != second);FieldDoc firstFD = (FieldDoc)shardHits[first.ShardIndex][first.HitIndex];FieldDoc secondFD = (FieldDoc)shardHits[second.ShardIndex][second.HitIndex];for (int compIDX = 0; compIDX < comparers.Length; compIDX++){FieldComparer comp = comparers[compIDX];int cmp = reverseMul[compIDX] * comp.CompareValues(firstFD.Fields[compIDX], secondFD.Fields[compIDX]);if (cmp != 0){return cmp < 0;}}if (first.ShardIndex < second.ShardIndex){return true;}else if (first.ShardIndex > second.ShardIndex){return false;}else{Debug.Assert(first.HitIndex != second.HitIndex);return first.HitIndex < second.HitIndex;}}
|
train
| false
|
1,070
|
public static int UTF8toUTF16(BytesRef bytesRef, char[] chars) {return UTF8toUTF16(bytesRef.bytes, bytesRef.offset, bytesRef.length, chars);}
|
[
"public",
"static",
"int",
"UTF8toUTF16",
"(",
"BytesRef",
"bytesRef",
",",
"char",
"[",
"]",
"chars",
")",
"{",
"return",
"UTF8toUTF16",
"(",
"bytesRef",
".",
"bytes",
",",
"bytesRef",
".",
"offset",
",",
"bytesRef",
".",
"length",
",",
"chars",
")",
";",
"}"
] |
public static void UTF8toUTF16(BytesRef bytesRef, CharsRef chars){UTF8toUTF16(bytesRef.Bytes, bytesRef.Offset, bytesRef.Length, chars);}
|
train
| false
|
1,072
|
public DataValidationConstraint createCustomConstraint(String formula) {return DVConstraint.createCustomFormulaConstraint(formula);}
|
[
"public",
"DataValidationConstraint",
"createCustomConstraint",
"(",
"String",
"formula",
")",
"{",
"return",
"DVConstraint",
".",
"createCustomFormulaConstraint",
"(",
"formula",
")",
";",
"}"
] |
public IDataValidationConstraint CreateCustomConstraint(String formula){return DVConstraint.CreateCustomFormulaConstraint(formula);}
|
train
| false
|
1,074
|
public DescribeLoadBalancerPolicyTypesResult describeLoadBalancerPolicyTypes() {return describeLoadBalancerPolicyTypes(new DescribeLoadBalancerPolicyTypesRequest());}
|
[
"public",
"DescribeLoadBalancerPolicyTypesResult",
"describeLoadBalancerPolicyTypes",
"(",
")",
"{",
"return",
"describeLoadBalancerPolicyTypes",
"(",
"new",
"DescribeLoadBalancerPolicyTypesRequest",
"(",
")",
")",
";",
"}"
] |
public virtual DescribeLoadBalancerPolicyTypesResponse DescribeLoadBalancerPolicyTypes(){return DescribeLoadBalancerPolicyTypes(new DescribeLoadBalancerPolicyTypesRequest());}
|
train
| false
|
1,075
|
public NIOFSIndexInput clone() {NIOFSIndexInput clone = (NIOFSIndexInput)super.clone();clone.isClone = true;return clone;}
|
[
"public",
"NIOFSIndexInput",
"clone",
"(",
")",
"{",
"NIOFSIndexInput",
"clone",
"=",
"(",
"NIOFSIndexInput",
")",
"super",
".",
"clone",
"(",
")",
";",
"clone",
".",
"isClone",
"=",
"true",
";",
"return",
"clone",
";",
"}"
] |
public override object Clone(){NIOFSIndexInput clone = (NIOFSIndexInput)base.Clone();clone.isClone = true;return clone;}
|
train
| false
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.