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 |
|---|---|---|---|---|---|
1,926
|
public DoubleList() {_array = new double[8];_count = 0;}
|
[
"public",
"DoubleList",
"(",
")",
"{",
"_array",
"=",
"new",
"double",
"[",
"8",
"]",
";",
"_count",
"=",
"0",
";",
"}"
] |
public DoubleList(){_array = new double[8];_Count = 0;}
|
train
| false
|
1,927
|
public AddNoteCommand setMessage(String message) {checkCallable();this.message = message;return this;}
|
[
"public",
"AddNoteCommand",
"setMessage",
"(",
"String",
"message",
")",
"{",
"checkCallable",
"(",
")",
";",
"this",
".",
"message",
"=",
"message",
";",
"return",
"this",
";",
"}"
] |
public virtual NGit.Api.AddNoteCommand SetMessage(string message){CheckCallable();this.message = message;return this;}
|
train
| false
|
1,928
|
public SerializationHandleMap() {this.size = 0;this.threshold = 21; int arraySize = (int) (((long) threshold * 10000) / LOAD_FACTOR);resizeArrays(arraySize);}
|
[
"public",
"SerializationHandleMap",
"(",
")",
"{",
"this",
".",
"size",
"=",
"0",
";",
"this",
".",
"threshold",
"=",
"21",
";",
"int",
"arraySize",
"=",
"(",
"int",
")",
"(",
"(",
"(",
"long",
")",
"threshold",
"*",
"10000",
")",
"/",
"LOAD_FACTOR",
")",
";",
"resizeArrays",
"(",
"arraySize",
")",
";",
"}"
] |
public SerializationHandleMap(){this.size = 0;this.threshold = 21;int arraySize = (int)(((long)threshold * 10000) / LOAD_FACTOR);resizeArrays(arraySize);}
|
train
| false
|
1,929
|
public PagedBytes(int blockBits) {assert blockBits > 0 && blockBits <= 31 : blockBits;this.blockSize = 1 << blockBits;this.blockBits = blockBits;blockMask = blockSize-1;upto = blockSize;bytesUsedPerBlock = RamUsageEstimator.alignObjectSize(blockSize + RamUsageEstimator.NUM_BYTES_ARRAY_HEADER);numBlocks = 0;}
|
[
"public",
"PagedBytes",
"(",
"int",
"blockBits",
")",
"{",
"assert",
"blockBits",
">",
"0",
"&&",
"blockBits",
"<=",
"31",
":",
"blockBits",
";",
"this",
".",
"blockSize",
"=",
"1",
"<<",
"blockBits",
";",
"this",
".",
"blockBits",
"=",
"blockBits",
";",
"blockMask",
"=",
"blockSize",
"-",
"1",
";",
"upto",
"=",
"blockSize",
";",
"bytesUsedPerBlock",
"=",
"RamUsageEstimator",
".",
"alignObjectSize",
"(",
"blockSize",
"+",
"RamUsageEstimator",
".",
"NUM_BYTES_ARRAY_HEADER",
")",
";",
"numBlocks",
"=",
"0",
";",
"}"
] |
public PagedBytes(int blockBits){Debug.Assert(blockBits > 0 && blockBits <= 31, blockBits.ToString());this.blockSize = 1 << blockBits;this.blockBits = blockBits;blockMask = blockSize - 1;upto = blockSize;bytesUsedPerBlock = blockSize + RamUsageEstimator.NUM_BYTES_ARRAY_HEADER + RamUsageEstimator.NUM_BYTES_OBJECT_REF;}
|
train
| false
|
1,930
|
public IncreaseReplicationFactorResult increaseReplicationFactor(IncreaseReplicationFactorRequest request) {request = beforeClientExecution(request);return executeIncreaseReplicationFactor(request);}
|
[
"public",
"IncreaseReplicationFactorResult",
"increaseReplicationFactor",
"(",
"IncreaseReplicationFactorRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeIncreaseReplicationFactor",
"(",
"request",
")",
";",
"}"
] |
public virtual IncreaseReplicationFactorResponse IncreaseReplicationFactor(IncreaseReplicationFactorRequest request){var options = new InvokeOptions();options.RequestMarshaller = IncreaseReplicationFactorRequestMarshaller.Instance;options.ResponseUnmarshaller = IncreaseReplicationFactorResponseUnmarshaller.Instance;return Invoke<IncreaseReplicationFactorResponse>(request, options);}
|
train
| true
|
1,931
|
public UpdateRuntimeConfigurationResult updateRuntimeConfiguration(UpdateRuntimeConfigurationRequest request) {request = beforeClientExecution(request);return executeUpdateRuntimeConfiguration(request);}
|
[
"public",
"UpdateRuntimeConfigurationResult",
"updateRuntimeConfiguration",
"(",
"UpdateRuntimeConfigurationRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateRuntimeConfiguration",
"(",
"request",
")",
";",
"}"
] |
public virtual UpdateRuntimeConfigurationResponse UpdateRuntimeConfiguration(UpdateRuntimeConfigurationRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateRuntimeConfigurationRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateRuntimeConfigurationResponseUnmarshaller.Instance;return Invoke<UpdateRuntimeConfigurationResponse>(request, options);}
|
train
| true
|
1,932
|
public char getChar(Map<String,String> args, String name, char defaultValue) {String s = args.remove(name);if (s == null) {return defaultValue;} else {if (s.length() != 1) {throw new IllegalArgumentException(name + " should be a char. \"" + s + "\" is invalid");} else {return s.charAt(0);}}}
|
[
"public",
"char",
"getChar",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"args",
",",
"String",
"name",
",",
"char",
"defaultValue",
")",
"{",
"String",
"s",
"=",
"args",
".",
"remove",
"(",
"name",
")",
";",
"if",
"(",
"s",
"==",
"null",
")",
"{",
"return",
"defaultValue",
";",
"}",
"else",
"{",
"if",
"(",
"s",
".",
"length",
"(",
")",
"!=",
"1",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"name",
"+",
"\" should be a char. \\\"\"",
"+",
"s",
"+",
"\"\\\" is invalid\"",
")",
";",
"}",
"else",
"{",
"return",
"s",
".",
"charAt",
"(",
"0",
")",
";",
"}",
"}",
"}"
] |
public virtual char GetChar(IDictionary<string, string> args, string name, char defaultVal){string s;if (args.TryGetValue(name, out s)){args.Remove(name);if (s.Length != 1){throw new System.ArgumentException(name + " should be a char. \"" + s + "\" is invalid");}else{return s[0];}}return defaultVal;}
|
train
| false
|
1,933
|
public void notifyListeners(LexerNoViableAltException e) {String text = _input.getText(Interval.of(_tokenStartCharIndex, _input.index()));String msg = "token recognition error at: '"+ getErrorDisplay(text) + "'";ANTLRErrorListener listener = getErrorListenerDispatch();listener.syntaxError(this, null, _tokenStartLine, _tokenStartCharPositionInLine, msg, e);}
|
[
"public",
"void",
"notifyListeners",
"(",
"LexerNoViableAltException",
"e",
")",
"{",
"String",
"text",
"=",
"_input",
".",
"getText",
"(",
"Interval",
".",
"of",
"(",
"_tokenStartCharIndex",
",",
"_input",
".",
"index",
"(",
")",
")",
")",
";",
"String",
"msg",
"=",
"\"token recognition error at: '\"",
"+",
"getErrorDisplay",
"(",
"text",
")",
"+",
"\"'\"",
";",
"ANTLRErrorListener",
"listener",
"=",
"getErrorListenerDispatch",
"(",
")",
";",
"listener",
".",
"syntaxError",
"(",
"this",
",",
"null",
",",
"_tokenStartLine",
",",
"_tokenStartCharPositionInLine",
",",
"msg",
",",
"e",
")",
";",
"}"
] |
public virtual void NotifyListeners(LexerNoViableAltException e){string text = _input.GetText(Interval.Of(_tokenStartCharIndex, _input.Index));string msg = "token recognition error at: '" + GetErrorDisplay(text) + "'";IAntlrErrorListener<int> listener = ErrorListenerDispatch;listener.SyntaxError(ErrorOutput, this, 0, _tokenStartLine, _tokenStartColumn, msg, e);}
|
train
| true
|
1,935
|
public ChangeMessageVisibilityBatchRequest(String queueUrl, java.util.List<ChangeMessageVisibilityBatchRequestEntry> entries) {setQueueUrl(queueUrl);setEntries(entries);}
|
[
"public",
"ChangeMessageVisibilityBatchRequest",
"(",
"String",
"queueUrl",
",",
"java",
".",
"util",
".",
"List",
"<",
"ChangeMessageVisibilityBatchRequestEntry",
">",
"entries",
")",
"{",
"setQueueUrl",
"(",
"queueUrl",
")",
";",
"setEntries",
"(",
"entries",
")",
";",
"}"
] |
public ChangeMessageVisibilityBatchRequest(string queueUrl, List<ChangeMessageVisibilityBatchRequestEntry> entries){_queueUrl = queueUrl;_entries = entries;}
|
train
| false
|
1,936
|
public GetExportJobResult getExportJob(GetExportJobRequest request) {request = beforeClientExecution(request);return executeGetExportJob(request);}
|
[
"public",
"GetExportJobResult",
"getExportJob",
"(",
"GetExportJobRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetExportJob",
"(",
"request",
")",
";",
"}"
] |
public virtual GetExportJobResponse GetExportJob(GetExportJobRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetExportJobRequestMarshaller.Instance;options.ResponseUnmarshaller = GetExportJobResponseUnmarshaller.Instance;return Invoke<GetExportJobResponse>(request, options);}
|
train
| true
|
1,937
|
public AddRoleToDBInstanceResult addRoleToDBInstance(AddRoleToDBInstanceRequest request) {request = beforeClientExecution(request);return executeAddRoleToDBInstance(request);}
|
[
"public",
"AddRoleToDBInstanceResult",
"addRoleToDBInstance",
"(",
"AddRoleToDBInstanceRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeAddRoleToDBInstance",
"(",
"request",
")",
";",
"}"
] |
public virtual AddRoleToDBInstanceResponse AddRoleToDBInstance(AddRoleToDBInstanceRequest request){var options = new InvokeOptions();options.RequestMarshaller = AddRoleToDBInstanceRequestMarshaller.Instance;options.ResponseUnmarshaller = AddRoleToDBInstanceResponseUnmarshaller.Instance;return Invoke<AddRoleToDBInstanceResponse>(request, options);}
|
train
| true
|
1,938
|
public DeregisterInstancesFromLoadBalancerResult deregisterInstancesFromLoadBalancer(DeregisterInstancesFromLoadBalancerRequest request) {request = beforeClientExecution(request);return executeDeregisterInstancesFromLoadBalancer(request);}
|
[
"public",
"DeregisterInstancesFromLoadBalancerResult",
"deregisterInstancesFromLoadBalancer",
"(",
"DeregisterInstancesFromLoadBalancerRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeregisterInstancesFromLoadBalancer",
"(",
"request",
")",
";",
"}"
] |
public virtual DeregisterInstancesFromLoadBalancerResponse DeregisterInstancesFromLoadBalancer(DeregisterInstancesFromLoadBalancerRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeregisterInstancesFromLoadBalancerRequestMarshaller.Instance;options.ResponseUnmarshaller = DeregisterInstancesFromLoadBalancerResponseUnmarshaller.Instance;return Invoke<DeregisterInstancesFromLoadBalancerResponse>(request, options);}
|
train
| true
|
1,939
|
public synchronized StringBuffer insert(int index, char ch) {insert0(index, ch);return this;}
|
[
"public",
"synchronized",
"StringBuffer",
"insert",
"(",
"int",
"index",
",",
"char",
"ch",
")",
"{",
"insert0",
"(",
"index",
",",
"ch",
")",
";",
"return",
"this",
";",
"}"
] |
public java.lang.StringBuffer insert(int index, char ch){lock (this){insert0(index, ch);return this;}}
|
train
| false
|
1,940
|
public DownloadDBLogFilePortionResult downloadDBLogFilePortion(DownloadDBLogFilePortionRequest request) {request = beforeClientExecution(request);return executeDownloadDBLogFilePortion(request);}
|
[
"public",
"DownloadDBLogFilePortionResult",
"downloadDBLogFilePortion",
"(",
"DownloadDBLogFilePortionRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDownloadDBLogFilePortion",
"(",
"request",
")",
";",
"}"
] |
public virtual DownloadDBLogFilePortionResponse DownloadDBLogFilePortion(DownloadDBLogFilePortionRequest request){var options = new InvokeOptions();options.RequestMarshaller = DownloadDBLogFilePortionRequestMarshaller.Instance;options.ResponseUnmarshaller = DownloadDBLogFilePortionResponseUnmarshaller.Instance;return Invoke<DownloadDBLogFilePortionResponse>(request, options);}
|
train
| true
|
1,941
|
public GetStaticIpResult getStaticIp(GetStaticIpRequest request) {request = beforeClientExecution(request);return executeGetStaticIp(request);}
|
[
"public",
"GetStaticIpResult",
"getStaticIp",
"(",
"GetStaticIpRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetStaticIp",
"(",
"request",
")",
";",
"}"
] |
public virtual GetStaticIpResponse GetStaticIp(GetStaticIpRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetStaticIpRequestMarshaller.Instance;options.ResponseUnmarshaller = GetStaticIpResponseUnmarshaller.Instance;return Invoke<GetStaticIpResponse>(request, options);}
|
train
| true
|
1,942
|
public CreateUsagePlanResult createUsagePlan(CreateUsagePlanRequest request) {request = beforeClientExecution(request);return executeCreateUsagePlan(request);}
|
[
"public",
"CreateUsagePlanResult",
"createUsagePlan",
"(",
"CreateUsagePlanRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCreateUsagePlan",
"(",
"request",
")",
";",
"}"
] |
public virtual CreateUsagePlanResponse CreateUsagePlan(CreateUsagePlanRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateUsagePlanRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateUsagePlanResponseUnmarshaller.Instance;return Invoke<CreateUsagePlanResponse>(request, options);}
|
train
| true
|
1,943
|
public BlameResult call() throws GitAPIException {checkCallable();try (BlameGenerator gen = new BlameGenerator(repo, path)) {if (diffAlgorithm != null)gen.setDiffAlgorithm(diffAlgorithm);if (textComparator != null)gen.setTextComparator(textComparator);if (followFileRenames != null)gen.setFollowFileRenames(followFileRenames.booleanValue());if (reverseEndCommits != null)gen.reverse(startCommit, reverseEndCommits);else if (startCommit != null)gen.push(null, startCommit);else {gen.prepareHead();}return gen.computeBlameResult();} catch (IOException e) {throw new JGitInternalException(e.getMessage(), e);}}
|
[
"public",
"BlameResult",
"call",
"(",
")",
"throws",
"GitAPIException",
"{",
"checkCallable",
"(",
")",
";",
"try",
"(",
"BlameGenerator",
"gen",
"=",
"new",
"BlameGenerator",
"(",
"repo",
",",
"path",
")",
")",
"{",
"if",
"(",
"diffAlgorithm",
"!=",
"null",
")",
"gen",
".",
"setDiffAlgorithm",
"(",
"diffAlgorithm",
")",
";",
"if",
"(",
"textComparator",
"!=",
"null",
")",
"gen",
".",
"setTextComparator",
"(",
"textComparator",
")",
";",
"if",
"(",
"followFileRenames",
"!=",
"null",
")",
"gen",
".",
"setFollowFileRenames",
"(",
"followFileRenames",
".",
"booleanValue",
"(",
")",
")",
";",
"if",
"(",
"reverseEndCommits",
"!=",
"null",
")",
"gen",
".",
"reverse",
"(",
"startCommit",
",",
"reverseEndCommits",
")",
";",
"else",
"if",
"(",
"startCommit",
"!=",
"null",
")",
"gen",
".",
"push",
"(",
"null",
",",
"startCommit",
")",
";",
"else",
"{",
"gen",
".",
"prepareHead",
"(",
")",
";",
"}",
"return",
"gen",
".",
"computeBlameResult",
"(",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"throw",
"new",
"JGitInternalException",
"(",
"e",
".",
"getMessage",
"(",
")",
",",
"e",
")",
";",
"}",
"}"
] |
public override BlameResult Call(){CheckCallable();BlameGenerator gen = new BlameGenerator(repo, path);try{if (diffAlgorithm != null){gen.SetDiffAlgorithm(diffAlgorithm);}if (textComparator != null){gen.SetTextComparator(textComparator);}if (followFileRenames != null){gen.SetFollowFileRenames(followFileRenames);}if (reverseEndCommits != null){gen.Reverse(startCommit, reverseEndCommits);}else{if (startCommit != null){gen.Push(null, startCommit);}else{gen.Push(null, repo.Resolve(Constants.HEAD));if (!repo.IsBare){DirCache dc = repo.ReadDirCache();int entry = dc.FindEntry(path);if (0 <= entry){gen.Push(null, dc.GetEntry(entry).GetObjectId());}FilePath inTree = new FilePath(repo.WorkTree, path);if (inTree.IsFile()){gen.Push(null, new RawText(inTree));}}}}return gen.ComputeBlameResult();}catch (IOException e){throw new JGitInternalException(e.Message, e);}finally{gen.Release();}}
|
train
| false
|
1,944
|
public SearchTransitGatewayMulticastGroupsResult searchTransitGatewayMulticastGroups(SearchTransitGatewayMulticastGroupsRequest request) {request = beforeClientExecution(request);return executeSearchTransitGatewayMulticastGroups(request);}
|
[
"public",
"SearchTransitGatewayMulticastGroupsResult",
"searchTransitGatewayMulticastGroups",
"(",
"SearchTransitGatewayMulticastGroupsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeSearchTransitGatewayMulticastGroups",
"(",
"request",
")",
";",
"}"
] |
public virtual SearchTransitGatewayMulticastGroupsResponse SearchTransitGatewayMulticastGroups(SearchTransitGatewayMulticastGroupsRequest request){var options = new InvokeOptions();options.RequestMarshaller = SearchTransitGatewayMulticastGroupsRequestMarshaller.Instance;options.ResponseUnmarshaller = SearchTransitGatewayMulticastGroupsResponseUnmarshaller.Instance;return Invoke<SearchTransitGatewayMulticastGroupsResponse>(request, options);}
|
train
| false
|
1,945
|
public LinearOffsetRange normaliseAndTranslate(int translationAmount) {if (_length > 0) {if(translationAmount == 0) {return this;}return new LinearOffsetRange(translationAmount + _offset, _length);}return new LinearOffsetRange(translationAmount + _offset + _length + 1, -_length);}
|
[
"public",
"LinearOffsetRange",
"normaliseAndTranslate",
"(",
"int",
"translationAmount",
")",
"{",
"if",
"(",
"_length",
">",
"0",
")",
"{",
"if",
"(",
"translationAmount",
"==",
"0",
")",
"{",
"return",
"this",
";",
"}",
"return",
"new",
"LinearOffsetRange",
"(",
"translationAmount",
"+",
"_offset",
",",
"_length",
")",
";",
"}",
"return",
"new",
"LinearOffsetRange",
"(",
"translationAmount",
"+",
"_offset",
"+",
"_length",
"+",
"1",
",",
"-",
"_length",
")",
";",
"}"
] |
public LinearOffsetRange NormaliseAndTranslate(int translationAmount){if (_Length > 0){if (translationAmount == 0){return this;}return new LinearOffsetRange(translationAmount + _offset, _Length);}return new LinearOffsetRange(translationAmount + _offset + _Length + 1, -_Length);}
|
train
| false
|
1,946
|
public boolean isInvoke(char c) {return invokeMap[characterCategoryMap[c]];}
|
[
"public",
"boolean",
"isInvoke",
"(",
"char",
"c",
")",
"{",
"return",
"invokeMap",
"[",
"characterCategoryMap",
"[",
"c",
"]",
"]",
";",
"}"
] |
public bool IsInvoke(char c){return invokeMap[characterCategoryMap[c]];}
|
train
| false
|
1,947
|
public int getSize() {return size;}
|
[
"public",
"int",
"getSize",
"(",
")",
"{",
"return",
"size",
";",
"}"
] |
public virtual int GetSize(){return size;}
|
train
| false
|
1,948
|
public int read() throws IOException {if (buf == null) {throw new IOException();}if (pos < buf.length) {return (buf[pos++] & 0xFF);}return in.read();}
|
[
"public",
"int",
"read",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"buf",
"==",
"null",
")",
"{",
"throw",
"new",
"IOException",
"(",
")",
";",
"}",
"if",
"(",
"pos",
"<",
"buf",
".",
"length",
")",
"{",
"return",
"(",
"buf",
"[",
"pos",
"++",
"]",
"&",
"0xFF",
")",
";",
"}",
"return",
"in",
".",
"read",
"(",
")",
";",
"}"
] |
public override int read(){if (buf == null){throw new System.IO.IOException();}if (pos < buf.Length){return (buf[pos++] & unchecked((int)(0xFF)));}return @in.read();}
|
train
| false
|
1,949
|
public int mark() {return 0;}
|
[
"public",
"int",
"mark",
"(",
")",
"{",
"return",
"0",
";",
"}"
] |
public virtual int Mark(){return 0;}
|
train
| false
|
1,950
|
public SearchPhotosRequest() {super("CloudPhoto", "2017-07-11", "SearchPhotos", "cloudphoto");setProtocol(ProtocolType.HTTPS);}
|
[
"public",
"SearchPhotosRequest",
"(",
")",
"{",
"super",
"(",
"\"CloudPhoto\"",
",",
"\"2017-07-11\"",
",",
"\"SearchPhotos\"",
",",
"\"cloudphoto\"",
")",
";",
"setProtocol",
"(",
"ProtocolType",
".",
"HTTPS",
")",
";",
"}"
] |
public SearchPhotosRequest(): base("CloudPhoto", "2017-07-11", "SearchPhotos", "cloudphoto", "openAPI"){Protocol = ProtocolType.HTTPS;}
|
train
| false
|
1,951
|
public void copyFrom(TermState other) {assert other instanceof OrdTermState : "can not copy from " + other.getClass().getName();this.ord = ((OrdTermState) other).ord;}
|
[
"public",
"void",
"copyFrom",
"(",
"TermState",
"other",
")",
"{",
"assert",
"other",
"instanceof",
"OrdTermState",
":",
"\"can not copy from \"",
"+",
"other",
".",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
";",
"this",
".",
"ord",
"=",
"(",
"(",
"OrdTermState",
")",
"other",
")",
".",
"ord",
";",
"}"
] |
public override void CopyFrom(TermState other){Debug.Assert(other is OrdTermState, "can not copy from " + other.GetType().Name);this.Ord = ((OrdTermState)other).Ord;}
|
train
| false
|
1,952
|
public AnalyzeDocumentResult analyzeDocument(AnalyzeDocumentRequest request) {request = beforeClientExecution(request);return executeAnalyzeDocument(request);}
|
[
"public",
"AnalyzeDocumentResult",
"analyzeDocument",
"(",
"AnalyzeDocumentRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeAnalyzeDocument",
"(",
"request",
")",
";",
"}"
] |
public virtual AnalyzeDocumentResponse AnalyzeDocument(AnalyzeDocumentRequest request){var options = new InvokeOptions();options.RequestMarshaller = AnalyzeDocumentRequestMarshaller.Instance;options.ResponseUnmarshaller = AnalyzeDocumentResponseUnmarshaller.Instance;return Invoke<AnalyzeDocumentResponse>(request, options);}
|
train
| true
|
1,953
|
public int calcExtSSTRecordSize() {return ExtSSTRecord.getRecordSizeForStrings(field_3_strings.size());}
|
[
"public",
"int",
"calcExtSSTRecordSize",
"(",
")",
"{",
"return",
"ExtSSTRecord",
".",
"getRecordSizeForStrings",
"(",
"field_3_strings",
".",
"size",
"(",
")",
")",
";",
"}"
] |
public int CalcExtSSTRecordSize(){return ExtSSTRecord.GetRecordSizeForStrings(field_3_strings.Size);}
|
train
| false
|
1,954
|
public static FormulaShifter createForSheetShift(int srcSheetIndex, int dstSheetIndex) {return new FormulaShifter(srcSheetIndex, dstSheetIndex);}
|
[
"public",
"static",
"FormulaShifter",
"createForSheetShift",
"(",
"int",
"srcSheetIndex",
",",
"int",
"dstSheetIndex",
")",
"{",
"return",
"new",
"FormulaShifter",
"(",
"srcSheetIndex",
",",
"dstSheetIndex",
")",
";",
"}"
] |
public static FormulaShifter CreateForSheetShift(int srcSheetIndex, int dstSheetIndex){return new FormulaShifter(srcSheetIndex, dstSheetIndex);}
|
train
| false
|
1,956
|
public SelectionRecord(RecordInputStream in) {field_1_pane = in.readByte();field_2_row_active_cell = in.readUShort();field_3_col_active_cell = in.readShort();field_4_active_cell_ref_index = in.readShort();int field_5_num_refs = in.readUShort();field_6_refs = new CellRangeAddress8Bit[field_5_num_refs];for (int i = 0; i < field_6_refs.length; i++) {field_6_refs[i] = new CellRangeAddress8Bit(in);}}
|
[
"public",
"SelectionRecord",
"(",
"RecordInputStream",
"in",
")",
"{",
"field_1_pane",
"=",
"in",
".",
"readByte",
"(",
")",
";",
"field_2_row_active_cell",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"field_3_col_active_cell",
"=",
"in",
".",
"readShort",
"(",
")",
";",
"field_4_active_cell_ref_index",
"=",
"in",
".",
"readShort",
"(",
")",
";",
"int",
"field_5_num_refs",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"field_6_refs",
"=",
"new",
"CellRangeAddress8Bit",
"[",
"field_5_num_refs",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"field_6_refs",
".",
"length",
";",
"i",
"++",
")",
"{",
"field_6_refs",
"[",
"i",
"]",
"=",
"new",
"CellRangeAddress8Bit",
"(",
"in",
")",
";",
"}",
"}"
] |
public SelectionRecord(RecordInputStream in1){field_1_pane = (byte)in1.ReadByte();field_2_row_active_cell = in1.ReadUShort();field_3_col_active_cell = in1.ReadShort();field_4_ref_active_cell = in1.ReadShort();int field_5_num_refs = in1.ReadUShort();field_6_refs = new CellRangeAddress8Bit[field_5_num_refs];for (int i = 0; i < field_5_num_refs; i++){field_6_refs[i] = new CellRangeAddress8Bit(in1);}}
|
train
| false
|
1,957
|
public void setNeedNewObjectIds(boolean b) {if (b)newObjectIds = new ObjectIdSubclassMap<>();elsenewObjectIds = null;}
|
[
"public",
"void",
"setNeedNewObjectIds",
"(",
"boolean",
"b",
")",
"{",
"if",
"(",
"b",
")",
"newObjectIds",
"=",
"new",
"ObjectIdSubclassMap",
"<",
">",
"(",
")",
";",
"elsenewObjectIds",
"=",
"null",
";",
"}"
] |
public virtual void SetNeedNewObjectIds(bool b){if (b){newObjectIds = new ObjectIdSubclassMap<ObjectId>();}else{newObjectIds = null;}}
|
train
| false
|
1,958
|
public GetResolverRulePolicyResult getResolverRulePolicy(GetResolverRulePolicyRequest request) {request = beforeClientExecution(request);return executeGetResolverRulePolicy(request);}
|
[
"public",
"GetResolverRulePolicyResult",
"getResolverRulePolicy",
"(",
"GetResolverRulePolicyRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetResolverRulePolicy",
"(",
"request",
")",
";",
"}"
] |
public virtual GetResolverRulePolicyResponse GetResolverRulePolicy(GetResolverRulePolicyRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetResolverRulePolicyRequestMarshaller.Instance;options.ResponseUnmarshaller = GetResolverRulePolicyResponseUnmarshaller.Instance;return Invoke<GetResolverRulePolicyResponse>(request, options);}
|
train
| true
|
1,959
|
public static DoubleBuffer wrap(double[] array) {return wrap(array, 0, array.length);}
|
[
"public",
"static",
"DoubleBuffer",
"wrap",
"(",
"double",
"[",
"]",
"array",
")",
"{",
"return",
"wrap",
"(",
"array",
",",
"0",
",",
"array",
".",
"length",
")",
";",
"}"
] |
public static java.nio.DoubleBuffer wrap(double[] array_1){return wrap(array_1, 0, array_1.Length);}
|
train
| false
|
1,960
|
public UnitsRecord clone() {return copy();}
|
[
"public",
"UnitsRecord",
"clone",
"(",
")",
"{",
"return",
"copy",
"(",
")",
";",
"}"
] |
public override Object Clone(){UnitsRecord rec = new UnitsRecord();rec.field_1_units = field_1_units;return rec;}
|
train
| false
|
1,961
|
public void readFully(byte[] buf, int off, int len) {try {checkEOF(_read(buf, off, len), len);} catch (IOException e) {throw new RuntimeException(e);}}
|
[
"public",
"void",
"readFully",
"(",
"byte",
"[",
"]",
"buf",
",",
"int",
"off",
",",
"int",
"len",
")",
"{",
"try",
"{",
"checkEOF",
"(",
"_read",
"(",
"buf",
",",
"off",
",",
"len",
")",
",",
"len",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"e",
")",
";",
"}",
"}"
] |
public void ReadFully(byte[] buf, int off, int len){int max = off + len;for (int i = off; i < max; i++){byte ch;try{ch = (byte)in1.ReadByte();}catch (IOException e){throw new RuntimeException(e);}CheckEOF(ch);buf[i] = ch;}}
|
train
| false
|
1,962
|
public DescribeInterconnectLoaResult describeInterconnectLoa(DescribeInterconnectLoaRequest request) {request = beforeClientExecution(request);return executeDescribeInterconnectLoa(request);}
|
[
"public",
"DescribeInterconnectLoaResult",
"describeInterconnectLoa",
"(",
"DescribeInterconnectLoaRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeInterconnectLoa",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeInterconnectLoaResponse DescribeInterconnectLoa(DescribeInterconnectLoaRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeInterconnectLoaRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeInterconnectLoaResponseUnmarshaller.Instance;return Invoke<DescribeInterconnectLoaResponse>(request, options);}
|
train
| false
|
1,963
|
public static ByteOrder nativeOrder() {return NATIVE_ORDER;}
|
[
"public",
"static",
"ByteOrder",
"nativeOrder",
"(",
")",
"{",
"return",
"NATIVE_ORDER",
";",
"}"
] |
public static java.nio.ByteOrder nativeOrder(){return NATIVE_ORDER;}
|
train
| false
|
1,964
|
public CalcModeRecord(RecordInputStream in) {field_1_calcmode = in.readShort();}
|
[
"public",
"CalcModeRecord",
"(",
"RecordInputStream",
"in",
")",
"{",
"field_1_calcmode",
"=",
"in",
".",
"readShort",
"(",
")",
";",
"}"
] |
public CalcModeRecord(RecordInputStream in1){field_1_calcmode = in1.ReadShort();}
|
train
| false
|
1,965
|
public void addParentId(AnyObjectId additionalParent) {if (parentIds.length == 0) {setParentId(additionalParent);} else {ObjectId[] newParents = new ObjectId[parentIds.length + 1];System.arraycopy(parentIds, 0, newParents, 0, parentIds.length);newParents[parentIds.length] = additionalParent.copy();parentIds = newParents;}}
|
[
"public",
"void",
"addParentId",
"(",
"AnyObjectId",
"additionalParent",
")",
"{",
"if",
"(",
"parentIds",
".",
"length",
"==",
"0",
")",
"{",
"setParentId",
"(",
"additionalParent",
")",
";",
"}",
"else",
"{",
"ObjectId",
"[",
"]",
"newParents",
"=",
"new",
"ObjectId",
"[",
"parentIds",
".",
"length",
"+",
"1",
"]",
";",
"System",
".",
"arraycopy",
"(",
"parentIds",
",",
"0",
",",
"newParents",
",",
"0",
",",
"parentIds",
".",
"length",
")",
";",
"newParents",
"[",
"parentIds",
".",
"length",
"]",
"=",
"additionalParent",
".",
"copy",
"(",
")",
";",
"parentIds",
"=",
"newParents",
";",
"}",
"}"
] |
public virtual void AddParentId(AnyObjectId additionalParent){if (parentIds.Length == 0){SetParentId(additionalParent);}else{ObjectId[] newParents = new ObjectId[parentIds.Length + 1];System.Array.Copy(parentIds, 0, newParents, 0, parentIds.Length);newParents[parentIds.Length] = additionalParent.Copy();parentIds = newParents;}}
|
train
| false
|
1,966
|
public CreateAccessPointResult createAccessPoint(CreateAccessPointRequest request) {request = beforeClientExecution(request);return executeCreateAccessPoint(request);}
|
[
"public",
"CreateAccessPointResult",
"createAccessPoint",
"(",
"CreateAccessPointRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCreateAccessPoint",
"(",
"request",
")",
";",
"}"
] |
public virtual CreateAccessPointResponse CreateAccessPoint(CreateAccessPointRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateAccessPointRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateAccessPointResponseUnmarshaller.Instance;return Invoke<CreateAccessPointResponse>(request, options);}
|
train
| false
|
1,967
|
public DeleteLoadBalancerListenersResult deleteLoadBalancerListeners(DeleteLoadBalancerListenersRequest request) {request = beforeClientExecution(request);return executeDeleteLoadBalancerListeners(request);}
|
[
"public",
"DeleteLoadBalancerListenersResult",
"deleteLoadBalancerListeners",
"(",
"DeleteLoadBalancerListenersRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteLoadBalancerListeners",
"(",
"request",
")",
";",
"}"
] |
public virtual DeleteLoadBalancerListenersResponse DeleteLoadBalancerListeners(DeleteLoadBalancerListenersRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteLoadBalancerListenersRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteLoadBalancerListenersResponseUnmarshaller.Instance;return Invoke<DeleteLoadBalancerListenersResponse>(request, options);}
|
train
| true
|
1,968
|
public DescribeOrderableClusterOptionsResult describeOrderableClusterOptions() {return describeOrderableClusterOptions(new DescribeOrderableClusterOptionsRequest());}
|
[
"public",
"DescribeOrderableClusterOptionsResult",
"describeOrderableClusterOptions",
"(",
")",
"{",
"return",
"describeOrderableClusterOptions",
"(",
"new",
"DescribeOrderableClusterOptionsRequest",
"(",
")",
")",
";",
"}"
] |
public virtual DescribeOrderableClusterOptionsResponse DescribeOrderableClusterOptions(){return DescribeOrderableClusterOptions(new DescribeOrderableClusterOptionsRequest());}
|
train
| false
|
1,969
|
public void setDerefTags(boolean deref) {derefTags = deref;}
|
[
"public",
"void",
"setDerefTags",
"(",
"boolean",
"deref",
")",
"{",
"derefTags",
"=",
"deref",
";",
"}"
] |
public virtual void SetDerefTags(bool deref){derefTags = deref;}
|
train
| false
|
1,970
|
public DeactivateMFADeviceRequest(String userName, String serialNumber) {setUserName(userName);setSerialNumber(serialNumber);}
|
[
"public",
"DeactivateMFADeviceRequest",
"(",
"String",
"userName",
",",
"String",
"serialNumber",
")",
"{",
"setUserName",
"(",
"userName",
")",
";",
"setSerialNumber",
"(",
"serialNumber",
")",
";",
"}"
] |
public DeactivateMFADeviceRequest(string userName, string serialNumber){_userName = userName;_serialNumber = serialNumber;}
|
train
| false
|
1,971
|
public boolean markSupported() {synchronized (lock) {return in.markSupported();}}
|
[
"public",
"boolean",
"markSupported",
"(",
")",
"{",
"synchronized",
"(",
"lock",
")",
"{",
"return",
"in",
".",
"markSupported",
"(",
")",
";",
"}",
"}"
] |
public override bool markSupported(){lock (@lock){return @in.markSupported();}}
|
train
| false
|
1,972
|
public static void createNewFile(File f) throws IOException {if (!f.createNewFile())throw new IOException(MessageFormat.format(JGitText.get().createNewFileFailed, f));}
|
[
"public",
"static",
"void",
"createNewFile",
"(",
"File",
"f",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"f",
".",
"createNewFile",
"(",
")",
")",
"throw",
"new",
"IOException",
"(",
"MessageFormat",
".",
"format",
"(",
"JGitText",
".",
"get",
"(",
")",
".",
"createNewFileFailed",
",",
"f",
")",
")",
";",
"}"
] |
public static void CreateNewFile(FilePath f){if (!f.CreateNewFile()){throw new IOException(MessageFormat.Format(JGitText.Get().createNewFileFailed, f));}}
|
train
| false
|
1,974
|
public void inform(ResourceLoader loader) throws IOException {String dicts[] = dictionaryFiles.split(",");InputStream affix = null;List<InputStream> dictionaries = new ArrayList<>();try {dictionaries = new ArrayList<>();for (String file : dicts) {dictionaries.add(loader.openResource(file));}affix = loader.openResource(affixFile);Path tempPath = Files.createTempDirectory(Dictionary.getDefaultTempDir(), "Hunspell");try (Directory tempDir = FSDirectory.open(tempPath)) {this.dictionary = new Dictionary(tempDir, "hunspell", affix, dictionaries, ignoreCase);} finally {IOUtils.rm(tempPath);}} catch (ParseException e) {throw new IOException("Unable to load hunspell data! [dictionary=" + dictionaries + ",affix=" + affixFile + "]", e);} finally {IOUtils.closeWhileHandlingException(affix);IOUtils.closeWhileHandlingException(dictionaries);}}
|
[
"public",
"void",
"inform",
"(",
"ResourceLoader",
"loader",
")",
"throws",
"IOException",
"{",
"String",
"dicts",
"[",
"]",
"=",
"dictionaryFiles",
".",
"split",
"(",
"\",\"",
")",
";",
"InputStream",
"affix",
"=",
"null",
";",
"List",
"<",
"InputStream",
">",
"dictionaries",
"=",
"new",
"ArrayList",
"<",
">",
"(",
")",
";",
"try",
"{",
"dictionaries",
"=",
"new",
"ArrayList",
"<",
">",
"(",
")",
";",
"for",
"(",
"String",
"file",
":",
"dicts",
")",
"{",
"dictionaries",
".",
"add",
"(",
"loader",
".",
"openResource",
"(",
"file",
")",
")",
";",
"}",
"affix",
"=",
"loader",
".",
"openResource",
"(",
"affixFile",
")",
";",
"Path",
"tempPath",
"=",
"Files",
".",
"createTempDirectory",
"(",
"Dictionary",
".",
"getDefaultTempDir",
"(",
")",
",",
"\"Hunspell\"",
")",
";",
"try",
"(",
"Directory",
"tempDir",
"=",
"FSDirectory",
".",
"open",
"(",
"tempPath",
")",
")",
"{",
"this",
".",
"dictionary",
"=",
"new",
"Dictionary",
"(",
"tempDir",
",",
"\"hunspell\"",
",",
"affix",
",",
"dictionaries",
",",
"ignoreCase",
")",
";",
"}",
"finally",
"{",
"IOUtils",
".",
"rm",
"(",
"tempPath",
")",
";",
"}",
"}",
"catch",
"(",
"ParseException",
"e",
")",
"{",
"throw",
"new",
"IOException",
"(",
"\"Unable to load hunspell data! [dictionary=\"",
"+",
"dictionaries",
"+",
"\",affix=\"",
"+",
"affixFile",
"+",
"\"]\"",
",",
"e",
")",
";",
"}",
"finally",
"{",
"IOUtils",
".",
"closeWhileHandlingException",
"(",
"affix",
")",
";",
"IOUtils",
".",
"closeWhileHandlingException",
"(",
"dictionaries",
")",
";",
"}",
"}"
] |
public virtual void Inform(IResourceLoader loader){string[] dicts = dictionaryFiles.Split(',').TrimEnd();Stream affix = null;IList<Stream> dictionaries = new List<Stream>();try{dictionaries = new List<Stream>();foreach (string file in dicts){dictionaries.Add(loader.OpenResource(file));}affix = loader.OpenResource(affixFile);this.dictionary = new Dictionary(affix, dictionaries, ignoreCase);}catch (Exception e){throw new IOException("Unable to load hunspell data! [dictionary=" + dictionaries + ",affix=" + affixFile + "]", e);}finally{IOUtils.DisposeWhileHandlingException(affix);IOUtils.DisposeWhileHandlingException(dictionaries);}}
|
train
| false
|
1,975
|
public DetectDocumentTextResult detectDocumentText(DetectDocumentTextRequest request) {request = beforeClientExecution(request);return executeDetectDocumentText(request);}
|
[
"public",
"DetectDocumentTextResult",
"detectDocumentText",
"(",
"DetectDocumentTextRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDetectDocumentText",
"(",
"request",
")",
";",
"}"
] |
public virtual DetectDocumentTextResponse DetectDocumentText(DetectDocumentTextRequest request){var options = new InvokeOptions();options.RequestMarshaller = DetectDocumentTextRequestMarshaller.Instance;options.ResponseUnmarshaller = DetectDocumentTextResponseUnmarshaller.Instance;return Invoke<DetectDocumentTextResponse>(request, options);}
|
train
| true
|
1,976
|
public DescribeCertificatesResult describeCertificates(DescribeCertificatesRequest request) {request = beforeClientExecution(request);return executeDescribeCertificates(request);}
|
[
"public",
"DescribeCertificatesResult",
"describeCertificates",
"(",
"DescribeCertificatesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeCertificates",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeCertificatesResponse DescribeCertificates(DescribeCertificatesRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeCertificatesRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeCertificatesResponseUnmarshaller.Instance;return Invoke<DescribeCertificatesResponse>(request, options);}
|
train
| true
|
1,977
|
public int getFormatCount() {return _formats.length;}
|
[
"public",
"int",
"getFormatCount",
"(",
")",
"{",
"return",
"_formats",
".",
"length",
";",
"}"
] |
public int GetFormatCount(){return m_formats.Count;}
|
train
| false
|
1,978
|
public GetOutcomesResult getOutcomes(GetOutcomesRequest request) {request = beforeClientExecution(request);return executeGetOutcomes(request);}
|
[
"public",
"GetOutcomesResult",
"getOutcomes",
"(",
"GetOutcomesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetOutcomes",
"(",
"request",
")",
";",
"}"
] |
public virtual GetOutcomesResponse GetOutcomes(GetOutcomesRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetOutcomesRequestMarshaller.Instance;options.ResponseUnmarshaller = GetOutcomesResponseUnmarshaller.Instance;return Invoke<GetOutcomesResponse>(request, options);}
|
train
| false
|
1,979
|
public Set<URIishField> getOptionalFields() {return Collections.emptySet();}
|
[
"public",
"Set",
"<",
"URIishField",
">",
"getOptionalFields",
"(",
")",
"{",
"return",
"Collections",
".",
"emptySet",
"(",
")",
";",
"}"
] |
public virtual ICollection<TransportProtocol.URIishField> GetOptionalFields(){return Sharpen.Collections.EmptySet<TransportProtocol.URIishField>();}
|
train
| false
|
1,980
|
public BasicStats(String field, double boost) {this.field = field;this.boost = boost;}
|
[
"public",
"BasicStats",
"(",
"String",
"field",
",",
"double",
"boost",
")",
"{",
"this",
".",
"field",
"=",
"field",
";",
"this",
".",
"boost",
"=",
"boost",
";",
"}"
] |
public BasicStats(string field, float queryBoost){this.field = field;this.m_queryBoost = queryBoost;this.m_totalBoost = queryBoost;}
|
train
| false
|
1,981
|
public UpdateSecurityGroupRuleDescriptionsIngressResult updateSecurityGroupRuleDescriptionsIngress(UpdateSecurityGroupRuleDescriptionsIngressRequest request) {request = beforeClientExecution(request);return executeUpdateSecurityGroupRuleDescriptionsIngress(request);}
|
[
"public",
"UpdateSecurityGroupRuleDescriptionsIngressResult",
"updateSecurityGroupRuleDescriptionsIngress",
"(",
"UpdateSecurityGroupRuleDescriptionsIngressRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateSecurityGroupRuleDescriptionsIngress",
"(",
"request",
")",
";",
"}"
] |
public virtual UpdateSecurityGroupRuleDescriptionsIngressResponse UpdateSecurityGroupRuleDescriptionsIngress(UpdateSecurityGroupRuleDescriptionsIngressRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateSecurityGroupRuleDescriptionsIngressRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateSecurityGroupRuleDescriptionsIngressResponseUnmarshaller.Instance;return Invoke<UpdateSecurityGroupRuleDescriptionsIngressResponse>(request, options);}
|
train
| true
|
1,982
|
public long getOffset() {return position;}
|
[
"public",
"long",
"getOffset",
"(",
")",
"{",
"return",
"position",
";",
"}"
] |
public virtual long GetOffset(){return position;}
|
train
| false
|
1,983
|
public Collection<Ref> getAdvertisedRefs() {return Collections.unmodifiableCollection(advertisedRefs.values());}
|
[
"public",
"Collection",
"<",
"Ref",
">",
"getAdvertisedRefs",
"(",
")",
"{",
"return",
"Collections",
".",
"unmodifiableCollection",
"(",
"advertisedRefs",
".",
"values",
"(",
")",
")",
";",
"}"
] |
public virtual ICollection<Ref> GetAdvertisedRefs(){return Sharpen.Collections.UnmodifiableCollection(advertisedRefs.Values);}
|
train
| false
|
1,985
|
public void setText(CharacterIterator newText) {start = newText.getBeginIndex();end = newText.getEndIndex();text = newText;current = start;}
|
[
"public",
"void",
"setText",
"(",
"CharacterIterator",
"newText",
")",
"{",
"start",
"=",
"newText",
".",
"getBeginIndex",
"(",
")",
";",
"end",
"=",
"newText",
".",
"getEndIndex",
"(",
")",
";",
"text",
"=",
"newText",
";",
"current",
"=",
"start",
";",
"}"
] |
public override void SetText(CharacterIterator newText){start = newText.BeginIndex;end = newText.EndIndex;text = newText;current = start;}
|
train
| false
|
1,986
|
public PutOutcomeResult putOutcome(PutOutcomeRequest request) {request = beforeClientExecution(request);return executePutOutcome(request);}
|
[
"public",
"PutOutcomeResult",
"putOutcome",
"(",
"PutOutcomeRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executePutOutcome",
"(",
"request",
")",
";",
"}"
] |
public virtual PutOutcomeResponse PutOutcome(PutOutcomeRequest request){var options = new InvokeOptions();options.RequestMarshaller = PutOutcomeRequestMarshaller.Instance;options.ResponseUnmarshaller = PutOutcomeResponseUnmarshaller.Instance;return Invoke<PutOutcomeResponse>(request, options);}
|
train
| false
|
1,987
|
public UnescapedCharSequence(CharSequence text) {this.chars = new char[text.length()];this.wasEscaped = new boolean[text.length()];for (int i = 0; i < text.length(); i++) {this.chars[i] = text.charAt(i);this.wasEscaped[i] = false;}}
|
[
"public",
"UnescapedCharSequence",
"(",
"CharSequence",
"text",
")",
"{",
"this",
".",
"chars",
"=",
"new",
"char",
"[",
"text",
".",
"length",
"(",
")",
"]",
";",
"this",
".",
"wasEscaped",
"=",
"new",
"boolean",
"[",
"text",
".",
"length",
"(",
")",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"text",
".",
"length",
"(",
")",
";",
"i",
"++",
")",
"{",
"this",
".",
"chars",
"[",
"i",
"]",
"=",
"text",
".",
"charAt",
"(",
"i",
")",
";",
"this",
".",
"wasEscaped",
"[",
"i",
"]",
"=",
"false",
";",
"}",
"}"
] |
public UnescapedCharSequence(ICharSequence text){this.chars = new char[text.Length];this.wasEscaped = new bool[text.Length];for (int i = 0; i < text.Length; i++){this.chars[i] = text[i];this.wasEscaped[i] = false;}}
|
train
| false
|
1,988
|
public DoubleBuffer put(double[] src, int srcOffset, int doubleCount) {byteBuffer.limit(limit * SizeOf.DOUBLE);byteBuffer.position(position * SizeOf.DOUBLE);if (byteBuffer instanceof ReadWriteDirectByteBuffer) {((ReadWriteDirectByteBuffer) byteBuffer).put(src, srcOffset, doubleCount);} else {((ReadWriteHeapByteBuffer) byteBuffer).put(src, srcOffset, doubleCount);}this.position += doubleCount;return this;}
|
[
"public",
"DoubleBuffer",
"put",
"(",
"double",
"[",
"]",
"src",
",",
"int",
"srcOffset",
",",
"int",
"doubleCount",
")",
"{",
"byteBuffer",
".",
"limit",
"(",
"limit",
"*",
"SizeOf",
".",
"DOUBLE",
")",
";",
"byteBuffer",
".",
"position",
"(",
"position",
"*",
"SizeOf",
".",
"DOUBLE",
")",
";",
"if",
"(",
"byteBuffer",
"instanceof",
"ReadWriteDirectByteBuffer",
")",
"{",
"(",
"(",
"ReadWriteDirectByteBuffer",
")",
"byteBuffer",
")",
".",
"put",
"(",
"src",
",",
"srcOffset",
",",
"doubleCount",
")",
";",
"}",
"else",
"{",
"(",
"(",
"ReadWriteHeapByteBuffer",
")",
"byteBuffer",
")",
".",
"put",
"(",
"src",
",",
"srcOffset",
",",
"doubleCount",
")",
";",
"}",
"this",
".",
"position",
"+=",
"doubleCount",
";",
"return",
"this",
";",
"}"
] |
public override java.nio.DoubleBuffer put(double[] src, int srcOffset, int doubleCount){byteBuffer.limit(_limit * libcore.io.SizeOf.DOUBLE);byteBuffer.position(_position * libcore.io.SizeOf.DOUBLE);if (byteBuffer is java.nio.ReadWriteDirectByteBuffer){((java.nio.ReadWriteDirectByteBuffer)byteBuffer).put(src, srcOffset, doubleCount);}else{((java.nio.ReadWriteHeapByteBuffer)byteBuffer).put(src, srcOffset, doubleCount);}this._position += doubleCount;return this;}
|
train
| false
|
1,989
|
public void remove() {throw new UnsupportedOperationException();}
|
[
"public",
"void",
"remove",
"(",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
")",
";",
"}"
] |
public virtual void remove(){throw new System.NotSupportedException();}
|
train
| false
|
1,990
|
public String toString() {StringBuilder buffer = new StringBuilder();buffer.append("[CHARTTITLEFORMAT]\n");buffer.append(" .format_runs = ").append(_formats.length).append("\n");for(int i=0; i<_formats.length; i++) {CTFormat ctf = _formats[i];buffer.append(" .char_offset= ").append(ctf.getOffset());buffer.append(",.fontidx= ").append(ctf.getFontIndex());buffer.append("\n");}buffer.append("[/CHARTTITLEFORMAT]\n");return buffer.toString();}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuilder",
"buffer",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"\"[CHARTTITLEFORMAT]\\n\"",
")",
";",
"buffer",
".",
"append",
"(",
"\" .format_runs = \"",
")",
".",
"append",
"(",
"_formats",
".",
"length",
")",
".",
"append",
"(",
"\"\\n\"",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"_formats",
".",
"length",
";",
"i",
"++",
")",
"{",
"CTFormat",
"ctf",
"=",
"_formats",
"[",
"i",
"]",
";",
"buffer",
".",
"append",
"(",
"\" .char_offset= \"",
")",
".",
"append",
"(",
"ctf",
".",
"getOffset",
"(",
")",
")",
";",
"buffer",
".",
"append",
"(",
"\",.fontidx= \"",
")",
".",
"append",
"(",
"ctf",
".",
"getFontIndex",
"(",
")",
")",
";",
"buffer",
".",
"append",
"(",
"\"\\n\"",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"\"[/CHARTTITLEFORMAT]\\n\"",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}"
] |
public override String ToString(){StringBuilder buffer = new StringBuilder();buffer.Append("[ALRUNS]\n");buffer.Append(" .format_runs = ").Append(m_recs).Append("\n");int idx;CTFormat ctf;for (idx = 0; idx < m_formats.Count; idx++){ctf = (CTFormat)m_formats[idx];buffer.Append(" .char_offset= ").Append(ctf.Offset);buffer.Append(",.fontidx= ").Append(ctf.FontIndex);buffer.Append("\n");}buffer.Append("[/ALRUNS]\n");return buffer.ToString();}
|
train
| false
|
1,991
|
public StartDominantLanguageDetectionJobResult startDominantLanguageDetectionJob(StartDominantLanguageDetectionJobRequest request) {request = beforeClientExecution(request);return executeStartDominantLanguageDetectionJob(request);}
|
[
"public",
"StartDominantLanguageDetectionJobResult",
"startDominantLanguageDetectionJob",
"(",
"StartDominantLanguageDetectionJobRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeStartDominantLanguageDetectionJob",
"(",
"request",
")",
";",
"}"
] |
public virtual StartDominantLanguageDetectionJobResponse StartDominantLanguageDetectionJob(StartDominantLanguageDetectionJobRequest request){var options = new InvokeOptions();options.RequestMarshaller = StartDominantLanguageDetectionJobRequestMarshaller.Instance;options.ResponseUnmarshaller = StartDominantLanguageDetectionJobResponseUnmarshaller.Instance;return Invoke<StartDominantLanguageDetectionJobResponse>(request, options);}
|
train
| true
|
1,992
|
public static boolean hasNonConflictingAltSet(Collection<BitSet> altsets) {for (BitSet alts : altsets) {if ( alts.cardinality()==1 ) {return true;}}return false;}
|
[
"public",
"static",
"boolean",
"hasNonConflictingAltSet",
"(",
"Collection",
"<",
"BitSet",
">",
"altsets",
")",
"{",
"for",
"(",
"BitSet",
"alts",
":",
"altsets",
")",
"{",
"if",
"(",
"alts",
".",
"cardinality",
"(",
")",
"==",
"1",
")",
"{",
"return",
"true",
";",
"}",
"}",
"return",
"false",
";",
"}"
] |
public static bool HasNonConflictingAltSet(IEnumerable<BitSet> altsets){foreach (BitSet alts in altsets){if (alts.Cardinality() == 1){return true;}}return false;}
|
train
| false
|
1,994
|
public DataValidationConstraint createTextLengthConstraint(int operatorType, String formula1, String formula2) {return DVConstraint.createNumericConstraint(ValidationType.TEXT_LENGTH, operatorType, formula1, formula2);}
|
[
"public",
"DataValidationConstraint",
"createTextLengthConstraint",
"(",
"int",
"operatorType",
",",
"String",
"formula1",
",",
"String",
"formula2",
")",
"{",
"return",
"DVConstraint",
".",
"createNumericConstraint",
"(",
"ValidationType",
".",
"TEXT_LENGTH",
",",
"operatorType",
",",
"formula1",
",",
"formula2",
")",
";",
"}"
] |
public IDataValidationConstraint CreateTextLengthConstraint(int operatorType, String formula1, String formula2){return DVConstraint.CreateNumericConstraint(ValidationType.TEXT_LENGTH, operatorType, formula1, formula2);}
|
train
| false
|
1,995
|
public void writeShort(int v) {writeContinueIfRequired(2);_ulrOutput.writeShort(v);}
|
[
"public",
"void",
"writeShort",
"(",
"int",
"v",
")",
"{",
"writeContinueIfRequired",
"(",
"2",
")",
";",
"_ulrOutput",
".",
"writeShort",
"(",
"v",
")",
";",
"}"
] |
public void WriteShort(int v){_out.WriteShort(v);_size += 2;}
|
train
| false
|
1,996
|
public final short getShort(int index) {checkIndex(index, SizeOf.SHORT);return Memory.peekShort(backingArray, offset + index, order);}
|
[
"public",
"final",
"short",
"getShort",
"(",
"int",
"index",
")",
"{",
"checkIndex",
"(",
"index",
",",
"SizeOf",
".",
"SHORT",
")",
";",
"return",
"Memory",
".",
"peekShort",
"(",
"backingArray",
",",
"offset",
"+",
"index",
",",
"order",
")",
";",
"}"
] |
public sealed override short getShort(int index){checkIndex(index, libcore.io.SizeOf.SHORT);return libcore.io.Memory.peekShort(backingArray, offset + index, _order);}
|
train
| false
|
1,997
|
public static FuncPtg create(int functionIndex) {FunctionMetadata fm = FunctionMetadataRegistry.getFunctionByIndex(functionIndex);if(fm == null) {throw new RuntimeException("Invalid built-in function index (" + functionIndex + ")");}return new FuncPtg(functionIndex, fm);}
|
[
"public",
"static",
"FuncPtg",
"create",
"(",
"int",
"functionIndex",
")",
"{",
"FunctionMetadata",
"fm",
"=",
"FunctionMetadataRegistry",
".",
"getFunctionByIndex",
"(",
"functionIndex",
")",
";",
"if",
"(",
"fm",
"==",
"null",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"Invalid built-in function index (\"",
"+",
"functionIndex",
"+",
"\")\"",
")",
";",
"}",
"return",
"new",
"FuncPtg",
"(",
"functionIndex",
",",
"fm",
")",
";",
"}"
] |
public static FuncPtg Create(int functionIndex) {FunctionMetadata fm = FunctionMetadataRegistry.GetFunctionByIndex(functionIndex);if(fm == null) {throw new Exception("Invalid built-in function index (" + functionIndex + ")");}return new FuncPtg(functionIndex, fm);}
|
train
| false
|
1,998
|
public String toString() {return "{"+ruleIndex+":"+predIndex+"}?";}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"\"{\"",
"+",
"ruleIndex",
"+",
"\":\"",
"+",
"predIndex",
"+",
"\"}?\"",
";",
"}"
] |
public override string ToString(){return "{" + ruleIndex + ":" + predIndex + "}?";}
|
train
| false
|
1,999
|
public ListDashboardsResult listDashboards(ListDashboardsRequest request) {request = beforeClientExecution(request);return executeListDashboards(request);}
|
[
"public",
"ListDashboardsResult",
"listDashboards",
"(",
"ListDashboardsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListDashboards",
"(",
"request",
")",
";",
"}"
] |
public virtual ListDashboardsResponse ListDashboards(ListDashboardsRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListDashboardsRequestMarshaller.Instance;options.ResponseUnmarshaller = ListDashboardsResponseUnmarshaller.Instance;return Invoke<ListDashboardsResponse>(request, options);}
|
train
| true
|
2,000
|
public DeleteVoiceTemplateResult deleteVoiceTemplate(DeleteVoiceTemplateRequest request) {request = beforeClientExecution(request);return executeDeleteVoiceTemplate(request);}
|
[
"public",
"DeleteVoiceTemplateResult",
"deleteVoiceTemplate",
"(",
"DeleteVoiceTemplateRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteVoiceTemplate",
"(",
"request",
")",
";",
"}"
] |
public virtual DeleteVoiceTemplateResponse DeleteVoiceTemplate(DeleteVoiceTemplateRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteVoiceTemplateRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteVoiceTemplateResponseUnmarshaller.Instance;return Invoke<DeleteVoiceTemplateResponse>(request, options);}
|
train
| false
|
2,001
|
public void addListenerForAllRecords(HSSFListener lsnr) {short[] rectypes = RecordFactory.getAllKnownRecordSIDs();for (short rectype : rectypes) {addListener(lsnr, rectype);}}
|
[
"public",
"void",
"addListenerForAllRecords",
"(",
"HSSFListener",
"lsnr",
")",
"{",
"short",
"[",
"]",
"rectypes",
"=",
"RecordFactory",
".",
"getAllKnownRecordSIDs",
"(",
")",
";",
"for",
"(",
"short",
"rectype",
":",
"rectypes",
")",
"{",
"addListener",
"(",
"lsnr",
",",
"rectype",
")",
";",
"}",
"}"
] |
public void AddListenerForAllRecords(IHSSFListener lsnr){short[] rectypes = RecordFactory.GetAllKnownRecordSIDs();for (int k = 0; k < rectypes.Length; k++){AddListener(lsnr, rectypes[k]);}}
|
train
| false
|
2,002
|
public DescribeLocalGatewayRouteTablesResult describeLocalGatewayRouteTables(DescribeLocalGatewayRouteTablesRequest request) {request = beforeClientExecution(request);return executeDescribeLocalGatewayRouteTables(request);}
|
[
"public",
"DescribeLocalGatewayRouteTablesResult",
"describeLocalGatewayRouteTables",
"(",
"DescribeLocalGatewayRouteTablesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeLocalGatewayRouteTables",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeLocalGatewayRouteTablesResponse DescribeLocalGatewayRouteTables(DescribeLocalGatewayRouteTablesRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeLocalGatewayRouteTablesRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeLocalGatewayRouteTablesResponseUnmarshaller.Instance;return Invoke<DescribeLocalGatewayRouteTablesResponse>(request, options);}
|
train
| false
|
2,003
|
public EnableDomainAutoRenewResult enableDomainAutoRenew(EnableDomainAutoRenewRequest request) {request = beforeClientExecution(request);return executeEnableDomainAutoRenew(request);}
|
[
"public",
"EnableDomainAutoRenewResult",
"enableDomainAutoRenew",
"(",
"EnableDomainAutoRenewRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeEnableDomainAutoRenew",
"(",
"request",
")",
";",
"}"
] |
public virtual EnableDomainAutoRenewResponse EnableDomainAutoRenew(EnableDomainAutoRenewRequest request){var options = new InvokeOptions();options.RequestMarshaller = EnableDomainAutoRenewRequestMarshaller.Instance;options.ResponseUnmarshaller = EnableDomainAutoRenewResponseUnmarshaller.Instance;return Invoke<EnableDomainAutoRenewResponse>(request, options);}
|
train
| true
|
2,004
|
public String toString() {StringBuilder result = new StringBuilder();result.append(type.toString());result.append('<');result.append(name);result.append(':');if (fieldsData != null) {result.append(fieldsData);}result.append('>');return result.toString();}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuilder",
"result",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"result",
".",
"append",
"(",
"type",
".",
"toString",
"(",
")",
")",
";",
"result",
".",
"append",
"(",
"'<'",
")",
";",
"result",
".",
"append",
"(",
"name",
")",
";",
"result",
".",
"append",
"(",
"':'",
")",
";",
"if",
"(",
"fieldsData",
"!=",
"null",
")",
"{",
"result",
".",
"append",
"(",
"fieldsData",
")",
";",
"}",
"result",
".",
"append",
"(",
"'>'",
")",
";",
"return",
"result",
".",
"toString",
"(",
")",
";",
"}"
] |
public override string ToString(){StringBuilder result = new StringBuilder();result.Append(m_type.ToString());result.Append('<');result.Append(m_name);result.Append(':');if (FieldsData != null){result.Append(FieldsData);}result.Append('>');return result.ToString();}
|
train
| false
|
2,005
|
public DescribeConversionTasksResult describeConversionTasks() {return describeConversionTasks(new DescribeConversionTasksRequest());}
|
[
"public",
"DescribeConversionTasksResult",
"describeConversionTasks",
"(",
")",
"{",
"return",
"describeConversionTasks",
"(",
"new",
"DescribeConversionTasksRequest",
"(",
")",
")",
";",
"}"
] |
public virtual DescribeConversionTasksResponse DescribeConversionTasks(){return DescribeConversionTasks(new DescribeConversionTasksRequest());}
|
train
| false
|
2,006
|
public GetFieldLevelEncryptionProfileConfigResult getFieldLevelEncryptionProfileConfig(GetFieldLevelEncryptionProfileConfigRequest request) {request = beforeClientExecution(request);return executeGetFieldLevelEncryptionProfileConfig(request);}
|
[
"public",
"GetFieldLevelEncryptionProfileConfigResult",
"getFieldLevelEncryptionProfileConfig",
"(",
"GetFieldLevelEncryptionProfileConfigRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetFieldLevelEncryptionProfileConfig",
"(",
"request",
")",
";",
"}"
] |
public virtual GetFieldLevelEncryptionProfileConfigResponse GetFieldLevelEncryptionProfileConfig(GetFieldLevelEncryptionProfileConfigRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetFieldLevelEncryptionProfileConfigRequestMarshaller.Instance;options.ResponseUnmarshaller = GetFieldLevelEncryptionProfileConfigResponseUnmarshaller.Instance;return Invoke<GetFieldLevelEncryptionProfileConfigResponse>(request, options);}
|
train
| true
|
2,007
|
public ListInstancesResult listInstances(ListInstancesRequest request) {request = beforeClientExecution(request);return executeListInstances(request);}
|
[
"public",
"ListInstancesResult",
"listInstances",
"(",
"ListInstancesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListInstances",
"(",
"request",
")",
";",
"}"
] |
public virtual ListInstancesResponse ListInstances(ListInstancesRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListInstancesRequestMarshaller.Instance;options.ResponseUnmarshaller = ListInstancesResponseUnmarshaller.Instance;return Invoke<ListInstancesResponse>(request, options);}
|
train
| true
|
2,009
|
public int read(byte[] dst, int pos, int cnt) throws IOException {try {int n = 0;while (n < cnt) {int r = inf.inflate(dst, pos + n, cnt - n);n += r;if (inf.finished())break;if (inf.needsInput()) {onObjectData(src, buf, p, bAvail);use(bAvail);p = fill(src, 1);inf.setInput(buf, p, bAvail);} else if (r == 0) {throw new CorruptObjectException(MessageFormat.format(JGitText.get().packfileCorruptionDetected,JGitText.get().unknownZlibError));}}actualSize += n;return 0 < n ? n : -1;} catch (DataFormatException dfe) {throw new CorruptObjectException(MessageFormat.format(JGitText.get().packfileCorruptionDetected, dfe.getMessage()));}}
|
[
"public",
"int",
"read",
"(",
"byte",
"[",
"]",
"dst",
",",
"int",
"pos",
",",
"int",
"cnt",
")",
"throws",
"IOException",
"{",
"try",
"{",
"int",
"n",
"=",
"0",
";",
"while",
"(",
"n",
"<",
"cnt",
")",
"{",
"int",
"r",
"=",
"inf",
".",
"inflate",
"(",
"dst",
",",
"pos",
"+",
"n",
",",
"cnt",
"-",
"n",
")",
";",
"n",
"+=",
"r",
";",
"if",
"(",
"inf",
".",
"finished",
"(",
")",
")",
"break",
";",
"if",
"(",
"inf",
".",
"needsInput",
"(",
")",
")",
"{",
"onObjectData",
"(",
"src",
",",
"buf",
",",
"p",
",",
"bAvail",
")",
";",
"use",
"(",
"bAvail",
")",
";",
"p",
"=",
"fill",
"(",
"src",
",",
"1",
")",
";",
"inf",
".",
"setInput",
"(",
"buf",
",",
"p",
",",
"bAvail",
")",
";",
"}",
"else",
"if",
"(",
"r",
"==",
"0",
")",
"{",
"throw",
"new",
"CorruptObjectException",
"(",
"MessageFormat",
".",
"format",
"(",
"JGitText",
".",
"get",
"(",
")",
".",
"packfileCorruptionDetected",
",",
"JGitText",
".",
"get",
"(",
")",
".",
"unknownZlibError",
")",
")",
";",
"}",
"}",
"actualSize",
"+=",
"n",
";",
"return",
"0",
"<",
"n",
"?",
"n",
":",
"-",
"1",
";",
"}",
"catch",
"(",
"DataFormatException",
"dfe",
")",
"{",
"throw",
"new",
"CorruptObjectException",
"(",
"MessageFormat",
".",
"format",
"(",
"JGitText",
".",
"get",
"(",
")",
".",
"packfileCorruptionDetected",
",",
"dfe",
".",
"getMessage",
"(",
")",
")",
")",
";",
"}",
"}"
] |
public override int Read(byte[] dst, int pos, int cnt){try{int n = 0;while (n < cnt){int r = this.inf.Inflate(dst, pos + n, cnt - n);if (r == 0){if (this.inf.IsFinished){break;}if (this.inf.IsNeedingInput){this._enclosing.OnObjectData(this.src, this._enclosing.buf, this.p, this._enclosing.bAvail);this._enclosing.Use(this._enclosing.bAvail);this.p = this._enclosing.Fill(this.src, 1);this.inf.SetInput(this._enclosing.buf, this.p, this._enclosing.bAvail);}else{throw new CorruptObjectException(MessageFormat.Format(JGitText.Get().packfileCorruptionDetected, JGitText.Get().unknownZlibError));}}else{n += r;}}this.actualSize += n;return 0 < n ? n : -1;}catch (SharpZipBaseException dfe){throw new CorruptObjectException(MessageFormat.Format(JGitText.Get().packfileCorruptionDetected, dfe.Message));}}
|
train
| false
|
2,010
|
public WorkflowExecutionCount countClosedWorkflowExecutions(CountClosedWorkflowExecutionsRequest request) {request = beforeClientExecution(request);return executeCountClosedWorkflowExecutions(request);}
|
[
"public",
"WorkflowExecutionCount",
"countClosedWorkflowExecutions",
"(",
"CountClosedWorkflowExecutionsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCountClosedWorkflowExecutions",
"(",
"request",
")",
";",
"}"
] |
public virtual CountClosedWorkflowExecutionsResponse CountClosedWorkflowExecutions(CountClosedWorkflowExecutionsRequest request){var options = new InvokeOptions();options.RequestMarshaller = CountClosedWorkflowExecutionsRequestMarshaller.Instance;options.ResponseUnmarshaller = CountClosedWorkflowExecutionsResponseUnmarshaller.Instance;return Invoke<CountClosedWorkflowExecutionsResponse>(request, options);}
|
train
| true
|
2,011
|
public E remove() {return removeFirstImpl();}
|
[
"public",
"E",
"remove",
"(",
")",
"{",
"return",
"removeFirstImpl",
"(",
")",
";",
"}"
] |
public virtual E remove(){return removeFirstImpl();}
|
train
| false
|
2,012
|
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval numberVE) {final String number;if (numberVE instanceof RefEval) {RefEval re = (RefEval) numberVE;number = OperandResolver.coerceValueToString(re.getInnerValueEval(re.getFirstSheetIndex()));} else {number = OperandResolver.coerceValueToString(numberVE);}if (number.length() > 10) {return ErrorEval.NUM_ERROR;}String unsigned;boolean isPositive;if (number.length() < 10) {unsigned = number;isPositive = true;} else {unsigned = number.substring(1);isPositive = number.startsWith("0");}String value;try {if (isPositive) {int sum = getDecimalValue(unsigned);value = String.valueOf(sum);} else {String inverted = toggleBits(unsigned);int sum = getDecimalValue(inverted);sum++;value = "-" + sum;}} catch (NumberFormatException e) {return ErrorEval.NUM_ERROR;}return new NumberEval(Long.parseLong(value));}
|
[
"public",
"ValueEval",
"evaluate",
"(",
"int",
"srcRowIndex",
",",
"int",
"srcColumnIndex",
",",
"ValueEval",
"numberVE",
")",
"{",
"final",
"String",
"number",
";",
"if",
"(",
"numberVE",
"instanceof",
"RefEval",
")",
"{",
"RefEval",
"re",
"=",
"(",
"RefEval",
")",
"numberVE",
";",
"number",
"=",
"OperandResolver",
".",
"coerceValueToString",
"(",
"re",
".",
"getInnerValueEval",
"(",
"re",
".",
"getFirstSheetIndex",
"(",
")",
")",
")",
";",
"}",
"else",
"{",
"number",
"=",
"OperandResolver",
".",
"coerceValueToString",
"(",
"numberVE",
")",
";",
"}",
"if",
"(",
"number",
".",
"length",
"(",
")",
">",
"10",
")",
"{",
"return",
"ErrorEval",
".",
"NUM_ERROR",
";",
"}",
"String",
"unsigned",
";",
"boolean",
"isPositive",
";",
"if",
"(",
"number",
".",
"length",
"(",
")",
"<",
"10",
")",
"{",
"unsigned",
"=",
"number",
";",
"isPositive",
"=",
"true",
";",
"}",
"else",
"{",
"unsigned",
"=",
"number",
".",
"substring",
"(",
"1",
")",
";",
"isPositive",
"=",
"number",
".",
"startsWith",
"(",
"\"0\"",
")",
";",
"}",
"String",
"value",
";",
"try",
"{",
"if",
"(",
"isPositive",
")",
"{",
"int",
"sum",
"=",
"getDecimalValue",
"(",
"unsigned",
")",
";",
"value",
"=",
"String",
".",
"valueOf",
"(",
"sum",
")",
";",
"}",
"else",
"{",
"String",
"inverted",
"=",
"toggleBits",
"(",
"unsigned",
")",
";",
"int",
"sum",
"=",
"getDecimalValue",
"(",
"inverted",
")",
";",
"sum",
"++",
";",
"value",
"=",
"\"-\"",
"+",
"sum",
";",
"}",
"}",
"catch",
"(",
"NumberFormatException",
"e",
")",
"{",
"return",
"ErrorEval",
".",
"NUM_ERROR",
";",
"}",
"return",
"new",
"NumberEval",
"(",
"Long",
".",
"parseLong",
"(",
"value",
")",
")",
";",
"}"
] |
public override ValueEval Evaluate(int srcRowIndex, int srcColumnIndex, ValueEval numberVE){String number;if (numberVE is RefEval){RefEval re = (RefEval)numberVE;number = OperandResolver.CoerceValueToString(re.GetInnerValueEval(re.FirstSheetIndex));}else{number = OperandResolver.CoerceValueToString(numberVE);}if (number.Length > 10){return ErrorEval.NUM_ERROR;}String unsigned;bool isPositive;if (number.Length < 10){unsigned = number;isPositive = true;}else{unsigned = number.Substring(1);isPositive = number.StartsWith("0");}String value;try{if (isPositive){int sum = getDecimalValue(unsigned);value = sum.ToString();}else{String inverted = toggleBits(unsigned);int sum = getDecimalValue(inverted);sum++;value = "-" + sum.ToString();}}catch (FormatException){return ErrorEval.NUM_ERROR;}return new NumberEval(long.Parse(value));}
|
train
| false
|
2,013
|
public ObjectId getOldId() {return oldId;}
|
[
"public",
"ObjectId",
"getOldId",
"(",
")",
"{",
"return",
"oldId",
";",
"}"
] |
public virtual ObjectId GetOldId(){return oldId;}
|
train
| false
|
2,014
|
public FeatProtection(RecordInputStream in) {fSD = in.readInt();passwordVerifier = in.readInt();title = StringUtil.readUnicodeString(in);securityDescriptor = in.readRemainder();}
|
[
"public",
"FeatProtection",
"(",
"RecordInputStream",
"in",
")",
"{",
"fSD",
"=",
"in",
".",
"readInt",
"(",
")",
";",
"passwordVerifier",
"=",
"in",
".",
"readInt",
"(",
")",
";",
"title",
"=",
"StringUtil",
".",
"readUnicodeString",
"(",
"in",
")",
";",
"securityDescriptor",
"=",
"in",
".",
"readRemainder",
"(",
")",
";",
"}"
] |
public FeatProtection(RecordInputStream in1){fSD = in1.ReadInt();passwordVerifier = in1.ReadInt();title = StringUtil.ReadUnicodeString(in1);securityDescriptor = in1.ReadRemainder();}
|
train
| false
|
2,015
|
public UpdateContactAttributesResult updateContactAttributes(UpdateContactAttributesRequest request) {request = beforeClientExecution(request);return executeUpdateContactAttributes(request);}
|
[
"public",
"UpdateContactAttributesResult",
"updateContactAttributes",
"(",
"UpdateContactAttributesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateContactAttributes",
"(",
"request",
")",
";",
"}"
] |
public virtual UpdateContactAttributesResponse UpdateContactAttributes(UpdateContactAttributesRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateContactAttributesRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateContactAttributesResponseUnmarshaller.Instance;return Invoke<UpdateContactAttributesResponse>(request, options);}
|
train
| true
|
2,016
|
public DescribeClientVpnEndpointsResult describeClientVpnEndpoints(DescribeClientVpnEndpointsRequest request) {request = beforeClientExecution(request);return executeDescribeClientVpnEndpoints(request);}
|
[
"public",
"DescribeClientVpnEndpointsResult",
"describeClientVpnEndpoints",
"(",
"DescribeClientVpnEndpointsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeClientVpnEndpoints",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeClientVpnEndpointsResponse DescribeClientVpnEndpoints(DescribeClientVpnEndpointsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeClientVpnEndpointsRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeClientVpnEndpointsResponseUnmarshaller.Instance;return Invoke<DescribeClientVpnEndpointsResponse>(request, options);}
|
train
| true
|
2,017
|
public DescribeCacheSecurityGroupsResult describeCacheSecurityGroups(DescribeCacheSecurityGroupsRequest request) {request = beforeClientExecution(request);return executeDescribeCacheSecurityGroups(request);}
|
[
"public",
"DescribeCacheSecurityGroupsResult",
"describeCacheSecurityGroups",
"(",
"DescribeCacheSecurityGroupsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeCacheSecurityGroups",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeCacheSecurityGroupsResponse DescribeCacheSecurityGroups(DescribeCacheSecurityGroupsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeCacheSecurityGroupsRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeCacheSecurityGroupsResponseUnmarshaller.Instance;return Invoke<DescribeCacheSecurityGroupsResponse>(request, options);}
|
train
| true
|
2,018
|
public boolean equals(Object object) {synchronized (Hashtable.this) {return super.equals(object);}}
|
[
"public",
"boolean",
"equals",
"(",
"Object",
"object",
")",
"{",
"synchronized",
"(",
"Hashtable",
".",
"this",
")",
"{",
"return",
"super",
".",
"equals",
"(",
"object",
")",
";",
"}",
"}"
] |
public override bool Equals(object @object){lock (this._enclosing){return base.Equals(@object);}}
|
train
| false
|
2,019
|
public static List<TransportProtocol> getTransportProtocols() {int cnt = protocols.size();List<TransportProtocol> res = new ArrayList<>(cnt);for (WeakReference<TransportProtocol> ref : protocols) {TransportProtocol proto = ref.get();if (proto != null)res.add(proto);elseprotocols.remove(ref);}return Collections.unmodifiableList(res);}
|
[
"public",
"static",
"List",
"<",
"TransportProtocol",
">",
"getTransportProtocols",
"(",
")",
"{",
"int",
"cnt",
"=",
"protocols",
".",
"size",
"(",
")",
";",
"List",
"<",
"TransportProtocol",
">",
"res",
"=",
"new",
"ArrayList",
"<",
">",
"(",
"cnt",
")",
";",
"for",
"(",
"WeakReference",
"<",
"TransportProtocol",
">",
"ref",
":",
"protocols",
")",
"{",
"TransportProtocol",
"proto",
"=",
"ref",
".",
"get",
"(",
")",
";",
"if",
"(",
"proto",
"!=",
"null",
")",
"res",
".",
"add",
"(",
"proto",
")",
";",
"elseprotocols",
".",
"remove",
"(",
"ref",
")",
";",
"}",
"return",
"Collections",
".",
"unmodifiableList",
"(",
"res",
")",
";",
"}"
] |
public static IList<TransportProtocol> GetTransportProtocols(){int cnt = protocols.Count;IList<TransportProtocol> res = new AList<TransportProtocol>(cnt);foreach (JavaWeakReference<TransportProtocol> @ref in protocols){TransportProtocol proto = @ref.Get();if (proto != null){res.AddItem(proto);}else{protocols.Remove(@ref);}}return Sharpen.Collections.UnmodifiableList(res);}
|
train
| false
|
2,020
|
public SrndTermQuery(String termText, boolean quoted) {super(quoted);this.termText = termText;}
|
[
"public",
"SrndTermQuery",
"(",
"String",
"termText",
",",
"boolean",
"quoted",
")",
"{",
"super",
"(",
"quoted",
")",
";",
"this",
".",
"termText",
"=",
"termText",
";",
"}"
] |
public SrndTermQuery(string termText, bool quoted): base(quoted){this.termText = termText;}
|
train
| false
|
2,021
|
public CreateEmailTemplateResult createEmailTemplate(CreateEmailTemplateRequest request) {request = beforeClientExecution(request);return executeCreateEmailTemplate(request);}
|
[
"public",
"CreateEmailTemplateResult",
"createEmailTemplate",
"(",
"CreateEmailTemplateRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCreateEmailTemplate",
"(",
"request",
")",
";",
"}"
] |
public virtual CreateEmailTemplateResponse CreateEmailTemplate(CreateEmailTemplateRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateEmailTemplateRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateEmailTemplateResponseUnmarshaller.Instance;return Invoke<CreateEmailTemplateResponse>(request, options);}
|
train
| false
|
2,022
|
public ByteBuffer putChar(char value) {return putShort((short) value);}
|
[
"public",
"ByteBuffer",
"putChar",
"(",
"char",
"value",
")",
"{",
"return",
"putShort",
"(",
"(",
"short",
")",
"value",
")",
";",
"}"
] |
public override java.nio.ByteBuffer putChar(char value){return putShort((short)value);}
|
train
| false
|
2,023
|
public static String getLocalizedMessage(String key) {return getLocalizedMessage(key, Locale.getDefault());}
|
[
"public",
"static",
"String",
"getLocalizedMessage",
"(",
"String",
"key",
")",
"{",
"return",
"getLocalizedMessage",
"(",
"key",
",",
"Locale",
".",
"getDefault",
"(",
")",
")",
";",
"}"
] |
public static string GetLocalizedMessage(string key){return GetLocalizedMessage(key, CultureInfo.InvariantCulture);}
|
train
| false
|
2,024
|
public Snapshot deleteSnapshot(DeleteSnapshotRequest request) {request = beforeClientExecution(request);return executeDeleteSnapshot(request);}
|
[
"public",
"Snapshot",
"deleteSnapshot",
"(",
"DeleteSnapshotRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteSnapshot",
"(",
"request",
")",
";",
"}"
] |
public virtual DeleteSnapshotResponse DeleteSnapshot(DeleteSnapshotRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteSnapshotRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteSnapshotResponseUnmarshaller.Instance;return Invoke<DeleteSnapshotResponse>(request, options);}
|
train
| true
|
2,025
|
public ListMemberAccountsResult listMemberAccounts(ListMemberAccountsRequest request) {request = beforeClientExecution(request);return executeListMemberAccounts(request);}
|
[
"public",
"ListMemberAccountsResult",
"listMemberAccounts",
"(",
"ListMemberAccountsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListMemberAccounts",
"(",
"request",
")",
";",
"}"
] |
public virtual ListMemberAccountsResponse ListMemberAccounts(ListMemberAccountsRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListMemberAccountsRequestMarshaller.Instance;options.ResponseUnmarshaller = ListMemberAccountsResponseUnmarshaller.Instance;return Invoke<ListMemberAccountsResponse>(request, options);}
|
train
| true
|
2,026
|
public boolean shouldRefresh() {long now = System.currentTimeMillis();return now - lastFailedRefreshTime > refreshIntervalInMillSeconds;}
|
[
"public",
"boolean",
"shouldRefresh",
"(",
")",
"{",
"long",
"now",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"return",
"now",
"-",
"lastFailedRefreshTime",
">",
"refreshIntervalInMillSeconds",
";",
"}"
] |
public bool ShouldRefresh(){var now = DateTime.UtcNow.Ticks;return now - lastFailedRefreshTime > refreshIntervalInMillSeconds;}
|
train
| false
|
2,027
|
public void setRefLogMessage(String msg, boolean appendStatus) {if (msg == null && !appendStatus)disableRefLog();else if (msg == null && appendStatus) {refLogMessage = ""; refLogIncludeResult = true;} else {refLogMessage = msg;refLogIncludeResult = appendStatus;}}
|
[
"public",
"void",
"setRefLogMessage",
"(",
"String",
"msg",
",",
"boolean",
"appendStatus",
")",
"{",
"if",
"(",
"msg",
"==",
"null",
"&&",
"!",
"appendStatus",
")",
"disableRefLog",
"(",
")",
";",
"else",
"if",
"(",
"msg",
"==",
"null",
"&&",
"appendStatus",
")",
"{",
"refLogMessage",
"=",
"\"\"",
";",
"refLogIncludeResult",
"=",
"true",
";",
"}",
"else",
"{",
"refLogMessage",
"=",
"msg",
";",
"refLogIncludeResult",
"=",
"appendStatus",
";",
"}",
"}"
] |
public virtual void SetRefLogMessage(string msg, bool appendStatus){if (msg == null && !appendStatus){DisableRefLog();}else{if (msg == null && appendStatus){refLogMessage = string.Empty;refLogIncludeResult = true;}else{refLogMessage = msg;refLogIncludeResult = appendStatus;}}}
|
train
| false
|
2,028
|
public Status getStatus() {return myStatus;}
|
[
"public",
"Status",
"getStatus",
"(",
")",
"{",
"return",
"myStatus",
";",
"}"
] |
public virtual RemoteRefUpdate.Status GetStatus(){return status;}
|
train
| false
|
2,029
|
public GetDeploymentStrategyResult getDeploymentStrategy(GetDeploymentStrategyRequest request) {request = beforeClientExecution(request);return executeGetDeploymentStrategy(request);}
|
[
"public",
"GetDeploymentStrategyResult",
"getDeploymentStrategy",
"(",
"GetDeploymentStrategyRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetDeploymentStrategy",
"(",
"request",
")",
";",
"}"
] |
public virtual GetDeploymentStrategyResponse GetDeploymentStrategy(GetDeploymentStrategyRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetDeploymentStrategyRequestMarshaller.Instance;options.ResponseUnmarshaller = GetDeploymentStrategyResponseUnmarshaller.Instance;return Invoke<GetDeploymentStrategyResponse>(request, options);}
|
train
| false
|
2,030
|
public DeleteEventResult deleteEvent(DeleteEventRequest request) {request = beforeClientExecution(request);return executeDeleteEvent(request);}
|
[
"public",
"DeleteEventResult",
"deleteEvent",
"(",
"DeleteEventRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteEvent",
"(",
"request",
")",
";",
"}"
] |
public virtual DeleteEventResponse DeleteEvent(DeleteEventRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteEventRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteEventResponseUnmarshaller.Instance;return Invoke<DeleteEventResponse>(request, options);}
|
train
| false
|
2,031
|
public ListQueryLoggingConfigsResult listQueryLoggingConfigs(ListQueryLoggingConfigsRequest request) {request = beforeClientExecution(request);return executeListQueryLoggingConfigs(request);}
|
[
"public",
"ListQueryLoggingConfigsResult",
"listQueryLoggingConfigs",
"(",
"ListQueryLoggingConfigsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListQueryLoggingConfigs",
"(",
"request",
")",
";",
"}"
] |
public virtual ListQueryLoggingConfigsResponse ListQueryLoggingConfigs(ListQueryLoggingConfigsRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListQueryLoggingConfigsRequestMarshaller.Instance;options.ResponseUnmarshaller = ListQueryLoggingConfigsResponseUnmarshaller.Instance;return Invoke<ListQueryLoggingConfigsResponse>(request, options);}
|
train
| true
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.