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 |
|---|---|---|---|---|---|
3,095
|
public UpdateAvailabilityOptionsResult updateAvailabilityOptions(UpdateAvailabilityOptionsRequest request) {request = beforeClientExecution(request);return executeUpdateAvailabilityOptions(request);}
|
[
"public",
"UpdateAvailabilityOptionsResult",
"updateAvailabilityOptions",
"(",
"UpdateAvailabilityOptionsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateAvailabilityOptions",
"(",
"request",
")",
";",
"}"
] |
public virtual UpdateAvailabilityOptionsResponse UpdateAvailabilityOptions(UpdateAvailabilityOptionsRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateAvailabilityOptionsRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateAvailabilityOptionsResponseUnmarshaller.Instance;return Invoke<UpdateAvailabilityOptionsResponse>(request, options);}
|
train
| true
|
3,096
|
public AddInstanceFleetResult addInstanceFleet(AddInstanceFleetRequest request) {request = beforeClientExecution(request);return executeAddInstanceFleet(request);}
|
[
"public",
"AddInstanceFleetResult",
"addInstanceFleet",
"(",
"AddInstanceFleetRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeAddInstanceFleet",
"(",
"request",
")",
";",
"}"
] |
public virtual AddInstanceFleetResponse AddInstanceFleet(AddInstanceFleetRequest request){var options = new InvokeOptions();options.RequestMarshaller = AddInstanceFleetRequestMarshaller.Instance;options.ResponseUnmarshaller = AddInstanceFleetResponseUnmarshaller.Instance;return Invoke<AddInstanceFleetResponse>(request, options);}
|
train
| true
|
3,097
|
public synchronized void setMax(int max) {super.setMax(max);if ((mKeyProgressIncrement == 0) || (getMax() / mKeyProgressIncrement > 20)) {setKeyProgressIncrement(Math.max(1, Math.round((float) getMax() / 20)));}}
|
[
"public",
"synchronized",
"void",
"setMax",
"(",
"int",
"max",
")",
"{",
"super",
".",
"setMax",
"(",
"max",
")",
";",
"if",
"(",
"(",
"mKeyProgressIncrement",
"==",
"0",
")",
"||",
"(",
"getMax",
"(",
")",
"/",
"mKeyProgressIncrement",
">",
"20",
")",
")",
"{",
"setKeyProgressIncrement",
"(",
"Math",
".",
"max",
"(",
"1",
",",
"Math",
".",
"round",
"(",
"(",
"float",
")",
"getMax",
"(",
")",
"/",
"20",
")",
")",
")",
";",
"}",
"}"
] |
public override void setMax(int max){lock (this){base.setMax(max);if ((mKeyProgressIncrement == 0) || (getMax() / mKeyProgressIncrement > 20)){setKeyProgressIncrement(System.Math.Max(1, Sharpen.Util.Round((float)getMax() / 20)));}}}
|
train
| true
|
3,098
|
public LazyAreaEval getRow(int rowIndex) {if (rowIndex >= getHeight()) {throw new IllegalArgumentException("Invalid rowIndex " + rowIndex+ ". Allowable range is (0.." + getHeight() + ").");}int absRowIx = getFirstRow() + rowIndex;return new LazyAreaEval(absRowIx, getFirstColumn(), absRowIx, getLastColumn(), _evaluator);}
|
[
"public",
"LazyAreaEval",
"getRow",
"(",
"int",
"rowIndex",
")",
"{",
"if",
"(",
"rowIndex",
">=",
"getHeight",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Invalid rowIndex \"",
"+",
"rowIndex",
"+",
"\". Allowable range is (0..\"",
"+",
"getHeight",
"(",
")",
"+",
"\").\"",
")",
";",
"}",
"int",
"absRowIx",
"=",
"getFirstRow",
"(",
")",
"+",
"rowIndex",
";",
"return",
"new",
"LazyAreaEval",
"(",
"absRowIx",
",",
"getFirstColumn",
"(",
")",
",",
"absRowIx",
",",
"getLastColumn",
"(",
")",
",",
"_evaluator",
")",
";",
"}"
] |
public override TwoDEval GetRow(int rowIndex){if (rowIndex >= Height){throw new ArgumentException("Invalid rowIndex " + rowIndex+ ". Allowable range is (0.." + Height + ").");}int absRowIx = FirstRow + rowIndex;return new LazyAreaEval(absRowIx, FirstColumn, absRowIx, LastColumn, _evaluator);}
|
train
| false
|
3,099
|
public IntervalSet getExpectedTokens(int stateNumber, RuleContext context) {if (stateNumber < 0 || stateNumber >= states.size()) {throw new IllegalArgumentException("Invalid state number.");}RuleContext ctx = context;ATNState s = states.get(stateNumber);IntervalSet following = nextTokens(s);if (!following.contains(Token.EPSILON)) {return following;}IntervalSet expected = new IntervalSet();expected.addAll(following);expected.remove(Token.EPSILON);while (ctx != null && ctx.invokingState >= 0 && following.contains(Token.EPSILON)) {ATNState invokingState = states.get(ctx.invokingState);RuleTransition rt = (RuleTransition)invokingState.transition(0);following = nextTokens(rt.followState);expected.addAll(following);expected.remove(Token.EPSILON);ctx = ctx.parent;}if (following.contains(Token.EPSILON)) {expected.add(Token.EOF);}return expected;}
|
[
"public",
"IntervalSet",
"getExpectedTokens",
"(",
"int",
"stateNumber",
",",
"RuleContext",
"context",
")",
"{",
"if",
"(",
"stateNumber",
"<",
"0",
"||",
"stateNumber",
">=",
"states",
".",
"size",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Invalid state number.\"",
")",
";",
"}",
"RuleContext",
"ctx",
"=",
"context",
";",
"ATNState",
"s",
"=",
"states",
".",
"get",
"(",
"stateNumber",
")",
";",
"IntervalSet",
"following",
"=",
"nextTokens",
"(",
"s",
")",
";",
"if",
"(",
"!",
"following",
".",
"contains",
"(",
"Token",
".",
"EPSILON",
")",
")",
"{",
"return",
"following",
";",
"}",
"IntervalSet",
"expected",
"=",
"new",
"IntervalSet",
"(",
")",
";",
"expected",
".",
"addAll",
"(",
"following",
")",
";",
"expected",
".",
"remove",
"(",
"Token",
".",
"EPSILON",
")",
";",
"while",
"(",
"ctx",
"!=",
"null",
"&&",
"ctx",
".",
"invokingState",
">=",
"0",
"&&",
"following",
".",
"contains",
"(",
"Token",
".",
"EPSILON",
")",
")",
"{",
"ATNState",
"invokingState",
"=",
"states",
".",
"get",
"(",
"ctx",
".",
"invokingState",
")",
";",
"RuleTransition",
"rt",
"=",
"(",
"RuleTransition",
")",
"invokingState",
".",
"transition",
"(",
"0",
")",
";",
"following",
"=",
"nextTokens",
"(",
"rt",
".",
"followState",
")",
";",
"expected",
".",
"addAll",
"(",
"following",
")",
";",
"expected",
".",
"remove",
"(",
"Token",
".",
"EPSILON",
")",
";",
"ctx",
"=",
"ctx",
".",
"parent",
";",
"}",
"if",
"(",
"following",
".",
"contains",
"(",
"Token",
".",
"EPSILON",
")",
")",
"{",
"expected",
".",
"add",
"(",
"Token",
".",
"EOF",
")",
";",
"}",
"return",
"expected",
";",
"}"
] |
public virtual IntervalSet GetExpectedTokens(int stateNumber, RuleContext context){if (stateNumber < 0 || stateNumber >= states.Count){throw new ArgumentException("Invalid state number.");}RuleContext ctx = context;ATNState s = states[stateNumber];IntervalSet following = NextTokens(s);if (!following.Contains(TokenConstants.EPSILON)){return following;}IntervalSet expected = new IntervalSet();expected.AddAll(following);expected.Remove(TokenConstants.EPSILON);while (ctx != null && ctx.invokingState >= 0 && following.Contains(TokenConstants.EPSILON)){ATNState invokingState = states[ctx.invokingState];RuleTransition rt = (RuleTransition)invokingState.Transition(0);following = NextTokens(rt.followState);expected.AddAll(following);expected.Remove(TokenConstants.EPSILON);ctx = ctx.Parent;}if (following.Contains(TokenConstants.EPSILON)){expected.Add(TokenConstants.EOF);}return expected;}
|
train
| false
|
3,100
|
public UntagResourceResult untagResource(UntagResourceRequest request) {request = beforeClientExecution(request);return executeUntagResource(request);}
|
[
"public",
"UntagResourceResult",
"untagResource",
"(",
"UntagResourceRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUntagResource",
"(",
"request",
")",
";",
"}"
] |
public virtual UntagResourceResponse UntagResource(UntagResourceRequest request){var options = new InvokeOptions();options.RequestMarshaller = UntagResourceRequestMarshaller.Instance;options.ResponseUnmarshaller = UntagResourceResponseUnmarshaller.Instance;return Invoke<UntagResourceResponse>(request, options);}
|
train
| true
|
3,101
|
public String getInflectionForm(int wordId) {return null;}
|
[
"public",
"String",
"getInflectionForm",
"(",
"int",
"wordId",
")",
"{",
"return",
"null",
";",
"}"
] |
public override string GetInflectionForm(int wordId){return null;}
|
train
| false
|
3,102
|
public Ref3DPxg(int externalWorkbookNumber, SheetIdentifier sheetName, CellReference c) {super(c);this.externalWorkbookNumber = externalWorkbookNumber;this.firstSheetName = sheetName.getSheetIdentifier().getName();if (sheetName instanceof SheetRangeIdentifier) {this.lastSheetName = ((SheetRangeIdentifier)sheetName).getLastSheetIdentifier().getName();} else {this.lastSheetName = null;}}
|
[
"public",
"Ref3DPxg",
"(",
"int",
"externalWorkbookNumber",
",",
"SheetIdentifier",
"sheetName",
",",
"CellReference",
"c",
")",
"{",
"super",
"(",
"c",
")",
";",
"this",
".",
"externalWorkbookNumber",
"=",
"externalWorkbookNumber",
";",
"this",
".",
"firstSheetName",
"=",
"sheetName",
".",
"getSheetIdentifier",
"(",
")",
".",
"getName",
"(",
")",
";",
"if",
"(",
"sheetName",
"instanceof",
"SheetRangeIdentifier",
")",
"{",
"this",
".",
"lastSheetName",
"=",
"(",
"(",
"SheetRangeIdentifier",
")",
"sheetName",
")",
".",
"getLastSheetIdentifier",
"(",
")",
".",
"getName",
"(",
")",
";",
"}",
"else",
"{",
"this",
".",
"lastSheetName",
"=",
"null",
";",
"}",
"}"
] |
public Ref3DPxg(int externalWorkbookNumber, SheetIdentifier sheetName, CellReference c): base(c){this.externalWorkbookNumber = externalWorkbookNumber;this.firstSheetName = sheetName.SheetId.Name;if (sheetName is SheetRangeIdentifier){this.lastSheetName = ((SheetRangeIdentifier)sheetName).LastSheetIdentifier.Name;}else{this.lastSheetName = null;}}
|
train
| false
|
3,103
|
public ModifyJumpserverPasswordRequest() {super("HPC", "2016-06-03", "ModifyJumpserverPassword", "hpc");setMethod(MethodType.POST);}
|
[
"public",
"ModifyJumpserverPasswordRequest",
"(",
")",
"{",
"super",
"(",
"\"HPC\"",
",",
"\"2016-06-03\"",
",",
"\"ModifyJumpserverPassword\"",
",",
"\"hpc\"",
")",
";",
"setMethod",
"(",
"MethodType",
".",
"POST",
")",
";",
"}"
] |
public ModifyJumpserverPasswordRequest(): base("HPC", "2016-06-03", "ModifyJumpserverPassword"){Method = MethodType.POST;}
|
train
| false
|
3,104
|
public SearchLocalGatewayRoutesResult searchLocalGatewayRoutes(SearchLocalGatewayRoutesRequest request) {request = beforeClientExecution(request);return executeSearchLocalGatewayRoutes(request);}
|
[
"public",
"SearchLocalGatewayRoutesResult",
"searchLocalGatewayRoutes",
"(",
"SearchLocalGatewayRoutesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeSearchLocalGatewayRoutes",
"(",
"request",
")",
";",
"}"
] |
public virtual SearchLocalGatewayRoutesResponse SearchLocalGatewayRoutes(SearchLocalGatewayRoutesRequest request){var options = new InvokeOptions();options.RequestMarshaller = SearchLocalGatewayRoutesRequestMarshaller.Instance;options.ResponseUnmarshaller = SearchLocalGatewayRoutesResponseUnmarshaller.Instance;return Invoke<SearchLocalGatewayRoutesResponse>(request, options);}
|
train
| false
|
3,105
|
public void write(byte[] buffer) throws IOException {write(buffer, 0, buffer.length);}
|
[
"public",
"void",
"write",
"(",
"byte",
"[",
"]",
"buffer",
")",
"throws",
"IOException",
"{",
"write",
"(",
"buffer",
",",
"0",
",",
"buffer",
".",
"length",
")",
";",
"}"
] |
public virtual void write(byte[] buffer){throw new System.NotImplementedException();}
|
train
| false
|
3,106
|
public ExtendedPivotTableViewFieldsRecord(RecordInputStream in) {_grbit1 = in.readInt();_grbit2 = in.readUByte();_citmShow = in.readUByte();_isxdiSort = in.readUShort();_isxdiShow = in.readUShort();switch (in.remaining()) {case 0:_reserved1 = 0;_reserved2 = 0;_subtotalName = null;return;case 10:break;default:throw new RecordFormatException("Unexpected remaining size (" + in.remaining() + ")");}int cchSubName = in.readUShort();_reserved1 = in.readInt();_reserved2 = in.readInt();if (cchSubName != STRING_NOT_PRESENT_LEN) {_subtotalName = in.readUnicodeLEString(cchSubName);}}
|
[
"public",
"ExtendedPivotTableViewFieldsRecord",
"(",
"RecordInputStream",
"in",
")",
"{",
"_grbit1",
"=",
"in",
".",
"readInt",
"(",
")",
";",
"_grbit2",
"=",
"in",
".",
"readUByte",
"(",
")",
";",
"_citmShow",
"=",
"in",
".",
"readUByte",
"(",
")",
";",
"_isxdiSort",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"_isxdiShow",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"switch",
"(",
"in",
".",
"remaining",
"(",
")",
")",
"{",
"case",
"0",
":",
"_reserved1",
"=",
"0",
";",
"_reserved2",
"=",
"0",
";",
"_subtotalName",
"=",
"null",
";",
"return",
";",
"case",
"10",
":",
"break",
";",
"default",
":",
"throw",
"new",
"RecordFormatException",
"(",
"\"Unexpected remaining size (\"",
"+",
"in",
".",
"remaining",
"(",
")",
"+",
"\")\"",
")",
";",
"}",
"int",
"cchSubName",
"=",
"in",
".",
"readUShort",
"(",
")",
";",
"_reserved1",
"=",
"in",
".",
"readInt",
"(",
")",
";",
"_reserved2",
"=",
"in",
".",
"readInt",
"(",
")",
";",
"if",
"(",
"cchSubName",
"!=",
"STRING_NOT_PRESENT_LEN",
")",
"{",
"_subtotalName",
"=",
"in",
".",
"readUnicodeLEString",
"(",
"cchSubName",
")",
";",
"}",
"}"
] |
public ExtendedPivotTableViewFieldsRecord(RecordInputStream in1){grbit1 = in1.ReadInt();grbit2 = in1.ReadUByte();citmShow = in1.ReadUByte();isxdiSort = in1.ReadUShort();isxdiShow = in1.ReadUShort();switch (in1.Remaining) {case 0:reserved1 = 0;reserved2 = 0;subName = null;return;case 10:break;default:throw new RecordFormatException("Unexpected remaining size (" + in1.Remaining + ")");}int cchSubName = in1.ReadUShort();reserved1 = in1.ReadInt();reserved2 = in1.ReadInt();if (cchSubName != STRING_NOT_PRESENT_LEN){subName = in1.ReadUnicodeLEString(cchSubName);}}
|
train
| false
|
3,107
|
public static double cosh(double d) {double ePowX = Math.pow(Math.E, d);double ePowNegX = Math.pow(Math.E, -d);return (ePowX + ePowNegX) / 2;}
|
[
"public",
"static",
"double",
"cosh",
"(",
"double",
"d",
")",
"{",
"double",
"ePowX",
"=",
"Math",
".",
"pow",
"(",
"Math",
".",
"E",
",",
"d",
")",
";",
"double",
"ePowNegX",
"=",
"Math",
".",
"pow",
"(",
"Math",
".",
"E",
",",
"-",
"d",
")",
";",
"return",
"(",
"ePowX",
"+",
"ePowNegX",
")",
"/",
"2",
";",
"}"
] |
public static double Cosh(double d){double ePowX = Math.Pow(Math.E, d);double ePowNegX = Math.Pow(Math.E, -d);d = (ePowX + ePowNegX) / 2;return d;}
|
train
| false
|
3,108
|
public List<String> getDFAStrings() {synchronized (_interp.decisionToDFA) {List<String> s = new ArrayList<String>();for (int d = 0; d < _interp.decisionToDFA.length; d++) {DFA dfa = _interp.decisionToDFA[d];s.add( dfa.toString(getVocabulary()) );}return s;}}
|
[
"public",
"List",
"<",
"String",
">",
"getDFAStrings",
"(",
")",
"{",
"synchronized",
"(",
"_interp",
".",
"decisionToDFA",
")",
"{",
"List",
"<",
"String",
">",
"s",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"for",
"(",
"int",
"d",
"=",
"0",
";",
"d",
"<",
"_interp",
".",
"decisionToDFA",
".",
"length",
";",
"d",
"++",
")",
"{",
"DFA",
"dfa",
"=",
"_interp",
".",
"decisionToDFA",
"[",
"d",
"]",
";",
"s",
".",
"add",
"(",
"dfa",
".",
"toString",
"(",
"getVocabulary",
"(",
")",
")",
")",
";",
"}",
"return",
"s",
";",
"}",
"}"
] |
public virtual IList<string> GetDFAStrings(){IList<string> s = new List<string>();for (int d = 0; d < Interpreter.atn.decisionToDFA.Length; d++){DFA dfa = Interpreter.atn.decisionToDFA[d];s.Add(dfa.ToString(Vocabulary));}return s;}
|
train
| false
|
3,109
|
public LexerChannelAction(int channel) {this.channel = channel;}
|
[
"public",
"LexerChannelAction",
"(",
"int",
"channel",
")",
"{",
"this",
".",
"channel",
"=",
"channel",
";",
"}"
] |
public LexerChannelAction(int channel){this.channel = channel;}
|
train
| false
|
3,110
|
public MappingCharFilter(NormalizeCharMap normMap, Reader in) {super(in);buffer.reset(in);map = normMap.map;cachedRootArcs = normMap.cachedRootArcs;if (map != null) {fstReader = map.getBytesReader();} else {fstReader = null;}}
|
[
"public",
"MappingCharFilter",
"(",
"NormalizeCharMap",
"normMap",
",",
"Reader",
"in",
")",
"{",
"super",
"(",
"in",
")",
";",
"buffer",
".",
"reset",
"(",
"in",
")",
";",
"map",
"=",
"normMap",
".",
"map",
";",
"cachedRootArcs",
"=",
"normMap",
".",
"cachedRootArcs",
";",
"if",
"(",
"map",
"!=",
"null",
")",
"{",
"fstReader",
"=",
"map",
".",
"getBytesReader",
"(",
")",
";",
"}",
"else",
"{",
"fstReader",
"=",
"null",
";",
"}",
"}"
] |
public MappingCharFilter(NormalizeCharMap normMap, TextReader @in): base(@in){_input = GetBufferedReader(@in);_input.Mark(BufferedCharFilter.DEFAULT_CHAR_BUFFER_SIZE);buffer.Reset(_input);map = normMap.map;cachedRootArcs = normMap.cachedRootArcs;if (map != null){fstReader = map.GetBytesReader();}else{fstReader = null;}}
|
train
| false
|
3,111
|
public String toString() {String newline = System.getProperty("line.separator");StringBuilder sb = new StringBuilder();sb.append(sequence.toString());sb.append(newline);return sb.toString();}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"String",
"newline",
"=",
"System",
".",
"getProperty",
"(",
"\"line.separator\"",
")",
";",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"sb",
".",
"append",
"(",
"sequence",
".",
"toString",
"(",
")",
")",
";",
"sb",
".",
"append",
"(",
"newline",
")",
";",
"return",
"sb",
".",
"toString",
"(",
")",
";",
"}"
] |
public override string ToString(){string newline = Environment.NewLine;StringBuilder sb = new StringBuilder();sb.Append(sequence.ToString());sb.Append(newline);return sb.ToString();}
|
train
| false
|
3,112
|
public void visitContainedRecords(RecordVisitor rv) {for (CFRecordsAggregate subAgg : _cfHeaders) {subAgg.visitContainedRecords(rv);}}
|
[
"public",
"void",
"visitContainedRecords",
"(",
"RecordVisitor",
"rv",
")",
"{",
"for",
"(",
"CFRecordsAggregate",
"subAgg",
":",
"_cfHeaders",
")",
"{",
"subAgg",
".",
"visitContainedRecords",
"(",
"rv",
")",
";",
"}",
"}"
] |
public override void VisitContainedRecords(RecordVisitor rv){for (int i = 0; i < _cfHeaders.Count; i++){CFRecordsAggregate subAgg = (CFRecordsAggregate)_cfHeaders[i];subAgg.VisitContainedRecords(rv);}}
|
train
| false
|
3,114
|
public String getString(){return getString(field_2_bytes, codepage);}
|
[
"public",
"String",
"getString",
"(",
")",
"{",
"return",
"getString",
"(",
"field_2_bytes",
",",
"codepage",
")",
";",
"}"
] |
public String GetString(){return GetString(field_2_bytes, codepage);}
|
train
| false
|
3,115
|
public SimpleDate(Calendar cal) {year = cal.get(Calendar.YEAR);month = cal.get(Calendar.MONTH) + 1;day = cal.get(Calendar.DAY_OF_MONTH);tsMilliseconds = cal.getTimeInMillis();}
|
[
"public",
"SimpleDate",
"(",
"Calendar",
"cal",
")",
"{",
"year",
"=",
"cal",
".",
"get",
"(",
"Calendar",
".",
"YEAR",
")",
";",
"month",
"=",
"cal",
".",
"get",
"(",
"Calendar",
".",
"MONTH",
")",
"+",
"1",
";",
"day",
"=",
"cal",
".",
"get",
"(",
"Calendar",
".",
"DAY_OF_MONTH",
")",
";",
"tsMilliseconds",
"=",
"cal",
".",
"getTimeInMillis",
"(",
")",
";",
"}"
] |
public SimpleDate(DateTime date){year = date.Year;month = date.Month;day = date.Day;ticks = date.Ticks;}
|
train
| false
|
3,116
|
public TreeFilter clone() {throw new IllegalStateException("Do not clone this kind of filter: " + getClass().getName());}
|
[
"public",
"TreeFilter",
"clone",
"(",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"Do not clone this kind of filter: \"",
"+",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
")",
";",
"}"
] |
public override TreeFilter Clone(){throw new InvalidOperationException("Do not clone this kind of filter: " + GetType().FullName);}
|
train
| false
|
3,117
|
public String getText(Interval interval) {int start = interval.a;int stop = interval.b;if ( start<0 || stop<0 ) return "";fill();if ( stop>=tokens.size() ) stop = tokens.size()-1;StringBuilder buf = new StringBuilder();for (int i = start; i <= stop; i++) {Token t = tokens.get(i);if ( t.getType()==Token.EOF ) break;buf.append(t.getText());}return buf.toString();}
|
[
"public",
"String",
"getText",
"(",
"Interval",
"interval",
")",
"{",
"int",
"start",
"=",
"interval",
".",
"a",
";",
"int",
"stop",
"=",
"interval",
".",
"b",
";",
"if",
"(",
"start",
"<",
"0",
"||",
"stop",
"<",
"0",
")",
"return",
"\"\"",
";",
"fill",
"(",
")",
";",
"if",
"(",
"stop",
">=",
"tokens",
".",
"size",
"(",
")",
")",
"stop",
"=",
"tokens",
".",
"size",
"(",
")",
"-",
"1",
";",
"StringBuilder",
"buf",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"start",
";",
"i",
"<=",
"stop",
";",
"i",
"++",
")",
"{",
"Token",
"t",
"=",
"tokens",
".",
"get",
"(",
"i",
")",
";",
"if",
"(",
"t",
".",
"getType",
"(",
")",
"==",
"Token",
".",
"EOF",
")",
"break",
";",
"buf",
".",
"append",
"(",
"t",
".",
"getText",
"(",
")",
")",
";",
"}",
"return",
"buf",
".",
"toString",
"(",
")",
";",
"}"
] |
public virtual string GetText(Interval interval){int start = interval.a;int stop = interval.b;if (start < 0 || stop < 0){return string.Empty;}LazyInit();if (stop >= tokens.Count){stop = tokens.Count - 1;}StringBuilder buf = new StringBuilder();for (int i = start; i <= stop; i++){IToken t = tokens[i];if (t.Type == TokenConstants.EOF){break;}buf.Append(t.Text);}return buf.ToString();}
|
train
| false
|
3,118
|
public CancelStepsResult cancelSteps(CancelStepsRequest request) {request = beforeClientExecution(request);return executeCancelSteps(request);}
|
[
"public",
"CancelStepsResult",
"cancelSteps",
"(",
"CancelStepsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCancelSteps",
"(",
"request",
")",
";",
"}"
] |
public virtual CancelStepsResponse CancelSteps(CancelStepsRequest request){var options = new InvokeOptions();options.RequestMarshaller = CancelStepsRequestMarshaller.Instance;options.ResponseUnmarshaller = CancelStepsResponseUnmarshaller.Instance;return Invoke<CancelStepsResponse>(request, options);}
|
train
| true
|
3,119
|
public long ramBytesUsed() {return 0;}
|
[
"public",
"long",
"ramBytesUsed",
"(",
")",
"{",
"return",
"0",
";",
"}"
] |
public override long RamBytesUsed(){return 0;}
|
train
| false
|
3,121
|
public synchronized int codePointBefore(int index) {return super.codePointBefore(index);}
|
[
"public",
"synchronized",
"int",
"codePointBefore",
"(",
"int",
"index",
")",
"{",
"return",
"super",
".",
"codePointBefore",
"(",
"index",
")",
";",
"}"
] |
public override int codePointBefore(int index){lock (this){return base.codePointBefore(index);}}
|
train
| false
|
3,122
|
public DeleteApplicationRequest(String applicationName) {setApplicationName(applicationName);}
|
[
"public",
"DeleteApplicationRequest",
"(",
"String",
"applicationName",
")",
"{",
"setApplicationName",
"(",
"applicationName",
")",
";",
"}"
] |
public DeleteApplicationRequest(string applicationName){_applicationName = applicationName;}
|
train
| false
|
3,123
|
public LazyDocument(IndexReader reader, int docID) {this.reader = reader;this.docID = docID;}
|
[
"public",
"LazyDocument",
"(",
"IndexReader",
"reader",
",",
"int",
"docID",
")",
"{",
"this",
".",
"reader",
"=",
"reader",
";",
"this",
".",
"docID",
"=",
"docID",
";",
"}"
] |
public LazyDocument(IndexReader reader, int docID){this.reader = reader;this.docID = docID;}
|
train
| false
|
3,124
|
public static int trimLeadingWhitespace(byte[] raw, int start, int end) {while (start < end && isWhitespace(raw[start]))start++;return start;}
|
[
"public",
"static",
"int",
"trimLeadingWhitespace",
"(",
"byte",
"[",
"]",
"raw",
",",
"int",
"start",
",",
"int",
"end",
")",
"{",
"while",
"(",
"start",
"<",
"end",
"&&",
"isWhitespace",
"(",
"raw",
"[",
"start",
"]",
")",
")",
"start",
"++",
";",
"return",
"start",
";",
"}"
] |
public static int TrimLeadingWhitespace(byte[] raw, int start, int end){while (start < end && IsWhitespace(raw[start])){start++;}return start;}
|
train
| false
|
3,125
|
public int[] getMap() {return map;}
|
[
"public",
"int",
"[",
"]",
"getMap",
"(",
")",
"{",
"return",
"map",
";",
"}"
] |
public int[] GetMap(){return (int[])map.Clone(); }
|
train
| false
|
3,126
|
public void set(E object) {iterator.set(object);}
|
[
"public",
"void",
"set",
"(",
"E",
"object",
")",
"{",
"iterator",
".",
"set",
"(",
"object",
")",
";",
"}"
] |
public void set(E @object){iterator.set(@object);}
|
train
| false
|
3,127
|
public ModifyCurrentDBClusterCapacityResult modifyCurrentDBClusterCapacity(ModifyCurrentDBClusterCapacityRequest request) {request = beforeClientExecution(request);return executeModifyCurrentDBClusterCapacity(request);}
|
[
"public",
"ModifyCurrentDBClusterCapacityResult",
"modifyCurrentDBClusterCapacity",
"(",
"ModifyCurrentDBClusterCapacityRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeModifyCurrentDBClusterCapacity",
"(",
"request",
")",
";",
"}"
] |
public virtual ModifyCurrentDBClusterCapacityResponse ModifyCurrentDBClusterCapacity(ModifyCurrentDBClusterCapacityRequest request){var options = new InvokeOptions();options.RequestMarshaller = ModifyCurrentDBClusterCapacityRequestMarshaller.Instance;options.ResponseUnmarshaller = ModifyCurrentDBClusterCapacityResponseUnmarshaller.Instance;return Invoke<ModifyCurrentDBClusterCapacityResponse>(request, options);}
|
train
| true
|
3,128
|
public CancelRepoBuildRequest() {super("cr", "2016-06-07", "CancelRepoBuild", "cr");setUriPattern("/repos/[RepoNamespace]/[RepoName]/build/[BuildId]/cancel");setMethod(MethodType.POST);}
|
[
"public",
"CancelRepoBuildRequest",
"(",
")",
"{",
"super",
"(",
"\"cr\"",
",",
"\"2016-06-07\"",
",",
"\"CancelRepoBuild\"",
",",
"\"cr\"",
")",
";",
"setUriPattern",
"(",
"\"/repos/[RepoNamespace]/[RepoName]/build/[BuildId]/cancel\"",
")",
";",
"setMethod",
"(",
"MethodType",
".",
"POST",
")",
";",
"}"
] |
public CancelRepoBuildRequest(): base("cr", "2016-06-07", "CancelRepoBuild", "cr", "openAPI"){UriPattern = "/repos/[RepoNamespace]/[RepoName]/build/[BuildId]/cancel";Method = MethodType.POST;}
|
train
| false
|
3,129
|
public LongBuffer get(long[] dst, int dstOffset, int longCount) {Arrays.checkOffsetAndCount(dst.length, dstOffset, longCount);if (longCount > remaining()) {throw new BufferUnderflowException();}for (int i = dstOffset; i < dstOffset + longCount; ++i) {dst[i] = get();}return this;}
|
[
"public",
"LongBuffer",
"get",
"(",
"long",
"[",
"]",
"dst",
",",
"int",
"dstOffset",
",",
"int",
"longCount",
")",
"{",
"Arrays",
".",
"checkOffsetAndCount",
"(",
"dst",
".",
"length",
",",
"dstOffset",
",",
"longCount",
")",
";",
"if",
"(",
"longCount",
">",
"remaining",
"(",
")",
")",
"{",
"throw",
"new",
"BufferUnderflowException",
"(",
")",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"dstOffset",
";",
"i",
"<",
"dstOffset",
"+",
"longCount",
";",
"++",
"i",
")",
"{",
"dst",
"[",
"i",
"]",
"=",
"get",
"(",
")",
";",
"}",
"return",
"this",
";",
"}"
] |
public virtual java.nio.LongBuffer get(long[] dst, int dstOffset, int longCount){java.util.Arrays.checkOffsetAndCount(dst.Length, dstOffset, longCount);if (longCount > remaining()){throw new java.nio.BufferUnderflowException();}{for (int i = dstOffset; i < dstOffset + longCount; ++i){dst[i] = get();}}return this;}
|
train
| false
|
3,130
|
public SpreadsheetVersion getSpreadsheetVersion(){return SpreadsheetVersion.EXCEL97;}
|
[
"public",
"SpreadsheetVersion",
"getSpreadsheetVersion",
"(",
")",
"{",
"return",
"SpreadsheetVersion",
".",
"EXCEL97",
";",
"}"
] |
public SpreadsheetVersion GetSpreadsheetVersion(){return SpreadsheetVersion.EXCEL97;}
|
train
| false
|
3,131
|
public boolean equals(Object obj) {if (obj instanceof Point) {Point rhs = (Point) obj;return this.x == rhs.x && this.y == rhs.y;}return false;}
|
[
"public",
"boolean",
"equals",
"(",
"Object",
"obj",
")",
"{",
"if",
"(",
"obj",
"instanceof",
"Point",
")",
"{",
"Point",
"rhs",
"=",
"(",
"Point",
")",
"obj",
";",
"return",
"this",
".",
"x",
"==",
"rhs",
".",
"x",
"&&",
"this",
".",
"y",
"==",
"rhs",
".",
"y",
";",
"}",
"return",
"false",
";",
"}"
] |
public override bool Equals(object o){if (o is android.graphics.Point){android.graphics.Point p = (android.graphics.Point)o;return this.x == p.x && this.y == p.y;}return false;}
|
train
| false
|
3,132
|
public int numNodes() {return numNodes(rootNode);}
|
[
"public",
"int",
"numNodes",
"(",
")",
"{",
"return",
"numNodes",
"(",
"rootNode",
")",
";",
"}"
] |
public virtual int NumNodes(){return NumNodes(rootNode);}
|
train
| false
|
3,133
|
public String toString() {return super.toString() + flags;}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"super",
".",
"toString",
"(",
")",
"+",
"flags",
";",
"}"
] |
public override string ToString(){return base.ToString() + flags;}
|
train
| false
|
3,134
|
public EnglishPossessiveFilterFactory(Map<String,String> args) {super(args);if (!args.isEmpty()) {throw new IllegalArgumentException("Unknown parameters: " + args);}}
|
[
"public",
"EnglishPossessiveFilterFactory",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"args",
")",
"{",
"super",
"(",
"args",
")",
";",
"if",
"(",
"!",
"args",
".",
"isEmpty",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Unknown parameters: \"",
"+",
"args",
")",
";",
"}",
"}"
] |
public EnglishPossessiveFilterFactory(IDictionary<string, string> args) : base(args){AssureMatchVersion();if (args.Count > 0){throw new System.ArgumentException("Unknown parameters: " + args);}}
|
train
| false
|
3,135
|
public static double atanh(double d) {return Math.log((1 + d)/(1 - d)) / 2;}
|
[
"public",
"static",
"double",
"atanh",
"(",
"double",
"d",
")",
"{",
"return",
"Math",
".",
"log",
"(",
"(",
"1",
"+",
"d",
")",
"/",
"(",
"1",
"-",
"d",
")",
")",
"/",
"2",
";",
"}"
] |
public static double Atanh(double d){return Math.Log((1 + d) / (1 - d)) / 2;}
|
train
| false
|
3,136
|
public WindowsIndexInput clone() {WindowsIndexInput clone = (WindowsIndexInput)super.clone();clone.isClone = true;return clone;}
|
[
"public",
"WindowsIndexInput",
"clone",
"(",
")",
"{",
"WindowsIndexInput",
"clone",
"=",
"(",
"WindowsIndexInput",
")",
"super",
".",
"clone",
"(",
")",
";",
"clone",
".",
"isClone",
"=",
"true",
";",
"return",
"clone",
";",
"}"
] |
public override WindowsIndexInput clone(){WindowsIndexInput clone = (WindowsIndexInput)base.clone();clone.isClone = true;return clone;}
|
train
| false
|
3,138
|
public long getTotalATNLookaheadOps() {DecisionInfo[] decisions = atnSimulator.getDecisionInfo();long k = 0;for (int i = 0; i < decisions.length; i++) {k += decisions[i].SLL_ATNTransitions;k += decisions[i].LL_ATNTransitions;}return k;}
|
[
"public",
"long",
"getTotalATNLookaheadOps",
"(",
")",
"{",
"DecisionInfo",
"[",
"]",
"decisions",
"=",
"atnSimulator",
".",
"getDecisionInfo",
"(",
")",
";",
"long",
"k",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"decisions",
".",
"length",
";",
"i",
"++",
")",
"{",
"k",
"+=",
"decisions",
"[",
"i",
"]",
".",
"SLL_ATNTransitions",
";",
"k",
"+=",
"decisions",
"[",
"i",
"]",
".",
"LL_ATNTransitions",
";",
"}",
"return",
"k",
";",
"}"
] |
public long getTotalATNLookaheadOps(){DecisionInfo[] decisions = atnSimulator.getDecisionInfo();long k = 0;for (int i = 0; i < decisions.Length; i++){k += decisions[i].SLL_ATNTransitions;k += decisions[i].LL_ATNTransitions;}return k;}
|
train
| false
|
3,139
|
public synchronized StringBuffer reverse() {reverse0();return this;}
|
[
"public",
"synchronized",
"StringBuffer",
"reverse",
"(",
")",
"{",
"reverse0",
"(",
")",
";",
"return",
"this",
";",
"}"
] |
public java.lang.StringBuffer reverse(){lock (this){reverse0();return this;}}
|
train
| false
|
3,140
|
public DescribeLoadBalancersRequest(java.util.List<String> loadBalancerNames) {setLoadBalancerNames(loadBalancerNames);}
|
[
"public",
"DescribeLoadBalancersRequest",
"(",
"java",
".",
"util",
".",
"List",
"<",
"String",
">",
"loadBalancerNames",
")",
"{",
"setLoadBalancerNames",
"(",
"loadBalancerNames",
")",
";",
"}"
] |
public DescribeLoadBalancersRequest(List<string> loadBalancerNames){_loadBalancerNames = loadBalancerNames;}
|
train
| false
|
3,141
|
public String toString() {return '~'+super.toString();}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"'~'",
"+",
"super",
".",
"toString",
"(",
")",
";",
"}"
] |
public override string ToString(){return '~' + base.ToString();}
|
train
| false
|
3,142
|
public static ISignatureComposer getComposer() {if (null == composer) {composer = new RoaSignatureComposer();}return composer;}
|
[
"public",
"static",
"ISignatureComposer",
"getComposer",
"(",
")",
"{",
"if",
"(",
"null",
"==",
"composer",
")",
"{",
"composer",
"=",
"new",
"RoaSignatureComposer",
"(",
")",
";",
"}",
"return",
"composer",
";",
"}"
] |
public static ISignatureComposer GetComposer(){if (null == composer){composer = new RoaSignatureComposer();}return composer;}
|
train
| false
|
3,143
|
public boolean ready() throws IOException {synchronized (lock) {if (buf == null) {throw new IOException("Reader is closed");}return (buf.length - pos > 0 || in.ready());}}
|
[
"public",
"boolean",
"ready",
"(",
")",
"throws",
"IOException",
"{",
"synchronized",
"(",
"lock",
")",
"{",
"if",
"(",
"buf",
"==",
"null",
")",
"{",
"throw",
"new",
"IOException",
"(",
"\"Reader is closed\"",
")",
";",
"}",
"return",
"(",
"buf",
".",
"length",
"-",
"pos",
">",
"0",
"||",
"in",
".",
"ready",
"(",
")",
")",
";",
"}",
"}"
] |
public override bool ready(){lock (@lock){if (buf == null){throw new System.IO.IOException("Reader is closed");}return (buf.Length - pos > 0 || @in.ready());}}
|
train
| false
|
3,144
|
public GetClientCertificatesResult getClientCertificates(GetClientCertificatesRequest request) {request = beforeClientExecution(request);return executeGetClientCertificates(request);}
|
[
"public",
"GetClientCertificatesResult",
"getClientCertificates",
"(",
"GetClientCertificatesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetClientCertificates",
"(",
"request",
")",
";",
"}"
] |
public virtual GetClientCertificatesResponse GetClientCertificates(GetClientCertificatesRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetClientCertificatesRequestMarshaller.Instance;options.ResponseUnmarshaller = GetClientCertificatesResponseUnmarshaller.Instance;return Invoke<GetClientCertificatesResponse>(request, options);}
|
train
| true
|
3,145
|
public static final int tagger(byte[] b, int ptr) {final int sz = b.length;if (ptr == 0)ptr += 48; while (ptr < sz) {if (b[ptr] == '\n')return -1;final int m = match(b, ptr, tagger);if (m >= 0)return m;ptr = nextLF(b, ptr);}return -1;}
|
[
"public",
"static",
"final",
"int",
"tagger",
"(",
"byte",
"[",
"]",
"b",
",",
"int",
"ptr",
")",
"{",
"final",
"int",
"sz",
"=",
"b",
".",
"length",
";",
"if",
"(",
"ptr",
"==",
"0",
")",
"ptr",
"+=",
"48",
";",
"while",
"(",
"ptr",
"<",
"sz",
")",
"{",
"if",
"(",
"b",
"[",
"ptr",
"]",
"==",
"'\\n'",
")",
"return",
"-",
"1",
";",
"final",
"int",
"m",
"=",
"match",
"(",
"b",
",",
"ptr",
",",
"tagger",
")",
";",
"if",
"(",
"m",
">=",
"0",
")",
"return",
"m",
";",
"ptr",
"=",
"nextLF",
"(",
"b",
",",
"ptr",
")",
";",
"}",
"return",
"-",
"1",
";",
"}"
] |
public static int Tagger(byte[] b, int ptr){int sz = b.Length;if (ptr == 0){ptr += 48;}while (ptr < sz){if (b[ptr] == '\n'){return -1;}int m = Match(b, ptr, ObjectChecker.tagger);if (m >= 0){return m;}ptr = NextLF(b, ptr);}return -1;}
|
train
| false
|
3,146
|
public GetInstanceStateResult getInstanceState(GetInstanceStateRequest request) {request = beforeClientExecution(request);return executeGetInstanceState(request);}
|
[
"public",
"GetInstanceStateResult",
"getInstanceState",
"(",
"GetInstanceStateRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGetInstanceState",
"(",
"request",
")",
";",
"}"
] |
public virtual GetInstanceStateResponse GetInstanceState(GetInstanceStateRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetInstanceStateRequestMarshaller.Instance;options.ResponseUnmarshaller = GetInstanceStateResponseUnmarshaller.Instance;return Invoke<GetInstanceStateResponse>(request, options);}
|
train
| true
|
3,147
|
public boolean isEmpty() {synchronized (mutex) {return delegate().isEmpty();}}
|
[
"public",
"boolean",
"isEmpty",
"(",
")",
"{",
"synchronized",
"(",
"mutex",
")",
"{",
"return",
"delegate",
"(",
")",
".",
"isEmpty",
"(",
")",
";",
"}",
"}"
] |
public virtual bool isEmpty(){lock (mutex){return c.isEmpty();}}
|
train
| false
|
3,148
|
public long getCount() {return cnt;}
|
[
"public",
"long",
"getCount",
"(",
")",
"{",
"return",
"cnt",
";",
"}"
] |
public virtual long GetCount(){return cnt;}
|
train
| false
|
3,149
|
public DeleteConfigurationSetEventDestinationResult deleteConfigurationSetEventDestination(DeleteConfigurationSetEventDestinationRequest request) {request = beforeClientExecution(request);return executeDeleteConfigurationSetEventDestination(request);}
|
[
"public",
"DeleteConfigurationSetEventDestinationResult",
"deleteConfigurationSetEventDestination",
"(",
"DeleteConfigurationSetEventDestinationRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteConfigurationSetEventDestination",
"(",
"request",
")",
";",
"}"
] |
public virtual DeleteConfigurationSetEventDestinationResponse DeleteConfigurationSetEventDestination(DeleteConfigurationSetEventDestinationRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteConfigurationSetEventDestinationRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteConfigurationSetEventDestinationResponseUnmarshaller.Instance;return Invoke<DeleteConfigurationSetEventDestinationResponse>(request, options);}
|
train
| true
|
3,150
|
public DeleteNetworkInterfacePermissionResult deleteNetworkInterfacePermission(DeleteNetworkInterfacePermissionRequest request) {request = beforeClientExecution(request);return executeDeleteNetworkInterfacePermission(request);}
|
[
"public",
"DeleteNetworkInterfacePermissionResult",
"deleteNetworkInterfacePermission",
"(",
"DeleteNetworkInterfacePermissionRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteNetworkInterfacePermission",
"(",
"request",
")",
";",
"}"
] |
public virtual DeleteNetworkInterfacePermissionResponse DeleteNetworkInterfacePermission(DeleteNetworkInterfacePermissionRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteNetworkInterfacePermissionRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteNetworkInterfacePermissionResponseUnmarshaller.Instance;return Invoke<DeleteNetworkInterfacePermissionResponse>(request, options);}
|
train
| true
|
3,151
|
public Tag(String key, String value) {this.key = key;this.value = value;}
|
[
"public",
"Tag",
"(",
"String",
"key",
",",
"String",
"value",
")",
"{",
"this",
".",
"key",
"=",
"key",
";",
"this",
".",
"value",
"=",
"value",
";",
"}"
] |
public Tag(string key, string value){_key = key;_value = value;}
|
train
| false
|
3,152
|
public CreateTrafficMirrorTargetResult createTrafficMirrorTarget(CreateTrafficMirrorTargetRequest request) {request = beforeClientExecution(request);return executeCreateTrafficMirrorTarget(request);}
|
[
"public",
"CreateTrafficMirrorTargetResult",
"createTrafficMirrorTarget",
"(",
"CreateTrafficMirrorTargetRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCreateTrafficMirrorTarget",
"(",
"request",
")",
";",
"}"
] |
public virtual CreateTrafficMirrorTargetResponse CreateTrafficMirrorTarget(CreateTrafficMirrorTargetRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateTrafficMirrorTargetRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateTrafficMirrorTargetResponseUnmarshaller.Instance;return Invoke<CreateTrafficMirrorTargetResponse>(request, options);}
|
train
| false
|
3,153
|
public GetGroupPolicyRequest(String groupName, String policyName) {setGroupName(groupName);setPolicyName(policyName);}
|
[
"public",
"GetGroupPolicyRequest",
"(",
"String",
"groupName",
",",
"String",
"policyName",
")",
"{",
"setGroupName",
"(",
"groupName",
")",
";",
"setPolicyName",
"(",
"policyName",
")",
";",
"}"
] |
public GetGroupPolicyRequest(string groupName, string policyName){_groupName = groupName;_policyName = policyName;}
|
train
| false
|
3,154
|
public DeleteVoiceChannelResult deleteVoiceChannel(DeleteVoiceChannelRequest request) {request = beforeClientExecution(request);return executeDeleteVoiceChannel(request);}
|
[
"public",
"DeleteVoiceChannelResult",
"deleteVoiceChannel",
"(",
"DeleteVoiceChannelRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteVoiceChannel",
"(",
"request",
")",
";",
"}"
] |
public virtual DeleteVoiceChannelResponse DeleteVoiceChannel(DeleteVoiceChannelRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteVoiceChannelRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteVoiceChannelResponseUnmarshaller.Instance;return Invoke<DeleteVoiceChannelResponse>(request, options);}
|
train
| true
|
3,155
|
public DBClusterSnapshotAttributesResult modifyDBClusterSnapshotAttribute(ModifyDBClusterSnapshotAttributeRequest request) {request = beforeClientExecution(request);return executeModifyDBClusterSnapshotAttribute(request);}
|
[
"public",
"DBClusterSnapshotAttributesResult",
"modifyDBClusterSnapshotAttribute",
"(",
"ModifyDBClusterSnapshotAttributeRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeModifyDBClusterSnapshotAttribute",
"(",
"request",
")",
";",
"}"
] |
public virtual ModifyDBClusterSnapshotAttributeResponse ModifyDBClusterSnapshotAttribute(ModifyDBClusterSnapshotAttributeRequest request){var options = new InvokeOptions();options.RequestMarshaller = ModifyDBClusterSnapshotAttributeRequestMarshaller.Instance;options.ResponseUnmarshaller = ModifyDBClusterSnapshotAttributeResponseUnmarshaller.Instance;return Invoke<ModifyDBClusterSnapshotAttributeResponse>(request, options);}
|
train
| true
|
3,156
|
public RegisterAVSDeviceResult registerAVSDevice(RegisterAVSDeviceRequest request) {request = beforeClientExecution(request);return executeRegisterAVSDevice(request);}
|
[
"public",
"RegisterAVSDeviceResult",
"registerAVSDevice",
"(",
"RegisterAVSDeviceRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeRegisterAVSDevice",
"(",
"request",
")",
";",
"}"
] |
public virtual RegisterAVSDeviceResponse RegisterAVSDevice(RegisterAVSDeviceRequest request){var options = new InvokeOptions();options.RequestMarshaller = RegisterAVSDeviceRequestMarshaller.Instance;options.ResponseUnmarshaller = RegisterAVSDeviceResponseUnmarshaller.Instance;return Invoke<RegisterAVSDeviceResponse>(request, options);}
|
train
| true
|
3,157
|
public void setValue(char[] newValue) {clear();if (newValue != null) {value = new char[newValue.length];System.arraycopy(newValue, 0, value, 0, newValue.length);}}
|
[
"public",
"void",
"setValue",
"(",
"char",
"[",
"]",
"newValue",
")",
"{",
"clear",
"(",
")",
";",
"if",
"(",
"newValue",
"!=",
"null",
")",
"{",
"value",
"=",
"new",
"char",
"[",
"newValue",
".",
"length",
"]",
";",
"System",
".",
"arraycopy",
"(",
"newValue",
",",
"0",
",",
"value",
",",
"0",
",",
"newValue",
".",
"length",
")",
";",
"}",
"}"
] |
public virtual void SetValue(char[] newValue){Clear();if (newValue != null){value = new char[newValue.Length];System.Array.Copy(newValue, 0, value, 0, newValue.Length);}}
|
train
| false
|
3,158
|
public int compareSameType(Object other) {assert exists || 0.0D == value;MutableValueDouble b = (MutableValueDouble)other;int c = Double.compare(value, b.value);if (c != 0) return c;if (exists == b.exists) return 0;return exists ? 1 : -1;}
|
[
"public",
"int",
"compareSameType",
"(",
"Object",
"other",
")",
"{",
"assert",
"exists",
"||",
"0.0D",
"==",
"value",
";",
"MutableValueDouble",
"b",
"=",
"(",
"MutableValueDouble",
")",
"other",
";",
"int",
"c",
"=",
"Double",
".",
"compare",
"(",
"value",
",",
"b",
".",
"value",
")",
";",
"if",
"(",
"c",
"!=",
"0",
")",
"return",
"c",
";",
"if",
"(",
"exists",
"==",
"b",
".",
"exists",
")",
"return",
"0",
";",
"return",
"exists",
"?",
"1",
":",
"-",
"1",
";",
"}"
] |
public override int CompareSameType(object other){MutableValueDouble b = (MutableValueDouble)other;int c = Value.CompareTo(b.Value);if (c != 0){return c;}if (!Exists){return -1;}if (!b.Exists){return 1;}return 0;}
|
train
| false
|
3,159
|
public UpdateCodeRepositoryResult updateCodeRepository(UpdateCodeRepositoryRequest request) {request = beforeClientExecution(request);return executeUpdateCodeRepository(request);}
|
[
"public",
"UpdateCodeRepositoryResult",
"updateCodeRepository",
"(",
"UpdateCodeRepositoryRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateCodeRepository",
"(",
"request",
")",
";",
"}"
] |
public virtual UpdateCodeRepositoryResponse UpdateCodeRepository(UpdateCodeRepositoryRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateCodeRepositoryRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateCodeRepositoryResponseUnmarshaller.Instance;return Invoke<UpdateCodeRepositoryResponse>(request, options);}
|
train
| true
|
3,160
|
public static FormulaError forString(String code) throws IllegalArgumentException {FormulaError err = smap.get(code);if(err == null) throw new IllegalArgumentException("Unknown error code: " + code);return err;}
|
[
"public",
"static",
"FormulaError",
"forString",
"(",
"String",
"code",
")",
"throws",
"IllegalArgumentException",
"{",
"FormulaError",
"err",
"=",
"smap",
".",
"get",
"(",
"code",
")",
";",
"if",
"(",
"err",
"==",
"null",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Unknown error code: \"",
"+",
"code",
")",
";",
"return",
"err",
";",
"}"
] |
public static FormulaError ForString(String code){if (smap.ContainsKey(code))return smap[code];throw new ArgumentException("Unknown error code: " + code);}
|
train
| false
|
3,161
|
public UnmonitorInstancesResult unmonitorInstances(UnmonitorInstancesRequest request) {request = beforeClientExecution(request);return executeUnmonitorInstances(request);}
|
[
"public",
"UnmonitorInstancesResult",
"unmonitorInstances",
"(",
"UnmonitorInstancesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUnmonitorInstances",
"(",
"request",
")",
";",
"}"
] |
public virtual UnmonitorInstancesResponse UnmonitorInstances(UnmonitorInstancesRequest request){var options = new InvokeOptions();options.RequestMarshaller = UnmonitorInstancesRequestMarshaller.Instance;options.ResponseUnmarshaller = UnmonitorInstancesResponseUnmarshaller.Instance;return Invoke<UnmonitorInstancesResponse>(request, options);}
|
train
| true
|
3,162
|
public boolean isInteractive() {return false;}
|
[
"public",
"boolean",
"isInteractive",
"(",
")",
"{",
"return",
"false",
";",
"}"
] |
public override bool IsInteractive(){return false;}
|
train
| false
|
3,163
|
public void setColor(short byteIndex, byte red, byte green, byte blue){int i = byteIndex - FIRST_COLOR_INDEX;if (i < 0 || i >= STANDARD_PALETTE_SIZE){return;}while (_colors.size() <= i) {_colors.add(new PColor(0, 0, 0));}PColor custColor = new PColor(red, green, blue);_colors.set(i, custColor);}
|
[
"public",
"void",
"setColor",
"(",
"short",
"byteIndex",
",",
"byte",
"red",
",",
"byte",
"green",
",",
"byte",
"blue",
")",
"{",
"int",
"i",
"=",
"byteIndex",
"-",
"FIRST_COLOR_INDEX",
";",
"if",
"(",
"i",
"<",
"0",
"||",
"i",
">=",
"STANDARD_PALETTE_SIZE",
")",
"{",
"return",
";",
"}",
"while",
"(",
"_colors",
".",
"size",
"(",
")",
"<=",
"i",
")",
"{",
"_colors",
".",
"add",
"(",
"new",
"PColor",
"(",
"0",
",",
"0",
",",
"0",
")",
")",
";",
"}",
"PColor",
"custColor",
"=",
"new",
"PColor",
"(",
"red",
",",
"green",
",",
"blue",
")",
";",
"_colors",
".",
"set",
"(",
"i",
",",
"custColor",
")",
";",
"}"
] |
public void SetColor(short byteIndex, byte red, byte green, byte blue){int i = byteIndex - FIRST_COLOR_INDEX;if (i < 0 || i >= STANDARD_PALETTE_SIZE){return;}while (field_2_colors.Count <= i){field_2_colors.Add(new PColor((byte)0, (byte)0, (byte)0));}PColor custColor = new PColor(red, green, blue);field_2_colors[i] = custColor;}
|
train
| false
|
3,164
|
public boolean isUser() {return type == Type.USER;}
|
[
"public",
"boolean",
"isUser",
"(",
")",
"{",
"return",
"type",
"==",
"Type",
".",
"USER",
";",
"}"
] |
public virtual bool IsUser(){return type == JapaneseTokenizerType.USER;}
|
train
| false
|
3,165
|
public DeleteMeetingResult deleteMeeting(DeleteMeetingRequest request) {request = beforeClientExecution(request);return executeDeleteMeeting(request);}
|
[
"public",
"DeleteMeetingResult",
"deleteMeeting",
"(",
"DeleteMeetingRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteMeeting",
"(",
"request",
")",
";",
"}"
] |
public virtual DeleteMeetingResponse DeleteMeeting(DeleteMeetingRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteMeetingRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteMeetingResponseUnmarshaller.Instance;return Invoke<DeleteMeetingResponse>(request, options);}
|
train
| false
|
3,166
|
public void serializeTokens(LittleEndianOutput out) {out.write(_byteEncoding, 0, _encodedTokenLen);}
|
[
"public",
"void",
"serializeTokens",
"(",
"LittleEndianOutput",
"out",
")",
"{",
"out",
".",
"write",
"(",
"_byteEncoding",
",",
"0",
",",
"_encodedTokenLen",
")",
";",
"}"
] |
public void SerializeTokens(ILittleEndianOutput out1){out1.Write(_byteEncoding, 0, _encodedTokenLen);}
|
train
| false
|
3,167
|
final public QueryNode Query(CharSequence field) throws ParseException {Vector<QueryNode> clauses = null;QueryNode c, first=null;first = DisjQuery(field);label_1:while (true) {switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {case NOT:case PLUS:case MINUS:case LPAREN:case QUOTED:case TERM:case REGEXPTERM:case RANGEIN_START:case RANGEEX_START:case NUMBER:;break;default:jj_la1[2] = jj_gen;break label_1;}c = DisjQuery(field);if (clauses == null) {clauses = new Vector<QueryNode>();clauses.addElement(first);}clauses.addElement(c);}if (clauses != null) {{if (true) return new BooleanQueryNode(clauses);}} else {if (first instanceof ModifierQueryNode) {ModifierQueryNode m = (ModifierQueryNode) first;if (m.getModifier() == ModifierQueryNode.Modifier.MOD_NOT) {{if (true) return new BooleanQueryNode(Arrays.<QueryNode> asList(m));}}}{if (true) return first;}}throw new Error("Missing return statement in function");}
|
[
"final",
"public",
"QueryNode",
"Query",
"(",
"CharSequence",
"field",
")",
"throws",
"ParseException",
"{",
"Vector",
"<",
"QueryNode",
">",
"clauses",
"=",
"null",
";",
"QueryNode",
"c",
",",
"first",
"=",
"null",
";",
"first",
"=",
"DisjQuery",
"(",
"field",
")",
";",
"label_1",
":",
"while",
"(",
"true",
")",
"{",
"switch",
"(",
"(",
"jj_ntk",
"==",
"-",
"1",
")",
"?",
"jj_ntk",
"(",
")",
":",
"jj_ntk",
")",
"{",
"case",
"NOT",
":",
"case",
"PLUS",
":",
"case",
"MINUS",
":",
"case",
"LPAREN",
":",
"case",
"QUOTED",
":",
"case",
"TERM",
":",
"case",
"REGEXPTERM",
":",
"case",
"RANGEIN_START",
":",
"case",
"RANGEEX_START",
":",
"case",
"NUMBER",
":",
";",
"break",
";",
"default",
":",
"jj_la1",
"[",
"2",
"]",
"=",
"jj_gen",
";",
"break",
"label_1",
";",
"}",
"c",
"=",
"DisjQuery",
"(",
"field",
")",
";",
"if",
"(",
"clauses",
"==",
"null",
")",
"{",
"clauses",
"=",
"new",
"Vector",
"<",
"QueryNode",
">",
"(",
")",
";",
"clauses",
".",
"addElement",
"(",
"first",
")",
";",
"}",
"clauses",
".",
"addElement",
"(",
"c",
")",
";",
"}",
"if",
"(",
"clauses",
"!=",
"null",
")",
"{",
"{",
"if",
"(",
"true",
")",
"return",
"new",
"BooleanQueryNode",
"(",
"clauses",
")",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"first",
"instanceof",
"ModifierQueryNode",
")",
"{",
"ModifierQueryNode",
"m",
"=",
"(",
"ModifierQueryNode",
")",
"first",
";",
"if",
"(",
"m",
".",
"getModifier",
"(",
")",
"==",
"ModifierQueryNode",
".",
"Modifier",
".",
"MOD_NOT",
")",
"{",
"{",
"if",
"(",
"true",
")",
"return",
"new",
"BooleanQueryNode",
"(",
"Arrays",
".",
"<",
"QueryNode",
">",
"asList",
"(",
"m",
")",
")",
";",
"}",
"}",
"}",
"{",
"if",
"(",
"true",
")",
"return",
"first",
";",
"}",
"}",
"throw",
"new",
"Error",
"(",
"\"Missing return statement in function\"",
")",
";",
"}"
] |
public IQueryNode Query(string field){List<IQueryNode> clauses = null;IQueryNode c, first = null;first = DisjQuery(field);while (true){switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk){case RegexpToken.NOT:case RegexpToken.PLUS:case RegexpToken.MINUS:case RegexpToken.LPAREN:case RegexpToken.QUOTED:case RegexpToken.TERM:case RegexpToken.REGEXPTERM:case RegexpToken.RANGEIN_START:case RegexpToken.RANGEEX_START:case RegexpToken.NUMBER:;break;default:jj_la1[4] = jj_gen;goto label_1_break;}c = DisjQuery(field);if (clauses == null){clauses = new List<IQueryNode>();clauses.Add(first);}clauses.Add(c);}label_1_break:if (clauses != null){{ if (true) return new BooleanQueryNode(clauses); }}else{{ if (true) return first; }}throw new Exception("Missing return statement in function");}
|
train
| false
|
3,168
|
public DBInstance rebootDBInstance(RebootDBInstanceRequest request) {request = beforeClientExecution(request);return executeRebootDBInstance(request);}
|
[
"public",
"DBInstance",
"rebootDBInstance",
"(",
"RebootDBInstanceRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeRebootDBInstance",
"(",
"request",
")",
";",
"}"
] |
public virtual RebootDBInstanceResponse RebootDBInstance(RebootDBInstanceRequest request){var options = new InvokeOptions();options.RequestMarshaller = RebootDBInstanceRequestMarshaller.Instance;options.ResponseUnmarshaller = RebootDBInstanceResponseUnmarshaller.Instance;return Invoke<RebootDBInstanceResponse>(request, options);}
|
train
| true
|
3,169
|
public SortedSet<E> tailSet(E start) {return tailSet(start, true);}
|
[
"public",
"SortedSet",
"<",
"E",
">",
"tailSet",
"(",
"E",
"start",
")",
"{",
"return",
"tailSet",
"(",
"start",
",",
"true",
")",
";",
"}"
] |
public virtual java.util.SortedSet<E> tailSet(E start){return tailSet(start, true);}
|
train
| false
|
3,170
|
public static boolean equals(byte[] array1, byte[] array2, int length) {if (array1 == array2) {return true;}if (array1 == null || array2 == null || array1.length < length || array2.length < length) {return false;}for (int i = 0; i < length; i++) {if (array1[i] != array2[i]) {return false;}}return true;}
|
[
"public",
"static",
"boolean",
"equals",
"(",
"byte",
"[",
"]",
"array1",
",",
"byte",
"[",
"]",
"array2",
",",
"int",
"length",
")",
"{",
"if",
"(",
"array1",
"==",
"array2",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"array1",
"==",
"null",
"||",
"array2",
"==",
"null",
"||",
"array1",
".",
"length",
"<",
"length",
"||",
"array2",
".",
"length",
"<",
"length",
")",
"{",
"return",
"false",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"array1",
"[",
"i",
"]",
"!=",
"array2",
"[",
"i",
"]",
")",
"{",
"return",
"false",
";",
"}",
"}",
"return",
"true",
";",
"}"
] |
public static bool equals(byte[] array1, byte[] array2, int length){if (array1 == array2){return true;}if (array1 == null || array2 == null || array1.Length < length || array2.Length <length){return false;}{for (int i = 0; i < length; i++){if (array1[i] != array2[i]){return false;}}}return true;}
|
train
| false
|
3,171
|
public boolean contains(Object o) {synchronized (mutex) {return delegate().contains(o);}}
|
[
"public",
"boolean",
"contains",
"(",
"Object",
"o",
")",
"{",
"synchronized",
"(",
"mutex",
")",
"{",
"return",
"delegate",
"(",
")",
".",
"contains",
"(",
"o",
")",
";",
"}",
"}"
] |
public virtual bool contains(object @object){lock (mutex){return c.contains(@object);}}
|
train
| false
|
3,172
|
public RestoreDomainAccessResult restoreDomainAccess(RestoreDomainAccessRequest request) {request = beforeClientExecution(request);return executeRestoreDomainAccess(request);}
|
[
"public",
"RestoreDomainAccessResult",
"restoreDomainAccess",
"(",
"RestoreDomainAccessRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeRestoreDomainAccess",
"(",
"request",
")",
";",
"}"
] |
public virtual RestoreDomainAccessResponse RestoreDomainAccess(RestoreDomainAccessRequest request){var options = new InvokeOptions();options.RequestMarshaller = RestoreDomainAccessRequestMarshaller.Instance;options.ResponseUnmarshaller = RestoreDomainAccessResponseUnmarshaller.Instance;return Invoke<RestoreDomainAccessResponse>(request, options);}
|
train
| true
|
3,173
|
static final public boolean wasEscaped(CharSequence text, int index) {if (text instanceof UnescapedCharSequence)return ((UnescapedCharSequence)text).wasEscaped[index];else return false;}
|
[
"static",
"final",
"public",
"boolean",
"wasEscaped",
"(",
"CharSequence",
"text",
",",
"int",
"index",
")",
"{",
"if",
"(",
"text",
"instanceof",
"UnescapedCharSequence",
")",
"return",
"(",
"(",
"UnescapedCharSequence",
")",
"text",
")",
".",
"wasEscaped",
"[",
"index",
"]",
";",
"else",
"return",
"false",
";",
"}"
] |
public static bool WasEscaped(ICharSequence text, int index){if (text is UnescapedCharSequence)return ((UnescapedCharSequence)text).wasEscaped[index];else return false;}
|
train
| false
|
3,174
|
public void setCmd(Character way, int cmd) {Cell c = at(way);if (c == null) {c = new Cell();c.cmd = cmd;cells.put(way, c);} else {c.cmd = cmd;}c.cnt = (cmd >= 0) ? 1 : 0;}
|
[
"public",
"void",
"setCmd",
"(",
"Character",
"way",
",",
"int",
"cmd",
")",
"{",
"Cell",
"c",
"=",
"at",
"(",
"way",
")",
";",
"if",
"(",
"c",
"==",
"null",
")",
"{",
"c",
"=",
"new",
"Cell",
"(",
")",
";",
"c",
".",
"cmd",
"=",
"cmd",
";",
"cells",
".",
"put",
"(",
"way",
",",
"c",
")",
";",
"}",
"else",
"{",
"c",
".",
"cmd",
"=",
"cmd",
";",
"}",
"c",
".",
"cnt",
"=",
"(",
"cmd",
">=",
"0",
")",
"?",
"1",
":",
"0",
";",
"}"
] |
public void SetCmd(char way, int cmd){Cell c = At(way);if (c == null){c = new Cell();c.cmd = cmd;cells[way] = c;}else{c.cmd = cmd;}c.cnt = (cmd >= 0) ? 1 : 0;}
|
train
| false
|
3,175
|
public ValueRangeRecord(RecordInputStream in) {field_1_minimumAxisValue = in.readDouble();field_2_maximumAxisValue = in.readDouble();field_3_majorIncrement = in.readDouble();field_4_minorIncrement = in.readDouble();field_5_categoryAxisCross = in.readDouble();field_6_options = in.readShort();}
|
[
"public",
"ValueRangeRecord",
"(",
"RecordInputStream",
"in",
")",
"{",
"field_1_minimumAxisValue",
"=",
"in",
".",
"readDouble",
"(",
")",
";",
"field_2_maximumAxisValue",
"=",
"in",
".",
"readDouble",
"(",
")",
";",
"field_3_majorIncrement",
"=",
"in",
".",
"readDouble",
"(",
")",
";",
"field_4_minorIncrement",
"=",
"in",
".",
"readDouble",
"(",
")",
";",
"field_5_categoryAxisCross",
"=",
"in",
".",
"readDouble",
"(",
")",
";",
"field_6_options",
"=",
"in",
".",
"readShort",
"(",
")",
";",
"}"
] |
public ValueRangeRecord(RecordInputStream in1){field_1_minimumAxisValue = in1.ReadDouble();field_2_maximumAxisValue = in1.ReadDouble();field_3_majorIncrement = in1.ReadDouble();field_4_minorIncrement = in1.ReadDouble();field_5_categoryAxisCross = in1.ReadDouble();field_6_options = in1.ReadShort();}
|
train
| false
|
3,176
|
public void addFiles(Collection<String> files) {checkFileNames(files);for (String f : files) {setFiles.add(namedForThisSegment(f));}}
|
[
"public",
"void",
"addFiles",
"(",
"Collection",
"<",
"String",
">",
"files",
")",
"{",
"checkFileNames",
"(",
"files",
")",
";",
"for",
"(",
"String",
"f",
":",
"files",
")",
"{",
"setFiles",
".",
"add",
"(",
"namedForThisSegment",
"(",
"f",
")",
")",
";",
"}",
"}"
] |
public void AddFiles(ICollection<string> files){CheckFileNames(files);setFiles.UnionWith(files);}
|
train
| false
|
3,177
|
public CreateClientVpnEndpointResult createClientVpnEndpoint(CreateClientVpnEndpointRequest request) {request = beforeClientExecution(request);return executeCreateClientVpnEndpoint(request);}
|
[
"public",
"CreateClientVpnEndpointResult",
"createClientVpnEndpoint",
"(",
"CreateClientVpnEndpointRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCreateClientVpnEndpoint",
"(",
"request",
")",
";",
"}"
] |
public virtual CreateClientVpnEndpointResponse CreateClientVpnEndpoint(CreateClientVpnEndpointRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateClientVpnEndpointRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateClientVpnEndpointResponseUnmarshaller.Instance;return Invoke<CreateClientVpnEndpointResponse>(request, options);}
|
train
| true
|
3,178
|
public static IntBuffer allocate(int capacity) {if (capacity < 0) {throw new IllegalArgumentException();}return new ReadWriteIntArrayBuffer(capacity);}
|
[
"public",
"static",
"IntBuffer",
"allocate",
"(",
"int",
"capacity",
")",
"{",
"if",
"(",
"capacity",
"<",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"return",
"new",
"ReadWriteIntArrayBuffer",
"(",
"capacity",
")",
";",
"}"
] |
public static java.nio.IntBuffer allocate(int capacity_1){if (capacity_1 < 0){throw new System.ArgumentException();}return new java.nio.ReadWriteIntArrayBuffer(capacity_1);}
|
train
| false
|
3,179
|
public File getFile() {return attributes.getFile();}
|
[
"public",
"File",
"getFile",
"(",
")",
"{",
"return",
"attributes",
".",
"getFile",
"(",
")",
";",
"}"
] |
public virtual FilePath GetFile(){return file;}
|
train
| false
|
3,180
|
public static CFRecordsAggregate createCFAggregate(RecordStream rs) {Record rec = rs.getNext();if (rec.getSid() != CFHeaderRecord.sid &&rec.getSid() != CFHeader12Record.sid) {throw new IllegalStateException("next record sid was " + rec.getSid()+ " instead of " + CFHeaderRecord.sid + " or " +CFHeader12Record.sid + " as expected");}CFHeaderBase header = (CFHeaderBase)rec;int nRules = header.getNumberOfConditionalFormats();CFRuleBase[] rules = new CFRuleBase[nRules];for (int i = 0; i < rules.length; i++) {rules[i] = (CFRuleBase) rs.getNext();}return new CFRecordsAggregate(header, rules);}
|
[
"public",
"static",
"CFRecordsAggregate",
"createCFAggregate",
"(",
"RecordStream",
"rs",
")",
"{",
"Record",
"rec",
"=",
"rs",
".",
"getNext",
"(",
")",
";",
"if",
"(",
"rec",
".",
"getSid",
"(",
")",
"!=",
"CFHeaderRecord",
".",
"sid",
"&&",
"rec",
".",
"getSid",
"(",
")",
"!=",
"CFHeader12Record",
".",
"sid",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"next record sid was \"",
"+",
"rec",
".",
"getSid",
"(",
")",
"+",
"\" instead of \"",
"+",
"CFHeaderRecord",
".",
"sid",
"+",
"\" or \"",
"+",
"CFHeader12Record",
".",
"sid",
"+",
"\" as expected\"",
")",
";",
"}",
"CFHeaderBase",
"header",
"=",
"(",
"CFHeaderBase",
")",
"rec",
";",
"int",
"nRules",
"=",
"header",
".",
"getNumberOfConditionalFormats",
"(",
")",
";",
"CFRuleBase",
"[",
"]",
"rules",
"=",
"new",
"CFRuleBase",
"[",
"nRules",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"rules",
".",
"length",
";",
"i",
"++",
")",
"{",
"rules",
"[",
"i",
"]",
"=",
"(",
"CFRuleBase",
")",
"rs",
".",
"getNext",
"(",
")",
";",
"}",
"return",
"new",
"CFRecordsAggregate",
"(",
"header",
",",
"rules",
")",
";",
"}"
] |
public static CFRecordsAggregate CreateCFAggregate(RecordStream rs){Record rec = rs.GetNext();if (rec.Sid != CFHeaderRecord.sid){throw new InvalidOperationException("next record sid was " + rec.Sid+ " instead of " + CFHeaderRecord.sid + " as expected");}CFHeaderRecord header = (CFHeaderRecord)rec;int nRules = header.NumberOfConditionalFormats;CFRuleRecord[] rules = new CFRuleRecord[nRules];for (int i = 0; i < rules.Length; i++){rules[i] = (CFRuleRecord)rs.GetNext();}return new CFRecordsAggregate(header, rules);}
|
train
| false
|
3,181
|
public void save() throws IOException {final byte[] out;final String text = toText();if (utf8Bom) {final ByteArrayOutputStream bos = new ByteArrayOutputStream();bos.write(0xEF);bos.write(0xBB);bos.write(0xBF);bos.write(text.getBytes(UTF_8));out = bos.toByteArray();} else {out = Constants.encode(text);}final LockFile lf = new LockFile(getFile());if (!lf.lock())throw new LockFailedException(getFile());try {lf.setNeedSnapshot(true);lf.write(out);if (!lf.commit())throw new IOException(MessageFormat.format(JGitText.get().cannotCommitWriteTo, getFile()));} finally {lf.unlock();}snapshot = lf.getCommitSnapshot();hash = hash(out);fireConfigChangedEvent();}
|
[
"public",
"void",
"save",
"(",
")",
"throws",
"IOException",
"{",
"final",
"byte",
"[",
"]",
"out",
";",
"final",
"String",
"text",
"=",
"toText",
"(",
")",
";",
"if",
"(",
"utf8Bom",
")",
"{",
"final",
"ByteArrayOutputStream",
"bos",
"=",
"new",
"ByteArrayOutputStream",
"(",
")",
";",
"bos",
".",
"write",
"(",
"0xEF",
")",
";",
"bos",
".",
"write",
"(",
"0xBB",
")",
";",
"bos",
".",
"write",
"(",
"0xBF",
")",
";",
"bos",
".",
"write",
"(",
"text",
".",
"getBytes",
"(",
"UTF_8",
")",
")",
";",
"out",
"=",
"bos",
".",
"toByteArray",
"(",
")",
";",
"}",
"else",
"{",
"out",
"=",
"Constants",
".",
"encode",
"(",
"text",
")",
";",
"}",
"final",
"LockFile",
"lf",
"=",
"new",
"LockFile",
"(",
"getFile",
"(",
")",
")",
";",
"if",
"(",
"!",
"lf",
".",
"lock",
"(",
")",
")",
"throw",
"new",
"LockFailedException",
"(",
"getFile",
"(",
")",
")",
";",
"try",
"{",
"lf",
".",
"setNeedSnapshot",
"(",
"true",
")",
";",
"lf",
".",
"write",
"(",
"out",
")",
";",
"if",
"(",
"!",
"lf",
".",
"commit",
"(",
")",
")",
"throw",
"new",
"IOException",
"(",
"MessageFormat",
".",
"format",
"(",
"JGitText",
".",
"get",
"(",
")",
".",
"cannotCommitWriteTo",
",",
"getFile",
"(",
")",
")",
")",
";",
"}",
"finally",
"{",
"lf",
".",
"unlock",
"(",
")",
";",
"}",
"snapshot",
"=",
"lf",
".",
"getCommitSnapshot",
"(",
")",
";",
"hash",
"=",
"hash",
"(",
"out",
")",
";",
"fireConfigChangedEvent",
"(",
")",
";",
"}"
] |
public override void Save(){byte[] @out;string text = ToText();if (utf8Bom){ByteArrayOutputStream bos = new ByteArrayOutputStream();bos.Write(unchecked((int)(0xEF)));bos.Write(unchecked((int)(0xBB)));bos.Write(unchecked((int)(0xBF)));bos.Write(Sharpen.Runtime.GetBytesForString(text, RawParseUtils.UTF8_CHARSET.Name()));@out = bos.ToByteArray();}else{@out = Constants.Encode(text);}LockFile lf = new LockFile(GetFile(), fs);if (!lf.Lock()){throw new LockFailedException(GetFile());}try{lf.SetNeedSnapshot(true);lf.Write(@out);if (!lf.Commit()){throw new IOException(MessageFormat.Format(JGitText.Get().cannotCommitWriteTo, GetFile()));}}finally{lf.Unlock();}snapshot = lf.GetCommitSnapshot();hash = Hash(@out);FireConfigChangedEvent();}
|
train
| false
|
3,182
|
public DeleteTopicRequest(String topicArn) {setTopicArn(topicArn);}
|
[
"public",
"DeleteTopicRequest",
"(",
"String",
"topicArn",
")",
"{",
"setTopicArn",
"(",
"topicArn",
")",
";",
"}"
] |
public DeleteTopicRequest(string topicArn){_topicArn = topicArn;}
|
train
| false
|
3,183
|
public static boolean contains(CellRangeAddress crA, CellRangeAddress crB){return le(crA.getFirstRow(), crB.getFirstRow()) &&ge(crA.getLastRow(), crB.getLastRow()) &&le(crA.getFirstColumn(), crB.getFirstColumn()) &&ge(crA.getLastColumn(), crB.getLastColumn());}
|
[
"public",
"static",
"boolean",
"contains",
"(",
"CellRangeAddress",
"crA",
",",
"CellRangeAddress",
"crB",
")",
"{",
"return",
"le",
"(",
"crA",
".",
"getFirstRow",
"(",
")",
",",
"crB",
".",
"getFirstRow",
"(",
")",
")",
"&&",
"ge",
"(",
"crA",
".",
"getLastRow",
"(",
")",
",",
"crB",
".",
"getLastRow",
"(",
")",
")",
"&&",
"le",
"(",
"crA",
".",
"getFirstColumn",
"(",
")",
",",
"crB",
".",
"getFirstColumn",
"(",
")",
")",
"&&",
"ge",
"(",
"crA",
".",
"getLastColumn",
"(",
")",
",",
"crB",
".",
"getLastColumn",
"(",
")",
")",
";",
"}"
] |
public static bool Contains(CellRangeAddress crA, CellRangeAddress crB){int firstRow = crB.FirstRow;int lastRow = crB.LastRow;int firstCol = crB.FirstColumn;int lastCol = crB.LastColumn;return le(crA.FirstRow, firstRow) && ge(crA.LastRow, lastRow)&& le(crA.FirstColumn, firstCol) && ge(crA.LastColumn, lastCol);}
|
train
| false
|
3,184
|
@Override public void clear() {if (size != 0) {Arrays.fill(array, 0, size, null);size = 0;modCount++;}}
|
[
"@",
"Override",
"public",
"void",
"clear",
"(",
")",
"{",
"if",
"(",
"size",
"!=",
"0",
")",
"{",
"Arrays",
".",
"fill",
"(",
"array",
",",
"0",
",",
"size",
",",
"null",
")",
";",
"size",
"=",
"0",
";",
"modCount",
"++",
";",
"}",
"}"
] |
public override void clear(){if (_size != 0){java.util.Arrays.fill(array, 0, _size, null);_size = 0;modCount++;}}
|
train
| false
|
3,185
|
public String toString(){return this.getClass().toString();}
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"this",
".",
"getClass",
"(",
")",
".",
"toString",
"(",
")",
";",
"}"
] |
public override String ToString(){return this.GetType().ToString();}
|
train
| false
|
3,186
|
public CherryPickCommand include(Ref commit) {checkCallable();commits.add(commit);return this;}
|
[
"public",
"CherryPickCommand",
"include",
"(",
"Ref",
"commit",
")",
"{",
"checkCallable",
"(",
")",
";",
"commits",
".",
"add",
"(",
"commit",
")",
";",
"return",
"this",
";",
"}"
] |
public virtual NGit.Api.CherryPickCommand Include(Ref commit){CheckCallable();commits.AddItem(commit);return this;}
|
train
| false
|
3,187
|
public String toString() {return "NO_MERGES"; }
|
[
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"\"NO_MERGES\"",
";",
"}"
] |
public override string ToString(){return "NO_MERGES";}
|
train
| false
|
3,188
|
public FileMode getOldMode(int nthParent) {return oldModes[nthParent];}
|
[
"public",
"FileMode",
"getOldMode",
"(",
"int",
"nthParent",
")",
"{",
"return",
"oldModes",
"[",
"nthParent",
"]",
";",
"}"
] |
public virtual FileMode GetOldMode(int nthParent){return oldModes[nthParent];}
|
train
| false
|
3,189
|
public void reset(Reader reader) {this.reader = reader;nextPos = 0;nextWrite = 0;count = 0;end = false;}
|
[
"public",
"void",
"reset",
"(",
"Reader",
"reader",
")",
"{",
"this",
".",
"reader",
"=",
"reader",
";",
"nextPos",
"=",
"0",
";",
"nextWrite",
"=",
"0",
";",
"count",
"=",
"0",
";",
"end",
"=",
"false",
";",
"}"
] |
public void Reset(TextReader reader){this.reader = reader;nextPos = 0;nextWrite = 0;count = 0;end = false;}
|
train
| false
|
3,190
|
public void serialize(LittleEndianOutput out) {String formatString = getFormatString();out.writeShort(getIndexCode());out.writeShort(formatString.length());out.writeByte(field_3_hasMultibyte ? 0x01 : 0x00);if ( field_3_hasMultibyte ) {StringUtil.putUnicodeLE( formatString, out);} else {StringUtil.putCompressedUnicode( formatString, out);}}
|
[
"public",
"void",
"serialize",
"(",
"LittleEndianOutput",
"out",
")",
"{",
"String",
"formatString",
"=",
"getFormatString",
"(",
")",
";",
"out",
".",
"writeShort",
"(",
"getIndexCode",
"(",
")",
")",
";",
"out",
".",
"writeShort",
"(",
"formatString",
".",
"length",
"(",
")",
")",
";",
"out",
".",
"writeByte",
"(",
"field_3_hasMultibyte",
"?",
"0x01",
":",
"0x00",
")",
";",
"if",
"(",
"field_3_hasMultibyte",
")",
"{",
"StringUtil",
".",
"putUnicodeLE",
"(",
"formatString",
",",
"out",
")",
";",
"}",
"else",
"{",
"StringUtil",
".",
"putCompressedUnicode",
"(",
"formatString",
",",
"out",
")",
";",
"}",
"}"
] |
public override void Serialize(ILittleEndianOutput out1){String formatString = FormatString;out1.WriteShort(IndexCode);out1.WriteShort(formatString.Length);out1.WriteByte(field_3_hasMultibyte ? 0x01 : 0x00);if (field_3_hasMultibyte){StringUtil.PutUnicodeLE(formatString, out1);}else{StringUtil.PutCompressedUnicode(formatString, out1);}}
|
train
| false
|
3,191
|
public DescribePendingMaintenanceActionsResult describePendingMaintenanceActions(DescribePendingMaintenanceActionsRequest request) {request = beforeClientExecution(request);return executeDescribePendingMaintenanceActions(request);}
|
[
"public",
"DescribePendingMaintenanceActionsResult",
"describePendingMaintenanceActions",
"(",
"DescribePendingMaintenanceActionsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribePendingMaintenanceActions",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribePendingMaintenanceActionsResponse DescribePendingMaintenanceActions(DescribePendingMaintenanceActionsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribePendingMaintenanceActionsRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribePendingMaintenanceActionsResponseUnmarshaller.Instance;return Invoke<DescribePendingMaintenanceActionsResponse>(request, options);}
|
train
| true
|
3,192
|
public DescribeServicesResult describeServices(DescribeServicesRequest request) {request = beforeClientExecution(request);return executeDescribeServices(request);}
|
[
"public",
"DescribeServicesResult",
"describeServices",
"(",
"DescribeServicesRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeServices",
"(",
"request",
")",
";",
"}"
] |
public virtual DescribeServicesResponse DescribeServices(DescribeServicesRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeServicesRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeServicesResponseUnmarshaller.Instance;return Invoke<DescribeServicesResponse>(request, options);}
|
train
| true
|
3,193
|
public int getCachedResultType() {if (specialCachedValue == null) {return CellType.NUMERIC.getCode();}return specialCachedValue.getValueType();}
|
[
"public",
"int",
"getCachedResultType",
"(",
")",
"{",
"if",
"(",
"specialCachedValue",
"==",
"null",
")",
"{",
"return",
"CellType",
".",
"NUMERIC",
".",
"getCode",
"(",
")",
";",
"}",
"return",
"specialCachedValue",
".",
"getValueType",
"(",
")",
";",
"}"
] |
public CellType GetCachedResultType(){if (specialCachedValue == null){return CellType.Numeric;}return specialCachedValue.GetValueType();}
|
train
| false
|
3,194
|
public boolean stem() {int v_1 = cursor;r_mark_regions();cursor = v_1;limit_backward = cursor;cursor = limit;int v_2 = limit - cursor;r_main_suffix();cursor = limit - v_2;int v_3 = limit - cursor;r_consonant_pair();cursor = limit - v_3;int v_4 = limit - cursor;r_other_suffix();cursor = limit - v_4;int v_5 = limit - cursor;r_undouble();cursor = limit - v_5;cursor = limit_backward;return true;}
|
[
"public",
"boolean",
"stem",
"(",
")",
"{",
"int",
"v_1",
"=",
"cursor",
";",
"r_mark_regions",
"(",
")",
";",
"cursor",
"=",
"v_1",
";",
"limit_backward",
"=",
"cursor",
";",
"cursor",
"=",
"limit",
";",
"int",
"v_2",
"=",
"limit",
"-",
"cursor",
";",
"r_main_suffix",
"(",
")",
";",
"cursor",
"=",
"limit",
"-",
"v_2",
";",
"int",
"v_3",
"=",
"limit",
"-",
"cursor",
";",
"r_consonant_pair",
"(",
")",
";",
"cursor",
"=",
"limit",
"-",
"v_3",
";",
"int",
"v_4",
"=",
"limit",
"-",
"cursor",
";",
"r_other_suffix",
"(",
")",
";",
"cursor",
"=",
"limit",
"-",
"v_4",
";",
"int",
"v_5",
"=",
"limit",
"-",
"cursor",
";",
"r_undouble",
"(",
")",
";",
"cursor",
"=",
"limit",
"-",
"v_5",
";",
"cursor",
"=",
"limit_backward",
";",
"return",
"true",
";",
"}"
] |
public override bool Stem(){int v_1;int v_2;int v_3;int v_4;int v_5;v_1 = m_cursor;do{if (!r_mark_regions()){goto lab0;}} while (false);lab0:m_cursor = v_1;m_limit_backward = m_cursor; m_cursor = m_limit;v_2 = m_limit - m_cursor;do{if (!r_main_suffix()){goto lab1;}} while (false);lab1:m_cursor = m_limit - v_2;v_3 = m_limit - m_cursor;do{if (!r_consonant_pair()){goto lab2;}} while (false);lab2:m_cursor = m_limit - v_3;v_4 = m_limit - m_cursor;do{if (!r_other_suffix()){goto lab3;}} while (false);lab3:m_cursor = m_limit - v_4;v_5 = m_limit - m_cursor;do{if (!r_undouble()){goto lab4;}} while (false);lab4:m_cursor = m_limit - v_5;m_cursor = m_limit_backward; return true;}
|
train
| false
|
3,195
|
public void setCachedResultErrorCode(int errorCode) {specialCachedValue = FormulaSpecialCachedValue.createCachedErrorCode(errorCode);}
|
[
"public",
"void",
"setCachedResultErrorCode",
"(",
"int",
"errorCode",
")",
"{",
"specialCachedValue",
"=",
"FormulaSpecialCachedValue",
".",
"createCachedErrorCode",
"(",
"errorCode",
")",
";",
"}"
] |
public void SetCachedResultErrorCode(int errorCode){specialCachedValue = SpecialCachedValue.CreateCachedErrorCode(errorCode);}
|
train
| false
|
3,196
|
public void setMinShingleSize(int minShingleSize) {if (minShingleSize < 2) {throw new IllegalArgumentException("Min shingle size must be >= 2");}if (minShingleSize > maxShingleSize) {throw new IllegalArgumentException("Min shingle size must be <= max shingle size");}this.minShingleSize = minShingleSize;gramSize = new CircularSequence();}
|
[
"public",
"void",
"setMinShingleSize",
"(",
"int",
"minShingleSize",
")",
"{",
"if",
"(",
"minShingleSize",
"<",
"2",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Min shingle size must be >= 2\"",
")",
";",
"}",
"if",
"(",
"minShingleSize",
">",
"maxShingleSize",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Min shingle size must be <= max shingle size\"",
")",
";",
"}",
"this",
".",
"minShingleSize",
"=",
"minShingleSize",
";",
"gramSize",
"=",
"new",
"CircularSequence",
"(",
")",
";",
"}"
] |
public void SetMinShingleSize(int minShingleSize){if (minShingleSize < 2){throw new System.ArgumentException("Min shingle size must be >= 2");}if (minShingleSize > maxShingleSize){throw new System.ArgumentException("Min shingle size must be <= max shingle size");}this.minShingleSize = minShingleSize;gramSize = new CircularSequence(this);}
|
train
| false
|
3,197
|
public void write(int value) throws IOException {checkWritePrimitiveTypes();primitiveTypes.write(value);}
|
[
"public",
"void",
"write",
"(",
"int",
"value",
")",
"throws",
"IOException",
"{",
"checkWritePrimitiveTypes",
"(",
")",
";",
"primitiveTypes",
".",
"write",
"(",
"value",
")",
";",
"}"
] |
public override void write(int value){throw new System.NotImplementedException();}
|
train
| false
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.