__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/40685723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMapClickHandler(final MapClickHandler handler) {
maybeInitMapClickHandlers();
mapClickHandlers.addHandler(handler, new OverlayLatLngCallback() {
@Override
public void callback(Overlay overlay, LatLng latlng, LatLng overlaylatlng) {
MapClickEvent e = new MapClickEvent(MapWidget.this, overlay, latlng,
overlaylatlng);
handler.onClick(e);
}
});
}
COM: <s> add a click handler for mouse click events </s>
|
funcom_train/39884599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void exiting(String sourceClass, String sourceMethod) {
if (!internalIsLoggable(Level.FINER)) {
return;
}
LogRecord record = new LogRecord(Level.FINER, "RETURN");
record.setLoggerName(this.name);
record.setSourceClassName(sourceClass);
record.setSourceMethodName(sourceMethod);
setResourceBundle(record);
log(record);
}
COM: <s> logs a message indicating that a method is exited </s>
|
funcom_train/22440408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillLabels() {
IDialogSettings settings = UIUtils.getDialogSettings();
if (settings != null) {
String[] labels = settings.getArray(VSSPluginProvider.KNOWN_LABELS);
if (labels != null) {
for (int i = 0; i < labels.length; i++) {
String label = labels[i];
if (label != null) {
_labelsHistory.add(label);
}
}
}
}
}
COM: <s> method fill labels </s>
|
funcom_train/18569152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Fitness mapRating(Population population, int nx) {
Fitness fitness = new Fitness();
try {
List list = getImageList(population);
ImageType image = (ImageType)list.get(nx);
RatingBase rating = image.getRating();
fitness.setRating(rating);
} catch (Exception exc) {
Debug.stackTrace(exc);
}
return fitness;
}
COM: <s> method map rating </s>
|
funcom_train/13875416 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addInstantiatedClassPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_InstantiationExp_instantiatedClass_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_InstantiationExp_instantiatedClass_feature", "_UI_InstantiationExp_type"),
ImperativeoclPackage.Literals.INSTANTIATION_EXP__INSTANTIATED_CLASS,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the instantiated class feature </s>
|
funcom_train/23020782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void setLogImplementation(String classname) throws LinkageError, ExceptionInInitializerError, NoSuchMethodException, SecurityException, ClassNotFoundException {
try {
Class logclass = Class.forName(classname);
Class[] argtypes = new Class[1];
argtypes[0] = "".getClass();
logImplctor = logclass.getConstructor(argtypes);
}
catch (Throwable t) {
logImplctor = null;
}
}
COM: <s> set the log implementation log implementation factory by the name of the </s>
|
funcom_train/46057671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startIndexing() {
// Start updateThread
if ( (indexingThread == null) || !indexingThread.isAlive()) {
Tracing.logInfo("start full indexing thread...", OlatFullIndexer.class);
if (stopIndexing) {
indexingThread = new Thread(this, "FullIndexer");
stopIndexing = false;
resetDocumentCounters();
// Set to lowest priority
indexingThread.setPriority(Thread.MIN_PRIORITY);
indexingThread.setDaemon(true);
indexingThread.start();
}
} else {
Tracing.logDebug("indexing allready running", OlatFullIndexer.class);
}
}
COM: <s> start full indexer thread </s>
|
funcom_train/15688196 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateDBv8() throws Exception {
m_clJDBCAdapter.executeUpdate("ALTER TABLE Spieler ADD COLUMN TrainingBlock BOOLEAN");
m_clJDBCAdapter.executeUpdate("UPDATE Spieler SET TrainingBlock=false WHERE TrainingBlock IS null");
// Always set field DBVersion to the new value as last action.
// Do not use DBVersion but the value, as update packs might
// do version checking again before applying!
dbZugriff.saveUserParameter("DBVersion", 8);
}
COM: <s> update db structure to v8 </s>
|
funcom_train/28658518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void send(byte[] aBuf, int aLen) {
try {
for (int i = 0; i < aLen; i++) {
ivOut.write(aBuf[i]);
if (aBuf[i] == IAC)
ivOut.write(IAC);
}
}
catch (IOException ex) {
catchedIOException(ex);
}
}
COM: <s> sends a data buffer iac bytes are doubled </s>
|
funcom_train/45484142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addMovement(int jradio){
switch (jradio){
case 0:{
// nothing :p
break;
}
case 1:{
table.addRow(new Object[]{"Forward", "1"});
break;
}
case 2:{
table.addRow(new Object[]{"Left", "1"});
break;
}
case 3:{
table.addRow(new Object[]{"Right", "1"});
break;
}
case 4:{
table.addRow(new Object[]{"Backward", "1"});
break;
}
}
}
COM: <s> add rows on table </s>
|
funcom_train/42340256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ImageIcon createNavigationIcon(String imageName) {
// String imgLocation = "toolbarButtonGraphics/navigation/"
String imgLocation = "images/" + imageName + ".gif";
java.net.URL imageURL = ActionDemo.class.getResource(imgLocation);
if (imageURL == null) {
System.err.println("Resource not found: " + imgLocation);
return null;
} else {
return new ImageIcon(imageURL);
}
}
COM: <s> returns an image icon or null if the path was invalid </s>
|
funcom_train/43888869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isDerivedFrom(final XSDTypeDefinition typeDefinition, final QName baseTypeName) {
Name typeName = Types.toName(baseTypeName);
// XSDTypeDefinition baseTypeDefinition = Schemas.getBaseTypeDefinition(
// typeDefinition, baseTypeName);
// boolean isFeatureType = baseTypeDefinition != null;
// return isFeatureType;
return isDerivedFrom(typeDefinition, typeName);
}
COM: <s> returns whether code type definition code has an ancestor named </s>
|
funcom_train/45483786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean createNode() throws RemoteException {
P2PMemberController.logger.debug("Controller: create a my node");
String name = this.bootstrap.generateNewNodeName();
if (name != null) {
this.node = new Node(name);
this.bootstrap.join(node);
P2PMemberController.logger.debug("Controller: register my node");
return true;
}
P2PMemberController.logger.debug("Controller: can't get a valid node");
return false;
}
COM: <s> let the bootstrap node create a new node </s>
|
funcom_train/21016563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NewQuestionnaireAction ( ) {
super ( "New" );
putValue ( SHORT_DESCRIPTION, "Create new questionnaire" );
putValue ( MNEMONIC_KEY, new Integer ( KeyEvent.VK_N ) );
putValue ( ACCELERATOR_KEY,
KeyStroke.getKeyStroke ( KeyEvent.VK_N, ActionEvent.CTRL_MASK ) );
putValue ( SMALL_ICON, IconProvider.getIcon ( IconProvider.NEW ) );
}
COM: <s> the action to create a new questionnaire </s>
|
funcom_train/10698076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void lock() {
final Thread curThread = Thread.currentThread();
synchronized (lock) {
if (owner == null) {
owner = curThread;
acquestCounter = 1;
return;
} else if (owner == curThread) {
acquestCounter++;
return;
}
isDispatchThreadWaiting = (curThread == dispatchThread);
park(curThread);
}
}
COM: <s> acquire the lock for this synchronizer </s>
|
funcom_train/15912502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void expandNode(LiteNode ln, boolean expand) {
if (enableAnimation)
ln.setExpandedAnim(expand);
else {
Vector links = ln.getAssociatedLinks();
repaint(ln);
repaint(links);
if (JDeskView.showShortcuts)
repaint(ln.getAssociatedShortcuts());
ln.setExpanded(expand);
LiteShortcut.invalidate(ln.getAssociatedShortcuts());
repaint(ln);
repaint(links);
if (JDeskView.showShortcuts)
repaint(ln.getAssociatedShortcuts());
}
}
COM: <s> shows hides unused slots for the given node </s>
|
funcom_train/46764660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setMainDisplayToClickedPosition(MouseEvent e){
Display overview = (Display)e.getComponent();
Point2D newposition = overview.getAbsoluteCoordinate(e.getPoint(), null);
Display maindisplay = overview.getVisualization().getDisplay(0);
maindisplay.panToAbs(newposition);
maindisplay.repaint();
// disable autofocus
ChatVisualizationPanePrefuse pane = (ChatVisualizationPanePrefuse) maindisplay.getParent();
pane.setAutofocus(false);
}
COM: <s> sets the focus of main display to the point of the mouse event </s>
|
funcom_train/28997532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addChannelProfile(ChannelProfile aChanProf) {
if (getChannelProfiles() == null) {
setChannelProfiles(new Vector());
}
if ((aChanProf != null) && !getChannelProfiles().contains(aChanProf)) {
getChannelProfiles().add(aChanProf);
}
}
COM: <s> add a channel profile to the portal </s>
|
funcom_train/48580011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getAddIngatlanok() {
if (addIngatlanok == null) {
addIngatlanok = new JMenuItem();
addIngatlanok.setText("Hozzáadás");
addIngatlanok.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
System.out.println("actionPerformed()"); // TODO Auto-generated Event stub actionPerformed()
JFrame ingatlan = new IngatlanGUI();
ingatlan.setVisible(true);
}
});
}
return addIngatlanok;
}
COM: <s> this method initializes add ingatlanok </s>
|
funcom_train/29771294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetBlueFuseFiles() {
System.out.println("getBlueFuseFiles");
StartupFileSetup instance = new StartupFileSetup();
List<File> expResult = null;
List<File> result = instance.getBlueFuseFiles();
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 get blue fuse files method of class io </s>
|
funcom_train/3372829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getColumnExtentAt(int r, int c) {
TableCellElementInfo cell = getCell(r, c);
if (cell != null) {
int cols = cell.getColumnCount();
int delta = 1;
while ((c - delta) >= 0 && grid[r][c - delta] == cell) {
delta++;
}
return cols - delta + 1;
}
return 0;
}
COM: <s> returns the colspan of the specified entry </s>
|
funcom_train/39119854 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearParameters() throws SQLException {
for (int i = 0; i < this.parameterValues.length; i++) {
this.parameterValues[i] = null;
this.parameterStreams[i] = null;
this.isStream[i] = false;
this.isNull[i] = false;
}
}
COM: <s> in general parameter values remain in force for repeated used of a </s>
|
funcom_train/986717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getStringItem5() {
if (stringItem5 == null) {//GEN-END:|77-getter|0|77-preInit
// write pre-init user code here
stringItem5 = new StringItem("Aviso", "Las promociones no estan disponibles en este momento");//GEN-LINE:|77-getter|1|77-postInit
// write post-init user code here
}//GEN-BEGIN:|77-getter|2|
return stringItem5;
}
COM: <s> returns an initiliazed instance of string item5 component </s>
|
funcom_train/25418088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handle(AsnContext context) throws Exception {
// delete the assertion
Assertion assertion = this.getIndexAdapter().loadAssertionById(context,true);
context.getAuthorizer().authorizeDelete(context,assertion);
this.getIndexAdapter().delete(context,assertion.getSystemPart().getAssertionId());
context.getOperationResponse().generateOkResponse(context,null);
}
COM: <s> handle a deletion operation </s>
|
funcom_train/19971732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean doCheckCanBeExecuted(){
GregorianCalendar now = this.getClock().getTime();
if (now.before(this.getStartDate())) {
return false;
} else {
boolean assetsReady = this.getTaskType().checkConstraints(this, now, this.getDuration());
boolean depReady = this.tdm.checkDependecies();
return assetsReady && depReady;
}
}
COM: <s> check if all dependencies and requirements are fulfilled for task execution </s>
|
funcom_train/42212797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addStudentAttendanceEntry(Long workgroupId, Long runId, JSONArray presentUserIds, JSONArray absentUserIds) {
//get the current time
Date loginTimestamp = new Date();
//add a student attendance entry
this.studentAttendanceService.addStudentAttendanceEntry(workgroupId, runId, loginTimestamp, presentUserIds.toString(), absentUserIds.toString());
}
COM: <s> adds a student attendance entry to the db </s>
|
funcom_train/41739387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseProbableAccounts() throws ConfigException {
// retrieve the default user (account data) and all its default alternatives
List userNodes = doc.selectNodes("/mirrormetrics/user");
Iterator userNodesIterator = userNodes.iterator();
while(userNodesIterator.hasNext()) {
Identity id = probeIdentity((Element)userNodesIterator.next());
probableAccounts.add(id); // add this default user
}
}
COM: <s> this methods parse the configuration file for defaults ids or accounts </s>
|
funcom_train/34342303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getEnviartransaccion() {
if (enviartransaccion == null) {//GEN-END:|37-getter|0|37-preInit
// write pre-init user code here
enviartransaccion = new Command("enviar transaccion", Command.OK, 0);//GEN-LINE:|37-getter|1|37-postInit
// write post-init user code here
}//GEN-BEGIN:|37-getter|2|
return enviartransaccion;
}
COM: <s> returns an initiliazed instance of enviartransaccion component </s>
|
funcom_train/1606736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawCounters()
{
for (Player player : PlayerManager.getInstance().getPlayerList())
{
for (Counter counter : player.getCounters())
{
background.remove(counter.getPlayerImage());
counter.getPlayerImage().setBounds(
((int) counter.getCurrentLocation().getX()),
((int) counter.getCurrentLocation().getY()), 50, 50);
background.add(counter.getPlayerImage());
}
}
refresh();
}
COM: <s> updates the location of all </s>
|
funcom_train/10616576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testKeyException06() {
KeyException tE = new KeyException(null, null);
assertNull("getMessage() must return null", tE.getMessage());
assertNull("getCause() must return null", tE.getCause());
}
COM: <s> test for code key exception string throwable code constructor </s>
|
funcom_train/12974928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String show() {
StringBuffer tStrHTML = new StringBuffer();
Enumeration thisEnum = null;
tStrHTML.append(" <size>" + this.getSize() + "</size>\n");
thisEnum = this.getKeys();
while (thisEnum.hasMoreElements()) {
tStrHTML.append(" <item>" + thisEnum.nextElement() + "</item>\n");
}
return tStrHTML.toString();
}
COM: <s> show cache content </s>
|
funcom_train/10670883 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Result testFindEditorInSearchPath() {
String packageName = Sound2Editor.class.getPackage().getName();
PropertyEditorManager.setEditorSearchPath(new String[] { packageName });
assertTrue(PropertyEditorManager.findEditor(Sound2.class).getClass()
.equals(Sound2Editor.class));
return result();
}
COM: <s> verify that find editor method finds an editor class in an editor search </s>
|
funcom_train/31414336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removedANode() {
getTree().setCellRenderer(new StandardTreeCellRenderer());
TreePath path = getTree().getSelectionPath();
StandardTreeModel sm = getTreeModel();
if(sm!= null)
sm.fireTreeNodeDeleted(this);
getTree().expandPath(path);
}
COM: <s> removes a node from the tree </s>
|
funcom_train/40793298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getStopCommand1() {
if (stopCommand1 == null) {//GEN-END:|107-getter|0|107-preInit
// write pre-init user code here
stopCommand1 = new Command("Stop", Command.STOP, 0);//GEN-LINE:|107-getter|1|107-postInit
// write post-init user code here
}//GEN-BEGIN:|107-getter|2|
return stopCommand1;
}
COM: <s> returns an initiliazed instance of stop command1 component </s>
|
funcom_train/41230371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSuccessful() throws Exception {
HtmlTextInput username = (HtmlTextInput) element("form:username");
HtmlPasswordInput password = (HtmlPasswordInput)
element("form:password");
HtmlSubmitInput submit = (HtmlSubmitInput) element("form:submit");
username.setValueAttribute("gooduser");
password.setValueAttribute("goodpass");
submit(submit);
assertEquals("logon1", title());
}
COM: <s> p submit known good username and password values and </s>
|
funcom_train/51412709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void deleteCWSNode() {
try {
Row cwfNodeRow = MCompiereAspectCWFNode.getCWFNodeRow(adWFNodeRow.getPrimaryKey());
MCompiereAspectCWFNode.deleteCWFNode(cwfNodeRow.getPrimaryKey());
} catch (CMExceptionTable e) {
e.addContextInfo("Unable to delete cwsNode for AD_Node <"+adWFNodeRow.getPrimaryKey()+">.");
GUITools.showException(e);
}
}
COM: <s> deletes the root scriteria for the selected cwf node </s>
|
funcom_train/23931440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Date parseRFC822(String sDate) {
final int utIndex = sDate.indexOf(" UT");
if (utIndex > -1) {
final StringBuilder sb = new StringBuilder();
sb.append(sDate.substring(0, utIndex));
sb.append(" GMT");
sb.append(sDate.substring(utIndex + 3));
sDate = sb.toString();
}
return parseUsingFormat(rfc822, sDate);
}
COM: <s> parse date string in rfc822 format </s>
|
funcom_train/19401495 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getURICount() {
byte[] fromKey = keyBuilder.keyBuilder.reset().append(RdfKeyBuilder.CODE_URI).getKey();
byte[] toKey = keyBuilder.keyBuilder.reset().append(RdfKeyBuilder.CODE_LIT).getKey();
return getTermIdIndex().rangeCount(fromKey,toKey);
}
COM: <s> the of uris in the store </s>
|
funcom_train/26454335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSessionContext(SessionContext context) {
this.context = context;
try {
InitialContext ctx = new InitialContext();
sequenceHome = (SequenceLocalHome) PortableRemoteObject.narrow(ctx.lookup(SequenceLocalHome.COMP_NAME), SequenceLocalHome.class);
} catch (NamingException e) {
throw new EJBException(e);
}
}
COM: <s> session context set </s>
|
funcom_train/2388181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void encrypt( byte[] buffer ) throws PasswordSafeException {
/* The endian conversion is simply to make this compatible with
* use in previous versions of PasswordSafe (in ECB mode). Why
* the inversion is necessary for CBC mode and why it has to
* "cancelled out" in this (ECB mode), I don't know but it
* is the only way to get the correct ordering for the
* CBC and ECB contexts within a standard password safe file.
*/
Util.bytesToLittleEndian(buffer);
super.encrypt(buffer);
Util.bytesToLittleEndian(buffer);
}
COM: <s> encrypts code buffer code in place </s>
|
funcom_train/18113261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAttachment(File file) {
MessageBody b = new MessageBody();
b.setFile(file);
b.setField(
MessageConstants.CONTENT_TYPE,
"application/octet-stream; name=\"" + file.getName() + "\"");
//could use contentid here
b.setField(
MessageConstants.CONTENT_DISPOSITION,
"attachment; filename=\"" + file.getName() + "\"");
b.setField(MessageConstants.CONTENT_TRANSFER_ENCODING, "base64");
addAttachment(b);
}
COM: <s> method for adding an attachment to the message </s>
|
funcom_train/46680329 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFreeID(){
if (getNumberOfTimelineItems()>0) {
int i=0;
while (positions.containsKey((String)("T" + new Integer(i).toString()))){i++;}
return (String)("T" + new Integer(i));
}
return "T0";
}
COM: <s> returns a free id </s>
|
funcom_train/18183783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void testEqualsHostName() {
connectionRequestInfoImpl.setRecaptchaHostName(RECAPTCHA_HOST_NAME_TEST);
secondConnectionRequestInfoImpl.setRecaptchaHostName(RECAPTCHA_HOST_NAME_TEST);
assertThat(connectionRequestInfoImpl.equals(secondConnectionRequestInfoImpl), is(true));
assertThat(secondConnectionRequestInfoImpl.equals(connectionRequestInfoImpl), is(true));
}
COM: <s> test equality for only recaptcha host name property </s>
|
funcom_train/31661331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AffineTransform getAffineTransform() {
debug(1, "getAffineTransform");
// find the mouse click location in the non deformed space
return getContainer().transformTable(D, Alpha, Beta, Scale, getContainer().getTableAngle(), true);
} //getAffineTransform()
COM: <s> return the transformation rect to polar </s>
|
funcom_train/21849389 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintComponent(Graphics g) {
Color old_c = g.getColor();
FontMetrics fm = g.getFontMetrics(m_font);
int line_height = fm.getHeight();
int y = line_height - fm.getDescent();
g.setColor(m_background);
g.fillRect(0, 0, getWidth(), getHeight());
g.setColor(m_foreground);
g.drawString(m_index_str, MARGIN, y);
g.setColor(old_c);
}
COM: <s> paint routine that renders the focus glyphs </s>
|
funcom_train/16410559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String deCrypt(String stringToDeCrypt) {
try {
stringToDeCrypt = cryptLib.deCryptString(stringToDeCrypt, phrase);
stringToDeCrypt = cryptLib.reverseString(stringToDeCrypt);
stringToDeCrypt = cryptLib.removeHash(stringToDeCrypt);
stringToDeCrypt = cryptLib.convertASCISequenceToString(stringToDeCrypt);
} catch (IllegalArgumentException e) {
stringToDeCrypt = "";
}
return stringToDeCrypt;
}
COM: <s> decrypts a with </s>
|
funcom_train/2032895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assignRoleToUser(Object tokenId, Object roleId) {
List result = (List) roleIdsById.get(tokenId);
if (result == null) {
result = new ArrayList();
roleIdsById.put(tokenId, result);
}
result.add(roleId);
}
COM: <s> assigns role to user </s>
|
funcom_train/42777399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visitAllFiles(File dir) {
if (dir.isDirectory()) {
String[] children = dir.list();
for (int i=0; i<children.length; i++) {
visitAllFiles(new File(dir, children[i]));
}
} else {
process(dir);
}
}
COM: <s> process only files under directory </s>
|
funcom_train/42363292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenu getFileMenu() {
if (FileMenu == null) {
FileMenu = new JMenu();
FileMenu.setText("File");
//menu items
FileMenu.add(getOpenMenuItem()); // Opens the Map Files (txt)
FileMenu.add(getResetPointsMenuItem());
FileMenu.add(getExitMenuItem()); // Exit button
}
return FileMenu;
}
COM: <s> retuns file menu </s>
|
funcom_train/42982091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Statement getStatement() {
checkConnection();
try {
return con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
} catch (SQLException ex) {
Logger.getLogger(DaoMsSql.class.getName()).log(Level.SEVERE, null, ex);
return null;
}
}
COM: <s> gets a statement of the active connection </s>
|
funcom_train/10979617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean execute(ActionContext context) throws Exception {
ServletActionContext saContext = (ServletActionContext) context;
HttpServletRequest request = saContext.getRequest();
// Set flag in request object, notifying chained actions that
// this request was already processed.
request.setAttribute(Globals.CHAIN_KEY, Boolean.TRUE);
// Continue chain processing
return CONTINUE_PROCESSING;
}
COM: <s> p performs additional functions after an action or command </s>
|
funcom_train/44212236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void inputAssignedUser(Todo todo, String assignedUserLogin) {
if (assignedUserLogin != null && !assignedUserLogin.equals("")) {
try {
User assignedUser = userManager.findUser(assignedUserLogin);
todo.setAssignedUser(assignedUser);
} catch (ObjectRetrievalFailureException orfe) {
todo.setAssignedUser(null);
}
} else {
todo.setAssignedUser(null);
}
}
COM: <s> insert the assigned user into the todo </s>
|
funcom_train/37646578 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean add(Endpoint e, boolean forceHighPriority) {
ExtendedEndpoint ee=new ExtendedEndpoint(e.getHostname(), e.getPort());
//See preamble for a discussion of priorities
if (forceHighPriority)
return add(ee, GOOD_PRIORITY);
else
return add(ee, priority(ee));
}
COM: <s> adds an address to this possibly ejecting other elements from the cache </s>
|
funcom_train/3380014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean useAddresses() {
boolean useAddr = false;
// use addresses if "no_addresses" is set to false
String value = getDefault("no_addresses", "libdefaults");
useAddr = (value != null && value.equalsIgnoreCase("false"));
if (useAddr == false) {
// use addresses if "noaddresses" is set to false
value = getDefault("noaddresses", "libdefaults");
useAddr = (value != null && value.equalsIgnoreCase("false"));
}
return useAddr;
}
COM: <s> check to use addresses in tickets </s>
|
funcom_train/39534168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Color pickColor(Point point){
Color color=new Color(255, 255, 255);
if(point!=null){
try{
//getting the color at this point
Robot robot=new Robot();
color=robot.getPixelColor(point.x, point.y);
}catch (Exception ex){}
}
return color;
}
COM: <s> picks the color at the given point on the screen </s>
|
funcom_train/39315657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDot2ActionPerformed() {
System.out.println("testDot2ActionPerformed");
f.dot2ActionPerformed(actionEvent);
assertEquals(f.curBrush,f.dot2);
assertEquals(f.toolBrush.getBrushType(), f.toolBrush.DOT2);
//t.dot2ActionPerformed(actionEvent);
//assertEquals(t.curBrush,t.dot2);
}
COM: <s> test of dot2 action performed method of class terp paint </s>
|
funcom_train/3122474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDefaultPropertyType(int type) {
switch (type) {
case PROPERTY_SIMPLE:
case PROPERTY_BOUND:
case PROPERTY_CONSTRAINED:
defaultPropertyType = type;
break;
case PROPERTY_INDEXED:
throw new RuntimeException(
"Don't use PROPERTY_INDEXED in this case - see javadoc documentation");
default:
throw new RuntimeException("Invalid property type value");
}
} // of method
COM: <s> sets the default schema type of all properties created in this instance </s>
|
funcom_train/51103369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getDbEntities() {
CompositeCollection c = new CompositeCollection();
Iterator it = getDataMaps().iterator();
while (it.hasNext()) {
DataMap map = (DataMap) it.next();
c.addComposited(map.getDbEntities());
}
return c;
}
COM: <s> returns all db entities </s>
|
funcom_train/39483588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testToString () {
ReentrantLock lock = new ReentrantLock(fairness);
String us = lock.toString();
assertTrue(us.indexOf("Unlocked") >= 0);
lock.lock();
String ls = lock.toString();
assertTrue(ls.indexOf("Locked") >= 0);
}
COM: <s> to string indicates current lock state </s>
|
funcom_train/3092464 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
while( !schedule.isEmpty() ) {
Algorithm algorithm = ((Algorithm) schedule.remove( 0 ));
try {
algorithm.execute();
} catch (Exception e) {
System.err.println("Algorithm: " + algorithm.getClass().getName() + " had an error:");
e.printStackTrace();
}
}
// threads can't be restarted once they die, so we need
// a new instance in the enclosing class
schedulerThread = new SchedulerThread();
}
COM: <s> executes each algorithm in the queue in order then dies </s>
|
funcom_train/266228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clearDive() {
textArea.setLineWrap(false);
textArea.setText("");
currentProfile = null;
currentModel = null;
currentTable = null;
printButton.setEnabled(false);
clearButton.setEnabled(false);
saveButton.setEnabled(false);
setTissueIcon();
}
COM: <s> clear dive model and display </s>
|
funcom_train/15601396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setData(String data) {
if (data.equalsIgnoreCase("FGNetGUI")) {
this.data = FGData.FGNetGUI;
} else if (data.equalsIgnoreCase("FGNetMiniFDM")) {
this.data = FGData.FGNetMiniFDM;
} else {
this.data = FGData.FGNetFDM;
}
}
COM: <s> matches the string data with a fgdata struct and consequently </s>
|
funcom_train/1038924 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAll(String password){
if(password != "donotusethis"){
return;
}
Statement statement = null;
try {
statement = db.getStatement();
statement.executeUpdate("DELETE FROM user_openids;");
statement.executeUpdate("DELETE FROM social;");
statement.executeUpdate("DELETE FROM Matches;");
statement.executeUpdate("DELETE FROM Ride;");
statement.executeUpdate("DELETE FROM RideComment;");
statement.executeUpdate("DELETE FROM Comments;");
statement.executeUpdate("DELETE FROM User;");
statement.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
COM: <s> this deletes all database contents </s>
|
funcom_train/22948953 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getAsString(double value, int digits, boolean quoteNominal) {
// This option is for UNLIMITED_NUMBER_OF_DIGITS and DEFAULT_NUMBER_OF_DIGITS.
if (digits < 0) {
return ((Double)value).toString();
} else {
return String.format("%."+digits+"f", value);
}
}
COM: <s> returns a formatted string of the given value according to the attribute type </s>
|
funcom_train/25494230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int resolveControlPoint(Point sceneLocation) {
for (int i = 0; i < controlPoints.size(); i++) {
Point controlPoint = controlPoints.get(i);
if (Math.abs(controlPoint.x - sceneLocation.x) <= CONTROL_POINT_SIZE / 2 && Math.abs(controlPoint.y - sceneLocation.y) <= CONTROL_POINT_SIZE / 2) {
return i;
}
}
return -1;
}
COM: <s> function resolves control point index finds control point at scene location </s>
|
funcom_train/31399588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed( ActionEvent e) {
if (DEBUG) System.out.println( "RenameCategoryAction.actionPerformed( "+e+")");
XElement category = tree.getSelectedElement();
if ( category != null) {
editor.setLocationRelativeTo( frame);
editor.setName( category.getElement( "name").getValue());
editor.setVisible( true);
if ( !editor.isCancelled()) {
category.getElement( "name").setValue( editor.getName());
}
}
}
COM: <s> the implementation of the rename category action called </s>
|
funcom_train/17394776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Choice createFontChoice() {
ActionChoice choice = new ActionChoice();
String[] fonts = Toolkit.getDefaultToolkit().getFontList();
for (String font : fonts) {
choice.addItem(font, new ChangeAttributeAction(font, "FontName", font, view));
}
return choice;
}
COM: <s> creates the font choice </s>
|
funcom_train/13994829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DialogPart next() {
if (currentPart instanceof DialogPage) {
previousPages.push(currentPart);
}
DialogPart nextPart;
do {
nextPart = dialog.getPart(next);
setNext(nextPart.getNext());
} while (finishMode && !isFinished()
&& (nextPart instanceof DialogPage));
this.currentPart = nextPart;
return currentPart;
}
COM: <s> moves to the next dialog part and returns it </s>
|
funcom_train/46787061 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCommunicationPropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_Message_communication_feature"),
getString("_UI_PropertyDescriptor_description",
"_UI_Message_communication_feature",
"_UI_Message_type"),
EZRealtimePackage.Literals.MESSAGE__COMMUNICATION,
true, false, false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null));
}
COM: <s> this adds a property descriptor for the communication feature </s>
|
funcom_train/42223787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
ServerSocket serverSocket = null;
try {
serverSocket = new ServerSocket(PORT_NUMBER);
} catch (IOException e) {
System.err.println("Could not listen on port: " + PORT_NUMBER);
System.exit(-1);
}
System.out.println("Server ready for clients to communicate.");
while (true) {
try {
new GatewayServerThread(serverSocket.accept()).start();
} catch (IOException e) {
e.printStackTrace();
}
}
}
COM: <s> this procedure should open a socket and start listening on it </s>
|
funcom_train/46759602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Long store(final MedModel med, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
IChainStore chain = new ChainStore();
try {
Long medId = store(med, chain, call);
chain.execute();
// return primary key
return medId;
} catch (Exception ex) {
Log.exception(ex);
Log.error(med);
chain.rollback();
throw ex;
}
}}; return (Long) call(method, call);
}
COM: <s> save the med model model creating a new med or updating existing rows </s>
|
funcom_train/13500385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean descriptionMatches(String desc) {
if ((description != null) && description.equals(desc)) {
return true;
}
Collection submatches = getSubMatches();
Iterator i = submatches.iterator();
MagicMatch m = null;
while (i.hasNext()) {
m = (MagicMatch) i.next();
if (m.descriptionMatches(desc)) {
return true;
}
}
return false;
}
COM: <s> determine if this match or any submatches has the description </s>
|
funcom_train/32364093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public User findUser() {
User result = null;
if (this.userName != null && this.userName.equals(this.login)) {
try {
result = findUserById(this.userName);
} catch (EntryNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
return result;
}
COM: <s> finds the associated user </s>
|
funcom_train/3730714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireStartTestSuite() {
for (int i = 0; i < formatters.size(); i++) {
((Formatter) formatters.elementAt(i))
.startTestSuite(jxt);
// actually has nothing to do with fireStart but it's
// convenient to drop it in here
((Formatter) formatters.elementAt(i))
.setFiltertrace(jxt.getFiltertrace());
}
}
COM: <s> notifies each formatter at start of processing test suite </s>
|
funcom_train/41381759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean visit(LPCompilationUnit cu) {
ILPASTNode node = cu.getASTNode();
LPIndexerDomVisitor visitor = new LPIndexerDomVisitor(importIndex,
exportIndex, typeIndex, declIndex, useIndex, cu);
//in case of problem during the AST generation
if(node != null)node.accept(visitor);
// do not visit the childs
return false;
}
COM: <s> method visit see visitor pattern </s>
|
funcom_train/3393037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void emit4(int od) {
if (!alive) return;
if (cp + 4 > code.length) {
emit1(od >> 24);
emit1(od >> 16);
emit1(od >> 8);
emit1(od);
} else {
code[cp++] = (byte)(od >> 24);
code[cp++] = (byte)(od >> 16);
code[cp++] = (byte)(od >> 8);
code[cp++] = (byte)od;
}
}
COM: <s> emit four bytes of code </s>
|
funcom_train/4149091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isIndexed(String expression) {
if (expression == null || expression.length() == 0) {
return false;
}
for (int i = 0; i < expression.length(); i++) {
char c = expression.charAt(i);
if (c == NESTED || c == MAPPED_START) {
return false;
} else if (c == INDEXED_START) {
return true;
}
}
return false;
}
COM: <s> indicate whether the expression is for an indexed property or not </s>
|
funcom_train/43827765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addToolPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ToolInfo_tool_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ToolInfo_tool_feature", "_UI_ToolInfo_type"),
ModelPackage.Literals.TOOL_INFO__TOOL,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the tool feature </s>
|
funcom_train/39169584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean remove(String s) {
String s1 = a(s);
int i = s1.length();
if(i > mapsList.length) return false;
Map<String, List<Lookup>> hashmap = mapsList[i];
if(hashmap == null) return false;
if(hashmap.containsKey(s1)) {
hashmap.remove(s1);
return true;
}
return false;
}
COM: <s> removes a string from the gazetteer </s>
|
funcom_train/44704291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FND_Datagram getRSPDatagram(FND_Datagram dgram) {
logger.debug("getRSPDatagram()");
FND_Datagram result = dgram;
byte[] tc = result.getTransportControl();
result.setTransportControl(FND_Datagram.D_R_RSP, tc[1], tc[2], tc[3]);
setDateTime(result);
result.setInfoCode((byte) 0x00, (byte) 0x00);
return result;
}
COM: <s> turns a given datagram into a response datagram </s>
|
funcom_train/8022154 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetCategoriesToDownload() {
System.out.println("getCategoriesToDownload");
ArrayList<Category> expResult = null;
ArrayList<Category> result = CategoryManager.getCategoriesToDownload();
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 get categories to download method of class vgrabber </s>
|
funcom_train/42388828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean atMenu(final String optionContains) {
final int idx = getMenuIndex(optionContains);
if (!isMenuOpen()) {
if (idx == -1) {
return false;
}
if (idx == 0) {
clickMouse(true);
} else {
clickMouse(false);
atMenuItem(idx);
}
return true;
} else {
if (idx == -1) {
while (isMenuOpen()) {
moveMouseRandomly(750);
wait(random(100, 500));
}
return false;
} else {
atMenuItem(idx);
return true;
}
}
}
COM: <s> clicks the menu option </s>
|
funcom_train/5855836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillInStackTrace(Frame frame) {
int length = frame.getStackSize();
StackTraceElement[] ste = new StackTraceElement[length];
for (int i = 0; i < length; i++) {
ste[i] = new StackTraceElement(frame);
frame = frame.getReturnFrame();
}
stackTrace = ste;
}
COM: <s> fill in the execution stack trace from the given frame </s>
|
funcom_train/3086419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private StyleAttrDescriptor _magicStyleFindDescriptor(StyleInfo styleInfo, String attrName) {
if (styleInfo == null)
return null;
StyleAttrDescriptor[] descriptors = styleInfo.getStyleDescriptors();
for (int i = 0; i < descriptors.length; i++) {
StyleAttrDescriptor descriptor = descriptors[i];
if (descriptor.getName().equalsIgnoreCase(attrName)) {
return descriptor;
}
}
return null;
}
COM: <s> checks that the style info knows about the attr name </s>
|
funcom_train/28473545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getMafWeightPanel() {
if (mafWeightPanel == null) {
mafWeightLabel = new JLabel();
mafWeightLabel.setText("Weight:");
mafWeightLabel.setPreferredSize(new Dimension(180, 16));
mafWeightPanel = new JPanel();
mafWeightPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
mafWeightPanel.add(mafWeightLabel, null);
mafWeightPanel.add(getMafWeightTextField(), null);
}
return mafWeightPanel;
}
COM: <s> this method initializes maf weight panel </s>
|
funcom_train/12782919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInit5() throws Exception {
ClassLoader parent = getClass().getClassLoader();
IRunConfigData config = new RunConfigData();
config.setTargetClasspath(null);
testObj = new InstrumentingClassLoader(parent, config);
assertEquals(createURLs(IRunConfigData.DEFAULT_CLASSPATH), testObj.getClasspath().getClasspath());
assertEquals(createURLs(System.getProperty("java.class.path")), testObj.getTargetClasspath());
}
COM: <s> classpath not set target classpath set to illegal value </s>
|
funcom_train/43343335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean validateClient(IoBuffer input) {
byte[] pBuffer = new byte[input.remaining()];
//put all the input bytes into our buffer
input.get(pBuffer, 0, input.remaining());
if (validateClientScheme(pBuffer, 0)) {
validationScheme = 0;
log.debug("Selected scheme: 0");
return true;
}
if (validateClientScheme(pBuffer, 1)) {
validationScheme = 1;
log.debug("Selected scheme: 1");
return true;
}
log.error("Unable to validate client");
return false;
}
COM: <s> determines the validation scheme for given input </s>
|
funcom_train/40772382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MudObject removeMudObject(String objectName, int index) {
Set<MudObject> mudObjectHashSet = getMudObjectHashSets().get(objectName);
Object obj = null;
if (mudObjectHashSet != null) {
ArrayList<MudObject> list = new ArrayList<MudObject>();
list.addAll(mudObjectHashSet);
obj = list.get(index);
synchronized (mudObjectHashSet) {
mudObjectHashSet.remove(obj);
}
}
return (MudObject) obj;
}
COM: <s> removes an object from the inventory at a given index </s>
|
funcom_train/9977727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testOctalToInt() {
System.out.println("octalToInt");
String value = "275";
Integer expResult = 189;
Integer result = 0;
try {
result = NumeralSystem.octalToInt(value);
}
catch(Exception ex) {
System.out.println("Exception");
assertEquals(true, false);
}
assertEquals(expResult, result);
}
COM: <s> test of octal to int method of class numeral system </s>
|
funcom_train/26416216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetPackageName() throws Throwable {
NarcGenerator gen = new NarcGenerator(com.atomicobject.haste.util.narcgen.AnotherNarcTarget.class);
assertEquals("wrong package 1",
"com.atomicobject.haste.util", gen.getPackageName(TestNarcGenerator.class));
assertEquals("wrong package 2", "java.util", gen.getPackageName(java.util.Vector.class));
}
COM: <s> see that get package name finds the package of something with a package </s>
|
funcom_train/1627060 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean matchWord() {
IDocument doc= fText.getDocument();
try {
int pos= fPos;
char c;
while (pos >= 0) {
c= doc.getChar(pos);
if (!Character.isJavaIdentifierPart(c))
break;
--pos;
}
fStartPos= pos;
pos= fPos;
int length= doc.getLength();
while (pos < length) {
c= doc.getChar(pos);
if (!Character.isJavaIdentifierPart(c))
break;
++pos;
}
fEndPos= pos;
return true;
} catch (BadLocationException x) {
}
return false;
}
COM: <s> select the word at the current selection location </s>
|
funcom_train/20882782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Item appendItem(Item originalItem) {
ItemContents contents;
Item newItem;
if (originalItem == null) {
contents = null;
} else {
contents = originalItem.getSharedContents();
}
newItem = new Item(getOwnerRelation(), contents);
newItem.next = this.next;
if (this.next != null) {
this.next.prev = newItem;
}
attach(newItem);
if (this.ownerRelation.getTail() == this) {
this.ownerRelation.setTail(newItem);
}
return newItem;
}
COM: <s> appends an item in this list after this item </s>
|
funcom_train/32138189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectionChanged(IAction action, ISelection selection) {
if(selection instanceof IStructuredSelection) {
LogManager.logDebug("this.selection changed: oldValue: "+ this.selection + " newValue: " + selection, this);
this.selection = (IStructuredSelection)selection;
Object o = this.selection.getFirstElement();
if(o instanceof TreeDefinitionNode)
{
TreeDefinitionNode t = (TreeDefinitionNode)o;
String s = t.getDefinition();
if(s != null)
setEnabled(true);
else
setEnabled(false);
}
else
setEnabled(false);
} else {
this.setEnabled(false);
}
}
COM: <s> updates code selection code with the current selection whenever the user changes </s>
|
funcom_train/13850632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkForKnownHost(final URL url, String source) {
try {
InetAddress.getByName(url.getHost()).getCanonicalHostName();
} catch (UnknownHostException e) {
Message message = new Message(Reporter.ERROR,
getString("noHost",
url.getHost(),
url),
null);
Reporter.print(message, source);
}
}
COM: <s> check the ability to resolve the host component of code url code </s>
|
funcom_train/2712114 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream getExternalConfigFileInputStream(String fileName) {
FileInputStream stream = null;
try {
File file = getExternalConfigFile(fileName);
stream = file == null
? null
: new FileInputStream(file);
return stream;
} catch (FileNotFoundException ex) {
Logger.logError(
"Could not build external configuration file input stream: " +
fileName, ex);
return null;
}
}
COM: <s> creates and retrurns an </s>
|
funcom_train/51538962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVerticalScroll(int scrollPosition, int scrollProportion) {
// IMPL NOTE: add btnLayer.sysMenuUp()
if (alertLayer != null) {
scrollLayer.setVerticalScroll(alertLayer.visible, scrollPosition,
scrollProportion);
} else {
scrollLayer.setVerticalScroll(false, scrollPosition,
scrollProportion);
}
}
COM: <s> set the current vertical scroll position and proportion </s>
|
funcom_train/16613316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Sequence subSequence(int relativeStart, int relativeEnd) {
Sequence seq = new SequenceImpl( this.getString().substring( relativeStart-1, relativeEnd));
final int start = relativeStart-1;
final int len = relativeEnd-start;
seq.setLocation(location.relative(start, len));
return seq;
}
COM: <s> the offsets are relative to the first base in the sequence which is </s>
|
funcom_train/14034310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parseResultSet(ResultSet rs) throws SQLException {
resultCount = 0;
if ((elements == null) || (elements.size() == 0)) {
try {
createElementsFromMetadata(rs);
} catch (UnmatchedSQLType e) {
Logger.error("Couldn't create elements from metadata", e);
}
}
while (rs.next()) {
resultCount++;
for (QueryParserElement element : elements) {
element.parseResultSetEntry(rs);
}
}
}
COM: <s> parse a code result set code matching results with the existing </s>
|
funcom_train/18644047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Identity initializeChannelIdentity(Element messageElement) {
Identity ret=null;
if (messageElement != null) {
org.w3c.dom.Node sessionIdentity=
XMLUtils.getChild(messageElement, null,
AbstractServiceTracker.SESSION_IDENTITY_NODE);
if (sessionIdentity != null) {
java.util.List<Identity> ids=TrackerInformationUtil.getIdentities(sessionIdentity);
if (ids != null && ids.size() == 1) {
ret = ids.get(0);
}
}
}
return(ret);
}
COM: <s> this method initializes the channel identity </s>
|
funcom_train/2898428 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setClassName(IJavaElement elem){
int type = elem.getElementType();
boolean isJavadocable = (type==IJavaElement.CLASS_FILE || type==IJavaElement.COMPILATION_UNIT || type==IJavaElement.TYPE );
if ( isJavadocable ) {
String name = elem.getElementName();
int index = name.lastIndexOf(".");
if (index>0) {
className = name.substring(0,index);
}
} else {
Object parent = elem.getParent();
if (parent!=null)
setClassName(parent);
}
}
COM: <s> setter for class name with ijava element type </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.