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 |
|---|---|---|---|---|---|
2,875
|
public LexerCustomAction(int ruleIndex, int actionIndex) {this.ruleIndex = ruleIndex;this.actionIndex = actionIndex;}
|
[
"public",
"LexerCustomAction",
"(",
"int",
"ruleIndex",
",",
"int",
"actionIndex",
")",
"{",
"this",
".",
"ruleIndex",
"=",
"ruleIndex",
";",
"this",
".",
"actionIndex",
"=",
"actionIndex",
";",
"}"
] |
public LexerCustomAction(int ruleIndex, int actionIndex){this.ruleIndex = ruleIndex;this.actionIndex = actionIndex;}
|
train
| false
|
2,876
|
public DescribeDevicePolicyConfigurationResult describeDevicePolicyConfiguration(DescribeDevicePolicyConfigurationRequest request) {request = beforeClientExecution(request);return executeDescribeDevicePolicyConfiguration(request);}
|
[
"public",
"DescribeDevicePolicyConfigurationResult",
"describeDevicePolicyConfiguration",
"(",
"DescribeDevicePolicyConfigurationRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeDevicePolicyConfiguration",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeDevicePolicyConfigurationResponse DescribeDevicePolicyConfiguration(DescribeDevicePolicyConfigurationRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeDevicePolicyConfigurationRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeDevicePolicyConfigurationResponseUnmarshaller.Instance;return Invoke<DescribeDevicePolicyConfigurationResponse>(request, options);}
|
train
| true
|
2,877
|
public CreateLBCookieStickinessPolicyRequest(String loadBalancerName, String policyName) {setLoadBalancerName(loadBalancerName);setPolicyName(policyName);}
|
[
"public",
"CreateLBCookieStickinessPolicyRequest",
"(",
"String",
"loadBalancerName",
",",
"String",
"policyName",
")",
"{",
"setLoadBalancerName",
"(",
"loadBalancerName",
")",
";",
"setPolicyName",
"(",
"policyName",
")",
";",
"}"
] |
public CreateLBCookieStickinessPolicyRequest(string loadBalancerName, string policyName){_loadBalancerName = loadBalancerName;_policyName = policyName;}
|
train
| false
|
2,879
|
public static AttrPtg createSpace(int type, int count) {int data = type & 0x00FF | (count << 8) & 0x00FFFF;return new AttrPtg(space.set(0), data, null, -1);}
|
[
"public",
"static",
"AttrPtg",
"createSpace",
"(",
"int",
"type",
",",
"int",
"count",
")",
"{",
"int",
"data",
"=",
"type",
"&",
"0x00FF",
"|",
"(",
"count",
"<<",
"8",
")",
"&",
"0x00FFFF",
";",
"return",
"new",
"AttrPtg",
"(",
"space",
".",
"set",
"(",
"0",
")",
",",
"data",
",",
"null",
",",
"-",
"1",
")",
";",
"}"
] |
public static AttrPtg CreateSpace(SpaceType type, int count){int data = ((int) type) & 0x00FF | (count << 8) & 0x00FFFF;return new AttrPtg(space.Set(0), data, null, -1);}
|
train
| false
|
2,880
|
public boolean equals(Object o) {return (o instanceof FontRecord) && sameProperties((FontRecord) o);}
|
[
"public",
"boolean",
"equals",
"(",
"Object",
"o",
")",
"{",
"return",
"(",
"o",
"instanceof",
"FontRecord",
")",
"&&",
"sameProperties",
"(",
"(",
"FontRecord",
")",
"o",
")",
";",
"}"
] |
public override bool Equals(Object obj){if (this == obj)return true;return false;}
|
train
| false
|
2,881
|
public void setDSTSavings(int milliseconds) {if (milliseconds > 0) {dstSavings = milliseconds;} else {throw new IllegalArgumentException();}}
|
[
"public",
"void",
"setDSTSavings",
"(",
"int",
"milliseconds",
")",
"{",
"if",
"(",
"milliseconds",
">",
"0",
")",
"{",
"dstSavings",
"=",
"milliseconds",
";",
"}",
"else",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"}"
] |
public virtual void setDSTSavings(int milliseconds){throw new System.NotImplementedException();}
|
train
| false
|
2,882
|
public DescribeAccountResult describeAccount(DescribeAccountRequest request) {request = beforeClientExecution(request);return executeDescribeAccount(request);}
|
[
"public",
"DescribeAccountResult",
"describeAccount",
"(",
"DescribeAccountRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeAccount",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeAccountResponse DescribeAccount(DescribeAccountRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeAccountRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeAccountResponseUnmarshaller.Instance;return Invoke<DescribeAccountResponse>(request, options);}
|
train
| true
|
2,883
|
public int getCellsVal() {int size = 0;for (Row row : rows)size += row.getCellsVal();return size;}
|
[
"public",
"int",
"getCellsVal",
"(",
")",
"{",
"int",
"size",
"=",
"0",
";",
"for",
"(",
"Row",
"row",
":",
"rows",
")",
"size",
"+=",
"row",
".",
"getCellsVal",
"(",
")",
";",
"return",
"size",
";",
"}"
] |
public virtual int GetCellsVal(){int size = 0;foreach (Row row in rows)size += row.GetCellsVal();return size;}
|
train
| false
|
2,884
|
public boolean equalsSameType(Object other) {assert exists || (false == value);MutableValueBool b = (MutableValueBool)other;return value == b.value && exists == b.exists;}
|
[
"public",
"boolean",
"equalsSameType",
"(",
"Object",
"other",
")",
"{",
"assert",
"exists",
"||",
"(",
"false",
"==",
"value",
")",
";",
"MutableValueBool",
"b",
"=",
"(",
"MutableValueBool",
")",
"other",
";",
"return",
"value",
"==",
"b",
".",
"value",
"&&",
"exists",
"==",
"b",
".",
"exists",
";",
"}"
] |
public override bool EqualsSameType(object other){MutableValueBool b = (MutableValueBool)other;return Value == b.Value && Exists == b.Exists;}
|
train
| false
|
2,885
|
public K next() {Node<K,V> n = next;advance();return n.key;}
|
[
"public",
"K",
"next",
"(",
")",
"{",
"Node",
"<",
"K",
",",
"V",
">",
"n",
"=",
"next",
";",
"advance",
"(",
")",
";",
"return",
"n",
".",
"key",
";",
"}"
] |
public override K next(){return this.nextEntry().key;}
|
train
| false
|
2,886
|
public DBCluster createDBCluster(CreateDBClusterRequest request) {request = beforeClientExecution(request);return executeCreateDBCluster(request);}
|
[
"public",
"DBCluster",
"createDBCluster",
"(",
"CreateDBClusterRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCreateDBCluster",
"(",
"request",
")",
";",
"}"
] |
public virtual CreateDBClusterResponse CreateDBCluster(CreateDBClusterRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateDBClusterRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateDBClusterResponseUnmarshaller.Instance;return Invoke<CreateDBClusterResponse>(request, options);}
|
train
| true
|
2,887
|
public boolean equals(Object o) {if (!(o instanceof FormatRun)) {return false;}FormatRun other = (FormatRun) o;return _character == other._character && _fontIndex == other._fontIndex;}
|
[
"public",
"boolean",
"equals",
"(",
"Object",
"o",
")",
"{",
"if",
"(",
"!",
"(",
"o",
"instanceof",
"FormatRun",
")",
")",
"{",
"return",
"false",
";",
"}",
"FormatRun",
"other",
"=",
"(",
"FormatRun",
")",
"o",
";",
"return",
"_character",
"==",
"other",
".",
"_character",
"&&",
"_fontIndex",
"==",
"other",
".",
"_fontIndex",
";",
"}"
] |
public override bool Equals(Object o){if (!(o is FormatRun)){return false;}FormatRun other = (FormatRun)o;return _character == other._character && _fontIndex == other._fontIndex;}
|
train
| false
|
2,888
|
public static ValueEval getSingleValue(ValueEval arg, int srcCellRow, int srcCellCol)throws EvaluationException {final ValueEval result;if (arg instanceof RefEval) {result = chooseSingleElementFromRef((RefEval) arg);} else if (arg instanceof AreaEval) {result = chooseSingleElementFromArea((AreaEval) arg, srcCellRow, srcCellCol);} else {result = arg;}if (result instanceof ErrorEval) {throw new EvaluationException((ErrorEval) result);}return result;}
|
[
"public",
"static",
"ValueEval",
"getSingleValue",
"(",
"ValueEval",
"arg",
",",
"int",
"srcCellRow",
",",
"int",
"srcCellCol",
")",
"throws",
"EvaluationException",
"{",
"final",
"ValueEval",
"result",
";",
"if",
"(",
"arg",
"instanceof",
"RefEval",
")",
"{",
"result",
"=",
"chooseSingleElementFromRef",
"(",
"(",
"RefEval",
")",
"arg",
")",
";",
"}",
"else",
"if",
"(",
"arg",
"instanceof",
"AreaEval",
")",
"{",
"result",
"=",
"chooseSingleElementFromArea",
"(",
"(",
"AreaEval",
")",
"arg",
",",
"srcCellRow",
",",
"srcCellCol",
")",
";",
"}",
"else",
"{",
"result",
"=",
"arg",
";",
"}",
"if",
"(",
"result",
"instanceof",
"ErrorEval",
")",
"{",
"throw",
"new",
"EvaluationException",
"(",
"(",
"ErrorEval",
")",
"result",
")",
";",
"}",
"return",
"result",
";",
"}"
] |
public static ValueEval GetSingleValue(ValueEval arg, int srcCellRow, int srcCellCol){ValueEval result;if (arg is RefEval){result = ChooseSingleElementFromRef((RefEval)arg);}else if (arg is AreaEval){result = ChooseSingleElementFromArea((AreaEval)arg, srcCellRow, srcCellCol);}else{result = arg;}if (result is ErrorEval){throw new EvaluationException((ErrorEval)result);}return result;}
|
train
| false
|
2,889
|
public GermanStemFilterFactory(Map<String,String> args) {super(args);if (!args.isEmpty()) {throw new IllegalArgumentException("Unknown parameters: " + args);}}
|
[
"public",
"GermanStemFilterFactory",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"args",
")",
"{",
"super",
"(",
"args",
")",
";",
"if",
"(",
"!",
"args",
".",
"isEmpty",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Unknown parameters: \"",
"+",
"args",
")",
";",
"}",
"}"
] |
public GermanStemFilterFactory(IDictionary<string, string> args): base(args){if (args.Count > 0){throw new System.ArgumentException("Unknown parameters: " + args);}}
|
train
| false
|
2,890
|
public ClusterSubnetGroup modifyClusterSubnetGroup(ModifyClusterSubnetGroupRequest request) {request = beforeClientExecution(request);return executeModifyClusterSubnetGroup(request);}
|
[
"public",
"ClusterSubnetGroup",
"modifyClusterSubnetGroup",
"(",
"ModifyClusterSubnetGroupRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeModifyClusterSubnetGroup",
"(",
"request",
")",
";",
"}"
] |
public virtual ModifyClusterSubnetGroupResponse ModifyClusterSubnetGroup(ModifyClusterSubnetGroupRequest request){var options = new InvokeOptions();options.RequestMarshaller = ModifyClusterSubnetGroupRequestMarshaller.Instance;options.ResponseUnmarshaller = ModifyClusterSubnetGroupResponseUnmarshaller.Instance;return Invoke<ModifyClusterSubnetGroupResponse>(request, options);}
|
train
| true
|
2,891
|
public FacetLabel subpath(final int length) {if (length >= this.length || length < 0) {return this;} else {return new FacetLabel(this, length);}}
|
[
"public",
"FacetLabel",
"subpath",
"(",
"final",
"int",
"length",
")",
"{",
"if",
"(",
"length",
">=",
"this",
".",
"length",
"||",
"length",
"<",
"0",
")",
"{",
"return",
"this",
";",
"}",
"else",
"{",
"return",
"new",
"FacetLabel",
"(",
"this",
",",
"length",
")",
";",
"}",
"}"
] |
public virtual FacetLabel Subpath(int length){if (length >= this.Length || length < 0){return this;}else{return new FacetLabel(this, length);}}
|
train
| false
|
2,892
|
public DataValidationConstraint createDecimalConstraint(int operatorType, String formula1, String formula2) {return DVConstraint.createNumericConstraint(ValidationType.DECIMAL, operatorType, formula1, formula2);}
|
[
"public",
"DataValidationConstraint",
"createDecimalConstraint",
"(",
"int",
"operatorType",
",",
"String",
"formula1",
",",
"String",
"formula2",
")",
"{",
"return",
"DVConstraint",
".",
"createNumericConstraint",
"(",
"ValidationType",
".",
"DECIMAL",
",",
"operatorType",
",",
"formula1",
",",
"formula2",
")",
";",
"}"
] |
public IDataValidationConstraint CreateDecimalConstraint(int operatorType, String formula1, String formula2){return DVConstraint.CreateNumericConstraint(ValidationType.DECIMAL, operatorType, formula1, formula2);}
|
train
| false
|
2,893
|
public ByteBuffer put(byte b) {if (position == limit) {throw new BufferOverflowException();}backingArray[offset + position++] = b;return this;}
|
[
"public",
"ByteBuffer",
"put",
"(",
"byte",
"b",
")",
"{",
"if",
"(",
"position",
"==",
"limit",
")",
"{",
"throw",
"new",
"BufferOverflowException",
"(",
")",
";",
"}",
"backingArray",
"[",
"offset",
"+",
"position",
"++",
"]",
"=",
"b",
";",
"return",
"this",
";",
"}"
] |
public override java.nio.ByteBuffer put(byte b){if (_position == _limit){throw new java.nio.BufferOverflowException();}backingArray[offset + _position++] = b;return this;}
|
train
| false
|
2,894
|
public DescribeUserProfileResult describeUserProfile(DescribeUserProfileRequest request) {request = beforeClientExecution(request);return executeDescribeUserProfile(request);}
|
[
"public",
"DescribeUserProfileResult",
"describeUserProfile",
"(",
"DescribeUserProfileRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeUserProfile",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeUserProfileResponse DescribeUserProfile(DescribeUserProfileRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeUserProfileRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeUserProfileResponseUnmarshaller.Instance;return Invoke<DescribeUserProfileResponse>(request, options);}
|
train
| true
|
2,895
|
public K firstKey() {Entry<K, V> entry = endpoint(true);if (entry == null) {throw new NoSuchElementException();}return entry.getKey();}
|
[
"public",
"K",
"firstKey",
"(",
")",
"{",
"Entry",
"<",
"K",
",",
"V",
">",
"entry",
"=",
"endpoint",
"(",
"true",
")",
";",
"if",
"(",
"entry",
"==",
"null",
")",
"{",
"throw",
"new",
"NoSuchElementException",
"(",
")",
";",
"}",
"return",
"entry",
".",
"getKey",
"(",
")",
";",
"}"
] |
public K firstKey(){java.util.MapClass.Entry<K, V> entry = this.endpoint(true);if (entry == null){throw new java.util.NoSuchElementException();}return entry.getKey();}
|
train
| false
|
2,896
|
public DescribeAutoScalingGroupsResult describeAutoScalingGroups(DescribeAutoScalingGroupsRequest request) {request = beforeClientExecution(request);return executeDescribeAutoScalingGroups(request);}
|
[
"public",
"DescribeAutoScalingGroupsResult",
"describeAutoScalingGroups",
"(",
"DescribeAutoScalingGroupsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeAutoScalingGroups",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeAutoScalingGroupsResponse DescribeAutoScalingGroups(DescribeAutoScalingGroupsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeAutoScalingGroupsRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeAutoScalingGroupsResponseUnmarshaller.Instance;return Invoke<DescribeAutoScalingGroupsResponse>(request, options);}
|
train
| true
|
2,897
|
public Class<RefsChangedListener> getListenerType() {return RefsChangedListener.class;}
|
[
"public",
"Class",
"<",
"RefsChangedListener",
">",
"getListenerType",
"(",
")",
"{",
"return",
"RefsChangedListener",
".",
"class",
";",
"}"
] |
public override Type GetListenerType(){return typeof(RefsChangedListener);}
|
train
| false
|
2,898
|
public int getWordCost(int wordId) {return WORD_COST;}
|
[
"public",
"int",
"getWordCost",
"(",
"int",
"wordId",
")",
"{",
"return",
"WORD_COST",
";",
"}"
] |
public int GetWordCost(int wordId){return WORD_COST;}
|
train
| false
|
2,899
|
public void serialize(LittleEndianOutput out) {out.writeByte(field_1_horizontalAlignment);out.writeByte(field_2_verticalAlignment);out.writeShort(field_3_displayMode);out.writeInt(field_4_rgbColor);out.writeInt(field_5_x);out.writeInt(field_6_y);out.writeInt(field_7_width);out.writeInt(field_8_height);out.writeShort(field_9_options1);out.writeShort(field_10_indexOfColorValue);out.writeShort(field_11_options2);out.writeShort(field_12_textRotation);}
|
[
"public",
"void",
"serialize",
"(",
"LittleEndianOutput",
"out",
")",
"{",
"out",
".",
"writeByte",
"(",
"field_1_horizontalAlignment",
")",
";",
"out",
".",
"writeByte",
"(",
"field_2_verticalAlignment",
")",
";",
"out",
".",
"writeShort",
"(",
"field_3_displayMode",
")",
";",
"out",
".",
"writeInt",
"(",
"field_4_rgbColor",
")",
";",
"out",
".",
"writeInt",
"(",
"field_5_x",
")",
";",
"out",
".",
"writeInt",
"(",
"field_6_y",
")",
";",
"out",
".",
"writeInt",
"(",
"field_7_width",
")",
";",
"out",
".",
"writeInt",
"(",
"field_8_height",
")",
";",
"out",
".",
"writeShort",
"(",
"field_9_options1",
")",
";",
"out",
".",
"writeShort",
"(",
"field_10_indexOfColorValue",
")",
";",
"out",
".",
"writeShort",
"(",
"field_11_options2",
")",
";",
"out",
".",
"writeShort",
"(",
"field_12_textRotation",
")",
";",
"}"
] |
public override void Serialize(ILittleEndianOutput out1){out1.WriteByte(field_1_horizontalAlignment);out1.WriteByte(field_2_verticalAlignment);out1.WriteShort(field_3_DisplayMode);out1.WriteInt(field_4_rgbColor);out1.WriteInt(field_5_x);out1.WriteInt(field_6_y);out1.WriteInt(field_7_width);out1.WriteInt(field_8_height);out1.WriteShort(field_9_options1);out1.WriteShort(field_10_IndexOfColorValue);out1.WriteShort(field_11_options2);out1.WriteShort(field_12_textRotation);}
|
train
| false
|
2,900
|
public LinkedDataRecord getDataCategoryLabels(){return dataCategoryLabels;}
|
[
"public",
"LinkedDataRecord",
"getDataCategoryLabels",
"(",
")",
"{",
"return",
"dataCategoryLabels",
";",
"}"
] |
public BRAIRecord GetDataCategoryLabels(){return dataCategoryLabels;}
|
train
| false
|
2,901
|
public void setStringValue(String value) {collator.getRawCollationKey(value, key);bytes.bytes = key.bytes;bytes.offset = 0;bytes.length = key.size;}
|
[
"public",
"void",
"setStringValue",
"(",
"String",
"value",
")",
"{",
"collator",
".",
"getRawCollationKey",
"(",
"value",
",",
"key",
")",
";",
"bytes",
".",
"bytes",
"=",
"key",
".",
"bytes",
";",
"bytes",
".",
"offset",
"=",
"0",
";",
"bytes",
".",
"length",
"=",
"key",
".",
"size",
";",
"}"
] |
public override void SetStringValue(string value){key = collator.GetRawCollationKey(value, key);bytes.Bytes = key.Bytes;bytes.Offset = 0;bytes.Length = key.Length;}
|
train
| false
|
2,903
|
public static long gcd(long a, long b) {a = Math.abs(a);b = Math.abs(b);if (a == 0) {return b;} else if (b == 0) {return a;}final int commonTrailingZeros = Long.numberOfTrailingZeros(a | b);a >>>= Long.numberOfTrailingZeros(a);while (true) {b >>>= Long.numberOfTrailingZeros(b);if (a == b) {break;} else if (a > b || a == Long.MIN_VALUE) { final long tmp = a;a = b;b = tmp;}if (a == 1) {break;}b -= a;}return a << commonTrailingZeros;}
|
[
"public",
"static",
"long",
"gcd",
"(",
"long",
"a",
",",
"long",
"b",
")",
"{",
"a",
"=",
"Math",
".",
"abs",
"(",
"a",
")",
";",
"b",
"=",
"Math",
".",
"abs",
"(",
"b",
")",
";",
"if",
"(",
"a",
"==",
"0",
")",
"{",
"return",
"b",
";",
"}",
"else",
"if",
"(",
"b",
"==",
"0",
")",
"{",
"return",
"a",
";",
"}",
"final",
"int",
"commonTrailingZeros",
"=",
"Long",
".",
"numberOfTrailingZeros",
"(",
"a",
"|",
"b",
")",
";",
"a",
">>>=",
"Long",
".",
"numberOfTrailingZeros",
"(",
"a",
")",
";",
"while",
"(",
"true",
")",
"{",
"b",
">>>=",
"Long",
".",
"numberOfTrailingZeros",
"(",
"b",
")",
";",
"if",
"(",
"a",
"==",
"b",
")",
"{",
"break",
";",
"}",
"else",
"if",
"(",
"a",
">",
"b",
"||",
"a",
"==",
"Long",
".",
"MIN_VALUE",
")",
"{",
"final",
"long",
"tmp",
"=",
"a",
";",
"a",
"=",
"b",
";",
"b",
"=",
"tmp",
";",
"}",
"if",
"(",
"a",
"==",
"1",
")",
"{",
"break",
";",
"}",
"b",
"-=",
"a",
";",
"}",
"return",
"a",
"<<",
"commonTrailingZeros",
";",
"}"
] |
public static long Gcd(long a, long b){a = a < 0 ? -a : a;b = b < 0 ? -b : b;if (a == 0){return b;}else if (b == 0){return a;}int commonTrailingZeros = (a | b).TrailingZeroCount();a = (long)((ulong)a >> a.TrailingZeroCount());while (true){b = (long)((ulong)b >> b.TrailingZeroCount());if (a == b){break;} else if (a > b || a == long.MinValue){long tmp = a;a = b;b = tmp;}if (a == 1){break;}b -= a;}return a << commonTrailingZeros;}
|
train
| false
|
2,906
|
public CreateLoadBalancerTlsCertificateResult createLoadBalancerTlsCertificate(CreateLoadBalancerTlsCertificateRequest request) {request = beforeClientExecution(request);return executeCreateLoadBalancerTlsCertificate(request);}
|
[
"public",
"CreateLoadBalancerTlsCertificateResult",
"createLoadBalancerTlsCertificate",
"(",
"CreateLoadBalancerTlsCertificateRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCreateLoadBalancerTlsCertificate",
"(",
"request",
")",
";",
"}"
] |
public virtual CreateLoadBalancerTlsCertificateResponse CreateLoadBalancerTlsCertificate(CreateLoadBalancerTlsCertificateRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateLoadBalancerTlsCertificateRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateLoadBalancerTlsCertificateResponseUnmarshaller.Instance;return Invoke<CreateLoadBalancerTlsCertificateResponse>(request, options);}
|
train
| true
|
2,907
|
public GetDocumentationPartsResult getDocumentationParts(GetDocumentationPartsRequest request) {request = beforeClientExecution(request);return executeGetDocumentationParts(request);}
|
[
"public",
"GetDocumentationPartsResult",
"getDocumentationParts",
"(",
"GetDocumentationPartsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetDocumentationParts",
"(",
"request",
")",
";",
"}"
] |
public virtual GetDocumentationPartsResponse GetDocumentationParts(GetDocumentationPartsRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetDocumentationPartsRequestMarshaller.Instance;options.ResponseUnmarshaller = GetDocumentationPartsResponseUnmarshaller.Instance;return Invoke<GetDocumentationPartsResponse>(request, options);}
|
train
| true
|
2,908
|
public Iterator<RevFlag> iterator() {final Iterator<RevFlag> i = active.iterator();return new Iterator<RevFlag>();}
|
[
"public",
"Iterator",
"<",
"RevFlag",
">",
"iterator",
"(",
")",
"{",
"final",
"Iterator",
"<",
"RevFlag",
">",
"i",
"=",
"active",
".",
"iterator",
"(",
")",
";",
"return",
"new",
"Iterator",
"<",
"RevFlag",
">",
"(",
")",
";",
"}"
] |
public override Sharpen.Iterator<RevFlag> Iterator(){Sharpen.Iterator<RevFlag> i = active.Iterator();return new _Iterator_132(this, i);}
|
train
| false
|
2,909
|
public boolean equals(Object o) {if (this == o) return true;if (!(o instanceof Sort)) return false;final Sort other = (Sort)o;return Arrays.equals(this.fields, other.fields);}
|
[
"public",
"boolean",
"equals",
"(",
"Object",
"o",
")",
"{",
"if",
"(",
"this",
"==",
"o",
")",
"return",
"true",
";",
"if",
"(",
"!",
"(",
"o",
"instanceof",
"Sort",
")",
")",
"return",
"false",
";",
"final",
"Sort",
"other",
"=",
"(",
"Sort",
")",
"o",
";",
"return",
"Arrays",
".",
"equals",
"(",
"this",
".",
"fields",
",",
"other",
".",
"fields",
")",
";",
"}"
] |
public override bool Equals(object o){if (this == o){return true;}if (!(o is Sort)){return false;}Sort other = (Sort)o;return Arrays.Equals(this.fields, other.fields);}
|
train
| false
|
2,910
|
public boolean equals(final Object o){boolean rval = false;if ((o != null) && (o.getClass() == this.getClass())){if (this == o){rval = true;}else{POIFSDocumentPath path = ( POIFSDocumentPath ) o;if (path.components.length == this.components.length){rval = true;for (int j = 0; j < this.components.length; j++){if (!path.components[ j ].equals(this.components[ j ])){rval = false;break;}}}}}return rval;}
|
[
"public",
"boolean",
"equals",
"(",
"final",
"Object",
"o",
")",
"{",
"boolean",
"rval",
"=",
"false",
";",
"if",
"(",
"(",
"o",
"!=",
"null",
")",
"&&",
"(",
"o",
".",
"getClass",
"(",
")",
"==",
"this",
".",
"getClass",
"(",
")",
")",
")",
"{",
"if",
"(",
"this",
"==",
"o",
")",
"{",
"rval",
"=",
"true",
";",
"}",
"else",
"{",
"POIFSDocumentPath",
"path",
"=",
"(",
"POIFSDocumentPath",
")",
"o",
";",
"if",
"(",
"path",
".",
"components",
".",
"length",
"==",
"this",
".",
"components",
".",
"length",
")",
"{",
"rval",
"=",
"true",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"this",
".",
"components",
".",
"length",
";",
"j",
"++",
")",
"{",
"if",
"(",
"!",
"path",
".",
"components",
"[",
"j",
"]",
".",
"equals",
"(",
"this",
".",
"components",
"[",
"j",
"]",
")",
")",
"{",
"rval",
"=",
"false",
";",
"break",
";",
"}",
"}",
"}",
"}",
"}",
"return",
"rval",
";",
"}"
] |
public override bool Equals(object o){bool flag = false;if ((o != null) && (o.GetType() == this.GetType())){if (this == o){flag = true;}else{POIFSDocumentPath path = (POIFSDocumentPath)o;if (path.components.Length == this.components.Length){flag = true;for (int i = 0; i < this.components.Length; i++){if (!path.components[i].Equals(this.components[i])){flag = false;break;}}}}}return flag;}
|
train
| false
|
2,911
|
public SearchImageRequest() {super("ImageSearch", "2019-03-25", "SearchImage", "imagesearch");setUriPattern("/v2/image/search");setMethod(MethodType.POST);}
|
[
"public",
"SearchImageRequest",
"(",
")",
"{",
"super",
"(",
"\"ImageSearch\"",
",",
"\"2019-03-25\"",
",",
"\"SearchImage\"",
",",
"\"imagesearch\"",
")",
";",
"setUriPattern",
"(",
"\"/v2/image/search\"",
")",
";",
"setMethod",
"(",
"MethodType",
".",
"POST",
")",
";",
"}"
] |
public SearchImageRequest(): base("ImageSearch", "2019-03-25", "SearchImage", "imagesearch", "openAPI"){UriPattern = "/v2/image/search";Method = MethodType.POST;}
|
train
| false
|
2,912
|
public RevFlagSet() {active = new ArrayList<>();}
|
[
"public",
"RevFlagSet",
"(",
")",
"{",
"active",
"=",
"new",
"ArrayList",
"<",
">",
"(",
")",
";",
"}"
] |
public RevFlagSet(){active = new AList<RevFlag>();}
|
train
| false
|
2,913
|
public BatchDisassociateUserStackResult batchDisassociateUserStack(BatchDisassociateUserStackRequest request) {request = beforeClientExecution(request);return executeBatchDisassociateUserStack(request);}
|
[
"public",
"BatchDisassociateUserStackResult",
"batchDisassociateUserStack",
"(",
"BatchDisassociateUserStackRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeBatchDisassociateUserStack",
"(",
"request",
")",
";",
"}"
] |
public virtual BatchDisassociateUserStackResponse BatchDisassociateUserStack(BatchDisassociateUserStackRequest request){var options = new InvokeOptions();options.RequestMarshaller = BatchDisassociateUserStackRequestMarshaller.Instance;options.ResponseUnmarshaller = BatchDisassociateUserStackResponseUnmarshaller.Instance;return Invoke<BatchDisassociateUserStackResponse>(request, options);}
|
train
| true
|
2,914
|
public FloatBuffer get(float[] dst) {return get(dst, 0, dst.length);}
|
[
"public",
"FloatBuffer",
"get",
"(",
"float",
"[",
"]",
"dst",
")",
"{",
"return",
"get",
"(",
"dst",
",",
"0",
",",
"dst",
".",
"length",
")",
";",
"}"
] |
public virtual java.nio.FloatBuffer get(float[] dst){return get(dst, 0, dst.Length);}
|
train
| false
|
2,915
|
public String toString(){StringBuilder buffer = new StringBuilder();buffer.append("[ftEnd]\n");buffer.append("[/ftEnd]\n");return buffer.toString();}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuilder",
"buffer",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"\"[ftEnd]\\n\"",
")",
";",
"buffer",
".",
"append",
"(",
"\"[/ftEnd]\\n\"",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}"
] |
public override String ToString(){StringBuilder buffer = new StringBuilder();buffer.Append("[ftEnd]\n");buffer.Append("[/ftEnd]\n");return buffer.ToString();}
|
train
| false
|
2,916
|
public InputStreamDataInput(InputStream is) {this.is = is;}
|
[
"public",
"InputStreamDataInput",
"(",
"InputStream",
"is",
")",
"{",
"this",
".",
"is",
"=",
"is",
";",
"}"
] |
public InputStreamDataInput(Stream @is){this._reader = new BinaryReader(@is);}
|
train
| false
|
2,918
|
public void showMessage(String msg) {provider.get(uri, new CredentialItem.InformationalMessage(msg));}
|
[
"public",
"void",
"showMessage",
"(",
"String",
"msg",
")",
"{",
"provider",
".",
"get",
"(",
"uri",
",",
"new",
"CredentialItem",
".",
"InformationalMessage",
"(",
"msg",
")",
")",
";",
"}"
] |
public virtual void ShowMessage(string msg){provider.Get(uri, new CredentialItem.InformationalMessage(msg));}
|
train
| false
|
2,919
|
public DeregisterTypeResult deregisterType(DeregisterTypeRequest request) {request = beforeClientExecution(request);return executeDeregisterType(request);}
|
[
"public",
"DeregisterTypeResult",
"deregisterType",
"(",
"DeregisterTypeRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeregisterType",
"(",
"request",
")",
";",
"}"
] |
public virtual DeregisterTypeResponse DeregisterType(DeregisterTypeRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeregisterTypeRequestMarshaller.Instance;options.ResponseUnmarshaller = DeregisterTypeResponseUnmarshaller.Instance;return Invoke<DeregisterTypeResponse>(request, options);}
|
train
| false
|
2,921
|
public IntList(final IntList list){this(list._array.length);System.arraycopy(list._array, 0, _array, 0, _array.length);_limit = list._limit;}
|
[
"public",
"IntList",
"(",
"final",
"IntList",
"list",
")",
"{",
"this",
"(",
"list",
".",
"_array",
".",
"length",
")",
";",
"System",
".",
"arraycopy",
"(",
"list",
".",
"_array",
",",
"0",
",",
"_array",
",",
"0",
",",
"_array",
".",
"length",
")",
";",
"_limit",
"=",
"list",
".",
"_limit",
";",
"}"
] |
public IntList(IntList list): this(list._array.Length){Array.Copy(list._array, 0, _array, 0, _array.Length);_limit = list._limit;}
|
train
| false
|
2,922
|
public int convertFromExternSheetIndex(int externSheetIndex) {return _iBook.getFirstSheetIndexFromExternSheetIndex(externSheetIndex);}
|
[
"public",
"int",
"convertFromExternSheetIndex",
"(",
"int",
"externSheetIndex",
")",
"{",
"return",
"_iBook",
".",
"getFirstSheetIndexFromExternSheetIndex",
"(",
"externSheetIndex",
")",
";",
"}"
] |
public int ConvertFromExternSheetIndex(int externSheetIndex){return _iBook.GetFirstSheetIndexFromExternSheetIndex(externSheetIndex);}
|
train
| false
|
2,923
|
public ExternalSheet getExternalSheet(String firstSheetName, String lastSheetName, int externalWorkbookNumber) {throw new IllegalStateException("XSSF-style external references are not supported for HSSF");}
|
[
"public",
"ExternalSheet",
"getExternalSheet",
"(",
"String",
"firstSheetName",
",",
"String",
"lastSheetName",
",",
"int",
"externalWorkbookNumber",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"XSSF-style external references are not supported for HSSF\"",
")",
";",
"}"
] |
public ExternalSheet GetExternalSheet(String firstSheetName, string lastSheetName, int externalWorkbookNumber){throw new InvalidOperationException("XSSF-style external references are not supported for HSSF");}
|
train
| false
|
2,924
|
public CellRangeAddress8Bit copy() {return new CellRangeAddress8Bit(getFirstRow(), getLastRow(), getFirstColumn(), getLastColumn());}
|
[
"public",
"CellRangeAddress8Bit",
"copy",
"(",
")",
"{",
"return",
"new",
"CellRangeAddress8Bit",
"(",
"getFirstRow",
"(",
")",
",",
"getLastRow",
"(",
")",
",",
"getFirstColumn",
"(",
")",
",",
"getLastColumn",
"(",
")",
")",
";",
"}"
] |
public CellRangeAddress8Bit Copy(){return new CellRangeAddress8Bit(FirstRow, LastRow, FirstColumn, LastColumn);}
|
train
| false
|
2,925
|
public boolean equals(Object obj) {if (this == obj)return true;if (obj == null)return false;if (obj instanceof Document == false)return false;Document other = (Document) obj;if (other.getBytes() == null ^ this.getBytes() == null)return false;if (other.getBytes() != null && other.getBytes().equals(this.getBytes()) == false)return false;if (other.getS3Object() == null ^ this.getS3Object() == null)return false;if (other.getS3Object() != null && other.getS3Object().equals(this.getS3Object()) == false)return false;return true;}
|
[
"public",
"boolean",
"equals",
"(",
"Object",
"obj",
")",
"{",
"if",
"(",
"this",
"==",
"obj",
")",
"return",
"true",
";",
"if",
"(",
"obj",
"==",
"null",
")",
"return",
"false",
";",
"if",
"(",
"obj",
"instanceof",
"Document",
"==",
"false",
")",
"return",
"false",
";",
"Document",
"other",
"=",
"(",
"Document",
")",
"obj",
";",
"if",
"(",
"other",
".",
"getBytes",
"(",
")",
"==",
"null",
"^",
"this",
".",
"getBytes",
"(",
")",
"==",
"null",
")",
"return",
"false",
";",
"if",
"(",
"other",
".",
"getBytes",
"(",
")",
"!=",
"null",
"&&",
"other",
".",
"getBytes",
"(",
")",
".",
"equals",
"(",
"this",
".",
"getBytes",
"(",
")",
")",
"==",
"false",
")",
"return",
"false",
";",
"if",
"(",
"other",
".",
"getS3Object",
"(",
")",
"==",
"null",
"^",
"this",
".",
"getS3Object",
"(",
")",
"==",
"null",
")",
"return",
"false",
";",
"if",
"(",
"other",
".",
"getS3Object",
"(",
")",
"!=",
"null",
"&&",
"other",
".",
"getS3Object",
"(",
")",
".",
"equals",
"(",
"this",
".",
"getS3Object",
"(",
")",
")",
"==",
"false",
")",
"return",
"false",
";",
"return",
"true",
";",
"}"
] |
public override bool Equals(object obj){var otherDocument = obj as Document;if (otherDocument == null)return false;if (Keys.Count != otherDocument.Keys.Count)return false;foreach(var key in Keys){if (!otherDocument.ContainsKey(key))return false;var a = this[key];var b = otherDocument[key];if (!a.Equals(b))return false;}return true;}
|
train
| false
|
2,926
|
public ListMembersResult listMembers(ListMembersRequest request) {request = beforeClientExecution(request);return executeListMembers(request);}
|
[
"public",
"ListMembersResult",
"listMembers",
"(",
"ListMembersRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListMembers",
"(",
"request",
")",
";",
"}"
] |
public virtual ListMembersResponse ListMembers(ListMembersRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListMembersRequestMarshaller.Instance;options.ResponseUnmarshaller = ListMembersResponseUnmarshaller.Instance;return Invoke<ListMembersResponse>(request, options);}
|
train
| true
|
2,927
|
public String toString() {final StringBuilder s = new StringBuilder();for (Block q = head; q != null; q = q.next) {for (int i = q.headIndex; i < q.tailIndex; i++)describe(s, q.commits[i]);}return s.toString();}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"final",
"StringBuilder",
"s",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"Block",
"q",
"=",
"head",
";",
"q",
"!=",
"null",
";",
"q",
"=",
"q",
".",
"next",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"q",
".",
"headIndex",
";",
"i",
"<",
"q",
".",
"tailIndex",
";",
"i",
"++",
")",
"describe",
"(",
"s",
",",
"q",
".",
"commits",
"[",
"i",
"]",
")",
";",
"}",
"return",
"s",
".",
"toString",
"(",
")",
";",
"}"
] |
public override string ToString(){StringBuilder s = new StringBuilder();for (BlockRevQueue.Block q = head; q != null; q = q.next){for (int i = q.headIndex; i < q.tailIndex; i++){Describe(s, q.commits[i]);}}return s.ToString();}
|
train
| false
|
2,928
|
public void delete() {if (!deleted) {deleted = true;commitsToDelete.add(this);}}
|
[
"public",
"void",
"delete",
"(",
")",
"{",
"if",
"(",
"!",
"deleted",
")",
"{",
"deleted",
"=",
"true",
";",
"commitsToDelete",
".",
"add",
"(",
"this",
")",
";",
"}",
"}"
] |
public override void Delete(){if (!deleted){deleted = true;commitsToDelete.Add(this);}}
|
train
| false
|
2,929
|
public final boolean isWritten() {return 1 < getOffset(); }
|
[
"public",
"final",
"boolean",
"isWritten",
"(",
")",
"{",
"return",
"1",
"<",
"getOffset",
"(",
")",
";",
"}"
] |
public virtual bool IsWritten(){return GetOffset() != 0;}
|
train
| false
|
2,930
|
public static Cell translateUnicodeValues(Cell cell) {String s = cell.getRichStringCellValue().getString();boolean foundUnicode = false;String lowerCaseStr = s.toLowerCase(Locale.ROOT);for (UnicodeMapping entry : unicodeMappings) {String key = entry.entityName;if (lowerCaseStr.contains(key)) {s = s.replaceAll(key, entry.resolvedValue);foundUnicode = true;}}if (foundUnicode) {cell.setCellValue(cell.getRow().getSheet().getWorkbook().getCreationHelper().createRichTextString(s));}return cell;}
|
[
"public",
"static",
"Cell",
"translateUnicodeValues",
"(",
"Cell",
"cell",
")",
"{",
"String",
"s",
"=",
"cell",
".",
"getRichStringCellValue",
"(",
")",
".",
"getString",
"(",
")",
";",
"boolean",
"foundUnicode",
"=",
"false",
";",
"String",
"lowerCaseStr",
"=",
"s",
".",
"toLowerCase",
"(",
"Locale",
".",
"ROOT",
")",
";",
"for",
"(",
"UnicodeMapping",
"entry",
":",
"unicodeMappings",
")",
"{",
"String",
"key",
"=",
"entry",
".",
"entityName",
";",
"if",
"(",
"lowerCaseStr",
".",
"contains",
"(",
"key",
")",
")",
"{",
"s",
"=",
"s",
".",
"replaceAll",
"(",
"key",
",",
"entry",
".",
"resolvedValue",
")",
";",
"foundUnicode",
"=",
"true",
";",
"}",
"}",
"if",
"(",
"foundUnicode",
")",
"{",
"cell",
".",
"setCellValue",
"(",
"cell",
".",
"getRow",
"(",
")",
".",
"getSheet",
"(",
")",
".",
"getWorkbook",
"(",
")",
".",
"getCreationHelper",
"(",
")",
".",
"createRichTextString",
"(",
"s",
")",
")",
";",
"}",
"return",
"cell",
";",
"}"
] |
public static ICell TranslateUnicodeValues(ICell cell){String s = cell.RichStringCellValue.String;bool foundUnicode = false;String lowerCaseStr = s.ToLower();for (int i = 0; i < unicodeMappings.Length; i++){UnicodeMapping entry = unicodeMappings[i];String key = entry.entityName;if (lowerCaseStr.IndexOf(key, StringComparison.Ordinal) != -1){s = s.Replace(key, entry.resolvedValue);foundUnicode = true;}}if (foundUnicode){cell.SetCellValue(cell.Row.Sheet.Workbook.GetCreationHelper().CreateRichTextString(s));}return cell;}
|
train
| false
|
2,931
|
public DeleteCampaignResult deleteCampaign(DeleteCampaignRequest request) {request = beforeClientExecution(request);return executeDeleteCampaign(request);}
|
[
"public",
"DeleteCampaignResult",
"deleteCampaign",
"(",
"DeleteCampaignRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteCampaign",
"(",
"request",
")",
";",
"}"
] |
public virtual DeleteCampaignResponse DeleteCampaign(DeleteCampaignRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteCampaignRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteCampaignResponseUnmarshaller.Instance;return Invoke<DeleteCampaignResponse>(request, options);}
|
train
| true
|
2,932
|
public String toFormulaString() {return formatReferenceAsString();}
|
[
"public",
"String",
"toFormulaString",
"(",
")",
"{",
"return",
"formatReferenceAsString",
"(",
")",
";",
"}"
] |
public override String ToFormulaString(){return FormatReferenceAsString();}
|
train
| false
|
2,933
|
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0, ValueEval arg1,ValueEval arg2) {TwoDEval reference = convertFirstArg(arg0);try {int columnIx = resolveIndexArg(arg2, srcRowIndex, srcColumnIndex);int rowIx = resolveIndexArg(arg1, srcRowIndex, srcColumnIndex);return getValueFromArea(reference, rowIx, columnIx);} catch (EvaluationException e) {return e.getErrorEval();}}
|
[
"public",
"ValueEval",
"evaluate",
"(",
"int",
"srcRowIndex",
",",
"int",
"srcColumnIndex",
",",
"ValueEval",
"arg0",
",",
"ValueEval",
"arg1",
",",
"ValueEval",
"arg2",
")",
"{",
"TwoDEval",
"reference",
"=",
"convertFirstArg",
"(",
"arg0",
")",
";",
"try",
"{",
"int",
"columnIx",
"=",
"resolveIndexArg",
"(",
"arg2",
",",
"srcRowIndex",
",",
"srcColumnIndex",
")",
";",
"int",
"rowIx",
"=",
"resolveIndexArg",
"(",
"arg1",
",",
"srcRowIndex",
",",
"srcColumnIndex",
")",
";",
"return",
"getValueFromArea",
"(",
"reference",
",",
"rowIx",
",",
"columnIx",
")",
";",
"}",
"catch",
"(",
"EvaluationException",
"e",
")",
"{",
"return",
"e",
".",
"getErrorEval",
"(",
")",
";",
"}",
"}"
] |
public ValueEval Evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0, ValueEval arg1,ValueEval arg2){TwoDEval reference = ConvertFirstArg(arg0);try{int columnIx = ResolveIndexArg(arg2, srcRowIndex, srcColumnIndex);int rowIx = ResolveIndexArg(arg1, srcRowIndex, srcColumnIndex);return GetValueFromArea(reference, rowIx, columnIx);}catch (EvaluationException e){return e.GetErrorEval();}}
|
train
| false
|
2,935
|
public int append(BytesRef bytes) {if (lastElement >= offsets.length) {int oldLen = offsets.length;offsets = ArrayUtil.grow(offsets, offsets.length + 1);bytesUsed.addAndGet((offsets.length - oldLen) * Integer.BYTES);}pool.append(bytes);offsets[lastElement++] = currentOffset;currentOffset += bytes.length;return lastElement-1;}
|
[
"public",
"int",
"append",
"(",
"BytesRef",
"bytes",
")",
"{",
"if",
"(",
"lastElement",
">=",
"offsets",
".",
"length",
")",
"{",
"int",
"oldLen",
"=",
"offsets",
".",
"length",
";",
"offsets",
"=",
"ArrayUtil",
".",
"grow",
"(",
"offsets",
",",
"offsets",
".",
"length",
"+",
"1",
")",
";",
"bytesUsed",
".",
"addAndGet",
"(",
"(",
"offsets",
".",
"length",
"-",
"oldLen",
")",
"*",
"Integer",
".",
"BYTES",
")",
";",
"}",
"pool",
".",
"append",
"(",
"bytes",
")",
";",
"offsets",
"[",
"lastElement",
"++",
"]",
"=",
"currentOffset",
";",
"currentOffset",
"+=",
"bytes",
".",
"length",
";",
"return",
"lastElement",
"-",
"1",
";",
"}"
] |
public int Append(BytesRef bytes){if (lastElement >= offsets.Length){int oldLen = offsets.Length;offsets = ArrayUtil.Grow(offsets, offsets.Length + 1);bytesUsed.AddAndGet((offsets.Length - oldLen) * RamUsageEstimator.NUM_BYTES_INT32);}pool.Append(bytes);offsets[lastElement++] = currentOffset;currentOffset += bytes.Length;return lastElement - 1;}
|
train
| false
|
2,936
|
public EscherAggregate(boolean createDefaultTree) {if (createDefaultTree){buildBaseTree();}}
|
[
"public",
"EscherAggregate",
"(",
"boolean",
"createDefaultTree",
")",
"{",
"if",
"(",
"createDefaultTree",
")",
"{",
"buildBaseTree",
"(",
")",
";",
"}",
"}"
] |
public EscherAggregate(bool createDefaultTree){if (createDefaultTree){BuildBaseTree();}}
|
train
| false
|
2,937
|
public NumericDocValuesField(String name, Long value) {super(name, TYPE);fieldsData = value;}
|
[
"public",
"NumericDocValuesField",
"(",
"String",
"name",
",",
"Long",
"value",
")",
"{",
"super",
"(",
"name",
",",
"TYPE",
")",
";",
"fieldsData",
"=",
"value",
";",
"}"
] |
public NumericDocValuesField(string name, long value): base(name, TYPE){FieldsData = new Int64(value);}
|
train
| false
|
2,938
|
public void serialize(LittleEndianOutput out) {out.writeShort(field_1_index);}
|
[
"public",
"void",
"serialize",
"(",
"LittleEndianOutput",
"out",
")",
"{",
"out",
".",
"writeShort",
"(",
"field_1_index",
")",
";",
"}"
] |
public override void Serialize(ILittleEndianOutput out1){out1.WriteShort(field_1_index);}
|
train
| false
|
2,939
|
public AssociateDeviceWithNetworkProfileResult associateDeviceWithNetworkProfile(AssociateDeviceWithNetworkProfileRequest request) {request = beforeClientExecution(request);return executeAssociateDeviceWithNetworkProfile(request);}
|
[
"public",
"AssociateDeviceWithNetworkProfileResult",
"associateDeviceWithNetworkProfile",
"(",
"AssociateDeviceWithNetworkProfileRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeAssociateDeviceWithNetworkProfile",
"(",
"request",
")",
";",
"}"
] |
public virtual AssociateDeviceWithNetworkProfileResponse AssociateDeviceWithNetworkProfile(AssociateDeviceWithNetworkProfileRequest request){var options = new InvokeOptions();options.RequestMarshaller = AssociateDeviceWithNetworkProfileRequestMarshaller.Instance;options.ResponseUnmarshaller = AssociateDeviceWithNetworkProfileResponseUnmarshaller.Instance;return Invoke<AssociateDeviceWithNetworkProfileResponse>(request, options);}
|
train
| false
|
2,940
|
public void add(DirCacheEntry newEntry) {if (newEntry.getRawMode() == 0)throw new IllegalArgumentException(MessageFormat.format(JGitText.get().fileModeNotSetForPath,newEntry.getPathString()));beforeAdd(newEntry);fastAdd(newEntry);}
|
[
"public",
"void",
"add",
"(",
"DirCacheEntry",
"newEntry",
")",
"{",
"if",
"(",
"newEntry",
".",
"getRawMode",
"(",
")",
"==",
"0",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"MessageFormat",
".",
"format",
"(",
"JGitText",
".",
"get",
"(",
")",
".",
"fileModeNotSetForPath",
",",
"newEntry",
".",
"getPathString",
"(",
")",
")",
")",
";",
"beforeAdd",
"(",
"newEntry",
")",
";",
"fastAdd",
"(",
"newEntry",
")",
";",
"}"
] |
public virtual void Add(DirCacheEntry newEntry){if (newEntry.RawMode == 0){throw new ArgumentException(MessageFormat.Format(JGitText.Get().fileModeNotSetForPath, newEntry.PathString));}BeforeAdd(newEntry);FastAdd(newEntry);}
|
train
| false
|
2,941
|
public ValueEval getEvalForCell(int rowIndex, int columnIndex) {return _bookEvaluator.evaluateReference(getSheet(), _sheetIndex, rowIndex, columnIndex, _tracker);}
|
[
"public",
"ValueEval",
"getEvalForCell",
"(",
"int",
"rowIndex",
",",
"int",
"columnIndex",
")",
"{",
"return",
"_bookEvaluator",
".",
"evaluateReference",
"(",
"getSheet",
"(",
")",
",",
"_sheetIndex",
",",
"rowIndex",
",",
"columnIndex",
",",
"_tracker",
")",
";",
"}"
] |
public ValueEval GetEvalForCell(int rowIndex, int columnIndex){return _bookEvaluator.EvaluateReference(this.Sheet, _sheetIndex, rowIndex, columnIndex, _tracker);}
|
train
| false
|
2,943
|
public ObjectId getResultTreeId() {return sourceTrees[treeIndex];}
|
[
"public",
"ObjectId",
"getResultTreeId",
"(",
")",
"{",
"return",
"sourceTrees",
"[",
"treeIndex",
"]",
";",
"}"
] |
public override ObjectId GetResultTreeId(){return sourceTrees[treeIndex];}
|
train
| false
|
2,944
|
public MoPenQueryCanvasRequest() {super("MoPen", "2018-02-11", "MoPenQueryCanvas", "mopen");setProtocol(ProtocolType.HTTPS);setMethod(MethodType.POST);}
|
[
"public",
"MoPenQueryCanvasRequest",
"(",
")",
"{",
"super",
"(",
"\"MoPen\"",
",",
"\"2018-02-11\"",
",",
"\"MoPenQueryCanvas\"",
",",
"\"mopen\"",
")",
";",
"setProtocol",
"(",
"ProtocolType",
".",
"HTTPS",
")",
";",
"setMethod",
"(",
"MethodType",
".",
"POST",
")",
";",
"}"
] |
public MoPenQueryCanvasRequest(): base("MoPen", "2018-02-11", "MoPenQueryCanvas", "mopen", "openAPI"){Protocol = ProtocolType.HTTPS;Method = MethodType.POST;}
|
train
| false
|
2,945
|
public DescribeTrialResult describeTrial(DescribeTrialRequest request) {request = beforeClientExecution(request);return executeDescribeTrial(request);}
|
[
"public",
"DescribeTrialResult",
"describeTrial",
"(",
"DescribeTrialRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeTrial",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeTrialResponse DescribeTrial(DescribeTrialRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeTrialRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeTrialResponseUnmarshaller.Instance;return Invoke<DescribeTrialResponse>(request, options);}
|
train
| false
|
2,946
|
public DeleteCommentResult deleteComment(DeleteCommentRequest request) {request = beforeClientExecution(request);return executeDeleteComment(request);}
|
[
"public",
"DeleteCommentResult",
"deleteComment",
"(",
"DeleteCommentRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteComment",
"(",
"request",
")",
";",
"}"
] |
public virtual DeleteCommentResponse DeleteComment(DeleteCommentRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteCommentRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteCommentResponseUnmarshaller.Instance;return Invoke<DeleteCommentResponse>(request, options);}
|
train
| true
|
2,947
|
public DeleteCacheSecurityGroupRequest(String cacheSecurityGroupName) {setCacheSecurityGroupName(cacheSecurityGroupName);}
|
[
"public",
"DeleteCacheSecurityGroupRequest",
"(",
"String",
"cacheSecurityGroupName",
")",
"{",
"setCacheSecurityGroupName",
"(",
"cacheSecurityGroupName",
")",
";",
"}"
] |
public DeleteCacheSecurityGroupRequest(string cacheSecurityGroupName){_cacheSecurityGroupName = cacheSecurityGroupName;}
|
train
| false
|
2,948
|
public ParseTreePattern(ParseTreePatternMatcher matcher,String pattern, int patternRuleIndex, ParseTree patternTree){this.matcher = matcher;this.patternRuleIndex = patternRuleIndex;this.pattern = pattern;this.patternTree = patternTree;}
|
[
"public",
"ParseTreePattern",
"(",
"ParseTreePatternMatcher",
"matcher",
",",
"String",
"pattern",
",",
"int",
"patternRuleIndex",
",",
"ParseTree",
"patternTree",
")",
"{",
"this",
".",
"matcher",
"=",
"matcher",
";",
"this",
".",
"patternRuleIndex",
"=",
"patternRuleIndex",
";",
"this",
".",
"pattern",
"=",
"pattern",
";",
"this",
".",
"patternTree",
"=",
"patternTree",
";",
"}"
] |
public ParseTreePattern(ParseTreePatternMatcher matcher, string pattern, int patternRuleIndex, IParseTree patternTree){this.matcher = matcher;this.patternRuleIndex = patternRuleIndex;this.pattern = pattern;this.patternTree = patternTree;}
|
train
| false
|
2,950
|
public GetVaultLockResult getVaultLock(GetVaultLockRequest request) {request = beforeClientExecution(request);return executeGetVaultLock(request);}
|
[
"public",
"GetVaultLockResult",
"getVaultLock",
"(",
"GetVaultLockRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetVaultLock",
"(",
"request",
")",
";",
"}"
] |
public virtual GetVaultLockResponse GetVaultLock(GetVaultLockRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetVaultLockRequestMarshaller.Instance;options.ResponseUnmarshaller = GetVaultLockResponseUnmarshaller.Instance;return Invoke<GetVaultLockResponse>(request, options);}
|
train
| true
|
2,951
|
public DecreaseStreamRetentionPeriodResult decreaseStreamRetentionPeriod(DecreaseStreamRetentionPeriodRequest request) {request = beforeClientExecution(request);return executeDecreaseStreamRetentionPeriod(request);}
|
[
"public",
"DecreaseStreamRetentionPeriodResult",
"decreaseStreamRetentionPeriod",
"(",
"DecreaseStreamRetentionPeriodRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDecreaseStreamRetentionPeriod",
"(",
"request",
")",
";",
"}"
] |
public virtual DecreaseStreamRetentionPeriodResponse DecreaseStreamRetentionPeriod(DecreaseStreamRetentionPeriodRequest request){var options = new InvokeOptions();options.RequestMarshaller = DecreaseStreamRetentionPeriodRequestMarshaller.Instance;options.ResponseUnmarshaller = DecreaseStreamRetentionPeriodResponseUnmarshaller.Instance;return Invoke<DecreaseStreamRetentionPeriodResponse>(request, options);}
|
train
| true
|
2,952
|
public void append(String name, RevTree tree) {append(name, TREE, tree);}
|
[
"public",
"void",
"append",
"(",
"String",
"name",
",",
"RevTree",
"tree",
")",
"{",
"append",
"(",
"name",
",",
"TREE",
",",
"tree",
")",
";",
"}"
] |
public virtual void Append(string name, RevTree tree){Append(name, FileMode.TREE, tree);}
|
train
| false
|
2,953
|
public String getSessionToken() {return sessionToken;}
|
[
"public",
"String",
"getSessionToken",
"(",
")",
"{",
"return",
"sessionToken",
";",
"}"
] |
public string GetSessionToken(){return sessionToken;}
|
train
| false
|
2,954
|
public ListIterator<E> listIterator(int index) {Object[] snapshot = elements;if (index < 0 || index > snapshot.length) {throw new IndexOutOfBoundsException("index=" + index + ", length=" + snapshot.length);}CowIterator<E> result = new CowIterator<E>(snapshot, 0, snapshot.length);result.index = index;return result;}
|
[
"public",
"ListIterator",
"<",
"E",
">",
"listIterator",
"(",
"int",
"index",
")",
"{",
"Object",
"[",
"]",
"snapshot",
"=",
"elements",
";",
"if",
"(",
"index",
"<",
"0",
"||",
"index",
">",
"snapshot",
".",
"length",
")",
"{",
"throw",
"new",
"IndexOutOfBoundsException",
"(",
"\"index=\"",
"+",
"index",
"+",
"\", length=\"",
"+",
"snapshot",
".",
"length",
")",
";",
"}",
"CowIterator",
"<",
"E",
">",
"result",
"=",
"new",
"CowIterator",
"<",
"E",
">",
"(",
"snapshot",
",",
"0",
",",
"snapshot",
".",
"length",
")",
";",
"result",
".",
"index",
"=",
"index",
";",
"return",
"result",
";",
"}"
] |
public virtual java.util.ListIterator<E> listIterator(int index){object[] snapshot = elements;if (index < 0 || index > snapshot.Length){throw new System.IndexOutOfRangeException("index=" + index + ", length=" + snapshot.Length);}java.util.concurrent.CopyOnWriteArrayList.CowIterator<E> result = new java.util.concurrent.CopyOnWriteArrayList.CowIterator<E>(snapshot, 0, snapshot.Length);result.index = index;return result;}
|
train
| true
|
2,955
|
public synchronized Span[] getTerms(String sentence) {if (tokenizer == null) {Span[] span1 = new Span[1];span1[0] = new Span(0, sentence.length());return span1;}return tokenizer.tokenizePos(sentence);}
|
[
"public",
"synchronized",
"Span",
"[",
"]",
"getTerms",
"(",
"String",
"sentence",
")",
"{",
"if",
"(",
"tokenizer",
"==",
"null",
")",
"{",
"Span",
"[",
"]",
"span1",
"=",
"new",
"Span",
"[",
"1",
"]",
";",
"span1",
"[",
"0",
"]",
"=",
"new",
"Span",
"(",
"0",
",",
"sentence",
".",
"length",
"(",
")",
")",
";",
"return",
"span1",
";",
"}",
"return",
"tokenizer",
".",
"tokenizePos",
"(",
"sentence",
")",
";",
"}"
] |
public virtual Span[] GetTerms(string sentence){lock (this){if (tokenizer == null){Span[] span1 = new Span[1];span1[0] = new Span(0, sentence.Length);return span1;}return tokenizer.tokenizePos(sentence);}}
|
train
| false
|
2,956
|
public DeleteRelationalDatabaseSnapshotResult deleteRelationalDatabaseSnapshot(DeleteRelationalDatabaseSnapshotRequest request) {request = beforeClientExecution(request);return executeDeleteRelationalDatabaseSnapshot(request);}
|
[
"public",
"DeleteRelationalDatabaseSnapshotResult",
"deleteRelationalDatabaseSnapshot",
"(",
"DeleteRelationalDatabaseSnapshotRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteRelationalDatabaseSnapshot",
"(",
"request",
")",
";",
"}"
] |
public virtual DeleteRelationalDatabaseSnapshotResponse DeleteRelationalDatabaseSnapshot(DeleteRelationalDatabaseSnapshotRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteRelationalDatabaseSnapshotRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteRelationalDatabaseSnapshotResponseUnmarshaller.Instance;return Invoke<DeleteRelationalDatabaseSnapshotResponse>(request, options);}
|
train
| true
|
2,957
|
public CheckDomainAvailabilityResult checkDomainAvailability(CheckDomainAvailabilityRequest request) {request = beforeClientExecution(request);return executeCheckDomainAvailability(request);}
|
[
"public",
"CheckDomainAvailabilityResult",
"checkDomainAvailability",
"(",
"CheckDomainAvailabilityRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCheckDomainAvailability",
"(",
"request",
")",
";",
"}"
] |
public virtual CheckDomainAvailabilityResponse CheckDomainAvailability(CheckDomainAvailabilityRequest request){var options = new InvokeOptions();options.RequestMarshaller = CheckDomainAvailabilityRequestMarshaller.Instance;options.ResponseUnmarshaller = CheckDomainAvailabilityResponseUnmarshaller.Instance;return Invoke<CheckDomainAvailabilityResponse>(request, options);}
|
train
| true
|
2,958
|
public DeleteVaultRequest(String vaultName) {setVaultName(vaultName);}
|
[
"public",
"DeleteVaultRequest",
"(",
"String",
"vaultName",
")",
"{",
"setVaultName",
"(",
"vaultName",
")",
";",
"}"
] |
public DeleteVaultRequest(string vaultName){_vaultName = vaultName;}
|
train
| false
|
2,959
|
public InputStream getInputStream() {return rawIn;}
|
[
"public",
"InputStream",
"getInputStream",
"(",
")",
"{",
"return",
"rawIn",
";",
"}"
] |
public virtual InputStream GetInputStream(){return rawIn;}
|
train
| false
|
2,960
|
public final byte[] getBytes(int sizeLimit) throws LargeObjectException,MissingObjectException, IOException {byte[] cached = getCachedBytes(sizeLimit);try {return cloneArray(cached);} catch (OutOfMemoryError tooBig) {throw new LargeObjectException.OutOfMemory(tooBig);}}
|
[
"public",
"final",
"byte",
"[",
"]",
"getBytes",
"(",
"int",
"sizeLimit",
")",
"throws",
"LargeObjectException",
",",
"MissingObjectException",
",",
"IOException",
"{",
"byte",
"[",
"]",
"cached",
"=",
"getCachedBytes",
"(",
"sizeLimit",
")",
";",
"try",
"{",
"return",
"cloneArray",
"(",
"cached",
")",
";",
"}",
"catch",
"(",
"OutOfMemoryError",
"tooBig",
")",
"{",
"throw",
"new",
"LargeObjectException",
".",
"OutOfMemory",
"(",
"tooBig",
")",
";",
"}",
"}"
] |
public byte[] GetBytes(int sizeLimit){byte[] cached = GetCachedBytes(sizeLimit);try{return CloneArray(cached);}catch (OutOfMemoryException tooBig){throw new LargeObjectException.OutOfMemory(tooBig);}}
|
train
| false
|
2,961
|
public HSSFSimpleShape createSimpleShape(HSSFClientAnchor anchor) {HSSFSimpleShape shape = new HSSFSimpleShape(null, anchor);addShape(shape);onCreate(shape);return shape;}
|
[
"public",
"HSSFSimpleShape",
"createSimpleShape",
"(",
"HSSFClientAnchor",
"anchor",
")",
"{",
"HSSFSimpleShape",
"shape",
"=",
"new",
"HSSFSimpleShape",
"(",
"null",
",",
"anchor",
")",
";",
"addShape",
"(",
"shape",
")",
";",
"onCreate",
"(",
"shape",
")",
";",
"return",
"shape",
";",
"}"
] |
public HSSFSimpleShape CreateSimpleShape(HSSFClientAnchor anchor){HSSFSimpleShape shape = new HSSFSimpleShape(null, anchor);AddShape(shape);OnCreate(shape);return shape;}
|
train
| false
|
2,962
|
public synchronized V remove(Object key) {int hash = secondaryHash(key.hashCode());HashtableEntry<K, V>[] tab = table;int index = hash & (tab.length - 1);for (HashtableEntry<K, V> e = tab[index], prev = null;e != null; prev = e, e = e.next) {if (e.hash == hash && key.equals(e.key)) {if (prev == null) {tab[index] = e.next;} else {prev.next = e.next;}modCount++;size--;return e.value;}}return null;}
|
[
"public",
"synchronized",
"V",
"remove",
"(",
"Object",
"key",
")",
"{",
"int",
"hash",
"=",
"secondaryHash",
"(",
"key",
".",
"hashCode",
"(",
")",
")",
";",
"HashtableEntry",
"<",
"K",
",",
"V",
">",
"[",
"]",
"tab",
"=",
"table",
";",
"int",
"index",
"=",
"hash",
"&",
"(",
"tab",
".",
"length",
"-",
"1",
")",
";",
"for",
"(",
"HashtableEntry",
"<",
"K",
",",
"V",
">",
"e",
"=",
"tab",
"[",
"index",
"]",
",",
"prev",
"=",
"null",
";",
"e",
"!=",
"null",
";",
"prev",
"=",
"e",
",",
"e",
"=",
"e",
".",
"next",
")",
"{",
"if",
"(",
"e",
".",
"hash",
"==",
"hash",
"&&",
"key",
".",
"equals",
"(",
"e",
".",
"key",
")",
")",
"{",
"if",
"(",
"prev",
"==",
"null",
")",
"{",
"tab",
"[",
"index",
"]",
"=",
"e",
".",
"next",
";",
"}",
"else",
"{",
"prev",
".",
"next",
"=",
"e",
".",
"next",
";",
"}",
"modCount",
"++",
";",
"size",
"--",
";",
"return",
"e",
".",
"value",
";",
"}",
"}",
"return",
"null",
";",
"}"
] |
public override V remove(object key){lock (this){int hash = secondaryHash(key.GetHashCode());java.util.Hashtable.HashtableEntry<K, V>[] tab = table;int index = hash & (tab.Length - 1);{java.util.Hashtable.HashtableEntry<K, V> e = tab[index];java.util.Hashtable.HashtableEntry<K, V> prev = null;for (; e != null; prev = e, e = e.next){if (e.hash == hash && key.Equals(e.key)){if (prev == null){tab[index] = e.next;}else{prev.next = e.next;}modCount++;_size--;return e.value;}}}return default(V);}}
|
train
| false
|
2,963
|
public final ValueEval getValue(int sheetIndex, int row, int col) {return getRelativeValue(sheetIndex, row, col);}
|
[
"public",
"final",
"ValueEval",
"getValue",
"(",
"int",
"sheetIndex",
",",
"int",
"row",
",",
"int",
"col",
")",
"{",
"return",
"getRelativeValue",
"(",
"sheetIndex",
",",
"row",
",",
"col",
")",
";",
"}"
] |
public ValueEval GetValue(int sheetIndex, int row, int col){return GetRelativeValue(sheetIndex, row, col);}
|
train
| false
|
2,964
|
public SetIdentityNotificationTopicResult setIdentityNotificationTopic(SetIdentityNotificationTopicRequest request) {request = beforeClientExecution(request);return executeSetIdentityNotificationTopic(request);}
|
[
"public",
"SetIdentityNotificationTopicResult",
"setIdentityNotificationTopic",
"(",
"SetIdentityNotificationTopicRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeSetIdentityNotificationTopic",
"(",
"request",
")",
";",
"}"
] |
public virtual SetIdentityNotificationTopicResponse SetIdentityNotificationTopic(SetIdentityNotificationTopicRequest request){var options = new InvokeOptions();options.RequestMarshaller = SetIdentityNotificationTopicRequestMarshaller.Instance;options.ResponseUnmarshaller = SetIdentityNotificationTopicResponseUnmarshaller.Instance;return Invoke<SetIdentityNotificationTopicResponse>(request, options);}
|
train
| true
|
2,965
|
public void serialize(LittleEndianOutput out) {out.write(_rawData);}
|
[
"public",
"void",
"serialize",
"(",
"LittleEndianOutput",
"out",
")",
"{",
"out",
".",
"write",
"(",
"_rawData",
")",
";",
"}"
] |
public override void Serialize(ILittleEndianOutput out1){out1.Write(_rawData);}
|
train
| false
|
2,966
|
public BlockJoinWeight(Query joinQuery, Weight childWeight, BitSetProducer parentsFilter, ScoreMode scoreMode) {super(joinQuery, childWeight);this.parentsFilter = parentsFilter;this.scoreMode = scoreMode;}
|
[
"public",
"BlockJoinWeight",
"(",
"Query",
"joinQuery",
",",
"Weight",
"childWeight",
",",
"BitSetProducer",
"parentsFilter",
",",
"ScoreMode",
"scoreMode",
")",
"{",
"super",
"(",
"joinQuery",
",",
"childWeight",
")",
";",
"this",
".",
"parentsFilter",
"=",
"parentsFilter",
";",
"this",
".",
"scoreMode",
"=",
"scoreMode",
";",
"}"
] |
public BlockJoinWeight(Query joinQuery, Weight childWeight, Filter parentsFilter, ScoreMode scoreMode): base(){this.joinQuery = joinQuery;this.childWeight = childWeight;this.parentsFilter = parentsFilter;this.scoreMode = scoreMode;}
|
train
| false
|
2,967
|
public Builder() {this.field = null;this.termArrays = new ArrayList<>();this.positions = new ArrayList<>();this.slop = 0;}
|
[
"public",
"Builder",
"(",
")",
"{",
"this",
".",
"field",
"=",
"null",
";",
"this",
".",
"termArrays",
"=",
"new",
"ArrayList",
"<",
">",
"(",
")",
";",
"this",
".",
"positions",
"=",
"new",
"ArrayList",
"<",
">",
"(",
")",
";",
"this",
".",
"slop",
"=",
"0",
";",
"}"
] |
public Builder(){data = new GrowableByteArrayDataOutput(128);bufferSize = 0;previousDoc = -1;indexInterval = 2;cardinality = 0;numBlocks = 0;}
|
train
| false
|
2,968
|
public CreateGameSessionQueueResult createGameSessionQueue(CreateGameSessionQueueRequest request) {request = beforeClientExecution(request);return executeCreateGameSessionQueue(request);}
|
[
"public",
"CreateGameSessionQueueResult",
"createGameSessionQueue",
"(",
"CreateGameSessionQueueRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCreateGameSessionQueue",
"(",
"request",
")",
";",
"}"
] |
public virtual CreateGameSessionQueueResponse CreateGameSessionQueue(CreateGameSessionQueueRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateGameSessionQueueRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateGameSessionQueueResponseUnmarshaller.Instance;return Invoke<CreateGameSessionQueueResponse>(request, options);}
|
train
| true
|
2,969
|
public DescribeMetricCollectionTypesResult describeMetricCollectionTypes() {return describeMetricCollectionTypes(new DescribeMetricCollectionTypesRequest());}
|
[
"public",
"DescribeMetricCollectionTypesResult",
"describeMetricCollectionTypes",
"(",
")",
"{",
"return",
"describeMetricCollectionTypes",
"(",
"new",
"DescribeMetricCollectionTypesRequest",
"(",
")",
")",
";",
"}"
] |
public virtual DescribeMetricCollectionTypesResponse DescribeMetricCollectionTypes(){return DescribeMetricCollectionTypes(new DescribeMetricCollectionTypesRequest());}
|
train
| false
|
2,970
|
@Override public boolean contains(Object o) {if (o instanceof Entry) {Entry<?> entry = (Entry<?>) o;int count = count(entry.getElement());return (count == entry.getCount()) && (count > 0);}return false;}
|
[
"@",
"Override",
"public",
"boolean",
"contains",
"(",
"Object",
"o",
")",
"{",
"if",
"(",
"o",
"instanceof",
"Entry",
")",
"{",
"Entry",
"<",
"?",
">",
"entry",
"=",
"(",
"Entry",
"<",
"?",
">",
")",
"o",
";",
"int",
"count",
"=",
"count",
"(",
"entry",
".",
"getElement",
"(",
")",
")",
";",
"return",
"(",
"count",
"==",
"entry",
".",
"getCount",
"(",
")",
")",
"&&",
"(",
"count",
">",
"0",
")",
";",
"}",
"return",
"false",
";",
"}"
] |
public override bool contains(object o){if (!(o is java.util.MapClass.Entry<K, V>)){return false;}java.util.MapClass.Entry<object, object> e = (java.util.MapClass.Entry<object, object>)o;return this._enclosing.containsMapping(e.getKey(), e.getValue());}
|
train
| false
|
2,971
|
public synchronized int get(FacetLabel categoryPath) {Integer res = cache.get(categoryPath);if (res == null) {return -1;}return res.intValue();}
|
[
"public",
"synchronized",
"int",
"get",
"(",
"FacetLabel",
"categoryPath",
")",
"{",
"Integer",
"res",
"=",
"cache",
".",
"get",
"(",
"categoryPath",
")",
";",
"if",
"(",
"res",
"==",
"null",
")",
"{",
"return",
"-",
"1",
";",
"}",
"return",
"res",
".",
"intValue",
"(",
")",
";",
"}"
] |
public virtual int Get(FacetLabel categoryPath){lock (this){int result;if (!cache.TryGetValue(categoryPath, out result)){return -1;}return result;}}
|
train
| false
|
2,973
|
public boolean equals(Object obj) {if (obj instanceof Point) {Point that = (Point) obj;return this.x == that.x && this.y == that.y;}return false;}
|
[
"public",
"boolean",
"equals",
"(",
"Object",
"obj",
")",
"{",
"if",
"(",
"obj",
"instanceof",
"Point",
")",
"{",
"Point",
"that",
"=",
"(",
"Point",
")",
"obj",
";",
"return",
"this",
".",
"x",
"==",
"that",
".",
"x",
"&&",
"this",
".",
"y",
"==",
"that",
".",
"y",
";",
"}",
"return",
"false",
";",
"}"
] |
public override bool Equals(object o){if (o is android.graphics.Point){android.graphics.Point p = (android.graphics.Point)o;return this.x == p.x && this.y == p.y;}return false;}
|
train
| false
|
2,974
|
public void message(String component, String message) {assert false: "message() should not be called when isEnabled returns false";}
|
[
"public",
"void",
"message",
"(",
"String",
"component",
",",
"String",
"message",
")",
"{",
"assert",
"false",
":",
"\"message() should not be called when isEnabled returns false\"",
";",
"}"
] |
public override void Message(string component, string message){Debug.Assert(false, "message() should not be called when isEnabled returns false");}
|
train
| false
|
2,975
|
public ListWorkerBlocksResult listWorkerBlocks(ListWorkerBlocksRequest request) {request = beforeClientExecution(request);return executeListWorkerBlocks(request);}
|
[
"public",
"ListWorkerBlocksResult",
"listWorkerBlocks",
"(",
"ListWorkerBlocksRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListWorkerBlocks",
"(",
"request",
")",
";",
"}"
] |
public virtual ListWorkerBlocksResponse ListWorkerBlocks(ListWorkerBlocksRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListWorkerBlocksRequestMarshaller.Instance;options.ResponseUnmarshaller = ListWorkerBlocksResponseUnmarshaller.Instance;return Invoke<ListWorkerBlocksResponse>(request, options);}
|
train
| true
|
2,976
|
public ListProvisionedCapacityResult listProvisionedCapacity(ListProvisionedCapacityRequest request) {request = beforeClientExecution(request);return executeListProvisionedCapacity(request);}
|
[
"public",
"ListProvisionedCapacityResult",
"listProvisionedCapacity",
"(",
"ListProvisionedCapacityRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListProvisionedCapacity",
"(",
"request",
")",
";",
"}"
] |
public virtual ListProvisionedCapacityResponse ListProvisionedCapacity(ListProvisionedCapacityRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListProvisionedCapacityRequestMarshaller.Instance;options.ResponseUnmarshaller = ListProvisionedCapacityResponseUnmarshaller.Instance;return Invoke<ListProvisionedCapacityResponse>(request, options);}
|
train
| true
|
2,978
|
public void exitEveryRule(ParserRuleContext ctx) {if (ctx.children instanceof ArrayList) {((ArrayList<?>)ctx.children).trimToSize();}}
|
[
"public",
"void",
"exitEveryRule",
"(",
"ParserRuleContext",
"ctx",
")",
"{",
"if",
"(",
"ctx",
".",
"children",
"instanceof",
"ArrayList",
")",
"{",
"(",
"(",
"ArrayList",
"<",
"?",
">",
")",
"ctx",
".",
"children",
")",
".",
"trimToSize",
"(",
")",
";",
"}",
"}"
] |
public virtual void ExitEveryRule(ParserRuleContext ctx){if (ctx.children is List<IParseTree>){((List<IParseTree>)ctx.children).TrimExcess();}}
|
train
| false
|
2,979
|
public int lookup(char[] text, int offset, int len) {if(!characterDefinition.isGroup(text[offset])) {return 1;}byte characterIdOfFirstCharacter = characterDefinition.getCharacterClass(text[offset]);int length = 1;for (int i = 1; i < len; i++) {if (characterIdOfFirstCharacter == characterDefinition.getCharacterClass(text[offset+i])){length++;} else {break;}}return length;}
|
[
"public",
"int",
"lookup",
"(",
"char",
"[",
"]",
"text",
",",
"int",
"offset",
",",
"int",
"len",
")",
"{",
"if",
"(",
"!",
"characterDefinition",
".",
"isGroup",
"(",
"text",
"[",
"offset",
"]",
")",
")",
"{",
"return",
"1",
";",
"}",
"byte",
"characterIdOfFirstCharacter",
"=",
"characterDefinition",
".",
"getCharacterClass",
"(",
"text",
"[",
"offset",
"]",
")",
";",
"int",
"length",
"=",
"1",
";",
"for",
"(",
"int",
"i",
"=",
"1",
";",
"i",
"<",
"len",
";",
"i",
"++",
")",
"{",
"if",
"(",
"characterIdOfFirstCharacter",
"==",
"characterDefinition",
".",
"getCharacterClass",
"(",
"text",
"[",
"offset",
"+",
"i",
"]",
")",
")",
"{",
"length",
"++",
";",
"}",
"else",
"{",
"break",
";",
"}",
"}",
"return",
"length",
";",
"}"
] |
public virtual int Lookup(char[] text, int offset, int len){if (!characterDefinition.IsGroup(text[offset])){return 1;}byte characterIdOfFirstCharacter = characterDefinition.GetCharacterClass(text[offset]);int length = 1;for (int i = 1; i < len; i++){if (characterIdOfFirstCharacter == characterDefinition.GetCharacterClass(text[offset + i])){length++;}else{break;}}return length;}
|
train
| false
|
2,980
|
public GetJobOutputResult getJobOutput(GetJobOutputRequest request) {request = beforeClientExecution(request);return executeGetJobOutput(request);}
|
[
"public",
"GetJobOutputResult",
"getJobOutput",
"(",
"GetJobOutputRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetJobOutput",
"(",
"request",
")",
";",
"}"
] |
public virtual GetJobOutputResponse GetJobOutput(GetJobOutputRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetJobOutputRequestMarshaller.Instance;options.ResponseUnmarshaller = GetJobOutputResponseUnmarshaller.Instance;return Invoke<GetJobOutputResponse>(request, options);}
|
train
| true
|
2,981
|
public void write(char b[], int off, int len) {reserve(len);unsafeWrite(b, off, len);}
|
[
"public",
"void",
"write",
"(",
"char",
"b",
"[",
"]",
",",
"int",
"off",
",",
"int",
"len",
")",
"{",
"reserve",
"(",
"len",
")",
";",
"unsafeWrite",
"(",
"b",
",",
"off",
",",
"len",
")",
";",
"}"
] |
public virtual void Write(char[] b, int off, int len){EnsureCapacity(len);UnsafeWrite(b, off, len);}
|
train
| true
|
2,982
|
public String toString() {return "weight(" + TermQuery.this + ")";}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"\"weight(\"",
"+",
"TermQuery",
".",
"this",
"+",
"\")\"",
";",
"}"
] |
public override string ToString(){return "weight(" + outerInstance + ")";}
|
train
| false
|
2,983
|
public int[] grow() {ParallelPostingsArray postingsArray = perField.postingsArray;final int oldSize = perField.postingsArray.size;postingsArray = perField.postingsArray = postingsArray.grow();perField.newPostingsArray();bytesUsed.addAndGet((postingsArray.bytesPerPosting() * (postingsArray.size - oldSize)));return postingsArray.textStarts;}
|
[
"public",
"int",
"[",
"]",
"grow",
"(",
")",
"{",
"ParallelPostingsArray",
"postingsArray",
"=",
"perField",
".",
"postingsArray",
";",
"final",
"int",
"oldSize",
"=",
"perField",
".",
"postingsArray",
".",
"size",
";",
"postingsArray",
"=",
"perField",
".",
"postingsArray",
"=",
"postingsArray",
".",
"grow",
"(",
")",
";",
"perField",
".",
"newPostingsArray",
"(",
")",
";",
"bytesUsed",
".",
"addAndGet",
"(",
"(",
"postingsArray",
".",
"bytesPerPosting",
"(",
")",
"*",
"(",
"postingsArray",
".",
"size",
"-",
"oldSize",
")",
")",
")",
";",
"return",
"postingsArray",
".",
"textStarts",
";",
"}"
] |
public override int[] Grow(){ParallelPostingsArray postingsArray = perField.postingsArray;int oldSize = perField.postingsArray.size;postingsArray = perField.postingsArray = postingsArray.Grow();bytesUsed.AddAndGet((postingsArray.BytesPerPosting() * (postingsArray.size - oldSize)));return postingsArray.textStarts;}
|
train
| false
|
2,984
|
public String toString() {return "'"+text+"'";}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"\"'\"",
"+",
"text",
"+",
"\"'\"",
";",
"}"
] |
public override string ToString(){return ruleName + ":" + bypassTokenType;}
|
train
| false
|
2,985
|
public boolean isMatch() {if (heads.isEmpty())return false;final ListIterator<Head> headIterator = heads.listIterator(heads.size());while (headIterator.hasPrevious()) {final Head head = headIterator.previous();if (head == LastHead.INSTANCE) {return true;}}return false;}
|
[
"public",
"boolean",
"isMatch",
"(",
")",
"{",
"if",
"(",
"heads",
".",
"isEmpty",
"(",
")",
")",
"return",
"false",
";",
"final",
"ListIterator",
"<",
"Head",
">",
"headIterator",
"=",
"heads",
".",
"listIterator",
"(",
"heads",
".",
"size",
"(",
")",
")",
";",
"while",
"(",
"headIterator",
".",
"hasPrevious",
"(",
")",
")",
"{",
"final",
"Head",
"head",
"=",
"headIterator",
".",
"previous",
"(",
")",
";",
"if",
"(",
"head",
"==",
"LastHead",
".",
"INSTANCE",
")",
"{",
"return",
"true",
";",
"}",
"}",
"return",
"false",
";",
"}"
] |
public virtual bool IsMatch(){ListIterator<Head> headIterator = heads.ListIterator(heads.Count);while (headIterator.HasPrevious()){Head head = headIterator.Previous();if (head == LastHead.INSTANCE){return true;}}return false;}
|
train
| true
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.