__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/46575973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processControlAttributes(Component control, NamedNodeMap nnm) {
String att = getAttribute(nnm, "enabled", "");
if (!att.equals("")) {
control.setEnabled(att.equals("true"));
}
att = getAttribute(nnm, "visible", "");
if (!att.equals("")) {
control.setVisible(att.equals("true"));
}
}
COM: <s> p reads the common attributes enabled visible p </s>
|
funcom_train/33519475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testHasUserPlayed(){
GregorianCalendar c = new GregorianCalendar();
Match match = new Match(10l, 20l, c.getTime());
assertTrue(match.hasUserPlayed(10l));
assertTrue(match.hasUserPlayed(20l));
assertFalse(match.hasUserPlayed(50l));
match = new Match(100l, 500l, c.getTime());
assertTrue(match.hasUserPlayed(100l));
assertTrue(match.hasUserPlayed(500l));
assertFalse(match.hasUserPlayed(10l));
assertFalse(match.hasUserPlayed(20l));
}
COM: <s> this method tests if a certain player has participated in </s>
|
funcom_train/10626675 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddBeanContextMembershipListenerBeanContextMembershipListener() {
// Create BeanContext and BeanContextMembershipListener instances
BeanContextSupport sup = new BeanContextSupport();
BeanContextMembershipListener l = getBeanContextMembershipListener();
sup.addBeanContextMembershipListener(l);
assertTrue("Listener should be present", sup.bcmListeners.contains(l));
}
COM: <s> test method add bean context membership listener with </s>
|
funcom_train/7722800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XmlWriter setEmptyMode(Object mode) {
if(mode != EmptyElementXmlWriter.EMPTY_MODE &&
mode != EmptyElementXmlWriter.IGNORE_EMPTY_MODE &&
mode != EmptyElementXmlWriter.NULL_EMPTY_MODE
)
{
throw new IllegalArgumentException("Illegal mode: "+mode);
}
this.emptyMode = mode;
return this;
}
COM: <s> the emptiness strategy to use </s>
|
funcom_train/29266420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JavaInnerClass getInnerClass(String pName) {
if (innerClasses == null) {
return null;
}
for (int i = 0; i < innerClasses.size(); i++) {
JavaInnerClass jic = (JavaInnerClass) innerClasses.get(i);
if (jic.getQName().getInnerClassName().equals(pName)) {
return jic;
}
}
return null;
}
COM: <s> returns the inner class named code p name code or </s>
|
funcom_train/42635211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LinkCollection absorb(LinkCollection lc){
Iterator<Integer> it = lc.getDestinationIterator();
int curDest;
while (it.hasNext()){
curDest = it.next();
if (linkGroups.containsKey(curDest)){
linkGroups.get(curDest).absorb(lc.getLinkGroup(curDest));
}else{
linkGroups.put(curDest, lc.getLinkGroup(curDest));
}
}
return this;
}
COM: <s> link collections can easily be absorbed into one another </s>
|
funcom_train/18740493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void putDummyMatch(int keyIndex, HostNode image) {
Map<HostNode,MatchingComputation> matched =
MatchingAlgorithm.this.auxResults[keyIndex];
if (matched == null) {
matched =
MatchingAlgorithm.this.auxResults[keyIndex] =
new HashMap<HostNode,MatchingComputation>();
}
matched.put(image, MatchingAlgorithm.this.MATCH_DUMMY);
}
COM: <s> inserts a dummy object in the store of computations </s>
|
funcom_train/43393890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getJobOutputsBaseDirName(String portalID, String userID, String workflowID, String jobID, String runtimeID) throws Exception {
return portalID + sep + userID + sep + workflowID + sep + jobID + sep + "outputs" + sep + runtimeID + sep;
}
COM: <s> returns the job output directories </s>
|
funcom_train/6300542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isInInvocationContext(Servant servant) {
try {
if (orb.getPOACurrent().get_POA() == this && (servant == null || orb.getPOACurrent().getServant() == servant)) {
return true;
}
} catch (Org.omg.PortableServer.CurrentPackage.NoContext e) {
}
return false;
}
COM: <s> returns true if the current thread is in the context of executing </s>
|
funcom_train/24443950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unselectAllClusterObjects() {
for(IClusterObjectGUI<K, V> o : selectedClusterObjects) {
o.setSelected(false);
}
selectedClusterObjects.clear();
selectedClusterObjectIDs.clear();
if(selectedCluster != null) {
for(ClusterObjectLocation<K, V> clusterObject : selectedCluster.allClusterObjectLocations) {
clusterObject.clusterObject.setSelected(false);
}
}
}
COM: <s> unselect all cluster objects </s>
|
funcom_train/3021465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Graph createBasicClone() {
Graph clone = (Graph) super.clone();
clone.nodes = new Hashtable<Object, Node>();
clone.edges = new ArrayList<Edge>();
clone.subgraphs = new ArrayList<Graph>();
clone.setDirected(isDirected());
for (Graph sg : subgraphs) {
clone.addSubgraph(sg.createBasicClone());
}
return clone;
}
COM: <s> creates a copy of this graph recursively including its </s>
|
funcom_train/18652588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initEntryPoints() {
fEntryPoints.clear();
fEntryPoints.put(new Integer(LDId.TID_ROOT), getRoot());
getRoot().addAttribute("level", "A");
getRoot().getMetaDataHash().clear();
getRoot().getAttributesHash().clear();
}
COM: <s> init entry points clears the entrypoints hashtable and put the root item </s>
|
funcom_train/44019164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getEditUndoMenuItem() {
if (editUndoMenuItem == null) {
editUndoMenuItem = new JMenuItem();
editUndoMenuItem.setText("Undo");
editUndoMenuItem.setMnemonic('U');
editUndoMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Z, MENU_SHORTCUT_KEY_MASK));
editUndoMenuItem.addActionListener(eventHandler);
}
return editUndoMenuItem;
}
COM: <s> return the edit undo menu item </s>
|
funcom_train/26453089 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addRow(Alert alert) {
if (alert != null) {
String tempString[] = {Integer.toString(alert.ID()), alert.DATE(), alert.SOURCE_IP(), alert.SIGNATURE()};
tableModel.addRow(tempString);
}
}
COM: <s> adds an alert to the table </s>
|
funcom_train/43421104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Vector getUsedItems() {
Vector alreadyUsedItems = new Vector();
String prefix = getPrefix() + " " + getSuffix();
StringTokenizer tokenizer = new StringTokenizer(prefix);
while (tokenizer.hasMoreTokens()) {
String item = (String) tokenizer.nextToken();
alreadyUsedItems.add(item);
}
return alreadyUsedItems;
}
COM: <s> returns list of items that were already used in the text component </s>
|
funcom_train/38565263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Transaction getTransaction(ExecutableDescriptor execDesc) {
FileObjectRepresenter sourceRep = getFocusedFileObjectRepresenter();
FileObjectRepresenter destRep = getUnFocusedFileObjectRepresenter();
Transaction toReturn = new Transaction(execDesc, sourceRep.getContext(),
sourceRep.getSelected(), destRep.getContext(), destRep.getSelected(),
this);
toReturn.addSelectionOperationListeners(this);
return toReturn;
}
COM: <s> creates a transaction describing the actual state of the graphical </s>
|
funcom_train/9437437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUIDLParserMultiFail() {
// multi-line mode
Pop3Store.Pop3Folder.UidlParser parser = mFolder.new UidlParser();
// Test with null input
boolean result;
result = parser.parseMultiLine(null);
assertFalse(result);
// Test with empty input
result = parser.parseMultiLine("");
assertFalse(result);
}
COM: <s> test various rainy day operations of the uidl parser for multi line responses </s>
|
funcom_train/19990292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMaxSize(int maxSize) {
this.maxSize = maxSize;
this.maxObjectSize = (int)(maxSize * .9);
// It's possible that the new max size is smaller than our current cache
// size. If so, we need to delete infrequently used items.
cullCache();
}
COM: <s> sets the maximum size of the cache in bytes </s>
|
funcom_train/38737123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Key getNextSuccessorAvailable() {
Boolean success;
Message pingMessage;
for (int i = 0; i < keyList.length; i++) {
pingMessage = new MessageXML(Protocol.PING, keyList[i].getValue(),
chordNode.getKey().getValue());
success = communicationManager.sendMessageUnicast(pingMessage,
Boolean.class);
if (success != null) {
return keyList[i];
}
}
return null;
}
COM: <s> verifies and return the next successor that is available by checking </s>
|
funcom_train/3099262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize(Puttable executorChannel) {
getLogger().info("Initializing JobAssigner");
consumer = new Consumer(jobAssignerChannel, executorChannel, this);
executor = new ThreadedExecutor();
try {
executor.execute(consumer);
}
catch (InterruptedException e) {
e.printStackTrace();
System.exit(1);
}
}
COM: <s> initializes with the given input and output channels and starts consuming task commands </s>
|
funcom_train/22927425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
if (fEditor != null) {
Job theJob = new Job("Formatting") {
protected IStatus run(IProgressMonitor monitor) {
fEditor.format();
return new Status(IStatus.OK, "net.sourceforge.flora.eclipse.texteditor", IStatus.OK, "formatted Text", null);
}
};
theJob.setUser(true);
theJob.schedule();
}
}
COM: <s> formats the text of the current code flora editor code br </s>
|
funcom_train/51415016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAllMandatoryColumnsFilled(){
Iterator iter = rows.values().iterator();
Row row;
while(iter.hasNext()) {
row = (Row)iter.next();
//if a row that is not marked for deletion misses a mandatory field, return false
if(!row.isSettedForDeletion() && !row.isMandatoryColumnsFilled())
return false;
}
return true;
}//isAllMandatoryColumnsFilled
COM: <s> checks if all mandatory columns of all rows of this table are filled </s>
|
funcom_train/1733878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRankFor(int articleID, double rank) throws DatabaseException{
String sql="update article set rank=? and need_rank=false where id=?";
try{
PreparedStatement ps=this.aConn.prepareStatement(sql);
ps.setDouble(1, rank);
ps.setInt(2, articleID);
ps.execute();
}catch(SQLException e){
throw new DatabaseException(e.toString());
}
return;
}
COM: <s> function to send the rank information for a specific article </s>
|
funcom_train/8343557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleFilterCriteriaInput() {
int editingColumn = theTable.getEditingColumn();
int editingRow = theTable.getEditingRow();
editingColumn = theTable.convertColumnIndexToModel(editingColumn);
if (editingColumn != -1 && editingRow != -1) {
String value = ((JTextComponent) theTable.getEditorComponent()).getText();
model.setFilter(editingColumn, value);
}
}
COM: <s> when the user enters criteria into the filter field apply the filter </s>
|
funcom_train/9292098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public ijResult CommitStatement() throws ParseException, SQLException {
jj_consume_token(COMMIT);
if (jj_2_89(2)) {
jj_consume_token(WORK);
} else {
;
}
haveConnection();
theConnection.commit();
{if (true) return null;}
throw new Error("Missing return statement in function");
}
COM: <s> commit statement is simply commit </s>
|
funcom_train/25084548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public ActivityFeed getActivityFeed() throws IOException, ServiceException {
// return service.getFeed(
// new URL(getActivityFeedUrl()), ActivityFeed.class);
//// for (BaseActivityEntry<?> entry : activityFeed.getEntries()){
//// System.out.println(entry.getSummary().getPlainText());
//// }
// }
COM: <s> fetches and displays the sites activity feed </s>
|
funcom_train/24934299 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addGeneralization( MGeneralization gen ) {
MClass parent = gen.parent();
MClass child = gen.child();
GeneralizationEdge e =
new GeneralizationEdge( fClassToNodeMap.get( child ),
fClassToNodeMap.get( parent ), this );
synchronized ( fLock ) {
fGraph.addEdge( e );
fGenToGeneralizationEdge.put( gen, e );
fLayouter = null;
}
}
COM: <s> adds a generalization to the diagram </s>
|
funcom_train/21936502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assertContainsInOrder(Object obj) {
if (!contains(obj))
throw new AssertionFailedError("\"" + obj + "\" is not in list." + getDebugInfo());
int currentPosition = indexOf(obj);
if (currentPosition < knownMinPosition) {
throw new AssertionFailedError("\"" + obj + "\" was before another object that was already asserted." + getDebugInfo());
}
knownMinPosition = currentPosition + 1;
}
COM: <s> checks that object is after the other objects asserted before this object </s>
|
funcom_train/19378183 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setTranslation(Reader translationInput) {
String methodName = "setTranslation";
ExceptionUtils.checkNull(
methodName,
"translationInput",
translationInput);
try {
this.translation =
(Translation)XmlObjectFactory.getInstance(Translation.class).getObject(
translationInput);
this.translation.setLibraryTranslation(this);
} catch (Exception ex) {
String errMsg = "Error performing " + methodName;
logger.error(errMsg, ex);
throw new LibraryException(errMsg, ex);
}
}
COM: <s> the processed translation template as a reader </s>
|
funcom_train/23335094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EntityTreeNode addNode(EntityInterface child) {
EntityTreeNode parentNode = null;
TreePath parentPath = this.getSelectionPath();
if (parentPath == null) {
parentNode = rootNode;
} else {
parentNode = (EntityTreeNode)
(parentPath.getLastPathComponent());
}
return addNode(parentNode, child, true);
}
COM: <s> add child to the currently selected node </s>
|
funcom_train/18298655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteUselessProperties(){
for(int x = 0;x<size();x++){
//159 = Min throw damage
//160 = Max throw damage
//23 = 2h Min damage
//24 = 2h Max damage
//140 = Extra Blood
//194 SOCKETS??
if(((D2Prop)get(x)).getPNum() == 140 || ((D2Prop)get(x)).getPNum() == 194 || multipleMinMaxDmg((D2Prop)get(x))){
remove(x);
x--;
}
}
}
COM: <s> clean up some of those useless properties </s>
|
funcom_train/20604844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void tearDown() throws Exception {
if (m_lastException != null) {
throw m_lastException;
}
if (m_modalThread.isAlive()) {
m_modalThread.interrupt();
}
m_modalThread = null;
ma = null;
m_helper = null;
super.tearDown( );
}
COM: <s> interrupt the modal thread if it is still running </s>
|
funcom_train/11743309 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String extractTemplateString() {
String sql = query.getTemplate(getAdapter().getClass().getName());
// note that we MUST convert line breaks to spaces. On some databases (DB2)
// queries with breaks simply won't run; the rest are affected by CAY-726.
return Util.stripLineBreaks(sql, ' ');
}
COM: <s> extracts a template string from a sqltemplate query </s>
|
funcom_train/14430931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String classNameFromFile(String classFileName) {
String s = classFileName.substring(0, classFileName.length() - 6);
String s2 = s.replace('/', '.').replace('\\', '.');
return s2.startsWith(".") ? s2.substring(1) : s2;
}
COM: <s> converts the filename into a classname </s>
|
funcom_train/26410288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeCurrentNode() {
TreePath currentSelection = tree.getSelectionPath();
if (currentSelection != null) {
DefaultMutableTreeNode currentNode = (DefaultMutableTreeNode)
(currentSelection.getLastPathComponent());
MutableTreeNode parent = (MutableTreeNode)(currentNode.getParent());
if (parent != null) {
treeModel.removeNodeFromParent(currentNode);
}
}
}
COM: <s> remove the currently selected node </s>
|
funcom_train/28763177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setKeyValue(java.lang.String value) throws com.intersys.objects.CacheException {
com.intersys.cache.Dataholder dh = new com.intersys.cache.Dataholder (value);
mInternal.setProperty(ii_KeyValue, jj_KeyValue,kk_KeyValue, com.intersys.objects.Database.RET_PRIM, "KeyValue", dh);
return;
}
COM: <s> sets new value for code key value code </s>
|
funcom_train/9869610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int deleteByWhere(String where) throws SQLException {
Connection c = null;
PreparedStatement ps = null;
try {
c = getConnection();
String delByWhereSQL = "DELETE FROM GAMEDATA " + where;
ps = c.prepareStatement(delByWhereSQL);
return ps.executeUpdate();
} finally {
getManager().close(ps);
freeConnection(c);
}
}
COM: <s> deletes rows from the gamedata table using a where clause </s>
|
funcom_train/28911042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isFallbackElement(QName element) {
if (element.localpart.equals(XINCLUDE_FALLBACK)) {
if (hasXIncludeNamespace(element)) {
return true;
}
else if (!fOldNamespaceWarningIssued && hasXInclude2001Namespace(element)) {
reportError("OldXIncludeNamespace", null, XMLErrorReporter.SEVERITY_WARNING);
fOldNamespaceWarningIssued = true;
}
}
return false;
}
COM: <s> checks if the element is an lt fallback gt element </s>
|
funcom_train/9990195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object apply(Context context, Object arg) {
if (arg == null) {
throw new NullArgument("Null argument to warn().");
}
String message = arg.toString();
Logger log = Logger.getLogger("org.taak.script");
log.warn(message);
return null;
}
COM: <s> log a warn message </s>
|
funcom_train/41325885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void check(int index) {
if (index < 0)
throw new IndexOutOfBoundsException("index is negative (" + index
+ ")");
if (index >= size)
throw new IndexOutOfBoundsException("index >= size (" + index
+ " >= " + size + ")");
}
COM: <s> checks the index </s>
|
funcom_train/1386154 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JDateChooser getDataScadenza() {
if (dataScadenza == null) {
dataScadenza = new JDateChooser("dd/MM/yyyy", "##/##/##", '_');
dataScadenza.setBounds(new Rectangle(100, 45, 131, 26));
dataScadenza.setDate(new Date());
}
return dataScadenza;
}
COM: <s> this method initializes data scadenza </s>
|
funcom_train/31106476 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Multiplicity getMultiplicity() {
String explicitMultiplicity =
getTagValue( EjbTags.CMR_TARGET_MULTIPLICITY );
if (explicitMultiplicity != null) {
return Multiplicity.forName( explicitMultiplicity );
} else if (getTarget() != null) {
if (getTarget().getFieldType() != null) {
return Multiplicity.MANY;
}
}
return Multiplicity.ONE;
}
COM: <s> get the multiplicity for this role </s>
|
funcom_train/2807744 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
try {
Assembly a = (Assembly) super.clone();
a.stack = (Stack) stack.clone();
if (target != null) {
a.target = (PubliclyCloneable) target.clone();
}
return a;
} catch (CloneNotSupportedException e) {
// this shouldn't happen, since we are Cloneable
throw new InternalError();
}
}
COM: <s> return a copy of this object </s>
|
funcom_train/46165134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addHotspot(String name, Hotspot hotspot) {
// Check parameters
if (name == null && hotspot == null) {
throw new NullPointerException(
"Parameters name and hotspot can not be null.");
} else if (name == null) {
throw new NullPointerException("Parameter name can not be null.");
} else if (hotspot == null) {
throw new NullPointerException("Parameter hotspot can not be null.");
}
hotspots.put(name, hotspot);
}
COM: <s> adds a hotspot to this location </s>
|
funcom_train/45622713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addValuePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CreatePropertyType_value_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CreatePropertyType_value_feature", "_UI_CreatePropertyType_type"),
MSBPackage.eINSTANCE.getCreatePropertyType_Value(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the value feature </s>
|
funcom_train/45643430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private TableItem newTableItem(String name, boolean basic, boolean isDefault, int index) {
TableItem item = new TableItem(availableAlphabetsTable, index);
item.setText(0, name);
if (basic) {
item.setText(1, "Yes");
}
if (isDefault) {
item.setText(2, "Yes");
}
return item;
}
COM: <s> creates a new table item that will be displayed in the table </s>
|
funcom_train/536964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testListening() throws Exception {
MservConnectionListener listener =
MservConnectionListener.getListener();
assertFalse(canConnect());
assertFalse(listener.isListening());
listener.startListening();
assertTrue(canConnect());
assertTrue(listener.isListening());
listener.stopListening();
assertFalse(canConnect());
assertFalse(listener.isListening());
}
COM: <s> verify that starting and stopping listening works correctly </s>
|
funcom_train/9237658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean evaluate(final boolean[] conditions) {
switch (op) {
case VAR:
return conditions[argument];
case NOT:
return !leftArg.evaluate(conditions);
case AND:
return leftArg.evaluate(conditions) && rightArg.evaluate(conditions);
case OR:
return leftArg.evaluate(conditions) || rightArg.evaluate(conditions);
default:
return true;
}
}
COM: <s> evaluates this tree with the specified conditions </s>
|
funcom_train/29779623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setFields(Object target, BeanFactory beanFactory) {
Map fields = getFieldBuilders();
if (fields == null || fields.isEmpty()) {
return;
}
AccessibleValueBuilder[] avb = (AccessibleValueBuilder[]) fields
.values().toArray(new AccessibleValueBuilder[fields.size()]);
for (int i = 0; i < avb.length; i++) {
avb[i].setAsField(target, beanFactory);
}
}
COM: <s> sets fields on the bean </s>
|
funcom_train/44728058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUserObjectIsCorrect() {
GenericNode gn = new DefaultGenericNode("Test", "UserObject");
assertEquals(gn.getUserObject().getClass(), String.class);
assertEquals(gn.getUserObject().toString(), "UserObject");
}
COM: <s> test that user object works </s>
|
funcom_train/35140019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSemanticService() {
StatefulSemanticService semanticService = new StatefulSemanticService(
Config.ruleFile);
semanticService.setExternalContext(Config.getExternalContext());
semanticService.setSessionVariables(Config.getSessionVariables());
super.assertNotNull(semanticService);
Collection results = semanticService.execute(new Integer(10));
super.assertNotNull(results);
results = semanticService.execute(Config.getEvenFacts());
super.assertNotNull(results);
}
COM: <s> test semantic service </s>
|
funcom_train/18351740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CapCommon getSelectedCapCommon() {
CapCommon capCommon = null;
TreePath path = getJTree().getSelectionPath();
if (path != null) {
getJTree().setSelectionPath(path);
capCommon = ((CapTreeNode)path.
getLastPathComponent()).getCapCommon();
}
return capCommon;
}
COM: <s> returns cap common for selected node </s>
|
funcom_train/18343443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendToServer(Message message) {
if (! (message instanceof PlayerMessage)) {
LOG.log(Level.WARNING, "message is not a playermessage: {0}", message);
}
message.setPlayerId(playerId);
message.setDestinationPlayerId((short) -1);
LOG.log(Level.FINEST, "sending {0}", message);
getServerConnection().sendMessage(message); // this is a direct connection
}
COM: <s> send this message only to the server </s>
|
funcom_train/49026989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JXDatePicker getJXDatePicker() {
if (JXDatePicker == null) {
JXDatePicker = new JXDatePicker();
JXDatePicker.setEditable(true);
if (vecchioMenu.getInfo() != null && vecchioMenu.getInfo().getQuando() != null) JXDatePicker.setDate(vecchioMenu.getInfo().getQuando().getTime());
}
return JXDatePicker;
}
COM: <s> this method initializes jxdate picker </s>
|
funcom_train/269416 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JLocalizedButton getLaunchButton() {
if (this.launchButton == null) {
this.launchButton = new JLocalizedButton(SimpleGUIResourceBundle);
this.launchButton.setText("launchButton");
this.launchButton.addActionListener(this);
this.launchButton.setDoubleBuffered(true);
this.launchButton.setBounds(402, 91, 86, 22);
this.launchButton.addFocusListener(this);
this.launchButton.setActionCommand("Launch");
}
return this.launchButton;
}
COM: <s> this method initializes launch button </s>
|
funcom_train/28751972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSubmitted(Long newVal) {
if ((newVal != null && this.submitted != null && (newVal.compareTo(this.submitted) == 0)) ||
(newVal == null && this.submitted == null && submitted_is_initialized)) {
return;
}
this.submitted = newVal;
submitted_is_modified = true;
submitted_is_initialized = true;
}
COM: <s> setter method for submitted </s>
|
funcom_train/42074646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(String oldName, String newName, String newGrade) {
System.out.println("MyListCard - update");
try {
_cijferlijst.update(oldName, newName, newGrade);
} catch(RemoteException ex) {
System.out.println("(MyListCard) " + ex);
}
uNaam.setText("");
uNaam.setEnabled(false);
uCijfer.setText("");
uCijfer.setEnabled(false);
bUpdate.setEnabled(false);
bDelete.setEnabled(false);
}
COM: <s> performs an update on a student </s>
|
funcom_train/51269879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void generatePort(XQName functionName, int counter) {
String name = functionName.getLocalPart();
StringBuffer port = new StringBuffer();
port.append(" <operation name=\"").append(name).append("\">\n");
port.append(" <input name=\"input"+counter+"\" message=\"tns:").append(name)
.append("\"/>\n");
port.append(" <output name=\"output"+counter+"\" message=\"tns:").append(name).append(
"Response\"/>\n");
port.append(" </operation>\n");
this.portOperations.append(port);
}
COM: <s> generates the port part of the wsdl for a function </s>
|
funcom_train/35327699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (obj==this)
return true;
if (!(obj instanceof StackTraceElement))
return false;
StackTraceElement e = (StackTraceElement)obj;
return e.declaringClass.equals(declaringClass) &&
e.lineNumber == lineNumber &&
Objects.equals(methodName, e.methodName) &&
Objects.equals(fileName, e.fileName);
}
COM: <s> returns true if the specified object is another </s>
|
funcom_train/11707633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAeDescriptor() throws Exception {
File aeDescFile = JUnitExtension.getFile(TEST_FOLDER + "/" + AE_DESC_NAME);
if (!aeDescFile.isFile())
throw new FileNotFoundException("AE descriptor not found");
Assert.assertTrue(UIMAUtil.ANALYSIS_ENGINE_CTG.equals(UIMAUtil
.identifyUimaComponentCategory(aeDescFile)));
}
COM: <s> runs test case for analysis engine descriptor </s>
|
funcom_train/14160573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void openDeliveryChannel() {
try {
// open the delivery channel from the component context
ComponentContext compCtx = getComponentContext();
this.mDeliveryChannel = compCtx.getDeliveryChannel();
} catch (MessagingException ex) {
RuntimeHelper.logDebug(ex);
} catch ( Exception ex) {
RuntimeHelper.logDebug(ex);
}
}
COM: <s> opens the delivery channel to accept the message exchange objects or </s>
|
funcom_train/20896112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConnectionFactory() throws Exception {
System.out.println("connectionFactory");
Connection expResult = null;
Connection result = ConnectionFactory.connectionFactory();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of connection factory method of class it </s>
|
funcom_train/12855745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Blob createNewBlob(int blockSize) throws PersistException {
StoredLob lob = mLobStorage.prepare();
lob.setLocator(mLocatorSequence.nextLongValue());
lob.setBlockSize(blockSize);
lob.setLength(0);
lob.insert();
return new BlobImpl(lob.getLocator());
}
COM: <s> returns a new blob whose length is zero </s>
|
funcom_train/39486792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifiesAll() {
assert monitor.getLockingThread() != null : "notifyAll on unlocked object: " + this;
ThreadInfo[] locked = monitor.getLockedThreads();
for (int i=0; i<locked.length; i++) {
locked[i].setStatus(ThreadInfo.NOTIFIED);
}
JVM.getVM().notifyObjectNotifiesAll(ThreadInfo.currentThread, this);
}
COM: <s> notify all waiters </s>
|
funcom_train/47022371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getCurrentVersion() {
if (currentVersion == null) {//GEN-END:|228-getter|0|228-preInit
// write pre-init user code here
currentVersion = new StringItem(getLocalizedString("Your Version"), null);//GEN-LINE:|228-getter|1|228-postInit
// write post-init user code here
}//GEN-BEGIN:|228-getter|2|
return currentVersion;
}
COM: <s> returns an initiliazed instance of current version component </s>
|
funcom_train/7442395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getMatchingMode(Restlet target) {
int result = getDefaultMatchingMode();
if ((target instanceof Directory) || (target instanceof Router)) {
result = Template.MODE_STARTS_WITH;
} else if (target instanceof Filter) {
result = getMatchingMode(((Filter) target).getNext());
}
return result;
}
COM: <s> returns the matching mode for the target restlet </s>
|
funcom_train/35095266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkForDragEvent(MouseEvent e) {
if (e.getID() == MouseEvent.MOUSE_DRAGGED && null != previous) {
previous.dispatchEvent(SwingUtilities.convertMouseEvent(this, e, previous));
inDrag = true;
return true;
} else {
return false;
}
}
COM: <s> checks to see if a mouse drag event needs to be forwarded </s>
|
funcom_train/10619298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInt32(int[] src, int offset, int length) {
checkArraysBounds(offset, src.length, length, 4);
if (addr == 0) {
for (int i = 0, j = offset; i < length; i++, j++) {
setInt32InArray(i * 4, src[j]);
}
} else {
macc.setInt(addr, src, offset, length);
}
}
COM: <s> this method transfers int values from the given destination array </s>
|
funcom_train/43244931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsSimpleConversion() {
System.out.println("isSimpleConversion");
Class cls = null;
boolean expResult = true;
boolean result = BeanTools.isSimpleConversion(cls);
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of is simple conversion method of class org </s>
|
funcom_train/33399835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSatisfyShipsRule(Map<ShipRule, Integer> playerShips) {
boolean result = false;
if (playerShips != null && playerShips.size() != 0) {
for (Ship ruleShip : rule.keySet()) {
// compare count of ship
if (!rule.get(ruleShip).equals(playerShips.get(ruleShip))) {
return false;
}
}
// everything Ok
result = true;
}
return result;
}
COM: <s> this method compare rule ships to player ships </s>
|
funcom_train/4924499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getExtension(Mapping mapping) {
// Obtain the extension
String path = mapping.getPath();
int dotIndex = path.lastIndexOf('.');
if (dotIndex < 0) {
// No extension, so no mapping
return null;
}
// +1 to ignore '.'
String extension = path.substring(dotIndex + 1);
extension = extension.toLowerCase(); // to match
// Return the extension
return extension;
}
COM: <s> obtains the extension for the </s>
|
funcom_train/22761384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showColumns(AxisModel[] cols,boolean doit) {
if(cols == null)
return;
// int[] indices = getIndices(cols);
PaloTableEvent te = new PaloTableEvent(this);
te.type = doit ? PaloTableEvent.ShowColumns : PaloTableEvent.HideColumns;
te.deep = isDeepExpand();
te.doit = true;
te.setColumns(cols); //indices);
notifyListeners(te);
}
COM: <s> performs the showing or hiding of the given models </s>
|
funcom_train/37651494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkChildren() {
if (children == null) {
children = new ArrayList(node.jjtGetNumChildren());
for (int i = 0; i < node.jjtGetNumChildren(); i++) {
children.add(new SimpleNodeTreeNodeAdapter(this, (SimpleNode) node.jjtGetChild(i)));
}
}
}
COM: <s> checks the children and creates them if neccessary </s>
|
funcom_train/41164186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(CoExercises1 entity) {
EntityManagerHelper.log("saving CoExercises1 instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved co exercises1 entity </s>
|
funcom_train/23779362 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean _isSmartMode() {
IWorkbenchPage page = EslinkPlugin.getActivePage();
if (page != null) {
IEditorPart part = page.getActiveEditor();
if (part instanceof ITextEditorExtension3) {
ITextEditorExtension3 extension = (ITextEditorExtension3) part;
return extension.getInsertMode() == ITextEditorExtension3.SMART_INSERT;
}
}
return false;
}
COM: <s> checks if smart insert mode is enabled </s>
|
funcom_train/31520249 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void storeCalendarStoreInformations(final String calstoreName, final String[] cal_masters) {
// calendar store property list file
File calStore = new File(getDatabasepath(), CALENDARSTORE_FILE);
if (calStore.exists() == false) {
generateCalendarStore(calstoreName, cal_masters);
writeCalendarStoreFile();
} else {
try {
readCalendarStoreFile();
} catch (Exception e) {
log.debug("regenerate calendarstore data");
generateCalendarStore(calstoreName, cal_masters);
}
}
}
COM: <s> record calendar store informations in file </s>
|
funcom_train/3419870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean internalPrevious() throws SQLException {
boolean bool = false;
// with previous move backwards,
// i.e. from any record towards first record
for(int rows=this.getRow(); rows>0;rows--) {
bool = super.internalPrevious();
if( p == null) {
return bool;
}
if(p.evaluate(this)){
break;
}
}
return bool;
}
COM: <s> over riding code internal previous code implementation </s>
|
funcom_train/7646886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void discardData() throws ClassNotFoundException, IOException {
primitiveData = emptyStream;
boolean resolve = mustResolve;
mustResolve = false;
do {
byte tc = nextTC();
if (tc == TC_ENDBLOCKDATA) {
mustResolve = resolve;
return; // End of annotation
}
readContent(tc);
} while (true);
}
COM: <s> reads and discards block data and objects until tc endblockdata is found </s>
|
funcom_train/33400909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initRoutingTable() {
Log.i(TAG, "initializing routing");
ownAddress = datalink.getNetworkAddress();
long dest = ownAddress;
long next_hop = dest;
int hops = 0;
RoutingTableEntry rte = new RoutingTableEntry(dest, next_hop, hops,
CurrentInfo.incrementOwnSeqNum());
routeTable.addRoutingEntry(rte);
// Announce arrival on the network
BroadcastRouteTableMessage();
}
COM: <s> init the environment for new user broadcast your routing table i </s>
|
funcom_train/3320837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BTSocket listenForIncoming() {
BTSocketSymbian sock = null;
if (serverUp()) {
int err = listenForConnection(serverptr);
if (err == KErrNone) {
sock = new BTSocketSymbian(true);
sock.setSocket(serverptr);
}
else {
throw new BTException("Failed to listen, e32std.h error code: " + err);
}
}
return sock;
}
COM: <s> creates a server instance that listens for incoming connections </s>
|
funcom_train/33162693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DominoJavaLib getJavaLibByName( String name ) {
for ( int x = 0 ; x < this.javaLibs.size(); x++ ) {
DominoJavaLib lib = (DominoJavaLib) javaLibs.elementAt(x) ;
if ( lib.getName().equals( name ) ) {
return lib ;
}
}
return null ;
}
COM: <s> get the named java script library </s>
|
funcom_train/14012311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFocusTraversalIndex(int newValue) {
int oldValue = getFocusTraversalIndex();
newValue &= 0x7fff;
flags = flags & ((~FLAGS_FOCUS_TRAVERSAL_INDEX)) | (newValue << 16);
firePropertyChange(FOCUS_TRAVERSAL_INDEX_CHANGED_PROPERTY, new Integer(oldValue), new Integer(newValue));
}
COM: <s> sets the focus traversal tab index of the component </s>
|
funcom_train/25520119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private List query() {
try {
if (em == null) {
em = Pasture.getEntityManager();
}
Query q = em.createQuery("SELECT c FROM EbQuery c where parent is null");
return q.getResultList();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return new ArrayList<EbQuery>();
}
COM: <s> we will set up a dummy model to initialize tree hierarchy </s>
|
funcom_train/3104959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addToCheckForUpdate(DataStore datastore) throws IloaException {
if (datastore == null) {
throw new IloaException("Can't add null object to CheckForUpdate process");
}
if (this.datastoreCFU == null) {
this.datastoreCFU = new ArrayList<DataStore>();
}
if (!this.datastoreCFU.contains(datastore)) {
this.datastoreCFU.add(datastore);
}
}
COM: <s> add a datastore for the check for update process </s>
|
funcom_train/18343727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifyIncoming(MessageClient client) {
MessageQueue incomingMessages = client.getIncomingMessageQueue();
while (!incomingMessages.isEmpty()) {
Message message = incomingMessages.poll();
synchronized (client.getMessageListeners()) {
for (MessageListener listener : client.getMessageListeners()) {
sendToListener(message, listener, MessageListener.MESSAGE_EVENT.RECEIVED);
}
}
synchronized (messageListeners) {
for (MessageListener listener : messageListeners) {
sendToListener(message, listener, MessageListener.MESSAGE_EVENT.RECEIVED);
}
}
}
}
COM: <s> process incoming messages to the listeners </s>
|
funcom_train/38515551 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void restore() {
addContainer(getContentPane());
try {
setSize(Integer.parseInt(xml.getOptionValue("size-x")), Integer.parseInt(xml.getOptionValue("size-y")));
setLocation(Integer.parseInt(xml.getOptionValue("pos-x")), Integer.parseInt(xml.getOptionValue("pos-y")));
}catch(NoSuchOptionException nsoe) {
centerWindow();
}catch(NumberFormatException nfe) {
centerWindow();
}
}
COM: <s> restores the window to a certain position and size </s>
|
funcom_train/18149856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setExpectedUseTime(IVL<TS> expectedUseTime) {
if(expectedUseTime instanceof org.hl7.hibernate.ClonableCollection)
expectedUseTime = ((org.hl7.hibernate.ClonableCollection<IVL<TS>>) expectedUseTime).cloneHibernateCollectionIfNecessary();
_expectedUseTime = expectedUseTime;
}
COM: <s> sets the property expected use time </s>
|
funcom_train/43095420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int countParameters(Object bf) {
Collection c = Model.getFacade().getParameters(bf);
Iterator it = c.iterator();
int count = 0;
while (it.hasNext()) {
Object p = it.next();
if (Model.getFacade().isReturn(p)) {
continue;
}
count++;
}
return count;
}
COM: <s> counts the number of parameters that are not return values </s>
|
funcom_train/51642328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String fieldDeclarationSelected(FieldDeclaration fieldDeclaration) {
if (fieldDeclaration.fragments().size() != 1) {
return RefactoringCoreMessages.ChangeTypeRefactoring_multiDeclarationsNotSupported;
} else {
VariableDeclarationFragment elem= (VariableDeclarationFragment) fieldDeclaration.fragments().iterator().next();
fFieldBinding= elem.resolveBinding();
SimpleName name= elem.getName();
setSelectionRanges(name);
return simpleNameSelected(name);
}
}
COM: <s> the selection corresponds to a field declaration </s>
|
funcom_train/37567092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddNGramsStringBuffer() {
String tokencontent = "testmeagain";
NGramProfile p = new NGramProfile("test", 1, 1);
p.addNGrams(new StringBuffer(tokencontent));
//test that profile size is ok, eg 8 different NGramEntries "tesmagin"
assertEquals(8, p.getSorted().size());
}
COM: <s> test add ngrams method with string buffer argument </s>
|
funcom_train/2581826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RegularTimePeriod previous() {
Quarter result;
if (this.quarter > FIRST_QUARTER) {
result = new Quarter(this.quarter - 1, this.year);
}
else {
if (this.year > 1900) {
result = new Quarter(LAST_QUARTER, this.year - 1);
}
else {
result = null;
}
}
return result;
}
COM: <s> returns the quarter preceding this one </s>
|
funcom_train/7411223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CodeAttribute getCodeAttribute() {
Iterator it = attributes.iterator();
while (it.hasNext()) {
AttributeFileInfo attr = (AttributeFileInfo) it.next();
if (attr.getName().equals("Code"))
return (CodeAttribute) attr;
}
return null;
}
COM: <s> returns code for this method or null </s>
|
funcom_train/31480495 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getKeyID() {
// Potential race here, but it's harmless. Well mostly. Worst case is
// that the keyid is generated multiple times, once.
if (null == this.cachedKeyID) {
this.cachedKeyID = this.getKeyHash().getB64Value();
}
return this.cachedKeyID;
}
COM: <s> return the key id of this public key </s>
|
funcom_train/43095941 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setBoundsImpl(int x, int y, int w, int h) {
Rectangle oldBounds = getBounds();
if (w > h)
h = HEIGHT;
else
w = HEIGHT;
getBigPort().setBounds(x, y, w, h);
head.setBounds(x, y, w, h);
calcBounds();
updateEdges();
firePropChange("bounds", oldBounds, getBounds());
}
COM: <s> override set bounds to keep shapes looking right </s>
|
funcom_train/10942108 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int storeByCondition(ModelEntity modelEntity, Map<String, ? extends Object> fieldsToSet, EntityCondition condition) throws GenericEntityException {
if (modelEntity == null || condition == null) {
return 0;
}
return genericDAO.updateByCondition(modelEntity, fieldsToSet, condition);
}
COM: <s> updates a group of values in a single pass </s>
|
funcom_train/47677442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Field cloneField() {
if (!isRoot()) {
throw new IllegalArgumentException("This operation is only allowed for root fields but the field \"" + getPath() + "\" is of type "
+ this.attributes.getFieldTypeAsString());
}
return cloneField(null, null);
}
COM: <s> clones the current branch </s>
|
funcom_train/42713181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOptions(Object typeKey, String[] editorValues) {
JComboBox box = editors.get(typeKey);
if (box == null) {
box = new JComboBox();
box.setEditable(true);
box.setMaximumRowCount(30);
editors.put(typeKey, box);
}
SwingUtils.replaceContents(box, editorValues);
}
COM: <s> replace the options associated with a key with a new set </s>
|
funcom_train/21025540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String strstem( String term ) {
if ( !isStemmable( term ) ) {
return term;
}
// Use lowercase for medium stemming.
term = term.toLowerCase();
// Reset the StringBuffer.
sb.delete( 0, sb.length() );
sb.insert( 0, term );
// reset the booleans
modified = false;
suite = false;
sb = treatVowels( sb );
setStrings();
step1();
if (!modified || suite)
{
if (RV != null)
{
suite = step2a();
if (!suite)
step2b();
}
}
if (modified || suite)
step3();
else
step4();
step5();
step6();
return sb.toString();
}
COM: <s> stemms the given term to a unique tt discriminator tt </s>
|
funcom_train/10048392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void characters(char[] chars, int startIndex, int endIndex) {
String data = new String(chars, startIndex, endIndex).trim();
if (data.length() > 0) {
if (param) {
paramVal.append(data.trim());
}
if (method) {
methodName = data.trim();
}
}
}
COM: <s> receive notification of character data inside an element </s>
|
funcom_train/17565816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Actor create(String p, Controler c) {
CreatorInt leCreateur = lookup(p);
Actor refDisAct = null;
try {
refDisAct = leCreateur.createLocal(c);
} catch (RemoteException e) {
throw new CreateException("Unable to create the actor on " + p, e);
}
return refDisAct;
}
COM: <s> actor creation from its controler on a given place </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.