__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/27761620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setLog() {
if (Debug.getDebug().getLog() == null) {
SimpleLog log = new SimpleLog(getClass().getName());
log.setLevel(SimpleLog.LOG_LEVEL_DEBUG);
Debug.getDebug().setLog(log);
}
}
COM: <s> sets the log attribute of the base test case object </s>
|
funcom_train/5343386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addTracker(URL url) {
// list of trackers should not contain duplicates
for (int i = 0; i < _trackers.length; i++) {
if (_trackers[i].equals(url))
return false;
}
URL[] newTrackers = new URL[_trackers.length + 1];
System.arraycopy(_trackers, 0, newTrackers, 0, _trackers.length);
newTrackers[_trackers.length] = url;
_trackers = newTrackers;
return true;
}
COM: <s> accessor for the array of url representing the trackers adds one url to </s>
|
funcom_train/16497764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clickBookmark(ActionEvent action) {
// get the url the user clicked on
String url = Util.getParam("url");
// execute a command to open the bookmark in a new browser
Runtime runtime = Runtime.getRuntime();
try {
runtime.exec("cmd /c start " + url);
} catch (IOException e) {
log.error("Unable to open bookmark" + url);
}
}
COM: <s> fired when a user clicks on a bookmark on the page </s>
|
funcom_train/1559994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void installDefaults() {
super.installDefaults();
tabAreaInsets = new Insets(0, 15, 0, 15);
contentBorderInsets = new Insets(3, 3, 3, 3);
tabInsets = new Insets(10, 10, 10, 10);
selectedTabPadInsets = new Insets(0, 0, 0, 0);
bgColor = Color.white;
bgActiveColor = new Color(193, 210, 238);
bgHoverColor = new Color(224, 232, 246);
}
COM: <s> initialization of default values </s>
|
funcom_train/22579064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selAllAttributes() throws Exception {
Vector tmpAttribs = DbAttribute.dbGetAllAttributes(dbConn, cDevice.getDeviceID(), cInterface.getIfIndex());
cAttributes.clear();
if (tmpAttribs != null)
for (int i=0; i<tmpAttribs.size(); i++)
cAttributes.add(tmpAttribs.elementAt(i));
}
COM: <s> select all attributes for a device interface </s>
|
funcom_train/19256035 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void toggleWindowState() {
SwingUtilities.invokeSync(new Runnable() {
public void run() {
Shell shell = (Shell) peer;
if (isMax) {
shell.setMaximized(false);
shell.setMaximized(true);
}
else
{
shell.setMaximized(true);
shell.setMaximized(false);
}
}
});
}
COM: <s> handy for layout problems </s>
|
funcom_train/3330958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean add(XMLFieldDescriptor descriptor) {
for (int i = 0; i < elementCount; i++) {
if (elements[i] == descriptor) return false;
}
if (elementCount == elements.length) increaseSize();
elements[elementCount++] = descriptor;
return true;
} //-- add
COM: <s> adds the specified xmlfield descriptor to the collection </s>
|
funcom_train/36416283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void openWithDefaultKeys() throws CardException {
open();
int keySet = 0;
setKeys(keySet, defaultEncKey, defaultMacKey, defaultKekKey);
openSecureChannel(keySet, 0, SCP_ANY, APDU_MAC, false);
}
COM: <s> convenience method combining </s>
|
funcom_train/5019976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void advance() {
try {
String user = getVisitState().getPerson().getStringProperty(Person.ACCOUNT_NAME);
logger.warning("Server day advanced to " + new Day() + " by user: " + user);
DayOffset.getInstance().advance();
} catch (Exception e) {
logger.log(Level.WARNING, "Problem advancing server day.", e);
}
}
COM: <s> advance the date by one day </s>
|
funcom_train/42180645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateTreeSelectedFurniture(FurnitureCatalog catalog) {
clearSelection();
for (CatalogPieceOfFurniture piece : catalog.getSelectedFurniture()) {
TreePath path = new TreePath(new Object [] {catalog, piece.getCategory(), piece});
addSelectionPath(path);
scrollRowToVisible(getRowForPath(path));
}
}
COM: <s> updates selected nodes in tree from code catalog code selected furniture </s>
|
funcom_train/37565677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rename(String srcf, String dstf) throws IOException {
if (nfs.rename(new File(srcf), new File(dstf))) {
System.out.println("Renamed " + srcf + " to " + dstf);
} else {
System.out.println("Rename failed");
}
}
COM: <s> rename an ndfs file </s>
|
funcom_train/44778928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getName() {
StringBuffer buffer = new StringBuffer();
buffer.append(getDataSource());
buffer.append(":");
buffer.append(getTaxon().getID().asString());
buffer.append(":");
buffer.append(getGenotypeExperiment().getID().asString());
return buffer.toString();
}
COM: <s> returns the name of this genotype </s>
|
funcom_train/44010012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int handleRead(int fileId, int bufAdd, int count) {
OpenFile file = (OpenFile) openFiles.get(fileId);
if (file == null)
return -1;
byte[] buffer = new byte[count];
int num = file.read(buffer, 0, count);
// System.out.println(buffer[0]);
return writeVirtualMemory(bufAdd, buffer, 0, num);
}
COM: <s> handle read system call </s>
|
funcom_train/39004576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validate() {
String message = null;
if (fault_mode)
message = (message == null ? "" : message) + "Invalid element! Cannot create or modify this resource. ";
if (txt_content.getText().length() <= 0)
message = (message == null ? "" : message) + "Please provide a textual description for this element";
return ((ERROR_MESSAGE = message) == null);
}
COM: <s> todo make this an abstract method </s>
|
funcom_train/7909115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PicFSDirectory getParentDirectory(String path){
String parentPath = path.substring(0, path.lastIndexOf("/"));
PicFSDirectory parentDirectory = null;
if(parentPath != null){
//Just in case it's in the root directory
if(parentPath.length() == 0){
parentPath = "/";
}
try{
parentDirectory = new PicFSDirectory(parentPath);
}catch(Exception e){
myLog.info("Parent Directory not found for " + path);
e.printStackTrace();
parentDirectory = null;
}
}
return parentDirectory;
}
COM: <s> returns the parent directory of the path </s>
|
funcom_train/18786867 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addProperty(Object bean, Object value) {
assert ((bean != null) && isMultiple && (value != null));
Class[] types = { value.getClass() };
Object[] params = { value };
ReflectUtilities.execute(bean, addMethodName, types, params);
}
COM: <s> adds the item to the indexed property </s>
|
funcom_train/17755690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(IAction action) {
try {
ScopedPreferenceStore store = new ScopedPreferenceStore(new InstanceScope(), "org.eclipse.ui.workbench");
String value = store.getString("org.eclipse.jface.textfont");
if (PRESENTATION.equals(value))
value = PROGRAMMING;
else
value = PRESENTATION;
store.setValue("org.eclipse.jface.textfont", value);
store.save();
} catch (Exception e) {
Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Error switching font", e));
}
}
COM: <s> the action has been activated </s>
|
funcom_train/31084547 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void draw (Graphics graphics, int offsetX, int offsetY) {
if (_xPoints == null || _yPoints == null)
// Nothing to draw
return;
graphics.translate (offsetX, offsetY);
graphics.drawPolyline (_xPoints, _yPoints, _xPoints.length);
graphics.translate (-offsetX, -offsetY);
}
COM: <s> draw the shape with the given offset using graphics draw poly line </s>
|
funcom_train/46622203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected File getOutput(FormatterElement fe, JUnitTest test) {
if (fe.getUseFile()) {
String filename = test.getOutfile() + fe.getExtension();
File destFile = new File(test.getTodir(), filename);
String absFilename = destFile.getAbsolutePath();
return getProject().resolveFile(absFilename);
}
return null;
}
COM: <s> if the formatter sends output to a file return that file </s>
|
funcom_train/13993055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isAuthorized(RequestObject request) {
if (!securityChecker.hasPrivilege(request.getUser(), request
.getPassword(), SecurityChecker.ADMINISTRATOR_PRIVILEDGE)) {
// TODO reactivate
// Log.error("failed to authorize " + request.user
// + " with password " + request.password);
return false;
}
return true;
}
COM: <s> checks if the request is authorized to perform this code command code </s>
|
funcom_train/1941813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getPluginIDByName(String name) throws SQLException {
long ret = -1;
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT plugin_id FROM Plugin WHERE plugin_name='" + name +"'");
if (rs.next()) ret = rs.getLong("plugin_id");
stmt.close();
return ret;
}
COM: <s> queries database for a plugin id by plugin name </s>
|
funcom_train/35846394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void selectVisible(Object target) {
for (int j = 0; j < getRowCount(); j++) {
Object rowItem =
((DefaultMutableTreeNode) getPathForRow(j)
.getLastPathComponent()).getUserObject();
if (rowItem == target) {
addSelectionRow(j);
}
}
}
COM: <s> select any targets which are visible in the explorer pane </s>
|
funcom_train/12300923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMinRawPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PortScalingType_minRaw_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PortScalingType_minRaw_feature", "_UI_PortScalingType_type"),
SchemaPackage.Literals.PORT_SCALING_TYPE__MIN_RAW,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the min raw feature </s>
|
funcom_train/3594911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void keyPressed(KeyEvent e) {
if (replay && (e.getModifiers()&InputEvent.CTRL_MASK) == InputEvent.CTRL_MASK){
// only note that ctrl is pressed if no other key is pressed
// jonathan 14.12.04
if (e.getKeyCode()==KeyEvent.VK_CONTROL) {
pressed = true;
} else {
pressed = false;
}
}
}
COM: <s> handle the key pressed event from the text field </s>
|
funcom_train/37034228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Digester createStopDigester() {
// Initialize the digester
Digester digester = new Digester();
if (debug)
digester.setDebug(999);
// Configure the rules we need for shutting down
digester.addObjectCreate("Server",
"org.apache.catalina.core.StandardServer",
"className");
digester.addSetProperties("Server");
digester.addSetNext("Server",
"setServer",
"org.apache.catalina.Server");
return (digester);
}
COM: <s> create and configure the digester we will be using for shutdown </s>
|
funcom_train/5420571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object populate(Object obj) throws Exception {
// loop through all the beans methods and set its properties from
// its .properties file
Map map = new HashMap();
for (Enumeration keys = rb.getKeys(); keys.hasMoreElements();) {
String key = (String) keys.nextElement();
map.put(key, rb.getString(key));
}
BeanUtils.copyProperties(obj, map);
return obj;
}
COM: <s> utility method to populate a javabean style object with values </s>
|
funcom_train/28748268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeInvalidWfds(Collection wfds) {
Iterator iter = wfds.iterator();
WorkflowDetail wfd;
WorkflowDetailInfo wfdInfo;
while (iter.hasNext()) {
wfd = (WorkflowDetail) iter.next();
wfdInfo = wfd.getWorkflowDetailInfo();
//Remove deleted wfds.
if (wfdInfo.isDeleted()) {
iter.remove();
}
}
}
COM: <s> remove invalid wfd from workflow like deleted ones </s>
|
funcom_train/44167729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WorkLocation getWorkLocationFor(Unit unit) {
Occupation occupation = getOccupationFor(unit);
if (occupation == null) {
logger.warning("Could not find a WorkLocation for: "
+ unit.toString() + " in: " + getName());
return null;
}
if (occupation.workType != null) {
unit.setWorkType(occupation.workType);
}
return occupation.workLocation;
}
COM: <s> gets a work location within this colony to put a unit in </s>
|
funcom_train/18896866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ObjectNode getNextObject() throws JRDFClientException {
try {
return (ObjectNode) this.answer.getObject(OBJECT_COLUMN);
}
catch (TuplesException tuplesException) {
throw new JRDFClientException("Could not get next Object.",
tuplesException);
}
catch (ClassCastException classException) {
throw new JRDFClientException("Object column contains invalid object. " +
"Answer is invalid.", classException);
}
}
COM: <s> evaluates and returns a object node representing the object in object column </s>
|
funcom_train/30075766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ModelAndView architecturesHandler(HttpServletRequest request, HttpServletResponse response) throws ServletException {
Map model = new HashMap();
model.put("architectures", gpir.getArchitectures());
return new ModelAndView("architecturesView", "model", model);
}
COM: <s> custom handler for architectures display </s>
|
funcom_train/20889173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isDuplicate(UniqueId id) {
if (id.asInt() > maxSeenId) {
maxSeenId = id.asInt();
packets[nextPosition] = id;
increaseNextPosition();
return false;
} else {
//need to check complete window
for (int i = 0; i < windowSize; i++) {
if (id.equals(packets[i])) {
return true;
}
}
packets[nextPosition] = id;
increaseNextPosition();
return false;
}
}
COM: <s> method to check whether a received packet is a duplicate </s>
|
funcom_train/9351994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAxisXBottom(final AAxis axisX) {
this.ensureUniqueAxis(axisX);
this.m_axesXBottom.add(axisX);
axisX.setChart(this, Chart2D.X, Chart2D.CHART_POSITION_BOTTOM);
this.listenToAxis(axisX);
this.firePropertyChange(Chart2D.PROPERTY_AXIS_X, null, axisX);
this.setRequestedRepaint(true);
}
COM: <s> adds the given x axis to the list of internal bottom x axes </s>
|
funcom_train/41021317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void publishMessageWith2Params(MWMessage.MessageID msgID, Serializable param1, Serializable param2) {
MWMessage msg = new MWMessage(msgID);
// broadcast message
msg.setReceiverID(0);
// parameters
msg.setParam(param1);
msg.setParam2(param2);
for (Integer id : listeners.keySet()) {
listeners.get(id).sendMessage(msg);
}
}
COM: <s> sends broadcast message with one parameter </s>
|
funcom_train/22598609 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getLabelPanel() {
if (labelPanel == null) {
labelPanel = new JPanel();
labelPanel.setLayout(new GridBagLayout());
labelPanel.setBackground(Color.gray);
labelPanel.add(jLabel, new GridBagConstraints());
labelPanel.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
setActivated(!widget.isActive());
}
});
}
return labelPanel;
}
COM: <s> this method initializes label panel </s>
|
funcom_train/3729163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void repaintPlayerPos(int player) {
Point playerPos = getPlayerPos(player);
if (player != -1 && playerPos != null) {
int width = flagImage[player].getWidth();
int height = flagImage[player].getHeight();
this.repaint(playerPos.x, playerPos.y - height, width, height);
}
}
COM: <s> repaints the area in which the position of the given player lies </s>
|
funcom_train/14228114 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drop() throws InvalidStateException, MethodNotSupportedException, PrivilegeViolationException, ResourceUnavailableException {
if (this.getState() != ACTIVE)
throw new InvalidStateException(this,
InvalidStateException.CALL_OBJECT,
this.getState(),
"Drop from non-active call");
Connection[] cons = this.getConnections();
for (int i = 0; i < cons.length; i++) {
try {
cons[i].disconnect();
} catch (InvalidStateException ise) {
// eat it -- the call is now dropped
break;
}
}
}
COM: <s> drop aa call by dropping all its connections </s>
|
funcom_train/31080688 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getLength(Value val) {
if (val.index2 != -1)
return 5; // tag + enum type + enum name
if (val.index != -1)
return 3; // tag + constant or class
return 1 + ((Annotation) val.value).getLength(); // tag + anno
}
COM: <s> return the length of the given value </s>
|
funcom_train/13815846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNoPoints() {
ColorCurve c = new ColorCurve();
for ( double d = -1.0 ; d < 2.0 ; d += 0.1 ) {
assertEquals( "Should have identity transform", d, c.getValue( d ), DELTA );
}
}
COM: <s> when there are no control points should return identity transform </s>
|
funcom_train/38865100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UrsiList getUrsiList(String station) {
UrsiList ul = new UrsiList(connection);
for (int i = 0; i < rows.size(); i++) {
IonoRow id = rows.get(i);
if (id.getStn().equals(station)) {
ul.addUrsi(id.getUrsi());
}
}
return ul;
}
COM: <s> extract an array of distinct ursi characteristic codes ursi code objects </s>
|
funcom_train/8245323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean fireEvent(final String event) {
TriggerEvent[] evts = {new TriggerEvent(event,
TriggerEvent.SIGNAL_EVENT, null)};
try {
engine.triggerEvents(evts);
} catch (ModelException me) {
logError(me);
}
return engine.getCurrentStatus().isFinal();
}
COM: <s> fire an event on the scxml engine </s>
|
funcom_train/49760318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JScrollPane getJScrollPaneEnumerators() {
if (jScrollPaneEnumerators == null) {
jScrollPaneEnumerators = new JScrollPane(jTableEnumerators);
jScrollPaneEnumerators.setBounds(new Rectangle(15, 15, 106, 138));
jScrollPaneEnumerators.setViewportView(getJTableEnumerators());
}
return jScrollPaneEnumerators;
}
COM: <s> this method initializes j scroll pane enumerators </s>
|
funcom_train/44936640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load(DataRow row, ResultSet rs) throws SQLException {
final Map<String, Object> types = row.getTypes();
if (types.size() > 0) {
for (Entry<String, Object> next : types.entrySet()) {
updateDataRow(row, rs, next.getKey(), next.getValue());
}
}
}
COM: <s> updates data row with data from result set </s>
|
funcom_train/3672334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintFrame(Graphics aG) {
Color lOldColor = aG.getColor();
aG.setColor(frameLineColor);
aG.drawRect(frameX, frameY, frameWidth, frameHeight);
aG.setColor(lOldColor);
}//paintFrame
COM: <s> draw the plot frame </s>
|
funcom_train/2759117 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void populateInvocation(Message jmsMessage) throws JMSException, IOException {
jmsMessage.setStringProperty(JmsClusterImpl.JMS_PROPERTY_METHOD_INVOCATION_CLASS, getMethod().getDeclaringClass().getName());
jmsMessage.setStringProperty(JmsClusterImpl.JMS_PROPERTY_METHOD_INVOCATION_SIGNATURE, marshalSignature(getMethod()));
jmsMessage.setStringProperty(JmsClusterImpl.JMS_PROPERTY_RPC_ID, getId());
marshalArguments(jmsMessage, _args);
}
COM: <s> helper method that populates the message </s>
|
funcom_train/44844137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drain() {
_draining = true;
if (_cleaner != null) {
_cleaner.halt();
}
synchronized (_connections) {
for (int i = _connections.size() - 1; i >= 0; i--) {
PoolConnection pc = (PoolConnection)_connections.get(i);
if (pc.inUse()) {
System.err.println("Warning: forced closing of a connection still in use.");
System.err.println("Connection was acquired in:");
pc.printStackTrace();
System.err.println();
}
_connections.remove(i);
try {
pc.expire();
}
catch (SQLException ignore) {
}
}
}
}
COM: <s> drains the pool </s>
|
funcom_train/37721745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem createAboutMenuItem() {
JMenuItem mi = new JMenuItem("About...", loadImageIcon("bulb.gif"));
mi.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
showAbout();
}
});
return mi;
}
COM: <s> create a new about menu item </s>
|
funcom_train/41523695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void alUpdatePatientSelected(ActionEvent event) {
getSession().setPatient(null);
Patient patient = (Patient) selectRowFromEvent(event, Patient.class);
if (patient != null) {
Command cmd = getCommand(LoadPatient.class);
((LoadPatient) cmd).setPatientId(patient.getCode());
cmd = runCommand(cmd);
getSession().setPatient(((LoadPatient) cmd).getResult());
}
}
COM: <s> it retrieve patient from action event and update selected patient into </s>
|
funcom_train/33385608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // private Drawable getDrawableImage(String url) {
// try {
// InputStream is = (InputStream) this.fetch(url);
// Drawable d = Drawable.createFromStream(is, "src");
// return d;
// } catch (MalformedURLException e) {
// e.printStackTrace();
// return null;
// } catch (IOException e) {
// e.printStackTrace();
// return null;
// }
// }
COM: <s> graph image provider </s>
|
funcom_train/20804145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getField(String termInfo, int position) {
int start = getFieldStart(termInfo, position);
int end = getFieldStart(termInfo, position + 1);
if (end == -1 || end == termInfo.length()) {
end = termInfo.length();
} else {
end--;
}
return termInfo.substring(start, end);
}
COM: <s> gets a field from a csv string starting at a given position </s>
|
funcom_train/19433793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedOption( int selectedOption ) {
if ( state == MenuModel.DEFAULT_STATE ) {
super.setSelectedOption( selectedOption );
} else if ( state == ManagementMenu.CREATING_NEW_STATE
|| state == ManagementMenu.EDITING_STATE ) {
setSelectedCreateOption( selectedOption );
}
}
COM: <s> p sets the currently selected option </s>
|
funcom_train/28686909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compileIrspLrcInt(String message, boolean header) {
int sum = 0;
int startIndex = 0;
if (header) {
startIndex = 2;
}
for (int i = startIndex; i < message.length(); i++) {
sum += message.charAt(i);
}
int lrc = sum % 256;
return lrc;
}
COM: <s> compile and return the lrc as per irsp in integer format </s>
|
funcom_train/7647162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String concat(String string) {
if (string.count > 0 && count > 0) {
char[] buffer = new char[count + string.count];
System.arraycopy(value, offset, buffer, 0, count);
System.arraycopy(string.value, string.offset, buffer, count,
string.count);
return new String(0, buffer.length, buffer);
}
return count == 0 ? string : this;
}
COM: <s> concatenates this string and the specified string </s>
|
funcom_train/25033425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DicomFile add(String fileName,String sopClassUID,String sopInstanceUID,String transferSyntaxUID) {
setOfSOPClassUIDs.add(sopClassUID);
DicomFile dicomFile = new DicomFile(fileName,sopClassUID,sopInstanceUID,transferSyntaxUID);
add(dicomFile);
return dicomFile;
}
COM: <s> p add a dicom file with the specified attributes </s>
|
funcom_train/3126757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCurrentTime(int time) {
time -= timeOffset;
try {
int scale = moviePlayer.getScale();// ticks per second
moviePlayer.setTime( scale * time / 1000 ); // 600u/s * 3000ms / 1000ms/s = 1800u
} catch ( QTException qte ) {
qte.printStackTrace();
}
} // end setCurrentTime()
COM: <s> should but doesnt currently treat time as milliseconds and set the </s>
|
funcom_train/44286814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAvailable(Actor actor, Date instant) {
int i;
for (i = 0; i < project.teams.size(); i++) {
Team team = ((ProjectTeam)project.teams.get(i)).team;
for (Member member: team.members) {
if (member.actor == actor) {
return member.isAvailable(instant);
}
}
}
return false;
}
COM: <s> indicates if the actor is available at the instant </s>
|
funcom_train/31804147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void goToNextDestination(){
// chose randomly the next destination
int randomIndex = 0;
Random random = new Random();
// search for a valid destination idnex
do{
randomIndex = random.nextInt();
}while( randomIndex < 0 || randomIndex > this.destinations.size()
|| this.destinations.get(randomIndex) == null || this.getCurrentIndex() == randomIndex);
this.setCurrentIndex(randomIndex);
super.goToNextDestination();
}
COM: <s> selects the next destination and goes to it </s>
|
funcom_train/1560738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCellRange(int anchorColumn, int anchorRow, int col2, int row2) {
minColumn = Math.min(anchorColumn, col2);
maxColumn = Math.max(anchorColumn, col2);
minRow = Math.min(anchorRow, row2);
maxRow = Math.max(anchorRow, row2);
this.anchorColumn = anchorColumn;
this.anchorRow = anchorRow;
}
COM: <s> set a cell range using diagonal corner cells </s>
|
funcom_train/13211230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRepaintTimer(int milliSeconds) {
if (repaintTimer!=null) repaintTimer.stop();
if (milliSeconds>0) {
repaintTimer = new Timer(milliSeconds, new ActionListener() {
public void actionPerformed(ActionEvent ev) {
repaint();
}
});
repaintTimer.start();
}
}
COM: <s> set a timer that repaints the panel </s>
|
funcom_train/48705872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void flush() {
if (getBoolean("memoryStickMode")){
try {
exportPreferences("jabref.xml");
} catch (IOException e) {
Globals.logger("Could not save preferences for memory stick mode: " + e.getLocalizedMessage());
}
}
try {
prefs.flush();
} catch (BackingStoreException ex) {
ex.printStackTrace();
}
}
COM: <s> calling this method will write all preferences into the preference store </s>
|
funcom_train/49459265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void test02_extract() throws Exception {
String cmd = path + " -d data/ data/test.cab";
Exec pid = new Exec(cmd, null);
pid.runCmd();
// now checks contents
BufferedReader in = new BufferedReader(new FileReader("data/test.txt"));
StringBuffer sb = new StringBuffer();
String s;
while ((s = in.readLine()) != null) {
sb.append(s);
sb.append("\n");
}
in.close();
File f = new File("data/test.txt");
f.delete();
assertTrue("This is a test\n".equals(sb.toString()));
}
COM: <s> for more on cab see http support </s>
|
funcom_train/28312470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public void update() {
try {
FreerailsSerializable[] messages = connection2Server
.readFromServer();
for (int i = 0; i < messages.length; i++) {
FreerailsSerializable message = messages[i];
processMessage(message);
}
connection2Server.flush();
clientUpdates();
} catch (IOException e) {
ReportBugTextGenerator.unexpectedException(e);
}
}
COM: <s> reads and deals with all outstanding messages from the server </s>
|
funcom_train/13121731 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run_program() {
DurableSubscriber durableSubscriber =
new DurableSubscriber();
MultiplePublisher multiplePublisher =
new MultiplePublisher();
durableSubscriber.startSubscriber();
multiplePublisher.publishMessages();
durableSubscriber.closeSubscriber();
multiplePublisher.publishMessages();
durableSubscriber.startSubscriber();
durableSubscriber.closeSubscriber();
multiplePublisher.finish();
durableSubscriber.finish();
}
COM: <s> instantiates the subscriber and publisher classes </s>
|
funcom_train/8346926 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getStyleHeight() {
String h = dom.getStyle().getProperty("height");
if (h == null || h.equals("")) return 0;
if (h.matches("(auto|em|%|en|ex|pt|in|cm|mm|pc)")) {
return 0;
}
return Util.parseInt(h, 0);
}
COM: <s> returns the style width </s>
|
funcom_train/48644737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addRegisterContext() {
ArrayList<Integer> registers = new ArrayList<Integer>(NUMBER_OF_REGISTERS);
for (int i = 0; i < NUMBER_OF_REGISTERS; i++) {
registers.add(new Integer(i));
}
this.freeRegisters.add(registers);
}
COM: <s> add a new registers context </s>
|
funcom_train/13961650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isEntityReadOnly() {
boolean flag = super.isEntityReadOnly();
flag = !ERXValueUtilities.booleanValueWithDefault(d2wContext().valueForKey("isEntityEditable"), !flag);
flag = ERXValueUtilities.booleanValueWithDefault(d2wContext().valueForKey("readOnly"), flag);
return flag;
}
COM: <s> checks if the entity is read only meaning that you cant edit its </s>
|
funcom_train/9829923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(String str) {
if(!isEnabled)
return;
if (str == null) {
super.write("null");
return;
}
StringTokenizer st = new StringTokenizer(str, "\n", true);
while (st.hasMoreTokens()) {
String token = st.nextToken();
if (token.equals("\n"))
super.println();
else
super.write(token);
}
}
COM: <s> in order to make the passed text compatible with all operating systems theoretically </s>
|
funcom_train/42667323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JMenuItem getJMenuExit() {
if (jMenuExit == null) {
jMenuExit = new JMenuItem();
jMenuExit.setMnemonic(KeyEvent.VK_X);
jMenuExit.setText("Exit");
jMenuExit.setToolTipText("Close all files and exit");
jMenuExit.setName("menuExit");
jMenuExit.setAction(new Actioneer(this, jMenuExit));
}
return jMenuExit;
}
COM: <s> this method initializes j menu exit </s>
|
funcom_train/10670978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Result testGetEventSetDescriptors() {
EventSetDescriptor[] eventSetDescriptors = beanInfo
.getEventSetDescriptors();
assertEquals(beanInfo.getEventSetDescriptors()[0]
.getAddListenerMethod().getName(), "addFredListener");
assertEquals(eventSetDescriptors.length, 1);
return passed();
}
COM: <s> verify that get event set descriptors method returns all introspected </s>
|
funcom_train/43193797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UIInputField newInputField(UIInputField.InputFieldBindingInfo bindingInfo) {
UIInputField formControl = getParent().getFactory().newInputField(getParent(),
new UIInputField.InputFieldUIInfo(getFieldLayoutData(), UIInputField.InputFieldUIInfo.SIMPLE));
getForm().add(formControl, bindingInfo);
return formControl;
}
COM: <s> create and layout a new input field </s>
|
funcom_train/28368145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public interface withSize extends Place {
/**
* Sets the size (in meters) of the place. Discrete-only environments usually will
* not implement this feature.
*
* @param size
* the size of the cell.
*/
public void setSize(Double size);
/**
* Change size.
*
* @param size
* the size
*/
public void changeSize(Double size);
}
COM: <s> the interface with size </s>
|
funcom_train/41167481 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int countNeighbors(int row, int col) {
int numberNeighbors = 0;
for (int i = row - 1; i <= row + 1; i++) {
for (int j = col - 1; j <= col + 1; j++) {
if (map[i][j] == ALIVE) {
numberNeighbors++;
}
}
}
if (map[row][col] == ALIVE) {
numberNeighbors--;
}
return numberNeighbors;
}
COM: <s> return the number of neighbors for a specific cell </s>
|
funcom_train/49319344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String _evalCommand(String cmd) {
if (cmd.equals("update")) {
return _updateImage();
} else if (cmd.startsWith("config -file ")) {
return _showImage(cmd.substring(13));
} else if (cmd.equals("wcscenter")) {
return _wcsCenter();
} else
throw new IllegalArgumentException("Unknown remote command: " + cmd);
}
COM: <s> evaluate the given remote command and return a reply if necessary </s>
|
funcom_train/22958806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean loadModelConfig(String filename){
Object modelcfg = MainConfigurationTree.getInstance().loadObjectFromFile(filename);
ClassWithConfigBean cfg = (ClassWithConfigBean) modelcfg;///= extractModelCfgFromModule(modelcfg);
if(cfg==null) return false;
this.setModelCfg(cfg);
return true;
}
COM: <s> to load model config module from file </s>
|
funcom_train/9542956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean insertRow(Attribute attribute, int index, double min, double max) {
if (!Utils.isNumeric(attribute))
return false;
if (coloring.conflictsWithAttributeRange(attribute, min, max))
return false;
AttValueColor attvalue = new AttValueColor(attribute, min, max, ExampleColoring.DEFAULT_COLOR);
attvalue.save();
objects.add(index, attvalue);
JViTo.getApplication().setDirty();
return true;
}
COM: <s> inserts one row for a numerical attribute </s>
|
funcom_train/2287061 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDateExpiresToNextTimeout(long timeout) {
if ((timeout < 0) || !m_completed) {
return;
}
long now = System.currentTimeMillis();
long daytime = now % 86400000;
long timeoutMinutes = timeout * 60000;
setDateExpires(now - (daytime % timeoutMinutes) + timeoutMinutes);
}
COM: <s> sets an expiration date for this cache entry to the next timeout </s>
|
funcom_train/47270072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void simulate(ProgramStatement statement) throws ProcessingException {
int value = 0;
try
{
value = SystemIO.readInteger(this.getNumber());
}
catch (NumberFormatException e)
{
throw new ProcessingException(statement,
"invalid integer input (syscall "+this.getNumber()+")",
Exceptions.SYSCALL_EXCEPTION);
}
RegisterFile.updateRegister(2, value);
}
COM: <s> performs syscall function to read an integer from input console into v0 </s>
|
funcom_train/38499842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void generateCategories() {
int team_count = _teams.size();
_categories = new ArrayList(team_count);
for (int i = 0; i < team_count; i++) {
_categories.add(((TeamRaceDO) _teams.get(i)).getName());
}
}
COM: <s> generate the category list from the team list </s>
|
funcom_train/48151345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void itemStateChanged(ItemEvent event) {
if (event.getSource() == rvJComboBox) {
rvIndex = rvJComboBox.getSelectedIndex();
rvGraph.setRandomVariable(rv[rvIndex]);
rvTable.setRandomVariable(rv[rvIndex]);
rvGraph.repaint();
rvTable.update();
} else super.itemStateChanged(event);
}
COM: <s> this method handles the choice events including the choice of the die </s>
|
funcom_train/16381166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getRefreshButton() {
if (jRefreshTasks == null) {
jRefreshTasks = new JButton();
jRefreshTasks.setText("Refresh");
jRefreshTasks.addActionListener(new ActionListener() {
public void actionPerformed(final ActionEvent e) {
setUrl(getJAutotoolUrlTf().getText());
}
});
}
return jRefreshTasks;
}
COM: <s> this method initializes j button </s>
|
funcom_train/10684456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ConstantPoolEntry getClassPoolEntry(String name) {
String classes[] = bands.getCpClass();
int index = matchSpecificPoolEntryIndex(classes, name, 0);
if (index == -1) {
return null;
}
try {
return getConstantPoolEntry(CP_CLASS, index);
} catch (Pack200Exception ex) {
throw new Error("Error getting class pool entry");
}
}
COM: <s> given the name of a class answer the cpclass associated with that class </s>
|
funcom_train/32779663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void transform(){
for(int i=0; i<this.pointsIntern.length; i++){
this.pointsIntern[i] = backgroundLine.getModel().getModelGrafic().
transformToIntern(this.viewId, this.pointsExtern[i]);
//System.out.println(i+" "+this.pointsIntern[i]+" "+this.viewId+" "+this.pointsExtern[i]);
}
this.setBounds();
}
COM: <s> transforms from external to internal coordinate system </s>
|
funcom_train/50999991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBindVars(HashMap binds) {
//convert to uppercase keys.
Iterator keys = binds.keySet().iterator();
while (keys.hasNext()) {
String keyName = (String) keys.next();
bindVars.put(keyName.toUpperCase(), binds.get(keyName));
}
}
COM: <s> define the bindvariables a hash map containing </s>
|
funcom_train/17805168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addRPCProtocolPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_RemoteRuntimeConnection_RPCProtocol_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_RemoteRuntimeConnection_RPCProtocol_feature", "_UI_RemoteRuntimeConnection_type"),
CtbPackage.Literals.REMOTE_RUNTIME_CONNECTION__RPC_PROTOCOL,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the rpc protocol feature </s>
|
funcom_train/1149667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand18() {
if (okCommand18 == null) {//GEN-END:|242-getter|0|242-preInit
// write pre-init user code here
okCommand18 = new Command("Ok", Command.OK, 0);//GEN-LINE:|242-getter|1|242-postInit
// write post-init user code here
}//GEN-BEGIN:|242-getter|2|
return okCommand18;
}
COM: <s> returns an initiliazed instance of ok command18 component </s>
|
funcom_train/9184217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DracoTuple performUniOp(byte op, DracoTuple t) {
if (t == null)
throw new NullPointerException();
// construct operation
Result result = new Result();
TupleOp to = new TupleOp(op, new ITuple[] { t.toLimeWrapper()
.limifyWrapper() }, result);
lop.postOperation(to);
// return the result
try {
return DracoTuple.create((ITuple) result.get());
} catch (ClassNotFoundException e) {
throw new RuntimeException(e);
}
}
COM: <s> perform out in inp rd rdp </s>
|
funcom_train/14093545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCheckExpectedObj() throws XMLException {
IXMLTestCase tc = m_fixture.getTestCase();
Element e = m_fixture.newElement("impltest", new String[] {
"expectedobj", "data"
});
m_abstractAssertTagHandler = new ImplAssertTagHandler(e, tc);
m_abstractAssertTagHandler.checkExpected();
}
COM: <s> check the expected object </s>
|
funcom_train/21058804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getBridgeClassName() {
String bridgeClassName = getPortletContext().getInitParameter(
BRIDGE_CLASS);
if (bridgeClassName == null) {
bridgeClassName = getFromServicesPath(this.getPortletConfig()
.getPortletContext(), BRIDGE_SERVICE_CLASSPATH);
}
return bridgeClassName;
}
COM: <s> returns the class name of the bridge implementation this portlet uses </s>
|
funcom_train/8085502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifyHistoryChangedListeners() {
Iterator iter;
HistoryChangedListener l;
iter = m_HistoryChangedListeners.iterator();
while (iter.hasNext()) {
l = (HistoryChangedListener) iter.next();
l.historyChanged(
new HistoryChangedEvent(this, HISTORY_NAME, getHistory()));
}
}
COM: <s> notifies the history listeners of the event </s>
|
funcom_train/44851696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void start_joinCondition(String inName, Attributes inAttributes) {
// There must be something wrong in the definition
if (VSys.assertNotNull(this, "start_joinCondition", currentJoinDef) == Assert.FAILURE)
return;
columnDefState.setToJoinCondition();
currentJoinDef.addJoinCondition(inAttributes.getValue(0));
}
COM: <s> handles the start of the join condition tag </s>
|
funcom_train/13688835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Throwable getCause() {
// Even if you cannot set the cause of this exception other than through
// the constructor, we check for the cause being "this" here, as the cause
// could still be set to "this" via reflection: for example, by a remoting
// deserializer like Hessian's.
return (this.cause == this ? null : this.cause);
}
COM: <s> return the nested cause or code null code if none </s>
|
funcom_train/45622849 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addStdErrEncodingPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ExecType_stdErrEncoding_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ExecType_stdErrEncoding_feature", "_UI_ExecType_type"),
MSBPackage.eINSTANCE.getExecType_StdErrEncoding(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the std err encoding feature </s>
|
funcom_train/28296186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDataProperty() throws Exception {
Entry entry =
dvm.new Entry(Package.class, Sphere.class, Package.NAME,
Sphere.NAME);
dvm.set(entry);
DataConversion<Integer, Color3f> conversion = createConversion();
dvm.setProperty(entry.getDataClass(), Package.CLASSES_ATTR,
Sphere.COLOR_ATTRIBUTE, conversion);
String result =
dvm.getDataProperty(entry.getDataClass(), Sphere.COLOR_ATTRIBUTE);
assertEquals(Package.CLASSES_ATTR, result);
}
COM: <s> test get data property </s>
|
funcom_train/22404067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void moveSelectionUp(TreeItem sel) {
TreeItem parent = sel.getParentItem();
if (parent == null) {
parent = root;
}
int idx = parent.getChildIndex(sel);
if (idx > 0) {
TreeItem sibling = parent.getChild(idx - 1);
onSelection(findDeepestOpenChild(sibling), true, true);
} else {
onSelection(parent, true, true);
}
}
COM: <s> moves the selected item up one </s>
|
funcom_train/4392917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteAllProcessesFromDB() {
final Session session = sessionFactory.openSession();
// start Transaction
session.beginTransaction();
Query query = session.createQuery("FROM Process");
List<Process> processes = (List<Process>) query.list();
// de.uni.stuttgart.bpelSearching.test if process is correct loaded
for (Process process : processes) {
session.delete(process);
}
session.getTransaction().commit();
session.close();
}
COM: <s> deletes all process from the database </s>
|
funcom_train/19567121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void finished() {
log.info(project.getFileSlot(BMFile.getFileType()).toString());
if (project.getFileSlot(BMFile.getFileType()).size() >= 1)
loader.getRenderer().loadBestMatches(
project.getFileSlot(BMFile.getFileType()).getFirst()
.toString());
}
COM: <s> react on finishing projection </s>
|
funcom_train/21845548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void println(final String s) {
if( wout == null ) {
lastStatus = new Status(Status.FILE, new Status(Status.WRONGMODE, "PIPE output"));
lastStatus.print(jbenv);
return;
}
String localBuffer = s;
lastStatus = new Status();
try {
wout.write(localBuffer + JBasic.newLine);
wout.flush();
} catch (final IOException e) {
lastStatus = new Status(Status.IOERROR, e.toString());
lastStatus.print(jbenv);
}
}
COM: <s> write a string followed by a newline to the output file </s>
|
funcom_train/8362138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void append(LoggingEvent loggingEvent) {
final String message = this.layout.format(loggingEvent);
final boolean atTheEnd = textArea.getCaretPosition() == this.textSize;
this.textSize += message.length();
this.textArea.append(message);
if (atTheEnd) {
textArea.setCaretPosition(this.textSize);
}
}
COM: <s> format and then append the logging event to the stored </s>
|
funcom_train/3273887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addTerm(String term) {
Integer count = (Integer) this.terms.get(term);
if (count==null) {
this.terms.put(term, new Integer(1));
} else {
this.terms.put(term, new Integer(count.intValue()+1));
}
}
COM: <s> adds a new term to the term list for this document </s>
|
funcom_train/4814957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete_WarningTable(int wid) throws SQLException {
Connection conn = getConnection();
String psql = "delete from warning_table where wid = "+wid;
PreparedStatement pstmt = conn.prepareStatement(psql);
pstmt.executeUpdate();
pstmt.close();
/*if(pstmt != null)
pstmt.close();*/
if (conn != null) {
conn.close();
}
}
COM: <s> warning table rid </s>
|
funcom_train/10188523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addDeklinationAdjektiv( String wordStamm ) {
if( wordStamm != null && super.isValidWord( wordStamm )) {
addWord( wordStamm + "e" );
addWord( wordStamm + "er" );
addWord( wordStamm + "es" );
addWord( wordStamm + "en" );
addWord( wordStamm + "em" );
}
}
COM: <s> add the adjective declination for the given word root </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.