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
4,353
public int getCells() {int size = 0;for (Row row : rows)size += row.getCells();return size;}
[ "public", "int", "getCells", "(", ")", "{", "int", "size", "=", "0", ";", "for", "(", "Row", "row", ":", "rows", ")", "size", "+=", "row", ".", "getCells", "(", ")", ";", "return", "size", ";", "}" ]
public virtual int GetCells(){int size = 0;foreach (Row row in rows)size += row.GetCells();return size;}
train
false
4,354
public int findStartOfRowOutlineGroup(int row) {RowRecord rowRecord = this.getRow( row );int level = rowRecord.getOutlineLevel();int currentRow = row;while (currentRow >= 0 && this.getRow( currentRow ) != null) {rowRecord = this.getRow( currentRow );if (rowRecord.getOutlineLevel() < level) {return currentRow + 1;}currentRow--;}return currentRow + 1;}
[ "public", "int", "findStartOfRowOutlineGroup", "(", "int", "row", ")", "{", "RowRecord", "rowRecord", "=", "this", ".", "getRow", "(", "row", ")", ";", "int", "level", "=", "rowRecord", ".", "getOutlineLevel", "(", ")", ";", "int", "currentRow", "=", "row", ";", "while", "(", "currentRow", ">=", "0", "&&", "this", ".", "getRow", "(", "currentRow", ")", "!=", "null", ")", "{", "rowRecord", "=", "this", ".", "getRow", "(", "currentRow", ")", ";", "if", "(", "rowRecord", ".", "getOutlineLevel", "(", ")", "<", "level", ")", "{", "return", "currentRow", "+", "1", ";", "}", "currentRow", "--", ";", "}", "return", "currentRow", "+", "1", ";", "}" ]
public int FindStartOfRowOutlineGroup(int row){RowRecord rowRecord = this.GetRow(row);int level = rowRecord.OutlineLevel;int currentRow = row;while (this.GetRow(currentRow) != null){rowRecord = this.GetRow(currentRow);if (rowRecord.OutlineLevel < level)return currentRow + 1;currentRow--;}return currentRow + 1;}
train
false
4,355
public DirCacheBuildIterator(DirCacheBuilder dcb) {super(dcb.getDirCache());builder = dcb;}
[ "public", "DirCacheBuildIterator", "(", "DirCacheBuilder", "dcb", ")", "{", "super", "(", "dcb", ".", "getDirCache", "(", ")", ")", ";", "builder", "=", "dcb", ";", "}" ]
public DirCacheBuildIterator(DirCacheBuilder dcb) : base(dcb.GetDirCache()){builder = dcb;}
train
false
4,356
public DeleteGraphResult deleteGraph(DeleteGraphRequest request) {request = beforeClientExecution(request);return executeDeleteGraph(request);}
[ "public", "DeleteGraphResult", "deleteGraph", "(", "DeleteGraphRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeDeleteGraph", "(", "request", ")", ";", "}" ]
public virtual DeleteGraphResponse DeleteGraph(DeleteGraphRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteGraphRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteGraphResponseUnmarshaller.Instance;return Invoke<DeleteGraphResponse>(request, options);}
train
false
4,357
public String toString() {return "id=" + id + " version=" + version + " files=" + sourceFiles;}
[ "public", "String", "toString", "(", ")", "{", "return", "\"id=\"", "+", "id", "+", "\" version=\"", "+", "version", "+", "\" files=\"", "+", "sourceFiles", ";", "}" ]
public override string ToString(){return string.Format("id={0} version={1} files={2}", Id, Version, SourceFiles);}
train
false
4,358
public static Calendar parseDate(String strVal) throws EvaluationException {String[] parts = Pattern.compile("/").split(strVal);if (parts.length != 3) {throw new EvaluationException(ErrorEval.VALUE_INVALID);}String part2 = parts[2];int spacePos = part2.indexOf(' ');if (spacePos > 0) {part2 = part2.substring(0, spacePos);}int f0;int f1;int f2;try {f0 = Integer.parseInt(parts[0]);f1 = Integer.parseInt(parts[1]);f2 = Integer.parseInt(part2);} catch (NumberFormatException e) {throw new EvaluationException(ErrorEval.VALUE_INVALID);}if (f0 < 0 || f1 < 0 || f2 < 0 || (f0 > 12 && f1 > 12 && f2 > 12)) {throw new EvaluationException(ErrorEval.VALUE_INVALID);}if (f0 >= 1900 && f0 < 9999) {return makeDate(f0, f1, f2);}throw new RuntimeException("Unable to determine date format for text '" + strVal + "'");}
[ "public", "static", "Calendar", "parseDate", "(", "String", "strVal", ")", "throws", "EvaluationException", "{", "String", "[", "]", "parts", "=", "Pattern", ".", "compile", "(", "\"/\"", ")", ".", "split", "(", "strVal", ")", ";", "if", "(", "parts", ".", "length", "!=", "3", ")", "{", "throw", "new", "EvaluationException", "(", "ErrorEval", ".", "VALUE_INVALID", ")", ";", "}", "String", "part2", "=", "parts", "[", "2", "]", ";", "int", "spacePos", "=", "part2", ".", "indexOf", "(", "' '", ")", ";", "if", "(", "spacePos", ">", "0", ")", "{", "part2", "=", "part2", ".", "substring", "(", "0", ",", "spacePos", ")", ";", "}", "int", "f0", ";", "int", "f1", ";", "int", "f2", ";", "try", "{", "f0", "=", "Integer", ".", "parseInt", "(", "parts", "[", "0", "]", ")", ";", "f1", "=", "Integer", ".", "parseInt", "(", "parts", "[", "1", "]", ")", ";", "f2", "=", "Integer", ".", "parseInt", "(", "part2", ")", ";", "}", "catch", "(", "NumberFormatException", "e", ")", "{", "throw", "new", "EvaluationException", "(", "ErrorEval", ".", "VALUE_INVALID", ")", ";", "}", "if", "(", "f0", "<", "0", "||", "f1", "<", "0", "||", "f2", "<", "0", "||", "(", "f0", ">", "12", "&&", "f1", ">", "12", "&&", "f2", ">", "12", ")", ")", "{", "throw", "new", "EvaluationException", "(", "ErrorEval", ".", "VALUE_INVALID", ")", ";", "}", "if", "(", "f0", ">=", "1900", "&&", "f0", "<", "9999", ")", "{", "return", "makeDate", "(", "f0", ",", "f1", ",", "f2", ")", ";", "}", "throw", "new", "RuntimeException", "(", "\"Unable to determine date format for text '\"", "+", "strVal", "+", "\"'\"", ")", ";", "}" ]
public static DateTime ParseDate(String strVal){String[] parts = strVal.Split("-/".ToCharArray());if (parts.Length != 3){throw new EvaluationException(ErrorEval.VALUE_INVALID);}String part2 = parts[2];int spacePos = part2.IndexOf(' ');if (spacePos > 0){part2 = part2.Substring(0, spacePos);}int f0;int f1;int f2;try{f0 = int.Parse(parts[0]);f1 = int.Parse(parts[1]);f2 = int.Parse(part2);}catch (FormatException){throw new EvaluationException(ErrorEval.VALUE_INVALID);}if (f0 < 0 || f1 < 0 || f2 < 0 || (f0 > 12 && f1 > 12 && f2 > 12)){throw new EvaluationException(ErrorEval.VALUE_INVALID);}if (f0 >= 1900 && f0 < 9999){return MakeDate(f0, f1, f2);}if (false){return MakeDate(f2, f0, f1);}throw new RuntimeException("Unable to determine date format for text '" + strVal + "'");}
train
false
4,359
public void removeMMClipCount() {remove1stProperty(PropertyIDMap.PID_MMCLIPCOUNT);}
[ "public", "void", "removeMMClipCount", "(", ")", "{", "remove1stProperty", "(", "PropertyIDMap", ".", "PID_MMCLIPCOUNT", ")", ";", "}" ]
public void RemoveMMClipCount(){MutableSection s = (MutableSection)FirstSection;s.RemoveProperty(PropertyIDMap.PID_MMCLIPCOUNT);}
train
false
4,360
public void setDeltaCacheSize(long size) {deltaCacheSize = size;}
[ "public", "void", "setDeltaCacheSize", "(", "long", "size", ")", "{", "deltaCacheSize", "=", "size", ";", "}" ]
public virtual void SetDeltaCacheSize(long size){deltaCacheSize = size;}
train
false
4,361
public UpdateKnowledgeRequest() {super("Chatbot", "2017-10-11", "UpdateKnowledge", "beebot");setMethod(MethodType.POST);}
[ "public", "UpdateKnowledgeRequest", "(", ")", "{", "super", "(", "\"Chatbot\"", ",", "\"2017-10-11\"", ",", "\"UpdateKnowledge\"", ",", "\"beebot\"", ")", ";", "setMethod", "(", "MethodType", ".", "POST", ")", ";", "}" ]
public UpdateKnowledgeRequest(): base("Chatbot", "2017-10-11", "UpdateKnowledge", "beebot", "openAPI"){Method = MethodType.POST;}
train
false
4,362
public void readBytes(byte[] b, int offset, int len) {for(int i=0;i<len;i++) {b[offset+i] = bytes[pos--];}}
[ "public", "void", "readBytes", "(", "byte", "[", "]", "b", ",", "int", "offset", ",", "int", "len", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "len", ";", "i", "++", ")", "{", "b", "[", "offset", "+", "i", "]", "=", "bytes", "[", "pos", "--", "]", ";", "}", "}" ]
public override void ReadBytes(byte[] b, int offset, int len){for (int i = 0; i < len; i++){b[offset + i] = bytes[pos--];}}
train
false
4,363
public void fillArc(int x, int y, int width, int height,int startAngle, int arcAngle){if (logger.check( POILogger.WARN ))logger.log(POILogger.WARN,"fillArc not supported");}
[ "public", "void", "fillArc", "(", "int", "x", ",", "int", "y", ",", "int", "width", ",", "int", "height", ",", "int", "startAngle", ",", "int", "arcAngle", ")", "{", "if", "(", "logger", ".", "check", "(", "POILogger", ".", "WARN", ")", ")", "logger", ".", "log", "(", "POILogger", ".", "WARN", ",", "\"fillArc not supported\"", ")", ";", "}" ]
public void FillArc(int x, int y, int width, int height,int startAngle, int arcAngle){if (Logger.Check(POILogger.WARN))Logger.Log(POILogger.WARN, "FillArc not supported");}
train
false
4,364
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex,ValueEval arg0, ValueEval arg1) {double result;try {ValueVector vvY = createValueVector(arg0);ValueVector vvX = createValueVector(arg1);int size = vvX.getSize();if (size == 0 || vvY.getSize() != size) {return ErrorEval.NA;}result = evaluateInternal(vvX, vvY, size);} catch (EvaluationException e) {return e.getErrorEval();}if (Double.isNaN(result) || Double.isInfinite(result)) {return ErrorEval.NUM_ERROR;}return new NumberEval(result);}
[ "public", "ValueEval", "evaluate", "(", "int", "srcRowIndex", ",", "int", "srcColumnIndex", ",", "ValueEval", "arg0", ",", "ValueEval", "arg1", ")", "{", "double", "result", ";", "try", "{", "ValueVector", "vvY", "=", "createValueVector", "(", "arg0", ")", ";", "ValueVector", "vvX", "=", "createValueVector", "(", "arg1", ")", ";", "int", "size", "=", "vvX", ".", "getSize", "(", ")", ";", "if", "(", "size", "==", "0", "||", "vvY", ".", "getSize", "(", ")", "!=", "size", ")", "{", "return", "ErrorEval", ".", "NA", ";", "}", "result", "=", "evaluateInternal", "(", "vvX", ",", "vvY", ",", "size", ")", ";", "}", "catch", "(", "EvaluationException", "e", ")", "{", "return", "e", ".", "getErrorEval", "(", ")", ";", "}", "if", "(", "Double", ".", "isNaN", "(", "result", ")", "||", "Double", ".", "isInfinite", "(", "result", ")", ")", "{", "return", "ErrorEval", ".", "NUM_ERROR", ";", "}", "return", "new", "NumberEval", "(", "result", ")", ";", "}" ]
public override ValueEval Evaluate(int srcRowIndex, int srcColumnIndex,ValueEval arg0, ValueEval arg1){double result;try{ValueVector vvY = CreateValueVector(arg0);ValueVector vvX = CreateValueVector(arg1);int size = vvX.Size;if (size == 0 || vvY.Size != size){return ErrorEval.NA;}result = EvaluateInternal(vvX, vvY, size);}catch (EvaluationException e){return e.GetErrorEval();}if (Double.IsNaN(result) || Double.IsInfinity(result)){return ErrorEval.NUM_ERROR;}return new NumberEval(result);}
train
false
4,365
public void copyUpdatedCells(Workbook workbook) {_sewb.copyUpdatedCells(workbook);}
[ "public", "void", "copyUpdatedCells", "(", "Workbook", "workbook", ")", "{", "_sewb", ".", "copyUpdatedCells", "(", "workbook", ")", ";", "}" ]
public void CopyUpdatedCells(IWorkbook workbook){_sewb.CopyUpdatedCells(workbook);}
train
false
4,366
@Override public final String toString() {return key + "=" + value;}
[ "@", "Override", "public", "final", "String", "toString", "(", ")", "{", "return", "key", "+", "\"=\"", "+", "value", ";", "}" ]
public sealed override string ToString(){return key + "=" + value;}
train
false
4,367
public DescribeReservedInstancesOfferingsResult describeReservedInstancesOfferings() {return describeReservedInstancesOfferings(new DescribeReservedInstancesOfferingsRequest());}
[ "public", "DescribeReservedInstancesOfferingsResult", "describeReservedInstancesOfferings", "(", ")", "{", "return", "describeReservedInstancesOfferings", "(", "new", "DescribeReservedInstancesOfferingsRequest", "(", ")", ")", ";", "}" ]
public virtual DescribeReservedInstancesOfferingsResponse DescribeReservedInstancesOfferings(){return DescribeReservedInstancesOfferings(new DescribeReservedInstancesOfferingsRequest());}
train
false
4,368
public CacheParameterGroup createCacheParameterGroup(CreateCacheParameterGroupRequest request) {request = beforeClientExecution(request);return executeCreateCacheParameterGroup(request);}
[ "public", "CacheParameterGroup", "createCacheParameterGroup", "(", "CreateCacheParameterGroupRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeCreateCacheParameterGroup", "(", "request", ")", ";", "}" ]
public virtual CreateCacheParameterGroupResponse CreateCacheParameterGroup(CreateCacheParameterGroupRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateCacheParameterGroupRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateCacheParameterGroupResponseUnmarshaller.Instance;return Invoke<CreateCacheParameterGroupResponse>(request, options);}
train
true
4,369
public OldStringRecord(RecordInputStream in) {sid = in.getSid();if (in.getSid() == biff2_sid) {field_1_string_len = (short)in.readUByte();} else {field_1_string_len = in.readShort();}field_2_bytes = IOUtils.safelyAllocate(field_1_string_len, MAX_RECORD_LENGTH);in.read(field_2_bytes, 0, field_1_string_len);}
[ "public", "OldStringRecord", "(", "RecordInputStream", "in", ")", "{", "sid", "=", "in", ".", "getSid", "(", ")", ";", "if", "(", "in", ".", "getSid", "(", ")", "==", "biff2_sid", ")", "{", "field_1_string_len", "=", "(", "short", ")", "in", ".", "readUByte", "(", ")", ";", "}", "else", "{", "field_1_string_len", "=", "in", ".", "readShort", "(", ")", ";", "}", "field_2_bytes", "=", "IOUtils", ".", "safelyAllocate", "(", "field_1_string_len", ",", "MAX_RECORD_LENGTH", ")", ";", "in", ".", "read", "(", "field_2_bytes", ",", "0", ",", "field_1_string_len", ")", ";", "}" ]
public OldStringRecord(RecordInputStream in1){sid = in1.Sid;if (in1.Sid == biff2_sid){field_1_string_len = (short)in1.ReadUByte();}else{field_1_string_len = in1.ReadShort();}field_2_bytes = new byte[field_1_string_len];in1.Read(field_2_bytes, 0, field_1_string_len);}
train
false
4,370
public long ramBytesUsed() {return TERMS_BASE_RAM_BYTES_USED + (fst!=null ? fst.ramBytesUsed() : 0)+ RamUsageEstimator.sizeOf(scratch.bytes()) + RamUsageEstimator.sizeOf(scratchUTF16.chars());}
[ "public", "long", "ramBytesUsed", "(", ")", "{", "return", "TERMS_BASE_RAM_BYTES_USED", "+", "(", "fst", "!=", "null", "?", "fst", ".", "ramBytesUsed", "(", ")", ":", "0", ")", "+", "RamUsageEstimator", ".", "sizeOf", "(", "scratch", ".", "bytes", "(", ")", ")", "+", "RamUsageEstimator", ".", "sizeOf", "(", "scratchUTF16", ".", "chars", "(", ")", ")", ";", "}" ]
public virtual long RamBytesUsed(){return (_fst != null) ? _fst.GetSizeInBytes() : 0;}
train
false
4,371
public void fillRect(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_RECTANGLE);shape.setLineStyle(HSSFShape.LINESTYLE_NONE);shape.setFillColor(foreground.getRed(), foreground.getGreen(), foreground.getBlue());shape.setLineStyleColor(foreground.getRed(), foreground.getGreen(), foreground.getBlue());}
[ "public", "void", "fillRect", "(", "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_RECTANGLE", ")", ";", "shape", ".", "setLineStyle", "(", "HSSFShape", ".", "LINESTYLE_NONE", ")", ";", "shape", ".", "setFillColor", "(", "foreground", ".", "getRed", "(", ")", ",", "foreground", ".", "getGreen", "(", ")", ",", "foreground", ".", "getBlue", "(", ")", ")", ";", "shape", ".", "setLineStyleColor", "(", "foreground", ".", "getRed", "(", ")", ",", "foreground", ".", "getGreen", "(", ")", ",", "foreground", ".", "getBlue", "(", ")", ")", ";", "}" ]
public void FillRect(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_RECTANGLE);shape.LineStyle = LineStyle.None;shape.SetFillColor(foreground.R, foreground.G, foreground.B);shape.SetLineStyleColor(foreground.R, foreground.G, foreground.B);}
train
false
4,372
public void add(OneMerge merge) {merges.add(merge);}
[ "public", "void", "add", "(", "OneMerge", "merge", ")", "{", "merges", ".", "add", "(", "merge", ")", ";", "}" ]
public virtual void Add(OneMerge merge){Merges.Add(merge);}
train
false
4,373
public long computeNorm(FieldInvertState state) {return sims[0].computeNorm(state);}
[ "public", "long", "computeNorm", "(", "FieldInvertState", "state", ")", "{", "return", "sims", "[", "0", "]", ".", "computeNorm", "(", "state", ")", ";", "}" ]
public override long ComputeNorm(FieldInvertState state){return m_sims[0].ComputeNorm(state);}
train
false
4,374
public PolicyAttribute(String attributeName, String attributeValue) {setAttributeName(attributeName);setAttributeValue(attributeValue);}
[ "public", "PolicyAttribute", "(", "String", "attributeName", ",", "String", "attributeValue", ")", "{", "setAttributeName", "(", "attributeName", ")", ";", "setAttributeValue", "(", "attributeValue", ")", ";", "}" ]
public PolicyAttribute(string attributeName, string attributeValue){_attributeName = attributeName;_attributeValue = attributeValue;}
train
false
4,375
public String getAccessKeyId() {return publicKeyId;}
[ "public", "String", "getAccessKeyId", "(", ")", "{", "return", "publicKeyId", ";", "}" ]
public string GetAccessKeyId(){return publicKeyId;}
train
false
4,376
public ListJourneysResult listJourneys(ListJourneysRequest request) {request = beforeClientExecution(request);return executeListJourneys(request);}
[ "public", "ListJourneysResult", "listJourneys", "(", "ListJourneysRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeListJourneys", "(", "request", ")", ";", "}" ]
public virtual ListJourneysResponse ListJourneys(ListJourneysRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListJourneysRequestMarshaller.Instance;options.ResponseUnmarshaller = ListJourneysResponseUnmarshaller.Instance;return Invoke<ListJourneysResponse>(request, options);}
train
false
4,377
public FormulaCellCacheEntry getOrCreateFormulaCellEntry(EvaluationCell cell) {FormulaCellCacheEntry result = _formulaCellCache.get(cell);if (result == null) {result = new FormulaCellCacheEntry();_formulaCellCache.put(cell, result);}return result;}
[ "public", "FormulaCellCacheEntry", "getOrCreateFormulaCellEntry", "(", "EvaluationCell", "cell", ")", "{", "FormulaCellCacheEntry", "result", "=", "_formulaCellCache", ".", "get", "(", "cell", ")", ";", "if", "(", "result", "==", "null", ")", "{", "result", "=", "new", "FormulaCellCacheEntry", "(", ")", ";", "_formulaCellCache", ".", "put", "(", "cell", ",", "result", ")", ";", "}", "return", "result", ";", "}" ]
public FormulaCellCacheEntry GetOrCreateFormulaCellEntry(IEvaluationCell cell){FormulaCellCacheEntry result = _formulaCellCache.Get(cell);if (result == null){result = new FormulaCellCacheEntry();_formulaCellCache.Put(cell, result);}return result;}
train
false
4,378
public StartHumanLoopResult startHumanLoop(StartHumanLoopRequest request) {request = beforeClientExecution(request);return executeStartHumanLoop(request);}
[ "public", "StartHumanLoopResult", "startHumanLoop", "(", "StartHumanLoopRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeStartHumanLoop", "(", "request", ")", ";", "}" ]
public virtual StartHumanLoopResponse StartHumanLoop(StartHumanLoopRequest request){var options = new InvokeOptions();options.RequestMarshaller = StartHumanLoopRequestMarshaller.Instance;options.ResponseUnmarshaller = StartHumanLoopResponseUnmarshaller.Instance;return Invoke<StartHumanLoopResponse>(request, options);}
train
false
4,379
public List<RefSpec> getRefSpecs() {return refSpecs;}
[ "public", "List", "<", "RefSpec", ">", "getRefSpecs", "(", ")", "{", "return", "refSpecs", ";", "}" ]
public virtual IList<RefSpec> GetRefSpecs(){return refSpecs;}
train
false
4,380
public void build(InputIterator iterator) throws IOException {if (iterator.hasPayloads()) {throw new IllegalArgumentException("this suggester doesn't support payloads");}if (iterator.hasContexts()) {throw new IllegalArgumentException("this suggester doesn't support contexts");}count = 0;BytesRef scratch = new BytesRef();InputIterator iter = new WFSTInputIterator(tempDir, tempFileNamePrefix, iterator);IntsRefBuilder scratchInts = new IntsRefBuilder();BytesRefBuilder previous = null;PositiveIntOutputs outputs = PositiveIntOutputs.getSingleton();FSTCompiler<Long> fstCompiler = new FSTCompiler<>(FST.INPUT_TYPE.BYTE1, outputs);while ((scratch = iter.next()) != null) {long cost = iter.weight();if (previous == null) {previous = new BytesRefBuilder();} else if (scratch.equals(previous.get())) {continue; }Util.toIntsRef(scratch, scratchInts);fstCompiler.add(scratchInts.get(), cost);previous.copyBytes(scratch);count++;}fst = fstCompiler.compile();}
[ "public", "void", "build", "(", "InputIterator", "iterator", ")", "throws", "IOException", "{", "if", "(", "iterator", ".", "hasPayloads", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"this suggester doesn't support payloads\"", ")", ";", "}", "if", "(", "iterator", ".", "hasContexts", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"this suggester doesn't support contexts\"", ")", ";", "}", "count", "=", "0", ";", "BytesRef", "scratch", "=", "new", "BytesRef", "(", ")", ";", "InputIterator", "iter", "=", "new", "WFSTInputIterator", "(", "tempDir", ",", "tempFileNamePrefix", ",", "iterator", ")", ";", "IntsRefBuilder", "scratchInts", "=", "new", "IntsRefBuilder", "(", ")", ";", "BytesRefBuilder", "previous", "=", "null", ";", "PositiveIntOutputs", "outputs", "=", "PositiveIntOutputs", ".", "getSingleton", "(", ")", ";", "FSTCompiler", "<", "Long", ">", "fstCompiler", "=", "new", "FSTCompiler", "<", ">", "(", "FST", ".", "INPUT_TYPE", ".", "BYTE1", ",", "outputs", ")", ";", "while", "(", "(", "scratch", "=", "iter", ".", "next", "(", ")", ")", "!=", "null", ")", "{", "long", "cost", "=", "iter", ".", "weight", "(", ")", ";", "if", "(", "previous", "==", "null", ")", "{", "previous", "=", "new", "BytesRefBuilder", "(", ")", ";", "}", "else", "if", "(", "scratch", ".", "equals", "(", "previous", ".", "get", "(", ")", ")", ")", "{", "continue", ";", "}", "Util", ".", "toIntsRef", "(", "scratch", ",", "scratchInts", ")", ";", "fstCompiler", ".", "add", "(", "scratchInts", ".", "get", "(", ")", ",", "cost", ")", ";", "previous", ".", "copyBytes", "(", "scratch", ")", ";", "count", "++", ";", "}", "fst", "=", "fstCompiler", ".", "compile", "(", ")", ";", "}" ]
public override void Build(IInputIterator iterator){if (iterator.HasPayloads){throw new ArgumentException("this suggester doesn't support payloads");}if (iterator.HasContexts){throw new ArgumentException("this suggester doesn't support contexts");}count = 0;var scratch = new BytesRef();IInputIterator iter = new WFSTInputIterator(this, iterator);var scratchInts = new Int32sRef();BytesRef previous = null;var outputs = PositiveInt32Outputs.Singleton;var builder = new Builder<long?>(FST.INPUT_TYPE.BYTE1, outputs);while ((scratch = iter.Next()) != null){long cost = iter.Weight;if (previous == null){previous = new BytesRef();}else if (scratch.Equals(previous)){continue; }Lucene.Net.Util.Fst.Util.ToInt32sRef(scratch, scratchInts);builder.Add(scratchInts, cost);previous.CopyBytes(scratch);count++;}fst = builder.Finish();}
train
false
4,381
public Comparator<? super K> comparator() {if (ascending) {return TreeMap.this.comparator();} else {return Collections.reverseOrder(comparator);}}
[ "public", "Comparator", "<", "?", "super", "K", ">", "comparator", "(", ")", "{", "if", "(", "ascending", ")", "{", "return", "TreeMap", ".", "this", ".", "comparator", "(", ")", ";", "}", "else", "{", "return", "Collections", ".", "reverseOrder", "(", "comparator", ")", ";", "}", "}" ]
public java.util.Comparator<K> comparator(){if (this.ascending){return this._enclosing.comparator();}else{return java.util.Collections.reverseOrder<K>(this._enclosing._comparator);}}
train
false
4,382
public PrintHeadersRecord(RecordInputStream in) {field_1_print_headers = in.readShort();}
[ "public", "PrintHeadersRecord", "(", "RecordInputStream", "in", ")", "{", "field_1_print_headers", "=", "in", ".", "readShort", "(", ")", ";", "}" ]
public PrintHeadersRecord(RecordInputStream in1){field_1_print_headers = in1.ReadShort();}
train
false
4,383
public DeleteBranchCommand branchDelete() {return new DeleteBranchCommand(repo);}
[ "public", "DeleteBranchCommand", "branchDelete", "(", ")", "{", "return", "new", "DeleteBranchCommand", "(", "repo", ")", ";", "}" ]
public virtual DeleteBranchCommand BranchDelete(){return new DeleteBranchCommand(repo);}
train
false
4,384
public DetectLabelsResult detectLabels(DetectLabelsRequest request) {request = beforeClientExecution(request);return executeDetectLabels(request);}
[ "public", "DetectLabelsResult", "detectLabels", "(", "DetectLabelsRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeDetectLabels", "(", "request", ")", ";", "}" ]
public virtual DetectLabelsResponse DetectLabels(DetectLabelsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DetectLabelsRequestMarshaller.Instance;options.ResponseUnmarshaller = DetectLabelsResponseUnmarshaller.Instance;return Invoke<DetectLabelsResponse>(request, options);}
train
true
4,385
public FnGroupCountRecord(RecordInputStream in){field_1_count = in.readShort();}
[ "public", "FnGroupCountRecord", "(", "RecordInputStream", "in", ")", "{", "field_1_count", "=", "in", ".", "readShort", "(", ")", ";", "}" ]
public FnGroupCountRecord(RecordInputStream in1){field_1_count = in1.ReadShort();}
train
false
4,386
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0, ValueEval arg1) {double result;try {double d0 = singleOperandEvaluate(arg0, srcRowIndex, srcColumnIndex);double d1 = singleOperandEvaluate(arg1, srcRowIndex, srcColumnIndex);double multi = Math.pow(10d,d1);if(d0 < 0) result = -Math.floor(-d0 * multi) / multi;else result = Math.floor(d0 * multi) / multi;checkValue(result);}catch (EvaluationException e) {return e.getErrorEval();}return new NumberEval(result);}
[ "public", "ValueEval", "evaluate", "(", "int", "srcRowIndex", ",", "int", "srcColumnIndex", ",", "ValueEval", "arg0", ",", "ValueEval", "arg1", ")", "{", "double", "result", ";", "try", "{", "double", "d0", "=", "singleOperandEvaluate", "(", "arg0", ",", "srcRowIndex", ",", "srcColumnIndex", ")", ";", "double", "d1", "=", "singleOperandEvaluate", "(", "arg1", ",", "srcRowIndex", ",", "srcColumnIndex", ")", ";", "double", "multi", "=", "Math", ".", "pow", "(", "10d", ",", "d1", ")", ";", "if", "(", "d0", "<", "0", ")", "result", "=", "-", "Math", ".", "floor", "(", "-", "d0", "*", "multi", ")", "/", "multi", ";", "else", "result", "=", "Math", ".", "floor", "(", "d0", "*", "multi", ")", "/", "multi", ";", "checkValue", "(", "result", ")", ";", "}", "catch", "(", "EvaluationException", "e", ")", "{", "return", "e", ".", "getErrorEval", "(", ")", ";", "}", "return", "new", "NumberEval", "(", "result", ")", ";", "}" ]
public override ValueEval Evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0, ValueEval arg1){double result;try{double d0 = NumericFunction.SingleOperandEvaluate(arg0, srcRowIndex, srcColumnIndex);double d1 = NumericFunction.SingleOperandEvaluate(arg1, srcRowIndex, srcColumnIndex);result = Evaluate(d0, d1);NumericFunction.CheckValue(result);}catch (EvaluationException e){return e.GetErrorEval();}return new NumberEval(result);}
train
false
4,387
public DoubleBuffer put(double[] src, int srcOffset, int doubleCount) {if (doubleCount > remaining()) {throw new BufferOverflowException();}System.arraycopy(src, srcOffset, backingArray, offset + position, doubleCount);position += doubleCount;return this;}
[ "public", "DoubleBuffer", "put", "(", "double", "[", "]", "src", ",", "int", "srcOffset", ",", "int", "doubleCount", ")", "{", "if", "(", "doubleCount", ">", "remaining", "(", ")", ")", "{", "throw", "new", "BufferOverflowException", "(", ")", ";", "}", "System", ".", "arraycopy", "(", "src", ",", "srcOffset", ",", "backingArray", ",", "offset", "+", "position", ",", "doubleCount", ")", ";", "position", "+=", "doubleCount", ";", "return", "this", ";", "}" ]
public override java.nio.DoubleBuffer put(double[] src, int srcOffset, int doubleCount){if (doubleCount > remaining()){throw new java.nio.BufferOverflowException();}System.Array.Copy(src, srcOffset, backingArray, offset + _position, doubleCount);_position += doubleCount;return this;}
train
false
4,388
public CharSequence toQueryString(EscapeQuerySyntax escaper) {if (isDefaultField(this.field)) {return getTermEscaped(escaper) + "~" + this.similarity;} else {return this.field + ":" + getTermEscaped(escaper) + "~" + this.similarity;}}
[ "public", "CharSequence", "toQueryString", "(", "EscapeQuerySyntax", "escaper", ")", "{", "if", "(", "isDefaultField", "(", "this", ".", "field", ")", ")", "{", "return", "getTermEscaped", "(", "escaper", ")", "+", "\"~\"", "+", "this", ".", "similarity", ";", "}", "else", "{", "return", "this", ".", "field", "+", "\":\"", "+", "getTermEscaped", "(", "escaper", ")", "+", "\"~\"", "+", "this", ".", "similarity", ";", "}", "}" ]
public override string ToQueryString(IEscapeQuerySyntax escaper){if (IsDefaultField(this.m_field)){return GetTermEscaped(escaper) + "~" + this.similarity;}else{return this.m_field + ":" + GetTermEscaped(escaper) + "~" + this.similarity;}}
train
false
4,389
public AbstractBlockPackedWriter(DataOutput out, int blockSize) {checkBlockSize(blockSize, MIN_BLOCK_SIZE, MAX_BLOCK_SIZE);reset(out);values = new long[blockSize];}
[ "public", "AbstractBlockPackedWriter", "(", "DataOutput", "out", ",", "int", "blockSize", ")", "{", "checkBlockSize", "(", "blockSize", ",", "MIN_BLOCK_SIZE", ",", "MAX_BLOCK_SIZE", ")", ";", "reset", "(", "out", ")", ";", "values", "=", "new", "long", "[", "blockSize", "]", ";", "}" ]
public AbstractBlockPackedWriter(DataOutput @out, int blockSize){PackedInt32s.CheckBlockSize(blockSize, MIN_BLOCK_SIZE, MAX_BLOCK_SIZE);Reset(@out);m_values = new long[blockSize];}
train
false
4,390
public String getMessage() {return message;}
[ "public", "String", "getMessage", "(", ")", "{", "return", "message", ";", "}" ]
public virtual string GetMessage(){return message;}
train
false
4,391
public ListAttendeesResult listAttendees(ListAttendeesRequest request) {request = beforeClientExecution(request);return executeListAttendees(request);}
[ "public", "ListAttendeesResult", "listAttendees", "(", "ListAttendeesRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeListAttendees", "(", "request", ")", ";", "}" ]
public virtual ListAttendeesResponse ListAttendees(ListAttendeesRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListAttendeesRequestMarshaller.Instance;options.ResponseUnmarshaller = ListAttendeesResponseUnmarshaller.Instance;return Invoke<ListAttendeesResponse>(request, options);}
train
false
4,392
public void reset() {upto = count = 0;posIncr = 1;}
[ "public", "void", "reset", "(", ")", "{", "upto", "=", "count", "=", "0", ";", "posIncr", "=", "1", ";", "}" ]
public virtual void Reset(){upto = count = 0;posIncr = 1;}
train
false
4,393
public FeatHdrRecord clone() {return copy();}
[ "public", "FeatHdrRecord", "clone", "(", ")", "{", "return", "copy", "(", ")", ";", "}" ]
public override Object Clone(){return CloneViaReserialise();}
train
false
4,394
public synchronized void addElement(E object) {if (elementCount == elementData.length) {growByOne();}elementData[elementCount++] = object;modCount++;}
[ "public", "synchronized", "void", "addElement", "(", "E", "object", ")", "{", "if", "(", "elementCount", "==", "elementData", ".", "length", ")", "{", "growByOne", "(", ")", ";", "}", "elementData", "[", "elementCount", "++", "]", "=", "object", ";", "modCount", "++", ";", "}" ]
public virtual void addElement(E @object){lock (this){if (elementCount == elementData.Length){growByOne();}elementData[elementCount++] = @object;modCount++;}}
train
false
4,395
public long fileLength(String name) throws IOException {ensureOpen();if (pendingDeletes.contains(name)) {throw new NoSuchFileException("file \"" + name + "\" is pending delete");}return Files.size(directory.resolve(name));}
[ "public", "long", "fileLength", "(", "String", "name", ")", "throws", "IOException", "{", "ensureOpen", "(", ")", ";", "if", "(", "pendingDeletes", ".", "contains", "(", "name", ")", ")", "{", "throw", "new", "NoSuchFileException", "(", "\"file \\\"\"", "+", "name", "+", "\"\\\" is pending delete\"", ")", ";", "}", "return", "Files", ".", "size", "(", "directory", ".", "resolve", "(", "name", ")", ")", ";", "}" ]
public override long FileLength(string name){EnsureOpen();FileInfo file = new FileInfo(Path.Combine(m_directory.FullName, name));long len = file.Length;if (len == 0 && !file.Exists){throw new FileNotFoundException(name);}else{return len;}}
train
false
4,396
public PutExternalModelResult putExternalModel(PutExternalModelRequest request) {request = beforeClientExecution(request);return executePutExternalModel(request);}
[ "public", "PutExternalModelResult", "putExternalModel", "(", "PutExternalModelRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executePutExternalModel", "(", "request", ")", ";", "}" ]
public virtual PutExternalModelResponse PutExternalModel(PutExternalModelRequest request){var options = new InvokeOptions();options.RequestMarshaller = PutExternalModelRequestMarshaller.Instance;options.ResponseUnmarshaller = PutExternalModelResponseUnmarshaller.Instance;return Invoke<PutExternalModelResponse>(request, options);}
train
false
4,397
public PutConferencePreferenceResult putConferencePreference(PutConferencePreferenceRequest request) {request = beforeClientExecution(request);return executePutConferencePreference(request);}
[ "public", "PutConferencePreferenceResult", "putConferencePreference", "(", "PutConferencePreferenceRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executePutConferencePreference", "(", "request", ")", ";", "}" ]
public virtual PutConferencePreferenceResponse PutConferencePreference(PutConferencePreferenceRequest request){var options = new InvokeOptions();options.RequestMarshaller = PutConferencePreferenceRequestMarshaller.Instance;options.ResponseUnmarshaller = PutConferencePreferenceResponseUnmarshaller.Instance;return Invoke<PutConferencePreferenceResponse>(request, options);}
train
true
4,398
public int size() {return size;}
[ "public", "int", "size", "(", ")", "{", "return", "size", ";", "}" ]
public override int size(){return _size;}
train
false
4,399
public CreateApiMappingResult createApiMapping(CreateApiMappingRequest request) {request = beforeClientExecution(request);return executeCreateApiMapping(request);}
[ "public", "CreateApiMappingResult", "createApiMapping", "(", "CreateApiMappingRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeCreateApiMapping", "(", "request", ")", ";", "}" ]
public virtual CreateApiMappingResponse CreateApiMapping(CreateApiMappingRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateApiMappingRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateApiMappingResponseUnmarshaller.Instance;return Invoke<CreateApiMappingResponse>(request, options);}
train
true
4,400
public CharBlockArray append(CharSequence chars, int start, int length) {int end = start + length;for (int i = start; i < end; i++) {append(chars.charAt(i));}return this;}
[ "public", "CharBlockArray", "append", "(", "CharSequence", "chars", ",", "int", "start", ",", "int", "length", ")", "{", "int", "end", "=", "start", "+", "length", ";", "for", "(", "int", "i", "=", "start", ";", "i", "<", "end", ";", "i", "++", ")", "{", "append", "(", "chars", ".", "charAt", "(", "i", ")", ")", ";", "}", "return", "this", ";", "}" ]
public virtual CharBlockArray Append(ICharSequence chars, int start, int length){int end = start + length;for (int i = start; i < end; i++){Append(chars[i]);}return this;}
train
false
4,401
public UpdateAdmChannelResult updateAdmChannel(UpdateAdmChannelRequest request) {request = beforeClientExecution(request);return executeUpdateAdmChannel(request);}
[ "public", "UpdateAdmChannelResult", "updateAdmChannel", "(", "UpdateAdmChannelRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeUpdateAdmChannel", "(", "request", ")", ";", "}" ]
public virtual UpdateAdmChannelResponse UpdateAdmChannel(UpdateAdmChannelRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateAdmChannelRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateAdmChannelResponseUnmarshaller.Instance;return Invoke<UpdateAdmChannelResponse>(request, options);}
train
true
4,402
public DirCacheIterator(DirCache dc) {cache = dc;tree = dc.getCacheTree(true);treeStart = 0;treeEnd = tree.getEntrySpan();subtreeId = new byte[Constants.OBJECT_ID_LENGTH];if (!eof())parseEntry();}
[ "public", "DirCacheIterator", "(", "DirCache", "dc", ")", "{", "cache", "=", "dc", ";", "tree", "=", "dc", ".", "getCacheTree", "(", "true", ")", ";", "treeStart", "=", "0", ";", "treeEnd", "=", "tree", ".", "getEntrySpan", "(", ")", ";", "subtreeId", "=", "new", "byte", "[", "Constants", ".", "OBJECT_ID_LENGTH", "]", ";", "if", "(", "!", "eof", "(", ")", ")", "parseEntry", "(", ")", ";", "}" ]
public DirCacheIterator(DirCache dc){cache = dc;tree = dc.GetCacheTree(true);treeStart = 0;treeEnd = tree.GetEntrySpan();subtreeId = new byte[Constants.OBJECT_ID_LENGTH];if (!Eof){ParseEntry();}}
train
false
4,403
public void setBytesRef(BytesRef term, int textStart) {final byte[] bytes = term.bytes = buffers[textStart >> BYTE_BLOCK_SHIFT];int pos = textStart & BYTE_BLOCK_MASK;if ((bytes[pos] & 0x80) == 0) {term.length = bytes[pos];term.offset = pos+1;} else {term.length = (bytes[pos]&0x7f) + ((bytes[pos+1]&0xff)<<7);term.offset = pos+2;}assert term.length >= 0;}
[ "public", "void", "setBytesRef", "(", "BytesRef", "term", ",", "int", "textStart", ")", "{", "final", "byte", "[", "]", "bytes", "=", "term", ".", "bytes", "=", "buffers", "[", "textStart", ">", ">", "BYTE_BLOCK_SHIFT", "]", ";", "int", "pos", "=", "textStart", "&", "BYTE_BLOCK_MASK", ";", "if", "(", "(", "bytes", "[", "pos", "]", "&", "0x80", ")", "==", "0", ")", "{", "term", ".", "length", "=", "bytes", "[", "pos", "]", ";", "term", ".", "offset", "=", "pos", "+", "1", ";", "}", "else", "{", "term", ".", "length", "=", "(", "bytes", "[", "pos", "]", "&", "0x7f", ")", "+", "(", "(", "bytes", "[", "pos", "+", "1", "]", "&", "0xff", ")", "<<", "7", ")", ";", "term", ".", "offset", "=", "pos", "+", "2", ";", "}", "assert", "term", ".", "length", ">=", "0", ";", "}" ]
public void SetBytesRef(BytesRef term, int textStart){var bytes = term.Bytes = buffers[textStart >> BYTE_BLOCK_SHIFT];var pos = textStart & BYTE_BLOCK_MASK;if ((bytes[pos] & 0x80) == 0){term.Length = bytes[pos];term.Offset = pos + 1;}else{term.Length = (bytes[pos] & 0x7f) + ((bytes[pos + 1] & 0xff) << 7);term.Offset = pos + 2;}Debug.Assert(term.Length >= 0);}
train
false
4,404
public Restrictions(GeoRestriction geoRestriction) {setGeoRestriction(geoRestriction);}
[ "public", "Restrictions", "(", "GeoRestriction", "geoRestriction", ")", "{", "setGeoRestriction", "(", "geoRestriction", ")", ";", "}" ]
public Restrictions(GeoRestriction geoRestriction){_geoRestriction = geoRestriction;}
train
false
4,405
public DisableRuleResult disableRule(DisableRuleRequest request) {request = beforeClientExecution(request);return executeDisableRule(request);}
[ "public", "DisableRuleResult", "disableRule", "(", "DisableRuleRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeDisableRule", "(", "request", ")", ";", "}" ]
public virtual DisableRuleResponse DisableRule(DisableRuleRequest request){var options = new InvokeOptions();options.RequestMarshaller = DisableRuleRequestMarshaller.Instance;options.ResponseUnmarshaller = DisableRuleResponseUnmarshaller.Instance;return Invoke<DisableRuleResponse>(request, options);}
train
true
4,406
public GetSuppressedDestinationResult getSuppressedDestination(GetSuppressedDestinationRequest request) {request = beforeClientExecution(request);return executeGetSuppressedDestination(request);}
[ "public", "GetSuppressedDestinationResult", "getSuppressedDestination", "(", "GetSuppressedDestinationRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeGetSuppressedDestination", "(", "request", ")", ";", "}" ]
public virtual GetSuppressedDestinationResponse GetSuppressedDestination(GetSuppressedDestinationRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetSuppressedDestinationRequestMarshaller.Instance;options.ResponseUnmarshaller = GetSuppressedDestinationResponseUnmarshaller.Instance;return Invoke<GetSuppressedDestinationResponse>(request, options);}
train
false
4,407
public ListDomainsResult listDomains(ListDomainsRequest request) {request = beforeClientExecution(request);return executeListDomains(request);}
[ "public", "ListDomainsResult", "listDomains", "(", "ListDomainsRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeListDomains", "(", "request", ")", ";", "}" ]
public virtual ListDomainsResponse ListDomains(ListDomainsRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListDomainsRequestMarshaller.Instance;options.ResponseUnmarshaller = ListDomainsResponseUnmarshaller.Instance;return Invoke<ListDomainsResponse>(request, options);}
train
true
4,408
public StartLifecyclePolicyPreviewResult startLifecyclePolicyPreview(StartLifecyclePolicyPreviewRequest request) {request = beforeClientExecution(request);return executeStartLifecyclePolicyPreview(request);}
[ "public", "StartLifecyclePolicyPreviewResult", "startLifecyclePolicyPreview", "(", "StartLifecyclePolicyPreviewRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeStartLifecyclePolicyPreview", "(", "request", ")", ";", "}" ]
public virtual StartLifecyclePolicyPreviewResponse StartLifecyclePolicyPreview(StartLifecyclePolicyPreviewRequest request){var options = new InvokeOptions();options.RequestMarshaller = StartLifecyclePolicyPreviewRequestMarshaller.Instance;options.ResponseUnmarshaller = StartLifecyclePolicyPreviewResponseUnmarshaller.Instance;return Invoke<StartLifecyclePolicyPreviewResponse>(request, options);}
train
true
4,409
public CreateDiskFromSnapshotResult createDiskFromSnapshot(CreateDiskFromSnapshotRequest request) {request = beforeClientExecution(request);return executeCreateDiskFromSnapshot(request);}
[ "public", "CreateDiskFromSnapshotResult", "createDiskFromSnapshot", "(", "CreateDiskFromSnapshotRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeCreateDiskFromSnapshot", "(", "request", ")", ";", "}" ]
public virtual CreateDiskFromSnapshotResponse CreateDiskFromSnapshot(CreateDiskFromSnapshotRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateDiskFromSnapshotRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateDiskFromSnapshotResponseUnmarshaller.Instance;return Invoke<CreateDiskFromSnapshotResponse>(request, options);}
train
true
4,410
public SubmoduleSyncCommand submoduleSync() {return new SubmoduleSyncCommand(repo);}
[ "public", "SubmoduleSyncCommand", "submoduleSync", "(", ")", "{", "return", "new", "SubmoduleSyncCommand", "(", "repo", ")", ";", "}" ]
public virtual SubmoduleSyncCommand SubmoduleSync(){return new SubmoduleSyncCommand(repo);}
train
false
4,411
public DeleteConfigurationSetTrackingOptionsResult deleteConfigurationSetTrackingOptions(DeleteConfigurationSetTrackingOptionsRequest request) {request = beforeClientExecution(request);return executeDeleteConfigurationSetTrackingOptions(request);}
[ "public", "DeleteConfigurationSetTrackingOptionsResult", "deleteConfigurationSetTrackingOptions", "(", "DeleteConfigurationSetTrackingOptionsRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeDeleteConfigurationSetTrackingOptions", "(", "request", ")", ";", "}" ]
public virtual DeleteConfigurationSetTrackingOptionsResponse DeleteConfigurationSetTrackingOptions(DeleteConfigurationSetTrackingOptionsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteConfigurationSetTrackingOptionsRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteConfigurationSetTrackingOptionsResponseUnmarshaller.Instance;return Invoke<DeleteConfigurationSetTrackingOptionsResponse>(request, options);}
train
true
4,412
public V setValue(V value) {if (!allowModify)throw new UnsupportedOperationException();V old = values[lastPos];values[lastPos] = value;return old;}
[ "public", "V", "setValue", "(", "V", "value", ")", "{", "if", "(", "!", "allowModify", ")", "throw", "new", "UnsupportedOperationException", "(", ")", ";", "V", "old", "=", "values", "[", "lastPos", "]", ";", "values", "[", "lastPos", "]", "=", "value", ";", "return", "old", ";", "}" ]
public virtual TValue SetValue(TValue value){if (!allowModify){throw new NotSupportedException();}TValue old = outerInstance.values[lastPos].Value;outerInstance.values[lastPos].Value = value;return old;}
train
false
4,414
static public double ipmt(double r, int per, int nper, double pv, double fv, int type) {double ipmt = fv(r, per - 1, pmt(r, nper, pv, fv, type), pv, type) * r;if (type==1) ipmt /= (1 + r);return ipmt;}
[ "static", "public", "double", "ipmt", "(", "double", "r", ",", "int", "per", ",", "int", "nper", ",", "double", "pv", ",", "double", "fv", ",", "int", "type", ")", "{", "double", "ipmt", "=", "fv", "(", "r", ",", "per", "-", "1", ",", "pmt", "(", "r", ",", "nper", ",", "pv", ",", "fv", ",", "type", ")", ",", "pv", ",", "type", ")", "*", "r", ";", "if", "(", "type", "==", "1", ")", "ipmt", "/=", "(", "1", "+", "r", ")", ";", "return", "ipmt", ";", "}" ]
static public double IPMT(double r, int per, int nper, double pv, double fv, int type){double ipmt = FV(r, per - 1, PMT(r, nper, pv, fv, type), pv, type) * r;if (type == 1) ipmt /= (1 + r);return ipmt;}
train
false
4,415
public FileDictionary(InputStream dictFile, String fieldDelimiter) {in = new BufferedReader(IOUtils.getDecodingReader(dictFile, StandardCharsets.UTF_8));this.fieldDelimiter = fieldDelimiter;}
[ "public", "FileDictionary", "(", "InputStream", "dictFile", ",", "String", "fieldDelimiter", ")", "{", "in", "=", "new", "BufferedReader", "(", "IOUtils", ".", "getDecodingReader", "(", "dictFile", ",", "StandardCharsets", ".", "UTF_8", ")", ")", ";", "this", ".", "fieldDelimiter", "=", "fieldDelimiter", ";", "}" ]
public FileDictionary(Stream dictFile, string fieldDelimiter){@in = IOUtils.GetDecodingReader(dictFile, Encoding.UTF8);this.fieldDelimiter = fieldDelimiter;}
train
false
4,416
public DocumentSummaryInformation(final PropertySet ps)throws UnexpectedPropertySetTypeException {super(ps);if (!isDocumentSummaryInformation()) {throw new UnexpectedPropertySetTypeException("Not a " + getClass().getName());}}
[ "public", "DocumentSummaryInformation", "(", "final", "PropertySet", "ps", ")", "throws", "UnexpectedPropertySetTypeException", "{", "super", "(", "ps", ")", ";", "if", "(", "!", "isDocumentSummaryInformation", "(", ")", ")", "{", "throw", "new", "UnexpectedPropertySetTypeException", "(", "\"Not a \"", "+", "getClass", "(", ")", ".", "getName", "(", ")", ")", ";", "}", "}" ]
public DocumentSummaryInformation(PropertySet ps): base(ps){if (!IsDocumentSummaryInformation)throw new UnexpectedPropertySetTypeException("Not a " + GetType().Name);}
train
false
4,417
public EscherBSERecord getBSERecord(int pictureIndex) {return escherBSERecords.get(pictureIndex-1);}
[ "public", "EscherBSERecord", "getBSERecord", "(", "int", "pictureIndex", ")", "{", "return", "escherBSERecords", ".", "get", "(", "pictureIndex", "-", "1", ")", ";", "}" ]
public EscherBSERecord GetBSERecord(int pictureIndex){return (EscherBSERecord)escherBSERecords[pictureIndex - 1];}
train
false
4,418
public CreateDetectorVersionResult createDetectorVersion(CreateDetectorVersionRequest request) {request = beforeClientExecution(request);return executeCreateDetectorVersion(request);}
[ "public", "CreateDetectorVersionResult", "createDetectorVersion", "(", "CreateDetectorVersionRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeCreateDetectorVersion", "(", "request", ")", ";", "}" ]
public virtual CreateDetectorVersionResponse CreateDetectorVersion(CreateDetectorVersionRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateDetectorVersionRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateDetectorVersionResponseUnmarshaller.Instance;return Invoke<CreateDetectorVersionResponse>(request, options);}
train
false
4,419
public static DVConstraint createExplicitListConstraint(String[] explicitListValues) {return new DVConstraint(null, explicitListValues);}
[ "public", "static", "DVConstraint", "createExplicitListConstraint", "(", "String", "[", "]", "explicitListValues", ")", "{", "return", "new", "DVConstraint", "(", "null", ",", "explicitListValues", ")", ";", "}" ]
public static DVConstraint CreateExplicitListConstraint(String[] explicitListValues){return new DVConstraint(null, explicitListValues);}
train
false
4,420
public ListGroupsResult listGroups(ListGroupsRequest request) {request = beforeClientExecution(request);return executeListGroups(request);}
[ "public", "ListGroupsResult", "listGroups", "(", "ListGroupsRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeListGroups", "(", "request", ")", ";", "}" ]
public virtual ListGroupsResponse ListGroups(ListGroupsRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListGroupsRequestMarshaller.Instance;options.ResponseUnmarshaller = ListGroupsResponseUnmarshaller.Instance;return Invoke<ListGroupsResponse>(request, options);}
train
true
4,421
public DeleteScriptResult deleteScript(DeleteScriptRequest request) {request = beforeClientExecution(request);return executeDeleteScript(request);}
[ "public", "DeleteScriptResult", "deleteScript", "(", "DeleteScriptRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeDeleteScript", "(", "request", ")", ";", "}" ]
public virtual DeleteScriptResponse DeleteScript(DeleteScriptRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteScriptRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteScriptResponseUnmarshaller.Instance;return Invoke<DeleteScriptResponse>(request, options);}
train
true
4,422
public DescribeSpotDatafeedSubscriptionResult describeSpotDatafeedSubscription(DescribeSpotDatafeedSubscriptionRequest request) {request = beforeClientExecution(request);return executeDescribeSpotDatafeedSubscription(request);}
[ "public", "DescribeSpotDatafeedSubscriptionResult", "describeSpotDatafeedSubscription", "(", "DescribeSpotDatafeedSubscriptionRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeDescribeSpotDatafeedSubscription", "(", "request", ")", ";", "}" ]
public virtual DescribeSpotDatafeedSubscriptionResponse DescribeSpotDatafeedSubscription(DescribeSpotDatafeedSubscriptionRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeSpotDatafeedSubscriptionRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeSpotDatafeedSubscriptionResponseUnmarshaller.Instance;return Invoke<DescribeSpotDatafeedSubscriptionResponse>(request, options);}
train
true
4,423
public CharArrayReader(char[] buf) {this.buf = buf;this.count = buf.length;}
[ "public", "CharArrayReader", "(", "char", "[", "]", "buf", ")", "{", "this", ".", "buf", "=", "buf", ";", "this", ".", "count", "=", "buf", ".", "length", ";", "}" ]
public CharArrayReader(char[] buf){this.buf = buf;this.count = buf.Length;}
train
false
4,425
public Builder(boolean dedup) {this.dedup = dedup;}
[ "public", "Builder", "(", "boolean", "dedup", ")", "{", "this", ".", "dedup", "=", "dedup", ";", "}" ]
public Builder(bool ignoreCase){this.ignoreCase = ignoreCase;}
train
false
4,426
public synchronized void setPerfObject(String key, Object obj) {perfObjects.put(key, obj);}
[ "public", "synchronized", "void", "setPerfObject", "(", "String", "key", ",", "Object", "obj", ")", "{", "perfObjects", ".", "put", "(", "key", ",", "obj", ")", ";", "}" ]
public virtual void SetPerfObject(string key, object obj){lock (this){perfObjects[key] = obj;}}
train
false
4,427
public String toString(){StringBuilder buffer = new StringBuilder();buffer.append("[DIMENSIONS]\n");buffer.append(" .firstrow = ").append(Integer.toHexString(getFirstRow())).append("\n");buffer.append(" .lastrow = ").append(Integer.toHexString(getLastRow())).append("\n");buffer.append(" .firstcol = ").append(Integer.toHexString(getFirstCol())).append("\n");buffer.append(" .lastcol = ").append(Integer.toHexString(getLastCol())).append("\n");buffer.append(" .zero = ").append(Integer.toHexString(field_5_zero)).append("\n");buffer.append("[/DIMENSIONS]\n");return buffer.toString();}
[ "public", "String", "toString", "(", ")", "{", "StringBuilder", "buffer", "=", "new", "StringBuilder", "(", ")", ";", "buffer", ".", "append", "(", "\"[DIMENSIONS]\\n\"", ")", ";", "buffer", ".", "append", "(", "\" .firstrow = \"", ")", ".", "append", "(", "Integer", ".", "toHexString", "(", "getFirstRow", "(", ")", ")", ")", ".", "append", "(", "\"\\n\"", ")", ";", "buffer", ".", "append", "(", "\" .lastrow = \"", ")", ".", "append", "(", "Integer", ".", "toHexString", "(", "getLastRow", "(", ")", ")", ")", ".", "append", "(", "\"\\n\"", ")", ";", "buffer", ".", "append", "(", "\" .firstcol = \"", ")", ".", "append", "(", "Integer", ".", "toHexString", "(", "getFirstCol", "(", ")", ")", ")", ".", "append", "(", "\"\\n\"", ")", ";", "buffer", ".", "append", "(", "\" .lastcol = \"", ")", ".", "append", "(", "Integer", ".", "toHexString", "(", "getLastCol", "(", ")", ")", ")", ".", "append", "(", "\"\\n\"", ")", ";", "buffer", ".", "append", "(", "\" .zero = \"", ")", ".", "append", "(", "Integer", ".", "toHexString", "(", "field_5_zero", ")", ")", ".", "append", "(", "\"\\n\"", ")", ";", "buffer", ".", "append", "(", "\"[/DIMENSIONS]\\n\"", ")", ";", "return", "buffer", ".", "toString", "(", ")", ";", "}" ]
public override String ToString(){StringBuilder buffer = new StringBuilder();buffer.Append("[DIMENSIONS]\n");buffer.Append(" .firstrow = ").Append(StringUtil.ToHexString(FirstRow)).Append("\n");buffer.Append(" .lastrow = ").Append(StringUtil.ToHexString(LastRow)).Append("\n");buffer.Append(" .firstcol = ").Append(StringUtil.ToHexString(FirstCol)).Append("\n");buffer.Append(" .lastcol = ").Append(StringUtil.ToHexString(LastCol)).Append("\n");buffer.Append(" .zero = ").Append(StringUtil.ToHexString(field_5_zero)).Append("\n");buffer.Append("[/DIMENSIONS]\n");return buffer.ToString();}
train
false
4,428
public ExitStandbyResult exitStandby(ExitStandbyRequest request) {request = beforeClientExecution(request);return executeExitStandby(request);}
[ "public", "ExitStandbyResult", "exitStandby", "(", "ExitStandbyRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeExitStandby", "(", "request", ")", ";", "}" ]
public virtual ExitStandbyResponse ExitStandby(ExitStandbyRequest request){var options = new InvokeOptions();options.RequestMarshaller = ExitStandbyRequestMarshaller.Instance;options.ResponseUnmarshaller = ExitStandbyResponseUnmarshaller.Instance;return Invoke<ExitStandbyResponse>(request, options);}
train
true
4,430
public MergeException(Throwable exc, Directory dir) {super(exc);this.dir = dir;}
[ "public", "MergeException", "(", "Throwable", "exc", ",", "Directory", "dir", ")", "{", "super", "(", "exc", ")", ";", "this", ".", "dir", "=", "dir", ";", "}" ]
public MergeException(Exception exc, Directory dir): base(exc.ToString(), exc){this.dir = dir;}
train
false
4,431
public int read(CharBuffer target) throws IOException {int remaining = remaining();if (target == this) {if (remaining == 0) {return -1;}throw new IllegalArgumentException();}if (remaining == 0) {return limit > 0 && target.remaining() == 0 ? 0 : -1;}remaining = Math.min(target.remaining(), remaining);if (remaining > 0) {char[] chars = new char[remaining];get(chars);target.put(chars);}return remaining;}
[ "public", "int", "read", "(", "CharBuffer", "target", ")", "throws", "IOException", "{", "int", "remaining", "=", "remaining", "(", ")", ";", "if", "(", "target", "==", "this", ")", "{", "if", "(", "remaining", "==", "0", ")", "{", "return", "-", "1", ";", "}", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "if", "(", "remaining", "==", "0", ")", "{", "return", "limit", ">", "0", "&&", "target", ".", "remaining", "(", ")", "==", "0", "?", "0", ":", "-", "1", ";", "}", "remaining", "=", "Math", ".", "min", "(", "target", ".", "remaining", "(", ")", ",", "remaining", ")", ";", "if", "(", "remaining", ">", "0", ")", "{", "char", "[", "]", "chars", "=", "new", "char", "[", "remaining", "]", ";", "get", "(", "chars", ")", ";", "target", ".", "put", "(", "chars", ")", ";", "}", "return", "remaining", ";", "}" ]
public virtual int read(java.nio.CharBuffer target){int remaining_1 = remaining();if (target == this){if (remaining_1 == 0){return -1;}throw new System.ArgumentException();}if (remaining_1 == 0){return _limit > 0 && target.remaining() == 0 ? 0 : -1;}remaining_1 = System.Math.Min(target.remaining(), remaining_1);if (remaining_1 > 0){char[] chars = new char[remaining_1];get(chars);target.put(chars);}return remaining_1;}
train
false
4,432
public final float getFloat() {return Float.intBitsToFloat(getInt());}
[ "public", "final", "float", "getFloat", "(", ")", "{", "return", "Float", ".", "intBitsToFloat", "(", "getInt", "(", ")", ")", ";", "}" ]
public sealed override float getFloat(){return Sharpen.Util.IntBitsToFloat(getInt());}
train
false
4,433
public UpdateApplicationRequest(String applicationName) {setApplicationName(applicationName);}
[ "public", "UpdateApplicationRequest", "(", "String", "applicationName", ")", "{", "setApplicationName", "(", "applicationName", ")", ";", "}" ]
public UpdateApplicationRequest(string applicationName){_applicationName = applicationName;}
train
false
4,434
public void initReader(ByteSliceReader reader, int termID, int stream) {assert stream < streamCount;int intStart = postingsArray.intStarts[termID];final int[] ints = intPool.buffers[intStart >> IntBlockPool.INT_BLOCK_SHIFT];final int upto = intStart & IntBlockPool.INT_BLOCK_MASK;reader.init(bytePool,postingsArray.byteStarts[termID]+stream*ByteBlockPool.FIRST_LEVEL_SIZE,ints[upto+stream]);}
[ "public", "void", "initReader", "(", "ByteSliceReader", "reader", ",", "int", "termID", ",", "int", "stream", ")", "{", "assert", "stream", "<", "streamCount", ";", "int", "intStart", "=", "postingsArray", ".", "intStarts", "[", "termID", "]", ";", "final", "int", "[", "]", "ints", "=", "intPool", ".", "buffers", "[", "intStart", ">", ">", "IntBlockPool", ".", "INT_BLOCK_SHIFT", "]", ";", "final", "int", "upto", "=", "intStart", "&", "IntBlockPool", ".", "INT_BLOCK_MASK", ";", "reader", ".", "init", "(", "bytePool", ",", "postingsArray", ".", "byteStarts", "[", "termID", "]", "+", "stream", "*", "ByteBlockPool", ".", "FIRST_LEVEL_SIZE", ",", "ints", "[", "upto", "+", "stream", "]", ")", ";", "}" ]
public void InitReader(ByteSliceReader reader, int termID, int stream){Debug.Assert(stream < streamCount);int intStart = postingsArray.intStarts[termID];int[] ints = intPool.Buffers[intStart >> Int32BlockPool.INT32_BLOCK_SHIFT];int upto = intStart & Int32BlockPool.INT32_BLOCK_MASK;reader.Init(bytePool, postingsArray.byteStarts[termID] + stream * ByteBlockPool.FIRST_LEVEL_SIZE, ints[upto + stream]);}
train
false
4,435
public T next() {if (size <= index)throw new NoSuchElementException();T res = block[blkIdx];if (++blkIdx == BLOCK_SIZE) {if (++dirIdx < directory.length)block = directory[dirIdx];elseblock = null;blkIdx = 0;}index++;return res;}
[ "public", "T", "next", "(", ")", "{", "if", "(", "size", "<=", "index", ")", "throw", "new", "NoSuchElementException", "(", ")", ";", "T", "res", "=", "block", "[", "blkIdx", "]", ";", "if", "(", "++", "blkIdx", "==", "BLOCK_SIZE", ")", "{", "if", "(", "++", "dirIdx", "<", "directory", ".", "length", ")", "block", "=", "directory", "[", "dirIdx", "]", ";", "elseblock", "=", "null", ";", "blkIdx", "=", "0", ";", "}", "index", "++", ";", "return", "res", ";", "}" ]
public override T Next(){if (this._enclosing.size <= this.index){throw new NoSuchElementException();}T res = this.block[this.blkIdx];if (++this.blkIdx == BlockList<T>.BLOCK_SIZE){if (++this.dirIdx < this._enclosing.directory.Length){this.block = this._enclosing.directory[this.dirIdx];}else{this.block = null;}this.blkIdx = 0;}this.index++;return res;}
train
false
4,436
public DescribeOptionGroupOptionsResult describeOptionGroupOptions(DescribeOptionGroupOptionsRequest request) {request = beforeClientExecution(request);return executeDescribeOptionGroupOptions(request);}
[ "public", "DescribeOptionGroupOptionsResult", "describeOptionGroupOptions", "(", "DescribeOptionGroupOptionsRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeDescribeOptionGroupOptions", "(", "request", ")", ";", "}" ]
public virtual DescribeOptionGroupOptionsResponse DescribeOptionGroupOptions(DescribeOptionGroupOptionsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeOptionGroupOptionsRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeOptionGroupOptionsResponseUnmarshaller.Instance;return Invoke<DescribeOptionGroupOptionsResponse>(request, options);}
train
true
4,437
public int alloc(int size) {int index = n;int len = array.length;if (n + size >= len) {byte[] aux = new byte[len + blockSize];System.arraycopy(array, 0, aux, 0, len);array = aux;}n += size;return index;}
[ "public", "int", "alloc", "(", "int", "size", ")", "{", "int", "index", "=", "n", ";", "int", "len", "=", "array", ".", "length", ";", "if", "(", "n", "+", "size", ">=", "len", ")", "{", "byte", "[", "]", "aux", "=", "new", "byte", "[", "len", "+", "blockSize", "]", ";", "System", ".", "arraycopy", "(", "array", ",", "0", ",", "aux", ",", "0", ",", "len", ")", ";", "array", "=", "aux", ";", "}", "n", "+=", "size", ";", "return", "index", ";", "}" ]
public virtual int Alloc(int size){int index = n;int len = array.Length;if (n + size >= len){byte[] aux = new byte[len + blockSize];System.Array.Copy(array, 0, aux, 0, len);array = aux;}n += size;return index;}
train
true
4,438
public String getText() {StringBuilder text = new StringBuilder();for ( TermInfo ti: termsInfos ) {text.append( ti.getText() );}return text.toString();}
[ "public", "String", "getText", "(", ")", "{", "StringBuilder", "text", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "TermInfo", "ti", ":", "termsInfos", ")", "{", "text", ".", "append", "(", "ti", ".", "getText", "(", ")", ")", ";", "}", "return", "text", ".", "toString", "(", ")", ";", "}" ]
public virtual string GetText(){StringBuilder text = new StringBuilder();foreach (TermInfo ti in termsInfos){text.Append(ti.Text);}return text.ToString();}
train
false
4,439
public ReplaceableItem(String name) {setName(name);}
[ "public", "ReplaceableItem", "(", "String", "name", ")", "{", "setName", "(", "name", ")", ";", "}" ]
public ReplaceableItem(string name){_name = name;}
train
false
4,440
public NamePtg(LittleEndianInput in) {field_1_label_index = in.readUShort();field_2_zero = in.readShort();}
[ "public", "NamePtg", "(", "LittleEndianInput", "in", ")", "{", "field_1_label_index", "=", "in", ".", "readUShort", "(", ")", ";", "field_2_zero", "=", "in", ".", "readShort", "(", ")", ";", "}" ]
public NamePtg(ILittleEndianInput in1){field_1_label_index = in1.ReadShort();field_2_zero = in1.ReadShort();}
train
false
4,441
public int indexOf(Object object) {if (object != null) {for (int i = 0; i < a.length; i++) {if (object.equals(a[i])) {return i;}}} else {for (int i = 0; i < a.length; i++) {if (a[i] == null) {return i;}}}return -1;}
[ "public", "int", "indexOf", "(", "Object", "object", ")", "{", "if", "(", "object", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "a", ".", "length", ";", "i", "++", ")", "{", "if", "(", "object", ".", "equals", "(", "a", "[", "i", "]", ")", ")", "{", "return", "i", ";", "}", "}", "}", "else", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "a", ".", "length", ";", "i", "++", ")", "{", "if", "(", "a", "[", "i", "]", "==", "null", ")", "{", "return", "i", ";", "}", "}", "}", "return", "-", "1", ";", "}" ]
public override int indexOf(object @object){if (@object != null){{for (int i = 0; i < a.Length; i++){if (@object.Equals(a[i])){return i;}}}}else{{for (int i = 0; i < a.Length; i++){if ((object)a[i] == null){return i;}}}}return -1;}
train
false
4,442
public ListContactFlowsResult listContactFlows(ListContactFlowsRequest request) {request = beforeClientExecution(request);return executeListContactFlows(request);}
[ "public", "ListContactFlowsResult", "listContactFlows", "(", "ListContactFlowsRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeListContactFlows", "(", "request", ")", ";", "}" ]
public virtual ListContactFlowsResponse ListContactFlows(ListContactFlowsRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListContactFlowsRequestMarshaller.Instance;options.ResponseUnmarshaller = ListContactFlowsResponseUnmarshaller.Instance;return Invoke<ListContactFlowsResponse>(request, options);}
train
false
4,443
public int doLogic() throws IOException {String analyzerName = null;try {if (current >= analyzerNames.size()) {current = 0;}analyzerName = analyzerNames.get(current++);Analyzer analyzer = null;if (null == analyzerName || 0 == analyzerName.length()) {analyzerName = "org.apache.lucene.analysis.standard.StandardAnalyzer";}AnalyzerFactory factory = getRunData().getAnalyzerFactories().get(analyzerName);if (null != factory) {analyzer = factory.create();} else {if (analyzerName.contains(".")) {if (analyzerName.startsWith("standard.")) {analyzerName = "org.apache.lucene.analysis." + analyzerName;}analyzer = createAnalyzer(analyzerName);} else { try {String coreClassName = "org.apache.lucene.analysis.core." + analyzerName;analyzer = createAnalyzer(coreClassName);analyzerName = coreClassName;} catch (ClassNotFoundException e) {analyzerName = "org.apache.lucene.analysis." + analyzerName;analyzer = createAnalyzer(analyzerName);}}}getRunData().setAnalyzer(analyzer);} catch (Exception e) {throw new RuntimeException("Error creating Analyzer: " + analyzerName, e);}return 1;}
[ "public", "int", "doLogic", "(", ")", "throws", "IOException", "{", "String", "analyzerName", "=", "null", ";", "try", "{", "if", "(", "current", ">=", "analyzerNames", ".", "size", "(", ")", ")", "{", "current", "=", "0", ";", "}", "analyzerName", "=", "analyzerNames", ".", "get", "(", "current", "++", ")", ";", "Analyzer", "analyzer", "=", "null", ";", "if", "(", "null", "==", "analyzerName", "||", "0", "==", "analyzerName", ".", "length", "(", ")", ")", "{", "analyzerName", "=", "\"org.apache.lucene.analysis.standard.StandardAnalyzer\"", ";", "}", "AnalyzerFactory", "factory", "=", "getRunData", "(", ")", ".", "getAnalyzerFactories", "(", ")", ".", "get", "(", "analyzerName", ")", ";", "if", "(", "null", "!=", "factory", ")", "{", "analyzer", "=", "factory", ".", "create", "(", ")", ";", "}", "else", "{", "if", "(", "analyzerName", ".", "contains", "(", "\".\"", ")", ")", "{", "if", "(", "analyzerName", ".", "startsWith", "(", "\"standard.\"", ")", ")", "{", "analyzerName", "=", "\"org.apache.lucene.analysis.\"", "+", "analyzerName", ";", "}", "analyzer", "=", "createAnalyzer", "(", "analyzerName", ")", ";", "}", "else", "{", "try", "{", "String", "coreClassName", "=", "\"org.apache.lucene.analysis.core.\"", "+", "analyzerName", ";", "analyzer", "=", "createAnalyzer", "(", "coreClassName", ")", ";", "analyzerName", "=", "coreClassName", ";", "}", "catch", "(", "ClassNotFoundException", "e", ")", "{", "analyzerName", "=", "\"org.apache.lucene.analysis.\"", "+", "analyzerName", ";", "analyzer", "=", "createAnalyzer", "(", "analyzerName", ")", ";", "}", "}", "}", "getRunData", "(", ")", ".", "setAnalyzer", "(", "analyzer", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "throw", "new", "RuntimeException", "(", "\"Error creating Analyzer: \"", "+", "analyzerName", ",", "e", ")", ";", "}", "return", "1", ";", "}" ]
public override int DoLogic(){string analyzerName = null;try{if (current >= analyzerNames.Count){current = 0;}analyzerName = analyzerNames[current++];Analyzer analyzer = null;if (null == analyzerName || 0 == analyzerName.Length){analyzerName = typeof(Lucene.Net.Analysis.Standard.StandardAnalyzer).AssemblyQualifiedName;}AnalyzerFactory factory;if (RunData.AnalyzerFactories.TryGetValue(analyzerName, out factory) && null != factory){analyzer = factory.Create();}else{if (analyzerName.Contains(".")){if (analyzerName.StartsWith("Standard.", StringComparison.Ordinal)){analyzerName = "Lucene.Net.Analysis." + analyzerName;}analyzer = CreateAnalyzer(analyzerName);}else{ try{string coreClassName = "Lucene.Net.Analysis.Core." + analyzerName;analyzer = CreateAnalyzer(coreClassName);analyzerName = coreClassName;}catch (TypeLoadException ){analyzerName = "Lucene.Net.Analysis." + analyzerName;analyzer = CreateAnalyzer(analyzerName);}}}RunData.Analyzer = analyzer;}catch (Exception e){throw new Exception("Error creating Analyzer: " + analyzerName, e);}return 1;}
train
false
4,444
public int serializeSimplePart( byte[] data, int offset ){LittleEndian.putShort(data, offset, getId());LittleEndian.putInt(data, offset + 2, propertyValue);return 6;}
[ "public", "int", "serializeSimplePart", "(", "byte", "[", "]", "data", ",", "int", "offset", ")", "{", "LittleEndian", ".", "putShort", "(", "data", ",", "offset", ",", "getId", "(", ")", ")", ";", "LittleEndian", ".", "putInt", "(", "data", ",", "offset", "+", "2", ",", "propertyValue", ")", ";", "return", "6", ";", "}" ]
public override int SerializeSimplePart(byte[] data, int offset){LittleEndian.PutShort(data, offset, Id);LittleEndian.PutInt(data, offset + 2, propertyValue);return 6;}
train
false
4,446
@Override public Iterator<V> iterator() {return new ValueIterator();}
[ "@", "Override", "public", "Iterator", "<", "V", ">", "iterator", "(", ")", "{", "return", "new", "ValueIterator", "(", ")", ";", "}" ]
public override java.util.Iterator<V> iterator(){return new java.util.Hashtable<K, V>.ValueIterator(this._enclosing);}
train
false
4,447
public boolean equals(Object obj) {if (this == obj) {return true;}if (!super.equals(obj)) {return false;}PrefixQuery other = (PrefixQuery) obj;if (!term.equals(other.term)) {return false;}return true;}
[ "public", "boolean", "equals", "(", "Object", "obj", ")", "{", "if", "(", "this", "==", "obj", ")", "{", "return", "true", ";", "}", "if", "(", "!", "super", ".", "equals", "(", "obj", ")", ")", "{", "return", "false", ";", "}", "PrefixQuery", "other", "=", "(", "PrefixQuery", ")", "obj", ";", "if", "(", "!", "term", ".", "equals", "(", "other", ".", "term", ")", ")", "{", "return", "false", ";", "}", "return", "true", ";", "}" ]
public override bool Equals(object obj){if (this == obj){return true;}if (!base.Equals(obj)){return false;}if (this.GetType() != obj.GetType()){return false;}PrefixQuery other = (PrefixQuery)obj;if (_prefix == null){if (other._prefix != null){return false;}}else if (!_prefix.Equals(other._prefix)){return false;}return true;}
train
false
4,448
public boolean isSheetVeryHidden(int sheetnum) {return getBoundSheetRec(sheetnum).isVeryHidden();}
[ "public", "boolean", "isSheetVeryHidden", "(", "int", "sheetnum", ")", "{", "return", "getBoundSheetRec", "(", "sheetnum", ")", ".", "isVeryHidden", "(", ")", ";", "}" ]
public bool IsSheetVeryHidden(int sheetnum){return GetBoundSheetRec(sheetnum).IsVeryHidden;}
train
false
4,449
public UpdateAccessKeyRequest(String accessKeyId, StatusType status) {setAccessKeyId(accessKeyId);setStatus(status.toString());}
[ "public", "UpdateAccessKeyRequest", "(", "String", "accessKeyId", ",", "StatusType", "status", ")", "{", "setAccessKeyId", "(", "accessKeyId", ")", ";", "setStatus", "(", "status", ".", "toString", "(", ")", ")", ";", "}" ]
public UpdateAccessKeyRequest(string accessKeyId, StatusType status){_accessKeyId = accessKeyId;_status = status;}
train
false
4,450
public static int countMatchingCellsInArea(ThreeDEval areaEval, I_MatchPredicate criteriaPredicate) {int result = 0;final int firstSheetIndex = areaEval.getFirstSheetIndex();final int lastSheetIndex = areaEval.getLastSheetIndex();for (int sIx = firstSheetIndex; sIx <= lastSheetIndex; sIx++) {int height = areaEval.getHeight();int width = areaEval.getWidth();for (int rrIx=0; rrIx<height; rrIx++) {for (int rcIx=0; rcIx<width; rcIx++) {ValueEval ve = areaEval.getValue(sIx, rrIx, rcIx);if(criteriaPredicate instanceof I_MatchAreaPredicate){I_MatchAreaPredicate areaPredicate = (I_MatchAreaPredicate)criteriaPredicate;if(!areaPredicate.matches(areaEval, rrIx, rcIx)) continue;}if(criteriaPredicate.matches(ve)) {result++;}}}}return result;}
[ "public", "static", "int", "countMatchingCellsInArea", "(", "ThreeDEval", "areaEval", ",", "I_MatchPredicate", "criteriaPredicate", ")", "{", "int", "result", "=", "0", ";", "final", "int", "firstSheetIndex", "=", "areaEval", ".", "getFirstSheetIndex", "(", ")", ";", "final", "int", "lastSheetIndex", "=", "areaEval", ".", "getLastSheetIndex", "(", ")", ";", "for", "(", "int", "sIx", "=", "firstSheetIndex", ";", "sIx", "<=", "lastSheetIndex", ";", "sIx", "++", ")", "{", "int", "height", "=", "areaEval", ".", "getHeight", "(", ")", ";", "int", "width", "=", "areaEval", ".", "getWidth", "(", ")", ";", "for", "(", "int", "rrIx", "=", "0", ";", "rrIx", "<", "height", ";", "rrIx", "++", ")", "{", "for", "(", "int", "rcIx", "=", "0", ";", "rcIx", "<", "width", ";", "rcIx", "++", ")", "{", "ValueEval", "ve", "=", "areaEval", ".", "getValue", "(", "sIx", ",", "rrIx", ",", "rcIx", ")", ";", "if", "(", "criteriaPredicate", "instanceof", "I_MatchAreaPredicate", ")", "{", "I_MatchAreaPredicate", "areaPredicate", "=", "(", "I_MatchAreaPredicate", ")", "criteriaPredicate", ";", "if", "(", "!", "areaPredicate", ".", "matches", "(", "areaEval", ",", "rrIx", ",", "rcIx", ")", ")", "continue", ";", "}", "if", "(", "criteriaPredicate", ".", "matches", "(", "ve", ")", ")", "{", "result", "++", ";", "}", "}", "}", "}", "return", "result", ";", "}" ]
public static int CountMatchingCellsInArea(ThreeDEval areaEval, IMatchPredicate criteriaPredicate){int result = 0;for (int sIx = areaEval.FirstSheetIndex; sIx <= areaEval.LastSheetIndex; sIx++){int height = areaEval.Height;int width = areaEval.Width;for (int rrIx = 0; rrIx < height; rrIx++){for (int rcIx = 0; rcIx < width; rcIx++){ValueEval ve = areaEval.GetValue(sIx, rrIx, rcIx);if (criteriaPredicate is I_MatchAreaPredicate){I_MatchAreaPredicate areaPredicate = (I_MatchAreaPredicate)criteriaPredicate;if (!areaPredicate.Matches(areaEval, rrIx, rcIx)) continue;}if (criteriaPredicate.Matches(ve)){result++;}}}}return result;}
train
false
4,452
public EscherComplexProperty(short id, int complexSize) {super((short)(id | IS_COMPLEX));complexData = IOUtils.safelyAllocate(complexSize, MAX_RECORD_LENGTH);}
[ "public", "EscherComplexProperty", "(", "short", "id", ",", "int", "complexSize", ")", "{", "super", "(", "(", "short", ")", "(", "id", "|", "IS_COMPLEX", ")", ")", ";", "complexData", "=", "IOUtils", ".", "safelyAllocate", "(", "complexSize", ",", "MAX_RECORD_LENGTH", ")", ";", "}" ]
public EscherComplexProperty(short id, byte[] complexData): base(id){this._complexData = complexData;}
train
false
4,453
public CreateNodeResult createNode(CreateNodeRequest request) {request = beforeClientExecution(request);return executeCreateNode(request);}
[ "public", "CreateNodeResult", "createNode", "(", "CreateNodeRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeCreateNode", "(", "request", ")", ";", "}" ]
public virtual CreateNodeResponse CreateNode(CreateNodeRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateNodeRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateNodeResponseUnmarshaller.Instance;return Invoke<CreateNodeResponse>(request, options);}
train
false
4,457
public void setDeltaBaseCacheLimit(int newLimit) {deltaBaseCacheLimit = newLimit;}
[ "public", "void", "setDeltaBaseCacheLimit", "(", "int", "newLimit", ")", "{", "deltaBaseCacheLimit", "=", "newLimit", ";", "}" ]
public virtual void SetDeltaBaseCacheLimit(int newLimit){deltaBaseCacheLimit = newLimit;}
train
false
4,458
public ServerException(String errCode, String errMsg, String requestId) {this(errCode, errMsg);this.setRequestId(requestId);}
[ "public", "ServerException", "(", "String", "errCode", ",", "String", "errMsg", ",", "String", "requestId", ")", "{", "this", "(", "errCode", ",", "errMsg", ")", ";", "this", ".", "setRequestId", "(", "requestId", ")", ";", "}" ]
public ServerException(string errorCode, string errorMessage, string requestId) :base(errorCode, errorMessage, requestId){RequestId = requestId;}
train
false
4,459
final public SrndQuery NQuery() throws ParseException {SrndQuery q;ArrayList<SrndQuery> queries;Token dt;q = WQuery();label_5:while (true) {switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {case N:;break;default:jj_la1[3] = jj_gen;break label_5;}dt = jj_consume_token(N);queries = new ArrayList<SrndQuery>();queries.add(q); q = WQuery();queries.add(q);q = getDistanceQuery(queries, true , dt, false );}{if (true) return q;}throw new Error("Missing return statement in function");}
[ "final", "public", "SrndQuery", "NQuery", "(", ")", "throws", "ParseException", "{", "SrndQuery", "q", ";", "ArrayList", "<", "SrndQuery", ">", "queries", ";", "Token", "dt", ";", "q", "=", "WQuery", "(", ")", ";", "label_5", ":", "while", "(", "true", ")", "{", "switch", "(", "(", "jj_ntk", "==", "-", "1", ")", "?", "jj_ntk", "(", ")", ":", "jj_ntk", ")", "{", "case", "N", ":", ";", "break", ";", "default", ":", "jj_la1", "[", "3", "]", "=", "jj_gen", ";", "break", "label_5", ";", "}", "dt", "=", "jj_consume_token", "(", "N", ")", ";", "queries", "=", "new", "ArrayList", "<", "SrndQuery", ">", "(", ")", ";", "queries", ".", "add", "(", "q", ")", ";", "q", "=", "WQuery", "(", ")", ";", "queries", ".", "add", "(", "q", ")", ";", "q", "=", "getDistanceQuery", "(", "queries", ",", "true", ",", "dt", ",", "false", ")", ";", "}", "{", "if", "(", "true", ")", "return", "q", ";", "}", "throw", "new", "Error", "(", "\"Missing return statement in function\"", ")", ";", "}" ]
public SrndQuery NQuery(){SrndQuery q;IList<SrndQuery> queries;Token dt;q = WQuery();while (true){switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk){case RegexpToken.N:;break;default:jj_la1[3] = jj_gen;goto label_5;}dt = Jj_consume_token(RegexpToken.N);queries = new List<SrndQuery>();queries.Add(q); q = WQuery();queries.Add(q);q = GetDistanceQuery(queries, true , dt, false );}label_5:{ if (true) return q; }throw new Exception("Missing return statement in function");}
train
false
4,460
public MoreLikeThisQuery(String likeText, String[] moreLikeFields, Analyzer analyzer, String fieldName) {this.likeText = Objects.requireNonNull(likeText);this.moreLikeFields = Objects.requireNonNull(moreLikeFields);this.analyzer = Objects.requireNonNull(analyzer);this.fieldName = Objects.requireNonNull(fieldName);}
[ "public", "MoreLikeThisQuery", "(", "String", "likeText", ",", "String", "[", "]", "moreLikeFields", ",", "Analyzer", "analyzer", ",", "String", "fieldName", ")", "{", "this", ".", "likeText", "=", "Objects", ".", "requireNonNull", "(", "likeText", ")", ";", "this", ".", "moreLikeFields", "=", "Objects", ".", "requireNonNull", "(", "moreLikeFields", ")", ";", "this", ".", "analyzer", "=", "Objects", ".", "requireNonNull", "(", "analyzer", ")", ";", "this", ".", "fieldName", "=", "Objects", ".", "requireNonNull", "(", "fieldName", ")", ";", "}" ]
public MoreLikeThisQuery(string likeText, string[] moreLikeFields, Analyzer analyzer, string fieldName){this.LikeText = likeText;this.MoreLikeFields = moreLikeFields;this.Analyzer = analyzer;this.fieldName = fieldName;}
train
false