__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/17978015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setControlInput(int robotId, double[] input){
if(input.length != 3)
throw new RuntimeException("Simulator works in 2D - x, y and orientation required.");
if(!idToDynamicObject.containsKey(robotId))
return false;
DynamicObject object = idToDynamicObject.get(robotId);
object.controlInput[0] = input[0];
object.controlInput[1] = input[1];
object.controlInput[2] = input[2];
return true;
}
COM: <s> because we are getting id value by calling get defined object id </s>
|
funcom_train/14400828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void widgetSelected(SelectionEvent pEvent) {
if (pEvent.getSource() instanceof Tree) {
// choose the first selected item of the selected
TreeItem selItem = ((Tree) pEvent.getSource()).getSelection()[0];
if (selItem.getData() instanceof IProperty) {
updateDescriptionText(((IProperty) selItem.getData())
.getDescription());
}
} else if (pEvent.getSource() instanceof List) {
updateTree();
updateDescriptionText(null);
} else {
updateDescriptionText(null);
}
}
COM: <s> reacts to selection changes on the property group list and the tree </s>
|
funcom_train/20497861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void makeRequest(MediaRequest request) {
notifyRequestListeners(request);
String reqFile = mCache.requestData(request);
if (reqFile != null) {
notifyFileListeners(reqFile);
return;
}
// need to wait for initialization to the right channel!!!
try {
Request req = new Request(Message.MessageType.MEDIA,
Message.MEDIA_REQUEST, request, AuthenticationHandler.getInstance().getUser());
sendMessage(req);
} catch (IOException e) {
e.printStackTrace();
}
}
COM: <s> the call to spawn requests </s>
|
funcom_train/19537746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getSize(Token token) {
Grid grid = MapTool.getFrame().getCurrentZoneRenderer().getZone().getGrid();
if (token.isSnapToScale()) {
for (TokenFootprint footprint : grid.getFootprints()) {
if (token.getFootprint(grid) == footprint) {
return footprint.getName();
}
}
}
return "";
}
COM: <s> gets the size of the token </s>
|
funcom_train/25811133 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public T push() {
if (mFirst == -1) {
mFirst = mLast = 0;
} else {
mLast++;
if (mLast == mBuffer.length) mLast = 0;
if (mLast == mFirst) {
return resize();
}
}
return mBuffer[mLast];
}
COM: <s> prepares a new action to be queued in the circular buffer </s>
|
funcom_train/12560959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint1(Graphics g) {
int c = g.getColor();
g.setColor(0xFFFFFF);
g.fillRect(g.getClipX(), g.getClipY(),
g.getClipWidth(), g.getClipHeight());
g.setColor(c);
}
COM: <s> just a default white fill </s>
|
funcom_train/1609734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeObject(java.io.ObjectOutputStream out) throws IOException{
try {
IBindingFactory bfact = BindingDirectory.getFactory(Eml.class);
IMarshallingContext uctx = bfact.createMarshallingContext();
uctx.marshalDocument(this, "UTF-8", true, out);
} catch(Exception e){
e.printStackTrace();
throw new IOException(e.getMessage());
}
}
COM: <s> custom serialization using jibx </s>
|
funcom_train/34805738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void finalizeObject () {
if (mReusableUCon != null) {
Bug.log("FoxRequest object eligible for GC but contains a non-null reusable UCon");
try {
mReusableUCon.rollback();
}
catch (ExDB e) {} // Do nothing
mReusableUCon.closeForRecycle();
mReusableUCon = null;
}
}
COM: <s> this is invoked higher in the object hierarchy by object counts finalize </s>
|
funcom_train/45459610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doScanDirectories() {
List<String> removableDirList = null;
if (mDirectoryList != null) {
removableDirList = mDirectoryList.getCurrentRemovableDirList();
} else {
removableDirList = null;
}
mDirectoryList = new RootDirectoryItem(mPrefenrencesStore.getString(PreferenceConstants.P_LIBRARY_PATH), removableDirList);
mDirectoryList.scanDirectory();
getEventController().fireLibraryChange(EventConstants.EVT_LIBRARY_DIRECTORY_CHANGE, null, null);
}
COM: <s> build the directory structure and notify the listeners </s>
|
funcom_train/40448467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWinStatus(int status) {
// System.err.println(graphlet.eigenNode+" setWinStatus "+status);
label5_0.setBackground(panelBackground);
label5_1.setBackground(panelBackground);
label5_2.setBackground(panelBackground);
/* switch(status) {
case 0:
label5_0.setBackground(Color.red);
break;
case 1:
label5_1.setBackground(Color.yellow);
break;
case 2:
label5_2.setBackground(Color.orange);
break;
} ripped out at last minute */
// System.err.print((status==0)?".":(""+status));
}
COM: <s> call this to update the color coded indicator of conflict status </s>
|
funcom_train/9675463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ComponentFactory loadClassFile(File file) {
String name = currentPackage + file.getName().replace(classExtension,"");
try {
Class<?> c = ClassLoader.getSystemClassLoader().loadClass(name);
if (ComponentFactory.class.isAssignableFrom(c))
return (ComponentFactory) c.newInstance();
} catch (ClassNotFoundException exception) {
exception.printStackTrace();
} catch (InstantiationException exception) {
exception.printStackTrace();
} catch (IllegalAccessException exception) {
exception.printStackTrace();
}
return null;
}
COM: <s> loads a component factory from a class file </s>
|
funcom_train/7965160 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Double getIntercept() {
double sx = 0.0;
double sy = 0.0;
for (Entry<Long, Double> s : valueMap.entrySet()) {
sx += s.getKey();
sy += s.getValue();
}
return (sy - getSlope() * sx) / valueMap.size();
}
COM: <s> returns the intercept for linear regression for </s>
|
funcom_train/17027829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // private void triggerTasksWithOutputsCollection() {
//
// logger.debug("triggerTasksWithOutputsCollection called");
// MultiGenerateNetcdfTask task = null;
//
// task = new MultiGenerateNetcdfTask();
// task.setInputs(outputsToBuildNetCDSfrom);
//
// logger
// .debug("Done with triggerTasksWithOutputsCollection for these outputs:");
//
// NotificationUpdateTask finishUpTask = new NotificationUpdateTask();
//
// task.setSecondTask(finishUpTask);
// task.start();
// }
COM: <s> start the processing tasks given a collection of data containers </s>
|
funcom_train/3168097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IntegerValue minimum(IntegerValue another) {
//TODO rename to min for Java compatability?
//TODO efficiency improvement by returning minimum rather than re-creating
return new IntegerValue(value.min(another.value));
/*
udanax-top.st:35057:PrimIntValue methodsFor: 'operations'!
{IntegerVar CLIENT login} minimum: another {PrimIntValue}
"Return the smallest of the two numbers."
^myValue min: another asIntegerVar!
*/
}
COM: <s> return the smallest of the two numbers </s>
|
funcom_train/47020798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getBrowsePath() {
if (browsePath == null) {//GEN-END:|100-getter|0|100-preInit
// write pre-init user code here
browsePath = new Command(getLocalizedString("BP"), Command.OK, 1);//GEN-LINE:|100-getter|1|100-postInit
// write post-init user code here
}//GEN-BEGIN:|100-getter|2|
return browsePath;
}
COM: <s> returns an initiliazed instance of browse path component </s>
|
funcom_train/32720619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getThirdPanel() {
if (thirdPanel == null) {
thirdPanel = new JPanel();
thirdPanel.setLayout(new BoxLayout(thirdPanel, BoxLayout.Y_AXIS));
thirdPanel.setPreferredSize(new java.awt.Dimension(100,200));
thirdPanel.add(getFirstHostPortLabel(), null);
thirdPanel.add(getSecondHostPortLabel(), null);
thirdPanel.add(getAbortButton(), null);
}
return thirdPanel;
}
COM: <s> this method initializes j panel </s>
|
funcom_train/287824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFilterString(Map<String, Object> realparams) {
StringBuffer sb = new StringBuffer();
List<Parameter> params = getAllParameters();
for (Parameter parameter : params) {
String s = parameter.getFilterString(realparams);
if (s.length() > 0 && sb.length() > 0) {
sb.append(" and ");
}
sb.append(s);
}
return sb.toString();
}
COM: <s> returns a where clause of various operators andd together </s>
|
funcom_train/48709684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Bank getRandomBank() {
if (banks.isEmpty()) {
throw new IllegalArgumentException();
}
else {
int stepover = rand.nextInt(banks.size());
Iterator<Bank> it = banks.values().iterator();
Bank bank = it.next();
while(stepover > 0){
stepover--;
bank = it.next();
}
return bank;
}
}
COM: <s> this methode will return a random instance of a bank </s>
|
funcom_train/43133673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addChild(OutlineItem newChild) {
if (newChild != null && !children.contains(newChild)) {
children.add(newChild);
newChild.setParent(this);
Collections.sort(children);
TreePath treePath = buildTreePath();
int[] addedIndices = {this.getIndex(newChild)};
Object[] addedChildren = {newChild};
TreeModelEvent treeEvent = new TreeModelEvent(tree, treePath, addedIndices, addedChildren);
tree.fireTreeNodesInserted(treeEvent);
}
}
COM: <s> adds a new child to the list of children </s>
|
funcom_train/49633645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save() throws NBTreeException {
try {
if (hasChanged) { //only saves the ntree is something has changed
_recman.commit();
}
} catch (IOException e) {
throw new NBTreeException("Cannot save the NBTree. Possible reason: " + e.toString());
}
}
COM: <s> save the nbtree </s>
|
funcom_train/51151949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object addComponent(String type, int x, int y, int w, int h) {
Object c = super.addComponent(type, x, y, w, h, null);
applyStyle(c, (String) null, w > 0 || h > 0 ? true : false);
return c;
}
COM: <s> pass the add named component call to the xstyle factory base class </s>
|
funcom_train/33745183 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void insertionSort(Point2D.Float p) {
bubbleSort();
for(int i = 0; i < mData.size(); i++) {
Point2D.Float c = mData.elementAt(i);
// Insert after the first value which we find is smaller
if(c.x > p.x) {
mData.insertElementAt(p, i);
return;
}
}
mData.add(p);
}
COM: <s> insert a given point using an insertion sort algorithm </s>
|
funcom_train/20516385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean reopenBdbDatabase() {
try {
bdbDatabase = environment.openDatabase(null,
this.getName(),
this.bdbDatabase.getConfig());
return true;
} catch(DatabaseException e) {
throw new StorageInitializationException("Failed to reinitialize BdbStorageEngine for store:"
+ getName() + " after truncation.",
e);
}
}
COM: <s> reopens the bdb database after a successful truncate operation </s>
|
funcom_train/46118587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean compareTextParts(TextPart tp1, TextPart tp2) {
//--both are null no point checking anything else--
if(bothAreNull(tp1,tp2)){
return true;
}
//--one is null--
if( oneIsNulll(tp1,tp2,"compareTextPart","TextPart") ){
return false;
}
//--Content--
if ( !compareTextFragments(tp1.getContent(), tp2.getContent()) ){
return false;
}
return true;
}
COM: <s> compares two text part </s>
|
funcom_train/16526046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String braceBalanced(String textBoxName, String[] functionCallArgs, String textBoxValue) {
String feedback = "";
int openBraceCount = getCountOfChar(textBoxValue, '{');
int closeBraceCount = getCountOfChar(textBoxValue, '}');
if(openBraceCount != closeBraceCount) {
feedback += functionCallArgs[0];
}
return feedback;
}
COM: <s> compares the number of braces </s>
|
funcom_train/36012081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean remove(ReviewIssue reviewIssue) {
if (reviewIssue != null) {
this.reviewIssueMap.remove(reviewIssue.getIssueId());
ReviewMarker.removeMarker(reviewIssue);
this.reviewIssueOrdinalList.remove(reviewIssue);
this.notifyTargetReviewIssue = reviewIssue;
return true;
}
else {
this.notifyTargetReviewIssue = reviewIssue;
return false;
}
}
COM: <s> removes the review issue instance form this model </s>
|
funcom_train/2268151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void findResources(File dir) throws BuildException {
if (!dir.isDirectory())
throw new BuildException(dir.getPath() + " is not a directory");
for (File file : dir.listFiles()) {
if (file.getName().startsWith(".")) {
continue;
} else if (file.isFile()) {
copyResource(file);
} else if (file.isDirectory()){
findResources(file);
}
}
}
COM: <s> recursively scans a directory for resource files </s>
|
funcom_train/1430841 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void evict() {
int entry = rand.nextInt(buffer.size());
Iterator it = buffer.keySet().iterator();
for (int i = 0; i < (entry - 1); i++) {
it.next();
}
String id = (String) it.next();
if (overflow != null) {
overflow.put(get(id));
}
remove(id);
}
COM: <s> random eviction strategy </s>
|
funcom_train/48268513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String formatTime(JavaScriptProfileNode profileNode) {
int relativeTime = (int) (profile.getTotalTime() > 0
? (profileNode.getTime() / profile.getTotalTime()) * 100 : 0);
return TimeStampFormatter.formatToFixedDecimalPoint(relativeTime, 1);
}
COM: <s> return a string with the time formatted as a decimal percentage </s>
|
funcom_train/47312343 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addElement(long l, K key, V ele) {
if (null == ele) {
throw new ObjectCacheException("Element cannot be null.");
}
CacheElementRevision<K, V> cr = new CacheElementRevision<K, V>(key, ele, l, CacheRevisionType.ADDED);
revisions.put(l, cr);
}
COM: <s> adds the provided </s>
|
funcom_train/31133230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void plotQueue(AvnmpLP mylp) {
Date timeStamp = new Date();
String fn = "State"+timeStamp.getTime();
AvnmpState ap = null;
for(int i=0;i<size(); i++)
{
ap = (AvnmpState) get(i);
//pStateQueue.plot(ap.sqt+" "+ap.state);
}
}
COM: <s> generate a gnuplot data file of the current state of the queue </s>
|
funcom_train/21003111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object removeFromBucket(int hash, int collId) throws CollectionsException {
synchronized (_bucket) {
HashBucketNode node = _bucket[hash];
while (node != null) {
if (node._collisionId == collId) {
if (node._prev == null)
_bucket[hash] = (HashBucketNode) node._next;
Object tmp = node._data;
node.detach();
node.free();
return tmp;
}
node = (HashBucketNode) node._next;
}
}
return null;
}
COM: <s> removes from the bucket the node with the given collision id </s>
|
funcom_train/20803784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParagraph (int paragraphIndex) {
Document document = this.document.get();
Layout layout = this.layout.get();
if (layout.getDocument() != document) {
return;
}
if (layout.isOverflowing()) {
paragraphIndex = Math.max (0, Math.min (document.getSize() - 1, paragraphIndex));
setPosition (new LayoutPosition (paragraphIndex, 0));
}
}
COM: <s> sets the first visible paragraph br br </s>
|
funcom_train/32057645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetGraphUI() {
System.out.println("testGetGraphUI");
GPGraphpad pad = new GPGraphpad();
GPGraph graph = new GPGraph();
GraphUndoManager undo = new GraphUndoManager();
GPDocument newDoc = new GPDocument(pad, "test", null, graph, null, undo);
assertEquals("getGraphUI failed", newDoc.getGraphUI() != null, true);
}
COM: <s> test of get graph ui method of class gpdocument </s>
|
funcom_train/47998396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean register(String username, String email, String password, String password2) {
if (!checkRegisterInput(username, email, password, password2))
return false;
// try to register and login
if (delegate.register(username, email, password)) {
closeViewers();
LobbyController.getInstance().launchLobby();
return true;
}
return false;
}
COM: <s> this function registers a new use with the given login credentials </s>
|
funcom_train/50487545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isPerfect(VersionIdentifier id) {
if (id == null)
return false;
if ( (major != id.getMajorComponent()) ||
(minor != id.getMinorComponent()) ||
(service != id.getServiceComponent()) ||
(!qualifier.equals(id.getQualifierComponent())) )
return false;
else
return true;
}
COM: <s> compares two version identifiers for perfect equality </s>
|
funcom_train/34138015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BreakIterator getCurrentIterator(int granularity) {
if (granularity == TextNavigation.GRANULARITY_CHAR) {
return mCharIterator;
} else if (granularity == TextNavigation.GRANULARITY_WORD) {
return mWordIterator;
} else if (granularity == TextNavigation.GRANULARITY_SENTENCE) {
return mSentenceIterator;
} else if (granularity == TextNavigation.GRANULARITY_PARAGRAPH) {
return mLineIterator;
}
return null;
}
COM: <s> get iterator based on code granularity code used </s>
|
funcom_train/20949462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cancelPackage() {
if (workingOnPackage) {
workingOnPackage = false;
RelationsProvider.getInstance().removeItem(pkgIndividual);
// remove all tbo properties
for (Iterator<Individual> iter = autostart.iterator(); iter.hasNext();) {
Individual ii = iter.next();
ii.removeAll(autoNumber);
RelationsProvider.getInstance().fireItemChanged(ii);
}
firePropertyChange(PACKAGE_STOPPED, null, null);
}
}
COM: <s> cancels all works on the package </s>
|
funcom_train/17269378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEditorOpenAs() {
System.out.println("editorOpenAs");
/*
* UI Code
*
DocumentManager instance = null;
instance.editorOpenAs();
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
*/
}
COM: <s> test of editor open as method of class com </s>
|
funcom_train/21438157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getChildPositionsString() {
StringBuilder sb = new StringBuilder();
for( Bond b : getBondsSorted() ) {
if( sb.length()>0 )
sb.append(',');
sb.append(b.getChildPosition());
}
return sb.toString();
}
COM: <s> return the list of all child positions for all bonds forming </s>
|
funcom_train/23233432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private static class SimplePathListener implements PathListener {
/** the entity the path belongs to */
private RPEntity entity;
/**
* creates a new instance of SimplePathLister
*
* @param entity
* the entity the path belongs to
*/
public SimplePathListener(RPEntity entity) {
this.entity = entity;
}
/** simply appends the calculated path to the entitys path */
public void onPathFinished(QueuedPath path, PathState state) {
if (state == PathState.PATH_FOUND) {
entity.addToPath(path.getPath());
}
}
}
COM: <s> the threaded pathfinder callback </s>
|
funcom_train/45692112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAmpEgPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PartWithCommon_ampEg_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PartWithCommon_ampEg_feature", "_UI_PartWithCommon_type"),
EsxPackage.Literals.PART_WITH_COMMON__AMP_EG,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the amp eg feature </s>
|
funcom_train/2586523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void performBoot() {
// configure the classloader from the properties-file.
ObjectUtilities.setClassLoaderSource
(getConfiguration().getConfigProperty("org.jfree.ClassLoader"));
getPackageManager().addModule(DefaultLogModule.class.getName());
getPackageManager().load("org.jfree.jcommon.modules.");
getPackageManager().initializeModules();
}
COM: <s> performs the boot process </s>
|
funcom_train/51418501 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addImportsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ProjectNode_imports_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ProjectNode_imports_feature", "_UI_ProjectNode_type"),
JetsetPackage.Literals.PROJECT_NODE__IMPORTS,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the imports feature </s>
|
funcom_train/48389332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HandlerRegistration addFacetRemovedHandler(com.smartgwt.client.widgets.cube.events.FacetRemovedHandler handler) {
if(getHandlerCount(com.smartgwt.client.widgets.cube.events.FacetRemovedEvent.getType()) == 0) setupFacetRemovedEvent();
return doAddHandler(handler, com.smartgwt.client.widgets.cube.events.FacetRemovedEvent.getType());
}
COM: <s> add a facet removed handler </s>
|
funcom_train/21506619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton() {
if (jButton == null) {
jButton = new JButton();
jButton.setBounds(new Rectangle(570, 45, 151, 31));
jButton.setText("Kokapena bistaratu");
jButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
gui.botoiakEguneratu();
}
});
}
return jButton;
}
COM: <s> this method initializes j button </s>
|
funcom_train/28257870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected EventListener createControlListener() {
return new ActionListener() {
public void actionPerformed(ActionEvent e) {
Controller controller = getController();
int state = controller.getState();
if (state == Controller.Started)
return;
if (state < Controller.Prefetched) {
StateWaiter w = new StateWaiter(controller);
w.blockingPrefetch();
}
TimeBase tb = controller.getTimeBase();
controller.syncStart(tb.getTime());
}
};
}
COM: <s> creates an action listener for start button </s>
|
funcom_train/13221479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int write(ByteBuffer src) throws IOException {
if (!closed) {
int numToWrite = src.remaining();
if (singleFileMode && numToWrite + curr <= bytes.length) {
src.get(bytes, curr, numToWrite);
curr += numToWrite;
return numToWrite;
}
src.get(bytes, curr, numToWrite);
curr += numToWrite;
return numToWrite;
}
return -1;
}
COM: <s> writes bytes from our internal byte array into specified buffer </s>
|
funcom_train/37062677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDatabitsString() {
switch (mDataBits) {
case SerialPort.DATABITS_5:
return "5";
case SerialPort.DATABITS_6:
return "6";
case SerialPort.DATABITS_7:
return "7";
case SerialPort.DATABITS_8:
return "8";
default:
return "8";
}
}
COM: <s> gets data bits as a code string code </s>
|
funcom_train/38490595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URL loadFile(File file) throws IOException {
try {
URL url = new URL("file:///" + file.getAbsolutePath());
mainPanel.getGraphPane().loadURL(url);
return url;
}
catch (MalformedURLException e) {
throw new IOException("Cannot construct URL from filename " + file.getAbsolutePath());
}
}
COM: <s> loads the graph from the specified file </s>
|
funcom_train/29031306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void anticheat_TowerBuilt(BuildTowerMessage m, int id) {
anticheatTowerId.add(id, IConstants.Towers.valueOf(IConstants.Towers.class, m.getTowerType()).getName());
anticheatCurrentMoney -= IConstants.Towers.valueOf(IConstants.Towers.class, anticheatTowerId.get(id)).getPrice();
clientLogger.warn(anticheatCurrentMoney);
}
COM: <s> handles towers being built </s>
|
funcom_train/23793488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AttemptInt (Operand result, Operand address, Operand offset, Operand oldValue, Operand newValue, FieldOperand field, Operand guard) {
super (result, address, offset, oldValue, newValue, field, guard);
}
COM: <s> constructor for attempt int </s>
|
funcom_train/25291467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setReverbCoefficient(float coefficient) {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_REVERB_COEFFICIENT_WRITE))
throw new CapabilityNotSetException(Ding3dI18N.getString("AuralAttributes24"));
((AuralAttributesRetained)this.retained).setReverbCoefficient(coefficient);
}
COM: <s> set reverb coefficient </s>
|
funcom_train/17788817 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printVersion() {
try {
Properties cadiInfo = new Properties();
InputStream cadiInfoURL = getClass().getClassLoader().getResourceAsStream("CADI/Common/Info/cadiInfo.properties");
cadiInfo.load(cadiInfoURL);
System.out.println("CADI version "+cadiInfo.getProperty("version"));
} catch (Exception e) {
System.out.println("PARAMETERS ERROR: error reading copyright");
System.out.println("Please report this error to: gici-dev@deic.uab.es");
}
}
COM: <s> prints out the short copyright </s>
|
funcom_train/32144994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void appendToClasspath(String path) {
String cp = System.getProperty("java.class.path");
if (cp != null) {
cp += File.pathSeparatorChar + path;
} else {
cp = path;
}
System.setProperty("java.class.path", cp);
}
COM: <s> appends the given path to the classpath property </s>
|
funcom_train/17936659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getYjComboBox() {
if (yjComboBox == null) {
yjComboBox = new JComboBox(GAgGUI.gagYAxisParameters);
yjComboBox.setName("yjComboBox");
yjComboBox.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
String item = e.getItem().toString();
YAxisChartParameters.itemChanged(item, getPredictorType());
}
});
}
return yjComboBox;
}
COM: <s> this method initializes yj combo box </s>
|
funcom_train/7713855 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void putEdge(EmulatedNode peerNode) {
if(!this.isAlive()) {
this.close();
Trawler.GetInstance().remove(this);
return;
}
out.println(TrawlerNodeARPCommands.addNeighbor(peerNode.getFishAddr(), peerNode.getIPAddress(), peerNode.getPort()));
}
COM: <s> tell the emulated node about one of its neighbors </s>
|
funcom_train/18485519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save() {
PrintWriter out;
try {
out = new PrintWriter(new FileWriter(xmlFileName));
out.print(xmlStringCache);
out.close();
} catch (IOException e) {
e.printStackTrace();
outERROR.fireOutPin(
"ERROR: - PXMLWrite - couldn save XML by path - " +
xmlFileName + " - " + e);
}
}
COM: <s> this method is called fore save xml string into file </s>
|
funcom_train/9556938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Long ejbFindByPrimaryKey(Long accountId) throws FinderException {
boolean result;
try {
result = selectByPrimaryKey(accountId.longValue());
} catch (Exception ex) {
throw new EJBException("BriefcaseFileEntityBean.ejbFindByPrimaryKey: "
+ ex.getMessage());
}
if (result) {
return accountId;
} else {
throw new ObjectNotFoundException("BriefcaseFile with id = "
+ accountId
+ " not found");
}
}
COM: <s> selects a briefcase from database by account id </s>
|
funcom_train/31436025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setGuiToLookAndFeel(String lf) {
try
{
UIManager.setLookAndFeel(lf);
this.getLFVal();
}
catch (Exception ex)
{
JOptionPane.showMessageDialog(this, "Look & feel\n" + lf
+ "\n not available for your system",
"Look and Feel", JOptionPane.ERROR_MESSAGE);
}
SwingUtilities.updateComponentTreeUI(this);
}
COM: <s> this method sets the look and feel schema to </s>
|
funcom_train/18597137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element getOwners(Dbms dbms, Set<Integer> metadataIds) throws Exception {
String query=
"SELECT m.id as metadataid, u.id as userid, u.name as name, u.surname as surname, u.email as email from Metadata m "+
"JOIN Users u on u.id = m.owner "+
"WHERE m.id IN (" + join(metadataIds,",") + ") "+
"ORDER BY u.id";
return dbms.select(query);
}
COM: <s> returns owners of metadata records </s>
|
funcom_train/274392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFindContactInfoContactInfointint() {
EmailAddress criteria = new EmailAddress();
criteria.setEmail(emailAddress.getEmail());
PaginatedList returned = partyFacadeDelegate.findContactInfo(criteria,
0, 5);
assertEquals(1, returned.getList().size());
}
COM: <s> class under test for paginated list find contact info contact info int int </s>
|
funcom_train/18804132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getItemSize() {
int numDataCells = 0;
String data;
for (int i = 0; i < EHEP.TABLE_NUM_DATA_COLUMNS; i++) {
data = tableItem.getText(i+1);
if (!data.equals(EHEP.TABLE_EMPTY_CELL) && data.length() > 0) {
numDataCells++;
} // for
} // for
return numDataCells;
}
COM: <s> calculates the size of the table item number of non empty cells </s>
|
funcom_train/51533547 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showErrorForm(String message) {
if (errorAlert == null) {
errorAlert = new Alert("Error", message, null, AlertType.ERROR);
errorAlert.addCommand(closeCommand);
errorAlert.setCommandListener(this);
}
errorAlert.setString(message);
display.setCurrent(errorAlert);
}
COM: <s> show error screen with last error </s>
|
funcom_train/5724468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object object) {
if (this == object) {
return true;
}
if (!(object instanceof UserDnPatternInfo)) {
return false;
}
final UserDnPatternInfo that = (UserDnPatternInfo) object;
if (this.id == null || that.getId() == null || !this.id.equals(that.getId())) {
return false;
}
return true;
}
COM: <s> returns code true code if the argument is an user dn pattern info </s>
|
funcom_train/44136931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setEnable(boolean b) {
m_MediaDeleteBtn.setEnabled(b);
m_MediaImportBtn.setEnabled(b);
m_MediaInputBtn.setEnabled(b);
m_chkbMedia.setEnabled(b);
if(b == false)
m_mediaCardLayout.show(this, VIRGIN_STATE);
}
COM: <s> to set enable or not the panel </s>
|
funcom_train/29792379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateListFromString3() {
String s = "test@test.de,test2@test2.de, MyGroup, My Test Group";
List<String> l = ListParser.createListFromString(s);
assertEquals("list size 4", 4, l.size());
assertEquals("test@test.de", l.get(0));
assertEquals("test2@test2.de", l.get(1));
assertEquals("MyGroup", l.get(2));
assertEquals("My Test Group", l.get(3));
}
COM: <s> test if leading or trailing whitespaces are trimmed correctly </s>
|
funcom_train/3846137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AudioInputStream getAudioInputStream(URL url) throws UnsupportedAudioFileException, IOException {
InputStream inputStream = url.openStream();
try {
return getAudioInputStream(inputStream);
} catch (UnsupportedAudioFileException e) {
inputStream.close();
throw e;
} catch (IOException e) {
inputStream.close();
throw e;
}
}
COM: <s> return the audio input stream from the given url </s>
|
funcom_train/44852300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ucNew(String inQuestionID, Long inMemberID, boolean inLocal) throws VException, SQLException {
DomainObject lSubscription = create();
lSubscription.set(SubscriptionHome.KEY_QUESTIONID, new Integer(inQuestionID));
lSubscription.set(SubscriptionHome.KEY_MEMBERID, inMemberID);
lSubscription.set(SubscriptionHome.KEY_LOCAL, inLocal ? SubscriptionHome.IS_LOCAL : SubscriptionHome.IS_SUBTREE);
lSubscription.insert(true);
}
COM: <s> creates a new subscription with the specified values </s>
|
funcom_train/40866409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setDefaultAddress(Long defaultId, List addresses) {
if(defaultId == null || addresses == null) {
return;
}
Address address;
for(int i = 0; i < addresses.size(); i++) {
address = (Address) addresses.get(i);
if(defaultId.equals(address.getId())) {
address.setDefaultAddress(true);
break;
}
}
Collections.sort(addresses, new DefaultAddressComparator());
}
COM: <s> sets default to true on the default address in the given list </s>
|
funcom_train/32353284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void openFile(final DataFileModel model) {
final String title = model.getFile().getName();
final DataList list = new DataList(controller, model);
final JScrollPane scrollPane = new JScrollPane(list);
getLeftPanel().addTab(title, scrollPane);
final int index = getLeftPanel().indexOfTabComponent(scrollPane);
openedFiles.put(title, index);
}
COM: <s> add a model to the tabs and create a data list </s>
|
funcom_train/29814627 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConstructor() {
try {
new LongHeap(-1);
fail("Should raise an IllegalArgumentException.");
} catch (IllegalArgumentException e) {
// expected
}
try {
new LongHeap(0);
fail("Should raise an IllegalArgumentException.");
} catch (IllegalArgumentException e) {
// expected
}
new LongHeap();
}
COM: <s> test the constructor </s>
|
funcom_train/19425929 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint(Graphics g, Coordinate coordOrigin) {
if (filled) {
g.fillArc(x - coordOrigin.x, y - coordOrigin.y, width, height, startAngle, angleLength);
} else {
g.drawArc(x - coordOrigin.x, y - coordOrigin.y, width, height, startAngle, angleLength);
}
}
COM: <s> paints this geo primitive using the given graphics g </s>
|
funcom_train/37830000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onAction(final Player player, final RPAction action) {
if (AWAY.equals(action.get(TYPE))) {
if (action.has(MESSAGE)) {
player.setAwayMessage(action.get(MESSAGE));
} else {
player.setAwayMessage(null);
// get the postman messages you might have received when you were away
new ReadPostmanMessages().readMessages(player);
}
player.notifyWorldAboutChanges();
}
}
COM: <s> changes away status depending on existence of message in action </s>
|
funcom_train/21953944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int calculateBreakPosition(int p0, int p1) {
super.calculateBreakPosition(p0, p1);
try {
String text = getDocument().getText(p0, p1 - p0);
int offset = MailUtilities.getBreakOffset(text, getCharacterLength(), getTabSize());
return p0 + offset;
} catch (javax.swing.text.BadLocationException ble) {
return p1;
}
}
COM: <s> this implementation will break the line at the character length </s>
|
funcom_train/34340937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getTexto() {
if (texto == null) {//GEN-END:|27-getter|0|27-preInit
// write pre-init user code here
texto = new TextField("texto", null, 10, TextField.ANY);//GEN-LINE:|27-getter|1|27-postInit
// write post-init user code here
}//GEN-BEGIN:|27-getter|2|
return texto;
}
COM: <s> returns an initiliazed instance of texto component </s>
|
funcom_train/8484618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ATObject meta_newInstance(ATTable initargs) throws InterpreterException {
// return Symbiosis.symbioticInstanceCreation(wrappedClass_, initargs.asNativeTable().elements_);
return Symbiosis.symbioticInstanceCreation(new JavaConstructor(wrappedClass_), initargs.asNativeTable().elements_);
}
COM: <s> a java class </s>
|
funcom_train/36558558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addProcessor(ProcessorComponent pc) {
processors.add(pc);
Entity e = getEntity();
if (e != null) {
pc.setEntity(e);
WorldManager wm = e.getWorldManager();
if (wm != null) {
wm.getProcessorManager().addComponent(pc);
}
}
}
COM: <s> add a processor </s>
|
funcom_train/42958511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resetCompleteGUI(){
Point oldShellLocationSize = shlContactManagementSoftware_.getSize();
Point oldShellLocation = shlContactManagementSoftware_.getLocation();
shlContactManagementSoftware_.dispose();
shlContactManagementSoftware_ = new Shell();
shlContactManagementSoftware_.setLocation(oldShellLocation);
shlContactManagementSoftware_.setSize(oldShellLocationSize);
ContactFormGUI cfg = new ContactFormGUI();
cfg.open();
shlContactManagementSoftware_.dispose();
}
COM: <s> reset the whole contact form </s>
|
funcom_train/14219018 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean taxApplies() {
boolean taxApplies = false;
Iterator i = this.iterator();
while (i.hasNext()) {
ShoppingCartItem item = (ShoppingCartItem) i.next();
if (item.taxApplies()) {
taxApplies = true;
break;
}
}
return taxApplies;
}
COM: <s> returns true when there are taxable items in the cart </s>
|
funcom_train/13712715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle){
processingGraphics.drawArc(x, y, width, height, startAngle, arcAngle);
svgGraphics.drawArc(x, y, width, height, startAngle, arcAngle);
}
COM: <s> fills a circular or elliptical arc covering the specified rectangle </s>
|
funcom_train/20842091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append("MIME header [ ");
Iterator it = headerfields.keySet().iterator();
if (it == null) return new String();
while (it.hasNext()) {
String fieldname = (String) it.next();
String fieldvalue = (String) headerfields.get(fieldname);
buffer.append(fieldname);
buffer.append("=");
buffer.append(fieldvalue);
if (it.hasNext()) {
buffer.append(", ");
}
}
buffer.append(" ]");
return buffer.toString();
}
COM: <s> returns a code string code representation of the mime header </s>
|
funcom_train/44824226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PropertyBind getPropertyBindByName (String name) {
java.util.Iterator it = propertyBinds.iterator();
while (it.hasNext()) {
PropertyBind pb = (PropertyBind) it.next();
if (name.equals(pb.getName())) return pb;
}
return null;
}
COM: <s> get a property bind based on its name </s>
|
funcom_train/5345253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void wakeupWriteEvent() {
if ( _waitingForDataAvailable ) {
LOG.debug("wakupWriteEvent");
if (_safeWriteWakeup.getEventTime() == Long.MAX_VALUE) {
_safeWriteWakeup.updateTime(System.currentTimeMillis()+
WRITE_WAKEUP_DELAY_TIME);
_scheduler.scheduleEvent(_safeWriteWakeup);
}
}
}
COM: <s> hand off the wakeup of data writing to the scheduler </s>
|
funcom_train/42268728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void expandPath() {
if (this.pathPosition == -1){
view.setSelectedItem(this.selectedItem);
eventBus.addSuccessPopUp("Arbre chargé");
}else {
this.expandedItem = this.selectedItem;
this.expandedItem.setState(true, false);
this.AddChildInTree(pathId.get(this.pathPosition));
}
this.pathPosition--;
}
COM: <s> this method was called to display a child node in the tree </s>
|
funcom_train/1447993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String edit() throws Exception{
if (logger.isDebugEnabled()) {
logger.debug("edit() - start"); //$NON-NLS-1$
}
Banneddomain blockDomain = BanneddomainsDelegator.getBannedDomainbyId(id);
blockDomainName = blockDomain.getDomainName();
domainid = blockDomain.getId();
if (logger.isDebugEnabled()) {
logger.debug("edit() - end"); //$NON-NLS-1$
}
return SUCCESS;
}
COM: <s> edits the banned domain selected by admin </s>
|
funcom_train/1476450 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDBTypeAndDDL(String databaseTypeConstant, String ddl) {
if (databaseTypeConstant == null || ddl == null) {
throw new IllegalArgumentException("databaseTypeConstant and ddl cannot be null");
}
if (dbTypeToDDL == null) {
dbTypeToDDL = new HashMap<String, String>();
}
dbTypeToDDL.put(databaseTypeConstant, ddl);
}
COM: <s> convenience method which allows setting the ddl for a database type </s>
|
funcom_train/38310157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void flushTocItems(PdfWriter writer) {
if (unnumberedTocItems != null) {
int numUnnumberedTocItems = unnumberedTocItems.size();
for (int i = 0; i < numUnnumberedTocItems; i++) {
TocItem tocItem = (TocItem) unnumberedTocItems.get(i);
tocItem.setPage(getPageNumber(writer));
}
unnumberedTocItems.clear();
}
}
COM: <s> processes all currently unnumbered toc items </s>
|
funcom_train/28506177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addWaypoints(Vector<WayPoint> wayPoints) {
this.wayPoints = wayPoints;
setHeading(wayPoints.get(1).getHeading());
setPosition(wayPoints.get(0).getX(), 0.06f, wayPoints.get(0).getY());
setSpeed(0.00925f);
action=1;
visible=true;
}
COM: <s> adds a vector of waypoints to the current agv </s>
|
funcom_train/7678046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getDataSize() {
int size = 0;
for (int tag = 0; tag <= maxTag(); tag++) {
for (int i = 0; i < getCount(tag); i++) {
size += getDataSize(tag, i);
}
}
return size;
}
COM: <s> returns the number of bytes needed to store this protocol buffer </s>
|
funcom_train/7661215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSaturatedExecute() {
ThreadPoolExecutor p = new ThreadPoolExecutor(1,1, LONG_DELAY_MS, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(1));
try {
for(int i = 0; i < 5; ++i){
p.execute(new MediumRunnable());
}
shouldThrow();
} catch(RejectedExecutionException success){}
joinPool(p);
}
COM: <s> execute throws rejected execution exception </s>
|
funcom_train/130173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void queryGeometry () {
try {
sendHeader (PLAYER_MSGTYPE_REQ, 1); /* 1 byte payload */
os.write (PLAYER_POSITION3D_GET_GEOM_REQ);
os.flush ();
} catch (Exception e) {
System.err.println ("[Position3D] : Couldn't send " +
"PLAYER_POSITION3D_GET_GEOM_REQ command: " + e.toString ());
}
}
COM: <s> configuration request query geometry </s>
|
funcom_train/21619821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetAddress2() {
System.out.println("setAddress2");
assertEquals(false, store.isDirty());
String add = "address2";
store.setAddress2(add);
assertEquals(add, store.getAddress2());
assertEquals(true, store.isDirty());
}
COM: <s> test of set address2 method of class edu </s>
|
funcom_train/2292784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSelectedResourceName() {
String resParam = getJsp().getRequest().getParameter(getListId() + LIST_RACTION_SEL);
if (CmsStringUtil.isNotEmpty(resParam)) {
CmsListItem item = getList().getItem(resParam);
return (String)item.get(LIST_COLUMN_NAME);
}
return null;
}
COM: <s> returns the resource name of the selected resource </s>
|
funcom_train/4448783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isEntryURI(String[] pathInfo) {
if (pathInfo.length > 2 && pathInfo[1].equals("entry")) return true;
if (pathInfo.length > 2 && pathInfo[1].equals("resource") && pathInfo[pathInfo.length-1].endsWith(".media-link")) return true;
return false;
}
COM: <s> true if url is a entry uri </s>
|
funcom_train/268904 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void requestLaps() throws FeatureNotSupportedException, IOException {
currentTask = GarminFactory.Get().getCommandId(
GarminFactory.CmndTransferLaps);
try {
output.write(GarminRawPacket.createCommandPacket(currentTask));
} catch (InvalidPacketException e) {
throw new FeatureNotSupportedException();
}
}
COM: <s> asks the gps to transmit all the laps in its memory </s>
|
funcom_train/46063283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateUpdateDeleteBookmark() {
//create
bm1.createAndPersistBookmark(bo1);
bm1.createAndPersistBookmark(bo2);
bm1.createAndPersistBookmark(bo3);
bm1.createAndPersistBookmark(bo4);
bo1.setDescription("changed1");
bo2.setDescription("changed2");
bo3.setDescription("changed3");
bo4.setDescription("changed4");
bo1.setDetaildata("substring1");
bo2.setDetaildata("substring2");
bo3.setDetaildata("substring3");
bo4.setDetaildata("substring4");
bm1.updateBookmark(bo1);
bm1.updateBookmark(bo2);
bm1.updateBookmark(bo3);
bm1.updateBookmark(bo4);
bm1.deleteBookmark(bo1);
bm1.deleteBookmark(bo2);
bm1.deleteBookmark(bo3);
bm1.deleteBookmark(bo4);
}
COM: <s> test create update and delete a bookmark </s>
|
funcom_train/8073545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(E element) throws UnsupportedEncodingException {
long hash;
String valString = element.toString();
for (int x = 0; x < k; x++) {
hash = createHash(valString + Integer.toString(x));
hash = hash % (long)bitSetSize;
if (!bitset.get(Math.abs((int)hash)))
return false;
}
return true;
}
COM: <s> returns true if the element could have been inserted into the bloom filter </s>
|
funcom_train/21465932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildAttributeSet(Snapshot snapshot) {
Vector<LbOAttribute<?>> vec = new Vector<LbOAttribute<?>>();
int rowNum = 0;
for (Condition cond : snapshot.getConditions()) {
// get
vec.add(new ConditionAttribute(cond, rowNum));
++rowNum;
}
// add the final behaviour attribute
vec.add(new BehaviourAttribute(snapshot.getBehaviour()));
attributes = new AttributeSet(vec);
}
COM: <s> builds the attribute list from the provided conditions stores the </s>
|
funcom_train/51241178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeTab(int index) {
checkTabIndex(index);
// (index + 1) to account for 'first' placeholder widget.
Widget toRemove = panel.getWidget(index + 1);
if (toRemove == selectedTab) {
selectedTab = null;
}
((CellPanel)panel).remove(toRemove);
}
COM: <s> removes the tab at the specified index </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.