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 |
|---|---|---|---|---|---|
758
|
public String toLexerString() {if ( s0==null ) return "";DFASerializer serializer = new LexerDFASerializer(this);return serializer.toString();}
|
[
"public",
"String",
"toLexerString",
"(",
")",
"{",
"if",
"(",
"s0",
"==",
"null",
")",
"return",
"\"\"",
";",
"DFASerializer",
"serializer",
"=",
"new",
"LexerDFASerializer",
"(",
"this",
")",
";",
"return",
"serializer",
".",
"toString",
"(",
")",
";",
"}"
] |
public String ToLexerString(){if (s0 == null)return "";DFASerializer serializer = new LexerDFASerializer(this);return serializer.ToString();}
|
train
| false
|
759
|
public void clear() {fill(0, size(), 0);}
|
[
"public",
"void",
"clear",
"(",
")",
"{",
"fill",
"(",
"0",
",",
"size",
"(",
")",
",",
"0",
")",
";",
"}"
] |
public virtual void Clear(){Fill(0, Count, 0);}
|
train
| false
|
760
|
public GetStreamingDistributionConfigResult getStreamingDistributionConfig(GetStreamingDistributionConfigRequest request) {request = beforeClientExecution(request);return executeGetStreamingDistributionConfig(request);}
|
[
"public",
"GetStreamingDistributionConfigResult",
"getStreamingDistributionConfig",
"(",
"GetStreamingDistributionConfigRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetStreamingDistributionConfig",
"(",
"request",
")",
";",
"}"
] |
public virtual GetStreamingDistributionConfigResponse GetStreamingDistributionConfig(GetStreamingDistributionConfigRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetStreamingDistributionConfigRequestMarshaller.Instance;options.ResponseUnmarshaller = GetStreamingDistributionConfigResponseUnmarshaller.Instance;return Invoke<GetStreamingDistributionConfigResponse>(request, options);}
|
train
| true
|
761
|
public UpdateDomainContactResult updateDomainContact(UpdateDomainContactRequest request) {request = beforeClientExecution(request);return executeUpdateDomainContact(request);}
|
[
"public",
"UpdateDomainContactResult",
"updateDomainContact",
"(",
"UpdateDomainContactRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateDomainContact",
"(",
"request",
")",
";",
"}"
] |
public virtual UpdateDomainContactResponse UpdateDomainContact(UpdateDomainContactRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateDomainContactRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateDomainContactResponseUnmarshaller.Instance;return Invoke<UpdateDomainContactResponse>(request, options);}
|
train
| true
|
762
|
public ListIterator<E> listIterator(int location) {return new LinkIterator<E>(this, location);}
|
[
"public",
"ListIterator",
"<",
"E",
">",
"listIterator",
"(",
"int",
"location",
")",
"{",
"return",
"new",
"LinkIterator",
"<",
"E",
">",
"(",
"this",
",",
"location",
")",
";",
"}"
] |
public override java.util.ListIterator<E> listIterator(int location){return new java.util.LinkedList.LinkIterator<E>(this, location);}
|
train
| false
|
763
|
public String toString() {StringBuilder buffer = new StringBuilder();buffer.append("[STARTBLOCK]\n");buffer.append(" .rt =").append(HexDump.shortToHex(rt)).append('\n');buffer.append(" .grbitFrt =").append(HexDump.shortToHex(grbitFrt)).append('\n');buffer.append(" .iObjectKind =").append(HexDump.shortToHex(iObjectKind)).append('\n');buffer.append(" .iObjectContext =").append(HexDump.shortToHex(iObjectContext)).append('\n');buffer.append(" .iObjectInstance1=").append(HexDump.shortToHex(iObjectInstance1)).append('\n');buffer.append(" .iObjectInstance2=").append(HexDump.shortToHex(iObjectInstance2)).append('\n');buffer.append("[/STARTBLOCK]\n");return buffer.toString();}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuilder",
"buffer",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"\"[STARTBLOCK]\\n\"",
")",
";",
"buffer",
".",
"append",
"(",
"\" .rt =\"",
")",
".",
"append",
"(",
"HexDump",
".",
"shortToHex",
"(",
"rt",
")",
")",
".",
"append",
"(",
"'\\n'",
")",
";",
"buffer",
".",
"append",
"(",
"\" .grbitFrt =\"",
")",
".",
"append",
"(",
"HexDump",
".",
"shortToHex",
"(",
"grbitFrt",
")",
")",
".",
"append",
"(",
"'\\n'",
")",
";",
"buffer",
".",
"append",
"(",
"\" .iObjectKind =\"",
")",
".",
"append",
"(",
"HexDump",
".",
"shortToHex",
"(",
"iObjectKind",
")",
")",
".",
"append",
"(",
"'\\n'",
")",
";",
"buffer",
".",
"append",
"(",
"\" .iObjectContext =\"",
")",
".",
"append",
"(",
"HexDump",
".",
"shortToHex",
"(",
"iObjectContext",
")",
")",
".",
"append",
"(",
"'\\n'",
")",
";",
"buffer",
".",
"append",
"(",
"\" .iObjectInstance1=\"",
")",
".",
"append",
"(",
"HexDump",
".",
"shortToHex",
"(",
"iObjectInstance1",
")",
")",
".",
"append",
"(",
"'\\n'",
")",
";",
"buffer",
".",
"append",
"(",
"\" .iObjectInstance2=\"",
")",
".",
"append",
"(",
"HexDump",
".",
"shortToHex",
"(",
"iObjectInstance2",
")",
")",
".",
"append",
"(",
"'\\n'",
")",
";",
"buffer",
".",
"append",
"(",
"\"[/STARTBLOCK]\\n\"",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}"
] |
public override String ToString(){StringBuilder buffer = new StringBuilder();buffer.Append("[STARTBLOCK]\n");buffer.Append(" .rt =").Append(HexDump.ShortToHex(rt)).Append('\n');buffer.Append(" .grbitFrt =").Append(HexDump.ShortToHex(grbitFrt)).Append('\n');buffer.Append(" .iObjectKind =").Append(HexDump.ShortToHex(iObjectKind)).Append('\n');buffer.Append(" .iObjectContext =").Append(HexDump.ShortToHex(iObjectContext)).Append('\n');buffer.Append(" .iObjectInstance1=").Append(HexDump.ShortToHex(iObjectInstance1)).Append('\n');buffer.Append(" .iObjectInstance2=").Append(HexDump.ShortToHex(iObjectInstance2)).Append('\n');buffer.Append("[/STARTBLOCK]\n");return buffer.ToString();}
|
train
| false
|
765
|
public String toString(String field) {StringBuilder buffer = new StringBuilder();boolean needParens = (getLowFreqMinimumNumberShouldMatch() > 0);if (needParens) {buffer.append("(");}for (int i = 0; i < terms.size(); i++) {Term t = terms.get(i);buffer.append(newTermQuery(t, null).toString());if (i != terms.size() - 1) buffer.append(", ");}if (needParens) {buffer.append(")");}if (getLowFreqMinimumNumberShouldMatch() > 0 || getHighFreqMinimumNumberShouldMatch() > 0) {buffer.append('~');buffer.append("(");buffer.append(getLowFreqMinimumNumberShouldMatch());buffer.append(getHighFreqMinimumNumberShouldMatch());buffer.append(")");}return buffer.toString();}
|
[
"public",
"String",
"toString",
"(",
"String",
"field",
")",
"{",
"StringBuilder",
"buffer",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"boolean",
"needParens",
"=",
"(",
"getLowFreqMinimumNumberShouldMatch",
"(",
")",
">",
"0",
")",
";",
"if",
"(",
"needParens",
")",
"{",
"buffer",
".",
"append",
"(",
"\"(\"",
")",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"terms",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"Term",
"t",
"=",
"terms",
".",
"get",
"(",
"i",
")",
";",
"buffer",
".",
"append",
"(",
"newTermQuery",
"(",
"t",
",",
"null",
")",
".",
"toString",
"(",
")",
")",
";",
"if",
"(",
"i",
"!=",
"terms",
".",
"size",
"(",
")",
"-",
"1",
")",
"buffer",
".",
"append",
"(",
"\", \"",
")",
";",
"}",
"if",
"(",
"needParens",
")",
"{",
"buffer",
".",
"append",
"(",
"\")\"",
")",
";",
"}",
"if",
"(",
"getLowFreqMinimumNumberShouldMatch",
"(",
")",
">",
"0",
"||",
"getHighFreqMinimumNumberShouldMatch",
"(",
")",
">",
"0",
")",
"{",
"buffer",
".",
"append",
"(",
"'~'",
")",
";",
"buffer",
".",
"append",
"(",
"\"(\"",
")",
";",
"buffer",
".",
"append",
"(",
"getLowFreqMinimumNumberShouldMatch",
"(",
")",
")",
";",
"buffer",
".",
"append",
"(",
"getHighFreqMinimumNumberShouldMatch",
"(",
")",
")",
";",
"buffer",
".",
"append",
"(",
"\")\"",
")",
";",
"}",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}"
] |
public override string ToString(string field){var buffer = new StringBuilder();bool needParens = (Boost != 1.0) || (LowFreqMinimumNumberShouldMatch > 0);if (needParens){buffer.Append("(");}for (int i = 0; i < m_terms.Count; i++){Term t = m_terms[i];buffer.Append(NewTermQuery(t, null).ToString());if (i != m_terms.Count - 1){buffer.Append(", ");}}if (needParens){buffer.Append(")");}if (LowFreqMinimumNumberShouldMatch > 0 || HighFreqMinimumNumberShouldMatch > 0){buffer.Append('~');buffer.Append("(");buffer.AppendFormat(CultureInfo.InvariantCulture, "{0:0.0#######}", LowFreqMinimumNumberShouldMatch);buffer.AppendFormat(CultureInfo.InvariantCulture, "{0:0.0#######}", HighFreqMinimumNumberShouldMatch);buffer.Append(")");}if (Boost != 1.0f){buffer.Append(ToStringUtils.Boost(Boost));}return buffer.ToString();}
|
train
| false
|
766
|
public String[] getStopWords(String fieldName) {Set<String> stopWords = stopWordsPerField.get(fieldName);return stopWords != null ? stopWords.toArray(new String[stopWords.size()]) : new String[0];}
|
[
"public",
"String",
"[",
"]",
"getStopWords",
"(",
"String",
"fieldName",
")",
"{",
"Set",
"<",
"String",
">",
"stopWords",
"=",
"stopWordsPerField",
".",
"get",
"(",
"fieldName",
")",
";",
"return",
"stopWords",
"!=",
"null",
"?",
"stopWords",
".",
"toArray",
"(",
"new",
"String",
"[",
"stopWords",
".",
"size",
"(",
")",
"]",
")",
":",
"new",
"String",
"[",
"0",
"]",
";",
"}"
] |
public string[] GetStopWords(string fieldName){var stopWords = stopWordsPerField[fieldName];return stopWords != null ? stopWords.ToArray() : new string[0];}
|
train
| false
|
767
|
public void print(float f) {print(String.valueOf(f));}
|
[
"public",
"void",
"print",
"(",
"float",
"f",
")",
"{",
"print",
"(",
"String",
".",
"valueOf",
"(",
"f",
")",
")",
";",
"}"
] |
public virtual void print(float f){print(f.ToString());}
|
train
| false
|
768
|
public MopenCreateGroupRequest() {super("MoPen", "2018-02-11", "MopenCreateGroup", "mopen");setProtocol(ProtocolType.HTTPS);setMethod(MethodType.POST);}
|
[
"public",
"MopenCreateGroupRequest",
"(",
")",
"{",
"super",
"(",
"\"MoPen\"",
",",
"\"2018-02-11\"",
",",
"\"MopenCreateGroup\"",
",",
"\"mopen\"",
")",
";",
"setProtocol",
"(",
"ProtocolType",
".",
"HTTPS",
")",
";",
"setMethod",
"(",
"MethodType",
".",
"POST",
")",
";",
"}"
] |
public MopenCreateGroupRequest(): base("MoPen", "2018-02-11", "MopenCreateGroup", "mopen", "openAPI"){Protocol = ProtocolType.HTTPS;Method = MethodType.POST;}
|
train
| false
|
769
|
public SmallObject(int type, byte[] data) {this.type = type;this.data = data;}
|
[
"public",
"SmallObject",
"(",
"int",
"type",
",",
"byte",
"[",
"]",
"data",
")",
"{",
"this",
".",
"type",
"=",
"type",
";",
"this",
".",
"data",
"=",
"data",
";",
"}"
] |
public SmallObject(int type, byte[] data){this.type = type;this.data = data;}
|
train
| false
|
770
|
public final boolean matches(char c) {return Character.isUpperCase(c);}
|
[
"public",
"final",
"boolean",
"matches",
"(",
"char",
"c",
")",
"{",
"return",
"Character",
".",
"isUpperCase",
"(",
"c",
")",
";",
"}"
] |
public bool Matches(char c){return System.Char.IsUpper(c);}
|
train
| false
|
771
|
public StartNotebookInstanceResult startNotebookInstance(StartNotebookInstanceRequest request) {request = beforeClientExecution(request);return executeStartNotebookInstance(request);}
|
[
"public",
"StartNotebookInstanceResult",
"startNotebookInstance",
"(",
"StartNotebookInstanceRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeStartNotebookInstance",
"(",
"request",
")",
";",
"}"
] |
public virtual StartNotebookInstanceResponse StartNotebookInstance(StartNotebookInstanceRequest request){var options = new InvokeOptions();options.RequestMarshaller = StartNotebookInstanceRequestMarshaller.Instance;options.ResponseUnmarshaller = StartNotebookInstanceResponseUnmarshaller.Instance;return Invoke<StartNotebookInstanceResponse>(request, options);}
|
train
| true
|
772
|
public static void putUnicodeLE(String input, byte[] output, int offset) {byte[] bytes = input.getBytes(UTF16LE);System.arraycopy(bytes, 0, output, offset, bytes.length);}
|
[
"public",
"static",
"void",
"putUnicodeLE",
"(",
"String",
"input",
",",
"byte",
"[",
"]",
"output",
",",
"int",
"offset",
")",
"{",
"byte",
"[",
"]",
"bytes",
"=",
"input",
".",
"getBytes",
"(",
"UTF16LE",
")",
";",
"System",
".",
"arraycopy",
"(",
"bytes",
",",
"0",
",",
"output",
",",
"offset",
",",
"bytes",
".",
"length",
")",
";",
"}"
] |
public static void PutUnicodeLE(String input, byte[] output, int offset){byte[] bytes = UTF16LE.GetBytes(input);Array.Copy(bytes, 0, output, offset, bytes.Length);}
|
train
| false
|
773
|
public void deleteDocument(int docID) {final int i = readerIndex(docID);getSequentialSubReaders().get(i).deleteDocument(docID - readerBase(i));}
|
[
"public",
"void",
"deleteDocument",
"(",
"int",
"docID",
")",
"{",
"final",
"int",
"i",
"=",
"readerIndex",
"(",
"docID",
")",
";",
"getSequentialSubReaders",
"(",
")",
".",
"get",
"(",
"i",
")",
".",
"deleteDocument",
"(",
"docID",
"-",
"readerBase",
"(",
"i",
")",
")",
";",
"}"
] |
public void DeleteDocument(int docID){int i = ReaderIndex(docID);((FakeDeleteAtomicIndexReader)GetSequentialSubReaders()[i]).DeleteDocument(docID - ReaderBase(i));}
|
train
| false
|
774
|
public boolean isRelevant(String docName, QualityQuery query) {QRelJudgement qrj = judgements.get(query.getQueryID());return qrj!=null && qrj.isRelevant(docName);}
|
[
"public",
"boolean",
"isRelevant",
"(",
"String",
"docName",
",",
"QualityQuery",
"query",
")",
"{",
"QRelJudgement",
"qrj",
"=",
"judgements",
".",
"get",
"(",
"query",
".",
"getQueryID",
"(",
")",
")",
";",
"return",
"qrj",
"!=",
"null",
"&&",
"qrj",
".",
"isRelevant",
"(",
"docName",
")",
";",
"}"
] |
public virtual bool IsRelevant(string docName, QualityQuery query){QRelJudgement qrj;judgements.TryGetValue(query.QueryID, out qrj);return qrj != null && qrj.IsRelevant(docName);}
|
train
| false
|
775
|
public final int getBeginB() {return beginB;}
|
[
"public",
"final",
"int",
"getBeginB",
"(",
")",
"{",
"return",
"beginB",
";",
"}"
] |
public int GetBeginB(){return beginB;}
|
train
| false
|
776
|
public ModifySpotFleetRequestResult modifySpotFleetRequest(ModifySpotFleetRequestRequest request) {request = beforeClientExecution(request);return executeModifySpotFleetRequest(request);}
|
[
"public",
"ModifySpotFleetRequestResult",
"modifySpotFleetRequest",
"(",
"ModifySpotFleetRequestRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeModifySpotFleetRequest",
"(",
"request",
")",
";",
"}"
] |
public virtual ModifySpotFleetRequestResponse ModifySpotFleetRequest(ModifySpotFleetRequestRequest request){var options = new InvokeOptions();options.RequestMarshaller = ModifySpotFleetRequestRequestMarshaller.Instance;options.ResponseUnmarshaller = ModifySpotFleetRequestResponseUnmarshaller.Instance;return Invoke<ModifySpotFleetRequestResponse>(request, options);}
|
train
| true
|
777
|
public UncalcedRecord() {_reserved = 0;}
|
[
"public",
"UncalcedRecord",
"(",
")",
"{",
"_reserved",
"=",
"0",
";",
"}"
] |
public UncalcedRecord(){_reserved = 0;}
|
train
| false
|
778
|
public static PageOrder valueOf(int value){return _table[value];}
|
[
"public",
"static",
"PageOrder",
"valueOf",
"(",
"int",
"value",
")",
"{",
"return",
"_table",
"[",
"value",
"]",
";",
"}"
] |
public static PageOrder ValueOf(int value){return _table[value];}
|
train
| false
|
779
|
public static CellValue valueOf(boolean booleanValue) {return booleanValue ? TRUE : FALSE;}
|
[
"public",
"static",
"CellValue",
"valueOf",
"(",
"boolean",
"booleanValue",
")",
"{",
"return",
"booleanValue",
"?",
"TRUE",
":",
"FALSE",
";",
"}"
] |
public static CellValue ValueOf(bool boolValue){return boolValue ? TRUE : FALSE;}
|
train
| false
|
780
|
public void write(String str) {buf.append(str);}
|
[
"public",
"void",
"write",
"(",
"String",
"str",
")",
"{",
"buf",
".",
"append",
"(",
"str",
")",
";",
"}"
] |
public override void write(string str){buf.append(str);}
|
train
| false
|
781
|
public void addListener(HSSFListener lsnr, short sid) {List<HSSFListener> list = _records.computeIfAbsent(Short.valueOf(sid), k -> new ArrayList<>(1));list.add(lsnr);}
|
[
"public",
"void",
"addListener",
"(",
"HSSFListener",
"lsnr",
",",
"short",
"sid",
")",
"{",
"List",
"<",
"HSSFListener",
">",
"list",
"=",
"_records",
".",
"computeIfAbsent",
"(",
"Short",
".",
"valueOf",
"(",
"sid",
")",
",",
"k",
"->",
"new",
"ArrayList",
"<",
">",
"(",
"1",
")",
")",
";",
"list",
".",
"add",
"(",
"lsnr",
")",
";",
"}"
] |
public void AddListener(IHSSFListener lsnr, short sid){IList list = null;Object obj = records[sid];if (obj != null){list = (IList)obj;}else{list = new ArrayList(1); list.Add(lsnr);records[sid]=list;}}
|
train
| false
|
782
|
public GetMeetingResult getMeeting(GetMeetingRequest request) {request = beforeClientExecution(request);return executeGetMeeting(request);}
|
[
"public",
"GetMeetingResult",
"getMeeting",
"(",
"GetMeetingRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetMeeting",
"(",
"request",
")",
";",
"}"
] |
public virtual GetMeetingResponse GetMeeting(GetMeetingRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetMeetingRequestMarshaller.Instance;options.ResponseUnmarshaller = GetMeetingResponseUnmarshaller.Instance;return Invoke<GetMeetingResponse>(request, options);}
|
train
| false
|
783
|
public void stopTimer() {stop = true;}
|
[
"public",
"void",
"stopTimer",
"(",
")",
"{",
"stop",
"=",
"true",
";",
"}"
] |
public void StopTimer(){stop = true;}
|
train
| false
|
784
|
public AttachLoadBalancerTargetGroupsResult attachLoadBalancerTargetGroups(AttachLoadBalancerTargetGroupsRequest request) {request = beforeClientExecution(request);return executeAttachLoadBalancerTargetGroups(request);}
|
[
"public",
"AttachLoadBalancerTargetGroupsResult",
"attachLoadBalancerTargetGroups",
"(",
"AttachLoadBalancerTargetGroupsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeAttachLoadBalancerTargetGroups",
"(",
"request",
")",
";",
"}"
] |
public virtual AttachLoadBalancerTargetGroupsResponse AttachLoadBalancerTargetGroups(AttachLoadBalancerTargetGroupsRequest request){var options = new InvokeOptions();options.RequestMarshaller = AttachLoadBalancerTargetGroupsRequestMarshaller.Instance;options.ResponseUnmarshaller = AttachLoadBalancerTargetGroupsResponseUnmarshaller.Instance;return Invoke<AttachLoadBalancerTargetGroupsResponse>(request, options);}
|
train
| true
|
785
|
public GetQueryLoggingConfigResult getQueryLoggingConfig(GetQueryLoggingConfigRequest request) {request = beforeClientExecution(request);return executeGetQueryLoggingConfig(request);}
|
[
"public",
"GetQueryLoggingConfigResult",
"getQueryLoggingConfig",
"(",
"GetQueryLoggingConfigRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetQueryLoggingConfig",
"(",
"request",
")",
";",
"}"
] |
public virtual GetQueryLoggingConfigResponse GetQueryLoggingConfig(GetQueryLoggingConfigRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetQueryLoggingConfigRequestMarshaller.Instance;options.ResponseUnmarshaller = GetQueryLoggingConfigResponseUnmarshaller.Instance;return Invoke<GetQueryLoggingConfigResponse>(request, options);}
|
train
| true
|
786
|
public ListIterator<E> listIterator() {Object[] snapshot = elements;return new CowIterator<E>(snapshot, 0, snapshot.length);}
|
[
"public",
"ListIterator",
"<",
"E",
">",
"listIterator",
"(",
")",
"{",
"Object",
"[",
"]",
"snapshot",
"=",
"elements",
";",
"return",
"new",
"CowIterator",
"<",
"E",
">",
"(",
"snapshot",
",",
"0",
",",
"snapshot",
".",
"length",
")",
";",
"}"
] |
public virtual java.util.ListIterator<E> listIterator(){object[] snapshot = elements;return new java.util.concurrent.CopyOnWriteArrayList.CowIterator<E>(snapshot, 0,snapshot.Length);}
|
train
| true
|
787
|
public CreateSnapshotResult createSnapshot(CreateSnapshotRequest request) {request = beforeClientExecution(request);return executeCreateSnapshot(request);}
|
[
"public",
"CreateSnapshotResult",
"createSnapshot",
"(",
"CreateSnapshotRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCreateSnapshot",
"(",
"request",
")",
";",
"}"
] |
public virtual CreateSnapshotResponse CreateSnapshot(CreateSnapshotRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateSnapshotRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateSnapshotResponseUnmarshaller.Instance;return Invoke<CreateSnapshotResponse>(request, options);}
|
train
| true
|
788
|
public boolean hasObject(AnyObjectId objectId) {try {return getObjectDatabase().has(objectId);} catch (IOException e) {throw new UncheckedIOException(e);}}
|
[
"public",
"boolean",
"hasObject",
"(",
"AnyObjectId",
"objectId",
")",
"{",
"try",
"{",
"return",
"getObjectDatabase",
"(",
")",
".",
"has",
"(",
"objectId",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"throw",
"new",
"UncheckedIOException",
"(",
"e",
")",
";",
"}",
"}"
] |
public virtual bool HasObject(AnyObjectId objectId){try{return ObjectDatabase.Has(objectId);}catch (IOException){return false;}}
|
train
| false
|
789
|
public final void sort(int from, int to) {checkRange(from, to);mergeSort(from, to);}
|
[
"public",
"final",
"void",
"sort",
"(",
"int",
"from",
",",
"int",
"to",
")",
"{",
"checkRange",
"(",
"from",
",",
"to",
")",
";",
"mergeSort",
"(",
"from",
",",
"to",
")",
";",
"}"
] |
public override sealed void Sort(int from, int to){CheckRange(from, to);MergeSort(from, to);}
|
train
| false
|
790
|
public <T extends EscherRecord> T getChildById( short recordId ) {for ( EscherRecord childRecord : this ) {if ( childRecord.getRecordId() == recordId ) {@SuppressWarnings( "unchecked" )final T result = (T) childRecord;return result;}}return null;}
|
[
"public",
"<",
"T",
"extends",
"EscherRecord",
">",
"T",
"getChildById",
"(",
"short",
"recordId",
")",
"{",
"for",
"(",
"EscherRecord",
"childRecord",
":",
"this",
")",
"{",
"if",
"(",
"childRecord",
".",
"getRecordId",
"(",
")",
"==",
"recordId",
")",
"{",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"final",
"T",
"result",
"=",
"(",
"T",
")",
"childRecord",
";",
"return",
"result",
";",
"}",
"}",
"return",
"null",
";",
"}"
] |
public EscherRecord GetChildById(short recordId){for (IEnumerator iterator = _childRecords.GetEnumerator(); iterator.MoveNext(); ){EscherRecord escherRecord = (EscherRecord)iterator.Current;if (escherRecord.RecordId == recordId)return escherRecord;}return null;}
|
train
| false
|
791
|
public void serialize(LittleEndianOutput out) {out.writeShort(field_1_xBasis);out.writeShort(field_2_yBasis);out.writeShort(field_3_heightBasis);out.writeShort(field_4_scale);out.writeShort(field_5_indexToFontTable);}
|
[
"public",
"void",
"serialize",
"(",
"LittleEndianOutput",
"out",
")",
"{",
"out",
".",
"writeShort",
"(",
"field_1_xBasis",
")",
";",
"out",
".",
"writeShort",
"(",
"field_2_yBasis",
")",
";",
"out",
".",
"writeShort",
"(",
"field_3_heightBasis",
")",
";",
"out",
".",
"writeShort",
"(",
"field_4_scale",
")",
";",
"out",
".",
"writeShort",
"(",
"field_5_indexToFontTable",
")",
";",
"}"
] |
public override void Serialize(ILittleEndianOutput out1){out1.WriteShort(field_1_xBasis);out1.WriteShort(field_2_yBasis);out1.WriteShort(field_3_heightBasis);out1.WriteShort(field_4_scale);out1.WriteShort(field_5_indexToFontTable);}
|
train
| false
|
793
|
public static Collection<Ref> sort(Collection<Ref> refs) {final List<Ref> r = new ArrayList<>(refs);Collections.sort(r, INSTANCE);return r;}
|
[
"public",
"static",
"Collection",
"<",
"Ref",
">",
"sort",
"(",
"Collection",
"<",
"Ref",
">",
"refs",
")",
"{",
"final",
"List",
"<",
"Ref",
">",
"r",
"=",
"new",
"ArrayList",
"<",
">",
"(",
"refs",
")",
";",
"Collections",
".",
"sort",
"(",
"r",
",",
"INSTANCE",
")",
";",
"return",
"r",
";",
"}"
] |
public static ICollection<Ref> Sort(ICollection<Ref> refs){IList<Ref> r = new AList<Ref>(refs);r.Sort(INSTANCE);return r;}
|
train
| false
|
794
|
public DescribeVpcsResult describeVpcs() {return describeVpcs(new DescribeVpcsRequest());}
|
[
"public",
"DescribeVpcsResult",
"describeVpcs",
"(",
")",
"{",
"return",
"describeVpcs",
"(",
"new",
"DescribeVpcsRequest",
"(",
")",
")",
";",
"}"
] |
public virtual DescribeVpcsResponse DescribeVpcs(){return DescribeVpcs(new DescribeVpcsRequest());}
|
train
| false
|
795
|
public ListProposalsResult listProposals(ListProposalsRequest request) {request = beforeClientExecution(request);return executeListProposals(request);}
|
[
"public",
"ListProposalsResult",
"listProposals",
"(",
"ListProposalsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListProposals",
"(",
"request",
")",
";",
"}"
] |
public virtual ListProposalsResponse ListProposals(ListProposalsRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListProposalsRequestMarshaller.Instance;options.ResponseUnmarshaller = ListProposalsResponseUnmarshaller.Instance;return Invoke<ListProposalsResponse>(request, options);}
|
train
| false
|
796
|
public void close() throws IOException {flush();output.close();}
|
[
"public",
"void",
"close",
"(",
")",
"throws",
"IOException",
"{",
"flush",
"(",
")",
";",
"output",
".",
"close",
"(",
")",
";",
"}"
] |
public override void close(){throw new System.NotImplementedException();}
|
train
| false
|
797
|
public final T get() {return object;}
|
[
"public",
"final",
"T",
"get",
"(",
")",
"{",
"return",
"object",
";",
"}"
] |
public T Get(){return m_object;}
|
train
| false
|
798
|
public BundleInstanceRequest(String instanceId, Storage storage) {setInstanceId(instanceId);setStorage(storage);}
|
[
"public",
"BundleInstanceRequest",
"(",
"String",
"instanceId",
",",
"Storage",
"storage",
")",
"{",
"setInstanceId",
"(",
"instanceId",
")",
";",
"setStorage",
"(",
"storage",
")",
";",
"}"
] |
public BundleInstanceRequest(string instanceId, Storage storage){_instanceId = instanceId;_storage = storage;}
|
train
| false
|
799
|
public void back(int delta) {if (delta == 1 && 0 <= prevPtr) {currPtr = prevPtr;prevPtr = -1;if (!eof())parseEntry();return;} else if (delta <= 0)throw new ArrayIndexOutOfBoundsException(delta);final int[] trace = new int[delta + 1];Arrays.fill(trace, -1);int ptr = 0;while (ptr != currPtr) {System.arraycopy(trace, 1, trace, 0, delta);trace[delta] = ptr;while (raw[ptr] != 0)ptr++;ptr += OBJECT_ID_LENGTH + 1;}if (trace[1] == -1)throw new ArrayIndexOutOfBoundsException(delta);prevPtr = trace[0];currPtr = trace[1];parseEntry();}
|
[
"public",
"void",
"back",
"(",
"int",
"delta",
")",
"{",
"if",
"(",
"delta",
"==",
"1",
"&&",
"0",
"<=",
"prevPtr",
")",
"{",
"currPtr",
"=",
"prevPtr",
";",
"prevPtr",
"=",
"-",
"1",
";",
"if",
"(",
"!",
"eof",
"(",
")",
")",
"parseEntry",
"(",
")",
";",
"return",
";",
"}",
"else",
"if",
"(",
"delta",
"<=",
"0",
")",
"throw",
"new",
"ArrayIndexOutOfBoundsException",
"(",
"delta",
")",
";",
"final",
"int",
"[",
"]",
"trace",
"=",
"new",
"int",
"[",
"delta",
"+",
"1",
"]",
";",
"Arrays",
".",
"fill",
"(",
"trace",
",",
"-",
"1",
")",
";",
"int",
"ptr",
"=",
"0",
";",
"while",
"(",
"ptr",
"!=",
"currPtr",
")",
"{",
"System",
".",
"arraycopy",
"(",
"trace",
",",
"1",
",",
"trace",
",",
"0",
",",
"delta",
")",
";",
"trace",
"[",
"delta",
"]",
"=",
"ptr",
";",
"while",
"(",
"raw",
"[",
"ptr",
"]",
"!=",
"0",
")",
"ptr",
"++",
";",
"ptr",
"+=",
"OBJECT_ID_LENGTH",
"+",
"1",
";",
"}",
"if",
"(",
"trace",
"[",
"1",
"]",
"==",
"-",
"1",
")",
"throw",
"new",
"ArrayIndexOutOfBoundsException",
"(",
"delta",
")",
";",
"prevPtr",
"=",
"trace",
"[",
"0",
"]",
";",
"currPtr",
"=",
"trace",
"[",
"1",
"]",
";",
"parseEntry",
"(",
")",
";",
"}"
] |
public override void Back(int delta){if (delta == 1 && 0 <= prevPtr){currPtr = prevPtr;prevPtr = -1;if (!Eof){ParseEntry();}return;}else{if (delta <= 0){throw Sharpen.Extensions.CreateIndexOutOfRangeException(delta);}}int[] trace = new int[delta + 1];Arrays.Fill(trace, -1);int ptr = 0;while (ptr != currPtr){System.Array.Copy(trace, 1, trace, 0, delta);trace[delta] = ptr;while (raw[ptr] != 0){ptr++;}ptr += Constants.OBJECT_ID_LENGTH + 1;}if (trace[1] == -1){throw Sharpen.Extensions.CreateIndexOutOfRangeException(delta);}prevPtr = trace[0];currPtr = trace[1];ParseEntry();}
|
train
| false
|
800
|
public String toString() {return "pred_"+ruleIndex+":"+predIndex;}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"\"pred_\"",
"+",
"ruleIndex",
"+",
"\":\"",
"+",
"predIndex",
";",
"}"
] |
public override string ToString(){return "pred_" + ruleIndex + ":" + predIndex;}
|
train
| false
|
801
|
public PatternSyntaxException(String description, String pattern, int index) {this.desc = description;this.pattern = pattern;this.index = index;}
|
[
"public",
"PatternSyntaxException",
"(",
"String",
"description",
",",
"String",
"pattern",
",",
"int",
"index",
")",
"{",
"this",
".",
"desc",
"=",
"description",
";",
"this",
".",
"pattern",
"=",
"pattern",
";",
"this",
".",
"index",
"=",
"index",
";",
"}"
] |
public PatternSyntaxException(string description, string pattern, int index){this.desc = description;this.pattern = pattern;this.index = index;}
|
train
| false
|
802
|
public AlphaAnimation(float from, float to) {mStartAlpha = from;mEndAlpha = to;mCurrentAlpha = from;}
|
[
"public",
"AlphaAnimation",
"(",
"float",
"from",
",",
"float",
"to",
")",
"{",
"mStartAlpha",
"=",
"from",
";",
"mEndAlpha",
"=",
"to",
";",
"mCurrentAlpha",
"=",
"from",
";",
"}"
] |
public AlphaAnimation(float fromAlpha, float toAlpha){mFromAlpha = fromAlpha;mToAlpha = toAlpha;}
|
train
| false
|
803
|
public int doLogic() throws Exception {TaxonomyWriter taxonomyWriter = getRunData().getTaxonomyWriter();if (taxonomyWriter != null) {taxonomyWriter.commit();} else {throw new IllegalStateException("TaxonomyWriter is not currently open");}return 1;}
|
[
"public",
"int",
"doLogic",
"(",
")",
"throws",
"Exception",
"{",
"TaxonomyWriter",
"taxonomyWriter",
"=",
"getRunData",
"(",
")",
".",
"getTaxonomyWriter",
"(",
")",
";",
"if",
"(",
"taxonomyWriter",
"!=",
"null",
")",
"{",
"taxonomyWriter",
".",
"commit",
"(",
")",
";",
"}",
"else",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"TaxonomyWriter is not currently open\"",
")",
";",
"}",
"return",
"1",
";",
"}"
] |
public override int DoLogic(){ITaxonomyWriter taxonomyWriter = RunData.TaxonomyWriter;if (taxonomyWriter != null){taxonomyWriter.Commit();}else{throw new InvalidOperationException("TaxonomyWriter is not currently open");}return 1;}
|
train
| false
|
804
|
public DeltaIndex(byte[] sourceBuffer) {src = sourceBuffer;DeltaIndexScanner scan = new DeltaIndexScanner(src, src.length);table = scan.table;tableMask = scan.tableMask;entries = new long[1 + countEntries(scan)];copyEntries(scan);}
|
[
"public",
"DeltaIndex",
"(",
"byte",
"[",
"]",
"sourceBuffer",
")",
"{",
"src",
"=",
"sourceBuffer",
";",
"DeltaIndexScanner",
"scan",
"=",
"new",
"DeltaIndexScanner",
"(",
"src",
",",
"src",
".",
"length",
")",
";",
"table",
"=",
"scan",
".",
"table",
";",
"tableMask",
"=",
"scan",
".",
"tableMask",
";",
"entries",
"=",
"new",
"long",
"[",
"1",
"+",
"countEntries",
"(",
"scan",
")",
"]",
";",
"copyEntries",
"(",
"scan",
")",
";",
"}"
] |
public DeltaIndex(byte[] sourceBuffer){src = sourceBuffer;DeltaIndexScanner scan = new DeltaIndexScanner(src, src.Length);table = scan.table;tableMask = scan.tableMask;entries = new long[1 + CountEntries(scan)];CopyEntries(scan);}
|
train
| false
|
805
|
public int previousIndex() {return pos;}
|
[
"public",
"int",
"previousIndex",
"(",
")",
"{",
"return",
"pos",
";",
"}"
] |
public int previousIndex(){return pos;}
|
train
| false
|
806
|
public QueryMaker getQueryMaker() {return getRunData().getQueryMaker(this);}
|
[
"public",
"QueryMaker",
"getQueryMaker",
"(",
")",
"{",
"return",
"getRunData",
"(",
")",
".",
"getQueryMaker",
"(",
"this",
")",
";",
"}"
] |
public override IQueryMaker GetQueryMaker(){return RunData.GetQueryMaker(this);}
|
train
| false
|
807
|
public JapaneseTokenizerFactory(Map<String,String> args) {super(args);mode = Mode.valueOf(get(args, MODE, JapaneseTokenizer.DEFAULT_MODE.toString()).toUpperCase(Locale.ROOT));userDictionaryPath = args.remove(USER_DICT_PATH);userDictionaryEncoding = args.remove(USER_DICT_ENCODING);discardPunctuation = getBoolean(args, DISCARD_PUNCTUATION, true);discardCompoundToken = getBoolean(args, DISCARD_COMPOUND_TOKEN, true);nbestCost = getInt(args, NBEST_COST, 0);nbestExamples = args.remove(NBEST_EXAMPLES);if (!args.isEmpty()) {throw new IllegalArgumentException("Unknown parameters: " + args);}}
|
[
"public",
"JapaneseTokenizerFactory",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"args",
")",
"{",
"super",
"(",
"args",
")",
";",
"mode",
"=",
"Mode",
".",
"valueOf",
"(",
"get",
"(",
"args",
",",
"MODE",
",",
"JapaneseTokenizer",
".",
"DEFAULT_MODE",
".",
"toString",
"(",
")",
")",
".",
"toUpperCase",
"(",
"Locale",
".",
"ROOT",
")",
")",
";",
"userDictionaryPath",
"=",
"args",
".",
"remove",
"(",
"USER_DICT_PATH",
")",
";",
"userDictionaryEncoding",
"=",
"args",
".",
"remove",
"(",
"USER_DICT_ENCODING",
")",
";",
"discardPunctuation",
"=",
"getBoolean",
"(",
"args",
",",
"DISCARD_PUNCTUATION",
",",
"true",
")",
";",
"discardCompoundToken",
"=",
"getBoolean",
"(",
"args",
",",
"DISCARD_COMPOUND_TOKEN",
",",
"true",
")",
";",
"nbestCost",
"=",
"getInt",
"(",
"args",
",",
"NBEST_COST",
",",
"0",
")",
";",
"nbestExamples",
"=",
"args",
".",
"remove",
"(",
"NBEST_EXAMPLES",
")",
";",
"if",
"(",
"!",
"args",
".",
"isEmpty",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Unknown parameters: \"",
"+",
"args",
")",
";",
"}",
"}"
] |
public JapaneseTokenizerFactory(IDictionary<string, string> args): base(args){Enum.TryParse(Get(args, MODE, JapaneseTokenizer.DEFAULT_MODE.ToString()), true, out mode);userDictionaryPath = Get(args, USER_DICT_PATH);userDictionaryEncoding = Get(args, USER_DICT_ENCODING);discardPunctuation = GetBoolean(args, DISCARD_PUNCTUATION, true);if (args.Count > 0){throw new ArgumentException("Unknown parameters: " + args);}}
|
train
| false
|
808
|
public Long longValue(String key) {String value = responseMap.get(key);if (null == value || 0 == value.length()) {return null;}return Long.valueOf(responseMap.get(key));}
|
[
"public",
"Long",
"longValue",
"(",
"String",
"key",
")",
"{",
"String",
"value",
"=",
"responseMap",
".",
"get",
"(",
"key",
")",
";",
"if",
"(",
"null",
"==",
"value",
"||",
"0",
"==",
"value",
".",
"length",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"return",
"Long",
".",
"valueOf",
"(",
"responseMap",
".",
"get",
"(",
"key",
")",
")",
";",
"}"
] |
public long? LongValue(string key){if (null != DictionaryUtil.Get(ResponseDictionary, key)){return long.Parse(DictionaryUtil.Get(ResponseDictionary, key));}return null;}
|
train
| false
|
809
|
public GetLibraryRequest() {super("CloudPhoto", "2017-07-11", "GetLibrary", "cloudphoto");setProtocol(ProtocolType.HTTPS);}
|
[
"public",
"GetLibraryRequest",
"(",
")",
"{",
"super",
"(",
"\"CloudPhoto\"",
",",
"\"2017-07-11\"",
",",
"\"GetLibrary\"",
",",
"\"cloudphoto\"",
")",
";",
"setProtocol",
"(",
"ProtocolType",
".",
"HTTPS",
")",
";",
"}"
] |
public GetLibraryRequest(): base("CloudPhoto", "2017-07-11", "GetLibrary", "cloudphoto", "openAPI"){Protocol = ProtocolType.HTTPS;}
|
train
| false
|
810
|
public short getFontOfFormattingRun(int index) {FormatRun r = _string.getFormatRun(index);return r.getFontIndex();}
|
[
"public",
"short",
"getFontOfFormattingRun",
"(",
"int",
"index",
")",
"{",
"FormatRun",
"r",
"=",
"_string",
".",
"getFormatRun",
"(",
"index",
")",
";",
"return",
"r",
".",
"getFontIndex",
"(",
")",
";",
"}"
] |
public short GetFontOfFormattingRun(int index){UnicodeString.FormatRun r = _string.GetFormatRun(index);return r.FontIndex;}
|
train
| false
|
811
|
public int fillFields(byte[] data, int offset, EscherRecordFactory recordFactory) {int bytesRemaining = readHeader( data, offset );int pos = offset + 8;int size = 0;field_1_shapeIdMax = LittleEndian.getInt( data, pos + size );size+=4;size+=4;field_3_numShapesSaved = LittleEndian.getInt( data, pos + size );size+=4;field_4_drawingsSaved = LittleEndian.getInt( data, pos + size );size+=4;field_5_fileIdClusters.clear();int numIdClusters = (bytesRemaining-size) / 8;for (int i = 0; i < numIdClusters; i++) {int drawingGroupId = LittleEndian.getInt( data, pos + size );int numShapeIdsUsed = LittleEndian.getInt( data, pos + size + 4 );FileIdCluster fic = new FileIdCluster(drawingGroupId, numShapeIdsUsed);field_5_fileIdClusters.add(fic);maxDgId = Math.max(maxDgId, drawingGroupId);size += 8;}bytesRemaining -= size;if (bytesRemaining != 0) {throw new RecordFormatException("Expecting no remaining data but got " + bytesRemaining + " byte(s).");}return 8 + size;}
|
[
"public",
"int",
"fillFields",
"(",
"byte",
"[",
"]",
"data",
",",
"int",
"offset",
",",
"EscherRecordFactory",
"recordFactory",
")",
"{",
"int",
"bytesRemaining",
"=",
"readHeader",
"(",
"data",
",",
"offset",
")",
";",
"int",
"pos",
"=",
"offset",
"+",
"8",
";",
"int",
"size",
"=",
"0",
";",
"field_1_shapeIdMax",
"=",
"LittleEndian",
".",
"getInt",
"(",
"data",
",",
"pos",
"+",
"size",
")",
";",
"size",
"+=",
"4",
";",
"size",
"+=",
"4",
";",
"field_3_numShapesSaved",
"=",
"LittleEndian",
".",
"getInt",
"(",
"data",
",",
"pos",
"+",
"size",
")",
";",
"size",
"+=",
"4",
";",
"field_4_drawingsSaved",
"=",
"LittleEndian",
".",
"getInt",
"(",
"data",
",",
"pos",
"+",
"size",
")",
";",
"size",
"+=",
"4",
";",
"field_5_fileIdClusters",
".",
"clear",
"(",
")",
";",
"int",
"numIdClusters",
"=",
"(",
"bytesRemaining",
"-",
"size",
")",
"/",
"8",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numIdClusters",
";",
"i",
"++",
")",
"{",
"int",
"drawingGroupId",
"=",
"LittleEndian",
".",
"getInt",
"(",
"data",
",",
"pos",
"+",
"size",
")",
";",
"int",
"numShapeIdsUsed",
"=",
"LittleEndian",
".",
"getInt",
"(",
"data",
",",
"pos",
"+",
"size",
"+",
"4",
")",
";",
"FileIdCluster",
"fic",
"=",
"new",
"FileIdCluster",
"(",
"drawingGroupId",
",",
"numShapeIdsUsed",
")",
";",
"field_5_fileIdClusters",
".",
"add",
"(",
"fic",
")",
";",
"maxDgId",
"=",
"Math",
".",
"max",
"(",
"maxDgId",
",",
"drawingGroupId",
")",
";",
"size",
"+=",
"8",
";",
"}",
"bytesRemaining",
"-=",
"size",
";",
"if",
"(",
"bytesRemaining",
"!=",
"0",
")",
"{",
"throw",
"new",
"RecordFormatException",
"(",
"\"Expecting no remaining data but got \"",
"+",
"bytesRemaining",
"+",
"\" byte(s).\"",
")",
";",
"}",
"return",
"8",
"+",
"size",
";",
"}"
] |
public override int FillFields(byte[] data, int offset, IEscherRecordFactory recordFactory){int bytesRemaining = ReadHeader(data, offset);int pos = offset + 8;int size = 0;field_1_shapeIdMax = LittleEndian.GetInt(data, pos + size); size += 4;int field_2_numIdClusters = LittleEndian.GetInt(data, pos + size); size += 4;field_3_numShapesSaved = LittleEndian.GetInt(data, pos + size); size += 4;field_4_drawingsSaved = LittleEndian.GetInt(data, pos + size); size += 4;field_5_fileIdClusters = new FileIdCluster[(bytesRemaining - size) / 8]; for (int i = 0; i < field_5_fileIdClusters.Length; i++){field_5_fileIdClusters[i] = new FileIdCluster(LittleEndian.GetInt(data, pos + size), LittleEndian.GetInt(data, pos + size + 4));maxDgId = Math.Max(maxDgId, field_5_fileIdClusters[i].DrawingGroupId);size += 8;}bytesRemaining -= size;if (bytesRemaining != 0)throw new RecordFormatException("Expecting no remaining data but got " + bytesRemaining + " byte(s).");return 8 + size + bytesRemaining;}
|
train
| false
|
813
|
public GetTerminologyResult getTerminology(GetTerminologyRequest request) {request = beforeClientExecution(request);return executeGetTerminology(request);}
|
[
"public",
"GetTerminologyResult",
"getTerminology",
"(",
"GetTerminologyRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetTerminology",
"(",
"request",
")",
";",
"}"
] |
public virtual GetTerminologyResponse GetTerminology(GetTerminologyRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetTerminologyRequestMarshaller.Instance;options.ResponseUnmarshaller = GetTerminologyResponseUnmarshaller.Instance;return Invoke<GetTerminologyResponse>(request, options);}
|
train
| true
|
814
|
public void serialize(LittleEndianOutput out) {out.writeShort(_character);out.writeShort(_fontIndex);}
|
[
"public",
"void",
"serialize",
"(",
"LittleEndianOutput",
"out",
")",
"{",
"out",
".",
"writeShort",
"(",
"_character",
")",
";",
"out",
".",
"writeShort",
"(",
"_fontIndex",
")",
";",
"}"
] |
public void Serialize(ILittleEndianOutput out1){out1.WriteShort(_character);out1.WriteShort(_fontIndex);}
|
train
| false
|
815
|
public void serialize(LittleEndianOutput out) {out.writeShort(field_1_options);}
|
[
"public",
"void",
"serialize",
"(",
"LittleEndianOutput",
"out",
")",
"{",
"out",
".",
"writeShort",
"(",
"field_1_options",
")",
";",
"}"
] |
public override void Serialize(ILittleEndianOutput out1){out1.WriteShort(field_1_options);}
|
train
| false
|
816
|
public SearchFacesResult searchFaces(SearchFacesRequest request) {request = beforeClientExecution(request);return executeSearchFaces(request);}
|
[
"public",
"SearchFacesResult",
"searchFaces",
"(",
"SearchFacesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeSearchFaces",
"(",
"request",
")",
";",
"}"
] |
public virtual SearchFacesResponse SearchFaces(SearchFacesRequest request){var options = new InvokeOptions();options.RequestMarshaller = SearchFacesRequestMarshaller.Instance;options.ResponseUnmarshaller = SearchFacesResponseUnmarshaller.Instance;return Invoke<SearchFacesResponse>(request, options);}
|
train
| true
|
817
|
public int getPositionIncrementGap(String fieldName) {return getWrappedAnalyzer(fieldName).getPositionIncrementGap(fieldName);}
|
[
"public",
"int",
"getPositionIncrementGap",
"(",
"String",
"fieldName",
")",
"{",
"return",
"getWrappedAnalyzer",
"(",
"fieldName",
")",
".",
"getPositionIncrementGap",
"(",
"fieldName",
")",
";",
"}"
] |
public override int GetPositionIncrementGap(string fieldName){return GetWrappedAnalyzer(fieldName).GetPositionIncrementGap(fieldName);}
|
train
| false
|
818
|
public DescribeSchemaResult describeSchema(DescribeSchemaRequest request) {request = beforeClientExecution(request);return executeDescribeSchema(request);}
|
[
"public",
"DescribeSchemaResult",
"describeSchema",
"(",
"DescribeSchemaRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeSchema",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeSchemaResponse DescribeSchema(DescribeSchemaRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeSchemaRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeSchemaResponseUnmarshaller.Instance;return Invoke<DescribeSchemaResponse>(request, options);}
|
train
| false
|
819
|
@Override public int size() {return BoundedMap.this.size();}
|
[
"@",
"Override",
"public",
"int",
"size",
"(",
")",
"{",
"return",
"BoundedMap",
".",
"this",
".",
"size",
"(",
")",
";",
"}"
] |
public override int size(){return this._enclosing.size();}
|
train
| false
|
820
|
public MutableEntry cloneEntry() {final MutableEntry r = new MutableEntry();ensureId();r.idBuffer.fromObjectId(idBuffer);r.offset = offset;return r;}
|
[
"public",
"MutableEntry",
"cloneEntry",
"(",
")",
"{",
"final",
"MutableEntry",
"r",
"=",
"new",
"MutableEntry",
"(",
")",
";",
"ensureId",
"(",
")",
";",
"r",
".",
"idBuffer",
".",
"fromObjectId",
"(",
"idBuffer",
")",
";",
"r",
".",
"offset",
"=",
"offset",
";",
"return",
"r",
";",
"}"
] |
public virtual PackIndex.MutableEntry CloneEntry(){PackIndex.MutableEntry r = new PackIndex.MutableEntry();EnsureId();r.idBuffer.FromObjectId(idBuffer);r.offset = offset;return r;}
|
train
| false
|
821
|
public OperateEquipmentRequest() {super("industry-brain", "2018-07-12", "OperateEquipment");setProtocol(ProtocolType.HTTPS);setMethod(MethodType.POST);}
|
[
"public",
"OperateEquipmentRequest",
"(",
")",
"{",
"super",
"(",
"\"industry-brain\"",
",",
"\"2018-07-12\"",
",",
"\"OperateEquipment\"",
")",
";",
"setProtocol",
"(",
"ProtocolType",
".",
"HTTPS",
")",
";",
"setMethod",
"(",
"MethodType",
".",
"POST",
")",
";",
"}"
] |
public OperateEquipmentRequest(): base("industry-brain", "2018-07-12", "OperateEquipment"){Protocol = ProtocolType.HTTPS;Method = MethodType.POST;}
|
train
| false
|
822
|
public boolean add(E e) {synchronized (mutex) {return delegate().add(e);}}
|
[
"public",
"boolean",
"add",
"(",
"E",
"e",
")",
"{",
"synchronized",
"(",
"mutex",
")",
"{",
"return",
"delegate",
"(",
")",
".",
"add",
"(",
"e",
")",
";",
"}",
"}"
] |
public virtual bool add(E @object){lock (mutex){return c.add(@object);}}
|
train
| false
|
823
|
public boolean equals( Object o ){if ( this == o ) {return true;}if ( !( o instanceof EscherSimpleProperty ) ) {return false;}final EscherSimpleProperty escherSimpleProperty = (EscherSimpleProperty) o;if ( propertyValue != escherSimpleProperty.propertyValue ) {return false;}if ( getId() != escherSimpleProperty.getId() ) {return false;}return true;}
|
[
"public",
"boolean",
"equals",
"(",
"Object",
"o",
")",
"{",
"if",
"(",
"this",
"==",
"o",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"!",
"(",
"o",
"instanceof",
"EscherSimpleProperty",
")",
")",
"{",
"return",
"false",
";",
"}",
"final",
"EscherSimpleProperty",
"escherSimpleProperty",
"=",
"(",
"EscherSimpleProperty",
")",
"o",
";",
"if",
"(",
"propertyValue",
"!=",
"escherSimpleProperty",
".",
"propertyValue",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"getId",
"(",
")",
"!=",
"escherSimpleProperty",
".",
"getId",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"return",
"true",
";",
"}"
] |
public override bool Equals(Object o){if (this == o) return true;if (!(o is EscherSimpleProperty)) return false;EscherSimpleProperty escherSimpleProperty = (EscherSimpleProperty)o;if (propertyValue != escherSimpleProperty.propertyValue) return false;if (Id != escherSimpleProperty.Id) return false;return true;}
|
train
| false
|
824
|
public final FloatBuffer asFloatBuffer() {return FloatToByteBufferAdapter.asFloatBuffer(this);}
|
[
"public",
"final",
"FloatBuffer",
"asFloatBuffer",
"(",
")",
"{",
"return",
"FloatToByteBufferAdapter",
".",
"asFloatBuffer",
"(",
"this",
")",
";",
"}"
] |
public sealed override java.nio.FloatBuffer asFloatBuffer(){return java.nio.FloatToByteBufferAdapter.asFloatBuffer(this);}
|
train
| false
|
825
|
public void removeThumbnail() {remove1stProperty(PropertyIDMap.PID_THUMBNAIL);}
|
[
"public",
"void",
"removeThumbnail",
"(",
")",
"{",
"remove1stProperty",
"(",
"PropertyIDMap",
".",
"PID_THUMBNAIL",
")",
";",
"}"
] |
public void RemoveThumbnail(){MutableSection s = (MutableSection)FirstSection;s.RemoveProperty(PropertyIDMap.PID_THUMBNAIL);}
|
train
| false
|
826
|
public static int compareIgnoreCase(String a, String b) {for (int i = 0; i < a.length() && i < b.length(); i++) {int d = toLowerCase(a.charAt(i)) - toLowerCase(b.charAt(i));if (d != 0)return d;}return a.length() - b.length();}
|
[
"public",
"static",
"int",
"compareIgnoreCase",
"(",
"String",
"a",
",",
"String",
"b",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"a",
".",
"length",
"(",
")",
"&&",
"i",
"<",
"b",
".",
"length",
"(",
")",
";",
"i",
"++",
")",
"{",
"int",
"d",
"=",
"toLowerCase",
"(",
"a",
".",
"charAt",
"(",
"i",
")",
")",
"-",
"toLowerCase",
"(",
"b",
".",
"charAt",
"(",
"i",
")",
")",
";",
"if",
"(",
"d",
"!=",
"0",
")",
"return",
"d",
";",
"}",
"return",
"a",
".",
"length",
"(",
")",
"-",
"b",
".",
"length",
"(",
")",
";",
"}"
] |
public static int CompareIgnoreCase(string a, string b){for (int i = 0; i < a.Length && i < b.Length; i++){int d = ToLowerCase(a[i]) - ToLowerCase(b[i]);if (d != 0){return d;}}return a.Length - b.Length;}
|
train
| false
|
827
|
public ViewDefinitionRecord(RecordInputStream in) {rwFirst = in.readUShort();rwLast = in.readUShort();colFirst = in.readUShort();colLast = in.readUShort();rwFirstHead = in.readUShort();rwFirstData = in.readUShort();colFirstData = in.readUShort();iCache = in.readUShort();reserved = in.readUShort();sxaxis4Data = in.readUShort();ipos4Data = in.readUShort();cDim = in.readUShort();cDimRw = in.readUShort();cDimCol = in.readUShort();cDimPg = in.readUShort();cDimData = in.readUShort();cRw = in.readUShort();cCol = in.readUShort();grbit = in.readUShort();itblAutoFmt = in.readUShort();int cchName = in.readUShort();int cchData = in.readUShort();name = StringUtil.readUnicodeString(in, cchName);dataField = StringUtil.readUnicodeString(in, cchData);}
|
[
"public",
"ViewDefinitionRecord",
"(",
"RecordInputStream",
"in",
")",
"{",
"rwFirst",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"rwLast",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"colFirst",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"colLast",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"rwFirstHead",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"rwFirstData",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"colFirstData",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"iCache",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"reserved",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"sxaxis4Data",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"ipos4Data",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"cDim",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"cDimRw",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"cDimCol",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"cDimPg",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"cDimData",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"cRw",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"cCol",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"grbit",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"itblAutoFmt",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"int",
"cchName",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"int",
"cchData",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"name",
"=",
"StringUtil",
".",
"readUnicodeString",
"(",
"in",
",",
"cchName",
")",
";",
"dataField",
"=",
"StringUtil",
".",
"readUnicodeString",
"(",
"in",
",",
"cchData",
")",
";",
"}"
] |
public ViewDefinitionRecord(RecordInputStream in1){rwFirst = in1.ReadUShort();rwLast = in1.ReadUShort();colFirst = in1.ReadUShort();colLast = in1.ReadUShort();rwFirstHead = in1.ReadUShort();rwFirstData = in1.ReadUShort();colFirstData = in1.ReadUShort();iCache = in1.ReadUShort();reserved = in1.ReadUShort();sxaxis4Data = in1.ReadUShort();ipos4Data = in1.ReadUShort();cDim = in1.ReadUShort();cDimRw = in1.ReadUShort();cDimCol = in1.ReadUShort();cDimPg = in1.ReadUShort();cDimData = in1.ReadUShort();cRw = in1.ReadUShort();cCol = in1.ReadUShort();grbit = in1.ReadUShort();itblAutoFmt = in1.ReadUShort();int cchName = in1.ReadUShort();int cchData = in1.ReadUShort();name = StringUtil.ReadUnicodeString(in1, cchName);dataField = StringUtil.ReadUnicodeString(in1, cchData);}
|
train
| false
|
828
|
public FormatRecord(RecordInputStream in) {field_1_index_code = in.readShort();int field_3_unicode_len = in.readUShort();field_3_hasMultibyte = (in.readByte() & 0x01) != 0;if (field_3_hasMultibyte) {field_4_formatstring = readStringCommon(in, field_3_unicode_len, false);} else {field_4_formatstring = readStringCommon(in, field_3_unicode_len, true);}}
|
[
"public",
"FormatRecord",
"(",
"RecordInputStream",
"in",
")",
"{",
"field_1_index_code",
"=",
"in",
".",
"readShort",
"(",
")",
";",
"int",
"field_3_unicode_len",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"field_3_hasMultibyte",
"=",
"(",
"in",
".",
"readByte",
"(",
")",
"&",
"0x01",
")",
"!=",
"0",
";",
"if",
"(",
"field_3_hasMultibyte",
")",
"{",
"field_4_formatstring",
"=",
"readStringCommon",
"(",
"in",
",",
"field_3_unicode_len",
",",
"false",
")",
";",
"}",
"else",
"{",
"field_4_formatstring",
"=",
"readStringCommon",
"(",
"in",
",",
"field_3_unicode_len",
",",
"true",
")",
";",
"}",
"}"
] |
public FormatRecord(RecordInputStream in1){field_1_index_code = in1.ReadShort();int field_3_unicode_len = in1.ReadShort();field_3_hasMultibyte = (in1.ReadByte() & (byte)0x01) != 0;if (field_3_hasMultibyte){field_4_formatstring = in1.ReadUnicodeLEString(field_3_unicode_len);}else{field_4_formatstring = in1.ReadCompressedUnicode(field_3_unicode_len);}}
|
train
| false
|
829
|
public DescribeBrokerResult describeBroker(DescribeBrokerRequest request) {request = beforeClientExecution(request);return executeDescribeBroker(request);}
|
[
"public",
"DescribeBrokerResult",
"describeBroker",
"(",
"DescribeBrokerRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeBroker",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeBrokerResponse DescribeBroker(DescribeBrokerRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeBrokerRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeBrokerResponseUnmarshaller.Instance;return Invoke<DescribeBrokerResponse>(request, options);}
|
train
| true
|
830
|
public void reset() {if ( getInputStream()!=null ) getInputStream().seek(0);_errHandler.reset(this);_ctx = null;_syntaxErrors = 0;matchedEOF = false;setTrace(false);_precedenceStack.clear();_precedenceStack.push(0);ATNSimulator interpreter = getInterpreter();if (interpreter != null) {interpreter.reset();}}
|
[
"public",
"void",
"reset",
"(",
")",
"{",
"if",
"(",
"getInputStream",
"(",
")",
"!=",
"null",
")",
"getInputStream",
"(",
")",
".",
"seek",
"(",
"0",
")",
";",
"_errHandler",
".",
"reset",
"(",
"this",
")",
";",
"_ctx",
"=",
"null",
";",
"_syntaxErrors",
"=",
"0",
";",
"matchedEOF",
"=",
"false",
";",
"setTrace",
"(",
"false",
")",
";",
"_precedenceStack",
".",
"clear",
"(",
")",
";",
"_precedenceStack",
".",
"push",
"(",
"0",
")",
";",
"ATNSimulator",
"interpreter",
"=",
"getInterpreter",
"(",
")",
";",
"if",
"(",
"interpreter",
"!=",
"null",
")",
"{",
"interpreter",
".",
"reset",
"(",
")",
";",
"}",
"}"
] |
public virtual void Reset(){if (((ITokenStream)InputStream) != null){((ITokenStream)InputStream).Seek(0);}_errHandler.Reset(this);_ctx = null;_syntaxErrors = 0;_precedenceStack.Clear();_precedenceStack.Add(0);ATNSimulator interpreter = Interpreter;if (interpreter != null){interpreter.Reset();}}
|
train
| false
|
831
|
public boolean remove(Object o) {final RevFlag flag = (RevFlag) o;if ((mask & flag.mask) == 0)return false;mask &= ~flag.mask;for (int i = 0; i < active.size(); i++)if (active.get(i).mask == flag.mask)active.remove(i);return true;}
|
[
"public",
"boolean",
"remove",
"(",
"Object",
"o",
")",
"{",
"final",
"RevFlag",
"flag",
"=",
"(",
"RevFlag",
")",
"o",
";",
"if",
"(",
"(",
"mask",
"&",
"flag",
".",
"mask",
")",
"==",
"0",
")",
"return",
"false",
";",
"mask",
"&=",
"~",
"flag",
".",
"mask",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"active",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"if",
"(",
"active",
".",
"get",
"(",
"i",
")",
".",
"mask",
"==",
"flag",
".",
"mask",
")",
"active",
".",
"remove",
"(",
"i",
")",
";",
"return",
"true",
";",
"}"
] |
public override bool Remove(object o){RevFlag flag = (RevFlag)o;if ((mask & flag.mask) == 0){return false;}mask &= ~flag.mask;for (int i = 0; i < active.Count; i++){if (active[i].mask == flag.mask){active.Remove(i);}}return true;}
|
train
| false
|
832
|
public String format(Passage passages[], String content) {StringBuilder sb = new StringBuilder();int pos = 0;for (Passage passage : passages) {if (passage.getStartOffset() > pos && pos > 0) {sb.append(ellipsis);}pos = passage.getStartOffset();for (int i = 0; i < passage.getNumMatches(); i++) {int start = passage.getMatchStarts()[i];assert start >= pos && start < passage.getEndOffset();append(sb, content, pos, start);int end = passage.getMatchEnds()[i];assert end > start;while (i + 1 < passage.getNumMatches() && passage.getMatchStarts()[i+1] < end) {end = passage.getMatchEnds()[++i];}end = Math.min(end, passage.getEndOffset()); sb.append(preTag);append(sb, content, start, end);sb.append(postTag);pos = end;}append(sb, content, pos, Math.max(pos, passage.getEndOffset()));pos = passage.getEndOffset();}return sb.toString();}
|
[
"public",
"String",
"format",
"(",
"Passage",
"passages",
"[",
"]",
",",
"String",
"content",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"int",
"pos",
"=",
"0",
";",
"for",
"(",
"Passage",
"passage",
":",
"passages",
")",
"{",
"if",
"(",
"passage",
".",
"getStartOffset",
"(",
")",
">",
"pos",
"&&",
"pos",
">",
"0",
")",
"{",
"sb",
".",
"append",
"(",
"ellipsis",
")",
";",
"}",
"pos",
"=",
"passage",
".",
"getStartOffset",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"passage",
".",
"getNumMatches",
"(",
")",
";",
"i",
"++",
")",
"{",
"int",
"start",
"=",
"passage",
".",
"getMatchStarts",
"(",
")",
"[",
"i",
"]",
";",
"assert",
"start",
">=",
"pos",
"&&",
"start",
"<",
"passage",
".",
"getEndOffset",
"(",
")",
";",
"append",
"(",
"sb",
",",
"content",
",",
"pos",
",",
"start",
")",
";",
"int",
"end",
"=",
"passage",
".",
"getMatchEnds",
"(",
")",
"[",
"i",
"]",
";",
"assert",
"end",
">",
"start",
";",
"while",
"(",
"i",
"+",
"1",
"<",
"passage",
".",
"getNumMatches",
"(",
")",
"&&",
"passage",
".",
"getMatchStarts",
"(",
")",
"[",
"i",
"+",
"1",
"]",
"<",
"end",
")",
"{",
"end",
"=",
"passage",
".",
"getMatchEnds",
"(",
")",
"[",
"++",
"i",
"]",
";",
"}",
"end",
"=",
"Math",
".",
"min",
"(",
"end",
",",
"passage",
".",
"getEndOffset",
"(",
")",
")",
";",
"sb",
".",
"append",
"(",
"preTag",
")",
";",
"append",
"(",
"sb",
",",
"content",
",",
"start",
",",
"end",
")",
";",
"sb",
".",
"append",
"(",
"postTag",
")",
";",
"pos",
"=",
"end",
";",
"}",
"append",
"(",
"sb",
",",
"content",
",",
"pos",
",",
"Math",
".",
"max",
"(",
"pos",
",",
"passage",
".",
"getEndOffset",
"(",
")",
")",
")",
";",
"pos",
"=",
"passage",
".",
"getEndOffset",
"(",
")",
";",
"}",
"return",
"sb",
".",
"toString",
"(",
")",
";",
"}"
] |
public override object Format(Passage[] passages, string content){StringBuilder sb = new StringBuilder();int pos = 0;foreach (Passage passage in passages){if (passage.startOffset > pos && pos > 0){sb.Append(m_ellipsis);}pos = passage.startOffset;for (int i = 0; i < passage.numMatches; i++){int start = passage.matchStarts[i];int end = passage.matchEnds[i];if (start > pos){Append(sb, content, pos, start);}if (end > pos){sb.Append(m_preTag);Append(sb, content, Math.Max(pos, start), end);sb.Append(m_postTag);pos = end;}}Append(sb, content, pos, Math.Max(pos, passage.endOffset));pos = passage.endOffset;}return sb.ToString();}
|
train
| false
|
833
|
public DrillSidewaysResult(Facets facets, TopDocs hits) {this.facets = facets;this.hits = hits;}
|
[
"public",
"DrillSidewaysResult",
"(",
"Facets",
"facets",
",",
"TopDocs",
"hits",
")",
"{",
"this",
".",
"facets",
"=",
"facets",
";",
"this",
".",
"hits",
"=",
"hits",
";",
"}"
] |
public DrillSidewaysResult(Facets facets, TopDocs hits){this.Facets = facets;this.Hits = hits;}
|
train
| false
|
834
|
public ListTrafficPolicyInstancesByPolicyResult listTrafficPolicyInstancesByPolicy(ListTrafficPolicyInstancesByPolicyRequest request) {request = beforeClientExecution(request);return executeListTrafficPolicyInstancesByPolicy(request);}
|
[
"public",
"ListTrafficPolicyInstancesByPolicyResult",
"listTrafficPolicyInstancesByPolicy",
"(",
"ListTrafficPolicyInstancesByPolicyRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListTrafficPolicyInstancesByPolicy",
"(",
"request",
")",
";",
"}"
] |
public virtual ListTrafficPolicyInstancesByPolicyResponse ListTrafficPolicyInstancesByPolicy(ListTrafficPolicyInstancesByPolicyRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListTrafficPolicyInstancesByPolicyRequestMarshaller.Instance;options.ResponseUnmarshaller = ListTrafficPolicyInstancesByPolicyResponseUnmarshaller.Instance;return Invoke<ListTrafficPolicyInstancesByPolicyResponse>(request, options);}
|
train
| true
|
835
|
public ComplexPhraseQuery(String field, String phrasedQueryStringContents,int slopFactor, boolean inOrder) {this.field = Objects.requireNonNull(field);this.phrasedQueryStringContents = Objects.requireNonNull(phrasedQueryStringContents);this.slopFactor = slopFactor;this.inOrder = inOrder;}
|
[
"public",
"ComplexPhraseQuery",
"(",
"String",
"field",
",",
"String",
"phrasedQueryStringContents",
",",
"int",
"slopFactor",
",",
"boolean",
"inOrder",
")",
"{",
"this",
".",
"field",
"=",
"Objects",
".",
"requireNonNull",
"(",
"field",
")",
";",
"this",
".",
"phrasedQueryStringContents",
"=",
"Objects",
".",
"requireNonNull",
"(",
"phrasedQueryStringContents",
")",
";",
"this",
".",
"slopFactor",
"=",
"slopFactor",
";",
"this",
".",
"inOrder",
"=",
"inOrder",
";",
"}"
] |
public ComplexPhraseQuery(string field, string phrasedQueryStringContents,int slopFactor, bool inOrder){this.field = field;this.phrasedQueryStringContents = phrasedQueryStringContents;this.slopFactor = slopFactor;this.inOrder = inOrder;}
|
train
| false
|
836
|
public String toString(String field) {StringBuilder buffer = new StringBuilder();if (!term.field().equals(field)) {buffer.append(term.field());buffer.append(":");}buffer.append(getClass().getSimpleName());buffer.append(" {");buffer.append('\n');buffer.append(automaton.toString());buffer.append("}");return buffer.toString();}
|
[
"public",
"String",
"toString",
"(",
"String",
"field",
")",
"{",
"StringBuilder",
"buffer",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"if",
"(",
"!",
"term",
".",
"field",
"(",
")",
".",
"equals",
"(",
"field",
")",
")",
"{",
"buffer",
".",
"append",
"(",
"term",
".",
"field",
"(",
")",
")",
";",
"buffer",
".",
"append",
"(",
"\":\"",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"getClass",
"(",
")",
".",
"getSimpleName",
"(",
")",
")",
";",
"buffer",
".",
"append",
"(",
"\" {\"",
")",
";",
"buffer",
".",
"append",
"(",
"'\\n'",
")",
";",
"buffer",
".",
"append",
"(",
"automaton",
".",
"toString",
"(",
")",
")",
";",
"buffer",
".",
"append",
"(",
"\"}\"",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}"
] |
public override string ToString(string field){StringBuilder buffer = new StringBuilder();if (!m_term.Field.Equals(field, StringComparison.Ordinal)){buffer.Append(m_term.Field);buffer.Append(":");}buffer.Append(this.GetType().Name);buffer.Append(" {");buffer.Append('\n');buffer.Append(m_automaton.ToString());buffer.Append("}");buffer.Append(ToStringUtils.Boost(Boost));return buffer.ToString();}
|
train
| false
|
837
|
public final String toFormulaString() {return getName();}
|
[
"public",
"final",
"String",
"toFormulaString",
"(",
")",
"{",
"return",
"getName",
"(",
")",
";",
"}"
] |
public override String ToFormulaString(){return Name;}
|
train
| false
|
838
|
public AreaRecord clone() {return copy();}
|
[
"public",
"AreaRecord",
"clone",
"(",
")",
"{",
"return",
"copy",
"(",
")",
";",
"}"
] |
public override Object Clone(){AreaRecord rec = new AreaRecord();rec.field_1_formatFlags = field_1_formatFlags;return rec;}
|
train
| false
|
840
|
public DeleteConfigurationTemplateRequest(String applicationName, String templateName) {setApplicationName(applicationName);setTemplateName(templateName);}
|
[
"public",
"DeleteConfigurationTemplateRequest",
"(",
"String",
"applicationName",
",",
"String",
"templateName",
")",
"{",
"setApplicationName",
"(",
"applicationName",
")",
";",
"setTemplateName",
"(",
"templateName",
")",
";",
"}"
] |
public DeleteConfigurationTemplateRequest(string applicationName, string templateName){_applicationName = applicationName;_templateName = templateName;}
|
train
| false
|
841
|
public List<Token> getTokens(int start, int stop, int ttype) {HashSet<Integer> s = new HashSet<Integer>(ttype);s.add(ttype);return getTokens(start,stop, s);}
|
[
"public",
"List",
"<",
"Token",
">",
"getTokens",
"(",
"int",
"start",
",",
"int",
"stop",
",",
"int",
"ttype",
")",
"{",
"HashSet",
"<",
"Integer",
">",
"s",
"=",
"new",
"HashSet",
"<",
"Integer",
">",
"(",
"ttype",
")",
";",
"s",
".",
"add",
"(",
"ttype",
")",
";",
"return",
"getTokens",
"(",
"start",
",",
"stop",
",",
"s",
")",
";",
"}"
] |
public virtual IList<IToken> GetTokens(int start, int stop, int ttype){BitSet s = new BitSet(ttype);s.Set(ttype);return GetTokens(start, stop, s);}
|
train
| false
|
842
|
public DescribeIamInstanceProfileAssociationsResult describeIamInstanceProfileAssociations(DescribeIamInstanceProfileAssociationsRequest request) {request = beforeClientExecution(request);return executeDescribeIamInstanceProfileAssociations(request);}
|
[
"public",
"DescribeIamInstanceProfileAssociationsResult",
"describeIamInstanceProfileAssociations",
"(",
"DescribeIamInstanceProfileAssociationsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeIamInstanceProfileAssociations",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeIamInstanceProfileAssociationsResponse DescribeIamInstanceProfileAssociations(DescribeIamInstanceProfileAssociationsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeIamInstanceProfileAssociationsRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeIamInstanceProfileAssociationsResponseUnmarshaller.Instance;return Invoke<DescribeIamInstanceProfileAssociationsResponse>(request, options);}
|
train
| true
|
843
|
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval textArg) {ValueEval veText1;try {veText1 = OperandResolver.getSingleValue(textArg, srcRowIndex, srcColumnIndex);} catch (EvaluationException e) {return e.getErrorEval();}String text = OperandResolver.coerceValueToString(veText1);if (text.length() == 0) {return ErrorEval.VALUE_INVALID;}int code = text.charAt(0);return new StringEval(String.valueOf(code));}
|
[
"public",
"ValueEval",
"evaluate",
"(",
"int",
"srcRowIndex",
",",
"int",
"srcColumnIndex",
",",
"ValueEval",
"textArg",
")",
"{",
"ValueEval",
"veText1",
";",
"try",
"{",
"veText1",
"=",
"OperandResolver",
".",
"getSingleValue",
"(",
"textArg",
",",
"srcRowIndex",
",",
"srcColumnIndex",
")",
";",
"}",
"catch",
"(",
"EvaluationException",
"e",
")",
"{",
"return",
"e",
".",
"getErrorEval",
"(",
")",
";",
"}",
"String",
"text",
"=",
"OperandResolver",
".",
"coerceValueToString",
"(",
"veText1",
")",
";",
"if",
"(",
"text",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"return",
"ErrorEval",
".",
"VALUE_INVALID",
";",
"}",
"int",
"code",
"=",
"text",
".",
"charAt",
"(",
"0",
")",
";",
"return",
"new",
"StringEval",
"(",
"String",
".",
"valueOf",
"(",
"code",
")",
")",
";",
"}"
] |
public override ValueEval Evaluate(int srcRowIndex, int srcColumnIndex, ValueEval textArg){ValueEval veText1;try{veText1 = OperandResolver.GetSingleValue(textArg, srcRowIndex, srcColumnIndex);}catch (EvaluationException e){return e.GetErrorEval();}String text = OperandResolver.CoerceValueToString(veText1);if (text.Length == 0){return ErrorEval.VALUE_INVALID;}int code = (int)text[0];return new StringEval(code.ToString());}
|
train
| false
|
844
|
public AttachVpnGatewayResult attachVpnGateway(AttachVpnGatewayRequest request) {request = beforeClientExecution(request);return executeAttachVpnGateway(request);}
|
[
"public",
"AttachVpnGatewayResult",
"attachVpnGateway",
"(",
"AttachVpnGatewayRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeAttachVpnGateway",
"(",
"request",
")",
";",
"}"
] |
public virtual AttachVpnGatewayResponse AttachVpnGateway(AttachVpnGatewayRequest request){var options = new InvokeOptions();options.RequestMarshaller = AttachVpnGatewayRequestMarshaller.Instance;options.ResponseUnmarshaller = AttachVpnGatewayResponseUnmarshaller.Instance;return Invoke<AttachVpnGatewayResponse>(request, options);}
|
train
| true
|
845
|
public int compareTo(FloatBuffer otherBuffer) {int compareRemaining = (remaining() < otherBuffer.remaining()) ? remaining(): otherBuffer.remaining();int thisPos = position;int otherPos = otherBuffer.position;float thisFloat, otherFloat;while (compareRemaining > 0) {thisFloat = get(thisPos);otherFloat = otherBuffer.get(otherPos);if ((thisFloat != otherFloat)&& ((thisFloat == thisFloat) || (otherFloat == otherFloat))) {return thisFloat < otherFloat ? -1 : 1;}thisPos++;otherPos++;compareRemaining--;}return remaining() - otherBuffer.remaining();}
|
[
"public",
"int",
"compareTo",
"(",
"FloatBuffer",
"otherBuffer",
")",
"{",
"int",
"compareRemaining",
"=",
"(",
"remaining",
"(",
")",
"<",
"otherBuffer",
".",
"remaining",
"(",
")",
")",
"?",
"remaining",
"(",
")",
":",
"otherBuffer",
".",
"remaining",
"(",
")",
";",
"int",
"thisPos",
"=",
"position",
";",
"int",
"otherPos",
"=",
"otherBuffer",
".",
"position",
";",
"float",
"thisFloat",
",",
"otherFloat",
";",
"while",
"(",
"compareRemaining",
">",
"0",
")",
"{",
"thisFloat",
"=",
"get",
"(",
"thisPos",
")",
";",
"otherFloat",
"=",
"otherBuffer",
".",
"get",
"(",
"otherPos",
")",
";",
"if",
"(",
"(",
"thisFloat",
"!=",
"otherFloat",
")",
"&&",
"(",
"(",
"thisFloat",
"==",
"thisFloat",
")",
"||",
"(",
"otherFloat",
"==",
"otherFloat",
")",
")",
")",
"{",
"return",
"thisFloat",
"<",
"otherFloat",
"?",
"-",
"1",
":",
"1",
";",
"}",
"thisPos",
"++",
";",
"otherPos",
"++",
";",
"compareRemaining",
"--",
";",
"}",
"return",
"remaining",
"(",
")",
"-",
"otherBuffer",
".",
"remaining",
"(",
")",
";",
"}"
] |
public virtual int compareTo(java.nio.FloatBuffer otherBuffer){int compareRemaining = (remaining() < otherBuffer.remaining()) ? remaining() : otherBuffer.remaining();int thisPos = _position;int otherPos = otherBuffer._position;float thisFloat;float otherFloat;while (compareRemaining > 0){thisFloat = get(thisPos);otherFloat = otherBuffer.get(otherPos);if ((thisFloat != otherFloat) && ((thisFloat == thisFloat) || (otherFloat == otherFloat))){return thisFloat < otherFloat ? -1 : 1;}thisPos++;otherPos++;compareRemaining--;}return remaining() - otherBuffer.remaining();}
|
train
| true
|
846
|
public Matcher useTransparentBounds(boolean value) {transparentBounds = value;useTransparentBoundsImpl(address, value);return this;}
|
[
"public",
"Matcher",
"useTransparentBounds",
"(",
"boolean",
"value",
")",
"{",
"transparentBounds",
"=",
"value",
";",
"useTransparentBoundsImpl",
"(",
"address",
",",
"value",
")",
";",
"return",
"this",
";",
"}"
] |
public java.util.regex.Matcher useTransparentBounds(bool value){transparentBounds = value;useTransparentBoundsImpl(address, value);return this;}
|
train
| false
|
848
|
public String toFormulaString() {StringBuilder sb = new StringBuilder(64);if (externalWorkbookNumber >= 0) {sb.append('[');sb.append(externalWorkbookNumber);sb.append(']');}if (sheetName != null) {SheetNameFormatter.appendFormat(sb, sheetName);}sb.append('!');sb.append(FormulaError.REF.getString());return sb.toString();}
|
[
"public",
"String",
"toFormulaString",
"(",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
"64",
")",
";",
"if",
"(",
"externalWorkbookNumber",
">=",
"0",
")",
"{",
"sb",
".",
"append",
"(",
"'['",
")",
";",
"sb",
".",
"append",
"(",
"externalWorkbookNumber",
")",
";",
"sb",
".",
"append",
"(",
"']'",
")",
";",
"}",
"if",
"(",
"sheetName",
"!=",
"null",
")",
"{",
"SheetNameFormatter",
".",
"appendFormat",
"(",
"sb",
",",
"sheetName",
")",
";",
"}",
"sb",
".",
"append",
"(",
"'!'",
")",
";",
"sb",
".",
"append",
"(",
"FormulaError",
".",
"REF",
".",
"getString",
"(",
")",
")",
";",
"return",
"sb",
".",
"toString",
"(",
")",
";",
"}"
] |
public override String ToFormulaString(){StringBuilder sb = new StringBuilder();if (externalWorkbookNumber >= 0){sb.Append('[');sb.Append(externalWorkbookNumber);sb.Append(']');}if (sheetName != null){sb.Append(sheetName);}sb.Append('!');sb.Append(ErrorConstants.GetText(ErrorConstants.ERROR_REF));return sb.ToString();}
|
train
| false
|
850
|
public CreateVpnConnectionRouteResult createVpnConnectionRoute(CreateVpnConnectionRouteRequest request) {request = beforeClientExecution(request);return executeCreateVpnConnectionRoute(request);}
|
[
"public",
"CreateVpnConnectionRouteResult",
"createVpnConnectionRoute",
"(",
"CreateVpnConnectionRouteRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCreateVpnConnectionRoute",
"(",
"request",
")",
";",
"}"
] |
public virtual CreateVpnConnectionRouteResponse CreateVpnConnectionRoute(CreateVpnConnectionRouteRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateVpnConnectionRouteRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateVpnConnectionRouteResponseUnmarshaller.Instance;return Invoke<CreateVpnConnectionRouteResponse>(request, options);}
|
train
| true
|
851
|
public boolean hasNext() {return next != null;}
|
[
"public",
"boolean",
"hasNext",
"(",
")",
"{",
"return",
"next",
"!=",
"null",
";",
"}"
] |
public virtual bool hasNext(){return this._next != null;}
|
train
| false
|
852
|
public DeleteDBSecurityGroupRequest(String dBSecurityGroupName) {setDBSecurityGroupName(dBSecurityGroupName);}
|
[
"public",
"DeleteDBSecurityGroupRequest",
"(",
"String",
"dBSecurityGroupName",
")",
"{",
"setDBSecurityGroupName",
"(",
"dBSecurityGroupName",
")",
";",
"}"
] |
public DeleteDBSecurityGroupRequest(string dbSecurityGroupName){_dbSecurityGroupName = dbSecurityGroupName;}
|
train
| false
|
853
|
public int compare(Property o1, Property o2){String VBA_PROJECT = "_VBA_PROJECT";String name1 = o1.getName();String name2 = o2.getName();int result = name1.length() - name2.length();if (result == 0){if (name1.compareTo(VBA_PROJECT) == 0)result = 1;else if (name2.compareTo(VBA_PROJECT) == 0)result = -1;else{if (name1.startsWith("__") && name2.startsWith("__")){result = name1.compareToIgnoreCase(name2);}else if (name1.startsWith("__")){result = 1;}else if (name2.startsWith("__")){result = -1;}elseresult = name1.compareToIgnoreCase(name2);}}return result;}
|
[
"public",
"int",
"compare",
"(",
"Property",
"o1",
",",
"Property",
"o2",
")",
"{",
"String",
"VBA_PROJECT",
"=",
"\"_VBA_PROJECT\"",
";",
"String",
"name1",
"=",
"o1",
".",
"getName",
"(",
")",
";",
"String",
"name2",
"=",
"o2",
".",
"getName",
"(",
")",
";",
"int",
"result",
"=",
"name1",
".",
"length",
"(",
")",
"-",
"name2",
".",
"length",
"(",
")",
";",
"if",
"(",
"result",
"==",
"0",
")",
"{",
"if",
"(",
"name1",
".",
"compareTo",
"(",
"VBA_PROJECT",
")",
"==",
"0",
")",
"result",
"=",
"1",
";",
"else",
"if",
"(",
"name2",
".",
"compareTo",
"(",
"VBA_PROJECT",
")",
"==",
"0",
")",
"result",
"=",
"-",
"1",
";",
"else",
"{",
"if",
"(",
"name1",
".",
"startsWith",
"(",
"\"__\"",
")",
"&&",
"name2",
".",
"startsWith",
"(",
"\"__\"",
")",
")",
"{",
"result",
"=",
"name1",
".",
"compareToIgnoreCase",
"(",
"name2",
")",
";",
"}",
"else",
"if",
"(",
"name1",
".",
"startsWith",
"(",
"\"__\"",
")",
")",
"{",
"result",
"=",
"1",
";",
"}",
"else",
"if",
"(",
"name2",
".",
"startsWith",
"(",
"\"__\"",
")",
")",
"{",
"result",
"=",
"-",
"1",
";",
"}",
"elseresult",
"=",
"name1",
".",
"compareToIgnoreCase",
"(",
"name2",
")",
";",
"}",
"}",
"return",
"result",
";",
"}"
] |
public int Compare(Property o1, Property o2){String VBA_PROJECT = "_VBA_PROJECT";String name1 = ((Property)o1).Name;String name2 = ((Property)o2).Name;int num = name1.Length - name2.Length;if (num == 0){if (name1.Equals(VBA_PROJECT, StringComparison.CurrentCulture)){num = 1;}else if (name2.Equals(VBA_PROJECT, StringComparison.CurrentCulture)){num = -1;}else{if (name1.StartsWith("__", StringComparison.Ordinal) && name2.StartsWith("__", StringComparison.Ordinal)){num = String.Compare(name1, name2, StringComparison.OrdinalIgnoreCase);}else if (name1.StartsWith("__", StringComparison.Ordinal)){num = 1;}else if (name2.StartsWith("__", StringComparison.Ordinal)){num = -1;}else{num = String.Compare(name1, name2, StringComparison.OrdinalIgnoreCase);}}}return num;}
|
train
| false
|
854
|
public DoubleBuffer get(double[] dst, int dstOffset, int doubleCount) {Arrays.checkOffsetAndCount(dst.length, dstOffset, doubleCount);if (doubleCount > remaining()) {throw new BufferUnderflowException();}for (int i = dstOffset; i < dstOffset + doubleCount; ++i) {dst[i] = get();}return this;}
|
[
"public",
"DoubleBuffer",
"get",
"(",
"double",
"[",
"]",
"dst",
",",
"int",
"dstOffset",
",",
"int",
"doubleCount",
")",
"{",
"Arrays",
".",
"checkOffsetAndCount",
"(",
"dst",
".",
"length",
",",
"dstOffset",
",",
"doubleCount",
")",
";",
"if",
"(",
"doubleCount",
">",
"remaining",
"(",
")",
")",
"{",
"throw",
"new",
"BufferUnderflowException",
"(",
")",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"dstOffset",
";",
"i",
"<",
"dstOffset",
"+",
"doubleCount",
";",
"++",
"i",
")",
"{",
"dst",
"[",
"i",
"]",
"=",
"get",
"(",
")",
";",
"}",
"return",
"this",
";",
"}"
] |
public virtual java.nio.DoubleBuffer get(double[] dst, int dstOffset, int doubleCount){java.util.Arrays.checkOffsetAndCount(dst.Length, dstOffset, doubleCount);if (doubleCount > remaining()){throw new java.nio.BufferUnderflowException();}{for (int i = dstOffset; i < dstOffset + doubleCount; ++i){dst[i] = get();}}return this;}
|
train
| false
|
855
|
public CharsRef add(CharsRef prefix, CharsRef output) {assert prefix != null;assert output != null;if (prefix == NO_OUTPUT) {return output;} else if (output == NO_OUTPUT) {return prefix;} else {assert prefix.length > 0;assert output.length > 0;CharsRef result = new CharsRef(prefix.length + output.length);System.arraycopy(prefix.chars, prefix.offset, result.chars, 0, prefix.length);System.arraycopy(output.chars, output.offset, result.chars, prefix.length, output.length);result.length = prefix.length + output.length;return result;}}
|
[
"public",
"CharsRef",
"add",
"(",
"CharsRef",
"prefix",
",",
"CharsRef",
"output",
")",
"{",
"assert",
"prefix",
"!=",
"null",
";",
"assert",
"output",
"!=",
"null",
";",
"if",
"(",
"prefix",
"==",
"NO_OUTPUT",
")",
"{",
"return",
"output",
";",
"}",
"else",
"if",
"(",
"output",
"==",
"NO_OUTPUT",
")",
"{",
"return",
"prefix",
";",
"}",
"else",
"{",
"assert",
"prefix",
".",
"length",
">",
"0",
";",
"assert",
"output",
".",
"length",
">",
"0",
";",
"CharsRef",
"result",
"=",
"new",
"CharsRef",
"(",
"prefix",
".",
"length",
"+",
"output",
".",
"length",
")",
";",
"System",
".",
"arraycopy",
"(",
"prefix",
".",
"chars",
",",
"prefix",
".",
"offset",
",",
"result",
".",
"chars",
",",
"0",
",",
"prefix",
".",
"length",
")",
";",
"System",
".",
"arraycopy",
"(",
"output",
".",
"chars",
",",
"output",
".",
"offset",
",",
"result",
".",
"chars",
",",
"prefix",
".",
"length",
",",
"output",
".",
"length",
")",
";",
"result",
".",
"length",
"=",
"prefix",
".",
"length",
"+",
"output",
".",
"length",
";",
"return",
"result",
";",
"}",
"}"
] |
public override CharsRef Add(CharsRef prefix, CharsRef output){Debug.Assert(prefix != null);Debug.Assert(output != null);if (prefix == NO_OUTPUT){return output;}else if (output == NO_OUTPUT){return prefix;}else{Debug.Assert(prefix.Length > 0);Debug.Assert(output.Length > 0);var result = new CharsRef(prefix.Length + output.Length);Array.Copy(prefix.Chars, prefix.Offset, result.Chars, 0, prefix.Length);Array.Copy(output.Chars, output.Offset, result.Chars, prefix.Length, output.Length);result.Length = prefix.Length + output.Length;return result;}}
|
train
| false
|
856
|
public UpdateProfileResult updateProfile(UpdateProfileRequest request) {request = beforeClientExecution(request);return executeUpdateProfile(request);}
|
[
"public",
"UpdateProfileResult",
"updateProfile",
"(",
"UpdateProfileRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateProfile",
"(",
"request",
")",
";",
"}"
] |
public virtual UpdateProfileResponse UpdateProfile(UpdateProfileRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateProfileRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateProfileResponseUnmarshaller.Instance;return Invoke<UpdateProfileResponse>(request, options);}
|
train
| true
|
857
|
public LikeThisQueryBuilder(Analyzer analyzer, String[] defaultFieldNames) {this.analyzer = analyzer;this.defaultFieldNames = defaultFieldNames;}
|
[
"public",
"LikeThisQueryBuilder",
"(",
"Analyzer",
"analyzer",
",",
"String",
"[",
"]",
"defaultFieldNames",
")",
"{",
"this",
".",
"analyzer",
"=",
"analyzer",
";",
"this",
".",
"defaultFieldNames",
"=",
"defaultFieldNames",
";",
"}"
] |
public LikeThisQueryBuilder(Analyzer analyzer, string[] defaultFieldNames){this.analyzer = analyzer;this.defaultFieldNames = defaultFieldNames;}
|
train
| false
|
858
|
public StringBuffer insert(int index, long l) {return insert(index, Long.toString(l));}
|
[
"public",
"StringBuffer",
"insert",
"(",
"int",
"index",
",",
"long",
"l",
")",
"{",
"return",
"insert",
"(",
"index",
",",
"Long",
".",
"toString",
"(",
"l",
")",
")",
";",
"}"
] |
public java.lang.StringBuffer insert(int index, long l){return insert(index, System.Convert.ToString(l));}
|
train
| false
|
859
|
public Field(String name, BytesRef bytes, IndexableFieldType type) {if (name == null) {throw new IllegalArgumentException("name must not be null");}if (bytes == null) {throw new IllegalArgumentException("bytes must not be null");}if (type == null) {throw new IllegalArgumentException("type must not be null");}this.name = name;this.fieldsData = bytes;this.type = type;}
|
[
"public",
"Field",
"(",
"String",
"name",
",",
"BytesRef",
"bytes",
",",
"IndexableFieldType",
"type",
")",
"{",
"if",
"(",
"name",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"name must not be null\"",
")",
";",
"}",
"if",
"(",
"bytes",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"bytes must not be null\"",
")",
";",
"}",
"if",
"(",
"type",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"type must not be null\"",
")",
";",
"}",
"this",
".",
"name",
"=",
"name",
";",
"this",
".",
"fieldsData",
"=",
"bytes",
";",
"this",
".",
"type",
"=",
"type",
";",
"}"
] |
public Field(string name, BytesRef bytes, FieldType type){if (name == null){throw new System.ArgumentNullException("name", "name cannot be null");}if (type == null){throw new System.ArgumentNullException("type", "type cannot be null");}if (type.IsIndexed){throw new System.ArgumentException("Fields with BytesRef values cannot be indexed");}this.FieldsData = bytes;this.m_type = type;this.m_name = name;}
|
train
| false
|
860
|
public void clear() {mSize = 0;}
|
[
"public",
"void",
"clear",
"(",
")",
"{",
"mSize",
"=",
"0",
";",
"}"
] |
public virtual void clear(){mSize = 0;}
|
train
| false
|
861
|
public SrndQuery parse2(String query) throws ParseException {ReInit(new FastCharStream(new StringReader(query)));try {return TopSrndQuery();} catch (TokenMgrError tme) {throw new ParseException(tme.getMessage());}}
|
[
"public",
"SrndQuery",
"parse2",
"(",
"String",
"query",
")",
"throws",
"ParseException",
"{",
"ReInit",
"(",
"new",
"FastCharStream",
"(",
"new",
"StringReader",
"(",
"query",
")",
")",
")",
";",
"try",
"{",
"return",
"TopSrndQuery",
"(",
")",
";",
"}",
"catch",
"(",
"TokenMgrError",
"tme",
")",
"{",
"throw",
"new",
"ParseException",
"(",
"tme",
".",
"getMessage",
"(",
")",
")",
";",
"}",
"}"
] |
public virtual SrndQuery Parse2(string query){ReInit(new FastCharStream(new StringReader(query)));try{return TopSrndQuery();}catch (TokenMgrError tme){throw new ParseException(tme.Message);}}
|
train
| false
|
862
|
@Override public int size() {return (int) Math.min(this.size, Integer.MAX_VALUE);}
|
[
"@",
"Override",
"public",
"int",
"size",
"(",
")",
"{",
"return",
"(",
"int",
")",
"Math",
".",
"min",
"(",
"this",
".",
"size",
",",
"Integer",
".",
"MAX_VALUE",
")",
";",
"}"
] |
public override int size(){return this._enclosing._size;}
|
train
| false
|
863
|
public DescribeConfigurationResult describeConfiguration(DescribeConfigurationRequest request) {request = beforeClientExecution(request);return executeDescribeConfiguration(request);}
|
[
"public",
"DescribeConfigurationResult",
"describeConfiguration",
"(",
"DescribeConfigurationRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeConfiguration",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeConfigurationResponse DescribeConfiguration(DescribeConfigurationRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeConfigurationRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeConfigurationResponseUnmarshaller.Instance;return Invoke<DescribeConfigurationResponse>(request, options);}
|
train
| true
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.