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 |
|---|---|---|---|---|---|
864 | public String getCharErrorDisplay(int c) {String s = getErrorDisplay(c);return "'"+s+"'";}
| [
"public",
"String",
"getCharErrorDisplay",
"(",
"int",
"c",
")",
"{",
"String",
"s",
"=",
"getErrorDisplay",
"(",
"c",
")",
";",
"return",
"\"'\"",
"+",
"s",
"+",
"\"'\"",
";",
"}"
] | public virtual string GetCharErrorDisplay(int c){string s = GetErrorDisplay(c);return "'" + s + "'";}
| train | false |
865 | public DescribeHumanTaskUiResult describeHumanTaskUi(DescribeHumanTaskUiRequest request) {request = beforeClientExecution(request);return executeDescribeHumanTaskUi(request);}
| [
"public",
"DescribeHumanTaskUiResult",
"describeHumanTaskUi",
"(",
"DescribeHumanTaskUiRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeHumanTaskUi",
"(",
"request",
")",
";",
"}"
] | public virtual DescribeHumanTaskUiResponse DescribeHumanTaskUi(DescribeHumanTaskUiRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeHumanTaskUiRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeHumanTaskUiResponseUnmarshaller.Instance;return Invoke<DescribeHumanTaskUi... | train | false |
866 | public void run() {try {int n = task.runAndMaybeStats(letChildReport);if (anyExhaustibleTasks) {updateExhausted(task);}count += n;} catch (NoMoreDataException e) {exhausted = true;} catch (Exception e) {throw new RuntimeException(e);}}
| [
"public",
"void",
"run",
"(",
")",
"{",
"try",
"{",
"int",
"n",
"=",
"task",
".",
"runAndMaybeStats",
"(",
"letChildReport",
")",
";",
"if",
"(",
"anyExhaustibleTasks",
")",
"{",
"updateExhausted",
"(",
"task",
")",
";",
"}",
"count",
"+=",
"n",
";",
... | public override void Run(){try{int n = task.RunAndMaybeStats(outerInstance.letChildReport);if (outerInstance.anyExhaustibleTasks){outerInstance.UpdateExhausted(task);}count += n;}catch (NoMoreDataException){outerInstance.exhausted = true;}catch (Exception e){throw new Exception(e.ToString(), e);}}
| train | false |
867 | public DescribeImagePermissionsResult describeImagePermissions(DescribeImagePermissionsRequest request) {request = beforeClientExecution(request);return executeDescribeImagePermissions(request);}
| [
"public",
"DescribeImagePermissionsResult",
"describeImagePermissions",
"(",
"DescribeImagePermissionsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeImagePermissions",
"(",
"request",
")",
";",
"}"... | public virtual DescribeImagePermissionsResponse DescribeImagePermissions(DescribeImagePermissionsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeImagePermissionsRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeImagePermissionsResponseUnmarshaller.Instance;return I... | train | true |
868 | public SrndQuery clone() {try {return (SrndQuery)super.clone();} catch (CloneNotSupportedException cns) {throw new Error(cns);}}
| [
"public",
"SrndQuery",
"clone",
"(",
")",
"{",
"try",
"{",
"return",
"(",
"SrndQuery",
")",
"super",
".",
"clone",
"(",
")",
";",
"}",
"catch",
"(",
"CloneNotSupportedException",
"cns",
")",
"{",
"throw",
"new",
"Error",
"(",
"cns",
")",
";",
"}",
"}... | public virtual object Clone(){object clone = null;try{clone = base.MemberwiseClone();}catch (Exception e){throw new InvalidOperationException(e.Message, e); }return clone;}
| train | false |
869 | public void recycleByteBlocks(byte[][] blocks, int start, int end) {final int numBlocks = Math.min(maxBufferedBlocks - freeBlocks, end - start);final int size = freeBlocks + numBlocks;if (size >= freeByteBlocks.length) {final byte[][] newBlocks = new byte[ArrayUtil.oversize(size,RamUsageEstimator.NUM_BYTES_OBJECT_REF)]... | [
"public",
"void",
"recycleByteBlocks",
"(",
"byte",
"[",
"]",
"[",
"]",
"blocks",
",",
"int",
"start",
",",
"int",
"end",
")",
"{",
"final",
"int",
"numBlocks",
"=",
"Math",
".",
"min",
"(",
"maxBufferedBlocks",
"-",
"freeBlocks",
",",
"end",
"-",
"sta... | public override void RecycleByteBlocks(byte[][] blocks, int start, int end){int numBlocks = Math.Min(maxBufferedBlocks - freeBlocks, end - start);int size = freeBlocks + numBlocks;if (size >= freeByteBlocks.Length){var newBlocks = new byte[ArrayUtil.Oversize(size, RamUsageEstimator.NUM_BYTES_OBJECT_REF)][];Array.Copy(f... | train | false |
870 | public GeohashPrefixTree(SpatialContext ctx, int maxLevels) {super(ctx, maxLevels);Rectangle bounds = ctx.getWorldBounds();if (bounds.getMinX() != -180)throw new IllegalArgumentException("Geohash only supports lat-lon world bounds. Got "+bounds);int MAXP = getMaxLevelsPossible();if (maxLevels <= 0 || maxLevels > MAXP)t... | [
"public",
"GeohashPrefixTree",
"(",
"SpatialContext",
"ctx",
",",
"int",
"maxLevels",
")",
"{",
"super",
"(",
"ctx",
",",
"maxLevels",
")",
";",
"Rectangle",
"bounds",
"=",
"ctx",
".",
"getWorldBounds",
"(",
")",
";",
"if",
"(",
"bounds",
".",
"getMinX",
... | public GeohashPrefixTree(SpatialContext ctx, int maxLevels): base(ctx, maxLevels){IRectangle bounds = ctx.WorldBounds;if (bounds.MinX != -180){throw new ArgumentException("Geohash only supports lat-lon world bounds. Got " + bounds);}int Maxp = MaxLevelsPossible;if (maxLevels <= 0 || maxLevels > Maxp){throw new Argument... | train | false |
871 | public void removeName(int namenum) {_definedNames.remove(namenum);}
| [
"public",
"void",
"removeName",
"(",
"int",
"namenum",
")",
"{",
"_definedNames",
".",
"remove",
"(",
"namenum",
")",
";",
"}"
] | public void RemoveName(int namenum){_definedNames.RemoveAt(namenum);}
| train | false |
872 | public CancelSpotFleetRequestsResult cancelSpotFleetRequests(CancelSpotFleetRequestsRequest request) {request = beforeClientExecution(request);return executeCancelSpotFleetRequests(request);}
| [
"public",
"CancelSpotFleetRequestsResult",
"cancelSpotFleetRequests",
"(",
"CancelSpotFleetRequestsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCancelSpotFleetRequests",
"(",
"request",
")",
";",
"}"
] | public virtual CancelSpotFleetRequestsResponse CancelSpotFleetRequests(CancelSpotFleetRequestsRequest request){var options = new InvokeOptions();options.RequestMarshaller = CancelSpotFleetRequestsRequestMarshaller.Instance;options.ResponseUnmarshaller = CancelSpotFleetRequestsResponseUnmarshaller.Instance;return Invoke... | train | true |
873 | public GetIndustryInfoLineageListRequest() {super("industry-brain", "2018-07-12", "GetIndustryInfoLineageList");setProtocol(ProtocolType.HTTPS);}
| [
"public",
"GetIndustryInfoLineageListRequest",
"(",
")",
"{",
"super",
"(",
"\"industry-brain\"",
",",
"\"2018-07-12\"",
",",
"\"GetIndustryInfoLineageList\"",
")",
";",
"setProtocol",
"(",
"ProtocolType",
".",
"HTTPS",
")",
";",
"}"
] | public GetIndustryInfoLineageListRequest(): base("industry-brain", "2018-07-12", "GetIndustryInfoLineageList"){Protocol = ProtocolType.HTTPS;}
| train | false |
874 | public static double[] grow(double[] array, int minSize) {assert minSize >= 0: "size must be positive (got " + minSize + "): likely integer overflow?";if (array.length < minSize) {return growExact(array, oversize(minSize, Double.BYTES));} else return array;}
| [
"public",
"static",
"double",
"[",
"]",
"grow",
"(",
"double",
"[",
"]",
"array",
",",
"int",
"minSize",
")",
"{",
"assert",
"minSize",
">=",
"0",
":",
"\"size must be positive (got \"",
"+",
"minSize",
"+",
"\"): likely integer overflow?\"",
";",
"if",
"(",
... | public static double[] Grow(double[] array, int minSize){Debug.Assert(minSize >= 0, "size must be positive (got " + minSize + "): likely integer overflow?");if (array.Length < minSize){double[] newArray = new double[Oversize(minSize, RamUsageEstimator.NUM_BYTES_DOUBLE)];Array.Copy(array, 0, newArray, 0, array.Length);r... | train | false |
875 | public void setResult(RefUpdate.Result status) {result = status;super.setResult(status);}
| [
"public",
"void",
"setResult",
"(",
"RefUpdate",
".",
"Result",
"status",
")",
"{",
"result",
"=",
"status",
";",
"super",
".",
"setResult",
"(",
"status",
")",
";",
"}"
] | public override void SetResult(RefUpdate.Result status){this._enclosing.result = status;base.SetResult(status);}
| train | false |
877 | public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0, ValueEval arg1, ValueEval arg2) {try {ValueEval ve = OperandResolver.getSingleValue(arg0, srcRowIndex, srcColumnIndex);final double result = OperandResolver.coerceValueToDouble(ve);if (Double.isNaN(result) || Double.isInfinite(result)) {thro... | [
"public",
"ValueEval",
"evaluate",
"(",
"int",
"srcRowIndex",
",",
"int",
"srcColumnIndex",
",",
"ValueEval",
"arg0",
",",
"ValueEval",
"arg1",
",",
"ValueEval",
"arg2",
")",
"{",
"try",
"{",
"ValueEval",
"ve",
"=",
"OperandResolver",
".",
"getSingleValue",
"(... | public override ValueEval Evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0, ValueEval arg1, ValueEval arg2){AreaEval aeRange;double result;bool order = false;try{ValueEval ve = OperandResolver.GetSingleValue(arg0, srcRowIndex, srcColumnIndex);result = OperandResolver.CoerceValueToDouble(ve);if (Double.IsNaN... | train | false |
878 | public DeleteEventBusResult deleteEventBus(DeleteEventBusRequest request) {request = beforeClientExecution(request);return executeDeleteEventBus(request);}
| [
"public",
"DeleteEventBusResult",
"deleteEventBus",
"(",
"DeleteEventBusRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteEventBus",
"(",
"request",
")",
";",
"}"
] | public virtual DeleteEventBusResponse DeleteEventBus(DeleteEventBusRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteEventBusRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteEventBusResponseUnmarshaller.Instance;return Invoke<DeleteEventBusResponse>(request, options);}
| train | false |
879 | public static ByteBuffer wrap(byte[] array, int start, int byteCount) {Arrays.checkOffsetAndCount(array.length, start, byteCount);ByteBuffer buf = new ReadWriteHeapByteBuffer(array);buf.position = start;buf.limit = start + byteCount;return buf;}
| [
"public",
"static",
"ByteBuffer",
"wrap",
"(",
"byte",
"[",
"]",
"array",
",",
"int",
"start",
",",
"int",
"byteCount",
")",
"{",
"Arrays",
".",
"checkOffsetAndCount",
"(",
"array",
".",
"length",
",",
"start",
",",
"byteCount",
")",
";",
"ByteBuffer",
"... | public static java.nio.ByteBuffer wrap(byte[] array_1, int start, int byteCount){java.util.Arrays.checkOffsetAndCount(array_1.Length, start, byteCount);java.nio.ByteBuffer buf = new java.nio.ReadWriteHeapByteBuffer(array_1);buf._position = start;buf._limit = start + byteCount;return buf;}
| train | false |
880 | public String apiVersion() {return this.apiVersion;}
| [
"public",
"String",
"apiVersion",
"(",
")",
"{",
"return",
"this",
".",
"apiVersion",
";",
"}"
] | public string ApiVersion { get; private set; }
| train | false |
881 | public SearchResult search(SearchRequest request) {request = beforeClientExecution(request);return executeSearch(request);}
| [
"public",
"SearchResult",
"search",
"(",
"SearchRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeSearch",
"(",
"request",
")",
";",
"}"
] | public virtual SearchResponse Search(SearchRequest request){var options = new InvokeOptions();options.RequestMarshaller = SearchRequestMarshaller.Instance;options.ResponseUnmarshaller = SearchResponseUnmarshaller.Instance;return Invoke<SearchResponse>(request, options);}
| train | true |
882 | public PushCommand setRemote(String remote) {checkCallable();this.remote = remote;return this;}
| [
"public",
"PushCommand",
"setRemote",
"(",
"String",
"remote",
")",
"{",
"checkCallable",
"(",
")",
";",
"this",
".",
"remote",
"=",
"remote",
";",
"return",
"this",
";",
"}"
] | public virtual NGit.Api.PushCommand SetRemote(string remote){CheckCallable();this.remote = remote;return this;}
| train | false |
883 | public AcceptReservedInstancesExchangeQuoteResult acceptReservedInstancesExchangeQuote(AcceptReservedInstancesExchangeQuoteRequest request) {request = beforeClientExecution(request);return executeAcceptReservedInstancesExchangeQuote(request);}
| [
"public",
"AcceptReservedInstancesExchangeQuoteResult",
"acceptReservedInstancesExchangeQuote",
"(",
"AcceptReservedInstancesExchangeQuoteRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeAcceptReservedInstancesExchang... | public virtual AcceptReservedInstancesExchangeQuoteResponse AcceptReservedInstancesExchangeQuote(AcceptReservedInstancesExchangeQuoteRequest request){var options = new InvokeOptions();options.RequestMarshaller = AcceptReservedInstancesExchangeQuoteRequestMarshaller.Instance;options.ResponseUnmarshaller = AcceptReserved... | train | true |
884 | public GetAuthorizationTokenResult getAuthorizationToken(GetAuthorizationTokenRequest request) {request = beforeClientExecution(request);return executeGetAuthorizationToken(request);}
| [
"public",
"GetAuthorizationTokenResult",
"getAuthorizationToken",
"(",
"GetAuthorizationTokenRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetAuthorizationToken",
"(",
"request",
")",
";",
"}"
] | public virtual GetAuthorizationTokenResponse GetAuthorizationToken(GetAuthorizationTokenRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetAuthorizationTokenRequestMarshaller.Instance;options.ResponseUnmarshaller = GetAuthorizationTokenResponseUnmarshaller.Instance;return Invoke<GetAuthor... | train | true |
885 | public static InitCommand init() {return new InitCommand();}
| [
"public",
"static",
"InitCommand",
"init",
"(",
")",
"{",
"return",
"new",
"InitCommand",
"(",
")",
";",
"}"
] | public static InitCommand Init(){return new InitCommand();}
| train | false |
887 | public static PredictionContext mergeRoot(SingletonPredictionContext a,SingletonPredictionContext b,boolean rootIsWildcard){if ( rootIsWildcard ) {if ( a == EMPTY ) return EMPTY; if ( b == EMPTY ) return EMPTY; }else {if ( a == EMPTY && b == EMPTY ) return EMPTY; if ( a == EMPTY ) { int[] payloads = {b.returnState, E... | [
"public",
"static",
"PredictionContext",
"mergeRoot",
"(",
"SingletonPredictionContext",
"a",
",",
"SingletonPredictionContext",
"b",
",",
"boolean",
"rootIsWildcard",
")",
"{",
"if",
"(",
"rootIsWildcard",
")",
"{",
"if",
"(",
"a",
"==",
"EMPTY",
")",
"return",
... | public static PredictionContext MergeRoot(SingletonPredictionContext a,SingletonPredictionContext b,bool rootIsWildcard){if (rootIsWildcard){if (a == PredictionContext.EMPTY)return PredictionContext.EMPTY; if (b == PredictionContext.EMPTY)return PredictionContext.EMPTY; }else {if (a == EMPTY && b == EMPTY) return EMP... | train | false |
888 | public ListTerminologiesResult listTerminologies(ListTerminologiesRequest request) {request = beforeClientExecution(request);return executeListTerminologies(request);}
| [
"public",
"ListTerminologiesResult",
"listTerminologies",
"(",
"ListTerminologiesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListTerminologies",
"(",
"request",
")",
";",
"}"
] | public virtual ListTerminologiesResponse ListTerminologies(ListTerminologiesRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListTerminologiesRequestMarshaller.Instance;options.ResponseUnmarshaller = ListTerminologiesResponseUnmarshaller.Instance;return Invoke<ListTerminologiesResponse>(re... | train | true |
889 | public ModifyInstanceGroupsRequest(java.util.List<InstanceGroupModifyConfig> instanceGroups) {setInstanceGroups(instanceGroups);}
| [
"public",
"ModifyInstanceGroupsRequest",
"(",
"java",
".",
"util",
".",
"List",
"<",
"InstanceGroupModifyConfig",
">",
"instanceGroups",
")",
"{",
"setInstanceGroups",
"(",
"instanceGroups",
")",
";",
"}"
] | public ModifyInstanceGroupsRequest(List<InstanceGroupModifyConfig> instanceGroups){_instanceGroups = instanceGroups;}
| train | false |
890 | public String toString() {return "AnyObjectId[" + name() + "]";}
| [
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"\"AnyObjectId[\"",
"+",
"name",
"(",
")",
"+",
"\"]\"",
";",
"}"
] | public override string ToString(){return "AnyObjectId[" + Name + "]";}
| train | false |
891 | public long ramBytesUsed() {long ramBytesUsed = postingsReader.ramBytesUsed();for (TermsReader r : fields.values()) {ramBytesUsed += r.ramBytesUsed();}return ramBytesUsed;}
| [
"public",
"long",
"ramBytesUsed",
"(",
")",
"{",
"long",
"ramBytesUsed",
"=",
"postingsReader",
".",
"ramBytesUsed",
"(",
")",
";",
"for",
"(",
"TermsReader",
"r",
":",
"fields",
".",
"values",
"(",
")",
")",
"{",
"ramBytesUsed",
"+=",
"r",
".",
"ramByte... | public override long RamBytesUsed(){long ramBytesUsed = 0;foreach (TermsReader r in fields.Values){if (r.index != null){ramBytesUsed += r.index.GetSizeInBytes();ramBytesUsed += RamUsageEstimator.SizeOf(r.metaBytesBlock);ramBytesUsed += RamUsageEstimator.SizeOf(r.metaLongsBlock);ramBytesUsed += RamUsageEstimator.SizeOf(... | train | false |
892 | public static final ObjectId fromRaw(int[] is, int p) {return new ObjectId(is[p], is[p + 1], is[p + 2], is[p + 3], is[p + 4]);}
| [
"public",
"static",
"final",
"ObjectId",
"fromRaw",
"(",
"int",
"[",
"]",
"is",
",",
"int",
"p",
")",
"{",
"return",
"new",
"ObjectId",
"(",
"is",
"[",
"p",
"]",
",",
"is",
"[",
"p",
"+",
"1",
"]",
",",
"is",
"[",
"p",
"+",
"2",
"]",
",",
"... | public static NGit.ObjectId FromRaw(int[] @is, int p){return new NGit.ObjectId(@is[p], @is[p + 1], @is[p + 2], @is[p + 3], @is[p + 4]);}
| train | false |
893 | public RemoveTagsFromStreamResult removeTagsFromStream(RemoveTagsFromStreamRequest request) {request = beforeClientExecution(request);return executeRemoveTagsFromStream(request);}
| [
"public",
"RemoveTagsFromStreamResult",
"removeTagsFromStream",
"(",
"RemoveTagsFromStreamRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeRemoveTagsFromStream",
"(",
"request",
")",
";",
"}"
] | public virtual RemoveTagsFromStreamResponse RemoveTagsFromStream(RemoveTagsFromStreamRequest request){var options = new InvokeOptions();options.RequestMarshaller = RemoveTagsFromStreamRequestMarshaller.Instance;options.ResponseUnmarshaller = RemoveTagsFromStreamResponseUnmarshaller.Instance;return Invoke<RemoveTagsFrom... | train | true |
894 | public void writeChar(int value) throws IOException {checkWritePrimitiveTypes();primitiveTypes.writeChar(value);}
| [
"public",
"void",
"writeChar",
"(",
"int",
"value",
")",
"throws",
"IOException",
"{",
"checkWritePrimitiveTypes",
"(",
")",
";",
"primitiveTypes",
".",
"writeChar",
"(",
"value",
")",
";",
"}"
] | public virtual void writeChar(int value){throw new System.NotImplementedException();}
| train | false |
895 | public void setParams(String params) {super.setParams(params);if (params != null) {commitUserData = params;}}
| [
"public",
"void",
"setParams",
"(",
"String",
"params",
")",
"{",
"super",
".",
"setParams",
"(",
"params",
")",
";",
"if",
"(",
"params",
"!=",
"null",
")",
"{",
"commitUserData",
"=",
"params",
";",
"}",
"}"
] | public override void SetParams(string @params){base.SetParams(@params);if (@params != null){commitUserData = @params;}}
| train | false |
896 | public OptionGroup modifyOptionGroup(ModifyOptionGroupRequest request) {request = beforeClientExecution(request);return executeModifyOptionGroup(request);}
| [
"public",
"OptionGroup",
"modifyOptionGroup",
"(",
"ModifyOptionGroupRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeModifyOptionGroup",
"(",
"request",
")",
";",
"}"
] | public virtual ModifyOptionGroupResponse ModifyOptionGroup(ModifyOptionGroupRequest request){var options = new InvokeOptions();options.RequestMarshaller = ModifyOptionGroupRequestMarshaller.Instance;options.ResponseUnmarshaller = ModifyOptionGroupResponseUnmarshaller.Instance;return Invoke<ModifyOptionGroupResponse>(re... | train | true |
897 | public CreateCommentResult createComment(CreateCommentRequest request) {request = beforeClientExecution(request);return executeCreateComment(request);}
| [
"public",
"CreateCommentResult",
"createComment",
"(",
"CreateCommentRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCreateComment",
"(",
"request",
")",
";",
"}"
] | public virtual CreateCommentResponse CreateComment(CreateCommentRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateCommentRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateCommentResponseUnmarshaller.Instance;return Invoke<CreateCommentResponse>(request, options);}
| train | true |
898 | public void setParams(String params) {super.setParams(params);userData = params;}
| [
"public",
"void",
"setParams",
"(",
"String",
"params",
")",
"{",
"super",
".",
"setParams",
"(",
"params",
")",
";",
"userData",
"=",
"params",
";",
"}"
] | public override void SetParams(string @params){base.SetParams(@params);userData = @params;}
| train | false |
899 | public SearchAvailablePhoneNumbersResult searchAvailablePhoneNumbers(SearchAvailablePhoneNumbersRequest request) {request = beforeClientExecution(request);return executeSearchAvailablePhoneNumbers(request);}
| [
"public",
"SearchAvailablePhoneNumbersResult",
"searchAvailablePhoneNumbers",
"(",
"SearchAvailablePhoneNumbersRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeSearchAvailablePhoneNumbers",
"(",
"request",
")",
... | public virtual SearchAvailablePhoneNumbersResponse SearchAvailablePhoneNumbers(SearchAvailablePhoneNumbersRequest request){var options = new InvokeOptions();options.RequestMarshaller = SearchAvailablePhoneNumbersRequestMarshaller.Instance;options.ResponseUnmarshaller = SearchAvailablePhoneNumbersResponseUnmarshaller.In... | train | true |
900 | public SpanPositionCheckQuery(SpanQuery match) {this.match = Objects.requireNonNull(match);}
| [
"public",
"SpanPositionCheckQuery",
"(",
"SpanQuery",
"match",
")",
"{",
"this",
".",
"match",
"=",
"Objects",
".",
"requireNonNull",
"(",
"match",
")",
";",
"}"
] | public SpanPositionCheckQuery(SpanQuery match){this.m_match = match;}
| train | false |
901 | public boolean removeChildRecord(EscherRecord toBeRemoved) {return _childRecords.remove(toBeRemoved);}
| [
"public",
"boolean",
"removeChildRecord",
"(",
"EscherRecord",
"toBeRemoved",
")",
"{",
"return",
"_childRecords",
".",
"remove",
"(",
"toBeRemoved",
")",
";",
"}"
] | public bool RemoveChildRecord(EscherRecord toBeRemoved){return _childRecords.Remove(toBeRemoved);}
| train | false |
902 | public BytesRef clone() {return new BytesRef(bytes, offset, length);}
| [
"public",
"BytesRef",
"clone",
"(",
")",
"{",
"return",
"new",
"BytesRef",
"(",
"bytes",
",",
"offset",
",",
"length",
")",
";",
"}"
] | public object Clone(){return new BytesRef(bytes, Offset, Length);}
| train | false |
903 | public ByteBuffer putLong(long value) {throw new ReadOnlyBufferException();}
| [
"public",
"ByteBuffer",
"putLong",
"(",
"long",
"value",
")",
"{",
"throw",
"new",
"ReadOnlyBufferException",
"(",
")",
";",
"}"
] | public override java.nio.ByteBuffer putLong(long value){throw new java.nio.ReadOnlyBufferException();}
| train | false |
904 | @Override public boolean add(E object) {synchronized (CopyOnWriteArrayList.this) {add(slice.to - slice.from, object);return true;}}
| [
"@",
"Override",
"public",
"boolean",
"add",
"(",
"E",
"object",
")",
"{",
"synchronized",
"(",
"CopyOnWriteArrayList",
".",
"this",
")",
"{",
"add",
"(",
"slice",
".",
"to",
"-",
"slice",
".",
"from",
",",
"object",
")",
";",
"return",
"true",
";",
... | public virtual bool add(E e){lock (this){object[] newElements = new object[elements.Length + 1];System.Array.Copy(elements, 0, newElements, 0, elements.Length);newElements[elements.Length] = e;elements = newElements;return true;}}
| train | false |
905 | public RevTree lookupTree(AnyObjectId id) {RevTree c = (RevTree) objects.get(id);if (c == null) {c = new RevTree(id);objects.add(c);}return c;}
| [
"public",
"RevTree",
"lookupTree",
"(",
"AnyObjectId",
"id",
")",
"{",
"RevTree",
"c",
"=",
"(",
"RevTree",
")",
"objects",
".",
"get",
"(",
"id",
")",
";",
"if",
"(",
"c",
"==",
"null",
")",
"{",
"c",
"=",
"new",
"RevTree",
"(",
"id",
")",
";",
... | public virtual RevTree LookupTree(AnyObjectId id){RevTree c = (RevTree)objects.Get(id);if (c == null){c = new RevTree(id);objects.Add(c);}return c;}
| train | false |
906 | public boolean equals(Object other) {return sameClassAs(other) &&func.equals(((FunctionQuery) other).func);}
| [
"public",
"boolean",
"equals",
"(",
"Object",
"other",
")",
"{",
"return",
"sameClassAs",
"(",
"other",
")",
"&&",
"func",
".",
"equals",
"(",
"(",
"(",
"FunctionQuery",
")",
"other",
")",
".",
"func",
")",
";",
"}"
] | public override bool Equals(object o){var other = o as FunctionQuery;if (other == null){return false;}return Boost == other.Boost&& func.Equals(other.func);}
| train | false |
907 | public boolean changeExternalReference(String oldUrl, String newUrl) {for (ExternalBookBlock ex : _externalBookBlocks) {SupBookRecord externalRecord = ex.getExternalBookRecord();if (externalRecord.isExternalReferences()&& externalRecord.getURL().equals(oldUrl)) {externalRecord.setURL(newUrl);return true;}}return false;... | [
"public",
"boolean",
"changeExternalReference",
"(",
"String",
"oldUrl",
",",
"String",
"newUrl",
")",
"{",
"for",
"(",
"ExternalBookBlock",
"ex",
":",
"_externalBookBlocks",
")",
"{",
"SupBookRecord",
"externalRecord",
"=",
"ex",
".",
"getExternalBookRecord",
"(",
... | public bool ChangeExternalReference(String oldUrl, String newUrl){foreach (ExternalBookBlock ex in _externalBookBlocks){SupBookRecord externalRecord = ex.GetExternalBookRecord();if (externalRecord.IsExternalReferences&& externalRecord.URL.Equals(oldUrl)){externalRecord.URL = (newUrl);return true;}}return false;}
| train | false |
908 | public void removeLastPrinted() {remove1stProperty(PropertyIDMap.PID_LASTPRINTED);}
| [
"public",
"void",
"removeLastPrinted",
"(",
")",
"{",
"remove1stProperty",
"(",
"PropertyIDMap",
".",
"PID_LASTPRINTED",
")",
";",
"}"
] | public void RemoveLastPrinted(){MutableSection s = (MutableSection)FirstSection;s.RemoveProperty(PropertyIDMap.PID_LASTPRINTED);}
| train | false |
909 | public MergeCommand merge() {return new MergeCommand(repo);}
| [
"public",
"MergeCommand",
"merge",
"(",
")",
"{",
"return",
"new",
"MergeCommand",
"(",
"repo",
")",
";",
"}"
] | public virtual MergeCommand Merge(){return new MergeCommand(repo);}
| train | false |
910 | public String toString() {final Type t = getType();return t + "(" + beginA + "-" + endA + "," + beginB + "-" + endB + ")";}
| [
"public",
"String",
"toString",
"(",
")",
"{",
"final",
"Type",
"t",
"=",
"getType",
"(",
")",
";",
"return",
"t",
"+",
"\"(\"",
"+",
"beginA",
"+",
"\"-\"",
"+",
"endA",
"+",
"\",\"",
"+",
"beginB",
"+",
"\"-\"",
"+",
"endB",
"+",
"\")\"",
";",
... | public override string ToString(){Edit.Type t = GetType();return t + "(" + beginA + "-" + endA + "," + beginB + "-" + endB + ")";}
| train | false |
911 | public void serialize(LittleEndianOutput out) {int nItems = _list.size();out.writeShort(nItems);for (int k = 0; k < nItems; k++) {CellRangeAddress region = _list.get(k);region.serialize(out);}}
| [
"public",
"void",
"serialize",
"(",
"LittleEndianOutput",
"out",
")",
"{",
"int",
"nItems",
"=",
"_list",
".",
"size",
"(",
")",
";",
"out",
".",
"writeShort",
"(",
"nItems",
")",
";",
"for",
"(",
"int",
"k",
"=",
"0",
";",
"k",
"<",
"nItems",
";",... | public void Serialize(ILittleEndianOutput out1){int nItems = _list.Count;out1.WriteShort(nItems);for (int k = 0; k < nItems; k++){CellRangeAddress region = (CellRangeAddress)_list[k];region.Serialize(out1);}}
| train | false |
912 | public void remove() {throw new UnsupportedOperationException("Remove not supported");}
| [
"public",
"void",
"remove",
"(",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
"\"Remove not supported\"",
")",
";",
"}"
] | public void Remove(){throw new InvalidOperationException("Remove not supported");}
| train | false |
913 | public TagCommand setSigned(boolean signed) {this.signed = signed;return this;}
| [
"public",
"TagCommand",
"setSigned",
"(",
"boolean",
"signed",
")",
"{",
"this",
".",
"signed",
"=",
"signed",
";",
"return",
"this",
";",
"}"
] | public virtual NGit.Api.TagCommand SetSigned(bool signed){this.signed = signed;return this;}
| train | false |
914 | public DescribeReservedInstancesListingsResult describeReservedInstancesListings(DescribeReservedInstancesListingsRequest request) {request = beforeClientExecution(request);return executeDescribeReservedInstancesListings(request);}
| [
"public",
"DescribeReservedInstancesListingsResult",
"describeReservedInstancesListings",
"(",
"DescribeReservedInstancesListingsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeReservedInstancesListings",
"... | public virtual DescribeReservedInstancesListingsResponse DescribeReservedInstancesListings(DescribeReservedInstancesListingsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeReservedInstancesListingsRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeReservedInstancesL... | train | true |
915 | public String getName() {return getRef().getName();}
| [
"public",
"String",
"getName",
"(",
")",
"{",
"return",
"getRef",
"(",
")",
".",
"getName",
"(",
")",
";",
"}"
] | public virtual string GetName(){return GetRef().GetName();}
| train | false |
916 | public boolean isAllSet(final int holder){return (holder & _mask) == _mask;}
| [
"public",
"boolean",
"isAllSet",
"(",
"final",
"int",
"holder",
")",
"{",
"return",
"(",
"holder",
"&",
"_mask",
")",
"==",
"_mask",
";",
"}"
] | public bool IsAllSet(int holder){return ((holder & this._mask) == this._mask);}
| train | false |
917 | public static int getEncodedSize(String value) {int result = 2 + 1;result += value.length() * (StringUtil.hasMultibyte(value) ? 2 : 1);return result;}
| [
"public",
"static",
"int",
"getEncodedSize",
"(",
"String",
"value",
")",
"{",
"int",
"result",
"=",
"2",
"+",
"1",
";",
"result",
"+=",
"value",
".",
"length",
"(",
")",
"*",
"(",
"StringUtil",
".",
"hasMultibyte",
"(",
"value",
")",
"?",
"2",
":",
... | public static int GetEncodedSize(String value){int result = 2 + 1;result += value.Length * (StringUtil.HasMultibyte(value) ? 2 : 1);return result;}
| train | false |
918 | public List<CharsRef> stem(char word[], int length) {if (dictionary.needsInputCleaning) {scratchSegment.setLength(0);scratchSegment.append(word, 0, length);CharSequence cleaned = dictionary.cleanInput(scratchSegment, segment);scratchBuffer = ArrayUtil.grow(scratchBuffer, cleaned.length());length = segment.length();segm... | [
"public",
"List",
"<",
"CharsRef",
">",
"stem",
"(",
"char",
"word",
"[",
"]",
",",
"int",
"length",
")",
"{",
"if",
"(",
"dictionary",
".",
"needsInputCleaning",
")",
"{",
"scratchSegment",
".",
"setLength",
"(",
"0",
")",
";",
"scratchSegment",
".",
... | public IList<CharsRef> Stem(char[] word, int length){if (dictionary.needsInputCleaning){scratchSegment.Length = 0;scratchSegment.Append(word, 0, length);string cleaned = dictionary.CleanInput(scratchSegment.ToString(), segment);scratchBuffer = ArrayUtil.Grow(scratchBuffer, cleaned.Length);length = segment.Length;segmen... | train | false |
919 | public HSSFConditionalFormattingRule createConditionalFormattingRule(String formula) {CFRuleRecord rr = CFRuleRecord.create(_sheet, formula);return new HSSFConditionalFormattingRule(_sheet, rr);}
| [
"public",
"HSSFConditionalFormattingRule",
"createConditionalFormattingRule",
"(",
"String",
"formula",
")",
"{",
"CFRuleRecord",
"rr",
"=",
"CFRuleRecord",
".",
"create",
"(",
"_sheet",
",",
"formula",
")",
";",
"return",
"new",
"HSSFConditionalFormattingRule",
"(",
... | public IConditionalFormattingRule CreateConditionalFormattingRule(String formula){HSSFWorkbook wb = (HSSFWorkbook)_sheet.Workbook;CFRuleRecord rr = CFRuleRecord.Create(_sheet, formula);return new HSSFConditionalFormattingRule(wb, rr);}
| train | false |
920 | public Record create(RecordInputStream in) {Object[] args = { in, };try {return (org.apache.poi.hssf.record.Record) _m.invoke(null, args);} catch (IllegalArgumentException | IllegalAccessException e) {throw new RuntimeException(e);} catch (InvocationTargetException e) {throw new org.apache.poi.util.RecordFormatExceptio... | [
"public",
"Record",
"create",
"(",
"RecordInputStream",
"in",
")",
"{",
"Object",
"[",
"]",
"args",
"=",
"{",
"in",
",",
"}",
";",
"try",
"{",
"return",
"(",
"org",
".",
"apache",
".",
"poi",
".",
"hssf",
".",
"record",
".",
"Record",
")",
"_m",
... | public Record Create(RecordInputStream in1){Object[] args = { in1 };try{return (Record)_m.Invoke(null, args);}catch (Exception e){throw new RecordFormatException("Unable to construct record instance", e.InnerException);}}
| train | false |
921 | public int set(int index, long[] arr, int off, int len) {assert len > 0 : "len must be > 0 (got " + len + ")";assert index >= 0 && index < size();len = Math.min(len, size() - index);assert off + len <= arr.length;for (int i = index, o = off, end = index + len; i < end; ++i, ++o) {set(i, arr[o]);}return len;}
| [
"public",
"int",
"set",
"(",
"int",
"index",
",",
"long",
"[",
"]",
"arr",
",",
"int",
"off",
",",
"int",
"len",
")",
"{",
"assert",
"len",
">",
"0",
":",
"\"len must be > 0 (got \"",
"+",
"len",
"+",
"\")\"",
";",
"assert",
"index",
">=",
"0",
"&&... | public virtual int Set(int index, long[] arr, int off, int len){Debug.Assert(len > 0, "len must be > 0 (got " + len + ")");Debug.Assert(index >= 0 && index < Count);len = Math.Min(len, Count - index);Debug.Assert(off + len <= arr.Length);for (int i = index, o = off, end = index + len; i < end; ++i, ++o){Set(i, arr[o]);... | train | false |
922 | public synchronized long ramBytesUsed() {long bytes = 0;for(CachedOrds ords : ordsCache.values()) {bytes += ords.ramBytesUsed();}return bytes;}
| [
"public",
"synchronized",
"long",
"ramBytesUsed",
"(",
")",
"{",
"long",
"bytes",
"=",
"0",
";",
"for",
"(",
"CachedOrds",
"ords",
":",
"ordsCache",
".",
"values",
"(",
")",
")",
"{",
"bytes",
"+=",
"ords",
".",
"ramBytesUsed",
"(",
")",
";",
"}",
"r... | public virtual long RamBytesUsed(){lock (this) return ordsCache.Sum(pair => pair.Value.RamBytesUsed());}
| train | false |
923 | public void writeDouble(double v) {writeLong(Double.doubleToLongBits(v));}
| [
"public",
"void",
"writeDouble",
"(",
"double",
"v",
")",
"{",
"writeLong",
"(",
"Double",
".",
"doubleToLongBits",
"(",
"v",
")",
")",
";",
"}"
] | public void WriteDouble(double v){WriteLong(BitConverter.DoubleToInt64Bits(v));}
| train | false |
924 | public String toString() {return "DocumentsWriterFlushControl [activeBytes=" + activeBytes+ ", flushBytes=" + flushBytes + "]";}
| [
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"\"DocumentsWriterFlushControl [activeBytes=\"",
"+",
"activeBytes",
"+",
"\", flushBytes=\"",
"+",
"flushBytes",
"+",
"\"]\"",
";",
"}"
] | public override string ToString(){return "DocumentsWriterFlushControl [activeBytes=" + activeBytes + ", flushBytes=" + flushBytes + "]";}
| train | false |
925 | public ListSecurityConfigurationsResult listSecurityConfigurations(ListSecurityConfigurationsRequest request) {request = beforeClientExecution(request);return executeListSecurityConfigurations(request);}
| [
"public",
"ListSecurityConfigurationsResult",
"listSecurityConfigurations",
"(",
"ListSecurityConfigurationsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListSecurityConfigurations",
"(",
"request",
")",
";... | public virtual ListSecurityConfigurationsResponse ListSecurityConfigurations(ListSecurityConfigurationsRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListSecurityConfigurationsRequestMarshaller.Instance;options.ResponseUnmarshaller = ListSecurityConfigurationsResponseUnmarshaller.Instanc... | train | true |
926 | public ListQualificationRequestsResult listQualificationRequests(ListQualificationRequestsRequest request) {request = beforeClientExecution(request);return executeListQualificationRequests(request);}
| [
"public",
"ListQualificationRequestsResult",
"listQualificationRequests",
"(",
"ListQualificationRequestsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListQualificationRequests",
"(",
"request",
")",
";",
... | public virtual ListQualificationRequestsResponse ListQualificationRequests(ListQualificationRequestsRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListQualificationRequestsRequestMarshaller.Instance;options.ResponseUnmarshaller = ListQualificationRequestsResponseUnmarshaller.Instance;ret... | train | true |
927 | public void println(char[] chars) {println(new String(chars, 0, chars.length));}
| [
"public",
"void",
"println",
"(",
"char",
"[",
"]",
"chars",
")",
"{",
"println",
"(",
"new",
"String",
"(",
"chars",
",",
"0",
",",
"chars",
".",
"length",
")",
")",
";",
"}"
] | public virtual void println(char[] chars){println(new string(chars, 0, chars.Length));}
| train | false |
928 | public ReleaseAddressResult releaseAddress(ReleaseAddressRequest request) {request = beforeClientExecution(request);return executeReleaseAddress(request);}
| [
"public",
"ReleaseAddressResult",
"releaseAddress",
"(",
"ReleaseAddressRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeReleaseAddress",
"(",
"request",
")",
";",
"}"
] | public virtual ReleaseAddressResponse ReleaseAddress(ReleaseAddressRequest request){var options = new InvokeOptions();options.RequestMarshaller = ReleaseAddressRequestMarshaller.Instance;options.ResponseUnmarshaller = ReleaseAddressResponseUnmarshaller.Instance;return Invoke<ReleaseAddressResponse>(request, options);}
| train | true |
930 | public void fillOval(int x, int y, int width, int height){HSSFSimpleShape shape = escherGroup.createShape(new HSSFChildAnchor( x, y, x + width, y + height ) );shape.setShapeType(HSSFSimpleShape.OBJECT_TYPE_OVAL);shape.setLineStyle(HSSFShape.LINESTYLE_NONE);shape.setFillColor(foreground.getRed(), foreground.getGreen(), ... | [
"public",
"void",
"fillOval",
"(",
"int",
"x",
",",
"int",
"y",
",",
"int",
"width",
",",
"int",
"height",
")",
"{",
"HSSFSimpleShape",
"shape",
"=",
"escherGroup",
".",
"createShape",
"(",
"new",
"HSSFChildAnchor",
"(",
"x",
",",
"y",
",",
"x",
"+",
... | public void FillOval(int x, int y, int width, int height){HSSFSimpleShape shape = escherGroup.CreateShape(new HSSFChildAnchor(x, y, x + width, y + height));shape.ShapeType = (HSSFSimpleShape.OBJECT_TYPE_OVAL);shape.LineStyle = LineStyle.None;shape.SetFillColor(foreground.R, foreground.G, foreground.B);shape.SetLineStyl... | train | false |
931 | public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0, ValueEval arg1,ValueEval arg2) {try {String needle = TextFunction.evaluateStringArg(arg0, srcRowIndex, srcColumnIndex);String haystack = TextFunction.evaluateStringArg(arg1, srcRowIndex, srcColumnIndex);int startpos = TextFunction.evaluateIn... | [
"public",
"ValueEval",
"evaluate",
"(",
"int",
"srcRowIndex",
",",
"int",
"srcColumnIndex",
",",
"ValueEval",
"arg0",
",",
"ValueEval",
"arg1",
",",
"ValueEval",
"arg2",
")",
"{",
"try",
"{",
"String",
"needle",
"=",
"TextFunction",
".",
"evaluateStringArg",
"... | public override ValueEval Evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0, ValueEval arg1,ValueEval arg2){try{String needle = TextFunction.EvaluateStringArg(arg0, srcRowIndex, srcColumnIndex);String haystack = TextFunction.EvaluateStringArg(arg1, srcRowIndex, srcColumnIndex);int startpos = TextFunction.Eva... | train | false |
932 | public CreateInvalidationRequest(String distributionId, InvalidationBatch invalidationBatch) {setDistributionId(distributionId);setInvalidationBatch(invalidationBatch);}
| [
"public",
"CreateInvalidationRequest",
"(",
"String",
"distributionId",
",",
"InvalidationBatch",
"invalidationBatch",
")",
"{",
"setDistributionId",
"(",
"distributionId",
")",
";",
"setInvalidationBatch",
"(",
"invalidationBatch",
")",
";",
"}"
] | public CreateInvalidationRequest(string distributionId, InvalidationBatch invalidationBatch){_distributionId = distributionId;_invalidationBatch = invalidationBatch;}
| train | false |
933 | public CreateUsageReportSubscriptionResult createUsageReportSubscription(CreateUsageReportSubscriptionRequest request) {request = beforeClientExecution(request);return executeCreateUsageReportSubscription(request);}
| [
"public",
"CreateUsageReportSubscriptionResult",
"createUsageReportSubscription",
"(",
"CreateUsageReportSubscriptionRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCreateUsageReportSubscription",
"(",
"request",... | public virtual CreateUsageReportSubscriptionResponse CreateUsageReportSubscription(CreateUsageReportSubscriptionRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateUsageReportSubscriptionRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateUsageReportSubscriptionResponseUnmar... | train | false |
934 | public static String fromString(String value) {return value;}
| [
"public",
"static",
"String",
"fromString",
"(",
"String",
"value",
")",
"{",
"return",
"value",
";",
"}"
] | public static string FromString(String value){return value;}
| train | false |
935 | public GetDetectorsResult getDetectors(GetDetectorsRequest request) {request = beforeClientExecution(request);return executeGetDetectors(request);}
| [
"public",
"GetDetectorsResult",
"getDetectors",
"(",
"GetDetectorsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetDetectors",
"(",
"request",
")",
";",
"}"
] | public virtual GetDetectorsResponse GetDetectors(GetDetectorsRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetDetectorsRequestMarshaller.Instance;options.ResponseUnmarshaller = GetDetectorsResponseUnmarshaller.Instance;return Invoke<GetDetectorsResponse>(request, options);}
| train | false |
936 | public static String fromDouble(Double d) {return Double.toString(d);}
| [
"public",
"static",
"String",
"fromDouble",
"(",
"Double",
"d",
")",
"{",
"return",
"Double",
".",
"toString",
"(",
"d",
")",
";",
"}"
] | public static string FromDouble(double value){return value.ToString(CultureInfo.InvariantCulture);}
| train | false |
937 | public void writeProtectWorkbook( String password, String username ) {FileSharingRecord frec = getFileSharing();WriteAccessRecord waccess = getWriteAccess(); getWriteProtect();frec.setReadOnly((short)1);frec.setPassword((short)CryptoFunctions.createXorVerifier1(password));frec.setUsername(username);waccess.setUsername(... | [
"public",
"void",
"writeProtectWorkbook",
"(",
"String",
"password",
",",
"String",
"username",
")",
"{",
"FileSharingRecord",
"frec",
"=",
"getFileSharing",
"(",
")",
";",
"WriteAccessRecord",
"waccess",
"=",
"getWriteAccess",
"(",
")",
";",
"getWriteProtect",
"(... | public void WriteProtectWorkbook(String password, String username){FileSharingRecord frec = FileSharing;WriteAccessRecord waccess = WriteAccess;frec.ReadOnly=((short)1);frec.Password=(FileSharingRecord.HashPassword(password));frec.Username=(username);waccess.Username=(username);}
| train | false |
938 | public Process exec(String command, int timeout)throws TransportException {String ssh = SystemReader.getInstance().getenv("GIT_SSH"); boolean putty = ssh.toLowerCase(Locale.ROOT).contains("plink"); List<String> args = new ArrayList<>();args.add(ssh);if (putty&& !ssh.toLowerCase(Locale.ROOT).contains("tortoiseplink")) a... | [
"public",
"Process",
"exec",
"(",
"String",
"command",
",",
"int",
"timeout",
")",
"throws",
"TransportException",
"{",
"String",
"ssh",
"=",
"SystemReader",
".",
"getInstance",
"(",
")",
".",
"getenv",
"(",
"\"GIT_SSH\"",
")",
";",
"boolean",
"putty",
"=",
... | public virtual SystemProcess Exec(string command, int timeout){string ssh = SystemReader.GetInstance().Getenv("GIT_SSH");bool putty = ssh.ToLower().Contains("plink");IList<string> args = new AList<string>();args.AddItem(ssh);if (putty && !ssh.ToLower().Contains("tortoiseplink")){args.AddItem("-batch");}if (0 < this._en... | train | false |
939 | public void serialize(LittleEndianOutput out) {out.write(recordData);}
| [
"public",
"void",
"serialize",
"(",
"LittleEndianOutput",
"out",
")",
"{",
"out",
".",
"write",
"(",
"recordData",
")",
";",
"}"
] | public override void Serialize(ILittleEndianOutput out1){out1.Write(recordData);}
| train | false |
940 | public UpdateFleetCapacityResult updateFleetCapacity(UpdateFleetCapacityRequest request) {request = beforeClientExecution(request);return executeUpdateFleetCapacity(request);}
| [
"public",
"UpdateFleetCapacityResult",
"updateFleetCapacity",
"(",
"UpdateFleetCapacityRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateFleetCapacity",
"(",
"request",
")",
";",
"}"
] | public virtual UpdateFleetCapacityResponse UpdateFleetCapacity(UpdateFleetCapacityRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateFleetCapacityRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateFleetCapacityResponseUnmarshaller.Instance;return Invoke<UpdateFleetCapacity... | train | true |
941 | public CreateDirectConnectGatewayAssociationResult createDirectConnectGatewayAssociation(CreateDirectConnectGatewayAssociationRequest request) {request = beforeClientExecution(request);return executeCreateDirectConnectGatewayAssociation(request);}
| [
"public",
"CreateDirectConnectGatewayAssociationResult",
"createDirectConnectGatewayAssociation",
"(",
"CreateDirectConnectGatewayAssociationRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCreateDirectConnectGatewayA... | public virtual CreateDirectConnectGatewayAssociationResponse CreateDirectConnectGatewayAssociation(CreateDirectConnectGatewayAssociationRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateDirectConnectGatewayAssociationRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateDire... | train | true |
942 | public TokenStream create(TokenStream input) {if (words == null) {return input;} else {final TokenStream filter = new KeepWordFilter(input, words);return filter;}}
| [
"public",
"TokenStream",
"create",
"(",
"TokenStream",
"input",
")",
"{",
"if",
"(",
"words",
"==",
"null",
")",
"{",
"return",
"input",
";",
"}",
"else",
"{",
"final",
"TokenStream",
"filter",
"=",
"new",
"KeepWordFilter",
"(",
"input",
",",
"words",
")... | public override TokenStream Create(TokenStream input){if (words == null){return input;}else{TokenStream filter = new KeepWordFilter(m_luceneMatchVersion, enablePositionIncrements, input, words);return filter;}}
| train | false |
943 | public final int getEndA() {return endA;}
| [
"public",
"final",
"int",
"getEndA",
"(",
")",
"{",
"return",
"endA",
";",
"}"
] | public int GetEndA(){return endA;}
| train | false |
944 | public String getStrictHostKeyChecking() {return strictHostKeyChecking;}
| [
"public",
"String",
"getStrictHostKeyChecking",
"(",
")",
"{",
"return",
"strictHostKeyChecking",
";",
"}"
] | public virtual string GetStrictHostKeyChecking(){return strictHostKeyChecking;}
| train | false |
945 | public Lift(boolean changeSkip) {this.changeSkip = changeSkip;}
| [
"public",
"Lift",
"(",
"boolean",
"changeSkip",
")",
"{",
"this",
".",
"changeSkip",
"=",
"changeSkip",
";",
"}"
] | public Lift(bool changeSkip){this.changeSkip = changeSkip;}
| train | false |
946 | public void serialize(LittleEndianOutput out) {out.writeShort(field_1_precision);}
| [
"public",
"void",
"serialize",
"(",
"LittleEndianOutput",
"out",
")",
"{",
"out",
".",
"writeShort",
"(",
"field_1_precision",
")",
";",
"}"
] | public override void Serialize(ILittleEndianOutput out1){out1.WriteShort(field_1_precision);}
| train | false |
947 | public GetAuthorizerResult getAuthorizer(GetAuthorizerRequest request) {request = beforeClientExecution(request);return executeGetAuthorizer(request);}
| [
"public",
"GetAuthorizerResult",
"getAuthorizer",
"(",
"GetAuthorizerRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetAuthorizer",
"(",
"request",
")",
";",
"}"
] | public virtual GetAuthorizerResponse GetAuthorizer(GetAuthorizerRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetAuthorizerRequestMarshaller.Instance;options.ResponseUnmarshaller = GetAuthorizerResponseUnmarshaller.Instance;return Invoke<GetAuthorizerResponse>(request, options);}
| train | true |
948 | public StringCharacterIterator(String value, int start, int end, int location) {string = value;if (start < 0 || end > string.length() || start > end|| location < start || location > end) {throw new IllegalArgumentException();}this.start = start;this.end = end;offset = location;}
| [
"public",
"StringCharacterIterator",
"(",
"String",
"value",
",",
"int",
"start",
",",
"int",
"end",
",",
"int",
"location",
")",
"{",
"string",
"=",
"value",
";",
"if",
"(",
"start",
"<",
"0",
"||",
"end",
">",
"string",
".",
"length",
"(",
")",
"||... | public StringCharacterIterator(string value, int start, int end, int location){@string = value;if (start < 0 || end > @string.Length || start > end || location < start || location> end){throw new System.ArgumentException();}this.start = start;this.end = end;offset = location;}
| train | false |
949 | public String toString() {StringBuilder buf = new StringBuilder();buf.append("ObjectToPack[");buf.append(Constants.typeString(getType()));buf.append(" ");buf.append(name());if (wantWrite())buf.append(" wantWrite");if (isReuseAsIs())buf.append(" reuseAsIs");if (isDoNotDelta())buf.append(" doNotDelta");if (isEdge())buf.a... | [
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuilder",
"buf",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"buf",
".",
"append",
"(",
"\"ObjectToPack[\"",
")",
";",
"buf",
".",
"append",
"(",
"Constants",
".",
"typeString",
"(",
"getType",
"(",
"... | public override string ToString(){StringBuilder buf = new StringBuilder();buf.Append("ObjectToPack[");buf.Append(Constants.TypeString(GetType()));buf.Append(" ");buf.Append(Name);if (WantWrite()){buf.Append(" wantWrite");}if (IsReuseAsIs()){buf.Append(" reuseAsIs");}if (IsDoNotDelta()){buf.Append(" doNotDelta");}if (Is... | train | false |
950 | public String toString() {return "1";}
| [
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"\"1\"",
";",
"}"
] | public override string ToString(){return "1";}
| train | false |
951 | public final void readFully(byte[] dst, int offset, int byteCount) throws IOException {Streams.readFully(in, dst, offset, byteCount);}
| [
"public",
"final",
"void",
"readFully",
"(",
"byte",
"[",
"]",
"dst",
",",
"int",
"offset",
",",
"int",
"byteCount",
")",
"throws",
"IOException",
"{",
"Streams",
".",
"readFully",
"(",
"in",
",",
"dst",
",",
"offset",
",",
"byteCount",
")",
";",
"}"
] | public virtual void readFully(byte[] dst, int offset, int byteCount){throw new System.NotImplementedException();}
| train | true |
952 | public GetMailboxDetailsResult getMailboxDetails(GetMailboxDetailsRequest request) {request = beforeClientExecution(request);return executeGetMailboxDetails(request);}
| [
"public",
"GetMailboxDetailsResult",
"getMailboxDetails",
"(",
"GetMailboxDetailsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetMailboxDetails",
"(",
"request",
")",
";",
"}"
] | public virtual GetMailboxDetailsResponse GetMailboxDetails(GetMailboxDetailsRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetMailboxDetailsRequestMarshaller.Instance;options.ResponseUnmarshaller = GetMailboxDetailsResponseUnmarshaller.Instance;return Invoke<GetMailboxDetailsResponse>(re... | train | false |
953 | public CharBuffer append(CharSequence csq) {if (csq != null) {return put(csq.toString());}return put("null");}
| [
"public",
"CharBuffer",
"append",
"(",
"CharSequence",
"csq",
")",
"{",
"if",
"(",
"csq",
"!=",
"null",
")",
"{",
"return",
"put",
"(",
"csq",
".",
"toString",
"(",
")",
")",
";",
"}",
"return",
"put",
"(",
"\"null\"",
")",
";",
"}"
] | public virtual java.nio.CharBuffer append(java.lang.CharSequence csq){if (csq != null){return put(csq.ToString());}return put("null");}
| train | true |
954 | public RegisterFaceRequest() {super("LinkFace", "2018-07-20", "RegisterFace");setProtocol(ProtocolType.HTTPS);setMethod(MethodType.POST);}
| [
"public",
"RegisterFaceRequest",
"(",
")",
"{",
"super",
"(",
"\"LinkFace\"",
",",
"\"2018-07-20\"",
",",
"\"RegisterFace\"",
")",
";",
"setProtocol",
"(",
"ProtocolType",
".",
"HTTPS",
")",
";",
"setMethod",
"(",
"MethodType",
".",
"POST",
")",
";",
"}"
] | public RegisterFaceRequest(): base("LinkFace", "2018-07-20", "RegisterFace"){Protocol = ProtocolType.HTTPS;Method = MethodType.POST;}
| train | false |
955 | public static void checkValue(double result) throws EvaluationException {if (Double.isNaN(result) || Double.isInfinite(result)) {throw new EvaluationException(ErrorEval.NUM_ERROR);}}
| [
"public",
"static",
"void",
"checkValue",
"(",
"double",
"result",
")",
"throws",
"EvaluationException",
"{",
"if",
"(",
"Double",
".",
"isNaN",
"(",
"result",
")",
"||",
"Double",
".",
"isInfinite",
"(",
"result",
")",
")",
"{",
"throw",
"new",
"Evaluatio... | public static void CheckValue(double result){if (Double.IsNaN(result) || Double.IsInfinity(result)){throw new EvaluationException(ErrorEval.NUM_ERROR);}}
| train | false |
956 | public PutInvitationConfigurationResult putInvitationConfiguration(PutInvitationConfigurationRequest request) {request = beforeClientExecution(request);return executePutInvitationConfiguration(request);}
| [
"public",
"PutInvitationConfigurationResult",
"putInvitationConfiguration",
"(",
"PutInvitationConfigurationRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executePutInvitationConfiguration",
"(",
"request",
")",
";... | public virtual PutInvitationConfigurationResponse PutInvitationConfiguration(PutInvitationConfigurationRequest request){var options = new InvokeOptions();options.RequestMarshaller = PutInvitationConfigurationRequestMarshaller.Instance;options.ResponseUnmarshaller = PutInvitationConfigurationResponseUnmarshaller.Instanc... | train | true |
958 | public void add(BytesRef utf8, int bucket) throws IOException {if (bucket < 0 || bucket >= buckets) {throw new IllegalArgumentException("Bucket outside of the allowed range [0, " + buckets + "): " + bucket);}scratch.grow(utf8.length + 10);scratch.clear();scratch.append((byte) bucket);scratch.append(utf8);sorter.add(scr... | [
"public",
"void",
"add",
"(",
"BytesRef",
"utf8",
",",
"int",
"bucket",
")",
"throws",
"IOException",
"{",
"if",
"(",
"bucket",
"<",
"0",
"||",
"bucket",
">=",
"buckets",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Bucket outside of the allow... | public virtual void Add(BytesRef utf8, int bucket){if (bucket < 0 || bucket >= buckets){throw new ArgumentException("Bucket outside of the allowed range [0, " + buckets + "): " + bucket);}if (scratch.Bytes.Length < utf8.Length + 1){scratch.Grow(utf8.Length + 10);}scratch.Length = 1;scratch.Bytes[0] = (byte)bucket;scrat... | train | false |
959 | public DescribeWorkspaceBundlesResult describeWorkspaceBundles() {return describeWorkspaceBundles(new DescribeWorkspaceBundlesRequest());}
| [
"public",
"DescribeWorkspaceBundlesResult",
"describeWorkspaceBundles",
"(",
")",
"{",
"return",
"describeWorkspaceBundles",
"(",
"new",
"DescribeWorkspaceBundlesRequest",
"(",
")",
")",
";",
"}"
] | public virtual DescribeWorkspaceBundlesResponse DescribeWorkspaceBundles(){var request = new DescribeWorkspaceBundlesRequest();return DescribeWorkspaceBundles(request);}
| train | false |
960 | public static String decode(String s) {return decode(s, false, Charsets.UTF_8);}
| [
"public",
"static",
"String",
"decode",
"(",
"String",
"s",
")",
"{",
"return",
"decode",
"(",
"s",
",",
"false",
",",
"Charsets",
".",
"UTF_8",
")",
";",
"}"
] | public static string decode(string s){return decode(s, false, java.nio.charset.Charsets.UTF_8);}
| train | false |
961 | public void setExpire(Date expire) {this.expire = expire;expireAgeMillis = -1;}
| [
"public",
"void",
"setExpire",
"(",
"Date",
"expire",
")",
"{",
"this",
".",
"expire",
"=",
"expire",
";",
"expireAgeMillis",
"=",
"-",
"1",
";",
"}"
] | public virtual void SetExpire(DateTime expire){this.expire = expire;expireAgeMillis = -1;}
| train | false |
962 | public int DecRef() {assert count > 0: Thread.currentThread().getName() + ": RefCount is 0 pre-decrement for file \"" + fileName + "\"";return --count;}
| [
"public",
"int",
"DecRef",
"(",
")",
"{",
"assert",
"count",
">",
"0",
":",
"Thread",
".",
"currentThread",
"(",
")",
".",
"getName",
"(",
")",
"+",
"\": RefCount is 0 pre-decrement for file \\\"\"",
"+",
"fileName",
"+",
"\"\\\"\"",
";",
"return",
"--",
"co... | public int DecRef(){Debug.Assert(count > 0, Thread.CurrentThread.Name + ": RefCount is 0 pre-decrement for file \"" + fileName + "\"");return --count;}
| train | false |
963 | public List<WeightedFragInfo> getWeightedFragInfoList( List<WeightedFragInfo> src ) {return src;}
| [
"public",
"List",
"<",
"WeightedFragInfo",
">",
"getWeightedFragInfoList",
"(",
"List",
"<",
"WeightedFragInfo",
">",
"src",
")",
"{",
"return",
"src",
";",
"}"
] | public override IList<WeightedFragInfo> GetWeightedFragInfoList(IList<WeightedFragInfo> src){return src;}
| train | false |
964 | public CreateInstancesFromSnapshotResult createInstancesFromSnapshot(CreateInstancesFromSnapshotRequest request) {request = beforeClientExecution(request);return executeCreateInstancesFromSnapshot(request);}
| [
"public",
"CreateInstancesFromSnapshotResult",
"createInstancesFromSnapshot",
"(",
"CreateInstancesFromSnapshotRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCreateInstancesFromSnapshot",
"(",
"request",
")",
... | public virtual CreateInstancesFromSnapshotResponse CreateInstancesFromSnapshot(CreateInstancesFromSnapshotRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateInstancesFromSnapshotRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateInstancesFromSnapshotResponseUnmarshaller.In... | train | true |
965 | public Comparator<? super E> comparator() {return backingMap.comparator();}
| [
"public",
"Comparator",
"<",
"?",
"super",
"E",
">",
"comparator",
"(",
")",
"{",
"return",
"backingMap",
".",
"comparator",
"(",
")",
";",
"}"
] | public virtual java.util.Comparator<E> comparator(){return backingMap.comparator();}
| train | false |
966 | public boolean isValueSecure() {return valueSecure;}
| [
"public",
"boolean",
"isValueSecure",
"(",
")",
"{",
"return",
"valueSecure",
";",
"}"
] | public virtual bool IsValueSecure(){return valueSecure;}
| train | false |
967 | public static short[] grow(short[] array, int minSize) {assert minSize >= 0: "size must be positive (got " + minSize + "): likely integer overflow?";if (array.length < minSize) {return growExact(array, oversize(minSize, Short.BYTES));} else return array;}
| [
"public",
"static",
"short",
"[",
"]",
"grow",
"(",
"short",
"[",
"]",
"array",
",",
"int",
"minSize",
")",
"{",
"assert",
"minSize",
">=",
"0",
":",
"\"size must be positive (got \"",
"+",
"minSize",
"+",
"\"): likely integer overflow?\"",
";",
"if",
"(",
"... | public static short[] Grow(short[] array, int minSize){Debug.Assert(minSize >= 0, "size must be positive (got " + minSize + "): likely integer overflow?");if (array.Length < minSize){short[] newArray = new short[Oversize(minSize, RamUsageEstimator.NUM_BYTES_INT16)];Array.Copy(array, 0, newArray, 0, array.Length);return... | train | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.