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,455
|
public void setRoleName(String roleName) {if (null == roleName) {throw new NullPointerException("You must specifiy a valid role name.");}this.roleName = roleName;setCredentialUrl();}
|
[
"public",
"void",
"setRoleName",
"(",
"String",
"roleName",
")",
"{",
"if",
"(",
"null",
"==",
"roleName",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
"\"You must specifiy a valid role name.\"",
")",
";",
"}",
"this",
".",
"roleName",
"=",
"roleName",
";",
"setCredentialUrl",
"(",
")",
";",
"}"
] |
public void SetRoleName(string roleName){if (string.IsNullOrEmpty(roleName)){throw new ArgumentNullException("You must specifiy a valid role name.");}this.roleName = roleName;SetCredentialUrl();}
|
train
| false
|
2,456
|
public AllocatePublicVirtualInterfaceResult allocatePublicVirtualInterface(AllocatePublicVirtualInterfaceRequest request) {request = beforeClientExecution(request);return executeAllocatePublicVirtualInterface(request);}
|
[
"public",
"AllocatePublicVirtualInterfaceResult",
"allocatePublicVirtualInterface",
"(",
"AllocatePublicVirtualInterfaceRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeAllocatePublicVirtualInterface",
"(",
"request",
")",
";",
"}"
] |
public virtual AllocatePublicVirtualInterfaceResponse AllocatePublicVirtualInterface(AllocatePublicVirtualInterfaceRequest request){var options = new InvokeOptions();options.RequestMarshaller = AllocatePublicVirtualInterfaceRequestMarshaller.Instance;options.ResponseUnmarshaller = AllocatePublicVirtualInterfaceResponseUnmarshaller.Instance;return Invoke<AllocatePublicVirtualInterfaceResponse>(request, options);}
|
train
| true
|
2,458
|
public DeleteLoadBalancerRequest(String loadBalancerName) {setLoadBalancerName(loadBalancerName);}
|
[
"public",
"DeleteLoadBalancerRequest",
"(",
"String",
"loadBalancerName",
")",
"{",
"setLoadBalancerName",
"(",
"loadBalancerName",
")",
";",
"}"
] |
public DeleteLoadBalancerRequest(string loadBalancerName){_loadBalancerName = loadBalancerName;}
|
train
| false
|
2,459
|
public PutDeliverabilityDashboardOptionResult putDeliverabilityDashboardOption(PutDeliverabilityDashboardOptionRequest request) {request = beforeClientExecution(request);return executePutDeliverabilityDashboardOption(request);}
|
[
"public",
"PutDeliverabilityDashboardOptionResult",
"putDeliverabilityDashboardOption",
"(",
"PutDeliverabilityDashboardOptionRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executePutDeliverabilityDashboardOption",
"(",
"request",
")",
";",
"}"
] |
public virtual PutDeliverabilityDashboardOptionResponse PutDeliverabilityDashboardOption(PutDeliverabilityDashboardOptionRequest request){var options = new InvokeOptions();options.RequestMarshaller = PutDeliverabilityDashboardOptionRequestMarshaller.Instance;options.ResponseUnmarshaller = PutDeliverabilityDashboardOptionResponseUnmarshaller.Instance;return Invoke<PutDeliverabilityDashboardOptionResponse>(request, options);}
|
train
| true
|
2,460
|
public XPathRuleElement(String ruleName, int ruleIndex) {super(ruleName);this.ruleIndex = ruleIndex;}
|
[
"public",
"XPathRuleElement",
"(",
"String",
"ruleName",
",",
"int",
"ruleIndex",
")",
"{",
"super",
"(",
"ruleName",
")",
";",
"this",
".",
"ruleIndex",
"=",
"ruleIndex",
";",
"}"
] |
public XPathRuleElement(string ruleName, int ruleIndex): base(ruleName){this.ruleIndex = ruleIndex;}
|
train
| false
|
2,461
|
public PullCommand setProgressMonitor(ProgressMonitor monitor) {if (monitor == null) {monitor = NullProgressMonitor.INSTANCE;}this.monitor = monitor;return this;}
|
[
"public",
"PullCommand",
"setProgressMonitor",
"(",
"ProgressMonitor",
"monitor",
")",
"{",
"if",
"(",
"monitor",
"==",
"null",
")",
"{",
"monitor",
"=",
"NullProgressMonitor",
".",
"INSTANCE",
";",
"}",
"this",
".",
"monitor",
"=",
"monitor",
";",
"return",
"this",
";",
"}"
] |
public virtual NGit.Api.PullCommand SetProgressMonitor(ProgressMonitor monitor){this.monitor = monitor;return this;}
|
train
| false
|
2,464
|
public DeleteRoomResult deleteRoom(DeleteRoomRequest request) {request = beforeClientExecution(request);return executeDeleteRoom(request);}
|
[
"public",
"DeleteRoomResult",
"deleteRoom",
"(",
"DeleteRoomRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteRoom",
"(",
"request",
")",
";",
"}"
] |
public virtual DeleteRoomResponse DeleteRoom(DeleteRoomRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteRoomRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteRoomResponseUnmarshaller.Instance;return Invoke<DeleteRoomResponse>(request, options);}
|
train
| true
|
2,465
|
public ScandinavianNormalizationFilter create(TokenStream input) {return new ScandinavianNormalizationFilter(input);}
|
[
"public",
"ScandinavianNormalizationFilter",
"create",
"(",
"TokenStream",
"input",
")",
"{",
"return",
"new",
"ScandinavianNormalizationFilter",
"(",
"input",
")",
";",
"}"
] |
public override TokenStream Create(TokenStream input){return new ScandinavianNormalizationFilter(input);}
|
train
| false
|
2,466
|
public ValidateTemplateResult validateTemplate(ValidateTemplateRequest request) {request = beforeClientExecution(request);return executeValidateTemplate(request);}
|
[
"public",
"ValidateTemplateResult",
"validateTemplate",
"(",
"ValidateTemplateRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeValidateTemplate",
"(",
"request",
")",
";",
"}"
] |
public virtual ValidateTemplateResponse ValidateTemplate(ValidateTemplateRequest request){var options = new InvokeOptions();options.RequestMarshaller = ValidateTemplateRequestMarshaller.Instance;options.ResponseUnmarshaller = ValidateTemplateResponseUnmarshaller.Instance;return Invoke<ValidateTemplateResponse>(request, options);}
|
train
| true
|
2,467
|
public ListBranchCommand branchList() {return new ListBranchCommand(repo);}
|
[
"public",
"ListBranchCommand",
"branchList",
"(",
")",
"{",
"return",
"new",
"ListBranchCommand",
"(",
"repo",
")",
";",
"}"
] |
public virtual ListBranchCommand BranchList(){return new ListBranchCommand(repo);}
|
train
| false
|
2,468
|
public String toString() {return getClass().getSimpleName() + "[" + getEntryPathString() + "]"; }
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"getClass",
"(",
")",
".",
"getSimpleName",
"(",
")",
"+",
"\"[\"",
"+",
"getEntryPathString",
"(",
")",
"+",
"\"]\"",
";",
"}"
] |
public override string ToString(){return GetType().Name + "[" + EntryPathString + "]";}
|
train
| false
|
2,469
|
public final Edit before(Edit cut) {return new Edit(beginA, cut.beginA, beginB, cut.beginB);}
|
[
"public",
"final",
"Edit",
"before",
"(",
"Edit",
"cut",
")",
"{",
"return",
"new",
"Edit",
"(",
"beginA",
",",
"cut",
".",
"beginA",
",",
"beginB",
",",
"cut",
".",
"beginB",
")",
";",
"}"
] |
public NGit.Diff.Edit Before(NGit.Diff.Edit cut){return new NGit.Diff.Edit(beginA, cut.beginA, beginB, cut.beginB);}
|
train
| false
|
2,470
|
public String toString() {if ( symbol.getType() == Token.EOF ) return "<EOF>";return symbol.getText();}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"if",
"(",
"symbol",
".",
"getType",
"(",
")",
"==",
"Token",
".",
"EOF",
")",
"return",
"\"<EOF>\"",
";",
"return",
"symbol",
".",
"getText",
"(",
")",
";",
"}"
] |
public override string ToString(){if (Symbol != null){if (Symbol.Type == TokenConstants.EOF){return "<EOF>";}return Symbol.Text;}else{return "<null>";}}
|
train
| false
|
2,471
|
public DeleteDeploymentStrategyResult deleteDeploymentStrategy(DeleteDeploymentStrategyRequest request) {request = beforeClientExecution(request);return executeDeleteDeploymentStrategy(request);}
|
[
"public",
"DeleteDeploymentStrategyResult",
"deleteDeploymentStrategy",
"(",
"DeleteDeploymentStrategyRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteDeploymentStrategy",
"(",
"request",
")",
";",
"}"
] |
public virtual DeleteDeploymentStrategyResponse DeleteDeploymentStrategy(DeleteDeploymentStrategyRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteDeploymentStrategyRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteDeploymentStrategyResponseUnmarshaller.Instance;return Invoke<DeleteDeploymentStrategyResponse>(request, options);}
|
train
| false
|
2,472
|
public GetModelResult getModel(GetModelRequest request) {request = beforeClientExecution(request);return executeGetModel(request);}
|
[
"public",
"GetModelResult",
"getModel",
"(",
"GetModelRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetModel",
"(",
"request",
")",
";",
"}"
] |
public virtual GetModelResponse GetModel(GetModelRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetModelRequestMarshaller.Instance;options.ResponseUnmarshaller = GetModelResponseUnmarshaller.Instance;return Invoke<GetModelResponse>(request, options);}
|
train
| true
|
2,473
|
public DescribeUserResult describeUser(DescribeUserRequest request) {request = beforeClientExecution(request);return executeDescribeUser(request);}
|
[
"public",
"DescribeUserResult",
"describeUser",
"(",
"DescribeUserRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeUser",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeUserResponse DescribeUser(DescribeUserRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeUserRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeUserResponseUnmarshaller.Instance;return Invoke<DescribeUserResponse>(request, options);}
|
train
| true
|
2,474
|
public ListSnapshotBlocksResult listSnapshotBlocks(ListSnapshotBlocksRequest request) {request = beforeClientExecution(request);return executeListSnapshotBlocks(request);}
|
[
"public",
"ListSnapshotBlocksResult",
"listSnapshotBlocks",
"(",
"ListSnapshotBlocksRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListSnapshotBlocks",
"(",
"request",
")",
";",
"}"
] |
public virtual ListSnapshotBlocksResponse ListSnapshotBlocks(ListSnapshotBlocksRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListSnapshotBlocksRequestMarshaller.Instance;options.ResponseUnmarshaller = ListSnapshotBlocksResponseUnmarshaller.Instance;return Invoke<ListSnapshotBlocksResponse>(request, options);}
|
train
| false
|
2,475
|
public ByteBuffer putShort(int index, short value) {checkIndex(index, SizeOf.SHORT);Memory.pokeShort(backingArray, offset + index, value, order);return this;}
|
[
"public",
"ByteBuffer",
"putShort",
"(",
"int",
"index",
",",
"short",
"value",
")",
"{",
"checkIndex",
"(",
"index",
",",
"SizeOf",
".",
"SHORT",
")",
";",
"Memory",
".",
"pokeShort",
"(",
"backingArray",
",",
"offset",
"+",
"index",
",",
"value",
",",
"order",
")",
";",
"return",
"this",
";",
"}"
] |
public override java.nio.ByteBuffer putShort(int index, short value){checkIndex(index, libcore.io.SizeOf.SHORT);libcore.io.Memory.pokeShort(backingArray, offset + index, value, _order);return this;}
|
train
| false
|
2,476
|
public ResetCommand reset() {return new ResetCommand(repo);}
|
[
"public",
"ResetCommand",
"reset",
"(",
")",
"{",
"return",
"new",
"ResetCommand",
"(",
"repo",
")",
";",
"}"
] |
public virtual ResetCommand Reset(){return new ResetCommand(repo);}
|
train
| false
|
2,477
|
public Snapshot createClusterSnapshot(CreateClusterSnapshotRequest request) {request = beforeClientExecution(request);return executeCreateClusterSnapshot(request);}
|
[
"public",
"Snapshot",
"createClusterSnapshot",
"(",
"CreateClusterSnapshotRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCreateClusterSnapshot",
"(",
"request",
")",
";",
"}"
] |
public virtual CreateClusterSnapshotResponse CreateClusterSnapshot(CreateClusterSnapshotRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateClusterSnapshotRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateClusterSnapshotResponseUnmarshaller.Instance;return Invoke<CreateClusterSnapshotResponse>(request, options);}
|
train
| true
|
2,478
|
public void setCachedResultTypeEmptyString() {specialCachedValue = FormulaSpecialCachedValue.createCachedEmptyValue();}
|
[
"public",
"void",
"setCachedResultTypeEmptyString",
"(",
")",
"{",
"specialCachedValue",
"=",
"FormulaSpecialCachedValue",
".",
"createCachedEmptyValue",
"(",
")",
";",
"}"
] |
public void SetCachedResultTypeEmptyString(){specialCachedValue = SpecialCachedValue.CreateCachedEmptyValue();}
|
train
| false
|
2,479
|
public DeleteIdentityPolicyResult deleteIdentityPolicy(DeleteIdentityPolicyRequest request) {request = beforeClientExecution(request);return executeDeleteIdentityPolicy(request);}
|
[
"public",
"DeleteIdentityPolicyResult",
"deleteIdentityPolicy",
"(",
"DeleteIdentityPolicyRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteIdentityPolicy",
"(",
"request",
")",
";",
"}"
] |
public virtual DeleteIdentityPolicyResponse DeleteIdentityPolicy(DeleteIdentityPolicyRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteIdentityPolicyRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteIdentityPolicyResponseUnmarshaller.Instance;return Invoke<DeleteIdentityPolicyResponse>(request, options);}
|
train
| true
|
2,480
|
public int IncRef() {if (!initDone) {initDone = true;} else {assert count > 0: Thread.currentThread().getName() + ": RefCount is 0 pre-increment for file \"" + fileName + "\"";}return ++count;}
|
[
"public",
"int",
"IncRef",
"(",
")",
"{",
"if",
"(",
"!",
"initDone",
")",
"{",
"initDone",
"=",
"true",
";",
"}",
"else",
"{",
"assert",
"count",
">",
"0",
":",
"Thread",
".",
"currentThread",
"(",
")",
".",
"getName",
"(",
")",
"+",
"\": RefCount is 0 pre-increment for file \\\"\"",
"+",
"fileName",
"+",
"\"\\\"\"",
";",
"}",
"return",
"++",
"count",
";",
"}"
] |
public int IncRef(){if (!initDone){initDone = true;}else{Debug.Assert(count > 0, Thread.CurrentThread.Name + ": RefCount is 0 pre-increment for file \"" + fileName + "\"");}return ++count;}
|
train
| false
|
2,481
|
public void fromRaw(byte[] bs) {fromRaw(bs, 0);}
|
[
"public",
"void",
"fromRaw",
"(",
"byte",
"[",
"]",
"bs",
")",
"{",
"fromRaw",
"(",
"bs",
",",
"0",
")",
";",
"}"
] |
public virtual void FromRaw(byte[] bs){FromRaw(bs, 0);}
|
train
| false
|
2,482
|
public LeftMarginRecord clone() {return copy();}
|
[
"public",
"LeftMarginRecord",
"clone",
"(",
")",
"{",
"return",
"copy",
"(",
")",
";",
"}"
] |
public override Object Clone(){LeftMarginRecord rec = new LeftMarginRecord();rec.field_1_margin = this.field_1_margin;return rec;}
|
train
| false
|
2,483
|
public FailedPredicateException(Parser recognizer,String predicate,String message){super(formatMessage(predicate, message), recognizer, recognizer.getInputStream(), recognizer._ctx);ATNState s = recognizer.getInterpreter().atn.states.get(recognizer.getState());AbstractPredicateTransition trans = (AbstractPredicateTransition)s.transition(0);if (trans instanceof PredicateTransition) {this.ruleIndex = ((PredicateTransition)trans).ruleIndex;this.predicateIndex = ((PredicateTransition)trans).predIndex;}else {this.ruleIndex = 0;this.predicateIndex = 0;}this.predicate = predicate;this.setOffendingToken(recognizer.getCurrentToken());}
|
[
"public",
"FailedPredicateException",
"(",
"Parser",
"recognizer",
",",
"String",
"predicate",
",",
"String",
"message",
")",
"{",
"super",
"(",
"formatMessage",
"(",
"predicate",
",",
"message",
")",
",",
"recognizer",
",",
"recognizer",
".",
"getInputStream",
"(",
")",
",",
"recognizer",
".",
"_ctx",
")",
";",
"ATNState",
"s",
"=",
"recognizer",
".",
"getInterpreter",
"(",
")",
".",
"atn",
".",
"states",
".",
"get",
"(",
"recognizer",
".",
"getState",
"(",
")",
")",
";",
"AbstractPredicateTransition",
"trans",
"=",
"(",
"AbstractPredicateTransition",
")",
"s",
".",
"transition",
"(",
"0",
")",
";",
"if",
"(",
"trans",
"instanceof",
"PredicateTransition",
")",
"{",
"this",
".",
"ruleIndex",
"=",
"(",
"(",
"PredicateTransition",
")",
"trans",
")",
".",
"ruleIndex",
";",
"this",
".",
"predicateIndex",
"=",
"(",
"(",
"PredicateTransition",
")",
"trans",
")",
".",
"predIndex",
";",
"}",
"else",
"{",
"this",
".",
"ruleIndex",
"=",
"0",
";",
"this",
".",
"predicateIndex",
"=",
"0",
";",
"}",
"this",
".",
"predicate",
"=",
"predicate",
";",
"this",
".",
"setOffendingToken",
"(",
"recognizer",
".",
"getCurrentToken",
"(",
")",
")",
";",
"}"
] |
public FailedPredicateException(Parser recognizer, string predicate, string message): base(FormatMessage(predicate, message), recognizer, ((ITokenStream)recognizer.InputStream), recognizer.RuleContext){ATNState s = recognizer.Interpreter.atn.states[recognizer.State];AbstractPredicateTransition trans = (AbstractPredicateTransition)s.Transition(0);if (trans is PredicateTransition){this.ruleIndex = ((PredicateTransition)trans).ruleIndex;this.predicateIndex = ((PredicateTransition)trans).predIndex;}else{this.ruleIndex = 0;this.predicateIndex = 0;}this.predicate = predicate;this.OffendingToken = recognizer.CurrentToken;}
|
train
| false
|
2,484
|
public int normalize(char s[], int len) {for (int i = 0; i < len; i++) {switch (s[i]) {case ALEF_MADDA:case ALEF_HAMZA_ABOVE:case ALEF_HAMZA_BELOW:s[i] = ALEF;break;case DOTLESS_YEH:s[i] = YEH;break;case TEH_MARBUTA:s[i] = HEH;break;case TATWEEL:case KASRATAN:case DAMMATAN:case FATHATAN:case FATHA:case DAMMA:case KASRA:case SHADDA:case SUKUN:len = delete(s, i, len);i--;break;default:break;}}return len;}
|
[
"public",
"int",
"normalize",
"(",
"char",
"s",
"[",
"]",
",",
"int",
"len",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"len",
";",
"i",
"++",
")",
"{",
"switch",
"(",
"s",
"[",
"i",
"]",
")",
"{",
"case",
"ALEF_MADDA",
":",
"case",
"ALEF_HAMZA_ABOVE",
":",
"case",
"ALEF_HAMZA_BELOW",
":",
"s",
"[",
"i",
"]",
"=",
"ALEF",
";",
"break",
";",
"case",
"DOTLESS_YEH",
":",
"s",
"[",
"i",
"]",
"=",
"YEH",
";",
"break",
";",
"case",
"TEH_MARBUTA",
":",
"s",
"[",
"i",
"]",
"=",
"HEH",
";",
"break",
";",
"case",
"TATWEEL",
":",
"case",
"KASRATAN",
":",
"case",
"DAMMATAN",
":",
"case",
"FATHATAN",
":",
"case",
"FATHA",
":",
"case",
"DAMMA",
":",
"case",
"KASRA",
":",
"case",
"SHADDA",
":",
"case",
"SUKUN",
":",
"len",
"=",
"delete",
"(",
"s",
",",
"i",
",",
"len",
")",
";",
"i",
"--",
";",
"break",
";",
"default",
":",
"break",
";",
"}",
"}",
"return",
"len",
";",
"}"
] |
public virtual int Normalize(char[] s, int len){for (int i = 0; i < len; i++){switch (s[i]){case ALEF_MADDA:case ALEF_HAMZA_ABOVE:case ALEF_HAMZA_BELOW:s[i] = ALEF;break;case DOTLESS_YEH:s[i] = YEH;break;case TEH_MARBUTA:s[i] = HEH;break;case TATWEEL:case KASRATAN:case DAMMATAN:case FATHATAN:case FATHA:case DAMMA:case KASRA:case SHADDA:case SUKUN:len = StemmerUtil.Delete(s, i, len);i--;break;default:break;}}return len;}
|
train
| false
|
2,485
|
public static int idealCharArraySize(int need) {return idealByteArraySize(need * 2) / 2;}
|
[
"public",
"static",
"int",
"idealCharArraySize",
"(",
"int",
"need",
")",
"{",
"return",
"idealByteArraySize",
"(",
"need",
"*",
"2",
")",
"/",
"2",
";",
"}"
] |
public static int idealCharArraySize(int need){return idealByteArraySize(need * 2) / 2;}
|
train
| false
|
2,486
|
public void setObjectId(AnyObjectId obj, int objType) {object = obj.copy();type = objType;}
|
[
"public",
"void",
"setObjectId",
"(",
"AnyObjectId",
"obj",
",",
"int",
"objType",
")",
"{",
"object",
"=",
"obj",
".",
"copy",
"(",
")",
";",
"type",
"=",
"objType",
";",
"}"
] |
public virtual void SetObjectId(AnyObjectId obj, int objType){@object = obj.Copy();type = objType;}
|
train
| false
|
2,487
|
public ValueEval getItem(int index) {if (index != 0) {throw new RuntimeException("Invalid index ("+ index + ") only zero is allowed");}return _value;}
|
[
"public",
"ValueEval",
"getItem",
"(",
"int",
"index",
")",
"{",
"if",
"(",
"index",
"!=",
"0",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"Invalid index (\"",
"+",
"index",
"+",
"\") only zero is allowed\"",
")",
";",
"}",
"return",
"_value",
";",
"}"
] |
public ValueEval GetItem(int index){if (index != 0){throw new ArgumentException("Invalid index ("+ index + ") only zero is allowed");}return _value;}
|
train
| false
|
2,489
|
public GetCampaignVersionResult getCampaignVersion(GetCampaignVersionRequest request) {request = beforeClientExecution(request);return executeGetCampaignVersion(request);}
|
[
"public",
"GetCampaignVersionResult",
"getCampaignVersion",
"(",
"GetCampaignVersionRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetCampaignVersion",
"(",
"request",
")",
";",
"}"
] |
public virtual GetCampaignVersionResponse GetCampaignVersion(GetCampaignVersionRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetCampaignVersionRequestMarshaller.Instance;options.ResponseUnmarshaller = GetCampaignVersionResponseUnmarshaller.Instance;return Invoke<GetCampaignVersionResponse>(request, options);}
|
train
| true
|
2,490
|
public SeriesTextRecord(RecordInputStream in) {field_1_id = in.readUShort();int field_2_textLength = in.readUByte();is16bit = (in.readUByte() & 0x01) != 0;if (is16bit) {field_4_text = in.readUnicodeLEString(field_2_textLength);} else {field_4_text = in.readCompressedUnicode(field_2_textLength);}}
|
[
"public",
"SeriesTextRecord",
"(",
"RecordInputStream",
"in",
")",
"{",
"field_1_id",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"int",
"field_2_textLength",
"=",
"in",
".",
"readUByte",
"(",
")",
";",
"is16bit",
"=",
"(",
"in",
".",
"readUByte",
"(",
")",
"&",
"0x01",
")",
"!=",
"0",
";",
"if",
"(",
"is16bit",
")",
"{",
"field_4_text",
"=",
"in",
".",
"readUnicodeLEString",
"(",
"field_2_textLength",
")",
";",
"}",
"else",
"{",
"field_4_text",
"=",
"in",
".",
"readCompressedUnicode",
"(",
"field_2_textLength",
")",
";",
"}",
"}"
] |
public SeriesTextRecord(RecordInputStream in1){field_1_id = in1.ReadShort();int field_2_textLength = (byte)in1.ReadByte();is16bit = (in1.ReadUByte() & 0x01) != 0;if (is16bit){field_4_text = in1.ReadUnicodeLEString(field_2_textLength);}else{field_4_text = in1.ReadCompressedUnicode(field_2_textLength);}}
|
train
| false
|
2,491
|
public void writeUTF(String value) throws IOException {checkWritePrimitiveTypes();primitiveTypes.writeUTF(value);}
|
[
"public",
"void",
"writeUTF",
"(",
"String",
"value",
")",
"throws",
"IOException",
"{",
"checkWritePrimitiveTypes",
"(",
")",
";",
"primitiveTypes",
".",
"writeUTF",
"(",
"value",
")",
";",
"}"
] |
public virtual void writeUTF(string value){throw new System.NotImplementedException();}
|
train
| false
|
2,492
|
public DeleteCacheSubnetGroupResult deleteCacheSubnetGroup(DeleteCacheSubnetGroupRequest request) {request = beforeClientExecution(request);return executeDeleteCacheSubnetGroup(request);}
|
[
"public",
"DeleteCacheSubnetGroupResult",
"deleteCacheSubnetGroup",
"(",
"DeleteCacheSubnetGroupRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteCacheSubnetGroup",
"(",
"request",
")",
";",
"}"
] |
public virtual DeleteCacheSubnetGroupResponse DeleteCacheSubnetGroup(DeleteCacheSubnetGroupRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteCacheSubnetGroupRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteCacheSubnetGroupResponseUnmarshaller.Instance;return Invoke<DeleteCacheSubnetGroupResponse>(request, options);}
|
train
| true
|
2,493
|
public Tab getItem(int position) {return mTabs.get(position);}
|
[
"public",
"Tab",
"getItem",
"(",
"int",
"position",
")",
"{",
"return",
"mTabs",
".",
"get",
"(",
"position",
")",
";",
"}"
] |
public override object getItem(int position){return ((android.widget.@internal.ScrollingTabContainerView.TabView)this._enclosing.mTabLayout.getChildAt(position)).getTab();}
|
train
| false
|
2,494
|
public int createFormat(String formatString) {maxformatid = maxformatid >= 0xa4 ? maxformatid + 1 : 0xa4; FormatRecord rec = new FormatRecord(maxformatid, formatString);int pos = 0;while ( pos < records.size() && records.get( pos ).getSid() != FormatRecord.sid ) {pos++;}pos += formats.size();formats.add( rec );records.add( pos, rec );return maxformatid;}
|
[
"public",
"int",
"createFormat",
"(",
"String",
"formatString",
")",
"{",
"maxformatid",
"=",
"maxformatid",
">=",
"0xa4",
"?",
"maxformatid",
"+",
"1",
":",
"0xa4",
";",
"FormatRecord",
"rec",
"=",
"new",
"FormatRecord",
"(",
"maxformatid",
",",
"formatString",
")",
";",
"int",
"pos",
"=",
"0",
";",
"while",
"(",
"pos",
"<",
"records",
".",
"size",
"(",
")",
"&&",
"records",
".",
"get",
"(",
"pos",
")",
".",
"getSid",
"(",
")",
"!=",
"FormatRecord",
".",
"sid",
")",
"{",
"pos",
"++",
";",
"}",
"pos",
"+=",
"formats",
".",
"size",
"(",
")",
";",
"formats",
".",
"add",
"(",
"rec",
")",
";",
"records",
".",
"add",
"(",
"pos",
",",
"rec",
")",
";",
"return",
"maxformatid",
";",
"}"
] |
public int CreateFormat(String formatString){maxformatid = maxformatid >= (short)0xa4 ? (short)(maxformatid + 1) : (short)0xa4; FormatRecord rec = new FormatRecord(maxformatid, formatString);int pos = 0;while (pos < records.Count && records[pos].Sid != FormatRecord.sid)pos++;pos += formats.Count;formats.Add(rec);records.Add(pos, rec);return maxformatid;}
|
train
| false
|
2,495
|
public ListDeploymentStrategiesResult listDeploymentStrategies(ListDeploymentStrategiesRequest request) {request = beforeClientExecution(request);return executeListDeploymentStrategies(request);}
|
[
"public",
"ListDeploymentStrategiesResult",
"listDeploymentStrategies",
"(",
"ListDeploymentStrategiesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListDeploymentStrategies",
"(",
"request",
")",
";",
"}"
] |
public virtual ListDeploymentStrategiesResponse ListDeploymentStrategies(ListDeploymentStrategiesRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListDeploymentStrategiesRequestMarshaller.Instance;options.ResponseUnmarshaller = ListDeploymentStrategiesResponseUnmarshaller.Instance;return Invoke<ListDeploymentStrategiesResponse>(request, options);}
|
train
| false
|
2,496
|
public CreateLoginProfileRequest(String userName, String password) {setUserName(userName);setPassword(password);}
|
[
"public",
"CreateLoginProfileRequest",
"(",
"String",
"userName",
",",
"String",
"password",
")",
"{",
"setUserName",
"(",
"userName",
")",
";",
"setPassword",
"(",
"password",
")",
";",
"}"
] |
public CreateLoginProfileRequest(string userName, string password){_userName = userName;_password = password;}
|
train
| false
|
2,497
|
public String getMetadata() throws ClientException {HttpRequest request = new HttpRequest(credentialUrl.toString());request.setSysMethod(MethodType.GET);request.setSysConnectTimeout(connectionTimeoutInMilliseconds);request.setSysReadTimeout(connectionTimeoutInMilliseconds);HttpResponse response;try {response = CompatibleUrlConnClient.compatibleGetResponse(request);} catch (Exception e) {throw new ClientException("Failed to connect ECS Metadata Service: " + e.toString());}if (response.getStatus() != HttpURLConnection.HTTP_OK) {throw new ClientException(ECS_METADAT_FETCH_ERROR_MSG + " HttpCode=" + response.getStatus());}return new String(response.getHttpContent());}
|
[
"public",
"String",
"getMetadata",
"(",
")",
"throws",
"ClientException",
"{",
"HttpRequest",
"request",
"=",
"new",
"HttpRequest",
"(",
"credentialUrl",
".",
"toString",
"(",
")",
")",
";",
"request",
".",
"setSysMethod",
"(",
"MethodType",
".",
"GET",
")",
";",
"request",
".",
"setSysConnectTimeout",
"(",
"connectionTimeoutInMilliseconds",
")",
";",
"request",
".",
"setSysReadTimeout",
"(",
"connectionTimeoutInMilliseconds",
")",
";",
"HttpResponse",
"response",
";",
"try",
"{",
"response",
"=",
"CompatibleUrlConnClient",
".",
"compatibleGetResponse",
"(",
"request",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"throw",
"new",
"ClientException",
"(",
"\"Failed to connect ECS Metadata Service: \"",
"+",
"e",
".",
"toString",
"(",
")",
")",
";",
"}",
"if",
"(",
"response",
".",
"getStatus",
"(",
")",
"!=",
"HttpURLConnection",
".",
"HTTP_OK",
")",
"{",
"throw",
"new",
"ClientException",
"(",
"ECS_METADAT_FETCH_ERROR_MSG",
"+",
"\" HttpCode=\"",
"+",
"response",
".",
"getStatus",
"(",
")",
")",
";",
"}",
"return",
"new",
"String",
"(",
"response",
".",
"getHttpContent",
"(",
")",
")",
";",
"}"
] |
public string GetMetadata(){var request = new HttpRequest(credentialUrl);request.Method = MethodType.GET;request.SetConnectTimeoutInMilliSeconds(connectionTimeoutInMilliseconds);HttpResponse response;try{response = GetResponse(request);}catch (WebException e){throw new ClientException("Failed to connect ECS Metadata Service: " + e);}if (response.Status != 200){throw new ClientException(ECS_METADAT_FETCH_ERROR_MSG + " HttpCode=" + response.Status);}return Encoding.UTF8.GetString(response.Content);}
|
train
| false
|
2,498
|
public void setAbbreviationLength(int count) {if (count < 0)throw new IllegalArgumentException(JGitText.get().abbreviationLengthMustBeNonNegative);abbreviationLength = count;}
|
[
"public",
"void",
"setAbbreviationLength",
"(",
"int",
"count",
")",
"{",
"if",
"(",
"count",
"<",
"0",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"JGitText",
".",
"get",
"(",
")",
".",
"abbreviationLengthMustBeNonNegative",
")",
";",
"abbreviationLength",
"=",
"count",
";",
"}"
] |
public virtual void SetAbbreviationLength(int count){if (count < 0){throw new ArgumentException(JGitText.Get().abbreviationLengthMustBeNonNegative);}abbreviationLength = count;}
|
train
| false
|
2,499
|
public SearchFacesByImageResult searchFacesByImage(SearchFacesByImageRequest request) {request = beforeClientExecution(request);return executeSearchFacesByImage(request);}
|
[
"public",
"SearchFacesByImageResult",
"searchFacesByImage",
"(",
"SearchFacesByImageRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeSearchFacesByImage",
"(",
"request",
")",
";",
"}"
] |
public virtual SearchFacesByImageResponse SearchFacesByImage(SearchFacesByImageRequest request){var options = new InvokeOptions();options.RequestMarshaller = SearchFacesByImageRequestMarshaller.Instance;options.ResponseUnmarshaller = SearchFacesByImageResponseUnmarshaller.Instance;return Invoke<SearchFacesByImageResponse>(request, options);}
|
train
| true
|
2,500
|
public ListMonitoringSchedulesResult listMonitoringSchedules(ListMonitoringSchedulesRequest request) {request = beforeClientExecution(request);return executeListMonitoringSchedules(request);}
|
[
"public",
"ListMonitoringSchedulesResult",
"listMonitoringSchedules",
"(",
"ListMonitoringSchedulesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListMonitoringSchedules",
"(",
"request",
")",
";",
"}"
] |
public virtual ListMonitoringSchedulesResponse ListMonitoringSchedules(ListMonitoringSchedulesRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListMonitoringSchedulesRequestMarshaller.Instance;options.ResponseUnmarshaller = ListMonitoringSchedulesResponseUnmarshaller.Instance;return Invoke<ListMonitoringSchedulesResponse>(request, options);}
|
train
| false
|
2,502
|
public E next() {if (index < to) {return (E) snapshot[index++];} else {throw new NoSuchElementException();}}
|
[
"public",
"E",
"next",
"(",
")",
"{",
"if",
"(",
"index",
"<",
"to",
")",
"{",
"return",
"(",
"E",
")",
"snapshot",
"[",
"index",
"++",
"]",
";",
"}",
"else",
"{",
"throw",
"new",
"NoSuchElementException",
"(",
")",
";",
"}",
"}"
] |
public virtual E next(){if (index < to){return (E)snapshot[index++];}else{throw new java.util.NoSuchElementException();}}
|
train
| false
|
2,503
|
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval inumberVE) {ValueEval veText1;try {veText1 = OperandResolver.getSingleValue(inumberVE, srcRowIndex, srcColumnIndex);} catch (EvaluationException e) {return e.getErrorEval();}String iNumber = OperandResolver.coerceValueToString(veText1);Matcher m = Imaginary.COMPLEX_NUMBER_PATTERN.matcher(iNumber);boolean result = m.matches();String real = "";if (result) {String realGroup = m.group(2);boolean hasRealPart = realGroup.length() != 0;if (realGroup.length() == 0) {return new StringEval(String.valueOf(0));}if (hasRealPart) {String sign = "";String realSign = m.group(Imaginary.GROUP1_REAL_SIGN);if (realSign.length() != 0 && !(realSign.equals("+"))) {sign = realSign;}String groupRealNumber = m.group(Imaginary.GROUP2_IMAGINARY_INTEGER_OR_DOUBLE);if (groupRealNumber.length() != 0) {real = sign + groupRealNumber;} else {real = sign + "1";}}} else {return ErrorEval.NUM_ERROR;}return new StringEval(real);}
|
[
"public",
"ValueEval",
"evaluate",
"(",
"int",
"srcRowIndex",
",",
"int",
"srcColumnIndex",
",",
"ValueEval",
"inumberVE",
")",
"{",
"ValueEval",
"veText1",
";",
"try",
"{",
"veText1",
"=",
"OperandResolver",
".",
"getSingleValue",
"(",
"inumberVE",
",",
"srcRowIndex",
",",
"srcColumnIndex",
")",
";",
"}",
"catch",
"(",
"EvaluationException",
"e",
")",
"{",
"return",
"e",
".",
"getErrorEval",
"(",
")",
";",
"}",
"String",
"iNumber",
"=",
"OperandResolver",
".",
"coerceValueToString",
"(",
"veText1",
")",
";",
"Matcher",
"m",
"=",
"Imaginary",
".",
"COMPLEX_NUMBER_PATTERN",
".",
"matcher",
"(",
"iNumber",
")",
";",
"boolean",
"result",
"=",
"m",
".",
"matches",
"(",
")",
";",
"String",
"real",
"=",
"\"\"",
";",
"if",
"(",
"result",
")",
"{",
"String",
"realGroup",
"=",
"m",
".",
"group",
"(",
"2",
")",
";",
"boolean",
"hasRealPart",
"=",
"realGroup",
".",
"length",
"(",
")",
"!=",
"0",
";",
"if",
"(",
"realGroup",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"return",
"new",
"StringEval",
"(",
"String",
".",
"valueOf",
"(",
"0",
")",
")",
";",
"}",
"if",
"(",
"hasRealPart",
")",
"{",
"String",
"sign",
"=",
"\"\"",
";",
"String",
"realSign",
"=",
"m",
".",
"group",
"(",
"Imaginary",
".",
"GROUP1_REAL_SIGN",
")",
";",
"if",
"(",
"realSign",
".",
"length",
"(",
")",
"!=",
"0",
"&&",
"!",
"(",
"realSign",
".",
"equals",
"(",
"\"+\"",
")",
")",
")",
"{",
"sign",
"=",
"realSign",
";",
"}",
"String",
"groupRealNumber",
"=",
"m",
".",
"group",
"(",
"Imaginary",
".",
"GROUP2_IMAGINARY_INTEGER_OR_DOUBLE",
")",
";",
"if",
"(",
"groupRealNumber",
".",
"length",
"(",
")",
"!=",
"0",
")",
"{",
"real",
"=",
"sign",
"+",
"groupRealNumber",
";",
"}",
"else",
"{",
"real",
"=",
"sign",
"+",
"\"1\"",
";",
"}",
"}",
"}",
"else",
"{",
"return",
"ErrorEval",
".",
"NUM_ERROR",
";",
"}",
"return",
"new",
"StringEval",
"(",
"real",
")",
";",
"}"
] |
public override ValueEval Evaluate(int srcRowIndex, int srcColumnIndex, ValueEval inumberVE){ValueEval veText1;try{veText1 = OperandResolver.GetSingleValue(inumberVE, srcRowIndex, srcColumnIndex);}catch (EvaluationException e){return e.GetErrorEval();}String iNumber = OperandResolver.CoerceValueToString(veText1);System.Text.RegularExpressions.Match m = Imaginary.COMPLEX_NUMBER_PATTERN.Match(iNumber);bool result = m.Success && !string.IsNullOrEmpty(m.Groups[0].Value);String real = "";if (result == true){String realGroup = m.Groups[(2)].Value;bool hasRealPart = realGroup.Length != 0;if (realGroup.Length == 0){return new StringEval(Convert.ToString(0));}if (hasRealPart){String sign = "";String realSign = m.Groups[(Imaginary.GROUP1_REAL_SIGN)].Value;if (realSign.Length != 0 && !(realSign.Equals("+"))){sign = realSign;}String groupRealNumber = m.Groups[(Imaginary.GROUP2_IMAGINARY_INTEGER_OR_DOUBLE)].Value;if (groupRealNumber.Length != 0){real = sign + groupRealNumber;}else{real = sign + "1";}}}else{return ErrorEval.NUM_ERROR;}return new StringEval(real);}
|
train
| false
|
2,504
|
public PlacementType(String availabilityZone) {setAvailabilityZone(availabilityZone);}
|
[
"public",
"PlacementType",
"(",
"String",
"availabilityZone",
")",
"{",
"setAvailabilityZone",
"(",
"availabilityZone",
")",
";",
"}"
] |
public PlacementType(string availabilityZone){_availabilityZone = availabilityZone;}
|
train
| false
|
2,505
|
public UpdateDomainResult updateDomain(UpdateDomainRequest request) {request = beforeClientExecution(request);return executeUpdateDomain(request);}
|
[
"public",
"UpdateDomainResult",
"updateDomain",
"(",
"UpdateDomainRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateDomain",
"(",
"request",
")",
";",
"}"
] |
public virtual UpdateDomainResponse UpdateDomain(UpdateDomainRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateDomainRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateDomainResponseUnmarshaller.Instance;return Invoke<UpdateDomainResponse>(request, options);}
|
train
| false
|
2,506
|
public byte[] serialize(){byte[] retval = new byte[getRecordSize()];serialize( 0, retval );return retval;}
|
[
"public",
"byte",
"[",
"]",
"serialize",
"(",
")",
"{",
"byte",
"[",
"]",
"retval",
"=",
"new",
"byte",
"[",
"getRecordSize",
"(",
")",
"]",
";",
"serialize",
"(",
"0",
",",
"retval",
")",
";",
"return",
"retval",
";",
"}"
] |
public byte[] Serialize(){byte[] retval = new byte[RecordSize];int length=Serialize(0, retval);return retval;}
|
train
| false
|
2,507
|
public GetLoadBalancerResult getLoadBalancer(GetLoadBalancerRequest request) {request = beforeClientExecution(request);return executeGetLoadBalancer(request);}
|
[
"public",
"GetLoadBalancerResult",
"getLoadBalancer",
"(",
"GetLoadBalancerRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetLoadBalancer",
"(",
"request",
")",
";",
"}"
] |
public virtual GetLoadBalancerResponse GetLoadBalancer(GetLoadBalancerRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetLoadBalancerRequestMarshaller.Instance;options.ResponseUnmarshaller = GetLoadBalancerResponseUnmarshaller.Instance;return Invoke<GetLoadBalancerResponse>(request, options);}
|
train
| true
|
2,508
|
public ModifyTrafficMirrorFilterRuleResult modifyTrafficMirrorFilterRule(ModifyTrafficMirrorFilterRuleRequest request) {request = beforeClientExecution(request);return executeModifyTrafficMirrorFilterRule(request);}
|
[
"public",
"ModifyTrafficMirrorFilterRuleResult",
"modifyTrafficMirrorFilterRule",
"(",
"ModifyTrafficMirrorFilterRuleRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeModifyTrafficMirrorFilterRule",
"(",
"request",
")",
";",
"}"
] |
public virtual ModifyTrafficMirrorFilterRuleResponse ModifyTrafficMirrorFilterRule(ModifyTrafficMirrorFilterRuleRequest request){var options = new InvokeOptions();options.RequestMarshaller = ModifyTrafficMirrorFilterRuleRequestMarshaller.Instance;options.ResponseUnmarshaller = ModifyTrafficMirrorFilterRuleResponseUnmarshaller.Instance;return Invoke<ModifyTrafficMirrorFilterRuleResponse>(request, options);}
|
train
| false
|
2,509
|
public void resize(double scaleX, double scaleY) {HSSFClientAnchor anchor = getClientAnchor();anchor.setAnchorType(AnchorType.MOVE_DONT_RESIZE);HSSFClientAnchor pref = getPreferredSize(scaleX,scaleY);int row2 = anchor.getRow1() + (pref.getRow2() - pref.getRow1());int col2 = anchor.getCol1() + (pref.getCol2() - pref.getCol1());anchor.setCol2((short)col2);anchor.setDx2(pref.getDx2());anchor.setRow2(row2);anchor.setDy2(pref.getDy2());}
|
[
"public",
"void",
"resize",
"(",
"double",
"scaleX",
",",
"double",
"scaleY",
")",
"{",
"HSSFClientAnchor",
"anchor",
"=",
"getClientAnchor",
"(",
")",
";",
"anchor",
".",
"setAnchorType",
"(",
"AnchorType",
".",
"MOVE_DONT_RESIZE",
")",
";",
"HSSFClientAnchor",
"pref",
"=",
"getPreferredSize",
"(",
"scaleX",
",",
"scaleY",
")",
";",
"int",
"row2",
"=",
"anchor",
".",
"getRow1",
"(",
")",
"+",
"(",
"pref",
".",
"getRow2",
"(",
")",
"-",
"pref",
".",
"getRow1",
"(",
")",
")",
";",
"int",
"col2",
"=",
"anchor",
".",
"getCol1",
"(",
")",
"+",
"(",
"pref",
".",
"getCol2",
"(",
")",
"-",
"pref",
".",
"getCol1",
"(",
")",
")",
";",
"anchor",
".",
"setCol2",
"(",
"(",
"short",
")",
"col2",
")",
";",
"anchor",
".",
"setDx2",
"(",
"pref",
".",
"getDx2",
"(",
")",
")",
";",
"anchor",
".",
"setRow2",
"(",
"row2",
")",
";",
"anchor",
".",
"setDy2",
"(",
"pref",
".",
"getDy2",
"(",
")",
")",
";",
"}"
] |
public void Resize(double scaleX, double scaleY){HSSFClientAnchor anchor = (HSSFClientAnchor)ClientAnchor;anchor.AnchorType = AnchorType.MoveDontResize;HSSFClientAnchor pref = GetPreferredSize(scaleX, scaleY) as HSSFClientAnchor;int row2 = anchor.Row1 + (pref.Row2 - pref.Row1);int col2 = anchor.Col1 + (pref.Col2 - pref.Col1);anchor.Col2=((short)col2);anchor.Dx2=(pref.Dx2);anchor.Row2 = (row2);anchor.Dy2 = (pref.Dy2);}
|
train
| false
|
2,510
|
public void reset() throws IOException {throw new IOException("mark/reset not supported");}
|
[
"public",
"void",
"reset",
"(",
")",
"throws",
"IOException",
"{",
"throw",
"new",
"IOException",
"(",
"\"mark/reset not supported\"",
")",
";",
"}"
] |
public override void reset(){throw new System.IO.IOException("mark/reset not supported");}
|
train
| false
|
2,511
|
public Body(Content text) {setText(text);}
|
[
"public",
"Body",
"(",
"Content",
"text",
")",
"{",
"setText",
"(",
"text",
")",
";",
"}"
] |
public Body(Content text){_text = text;}
|
train
| false
|
2,512
|
public StaticCredentialsProvider(IClientProfile clientProfile) {IClientProfile clientProfile1 = clientProfile;Credential legacyCredential = clientProfile1.getCredential();if (null != legacyCredential.getSecurityToken()) {this.credentials = new BasicSessionCredentials(legacyCredential.getAccessKeyId(), legacyCredential.getAccessSecret(), legacyCredential.getSecurityToken());} else {this.credentials = new LegacyCredentials(legacyCredential);}}
|
[
"public",
"StaticCredentialsProvider",
"(",
"IClientProfile",
"clientProfile",
")",
"{",
"IClientProfile",
"clientProfile1",
"=",
"clientProfile",
";",
"Credential",
"legacyCredential",
"=",
"clientProfile1",
".",
"getCredential",
"(",
")",
";",
"if",
"(",
"null",
"!=",
"legacyCredential",
".",
"getSecurityToken",
"(",
")",
")",
"{",
"this",
".",
"credentials",
"=",
"new",
"BasicSessionCredentials",
"(",
"legacyCredential",
".",
"getAccessKeyId",
"(",
")",
",",
"legacyCredential",
".",
"getAccessSecret",
"(",
")",
",",
"legacyCredential",
".",
"getSecurityToken",
"(",
")",
")",
";",
"}",
"else",
"{",
"this",
".",
"credentials",
"=",
"new",
"LegacyCredentials",
"(",
"legacyCredential",
")",
";",
"}",
"}"
] |
public StaticCredentialsProvider(IClientProfile clientProfile){this.clientProfile = clientProfile;var legacyCredential = this.clientProfile.GetCredential();if (null != legacyCredential.SecurityToken){credentials = new BasicSessionCredentials(legacyCredential.AccessKeyId,legacyCredential.AccessSecret,legacyCredential.SecurityToken);}else{credentials = new LegacyCredentials(legacyCredential);}}
|
train
| false
|
2,514
|
public void keep(int pos, int cnt) {beforeAdd(cache.getEntry(pos));fastKeep(pos, cnt);}
|
[
"public",
"void",
"keep",
"(",
"int",
"pos",
",",
"int",
"cnt",
")",
"{",
"beforeAdd",
"(",
"cache",
".",
"getEntry",
"(",
"pos",
")",
")",
";",
"fastKeep",
"(",
"pos",
",",
"cnt",
")",
";",
"}"
] |
public virtual void Keep(int pos, int cnt){BeforeAdd(cache.GetEntry(pos));FastKeep(pos, cnt);}
|
train
| false
|
2,515
|
public TableStylesRecord(RecordInputStream in) {rt = in.readUShort();grbitFrt = in.readUShort();in.readFully(unused);cts = in.readInt();int cchDefListStyle = in.readUShort();int cchDefPivotStyle = in.readUShort();rgchDefListStyle = in.readUnicodeLEString(cchDefListStyle);rgchDefPivotStyle = in.readUnicodeLEString(cchDefPivotStyle);}
|
[
"public",
"TableStylesRecord",
"(",
"RecordInputStream",
"in",
")",
"{",
"rt",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"grbitFrt",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"in",
".",
"readFully",
"(",
"unused",
")",
";",
"cts",
"=",
"in",
".",
"readInt",
"(",
")",
";",
"int",
"cchDefListStyle",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"int",
"cchDefPivotStyle",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"rgchDefListStyle",
"=",
"in",
".",
"readUnicodeLEString",
"(",
"cchDefListStyle",
")",
";",
"rgchDefPivotStyle",
"=",
"in",
".",
"readUnicodeLEString",
"(",
"cchDefPivotStyle",
")",
";",
"}"
] |
public TableStylesRecord(RecordInputStream in1){rt = in1.ReadUShort();grbitFrt = in1.ReadUShort();in1.ReadFully(unused);cts = in1.ReadInt();int cchDefListStyle = in1.ReadUShort();int cchDefPivotStyle = in1.ReadUShort();rgchDefListStyle = in1.ReadUnicodeLEString(cchDefListStyle);rgchDefPivotStyle = in1.ReadUnicodeLEString(cchDefPivotStyle);}
|
train
| false
|
2,516
|
public AddAttributesToFindingsResult addAttributesToFindings(AddAttributesToFindingsRequest request) {request = beforeClientExecution(request);return executeAddAttributesToFindings(request);}
|
[
"public",
"AddAttributesToFindingsResult",
"addAttributesToFindings",
"(",
"AddAttributesToFindingsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeAddAttributesToFindings",
"(",
"request",
")",
";",
"}"
] |
public virtual AddAttributesToFindingsResponse AddAttributesToFindings(AddAttributesToFindingsRequest request){var options = new InvokeOptions();options.RequestMarshaller = AddAttributesToFindingsRequestMarshaller.Instance;options.ResponseUnmarshaller = AddAttributesToFindingsResponseUnmarshaller.Instance;return Invoke<AddAttributesToFindingsResponse>(request, options);}
|
train
| true
|
2,517
|
public CellElapsedFormatter(String pattern) {super(pattern);specs = new ArrayList<>();StringBuffer desc = CellFormatPart.parseFormat(pattern,CellFormatType.ELAPSED, new ElapsedPartHandler());ListIterator<TimeSpec> it = specs.listIterator(specs.size());while (it.hasPrevious()) {TimeSpec spec = it.previous();desc.replace(spec.pos, spec.pos + spec.len, "%0" + spec.len + "d");if (spec.type != topmost.type) {spec.modBy = modFor(spec.type, spec.len);}}printfFmt = desc.toString();}
|
[
"public",
"CellElapsedFormatter",
"(",
"String",
"pattern",
")",
"{",
"super",
"(",
"pattern",
")",
";",
"specs",
"=",
"new",
"ArrayList",
"<",
">",
"(",
")",
";",
"StringBuffer",
"desc",
"=",
"CellFormatPart",
".",
"parseFormat",
"(",
"pattern",
",",
"CellFormatType",
".",
"ELAPSED",
",",
"new",
"ElapsedPartHandler",
"(",
")",
")",
";",
"ListIterator",
"<",
"TimeSpec",
">",
"it",
"=",
"specs",
".",
"listIterator",
"(",
"specs",
".",
"size",
"(",
")",
")",
";",
"while",
"(",
"it",
".",
"hasPrevious",
"(",
")",
")",
"{",
"TimeSpec",
"spec",
"=",
"it",
".",
"previous",
"(",
")",
";",
"desc",
".",
"replace",
"(",
"spec",
".",
"pos",
",",
"spec",
".",
"pos",
"+",
"spec",
".",
"len",
",",
"\"%0\"",
"+",
"spec",
".",
"len",
"+",
"\"d\"",
")",
";",
"if",
"(",
"spec",
".",
"type",
"!=",
"topmost",
".",
"type",
")",
"{",
"spec",
".",
"modBy",
"=",
"modFor",
"(",
"spec",
".",
"type",
",",
"spec",
".",
"len",
")",
";",
"}",
"}",
"printfFmt",
"=",
"desc",
".",
"toString",
"(",
")",
";",
"}"
] |
public CellElapsedFormatter(String pattern): base(pattern){specs = new List<TimeSpec>();StringBuilder desc = CellFormatPart.ParseFormat(pattern,CellFormatType.ELAPSED, new ElapsedPartHandler(this));for(int i=specs.Count-1;i>=0;i--){TimeSpec spec = specs[i];desc.Remove(spec.pos, spec.len);desc.Insert(spec.pos, "D" + spec.len);if (spec.type != topmost.type){spec.modBy = modFor(spec.type, spec.len);}}printfFmt = desc.ToString();}
|
train
| false
|
2,518
|
public final int capacity() {return capacity;}
|
[
"public",
"final",
"int",
"capacity",
"(",
")",
"{",
"return",
"capacity",
";",
"}"
] |
public int capacity(){return _capacity;}
|
train
| false
|
2,519
|
public final boolean matches(char c) {return Character.isWhitespace(c);}
|
[
"public",
"final",
"boolean",
"matches",
"(",
"char",
"c",
")",
"{",
"return",
"Character",
".",
"isWhitespace",
"(",
"c",
")",
";",
"}"
] |
public bool Matches(char c){return char.IsWhiteSpace(c);}
|
train
| false
|
2,520
|
public BytesRef get(int bytesID, BytesRef ref) {assert bytesStart != null : "bytesStart is null - not initialized";assert bytesID < bytesStart.length: "bytesID exceeds byteStart len: " + bytesStart.length;pool.setBytesRef(ref, bytesStart[bytesID]);return ref;}
|
[
"public",
"BytesRef",
"get",
"(",
"int",
"bytesID",
",",
"BytesRef",
"ref",
")",
"{",
"assert",
"bytesStart",
"!=",
"null",
":",
"\"bytesStart is null - not initialized\"",
";",
"assert",
"bytesID",
"<",
"bytesStart",
".",
"length",
":",
"\"bytesID exceeds byteStart len: \"",
"+",
"bytesStart",
".",
"length",
";",
"pool",
".",
"setBytesRef",
"(",
"ref",
",",
"bytesStart",
"[",
"bytesID",
"]",
")",
";",
"return",
"ref",
";",
"}"
] |
public BytesRef Get(int bytesID, BytesRef @ref){Debug.Assert(bytesStart != null, "bytesStart is null - not initialized");Debug.Assert(bytesID < bytesStart.Length, "bytesID exceeds byteStart len: " + bytesStart.Length);pool.SetBytesRef(@ref, bytesStart[bytesID]);return @ref;}
|
train
| false
|
2,521
|
public void run() {display = true;}
|
[
"public",
"void",
"run",
"(",
")",
"{",
"display",
"=",
"true",
";",
"}"
] |
public virtual void Run(){display = true;}
|
train
| false
|
2,522
|
public UpdateMatchmakingConfigurationResult updateMatchmakingConfiguration(UpdateMatchmakingConfigurationRequest request) {request = beforeClientExecution(request);return executeUpdateMatchmakingConfiguration(request);}
|
[
"public",
"UpdateMatchmakingConfigurationResult",
"updateMatchmakingConfiguration",
"(",
"UpdateMatchmakingConfigurationRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateMatchmakingConfiguration",
"(",
"request",
")",
";",
"}"
] |
public virtual UpdateMatchmakingConfigurationResponse UpdateMatchmakingConfiguration(UpdateMatchmakingConfigurationRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateMatchmakingConfigurationRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateMatchmakingConfigurationResponseUnmarshaller.Instance;return Invoke<UpdateMatchmakingConfigurationResponse>(request, options);}
|
train
| true
|
2,523
|
public boolean isGroup(char c) {return groupMap[characterCategoryMap[c]];}
|
[
"public",
"boolean",
"isGroup",
"(",
"char",
"c",
")",
"{",
"return",
"groupMap",
"[",
"characterCategoryMap",
"[",
"c",
"]",
"]",
";",
"}"
] |
public bool IsGroup(char c){return groupMap[characterCategoryMap[c]];}
|
train
| false
|
2,524
|
public void setTraverseEmptyCells(boolean traverseEmptyCells) {this.traverseEmptyCells = traverseEmptyCells;}
|
[
"public",
"void",
"setTraverseEmptyCells",
"(",
"boolean",
"traverseEmptyCells",
")",
"{",
"this",
".",
"traverseEmptyCells",
"=",
"traverseEmptyCells",
";",
"}"
] |
public void SetTraverseEmptyCells(bool traverseEmptyCells){this.traverseEmptyCells = traverseEmptyCells;}
|
train
| false
|
2,525
|
public ListPresetsResult listPresets(ListPresetsRequest request) {request = beforeClientExecution(request);return executeListPresets(request);}
|
[
"public",
"ListPresetsResult",
"listPresets",
"(",
"ListPresetsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListPresets",
"(",
"request",
")",
";",
"}"
] |
public virtual ListPresetsResponse ListPresets(ListPresetsRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListPresetsRequestMarshaller.Instance;options.ResponseUnmarshaller = ListPresetsResponseUnmarshaller.Instance;return Invoke<ListPresetsResponse>(request, options);}
|
train
| true
|
2,526
|
@Override public Set<K> keySet() {Set<K> ks = keySet;return (ks != null) ? ks : (keySet = new KeySet());}
|
[
"@",
"Override",
"public",
"Set",
"<",
"K",
">",
"keySet",
"(",
")",
"{",
"Set",
"<",
"K",
">",
"ks",
"=",
"keySet",
";",
"return",
"(",
"ks",
"!=",
"null",
")",
"?",
"ks",
":",
"(",
"keySet",
"=",
"new",
"KeySet",
"(",
")",
")",
";",
"}"
] |
public override java.util.Set<K> keySet(){java.util.Set<K> ks = _keySet;return (ks != null) ? ks : (_keySet = new java.util.HashMap<K, V>.KeySet(this));}
|
train
| true
|
2,527
|
public void include(Ref r) {include(r.getName(), r.getObjectId());if (r.getPeeledObjectId() != null)tagTargets.add(r.getPeeledObjectId());else if (r.getObjectId() != null&& r.getName().startsWith(Constants.R_HEADS))tagTargets.add(r.getObjectId());}
|
[
"public",
"void",
"include",
"(",
"Ref",
"r",
")",
"{",
"include",
"(",
"r",
".",
"getName",
"(",
")",
",",
"r",
".",
"getObjectId",
"(",
")",
")",
";",
"if",
"(",
"r",
".",
"getPeeledObjectId",
"(",
")",
"!=",
"null",
")",
"tagTargets",
".",
"add",
"(",
"r",
".",
"getPeeledObjectId",
"(",
")",
")",
";",
"else",
"if",
"(",
"r",
".",
"getObjectId",
"(",
")",
"!=",
"null",
"&&",
"r",
".",
"getName",
"(",
")",
".",
"startsWith",
"(",
"Constants",
".",
"R_HEADS",
")",
")",
"tagTargets",
".",
"add",
"(",
"r",
".",
"getObjectId",
"(",
")",
")",
";",
"}"
] |
public virtual void Include(Ref r){Include(r.GetName(), r.GetObjectId());if (r.GetPeeledObjectId() != null){tagTargets.AddItem(r.GetPeeledObjectId());}else{if (r.GetObjectId() != null && r.GetName().StartsWith(Constants.R_HEADS)){tagTargets.AddItem(r.GetObjectId());}}}
|
train
| false
|
2,528
|
public CharBuffer get(char[] dst, int dstOffset, int charCount) {byteBuffer.limit(limit * SizeOf.CHAR);byteBuffer.position(position * SizeOf.CHAR);if (byteBuffer instanceof DirectByteBuffer) {((DirectByteBuffer) byteBuffer).get(dst, dstOffset, charCount);} else {((HeapByteBuffer) byteBuffer).get(dst, dstOffset, charCount);}this.position += charCount;return this;}
|
[
"public",
"CharBuffer",
"get",
"(",
"char",
"[",
"]",
"dst",
",",
"int",
"dstOffset",
",",
"int",
"charCount",
")",
"{",
"byteBuffer",
".",
"limit",
"(",
"limit",
"*",
"SizeOf",
".",
"CHAR",
")",
";",
"byteBuffer",
".",
"position",
"(",
"position",
"*",
"SizeOf",
".",
"CHAR",
")",
";",
"if",
"(",
"byteBuffer",
"instanceof",
"DirectByteBuffer",
")",
"{",
"(",
"(",
"DirectByteBuffer",
")",
"byteBuffer",
")",
".",
"get",
"(",
"dst",
",",
"dstOffset",
",",
"charCount",
")",
";",
"}",
"else",
"{",
"(",
"(",
"HeapByteBuffer",
")",
"byteBuffer",
")",
".",
"get",
"(",
"dst",
",",
"dstOffset",
",",
"charCount",
")",
";",
"}",
"this",
".",
"position",
"+=",
"charCount",
";",
"return",
"this",
";",
"}"
] |
public override java.nio.CharBuffer get(char[] dst, int dstOffset, int charCount){byteBuffer.limit(_limit * libcore.io.SizeOf.CHAR);byteBuffer.position(_position * libcore.io.SizeOf.CHAR);if (byteBuffer is java.nio.DirectByteBuffer){((java.nio.DirectByteBuffer)byteBuffer).get(dst, dstOffset, charCount);}else{((java.nio.HeapByteBuffer)byteBuffer).get(dst, dstOffset, charCount);}this._position += charCount;return this;}
|
train
| false
|
2,529
|
public BytesRef subtract(BytesRef output, BytesRef inc) {assert output != null;assert inc != null;if (inc == NO_OUTPUT) {return output;} else {assert StringHelper.startsWith(output, inc);if (inc.length == output.length) {return NO_OUTPUT;} else {assert inc.length < output.length: "inc.length=" + inc.length + " vs output.length=" + output.length;assert inc.length > 0;return new BytesRef(output.bytes, output.offset + inc.length, output.length-inc.length);}}}
|
[
"public",
"BytesRef",
"subtract",
"(",
"BytesRef",
"output",
",",
"BytesRef",
"inc",
")",
"{",
"assert",
"output",
"!=",
"null",
";",
"assert",
"inc",
"!=",
"null",
";",
"if",
"(",
"inc",
"==",
"NO_OUTPUT",
")",
"{",
"return",
"output",
";",
"}",
"else",
"{",
"assert",
"StringHelper",
".",
"startsWith",
"(",
"output",
",",
"inc",
")",
";",
"if",
"(",
"inc",
".",
"length",
"==",
"output",
".",
"length",
")",
"{",
"return",
"NO_OUTPUT",
";",
"}",
"else",
"{",
"assert",
"inc",
".",
"length",
"<",
"output",
".",
"length",
":",
"\"inc.length=\"",
"+",
"inc",
".",
"length",
"+",
"\" vs output.length=\"",
"+",
"output",
".",
"length",
";",
"assert",
"inc",
".",
"length",
">",
"0",
";",
"return",
"new",
"BytesRef",
"(",
"output",
".",
"bytes",
",",
"output",
".",
"offset",
"+",
"inc",
".",
"length",
",",
"output",
".",
"length",
"-",
"inc",
".",
"length",
")",
";",
"}",
"}",
"}"
] |
public override BytesRef Subtract(BytesRef output, BytesRef inc){Debug.Assert(output != null);Debug.Assert(inc != null);if (inc == NO_OUTPUT){return output;}else if (inc.Length == output.Length){return NO_OUTPUT;}else{Debug.Assert(inc.Length < output.Length, "inc.length=" + inc.Length + " vs output.length=" + output.Length);Debug.Assert(inc.Length > 0);return new BytesRef(output.Bytes, output.Offset + inc.Length, output.Length - inc.Length);}}
|
train
| false
|
2,530
|
public boolean isKanji(char c) {final byte characterClass = characterCategoryMap[c];return characterClass == KANJI || characterClass == KANJINUMERIC;}
|
[
"public",
"boolean",
"isKanji",
"(",
"char",
"c",
")",
"{",
"final",
"byte",
"characterClass",
"=",
"characterCategoryMap",
"[",
"c",
"]",
";",
"return",
"characterClass",
"==",
"KANJI",
"||",
"characterClass",
"==",
"KANJINUMERIC",
";",
"}"
] |
public bool IsKanji(char c){byte characterClass = characterCategoryMap[c];return characterClass == KANJI || characterClass == KANJINUMERIC;}
|
train
| false
|
2,531
|
public int getType() {return type;}
|
[
"public",
"int",
"getType",
"(",
")",
"{",
"return",
"type",
";",
"}"
] |
public override int GetType(){return type;}
|
train
| false
|
2,532
|
public ValueEval getItem(int index) {if(index > _size) {throw new ArrayIndexOutOfBoundsException("Specified index (" + index+ ") is outside the allowed range (0.." + (_size-1) + ")");}return _tableArray.getValue(index, _columnIndex);}
|
[
"public",
"ValueEval",
"getItem",
"(",
"int",
"index",
")",
"{",
"if",
"(",
"index",
">",
"_size",
")",
"{",
"throw",
"new",
"ArrayIndexOutOfBoundsException",
"(",
"\"Specified index (\"",
"+",
"index",
"+",
"\") is outside the allowed range (0..\"",
"+",
"(",
"_size",
"-",
"1",
")",
"+",
"\")\"",
")",
";",
"}",
"return",
"_tableArray",
".",
"getValue",
"(",
"index",
",",
"_columnIndex",
")",
";",
"}"
] |
public ValueEval GetItem(int index){if (index > _size){throw new IndexOutOfRangeException("Specified index (" + index+ ") is outside the allowed range (0.." + (_size - 1) + ")");}return _tableArray.GetRelativeValue(index, _columnIndex);}
|
train
| false
|
2,534
|
final public QueryNode ConjQuery(CharSequence field) throws ParseException {QueryNode first, c;Vector<QueryNode> clauses = null;first = ModClause(field);label_3:while (true) {switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {case AND:;break;default:jj_la1[4] = jj_gen;break label_3;}jj_consume_token(AND);c = ModClause(field);if (clauses == null) {clauses = new Vector<QueryNode>();clauses.addElement(first);}clauses.addElement(c);}if (clauses != null) {{if (true) return new AndQueryNode(clauses);}} else {{if (true) return first;}}throw new Error("Missing return statement in function");}
|
[
"final",
"public",
"QueryNode",
"ConjQuery",
"(",
"CharSequence",
"field",
")",
"throws",
"ParseException",
"{",
"QueryNode",
"first",
",",
"c",
";",
"Vector",
"<",
"QueryNode",
">",
"clauses",
"=",
"null",
";",
"first",
"=",
"ModClause",
"(",
"field",
")",
";",
"label_3",
":",
"while",
"(",
"true",
")",
"{",
"switch",
"(",
"(",
"jj_ntk",
"==",
"-",
"1",
")",
"?",
"jj_ntk",
"(",
")",
":",
"jj_ntk",
")",
"{",
"case",
"AND",
":",
";",
"break",
";",
"default",
":",
"jj_la1",
"[",
"4",
"]",
"=",
"jj_gen",
";",
"break",
"label_3",
";",
"}",
"jj_consume_token",
"(",
"AND",
")",
";",
"c",
"=",
"ModClause",
"(",
"field",
")",
";",
"if",
"(",
"clauses",
"==",
"null",
")",
"{",
"clauses",
"=",
"new",
"Vector",
"<",
"QueryNode",
">",
"(",
")",
";",
"clauses",
".",
"addElement",
"(",
"first",
")",
";",
"}",
"clauses",
".",
"addElement",
"(",
"c",
")",
";",
"}",
"if",
"(",
"clauses",
"!=",
"null",
")",
"{",
"{",
"if",
"(",
"true",
")",
"return",
"new",
"AndQueryNode",
"(",
"clauses",
")",
";",
"}",
"}",
"else",
"{",
"{",
"if",
"(",
"true",
")",
"return",
"first",
";",
"}",
"}",
"throw",
"new",
"Error",
"(",
"\"Missing return statement in function\"",
")",
";",
"}"
] |
public IQueryNode ConjQuery(string field){IQueryNode first, c;List<IQueryNode> clauses = null;first = ModClause(field);while (true){switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk){case RegexpToken.AND:;break;default:jj_la1[6] = jj_gen;goto label_3_break;}Jj_consume_token(RegexpToken.AND);c = ModClause(field);if (clauses == null){clauses = new List<IQueryNode>();clauses.Add(first);}clauses.Add(c);}label_3_break:if (clauses != null){{ if (true) return new AndQueryNode(clauses); }}else{{ if (true) return first; }}throw new Exception("Missing return statement in function");}
|
train
| false
|
2,535
|
public void setRevFilter(RevFilter newFilter) {assertNotStarted();filter = newFilter != null ? newFilter : RevFilter.ALL;}
|
[
"public",
"void",
"setRevFilter",
"(",
"RevFilter",
"newFilter",
")",
"{",
"assertNotStarted",
"(",
")",
";",
"filter",
"=",
"newFilter",
"!=",
"null",
"?",
"newFilter",
":",
"RevFilter",
".",
"ALL",
";",
"}"
] |
public virtual void SetRevFilter(RevFilter newFilter){AssertNotStarted();filter = newFilter != null ? newFilter : RevFilter.ALL;}
|
train
| false
|
2,537
|
public GetVoiceChannelResult getVoiceChannel(GetVoiceChannelRequest request) {request = beforeClientExecution(request);return executeGetVoiceChannel(request);}
|
[
"public",
"GetVoiceChannelResult",
"getVoiceChannel",
"(",
"GetVoiceChannelRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetVoiceChannel",
"(",
"request",
")",
";",
"}"
] |
public virtual GetVoiceChannelResponse GetVoiceChannel(GetVoiceChannelRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetVoiceChannelRequestMarshaller.Instance;options.ResponseUnmarshaller = GetVoiceChannelResponseUnmarshaller.Instance;return Invoke<GetVoiceChannelResponse>(request, options);}
|
train
| true
|
2,538
|
public RevokeSecurityGroupIngressResult revokeSecurityGroupIngress(RevokeSecurityGroupIngressRequest request) {request = beforeClientExecution(request);return executeRevokeSecurityGroupIngress(request);}
|
[
"public",
"RevokeSecurityGroupIngressResult",
"revokeSecurityGroupIngress",
"(",
"RevokeSecurityGroupIngressRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeRevokeSecurityGroupIngress",
"(",
"request",
")",
";",
"}"
] |
public virtual RevokeSecurityGroupIngressResponse RevokeSecurityGroupIngress(RevokeSecurityGroupIngressRequest request){var options = new InvokeOptions();options.RequestMarshaller = RevokeSecurityGroupIngressRequestMarshaller.Instance;options.ResponseUnmarshaller = RevokeSecurityGroupIngressResponseUnmarshaller.Instance;return Invoke<RevokeSecurityGroupIngressResponse>(request, options);}
|
train
| true
|
2,539
|
public DoubleBuffer slice() {byteBuffer.limit(limit * SizeOf.DOUBLE);byteBuffer.position(position * SizeOf.DOUBLE);ByteBuffer bb = byteBuffer.slice().order(byteBuffer.order());DoubleBuffer result = new DoubleToByteBufferAdapter(bb);byteBuffer.clear();return result;}
|
[
"public",
"DoubleBuffer",
"slice",
"(",
")",
"{",
"byteBuffer",
".",
"limit",
"(",
"limit",
"*",
"SizeOf",
".",
"DOUBLE",
")",
";",
"byteBuffer",
".",
"position",
"(",
"position",
"*",
"SizeOf",
".",
"DOUBLE",
")",
";",
"ByteBuffer",
"bb",
"=",
"byteBuffer",
".",
"slice",
"(",
")",
".",
"order",
"(",
"byteBuffer",
".",
"order",
"(",
")",
")",
";",
"DoubleBuffer",
"result",
"=",
"new",
"DoubleToByteBufferAdapter",
"(",
"bb",
")",
";",
"byteBuffer",
".",
"clear",
"(",
")",
";",
"return",
"result",
";",
"}"
] |
public override java.nio.DoubleBuffer slice(){byteBuffer.limit(_limit * libcore.io.SizeOf.DOUBLE);byteBuffer.position(_position * libcore.io.SizeOf.DOUBLE);java.nio.ByteBuffer bb = byteBuffer.slice().order(byteBuffer.order());java.nio.DoubleBuffer result = new java.nio.DoubleToByteBufferAdapter(bb);byteBuffer.clear();return result;}
|
train
| false
|
2,540
|
public DoubleValuesSource makeDistanceValueSource(Point queryPoint, double multiplier) {return new DistanceValueSource(this, queryPoint, multiplier);}
|
[
"public",
"DoubleValuesSource",
"makeDistanceValueSource",
"(",
"Point",
"queryPoint",
",",
"double",
"multiplier",
")",
"{",
"return",
"new",
"DistanceValueSource",
"(",
"this",
",",
"queryPoint",
",",
"multiplier",
")",
";",
"}"
] |
public override ValueSource MakeDistanceValueSource(IPoint queryPoint, double multiplier){return new DistanceValueSource(this, queryPoint, multiplier);}
|
train
| false
|
2,541
|
public String toString() {final StringBuilder r = new StringBuilder();final SimpleDateFormat dtfmt;dtfmt = new SimpleDateFormat("EEE MMM d HH:mm:ss yyyy Z", Locale.US);dtfmt.setTimeZone(getTimeZone());r.append("PersonIdent[");r.append(getName());r.append(", ");r.append(getEmailAddress());r.append(", ");r.append(dtfmt.format(Long.valueOf(when)));r.append("]");return r.toString();}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"final",
"StringBuilder",
"r",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"final",
"SimpleDateFormat",
"dtfmt",
";",
"dtfmt",
"=",
"new",
"SimpleDateFormat",
"(",
"\"EEE MMM d HH:mm:ss yyyy Z\"",
",",
"Locale",
".",
"US",
")",
";",
"dtfmt",
".",
"setTimeZone",
"(",
"getTimeZone",
"(",
")",
")",
";",
"r",
".",
"append",
"(",
"\"PersonIdent[\"",
")",
";",
"r",
".",
"append",
"(",
"getName",
"(",
")",
")",
";",
"r",
".",
"append",
"(",
"\", \"",
")",
";",
"r",
".",
"append",
"(",
"getEmailAddress",
"(",
")",
")",
";",
"r",
".",
"append",
"(",
"\", \"",
")",
";",
"r",
".",
"append",
"(",
"dtfmt",
".",
"format",
"(",
"Long",
".",
"valueOf",
"(",
"when",
")",
")",
")",
";",
"r",
".",
"append",
"(",
"\"]\"",
")",
";",
"return",
"r",
".",
"toString",
"(",
")",
";",
"}"
] |
public override string ToString(){StringBuilder r = new StringBuilder();SimpleDateFormat dtfmt;dtfmt = new SimpleDateFormat("EEE MMM d HH:mm:ss yyyy Z", CultureInfo.InvariantCulture);dtfmt.SetTimeZone(GetTimeZone());r.Append("PersonIdent[");r.Append(GetName());r.Append(", ");r.Append(GetEmailAddress());r.Append(", ");r.Append(dtfmt.Format(Sharpen.Extensions.ValueOf(when)));r.Append("]");return r.ToString();}
|
train
| false
|
2,542
|
public ArabicStemFilterFactory(Map<String,String> args) {super(args);if (!args.isEmpty()) {throw new IllegalArgumentException("Unknown parameters: " + args);}}
|
[
"public",
"ArabicStemFilterFactory",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"args",
")",
"{",
"super",
"(",
"args",
")",
";",
"if",
"(",
"!",
"args",
".",
"isEmpty",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Unknown parameters: \"",
"+",
"args",
")",
";",
"}",
"}"
] |
public ArabicStemFilterFactory(IDictionary<string, string> args): base(args){if (args.Count > 0){throw new System.ArgumentException("Unknown parameters: " + args);}}
|
train
| false
|
2,543
|
public int getIndex() {return offset;}
|
[
"public",
"int",
"getIndex",
"(",
")",
"{",
"return",
"offset",
";",
"}"
] |
public int getIndex(){return offset;}
|
train
| false
|
2,544
|
public ListVoiceConnectorsResult listVoiceConnectors(ListVoiceConnectorsRequest request) {request = beforeClientExecution(request);return executeListVoiceConnectors(request);}
|
[
"public",
"ListVoiceConnectorsResult",
"listVoiceConnectors",
"(",
"ListVoiceConnectorsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListVoiceConnectors",
"(",
"request",
")",
";",
"}"
] |
public virtual ListVoiceConnectorsResponse ListVoiceConnectors(ListVoiceConnectorsRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListVoiceConnectorsRequestMarshaller.Instance;options.ResponseUnmarshaller = ListVoiceConnectorsResponseUnmarshaller.Instance;return Invoke<ListVoiceConnectorsResponse>(request, options);}
|
train
| true
|
2,545
|
public GetOperationResult getOperation(GetOperationRequest request) {request = beforeClientExecution(request);return executeGetOperation(request);}
|
[
"public",
"GetOperationResult",
"getOperation",
"(",
"GetOperationRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetOperation",
"(",
"request",
")",
";",
"}"
] |
public virtual GetOperationResponse GetOperation(GetOperationRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetOperationRequestMarshaller.Instance;options.ResponseUnmarshaller = GetOperationResponseUnmarshaller.Instance;return Invoke<GetOperationResponse>(request, options);}
|
train
| true
|
2,546
|
public Item(String name, java.util.List<Attribute> attributes) {setName(name);setAttributes(attributes);}
|
[
"public",
"Item",
"(",
"String",
"name",
",",
"java",
".",
"util",
".",
"List",
"<",
"Attribute",
">",
"attributes",
")",
"{",
"setName",
"(",
"name",
")",
";",
"setAttributes",
"(",
"attributes",
")",
";",
"}"
] |
public Item(string name, List<Attribute> attributes){_name = name;_attributes = attributes;}
|
train
| false
|
2,547
|
public SetIdentityHeadersInNotificationsEnabledResult setIdentityHeadersInNotificationsEnabled(SetIdentityHeadersInNotificationsEnabledRequest request) {request = beforeClientExecution(request);return executeSetIdentityHeadersInNotificationsEnabled(request);}
|
[
"public",
"SetIdentityHeadersInNotificationsEnabledResult",
"setIdentityHeadersInNotificationsEnabled",
"(",
"SetIdentityHeadersInNotificationsEnabledRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeSetIdentityHeadersInNotificationsEnabled",
"(",
"request",
")",
";",
"}"
] |
public virtual SetIdentityHeadersInNotificationsEnabledResponse SetIdentityHeadersInNotificationsEnabled(SetIdentityHeadersInNotificationsEnabledRequest request){var options = new InvokeOptions();options.RequestMarshaller = SetIdentityHeadersInNotificationsEnabledRequestMarshaller.Instance;options.ResponseUnmarshaller = SetIdentityHeadersInNotificationsEnabledResponseUnmarshaller.Instance;return Invoke<SetIdentityHeadersInNotificationsEnabledResponse>(request, options);}
|
train
| true
|
2,548
|
public void setSensitiveInputCells(CellCacheEntry[] sensitiveInputCells) {if (sensitiveInputCells == null) {_sensitiveInputCells = null;changeConsumingCells(CellCacheEntry.EMPTY_ARRAY);} else {_sensitiveInputCells = sensitiveInputCells.clone();changeConsumingCells(_sensitiveInputCells);}}
|
[
"public",
"void",
"setSensitiveInputCells",
"(",
"CellCacheEntry",
"[",
"]",
"sensitiveInputCells",
")",
"{",
"if",
"(",
"sensitiveInputCells",
"==",
"null",
")",
"{",
"_sensitiveInputCells",
"=",
"null",
";",
"changeConsumingCells",
"(",
"CellCacheEntry",
".",
"EMPTY_ARRAY",
")",
";",
"}",
"else",
"{",
"_sensitiveInputCells",
"=",
"sensitiveInputCells",
".",
"clone",
"(",
")",
";",
"changeConsumingCells",
"(",
"_sensitiveInputCells",
")",
";",
"}",
"}"
] |
public void SetSensitiveInputCells(CellCacheEntry[] sensitiveInputCells){ChangeConsumingCells(sensitiveInputCells == null ? CellCacheEntry.EMPTY_ARRAY : sensitiveInputCells);_sensitiveInputCells = sensitiveInputCells;}
|
train
| false
|
2,549
|
public synchronized boolean add(E e) {Object[] newElements = new Object[elements.length + 1];System.arraycopy(elements, 0, newElements, 0, elements.length);newElements[elements.length] = e;elements = newElements;return true;}
|
[
"public",
"synchronized",
"boolean",
"add",
"(",
"E",
"e",
")",
"{",
"Object",
"[",
"]",
"newElements",
"=",
"new",
"Object",
"[",
"elements",
".",
"length",
"+",
"1",
"]",
";",
"System",
".",
"arraycopy",
"(",
"elements",
",",
"0",
",",
"newElements",
",",
"0",
",",
"elements",
".",
"length",
")",
";",
"newElements",
"[",
"elements",
".",
"length",
"]",
"=",
"e",
";",
"elements",
"=",
"newElements",
";",
"return",
"true",
";",
"}"
] |
public virtual bool add(E e){lock (this){object[] newElements = new object[elements.Length + 1];System.Array.Copy(elements, 0, newElements, 0, elements.Length);newElements[elements.Length] = e;elements = newElements;return true;}}
|
train
| true
|
2,550
|
public StringBuilder append(long l) {IntegralToString.appendLong(this, l);return this;}
|
[
"public",
"StringBuilder",
"append",
"(",
"long",
"l",
")",
"{",
"IntegralToString",
".",
"appendLong",
"(",
"this",
",",
"l",
")",
";",
"return",
"this",
";",
"}"
] |
public java.lang.StringBuilder append(bool b){append0(b ? "true" : "false");return this;}
|
train
| false
|
2,551
|
public DeleteHsmClientCertificateResult deleteHsmClientCertificate(DeleteHsmClientCertificateRequest request) {request = beforeClientExecution(request);return executeDeleteHsmClientCertificate(request);}
|
[
"public",
"DeleteHsmClientCertificateResult",
"deleteHsmClientCertificate",
"(",
"DeleteHsmClientCertificateRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteHsmClientCertificate",
"(",
"request",
")",
";",
"}"
] |
public virtual DeleteHsmClientCertificateResponse DeleteHsmClientCertificate(DeleteHsmClientCertificateRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteHsmClientCertificateRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteHsmClientCertificateResponseUnmarshaller.Instance;return Invoke<DeleteHsmClientCertificateResponse>(request, options);}
|
train
| true
|
2,552
|
public CreateAssessmentTargetResult createAssessmentTarget(CreateAssessmentTargetRequest request) {request = beforeClientExecution(request);return executeCreateAssessmentTarget(request);}
|
[
"public",
"CreateAssessmentTargetResult",
"createAssessmentTarget",
"(",
"CreateAssessmentTargetRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCreateAssessmentTarget",
"(",
"request",
")",
";",
"}"
] |
public virtual CreateAssessmentTargetResponse CreateAssessmentTarget(CreateAssessmentTargetRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateAssessmentTargetRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateAssessmentTargetResponseUnmarshaller.Instance;return Invoke<CreateAssessmentTargetResponse>(request, options);}
|
train
| true
|
2,553
|
public DescribeGlobalReplicationGroupsResult describeGlobalReplicationGroups(DescribeGlobalReplicationGroupsRequest request) {request = beforeClientExecution(request);return executeDescribeGlobalReplicationGroups(request);}
|
[
"public",
"DescribeGlobalReplicationGroupsResult",
"describeGlobalReplicationGroups",
"(",
"DescribeGlobalReplicationGroupsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeGlobalReplicationGroups",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeGlobalReplicationGroupsResponse DescribeGlobalReplicationGroups(DescribeGlobalReplicationGroupsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeGlobalReplicationGroupsRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeGlobalReplicationGroupsResponseUnmarshaller.Instance;return Invoke<DescribeGlobalReplicationGroupsResponse>(request, options);}
|
train
| false
|
2,554
|
public void write(LittleEndianOutput out) {out.writeByte(sid + getPtgClass());out.writeShort(_sheetRefIndex);out.writeShort(_nameNumber);out.writeShort(_reserved);}
|
[
"public",
"void",
"write",
"(",
"LittleEndianOutput",
"out",
")",
"{",
"out",
".",
"writeByte",
"(",
"sid",
"+",
"getPtgClass",
"(",
")",
")",
";",
"out",
".",
"writeShort",
"(",
"_sheetRefIndex",
")",
";",
"out",
".",
"writeShort",
"(",
"_nameNumber",
")",
";",
"out",
".",
"writeShort",
"(",
"_reserved",
")",
";",
"}"
] |
public override void Write(ILittleEndianOutput out1){out1.WriteByte(sid + PtgClass);out1.WriteShort(_sheetRefIndex);out1.WriteShort(_nameNumber);out1.WriteShort(_reserved);}
|
train
| false
|
2,555
|
public static String parseSegmentName(String filename) {int idx = indexOfSegmentName(filename);if (idx != -1) {filename = filename.substring(0, idx);}return filename;}
|
[
"public",
"static",
"String",
"parseSegmentName",
"(",
"String",
"filename",
")",
"{",
"int",
"idx",
"=",
"indexOfSegmentName",
"(",
"filename",
")",
";",
"if",
"(",
"idx",
"!=",
"-",
"1",
")",
"{",
"filename",
"=",
"filename",
".",
"substring",
"(",
"0",
",",
"idx",
")",
";",
"}",
"return",
"filename",
";",
"}"
] |
public static string ParseSegmentName(string filename){int idx = IndexOfSegmentName(filename);if (idx != -1){filename = filename.Substring(0, idx);}return filename;}
|
train
| false
|
2,556
|
public String getRefLogMessage() {return refLogMessage;}
|
[
"public",
"String",
"getRefLogMessage",
"(",
")",
"{",
"return",
"refLogMessage",
";",
"}"
] |
public virtual string GetRefLogMessage(){return refLogMessage;}
|
train
| false
|
2,557
|
public ObjectId getObjectId() {return missing;}
|
[
"public",
"ObjectId",
"getObjectId",
"(",
")",
"{",
"return",
"missing",
";",
"}"
] |
public virtual ObjectId GetObjectId(){return missing;}
|
train
| false
|
2,558
|
public void setPackedGitLimit(long newLimit) {packedGitLimit = newLimit;}
|
[
"public",
"void",
"setPackedGitLimit",
"(",
"long",
"newLimit",
")",
"{",
"packedGitLimit",
"=",
"newLimit",
";",
"}"
] |
public virtual void SetPackedGitLimit(long newLimit){packedGitLimit = newLimit;}
|
train
| false
|
2,559
|
public String toString() {return "";}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"\"\"",
";",
"}"
] |
public override string ToString(){return "";}
|
train
| false
|
2,560
|
public void clear() {if (size > 0) {size = 0;voidLink.next = voidLink;voidLink.previous = voidLink;modCount++;}}
|
[
"public",
"void",
"clear",
"(",
")",
"{",
"if",
"(",
"size",
">",
"0",
")",
"{",
"size",
"=",
"0",
";",
"voidLink",
".",
"next",
"=",
"voidLink",
";",
"voidLink",
".",
"previous",
"=",
"voidLink",
";",
"modCount",
"++",
";",
"}",
"}"
] |
public override void clear(){if (_size > 0){_size = 0;voidLink.next = voidLink;voidLink.previous = voidLink;modCount++;}}
|
train
| false
|
2,561
|
public List<Note> call() throws GitAPIException {checkCallable();List<Note> notes = new ArrayList<>();NoteMap map = NoteMap.newEmptyMap();try (RevWalk walk = new RevWalk(repo)) {Ref ref = repo.findRef(notesRef);if (ref != null) {RevCommit notesCommit = walk.parseCommit(ref.getObjectId());map = NoteMap.read(walk.getObjectReader(), notesCommit);}Iterator<Note> i = map.iterator();while (i.hasNext())notes.add(i.next());} catch (IOException e) {throw new JGitInternalException(e.getMessage(), e);}return notes;}
|
[
"public",
"List",
"<",
"Note",
">",
"call",
"(",
")",
"throws",
"GitAPIException",
"{",
"checkCallable",
"(",
")",
";",
"List",
"<",
"Note",
">",
"notes",
"=",
"new",
"ArrayList",
"<",
">",
"(",
")",
";",
"NoteMap",
"map",
"=",
"NoteMap",
".",
"newEmptyMap",
"(",
")",
";",
"try",
"(",
"RevWalk",
"walk",
"=",
"new",
"RevWalk",
"(",
"repo",
")",
")",
"{",
"Ref",
"ref",
"=",
"repo",
".",
"findRef",
"(",
"notesRef",
")",
";",
"if",
"(",
"ref",
"!=",
"null",
")",
"{",
"RevCommit",
"notesCommit",
"=",
"walk",
".",
"parseCommit",
"(",
"ref",
".",
"getObjectId",
"(",
")",
")",
";",
"map",
"=",
"NoteMap",
".",
"read",
"(",
"walk",
".",
"getObjectReader",
"(",
")",
",",
"notesCommit",
")",
";",
"}",
"Iterator",
"<",
"Note",
">",
"i",
"=",
"map",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"i",
".",
"hasNext",
"(",
")",
")",
"notes",
".",
"add",
"(",
"i",
".",
"next",
"(",
")",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"throw",
"new",
"JGitInternalException",
"(",
"e",
".",
"getMessage",
"(",
")",
",",
"e",
")",
";",
"}",
"return",
"notes",
";",
"}"
] |
public override IList<Note> Call(){CheckCallable();IList<Note> notes = new AList<Note>();RevWalk walk = new RevWalk(repo);NoteMap map = NoteMap.NewEmptyMap();try{Ref @ref = repo.GetRef(notesRef);if (@ref != null){RevCommit notesCommit = walk.ParseCommit(@ref.GetObjectId());map = NoteMap.Read(walk.GetObjectReader(), notesCommit);}Iterator<Note> i = map.Iterator();while (i.HasNext()){notes.AddItem(i.Next());}}catch (IOException e){throw new JGitInternalException(e.Message, e);}finally{walk.Release();}return notes;}
|
train
| false
|
2,562
|
public ListOrganizationsResult listOrganizations(ListOrganizationsRequest request) {request = beforeClientExecution(request);return executeListOrganizations(request);}
|
[
"public",
"ListOrganizationsResult",
"listOrganizations",
"(",
"ListOrganizationsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListOrganizations",
"(",
"request",
")",
";",
"}"
] |
public virtual ListOrganizationsResponse ListOrganizations(ListOrganizationsRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListOrganizationsRequestMarshaller.Instance;options.ResponseUnmarshaller = ListOrganizationsResponseUnmarshaller.Instance;return Invoke<ListOrganizationsResponse>(request, options);}
|
train
| true
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.