id_within_dataset
int64 0
10.3k
| snippet
stringlengths 29
1.4k
| tokens
sequencelengths 10
314
| cs
stringlengths 28
1.38k
| split_within_dataset
stringclasses 1
value | is_duplicated
bool 2
classes |
---|---|---|---|---|---|
10,200 | public Editable newEditable(CharSequence source) {return new CalculatorEditable(source, mLogic);}
| [
"public",
"Editable",
"newEditable",
"(",
"CharSequence",
"source",
")",
"{",
"return",
"new",
"CalculatorEditable",
"(",
"source",
",",
"mLogic",
")",
";",
"}"
] | public virtual android.text.Editable newEditable(java.lang.CharSequence source){return new android.text.SpannableStringBuilder(source);}
| train | false |
10,201 | public static TreeFilter createFromStrings(String... paths) {if (paths.length == 0)throw new IllegalArgumentException(JGitText.get().atLeastOnePathIsRequired);final int length = paths.length;final PathFilter[] p = new PathFilter[length];for (int i = 0; i < length; i++)p[i] = PathFilter.create(paths[i]);return create(p);}
| [
"public",
"static",
"TreeFilter",
"createFromStrings",
"(",
"String",
"...",
"paths",
")",
"{",
"if",
"(",
"paths",
".",
"length",
"==",
"0",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"JGitText",
".",
"get",
"(",
")",
".",
"atLeastOnePathIsRequired",
")",
";",
"final",
"int",
"length",
"=",
"paths",
".",
"length",
";",
"final",
"PathFilter",
"[",
"]",
"p",
"=",
"new",
"PathFilter",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"p",
"[",
"i",
"]",
"=",
"PathFilter",
".",
"create",
"(",
"paths",
"[",
"i",
"]",
")",
";",
"return",
"create",
"(",
"p",
")",
";",
"}"
] | public static TreeFilter CreateFromStrings(params string[] paths){if (paths.Length == 0){throw new ArgumentException(JGitText.Get().atLeastOnePathIsRequired);}int length = paths.Length;PathFilter[] p = new PathFilter[length];for (int i = 0; i < length; i++){p[i] = PathFilter.Create(paths[i]);}return Create(p);}
| train | false |
10,202 | public DescribeHostedConnectionsResult describeHostedConnections(DescribeHostedConnectionsRequest request) {request = beforeClientExecution(request);return executeDescribeHostedConnections(request);}
| [
"public",
"DescribeHostedConnectionsResult",
"describeHostedConnections",
"(",
"DescribeHostedConnectionsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeHostedConnections",
"(",
"request",
")",
";",
"}"
] | public virtual DescribeHostedConnectionsResponse DescribeHostedConnections(DescribeHostedConnectionsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeHostedConnectionsRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeHostedConnectionsResponseUnmarshaller.Instance;return Invoke<DescribeHostedConnectionsResponse>(request, options);}
| train | true |
10,203 | public RejectTransitGatewayPeeringAttachmentResult rejectTransitGatewayPeeringAttachment(RejectTransitGatewayPeeringAttachmentRequest request) {request = beforeClientExecution(request);return executeRejectTransitGatewayPeeringAttachment(request);}
| [
"public",
"RejectTransitGatewayPeeringAttachmentResult",
"rejectTransitGatewayPeeringAttachment",
"(",
"RejectTransitGatewayPeeringAttachmentRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeRejectTransitGatewayPeeringAttachment",
"(",
"request",
")",
";",
"}"
] | public virtual RejectTransitGatewayPeeringAttachmentResponse RejectTransitGatewayPeeringAttachment(RejectTransitGatewayPeeringAttachmentRequest request){var options = new InvokeOptions();options.RequestMarshaller = RejectTransitGatewayPeeringAttachmentRequestMarshaller.Instance;options.ResponseUnmarshaller = RejectTransitGatewayPeeringAttachmentResponseUnmarshaller.Instance;return Invoke<RejectTransitGatewayPeeringAttachmentResponse>(request, options);}
| train | false |
10,204 | public static double toPoints(long emu){return (double)emu/EMU_PER_POINT;}
| [
"public",
"static",
"double",
"toPoints",
"(",
"long",
"emu",
")",
"{",
"return",
"(",
"double",
")",
"emu",
"/",
"EMU_PER_POINT",
";",
"}"
] | public static double ToPoints(long emu){return (double)emu / EMU_PER_POINT;}
| train | false |
10,205 | public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0, ValueEval arg1) {return arg1;}
| [
"public",
"ValueEval",
"evaluate",
"(",
"int",
"srcRowIndex",
",",
"int",
"srcColumnIndex",
",",
"ValueEval",
"arg0",
",",
"ValueEval",
"arg1",
")",
"{",
"return",
"arg1",
";",
"}"
] | public override ValueEval Evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0, ValueEval arg1){return arg1;}
| train | false |
10,206 | public final BytesRef getBinaryValue(String name) {for (IndexableField field : fields) {if (field.name().equals(name)) {final BytesRef bytes = field.binaryValue();if (bytes != null) {return bytes;}}}return null;}
| [
"public",
"final",
"BytesRef",
"getBinaryValue",
"(",
"String",
"name",
")",
"{",
"for",
"(",
"IndexableField",
"field",
":",
"fields",
")",
"{",
"if",
"(",
"field",
".",
"name",
"(",
")",
".",
"equals",
"(",
"name",
")",
")",
"{",
"final",
"BytesRef",
"bytes",
"=",
"field",
".",
"binaryValue",
"(",
")",
";",
"if",
"(",
"bytes",
"!=",
"null",
")",
"{",
"return",
"bytes",
";",
"}",
"}",
"}",
"return",
"null",
";",
"}"
] | public BytesRef GetBinaryValue(string name){foreach (IIndexableField field in fields){if (field.Name.Equals(name, StringComparison.Ordinal)){BytesRef bytes = field.GetBinaryValue();if (bytes != null){return bytes;}}}return null;}
| train | false |
10,207 | public CRNBlock(RecordStream rs) {_countRecord = (CRNCountRecord) rs.getNext();int nCRNs = _countRecord.getNumberOfCRNs();CRNRecord[] crns = new CRNRecord[nCRNs];for (int i = 0; i < crns.length; i++) {crns[i] = (CRNRecord) rs.getNext();}_crns = crns;}
| [
"public",
"CRNBlock",
"(",
"RecordStream",
"rs",
")",
"{",
"_countRecord",
"=",
"(",
"CRNCountRecord",
")",
"rs",
".",
"getNext",
"(",
")",
";",
"int",
"nCRNs",
"=",
"_countRecord",
".",
"getNumberOfCRNs",
"(",
")",
";",
"CRNRecord",
"[",
"]",
"crns",
"=",
"new",
"CRNRecord",
"[",
"nCRNs",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"crns",
".",
"length",
";",
"i",
"++",
")",
"{",
"crns",
"[",
"i",
"]",
"=",
"(",
"CRNRecord",
")",
"rs",
".",
"getNext",
"(",
")",
";",
"}",
"_crns",
"=",
"crns",
";",
"}"
] | public CRNBlock(RecordStream rs){_countRecord = (CRNCountRecord)rs.GetNext();int nCRNs = _countRecord.NumberOfCRNs;CRNRecord[] crns = new CRNRecord[nCRNs];for (int i = 0; i < crns.Length; i++){crns[i] = (CRNRecord)rs.GetNext();}_crns = crns;}
| train | false |
10,208 | public int get(int index, long[] arr, int off, int len) {return current.get(index, arr, off, len);}
| [
"public",
"int",
"get",
"(",
"int",
"index",
",",
"long",
"[",
"]",
"arr",
",",
"int",
"off",
",",
"int",
"len",
")",
"{",
"return",
"current",
".",
"get",
"(",
"index",
",",
"arr",
",",
"off",
",",
"len",
")",
";",
"}"
] | public override int Get(int index, long[] arr, int off, int len){return current.Get(index, arr, off, len);}
| train | false |
10,209 | public LooseRef peel(ObjectIdRef newLeaf) {return this;}
| [
"public",
"LooseRef",
"peel",
"(",
"ObjectIdRef",
"newLeaf",
")",
"{",
"return",
"this",
";",
"}"
] | public RefDirectory.LooseRef Peel(ObjectIdRef newLeaf){return this;}
| train | false |
10,210 | public UpdateModelVersionResult updateModelVersion(UpdateModelVersionRequest request) {request = beforeClientExecution(request);return executeUpdateModelVersion(request);}
| [
"public",
"UpdateModelVersionResult",
"updateModelVersion",
"(",
"UpdateModelVersionRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateModelVersion",
"(",
"request",
")",
";",
"}"
] | public virtual UpdateModelVersionResponse UpdateModelVersion(UpdateModelVersionRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateModelVersionRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateModelVersionResponseUnmarshaller.Instance;return Invoke<UpdateModelVersionResponse>(request, options);}
| train | false |
10,211 | public Builder() {PositiveIntOutputs outputs = PositiveIntOutputs.getSingleton();fstCompiler = new FSTCompiler<>(FST.INPUT_TYPE.BYTE1, outputs);scratchInts = new IntsRefBuilder();}
| [
"public",
"Builder",
"(",
")",
"{",
"PositiveIntOutputs",
"outputs",
"=",
"PositiveIntOutputs",
".",
"getSingleton",
"(",
")",
";",
"fstCompiler",
"=",
"new",
"FSTCompiler",
"<",
">",
"(",
"FST",
".",
"INPUT_TYPE",
".",
"BYTE1",
",",
"outputs",
")",
";",
"scratchInts",
"=",
"new",
"IntsRefBuilder",
"(",
")",
";",
"}"
] | public Builder(): base(){lastDocID = -1;wordNum = -1;word = 0;}
| train | false |
10,213 | public int describeContents() {return 0;}
| [
"public",
"int",
"describeContents",
"(",
")",
"{",
"return",
"0",
";",
"}"
] | public virtual int describeContents(){return 0;}
| train | false |
10,214 | public FetchConnection openFetch() throws TransportException {if (src == null)throw new TransportException(uri, JGitText.get().onlyOneFetchSupported);try {return new BundleFetchConnection(this, src);} finally {src = null;}}
| [
"public",
"FetchConnection",
"openFetch",
"(",
")",
"throws",
"TransportException",
"{",
"if",
"(",
"src",
"==",
"null",
")",
"throw",
"new",
"TransportException",
"(",
"uri",
",",
"JGitText",
".",
"get",
"(",
")",
".",
"onlyOneFetchSupported",
")",
";",
"try",
"{",
"return",
"new",
"BundleFetchConnection",
"(",
"this",
",",
"src",
")",
";",
"}",
"finally",
"{",
"src",
"=",
"null",
";",
"}",
"}"
] | public override FetchConnection OpenFetch(){if (src == null){throw new TransportException(uri, JGitText.Get().onlyOneFetchSupported);}try{return new BundleFetchConnection(this, src);}finally{src = null;}}
| train | false |
10,215 | public DeleteWorkGroupResult deleteWorkGroup(DeleteWorkGroupRequest request) {request = beforeClientExecution(request);return executeDeleteWorkGroup(request);}
| [
"public",
"DeleteWorkGroupResult",
"deleteWorkGroup",
"(",
"DeleteWorkGroupRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteWorkGroup",
"(",
"request",
")",
";",
"}"
] | public virtual DeleteWorkGroupResponse DeleteWorkGroup(DeleteWorkGroupRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteWorkGroupRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteWorkGroupResponseUnmarshaller.Instance;return Invoke<DeleteWorkGroupResponse>(request, options);}
| train | true |
10,216 | public GetApiResult getApi(GetApiRequest request) {request = beforeClientExecution(request);return executeGetApi(request);}
| [
"public",
"GetApiResult",
"getApi",
"(",
"GetApiRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetApi",
"(",
"request",
")",
";",
"}"
] | public virtual GetApiResponse GetApi(GetApiRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetApiRequestMarshaller.Instance;options.ResponseUnmarshaller = GetApiResponseUnmarshaller.Instance;return Invoke<GetApiResponse>(request, options);}
| train | true |
10,217 | public LongBuffer slice() {return new ReadOnlyLongArrayBuffer(remaining(), backingArray, offset + position);}
| [
"public",
"LongBuffer",
"slice",
"(",
")",
"{",
"return",
"new",
"ReadOnlyLongArrayBuffer",
"(",
"remaining",
"(",
")",
",",
"backingArray",
",",
"offset",
"+",
"position",
")",
";",
"}"
] | public override java.nio.LongBuffer slice(){return new java.nio.ReadOnlyLongArrayBuffer(remaining(), backingArray, offset + _position);}
| train | false |
10,218 | public String toString() {String opName = getClass().getName();int index = opName.indexOf('$');opName = opName.substring(index+1, opName.length());return "<"+opName+"@"+tokens.get(index)+":\""+text+"\">";}
| [
"public",
"String",
"toString",
"(",
")",
"{",
"String",
"opName",
"=",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
";",
"int",
"index",
"=",
"opName",
".",
"indexOf",
"(",
"'$'",
")",
";",
"opName",
"=",
"opName",
".",
"substring",
"(",
"index",
"+",
"1",
",",
"opName",
".",
"length",
"(",
")",
")",
";",
"return",
"\"<\"",
"+",
"opName",
"+",
"\"@\"",
"+",
"tokens",
".",
"get",
"(",
"index",
")",
"+",
"\":\\\"\"",
"+",
"text",
"+",
"\"\\\">\"",
";",
"}"
] | public override string ToString(){string opName = GetType().FullName;int index = opName.IndexOf('$');opName = Sharpen.Runtime.Substring(opName, index + 1, opName.Length);return "<" + opName + "@" + tokens.Get(this.index) + ":\"" + text + "\">";}
| train | false |
10,219 | public String toString() {return "Action[" + token + "]";}
| [
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"\"Action[\"",
"+",
"token",
"+",
"\"]\"",
";",
"}"
] | public override string ToString(){return "Action[" + token + "]";}
| train | false |
10,220 | public static EvaluationException invalidRef() {return new EvaluationException(ErrorEval.REF_INVALID);}
| [
"public",
"static",
"EvaluationException",
"invalidRef",
"(",
")",
"{",
"return",
"new",
"EvaluationException",
"(",
"ErrorEval",
".",
"REF_INVALID",
")",
";",
"}"
] | public static EvaluationException InvalidRef(){return new EvaluationException(ErrorEval.REF_INVALID);}
| train | false |
10,221 | public Iterator<Entry> getEntries() {return new FilteringIterator();}
| [
"public",
"Iterator",
"<",
"Entry",
">",
"getEntries",
"(",
")",
"{",
"return",
"new",
"FilteringIterator",
"(",
")",
";",
"}"
] | public IEnumerator<Entry> GetEntries(){return new FilteringIterator(this); ;}
| train | false |
10,222 | public String toString() {StringBuilder buffer = new StringBuilder();buffer.append(" [FUTURE HEADER]\n");buffer.append(" Type " + recordType);buffer.append(" Flags " + grbitFrt);buffer.append(" [/FUTURE HEADER]\n");return buffer.toString();}
| [
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuilder",
"buffer",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"\" [FUTURE HEADER]\\n\"",
")",
";",
"buffer",
".",
"append",
"(",
"\" Type \"",
"+",
"recordType",
")",
";",
"buffer",
".",
"append",
"(",
"\" Flags \"",
"+",
"grbitFrt",
")",
";",
"buffer",
".",
"append",
"(",
"\" [/FUTURE HEADER]\\n\"",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}"
] | public override String ToString(){StringBuilder buffer = new StringBuilder();buffer.Append(" [FUTURE HEADER]\n");buffer.Append(" type " + recordType);buffer.Append(" flags " + grbitFrt);buffer.Append(" [/FUTURE HEADER]\n");return buffer.ToString();}
| train | false |
10,223 | public void copy(MutableValue source) {MutableValueStr s = (MutableValueStr) source;exists = s.exists;value.copyBytes(s.value);}
| [
"public",
"void",
"copy",
"(",
"MutableValue",
"source",
")",
"{",
"MutableValueStr",
"s",
"=",
"(",
"MutableValueStr",
")",
"source",
";",
"exists",
"=",
"s",
".",
"exists",
";",
"value",
".",
"copyBytes",
"(",
"s",
".",
"value",
")",
";",
"}"
] | public override void Copy(MutableValue source){MutableValueStr s = (MutableValueStr)source;Exists = s.Exists;Value.CopyBytes(s.Value);}
| train | false |
10,224 | public ReaderSlice(int start, int length, int readerIndex) {this.start = start;this.length = length;this.readerIndex = readerIndex;}
| [
"public",
"ReaderSlice",
"(",
"int",
"start",
",",
"int",
"length",
",",
"int",
"readerIndex",
")",
"{",
"this",
".",
"start",
"=",
"start",
";",
"this",
".",
"length",
"=",
"length",
";",
"this",
".",
"readerIndex",
"=",
"readerIndex",
";",
"}"
] | public ReaderSlice(int start, int length, int readerIndex){this.Start = start;this.Length = length;this.ReaderIndex = readerIndex;}
| train | false |
10,225 | public AddTagsResult addTags(AddTagsRequest request) {request = beforeClientExecution(request);return executeAddTags(request);}
| [
"public",
"AddTagsResult",
"addTags",
"(",
"AddTagsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeAddTags",
"(",
"request",
")",
";",
"}"
] | public virtual AddTagsResponse AddTags(AddTagsRequest request){var options = new InvokeOptions();options.RequestMarshaller = AddTagsRequestMarshaller.Instance;options.ResponseUnmarshaller = AddTagsResponseUnmarshaller.Instance;return Invoke<AddTagsResponse>(request, options);}
| train | true |
10,226 | public static URI create(String uri) {try {return new URI(uri);} catch (URISyntaxException e) {throw new IllegalArgumentException(e.getMessage());}}
| [
"public",
"static",
"URI",
"create",
"(",
"String",
"uri",
")",
"{",
"try",
"{",
"return",
"new",
"URI",
"(",
"uri",
")",
";",
"}",
"catch",
"(",
"URISyntaxException",
"e",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"e",
".",
"getMessage",
"(",
")",
")",
";",
"}",
"}"
] | public static java.net.URI create(string uri){try{return new java.net.URI(uri);}catch (java.net.URISyntaxException e){throw new System.ArgumentException(e.Message);}}
| train | false |
10,227 | public UpdateConfigurationSetTrackingOptionsResult updateConfigurationSetTrackingOptions(UpdateConfigurationSetTrackingOptionsRequest request) {request = beforeClientExecution(request);return executeUpdateConfigurationSetTrackingOptions(request);}
| [
"public",
"UpdateConfigurationSetTrackingOptionsResult",
"updateConfigurationSetTrackingOptions",
"(",
"UpdateConfigurationSetTrackingOptionsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateConfigurationSetTrackingOptions",
"(",
"request",
")",
";",
"}"
] | public virtual UpdateConfigurationSetTrackingOptionsResponse UpdateConfigurationSetTrackingOptions(UpdateConfigurationSetTrackingOptionsRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateConfigurationSetTrackingOptionsRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateConfigurationSetTrackingOptionsResponseUnmarshaller.Instance;return Invoke<UpdateConfigurationSetTrackingOptionsResponse>(request, options);}
| train | true |
10,228 | public void recycleByteBlocks(byte[][] blocks, int start, int end) {bytesUsed.addAndGet(-((end-start)* blockSize));for (int i = start; i < end; i++) {blocks[i] = null;}}
| [
"public",
"void",
"recycleByteBlocks",
"(",
"byte",
"[",
"]",
"[",
"]",
"blocks",
",",
"int",
"start",
",",
"int",
"end",
")",
"{",
"bytesUsed",
".",
"addAndGet",
"(",
"-",
"(",
"(",
"end",
"-",
"start",
")",
"*",
"blockSize",
")",
")",
";",
"for",
"(",
"int",
"i",
"=",
"start",
";",
"i",
"<",
"end",
";",
"i",
"++",
")",
"{",
"blocks",
"[",
"i",
"]",
"=",
"null",
";",
"}",
"}"
] | public override void RecycleByteBlocks(byte[][] blocks, int start, int end){bytesUsed.AddAndGet(-((end - start) * m_blockSize));for (var i = start; i < end; i++){blocks[i] = null;}}
| train | false |
10,229 | public DoubleBuffer compact() {throw new ReadOnlyBufferException();}
| [
"public",
"DoubleBuffer",
"compact",
"(",
")",
"{",
"throw",
"new",
"ReadOnlyBufferException",
"(",
")",
";",
"}"
] | public override java.nio.DoubleBuffer compact(){throw new java.nio.ReadOnlyBufferException();}
| train | false |
10,230 | public GetVoiceConnectorStreamingConfigurationResult getVoiceConnectorStreamingConfiguration(GetVoiceConnectorStreamingConfigurationRequest request) {request = beforeClientExecution(request);return executeGetVoiceConnectorStreamingConfiguration(request);}
| [
"public",
"GetVoiceConnectorStreamingConfigurationResult",
"getVoiceConnectorStreamingConfiguration",
"(",
"GetVoiceConnectorStreamingConfigurationRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetVoiceConnectorStreamingConfiguration",
"(",
"request",
")",
";",
"}"
] | public virtual GetVoiceConnectorStreamingConfigurationResponse GetVoiceConnectorStreamingConfiguration(GetVoiceConnectorStreamingConfigurationRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetVoiceConnectorStreamingConfigurationRequestMarshaller.Instance;options.ResponseUnmarshaller = GetVoiceConnectorStreamingConfigurationResponseUnmarshaller.Instance;return Invoke<GetVoiceConnectorStreamingConfigurationResponse>(request, options);}
| train | false |
10,231 | public boolean hasNext() {return pos + 1 < size();}
| [
"public",
"boolean",
"hasNext",
"(",
")",
"{",
"return",
"pos",
"+",
"1",
"<",
"size",
"(",
")",
";",
"}"
] | public virtual bool hasNext(){return this.pos + 1 < this._enclosing.size();}
| train | false |
10,232 | public double getRKNumberAt(int coffset) {return RKUtil.decodeNumber(field_3_rks[coffset].rk);}
| [
"public",
"double",
"getRKNumberAt",
"(",
"int",
"coffset",
")",
"{",
"return",
"RKUtil",
".",
"decodeNumber",
"(",
"field_3_rks",
"[",
"coffset",
"]",
".",
"rk",
")",
";",
"}"
] | public double GetRKNumberAt(int coffset){return RKUtil.DecodeNumber(field_3_rks[coffset].rk);}
| train | false |
10,233 | public ReimportApiResult reimportApi(ReimportApiRequest request) {request = beforeClientExecution(request);return executeReimportApi(request);}
| [
"public",
"ReimportApiResult",
"reimportApi",
"(",
"ReimportApiRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeReimportApi",
"(",
"request",
")",
";",
"}"
] | public virtual ReimportApiResponse ReimportApi(ReimportApiRequest request){var options = new InvokeOptions();options.RequestMarshaller = ReimportApiRequestMarshaller.Instance;options.ResponseUnmarshaller = ReimportApiResponseUnmarshaller.Instance;return Invoke<ReimportApiResponse>(request, options);}
| train | false |
10,234 | public boolean hasNext() {return link.previous != list.voidLink;}
| [
"public",
"boolean",
"hasNext",
"(",
")",
"{",
"return",
"link",
".",
"previous",
"!=",
"list",
".",
"voidLink",
";",
"}"
] | public virtual bool hasNext(){return this.link.previous != this.list.voidLink;}
| train | false |
10,235 | public void fill(BytesRef b, long start) {final int index = (int) (start >> blockBits);final int offset = (int) (start & blockMask);final byte[] block = b.bytes = blocks[index];if ((block[offset] & 128) == 0) {b.length = block[offset];b.offset = offset+1;} else {b.length = ((block[offset] & 0x7f) << 8) | (block[1+offset] & 0xff);b.offset = offset+2;assert b.length > 0;}}
| [
"public",
"void",
"fill",
"(",
"BytesRef",
"b",
",",
"long",
"start",
")",
"{",
"final",
"int",
"index",
"=",
"(",
"int",
")",
"(",
"start",
">",
">",
"blockBits",
")",
";",
"final",
"int",
"offset",
"=",
"(",
"int",
")",
"(",
"start",
"&",
"blockMask",
")",
";",
"final",
"byte",
"[",
"]",
"block",
"=",
"b",
".",
"bytes",
"=",
"blocks",
"[",
"index",
"]",
";",
"if",
"(",
"(",
"block",
"[",
"offset",
"]",
"&",
"128",
")",
"==",
"0",
")",
"{",
"b",
".",
"length",
"=",
"block",
"[",
"offset",
"]",
";",
"b",
".",
"offset",
"=",
"offset",
"+",
"1",
";",
"}",
"else",
"{",
"b",
".",
"length",
"=",
"(",
"(",
"block",
"[",
"offset",
"]",
"&",
"0x7f",
")",
"<<",
"8",
")",
"|",
"(",
"block",
"[",
"1",
"+",
"offset",
"]",
"&",
"0xff",
")",
";",
"b",
".",
"offset",
"=",
"offset",
"+",
"2",
";",
"assert",
"b",
".",
"length",
">",
"0",
";",
"}",
"}"
] | public void Fill(BytesRef b, long start){var index = (int)(start >> blockBits);var offset = (int)(start & blockMask);var block = b.Bytes = blocks[index];if ((block[offset] & 128) == 0){b.Length = block[offset];b.Offset = offset + 1;}else{b.Length = ((block[offset] & 0x7f) << 8) | (block[1 + offset] & 0xff);b.Offset = offset + 2;Debug.Assert(b.Length > 0);}}
| train | false |
10,237 | public SubmoduleUpdateCommand submoduleUpdate() {return new SubmoduleUpdateCommand(repo);}
| [
"public",
"SubmoduleUpdateCommand",
"submoduleUpdate",
"(",
")",
"{",
"return",
"new",
"SubmoduleUpdateCommand",
"(",
"repo",
")",
";",
"}"
] | public virtual SubmoduleUpdateCommand SubmoduleUpdate(){return new SubmoduleUpdateCommand(repo);}
| train | false |
10,238 | public static ShortBuffer wrap(short[] array, int start, int shortCount) {Arrays.checkOffsetAndCount(array.length, start, shortCount);ShortBuffer buf = new ReadWriteShortArrayBuffer(array);buf.position = start;buf.limit = start + shortCount;return buf;}
| [
"public",
"static",
"ShortBuffer",
"wrap",
"(",
"short",
"[",
"]",
"array",
",",
"int",
"start",
",",
"int",
"shortCount",
")",
"{",
"Arrays",
".",
"checkOffsetAndCount",
"(",
"array",
".",
"length",
",",
"start",
",",
"shortCount",
")",
";",
"ShortBuffer",
"buf",
"=",
"new",
"ReadWriteShortArrayBuffer",
"(",
"array",
")",
";",
"buf",
".",
"position",
"=",
"start",
";",
"buf",
".",
"limit",
"=",
"start",
"+",
"shortCount",
";",
"return",
"buf",
";",
"}"
] | public static java.nio.ShortBuffer wrap(short[] array_1, int start, int shortCount){java.util.Arrays.checkOffsetAndCount(array_1.Length, start, shortCount);java.nio.ShortBuffer buf = new java.nio.ReadWriteShortArrayBuffer(array_1);buf._position = start;buf._limit = start + shortCount;return buf;}
| train | false |
10,239 | public GetVpcLinksResult getVpcLinks(GetVpcLinksRequest request) {request = beforeClientExecution(request);return executeGetVpcLinks(request);}
| [
"public",
"GetVpcLinksResult",
"getVpcLinks",
"(",
"GetVpcLinksRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetVpcLinks",
"(",
"request",
")",
";",
"}"
] | public virtual GetVpcLinksResponse GetVpcLinks(GetVpcLinksRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetVpcLinksRequestMarshaller.Instance;options.ResponseUnmarshaller = GetVpcLinksResponseUnmarshaller.Instance;return Invoke<GetVpcLinksResponse>(request, options);}
| train | true |
10,240 | public RemoveResourcePermissionResult removeResourcePermission(RemoveResourcePermissionRequest request) {request = beforeClientExecution(request);return executeRemoveResourcePermission(request);}
| [
"public",
"RemoveResourcePermissionResult",
"removeResourcePermission",
"(",
"RemoveResourcePermissionRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeRemoveResourcePermission",
"(",
"request",
")",
";",
"}"
] | public virtual RemoveResourcePermissionResponse RemoveResourcePermission(RemoveResourcePermissionRequest request){var options = new InvokeOptions();options.RequestMarshaller = RemoveResourcePermissionRequestMarshaller.Instance;options.ResponseUnmarshaller = RemoveResourcePermissionResponseUnmarshaller.Instance;return Invoke<RemoveResourcePermissionResponse>(request, options);}
| train | true |
10,241 | public ListIndexResult listIndex(ListIndexRequest request) {request = beforeClientExecution(request);return executeListIndex(request);}
| [
"public",
"ListIndexResult",
"listIndex",
"(",
"ListIndexRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListIndex",
"(",
"request",
")",
";",
"}"
] | public virtual ListIndexResponse ListIndex(ListIndexRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListIndexRequestMarshaller.Instance;options.ResponseUnmarshaller = ListIndexResponseUnmarshaller.Instance;return Invoke<ListIndexResponse>(request, options);}
| train | true |
10,242 | public List<Integer> toList() {List<Integer> values = new ArrayList<Integer>();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",
"List",
"<",
"Integer",
">",
"toList",
"(",
")",
"{",
"List",
"<",
"Integer",
">",
"values",
"=",
"new",
"ArrayList",
"<",
"Integer",
">",
"(",
")",
";",
"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 IList<int> ToList(){IList<int> values = new ArrayList<int>();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 |
10,243 | public CreateCustomerGatewayRequest(GatewayType type, String publicIp, Integer bgpAsn) {setType(type.toString());setPublicIp(publicIp);setBgpAsn(bgpAsn);}
| [
"public",
"CreateCustomerGatewayRequest",
"(",
"GatewayType",
"type",
",",
"String",
"publicIp",
",",
"Integer",
"bgpAsn",
")",
"{",
"setType",
"(",
"type",
".",
"toString",
"(",
")",
")",
";",
"setPublicIp",
"(",
"publicIp",
")",
";",
"setBgpAsn",
"(",
"bgpAsn",
")",
";",
"}"
] | public CreateCustomerGatewayRequest(GatewayType type, string publicIp, int bgpAsn){_type = type;_publicIp = publicIp;_bgpAsn = bgpAsn;}
| train | false |
10,244 | public int getWeekNo(Calendar cal, int weekStartOn) {if (weekStartOn == 1) {cal.setFirstDayOfWeek(Calendar.SUNDAY);} else {cal.setFirstDayOfWeek(Calendar.MONDAY);}return cal.get(Calendar.WEEK_OF_YEAR);}
| [
"public",
"int",
"getWeekNo",
"(",
"Calendar",
"cal",
",",
"int",
"weekStartOn",
")",
"{",
"if",
"(",
"weekStartOn",
"==",
"1",
")",
"{",
"cal",
".",
"setFirstDayOfWeek",
"(",
"Calendar",
".",
"SUNDAY",
")",
";",
"}",
"else",
"{",
"cal",
".",
"setFirstDayOfWeek",
"(",
"Calendar",
".",
"MONDAY",
")",
";",
"}",
"return",
"cal",
".",
"get",
"(",
"Calendar",
".",
"WEEK_OF_YEAR",
")",
";",
"}"
] | public int getWeekNo(DateTime dt, int weekStartOn){GregorianCalendar cal = new GregorianCalendar();int weekOfYear;if (weekStartOn == 1){weekOfYear = cal.GetWeekOfYear(dt, CalendarWeekRule.FirstDay, DayOfWeek.Sunday);}else{weekOfYear = cal.GetWeekOfYear(dt, CalendarWeekRule.FirstDay, DayOfWeek.Monday);}return weekOfYear;}
| train | false |
10,245 | public String toString() {String s = "o:"+offset+" p:"+position+" c:"+count;if (rptGroup >=0 ) {s += " rpt:"+rptGroup+",i"+rptInd;}return s;}
| [
"public",
"String",
"toString",
"(",
")",
"{",
"String",
"s",
"=",
"\"o:\"",
"+",
"offset",
"+",
"\" p:\"",
"+",
"position",
"+",
"\" c:\"",
"+",
"count",
";",
"if",
"(",
"rptGroup",
">=",
"0",
")",
"{",
"s",
"+=",
"\" rpt:\"",
"+",
"rptGroup",
"+",
"\",i\"",
"+",
"rptInd",
";",
"}",
"return",
"s",
";",
"}"
] | public override string ToString(){string s = "d:" + doc + " o:" + offset + " p:" + position + " c:" + count;if (rptGroup >= 0){s += " rpt:" + rptGroup + ",i" + rptInd;}return s;}
| train | false |
10,247 | public GetUserEndpointsResult getUserEndpoints(GetUserEndpointsRequest request) {request = beforeClientExecution(request);return executeGetUserEndpoints(request);}
| [
"public",
"GetUserEndpointsResult",
"getUserEndpoints",
"(",
"GetUserEndpointsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetUserEndpoints",
"(",
"request",
")",
";",
"}"
] | public virtual GetUserEndpointsResponse GetUserEndpoints(GetUserEndpointsRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetUserEndpointsRequestMarshaller.Instance;options.ResponseUnmarshaller = GetUserEndpointsResponseUnmarshaller.Instance;return Invoke<GetUserEndpointsResponse>(request, options);}
| train | true |
10,248 | public UAX29URLEmailTokenizerImpl(java.io.Reader in) {this.zzReader = in;}
| [
"public",
"UAX29URLEmailTokenizerImpl",
"(",
"java",
".",
"io",
".",
"Reader",
"in",
")",
"{",
"this",
".",
"zzReader",
"=",
"in",
";",
"}"
] | public UAX29URLEmailTokenizerImpl(TextReader @in){this.zzReader = @in;}
| train | false |
10,249 | public ResetCommand addPath(String path) {if (mode != null)throw new JGitInternalException(MessageFormat.format(JGitText.get().illegalCombinationOfArguments, "<paths>...", "[--mixed | --soft | --hard]")); filepaths.add(path);return this;}
| [
"public",
"ResetCommand",
"addPath",
"(",
"String",
"path",
")",
"{",
"if",
"(",
"mode",
"!=",
"null",
")",
"throw",
"new",
"JGitInternalException",
"(",
"MessageFormat",
".",
"format",
"(",
"JGitText",
".",
"get",
"(",
")",
".",
"illegalCombinationOfArguments",
",",
"\"<paths>...\"",
",",
"\"[--mixed | --soft | --hard]\"",
")",
")",
";",
"filepaths",
".",
"add",
"(",
"path",
")",
";",
"return",
"this",
";",
"}"
] | public virtual NGit.Api.ResetCommand AddPath(string file){if (mode != null){throw new JGitInternalException(MessageFormat.Format(JGitText.Get().illegalCombinationOfArguments, "<paths>...", "[--mixed | --soft | --hard]"));}filepaths.AddItem(file);return this;}
| train | false |
10,250 | public org.apache.poi.hssf.record.Record findNextRecordBySid(short sid, int pos) {int matches = 0;for (org.apache.poi.hssf.record.Record record : records.getRecords() ) {if (record.getSid() == sid && matches++ == pos) {return record;}}return null;}
| [
"public",
"org",
".",
"apache",
".",
"poi",
".",
"hssf",
".",
"record",
".",
"Record",
"findNextRecordBySid",
"(",
"short",
"sid",
",",
"int",
"pos",
")",
"{",
"int",
"matches",
"=",
"0",
";",
"for",
"(",
"org",
".",
"apache",
".",
"poi",
".",
"hssf",
".",
"record",
".",
"Record",
"record",
":",
"records",
".",
"getRecords",
"(",
")",
")",
"{",
"if",
"(",
"record",
".",
"getSid",
"(",
")",
"==",
"sid",
"&&",
"matches",
"++",
"==",
"pos",
")",
"{",
"return",
"record",
";",
"}",
"}",
"return",
"null",
";",
"}"
] | public Record FindNextRecordBySid(short sid, int pos){int matches = 0;for (IEnumerator iterator = records.GetEnumerator(); iterator.MoveNext(); ){Record record = (Record)iterator.Current;if (record.Sid == sid){if (matches++ == pos)return record;}}return null;}
| train | false |
10,251 | public int[] toArray() {return toIntegerList().toArray();}
| [
"public",
"int",
"[",
"]",
"toArray",
"(",
")",
"{",
"return",
"toIntegerList",
"(",
")",
".",
"toArray",
"(",
")",
";",
"}"
] | public virtual int[] ToArray(){return ToIntegerList().ToArray();}
| train | false |
10,252 | public GetDomainNamesResult getDomainNames(GetDomainNamesRequest request) {request = beforeClientExecution(request);return executeGetDomainNames(request);}
| [
"public",
"GetDomainNamesResult",
"getDomainNames",
"(",
"GetDomainNamesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetDomainNames",
"(",
"request",
")",
";",
"}"
] | public virtual GetDomainNamesResponse GetDomainNames(GetDomainNamesRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetDomainNamesRequestMarshaller.Instance;options.ResponseUnmarshaller = GetDomainNamesResponseUnmarshaller.Instance;return Invoke<GetDomainNamesResponse>(request, options);}
| train | true |
10,253 | public UpdateTemplateAliasResult updateTemplateAlias(UpdateTemplateAliasRequest request) {request = beforeClientExecution(request);return executeUpdateTemplateAlias(request);}
| [
"public",
"UpdateTemplateAliasResult",
"updateTemplateAlias",
"(",
"UpdateTemplateAliasRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateTemplateAlias",
"(",
"request",
")",
";",
"}"
] | public virtual UpdateTemplateAliasResponse UpdateTemplateAlias(UpdateTemplateAliasRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateTemplateAliasRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateTemplateAliasResponseUnmarshaller.Instance;return Invoke<UpdateTemplateAliasResponse>(request, options);}
| train | false |
10,254 | public String getReceivePack() {return receivePack;}
| [
"public",
"String",
"getReceivePack",
"(",
")",
"{",
"return",
"receivePack",
";",
"}"
] | public virtual string GetReceivePack(){return receivePack;}
| train | false |
10,256 | public AssociateAddressRequest(String instanceId, String publicIp) {setInstanceId(instanceId);setPublicIp(publicIp);}
| [
"public",
"AssociateAddressRequest",
"(",
"String",
"instanceId",
",",
"String",
"publicIp",
")",
"{",
"setInstanceId",
"(",
"instanceId",
")",
";",
"setPublicIp",
"(",
"publicIp",
")",
";",
"}"
] | public AssociateAddressRequest(string instanceId, string publicIp){_instanceId = instanceId;_publicIp = publicIp;}
| train | false |
10,257 | public static CharBuffer wrap(CharSequence chseq) {return new CharSequenceAdapter(chseq);}
| [
"public",
"static",
"CharBuffer",
"wrap",
"(",
"CharSequence",
"chseq",
")",
"{",
"return",
"new",
"CharSequenceAdapter",
"(",
"chseq",
")",
";",
"}"
] | public static java.nio.CharBuffer wrap(java.lang.CharSequence chseq){return new java.nio.CharSequenceAdapter(chseq);}
| train | false |
10,258 | public void reset() {reset(true, true);}
| [
"public",
"void",
"reset",
"(",
")",
"{",
"reset",
"(",
"true",
",",
"true",
")",
";",
"}"
] | public void Reset(){Reset(true, true);}
| train | false |
10,259 | public static double nChooseK(int n, int k) {double d = 1;if (n<0 || k<0 || n<k) {d= Double.NaN;}else {int minnk = Math.min(n-k, k);int maxnk = Math.max(n-k, k);for (int i=maxnk; i<n; i++) {d *= i+1;}d /= factorial(minnk);}return d;}
| [
"public",
"static",
"double",
"nChooseK",
"(",
"int",
"n",
",",
"int",
"k",
")",
"{",
"double",
"d",
"=",
"1",
";",
"if",
"(",
"n",
"<",
"0",
"||",
"k",
"<",
"0",
"||",
"n",
"<",
"k",
")",
"{",
"d",
"=",
"Double",
".",
"NaN",
";",
"}",
"else",
"{",
"int",
"minnk",
"=",
"Math",
".",
"min",
"(",
"n",
"-",
"k",
",",
"k",
")",
";",
"int",
"maxnk",
"=",
"Math",
".",
"max",
"(",
"n",
"-",
"k",
",",
"k",
")",
";",
"for",
"(",
"int",
"i",
"=",
"maxnk",
";",
"i",
"<",
"n",
";",
"i",
"++",
")",
"{",
"d",
"*=",
"i",
"+",
"1",
";",
"}",
"d",
"/=",
"factorial",
"(",
"minnk",
")",
";",
"}",
"return",
"d",
";",
"}"
] | public static double NChooseK(int n, int k){double d = 1;if (n < 0 || k < 0 || n < k){d = double.NaN;}else{int minnk = Math.Min(n - k, k);int maxnk = Math.Max(n - k, k);for (int i = maxnk; i < n; i++){d *= i + 1;}d /= Factorial(minnk);}return d;}
| train | false |
10,261 | public String getAccessSecret() {return getCredentials().getAccessKeySecret();}
| [
"public",
"String",
"getAccessSecret",
"(",
")",
"{",
"return",
"getCredentials",
"(",
")",
".",
"getAccessKeySecret",
"(",
")",
";",
"}"
] | public string GetAccessSecret(){return GetCredentials().GetAccessKeySecret();}
| train | false |
10,262 | public static BoundSheetRecord[] orderByBofPosition(List<BoundSheetRecord> boundSheetRecords) {BoundSheetRecord[] bsrs = new BoundSheetRecord[boundSheetRecords.size()];boundSheetRecords.toArray(bsrs);Arrays.sort(bsrs, BoundSheetRecord::compareRecords);return bsrs;}
| [
"public",
"static",
"BoundSheetRecord",
"[",
"]",
"orderByBofPosition",
"(",
"List",
"<",
"BoundSheetRecord",
">",
"boundSheetRecords",
")",
"{",
"BoundSheetRecord",
"[",
"]",
"bsrs",
"=",
"new",
"BoundSheetRecord",
"[",
"boundSheetRecords",
".",
"size",
"(",
")",
"]",
";",
"boundSheetRecords",
".",
"toArray",
"(",
"bsrs",
")",
";",
"Arrays",
".",
"sort",
"(",
"bsrs",
",",
"BoundSheetRecord",
"::",
"compareRecords",
")",
";",
"return",
"bsrs",
";",
"}"
] | public static BoundSheetRecord[] OrderByBofPosition(List<BoundSheetRecord> boundSheetRecords){BoundSheetRecord[] bsrs = boundSheetRecords.ToArray();Array.Sort(bsrs, new BOFComparator());return bsrs;}
| train | false |
10,263 | public DeleteNotebookInstanceResult deleteNotebookInstance(DeleteNotebookInstanceRequest request) {request = beforeClientExecution(request);return executeDeleteNotebookInstance(request);}
| [
"public",
"DeleteNotebookInstanceResult",
"deleteNotebookInstance",
"(",
"DeleteNotebookInstanceRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteNotebookInstance",
"(",
"request",
")",
";",
"}"
] | public virtual DeleteNotebookInstanceResponse DeleteNotebookInstance(DeleteNotebookInstanceRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteNotebookInstanceRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteNotebookInstanceResponseUnmarshaller.Instance;return Invoke<DeleteNotebookInstanceResponse>(request, options);}
| train | true |
10,264 | public DTDHandler getDTDHandler () {return (theDTDHandler == this) ? null : theDTDHandler;}
| [
"public",
"DTDHandler",
"getDTDHandler",
"(",
")",
"{",
"return",
"(",
"theDTDHandler",
"==",
"this",
")",
"?",
"null",
":",
"theDTDHandler",
";",
"}"
] | public void close (){lock (this.mBlock) {if (this.mParseState != null) {this.mParseState.Dispose ();this.mParseState = null;this.mBlock.decOpenCountLocked ();}}}
| train | false |
10,265 | public static File resolve(File directory, FS fs) {if (isGitRepository(directory, fs))return directory;if (isGitRepository(new File(directory, Constants.DOT_GIT), fs))return new File(directory, Constants.DOT_GIT);final String name = directory.getName();final File parent = directory.getParentFile();if (isGitRepository(new File(parent, name + Constants.DOT_GIT_EXT), fs))return new File(parent, name + Constants.DOT_GIT_EXT);return null;}
| [
"public",
"static",
"File",
"resolve",
"(",
"File",
"directory",
",",
"FS",
"fs",
")",
"{",
"if",
"(",
"isGitRepository",
"(",
"directory",
",",
"fs",
")",
")",
"return",
"directory",
";",
"if",
"(",
"isGitRepository",
"(",
"new",
"File",
"(",
"directory",
",",
"Constants",
".",
"DOT_GIT",
")",
",",
"fs",
")",
")",
"return",
"new",
"File",
"(",
"directory",
",",
"Constants",
".",
"DOT_GIT",
")",
";",
"final",
"String",
"name",
"=",
"directory",
".",
"getName",
"(",
")",
";",
"final",
"File",
"parent",
"=",
"directory",
".",
"getParentFile",
"(",
")",
";",
"if",
"(",
"isGitRepository",
"(",
"new",
"File",
"(",
"parent",
",",
"name",
"+",
"Constants",
".",
"DOT_GIT_EXT",
")",
",",
"fs",
")",
")",
"return",
"new",
"File",
"(",
"parent",
",",
"name",
"+",
"Constants",
".",
"DOT_GIT_EXT",
")",
";",
"return",
"null",
";",
"}"
] | public static FilePath Resolve(FilePath directory, FS fs){if (IsGitRepository(directory, fs)){return directory;}if (IsGitRepository(new FilePath(directory, Constants.DOT_GIT), fs)){return new FilePath(directory, Constants.DOT_GIT);}string name = directory.GetName();FilePath parent = directory.GetParentFile();if (IsGitRepository(new FilePath(parent, name + Constants.DOT_GIT_EXT), fs)){return new FilePath(parent, name + Constants.DOT_GIT_EXT);}return null;}
| train | false |
10,266 | public WorkflowTypeInfos listWorkflowTypes(ListWorkflowTypesRequest request) {request = beforeClientExecution(request);return executeListWorkflowTypes(request);}
| [
"public",
"WorkflowTypeInfos",
"listWorkflowTypes",
"(",
"ListWorkflowTypesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListWorkflowTypes",
"(",
"request",
")",
";",
"}"
] | public virtual ListWorkflowTypesResponse ListWorkflowTypes(ListWorkflowTypesRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListWorkflowTypesRequestMarshaller.Instance;options.ResponseUnmarshaller = ListWorkflowTypesResponseUnmarshaller.Instance;return Invoke<ListWorkflowTypesResponse>(request, options);}
| train | true |
10,267 | public Snapshot copyClusterSnapshot(CopyClusterSnapshotRequest request) {request = beforeClientExecution(request);return executeCopyClusterSnapshot(request);}
| [
"public",
"Snapshot",
"copyClusterSnapshot",
"(",
"CopyClusterSnapshotRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCopyClusterSnapshot",
"(",
"request",
")",
";",
"}"
] | public virtual CopyClusterSnapshotResponse CopyClusterSnapshot(CopyClusterSnapshotRequest request){var options = new InvokeOptions();options.RequestMarshaller = CopyClusterSnapshotRequestMarshaller.Instance;options.ResponseUnmarshaller = CopyClusterSnapshotResponseUnmarshaller.Instance;return Invoke<CopyClusterSnapshotResponse>(request, options);}
| train | true |
10,268 | public Ptg[] getFormulaTokens(EvaluationCell evalCell) {HSSFCell cell = ((HSSFEvaluationCell)evalCell).getHSSFCell();FormulaRecordAggregate fra = (FormulaRecordAggregate) cell.getCellValueRecord();return fra.getFormulaTokens();}
| [
"public",
"Ptg",
"[",
"]",
"getFormulaTokens",
"(",
"EvaluationCell",
"evalCell",
")",
"{",
"HSSFCell",
"cell",
"=",
"(",
"(",
"HSSFEvaluationCell",
")",
"evalCell",
")",
".",
"getHSSFCell",
"(",
")",
";",
"FormulaRecordAggregate",
"fra",
"=",
"(",
"FormulaRecordAggregate",
")",
"cell",
".",
"getCellValueRecord",
"(",
")",
";",
"return",
"fra",
".",
"getFormulaTokens",
"(",
")",
";",
"}"
] | public Ptg[] GetFormulaTokens(IEvaluationCell evalCell){ICell cell = ((HSSFEvaluationCell)evalCell).HSSFCell;FormulaRecordAggregate fr = (FormulaRecordAggregate)((HSSFCell)cell).CellValueRecord;return fr.FormulaTokens;}
| train | false |
10,269 | public DisassociateVPCFromHostedZoneResult disassociateVPCFromHostedZone(DisassociateVPCFromHostedZoneRequest request) {request = beforeClientExecution(request);return executeDisassociateVPCFromHostedZone(request);}
| [
"public",
"DisassociateVPCFromHostedZoneResult",
"disassociateVPCFromHostedZone",
"(",
"DisassociateVPCFromHostedZoneRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDisassociateVPCFromHostedZone",
"(",
"request",
")",
";",
"}"
] | public virtual DisassociateVPCFromHostedZoneResponse DisassociateVPCFromHostedZone(DisassociateVPCFromHostedZoneRequest request){var options = new InvokeOptions();options.RequestMarshaller = DisassociateVPCFromHostedZoneRequestMarshaller.Instance;options.ResponseUnmarshaller = DisassociateVPCFromHostedZoneResponseUnmarshaller.Instance;return Invoke<DisassociateVPCFromHostedZoneResponse>(request, options);}
| train | true |
10,270 | public StringBuffer insert(int index, int i) {return insert(index, Integer.toString(i));}
| [
"public",
"StringBuffer",
"insert",
"(",
"int",
"index",
",",
"int",
"i",
")",
"{",
"return",
"insert",
"(",
"index",
",",
"Integer",
".",
"toString",
"(",
"i",
")",
")",
";",
"}"
] | public java.lang.StringBuffer insert(int index, int i){return insert(index, System.Convert.ToString(i));}
| train | false |
10,271 | public void setBytesValue(BytesRef value) {if (!(fieldsData instanceof BytesRef)) {throw new IllegalArgumentException("cannot change value type from " + fieldsData.getClass().getSimpleName() + " to BytesRef");}if (type.indexOptions() != IndexOptions.NONE) {throw new IllegalArgumentException("cannot set a BytesRef value on an indexed field");}if (value == null) {throw new IllegalArgumentException("value must not be null");}fieldsData = value;}
| [
"public",
"void",
"setBytesValue",
"(",
"BytesRef",
"value",
")",
"{",
"if",
"(",
"!",
"(",
"fieldsData",
"instanceof",
"BytesRef",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"cannot change value type from \"",
"+",
"fieldsData",
".",
"getClass",
"(",
")",
".",
"getSimpleName",
"(",
")",
"+",
"\" to BytesRef\"",
")",
";",
"}",
"if",
"(",
"type",
".",
"indexOptions",
"(",
")",
"!=",
"IndexOptions",
".",
"NONE",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"cannot set a BytesRef value on an indexed field\"",
")",
";",
"}",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"value must not be null\"",
")",
";",
"}",
"fieldsData",
"=",
"value",
";",
"}"
] | public virtual void SetBytesValue(BytesRef value){if (!(FieldsData is BytesRef)){throw new System.ArgumentException("cannot change value type from " + FieldsData.GetType().Name + " to BytesRef");}if (m_type.IsIndexed){throw new System.ArgumentException("cannot set a BytesRef value on an indexed field");}FieldsData = value;}
| train | false |
10,272 | public boolean equals( Object o ) {return o instanceof GermanStemmer;}
| [
"public",
"boolean",
"equals",
"(",
"Object",
"o",
")",
"{",
"return",
"o",
"instanceof",
"GermanStemmer",
";",
"}"
] | public override bool Equals(object o){return o is GermanStemmer;}
| train | false |
10,273 | public UntagMeetingResult untagMeeting(UntagMeetingRequest request) {request = beforeClientExecution(request);return executeUntagMeeting(request);}
| [
"public",
"UntagMeetingResult",
"untagMeeting",
"(",
"UntagMeetingRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUntagMeeting",
"(",
"request",
")",
";",
"}"
] | public virtual UntagMeetingResponse UntagMeeting(UntagMeetingRequest request){var options = new InvokeOptions();options.RequestMarshaller = UntagMeetingRequestMarshaller.Instance;options.ResponseUnmarshaller = UntagMeetingResponseUnmarshaller.Instance;return Invoke<UntagMeetingResponse>(request, options);}
| train | false |
10,274 | public String toString() {return "[PRECISION]\n" +" .precision = " + getFullPrecision() +"\n" +"[/PRECISION]\n";}
| [
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"\"[PRECISION]\\n\"",
"+",
"\" .precision = \"",
"+",
"getFullPrecision",
"(",
")",
"+",
"\"\\n\"",
"+",
"\"[/PRECISION]\\n\"",
";",
"}"
] | public override String ToString(){StringBuilder buffer = new StringBuilder();buffer.Append("[PRECISION]\n");buffer.Append(" .precision = ").Append(FullPrecision).Append("\n");buffer.Append("[/PRECISION]\n");return buffer.ToString();}
| train | false |
10,275 | static public double pmt(double r, int nper, double pv, double fv) {return pmt(r, nper, pv, fv, 0);}
| [
"static",
"public",
"double",
"pmt",
"(",
"double",
"r",
",",
"int",
"nper",
",",
"double",
"pv",
",",
"double",
"fv",
")",
"{",
"return",
"pmt",
"(",
"r",
",",
"nper",
",",
"pv",
",",
"fv",
",",
"0",
")",
";",
"}"
] | static public double PMT(double r, int nper, double pv, double fv){return PMT(r, nper, pv, fv, 0);}
| train | false |
10,277 | public boolean equals(Object obj) {if (obj instanceof Rect) {Rect rhs = (Rect) obj;if (isValid() != rhs.isValid()) {return false;}if (!isValid() && !rhs.isValid()) {return true;}return this.x == rhs.x && this.y == rhs.y && this.w == rhs.w && this.h == rhs.h;}return false;}
| [
"public",
"boolean",
"equals",
"(",
"Object",
"obj",
")",
"{",
"if",
"(",
"obj",
"instanceof",
"Rect",
")",
"{",
"Rect",
"rhs",
"=",
"(",
"Rect",
")",
"obj",
";",
"if",
"(",
"isValid",
"(",
")",
"!=",
"rhs",
".",
"isValid",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"isValid",
"(",
")",
"&&",
"!",
"rhs",
".",
"isValid",
"(",
")",
")",
"{",
"return",
"true",
";",
"}",
"return",
"this",
".",
"x",
"==",
"rhs",
".",
"x",
"&&",
"this",
".",
"y",
"==",
"rhs",
".",
"y",
"&&",
"this",
".",
"w",
"==",
"rhs",
".",
"w",
"&&",
"this",
".",
"h",
"==",
"rhs",
".",
"h",
";",
"}",
"return",
"false",
";",
"}"
] | public override bool Equals(object obj){android.graphics.Rect r = (android.graphics.Rect)obj;if (r != null){return left == r.left && top == r.top && right == r.right && bottom == r.bottom;}return false;}
| train | false |
10,278 | public final boolean containsColumn(int col) {return _firstColumn <= col && _lastColumn >= col;}
| [
"public",
"final",
"boolean",
"containsColumn",
"(",
"int",
"col",
")",
"{",
"return",
"_firstColumn",
"<=",
"col",
"&&",
"_lastColumn",
">=",
"col",
";",
"}"
] | public bool ContainsColumn(int col){return (_firstColumn <= col) && (_lastColumn >= col);}
| train | false |
10,279 | public RunJobFlowRequest(String name, JobFlowInstancesConfig instances) {setName(name);setInstances(instances);}
| [
"public",
"RunJobFlowRequest",
"(",
"String",
"name",
",",
"JobFlowInstancesConfig",
"instances",
")",
"{",
"setName",
"(",
"name",
")",
";",
"setInstances",
"(",
"instances",
")",
";",
"}"
] | public RunJobFlowRequest(string name, JobFlowInstancesConfig instances){_name = name;_instances = instances;}
| train | false |
10,280 | public String toString() {if (noBreak == null && postBreak == null && preBreak != null&& preBreak.equals("-")) {return "-";}StringBuilder res = new StringBuilder("{");res.append(preBreak);res.append("}{");res.append(postBreak);res.append("}{");res.append(noBreak);res.append('}');return res.toString();}
| [
"public",
"String",
"toString",
"(",
")",
"{",
"if",
"(",
"noBreak",
"==",
"null",
"&&",
"postBreak",
"==",
"null",
"&&",
"preBreak",
"!=",
"null",
"&&",
"preBreak",
".",
"equals",
"(",
"\"-\"",
")",
")",
"{",
"return",
"\"-\"",
";",
"}",
"StringBuilder",
"res",
"=",
"new",
"StringBuilder",
"(",
"\"{\"",
")",
";",
"res",
".",
"append",
"(",
"preBreak",
")",
";",
"res",
".",
"append",
"(",
"\"}{\"",
")",
";",
"res",
".",
"append",
"(",
"postBreak",
")",
";",
"res",
".",
"append",
"(",
"\"}{\"",
")",
";",
"res",
".",
"append",
"(",
"noBreak",
")",
";",
"res",
".",
"append",
"(",
"'}'",
")",
";",
"return",
"res",
".",
"toString",
"(",
")",
";",
"}"
] | public override string ToString(){if (NoBreak == null && PostBreak == null && PreBreak != null && PreBreak.Equals("-", StringComparison.Ordinal)){return "-";}StringBuilder res = new StringBuilder("{");res.Append(PreBreak);res.Append("}{");res.Append(PostBreak);res.Append("}{");res.Append(NoBreak);res.Append('}');return res.ToString();}
| train | false |
10,281 | public ListPublishedSchemaArnsResult listPublishedSchemaArns(ListPublishedSchemaArnsRequest request) {request = beforeClientExecution(request);return executeListPublishedSchemaArns(request);}
| [
"public",
"ListPublishedSchemaArnsResult",
"listPublishedSchemaArns",
"(",
"ListPublishedSchemaArnsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListPublishedSchemaArns",
"(",
"request",
")",
";",
"}"
] | public virtual ListPublishedSchemaArnsResponse ListPublishedSchemaArns(ListPublishedSchemaArnsRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListPublishedSchemaArnsRequestMarshaller.Instance;options.ResponseUnmarshaller = ListPublishedSchemaArnsResponseUnmarshaller.Instance;return Invoke<ListPublishedSchemaArnsResponse>(request, options);}
| train | true |
10,283 | public DescribeNetworkAclsResult describeNetworkAcls() {return describeNetworkAcls(new DescribeNetworkAclsRequest());}
| [
"public",
"DescribeNetworkAclsResult",
"describeNetworkAcls",
"(",
")",
"{",
"return",
"describeNetworkAcls",
"(",
"new",
"DescribeNetworkAclsRequest",
"(",
")",
")",
";",
"}"
] | public virtual DescribeNetworkAclsResponse DescribeNetworkAcls(){return DescribeNetworkAcls(new DescribeNetworkAclsRequest());}
| train | false |
10,284 | public PushCommand add(Ref ref) {refSpecs.add(new RefSpec(ref.getLeaf().getName()));return this;}
| [
"public",
"PushCommand",
"add",
"(",
"Ref",
"ref",
")",
"{",
"refSpecs",
".",
"add",
"(",
"new",
"RefSpec",
"(",
"ref",
".",
"getLeaf",
"(",
")",
".",
"getName",
"(",
")",
")",
")",
";",
"return",
"this",
";",
"}"
] | public virtual NGit.Api.PushCommand Add(Ref @ref){refSpecs.AddItem(new RefSpec(@ref.GetLeaf().GetName()));return this;}
| train | false |
10,285 | public DeleteVoiceConnectorGroupResult deleteVoiceConnectorGroup(DeleteVoiceConnectorGroupRequest request) {request = beforeClientExecution(request);return executeDeleteVoiceConnectorGroup(request);}
| [
"public",
"DeleteVoiceConnectorGroupResult",
"deleteVoiceConnectorGroup",
"(",
"DeleteVoiceConnectorGroupRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteVoiceConnectorGroup",
"(",
"request",
")",
";",
"}"
] | public virtual DeleteVoiceConnectorGroupResponse DeleteVoiceConnectorGroup(DeleteVoiceConnectorGroupRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteVoiceConnectorGroupRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteVoiceConnectorGroupResponseUnmarshaller.Instance;return Invoke<DeleteVoiceConnectorGroupResponse>(request, options);}
| train | false |
10,286 | public IntervalSet(List<Interval> intervals) {this.intervals = intervals;}
| [
"public",
"IntervalSet",
"(",
"List",
"<",
"Interval",
">",
"intervals",
")",
"{",
"this",
".",
"intervals",
"=",
"intervals",
";",
"}"
] | public IntervalSet(IList<Interval> intervals){this.intervals = intervals;}
| train | false |
10,287 | public IteratorQueue(Iterator<T> iter) {this.iter = iter;T removeTop = removeTop();assert removeTop == null;}
| [
"public",
"IteratorQueue",
"(",
"Iterator",
"<",
"T",
">",
"iter",
")",
"{",
"this",
".",
"iter",
"=",
"iter",
";",
"T",
"removeTop",
"=",
"removeTop",
"(",
")",
";",
"assert",
"removeTop",
"==",
"null",
";",
"}"
] | public IteratorQueue(IEnumerator<T> iter){this.iter = iter;T removeTop = RemoveTop();Debug.Assert( removeTop == null);}
| train | false |
10,289 | public StemmerOverrideMap(FST<BytesRef> fst, boolean ignoreCase) {this.fst = fst;this.ignoreCase = ignoreCase;}
| [
"public",
"StemmerOverrideMap",
"(",
"FST",
"<",
"BytesRef",
">",
"fst",
",",
"boolean",
"ignoreCase",
")",
"{",
"this",
".",
"fst",
"=",
"fst",
";",
"this",
".",
"ignoreCase",
"=",
"ignoreCase",
";",
"}"
] | public StemmerOverrideMap(FST<BytesRef> fst, bool ignoreCase){this.fst = fst;this.ignoreCase = ignoreCase;}
| train | false |
10,290 | public DeleteAdmChannelResult deleteAdmChannel(DeleteAdmChannelRequest request) {request = beforeClientExecution(request);return executeDeleteAdmChannel(request);}
| [
"public",
"DeleteAdmChannelResult",
"deleteAdmChannel",
"(",
"DeleteAdmChannelRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteAdmChannel",
"(",
"request",
")",
";",
"}"
] | public virtual DeleteAdmChannelResponse DeleteAdmChannel(DeleteAdmChannelRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteAdmChannelRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteAdmChannelResponseUnmarshaller.Instance;return Invoke<DeleteAdmChannelResponse>(request, options);}
| train | true |
10,291 | public SetSubscriptionAttributesRequest(String subscriptionArn, String attributeName, String attributeValue) {setSubscriptionArn(subscriptionArn);setAttributeName(attributeName);setAttributeValue(attributeValue);}
| [
"public",
"SetSubscriptionAttributesRequest",
"(",
"String",
"subscriptionArn",
",",
"String",
"attributeName",
",",
"String",
"attributeValue",
")",
"{",
"setSubscriptionArn",
"(",
"subscriptionArn",
")",
";",
"setAttributeName",
"(",
"attributeName",
")",
";",
"setAttributeValue",
"(",
"attributeValue",
")",
";",
"}"
] | public SetSubscriptionAttributesRequest(string subscriptionArn, string attributeName, string attributeValue){_subscriptionArn = subscriptionArn;_attributeName = attributeName;_attributeValue = attributeValue;}
| train | false |
10,292 | public void unsafeWrite(char b) {buf[len++] = b;}
| [
"public",
"void",
"unsafeWrite",
"(",
"char",
"b",
")",
"{",
"buf",
"[",
"len",
"++",
"]",
"=",
"b",
";",
"}"
] | public virtual void UnsafeWrite(char b){m_buf[m_len++] = b;}
| train | false |
10,293 | @Override public boolean remove(Object key) {int count = 0;Collection<V> collection = subMap.remove(key);if (collection != null) {count = collection.size();collection.clear();totalSize -= count;}return count > 0;}
| [
"@",
"Override",
"public",
"boolean",
"remove",
"(",
"Object",
"key",
")",
"{",
"int",
"count",
"=",
"0",
";",
"Collection",
"<",
"V",
">",
"collection",
"=",
"subMap",
".",
"remove",
"(",
"key",
")",
";",
"if",
"(",
"collection",
"!=",
"null",
")",
"{",
"count",
"=",
"collection",
".",
"size",
"(",
")",
";",
"collection",
".",
"clear",
"(",
")",
";",
"totalSize",
"-=",
"count",
";",
"}",
"return",
"count",
">",
"0",
";",
"}"
] | public override bool remove(object o){lock (this._enclosing){int oldSize = this._enclosing._size;this._enclosing.remove(o);return this._enclosing._size != oldSize;}}
| train | false |
10,294 | public boolean markSupported() {return false;}
| [
"public",
"boolean",
"markSupported",
"(",
")",
"{",
"return",
"false",
";",
"}"
] | public virtual bool markSupported(){return false;}
| train | false |