Datasets:

Modalities:
Text
Formats:
parquet
Languages:
code
ArXiv:
Libraries:
Datasets
pandas
License:
id
int32
0
10.3k
java
stringlengths
29
1.4k
cs
stringlengths
28
1.38k
0
public ListSpeechSynthesisTasksResult listSpeechSynthesisTasks(ListSpeechSynthesisTasksRequest request) {request = beforeClientExecution(request);return executeListSpeechSynthesisTasks(request);}
public virtual ListSpeechSynthesisTasksResponse ListSpeechSynthesisTasks(ListSpeechSynthesisTasksRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListSpeechSynthesisTasksRequestMarshaller.Instance;options.ResponseUnmarshaller = ListSpeechSynthesisTasksResponseUnmarshaller.Instance;return Invoke<ListSpeechSynthesisTasksResponse>(request, options);}
1
public UpdateJourneyStateResult updateJourneyState(UpdateJourneyStateRequest request) {request = beforeClientExecution(request);return executeUpdateJourneyState(request);}
public virtual UpdateJourneyStateResponse UpdateJourneyState(UpdateJourneyStateRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateJourneyStateRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateJourneyStateResponseUnmarshaller.Instance;return Invoke<UpdateJourneyStateResponse>(request, options);}
2
public void removePresentationFormat() {remove1stProperty(PropertyIDMap.PID_PRESFORMAT);}
public void RemovePresentationFormat(){MutableSection s = (MutableSection)FirstSection;s.RemoveProperty(PropertyIDMap.PID_PRESFORMAT);}
3
public CellRangeAddressList(int firstRow, int lastRow, int firstCol, int lastCol) {this();addCellRangeAddress(firstRow, firstCol, lastRow, lastCol);}
public CellRangeAddressList(int firstRow, int lastRow, int firstCol, int lastCol): this(){AddCellRangeAddress(firstRow, firstCol, lastRow, lastCol);}
4
public void delete(int key) {int i = binarySearch(mKeys, 0, mSize, key);if (i >= 0) {if (mValues[i] != DELETED) {mValues[i] = DELETED;mGarbage = true;}}}
public virtual void delete(int key){int i = binarySearch(mKeys, 0, mSize, key);if (i >= 0){if (mValues[i] != DELETED){mValues[i] = DELETED;mGarbage = true;}}}
5
public CreateBranchCommand setStartPoint(RevCommit startPoint) {checkCallable();this.startCommit = startPoint;this.startPoint = null;return this;}
public virtual NGit.Api.CreateBranchCommand SetStartPoint(RevCommit startPoint){CheckCallable();this.startCommit = startPoint;this.startPoint = null;return this;}
6
public int centerX() {return x + w / 2;}
public int centerX(){return (left + right) >> 1;}
7
public ListPresetsResult listPresets() {return listPresets(new ListPresetsRequest());}
public virtual ListPresetsResponse ListPresets(){return ListPresets(new ListPresetsRequest());}
8
public DeleteFolderContentsResult deleteFolderContents(DeleteFolderContentsRequest request) {request = beforeClientExecution(request);return executeDeleteFolderContents(request);}
public virtual DeleteFolderContentsResponse DeleteFolderContents(DeleteFolderContentsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteFolderContentsRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteFolderContentsResponseUnmarshaller.Instance;return Invoke<DeleteFolderContentsResponse>(request, options);}
9
public GetConsoleOutputResult getConsoleOutput(GetConsoleOutputRequest request) {request = beforeClientExecution(request);return executeGetConsoleOutput(request);}
public virtual GetConsoleOutputResponse GetConsoleOutput(GetConsoleOutputRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetConsoleOutputRequestMarshaller.Instance;options.ResponseUnmarshaller = GetConsoleOutputResponseUnmarshaller.Instance;return Invoke<GetConsoleOutputResponse>(request, options);}
10
public PutMailboxPermissionsResult putMailboxPermissions(PutMailboxPermissionsRequest request) {request = beforeClientExecution(request);return executePutMailboxPermissions(request);}
public virtual PutMailboxPermissionsResponse PutMailboxPermissions(PutMailboxPermissionsRequest request){var options = new InvokeOptions();options.RequestMarshaller = PutMailboxPermissionsRequestMarshaller.Instance;options.ResponseUnmarshaller = PutMailboxPermissionsResponseUnmarshaller.Instance;return Invoke<PutMailboxPermissionsResponse>(request, options);}
11
public Cluster disableSnapshotCopy(DisableSnapshotCopyRequest request) {request = beforeClientExecution(request);return executeDisableSnapshotCopy(request);}
public virtual DisableSnapshotCopyResponse DisableSnapshotCopy(DisableSnapshotCopyRequest request){var options = new InvokeOptions();options.RequestMarshaller = DisableSnapshotCopyRequestMarshaller.Instance;options.ResponseUnmarshaller = DisableSnapshotCopyResponseUnmarshaller.Instance;return Invoke<DisableSnapshotCopyResponse>(request, options);}
12
public static String stripExtension(String filename) {int idx = filename.indexOf('.');if (idx != -1) {filename = filename.substring(0, idx);}return filename;}
public static string StripExtension(string filename){int idx = filename.IndexOf('.');if (idx != -1){filename = filename.Substring(0, idx);}return filename;}
13
public ByteBuffer putInt(int value) {throw new ReadOnlyBufferException();}
public override java.nio.ByteBuffer putInt(int value){throw new System.NotImplementedException();}
14
public int lastIndexOf(final int o){int rval = _limit - 1;for (; rval >= 0; rval--){if (o == _array[ rval ]){break;}}return rval;}
public int LastIndexOf(int o){int rval = _limit - 1;for (; rval >= 0; rval--){if (o == _array[rval]){break;}}return rval;}
15
public void setCountsByTime(int[] counts, long msecStep) {countsByTime = counts;countsByTimeStepMSec = msecStep;}
public virtual void SetCountsByTime(int[] counts, long msecStep){countsByTime = counts;countsByTimeStepMSec = msecStep;}
16
public FeatHdrRecord(RecordInputStream in) {futureHeader = new FtrHeader(in);isf_sharedFeatureType = in.readShort();reserved = in.readByte();cbHdrData = in.readInt();rgbHdrData = in.readRemainder();}
public FeatHdrRecord(RecordInputStream in1){futureHeader = new FtrHeader(in1);isf_sharedFeatureType = in1.ReadShort();reserved = (byte)in1.ReadByte();cbHdrData = in1.ReadInt();rgbHdrData = in1.ReadRemainder();}
17
public CopyOnWriteArrayList() {elements = EmptyArray.OBJECT;}
public CopyOnWriteArrayList(){elements = libcore.util.EmptyArray.OBJECT;}
18
public WriteRequest(DeleteRequest deleteRequest) {setDeleteRequest(deleteRequest);}
public WriteRequest(DeleteRequest deleteRequest){_deleteRequest = deleteRequest;}
19
public void readFully(byte[] buf){_in.readFully(buf);}
public void ReadFully(byte[] buf){_in.ReadFully(buf);}
20
public static Cell getCell(Row row, int columnIndex) {Cell cell = row.getCell(columnIndex);if (cell == null) {cell = row.createCell(columnIndex);}return cell;}
public static ICell GetCell(IRow row, int column){ICell cell = row.GetCell(column);if (cell == null){cell = row.CreateCell(column);}return cell;}
21
public void setPackConfig(PackConfig pc) {this.packConfig = pc;}
public virtual void SetPackConfig(PackConfig pc){this.packConfig = pc;}
22
public String getSignerName() {return "HMAC-SHA1";}
public override string GetSignerName(){return "HMAC-SHA1";}
23
public IntervalSet or(IntSet a) {IntervalSet o = new IntervalSet();o.addAll(this);o.addAll(a);return o;}
public virtual Antlr4.Runtime.Misc.IntervalSet Or(IIntSet a){Antlr4.Runtime.Misc.IntervalSet o = new Antlr4.Runtime.Misc.IntervalSet();o.AddAll(this);o.AddAll(a);return o;}
24
public String toString() {return getClass().getName() + " [" +_value +"]";}
public override String ToString(){StringBuilder sb = new StringBuilder(64);sb.Append(GetType().Name).Append(" [");sb.Append(value);sb.Append("]");return sb.ToString();}
25
public DescribeVpcEndpointServicePermissionsResult describeVpcEndpointServicePermissions(DescribeVpcEndpointServicePermissionsRequest request) {request = beforeClientExecution(request);return executeDescribeVpcEndpointServicePermissions(request);}
public virtual DescribeVpcEndpointServicePermissionsResponse DescribeVpcEndpointServicePermissions(DescribeVpcEndpointServicePermissionsRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeVpcEndpointServicePermissionsRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeVpcEndpointServicePermissionsResponseUnmarshaller.Instance;return Invoke<DescribeVpcEndpointServicePermissionsResponse>(request, options);}
26
public static byte[] copyOfRange(byte[] original, int start, int end) {if (start > end) {throw new IllegalArgumentException();}int originalLength = original.length;if (start < 0 || start > originalLength) {throw new ArrayIndexOutOfBoundsException();}int resultLength = end - start;int copyLength = Math.min(resultLength, originalLength - start);byte[] result = new byte[resultLength];System.arraycopy(original, start, result, 0, copyLength);return result;}
public static byte[] copyOfRange(byte[] original, int start, int end){if (start > end){throw new System.ArgumentException();}int originalLength = original.Length;if (start < 0 || start > originalLength){throw new System.IndexOutOfRangeException();}int resultLength = end - start;int copyLength = System.Math.Min(resultLength, originalLength - start);byte[] result = new byte[resultLength];System.Array.Copy(original, start, result, 0, copyLength);return result;}
27
public ListTopicsRequest(String nextToken) {setNextToken(nextToken);}
public ListTopicsRequest(string nextToken){_nextToken = nextToken;}
28
public void finish(FieldInfos fis, int numDocs) throws IOException {if (!pendingDocs.isEmpty()) {flush();numDirtyChunks++; }if (numDocs != this.numDocs) {throw new RuntimeException("Wrote " + this.numDocs + " docs, finish called with numDocs=" + numDocs);}indexWriter.finish(numDocs, vectorsStream.getFilePointer());vectorsStream.writeVLong(numChunks);vectorsStream.writeVLong(numDirtyChunks);CodecUtil.writeFooter(vectorsStream);}
public override void Finish(FieldInfos fis, int numDocs){if (!(pendingDocs.Count == 0)){Flush();}if (numDocs != this.numDocs){throw new Exception("Wrote " + this.numDocs + " docs, finish called with numDocs=" + numDocs);}indexWriter.Finish(numDocs, vectorsStream.GetFilePointer());CodecUtil.WriteFooter(vectorsStream);}
29
public boolean isIndexTerm(BytesRef term, TermStats stats) {if (count >= interval) {count = 1;return true;} else {count++;return false;}}
public override bool IsIndexTerm(BytesRef term, TermStats stats){if (count >= interval){count = 1;return true;}else{count++;return false;}}
30
public AssociateDhcpOptionsResult associateDhcpOptions(AssociateDhcpOptionsRequest request) {request = beforeClientExecution(request);return executeAssociateDhcpOptions(request);}
public virtual AssociateDhcpOptionsResponse AssociateDhcpOptions(AssociateDhcpOptionsRequest request){var options = new InvokeOptions();options.RequestMarshaller = AssociateDhcpOptionsRequestMarshaller.Instance;options.ResponseUnmarshaller = AssociateDhcpOptionsResponseUnmarshaller.Instance;return Invoke<AssociateDhcpOptionsResponse>(request, options);}
31
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0, ValueEval arg1,ValueEval arg2) {return evaluate(srcRowIndex, srcColumnIndex, arg0, arg1, arg2, DEFAULT_ARG3);}
public override ValueEval Evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0, ValueEval arg1,ValueEval arg2){return Evaluate(srcRowIndex, srcColumnIndex, arg0, arg1, arg2, DEFAULT_ARG3);}
32
public void disconnect() {if (sock.isConnected())sock.disconnect();}
public virtual void Disconnect(){if (sock.IsConnected()){sock.Disconnect();}}
33
public PredictionContext add(PredictionContext ctx) {if ( ctx==PredictionContext.EMPTY ) return PredictionContext.EMPTY;PredictionContext existing = cache.get(ctx);if ( existing!=null ) {return existing;}cache.put(ctx, ctx);return ctx;}
public PredictionContext Add(PredictionContext ctx){if (ctx == PredictionContext.EMPTY)return PredictionContext.EMPTY;PredictionContext existing = cache.Get(ctx);if (existing != null){return existing;}cache.Put(ctx, ctx);return ctx;}
34
public UploadLayerPartResult uploadLayerPart(UploadLayerPartRequest request) {request = beforeClientExecution(request);return executeUploadLayerPart(request);}
public virtual UploadLayerPartResponse UploadLayerPart(UploadLayerPartRequest request){var options = new InvokeOptions();options.RequestMarshaller = UploadLayerPartRequestMarshaller.Instance;options.ResponseUnmarshaller = UploadLayerPartResponseUnmarshaller.Instance;return Invoke<UploadLayerPartResponse>(request, options);}
35
public String getScriptText() {return getScriptText(null, null);}
public virtual string GetScriptText(){return GetScriptText(null, null);}
36
public DescribeClusterSubnetGroupsResult describeClusterSubnetGroups() {return describeClusterSubnetGroups(new DescribeClusterSubnetGroupsRequest());}
public virtual DescribeClusterSubnetGroupsResponse DescribeClusterSubnetGroups(){return DescribeClusterSubnetGroups(new DescribeClusterSubnetGroupsRequest());}
37
public char setIndex(int position) {if (position < getBeginIndex() || position > getEndIndex())throw new IllegalArgumentException("Illegal Position: " + position);index = start + position;return current();}
public override char SetIndex(int position){if (position < BeginIndex || position > EndIndex)throw new ArgumentException("Illegal Position: " + position);index = start + position;return Current;}
38
public GetPhoneNumberOrderResult getPhoneNumberOrder(GetPhoneNumberOrderRequest request) {request = beforeClientExecution(request);return executeGetPhoneNumberOrder(request);}
public virtual GetPhoneNumberOrderResponse GetPhoneNumberOrder(GetPhoneNumberOrderRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetPhoneNumberOrderRequestMarshaller.Instance;options.ResponseUnmarshaller = GetPhoneNumberOrderResponseUnmarshaller.Instance;return Invoke<GetPhoneNumberOrderResponse>(request, options);}
39
public EpsilonTransition(ATNState target, int outermostPrecedenceReturn) {super(target);this.outermostPrecedenceReturn = outermostPrecedenceReturn;}
public EpsilonTransition(ATNState target, int outermostPrecedenceReturn): base(target){this.outermostPrecedenceReturn = outermostPrecedenceReturn;}
40
public DiffCommand setContextLines(int contextLines) {this.contextLines = contextLines;return this;}
public virtual NGit.Api.DiffCommand SetContextLines(int contextLines){this.contextLines = contextLines;return this;}
41
public RejectVpcPeeringConnectionResult rejectVpcPeeringConnection(RejectVpcPeeringConnectionRequest request) {request = beforeClientExecution(request);return executeRejectVpcPeeringConnection(request);}
public virtual RejectVpcPeeringConnectionResponse RejectVpcPeeringConnection(RejectVpcPeeringConnectionRequest request){var options = new InvokeOptions();options.RequestMarshaller = RejectVpcPeeringConnectionRequestMarshaller.Instance;options.ResponseUnmarshaller = RejectVpcPeeringConnectionResponseUnmarshaller.Instance;return Invoke<RejectVpcPeeringConnectionResponse>(request, options);}
42
public static boolean equals(int[] array1, int[] array2) {if (array1 == array2) {return true;}if (array1 == null || array2 == null || array1.length != array2.length) {return false;}for (int i = 0; i < array1.length; i++) {if (array1[i] != array2[i]) {return false;}}return true;}
public static bool equals(int[] array1, int[] array2){if (array1 == array2){return true;}if (array1 == null || array2 == null || array1.Length != array2.Length){return false;}{for (int i = 0; i < array1.Length; i++){if (array1[i] != array2[i]){return false;}}}return true;}
43
public static void main(String[] args) throws IOException {if (args.length<1) {System.err.println("Usage: java QualityQueriesFinder <index-dir>");System.exit(1);}QualityQueriesFinder qqf = new QualityQueriesFinder(FSDirectory.open(Paths.get(args[0])));String q[] = qqf.bestQueries("body",20);for (int i=0; i<q.length; i++) {System.out.println(newline+formatQueryAsTrecTopic(i,q[i],null,null));}}
public static void Main(string[] args){if (args.Length < 1){throw new ArgumentException();}QualityQueriesFinder qqf = new QualityQueriesFinder(FSDirectory.Open(new DirectoryInfo(args[0])));string[] q = qqf.BestQueries("body", 20);for (int i = 0; i < q.Length; i++){Console.WriteLine(newline + FormatQueryAsTrecTopic(i, q[i], null, null));}}
44
public CharsRef(char[] chars, int offset, int length) {this.chars = chars;this.offset = offset;this.length = length;assert isValid();}
public CharsRef(char[] chars, int offset, int length){this.chars = chars;this.Offset = offset;this.Length = length;Debug.Assert(IsValid());}
45
public UpdateIPSetResult updateIPSet(UpdateIPSetRequest request) {request = beforeClientExecution(request);return executeUpdateIPSet(request);}
public virtual UpdateIPSetResponse UpdateIPSet(UpdateIPSetRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateIPSetRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateIPSetResponseUnmarshaller.Instance;return Invoke<UpdateIPSetResponse>(request, options);}
46
public void print(Object obj) {print(String.valueOf(obj));}
public virtual void print(object obj){print(Sharpen.StringHelper.GetValueOf(obj));}
47
public String toString() {return "IndexFileDeleter.CommitPoint(" + segmentsFileName + ")";}
public override string ToString(){return "IndexFileDeleter.CommitPoint(" + segmentsFileName + ")";}
48
public synchronized boolean waitForGeneration(long targetGen, int maxMS) throws InterruptedException {if (targetGen > searchingGen) {reopenLock.lock();waitingGen = Math.max(waitingGen, targetGen);try {reopenCond.signal();} finally {reopenLock.unlock();}long startMS = System.nanoTime()/1000000;while (targetGen > searchingGen) {if (maxMS < 0) {wait();} else {long msLeft = (startMS + maxMS) - System.nanoTime()/1000000;if (msLeft <= 0) {return false;} else {wait(msLeft);}}}}return true;}
public virtual bool WaitForGeneration(long targetGen, int maxMS){long curGen = writer.Generation;if (targetGen > curGen){throw new System.ArgumentException("targetGen=" + targetGen + " was never returned by the ReferenceManager instance (current gen=" + curGen + ")");}lock (this)if (targetGen <= searchingGen)return true;else{waitingGen = Math.Max(waitingGen, targetGen);reopenCond.Set();available.Reset();}long startMS = Time.NanoTime() / 1000000;while (targetGen > Interlocked.Read(ref searchingGen)){if (maxMS < 0){available.WaitOne();}else{long msLeft = (startMS + maxMS) - (Time.NanoTime()) / 1000000;if (msLeft <= 0){return false;}else{available.WaitOne(TimeSpan.FromMilliseconds(msLeft));}}}return true;}
49
public StringBuffer append(boolean b) {return append(b ? "true" : "false");}
public java.lang.StringBuffer append(bool b){return append(b ? "true" : "false");}
50
public ByteBuffer put(int index, byte b) {throw new ReadOnlyBufferException();}
public override java.nio.ByteBuffer put(int index, byte b){throw new java.nio.ReadOnlyBufferException();}
51
public int getLineCount() {return lineCount;}
public virtual int GetLineCount(){return lineCount;}
52
public boolean equals( Object o ) {return o instanceof DutchStemmer;}
public override bool Equals(object o){return o is DutchStemmer;}
53
public CreateNotificationSubscriptionResult createNotificationSubscription(CreateNotificationSubscriptionRequest request) {request = beforeClientExecution(request);return executeCreateNotificationSubscription(request);}
public virtual CreateNotificationSubscriptionResponse CreateNotificationSubscription(CreateNotificationSubscriptionRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateNotificationSubscriptionRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateNotificationSubscriptionResponseUnmarshaller.Instance;return Invoke<CreateNotificationSubscriptionResponse>(request, options);}
54
public boolean isOutdated() {return snapshot.isModified(getFile());}
public virtual bool IsOutdated(){return snapshot.IsModified(GetFile());}
55
public DescribeVirtualInterfacesResult describeVirtualInterfaces() {return describeVirtualInterfaces(new DescribeVirtualInterfacesRequest());}
public virtual DescribeVirtualInterfacesResponse DescribeVirtualInterfaces(){return DescribeVirtualInterfaces(new DescribeVirtualInterfacesRequest());}
56
public void onChanged() {buildMap();for (DataSetObserver o : mObservers) {o.onChanged();}}
public override void onChanged(){this._enclosing.refreshExpGroupMetadataList(true, true);this._enclosing.notifyDataSetChanged();}
57
public DeleteEventTrackerResult deleteEventTracker(DeleteEventTrackerRequest request) {request = beforeClientExecution(request);return executeDeleteEventTracker(request);}
public virtual DeleteEventTrackerResponse DeleteEventTracker(DeleteEventTrackerRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteEventTrackerRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteEventTrackerResponseUnmarshaller.Instance;return Invoke<DeleteEventTrackerResponse>(request, options);}
58
public boolean matches(ValueEval x) {if (x instanceof BlankEval) {switch(getCode()) {case CmpOp.NONE:case CmpOp.EQ:return _value.length() == 0;case CmpOp.NE:return _value.length() != 0;}return false;}if(!(x instanceof StringEval)) {return false;}String testedValue = ((StringEval) x).getStringValue();if (testedValue.length() < 1 && _value.length() < 1) {switch(getCode()) {case CmpOp.NONE: return true;case CmpOp.EQ: return false;case CmpOp.NE: return true;}return false;}if (_pattern != null) {return evaluate(_pattern.matcher(testedValue).matches());}return evaluate(testedValue.compareToIgnoreCase(_value));}
public override bool Matches(ValueEval x){if (x is BlankEval){switch (_operator.Code){case CmpOp.NONE:case CmpOp.EQ:return _value.Length == 0;case CmpOp.NE:return _value.Length != 0;}return false;}if (!(x is StringEval)){return false;}String testedValue = ((StringEval)x).StringValue;if ((testedValue.Length < 1 && _value.Length < 1)){switch (_operator.Code){case CmpOp.NONE: return true;case CmpOp.EQ: return false;case CmpOp.NE: return true;}return false;}if (_pattern != null){return Evaluate(_pattern.IsMatch(testedValue));}return Evaluate(string.Compare(testedValue, _value, StringComparison.CurrentCultureIgnoreCase));}
59
public ListWebsiteAuthorizationProvidersResult listWebsiteAuthorizationProviders(ListWebsiteAuthorizationProvidersRequest request) {request = beforeClientExecution(request);return executeListWebsiteAuthorizationProviders(request);}
public virtual ListWebsiteAuthorizationProvidersResponse ListWebsiteAuthorizationProviders(ListWebsiteAuthorizationProvidersRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListWebsiteAuthorizationProvidersRequestMarshaller.Instance;options.ResponseUnmarshaller = ListWebsiteAuthorizationProvidersResponseUnmarshaller.Instance;return Invoke<ListWebsiteAuthorizationProvidersResponse>(request, options);}
60
public void write(char[] buf, int offset, int count) {doWrite(buf, offset, count);}
public override void write(char[] buf, int offset, int count){doWrite(buf, offset, count);}
61
public String formatAsString() {if(isWholeColumnReference()) {returnCellReference.convertNumToColString(_firstCell.getCol())+ ":" +CellReference.convertNumToColString(_lastCell.getCol());}StringBuilder sb = new StringBuilder(32);sb.append(_firstCell.formatAsString());if(!_isSingleCell) {sb.append(CELL_DELIMITER);if(_lastCell.getSheetName() == null) {sb.append(_lastCell.formatAsString());} else {_lastCell.appendCellReference(sb);}}return sb.toString();}
public String FormatAsString(){if (IsWholeColumnReference()){returnCellReference.ConvertNumToColString(_firstCell.Col)+ ":" +CellReference.ConvertNumToColString(_lastCell.Col);}StringBuilder sb = new StringBuilder(32);sb.Append(_firstCell.FormatAsString());if (!_isSingleCell){sb.Append(CELL_DELIMITER);if (_lastCell.SheetName == null){sb.Append(_lastCell.FormatAsString());}else{_lastCell.AppendCellReference(sb);}}return sb.ToString();}
62
public Graphics create(){return new EscherGraphics(escherGroup, workbook,foreground, font, verticalPointsPerPixel );}
public EscherGraphics Create(){EscherGraphics g = new EscherGraphics(escherGroup, workbook,foreground, font, verticalPointsPerPixel);return g;}
63
public DoubleDocValues(ValueSource vs) {this.vs = vs;}
public DoubleDocValues(ValueSource vs){this.m_vs = vs;}
64
public static CharArraySet getDefaultStopSet(){return DefaultSetHolder.DEFAULT_STOP_SET;}
public static CharArraySet GetDefaultStopSet(){return DefaultSetHolder.DEFAULT_STOP_SET;}
65
public DeleteLoadBalancerPolicyResult deleteLoadBalancerPolicy(DeleteLoadBalancerPolicyRequest request) {request = beforeClientExecution(request);return executeDeleteLoadBalancerPolicy(request);}
public virtual DeleteLoadBalancerPolicyResponse DeleteLoadBalancerPolicy(DeleteLoadBalancerPolicyRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteLoadBalancerPolicyRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteLoadBalancerPolicyResponseUnmarshaller.Instance;return Invoke<DeleteLoadBalancerPolicyResponse>(request, options);}
66
public ReplicationGroup decreaseReplicaCount(DecreaseReplicaCountRequest request) {request = beforeClientExecution(request);return executeDecreaseReplicaCount(request);}
public virtual DecreaseReplicaCountResponse DecreaseReplicaCount(DecreaseReplicaCountRequest request){var options = new InvokeOptions();options.RequestMarshaller = DecreaseReplicaCountRequestMarshaller.Instance;options.ResponseUnmarshaller = DecreaseReplicaCountResponseUnmarshaller.Instance;return Invoke<DecreaseReplicaCountResponse>(request, options);}
67
public Result update(RevWalk walk) throws IOException {requireCanDoUpdate();try {return result = updateImpl(walk, new Store() {@OverrideResult execute(Result status) throws IOException {if (status == Result.NO_CHANGE)return status;return doUpdate(status);}});} catch (IOException x) {result = Result.IO_FAILURE;throw x;}}
public virtual RefUpdate.Result Update(RevWalk walk){RequireCanDoUpdate();try{return result = UpdateImpl(walk, new _Store_484(this));}catch (IOException x){result = RefUpdate.Result.IO_FAILURE;throw;}}
68
public Set<String> getChanged() {return Collections.unmodifiableSet(diff.getChanged());}
public virtual ICollection<string> GetChanged(){return Sharpen.Collections.UnmodifiableSet(diff.GetChanged());}
69
public static String toHex(long value) {StringBuilder sb = new StringBuilder(16);writeHex(sb, value, 16, "");return sb.toString();}
public static string ToHex(long value){return ToHex(value, 16);}
70
public int createPlaceholder() {return _offset++;}
public int CreatePlaceholder(){return _offset++;}
71
@Override public boolean equals(Object o) {if (o instanceof Map.Entry) {Map.Entry other = (Map.Entry) o;return (key == null ? other.getKey() == null : key.equals(other.getKey()))&& (value == null ? other.getValue() == null : value.equals(other.getValue()));}return false;}
public override bool Equals(object o){if (o is java.util.MapClass.Entry<K, V>){java.util.MapClass.Entry<K, V> other = (java.util.MapClass.Entry<K, V>)o;return ((object)key == null ? other.getKey() == null : key.Equals(other.getKey())) && ((object)value == null ? other.getValue() == null : value.Equals(other.getValue()));}return false;}
72
public 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);double logE = Math.log(d0);if (Double.compare(d1, Math.E) == 0) {result = logE;} else {result = logE / Math.log(d1);}NumericFunction.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);double logE = Math.Log(d0);double base1 = d1;if (base1 == Math.E) {result = logE;} else {result = logE / Math.Log(base1);}NumericFunction.CheckValue(result);} catch (EvaluationException e) {return e.GetErrorEval();}return new NumberEval(result);}
73
public DeleteFilterResult deleteFilter(DeleteFilterRequest request) {request = beforeClientExecution(request);return executeDeleteFilter(request);}
public virtual DeleteFilterResponse DeleteFilter(DeleteFilterRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteFilterRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteFilterResponseUnmarshaller.Instance;return Invoke<DeleteFilterResponse>(request, options);}
74
public CreateInstanceSnapshotResult createInstanceSnapshot(CreateInstanceSnapshotRequest request) {request = beforeClientExecution(request);return executeCreateInstanceSnapshot(request);}
public virtual CreateInstanceSnapshotResponse CreateInstanceSnapshot(CreateInstanceSnapshotRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateInstanceSnapshotRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateInstanceSnapshotResponseUnmarshaller.Instance;return Invoke<CreateInstanceSnapshotResponse>(request, options);}
75
public List<Token> getTokens(int start, int stop) {return getTokens(start, stop, null);}
public virtual IList<IToken> GetTokens(int start, int stop){return GetTokens(start, stop, null);}
76
public static TermGroupFacetCollector createTermGroupFacetCollector(String groupField,String facetField,boolean facetFieldMultivalued,BytesRef facetPrefix,int initialSize) {if (facetFieldMultivalued) {return new MV(groupField, facetField, facetPrefix, initialSize);} else {return new SV(groupField, facetField, facetPrefix, initialSize);}}
public static TermGroupFacetCollector CreateTermGroupFacetCollector(string groupField,string facetField,bool facetFieldMultivalued,BytesRef facetPrefix,int initialSize){if (facetFieldMultivalued){return new MV(groupField, facetField, facetPrefix, initialSize);}else{return new SV(groupField, facetField, facetPrefix, initialSize);}}
77
public RenameAlbumRequest() {super("CloudPhoto", "2017-07-11", "RenameAlbum", "cloudphoto");setProtocol(ProtocolType.HTTPS);}
public RenameAlbumRequest(): base("CloudPhoto", "2017-07-11", "RenameAlbum", "cloudphoto", "openAPI"){Protocol = ProtocolType.HTTPS;}
78
@Override public boolean contains(Object object) {synchronized (mutex) {return c.contains(object);}}
public virtual bool contains(object @object){lock (mutex){return c.contains(@object);}}
79
public CharBuffer put(char[] src, int srcOffset, int charCount) {if (charCount > remaining()) {throw new BufferOverflowException();}System.arraycopy(src, srcOffset, backingArray, offset + position, charCount);position += charCount;return this;}
public override java.nio.CharBuffer put(char[] src, int srcOffset, int charCount){if (charCount > remaining()){throw new java.nio.BufferOverflowException();}System.Array.Copy(src, srcOffset, backingArray, offset + _position, charCount);_position += charCount;return this;}
80
public LegendRecord(RecordInputStream in) {field_1_xAxisUpperLeft = in.readInt();field_2_yAxisUpperLeft = in.readInt();field_3_xSize = in.readInt();field_4_ySize = in.readInt();field_5_type = in.readByte();field_6_spacing = in.readByte();field_7_options = in.readShort();}
public LegendRecord(RecordInputStream in1){field_1_xAxisUpperLeft = in1.ReadInt();field_2_yAxisUpperLeft = in1.ReadInt();field_3_xSize = in1.ReadInt();field_4_ySize = in1.ReadInt();field_5_type = (byte)in1.ReadByte();field_6_spacing = (byte)in1.ReadByte();field_7_options = in1.ReadShort();}
81
public static byte[] encodedTypeString(int typeCode) {switch (typeCode) {case OBJ_COMMIT:return ENCODED_TYPE_COMMIT;case OBJ_TREE:return ENCODED_TYPE_TREE;case OBJ_BLOB:return ENCODED_TYPE_BLOB;case OBJ_TAG:return ENCODED_TYPE_TAG;default:throw new IllegalArgumentException(MessageFormat.format(JGitText.get().badObjectType, Integer.valueOf(typeCode)));}}
public static byte[] EncodedTypeString(int typeCode){switch (typeCode){case OBJ_COMMIT:{return ENCODED_TYPE_COMMIT;}case OBJ_TREE:{return ENCODED_TYPE_TREE;}case OBJ_BLOB:{return ENCODED_TYPE_BLOB;}case OBJ_TAG:{return ENCODED_TYPE_TAG;}default:{throw new ArgumentException(MessageFormat.Format(JGitText.Get().badObjectType, Sharpen.Extensions.ValueOf(typeCode)));}}}
82
public ObjectId getCalulatedPatchId() {return ObjectId.fromRaw(digest.digest());}
public virtual ObjectId GetCalulatedPatchId(){return ObjectId.FromRaw(digest.Digest());}
83
public DefaultRowHeightRecord() {field_1_option_flags = 0x0000;field_2_row_height = DEFAULT_ROW_HEIGHT;}
public DefaultRowHeightRecord(){field_1_option_flags = 0x0000;field_2_row_height = DEFAULT_ROW_HEIGHT;}
84
public final ByteBuffer encode(CharBuffer buffer) {try {return newEncoder().onMalformedInput(CodingErrorAction.REPLACE).onUnmappableCharacter(CodingErrorAction.REPLACE).encode(buffer);} catch (CharacterCodingException ex) {throw new Error(ex.getMessage(), ex);}}
public java.nio.ByteBuffer encode(java.nio.CharBuffer buffer){try{return newEncoder().onMalformedInput(java.nio.charset.CodingErrorAction.REPLACE).onUnmappableCharacter(java.nio.charset.CodingErrorAction.REPLACE).encode(buffer);}catch (java.nio.charset.CharacterCodingException ex){throw new System.Exception(ex.Message, ex);}}
85
public final FloatBuffer get(float[] dst, int dstOffset, int floatCount) {if (floatCount > remaining()) {throw new BufferUnderflowException();}System.arraycopy(backingArray, offset + position, dst, dstOffset, floatCount);position += floatCount;return this;}
public sealed override java.nio.FloatBuffer get(float[] dst, int dstOffset, int floatCount){if (floatCount > remaining()){throw new java.nio.BufferUnderflowException();}System.Array.Copy(backingArray, offset + _position, dst, dstOffset, floatCount);_position += floatCount;return this;}
86
public boolean hasNext() {return nextEntry != null;}
public virtual bool hasNext(){return this._nextEntry != null;}
87
public DeleteNatGatewayResult deleteNatGateway(DeleteNatGatewayRequest request) {request = beforeClientExecution(request);return executeDeleteNatGateway(request);}
public virtual DeleteNatGatewayResponse DeleteNatGateway(DeleteNatGatewayRequest request){var options = new InvokeOptions();options.RequestMarshaller = DeleteNatGatewayRequestMarshaller.Instance;options.ResponseUnmarshaller = DeleteNatGatewayResponseUnmarshaller.Instance;return Invoke<DeleteNatGatewayResponse>(request, options);}
88
public String resolveNameXText(int refIndex, int definedNameIndex) {return linkTable.resolveNameXText(refIndex, definedNameIndex, this);}
public String ResolveNameXText(int reFindex, int definedNameIndex){return linkTable.ResolveNameXText(reFindex, definedNameIndex, this);}
89
public void setMultiFields(CharSequence[] fields) {if (fields == null) {fields = new CharSequence[0];}getQueryConfigHandler().set(ConfigurationKeys.MULTI_FIELDS, fields);}
public virtual void SetMultiFields(string[] fields){if (fields == null){fields = new string[0];}QueryConfigHandler.Set(ConfigurationKeys.MULTI_FIELDS, fields);}
90
public boolean isCancelled() {lock.lock();try {return pm.isCancelled();} finally {lock.unlock();}}
public override bool IsCancelled(){Lock.Lock();try{return pm.IsCancelled();}finally{Lock.Unlock();}}
91
public RemoveTargetsResult removeTargets(RemoveTargetsRequest request) {request = beforeClientExecution(request);return executeRemoveTargets(request);}
public virtual RemoveTargetsResponse RemoveTargets(RemoveTargetsRequest request){var options = new InvokeOptions();options.RequestMarshaller = RemoveTargetsRequestMarshaller.Instance;options.ResponseUnmarshaller = RemoveTargetsResponseUnmarshaller.Instance;return Invoke<RemoveTargetsResponse>(request, options);}
92
public FuzzyQuery(Term term, int maxEdits, int prefixLength, int maxExpansions, boolean transpositions) {super(term.field());if (maxEdits < 0 || maxEdits > LevenshteinAutomata.MAXIMUM_SUPPORTED_DISTANCE) {throw new IllegalArgumentException("maxEdits must be between 0 and " + LevenshteinAutomata.MAXIMUM_SUPPORTED_DISTANCE);}if (prefixLength < 0) {throw new IllegalArgumentException("prefixLength cannot be negative.");}if (maxExpansions <= 0) {throw new IllegalArgumentException("maxExpansions must be positive.");}this.term = term;this.maxEdits = maxEdits;this.prefixLength = prefixLength;this.transpositions = transpositions;this.maxExpansions = maxExpansions;int[] codePoints = FuzzyTermsEnum.stringToUTF32(term.text());this.termLength = codePoints.length;this.automata = FuzzyTermsEnum.buildAutomata(term.text(), codePoints, prefixLength, transpositions, maxEdits);setRewriteMethod(new MultiTermQuery.TopTermsBlendedFreqScoringRewrite(maxExpansions));this.ramBytesUsed = calculateRamBytesUsed(term, this.automata);}
public FuzzyQuery(Term term, int maxEdits, int prefixLength, int maxExpansions, bool transpositions): base(term.Field){if (maxEdits < 0 || maxEdits > LevenshteinAutomata.MAXIMUM_SUPPORTED_DISTANCE){throw new System.ArgumentException("maxEdits must be between 0 and " + LevenshteinAutomata.MAXIMUM_SUPPORTED_DISTANCE);}if (prefixLength < 0){throw new System.ArgumentException("prefixLength cannot be negative.");}if (maxExpansions < 0){throw new System.ArgumentException("maxExpansions cannot be negative.");}this.term = term;this.maxEdits = maxEdits;this.prefixLength = prefixLength;this.transpositions = transpositions;this.maxExpansions = maxExpansions;MultiTermRewriteMethod = new MultiTermQuery.TopTermsScoringBooleanQueryRewrite(maxExpansions);}
93
public CheckoutCommand checkout() {return new CheckoutCommand(repo);}
public virtual CheckoutCommand Checkout(){return new CheckoutCommand(repo);}
94
public ValueEval evaluate(String sheetName, int rowIndex, int columnIndex) {EvaluationCell cell = _sewb.getEvaluationCell(sheetName, rowIndex, columnIndex);switch (cell.getCellType()) {case BOOLEAN:return BoolEval.valueOf(cell.getBooleanCellValue());case ERROR:return ErrorEval.valueOf(cell.getErrorCellValue());case FORMULA:return _evaluator.evaluate(cell);case NUMERIC:return new NumberEval(cell.getNumericCellValue());case STRING:return new StringEval(cell.getStringCellValue());case BLANK:return null;default:throw new IllegalStateException("Bad cell type (" + cell.getCellType() + ")");}}
public ValueEval Evaluate(String sheetName, int rowIndex, int columnIndex){IEvaluationCell cell = _sewb.GetEvaluationCell(sheetName, rowIndex, columnIndex);switch (cell.CellType){case CellType.Boolean:return BoolEval.ValueOf(cell.BooleanCellValue);case CellType.Error:return ErrorEval.ValueOf(cell.ErrorCellValue);case CellType.Formula:return _evaluator.Evaluate(cell);case CellType.Numeric:return new NumberEval(cell.NumericCellValue);case CellType.String:return new StringEval(cell.StringCellValue);case CellType.Blank:return null;}throw new InvalidOperationException("Bad cell type (" + cell.CellType + ")");}
95
public PutFileSystemPolicyResult putFileSystemPolicy(PutFileSystemPolicyRequest request) {request = beforeClientExecution(request);return executePutFileSystemPolicy(request);}
public virtual PutFileSystemPolicyResponse PutFileSystemPolicy(PutFileSystemPolicyRequest request){var options = new InvokeOptions();options.RequestMarshaller = PutFileSystemPolicyRequestMarshaller.Instance;options.ResponseUnmarshaller = PutFileSystemPolicyResponseUnmarshaller.Instance;return Invoke<PutFileSystemPolicyResponse>(request, options);}
96
public long fileLength(String name) throws IOException {ensureOpen();FileEntry e = entries.get(IndexFileNames.stripSegmentName(name));if (e == null)throw new FileNotFoundException(name);return e.length;}
public override long FileLength(string name){EnsureOpen();if (this.writer != null){return writer.FileLength(name);}FileEntry e = entries[IndexFileNames.StripSegmentName(name)];if (e == null){throw new FileNotFoundException(name);}return e.Length;}
97
public DescribeCacheClustersResult describeCacheClusters() {return describeCacheClusters(new DescribeCacheClustersRequest());}
public virtual DescribeCacheClustersResponse DescribeCacheClusters(){return DescribeCacheClusters(new DescribeCacheClustersRequest());}
98
public void setObjectId(RevObject obj) {setObjectId(obj, obj.getType());}
public virtual void SetObjectId(RevObject obj){SetObjectId(obj, obj.Type);}
99
public boolean rowHasCells(int row) {if (row >= records.length) {return false;}CellValueRecordInterface[] rowCells=records[row];if(rowCells==null) return false;for(int col=0;col<rowCells.length;col++) {if(rowCells[col]!=null) return true;}return false;}
public bool RowHasCells(int row){if (row > records.Length - 1) return false; CellValueRecordInterface[] rowCells = records[row]; if (rowCells == null) return false;for (int col = 0; col < rowCells.Length; col++){if (rowCells[col] != null) return true;}return false;}

Dataset Card for "code_x_glue_cc_code_to_code_trans"

Dataset Summary

CodeXGLUE code-to-code-trans dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/code-to-code-trans

The dataset is collected from several public repos, including Lucene(http://lucene.apache.org/), POI(http://poi.apache.org/), JGit(https://github.com/eclipse/jgit/) and Antlr(https://github.com/antlr/).

We collect both the Java and C# versions of the codes and find the parallel functions. After removing duplicates and functions with the empty body, we split the whole dataset into training, validation and test sets.

Supported Tasks and Leaderboards

  • machine-translation: The dataset can be used to train a model for translating code in Java to C# and vice versa.

Languages

  • Java programming language
  • C# programming language

Dataset Structure

Data Instances

An example of 'validation' looks as follows.

{
    "cs": "public DVRecord(RecordInputStream in1){_option_flags = in1.ReadInt();_promptTitle = ReadUnicodeString(in1);_errorTitle = ReadUnicodeString(in1);_promptText = ReadUnicodeString(in1);_errorText = ReadUnicodeString(in1);int field_size_first_formula = in1.ReadUShort();_not_used_1 = in1.ReadShort();_formula1 = NPOI.SS.Formula.Formula.Read(field_size_first_formula, in1);int field_size_sec_formula = in1.ReadUShort();_not_used_2 = in1.ReadShort();_formula2 = NPOI.SS.Formula.Formula.Read(field_size_sec_formula, in1);_regions = new CellRangeAddressList(in1);}\n", 
    "id": 0, 
    "java": "public DVRecord(RecordInputStream in) {_option_flags = in.readInt();_promptTitle = readUnicodeString(in);_errorTitle = readUnicodeString(in);_promptText = readUnicodeString(in);_errorText = readUnicodeString(in);int field_size_first_formula = in.readUShort();_not_used_1 = in.readShort();_formula1 = Formula.read(field_size_first_formula, in);int field_size_sec_formula = in.readUShort();_not_used_2 = in.readShort();_formula2 = Formula.read(field_size_sec_formula, in);_regions = new CellRangeAddressList(in);}\n"
}

Data Fields

In the following each data field in go is explained for each config. The data fields are the same among all splits.

default

field name type description
id int32 Index of the sample
java string The java version of the code
cs string The C# version of the code

Data Splits

name train validation test
default 10300 500 1000

Dataset Creation

Curation Rationale

[More Information Needed]

Source Data

Initial Data Collection and Normalization

[More Information Needed]

Who are the source language producers?

[More Information Needed]

Annotations

Annotation process

[More Information Needed]

Who are the annotators?

[More Information Needed]

Personal and Sensitive Information

[More Information Needed]

Considerations for Using the Data

Social Impact of Dataset

[More Information Needed]

Discussion of Biases

[More Information Needed]

Other Known Limitations

[More Information Needed]

Additional Information

Dataset Curators

https://github.com/microsoft, https://github.com/madlag

Licensing Information

Computational Use of Data Agreement (C-UDA) License.

Citation Information

@article{DBLP:journals/corr/abs-2102-04664,
  author    = {Shuai Lu and
               Daya Guo and
               Shuo Ren and
               Junjie Huang and
               Alexey Svyatkovskiy and
               Ambrosio Blanco and
               Colin B. Clement and
               Dawn Drain and
               Daxin Jiang and
               Duyu Tang and
               Ge Li and
               Lidong Zhou and
               Linjun Shou and
               Long Zhou and
               Michele Tufano and
               Ming Gong and
               Ming Zhou and
               Nan Duan and
               Neel Sundaresan and
               Shao Kun Deng and
               Shengyu Fu and
               Shujie Liu},
  title     = {CodeXGLUE: {A} Machine Learning Benchmark Dataset for Code Understanding
               and Generation},
  journal   = {CoRR},
  volume    = {abs/2102.04664},
  year      = {2021}
}

Contributions

Thanks to @madlag (and partly also @ncoop57) for adding this dataset.

Downloads last month
338

Models trained or fine-tuned on google/code_x_glue_cc_code_to_code_trans