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 |
|---|---|---|---|---|---|
7,220
|
public void serialize(LittleEndianOutput out) {out.writeInt(_option_flags);serializeUnicodeString(_promptTitle, out);serializeUnicodeString(_errorTitle, out);serializeUnicodeString(_promptText, out);serializeUnicodeString(_errorText, out);out.writeShort(_formula1.getEncodedTokenSize());out.writeShort(_not_used_1);_formula1.serializeTokens(out);out.writeShort(_formula2.getEncodedTokenSize());out.writeShort(_not_used_2);_formula2.serializeTokens(out);_regions.serialize(out);}
|
[
"public",
"void",
"serialize",
"(",
"LittleEndianOutput",
"out",
")",
"{",
"out",
".",
"writeInt",
"(",
"_option_flags",
")",
";",
"serializeUnicodeString",
"(",
"_promptTitle",
",",
"out",
")",
";",
"serializeUnicodeString",
"(",
"_errorTitle",
",",
"out",
")",
";",
"serializeUnicodeString",
"(",
"_promptText",
",",
"out",
")",
";",
"serializeUnicodeString",
"(",
"_errorText",
",",
"out",
")",
";",
"out",
".",
"writeShort",
"(",
"_formula1",
".",
"getEncodedTokenSize",
"(",
")",
")",
";",
"out",
".",
"writeShort",
"(",
"_not_used_1",
")",
";",
"_formula1",
".",
"serializeTokens",
"(",
"out",
")",
";",
"out",
".",
"writeShort",
"(",
"_formula2",
".",
"getEncodedTokenSize",
"(",
")",
")",
";",
"out",
".",
"writeShort",
"(",
"_not_used_2",
")",
";",
"_formula2",
".",
"serializeTokens",
"(",
"out",
")",
";",
"_regions",
".",
"serialize",
"(",
"out",
")",
";",
"}"
] |
public override void Serialize(ILittleEndianOutput out1){out1.WriteInt(_option_flags);SerializeUnicodeString(_promptTitle, out1);SerializeUnicodeString(_errorTitle, out1);SerializeUnicodeString(_promptText, out1);SerializeUnicodeString(_errorText, out1);out1.WriteShort(_formula1.EncodedTokenSize);out1.WriteShort(_not_used_1);_formula1.SerializeTokens(out1);out1.WriteShort(_formula2.EncodedTokenSize);out1.WriteShort(_not_used_2);_formula2.SerializeTokens(out1);_regions.Serialize(out1);}
|
train
| false
|
7,221
|
public String toString() {return "[PRINTHEADERS]\n" +" .printheaders = " + getPrintHeaders() +"\n" +"[/PRINTHEADERS]\n";}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"\"[PRINTHEADERS]\\n\"",
"+",
"\" .printheaders = \"",
"+",
"getPrintHeaders",
"(",
")",
"+",
"\"\\n\"",
"+",
"\"[/PRINTHEADERS]\\n\"",
";",
"}"
] |
public override String ToString(){StringBuilder buffer = new StringBuilder();buffer.Append("[PRINTHEADERS]\n");buffer.Append(" .printheaders = ").Append(PrintHeaders).Append("\n");buffer.Append("[/PRINTHEADERS]\n");return buffer.ToString();}
|
train
| false
|
7,222
|
public GetConferencePreferenceResult getConferencePreference(GetConferencePreferenceRequest request) {request = beforeClientExecution(request);return executeGetConferencePreference(request);}
|
[
"public",
"GetConferencePreferenceResult",
"getConferencePreference",
"(",
"GetConferencePreferenceRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetConferencePreference",
"(",
"request",
")",
";",
"}"
] |
public virtual GetConferencePreferenceResponse GetConferencePreference(GetConferencePreferenceRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetConferencePreferenceRequestMarshaller.Instance;options.ResponseUnmarshaller = GetConferencePreferenceResponseUnmarshaller.Instance;return Invoke<GetConferencePreferenceResponse>(request, options);}
|
train
| true
|
7,223
|
public static BitSet getAlts(Collection<BitSet> altsets) {BitSet all = new BitSet();for (BitSet alts : altsets) {all.or(alts);}return all;}
|
[
"public",
"static",
"BitSet",
"getAlts",
"(",
"Collection",
"<",
"BitSet",
">",
"altsets",
")",
"{",
"BitSet",
"all",
"=",
"new",
"BitSet",
"(",
")",
";",
"for",
"(",
"BitSet",
"alts",
":",
"altsets",
")",
"{",
"all",
".",
"or",
"(",
"alts",
")",
";",
"}",
"return",
"all",
";",
"}"
] |
public static BitSet GetAlts(IEnumerable<BitSet> altsets){BitSet all = new BitSet();foreach (BitSet alts in altsets){all.Or(alts);}return all;}
|
train
| false
|
7,224
|
public ListTrafficPolicyInstancesResult listTrafficPolicyInstances(ListTrafficPolicyInstancesRequest request) {request = beforeClientExecution(request);return executeListTrafficPolicyInstances(request);}
|
[
"public",
"ListTrafficPolicyInstancesResult",
"listTrafficPolicyInstances",
"(",
"ListTrafficPolicyInstancesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListTrafficPolicyInstances",
"(",
"request",
")",
";",
"}"
] |
public virtual ListTrafficPolicyInstancesResponse ListTrafficPolicyInstances(ListTrafficPolicyInstancesRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListTrafficPolicyInstancesRequestMarshaller.Instance;options.ResponseUnmarshaller = ListTrafficPolicyInstancesResponseUnmarshaller.Instance;return Invoke<ListTrafficPolicyInstancesResponse>(request, options);}
|
train
| true
|
7,225
|
public void init(Repository src) {repository = src;}
|
[
"public",
"void",
"init",
"(",
"Repository",
"src",
")",
"{",
"repository",
"=",
"src",
";",
"}"
] |
public virtual void Init(Repository src){repository = src;}
|
train
| false
|
7,227
|
public ModifyDBClusterEndpointResult modifyDBClusterEndpoint(ModifyDBClusterEndpointRequest request) {request = beforeClientExecution(request);return executeModifyDBClusterEndpoint(request);}
|
[
"public",
"ModifyDBClusterEndpointResult",
"modifyDBClusterEndpoint",
"(",
"ModifyDBClusterEndpointRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeModifyDBClusterEndpoint",
"(",
"request",
")",
";",
"}"
] |
public virtual ModifyDBClusterEndpointResponse ModifyDBClusterEndpoint(ModifyDBClusterEndpointRequest request){var options = new InvokeOptions();options.RequestMarshaller = ModifyDBClusterEndpointRequestMarshaller.Instance;options.ResponseUnmarshaller = ModifyDBClusterEndpointResponseUnmarshaller.Instance;return Invoke<ModifyDBClusterEndpointResponse>(request, options);}
|
train
| true
|
7,228
|
public DescribeTransitGatewaysResult describeTransitGateways(DescribeTransitGatewaysRequest request) {request = beforeClientExecution(request);return executeDescribeTransitGateways(request);}
|
[
"public",
"DescribeTransitGatewaysResult",
"describeTransitGateways",
"(",
"DescribeTransitGatewaysRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeTransitGateways",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeTransitGatewaysResponse DescribeTransitGateways(DescribeTransitGatewaysRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeTransitGatewaysRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeTransitGatewaysResponseUnmarshaller.Instance;return Invoke<DescribeTransitGatewaysResponse>(request, options);}
|
train
| true
|
7,229
|
public GetSimilarPhotosRequest() {super("CloudPhoto", "2017-07-11", "GetSimilarPhotos", "cloudphoto");setProtocol(ProtocolType.HTTPS);}
|
[
"public",
"GetSimilarPhotosRequest",
"(",
")",
"{",
"super",
"(",
"\"CloudPhoto\"",
",",
"\"2017-07-11\"",
",",
"\"GetSimilarPhotos\"",
",",
"\"cloudphoto\"",
")",
";",
"setProtocol",
"(",
"ProtocolType",
".",
"HTTPS",
")",
";",
"}"
] |
public GetSimilarPhotosRequest(): base("CloudPhoto", "2017-07-11", "GetSimilarPhotos", "cloudphoto", "openAPI"){Protocol = ProtocolType.HTTPS;}
|
train
| false
|
7,230
|
public GetProposalResult getProposal(GetProposalRequest request) {request = beforeClientExecution(request);return executeGetProposal(request);}
|
[
"public",
"GetProposalResult",
"getProposal",
"(",
"GetProposalRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetProposal",
"(",
"request",
")",
";",
"}"
] |
public virtual GetProposalResponse GetProposal(GetProposalRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetProposalRequestMarshaller.Instance;options.ResponseUnmarshaller = GetProposalResponseUnmarshaller.Instance;return Invoke<GetProposalResponse>(request, options);}
|
train
| false
|
7,231
|
public AddJobFlowStepsRequest(String jobFlowId) {setJobFlowId(jobFlowId);}
|
[
"public",
"AddJobFlowStepsRequest",
"(",
"String",
"jobFlowId",
")",
"{",
"setJobFlowId",
"(",
"jobFlowId",
")",
";",
"}"
] |
public AddJobFlowStepsRequest(string jobFlowId){_jobFlowId = jobFlowId;}
|
train
| false
|
7,232
|
public StartInstancesRequest(java.util.List<String> instanceIds) {setInstanceIds(instanceIds);}
|
[
"public",
"StartInstancesRequest",
"(",
"java",
".",
"util",
".",
"List",
"<",
"String",
">",
"instanceIds",
")",
"{",
"setInstanceIds",
"(",
"instanceIds",
")",
";",
"}"
] |
public StartInstancesRequest(List<string> instanceIds){_instanceIds = instanceIds;}
|
train
| false
|
7,233
|
public GetRawMessageContentResult getRawMessageContent(GetRawMessageContentRequest request) {request = beforeClientExecution(request);return executeGetRawMessageContent(request);}
|
[
"public",
"GetRawMessageContentResult",
"getRawMessageContent",
"(",
"GetRawMessageContentRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetRawMessageContent",
"(",
"request",
")",
";",
"}"
] |
public virtual GetRawMessageContentResponse GetRawMessageContent(GetRawMessageContentRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetRawMessageContentRequestMarshaller.Instance;options.ResponseUnmarshaller = GetRawMessageContentResponseUnmarshaller.Instance;return Invoke<GetRawMessageContentResponse>(request, options);}
|
train
| false
|
7,234
|
public RevObject next() {return objItr.hasNext() ? objItr.next() : null;}
|
[
"public",
"RevObject",
"next",
"(",
")",
"{",
"return",
"objItr",
".",
"hasNext",
"(",
")",
"?",
"objItr",
".",
"next",
"(",
")",
":",
"null",
";",
"}"
] |
public virtual RevCommit Next(){return pending.Next();}
|
train
| false
|
7,235
|
final public List<SrndQuery> FieldsQueryList() throws ParseException {SrndQuery q;ArrayList<SrndQuery> queries = new ArrayList<SrndQuery>();jj_consume_token(LPAREN);q = FieldsQuery();queries.add(q);label_7:while (true) {jj_consume_token(COMMA);q = FieldsQuery();queries.add(q);switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {case COMMA:;break;default:jj_la1[7] = jj_gen;break label_7;}}jj_consume_token(RPAREN);{if (true) return queries;}throw new Error("Missing return statement in function");}
|
[
"final",
"public",
"List",
"<",
"SrndQuery",
">",
"FieldsQueryList",
"(",
")",
"throws",
"ParseException",
"{",
"SrndQuery",
"q",
";",
"ArrayList",
"<",
"SrndQuery",
">",
"queries",
"=",
"new",
"ArrayList",
"<",
"SrndQuery",
">",
"(",
")",
";",
"jj_consume_token",
"(",
"LPAREN",
")",
";",
"q",
"=",
"FieldsQuery",
"(",
")",
";",
"queries",
".",
"add",
"(",
"q",
")",
";",
"label_7",
":",
"while",
"(",
"true",
")",
"{",
"jj_consume_token",
"(",
"COMMA",
")",
";",
"q",
"=",
"FieldsQuery",
"(",
")",
";",
"queries",
".",
"add",
"(",
"q",
")",
";",
"switch",
"(",
"(",
"jj_ntk",
"==",
"-",
"1",
")",
"?",
"jj_ntk",
"(",
")",
":",
"jj_ntk",
")",
"{",
"case",
"COMMA",
":",
";",
"break",
";",
"default",
":",
"jj_la1",
"[",
"7",
"]",
"=",
"jj_gen",
";",
"break",
"label_7",
";",
"}",
"}",
"jj_consume_token",
"(",
"RPAREN",
")",
";",
"{",
"if",
"(",
"true",
")",
"return",
"queries",
";",
"}",
"throw",
"new",
"Error",
"(",
"\"Missing return statement in function\"",
")",
";",
"}"
] |
public IList<SrndQuery> FieldsQueryList(){SrndQuery q;IList<SrndQuery> queries = new List<SrndQuery>();Jj_consume_token(RegexpToken.LPAREN);q = FieldsQuery();queries.Add(q);while (true){Jj_consume_token(RegexpToken.COMMA);q = FieldsQuery();queries.Add(q);switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk){case RegexpToken.COMMA:;break;default:jj_la1[7] = jj_gen;goto label_7;}}label_7:Jj_consume_token(RegexpToken.RPAREN);{ if (true) return queries; }throw new Exception("Missing return statement in function");}
|
train
| false
|
7,236
|
public boolean contains(long value) {for (int i = 0; i < count; i++)if (entries[i] == value)return true;return false;}
|
[
"public",
"boolean",
"contains",
"(",
"long",
"value",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"count",
";",
"i",
"++",
")",
"if",
"(",
"entries",
"[",
"i",
"]",
"==",
"value",
")",
"return",
"true",
";",
"return",
"false",
";",
"}"
] |
public virtual bool Contains(long value){for (int i = 0; i < count; i++){if (entries[i] == value){return true;}}return false;}
|
train
| false
|
7,237
|
public static boolean matchesExtension(String filename, String ext) {return filename.endsWith("." + ext);}
|
[
"public",
"static",
"boolean",
"matchesExtension",
"(",
"String",
"filename",
",",
"String",
"ext",
")",
"{",
"return",
"filename",
".",
"endsWith",
"(",
"\".\"",
"+",
"ext",
")",
";",
"}"
] |
public static bool MatchesExtension(string filename, string ext){return filename.EndsWith("." + ext, StringComparison.Ordinal);}
|
train
| false
|
7,238
|
public ObjectId idFor(int type, byte[] data, int off, int len) {return delegate().idFor(type, data, off, len);}
|
[
"public",
"ObjectId",
"idFor",
"(",
"int",
"type",
",",
"byte",
"[",
"]",
"data",
",",
"int",
"off",
",",
"int",
"len",
")",
"{",
"return",
"delegate",
"(",
")",
".",
"idFor",
"(",
"type",
",",
"data",
",",
"off",
",",
"len",
")",
";",
"}"
] |
public override ObjectId IdFor(int type, byte[] data, int off, int len){return Delegate().IdFor(type, data, off, len);}
|
train
| false
|
7,239
|
public void remove() {parent.remove(this);}
|
[
"public",
"void",
"remove",
"(",
")",
"{",
"parent",
".",
"remove",
"(",
"this",
")",
";",
"}"
] |
public virtual void Remove(){parent.Remove(this);}
|
train
| false
|
7,240
|
public DisassociateDeviceFromRoomResult disassociateDeviceFromRoom(DisassociateDeviceFromRoomRequest request) {request = beforeClientExecution(request);return executeDisassociateDeviceFromRoom(request);}
|
[
"public",
"DisassociateDeviceFromRoomResult",
"disassociateDeviceFromRoom",
"(",
"DisassociateDeviceFromRoomRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDisassociateDeviceFromRoom",
"(",
"request",
")",
";",
"}"
] |
public virtual DisassociateDeviceFromRoomResponse DisassociateDeviceFromRoom(DisassociateDeviceFromRoomRequest request){var options = new InvokeOptions();options.RequestMarshaller = DisassociateDeviceFromRoomRequestMarshaller.Instance;options.ResponseUnmarshaller = DisassociateDeviceFromRoomResponseUnmarshaller.Instance;return Invoke<DisassociateDeviceFromRoomResponse>(request, options);}
|
train
| true
|
7,241
|
final public ModifierQueryNode.Modifier Modifiers() throws ParseException {ModifierQueryNode.Modifier ret = ModifierQueryNode.Modifier.MOD_NONE;switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {case NOT:case PLUS:case MINUS:switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {case PLUS:jj_consume_token(PLUS);ret = ModifierQueryNode.Modifier.MOD_REQ;break;case MINUS:jj_consume_token(MINUS);ret = ModifierQueryNode.Modifier.MOD_NOT;break;case NOT:jj_consume_token(NOT);ret = ModifierQueryNode.Modifier.MOD_NOT;break;default:jj_la1[0] = jj_gen;jj_consume_token(-1);throw new ParseException();}break;default:jj_la1[1] = jj_gen;;}{if (true) return ret;}throw new Error("Missing return statement in function");}
|
[
"final",
"public",
"ModifierQueryNode",
".",
"Modifier",
"Modifiers",
"(",
")",
"throws",
"ParseException",
"{",
"ModifierQueryNode",
".",
"Modifier",
"ret",
"=",
"ModifierQueryNode",
".",
"Modifier",
".",
"MOD_NONE",
";",
"switch",
"(",
"(",
"jj_ntk",
"==",
"-",
"1",
")",
"?",
"jj_ntk",
"(",
")",
":",
"jj_ntk",
")",
"{",
"case",
"NOT",
":",
"case",
"PLUS",
":",
"case",
"MINUS",
":",
"switch",
"(",
"(",
"jj_ntk",
"==",
"-",
"1",
")",
"?",
"jj_ntk",
"(",
")",
":",
"jj_ntk",
")",
"{",
"case",
"PLUS",
":",
"jj_consume_token",
"(",
"PLUS",
")",
";",
"ret",
"=",
"ModifierQueryNode",
".",
"Modifier",
".",
"MOD_REQ",
";",
"break",
";",
"case",
"MINUS",
":",
"jj_consume_token",
"(",
"MINUS",
")",
";",
"ret",
"=",
"ModifierQueryNode",
".",
"Modifier",
".",
"MOD_NOT",
";",
"break",
";",
"case",
"NOT",
":",
"jj_consume_token",
"(",
"NOT",
")",
";",
"ret",
"=",
"ModifierQueryNode",
".",
"Modifier",
".",
"MOD_NOT",
";",
"break",
";",
"default",
":",
"jj_la1",
"[",
"0",
"]",
"=",
"jj_gen",
";",
"jj_consume_token",
"(",
"-",
"1",
")",
";",
"throw",
"new",
"ParseException",
"(",
")",
";",
"}",
"break",
";",
"default",
":",
"jj_la1",
"[",
"1",
"]",
"=",
"jj_gen",
";",
";",
"}",
"{",
"if",
"(",
"true",
")",
"return",
"ret",
";",
"}",
"throw",
"new",
"Error",
"(",
"\"Missing return statement in function\"",
")",
";",
"}"
] |
public Modifier Modifiers(){Modifier ret = Modifier.MOD_NONE;switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk){case RegexpToken.NOT:case RegexpToken.PLUS:case RegexpToken.MINUS:switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk){case RegexpToken.PLUS:Jj_consume_token(RegexpToken.PLUS);ret = Modifier.MOD_REQ;break;case RegexpToken.MINUS:Jj_consume_token(RegexpToken.MINUS);ret = Modifier.MOD_NOT;break;case RegexpToken.NOT:Jj_consume_token(RegexpToken.NOT);ret = Modifier.MOD_NOT;break;default:jj_la1[2] = jj_gen;Jj_consume_token(-1);throw new ParseException();}break;default:jj_la1[3] = jj_gen;break;}{ if (true) return ret; }throw new Exception("Missing return statement in function");}
|
train
| false
|
7,242
|
public final RevCommit getParent(int nth) {return parents[nth];}
|
[
"public",
"final",
"RevCommit",
"getParent",
"(",
"int",
"nth",
")",
"{",
"return",
"parents",
"[",
"nth",
"]",
";",
"}"
] |
public NGit.Revwalk.RevCommit GetParent(int nth){return parents[nth];}
|
train
| false
|
7,243
|
public boolean hasPrevious() {return iterator.previousIndex() >= start;}
|
[
"public",
"boolean",
"hasPrevious",
"(",
")",
"{",
"return",
"iterator",
".",
"previousIndex",
"(",
")",
">=",
"start",
";",
"}"
] |
public bool hasPrevious(){return iterator.previousIndex() >= start;}
|
train
| false
|
7,244
|
public TerminateWorkspacesResult terminateWorkspaces(TerminateWorkspacesRequest request) {request = beforeClientExecution(request);return executeTerminateWorkspaces(request);}
|
[
"public",
"TerminateWorkspacesResult",
"terminateWorkspaces",
"(",
"TerminateWorkspacesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeTerminateWorkspaces",
"(",
"request",
")",
";",
"}"
] |
public virtual TerminateWorkspacesResponse TerminateWorkspaces(TerminateWorkspacesRequest request){var options = new InvokeOptions();options.RequestMarshaller = TerminateWorkspacesRequestMarshaller.Instance;options.ResponseUnmarshaller = TerminateWorkspacesResponseUnmarshaller.Instance;return Invoke<TerminateWorkspacesResponse>(request, options);}
|
train
| true
|
7,245
|
public long getEntryLastModified() {return current().getLastModified();}
|
[
"public",
"long",
"getEntryLastModified",
"(",
")",
"{",
"return",
"current",
"(",
")",
".",
"getLastModified",
"(",
")",
";",
"}"
] |
public virtual long GetEntryLastModified(){return Current().GetLastModified();}
|
train
| false
|
7,246
|
public CancelConversionTaskResult cancelConversionTask(CancelConversionTaskRequest request) {request = beforeClientExecution(request);return executeCancelConversionTask(request);}
|
[
"public",
"CancelConversionTaskResult",
"cancelConversionTask",
"(",
"CancelConversionTaskRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCancelConversionTask",
"(",
"request",
")",
";",
"}"
] |
public virtual CancelConversionTaskResponse CancelConversionTask(CancelConversionTaskRequest request){var options = new InvokeOptions();options.RequestMarshaller = CancelConversionTaskRequestMarshaller.Instance;options.ResponseUnmarshaller = CancelConversionTaskResponseUnmarshaller.Instance;return Invoke<CancelConversionTaskResponse>(request, options);}
|
train
| true
|
7,247
|
public InfoSubRecord(int streamPos, int bucketSstOffset) {field_1_stream_pos = streamPos;field_2_bucket_sst_offset = bucketSstOffset;}
|
[
"public",
"InfoSubRecord",
"(",
"int",
"streamPos",
",",
"int",
"bucketSstOffset",
")",
"{",
"field_1_stream_pos",
"=",
"streamPos",
";",
"field_2_bucket_sst_offset",
"=",
"bucketSstOffset",
";",
"}"
] |
public InfoSubRecord(int streamPos, int bucketSstOffset){field_1_stream_pos = streamPos;field_2_bucket_sst_offset = bucketSstOffset;}
|
train
| false
|
7,249
|
public String toString() {return "'" + ch + "' @ " + pos;}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"\"'\"",
"+",
"ch",
"+",
"\"' @ \"",
"+",
"pos",
";",
"}"
] |
public override String ToString(){return "'" + ch + "' @ " + pos;}
|
train
| false
|
7,250
|
public Step(String name, Rule rules[], int min, String suffixes[]) {this.name = name;this.rules = rules;if (min == 0) {min = Integer.MAX_VALUE;for (Rule r : rules)min = Math.min(min, r.min + r.suffix.length);}this.min = min;if (suffixes == null || suffixes.length == 0) {this.suffixes = null;} else {this.suffixes = new char[suffixes.length][];for (int i = 0; i < suffixes.length; i++)this.suffixes[i] = suffixes[i].toCharArray();}}
|
[
"public",
"Step",
"(",
"String",
"name",
",",
"Rule",
"rules",
"[",
"]",
",",
"int",
"min",
",",
"String",
"suffixes",
"[",
"]",
")",
"{",
"this",
".",
"name",
"=",
"name",
";",
"this",
".",
"rules",
"=",
"rules",
";",
"if",
"(",
"min",
"==",
"0",
")",
"{",
"min",
"=",
"Integer",
".",
"MAX_VALUE",
";",
"for",
"(",
"Rule",
"r",
":",
"rules",
")",
"min",
"=",
"Math",
".",
"min",
"(",
"min",
",",
"r",
".",
"min",
"+",
"r",
".",
"suffix",
".",
"length",
")",
";",
"}",
"this",
".",
"min",
"=",
"min",
";",
"if",
"(",
"suffixes",
"==",
"null",
"||",
"suffixes",
".",
"length",
"==",
"0",
")",
"{",
"this",
".",
"suffixes",
"=",
"null",
";",
"}",
"else",
"{",
"this",
".",
"suffixes",
"=",
"new",
"char",
"[",
"suffixes",
".",
"length",
"]",
"[",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"suffixes",
".",
"length",
";",
"i",
"++",
")",
"this",
".",
"suffixes",
"[",
"i",
"]",
"=",
"suffixes",
"[",
"i",
"]",
".",
"toCharArray",
"(",
")",
";",
"}",
"}"
] |
public Step(string name, Rule[] rules, int min, string[] suffixes){this.m_name = name;this.m_rules = rules;if (min == 0){min = int.MaxValue;foreach (Rule r in rules){min = Math.Min(min, r.m_min + r.m_suffix.Length);}}this.m_min = min;if (suffixes == null || suffixes.Length == 0){this.m_suffixes = null;}else{this.m_suffixes = new char[suffixes.Length][];for (int i = 0; i < suffixes.Length; i++){this.m_suffixes[i] = suffixes[i].ToCharArray();}}}
|
train
| false
|
7,251
|
public E get(int key, E valueIfKeyNotFound) {int i = binarySearch(mKeys, 0, mSize, key);if (i < 0 || mValues[i] == DELETED) {return valueIfKeyNotFound;} else {return (E) mValues[i];}}
|
[
"public",
"E",
"get",
"(",
"int",
"key",
",",
"E",
"valueIfKeyNotFound",
")",
"{",
"int",
"i",
"=",
"binarySearch",
"(",
"mKeys",
",",
"0",
",",
"mSize",
",",
"key",
")",
";",
"if",
"(",
"i",
"<",
"0",
"||",
"mValues",
"[",
"i",
"]",
"==",
"DELETED",
")",
"{",
"return",
"valueIfKeyNotFound",
";",
"}",
"else",
"{",
"return",
"(",
"E",
")",
"mValues",
"[",
"i",
"]",
";",
"}",
"}"
] |
public virtual E get(int key, E valueIfKeyNotFound){int i = binarySearch(mKeys, 0, mSize, key);if (i < 0 || mValues[i] == DELETED){return valueIfKeyNotFound;}else{return (E)mValues[i];}}
|
train
| true
|
7,253
|
public void enterRecursionRule(ParserRuleContext localctx, int state, int ruleIndex, int precedence) {setState(state);_precedenceStack.push(precedence);_ctx = localctx;_ctx.start = _input.LT(1);if (_parseListeners != null) {triggerEnterRuleEvent(); }}
|
[
"public",
"void",
"enterRecursionRule",
"(",
"ParserRuleContext",
"localctx",
",",
"int",
"state",
",",
"int",
"ruleIndex",
",",
"int",
"precedence",
")",
"{",
"setState",
"(",
"state",
")",
";",
"_precedenceStack",
".",
"push",
"(",
"precedence",
")",
";",
"_ctx",
"=",
"localctx",
";",
"_ctx",
".",
"start",
"=",
"_input",
".",
"LT",
"(",
"1",
")",
";",
"if",
"(",
"_parseListeners",
"!=",
"null",
")",
"{",
"triggerEnterRuleEvent",
"(",
")",
";",
"}",
"}"
] |
public virtual void EnterRecursionRule(ParserRuleContext localctx, int state, int ruleIndex, int precedence){State = state;_precedenceStack.Add(precedence);_ctx = localctx;_ctx.Start = _input.LT(1);if (_parseListeners != null){TriggerEnterRuleEvent();}}
|
train
| false
|
7,254
|
public GlobalReplicationGroup increaseNodeGroupsInGlobalReplicationGroup(IncreaseNodeGroupsInGlobalReplicationGroupRequest request) {request = beforeClientExecution(request);return executeIncreaseNodeGroupsInGlobalReplicationGroup(request);}
|
[
"public",
"GlobalReplicationGroup",
"increaseNodeGroupsInGlobalReplicationGroup",
"(",
"IncreaseNodeGroupsInGlobalReplicationGroupRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeIncreaseNodeGroupsInGlobalReplicationGroup",
"(",
"request",
")",
";",
"}"
] |
public virtual IncreaseNodeGroupsInGlobalReplicationGroupResponse IncreaseNodeGroupsInGlobalReplicationGroup(IncreaseNodeGroupsInGlobalReplicationGroupRequest request){var options = new InvokeOptions();options.RequestMarshaller = IncreaseNodeGroupsInGlobalReplicationGroupRequestMarshaller.Instance;options.ResponseUnmarshaller = IncreaseNodeGroupsInGlobalReplicationGroupResponseUnmarshaller.Instance;return Invoke<IncreaseNodeGroupsInGlobalReplicationGroupResponse>(request, options);}
|
train
| false
|
7,255
|
public static String format(String rawSheetName) {StringBuilder sb = new StringBuilder((rawSheetName == null ? 0 : rawSheetName.length()) + 2);appendFormat(sb, rawSheetName);return sb.toString();}
|
[
"public",
"static",
"String",
"format",
"(",
"String",
"rawSheetName",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
"(",
"rawSheetName",
"==",
"null",
"?",
"0",
":",
"rawSheetName",
".",
"length",
"(",
")",
")",
"+",
"2",
")",
";",
"appendFormat",
"(",
"sb",
",",
"rawSheetName",
")",
";",
"return",
"sb",
".",
"toString",
"(",
")",
";",
"}"
] |
public static String Format(String rawSheetName){StringBuilder sb = new StringBuilder(rawSheetName.Length + 2);AppendFormat(sb, rawSheetName);return sb.ToString();}
|
train
| false
|
7,256
|
public DescribeTerminationPolicyTypesResult describeTerminationPolicyTypes(DescribeTerminationPolicyTypesRequest request) {request = beforeClientExecution(request);return executeDescribeTerminationPolicyTypes(request);}
|
[
"public",
"DescribeTerminationPolicyTypesResult",
"describeTerminationPolicyTypes",
"(",
"DescribeTerminationPolicyTypesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeTerminationPolicyTypes",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeTerminationPolicyTypesResponse DescribeTerminationPolicyTypes(DescribeTerminationPolicyTypesRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeTerminationPolicyTypesRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeTerminationPolicyTypesResponseUnmarshaller.Instance;return Invoke<DescribeTerminationPolicyTypesResponse>(request, options);}
|
train
| true
|
7,257
|
public DescribeScheduledActionsResult describeScheduledActions() {return describeScheduledActions(new DescribeScheduledActionsRequest());}
|
[
"public",
"DescribeScheduledActionsResult",
"describeScheduledActions",
"(",
")",
"{",
"return",
"describeScheduledActions",
"(",
"new",
"DescribeScheduledActionsRequest",
"(",
")",
")",
";",
"}"
] |
public virtual DescribeScheduledActionsResponse DescribeScheduledActions(){return DescribeScheduledActions(new DescribeScheduledActionsRequest());}
|
train
| false
|
7,258
|
public boolean hasSourceData(int start, int end) {for (; start < end; start++)if (sourceLines[start] == 0)return false;return true;}
|
[
"public",
"boolean",
"hasSourceData",
"(",
"int",
"start",
",",
"int",
"end",
")",
"{",
"for",
"(",
";",
"start",
"<",
"end",
";",
"start",
"++",
")",
"if",
"(",
"sourceLines",
"[",
"start",
"]",
"==",
"0",
")",
"return",
"false",
";",
"return",
"true",
";",
"}"
] |
public virtual bool HasSourceData(int start, int end){for (; start < end; start++){if (sourceLines[start] == 0){return false;}}return true;}
|
train
| false
|
7,259
|
public ListImportsResult listImports(ListImportsRequest request) {request = beforeClientExecution(request);return executeListImports(request);}
|
[
"public",
"ListImportsResult",
"listImports",
"(",
"ListImportsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListImports",
"(",
"request",
")",
";",
"}"
] |
public virtual ListImportsResponse ListImports(ListImportsRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListImportsRequestMarshaller.Instance;options.ResponseUnmarshaller = ListImportsResponseUnmarshaller.Instance;return Invoke<ListImportsResponse>(request, options);}
|
train
| true
|
7,260
|
public DescribeInterconnectsResult describeInterconnects() {return describeInterconnects(new DescribeInterconnectsRequest());}
|
[
"public",
"DescribeInterconnectsResult",
"describeInterconnects",
"(",
")",
"{",
"return",
"describeInterconnects",
"(",
"new",
"DescribeInterconnectsRequest",
"(",
")",
")",
";",
"}"
] |
public virtual DescribeInterconnectsResponse DescribeInterconnects(){return DescribeInterconnects(new DescribeInterconnectsRequest());}
|
train
| false
|
7,261
|
public DeleteEventSubscriptionResult deleteEventSubscription(DeleteEventSubscriptionRequest request) {request = beforeClientExecution(request);return executeDeleteEventSubscription(request);}
|
[
"public",
"DeleteEventSubscriptionResult",
"deleteEventSubscription",
"(",
"DeleteEventSubscriptionRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteEventSubscription",
"(",
"request",
")",
";",
"}"
] |
public virtual DeleteEventSubscriptionResponse DeleteEventSubscription(DeleteEventSubscriptionRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteEventSubscriptionRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteEventSubscriptionResponseUnmarshaller.Instance;return Invoke<DeleteEventSubscriptionResponse>(request, options);}
|
train
| true
|
7,262
|
public int serialize( int offset, byte[] data, EscherSerializationListener listener ){listener.beforeRecordSerialize( offset, getRecordId(), this );LittleEndian.putShort(data, offset, getOptions());LittleEndian.putShort(data, offset+2, getRecordId());int remainingBytes = thedata.length;LittleEndian.putInt(data, offset+4, remainingBytes);System.arraycopy(thedata, 0, data, offset+8, thedata.length);int pos = offset+8+thedata.length;listener.afterRecordSerialize( pos, getRecordId(), pos - offset, this );int size = pos - offset;if (size != getRecordSize()) {throw new RecordFormatException(size + " bytes written but getRecordSize() reports " + getRecordSize());}return size;}
|
[
"public",
"int",
"serialize",
"(",
"int",
"offset",
",",
"byte",
"[",
"]",
"data",
",",
"EscherSerializationListener",
"listener",
")",
"{",
"listener",
".",
"beforeRecordSerialize",
"(",
"offset",
",",
"getRecordId",
"(",
")",
",",
"this",
")",
";",
"LittleEndian",
".",
"putShort",
"(",
"data",
",",
"offset",
",",
"getOptions",
"(",
")",
")",
";",
"LittleEndian",
".",
"putShort",
"(",
"data",
",",
"offset",
"+",
"2",
",",
"getRecordId",
"(",
")",
")",
";",
"int",
"remainingBytes",
"=",
"thedata",
".",
"length",
";",
"LittleEndian",
".",
"putInt",
"(",
"data",
",",
"offset",
"+",
"4",
",",
"remainingBytes",
")",
";",
"System",
".",
"arraycopy",
"(",
"thedata",
",",
"0",
",",
"data",
",",
"offset",
"+",
"8",
",",
"thedata",
".",
"length",
")",
";",
"int",
"pos",
"=",
"offset",
"+",
"8",
"+",
"thedata",
".",
"length",
";",
"listener",
".",
"afterRecordSerialize",
"(",
"pos",
",",
"getRecordId",
"(",
")",
",",
"pos",
"-",
"offset",
",",
"this",
")",
";",
"int",
"size",
"=",
"pos",
"-",
"offset",
";",
"if",
"(",
"size",
"!=",
"getRecordSize",
"(",
")",
")",
"{",
"throw",
"new",
"RecordFormatException",
"(",
"size",
"+",
"\" bytes written but getRecordSize() reports \"",
"+",
"getRecordSize",
"(",
")",
")",
";",
"}",
"return",
"size",
";",
"}"
] |
public override int Serialize(int offset, byte[] data, EscherSerializationListener listener){listener.BeforeRecordSerialize(offset, RecordId, this);LittleEndian.PutShort(data, offset, Options);LittleEndian.PutShort(data, offset + 2, RecordId);int remainingBytes = _thedata.Length;LittleEndian.PutInt(data, offset + 4, remainingBytes);Array.Copy(_thedata, 0, data, offset + 8, _thedata.Length);int pos = offset + 8 + _thedata.Length;listener.AfterRecordSerialize(pos, RecordId, pos - offset, this);int size = pos - offset;if (size != RecordSize)throw new RecordFormatException(size + " bytes written but RecordSize reports " + RecordSize);return size;}
|
train
| false
|
7,263
|
public void write(int oneChar) {synchronized (lock) {expand(1);buf[count++] = (char) oneChar;}}
|
[
"public",
"void",
"write",
"(",
"int",
"oneChar",
")",
"{",
"synchronized",
"(",
"lock",
")",
"{",
"expand",
"(",
"1",
")",
";",
"buf",
"[",
"count",
"++",
"]",
"=",
"(",
"char",
")",
"oneChar",
";",
"}",
"}"
] |
public override void write(int oneChar){lock (@lock){expand(1);buf[count++] = (char)oneChar;}}
|
train
| false
|
7,264
|
public DeletedRef3DPtg(int externSheetIndex) {field_1_index_extern_sheet = externSheetIndex;unused1 = 0;}
|
[
"public",
"DeletedRef3DPtg",
"(",
"int",
"externSheetIndex",
")",
"{",
"field_1_index_extern_sheet",
"=",
"externSheetIndex",
";",
"unused1",
"=",
"0",
";",
"}"
] |
public DeletedRef3DPtg(int externSheetIndex){field_1_index_extern_sheet = externSheetIndex;unused1 = 0;}
|
train
| false
|
7,265
|
public IndexUpgrader(Directory dir, IndexWriterConfig iwc, boolean deletePriorCommits) {this.dir = dir;this.iwc = iwc;this.deletePriorCommits = deletePriorCommits;}
|
[
"public",
"IndexUpgrader",
"(",
"Directory",
"dir",
",",
"IndexWriterConfig",
"iwc",
",",
"boolean",
"deletePriorCommits",
")",
"{",
"this",
".",
"dir",
"=",
"dir",
";",
"this",
".",
"iwc",
"=",
"iwc",
";",
"this",
".",
"deletePriorCommits",
"=",
"deletePriorCommits",
";",
"}"
] |
public IndexUpgrader(Directory dir, IndexWriterConfig iwc, bool deletePriorCommits){this.dir = dir;this.iwc = iwc;this.deletePriorCommits = deletePriorCommits;}
|
train
| false
|
7,266
|
public DetachVpnGatewayRequest(String vpnGatewayId, String vpcId) {setVpnGatewayId(vpnGatewayId);setVpcId(vpcId);}
|
[
"public",
"DetachVpnGatewayRequest",
"(",
"String",
"vpnGatewayId",
",",
"String",
"vpcId",
")",
"{",
"setVpnGatewayId",
"(",
"vpnGatewayId",
")",
";",
"setVpcId",
"(",
"vpcId",
")",
";",
"}"
] |
public DetachVpnGatewayRequest(string vpnGatewayId, string vpcId){_vpnGatewayId = vpnGatewayId;_vpcId = vpcId;}
|
train
| false
|
7,267
|
public RebootInstancesRequest(java.util.List<String> instanceIds) {setInstanceIds(instanceIds);}
|
[
"public",
"RebootInstancesRequest",
"(",
"java",
".",
"util",
".",
"List",
"<",
"String",
">",
"instanceIds",
")",
"{",
"setInstanceIds",
"(",
"instanceIds",
")",
";",
"}"
] |
public RebootInstancesRequest(List<string> instanceIds){_instanceIds = instanceIds;}
|
train
| false
|
7,268
|
public E remove(int index) {synchronized (mutex) {return delegate().remove(index);}}
|
[
"public",
"E",
"remove",
"(",
"int",
"index",
")",
"{",
"synchronized",
"(",
"mutex",
")",
"{",
"return",
"delegate",
"(",
")",
".",
"remove",
"(",
"index",
")",
";",
"}",
"}"
] |
public virtual E remove(int location){lock (mutex){return list.remove(location);}}
|
train
| false
|
7,269
|
public DescribeInstanceAttributeResult describeInstanceAttribute(DescribeInstanceAttributeRequest request) {request = beforeClientExecution(request);return executeDescribeInstanceAttribute(request);}
|
[
"public",
"DescribeInstanceAttributeResult",
"describeInstanceAttribute",
"(",
"DescribeInstanceAttributeRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeInstanceAttribute",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeInstanceAttributeResponse DescribeInstanceAttribute(DescribeInstanceAttributeRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeInstanceAttributeRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeInstanceAttributeResponseUnmarshaller.Instance;return Invoke<DescribeInstanceAttributeResponse>(request, options);}
|
train
| true
|
7,270
|
public void cloneStyleFrom(CellStyle source) {if(source instanceof HSSFCellStyle) {this.cloneStyleFrom((HSSFCellStyle)source);} else {throw new IllegalArgumentException("Can only clone from one HSSFCellStyle to another, not between HSSFCellStyle and XSSFCellStyle");}}
|
[
"public",
"void",
"cloneStyleFrom",
"(",
"CellStyle",
"source",
")",
"{",
"if",
"(",
"source",
"instanceof",
"HSSFCellStyle",
")",
"{",
"this",
".",
"cloneStyleFrom",
"(",
"(",
"HSSFCellStyle",
")",
"source",
")",
";",
"}",
"else",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Can only clone from one HSSFCellStyle to another, not between HSSFCellStyle and XSSFCellStyle\"",
")",
";",
"}",
"}"
] |
public void CloneStyleFrom(ICellStyle source){if (source is HSSFCellStyle){this.CloneStyleFrom((HSSFCellStyle)source);}else{throw new ArgumentException("Can only clone from one HSSFCellStyle to another, not between HSSFCellStyle and XSSFCellStyle");}}
|
train
| false
|
7,271
|
public final String readUTF() throws IOException {return decodeUTF(readUnsignedShort());}
|
[
"public",
"final",
"String",
"readUTF",
"(",
")",
"throws",
"IOException",
"{",
"return",
"decodeUTF",
"(",
"readUnsignedShort",
"(",
")",
")",
";",
"}"
] |
public virtual string readUTF(){throw new System.NotImplementedException();}
|
train
| false
|
7,272
|
public GetDataEndpointResult getDataEndpoint(GetDataEndpointRequest request) {request = beforeClientExecution(request);return executeGetDataEndpoint(request);}
|
[
"public",
"GetDataEndpointResult",
"getDataEndpoint",
"(",
"GetDataEndpointRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetDataEndpoint",
"(",
"request",
")",
";",
"}"
] |
public virtual GetDataEndpointResponse GetDataEndpoint(GetDataEndpointRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetDataEndpointRequestMarshaller.Instance;options.ResponseUnmarshaller = GetDataEndpointResponseUnmarshaller.Instance;return Invoke<GetDataEndpointResponse>(request, options);}
|
train
| true
|
7,273
|
public AddApplicationOutputResult addApplicationOutput(AddApplicationOutputRequest request) {request = beforeClientExecution(request);return executeAddApplicationOutput(request);}
|
[
"public",
"AddApplicationOutputResult",
"addApplicationOutput",
"(",
"AddApplicationOutputRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeAddApplicationOutput",
"(",
"request",
")",
";",
"}"
] |
public virtual AddApplicationOutputResponse AddApplicationOutput(AddApplicationOutputRequest request){var options = new InvokeOptions();options.RequestMarshaller = AddApplicationOutputRequestMarshaller.Instance;options.ResponseUnmarshaller = AddApplicationOutputResponseUnmarshaller.Instance;return Invoke<AddApplicationOutputResponse>(request, options);}
|
train
| true
|
7,274
|
public LargeObjectException(AnyObjectId id) {setObjectId(id);}
|
[
"public",
"LargeObjectException",
"(",
"AnyObjectId",
"id",
")",
"{",
"setObjectId",
"(",
"id",
")",
";",
"}"
] |
public LargeObjectException(AnyObjectId id){SetObjectId(id);}
|
train
| false
|
7,275
|
public void trimToSize() {if (n < array.length) {char[] aux = new char[n];System.arraycopy(array, 0, aux, 0, n);array = aux;}}
|
[
"public",
"void",
"trimToSize",
"(",
")",
"{",
"if",
"(",
"n",
"<",
"array",
".",
"length",
")",
"{",
"char",
"[",
"]",
"aux",
"=",
"new",
"char",
"[",
"n",
"]",
";",
"System",
".",
"arraycopy",
"(",
"array",
",",
"0",
",",
"aux",
",",
"0",
",",
"n",
")",
";",
"array",
"=",
"aux",
";",
"}",
"}"
] |
public virtual void TrimToSize(){if (n < array.Length){char[] aux = new char[n];System.Array.Copy(array, 0, aux, 0, n);array = aux;}}
|
train
| true
|
7,276
|
public UpdateFacetResult updateFacet(UpdateFacetRequest request) {request = beforeClientExecution(request);return executeUpdateFacet(request);}
|
[
"public",
"UpdateFacetResult",
"updateFacet",
"(",
"UpdateFacetRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateFacet",
"(",
"request",
")",
";",
"}"
] |
public virtual UpdateFacetResponse UpdateFacet(UpdateFacetRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateFacetRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateFacetResponseUnmarshaller.Instance;return Invoke<UpdateFacetResponse>(request, options);}
|
train
| true
|
7,277
|
public DeleteDomainRequest(String domainName) {setDomainName(domainName);}
|
[
"public",
"DeleteDomainRequest",
"(",
"String",
"domainName",
")",
"{",
"setDomainName",
"(",
"domainName",
")",
";",
"}"
] |
public DeleteDomainRequest(string domainName){_domainName = domainName;}
|
train
| false
|
7,278
|
public String getReading() {return dictionary.getReading(wordId, surfaceForm, offset, length);}
|
[
"public",
"String",
"getReading",
"(",
")",
"{",
"return",
"dictionary",
".",
"getReading",
"(",
"wordId",
",",
"surfaceForm",
",",
"offset",
",",
"length",
")",
";",
"}"
] |
public virtual string GetReading(){return dictionary.GetReading(wordId, surfaceForm, offset, length);}
|
train
| false
|
7,280
|
public String toString() {return super.toString();}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"super",
".",
"toString",
"(",
")",
";",
"}"
] |
public override string ToString(){return base.ToString();}
|
train
| false
|
7,281
|
public void set(int index, long value) {ensureCapacity(value);current.set(index, value);}
|
[
"public",
"void",
"set",
"(",
"int",
"index",
",",
"long",
"value",
")",
"{",
"ensureCapacity",
"(",
"value",
")",
";",
"current",
".",
"set",
"(",
"index",
",",
"value",
")",
";",
"}"
] |
public override void Set(int index, long value){EnsureCapacity(value);current.Set(index, value);}
|
train
| false
|
7,282
|
public void serialize(LittleEndianOutput out) {String username = getUsername();boolean is16bit = StringUtil.hasMultibyte(username);out.writeShort(username.length());out.writeByte(is16bit ? 0x01 : 0x00);if (is16bit) {StringUtil.putUnicodeLE(username, out);} else {StringUtil.putCompressedUnicode(username, out);}int encodedByteCount = 3 + username.length() * (is16bit ? 2 : 1);int paddingSize = DATA_SIZE - encodedByteCount;out.write(PADDING, 0, paddingSize);}
|
[
"public",
"void",
"serialize",
"(",
"LittleEndianOutput",
"out",
")",
"{",
"String",
"username",
"=",
"getUsername",
"(",
")",
";",
"boolean",
"is16bit",
"=",
"StringUtil",
".",
"hasMultibyte",
"(",
"username",
")",
";",
"out",
".",
"writeShort",
"(",
"username",
".",
"length",
"(",
")",
")",
";",
"out",
".",
"writeByte",
"(",
"is16bit",
"?",
"0x01",
":",
"0x00",
")",
";",
"if",
"(",
"is16bit",
")",
"{",
"StringUtil",
".",
"putUnicodeLE",
"(",
"username",
",",
"out",
")",
";",
"}",
"else",
"{",
"StringUtil",
".",
"putCompressedUnicode",
"(",
"username",
",",
"out",
")",
";",
"}",
"int",
"encodedByteCount",
"=",
"3",
"+",
"username",
".",
"length",
"(",
")",
"*",
"(",
"is16bit",
"?",
"2",
":",
"1",
")",
";",
"int",
"paddingSize",
"=",
"DATA_SIZE",
"-",
"encodedByteCount",
";",
"out",
".",
"write",
"(",
"PADDING",
",",
"0",
",",
"paddingSize",
")",
";",
"}"
] |
public override void Serialize(ILittleEndianOutput out1){String username = Username;bool is16bit = StringUtil.HasMultibyte(username);out1.WriteShort(username.Length);out1.WriteByte(is16bit ? 0x01 : 0x00);if (is16bit){StringUtil.PutUnicodeLE(username, out1);}else{StringUtil.PutCompressedUnicode(username, out1);}int encodedByteCount = 3 + username.Length * (is16bit ? 2 : 1);int paddingSize = DATA_SIZE - encodedByteCount;out1.Write(PADDING, 0, paddingSize);}
|
train
| false
|
7,283
|
public boolean isExpired() {return false;}
|
[
"public",
"boolean",
"isExpired",
"(",
")",
"{",
"return",
"false",
";",
"}"
] |
public new bool IsExpired(){return false;}
|
train
| false
|
7,284
|
public ListJobsRequest(String accountId, String vaultName) {setAccountId(accountId);setVaultName(vaultName);}
|
[
"public",
"ListJobsRequest",
"(",
"String",
"accountId",
",",
"String",
"vaultName",
")",
"{",
"setAccountId",
"(",
"accountId",
")",
";",
"setVaultName",
"(",
"vaultName",
")",
";",
"}"
] |
public ListJobsRequest(string accountId, string vaultName){_accountId = accountId;_vaultName = vaultName;}
|
train
| false
|
7,285
|
public SheetRefEvaluator getSheetEvaluator(int sheetIndex) {if (sheetIndex < _firstSheetIndex || sheetIndex > _lastSheetIndex) {throw new IllegalArgumentException("Invalid SheetIndex: " + sheetIndex +" - Outside range " + _firstSheetIndex + " : " + _lastSheetIndex);}return _sheetEvaluators[sheetIndex-_firstSheetIndex];}
|
[
"public",
"SheetRefEvaluator",
"getSheetEvaluator",
"(",
"int",
"sheetIndex",
")",
"{",
"if",
"(",
"sheetIndex",
"<",
"_firstSheetIndex",
"||",
"sheetIndex",
">",
"_lastSheetIndex",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Invalid SheetIndex: \"",
"+",
"sheetIndex",
"+",
"\" - Outside range \"",
"+",
"_firstSheetIndex",
"+",
"\" : \"",
"+",
"_lastSheetIndex",
")",
";",
"}",
"return",
"_sheetEvaluators",
"[",
"sheetIndex",
"-",
"_firstSheetIndex",
"]",
";",
"}"
] |
public SheetRefEvaluator GetSheetEvaluator(int sheetIndex){if (sheetIndex < _firstSheetIndex || sheetIndex > _lastSheetIndex){throw new ArgumentException("Invalid SheetIndex: " + sheetIndex +" - Outside range " + _firstSheetIndex + " : " + _lastSheetIndex);}return _sheetEvaluators[sheetIndex - _firstSheetIndex];}
|
train
| false
|
7,286
|
public static String[] stringToPath(String s) {List<String> parts = new ArrayList<>();int length = s.length();if (length == 0) {return new String[0];}char[] buffer = new char[length];int upto = 0;boolean lastEscape = false;for(int i=0;i<length;i++) {char ch = s.charAt(i);if (lastEscape) {buffer[upto++] = ch;lastEscape = false;} else if (ch == ESCAPE_CHAR) {lastEscape = true;} else if (ch == DELIM_CHAR) {parts.add(new String(buffer, 0, upto));upto = 0;} else {buffer[upto++] = ch;}}parts.add(new String(buffer, 0, upto));assert !lastEscape;return parts.toArray(new String[parts.size()]);}
|
[
"public",
"static",
"String",
"[",
"]",
"stringToPath",
"(",
"String",
"s",
")",
"{",
"List",
"<",
"String",
">",
"parts",
"=",
"new",
"ArrayList",
"<",
">",
"(",
")",
";",
"int",
"length",
"=",
"s",
".",
"length",
"(",
")",
";",
"if",
"(",
"length",
"==",
"0",
")",
"{",
"return",
"new",
"String",
"[",
"0",
"]",
";",
"}",
"char",
"[",
"]",
"buffer",
"=",
"new",
"char",
"[",
"length",
"]",
";",
"int",
"upto",
"=",
"0",
";",
"boolean",
"lastEscape",
"=",
"false",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"char",
"ch",
"=",
"s",
".",
"charAt",
"(",
"i",
")",
";",
"if",
"(",
"lastEscape",
")",
"{",
"buffer",
"[",
"upto",
"++",
"]",
"=",
"ch",
";",
"lastEscape",
"=",
"false",
";",
"}",
"else",
"if",
"(",
"ch",
"==",
"ESCAPE_CHAR",
")",
"{",
"lastEscape",
"=",
"true",
";",
"}",
"else",
"if",
"(",
"ch",
"==",
"DELIM_CHAR",
")",
"{",
"parts",
".",
"add",
"(",
"new",
"String",
"(",
"buffer",
",",
"0",
",",
"upto",
")",
")",
";",
"upto",
"=",
"0",
";",
"}",
"else",
"{",
"buffer",
"[",
"upto",
"++",
"]",
"=",
"ch",
";",
"}",
"}",
"parts",
".",
"add",
"(",
"new",
"String",
"(",
"buffer",
",",
"0",
",",
"upto",
")",
")",
";",
"assert",
"!",
"lastEscape",
";",
"return",
"parts",
".",
"toArray",
"(",
"new",
"String",
"[",
"parts",
".",
"size",
"(",
")",
"]",
")",
";",
"}"
] |
public static string[] StringToPath(string s){IList<string> parts = new List<string>();int length = s.Length;if (length == 0){return new string[0];}char[] buffer = new char[length];int upto = 0;bool lastEscape = false;for (int i = 0; i < length; i++){char ch = s[i];if (lastEscape){buffer[upto++] = ch;lastEscape = false;}else if (ch == ESCAPE_CHAR){lastEscape = true;}else if (ch == DELIM_CHAR){parts.Add(new string(buffer, 0, upto));upto = 0;}else{buffer[upto++] = ch;}}parts.Add(new string(buffer, 0, upto));Debug.Assert(!lastEscape);return parts.ToArray();}
|
train
| false
|
7,287
|
public CreateDirectConnectGatewayResult createDirectConnectGateway(CreateDirectConnectGatewayRequest request) {request = beforeClientExecution(request);return executeCreateDirectConnectGateway(request);}
|
[
"public",
"CreateDirectConnectGatewayResult",
"createDirectConnectGateway",
"(",
"CreateDirectConnectGatewayRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCreateDirectConnectGateway",
"(",
"request",
")",
";",
"}"
] |
public virtual CreateDirectConnectGatewayResponse CreateDirectConnectGateway(CreateDirectConnectGatewayRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateDirectConnectGatewayRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateDirectConnectGatewayResponseUnmarshaller.Instance;return Invoke<CreateDirectConnectGatewayResponse>(request, options);}
|
train
| true
|
7,288
|
public GetMLModelResult getMLModel(GetMLModelRequest request) {request = beforeClientExecution(request);return executeGetMLModel(request);}
|
[
"public",
"GetMLModelResult",
"getMLModel",
"(",
"GetMLModelRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetMLModel",
"(",
"request",
")",
";",
"}"
] |
public virtual GetMLModelResponse GetMLModel(GetMLModelRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetMLModelRequestMarshaller.Instance;options.ResponseUnmarshaller = GetMLModelResponseUnmarshaller.Instance;return Invoke<GetMLModelResponse>(request, options);}
|
train
| true
|
7,289
|
public boolean isValid() {if (bytes == null) {throw new IllegalStateException("bytes is null");}if (length < 0) {throw new IllegalStateException("length is negative: " + length);}if (length > bytes.length) {throw new IllegalStateException("length is out of bounds: " + length + ",bytes.length=" + bytes.length);}if (offset < 0) {throw new IllegalStateException("offset is negative: " + offset);}if (offset > bytes.length) {throw new IllegalStateException("offset out of bounds: " + offset + ",bytes.length=" + bytes.length);}if (offset + length < 0) {throw new IllegalStateException("offset+length is negative: offset=" + offset + ",length=" + length);}if (offset + length > bytes.length) {throw new IllegalStateException("offset+length out of bounds: offset=" + offset + ",length=" + length + ",bytes.length=" + bytes.length);}return true;}
|
[
"public",
"boolean",
"isValid",
"(",
")",
"{",
"if",
"(",
"bytes",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"bytes is null\"",
")",
";",
"}",
"if",
"(",
"length",
"<",
"0",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"length is negative: \"",
"+",
"length",
")",
";",
"}",
"if",
"(",
"length",
">",
"bytes",
".",
"length",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"length is out of bounds: \"",
"+",
"length",
"+",
"\",bytes.length=\"",
"+",
"bytes",
".",
"length",
")",
";",
"}",
"if",
"(",
"offset",
"<",
"0",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"offset is negative: \"",
"+",
"offset",
")",
";",
"}",
"if",
"(",
"offset",
">",
"bytes",
".",
"length",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"offset out of bounds: \"",
"+",
"offset",
"+",
"\",bytes.length=\"",
"+",
"bytes",
".",
"length",
")",
";",
"}",
"if",
"(",
"offset",
"+",
"length",
"<",
"0",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"offset+length is negative: offset=\"",
"+",
"offset",
"+",
"\",length=\"",
"+",
"length",
")",
";",
"}",
"if",
"(",
"offset",
"+",
"length",
">",
"bytes",
".",
"length",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"offset+length out of bounds: offset=\"",
"+",
"offset",
"+",
"\",length=\"",
"+",
"length",
"+",
"\",bytes.length=\"",
"+",
"bytes",
".",
"length",
")",
";",
"}",
"return",
"true",
";",
"}"
] |
public bool IsValid(){if (Bytes == null){throw new InvalidOperationException("bytes is null");}if (Length < 0){throw new InvalidOperationException("length is negative: " + Length);}if (Length > Bytes.Length){throw new InvalidOperationException("length is out of bounds: " + Length + ",bytes.length=" + Bytes.Length);}if (Offset < 0){throw new InvalidOperationException("offset is negative: " + Offset);}if (Offset > Bytes.Length){throw new InvalidOperationException("offset out of bounds: " + Offset + ",bytes.length=" + Bytes.Length);}if (Offset + Length < 0){throw new InvalidOperationException("offset+length is negative: offset=" + Offset + ",length=" + Length);}if (Offset + Length > Bytes.Length){throw new InvalidOperationException("offset+length out of bounds: offset=" + Offset + ",length=" + Length + ",bytes.length=" + Bytes.Length);}return true;}
|
train
| false
|
7,290
|
public String toString() {return getName();}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"getName",
"(",
")",
";",
"}"
] |
public override string ToString(){return Name;}
|
train
| false
|
7,291
|
public DescribeIAMPolicyAssignmentResult describeIAMPolicyAssignment(DescribeIAMPolicyAssignmentRequest request) {request = beforeClientExecution(request);return executeDescribeIAMPolicyAssignment(request);}
|
[
"public",
"DescribeIAMPolicyAssignmentResult",
"describeIAMPolicyAssignment",
"(",
"DescribeIAMPolicyAssignmentRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeIAMPolicyAssignment",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeIAMPolicyAssignmentResponse DescribeIAMPolicyAssignment(DescribeIAMPolicyAssignmentRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeIAMPolicyAssignmentRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeIAMPolicyAssignmentResponseUnmarshaller.Instance;return Invoke<DescribeIAMPolicyAssignmentResponse>(request, options);}
|
train
| false
|
7,292
|
public boolean isRefLogIncludingResult() {return refLogIncludeResult;}
|
[
"public",
"boolean",
"isRefLogIncludingResult",
"(",
")",
"{",
"return",
"refLogIncludeResult",
";",
"}"
] |
protected internal virtual bool IsRefLogIncludingResult(){return refLogIncludeResult;}
|
train
| false
|
7,293
|
public DeleteStreamingDistributionResult deleteStreamingDistribution(DeleteStreamingDistributionRequest request) {request = beforeClientExecution(request);return executeDeleteStreamingDistribution(request);}
|
[
"public",
"DeleteStreamingDistributionResult",
"deleteStreamingDistribution",
"(",
"DeleteStreamingDistributionRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteStreamingDistribution",
"(",
"request",
")",
";",
"}"
] |
public virtual DeleteStreamingDistributionResponse DeleteStreamingDistribution(DeleteStreamingDistributionRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteStreamingDistributionRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteStreamingDistributionResponseUnmarshaller.Instance;return Invoke<DeleteStreamingDistributionResponse>(request, options);}
|
train
| true
|
7,294
|
public RawSubStringPattern(String patternText) {if (patternText.length() == 0)throw new IllegalArgumentException(JGitText.get().cannotMatchOnEmptyString);needleString = patternText;final byte[] b = Constants.encode(patternText);needle = new byte[b.length];for (int i = 0; i < b.length; i++)needle[i] = lc(b[i]);}
|
[
"public",
"RawSubStringPattern",
"(",
"String",
"patternText",
")",
"{",
"if",
"(",
"patternText",
".",
"length",
"(",
")",
"==",
"0",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"JGitText",
".",
"get",
"(",
")",
".",
"cannotMatchOnEmptyString",
")",
";",
"needleString",
"=",
"patternText",
";",
"final",
"byte",
"[",
"]",
"b",
"=",
"Constants",
".",
"encode",
"(",
"patternText",
")",
";",
"needle",
"=",
"new",
"byte",
"[",
"b",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"b",
".",
"length",
";",
"i",
"++",
")",
"needle",
"[",
"i",
"]",
"=",
"lc",
"(",
"b",
"[",
"i",
"]",
")",
";",
"}"
] |
public RawSubStringPattern(string patternText){if (patternText.Length == 0){throw new ArgumentException(JGitText.Get().cannotMatchOnEmptyString);}needleString = patternText;byte[] b = Constants.Encode(patternText);needle = new byte[b.Length];for (int i = 0; i < b.Length; i++){needle[i] = Lc(b[i]);}}
|
train
| false
|
7,295
|
public ListRulesResult listRules(ListRulesRequest request) {request = beforeClientExecution(request);return executeListRules(request);}
|
[
"public",
"ListRulesResult",
"listRules",
"(",
"ListRulesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListRules",
"(",
"request",
")",
";",
"}"
] |
public virtual ListRulesResponse ListRules(ListRulesRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListRulesRequestMarshaller.Instance;options.ResponseUnmarshaller = ListRulesResponseUnmarshaller.Instance;return Invoke<ListRulesResponse>(request, options);}
|
train
| true
|
7,296
|
@Override public Iterator<Entry<K, V>> iterator() {final Iterator<Entry<K, V>> iterator = esDelegate.iterator();return new Iterator<Entry<K, V>>();}
|
[
"@",
"Override",
"public",
"Iterator",
"<",
"Entry",
"<",
"K",
",",
"V",
">",
">",
"iterator",
"(",
")",
"{",
"final",
"Iterator",
"<",
"Entry",
"<",
"K",
",",
"V",
">",
">",
"iterator",
"=",
"esDelegate",
".",
"iterator",
"(",
")",
";",
"return",
"new",
"Iterator",
"<",
"Entry",
"<",
"K",
",",
"V",
">",
">",
"(",
")",
";",
"}"
] |
public override java.util.Iterator<java.util.MapClass.Entry<K, V>> iterator(){return new java.util.Hashtable<K, V>.EntryIterator(this._enclosing);}
|
train
| false
|
7,297
|
public SendMessageResult sendMessage(String queueUrl, String messageBody) {return sendMessage(new SendMessageRequest().withQueueUrl(queueUrl).withMessageBody(messageBody));}
|
[
"public",
"SendMessageResult",
"sendMessage",
"(",
"String",
"queueUrl",
",",
"String",
"messageBody",
")",
"{",
"return",
"sendMessage",
"(",
"new",
"SendMessageRequest",
"(",
")",
".",
"withQueueUrl",
"(",
"queueUrl",
")",
".",
"withMessageBody",
"(",
"messageBody",
")",
")",
";",
"}"
] |
public virtual SendMessageResponse SendMessage(string queueUrl, string messageBody){var request = new SendMessageRequest();request.QueueUrl = queueUrl;request.MessageBody = messageBody;return SendMessage(request);}
|
train
| true
|
7,298
|
public static double getExcelDate(Date date) {return getExcelDate(date, false);}
|
[
"public",
"static",
"double",
"getExcelDate",
"(",
"Date",
"date",
")",
"{",
"return",
"getExcelDate",
"(",
"date",
",",
"false",
")",
";",
"}"
] |
public static double GetExcelDate(DateTime date){return GetExcelDate(date, false);}
|
train
| false
|
7,299
|
public String toString() {return markedUpText.subSequence(textStartPos, textEndPos).toString();}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"markedUpText",
".",
"subSequence",
"(",
"textStartPos",
",",
"textEndPos",
")",
".",
"toString",
"(",
")",
";",
"}"
] |
public override string ToString(){return markedUpText.ToString(TextStartPos, TextEndPos - TextStartPos);}
|
train
| false
|
7,300
|
public ModifyInstancePlacementResult modifyInstancePlacement(ModifyInstancePlacementRequest request) {request = beforeClientExecution(request);return executeModifyInstancePlacement(request);}
|
[
"public",
"ModifyInstancePlacementResult",
"modifyInstancePlacement",
"(",
"ModifyInstancePlacementRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeModifyInstancePlacement",
"(",
"request",
")",
";",
"}"
] |
public virtual ModifyInstancePlacementResponse ModifyInstancePlacement(ModifyInstancePlacementRequest request){var options = new InvokeOptions();options.RequestMarshaller = ModifyInstancePlacementRequestMarshaller.Instance;options.ResponseUnmarshaller = ModifyInstancePlacementResponseUnmarshaller.Instance;return Invoke<ModifyInstancePlacementResponse>(request, options);}
|
train
| true
|
7,301
|
public static String replaceOccupiedParameters(String url, Map<String, String> paths) {String result = url;for (Map.Entry<String, String> entry : paths.entrySet()) {String key = entry.getKey();String value = entry.getValue();String target = "[" + key + "]";result = result.replace(target, value);}return result;}
|
[
"public",
"static",
"String",
"replaceOccupiedParameters",
"(",
"String",
"url",
",",
"Map",
"<",
"String",
",",
"String",
">",
"paths",
")",
"{",
"String",
"result",
"=",
"url",
";",
"for",
"(",
"Map",
".",
"Entry",
"<",
"String",
",",
"String",
">",
"entry",
":",
"paths",
".",
"entrySet",
"(",
")",
")",
"{",
"String",
"key",
"=",
"entry",
".",
"getKey",
"(",
")",
";",
"String",
"value",
"=",
"entry",
".",
"getValue",
"(",
")",
";",
"String",
"target",
"=",
"\"[\"",
"+",
"key",
"+",
"\"]\"",
";",
"result",
"=",
"result",
".",
"replace",
"(",
"target",
",",
"value",
")",
";",
"}",
"return",
"result",
";",
"}"
] |
public static string ReplaceOccupiedParameters(string url, Dictionary<string, string> paths){var result = url;foreach (var entry in paths){var key = entry.Key;var value = entry.Value;var target = "[" + key + "]";result = result.Replace(target, value);}return result;}
|
train
| false
|
7,302
|
public String toString() {return "<matchAllDocs field='*' term='*'/>";}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"\"<matchAllDocs field='*' term='*'/>\"",
";",
"}"
] |
public override string ToString(){return "<matchAllDocs field='*' term='*'/>";}
|
train
| false
|
7,303
|
public DeleteMetricFilterRequest(String logGroupName, String filterName) {setLogGroupName(logGroupName);setFilterName(filterName);}
|
[
"public",
"DeleteMetricFilterRequest",
"(",
"String",
"logGroupName",
",",
"String",
"filterName",
")",
"{",
"setLogGroupName",
"(",
"logGroupName",
")",
";",
"setFilterName",
"(",
"filterName",
")",
";",
"}"
] |
public DeleteMetricFilterRequest(string logGroupName, string filterName){_logGroupName = logGroupName;_filterName = filterName;}
|
train
| false
|
7,304
|
public char readChar() throws IOException {return primitiveTypes.readChar();}
|
[
"public",
"char",
"readChar",
"(",
")",
"throws",
"IOException",
"{",
"return",
"primitiveTypes",
".",
"readChar",
"(",
")",
";",
"}"
] |
public virtual char readChar(){throw new System.NotImplementedException();}
|
train
| false
|
7,305
|
public DescribeInstanceStatusResult describeInstanceStatus(DescribeInstanceStatusRequest request) {request = beforeClientExecution(request);return executeDescribeInstanceStatus(request);}
|
[
"public",
"DescribeInstanceStatusResult",
"describeInstanceStatus",
"(",
"DescribeInstanceStatusRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeInstanceStatus",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeInstanceStatusResponse DescribeInstanceStatus(DescribeInstanceStatusRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeInstanceStatusRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeInstanceStatusResponseUnmarshaller.Instance;return Invoke<DescribeInstanceStatusResponse>(request, options);}
|
train
| true
|
7,306
|
public BatchDeleteAttributesResult batchDeleteAttributes(BatchDeleteAttributesRequest request) {request = beforeClientExecution(request);return executeBatchDeleteAttributes(request);}
|
[
"public",
"BatchDeleteAttributesResult",
"batchDeleteAttributes",
"(",
"BatchDeleteAttributesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeBatchDeleteAttributes",
"(",
"request",
")",
";",
"}"
] |
public virtual BatchDeleteAttributesResponse BatchDeleteAttributes(BatchDeleteAttributesRequest request){var options = new InvokeOptions();options.RequestMarshaller = BatchDeleteAttributesRequestMarshaller.Instance;options.ResponseUnmarshaller = BatchDeleteAttributesResponseUnmarshaller.Instance;return Invoke<BatchDeleteAttributesResponse>(request, options);}
|
train
| true
|
7,307
|
public String toString() {return "<fieldconfig name=\"" + this.fieldName + "\" configurations=\""+ super.toString() + "\"/>";}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"\"<fieldconfig name=\\\"\"",
"+",
"this",
".",
"fieldName",
"+",
"\"\\\" configurations=\\\"\"",
"+",
"super",
".",
"toString",
"(",
")",
"+",
"\"\\\"/>\"",
";",
"}"
] |
public override string ToString(){return "<fieldconfig name=\"" + this.fieldName + "\" configurations=\""+ base.ToString() + "\"/>";}
|
train
| false
|
7,308
|
public ListDeploymentGroupsResult listDeploymentGroups(ListDeploymentGroupsRequest request) {request = beforeClientExecution(request);return executeListDeploymentGroups(request);}
|
[
"public",
"ListDeploymentGroupsResult",
"listDeploymentGroups",
"(",
"ListDeploymentGroupsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListDeploymentGroups",
"(",
"request",
")",
";",
"}"
] |
public virtual ListDeploymentGroupsResponse ListDeploymentGroups(ListDeploymentGroupsRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListDeploymentGroupsRequestMarshaller.Instance;options.ResponseUnmarshaller = ListDeploymentGroupsResponseUnmarshaller.Instance;return Invoke<ListDeploymentGroupsResponse>(request, options);}
|
train
| true
|
7,309
|
public CellGeneralFormatter() {this(LocaleUtil.getUserLocale());}
|
[
"public",
"CellGeneralFormatter",
"(",
")",
"{",
"this",
"(",
"LocaleUtil",
".",
"getUserLocale",
"(",
")",
")",
";",
"}"
] |
public CellGeneralFormatter(): base("General"){;}
|
train
| false
|
7,310
|
public BloomFilteredTerms(Terms terms, FuzzySet filter) {this.delegateTerms = terms;this.filter = filter;}
|
[
"public",
"BloomFilteredTerms",
"(",
"Terms",
"terms",
",",
"FuzzySet",
"filter",
")",
"{",
"this",
".",
"delegateTerms",
"=",
"terms",
";",
"this",
".",
"filter",
"=",
"filter",
";",
"}"
] |
public BloomFilteredTerms(Terms terms, FuzzySet filter){_delegateTerms = terms;_filter = filter;}
|
train
| false
|
7,311
|
public int numBits(int idx) {return bytes[idx].bits;}
|
[
"public",
"int",
"numBits",
"(",
"int",
"idx",
")",
"{",
"return",
"bytes",
"[",
"idx",
"]",
".",
"bits",
";",
"}"
] |
public virtual int NumBits(int idx){return bytes[idx].Bits;}
|
train
| false
|
7,312
|
public boolean equals(Object obj) {if (obj == this) {return true;}else if (!(obj instanceof LexerChannelAction)) {return false;}return channel == ((LexerChannelAction)obj).channel;}
|
[
"public",
"boolean",
"equals",
"(",
"Object",
"obj",
")",
"{",
"if",
"(",
"obj",
"==",
"this",
")",
"{",
"return",
"true",
";",
"}",
"else",
"if",
"(",
"!",
"(",
"obj",
"instanceof",
"LexerChannelAction",
")",
")",
"{",
"return",
"false",
";",
"}",
"return",
"channel",
"==",
"(",
"(",
"LexerChannelAction",
")",
"obj",
")",
".",
"channel",
";",
"}"
] |
public override bool Equals(object obj){if (obj == this){return true;}else{if (!(obj is Antlr4.Runtime.Atn.LexerChannelAction)){return false;}}return channel == ((Antlr4.Runtime.Atn.LexerChannelAction)obj).channel;}
|
train
| false
|
7,313
|
public void write(LittleEndianOutput out) {out.writeByte(sid + getPtgClass());out.writeShort(getValue());}
|
[
"public",
"void",
"write",
"(",
"LittleEndianOutput",
"out",
")",
"{",
"out",
".",
"writeByte",
"(",
"sid",
"+",
"getPtgClass",
"(",
")",
")",
";",
"out",
".",
"writeShort",
"(",
"getValue",
"(",
")",
")",
";",
"}"
] |
public override void Write(ILittleEndianOutput out1){out1.WriteByte(sid + PtgClass);out1.WriteShort(Value);}
|
train
| false
|
7,314
|
public ExecuteChangeSetResult executeChangeSet(ExecuteChangeSetRequest request) {request = beforeClientExecution(request);return executeExecuteChangeSet(request);}
|
[
"public",
"ExecuteChangeSetResult",
"executeChangeSet",
"(",
"ExecuteChangeSetRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeExecuteChangeSet",
"(",
"request",
")",
";",
"}"
] |
public virtual ExecuteChangeSetResponse ExecuteChangeSet(ExecuteChangeSetRequest request){var options = new InvokeOptions();options.RequestMarshaller = ExecuteChangeSetRequestMarshaller.Instance;options.ResponseUnmarshaller = ExecuteChangeSetResponseUnmarshaller.Instance;return Invoke<ExecuteChangeSetResponse>(request, options);}
|
train
| true
|
7,315
|
public StartInstanceResult startInstance(StartInstanceRequest request) {request = beforeClientExecution(request);return executeStartInstance(request);}
|
[
"public",
"StartInstanceResult",
"startInstance",
"(",
"StartInstanceRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeStartInstance",
"(",
"request",
")",
";",
"}"
] |
public virtual StartInstanceResponse StartInstance(StartInstanceRequest request){var options = new InvokeOptions();options.RequestMarshaller = StartInstanceRequestMarshaller.Instance;options.ResponseUnmarshaller = StartInstanceResponseUnmarshaller.Instance;return Invoke<StartInstanceResponse>(request, options);}
|
train
| true
|
7,316
|
public CapitalizationFilterFactory(Map<String, String> args) {super(args);boolean ignoreCase = getBoolean(args, KEEP_IGNORE_CASE, false);Set<String> k = getSet(args, KEEP);if (k != null) {keep = new CharArraySet(10, ignoreCase);keep.addAll(k);}k = getSet(args, OK_PREFIX);if (k != null) {okPrefix = new ArrayList<>();for (String item : k) {okPrefix.add(item.toCharArray());}}minWordLength = getInt(args, MIN_WORD_LENGTH, 0);maxWordCount = getInt(args, MAX_WORD_COUNT, CapitalizationFilter.DEFAULT_MAX_WORD_COUNT);maxTokenLength = getInt(args, MAX_TOKEN_LENGTH, CapitalizationFilter.DEFAULT_MAX_TOKEN_LENGTH);onlyFirstWord = getBoolean(args, ONLY_FIRST_WORD, true);forceFirstLetter = getBoolean(args, FORCE_FIRST_LETTER, true);if (!args.isEmpty()) {throw new IllegalArgumentException("Unknown parameters: " + args);}}
|
[
"public",
"CapitalizationFilterFactory",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"args",
")",
"{",
"super",
"(",
"args",
")",
";",
"boolean",
"ignoreCase",
"=",
"getBoolean",
"(",
"args",
",",
"KEEP_IGNORE_CASE",
",",
"false",
")",
";",
"Set",
"<",
"String",
">",
"k",
"=",
"getSet",
"(",
"args",
",",
"KEEP",
")",
";",
"if",
"(",
"k",
"!=",
"null",
")",
"{",
"keep",
"=",
"new",
"CharArraySet",
"(",
"10",
",",
"ignoreCase",
")",
";",
"keep",
".",
"addAll",
"(",
"k",
")",
";",
"}",
"k",
"=",
"getSet",
"(",
"args",
",",
"OK_PREFIX",
")",
";",
"if",
"(",
"k",
"!=",
"null",
")",
"{",
"okPrefix",
"=",
"new",
"ArrayList",
"<",
">",
"(",
")",
";",
"for",
"(",
"String",
"item",
":",
"k",
")",
"{",
"okPrefix",
".",
"add",
"(",
"item",
".",
"toCharArray",
"(",
")",
")",
";",
"}",
"}",
"minWordLength",
"=",
"getInt",
"(",
"args",
",",
"MIN_WORD_LENGTH",
",",
"0",
")",
";",
"maxWordCount",
"=",
"getInt",
"(",
"args",
",",
"MAX_WORD_COUNT",
",",
"CapitalizationFilter",
".",
"DEFAULT_MAX_WORD_COUNT",
")",
";",
"maxTokenLength",
"=",
"getInt",
"(",
"args",
",",
"MAX_TOKEN_LENGTH",
",",
"CapitalizationFilter",
".",
"DEFAULT_MAX_TOKEN_LENGTH",
")",
";",
"onlyFirstWord",
"=",
"getBoolean",
"(",
"args",
",",
"ONLY_FIRST_WORD",
",",
"true",
")",
";",
"forceFirstLetter",
"=",
"getBoolean",
"(",
"args",
",",
"FORCE_FIRST_LETTER",
",",
"true",
")",
";",
"if",
"(",
"!",
"args",
".",
"isEmpty",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Unknown parameters: \"",
"+",
"args",
")",
";",
"}",
"}"
] |
public CapitalizationFilterFactory(IDictionary<string, string> args): base(args){AssureMatchVersion();bool ignoreCase = GetBoolean(args, KEEP_IGNORE_CASE, false);ICollection<string> k = GetSet(args, KEEP);if (k != null){keep = new CharArraySet(m_luceneMatchVersion, 10, ignoreCase);keep.UnionWith(k);}k = GetSet(args, OK_PREFIX);if (k != null){okPrefix = new List<char[]>();foreach (string item in k){okPrefix.Add(item.ToCharArray());}}minWordLength = GetInt32(args, MIN_WORD_LENGTH, 0);maxWordCount = GetInt32(args, MAX_WORD_COUNT, CapitalizationFilter.DEFAULT_MAX_WORD_COUNT);maxTokenLength = GetInt32(args, MAX_TOKEN_LENGTH, CapitalizationFilter.DEFAULT_MAX_TOKEN_LENGTH);onlyFirstWord = GetBoolean(args, ONLY_FIRST_WORD, true);forceFirstLetter = GetBoolean(args, FORCE_FIRST_LETTER, true);culture = GetCulture(args, CULTURE, null);if (args.Count > 0){throw new System.ArgumentException("Unknown parameters: " + args);}}
|
train
| false
|
7,318
|
public String toString() {return ref.toString();}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"ref",
".",
"toString",
"(",
")",
";",
"}"
] |
public override string ToString(){return this.@ref.ToString();}
|
train
| false
|
7,319
|
public ListNetworksResult listNetworks(ListNetworksRequest request) {request = beforeClientExecution(request);return executeListNetworks(request);}
|
[
"public",
"ListNetworksResult",
"listNetworks",
"(",
"ListNetworksRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListNetworks",
"(",
"request",
")",
";",
"}"
] |
public virtual ListNetworksResponse ListNetworks(ListNetworksRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListNetworksRequestMarshaller.Instance;options.ResponseUnmarshaller = ListNetworksResponseUnmarshaller.Instance;return Invoke<ListNetworksResponse>(request, options);}
|
train
| false
|
7,320
|
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0) {ValueEval arg = arg0;if (arg instanceof RefEval) {RefEval re = (RefEval)arg;arg = re.getInnerValueEval(re.getFirstSheetIndex());} else if (arg instanceof AreaEval) {arg = ((AreaEval) arg).getRelativeValue(0, 0);}if (arg instanceof StringEval) {return arg;}if (arg instanceof ErrorEval) {return arg;}return StringEval.EMPTY_INSTANCE;}
|
[
"public",
"ValueEval",
"evaluate",
"(",
"int",
"srcRowIndex",
",",
"int",
"srcColumnIndex",
",",
"ValueEval",
"arg0",
")",
"{",
"ValueEval",
"arg",
"=",
"arg0",
";",
"if",
"(",
"arg",
"instanceof",
"RefEval",
")",
"{",
"RefEval",
"re",
"=",
"(",
"RefEval",
")",
"arg",
";",
"arg",
"=",
"re",
".",
"getInnerValueEval",
"(",
"re",
".",
"getFirstSheetIndex",
"(",
")",
")",
";",
"}",
"else",
"if",
"(",
"arg",
"instanceof",
"AreaEval",
")",
"{",
"arg",
"=",
"(",
"(",
"AreaEval",
")",
"arg",
")",
".",
"getRelativeValue",
"(",
"0",
",",
"0",
")",
";",
"}",
"if",
"(",
"arg",
"instanceof",
"StringEval",
")",
"{",
"return",
"arg",
";",
"}",
"if",
"(",
"arg",
"instanceof",
"ErrorEval",
")",
"{",
"return",
"arg",
";",
"}",
"return",
"StringEval",
".",
"EMPTY_INSTANCE",
";",
"}"
] |
public override ValueEval Evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0){ValueEval arg = arg0;if (arg is RefEval){RefEval re = (RefEval)arg;arg = re.GetInnerValueEval(re.FirstSheetIndex);}else if (arg is AreaEval){arg = ((AreaEval)arg).GetRelativeValue(0, 0);}if (arg is StringEval){return arg;}if (arg is ErrorEval){return arg;}return StringEval.EMPTY_INSTANCE;}
|
train
| false
|
7,321
|
public StopNotebookInstanceResult stopNotebookInstance(StopNotebookInstanceRequest request) {request = beforeClientExecution(request);return executeStopNotebookInstance(request);}
|
[
"public",
"StopNotebookInstanceResult",
"stopNotebookInstance",
"(",
"StopNotebookInstanceRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeStopNotebookInstance",
"(",
"request",
")",
";",
"}"
] |
public virtual StopNotebookInstanceResponse StopNotebookInstance(StopNotebookInstanceRequest request){var options = new InvokeOptions();options.RequestMarshaller = StopNotebookInstanceRequestMarshaller.Instance;options.ResponseUnmarshaller = StopNotebookInstanceResponseUnmarshaller.Instance;return Invoke<StopNotebookInstanceResponse>(request, options);}
|
train
| true
|
7,322
|
public void applyFont(int startIndex, int endIndex, short fontIndex) {if (startIndex > endIndex)throw new IllegalArgumentException("Start index must be less than end index.");if (startIndex < 0 || endIndex > length())throw new IllegalArgumentException("Start and end index not in range.");if (startIndex == endIndex)return;short currentFont = NO_FONT;if (endIndex != length()) {currentFont = this.getFontAtIndex(endIndex);}_string = cloneStringIfRequired();Iterator<FormatRun> formatting = _string.formatIterator();if (formatting != null) {while (formatting.hasNext()) {FormatRun r = formatting.next();if ((r.getCharacterPos() >= startIndex) && (r.getCharacterPos() < endIndex))formatting.remove();}}_string.addFormatRun(new FormatRun((short)startIndex, fontIndex));if (endIndex != length())_string.addFormatRun(new FormatRun((short)endIndex, currentFont));addToSSTIfRequired();}
|
[
"public",
"void",
"applyFont",
"(",
"int",
"startIndex",
",",
"int",
"endIndex",
",",
"short",
"fontIndex",
")",
"{",
"if",
"(",
"startIndex",
">",
"endIndex",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Start index must be less than end index.\"",
")",
";",
"if",
"(",
"startIndex",
"<",
"0",
"||",
"endIndex",
">",
"length",
"(",
")",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Start and end index not in range.\"",
")",
";",
"if",
"(",
"startIndex",
"==",
"endIndex",
")",
"return",
";",
"short",
"currentFont",
"=",
"NO_FONT",
";",
"if",
"(",
"endIndex",
"!=",
"length",
"(",
")",
")",
"{",
"currentFont",
"=",
"this",
".",
"getFontAtIndex",
"(",
"endIndex",
")",
";",
"}",
"_string",
"=",
"cloneStringIfRequired",
"(",
")",
";",
"Iterator",
"<",
"FormatRun",
">",
"formatting",
"=",
"_string",
".",
"formatIterator",
"(",
")",
";",
"if",
"(",
"formatting",
"!=",
"null",
")",
"{",
"while",
"(",
"formatting",
".",
"hasNext",
"(",
")",
")",
"{",
"FormatRun",
"r",
"=",
"formatting",
".",
"next",
"(",
")",
";",
"if",
"(",
"(",
"r",
".",
"getCharacterPos",
"(",
")",
">=",
"startIndex",
")",
"&&",
"(",
"r",
".",
"getCharacterPos",
"(",
")",
"<",
"endIndex",
")",
")",
"formatting",
".",
"remove",
"(",
")",
";",
"}",
"}",
"_string",
".",
"addFormatRun",
"(",
"new",
"FormatRun",
"(",
"(",
"short",
")",
"startIndex",
",",
"fontIndex",
")",
")",
";",
"if",
"(",
"endIndex",
"!=",
"length",
"(",
")",
")",
"_string",
".",
"addFormatRun",
"(",
"new",
"FormatRun",
"(",
"(",
"short",
")",
"endIndex",
",",
"currentFont",
")",
")",
";",
"addToSSTIfRequired",
"(",
")",
";",
"}"
] |
public void ApplyFont(int startIndex, int endIndex, short fontIndex){if (startIndex > endIndex)throw new ArgumentException("Start index must be less than end index.");if (startIndex < 0 || endIndex > Length)throw new ArgumentException("Start and end index not in range.");if (startIndex == endIndex)return;short currentFont = NO_FONT;if (endIndex != Length){currentFont = this.GetFontAtIndex(endIndex);}_string = CloneStringIfRequired();System.Collections.Generic.List<UnicodeString.FormatRun> formatting = _string.FormatIterator();ArrayList deletedFR = new ArrayList();if (formatting != null){IEnumerator<UnicodeString.FormatRun> formats = formatting.GetEnumerator();while (formats.MoveNext()){UnicodeString.FormatRun r = formats.Current;if ((r.CharacterPos >= startIndex) && (r.CharacterPos < endIndex)){deletedFR.Add(r);}}}foreach (UnicodeString.FormatRun fr in deletedFR){_string.RemoveFormatRun(fr);}_string.AddFormatRun(new UnicodeString.FormatRun((short)startIndex, fontIndex));if (endIndex != Length)_string.AddFormatRun(new UnicodeString.FormatRun((short)endIndex, currentFont));AddToSSTIfRequired();}
|
train
| false
|
7,323
|
public int readInt() throws IOException {return primitiveTypes.readInt();}
|
[
"public",
"int",
"readInt",
"(",
")",
"throws",
"IOException",
"{",
"return",
"primitiveTypes",
".",
"readInt",
"(",
")",
";",
"}"
] |
public virtual int readInt(){throw new System.NotImplementedException();}
|
train
| false
|
7,324
|
public Iterable<RevCommit> call() throws GitAPIException, NoHeadException {checkCallable();List<TreeFilter> filters = new ArrayList<>();if (!pathFilters.isEmpty()) {filters.add(AndTreeFilter.create(PathFilterGroup.create(pathFilters), TreeFilter.ANY_DIFF));}if (!excludeTreeFilters.isEmpty()) {for (TreeFilter f : excludeTreeFilters) {filters.add(AndTreeFilter.create(f, TreeFilter.ANY_DIFF));}}if (!filters.isEmpty()) {if (filters.size() == 1) {filters.add(TreeFilter.ANY_DIFF);}walk.setTreeFilter(AndTreeFilter.create(filters));}if (skip > -1 && maxCount > -1)walk.setRevFilter(AndRevFilter.create(SkipRevFilter.create(skip),MaxCountRevFilter.create(maxCount)));else if (skip > -1)walk.setRevFilter(SkipRevFilter.create(skip));else if (maxCount > -1)walk.setRevFilter(MaxCountRevFilter.create(maxCount));if (!startSpecified) {try {ObjectId headId = repo.resolve(Constants.HEAD);if (headId == null)throw new NoHeadException(JGitText.get().noHEADExistsAndNoExplicitStartingRevisionWasSpecified);add(headId);} catch (IOException e) {throw new JGitInternalException(JGitText.get().anExceptionOccurredWhileTryingToAddTheIdOfHEAD,e);}}if (this.revFilter != null) {walk.setRevFilter(this.revFilter);}setCallable(false);return walk;}
|
[
"public",
"Iterable",
"<",
"RevCommit",
">",
"call",
"(",
")",
"throws",
"GitAPIException",
",",
"NoHeadException",
"{",
"checkCallable",
"(",
")",
";",
"List",
"<",
"TreeFilter",
">",
"filters",
"=",
"new",
"ArrayList",
"<",
">",
"(",
")",
";",
"if",
"(",
"!",
"pathFilters",
".",
"isEmpty",
"(",
")",
")",
"{",
"filters",
".",
"add",
"(",
"AndTreeFilter",
".",
"create",
"(",
"PathFilterGroup",
".",
"create",
"(",
"pathFilters",
")",
",",
"TreeFilter",
".",
"ANY_DIFF",
")",
")",
";",
"}",
"if",
"(",
"!",
"excludeTreeFilters",
".",
"isEmpty",
"(",
")",
")",
"{",
"for",
"(",
"TreeFilter",
"f",
":",
"excludeTreeFilters",
")",
"{",
"filters",
".",
"add",
"(",
"AndTreeFilter",
".",
"create",
"(",
"f",
",",
"TreeFilter",
".",
"ANY_DIFF",
")",
")",
";",
"}",
"}",
"if",
"(",
"!",
"filters",
".",
"isEmpty",
"(",
")",
")",
"{",
"if",
"(",
"filters",
".",
"size",
"(",
")",
"==",
"1",
")",
"{",
"filters",
".",
"add",
"(",
"TreeFilter",
".",
"ANY_DIFF",
")",
";",
"}",
"walk",
".",
"setTreeFilter",
"(",
"AndTreeFilter",
".",
"create",
"(",
"filters",
")",
")",
";",
"}",
"if",
"(",
"skip",
">",
"-",
"1",
"&&",
"maxCount",
">",
"-",
"1",
")",
"walk",
".",
"setRevFilter",
"(",
"AndRevFilter",
".",
"create",
"(",
"SkipRevFilter",
".",
"create",
"(",
"skip",
")",
",",
"MaxCountRevFilter",
".",
"create",
"(",
"maxCount",
")",
")",
")",
";",
"else",
"if",
"(",
"skip",
">",
"-",
"1",
")",
"walk",
".",
"setRevFilter",
"(",
"SkipRevFilter",
".",
"create",
"(",
"skip",
")",
")",
";",
"else",
"if",
"(",
"maxCount",
">",
"-",
"1",
")",
"walk",
".",
"setRevFilter",
"(",
"MaxCountRevFilter",
".",
"create",
"(",
"maxCount",
")",
")",
";",
"if",
"(",
"!",
"startSpecified",
")",
"{",
"try",
"{",
"ObjectId",
"headId",
"=",
"repo",
".",
"resolve",
"(",
"Constants",
".",
"HEAD",
")",
";",
"if",
"(",
"headId",
"==",
"null",
")",
"throw",
"new",
"NoHeadException",
"(",
"JGitText",
".",
"get",
"(",
")",
".",
"noHEADExistsAndNoExplicitStartingRevisionWasSpecified",
")",
";",
"add",
"(",
"headId",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"throw",
"new",
"JGitInternalException",
"(",
"JGitText",
".",
"get",
"(",
")",
".",
"anExceptionOccurredWhileTryingToAddTheIdOfHEAD",
",",
"e",
")",
";",
"}",
"}",
"if",
"(",
"this",
".",
"revFilter",
"!=",
"null",
")",
"{",
"walk",
".",
"setRevFilter",
"(",
"this",
".",
"revFilter",
")",
";",
"}",
"setCallable",
"(",
"false",
")",
";",
"return",
"walk",
";",
"}"
] |
public override Iterable<RevCommit> Call(){CheckCallable();if (pathFilters.Count > 0){walk.SetTreeFilter(AndTreeFilter.Create(PathFilterGroup.Create(pathFilters), TreeFilter.ANY_DIFF));}if (skip > -1 && maxCount > -1){walk.SetRevFilter(AndRevFilter.Create(SkipRevFilter.Create(skip), MaxCountRevFilter.Create(maxCount)));}else{if (skip > -1){walk.SetRevFilter(SkipRevFilter.Create(skip));}else{if (maxCount > -1){walk.SetRevFilter(MaxCountRevFilter.Create(maxCount));}}}if (!startSpecified){try{ObjectId headId = repo.Resolve(Constants.HEAD);if (headId == null){throw new NoHeadException(JGitText.Get().noHEADExistsAndNoExplicitStartingRevisionWasSpecified);}Add(headId);}catch (IOException e){throw new JGitInternalException(JGitText.Get().anExceptionOccurredWhileTryingToAddTheIdOfHEAD, e);}}SetCallable(false);return walk;}
|
train
| false
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.