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 |
|---|---|---|---|---|---|
9,559
|
public synchronized StringBuffer append(CharSequence s) {if (s == null) {appendNull();} else {append0(s, 0, s.length());}return this;}
|
[
"public",
"synchronized",
"StringBuffer",
"append",
"(",
"CharSequence",
"s",
")",
"{",
"if",
"(",
"s",
"==",
"null",
")",
"{",
"appendNull",
"(",
")",
";",
"}",
"else",
"{",
"append0",
"(",
"s",
",",
"0",
",",
"s",
".",
"length",
"(",
")",
")",
";",
"}",
"return",
"this",
";",
"}"
] |
public java.lang.StringBuffer append(char[] chars){lock (this){append0(chars);return this;}}
|
train
| false
|
9,561
|
public long skip(long byteCount) throws IOException {if (byteCount < 0) {throw new IllegalArgumentException("byteCount < 0: " + byteCount);}synchronized (lock) {checkNotClosed();if (byteCount < 1) {return 0;}if (end - pos >= byteCount) {pos += byteCount;return byteCount;}long read = end - pos;pos = end;while (read < byteCount) {if (fillBuf() == -1) {return read;}if (end - pos >= byteCount - read) {pos += byteCount - read;return byteCount;}read += (end - pos);pos = end;}return byteCount;}}
|
[
"public",
"long",
"skip",
"(",
"long",
"byteCount",
")",
"throws",
"IOException",
"{",
"if",
"(",
"byteCount",
"<",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"byteCount < 0: \"",
"+",
"byteCount",
")",
";",
"}",
"synchronized",
"(",
"lock",
")",
"{",
"checkNotClosed",
"(",
")",
";",
"if",
"(",
"byteCount",
"<",
"1",
")",
"{",
"return",
"0",
";",
"}",
"if",
"(",
"end",
"-",
"pos",
">=",
"byteCount",
")",
"{",
"pos",
"+=",
"byteCount",
";",
"return",
"byteCount",
";",
"}",
"long",
"read",
"=",
"end",
"-",
"pos",
";",
"pos",
"=",
"end",
";",
"while",
"(",
"read",
"<",
"byteCount",
")",
"{",
"if",
"(",
"fillBuf",
"(",
")",
"==",
"-",
"1",
")",
"{",
"return",
"read",
";",
"}",
"if",
"(",
"end",
"-",
"pos",
">=",
"byteCount",
"-",
"read",
")",
"{",
"pos",
"+=",
"byteCount",
"-",
"read",
";",
"return",
"byteCount",
";",
"}",
"read",
"+=",
"(",
"end",
"-",
"pos",
")",
";",
"pos",
"=",
"end",
";",
"}",
"return",
"byteCount",
";",
"}",
"}"
] |
public override long skip(long byteCount){if (byteCount < 0){throw new System.ArgumentException("byteCount < 0: " + byteCount);}lock (@lock){checkNotClosed();if (byteCount < 1){return 0;}if (end - pos >= byteCount){pos += (int)(byteCount);return byteCount;}long read_1 = end - pos;pos = end;while (read_1 < byteCount){if (fillBuf() == -1){return read_1;}if (end - pos >= byteCount - read_1){pos += (int)(byteCount - read_1);return byteCount;}read_1 += (end - pos);pos = end;}return byteCount;}}
|
train
| false
|
9,562
|
public void updateFormulasAfterRowShift(FormulaShifter formulaShifter, int currentExternSheetIndex) {_valuesAgg.updateFormulasAfterRowShift(formulaShifter, currentExternSheetIndex);}
|
[
"public",
"void",
"updateFormulasAfterRowShift",
"(",
"FormulaShifter",
"formulaShifter",
",",
"int",
"currentExternSheetIndex",
")",
"{",
"_valuesAgg",
".",
"updateFormulasAfterRowShift",
"(",
"formulaShifter",
",",
"currentExternSheetIndex",
")",
";",
"}"
] |
public void UpdateFormulasAfterRowShift(FormulaShifter formulaShifter, int currentExternSheetIndex){_valuesAgg.UpdateFormulasAfterRowShift(formulaShifter, currentExternSheetIndex);}
|
train
| false
|
9,563
|
public void close() {synchronized (lock) {if (isOpen()) {buf = null;}}}
|
[
"public",
"void",
"close",
"(",
")",
"{",
"synchronized",
"(",
"lock",
")",
"{",
"if",
"(",
"isOpen",
"(",
")",
")",
"{",
"buf",
"=",
"null",
";",
"}",
"}",
"}"
] |
public override void close(){lock (@lock){if (isOpen()){buf = null;}}}
|
train
| false
|
9,564
|
public void seek(long pos) {this.pos = (int) (pos - pointer);}
|
[
"public",
"void",
"seek",
"(",
"long",
"pos",
")",
"{",
"this",
".",
"pos",
"=",
"(",
"int",
")",
"(",
"pos",
"-",
"pointer",
")",
";",
"}"
] |
public override void Seek(long pos){this.pos = (int)(pos - pointer);}
|
train
| false
|
9,565
|
public String toFormulaString() {StringBuilder sb = new StringBuilder(64);boolean needsExclamation = false;if (externalWorkbookNumber >= 0) {sb.append('[');sb.append(externalWorkbookNumber);sb.append(']');needsExclamation = true;}if (sheetName != null) {SheetNameFormatter.appendFormat(sb, sheetName);needsExclamation = true;}if (needsExclamation) {sb.append('!');}sb.append(nameName);return sb.toString();}
|
[
"public",
"String",
"toFormulaString",
"(",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
"64",
")",
";",
"boolean",
"needsExclamation",
"=",
"false",
";",
"if",
"(",
"externalWorkbookNumber",
">=",
"0",
")",
"{",
"sb",
".",
"append",
"(",
"'['",
")",
";",
"sb",
".",
"append",
"(",
"externalWorkbookNumber",
")",
";",
"sb",
".",
"append",
"(",
"']'",
")",
";",
"needsExclamation",
"=",
"true",
";",
"}",
"if",
"(",
"sheetName",
"!=",
"null",
")",
"{",
"SheetNameFormatter",
".",
"appendFormat",
"(",
"sb",
",",
"sheetName",
")",
";",
"needsExclamation",
"=",
"true",
";",
"}",
"if",
"(",
"needsExclamation",
")",
"{",
"sb",
".",
"append",
"(",
"'!'",
")",
";",
"}",
"sb",
".",
"append",
"(",
"nameName",
")",
";",
"return",
"sb",
".",
"toString",
"(",
")",
";",
"}"
] |
public override String ToFormulaString(){StringBuilder sb = new StringBuilder();bool needsExclamation = false;if (externalWorkbookNumber >= 0){sb.Append('[');sb.Append(externalWorkbookNumber);sb.Append(']');needsExclamation = true;}if (sheetName != null){SheetNameFormatter.AppendFormat(sb, sheetName);needsExclamation = true;}if (needsExclamation){sb.Append('!');}sb.Append(nameName);return sb.ToString();}
|
train
| false
|
9,566
|
public boolean isFinished() {return mState == STATE_IDLE;}
|
[
"public",
"boolean",
"isFinished",
"(",
")",
"{",
"return",
"mState",
"==",
"STATE_IDLE",
";",
"}"
] |
public virtual bool isFinished(){return mState == STATE_IDLE;}
|
train
| false
|
9,567
|
public static Transport open(Repository local, URIish uri, String remoteName)throws NotSupportedException, TransportException {for (WeakReference<TransportProtocol> ref : protocols) {TransportProtocol proto = ref.get();if (proto == null) {protocols.remove(ref);continue;}if (proto.canHandle(uri, local, remoteName)) {Transport tn = proto.open(uri, local, remoteName);tn.prePush = Hooks.prePush(local, tn.hookOutRedirect);tn.prePush.setRemoteLocation(uri.toString());tn.prePush.setRemoteName(remoteName);return tn;}}throw new NotSupportedException(MessageFormat.format(JGitText.get().URINotSupported, uri));}
|
[
"public",
"static",
"Transport",
"open",
"(",
"Repository",
"local",
",",
"URIish",
"uri",
",",
"String",
"remoteName",
")",
"throws",
"NotSupportedException",
",",
"TransportException",
"{",
"for",
"(",
"WeakReference",
"<",
"TransportProtocol",
">",
"ref",
":",
"protocols",
")",
"{",
"TransportProtocol",
"proto",
"=",
"ref",
".",
"get",
"(",
")",
";",
"if",
"(",
"proto",
"==",
"null",
")",
"{",
"protocols",
".",
"remove",
"(",
"ref",
")",
";",
"continue",
";",
"}",
"if",
"(",
"proto",
".",
"canHandle",
"(",
"uri",
",",
"local",
",",
"remoteName",
")",
")",
"{",
"Transport",
"tn",
"=",
"proto",
".",
"open",
"(",
"uri",
",",
"local",
",",
"remoteName",
")",
";",
"tn",
".",
"prePush",
"=",
"Hooks",
".",
"prePush",
"(",
"local",
",",
"tn",
".",
"hookOutRedirect",
")",
";",
"tn",
".",
"prePush",
".",
"setRemoteLocation",
"(",
"uri",
".",
"toString",
"(",
")",
")",
";",
"tn",
".",
"prePush",
".",
"setRemoteName",
"(",
"remoteName",
")",
";",
"return",
"tn",
";",
"}",
"}",
"throw",
"new",
"NotSupportedException",
"(",
"MessageFormat",
".",
"format",
"(",
"JGitText",
".",
"get",
"(",
")",
".",
"URINotSupported",
",",
"uri",
")",
")",
";",
"}"
] |
public static NGit.Transport.Transport Open(Repository local, URIish uri, stringremoteName){foreach (JavaWeakReference<TransportProtocol> @ref in protocols){TransportProtocol proto = @ref.Get();if (proto == null){protocols.Remove(@ref);continue;}if (proto.CanHandle(uri, local, remoteName)){return proto.Open(uri, local, remoteName);}}throw new NGit.Errors.NotSupportedException(MessageFormat.Format(JGitText.Get().URINotSupported, uri));}
|
train
| false
|
9,568
|
public void setColor(Color color){foreground = color;}
|
[
"public",
"void",
"setColor",
"(",
"Color",
"color",
")",
"{",
"foreground",
"=",
"color",
";",
"}"
] |
public void SetColor(Color color){foreground = color;}
|
train
| false
|
9,569
|
public DeleteAliasResult deleteAlias(DeleteAliasRequest request) {request = beforeClientExecution(request);return executeDeleteAlias(request);}
|
[
"public",
"DeleteAliasResult",
"deleteAlias",
"(",
"DeleteAliasRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteAlias",
"(",
"request",
")",
";",
"}"
] |
public virtual DeleteAliasResponse DeleteAlias(DeleteAliasRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteAliasRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteAliasResponseUnmarshaller.Instance;return Invoke<DeleteAliasResponse>(request, options);}
|
train
| true
|
9,570
|
public SeekStatus seekCeil(BytesRef text) {termUpto = binarySearch(text, br, 0, info.terms.size()-1, info.terms, info.sortedTerms);if (termUpto < 0) { termUpto = -termUpto-1;if (termUpto >= info.terms.size()) {return SeekStatus.END;} else {info.terms.get(info.sortedTerms[termUpto], br);return SeekStatus.NOT_FOUND;}} else {return SeekStatus.FOUND;}}
|
[
"public",
"SeekStatus",
"seekCeil",
"(",
"BytesRef",
"text",
")",
"{",
"termUpto",
"=",
"binarySearch",
"(",
"text",
",",
"br",
",",
"0",
",",
"info",
".",
"terms",
".",
"size",
"(",
")",
"-",
"1",
",",
"info",
".",
"terms",
",",
"info",
".",
"sortedTerms",
")",
";",
"if",
"(",
"termUpto",
"<",
"0",
")",
"{",
"termUpto",
"=",
"-",
"termUpto",
"-",
"1",
";",
"if",
"(",
"termUpto",
">=",
"info",
".",
"terms",
".",
"size",
"(",
")",
")",
"{",
"return",
"SeekStatus",
".",
"END",
";",
"}",
"else",
"{",
"info",
".",
"terms",
".",
"get",
"(",
"info",
".",
"sortedTerms",
"[",
"termUpto",
"]",
",",
"br",
")",
";",
"return",
"SeekStatus",
".",
"NOT_FOUND",
";",
"}",
"}",
"else",
"{",
"return",
"SeekStatus",
".",
"FOUND",
";",
"}",
"}"
] |
public override SeekStatus SeekCeil(BytesRef text){termUpto = BinarySearch(text, br, 0, info.terms.Count - 1, info.terms, info.sortedTerms, BytesRef.UTF8SortedAsUnicodeComparer);if (termUpto < 0) {termUpto = -termUpto - 1;if (termUpto >= info.terms.Count){return SeekStatus.END;}else{info.terms.Get(info.sortedTerms[termUpto], br);return SeekStatus.NOT_FOUND;}}else{return SeekStatus.FOUND;}}
|
train
| false
|
9,571
|
public CreateApplicationVersionRequest(String applicationName, String versionLabel) {setApplicationName(applicationName);setVersionLabel(versionLabel);}
|
[
"public",
"CreateApplicationVersionRequest",
"(",
"String",
"applicationName",
",",
"String",
"versionLabel",
")",
"{",
"setApplicationName",
"(",
"applicationName",
")",
";",
"setVersionLabel",
"(",
"versionLabel",
")",
";",
"}"
] |
public CreateApplicationVersionRequest(string applicationName, string versionLabel){_applicationName = applicationName;_versionLabel = versionLabel;}
|
train
| false
|
9,572
|
public String toString() {return ruleName + ":" + bypassTokenType;}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"ruleName",
"+",
"\":\"",
"+",
"bypassTokenType",
";",
"}"
] |
public override string ToString(){return ruleName + ":" + bypassTokenType;}
|
train
| false
|
9,573
|
public int indexOf(Object object) {Object[] snapshot = elements;return indexOf(object, snapshot, 0, snapshot.length);}
|
[
"public",
"int",
"indexOf",
"(",
"Object",
"object",
")",
"{",
"Object",
"[",
"]",
"snapshot",
"=",
"elements",
";",
"return",
"indexOf",
"(",
"object",
",",
"snapshot",
",",
"0",
",",
"snapshot",
".",
"length",
")",
";",
"}"
] |
public virtual int indexOf(object @object){object[] snapshot = elements;return indexOf(@object, snapshot, 0, snapshot.Length);}
|
train
| true
|
9,574
|
public int compareTo(ShortBuffer otherBuffer) {int compareRemaining = (remaining() < otherBuffer.remaining()) ? remaining(): otherBuffer.remaining();int thisPos = position;int otherPos = otherBuffer.position;short thisByte, otherByte;while (compareRemaining > 0) {thisByte = get(thisPos);otherByte = otherBuffer.get(otherPos);if (thisByte != otherByte) {return thisByte < otherByte ? -1 : 1;}thisPos++;otherPos++;compareRemaining--;}return remaining() - otherBuffer.remaining();}
|
[
"public",
"int",
"compareTo",
"(",
"ShortBuffer",
"otherBuffer",
")",
"{",
"int",
"compareRemaining",
"=",
"(",
"remaining",
"(",
")",
"<",
"otherBuffer",
".",
"remaining",
"(",
")",
")",
"?",
"remaining",
"(",
")",
":",
"otherBuffer",
".",
"remaining",
"(",
")",
";",
"int",
"thisPos",
"=",
"position",
";",
"int",
"otherPos",
"=",
"otherBuffer",
".",
"position",
";",
"short",
"thisByte",
",",
"otherByte",
";",
"while",
"(",
"compareRemaining",
">",
"0",
")",
"{",
"thisByte",
"=",
"get",
"(",
"thisPos",
")",
";",
"otherByte",
"=",
"otherBuffer",
".",
"get",
"(",
"otherPos",
")",
";",
"if",
"(",
"thisByte",
"!=",
"otherByte",
")",
"{",
"return",
"thisByte",
"<",
"otherByte",
"?",
"-",
"1",
":",
"1",
";",
"}",
"thisPos",
"++",
";",
"otherPos",
"++",
";",
"compareRemaining",
"--",
";",
"}",
"return",
"remaining",
"(",
")",
"-",
"otherBuffer",
".",
"remaining",
"(",
")",
";",
"}"
] |
public virtual int compareTo(java.nio.ShortBuffer otherBuffer){int compareRemaining = (remaining() < otherBuffer.remaining()) ? remaining() : otherBuffer.remaining();int thisPos = _position;int otherPos = otherBuffer._position;short thisByte;short otherByte;while (compareRemaining > 0){thisByte = get(thisPos);otherByte = otherBuffer.get(otherPos);if (thisByte != otherByte){return thisByte < otherByte ? -1 : 1;}thisPos++;otherPos++;compareRemaining--;}return remaining() - otherBuffer.remaining();}
|
train
| true
|
9,575
|
public DescribeSecurityConfigurationResult describeSecurityConfiguration(DescribeSecurityConfigurationRequest request) {request = beforeClientExecution(request);return executeDescribeSecurityConfiguration(request);}
|
[
"public",
"DescribeSecurityConfigurationResult",
"describeSecurityConfiguration",
"(",
"DescribeSecurityConfigurationRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeSecurityConfiguration",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeSecurityConfigurationResponse DescribeSecurityConfiguration(DescribeSecurityConfigurationRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeSecurityConfigurationRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeSecurityConfigurationResponseUnmarshaller.Instance;return Invoke<DescribeSecurityConfigurationResponse>(request, options);}
|
train
| true
|
9,576
|
public void add(int location, E object) {insertElementAt(object, location);}
|
[
"public",
"void",
"add",
"(",
"int",
"location",
",",
"E",
"object",
")",
"{",
"insertElementAt",
"(",
"object",
",",
"location",
")",
";",
"}"
] |
public override void add(int location, E @object){insertElementAt(@object, location);}
|
train
| false
|
9,577
|
public GetDownloadUrlForLayerResult getDownloadUrlForLayer(GetDownloadUrlForLayerRequest request) {request = beforeClientExecution(request);return executeGetDownloadUrlForLayer(request);}
|
[
"public",
"GetDownloadUrlForLayerResult",
"getDownloadUrlForLayer",
"(",
"GetDownloadUrlForLayerRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetDownloadUrlForLayer",
"(",
"request",
")",
";",
"}"
] |
public virtual GetDownloadUrlForLayerResponse GetDownloadUrlForLayer(GetDownloadUrlForLayerRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetDownloadUrlForLayerRequestMarshaller.Instance;options.ResponseUnmarshaller = GetDownloadUrlForLayerResponseUnmarshaller.Instance;return Invoke<GetDownloadUrlForLayerResponse>(request, options);}
|
train
| true
|
9,578
|
public StringWriter append(CharSequence csq) {if (csq == null) {csq = "null";}write(csq.toString());return this;}
|
[
"public",
"StringWriter",
"append",
"(",
"CharSequence",
"csq",
")",
"{",
"if",
"(",
"csq",
"==",
"null",
")",
"{",
"csq",
"=",
"\"null\"",
";",
"}",
"write",
"(",
"csq",
".",
"toString",
"(",
")",
")",
";",
"return",
"this",
";",
"}"
] |
public override java.io.Writer append(java.lang.CharSequence csq){if (csq == null){csq = java.lang.CharSequenceProxy.Wrap("null");}write(csq.ToString());return this;}
|
train
| true
|
9,579
|
public RevWalk getRevWalk() {return walker;}
|
[
"public",
"RevWalk",
"getRevWalk",
"(",
")",
"{",
"return",
"walker",
";",
"}"
] |
public virtual RevWalk GetRevWalk(){return walker;}
|
train
| false
|
9,580
|
@Override public int lastIndexOf(Object object) {Slice slice = this.slice;Object[] snapshot = elements;slice.checkConcurrentModification(snapshot);int result = CopyOnWriteArrayList.lastIndexOf(object, snapshot, slice.from, slice.to);return (result != -1) ? (result - slice.from) : -1;}
|
[
"@",
"Override",
"public",
"int",
"lastIndexOf",
"(",
"Object",
"object",
")",
"{",
"Slice",
"slice",
"=",
"this",
".",
"slice",
";",
"Object",
"[",
"]",
"snapshot",
"=",
"elements",
";",
"slice",
".",
"checkConcurrentModification",
"(",
"snapshot",
")",
";",
"int",
"result",
"=",
"CopyOnWriteArrayList",
".",
"lastIndexOf",
"(",
"object",
",",
"snapshot",
",",
"slice",
".",
"from",
",",
"slice",
".",
"to",
")",
";",
"return",
"(",
"result",
"!=",
"-",
"1",
")",
"?",
"(",
"result",
"-",
"slice",
".",
"from",
")",
":",
"-",
"1",
";",
"}"
] |
public virtual int lastIndexOf(object @object){object[] snapshot = elements;return lastIndexOf(@object, snapshot, 0, snapshot.Length);}
|
train
| false
|
9,581
|
public IntBuffer put(int index, int c) {checkIndex(index);backingArray[offset + index] = c;return this;}
|
[
"public",
"IntBuffer",
"put",
"(",
"int",
"index",
",",
"int",
"c",
")",
"{",
"checkIndex",
"(",
"index",
")",
";",
"backingArray",
"[",
"offset",
"+",
"index",
"]",
"=",
"c",
";",
"return",
"this",
";",
"}"
] |
public override java.nio.IntBuffer put(int index, int c){checkIndex(index);backingArray[offset + index] = c;return this;}
|
train
| false
|
9,582
|
public HSSFTextbox(HSSFShape parent, HSSFAnchor anchor) {super(parent, anchor);setHorizontalAlignment(HORIZONTAL_ALIGNMENT_LEFT);setVerticalAlignment(VERTICAL_ALIGNMENT_TOP);setString(new HSSFRichTextString(""));}
|
[
"public",
"HSSFTextbox",
"(",
"HSSFShape",
"parent",
",",
"HSSFAnchor",
"anchor",
")",
"{",
"super",
"(",
"parent",
",",
"anchor",
")",
";",
"setHorizontalAlignment",
"(",
"HORIZONTAL_ALIGNMENT_LEFT",
")",
";",
"setVerticalAlignment",
"(",
"VERTICAL_ALIGNMENT_TOP",
")",
";",
"setString",
"(",
"new",
"HSSFRichTextString",
"(",
"\"\"",
")",
")",
";",
"}"
] |
public HSSFTextbox(HSSFShape parent, HSSFAnchor anchor): base(parent, anchor){HorizontalAlignment = HorizontalTextAlignment.Left;VerticalAlignment = VerticalTextAlignment.Top;this.String = (new HSSFRichTextString(""));}
|
train
| false
|
9,583
|
public GetRegionRequest() {super("cr", "2016-06-07", "GetRegion", "cr");setUriPattern("/regions");setMethod(MethodType.GET);}
|
[
"public",
"GetRegionRequest",
"(",
")",
"{",
"super",
"(",
"\"cr\"",
",",
"\"2016-06-07\"",
",",
"\"GetRegion\"",
",",
"\"cr\"",
")",
";",
"setUriPattern",
"(",
"\"/regions\"",
")",
";",
"setMethod",
"(",
"MethodType",
".",
"GET",
")",
";",
"}"
] |
public GetRegionRequest(): base("cr", "2016-06-07", "GetRegion", "cr", "openAPI"){UriPattern = "/regions";Method = MethodType.GET;}
|
train
| false
|
9,584
|
public ListObjectChildrenResult listObjectChildren(ListObjectChildrenRequest request) {request = beforeClientExecution(request);return executeListObjectChildren(request);}
|
[
"public",
"ListObjectChildrenResult",
"listObjectChildren",
"(",
"ListObjectChildrenRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListObjectChildren",
"(",
"request",
")",
";",
"}"
] |
public virtual ListObjectChildrenResponse ListObjectChildren(ListObjectChildrenRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListObjectChildrenRequestMarshaller.Instance;options.ResponseUnmarshaller = ListObjectChildrenResponseUnmarshaller.Instance;return Invoke<ListObjectChildrenResponse>(request, options);}
|
train
| true
|
9,585
|
public GetIdResult getId(GetIdRequest request) {request = beforeClientExecution(request);return executeGetId(request);}
|
[
"public",
"GetIdResult",
"getId",
"(",
"GetIdRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetId",
"(",
"request",
")",
";",
"}"
] |
public virtual GetIdResponse GetId(GetIdRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetIdRequestMarshaller.Instance;options.ResponseUnmarshaller = GetIdResponseUnmarshaller.Instance;return Invoke<GetIdResponse>(request, options);}
|
train
| true
|
9,586
|
public String getPassphrase() {return passphrase;}
|
[
"public",
"String",
"getPassphrase",
"(",
")",
"{",
"return",
"passphrase",
";",
"}"
] |
public virtual string GetPassphrase(){return passphrase;}
|
train
| false
|
9,587
|
public Map<String, Ref> getAllRefs() {try {return getRefDatabase().getRefs(RefDatabase.ALL);} catch (IOException e) {throw new UncheckedIOException(e);}}
|
[
"public",
"Map",
"<",
"String",
",",
"Ref",
">",
"getAllRefs",
"(",
")",
"{",
"try",
"{",
"return",
"getRefDatabase",
"(",
")",
".",
"getRefs",
"(",
"RefDatabase",
".",
"ALL",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"throw",
"new",
"UncheckedIOException",
"(",
"e",
")",
";",
"}",
"}"
] |
public virtual IDictionary<string, Ref> GetAllRefs(){try{return RefDatabase.GetRefs(NGit.RefDatabase.ALL);}catch (IOException){return new Dictionary<string, Ref>();}}
|
train
| false
|
9,588
|
public boolean hasMoreElements() { return hasNext(); }
|
[
"public",
"boolean",
"hasMoreElements",
"(",
")",
"{",
"return",
"hasNext",
"(",
")",
";",
"}"
] |
public bool hasMoreElements(){return this.hasNext();}
|
train
| false
|
9,589
|
public int numDataNodes() {return numDataNodes(rootNode);}
|
[
"public",
"int",
"numDataNodes",
"(",
")",
"{",
"return",
"numDataNodes",
"(",
"rootNode",
")",
";",
"}"
] |
public virtual int NumDataNodes(){return NumDataNodes(rootNode);}
|
train
| false
|
9,590
|
public HadoopJarStepConfig toHadoopJarStepConfig() {List<String> args = new ArrayList<String>();if (reducer == null) {hadoopConfig.put("mapred.reduce.tasks", "0");}for (Map.Entry<String, String> entry : hadoopConfig.entrySet()) {args.add("-D");args.add(entry.getKey() + "=" + entry.getValue());}for (String input : inputs) {args.add("-input");args.add(input);}if (output != null) {args.add("-output");args.add(output);}if (mapper != null) {args.add("-mapper");args.add(mapper);}if (reducer != null) {args.add("-reducer");args.add(reducer);}return new HadoopJarStepConfig().withJar("/home/hadoop/contrib/streaming/hadoop-streaming.jar").withArgs(args);}
|
[
"public",
"HadoopJarStepConfig",
"toHadoopJarStepConfig",
"(",
")",
"{",
"List",
"<",
"String",
">",
"args",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"if",
"(",
"reducer",
"==",
"null",
")",
"{",
"hadoopConfig",
".",
"put",
"(",
"\"mapred.reduce.tasks\"",
",",
"\"0\"",
")",
";",
"}",
"for",
"(",
"Map",
".",
"Entry",
"<",
"String",
",",
"String",
">",
"entry",
":",
"hadoopConfig",
".",
"entrySet",
"(",
")",
")",
"{",
"args",
".",
"add",
"(",
"\"-D\"",
")",
";",
"args",
".",
"add",
"(",
"entry",
".",
"getKey",
"(",
")",
"+",
"\"=\"",
"+",
"entry",
".",
"getValue",
"(",
")",
")",
";",
"}",
"for",
"(",
"String",
"input",
":",
"inputs",
")",
"{",
"args",
".",
"add",
"(",
"\"-input\"",
")",
";",
"args",
".",
"add",
"(",
"input",
")",
";",
"}",
"if",
"(",
"output",
"!=",
"null",
")",
"{",
"args",
".",
"add",
"(",
"\"-output\"",
")",
";",
"args",
".",
"add",
"(",
"output",
")",
";",
"}",
"if",
"(",
"mapper",
"!=",
"null",
")",
"{",
"args",
".",
"add",
"(",
"\"-mapper\"",
")",
";",
"args",
".",
"add",
"(",
"mapper",
")",
";",
"}",
"if",
"(",
"reducer",
"!=",
"null",
")",
"{",
"args",
".",
"add",
"(",
"\"-reducer\"",
")",
";",
"args",
".",
"add",
"(",
"reducer",
")",
";",
"}",
"return",
"new",
"HadoopJarStepConfig",
"(",
")",
".",
"withJar",
"(",
"\"/home/hadoop/contrib/streaming/hadoop-streaming.jar\"",
")",
".",
"withArgs",
"(",
"args",
")",
";",
"}"
] |
public HadoopJarStepConfig ToHadoopJarStepConfig() {List<string> args = new List<string>();if (reducer == null) {hadoopConfig.Add("mapred.reduce.tasks", "0");}foreach (KeyValuePair<string, string> entry in hadoopConfig){args.Add("-D");args.Add(string.Format(CultureInfo.InvariantCulture, "{0} = {1}", entry.Key, entry.Value));}foreach (string input in inputs) {args.Add("-input");args.Add(input);}if (output != null) {args.Add("-output");args.Add(output);}if (mapper != null) {args.Add("-mapper");args.Add(mapper);}if (reducer != null) {args.Add("-reducer");args.Add(reducer);}return new HadoopJarStepConfig{Jar = "/home/hadoop/contrib/streaming/hadoop-streaming.jar",Args = args};}
|
train
| true
|
9,591
|
public GetRelationalDatabaseEventsResult getRelationalDatabaseEvents(GetRelationalDatabaseEventsRequest request) {request = beforeClientExecution(request);return executeGetRelationalDatabaseEvents(request);}
|
[
"public",
"GetRelationalDatabaseEventsResult",
"getRelationalDatabaseEvents",
"(",
"GetRelationalDatabaseEventsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetRelationalDatabaseEvents",
"(",
"request",
")",
";",
"}"
] |
public virtual GetRelationalDatabaseEventsResponse GetRelationalDatabaseEvents(GetRelationalDatabaseEventsRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetRelationalDatabaseEventsRequestMarshaller.Instance;options.ResponseUnmarshaller = GetRelationalDatabaseEventsResponseUnmarshaller.Instance;return Invoke<GetRelationalDatabaseEventsResponse>(request, options);}
|
train
| true
|
9,592
|
public void drawLine(int x1, int y1, int x2, int y2){drawLine(x1,y1,x2,y2,0);}
|
[
"public",
"void",
"drawLine",
"(",
"int",
"x1",
",",
"int",
"y1",
",",
"int",
"x2",
",",
"int",
"y2",
")",
"{",
"drawLine",
"(",
"x1",
",",
"y1",
",",
"x2",
",",
"y2",
",",
"0",
")",
";",
"}"
] |
public void DrawLine(int x1, int y1, int x2, int y2){DrawLine(x1, y1, x2, y2, 0);}
|
train
| true
|
9,593
|
public UpdateUserSecurityProfilesResult updateUserSecurityProfiles(UpdateUserSecurityProfilesRequest request) {request = beforeClientExecution(request);return executeUpdateUserSecurityProfiles(request);}
|
[
"public",
"UpdateUserSecurityProfilesResult",
"updateUserSecurityProfiles",
"(",
"UpdateUserSecurityProfilesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateUserSecurityProfiles",
"(",
"request",
")",
";",
"}"
] |
public virtual UpdateUserSecurityProfilesResponse UpdateUserSecurityProfiles(UpdateUserSecurityProfilesRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateUserSecurityProfilesRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateUserSecurityProfilesResponseUnmarshaller.Instance;return Invoke<UpdateUserSecurityProfilesResponse>(request, options);}
|
train
| true
|
9,594
|
public String toString() {return "Action: " + this.action;}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"\"Action: \"",
"+",
"this",
".",
"action",
";",
"}"
] |
public override string ToString(){return "Action: " + this.action;}
|
train
| false
|
9,595
|
public CreateVolumeRequest(Integer size, String availabilityZone) {setSize(size);setAvailabilityZone(availabilityZone);}
|
[
"public",
"CreateVolumeRequest",
"(",
"Integer",
"size",
",",
"String",
"availabilityZone",
")",
"{",
"setSize",
"(",
"size",
")",
";",
"setAvailabilityZone",
"(",
"availabilityZone",
")",
";",
"}"
] |
public CreateVolumeRequest(string availabilityZone, int size){_availabilityZone = availabilityZone;_size = size;}
|
train
| false
|
9,596
|
public final void setPrecedenceStartState(int precedence, DFAState startState) {if (!isPrecedenceDfa()) {throw new IllegalStateException("Only precedence DFAs may contain a precedence start state.");}if (precedence < 0) {return;}synchronized (s0) {if (precedence >= s0.edges.length) {s0.edges = Arrays.copyOf(s0.edges, precedence + 1);}s0.edges[precedence] = startState;}}
|
[
"public",
"final",
"void",
"setPrecedenceStartState",
"(",
"int",
"precedence",
",",
"DFAState",
"startState",
")",
"{",
"if",
"(",
"!",
"isPrecedenceDfa",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"Only precedence DFAs may contain a precedence start state.\"",
")",
";",
"}",
"if",
"(",
"precedence",
"<",
"0",
")",
"{",
"return",
";",
"}",
"synchronized",
"(",
"s0",
")",
"{",
"if",
"(",
"precedence",
">=",
"s0",
".",
"edges",
".",
"length",
")",
"{",
"s0",
".",
"edges",
"=",
"Arrays",
".",
"copyOf",
"(",
"s0",
".",
"edges",
",",
"precedence",
"+",
"1",
")",
";",
"}",
"s0",
".",
"edges",
"[",
"precedence",
"]",
"=",
"startState",
";",
"}",
"}"
] |
public void SetPrecedenceStartState(int precedence, DFAState startState){if (!IsPrecedenceDfa){throw new Exception("Only precedence DFAs may contain a precedence start state.");}if (precedence < 0){return;}lock (s0){if (precedence >= s0.edges.Length){s0.edges = Arrays.CopyOf(s0.edges, precedence + 1);}s0.edges[precedence] = startState;}}
|
train
| false
|
9,597
|
public EditPhotosRequest() {super("CloudPhoto", "2017-07-11", "EditPhotos", "cloudphoto");setProtocol(ProtocolType.HTTPS);}
|
[
"public",
"EditPhotosRequest",
"(",
")",
"{",
"super",
"(",
"\"CloudPhoto\"",
",",
"\"2017-07-11\"",
",",
"\"EditPhotos\"",
",",
"\"cloudphoto\"",
")",
";",
"setProtocol",
"(",
"ProtocolType",
".",
"HTTPS",
")",
";",
"}"
] |
public EditPhotosRequest(): base("CloudPhoto", "2017-07-11", "EditPhotos", "cloudphoto", "openAPI"){Protocol = ProtocolType.HTTPS;}
|
train
| false
|
9,599
|
public DeleteFlowDefinitionResult deleteFlowDefinition(DeleteFlowDefinitionRequest request) {request = beforeClientExecution(request);return executeDeleteFlowDefinition(request);}
|
[
"public",
"DeleteFlowDefinitionResult",
"deleteFlowDefinition",
"(",
"DeleteFlowDefinitionRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteFlowDefinition",
"(",
"request",
")",
";",
"}"
] |
public virtual DeleteFlowDefinitionResponse DeleteFlowDefinition(DeleteFlowDefinitionRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteFlowDefinitionRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteFlowDefinitionResponseUnmarshaller.Instance;return Invoke<DeleteFlowDefinitionResponse>(request, options);}
|
train
| false
|
9,600
|
public void setLastFailedRefreshTime() {lastFailedRefreshTime = System.currentTimeMillis();}
|
[
"public",
"void",
"setLastFailedRefreshTime",
"(",
")",
"{",
"lastFailedRefreshTime",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"}"
] |
public void SetLastFailedRefreshTime(){lastFailedRefreshTime = DateTime.UtcNow.Ticks;}
|
train
| false
|
9,601
|
public ModifyDBInstanceRequest(String dBInstanceIdentifier) {setDBInstanceIdentifier(dBInstanceIdentifier);}
|
[
"public",
"ModifyDBInstanceRequest",
"(",
"String",
"dBInstanceIdentifier",
")",
"{",
"setDBInstanceIdentifier",
"(",
"dBInstanceIdentifier",
")",
";",
"}"
] |
public ModifyDBInstanceRequest(string dbInstanceIdentifier){_dbInstanceIdentifier = dbInstanceIdentifier;}
|
train
| false
|
9,602
|
public GetTemplateSummaryResult getTemplateSummary(GetTemplateSummaryRequest request) {request = beforeClientExecution(request);return executeGetTemplateSummary(request);}
|
[
"public",
"GetTemplateSummaryResult",
"getTemplateSummary",
"(",
"GetTemplateSummaryRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetTemplateSummary",
"(",
"request",
")",
";",
"}"
] |
public virtual GetTemplateSummaryResponse GetTemplateSummary(GetTemplateSummaryRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetTemplateSummaryRequestMarshaller.Instance;options.ResponseUnmarshaller = GetTemplateSummaryResponseUnmarshaller.Instance;return Invoke<GetTemplateSummaryResponse>(request, options);}
|
train
| true
|
9,603
|
public Snapshot revokeSnapshotAccess(RevokeSnapshotAccessRequest request) {request = beforeClientExecution(request);return executeRevokeSnapshotAccess(request);}
|
[
"public",
"Snapshot",
"revokeSnapshotAccess",
"(",
"RevokeSnapshotAccessRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeRevokeSnapshotAccess",
"(",
"request",
")",
";",
"}"
] |
public virtual RevokeSnapshotAccessResponse RevokeSnapshotAccess(RevokeSnapshotAccessRequest request){var options = new InvokeOptions();options.RequestMarshaller = RevokeSnapshotAccessRequestMarshaller.Instance;options.ResponseUnmarshaller = RevokeSnapshotAccessResponseUnmarshaller.Instance;return Invoke<RevokeSnapshotAccessResponse>(request, options);}
|
train
| true
|
9,604
|
public void serialize(final LittleEndianOutput out) {final int field_4_name_length = field_6_name_text.length();final int field_5_comment_length = field_7_comment_text.length();out.writeShort(field_1_record_type);out.writeShort(field_2_frt_cell_ref_flag);out.writeLong(field_3_reserved);out.writeShort(field_4_name_length);out.writeShort(field_5_comment_length);boolean isNameMultiByte = StringUtil.hasMultibyte(field_6_name_text);out.writeByte(isNameMultiByte ? 1 : 0);if (isNameMultiByte) {StringUtil.putUnicodeLE(field_6_name_text, out);} else {StringUtil.putCompressedUnicode(field_6_name_text, out);}boolean isCommentMultiByte = StringUtil.hasMultibyte(field_7_comment_text);out.writeByte(isCommentMultiByte ? 1 : 0);if (isCommentMultiByte) {StringUtil.putUnicodeLE(field_7_comment_text, out);} else {StringUtil.putCompressedUnicode(field_7_comment_text, out);}}
|
[
"public",
"void",
"serialize",
"(",
"final",
"LittleEndianOutput",
"out",
")",
"{",
"final",
"int",
"field_4_name_length",
"=",
"field_6_name_text",
".",
"length",
"(",
")",
";",
"final",
"int",
"field_5_comment_length",
"=",
"field_7_comment_text",
".",
"length",
"(",
")",
";",
"out",
".",
"writeShort",
"(",
"field_1_record_type",
")",
";",
"out",
".",
"writeShort",
"(",
"field_2_frt_cell_ref_flag",
")",
";",
"out",
".",
"writeLong",
"(",
"field_3_reserved",
")",
";",
"out",
".",
"writeShort",
"(",
"field_4_name_length",
")",
";",
"out",
".",
"writeShort",
"(",
"field_5_comment_length",
")",
";",
"boolean",
"isNameMultiByte",
"=",
"StringUtil",
".",
"hasMultibyte",
"(",
"field_6_name_text",
")",
";",
"out",
".",
"writeByte",
"(",
"isNameMultiByte",
"?",
"1",
":",
"0",
")",
";",
"if",
"(",
"isNameMultiByte",
")",
"{",
"StringUtil",
".",
"putUnicodeLE",
"(",
"field_6_name_text",
",",
"out",
")",
";",
"}",
"else",
"{",
"StringUtil",
".",
"putCompressedUnicode",
"(",
"field_6_name_text",
",",
"out",
")",
";",
"}",
"boolean",
"isCommentMultiByte",
"=",
"StringUtil",
".",
"hasMultibyte",
"(",
"field_7_comment_text",
")",
";",
"out",
".",
"writeByte",
"(",
"isCommentMultiByte",
"?",
"1",
":",
"0",
")",
";",
"if",
"(",
"isCommentMultiByte",
")",
"{",
"StringUtil",
".",
"putUnicodeLE",
"(",
"field_7_comment_text",
",",
"out",
")",
";",
"}",
"else",
"{",
"StringUtil",
".",
"putCompressedUnicode",
"(",
"field_7_comment_text",
",",
"out",
")",
";",
"}",
"}"
] |
public override void Serialize(ILittleEndianOutput out1){int field_4_name_length = field_6_name_text.Length;int field_5_comment_length = field_7_comment_text.Length;out1.WriteShort(field_1_record_type);out1.WriteShort(field_2_frt_cell_ref_flag);out1.WriteLong(field_3_reserved);out1.WriteShort(field_4_name_length);out1.WriteShort(field_5_comment_length);out1.WriteByte(0);StringUtil.PutCompressedUnicode(field_6_name_text,out1);out1.WriteByte(0);StringUtil.PutCompressedUnicode(field_7_comment_text, out1);}
|
train
| false
|
9,605
|
public StartProjectVersionResult startProjectVersion(StartProjectVersionRequest request) {request = beforeClientExecution(request);return executeStartProjectVersion(request);}
|
[
"public",
"StartProjectVersionResult",
"startProjectVersion",
"(",
"StartProjectVersionRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeStartProjectVersion",
"(",
"request",
")",
";",
"}"
] |
public virtual StartProjectVersionResponse StartProjectVersion(StartProjectVersionRequest request){var options = new InvokeOptions();options.RequestMarshaller = StartProjectVersionRequestMarshaller.Instance;options.ResponseUnmarshaller = StartProjectVersionResponseUnmarshaller.Instance;return Invoke<StartProjectVersionResponse>(request, options);}
|
train
| false
|
9,606
|
public MoPenDeleteGroupMemberRequest() {super("MoPen", "2018-02-11", "MoPenDeleteGroupMember", "mopen");setProtocol(ProtocolType.HTTPS);setMethod(MethodType.POST);}
|
[
"public",
"MoPenDeleteGroupMemberRequest",
"(",
")",
"{",
"super",
"(",
"\"MoPen\"",
",",
"\"2018-02-11\"",
",",
"\"MoPenDeleteGroupMember\"",
",",
"\"mopen\"",
")",
";",
"setProtocol",
"(",
"ProtocolType",
".",
"HTTPS",
")",
";",
"setMethod",
"(",
"MethodType",
".",
"POST",
")",
";",
"}"
] |
public MoPenDeleteGroupMemberRequest(): base("MoPen", "2018-02-11", "MoPenDeleteGroupMember", "mopen", "openAPI"){Protocol = ProtocolType.HTTPS;Method = MethodType.POST;}
|
train
| false
|
9,607
|
public synchronized int getMax() {return mMax;}
|
[
"public",
"synchronized",
"int",
"getMax",
"(",
")",
"{",
"return",
"mMax",
";",
"}"
] |
public virtual int getMax(){lock (this){return mMax;}}
|
train
| false
|
9,608
|
public DiffCommand setSourcePrefix(String sourcePrefix) {this.sourcePrefix = sourcePrefix;return this;}
|
[
"public",
"DiffCommand",
"setSourcePrefix",
"(",
"String",
"sourcePrefix",
")",
"{",
"this",
".",
"sourcePrefix",
"=",
"sourcePrefix",
";",
"return",
"this",
";",
"}"
] |
public virtual NGit.Api.DiffCommand SetSourcePrefix(string sourcePrefix){this.sourcePrefix = sourcePrefix;return this;}
|
train
| false
|
9,609
|
public CreateFlowLogsResult createFlowLogs(CreateFlowLogsRequest request) {request = beforeClientExecution(request);return executeCreateFlowLogs(request);}
|
[
"public",
"CreateFlowLogsResult",
"createFlowLogs",
"(",
"CreateFlowLogsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCreateFlowLogs",
"(",
"request",
")",
";",
"}"
] |
public virtual CreateFlowLogsResponse CreateFlowLogs(CreateFlowLogsRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateFlowLogsRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateFlowLogsResponseUnmarshaller.Instance;return Invoke<CreateFlowLogsResponse>(request, options);}
|
train
| true
|
9,610
|
public void writeString(String text, int numberOfRichTextRuns, int extendedDataSize) {boolean is16bitEncoded = StringUtil.hasMultibyte(text);int keepTogetherSize = 2 + 1 + 1; int optionFlags = 0x00;if (is16bitEncoded) {optionFlags |= 0x01;keepTogetherSize += 1; }if (numberOfRichTextRuns > 0) {optionFlags |= 0x08;keepTogetherSize += 2;}if (extendedDataSize > 0) {optionFlags |= 0x04;keepTogetherSize += 4;}writeContinueIfRequired(keepTogetherSize);writeShort(text.length());writeByte(optionFlags);if (numberOfRichTextRuns > 0) {writeShort(numberOfRichTextRuns);}if (extendedDataSize > 0) {writeInt(extendedDataSize);}writeCharacterData(text, is16bitEncoded);}
|
[
"public",
"void",
"writeString",
"(",
"String",
"text",
",",
"int",
"numberOfRichTextRuns",
",",
"int",
"extendedDataSize",
")",
"{",
"boolean",
"is16bitEncoded",
"=",
"StringUtil",
".",
"hasMultibyte",
"(",
"text",
")",
";",
"int",
"keepTogetherSize",
"=",
"2",
"+",
"1",
"+",
"1",
";",
"int",
"optionFlags",
"=",
"0x00",
";",
"if",
"(",
"is16bitEncoded",
")",
"{",
"optionFlags",
"|=",
"0x01",
";",
"keepTogetherSize",
"+=",
"1",
";",
"}",
"if",
"(",
"numberOfRichTextRuns",
">",
"0",
")",
"{",
"optionFlags",
"|=",
"0x08",
";",
"keepTogetherSize",
"+=",
"2",
";",
"}",
"if",
"(",
"extendedDataSize",
">",
"0",
")",
"{",
"optionFlags",
"|=",
"0x04",
";",
"keepTogetherSize",
"+=",
"4",
";",
"}",
"writeContinueIfRequired",
"(",
"keepTogetherSize",
")",
";",
"writeShort",
"(",
"text",
".",
"length",
"(",
")",
")",
";",
"writeByte",
"(",
"optionFlags",
")",
";",
"if",
"(",
"numberOfRichTextRuns",
">",
"0",
")",
"{",
"writeShort",
"(",
"numberOfRichTextRuns",
")",
";",
"}",
"if",
"(",
"extendedDataSize",
">",
"0",
")",
"{",
"writeInt",
"(",
"extendedDataSize",
")",
";",
"}",
"writeCharacterData",
"(",
"text",
",",
"is16bitEncoded",
")",
";",
"}"
] |
public void WriteString(String text, int numberOfRichTextRuns, int extendedDataSize){bool is16bitEncoded = StringUtil.HasMultibyte(text);int keepTogetherSize = 2 + 1 + 1; int optionFlags = 0x00;if (is16bitEncoded){optionFlags |= 0x01;keepTogetherSize += 1; }if (numberOfRichTextRuns > 0){optionFlags |= 0x08;keepTogetherSize += 2;}if (extendedDataSize > 0){optionFlags |= 0x04;keepTogetherSize += 4;}WriteContinueIfRequired(keepTogetherSize);WriteShort(text.Length);WriteByte(optionFlags);if (numberOfRichTextRuns > 0){WriteShort(numberOfRichTextRuns);}if (extendedDataSize > 0){WriteInt(extendedDataSize);}WriteCharacterData(text, is16bitEncoded);}
|
train
| false
|
9,611
|
public String toFormulaString(String[] operands) {StringBuilder buf = new StringBuilder();if(isExternalFunction()) {buf.append(operands[0]); appendArgs(buf, 1, operands);} else {buf.append(getName());appendArgs(buf, 0, operands);}return buf.toString();}
|
[
"public",
"String",
"toFormulaString",
"(",
"String",
"[",
"]",
"operands",
")",
"{",
"StringBuilder",
"buf",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"if",
"(",
"isExternalFunction",
"(",
")",
")",
"{",
"buf",
".",
"append",
"(",
"operands",
"[",
"0",
"]",
")",
";",
"appendArgs",
"(",
"buf",
",",
"1",
",",
"operands",
")",
";",
"}",
"else",
"{",
"buf",
".",
"append",
"(",
"getName",
"(",
")",
")",
";",
"appendArgs",
"(",
"buf",
",",
"0",
",",
"operands",
")",
";",
"}",
"return",
"buf",
".",
"toString",
"(",
")",
";",
"}"
] |
public override String ToFormulaString(String[] operands){StringBuilder buf = new StringBuilder();if (IsExternalFunction){buf.Append(operands[0]); AppendArgs(buf, 1, operands);}else{buf.Append(Name);AppendArgs(buf, 0, operands);}return buf.ToString();}
|
train
| false
|
9,612
|
public DetectStackDriftResult detectStackDrift(DetectStackDriftRequest request) {request = beforeClientExecution(request);return executeDetectStackDrift(request);}
|
[
"public",
"DetectStackDriftResult",
"detectStackDrift",
"(",
"DetectStackDriftRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDetectStackDrift",
"(",
"request",
")",
";",
"}"
] |
public virtual DetectStackDriftResponse DetectStackDrift(DetectStackDriftRequest request){var options = new InvokeOptions();options.RequestMarshaller = DetectStackDriftRequestMarshaller.Instance;options.ResponseUnmarshaller = DetectStackDriftResponseUnmarshaller.Instance;return Invoke<DetectStackDriftResponse>(request, options);}
|
train
| true
|
9,615
|
public RenderUiTemplateResult renderUiTemplate(RenderUiTemplateRequest request) {request = beforeClientExecution(request);return executeRenderUiTemplate(request);}
|
[
"public",
"RenderUiTemplateResult",
"renderUiTemplate",
"(",
"RenderUiTemplateRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeRenderUiTemplate",
"(",
"request",
")",
";",
"}"
] |
public virtual RenderUiTemplateResponse RenderUiTemplate(RenderUiTemplateRequest request){var options = new InvokeOptions();options.RequestMarshaller = RenderUiTemplateRequestMarshaller.Instance;options.ResponseUnmarshaller = RenderUiTemplateResponseUnmarshaller.Instance;return Invoke<RenderUiTemplateResponse>(request, options);}
|
train
| true
|
9,616
|
public final LongBuffer asLongBuffer() {return LongToByteBufferAdapter.asLongBuffer(this);}
|
[
"public",
"final",
"LongBuffer",
"asLongBuffer",
"(",
")",
"{",
"return",
"LongToByteBufferAdapter",
".",
"asLongBuffer",
"(",
"this",
")",
";",
"}"
] |
public sealed override java.nio.LongBuffer asLongBuffer(){return java.nio.LongToByteBufferAdapter.asLongBuffer(this);}
|
train
| false
|
9,617
|
public DescribeLimitsResult describeLimits(DescribeLimitsRequest request) {request = beforeClientExecution(request);return executeDescribeLimits(request);}
|
[
"public",
"DescribeLimitsResult",
"describeLimits",
"(",
"DescribeLimitsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeLimits",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeLimitsResponse DescribeLimits(DescribeLimitsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeLimitsRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeLimitsResponseUnmarshaller.Instance;return Invoke<DescribeLimitsResponse>(request, options);}
|
train
| true
|
9,618
|
public DescribeAssessmentTargetsResult describeAssessmentTargets(DescribeAssessmentTargetsRequest request) {request = beforeClientExecution(request);return executeDescribeAssessmentTargets(request);}
|
[
"public",
"DescribeAssessmentTargetsResult",
"describeAssessmentTargets",
"(",
"DescribeAssessmentTargetsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeAssessmentTargets",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeAssessmentTargetsResponse DescribeAssessmentTargets(DescribeAssessmentTargetsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeAssessmentTargetsRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeAssessmentTargetsResponseUnmarshaller.Instance;return Invoke<DescribeAssessmentTargetsResponse>(request, options);}
|
train
| true
|
9,619
|
public DeleteClientVpnRouteResult deleteClientVpnRoute(DeleteClientVpnRouteRequest request) {request = beforeClientExecution(request);return executeDeleteClientVpnRoute(request);}
|
[
"public",
"DeleteClientVpnRouteResult",
"deleteClientVpnRoute",
"(",
"DeleteClientVpnRouteRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteClientVpnRoute",
"(",
"request",
")",
";",
"}"
] |
public virtual DeleteClientVpnRouteResponse DeleteClientVpnRoute(DeleteClientVpnRouteRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteClientVpnRouteRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteClientVpnRouteResponseUnmarshaller.Instance;return Invoke<DeleteClientVpnRouteResponse>(request, options);}
|
train
| true
|
9,620
|
public RebaseCommand setUpstream(AnyObjectId upstream) {try {this.upstreamCommit = walk.parseCommit(upstream);this.upstreamCommitName = upstream.name();} catch (IOException e) {throw new JGitInternalException(MessageFormat.format(JGitText.get().couldNotReadObjectWhileParsingCommit,upstream.name()), e);}return this;}
|
[
"public",
"RebaseCommand",
"setUpstream",
"(",
"AnyObjectId",
"upstream",
")",
"{",
"try",
"{",
"this",
".",
"upstreamCommit",
"=",
"walk",
".",
"parseCommit",
"(",
"upstream",
")",
";",
"this",
".",
"upstreamCommitName",
"=",
"upstream",
".",
"name",
"(",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"throw",
"new",
"JGitInternalException",
"(",
"MessageFormat",
".",
"format",
"(",
"JGitText",
".",
"get",
"(",
")",
".",
"couldNotReadObjectWhileParsingCommit",
",",
"upstream",
".",
"name",
"(",
")",
")",
",",
"e",
")",
";",
"}",
"return",
"this",
";",
"}"
] |
public virtual NGit.Api.RebaseCommand SetUpstream(AnyObjectId upstream){try{this.upstreamCommit = walk.ParseCommit(upstream);this.upstreamCommitName = upstream.Name;}catch (IOException e){throw new JGitInternalException(MessageFormat.Format(JGitText.Get().couldNotReadObjectWhileParsingCommit, upstream.Name), e);}return this;}
|
train
| false
|
9,621
|
public Collection<ChildScorable> getChildren() {return Collections.singleton(new ChildScorable(in, "CACHED"));}
|
[
"public",
"Collection",
"<",
"ChildScorable",
">",
"getChildren",
"(",
")",
"{",
"return",
"Collections",
".",
"singleton",
"(",
"new",
"ChildScorable",
"(",
"in",
",",
"\"CACHED\"",
")",
")",
";",
"}"
] |
public override ICollection<ChildScorer> GetChildren(){return new[] { new ChildScorer(scorer, "CACHED") };}
|
train
| false
|
9,622
|
public synchronized String substring(int start) {return super.substring(start);}
|
[
"public",
"synchronized",
"String",
"substring",
"(",
"int",
"start",
")",
"{",
"return",
"super",
".",
"substring",
"(",
"start",
")",
";",
"}"
] |
public override string substring(int start){lock (this){return base.substring(start);}}
|
train
| false
|
9,623
|
public static double sum(double[] values) {double sum = 0;for (double value : values) {sum += value;}return sum;}
|
[
"public",
"static",
"double",
"sum",
"(",
"double",
"[",
"]",
"values",
")",
"{",
"double",
"sum",
"=",
"0",
";",
"for",
"(",
"double",
"value",
":",
"values",
")",
"{",
"sum",
"+=",
"value",
";",
"}",
"return",
"sum",
";",
"}"
] |
public static double Sum(double[] values){double sum = 0;for (int i = 0, iSize = values.Length; i < iSize; i++){sum += values[i];}return sum;}
|
train
| false
|
9,624
|
public static BlankRecord[] convertBlankRecords(MulBlankRecord mbk) {BlankRecord[] mulRecs = new BlankRecord[mbk.getNumColumns()];for (int k = 0; k < mbk.getNumColumns(); k++) {BlankRecord br = new BlankRecord();br.setColumn((short) (k + mbk.getFirstColumn()));br.setRow(mbk.getRow());br.setXFIndex(mbk.getXFAt(k));mulRecs[k] = br;}return mulRecs;}
|
[
"public",
"static",
"BlankRecord",
"[",
"]",
"convertBlankRecords",
"(",
"MulBlankRecord",
"mbk",
")",
"{",
"BlankRecord",
"[",
"]",
"mulRecs",
"=",
"new",
"BlankRecord",
"[",
"mbk",
".",
"getNumColumns",
"(",
")",
"]",
";",
"for",
"(",
"int",
"k",
"=",
"0",
";",
"k",
"<",
"mbk",
".",
"getNumColumns",
"(",
")",
";",
"k",
"++",
")",
"{",
"BlankRecord",
"br",
"=",
"new",
"BlankRecord",
"(",
")",
";",
"br",
".",
"setColumn",
"(",
"(",
"short",
")",
"(",
"k",
"+",
"mbk",
".",
"getFirstColumn",
"(",
")",
")",
")",
";",
"br",
".",
"setRow",
"(",
"mbk",
".",
"getRow",
"(",
")",
")",
";",
"br",
".",
"setXFIndex",
"(",
"mbk",
".",
"getXFAt",
"(",
"k",
")",
")",
";",
"mulRecs",
"[",
"k",
"]",
"=",
"br",
";",
"}",
"return",
"mulRecs",
";",
"}"
] |
public static BlankRecord[] ConvertBlankRecords(MulBlankRecord mbk){BlankRecord[] mulRecs = new BlankRecord[mbk.NumColumns];for (int k = 0; k < mbk.NumColumns; k++){BlankRecord br = new BlankRecord();br.Column = k + mbk.FirstColumn;br.Row = mbk.Row;br.XFIndex = mbk.GetXFAt(k);mulRecs[k] = br;}return mulRecs;}
|
train
| false
|
9,625
|
public DeregisterDBProxyTargetsResult deregisterDBProxyTargets(DeregisterDBProxyTargetsRequest request) {request = beforeClientExecution(request);return executeDeregisterDBProxyTargets(request);}
|
[
"public",
"DeregisterDBProxyTargetsResult",
"deregisterDBProxyTargets",
"(",
"DeregisterDBProxyTargetsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeregisterDBProxyTargets",
"(",
"request",
")",
";",
"}"
] |
public virtual DeregisterDBProxyTargetsResponse DeregisterDBProxyTargets(DeregisterDBProxyTargetsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeregisterDBProxyTargetsRequestMarshaller.Instance;options.ResponseUnmarshaller = DeregisterDBProxyTargetsResponseUnmarshaller.Instance;return Invoke<DeregisterDBProxyTargetsResponse>(request, options);}
|
train
| false
|
9,626
|
public SummaryInformation(final PropertySet ps) throws UnexpectedPropertySetTypeException {super(ps);if (!isSummaryInformation()) {throw new UnexpectedPropertySetTypeException("Not a " + getClass().getName());}}
|
[
"public",
"SummaryInformation",
"(",
"final",
"PropertySet",
"ps",
")",
"throws",
"UnexpectedPropertySetTypeException",
"{",
"super",
"(",
"ps",
")",
";",
"if",
"(",
"!",
"isSummaryInformation",
"(",
")",
")",
"{",
"throw",
"new",
"UnexpectedPropertySetTypeException",
"(",
"\"Not a \"",
"+",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
")",
";",
"}",
"}"
] |
public SummaryInformation(PropertySet ps): base(ps){if (!IsSummaryInformation)throw new UnexpectedPropertySetTypeException("Not a "+ GetType().Name);}
|
train
| false
|
9,627
|
public void setCredentialsProvider(AlibabaCloudCredentialsProvider credentialsProvider) {if (credential != null) {return;}credential = new CredentialsBackupCompatibilityAdaptor(credentialsProvider);}
|
[
"public",
"void",
"setCredentialsProvider",
"(",
"AlibabaCloudCredentialsProvider",
"credentialsProvider",
")",
"{",
"if",
"(",
"credential",
"!=",
"null",
")",
"{",
"return",
";",
"}",
"credential",
"=",
"new",
"CredentialsBackupCompatibilityAdaptor",
"(",
"credentialsProvider",
")",
";",
"}"
] |
public void SetCredentialsProvider(AlibabaCloudCredentialsProvider credentialsProvider){if (_credential != null){return;}_credential = new CredentialsBackupCompatibilityAdaptor(credentialsProvider);}
|
train
| false
|
9,628
|
public CharArrayReader(char[] buf, int offset, int length) {if (offset < 0 || offset > buf.length || length < 0 || offset + length < 0) {throw new IllegalArgumentException();}this.buf = buf;this.pos = offset;this.markedPos = offset;int bufferLength = buf.length;this.count = offset + length < bufferLength ? length : bufferLength;}
|
[
"public",
"CharArrayReader",
"(",
"char",
"[",
"]",
"buf",
",",
"int",
"offset",
",",
"int",
"length",
")",
"{",
"if",
"(",
"offset",
"<",
"0",
"||",
"offset",
">",
"buf",
".",
"length",
"||",
"length",
"<",
"0",
"||",
"offset",
"+",
"length",
"<",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"this",
".",
"buf",
"=",
"buf",
";",
"this",
".",
"pos",
"=",
"offset",
";",
"this",
".",
"markedPos",
"=",
"offset",
";",
"int",
"bufferLength",
"=",
"buf",
".",
"length",
";",
"this",
".",
"count",
"=",
"offset",
"+",
"length",
"<",
"bufferLength",
"?",
"length",
":",
"bufferLength",
";",
"}"
] |
public CharArrayReader(char[] buf, int offset, int length){if (offset < 0 || offset > buf.Length || length < 0 || offset + length < 0){throw new System.ArgumentException();}this.buf = buf;this.pos = offset;this.markedPos = offset;int bufferLength = buf.Length;this.count = offset + length < bufferLength ? length : bufferLength;}
|
train
| false
|
9,629
|
public Object getProperty(final long id) {wasNull = !properties.containsKey(id);return (wasNull) ? null : properties.get(id).getValue();}
|
[
"public",
"Object",
"getProperty",
"(",
"final",
"long",
"id",
")",
"{",
"wasNull",
"=",
"!",
"properties",
".",
"containsKey",
"(",
"id",
")",
";",
"return",
"(",
"wasNull",
")",
"?",
"null",
":",
"properties",
".",
"get",
"(",
"id",
")",
".",
"getValue",
"(",
")",
";",
"}"
] |
public virtual Object GetProperty(long id){wasNull = false;for (int i = 0; i < properties.Length; i++)if (id == properties[i].ID)return properties[i].Value;wasNull = true;return null;}
|
train
| false
|
9,630
|
public BufferedOutputStream(OutputStream out, int size) {super(out);if (size <= 0) {throw new IllegalArgumentException("size <= 0");}buf = new byte[size];}
|
[
"public",
"BufferedOutputStream",
"(",
"OutputStream",
"out",
",",
"int",
"size",
")",
"{",
"super",
"(",
"out",
")",
";",
"if",
"(",
"size",
"<=",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"size <= 0\"",
")",
";",
"}",
"buf",
"=",
"new",
"byte",
"[",
"size",
"]",
";",
"}"
] |
public BufferedOutputStream(java.io.OutputStream @out, int size) : base(@out){if (size <= 0){throw new System.ArgumentException("size <= 0");}buf = new byte[size];}
|
train
| false
|
9,631
|
public AuthorizeDBSecurityGroupIngressRequest(String dBSecurityGroupName) {setDBSecurityGroupName(dBSecurityGroupName);}
|
[
"public",
"AuthorizeDBSecurityGroupIngressRequest",
"(",
"String",
"dBSecurityGroupName",
")",
"{",
"setDBSecurityGroupName",
"(",
"dBSecurityGroupName",
")",
";",
"}"
] |
public AuthorizeDBSecurityGroupIngressRequest(string dbSecurityGroupName){_dbSecurityGroupName = dbSecurityGroupName;}
|
train
| false
|
9,632
|
public ArrayDataSource(T[] elements) {this.elements = elements.clone();}
|
[
"public",
"ArrayDataSource",
"(",
"T",
"[",
"]",
"elements",
")",
"{",
"this",
".",
"elements",
"=",
"elements",
".",
"clone",
"(",
")",
";",
"}"
] |
public ArrayDataSource(T[] elements) {this.elements = elements;}
|
train
| false
|
9,633
|
public CreateDeploymentResult createDeployment(CreateDeploymentRequest request) {request = beforeClientExecution(request);return executeCreateDeployment(request);}
|
[
"public",
"CreateDeploymentResult",
"createDeployment",
"(",
"CreateDeploymentRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCreateDeployment",
"(",
"request",
")",
";",
"}"
] |
public virtual CreateDeploymentResponse CreateDeployment(CreateDeploymentRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateDeploymentRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateDeploymentResponseUnmarshaller.Instance;return Invoke<CreateDeploymentResponse>(request, options);}
|
train
| true
|
9,634
|
public final int getInt() {int newPosition = position + SizeOf.INT;if (newPosition > limit) {throw new BufferUnderflowException();}int result = Memory.peekInt(backingArray, offset + position, order);position = newPosition;return result;}
|
[
"public",
"final",
"int",
"getInt",
"(",
")",
"{",
"int",
"newPosition",
"=",
"position",
"+",
"SizeOf",
".",
"INT",
";",
"if",
"(",
"newPosition",
">",
"limit",
")",
"{",
"throw",
"new",
"BufferUnderflowException",
"(",
")",
";",
"}",
"int",
"result",
"=",
"Memory",
".",
"peekInt",
"(",
"backingArray",
",",
"offset",
"+",
"position",
",",
"order",
")",
";",
"position",
"=",
"newPosition",
";",
"return",
"result",
";",
"}"
] |
public sealed override int getInt(){int newPosition = _position + libcore.io.SizeOf.INT;if (newPosition > _limit){throw new java.nio.BufferUnderflowException();}int result = libcore.io.Memory.peekInt(backingArray, offset + _position, _order);_position = newPosition;return result;}
|
train
| false
|
9,635
|
public DeleteTransitGatewayRouteResult deleteTransitGatewayRoute(DeleteTransitGatewayRouteRequest request) {request = beforeClientExecution(request);return executeDeleteTransitGatewayRoute(request);}
|
[
"public",
"DeleteTransitGatewayRouteResult",
"deleteTransitGatewayRoute",
"(",
"DeleteTransitGatewayRouteRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteTransitGatewayRoute",
"(",
"request",
")",
";",
"}"
] |
public virtual DeleteTransitGatewayRouteResponse DeleteTransitGatewayRoute(DeleteTransitGatewayRouteRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteTransitGatewayRouteRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteTransitGatewayRouteResponseUnmarshaller.Instance;return Invoke<DeleteTransitGatewayRouteResponse>(request, options);}
|
train
| true
|
9,636
|
public ListMultipartUploadsRequest(String bucketName) {this.bucketName = bucketName;}
|
[
"public",
"ListMultipartUploadsRequest",
"(",
"String",
"bucketName",
")",
"{",
"this",
".",
"bucketName",
"=",
"bucketName",
";",
"}"
] |
public ListMultipartUploadsRequest(string vaultName){_vaultName = vaultName;}
|
train
| false
|
9,637
|
public float score(float freq, long norm) {return (float) SimilarityBase.this.score(stats, freq, getLengthValue(norm));}
|
[
"public",
"float",
"score",
"(",
"float",
"freq",
",",
"long",
"norm",
")",
"{",
"return",
"(",
"float",
")",
"SimilarityBase",
".",
"this",
".",
"score",
"(",
"stats",
",",
"freq",
",",
"getLengthValue",
"(",
"norm",
")",
")",
";",
"}"
] |
public override float Score(int doc, float freq){return outerInstance.Score(stats, freq, norms == null ? 1F : outerInstance.DecodeNormValue((byte)norms.Get(doc)));}
|
train
| false
|
9,638
|
public char next() {if (offset >= (end - 1)) {offset = end;return DONE;}return string.charAt(++offset);}
|
[
"public",
"char",
"next",
"(",
")",
"{",
"if",
"(",
"offset",
">=",
"(",
"end",
"-",
"1",
")",
")",
"{",
"offset",
"=",
"end",
";",
"return",
"DONE",
";",
"}",
"return",
"string",
".",
"charAt",
"(",
"++",
"offset",
")",
";",
"}"
] |
public char next(){if (offset >= (end - 1)){offset = end;return java.text.CharacterIteratorClass.DONE;}return @string[++offset];}
|
train
| false
|
9,639
|
public CherryPickResult(RevCommit newHead, List<Ref> cherryPickedRefs) {this.status = CherryPickStatus.OK;this.newHead = newHead;this.cherryPickedRefs = cherryPickedRefs;this.failingPaths = null;}
|
[
"public",
"CherryPickResult",
"(",
"RevCommit",
"newHead",
",",
"List",
"<",
"Ref",
">",
"cherryPickedRefs",
")",
"{",
"this",
".",
"status",
"=",
"CherryPickStatus",
".",
"OK",
";",
"this",
".",
"newHead",
"=",
"newHead",
";",
"this",
".",
"cherryPickedRefs",
"=",
"cherryPickedRefs",
";",
"this",
".",
"failingPaths",
"=",
"null",
";",
"}"
] |
public CherryPickResult(RevCommit newHead, IList<Ref> cherryPickedRefs){this.status = CherryPickResult.CherryPickStatus.OK;this.newHead = newHead;this.cherryPickedRefs = cherryPickedRefs;this.failingPaths = null;}
|
train
| false
|
9,640
|
public static Token newToken(int ofKind){return newToken(ofKind, null);}
|
[
"public",
"static",
"Token",
"newToken",
"(",
"int",
"ofKind",
")",
"{",
"return",
"newToken",
"(",
"ofKind",
",",
"null",
")",
";",
"}"
] |
public static Token NewToken(int ofKind){return NewToken(ofKind, null);}
|
train
| false
|
9,641
|
public HSSFClientAnchor getPreferredSize(double scale){return getPreferredSize(scale, scale);}
|
[
"public",
"HSSFClientAnchor",
"getPreferredSize",
"(",
"double",
"scale",
")",
"{",
"return",
"getPreferredSize",
"(",
"scale",
",",
"scale",
")",
";",
"}"
] |
public IClientAnchor GetPreferredSize(double scale){return GetPreferredSize(scale, scale);}
|
train
| false
|
9,642
|
public UpdateInstanceRequest() {super("Ots", "2016-06-20", "UpdateInstance", "ots");setMethod(MethodType.POST);}
|
[
"public",
"UpdateInstanceRequest",
"(",
")",
"{",
"super",
"(",
"\"Ots\"",
",",
"\"2016-06-20\"",
",",
"\"UpdateInstance\"",
",",
"\"ots\"",
")",
";",
"setMethod",
"(",
"MethodType",
".",
"POST",
")",
";",
"}"
] |
public UpdateInstanceRequest(): base("Ots", "2016-06-20", "UpdateInstance", "ots", "openAPI"){Method = MethodType.POST;}
|
train
| false
|
9,643
|
public ByteBuffer putInt(int index, int value) {checkIndex(index, SizeOf.INT);Memory.pokeInt(backingArray, offset + index, value, order);return this;}
|
[
"public",
"ByteBuffer",
"putInt",
"(",
"int",
"index",
",",
"int",
"value",
")",
"{",
"checkIndex",
"(",
"index",
",",
"SizeOf",
".",
"INT",
")",
";",
"Memory",
".",
"pokeInt",
"(",
"backingArray",
",",
"offset",
"+",
"index",
",",
"value",
",",
"order",
")",
";",
"return",
"this",
";",
"}"
] |
public override java.nio.ByteBuffer putInt(int index, int value){checkIndex(index, libcore.io.SizeOf.INT);libcore.io.Memory.pokeInt(backingArray, offset + index, value, _order);return this;}
|
train
| false
|
9,644
|
public byte[] serialize() {int size = getDataSize() + 4;ByteArrayOutputStream baos = new ByteArrayOutputStream(size);serialize(new LittleEndianOutputStream(baos));if (baos.size() != size) {throw new RuntimeException("write size mismatch");}return baos.toByteArray();}
|
[
"public",
"byte",
"[",
"]",
"serialize",
"(",
")",
"{",
"int",
"size",
"=",
"getDataSize",
"(",
")",
"+",
"4",
";",
"ByteArrayOutputStream",
"baos",
"=",
"new",
"ByteArrayOutputStream",
"(",
"size",
")",
";",
"serialize",
"(",
"new",
"LittleEndianOutputStream",
"(",
"baos",
")",
")",
";",
"if",
"(",
"baos",
".",
"size",
"(",
")",
"!=",
"size",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"write size mismatch\"",
")",
";",
"}",
"return",
"baos",
".",
"toByteArray",
"(",
")",
";",
"}"
] |
public byte[] Serialize(){int size = DataSize + 4;using (MemoryStream baos = new MemoryStream(size)){Serialize(new LittleEndianOutputStream(baos));if (baos.Length != size){throw new Exception("write size mismatch");}return baos.ToArray();}}
|
train
| false
|
9,645
|
public GetFieldLevelEncryptionProfileResult getFieldLevelEncryptionProfile(GetFieldLevelEncryptionProfileRequest request) {request = beforeClientExecution(request);return executeGetFieldLevelEncryptionProfile(request);}
|
[
"public",
"GetFieldLevelEncryptionProfileResult",
"getFieldLevelEncryptionProfile",
"(",
"GetFieldLevelEncryptionProfileRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetFieldLevelEncryptionProfile",
"(",
"request",
")",
";",
"}"
] |
public virtual GetFieldLevelEncryptionProfileResponse GetFieldLevelEncryptionProfile(GetFieldLevelEncryptionProfileRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetFieldLevelEncryptionProfileRequestMarshaller.Instance;options.ResponseUnmarshaller = GetFieldLevelEncryptionProfileResponseUnmarshaller.Instance;return Invoke<GetFieldLevelEncryptionProfileResponse>(request, options);}
|
train
| true
|
9,646
|
public void serialize(LittleEndianOutput out) {out.writeShort(field_1_number_of_sheets);if(isExternalReferences()) {StringUtil.writeUnicodeString(out, field_2_encoded_url);for (String field_3_sheet_name : field_3_sheet_names) {StringUtil.writeUnicodeString(out, field_3_sheet_name);}} else {int field2val = _isAddInFunctions ? TAG_ADD_IN_FUNCTIONS : TAG_INTERNAL_REFERENCES;out.writeShort(field2val);}}
|
[
"public",
"void",
"serialize",
"(",
"LittleEndianOutput",
"out",
")",
"{",
"out",
".",
"writeShort",
"(",
"field_1_number_of_sheets",
")",
";",
"if",
"(",
"isExternalReferences",
"(",
")",
")",
"{",
"StringUtil",
".",
"writeUnicodeString",
"(",
"out",
",",
"field_2_encoded_url",
")",
";",
"for",
"(",
"String",
"field_3_sheet_name",
":",
"field_3_sheet_names",
")",
"{",
"StringUtil",
".",
"writeUnicodeString",
"(",
"out",
",",
"field_3_sheet_name",
")",
";",
"}",
"}",
"else",
"{",
"int",
"field2val",
"=",
"_isAddInFunctions",
"?",
"TAG_ADD_IN_FUNCTIONS",
":",
"TAG_INTERNAL_REFERENCES",
";",
"out",
".",
"writeShort",
"(",
"field2val",
")",
";",
"}",
"}"
] |
public override void Serialize(ILittleEndianOutput out1){out1.WriteShort(field_1_number_of_sheets);if (IsExternalReferences){StringUtil.WriteUnicodeString(out1, field_2_encoded_url);for (int i = 0; i < field_3_sheet_names.Length; i++){StringUtil.WriteUnicodeString(out1, field_3_sheet_names[i]);}}else{int field2val = _isAddInFunctions ? TAG_ADD_IN_FUNCTIONS : TAG_INTERNAL_REFERENCES;out1.WriteShort(field2val);}}
|
train
| false
|
9,647
|
public BitsSlice(Bits parent, ReaderSlice slice) {this.parent = parent;this.start = slice.start;this.length = slice.length;assert length >= 0: "length=" + length;}
|
[
"public",
"BitsSlice",
"(",
"Bits",
"parent",
",",
"ReaderSlice",
"slice",
")",
"{",
"this",
".",
"parent",
"=",
"parent",
";",
"this",
".",
"start",
"=",
"slice",
".",
"start",
";",
"this",
".",
"length",
"=",
"slice",
".",
"length",
";",
"assert",
"length",
">=",
"0",
":",
"\"length=\"",
"+",
"length",
";",
"}"
] |
public BitsSlice(IBits parent, ReaderSlice slice){this.parent = parent;this.start = slice.Start;this.length = slice.Length;Debug.Assert(length >= 0, "length=" + length);}
|
train
| false
|
9,649
|
public ListConfigurationRevisionsResult listConfigurationRevisions(ListConfigurationRevisionsRequest request) {request = beforeClientExecution(request);return executeListConfigurationRevisions(request);}
|
[
"public",
"ListConfigurationRevisionsResult",
"listConfigurationRevisions",
"(",
"ListConfigurationRevisionsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListConfigurationRevisions",
"(",
"request",
")",
";",
"}"
] |
public virtual ListConfigurationRevisionsResponse ListConfigurationRevisions(ListConfigurationRevisionsRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListConfigurationRevisionsRequestMarshaller.Instance;options.ResponseUnmarshaller = ListConfigurationRevisionsResponseUnmarshaller.Instance;return Invoke<ListConfigurationRevisionsResponse>(request, options);}
|
train
| true
|
9,650
|
public ObjectStream openStream() {return new ObjectStream.SmallStream(this);}
|
[
"public",
"ObjectStream",
"openStream",
"(",
")",
"{",
"return",
"new",
"ObjectStream",
".",
"SmallStream",
"(",
"this",
")",
";",
"}"
] |
public override ObjectStream OpenStream(){return new ObjectStream.SmallStream(this);}
|
train
| false
|
9,651
|
public boolean delete() {return directory.delete();}
|
[
"public",
"boolean",
"delete",
"(",
")",
"{",
"return",
"directory",
".",
"delete",
"(",
")",
";",
"}"
] |
public bool Delete(){return directory.Delete();}
|
train
| false
|
9,652
|
public void clear(){_limit = 0;}
|
[
"public",
"void",
"clear",
"(",
")",
"{",
"_limit",
"=",
"0",
";",
"}"
] |
public void Clear(){_limit = 0;}
|
train
| false
|
9,653
|
public void setMaxObjectSizeLimit(long limit) {maxObjectSizeLimit = limit;}
|
[
"public",
"void",
"setMaxObjectSizeLimit",
"(",
"long",
"limit",
")",
"{",
"maxObjectSizeLimit",
"=",
"limit",
";",
"}"
] |
public virtual void SetMaxObjectSizeLimit(long limit){maxObjectSizeLimit = limit;}
|
train
| false
|
9,654
|
public DescribeEventSubscriptionsResult describeEventSubscriptions(DescribeEventSubscriptionsRequest request) {request = beforeClientExecution(request);return executeDescribeEventSubscriptions(request);}
|
[
"public",
"DescribeEventSubscriptionsResult",
"describeEventSubscriptions",
"(",
"DescribeEventSubscriptionsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeEventSubscriptions",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeEventSubscriptionsResponse DescribeEventSubscriptions(DescribeEventSubscriptionsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeEventSubscriptionsRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeEventSubscriptionsResponseUnmarshaller.Instance;return Invoke<DescribeEventSubscriptionsResponse>(request, options);}
|
train
| true
|
9,655
|
public boolean startEvaluate(FormulaCellCacheEntry cce) {if (cce == null) {throw new IllegalArgumentException("cellLoc must not be null");}if (_currentlyEvaluatingCells.contains(cce)) {return false;}_currentlyEvaluatingCells.add(cce);_evaluationFrames.add(new CellEvaluationFrame(cce));return true;}
|
[
"public",
"boolean",
"startEvaluate",
"(",
"FormulaCellCacheEntry",
"cce",
")",
"{",
"if",
"(",
"cce",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"cellLoc must not be null\"",
")",
";",
"}",
"if",
"(",
"_currentlyEvaluatingCells",
".",
"contains",
"(",
"cce",
")",
")",
"{",
"return",
"false",
";",
"}",
"_currentlyEvaluatingCells",
".",
"add",
"(",
"cce",
")",
";",
"_evaluationFrames",
".",
"add",
"(",
"new",
"CellEvaluationFrame",
"(",
"cce",
")",
")",
";",
"return",
"true",
";",
"}"
] |
public bool StartEvaluate(FormulaCellCacheEntry cce){if (cce == null){throw new ArgumentException("cellLoc must not be null");}if (_currentlyEvaluatingCells.Contains(cce)){return false;}_currentlyEvaluatingCells.Add(cce);_evaluationFrames.Add(new CellEvaluationFrame(cce));return true;}
|
train
| false
|
9,656
|
public void serialize(LittleEndianOutput out) {out.writeShort(sid);out.writeShort(_cbFContinued);if (_linkPtg == null) {out.writeShort(0);} else {int formulaSize = _linkPtg.getSize();int linkSize = formulaSize + 6;if (_unknownPostFormulaByte != null) {linkSize++;}out.writeShort(linkSize);out.writeShort(formulaSize);out.writeInt(_unknownPreFormulaInt);_linkPtg.write(out);if (_unknownPostFormulaByte != null) {out.writeByte(_unknownPostFormulaByte.intValue());}}out.writeShort(_cLines);out.writeShort(_iSel);out.writeShort(_flags);out.writeShort(_idEdit);if(_dropData != null) {_dropData.serialize(out);}if(_rgLines != null) {for(String str : _rgLines){StringUtil.writeUnicodeString(out, str);}}if(_bsels != null) {for(boolean val : _bsels){out.writeByte(val ? 1 : 0);}}}
|
[
"public",
"void",
"serialize",
"(",
"LittleEndianOutput",
"out",
")",
"{",
"out",
".",
"writeShort",
"(",
"sid",
")",
";",
"out",
".",
"writeShort",
"(",
"_cbFContinued",
")",
";",
"if",
"(",
"_linkPtg",
"==",
"null",
")",
"{",
"out",
".",
"writeShort",
"(",
"0",
")",
";",
"}",
"else",
"{",
"int",
"formulaSize",
"=",
"_linkPtg",
".",
"getSize",
"(",
")",
";",
"int",
"linkSize",
"=",
"formulaSize",
"+",
"6",
";",
"if",
"(",
"_unknownPostFormulaByte",
"!=",
"null",
")",
"{",
"linkSize",
"++",
";",
"}",
"out",
".",
"writeShort",
"(",
"linkSize",
")",
";",
"out",
".",
"writeShort",
"(",
"formulaSize",
")",
";",
"out",
".",
"writeInt",
"(",
"_unknownPreFormulaInt",
")",
";",
"_linkPtg",
".",
"write",
"(",
"out",
")",
";",
"if",
"(",
"_unknownPostFormulaByte",
"!=",
"null",
")",
"{",
"out",
".",
"writeByte",
"(",
"_unknownPostFormulaByte",
".",
"intValue",
"(",
")",
")",
";",
"}",
"}",
"out",
".",
"writeShort",
"(",
"_cLines",
")",
";",
"out",
".",
"writeShort",
"(",
"_iSel",
")",
";",
"out",
".",
"writeShort",
"(",
"_flags",
")",
";",
"out",
".",
"writeShort",
"(",
"_idEdit",
")",
";",
"if",
"(",
"_dropData",
"!=",
"null",
")",
"{",
"_dropData",
".",
"serialize",
"(",
"out",
")",
";",
"}",
"if",
"(",
"_rgLines",
"!=",
"null",
")",
"{",
"for",
"(",
"String",
"str",
":",
"_rgLines",
")",
"{",
"StringUtil",
".",
"writeUnicodeString",
"(",
"out",
",",
"str",
")",
";",
"}",
"}",
"if",
"(",
"_bsels",
"!=",
"null",
")",
"{",
"for",
"(",
"boolean",
"val",
":",
"_bsels",
")",
"{",
"out",
".",
"writeByte",
"(",
"val",
"?",
"1",
":",
"0",
")",
";",
"}",
"}",
"}"
] |
public override void Serialize(ILittleEndianOutput out1){out1.WriteShort(sid);out1.WriteShort(_cbFContinued); if (_linkPtg == null){out1.WriteShort(0);}else{int formulaSize = _linkPtg.Size;int linkSize = formulaSize + 6;if (_unknownPostFormulaByte != null){linkSize++;}out1.WriteShort(linkSize);out1.WriteShort(formulaSize);out1.WriteInt(_unknownPreFormulaInt);_linkPtg.Write(out1);if (_unknownPostFormulaByte != null){out1.WriteByte(Convert.ToByte(_unknownPostFormulaByte, CultureInfo.InvariantCulture));}}out1.WriteShort(_cLines);out1.WriteShort(_iSel);out1.WriteShort(_flags);out1.WriteShort(_idEdit);if (_dropData != null){_dropData.Serialize(out1);}if (_rgLines != null){foreach (String str in _rgLines){StringUtil.WriteUnicodeString(out1, str);}}if (_bsels != null){foreach (bool val in _bsels){out1.WriteByte(val ? 1 : 0);}}}
|
train
| false
|
9,657
|
public void remove(int el) {if ( readonly ) throw new IllegalStateException("can't alter readonly IntervalSet");int n = intervals.size();for (int i = 0; i < n; i++) {Interval I = intervals.get(i);int a = I.a;int b = I.b;if ( el<a ) {break; }if ( el==a && el==b ) {intervals.remove(i);break;}if ( el==a ) {I.a++;break;}if ( el==b ) {I.b--;break;}if ( el>a && el<b ) { int oldb = I.b;I.b = el-1; add(el+1, oldb); }}}
|
[
"public",
"void",
"remove",
"(",
"int",
"el",
")",
"{",
"if",
"(",
"readonly",
")",
"throw",
"new",
"IllegalStateException",
"(",
"\"can't alter readonly IntervalSet\"",
")",
";",
"int",
"n",
"=",
"intervals",
".",
"size",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"n",
";",
"i",
"++",
")",
"{",
"Interval",
"I",
"=",
"intervals",
".",
"get",
"(",
"i",
")",
";",
"int",
"a",
"=",
"I",
".",
"a",
";",
"int",
"b",
"=",
"I",
".",
"b",
";",
"if",
"(",
"el",
"<",
"a",
")",
"{",
"break",
";",
"}",
"if",
"(",
"el",
"==",
"a",
"&&",
"el",
"==",
"b",
")",
"{",
"intervals",
".",
"remove",
"(",
"i",
")",
";",
"break",
";",
"}",
"if",
"(",
"el",
"==",
"a",
")",
"{",
"I",
".",
"a",
"++",
";",
"break",
";",
"}",
"if",
"(",
"el",
"==",
"b",
")",
"{",
"I",
".",
"b",
"--",
";",
"break",
";",
"}",
"if",
"(",
"el",
">",
"a",
"&&",
"el",
"<",
"b",
")",
"{",
"int",
"oldb",
"=",
"I",
".",
"b",
";",
"I",
".",
"b",
"=",
"el",
"-",
"1",
";",
"add",
"(",
"el",
"+",
"1",
",",
"oldb",
")",
";",
"}",
"}",
"}"
] |
public virtual void Remove(int el){if (@readonly){throw new InvalidOperationException("can't alter readonly IntervalSet");}int n = intervals.Count;for (int i = 0; i < n; i++){Interval I = intervals[i];int a = I.a;int b = I.b;if (el < a){break;}if (el == a && el == b){intervals.RemoveAt(i);break;}if (el == a){intervals[i] = Interval.Of(I.a + 1, I.b);break;}if (el == b){intervals[i] = Interval.Of(I.a, I.b - 1);break;}if (el > a && el < b){int oldb = I.b;intervals[i] = Interval.Of(I.a, el - 1);Add(el + 1, oldb);}}}
|
train
| false
|
9,658
|
public IntegerList toIntegerList() {IntegerList values = new IntegerList(size());int n = intervals.size();for (int i = 0; i < n; i++) {Interval I = intervals.get(i);int a = I.a;int b = I.b;for (int v=a; v<=b; v++) {values.add(v);}}return values;}
|
[
"public",
"IntegerList",
"toIntegerList",
"(",
")",
"{",
"IntegerList",
"values",
"=",
"new",
"IntegerList",
"(",
"size",
"(",
")",
")",
";",
"int",
"n",
"=",
"intervals",
".",
"size",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"n",
";",
"i",
"++",
")",
"{",
"Interval",
"I",
"=",
"intervals",
".",
"get",
"(",
"i",
")",
";",
"int",
"a",
"=",
"I",
".",
"a",
";",
"int",
"b",
"=",
"I",
".",
"b",
";",
"for",
"(",
"int",
"v",
"=",
"a",
";",
"v",
"<=",
"b",
";",
"v",
"++",
")",
"{",
"values",
".",
"add",
"(",
"v",
")",
";",
"}",
"}",
"return",
"values",
";",
"}"
] |
public virtual ArrayList<int> ToIntegerList(){ArrayList<int> values = new ArrayList<int>(Count);int n = intervals.Count;for (int i = 0; i < n; i++){Interval I = intervals[i];int a = I.a;int b = I.b;for (int v = a; v <= b; v++){values.Add(v);}}return values;}
|
train
| false
|
9,659
|
@Override public void clear() {AbstractMultimap.this.clear();}
|
[
"@",
"Override",
"public",
"void",
"clear",
"(",
")",
"{",
"AbstractMultimap",
".",
"this",
".",
"clear",
"(",
")",
";",
"}"
] |
public override void clear(){this._enclosing.clear();}
|
train
| false
|
9,660
|
public CharsRef pullNext() {assert upto < count;lastEndOffset = endOffsets[upto];lastPosLength = posLengths[upto];final CharsRefBuilder result = outputs[upto++];posIncr = 0;if (upto == count) {reset();}return result.get();}
|
[
"public",
"CharsRef",
"pullNext",
"(",
")",
"{",
"assert",
"upto",
"<",
"count",
";",
"lastEndOffset",
"=",
"endOffsets",
"[",
"upto",
"]",
";",
"lastPosLength",
"=",
"posLengths",
"[",
"upto",
"]",
";",
"final",
"CharsRefBuilder",
"result",
"=",
"outputs",
"[",
"upto",
"++",
"]",
";",
"posIncr",
"=",
"0",
";",
"if",
"(",
"upto",
"==",
"count",
")",
"{",
"reset",
"(",
")",
";",
"}",
"return",
"result",
".",
"get",
"(",
")",
";",
"}"
] |
public virtual CharsRef PullNext(){Debug.Assert(upto < count);lastEndOffset = endOffsets[upto];lastPosLength = posLengths[upto];CharsRef result = outputs[upto++];posIncr = 0;if (upto == count){Reset();}return result;}
|
train
| false
|
9,661
|
public FSTTermsWriter(SegmentWriteState state, PostingsWriterBase postingsWriter) throws IOException {final String termsFileName = IndexFileNames.segmentFileName(state.segmentInfo.name, state.segmentSuffix, TERMS_EXTENSION);this.postingsWriter = postingsWriter;this.fieldInfos = state.fieldInfos;this.out = state.directory.createOutput(termsFileName, state.context);this.maxDoc = state.segmentInfo.maxDoc();boolean success = false;try {CodecUtil.writeIndexHeader(out, TERMS_CODEC_NAME, TERMS_VERSION_CURRENT,state.segmentInfo.getId(), state.segmentSuffix);this.postingsWriter.init(out, state);success = true;} finally {if (!success) {IOUtils.closeWhileHandlingException(out);}}}
|
[
"public",
"FSTTermsWriter",
"(",
"SegmentWriteState",
"state",
",",
"PostingsWriterBase",
"postingsWriter",
")",
"throws",
"IOException",
"{",
"final",
"String",
"termsFileName",
"=",
"IndexFileNames",
".",
"segmentFileName",
"(",
"state",
".",
"segmentInfo",
".",
"name",
",",
"state",
".",
"segmentSuffix",
",",
"TERMS_EXTENSION",
")",
";",
"this",
".",
"postingsWriter",
"=",
"postingsWriter",
";",
"this",
".",
"fieldInfos",
"=",
"state",
".",
"fieldInfos",
";",
"this",
".",
"out",
"=",
"state",
".",
"directory",
".",
"createOutput",
"(",
"termsFileName",
",",
"state",
".",
"context",
")",
";",
"this",
".",
"maxDoc",
"=",
"state",
".",
"segmentInfo",
".",
"maxDoc",
"(",
")",
";",
"boolean",
"success",
"=",
"false",
";",
"try",
"{",
"CodecUtil",
".",
"writeIndexHeader",
"(",
"out",
",",
"TERMS_CODEC_NAME",
",",
"TERMS_VERSION_CURRENT",
",",
"state",
".",
"segmentInfo",
".",
"getId",
"(",
")",
",",
"state",
".",
"segmentSuffix",
")",
";",
"this",
".",
"postingsWriter",
".",
"init",
"(",
"out",
",",
"state",
")",
";",
"success",
"=",
"true",
";",
"}",
"finally",
"{",
"if",
"(",
"!",
"success",
")",
"{",
"IOUtils",
".",
"closeWhileHandlingException",
"(",
"out",
")",
";",
"}",
"}",
"}"
] |
public FSTTermsWriter(SegmentWriteState state, PostingsWriterBase postingsWriter){var termsFileName = IndexFileNames.SegmentFileName(state.SegmentInfo.Name, state.SegmentSuffix,TERMS_EXTENSION);_postingsWriter = postingsWriter;_fieldInfos = state.FieldInfos;_output = state.Directory.CreateOutput(termsFileName, state.Context);var success = false;try{WriteHeader(_output);_postingsWriter.Init(_output);success = true;}finally{if (!success){IOUtils.DisposeWhileHandlingException(_output);}}}
|
train
| false
|
9,662
|
public int compareTo(Cell other) {return Double.compare(distanceSortKey, other.distanceSortKey);}
|
[
"public",
"int",
"compareTo",
"(",
"Cell",
"other",
")",
"{",
"return",
"Double",
".",
"compare",
"(",
"distanceSortKey",
",",
"other",
".",
"distanceSortKey",
")",
";",
"}"
] |
public virtual int CompareTo(Cell o){return string.CompareOrdinal(TokenString, o.TokenString);}
|
train
| false
|
9,663
|
public ListAccountSettingsResult listAccountSettings(ListAccountSettingsRequest request) {request = beforeClientExecution(request);return executeListAccountSettings(request);}
|
[
"public",
"ListAccountSettingsResult",
"listAccountSettings",
"(",
"ListAccountSettingsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListAccountSettings",
"(",
"request",
")",
";",
"}"
] |
public virtual ListAccountSettingsResponse ListAccountSettings(ListAccountSettingsRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListAccountSettingsRequestMarshaller.Instance;options.ResponseUnmarshaller = ListAccountSettingsResponseUnmarshaller.Instance;return Invoke<ListAccountSettingsResponse>(request, options);}
|
train
| true
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.