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 |
|---|---|---|---|---|---|
3,621
|
public GetDeliverabilityTestReportResult getDeliverabilityTestReport(GetDeliverabilityTestReportRequest request) {request = beforeClientExecution(request);return executeGetDeliverabilityTestReport(request);}
|
[
"public",
"GetDeliverabilityTestReportResult",
"getDeliverabilityTestReport",
"(",
"GetDeliverabilityTestReportRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetDeliverabilityTestReport",
"(",
"request",
")",
";",
"}"
] |
public virtual GetDeliverabilityTestReportResponse GetDeliverabilityTestReport(GetDeliverabilityTestReportRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetDeliverabilityTestReportRequestMarshaller.Instance;options.ResponseUnmarshaller = GetDeliverabilityTestReportResponseUnmarshaller.Instance;return Invoke<GetDeliverabilityTestReportResponse>(request, options);}
|
train
| true
|
3,622
|
public boolean isPeeled() {return getLeaf().isPeeled();}
|
[
"public",
"boolean",
"isPeeled",
"(",
")",
"{",
"return",
"getLeaf",
"(",
")",
".",
"isPeeled",
"(",
")",
";",
"}"
] |
public virtual bool IsPeeled(){return GetLeaf().IsPeeled();}
|
train
| false
|
3,623
|
public RenameCallback getRenameCallback() {return renameCallback;}
|
[
"public",
"RenameCallback",
"getRenameCallback",
"(",
")",
"{",
"return",
"renameCallback",
";",
"}"
] |
public virtual RenameCallback GetRenameCallback(){return renameCallback;}
|
train
| false
|
3,624
|
public String toString() {return "EditList" + super.toString(); }
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"\"EditList\"",
"+",
"super",
".",
"toString",
"(",
")",
";",
"}"
] |
public override string ToString(){return "EditList[]";}
|
train
| false
|
3,625
|
public PutVoiceConnectorTerminationCredentialsResult putVoiceConnectorTerminationCredentials(PutVoiceConnectorTerminationCredentialsRequest request) {request = beforeClientExecution(request);return executePutVoiceConnectorTerminationCredentials(request);}
|
[
"public",
"PutVoiceConnectorTerminationCredentialsResult",
"putVoiceConnectorTerminationCredentials",
"(",
"PutVoiceConnectorTerminationCredentialsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executePutVoiceConnectorTerminationCredentials",
"(",
"request",
")",
";",
"}"
] |
public virtual PutVoiceConnectorTerminationCredentialsResponse PutVoiceConnectorTerminationCredentials(PutVoiceConnectorTerminationCredentialsRequest request){var options = new InvokeOptions();options.RequestMarshaller = PutVoiceConnectorTerminationCredentialsRequestMarshaller.Instance;options.ResponseUnmarshaller = PutVoiceConnectorTerminationCredentialsResponseUnmarshaller.Instance;return Invoke<PutVoiceConnectorTerminationCredentialsResponse>(request, options);}
|
train
| true
|
3,626
|
public CreateGroupResult createGroup(CreateGroupRequest request) {request = beforeClientExecution(request);return executeCreateGroup(request);}
|
[
"public",
"CreateGroupResult",
"createGroup",
"(",
"CreateGroupRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCreateGroup",
"(",
"request",
")",
";",
"}"
] |
public virtual CreateGroupResponse CreateGroup(CreateGroupRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateGroupRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateGroupResponseUnmarshaller.Instance;return Invoke<CreateGroupResponse>(request, options);}
|
train
| true
|
3,627
|
public void serialize(LittleEndianOutput out) {out.writeShort(field_1_units);}
|
[
"public",
"void",
"serialize",
"(",
"LittleEndianOutput",
"out",
")",
"{",
"out",
".",
"writeShort",
"(",
"field_1_units",
")",
";",
"}"
] |
public override void Serialize(ILittleEndianOutput out1){out1.WriteShort(field_1_units);}
|
train
| false
|
3,628
|
public ObjectLoader open(AnyObjectId objectId, int typeHint)throws MissingObjectException, IncorrectObjectTypeException,IOException {final ObjectLoader ldr = db.openObject(this, objectId);if (ldr == null) {if (typeHint == OBJ_ANY)throw new MissingObjectException(objectId.copy(),JGitText.get().unknownObjectType2);throw new MissingObjectException(objectId.copy(), typeHint);}if (typeHint != OBJ_ANY && ldr.getType() != typeHint)throw new IncorrectObjectTypeException(objectId.copy(), typeHint);return ldr;}
|
[
"public",
"ObjectLoader",
"open",
"(",
"AnyObjectId",
"objectId",
",",
"int",
"typeHint",
")",
"throws",
"MissingObjectException",
",",
"IncorrectObjectTypeException",
",",
"IOException",
"{",
"final",
"ObjectLoader",
"ldr",
"=",
"db",
".",
"openObject",
"(",
"this",
",",
"objectId",
")",
";",
"if",
"(",
"ldr",
"==",
"null",
")",
"{",
"if",
"(",
"typeHint",
"==",
"OBJ_ANY",
")",
"throw",
"new",
"MissingObjectException",
"(",
"objectId",
".",
"copy",
"(",
")",
",",
"JGitText",
".",
"get",
"(",
")",
".",
"unknownObjectType2",
")",
";",
"throw",
"new",
"MissingObjectException",
"(",
"objectId",
".",
"copy",
"(",
")",
",",
"typeHint",
")",
";",
"}",
"if",
"(",
"typeHint",
"!=",
"OBJ_ANY",
"&&",
"ldr",
".",
"getType",
"(",
")",
"!=",
"typeHint",
")",
"throw",
"new",
"IncorrectObjectTypeException",
"(",
"objectId",
".",
"copy",
"(",
")",
",",
"typeHint",
")",
";",
"return",
"ldr",
";",
"}"
] |
public override ObjectLoader Open(AnyObjectId objectId, int typeHint){ObjectLoader ldr = db.OpenObject(this, objectId);if (ldr == null){if (typeHint == OBJ_ANY){throw new MissingObjectException(objectId.Copy(), "unknown");}throw new MissingObjectException(objectId.Copy(), typeHint);}if (typeHint != OBJ_ANY && ldr.GetType() != typeHint){throw new IncorrectObjectTypeException(objectId.Copy(), typeHint);}return ldr;}
|
train
| false
|
3,629
|
public ParameterNameValue(String parameterName, String parameterValue) {setParameterName(parameterName);setParameterValue(parameterValue);}
|
[
"public",
"ParameterNameValue",
"(",
"String",
"parameterName",
",",
"String",
"parameterValue",
")",
"{",
"setParameterName",
"(",
"parameterName",
")",
";",
"setParameterValue",
"(",
"parameterValue",
")",
";",
"}"
] |
public ParameterNameValue(string parameterName, string parameterValue){_parameterName = parameterName;_parameterValue = parameterValue;}
|
train
| false
|
3,630
|
public AssociateIamInstanceProfileResult associateIamInstanceProfile(AssociateIamInstanceProfileRequest request) {request = beforeClientExecution(request);return executeAssociateIamInstanceProfile(request);}
|
[
"public",
"AssociateIamInstanceProfileResult",
"associateIamInstanceProfile",
"(",
"AssociateIamInstanceProfileRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeAssociateIamInstanceProfile",
"(",
"request",
")",
";",
"}"
] |
public virtual AssociateIamInstanceProfileResponse AssociateIamInstanceProfile(AssociateIamInstanceProfileRequest request){var options = new InvokeOptions();options.RequestMarshaller = AssociateIamInstanceProfileRequestMarshaller.Instance;options.ResponseUnmarshaller = AssociateIamInstanceProfileResponseUnmarshaller.Instance;return Invoke<AssociateIamInstanceProfileResponse>(request, options);}
|
train
| true
|
3,631
|
public CreateHostedZoneRequest(String name, String callerReference) {setName(name);setCallerReference(callerReference);}
|
[
"public",
"CreateHostedZoneRequest",
"(",
"String",
"name",
",",
"String",
"callerReference",
")",
"{",
"setName",
"(",
"name",
")",
";",
"setCallerReference",
"(",
"callerReference",
")",
";",
"}"
] |
public CreateHostedZoneRequest(string name, string callerReference){_name = name;_callerReference = callerReference;}
|
train
| false
|
3,632
|
public String getPronunciation() {return dictionary.getPronunciation(wordId, surfaceForm, offset, length);}
|
[
"public",
"String",
"getPronunciation",
"(",
")",
"{",
"return",
"dictionary",
".",
"getPronunciation",
"(",
"wordId",
",",
"surfaceForm",
",",
"offset",
",",
"length",
")",
";",
"}"
] |
public virtual string GetPronunciation(){return dictionary.GetPronunciation(wordId, surfaceForm, offset, length);}
|
train
| false
|
3,633
|
public boolean knows(String key) {return (find(key) >= 0);}
|
[
"public",
"boolean",
"knows",
"(",
"String",
"key",
")",
"{",
"return",
"(",
"find",
"(",
"key",
")",
">=",
"0",
")",
";",
"}"
] |
public virtual bool Knows(string key){return (Find(key) >= 0);}
|
train
| false
|
3,634
|
public ServerException(String errorCode, String errorMessage) {super(errorCode, errorMessage);this.setErrorType(ErrorType.Server);}
|
[
"public",
"ServerException",
"(",
"String",
"errorCode",
",",
"String",
"errorMessage",
")",
"{",
"super",
"(",
"errorCode",
",",
"errorMessage",
")",
";",
"this",
".",
"setErrorType",
"(",
"ErrorType",
".",
"Server",
")",
";",
"}"
] |
public ServerException(string errorCode, string errorMessage) : base(errorCode, errorMessage){ErrorType = ErrorType.Server;}
|
train
| false
|
3,635
|
public String toString() {return "3(" + mu + ")";}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"\"3(\"",
"+",
"mu",
"+",
"\")\"",
";",
"}"
] |
public override string ToString(){return "3(" + mu + ")";}
|
train
| false
|
3,636
|
public CreateDiskResult createDisk(CreateDiskRequest request) {request = beforeClientExecution(request);return executeCreateDisk(request);}
|
[
"public",
"CreateDiskResult",
"createDisk",
"(",
"CreateDiskRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCreateDisk",
"(",
"request",
")",
";",
"}"
] |
public virtual CreateDiskResponse CreateDisk(CreateDiskRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateDiskRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateDiskResponseUnmarshaller.Instance;return Invoke<CreateDiskResponse>(request, options);}
|
train
| true
|
3,638
|
public QueryLicensesRequest() {super("LinkFace", "2018-07-20", "QueryLicenses");setProtocol(ProtocolType.HTTPS);setMethod(MethodType.POST);}
|
[
"public",
"QueryLicensesRequest",
"(",
")",
"{",
"super",
"(",
"\"LinkFace\"",
",",
"\"2018-07-20\"",
",",
"\"QueryLicenses\"",
")",
";",
"setProtocol",
"(",
"ProtocolType",
".",
"HTTPS",
")",
";",
"setMethod",
"(",
"MethodType",
".",
"POST",
")",
";",
"}"
] |
public QueryLicensesRequest(): base("LinkFace", "2018-07-20", "QueryLicenses"){Protocol = ProtocolType.HTTPS;Method = MethodType.POST;}
|
train
| false
|
3,639
|
public ExpectedAttributeValue(AttributeValue value) {setValue(value);}
|
[
"public",
"ExpectedAttributeValue",
"(",
"AttributeValue",
"value",
")",
"{",
"setValue",
"(",
"value",
")",
";",
"}"
] |
public ExpectedAttributeValue(AttributeValue value){_value = value;}
|
train
| false
|
3,640
|
public long getSize() {return getCachedBytes().length;}
|
[
"public",
"long",
"getSize",
"(",
")",
"{",
"return",
"getCachedBytes",
"(",
")",
".",
"length",
";",
"}"
] |
public override long GetSize(){return GetCachedBytes().Length;}
|
train
| false
|
3,641
|
public DescribeImageAttributeRequest(String imageId, ImageAttributeName attribute) {setImageId(imageId);setAttribute(attribute.toString());}
|
[
"public",
"DescribeImageAttributeRequest",
"(",
"String",
"imageId",
",",
"ImageAttributeName",
"attribute",
")",
"{",
"setImageId",
"(",
"imageId",
")",
";",
"setAttribute",
"(",
"attribute",
".",
"toString",
"(",
")",
")",
";",
"}"
] |
public DescribeImageAttributeRequest(string imageId, ImageAttributeName attribute){_imageId = imageId;_attribute = attribute;}
|
train
| false
|
3,642
|
public HSSFAnchor() {createEscherAnchor();}
|
[
"public",
"HSSFAnchor",
"(",
")",
"{",
"createEscherAnchor",
"(",
")",
";",
"}"
] |
public HSSFAnchor(){CreateEscherAnchor();}
|
train
| false
|
3,643
|
public V setValue(V object) {V result = value;value = object;return result;}
|
[
"public",
"V",
"setValue",
"(",
"V",
"object",
")",
"{",
"V",
"result",
"=",
"value",
";",
"value",
"=",
"object",
";",
"return",
"result",
";",
"}"
] |
public virtual V setValue(V @object){V result = value;value = @object;return result;}
|
train
| false
|
3,644
|
public void readFully(byte[] buffer, int off, int len) {checkPosition(len);read(buffer, off, len);}
|
[
"public",
"void",
"readFully",
"(",
"byte",
"[",
"]",
"buffer",
",",
"int",
"off",
",",
"int",
"len",
")",
"{",
"checkPosition",
"(",
"len",
")",
";",
"read",
"(",
"buffer",
",",
"off",
",",
"len",
")",
";",
"}"
] |
public void ReadFully(byte[] buf, int off, int len){CheckPosition(len);System.Array.Copy(_buf, _ReadIndex, buf, off, len);_ReadIndex += len;}
|
train
| false
|
3,645
|
public CancelDomainTransferToAnotherAwsAccountResult cancelDomainTransferToAnotherAwsAccount(CancelDomainTransferToAnotherAwsAccountRequest request) {request = beforeClientExecution(request);return executeCancelDomainTransferToAnotherAwsAccount(request);}
|
[
"public",
"CancelDomainTransferToAnotherAwsAccountResult",
"cancelDomainTransferToAnotherAwsAccount",
"(",
"CancelDomainTransferToAnotherAwsAccountRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCancelDomainTransferToAnotherAwsAccount",
"(",
"request",
")",
";",
"}"
] |
public virtual CancelDomainTransferToAnotherAwsAccountResponse CancelDomainTransferToAnotherAwsAccount(CancelDomainTransferToAnotherAwsAccountRequest request){var options = new InvokeOptions();options.RequestMarshaller = CancelDomainTransferToAnotherAwsAccountRequestMarshaller.Instance;options.ResponseUnmarshaller = CancelDomainTransferToAnotherAwsAccountResponseUnmarshaller.Instance;return Invoke<CancelDomainTransferToAnotherAwsAccountResponse>(request, options);}
|
train
| false
|
3,646
|
public RecognizeCelebritiesResult recognizeCelebrities(RecognizeCelebritiesRequest request) {request = beforeClientExecution(request);return executeRecognizeCelebrities(request);}
|
[
"public",
"RecognizeCelebritiesResult",
"recognizeCelebrities",
"(",
"RecognizeCelebritiesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeRecognizeCelebrities",
"(",
"request",
")",
";",
"}"
] |
public virtual RecognizeCelebritiesResponse RecognizeCelebrities(RecognizeCelebritiesRequest request){var options = new InvokeOptions();options.RequestMarshaller = RecognizeCelebritiesRequestMarshaller.Instance;options.ResponseUnmarshaller = RecognizeCelebritiesResponseUnmarshaller.Instance;return Invoke<RecognizeCelebritiesResponse>(request, options);}
|
train
| true
|
3,647
|
public SideBandOutputStream(int chan, int sz, OutputStream os) {if (chan <= 0 || chan > 255)throw new IllegalArgumentException(MessageFormat.format(JGitText.get().channelMustBeInRange1_255,Integer.valueOf(chan)));if (sz <= HDR_SIZE)throw new IllegalArgumentException(MessageFormat.format(JGitText.get().packetSizeMustBeAtLeast,Integer.valueOf(sz), Integer.valueOf(HDR_SIZE)));else if (MAX_BUF < sz)throw new IllegalArgumentException(MessageFormat.format(JGitText.get().packetSizeMustBeAtMost, Integer.valueOf(sz),Integer.valueOf(MAX_BUF)));out = os;buffer = new byte[sz];buffer[4] = (byte) chan;cnt = HDR_SIZE;}
|
[
"public",
"SideBandOutputStream",
"(",
"int",
"chan",
",",
"int",
"sz",
",",
"OutputStream",
"os",
")",
"{",
"if",
"(",
"chan",
"<=",
"0",
"||",
"chan",
">",
"255",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"MessageFormat",
".",
"format",
"(",
"JGitText",
".",
"get",
"(",
")",
".",
"channelMustBeInRange1_255",
",",
"Integer",
".",
"valueOf",
"(",
"chan",
")",
")",
")",
";",
"if",
"(",
"sz",
"<=",
"HDR_SIZE",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"MessageFormat",
".",
"format",
"(",
"JGitText",
".",
"get",
"(",
")",
".",
"packetSizeMustBeAtLeast",
",",
"Integer",
".",
"valueOf",
"(",
"sz",
")",
",",
"Integer",
".",
"valueOf",
"(",
"HDR_SIZE",
")",
")",
")",
";",
"else",
"if",
"(",
"MAX_BUF",
"<",
"sz",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"MessageFormat",
".",
"format",
"(",
"JGitText",
".",
"get",
"(",
")",
".",
"packetSizeMustBeAtMost",
",",
"Integer",
".",
"valueOf",
"(",
"sz",
")",
",",
"Integer",
".",
"valueOf",
"(",
"MAX_BUF",
")",
")",
")",
";",
"out",
"=",
"os",
";",
"buffer",
"=",
"new",
"byte",
"[",
"sz",
"]",
";",
"buffer",
"[",
"4",
"]",
"=",
"(",
"byte",
")",
"chan",
";",
"cnt",
"=",
"HDR_SIZE",
";",
"}"
] |
public SideBandOutputStream(int chan, int sz, OutputStream os){if (chan <= 0 || chan > 255){throw new ArgumentException(MessageFormat.Format(JGitText.Get().channelMustBeInRange0_255, Sharpen.Extensions.ValueOf(chan)));}if (sz <= HDR_SIZE){throw new ArgumentException(MessageFormat.Format(JGitText.Get().packetSizeMustBeAtLeast, Sharpen.Extensions.ValueOf(sz), Sharpen.Extensions.ValueOf(HDR_SIZE)));}else{if (MAX_BUF < sz){throw new ArgumentException(MessageFormat.Format(JGitText.Get().packetSizeMustBeAtMost, Sharpen.Extensions.ValueOf(sz), Sharpen.Extensions.ValueOf(MAX_BUF)));}}@out = os;buffer = new byte[sz];buffer[4] = unchecked((byte)chan);cnt = HDR_SIZE;}
|
train
| false
|
3,649
|
public String format(List<RevCommit> squashedCommits, Ref target) {StringBuilder sb = new StringBuilder();sb.append("Squashed commit of the following:\n"); for (RevCommit c : squashedCommits) {sb.append("\ncommit "); sb.append(c.getName());sb.append("\n"); sb.append(toString(c.getAuthorIdent()));sb.append("\n\t"); sb.append(c.getShortMessage());sb.append("\n"); }return sb.toString();}
|
[
"public",
"String",
"format",
"(",
"List",
"<",
"RevCommit",
">",
"squashedCommits",
",",
"Ref",
"target",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"sb",
".",
"append",
"(",
"\"Squashed commit of the following:\\n\"",
")",
";",
"for",
"(",
"RevCommit",
"c",
":",
"squashedCommits",
")",
"{",
"sb",
".",
"append",
"(",
"\"\\ncommit \"",
")",
";",
"sb",
".",
"append",
"(",
"c",
".",
"getName",
"(",
")",
")",
";",
"sb",
".",
"append",
"(",
"\"\\n\"",
")",
";",
"sb",
".",
"append",
"(",
"toString",
"(",
"c",
".",
"getAuthorIdent",
"(",
")",
")",
")",
";",
"sb",
".",
"append",
"(",
"\"\\n\\t\"",
")",
";",
"sb",
".",
"append",
"(",
"c",
".",
"getShortMessage",
"(",
")",
")",
";",
"sb",
".",
"append",
"(",
"\"\\n\"",
")",
";",
"}",
"return",
"sb",
".",
"toString",
"(",
")",
";",
"}"
] |
public virtual string Format(IList<RevCommit> squashedCommits, Ref target){StringBuilder sb = new StringBuilder();sb.Append("Squashed commit of the following:\n");foreach (RevCommit c in squashedCommits){sb.Append("\ncommit ");sb.Append(c.GetName());sb.Append("\n");sb.Append(ToString(c.GetAuthorIdent()));sb.Append("\n\t");sb.Append(c.GetShortMessage());sb.Append("\n");}return sb.ToString();}
|
train
| false
|
3,650
|
public int stem(char s[], int len) {if (len < 3 || s[len-1] != 's')return len;switch(s[len-2]) {case 'u':case 's': return len;case 'e':if (len > 3 && s[len-3] == 'i' && s[len-4] != 'a' && s[len-4] != 'e') {s[len - 3] = 'y';return len - 2;}if (s[len-3] == 'i' || s[len-3] == 'a' || s[len-3] == 'o' || s[len-3] == 'e')return len; default: return len - 1;}}
|
[
"public",
"int",
"stem",
"(",
"char",
"s",
"[",
"]",
",",
"int",
"len",
")",
"{",
"if",
"(",
"len",
"<",
"3",
"||",
"s",
"[",
"len",
"-",
"1",
"]",
"!=",
"'s'",
")",
"return",
"len",
";",
"switch",
"(",
"s",
"[",
"len",
"-",
"2",
"]",
")",
"{",
"case",
"'u'",
":",
"case",
"'s'",
":",
"return",
"len",
";",
"case",
"'e'",
":",
"if",
"(",
"len",
">",
"3",
"&&",
"s",
"[",
"len",
"-",
"3",
"]",
"==",
"'i'",
"&&",
"s",
"[",
"len",
"-",
"4",
"]",
"!=",
"'a'",
"&&",
"s",
"[",
"len",
"-",
"4",
"]",
"!=",
"'e'",
")",
"{",
"s",
"[",
"len",
"-",
"3",
"]",
"=",
"'y'",
";",
"return",
"len",
"-",
"2",
";",
"}",
"if",
"(",
"s",
"[",
"len",
"-",
"3",
"]",
"==",
"'i'",
"||",
"s",
"[",
"len",
"-",
"3",
"]",
"==",
"'a'",
"||",
"s",
"[",
"len",
"-",
"3",
"]",
"==",
"'o'",
"||",
"s",
"[",
"len",
"-",
"3",
"]",
"==",
"'e'",
")",
"return",
"len",
";",
"default",
":",
"return",
"len",
"-",
"1",
";",
"}",
"}"
] |
public virtual int Stem(char[] s, int len){if (len < 3 || s[len - 1] != 's'){return len;}switch (s[len - 2]){case 'u':case 's':return len;case 'e':if (len > 3 && s[len - 3] == 'i' && s[len - 4] != 'a' && s[len - 4] != 'e'){s[len - 3] = 'y';return len - 2;}if (s[len - 3] == 'i' || s[len - 3] == 'a' || s[len - 3] == 'o' || s[len - 3] == 'e'){return len; }break;}return len - 1;}
|
train
| false
|
3,651
|
public TermsQueryBuilder(Analyzer analyzer) {this.analyzer = analyzer;}
|
[
"public",
"TermsQueryBuilder",
"(",
"Analyzer",
"analyzer",
")",
"{",
"this",
".",
"analyzer",
"=",
"analyzer",
";",
"}"
] |
public TermsQueryBuilder(Analyzer analyzer){this.analyzer = analyzer;}
|
train
| false
|
3,652
|
public CreateDomainRequest(String domainName) {setDomainName(domainName);}
|
[
"public",
"CreateDomainRequest",
"(",
"String",
"domainName",
")",
"{",
"setDomainName",
"(",
"domainName",
")",
";",
"}"
] |
public CreateDomainRequest(string domainName){_domainName = domainName;}
|
train
| false
|
3,653
|
public Trie optimize(Trie orig) {List<CharSequence> cmds = orig.cmds;List<Row> rows = new ArrayList<>();List<Row> orows = orig.rows;int remap[] = new int[orows.size()];for (int j = orows.size() - 1; j >= 0; j--) {Row now = new Remap(orows.get(j), remap);boolean merged = false;for (int i = 0; i < rows.size(); i++) {Row q = merge(now, rows.get(i));if (q != null) {rows.set(i, q);merged = true;remap[j] = i;break;}}if (merged == false) {remap[j] = rows.size();rows.add(now);}}int root = remap[orig.root];Arrays.fill(remap, -1);rows = removeGaps(root, rows, new ArrayList<Row>(), remap);return new Trie(orig.forward, remap[root], cmds, rows);}
|
[
"public",
"Trie",
"optimize",
"(",
"Trie",
"orig",
")",
"{",
"List",
"<",
"CharSequence",
">",
"cmds",
"=",
"orig",
".",
"cmds",
";",
"List",
"<",
"Row",
">",
"rows",
"=",
"new",
"ArrayList",
"<",
">",
"(",
")",
";",
"List",
"<",
"Row",
">",
"orows",
"=",
"orig",
".",
"rows",
";",
"int",
"remap",
"[",
"]",
"=",
"new",
"int",
"[",
"orows",
".",
"size",
"(",
")",
"]",
";",
"for",
"(",
"int",
"j",
"=",
"orows",
".",
"size",
"(",
")",
"-",
"1",
";",
"j",
">=",
"0",
";",
"j",
"--",
")",
"{",
"Row",
"now",
"=",
"new",
"Remap",
"(",
"orows",
".",
"get",
"(",
"j",
")",
",",
"remap",
")",
";",
"boolean",
"merged",
"=",
"false",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"rows",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"Row",
"q",
"=",
"merge",
"(",
"now",
",",
"rows",
".",
"get",
"(",
"i",
")",
")",
";",
"if",
"(",
"q",
"!=",
"null",
")",
"{",
"rows",
".",
"set",
"(",
"i",
",",
"q",
")",
";",
"merged",
"=",
"true",
";",
"remap",
"[",
"j",
"]",
"=",
"i",
";",
"break",
";",
"}",
"}",
"if",
"(",
"merged",
"==",
"false",
")",
"{",
"remap",
"[",
"j",
"]",
"=",
"rows",
".",
"size",
"(",
")",
";",
"rows",
".",
"add",
"(",
"now",
")",
";",
"}",
"}",
"int",
"root",
"=",
"remap",
"[",
"orig",
".",
"root",
"]",
";",
"Arrays",
".",
"fill",
"(",
"remap",
",",
"-",
"1",
")",
";",
"rows",
"=",
"removeGaps",
"(",
"root",
",",
"rows",
",",
"new",
"ArrayList",
"<",
"Row",
">",
"(",
")",
",",
"remap",
")",
";",
"return",
"new",
"Trie",
"(",
"orig",
".",
"forward",
",",
"remap",
"[",
"root",
"]",
",",
"cmds",
",",
"rows",
")",
";",
"}"
] |
public override Trie Optimize(Trie orig){IList<string> cmds = orig.cmds;IList<Row> rows = new List<Row>();IList<Row> orows = orig.rows;int[] remap = new int[orows.Count];for (int j = orows.Count - 1; j >= 0; j--){Row now = new Remap(orows[j], remap);bool merged = false;for (int i = 0; i < rows.Count; i++){Row q = Merge(now, rows[i]);if (q != null){rows[i] = q;merged = true;remap[j] = i;break;}}if (merged == false){remap[j] = rows.Count;rows.Add(now);}}int root = remap[orig.root];Arrays.Fill(remap, -1);rows = RemoveGaps(root, rows, new List<Row>(), remap);return new Trie(orig.forward, remap[root], cmds, rows);}
|
train
| false
|
3,654
|
public final boolean isFirstCell(int rowIx, int colIx) {CellRangeAddress8Bit r = getRange();return r.getFirstRow() == rowIx && r.getFirstColumn() == colIx;}
|
[
"public",
"final",
"boolean",
"isFirstCell",
"(",
"int",
"rowIx",
",",
"int",
"colIx",
")",
"{",
"CellRangeAddress8Bit",
"r",
"=",
"getRange",
"(",
")",
";",
"return",
"r",
".",
"getFirstRow",
"(",
")",
"==",
"rowIx",
"&&",
"r",
".",
"getFirstColumn",
"(",
")",
"==",
"colIx",
";",
"}"
] |
public bool IsFirstCell(int rowIx, int colIx){CellRangeAddress8Bit r = Range;return r.FirstRow == rowIx && r.FirstColumn == colIx;}
|
train
| false
|
3,655
|
public CompleteLayerUploadResult completeLayerUpload(CompleteLayerUploadRequest request) {request = beforeClientExecution(request);return executeCompleteLayerUpload(request);}
|
[
"public",
"CompleteLayerUploadResult",
"completeLayerUpload",
"(",
"CompleteLayerUploadRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCompleteLayerUpload",
"(",
"request",
")",
";",
"}"
] |
public virtual CompleteLayerUploadResponse CompleteLayerUpload(CompleteLayerUploadRequest request){var options = new InvokeOptions();options.RequestMarshaller = CompleteLayerUploadRequestMarshaller.Instance;options.ResponseUnmarshaller = CompleteLayerUploadResponseUnmarshaller.Instance;return Invoke<CompleteLayerUploadResponse>(request, options);}
|
train
| true
|
3,656
|
public StopHumanLoopResult stopHumanLoop(StopHumanLoopRequest request) {request = beforeClientExecution(request);return executeStopHumanLoop(request);}
|
[
"public",
"StopHumanLoopResult",
"stopHumanLoop",
"(",
"StopHumanLoopRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeStopHumanLoop",
"(",
"request",
")",
";",
"}"
] |
public virtual StopHumanLoopResponse StopHumanLoop(StopHumanLoopRequest request){var options = new InvokeOptions();options.RequestMarshaller = StopHumanLoopRequestMarshaller.Instance;options.ResponseUnmarshaller = StopHumanLoopResponseUnmarshaller.Instance;return Invoke<StopHumanLoopResponse>(request, options);}
|
train
| false
|
3,657
|
public RevCommit getSourceCommit() {return outCandidate.sourceCommit;}
|
[
"public",
"RevCommit",
"getSourceCommit",
"(",
")",
"{",
"return",
"outCandidate",
".",
"sourceCommit",
";",
"}"
] |
public virtual RevCommit GetSourceCommit(){return currentSource.sourceCommit;}
|
train
| false
|
3,658
|
public synchronized Object getPerfObject(String key) {return perfObjects.get(key);}
|
[
"public",
"synchronized",
"Object",
"getPerfObject",
"(",
"String",
"key",
")",
"{",
"return",
"perfObjects",
".",
"get",
"(",
"key",
")",
";",
"}"
] |
public virtual object GetPerfObject(string key){lock (this){object result;perfObjects.TryGetValue(key, out result);return result;}}
|
train
| false
|
3,659
|
public TokenStream create(TokenStream input) {return new HindiStemFilter(input);}
|
[
"public",
"TokenStream",
"create",
"(",
"TokenStream",
"input",
")",
"{",
"return",
"new",
"HindiStemFilter",
"(",
"input",
")",
";",
"}"
] |
public override TokenStream Create(TokenStream input){return new HindiStemFilter(input);}
|
train
| false
|
3,660
|
public static BreakIterator getWordInstance() {return getWordInstance(Locale.getDefault());}
|
[
"public",
"static",
"BreakIterator",
"getWordInstance",
"(",
")",
"{",
"return",
"getWordInstance",
"(",
"Locale",
".",
"getDefault",
"(",
")",
")",
";",
"}"
] |
public static java.text.BreakIterator getWordInstance(){return getWordInstance(System.Globalization.CultureInfo.CurrentCulture);}
|
train
| false
|
3,661
|
public UpdatePublicKeyResult updatePublicKey(UpdatePublicKeyRequest request) {request = beforeClientExecution(request);return executeUpdatePublicKey(request);}
|
[
"public",
"UpdatePublicKeyResult",
"updatePublicKey",
"(",
"UpdatePublicKeyRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdatePublicKey",
"(",
"request",
")",
";",
"}"
] |
public virtual UpdatePublicKeyResponse UpdatePublicKey(UpdatePublicKeyRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdatePublicKeyRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdatePublicKeyResponseUnmarshaller.Instance;return Invoke<UpdatePublicKeyResponse>(request, options);}
|
train
| true
|
3,662
|
public boolean include(RevWalk walker, RevCommit c) {return c.getParentCount() < 2;}
|
[
"public",
"boolean",
"include",
"(",
"RevWalk",
"walker",
",",
"RevCommit",
"c",
")",
"{",
"return",
"c",
".",
"getParentCount",
"(",
")",
"<",
"2",
";",
"}"
] |
public override bool Include(RevWalk walker, RevCommit c){return c.ParentCount < 2;}
|
train
| false
|
3,663
|
public String toString(){StringBuilder buffer = new StringBuilder();buffer.append("[COUNTRY]\n");buffer.append(" .defaultcountry = ").append(Integer.toHexString(getDefaultCountry())).append("\n");buffer.append(" .currentcountry = ").append(Integer.toHexString(getCurrentCountry())).append("\n");buffer.append("[/COUNTRY]\n");return buffer.toString();}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuilder",
"buffer",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"\"[COUNTRY]\\n\"",
")",
";",
"buffer",
".",
"append",
"(",
"\" .defaultcountry = \"",
")",
".",
"append",
"(",
"Integer",
".",
"toHexString",
"(",
"getDefaultCountry",
"(",
")",
")",
")",
".",
"append",
"(",
"\"\\n\"",
")",
";",
"buffer",
".",
"append",
"(",
"\" .currentcountry = \"",
")",
".",
"append",
"(",
"Integer",
".",
"toHexString",
"(",
"getCurrentCountry",
"(",
")",
")",
")",
".",
"append",
"(",
"\"\\n\"",
")",
";",
"buffer",
".",
"append",
"(",
"\"[/COUNTRY]\\n\"",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}"
] |
public override String ToString(){StringBuilder buffer = new StringBuilder();buffer.Append("[COUNTRY]\n");buffer.Append(" .defaultcountry = ").Append(StringUtil.ToHexString(DefaultCountry)).Append("\n");buffer.Append(" .currentcountry = ").Append(StringUtil.ToHexString(CurrentCountry)).Append("\n");buffer.Append("[/COUNTRY]\n");return buffer.ToString();}
|
train
| false
|
3,664
|
public DefaultColWidthRecord clone() {return copy();}
|
[
"public",
"DefaultColWidthRecord",
"clone",
"(",
")",
"{",
"return",
"copy",
"(",
")",
";",
"}"
] |
public override Object Clone(){DefaultColWidthRecord rec = new DefaultColWidthRecord();rec.field_1_col_width = field_1_col_width;return rec;}
|
train
| false
|
3,665
|
public Matcher useAnchoringBounds(boolean value) {anchoringBounds = value;useAnchoringBoundsImpl(address, value);return this;}
|
[
"public",
"Matcher",
"useAnchoringBounds",
"(",
"boolean",
"value",
")",
"{",
"anchoringBounds",
"=",
"value",
";",
"useAnchoringBoundsImpl",
"(",
"address",
",",
"value",
")",
";",
"return",
"this",
";",
"}"
] |
public java.util.regex.Matcher useAnchoringBounds(bool value){anchoringBounds = value;useAnchoringBoundsImpl(address, value);return this;}
|
train
| false
|
3,666
|
public PostingsEnum reset(int[] postings) {this.postings = postings;upto = -2;return this;}
|
[
"public",
"PostingsEnum",
"reset",
"(",
"int",
"[",
"]",
"postings",
")",
"{",
"this",
".",
"postings",
"=",
"postings",
";",
"upto",
"=",
"-",
"2",
";",
"return",
"this",
";",
"}"
] |
public DocsEnum Reset(int[] postings){this.postings = postings;upto = -2;return this;}
|
train
| false
|
3,668
|
public boolean add(final int value){if (_limit == _array.length){growArray(_limit * 2);}_array[ _limit++ ] = value;return true;}
|
[
"public",
"boolean",
"add",
"(",
"final",
"int",
"value",
")",
"{",
"if",
"(",
"_limit",
"==",
"_array",
".",
"length",
")",
"{",
"growArray",
"(",
"_limit",
"*",
"2",
")",
";",
"}",
"_array",
"[",
"_limit",
"++",
"]",
"=",
"value",
";",
"return",
"true",
";",
"}"
] |
public bool Add(int value){if (_limit == _array.Length){growArray(_limit * 2);}_array[_limit++] = value;return true;}
|
train
| false
|
3,669
|
public final int computeIterations(int valueCount, int ramBudget) {final int iterations = ramBudget / (byteBlockCount() + 8 * byteValueCount());if (iterations == 0) {return 1;} else if ((iterations - 1) * byteValueCount() >= valueCount) {return (int) Math.ceil((double) valueCount / byteValueCount());} else {return iterations;}}
|
[
"public",
"final",
"int",
"computeIterations",
"(",
"int",
"valueCount",
",",
"int",
"ramBudget",
")",
"{",
"final",
"int",
"iterations",
"=",
"ramBudget",
"/",
"(",
"byteBlockCount",
"(",
")",
"+",
"8",
"*",
"byteValueCount",
"(",
")",
")",
";",
"if",
"(",
"iterations",
"==",
"0",
")",
"{",
"return",
"1",
";",
"}",
"else",
"if",
"(",
"(",
"iterations",
"-",
"1",
")",
"*",
"byteValueCount",
"(",
")",
">=",
"valueCount",
")",
"{",
"return",
"(",
"int",
")",
"Math",
".",
"ceil",
"(",
"(",
"double",
")",
"valueCount",
"/",
"byteValueCount",
"(",
")",
")",
";",
"}",
"else",
"{",
"return",
"iterations",
";",
"}",
"}"
] |
public int ComputeIterations(int valueCount, int ramBudget){int iterations = ramBudget / (ByteBlockCount + 8 * ByteValueCount);if (iterations == 0){return 1;}else if ((iterations - 1) * ByteValueCount >= valueCount){return (int)Math.Ceiling((double)valueCount / ByteValueCount);}else{return iterations;}}
|
train
| false
|
3,670
|
public NameRecord getNameRecord(int nameIndex) {return getWorkbook().getNameRecord(nameIndex);}
|
[
"public",
"NameRecord",
"getNameRecord",
"(",
"int",
"nameIndex",
")",
"{",
"return",
"getWorkbook",
"(",
")",
".",
"getNameRecord",
"(",
"nameIndex",
")",
";",
"}"
] |
public NameRecord GetNameRecord(int nameIndex){return Workbook.GetNameRecord(nameIndex);}
|
train
| false
|
3,671
|
public DescribeJobResult describeJob(DescribeJobRequest request) {request = beforeClientExecution(request);return executeDescribeJob(request);}
|
[
"public",
"DescribeJobResult",
"describeJob",
"(",
"DescribeJobRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeJob",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeJobResponse DescribeJob(DescribeJobRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeJobRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeJobResponseUnmarshaller.Instance;return Invoke<DescribeJobResponse>(request, options);}
|
train
| true
|
3,672
|
public EscherPropertyMetaData( String description, byte type ){this.description = description;this.type = type;}
|
[
"public",
"EscherPropertyMetaData",
"(",
"String",
"description",
",",
"byte",
"type",
")",
"{",
"this",
".",
"description",
"=",
"description",
";",
"this",
".",
"type",
"=",
"type",
";",
"}"
] |
public EscherPropertyMetaData(String description, byte type){this.description = description;this.type = type;}
|
train
| false
|
3,673
|
public HSSFColor findSimilarColor(int red, int green, int blue) {HSSFColor result = null;int minColorDistance = Integer.MAX_VALUE;byte[] b = _palette.getColor(PaletteRecord.FIRST_COLOR_INDEX);for (short i = PaletteRecord.FIRST_COLOR_INDEX; b != null;b = _palette.getColor(++i)){int colorDistance = Math.abs(red - unsignedInt(b[0])) +Math.abs(green - unsignedInt(b[1])) +Math.abs(blue - unsignedInt(b[2]));if (colorDistance < minColorDistance){minColorDistance = colorDistance;result = getColor(i);}}return result;}
|
[
"public",
"HSSFColor",
"findSimilarColor",
"(",
"int",
"red",
",",
"int",
"green",
",",
"int",
"blue",
")",
"{",
"HSSFColor",
"result",
"=",
"null",
";",
"int",
"minColorDistance",
"=",
"Integer",
".",
"MAX_VALUE",
";",
"byte",
"[",
"]",
"b",
"=",
"_palette",
".",
"getColor",
"(",
"PaletteRecord",
".",
"FIRST_COLOR_INDEX",
")",
";",
"for",
"(",
"short",
"i",
"=",
"PaletteRecord",
".",
"FIRST_COLOR_INDEX",
";",
"b",
"!=",
"null",
";",
"b",
"=",
"_palette",
".",
"getColor",
"(",
"++",
"i",
")",
")",
"{",
"int",
"colorDistance",
"=",
"Math",
".",
"abs",
"(",
"red",
"-",
"unsignedInt",
"(",
"b",
"[",
"0",
"]",
")",
")",
"+",
"Math",
".",
"abs",
"(",
"green",
"-",
"unsignedInt",
"(",
"b",
"[",
"1",
"]",
")",
")",
"+",
"Math",
".",
"abs",
"(",
"blue",
"-",
"unsignedInt",
"(",
"b",
"[",
"2",
"]",
")",
")",
";",
"if",
"(",
"colorDistance",
"<",
"minColorDistance",
")",
"{",
"minColorDistance",
"=",
"colorDistance",
";",
"result",
"=",
"getColor",
"(",
"i",
")",
";",
"}",
"}",
"return",
"result",
";",
"}"
] |
public HSSFColor FindSimilarColor(byte red, byte green, byte blue){HSSFColor result = null;int minColorDistance = int.MaxValue;byte[] b = palette.GetColor(PaletteRecord.FIRST_COLOR_INDEX);for (short i = (short)PaletteRecord.FIRST_COLOR_INDEX; b != null;b = palette.GetColor(++i)){int colorDistance = Math.Abs(red - b[0]) +Math.Abs(green - b[1]) + Math.Abs(blue - b[2]);if (colorDistance < minColorDistance){minColorDistance = colorDistance;result = GetColor(i);}}return result;}
|
train
| false
|
3,674
|
public synchronized StringBuffer deleteCharAt(int location) {deleteCharAt0(location);return this;}
|
[
"public",
"synchronized",
"StringBuffer",
"deleteCharAt",
"(",
"int",
"location",
")",
"{",
"deleteCharAt0",
"(",
"location",
")",
";",
"return",
"this",
";",
"}"
] |
public java.lang.StringBuffer deleteCharAt(int location){lock (this){deleteCharAt0(location);return this;}}
|
train
| false
|
3,675
|
public PathFilter clone() {return this;}
|
[
"public",
"PathFilter",
"clone",
"(",
")",
"{",
"return",
"this",
";",
"}"
] |
public override TreeFilter Clone(){return this;}
|
train
| false
|
3,676
|
public String toString() {if (isEmpty()) {return "[]";}StringBuilder buffer = new StringBuilder(size() * 16);buffer.append('[');Iterator<?> it = iterator();while (it.hasNext()) {Object next = it.next();if (next != this) {buffer.append(next);} else {buffer.append("(this Collection)");}if (it.hasNext()) {buffer.append(", ");}}buffer.append(']');return buffer.toString();}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"if",
"(",
"isEmpty",
"(",
")",
")",
"{",
"return",
"\"[]\"",
";",
"}",
"StringBuilder",
"buffer",
"=",
"new",
"StringBuilder",
"(",
"size",
"(",
")",
"*",
"16",
")",
";",
"buffer",
".",
"append",
"(",
"'['",
")",
";",
"Iterator",
"<",
"?",
">",
"it",
"=",
"iterator",
"(",
")",
";",
"while",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"Object",
"next",
"=",
"it",
".",
"next",
"(",
")",
";",
"if",
"(",
"next",
"!=",
"this",
")",
"{",
"buffer",
".",
"append",
"(",
"next",
")",
";",
"}",
"else",
"{",
"buffer",
".",
"append",
"(",
"\"(this Collection)\"",
")",
";",
"}",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"buffer",
".",
"append",
"(",
"\", \"",
")",
";",
"}",
"}",
"buffer",
".",
"append",
"(",
"']'",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}"
] |
public override string ToString(){if (isEmpty()){return "[]";}java.lang.StringBuilder buffer = new java.lang.StringBuilder(size() * 16);buffer.append('[');java.util.Iterator<E> it = iterator();while (it.hasNext()){object next = it.next();if (next != this){buffer.append(next);}else{buffer.append("(this Collection)");}if (it.hasNext()){buffer.append(", ");}}buffer.append(']');return buffer.ToString();}
|
train
| false
|
3,677
|
public synchronized void close() throws IOException {buffer = null;notifyAll();}
|
[
"public",
"synchronized",
"void",
"close",
"(",
")",
"throws",
"IOException",
"{",
"buffer",
"=",
"null",
";",
"notifyAll",
"(",
")",
";",
"}"
] |
public override void close(){throw new System.NotImplementedException();}
|
train
| false
|
3,678
|
public String toString() {return "ShardIter(shard=" + shardIndex + ")";}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"\"ShardIter(shard=\"",
"+",
"shardIndex",
"+",
"\")\"",
";",
"}"
] |
public override string ToString(){return "ShardIter(shard=" + shardIndex + ")";}
|
train
| false
|
3,679
|
public JobParameters(String format, String type, String archiveId, String description) {setFormat(format);setType(type);setArchiveId(archiveId);setDescription(description);}
|
[
"public",
"JobParameters",
"(",
"String",
"format",
",",
"String",
"type",
",",
"String",
"archiveId",
",",
"String",
"description",
")",
"{",
"setFormat",
"(",
"format",
")",
";",
"setType",
"(",
"type",
")",
";",
"setArchiveId",
"(",
"archiveId",
")",
";",
"setDescription",
"(",
"description",
")",
";",
"}"
] |
public JobParameters(string format, string type, string archiveId, string description){_format = format;_type = type;_archiveId = archiveId;_description = description;}
|
train
| false
|
3,680
|
public IntBuffer get(int[] dst) {return get(dst, 0, dst.length);}
|
[
"public",
"IntBuffer",
"get",
"(",
"int",
"[",
"]",
"dst",
")",
"{",
"return",
"get",
"(",
"dst",
",",
"0",
",",
"dst",
".",
"length",
")",
";",
"}"
] |
public virtual java.nio.IntBuffer get(int[] dst){return get(dst, 0, dst.Length);}
|
train
| false
|
3,681
|
public SupBookRecord(String url, String[] sheetNames) {field_1_number_of_sheets = (short) sheetNames.length;field_2_encoded_url = url;field_3_sheet_names = sheetNames;_isAddInFunctions = false;}
|
[
"public",
"SupBookRecord",
"(",
"String",
"url",
",",
"String",
"[",
"]",
"sheetNames",
")",
"{",
"field_1_number_of_sheets",
"=",
"(",
"short",
")",
"sheetNames",
".",
"length",
";",
"field_2_encoded_url",
"=",
"url",
";",
"field_3_sheet_names",
"=",
"sheetNames",
";",
"_isAddInFunctions",
"=",
"false",
";",
"}"
] |
public SupBookRecord(String url, String[] sheetNames){field_1_number_of_sheets = (short)sheetNames.Length;field_2_encoded_url = url;field_3_sheet_names = sheetNames;_isAddInFunctions = false;}
|
train
| false
|
3,682
|
public SeriesLabelsRecord(RecordInputStream in) {field_1_formatFlags = in.readShort();}
|
[
"public",
"SeriesLabelsRecord",
"(",
"RecordInputStream",
"in",
")",
"{",
"field_1_formatFlags",
"=",
"in",
".",
"readShort",
"(",
")",
";",
"}"
] |
public SeriesLabelsRecord(RecordInputStream in1){field_1_formatFlags = in1.ReadShort();}
|
train
| false
|
3,683
|
public DescribeAssessmentRunsResult describeAssessmentRuns(DescribeAssessmentRunsRequest request) {request = beforeClientExecution(request);return executeDescribeAssessmentRuns(request);}
|
[
"public",
"DescribeAssessmentRunsResult",
"describeAssessmentRuns",
"(",
"DescribeAssessmentRunsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeAssessmentRuns",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeAssessmentRunsResponse DescribeAssessmentRuns(DescribeAssessmentRunsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeAssessmentRunsRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeAssessmentRunsResponseUnmarshaller.Instance;return Invoke<DescribeAssessmentRunsResponse>(request, options);}
|
train
| true
|
3,684
|
public DescribeClassicLinkInstancesResult describeClassicLinkInstances(DescribeClassicLinkInstancesRequest request) {request = beforeClientExecution(request);return executeDescribeClassicLinkInstances(request);}
|
[
"public",
"DescribeClassicLinkInstancesResult",
"describeClassicLinkInstances",
"(",
"DescribeClassicLinkInstancesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeClassicLinkInstances",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeClassicLinkInstancesResponse DescribeClassicLinkInstances(DescribeClassicLinkInstancesRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeClassicLinkInstancesRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeClassicLinkInstancesResponseUnmarshaller.Instance;return Invoke<DescribeClassicLinkInstancesResponse>(request, options);}
|
train
| true
|
3,685
|
public byte[] getByteBlock() {return new byte[blockSize];}
|
[
"public",
"byte",
"[",
"]",
"getByteBlock",
"(",
")",
"{",
"return",
"new",
"byte",
"[",
"blockSize",
"]",
";",
"}"
] |
public virtual byte[] GetByteBlock(){return new byte[m_blockSize];}
|
train
| false
|
3,686
|
public SeriesIndexRecord clone() {return copy();}
|
[
"public",
"SeriesIndexRecord",
"clone",
"(",
")",
"{",
"return",
"copy",
"(",
")",
";",
"}"
] |
public override Object Clone(){SeriesIndexRecord rec = new SeriesIndexRecord();rec.field_1_index = field_1_index;return rec;}
|
train
| false
|
3,687
|
public RegisterToWorkMailResult registerToWorkMail(RegisterToWorkMailRequest request) {request = beforeClientExecution(request);return executeRegisterToWorkMail(request);}
|
[
"public",
"RegisterToWorkMailResult",
"registerToWorkMail",
"(",
"RegisterToWorkMailRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeRegisterToWorkMail",
"(",
"request",
")",
";",
"}"
] |
public virtual RegisterToWorkMailResponse RegisterToWorkMail(RegisterToWorkMailRequest request){var options = new InvokeOptions();options.RequestMarshaller = RegisterToWorkMailRequestMarshaller.Instance;options.ResponseUnmarshaller = RegisterToWorkMailResponseUnmarshaller.Instance;return Invoke<RegisterToWorkMailResponse>(request, options);}
|
train
| true
|
3,688
|
public DeleteCollectionRequest() {super("cr", "2016-06-07", "DeleteCollection", "cr");setUriPattern("/collections/[CollectionId]");setMethod(MethodType.DELETE);}
|
[
"public",
"DeleteCollectionRequest",
"(",
")",
"{",
"super",
"(",
"\"cr\"",
",",
"\"2016-06-07\"",
",",
"\"DeleteCollection\"",
",",
"\"cr\"",
")",
";",
"setUriPattern",
"(",
"\"/collections/[CollectionId]\"",
")",
";",
"setMethod",
"(",
"MethodType",
".",
"DELETE",
")",
";",
"}"
] |
public DeleteCollectionRequest(): base("cr", "2016-06-07", "DeleteCollection", "cr", "openAPI"){UriPattern = "/collections/[CollectionId]";Method = MethodType.DELETE;}
|
train
| false
|
3,689
|
public Cluster deleteCluster(DeleteClusterRequest request) {request = beforeClientExecution(request);return executeDeleteCluster(request);}
|
[
"public",
"Cluster",
"deleteCluster",
"(",
"DeleteClusterRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteCluster",
"(",
"request",
")",
";",
"}"
] |
public virtual DeleteClusterResponse DeleteCluster(DeleteClusterRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteClusterRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteClusterResponseUnmarshaller.Instance;return Invoke<DeleteClusterResponse>(request, options);}
|
train
| true
|
3,690
|
public static double tanh(double d) {double ePowX = Math.pow(Math.E, d);double ePowNegX = Math.pow(Math.E, -d);return (ePowX - ePowNegX) / (ePowX + ePowNegX);}
|
[
"public",
"static",
"double",
"tanh",
"(",
"double",
"d",
")",
"{",
"double",
"ePowX",
"=",
"Math",
".",
"pow",
"(",
"Math",
".",
"E",
",",
"d",
")",
";",
"double",
"ePowNegX",
"=",
"Math",
".",
"pow",
"(",
"Math",
".",
"E",
",",
"-",
"d",
")",
";",
"return",
"(",
"ePowX",
"-",
"ePowNegX",
")",
"/",
"(",
"ePowX",
"+",
"ePowNegX",
")",
";",
"}"
] |
public static double Tanh(double d){double ePowX = Math.Pow(Math.E, d);double ePowNegX = Math.Pow(Math.E, -d);d = (ePowX - ePowNegX) / (ePowX + ePowNegX);return d;}
|
train
| false
|
3,691
|
public CharsRef common(CharsRef output1, CharsRef output2) {assert output1 != null;assert output2 != null;int pos1 = output1.offset;int pos2 = output2.offset;int stopAt1 = pos1 + Math.min(output1.length, output2.length);while(pos1 < stopAt1) {if (output1.chars[pos1] != output2.chars[pos2]) {break;}pos1++;pos2++;}if (pos1 == output1.offset) {return NO_OUTPUT;} else if (pos1 == output1.offset + output1.length) {return output1;} else if (pos2 == output2.offset + output2.length) {return output2;} else {return new CharsRef(output1.chars, output1.offset, pos1-output1.offset);}}
|
[
"public",
"CharsRef",
"common",
"(",
"CharsRef",
"output1",
",",
"CharsRef",
"output2",
")",
"{",
"assert",
"output1",
"!=",
"null",
";",
"assert",
"output2",
"!=",
"null",
";",
"int",
"pos1",
"=",
"output1",
".",
"offset",
";",
"int",
"pos2",
"=",
"output2",
".",
"offset",
";",
"int",
"stopAt1",
"=",
"pos1",
"+",
"Math",
".",
"min",
"(",
"output1",
".",
"length",
",",
"output2",
".",
"length",
")",
";",
"while",
"(",
"pos1",
"<",
"stopAt1",
")",
"{",
"if",
"(",
"output1",
".",
"chars",
"[",
"pos1",
"]",
"!=",
"output2",
".",
"chars",
"[",
"pos2",
"]",
")",
"{",
"break",
";",
"}",
"pos1",
"++",
";",
"pos2",
"++",
";",
"}",
"if",
"(",
"pos1",
"==",
"output1",
".",
"offset",
")",
"{",
"return",
"NO_OUTPUT",
";",
"}",
"else",
"if",
"(",
"pos1",
"==",
"output1",
".",
"offset",
"+",
"output1",
".",
"length",
")",
"{",
"return",
"output1",
";",
"}",
"else",
"if",
"(",
"pos2",
"==",
"output2",
".",
"offset",
"+",
"output2",
".",
"length",
")",
"{",
"return",
"output2",
";",
"}",
"else",
"{",
"return",
"new",
"CharsRef",
"(",
"output1",
".",
"chars",
",",
"output1",
".",
"offset",
",",
"pos1",
"-",
"output1",
".",
"offset",
")",
";",
"}",
"}"
] |
public override CharsRef Common(CharsRef output1, CharsRef output2){Debug.Assert(output1 != null);Debug.Assert(output2 != null);int pos1 = output1.Offset;int pos2 = output2.Offset;int stopAt1 = pos1 + Math.Min(output1.Length, output2.Length);while (pos1 < stopAt1){if (output1.Chars[pos1] != output2.Chars[pos2]){break;}pos1++;pos2++;}if (pos1 == output1.Offset){return NO_OUTPUT;}else if (pos1 == output1.Offset + output1.Length){return output1;}else if (pos2 == output2.Offset + output2.Length){return output2;}else{return new CharsRef(output1.Chars, output1.Offset, pos1 - output1.Offset);}}
|
train
| false
|
3,692
|
public GetExclusionsPreviewResult getExclusionsPreview(GetExclusionsPreviewRequest request) {request = beforeClientExecution(request);return executeGetExclusionsPreview(request);}
|
[
"public",
"GetExclusionsPreviewResult",
"getExclusionsPreview",
"(",
"GetExclusionsPreviewRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetExclusionsPreview",
"(",
"request",
")",
";",
"}"
] |
public virtual GetExclusionsPreviewResponse GetExclusionsPreview(GetExclusionsPreviewRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetExclusionsPreviewRequestMarshaller.Instance;options.ResponseUnmarshaller = GetExclusionsPreviewResponseUnmarshaller.Instance;return Invoke<GetExclusionsPreviewResponse>(request, options);}
|
train
| true
|
3,693
|
public KeepWordFilterFactory(Map<String,String> args) {super(args);wordFiles = get(args, "words");ignoreCase = getBoolean(args, "ignoreCase", false);if (!args.isEmpty()) {throw new IllegalArgumentException("Unknown parameters: " + args);}}
|
[
"public",
"KeepWordFilterFactory",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"args",
")",
"{",
"super",
"(",
"args",
")",
";",
"wordFiles",
"=",
"get",
"(",
"args",
",",
"\"words\"",
")",
";",
"ignoreCase",
"=",
"getBoolean",
"(",
"args",
",",
"\"ignoreCase\"",
",",
"false",
")",
";",
"if",
"(",
"!",
"args",
".",
"isEmpty",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Unknown parameters: \"",
"+",
"args",
")",
";",
"}",
"}"
] |
public KeepWordFilterFactory(IDictionary<string, string> args): base(args){AssureMatchVersion();wordFiles = Get(args, "words");ignoreCase = GetBoolean(args, "ignoreCase", false);enablePositionIncrements = GetBoolean(args, "enablePositionIncrements", true);if (args.Count > 0){throw new System.ArgumentException("Unknown parameters: " + args);}}
|
train
| false
|
3,694
|
public int uniformCmd(boolean eqSkip) {Iterator<Cell> i = cells.values().iterator();int ret = -1;uniformCnt = 1;uniformSkip = 0;for (; i.hasNext();) {Cell c = i.next();if (c.ref >= 0) {return -1;}if (c.cmd >= 0) {if (ret < 0) {ret = c.cmd;uniformSkip = c.skip;} else if (ret == c.cmd) {if (eqSkip) {if (uniformSkip == c.skip) {uniformCnt++;} else {return -1;}} else {uniformCnt++;}} else {return -1;}}}return ret;}
|
[
"public",
"int",
"uniformCmd",
"(",
"boolean",
"eqSkip",
")",
"{",
"Iterator",
"<",
"Cell",
">",
"i",
"=",
"cells",
".",
"values",
"(",
")",
".",
"iterator",
"(",
")",
";",
"int",
"ret",
"=",
"-",
"1",
";",
"uniformCnt",
"=",
"1",
";",
"uniformSkip",
"=",
"0",
";",
"for",
"(",
";",
"i",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Cell",
"c",
"=",
"i",
".",
"next",
"(",
")",
";",
"if",
"(",
"c",
".",
"ref",
">=",
"0",
")",
"{",
"return",
"-",
"1",
";",
"}",
"if",
"(",
"c",
".",
"cmd",
">=",
"0",
")",
"{",
"if",
"(",
"ret",
"<",
"0",
")",
"{",
"ret",
"=",
"c",
".",
"cmd",
";",
"uniformSkip",
"=",
"c",
".",
"skip",
";",
"}",
"else",
"if",
"(",
"ret",
"==",
"c",
".",
"cmd",
")",
"{",
"if",
"(",
"eqSkip",
")",
"{",
"if",
"(",
"uniformSkip",
"==",
"c",
".",
"skip",
")",
"{",
"uniformCnt",
"++",
";",
"}",
"else",
"{",
"return",
"-",
"1",
";",
"}",
"}",
"else",
"{",
"uniformCnt",
"++",
";",
"}",
"}",
"else",
"{",
"return",
"-",
"1",
";",
"}",
"}",
"}",
"return",
"ret",
";",
"}"
] |
public int UniformCmd(bool eqSkip){int ret = -1;uniformCnt = 1;uniformSkip = 0;foreach (Cell c in cells.Values){if (c.@ref >= 0){return -1;}if (c.cmd >= 0){if (ret < 0){ret = c.cmd;uniformSkip = c.skip;}else if (ret == c.cmd){if (eqSkip){if (uniformSkip == c.skip){uniformCnt++;}else{return -1;}}else{uniformCnt++;}}else{return -1;}}}return ret;}
|
train
| false
|
3,695
|
public ListTypedLinkFacetNamesResult listTypedLinkFacetNames(ListTypedLinkFacetNamesRequest request) {request = beforeClientExecution(request);return executeListTypedLinkFacetNames(request);}
|
[
"public",
"ListTypedLinkFacetNamesResult",
"listTypedLinkFacetNames",
"(",
"ListTypedLinkFacetNamesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListTypedLinkFacetNames",
"(",
"request",
")",
";",
"}"
] |
public virtual ListTypedLinkFacetNamesResponse ListTypedLinkFacetNames(ListTypedLinkFacetNamesRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListTypedLinkFacetNamesRequestMarshaller.Instance;options.ResponseUnmarshaller = ListTypedLinkFacetNamesResponseUnmarshaller.Instance;return Invoke<ListTypedLinkFacetNamesResponse>(request, options);}
|
train
| true
|
3,696
|
public T remove(int index) {if (index == size - 1) {T[] blockRef = directory[toDirectoryIndex(index)];int blockIdx = toBlockIndex(index);T old = blockRef[blockIdx];blockRef[blockIdx] = null;size--;if (0 < tailBlkIdx)tailBlkIdx--;elseresetTailBlock();return old;} else if (index < 0 || size <= index) {throw new IndexOutOfBoundsException(String.valueOf(index));} else {T old = get(index);for (; index < size - 1; index++)set(index, get(index + 1));set(size - 1, null);size--;resetTailBlock();return old;}}
|
[
"public",
"T",
"remove",
"(",
"int",
"index",
")",
"{",
"if",
"(",
"index",
"==",
"size",
"-",
"1",
")",
"{",
"T",
"[",
"]",
"blockRef",
"=",
"directory",
"[",
"toDirectoryIndex",
"(",
"index",
")",
"]",
";",
"int",
"blockIdx",
"=",
"toBlockIndex",
"(",
"index",
")",
";",
"T",
"old",
"=",
"blockRef",
"[",
"blockIdx",
"]",
";",
"blockRef",
"[",
"blockIdx",
"]",
"=",
"null",
";",
"size",
"--",
";",
"if",
"(",
"0",
"<",
"tailBlkIdx",
")",
"tailBlkIdx",
"--",
";",
"elseresetTailBlock",
"(",
")",
";",
"return",
"old",
";",
"}",
"else",
"if",
"(",
"index",
"<",
"0",
"||",
"size",
"<=",
"index",
")",
"{",
"throw",
"new",
"IndexOutOfBoundsException",
"(",
"String",
".",
"valueOf",
"(",
"index",
")",
")",
";",
"}",
"else",
"{",
"T",
"old",
"=",
"get",
"(",
"index",
")",
";",
"for",
"(",
";",
"index",
"<",
"size",
"-",
"1",
";",
"index",
"++",
")",
"set",
"(",
"index",
",",
"get",
"(",
"index",
"+",
"1",
")",
")",
";",
"set",
"(",
"size",
"-",
"1",
",",
"null",
")",
";",
"size",
"--",
";",
"resetTailBlock",
"(",
")",
";",
"return",
"old",
";",
"}",
"}"
] |
public override T Remove(int index){if (index == size - 1){T[] blockRef = directory[ToDirectoryIndex(index)];int blockIdx = ToBlockIndex(index);T old = blockRef[blockIdx];blockRef[blockIdx] = default(T);size--;if (0 < tailBlkIdx){tailBlkIdx--;}else{ResetTailBlock();}return old;}else{if (index < 0 || size <= index){throw new IndexOutOfRangeException(index.ToString());}else{T old = this[index];for (; index < size - 1; index++){Set(index, this[index + 1]);}Set(size - 1, default(T));size--;ResetTailBlock();return old;}}}
|
train
| false
|
3,697
|
public boolean willSoonExpire() {long now = System.currentTimeMillis();return this.roleSessionDurationSeconds * (1 - expireFact) > (expiration - now) / 1000;}
|
[
"public",
"boolean",
"willSoonExpire",
"(",
")",
"{",
"long",
"now",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"return",
"this",
".",
"roleSessionDurationSeconds",
"*",
"(",
"1",
"-",
"expireFact",
")",
">",
"(",
"expiration",
"-",
"now",
")",
"/",
"1000",
";",
"}"
] |
public override bool WillSoonExpire(){return roleSessionDurationSeconds * (1 - expireFact) * 1000 * 1000 * 10 > RemainTicks();}
|
train
| false
|
3,698
|
public GroupingSearch setSortWithinGroup(Sort sortWithinGroup) {this.sortWithinGroup = sortWithinGroup;return this;}
|
[
"public",
"GroupingSearch",
"setSortWithinGroup",
"(",
"Sort",
"sortWithinGroup",
")",
"{",
"this",
".",
"sortWithinGroup",
"=",
"sortWithinGroup",
";",
"return",
"this",
";",
"}"
] |
public virtual GroupingSearch SetSortWithinGroup(Sort sortWithinGroup){this.sortWithinGroup = sortWithinGroup;return this;}
|
train
| false
|
3,699
|
public long ramBytesUsed() {return BASE_RAM_BYTES_USED +((postings!=null) ? RamUsageEstimator.sizeOf(postings) : 0) +((payloads!=null) ? RamUsageEstimator.sizeOf(payloads) : 0);}
|
[
"public",
"long",
"ramBytesUsed",
"(",
")",
"{",
"return",
"BASE_RAM_BYTES_USED",
"+",
"(",
"(",
"postings",
"!=",
"null",
")",
"?",
"RamUsageEstimator",
".",
"sizeOf",
"(",
"postings",
")",
":",
"0",
")",
"+",
"(",
"(",
"payloads",
"!=",
"null",
")",
"?",
"RamUsageEstimator",
".",
"sizeOf",
"(",
"payloads",
")",
":",
"0",
")",
";",
"}"
] |
public override long RamBytesUsed(){return ((postings != null) ? RamUsageEstimator.SizeOf(postings) : 0) +((payloads != null) ? RamUsageEstimator.SizeOf(payloads) : 0);}
|
train
| false
|
3,700
|
public void seek(long pos) throws IOException {final long curFP = getFilePointer();final long skip = pos - curFP;if (skip < 0) {throw new IllegalStateException(getClass() + " cannot seek backwards (pos=" + pos + " getFilePointer()=" + curFP + ")");}skipBytes(skip);}
|
[
"public",
"void",
"seek",
"(",
"long",
"pos",
")",
"throws",
"IOException",
"{",
"final",
"long",
"curFP",
"=",
"getFilePointer",
"(",
")",
";",
"final",
"long",
"skip",
"=",
"pos",
"-",
"curFP",
";",
"if",
"(",
"skip",
"<",
"0",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"getClass",
"(",
")",
"+",
"\" cannot seek backwards (pos=\"",
"+",
"pos",
"+",
"\" getFilePointer()=\"",
"+",
"curFP",
"+",
"\")\"",
")",
";",
"}",
"skipBytes",
"(",
"skip",
")",
";",
"}"
] |
public override void Seek(long pos){long skip = pos - GetFilePointer();if (skip < 0){throw new InvalidOperationException(this.GetType() + " cannot seek backwards");}SkipBytes(skip);}
|
train
| false
|
3,701
|
public ExternalName getExternalName(int externSheetIndex, int externNameIndex) {return _iBook.getExternalName(externSheetIndex, externNameIndex);}
|
[
"public",
"ExternalName",
"getExternalName",
"(",
"int",
"externSheetIndex",
",",
"int",
"externNameIndex",
")",
"{",
"return",
"_iBook",
".",
"getExternalName",
"(",
"externSheetIndex",
",",
"externNameIndex",
")",
";",
"}"
] |
public ExternalName GetExternalName(int externSheetIndex, int externNameIndex){return _iBook.GetExternalName(externSheetIndex, externNameIndex);}
|
train
| false
|
3,702
|
public StrDocValues(ValueSource vs) {this.vs = vs;}
|
[
"public",
"StrDocValues",
"(",
"ValueSource",
"vs",
")",
"{",
"this",
".",
"vs",
"=",
"vs",
";",
"}"
] |
public StrDocValues(ValueSource vs){this.m_vs = vs;}
|
train
| false
|
3,703
|
public int getFunctionIndex(String name) {return name.hashCode();}
|
[
"public",
"int",
"getFunctionIndex",
"(",
"String",
"name",
")",
"{",
"return",
"name",
".",
"hashCode",
"(",
")",
";",
"}"
] |
public int GetFunctionIndex(String name){return name.GetHashCode();}
|
train
| false
|
3,704
|
public int hash2(char c) {int hash = 5381;hash = ((hash << 5) + hash) + c & 0x00FF;hash = ((hash << 5) + hash) + c >> 8;return hash;}
|
[
"public",
"int",
"hash2",
"(",
"char",
"c",
")",
"{",
"int",
"hash",
"=",
"5381",
";",
"hash",
"=",
"(",
"(",
"hash",
"<<",
"5",
")",
"+",
"hash",
")",
"+",
"c",
"&",
"0x00FF",
";",
"hash",
"=",
"(",
"(",
"hash",
"<<",
"5",
")",
"+",
"hash",
")",
"+",
"c",
">",
">",
"8",
";",
"return",
"hash",
";",
"}"
] |
public virtual int Hash2(char c){int hash = 5381;hash = ((hash << 5) + hash) + c & 0x00FF;hash = ((hash << 5) + hash) + c >> 8;return hash;}
|
train
| false
|
3,705
|
public void create(String id, String title, String time, String body) throws IOException {Path d = directory(count++, null);Files.createDirectories(d);Path f = d.resolve(id + ".txt");StringBuilder contents = new StringBuilder();contents.append(time);contents.append("\n\n");contents.append(title);contents.append("\n\n");contents.append(body);contents.append("\n");try (Writer writer = Files.newBufferedWriter(f, StandardCharsets.UTF_8)) {writer.write(contents.toString());}}
|
[
"public",
"void",
"create",
"(",
"String",
"id",
",",
"String",
"title",
",",
"String",
"time",
",",
"String",
"body",
")",
"throws",
"IOException",
"{",
"Path",
"d",
"=",
"directory",
"(",
"count",
"++",
",",
"null",
")",
";",
"Files",
".",
"createDirectories",
"(",
"d",
")",
";",
"Path",
"f",
"=",
"d",
".",
"resolve",
"(",
"id",
"+",
"\".txt\"",
")",
";",
"StringBuilder",
"contents",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"contents",
".",
"append",
"(",
"time",
")",
";",
"contents",
".",
"append",
"(",
"\"\\n\\n\"",
")",
";",
"contents",
".",
"append",
"(",
"title",
")",
";",
"contents",
".",
"append",
"(",
"\"\\n\\n\"",
")",
";",
"contents",
".",
"append",
"(",
"body",
")",
";",
"contents",
".",
"append",
"(",
"\"\\n\"",
")",
";",
"try",
"(",
"Writer",
"writer",
"=",
"Files",
".",
"newBufferedWriter",
"(",
"f",
",",
"StandardCharsets",
".",
"UTF_8",
")",
")",
"{",
"writer",
".",
"write",
"(",
"contents",
".",
"toString",
"(",
")",
")",
";",
"}",
"}"
] |
public virtual void Create(string id, string title, string time, string body){DirectoryInfo d = Directory(count++, null);d.Create();FileInfo f = new FileInfo(System.IO.Path.Combine(d.FullName, id + ".txt"));StringBuilder contents = new StringBuilder();contents.Append(time);contents.Append("\n\n");contents.Append(title);contents.Append("\n\n");contents.Append(body);contents.Append("\n");try{using (TextWriter writer = new StreamWriter(new FileStream(f.FullName, FileMode.Create, FileAccess.Write), Encoding.UTF8))writer.Write(contents.ToString());}catch (IOException ioe){throw new Exception(ioe.ToString(), ioe);}}
|
train
| false
|
3,706
|
public CharArrayWriter append(CharSequence csq) {if (csq == null) {csq = "null";}append(csq, 0, csq.length());return this;}
|
[
"public",
"CharArrayWriter",
"append",
"(",
"CharSequence",
"csq",
")",
"{",
"if",
"(",
"csq",
"==",
"null",
")",
"{",
"csq",
"=",
"\"null\"",
";",
"}",
"append",
"(",
"csq",
",",
"0",
",",
"csq",
".",
"length",
"(",
")",
")",
";",
"return",
"this",
";",
"}"
] |
public override java.io.Writer append(java.lang.CharSequence csq){if (csq == null){csq = java.lang.CharSequenceProxy.Wrap("null");}append(csq, 0, csq.Length);return this;}
|
train
| false
|
3,707
|
public PutAccountDedicatedIpWarmupAttributesResult putAccountDedicatedIpWarmupAttributes(PutAccountDedicatedIpWarmupAttributesRequest request) {request = beforeClientExecution(request);return executePutAccountDedicatedIpWarmupAttributes(request);}
|
[
"public",
"PutAccountDedicatedIpWarmupAttributesResult",
"putAccountDedicatedIpWarmupAttributes",
"(",
"PutAccountDedicatedIpWarmupAttributesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executePutAccountDedicatedIpWarmupAttributes",
"(",
"request",
")",
";",
"}"
] |
public virtual PutAccountDedicatedIpWarmupAttributesResponse PutAccountDedicatedIpWarmupAttributes(PutAccountDedicatedIpWarmupAttributesRequest request){var options = new InvokeOptions();options.RequestMarshaller = PutAccountDedicatedIpWarmupAttributesRequestMarshaller.Instance;options.ResponseUnmarshaller = PutAccountDedicatedIpWarmupAttributesResponseUnmarshaller.Instance;return Invoke<PutAccountDedicatedIpWarmupAttributesResponse>(request, options);}
|
train
| true
|
3,708
|
public static boolean equal(Object a, Object b) {return a == b || (a != null && a.equals(b));}
|
[
"public",
"static",
"boolean",
"equal",
"(",
"Object",
"a",
",",
"Object",
"b",
")",
"{",
"return",
"a",
"==",
"b",
"||",
"(",
"a",
"!=",
"null",
"&&",
"a",
".",
"equals",
"(",
"b",
")",
")",
";",
"}"
] |
public static bool equal(object a, object b){return a == b || (a != null && a.Equals(b));}
|
train
| true
|
3,709
|
public RevFlag getUnshallowFlag() {return UNSHALLOW;}
|
[
"public",
"RevFlag",
"getUnshallowFlag",
"(",
")",
"{",
"return",
"UNSHALLOW",
";",
"}"
] |
public RevFlag GetUnshallowFlag(){return UNSHALLOW;}
|
train
| false
|
3,710
|
public DescribeSolutionVersionResult describeSolutionVersion(DescribeSolutionVersionRequest request) {request = beforeClientExecution(request);return executeDescribeSolutionVersion(request);}
|
[
"public",
"DescribeSolutionVersionResult",
"describeSolutionVersion",
"(",
"DescribeSolutionVersionRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeSolutionVersion",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeSolutionVersionResponse DescribeSolutionVersion(DescribeSolutionVersionRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeSolutionVersionRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeSolutionVersionResponseUnmarshaller.Instance;return Invoke<DescribeSolutionVersionResponse>(request, options);}
|
train
| false
|
3,711
|
public byte[] getBuffer() {return file.buf;}
|
[
"public",
"byte",
"[",
"]",
"getBuffer",
"(",
")",
"{",
"return",
"file",
".",
"buf",
";",
"}"
] |
public virtual byte[] GetBuffer(){return file.buf;}
|
train
| false
|
3,712
|
public String toString() {StringBuilder buffer = new StringBuilder();buffer.append("[WRITEACCESS]\n");buffer.append(" .name = ").append(field_1_username).append("\n");buffer.append("[/WRITEACCESS]\n");return buffer.toString();}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuilder",
"buffer",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"\"[WRITEACCESS]\\n\"",
")",
";",
"buffer",
".",
"append",
"(",
"\" .name = \"",
")",
".",
"append",
"(",
"field_1_username",
")",
".",
"append",
"(",
"\"\\n\"",
")",
";",
"buffer",
".",
"append",
"(",
"\"[/WRITEACCESS]\\n\"",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}"
] |
public override String ToString(){StringBuilder buffer = new StringBuilder();buffer.Append("[WriteACCESS]\n");buffer.Append(" .name = ").Append(field_1_username).Append("\n");buffer.Append("[/WriteACCESS]\n");return buffer.ToString();}
|
train
| false
|
3,713
|
public ModifyFpgaImageAttributeResult modifyFpgaImageAttribute(ModifyFpgaImageAttributeRequest request) {request = beforeClientExecution(request);return executeModifyFpgaImageAttribute(request);}
|
[
"public",
"ModifyFpgaImageAttributeResult",
"modifyFpgaImageAttribute",
"(",
"ModifyFpgaImageAttributeRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeModifyFpgaImageAttribute",
"(",
"request",
")",
";",
"}"
] |
public virtual ModifyFpgaImageAttributeResponse ModifyFpgaImageAttribute(ModifyFpgaImageAttributeRequest request){var options = new InvokeOptions();options.RequestMarshaller = ModifyFpgaImageAttributeRequestMarshaller.Instance;options.ResponseUnmarshaller = ModifyFpgaImageAttributeResponseUnmarshaller.Instance;return Invoke<ModifyFpgaImageAttributeResponse>(request, options);}
|
train
| true
|
3,714
|
public SubmoduleUpdateCommand(Repository repo) {super(repo);paths = new ArrayList<>();}
|
[
"public",
"SubmoduleUpdateCommand",
"(",
"Repository",
"repo",
")",
"{",
"super",
"(",
"repo",
")",
";",
"paths",
"=",
"new",
"ArrayList",
"<",
">",
"(",
")",
";",
"}"
] |
protected internal SubmoduleUpdateCommand(Repository repo) : base(repo){paths = new AList<string>();}
|
train
| false
|
3,715
|
public boolean isKnown() {return type == Type.KNOWN;}
|
[
"public",
"boolean",
"isKnown",
"(",
")",
"{",
"return",
"type",
"==",
"Type",
".",
"KNOWN",
";",
"}"
] |
public virtual bool IsKnown(){return type == JapaneseTokenizerType.KNOWN;}
|
train
| false
|
3,716
|
public long get(int index) {final int o = index / 10;final int b = index % 10;final int shift = b * 6;return (blocks[o] >>> shift) & 63L;}
|
[
"public",
"long",
"get",
"(",
"int",
"index",
")",
"{",
"final",
"int",
"o",
"=",
"index",
"/",
"10",
";",
"final",
"int",
"b",
"=",
"index",
"%",
"10",
";",
"final",
"int",
"shift",
"=",
"b",
"*",
"6",
";",
"return",
"(",
"blocks",
"[",
"o",
"]",
">",
">",
">",
"shift",
")",
"&",
"63L",
";",
"}"
] |
public override long Get(int index){int o = index / 10;int b = index % 10;int shift = b * 6;return ((long)((ulong)blocks[o] >> shift)) & 63L;}
|
train
| false
|
3,717
|
public void setValue(byte value) {setValue(FormulaError.forInt(value));}
|
[
"public",
"void",
"setValue",
"(",
"byte",
"value",
")",
"{",
"setValue",
"(",
"FormulaError",
".",
"forInt",
"(",
"value",
")",
")",
";",
"}"
] |
public void SetValue(bool value){_value = value ? 1 : 0;_isError = false;}
|
train
| false
|
3,718
|
public int getCodePoint() {return c;}
|
[
"public",
"int",
"getCodePoint",
"(",
")",
"{",
"return",
"c",
";",
"}"
] |
public virtual int getCodePoint(){return c;}
|
train
| false
|
3,719
|
public GetDocumentationVersionsResult getDocumentationVersions(GetDocumentationVersionsRequest request) {request = beforeClientExecution(request);return executeGetDocumentationVersions(request);}
|
[
"public",
"GetDocumentationVersionsResult",
"getDocumentationVersions",
"(",
"GetDocumentationVersionsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetDocumentationVersions",
"(",
"request",
")",
";",
"}"
] |
public virtual GetDocumentationVersionsResponse GetDocumentationVersions(GetDocumentationVersionsRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetDocumentationVersionsRequestMarshaller.Instance;options.ResponseUnmarshaller = GetDocumentationVersionsResponseUnmarshaller.Instance;return Invoke<GetDocumentationVersionsResponse>(request, options);}
|
train
| true
|
3,720
|
public int indexOfKey(int key) {if (mGarbage) {gc();}return binarySearch(mKeys, 0, mSize, key);}
|
[
"public",
"int",
"indexOfKey",
"(",
"int",
"key",
")",
"{",
"if",
"(",
"mGarbage",
")",
"{",
"gc",
"(",
")",
";",
"}",
"return",
"binarySearch",
"(",
"mKeys",
",",
"0",
",",
"mSize",
",",
"key",
")",
";",
"}"
] |
public virtual int indexOfKey(int key){if (mGarbage){gc();}return binarySearch(mKeys, 0, mSize, key);}
|
train
| false
|
3,721
|
public void reportError(Parser recognizer,RecognitionException e){if (inErrorRecoveryMode(recognizer)) {return; }beginErrorCondition(recognizer);if ( e instanceof NoViableAltException ) {reportNoViableAlternative(recognizer, (NoViableAltException) e);}else if ( e instanceof InputMismatchException ) {reportInputMismatch(recognizer, (InputMismatchException)e);}else if ( e instanceof FailedPredicateException ) {reportFailedPredicate(recognizer, (FailedPredicateException)e);}else {System.err.println("unknown recognition error type: "+e.getClass().getName());recognizer.notifyErrorListeners(e.getOffendingToken(), e.getMessage(), e);}}
|
[
"public",
"void",
"reportError",
"(",
"Parser",
"recognizer",
",",
"RecognitionException",
"e",
")",
"{",
"if",
"(",
"inErrorRecoveryMode",
"(",
"recognizer",
")",
")",
"{",
"return",
";",
"}",
"beginErrorCondition",
"(",
"recognizer",
")",
";",
"if",
"(",
"e",
"instanceof",
"NoViableAltException",
")",
"{",
"reportNoViableAlternative",
"(",
"recognizer",
",",
"(",
"NoViableAltException",
")",
"e",
")",
";",
"}",
"else",
"if",
"(",
"e",
"instanceof",
"InputMismatchException",
")",
"{",
"reportInputMismatch",
"(",
"recognizer",
",",
"(",
"InputMismatchException",
")",
"e",
")",
";",
"}",
"else",
"if",
"(",
"e",
"instanceof",
"FailedPredicateException",
")",
"{",
"reportFailedPredicate",
"(",
"recognizer",
",",
"(",
"FailedPredicateException",
")",
"e",
")",
";",
"}",
"else",
"{",
"System",
".",
"err",
".",
"println",
"(",
"\"unknown recognition error type: \"",
"+",
"e",
".",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
")",
";",
"recognizer",
".",
"notifyErrorListeners",
"(",
"e",
".",
"getOffendingToken",
"(",
")",
",",
"e",
".",
"getMessage",
"(",
")",
",",
"e",
")",
";",
"}",
"}"
] |
public virtual void ReportError(Parser recognizer, RecognitionException e){if (InErrorRecoveryMode(recognizer)){return;}BeginErrorCondition(recognizer);if (e is NoViableAltException){ReportNoViableAlternative(recognizer, (NoViableAltException)e);}else{if (e is InputMismatchException){ReportInputMismatch(recognizer, (InputMismatchException)e);}else{if (e is FailedPredicateException){ReportFailedPredicate(recognizer, (FailedPredicateException)e);}else{System.Console.Error.WriteLine("unknown recognition error type: " + e.GetType().FullName);NotifyErrorListeners(recognizer, e.Message, e);}}}}
|
train
| false
|
3,722
|
public ConstantStringFormat(String s) {str = s;}
|
[
"public",
"ConstantStringFormat",
"(",
"String",
"s",
")",
"{",
"str",
"=",
"s",
";",
"}"
] |
public ConstantStringFormat(String s){str = s;}
|
train
| false
|
3,723
|
public DoubleBuffer asReadOnlyBuffer() {return ReadOnlyDoubleArrayBuffer.copy(this, mark);}
|
[
"public",
"DoubleBuffer",
"asReadOnlyBuffer",
"(",
")",
"{",
"return",
"ReadOnlyDoubleArrayBuffer",
".",
"copy",
"(",
"this",
",",
"mark",
")",
";",
"}"
] |
public override java.nio.DoubleBuffer asReadOnlyBuffer(){return java.nio.ReadOnlyDoubleArrayBuffer.copy(this, _mark);}
|
train
| false
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.