__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/32613861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPrefix(String prefix, String uri) {
if (prefix == null) {
throw new NullPointerException("String prefix was null.");
} else if (uri == null) {
throw new NullPointerException("URI uri was null.");
}
// URI instance is not needed, as the mapping is only used
// for String expansion
prefixMappings.put(prefix, uri);
}
COM: <s> add the given prefix uri mapping to the query instance </s>
|
funcom_train/49438775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isInactive() {
switch(getState()) {
case QUEUED:
case GAVE_UP:
case WAITING_FOR_RESULTS:
case WAITING_FOR_USER:
case WAITING_FOR_CONNECTIONS:
case ITERATIVE_GUESSING:
case WAITING_FOR_RETRY:
case PAUSED:
case FILE_NOT_FOUND:
case UNAUTHORIZED_401:
return true;
}
return false;
}
COM: <s> determines if this is in an inactive state </s>
|
funcom_train/34617192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addFragmentPredicate(Fragment fragment) {
String idString = getIdString(fragment);
String type = fragment.getFragmentType().getName();
String name = getNameString(fragment.getName());
String projectIdString = getIdString(contentManager.getProjectOf(fragment));
addBatchPredicateRule("fragment", idString, name, type);
addBatchPredicateRule("belongsToProject", idString, projectIdString);
}
COM: <s> computes the strings from which to create a fragment predicate </s>
|
funcom_train/7803858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getCorrespondingOutput(Layer inputLayer) {
//feed the pattern to the trained network, the pre calculted weights
//would be used to compute the output pattern
feedForward(inputLayer);
String s = "";
for (Neuron neuron : outputLayer.getNeurons()) {
s += neuron.getRoundedOutputValue(neuron.getValue());
}
return s;
}
COM: <s> this function calculate or map the input pattern to its corresponding </s>
|
funcom_train/25365887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addQuestConditionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Quest_questCondition_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Quest_questCondition_feature", "_UI_Quest_type"),
LeveleditorPackage.Literals.QUEST__QUEST_CONDITION,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the quest condition feature </s>
|
funcom_train/51197341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testgetColRightEnd() {
System.out.println("nColRightEnd");
int expectedResult = 16;
try {
int result = instance.getColRightEnd();
assertEquals(expectedResult, result);
} catch (Exception ex) {
ex.printStackTrace();
fail(ex.toString() + " thrown");
}
}
COM: <s> test of n col right end method of class jjil </s>
|
funcom_train/26589265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkDatabase(PersistentDatabase pd) throws DException {
byte[] bytes = pd.readBytes(pd.getDatabaseProperties().
ISCOMPLETE_BIT_IN_DATABASE, 1);
Boolean isComplete = CCzufDpowfsufs.getBoolean(bytes);
if (!isComplete.booleanValue()) {
throw new DException("DSE5543", null);
}
}
COM: <s> private method to check if system database is complete </s>
|
funcom_train/9849305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void centerMarker(LocationMarker marker) {
// imageView.setZoom(1.0f, true);
Location location = marker.getLocation();
int w = getMeasuredWidth();
int h = getMeasuredHeight();
int left = location.getMapXcord() - w / 2;
int top = location.getMapYcord() - h / 2;
// due to a bug javascriptScrollTo has to be used
// scrollTo(left, top);
scrollTo(left, top);
}
COM: <s> scrolls the view so that the </s>
|
funcom_train/32894129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
synchronized(_lock) {
// Wrap up the current thread
setDone();
// Reset done for the next thread
_done = false;
// Create and start a new Thread, wrapped around this Runnable
_thread = new Thread(this, _name);
_thread.setDaemon(_daemon);
_thread.start();
}
}
COM: <s> since polling thread is a wrapper around a thread </s>
|
funcom_train/44137001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyAddMedia(OSMElementEditorPanel ec, OSMElement elt, int type) {
for(int i = 0;i < m_ClientList.size();i++) {
OSMElementEditorListener lster = (OSMElementEditorListener)m_ClientList.get(i);
lster.onAddMedia(new OSMElementEditorEvent(ec, elt, type));
}
}
COM: <s> to notify a media add </s>
|
funcom_train/43935882 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeHeader() throws IOException {
//Header fields (in same order than spec, for comparison purposes)
FLVHeader flvHeader = new FLVHeader();
flvHeader.setSignature("FLV".getBytes());
flvHeader.setVersion ((byte)0x01);
flvHeader.setFlagReserved01 ((byte) 0x0);
flvHeader.setFlagAudio (true);
flvHeader.setFlagReserved02 ((byte) 0x0);
flvHeader.setFlagVideo (true);
flvHeader.write(out);
//Dump header to output channel
channel.write(out.buf());
}
COM: <s> writes the header bytes </s>
|
funcom_train/22232381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Buffer getDataBuffer() {
Buffer tmpBuffer = null;
switch (bufferType) {
case BYTE_BUFFER:
tmpBuffer = ((ByteBuffer)buffer).duplicate();
break;
case INT_BUFFER:
tmpBuffer = ((IntBuffer)buffer).duplicate();
break;
default:
// We should never get here
throw new AssertionError("missing case statement");
}
return tmpBuffer.rewind();
}
COM: <s> gets the data buffer to the specified input data buffer </s>
|
funcom_train/17209044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JToggleButton getJToggleButton() {
if (jToggleButton == null) {
jToggleButton = new JToggleButton("Details");
jToggleButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
if (!Content.isVisible()) {
tagArea.setPreferredSize(new Dimension(
Title.getWidth() - 150, 300));
tagArea.revalidate();
}
Content.setVisible(!Content.isVisible());
revalidate();// draw();
}
});
}
return jToggleButton;
}
COM: <s> this method initializes j toggle button </s>
|
funcom_train/48497666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ProductDTO selectByProject (int project_id) {
// First select the products
SelectByQuery query = new SelectByQuery (super.getDataSource(), selectByProjectSql, 1);
List products = query.execute (new Object[] {new Integer(project_id)});
if (products == null || products.size() == 0)
return null;
else {
ProductDTO product = (ProductDTO)products.get(0);
return product;
}
}
COM: <s> given the id of a project select the product as a </s>
|
funcom_train/37751585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double get_end_encroachment(SideFloatArea side) {
double side_inline_offset =
side.getEndIndent() + side.get_content().get_ip_dim();
double end_indent = getEndIndent();
if (end_indent < side_inline_offset) {
return side_inline_offset - end_indent;
}
return 0.0;
}
COM: <s> gets the i end encroachment i on this area of the gven </s>
|
funcom_train/49248467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected PreparedStatement prepareStatementByName(String queryName) throws SQLException {
String query=queryProperties.getProperty(queryName);
if (query==null) throw new SQLException("Query named '"+queryName+"' not found");
preparedStatement=getDatabaseExtractor().getConnection().prepareStatement(query);
return preparedStatement;
}
COM: <s> prepare staement using query properties </s>
|
funcom_train/37048484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean rightClick(MouseEvent me) {
if (DEBUG) {
Debug.output("rightClick(MAP) at " + me.getX() + ", " + me.getY());
}
if (me instanceof MapMouseEvent) {
return displayPopup(grp.getItemsForMapMenu((MapMouseEvent)me), me);
}
return false;
}
COM: <s> notification that the map was right clicked on </s>
|
funcom_train/16792487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Resource createInterval(Date start, Date finish) {
Calendar calendar = Calendar.getInstance();
Resource resource = this.model.createResource(Timeline.Interval);
calendar.setTime(start);
resource.addLiteral(Timeline.start, calendar);
calendar.setTime(finish);
resource.addLiteral(Timeline.end, calendar);
return resource;
}
COM: <s> create an anonymous interval for timeline based information </s>
|
funcom_train/8743288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public int applyFilter(String session_id_, LayerFilter new_filter) {
FilteringService fs = FilteringService.getSession(session_id_);
if (new_filter == null) {
//remove top filter
fs.popFilter();
} else {
fs.updateFilter(new_filter);
}
fs.save();
return fs.layerfilters.size();
}
COM: <s> applies a layer filter to the session </s>
|
funcom_train/25084401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JSONArray getJSONArray(int index) throws JSONException {
Object o = get(index);
if (o instanceof JSONArray) {
return (JSONArray)o;
}
throw new JSONException("JSONArray[" + index +
"] "+ExceptionMessage.IS_NOT_A_JSONARRAY.toString());
}
COM: <s> get the jsonarray associated with an index </s>
|
funcom_train/1477214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toCartowebString() {
StringBuilder buf = new StringBuilder();
buf.append(ll.x).append(",").append(ll.y).append(",").append(ur.x).append(",").append(ur.y);
return buf.toString();
}
COM: <s> returns the cartoweb shortcuts </s>
|
funcom_train/51811884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCanReopen() {
assertTrue("Cannot reopen byte array resource", resource.canReopen());
resource = new SpringResource( new InputStreamResource( new ByteArrayInputStream(new byte[0])));
assertFalse("Indicates that an input stream resource can be reopend.", resource.canReopen());
}
COM: <s> most spring resources can be reread with the exception of the </s>
|
funcom_train/3086535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMinimum(int n) {
int newMax = Math.max(n, max);
int newValue = Math.max(n, value);
int newExtent = Math.min(newMax - newValue, extent);
setRangeProperties(newValue, newExtent, n, newMax, isAdjusting);
}
COM: <s> sets the minimum to i n i after ensuring that i n i </s>
|
funcom_train/22550509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected BootstrapServer nextServer() {
BootstrapServer e = null;
synchronized (BootstrapServerManager.this) {
if(_lastIndex >= SERVERS.size()) {
if(LOG.isWarnEnabled())
LOG.warn("Used up all servers, last: " + _lastIndex);
} else {
e = SERVERS.get(_lastIndex);
_lastIndex++;
}
}
return e;
}
COM: <s> fetches the next server in line </s>
|
funcom_train/26595015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean next() throws com.daffodilwoods.database.resource.DException {
switch(state) {
case INVALIDSTATE :
throw new DException("DSE4116",null);
case BEFOREFIRST :
return first();
case AFTERLAST :
return false;
}
state = state == FIRSTISCURRENT ? leftIterator.next() ? state
: rightIterator.first() ? SECONDISCURRENT
: AFTERLAST
: state == SECONDISCURRENT
? rightIterator.next() ? state
: AFTERLAST
: state;
return state != AFTERLAST;
}
COM: <s> this method is responsible for retriving next record of union iterator </s>
|
funcom_train/31292429 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDialogMapping(final String tag, final Dialog dialog) {
dialogs.put(tag, dialog);
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("added dialog template '" + dialog.getClass()
+ "' to handle tag '" + tag + "'");
}
}
COM: <s> adds the dialog as a template to handle the given tag </s>
|
funcom_train/44433541 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FieldPos getPlayerPos(int num,boolean isTeamHome) throws NoSuchPlayerException {
if ((num>=1)&&(num<=Rules.getPlayerTeamMax())) {
if (isTeamHome) return this.playerPosHome[num-1];
else return this.playerPosGuest[num-1];
}
else throw new NoSuchPlayerException(num,isTeamHome);
}
COM: <s> returns a players position </s>
|
funcom_train/269075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addWaypointListener(IWaypointListener l) {
// Only allow a listener to be registered once.
if (zListeners.get("WAYPOINT") == null)
zListeners.put("WAYPOINT", new Vector());
if (((Vector) zListeners.get("WAYPOINT")).contains(l))
return;
addTransferListener(l);
((Vector) zListeners.get("WAYPOINT")).add(l);
return;
}
COM: <s> adds l to the list of listeners interested in waypoint data </s>
|
funcom_train/21612070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSequence(String sequenceName, Invocable sequence, byte flags) {
Overload overload = sequenceMap.get(sequenceName);
if( overload == null ) {
sequenceMap.put( sequenceName, new Overload( sequenceName, new InvocableObject(sequence, flags) ) );
} else {
overload.add( new InvocableObject(sequence, flags) );
}
}
COM: <s> adds a sequence to this context with specified flags </s>
|
funcom_train/49756654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UPBLinkI getLinkNamed(String linkName) {
if ((linkName == null) || (linkName.length() == 0)) return null;
for (UPBLinkI theLink: networkLinks) {
if (theLink == null) continue;
if (theLink.getLinkName().equals(linkName)) return theLink;
}
return null;
}
COM: <s> given the name of a link find the first instance of a link </s>
|
funcom_train/51605105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonHardwaresAdvice() {
if (jButtonCulutureHardwaresAdvice == null) {
jButtonCulutureHardwaresAdvice = new JButton();
jButtonCulutureHardwaresAdvice.setIcon(new ImageIcon(getClass()
.getResource("/net/sf/cannagrower/images/help_16.png")));
jButtonCulutureHardwaresAdvice.setText(Messages
.getMessage(Messages.hardwareAdvices));
jButtonCulutureHardwaresAdvice.setMnemonic(KeyEvent.VK_UNDEFINED);
jButtonCulutureHardwaresAdvice.setEnabled(false);
}
return jButtonCulutureHardwaresAdvice;
}
COM: <s> this method initializes j button culuture hardwares advice </s>
|
funcom_train/4381786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Color getColor(ChatEvent event) {
String key = null;
if (event.getType() == ChatType.CHANNEL_TELL) {
key = CHAT_CHAT_EVENT_TYPE_COLOR_APPEND_TO + event.getType() + "-"
+ event.getChannel() + "-color";
} else {
key = getKeyForChatType(event.getType());
}
return getColorForKeyWithoutDefault(key);
}
COM: <s> returns the foreground color to use for the specified chat event </s>
|
funcom_train/18590859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processRegisterRC(Sim_event ev) {
boolean result = super.storeRegistrationID(ev, rcList_);
if (result) {
super.notifySystemGIS(ev, ev.get_tag());
} else {
System.out.println(super.get_name() +
".processRegisterRC(): Warning - can't register a " +
"Replica Catalogue ID.");
}
}
COM: <s> registers a rc to this entity </s>
|
funcom_train/8090191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DoubleVector empiricalBayesEstimate( DoubleVector x ) {
DoubleVector pred = new DoubleVector( x.size() );
for(int i = 0; i < x.size(); i++ )
pred.set(i, empiricalBayesEstimate(x.get(i)) );
trim( pred );
return pred;
}
COM: <s> returns the empirical bayes estimate of a vector </s>
|
funcom_train/51338140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void LT(final byte[] a, final byte[] b) {
final int cmp = BytesUtil.compareBytes(a, b);
if (cmp < 0)
return;
fail("cmp=" + cmp + ", a=" + BytesUtil.toString(a) + ", b="
+ BytesUtil.toString(b));
}
COM: <s> succeeds iff a lt b </s>
|
funcom_train/85480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void C010(int segment) throws T_Fail, StandardException {
Transaction t = t_util.t_startTransaction();
long cid = t_util.t_addContainer(t, segment);
t_util.t_commit(t);
ContainerHandle c1, c2;
c1 = t_util.t_openContainer(t, segment, cid, true);
c1 = t_util.t_openContainer(t, segment, cid, true);
t_util.t_dropContainer(t, segment, cid); // cleanup
t_util.t_commit(t);
t.close();
PASS("C010");
}
COM: <s> c010 create a container within a transaction commit and the re open </s>
|
funcom_train/22158722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean ping(MessageSender sender, IDAddressPair target) throws IOException {
Message ret = sender.sendAndReceive(target.getAddress(), new PingMessage());
if (!(ret instanceof AckMessage)) {
logger.log(Level.WARNING, "Received message should be ACK, but it is: "
+ ret.getName());
return false;
}
this.algorithm.touch(target);
return true;
}
COM: <s> an utility method for </s>
|
funcom_train/885107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void activateGlassPane() {
// Mount the glasspane on the component window
final GlassPane aPane = GlassPane.mount(getAComponent(), true);
// keep track of the glasspane as an instance variable
setGlassPane(aPane);
if (getGlassPane() != null) {
// Start interception UI interactions
getGlassPane().setVisible(true);
}
}
COM: <s> activate the capabilities of glasspane </s>
|
funcom_train/12170359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getShardDescription() {
if (!inAnyShard()) {
return "not in shard";
} else if (firstShard == lastShard) {
if (completed) {
return Integer.toString(firstShard);
} else {
return firstShard + "+";
}
} else {
return firstShard + "-" + lastShard + (completed ? "" : "+");
}
}
COM: <s> get a description of the shards that contain this node </s>
|
funcom_train/5268731 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean saveData(byte source, byte[] data) {
try {
if(data != null) {
store.setRecord(source, data, 0, data.length);
} else {
store.setRecord(source, null, 0, 0);
}
} catch (Exception ex) {
ex.printStackTrace();
return false;
}
return true;
}
COM: <s> save the data from the source </s>
|
funcom_train/16598499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkModifiers(MouseEvent event) {
int modifiers = event.getModifiers();
/*
int keyPressedMask = InputEvent.BUTTON2_MASK;
*** No se porque el boton derecho del raton devuelve
*** un modificador 'Meta + BUTTON3'. Pensaba que deberia
*** devolver 'BUTTON2' ????
*/
int keyPressedMask = InputEvent.BUTTON3_MASK;
return ((modifiers & keyPressedMask) == keyPressedMask);
}
COM: <s> determines if has pressed the button 3 of the mouse </s>
|
funcom_train/28672850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addValueTypePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_TypedCollectionType_valueType_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_TypedCollectionType_valueType_feature", "_UI_TypedCollectionType_type"),
BeansPackage.Literals.TYPED_COLLECTION_TYPE__VALUE_TYPE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the value type feature </s>
|
funcom_train/45692188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNumberOfSongEventsCurrentPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Song_numberOfSongEventsCurrent_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Song_numberOfSongEventsCurrent_feature", "_UI_Song_type"),
EsxPackage.Literals.SONG__NUMBER_OF_SONG_EVENTS_CURRENT,
false,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the number of song events current feature </s>
|
funcom_train/1589220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Interval withPeriodAfterStart(ReadablePeriod period) {
if (period == null) {
return withDurationAfterStart(null);
}
Chronology chrono = getChronology();
long startMillis = getStartMillis();
long endMillis = chrono.add(period, startMillis, 1);
return new Interval(startMillis, endMillis, chrono);
}
COM: <s> creates a new interval with the specified period after the start instant </s>
|
funcom_train/13689994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addGrade_Of_School(String szGrade) throws MuchoDatabaseException {
Grade_of_school grade_of_school = new Grade_of_school();
grade_of_school.setName(szGrade);
grade_of_school.setTeacher_id(UserDAO.getCurrentUser().getId());
grade_of_school.setAction(Constants.DB_ACTION_NEW);
if (UserDAO.updateGrade_Of_School(grade_of_school)==null) {
throw new MuchoDatabaseException(
Helper.getMessage("gui.admin.class.add.failed.text"));
}
refresh();
}
COM: <s> adds a grade to the db </s>
|
funcom_train/39314724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testheightActionPerformed() {
System.out.println("testheightActionPerformed");
preferences myPrefs=new preferences(ff, true);
String s=new String("l");
ActionEvent myEvent=new ActionEvent(s, 1, "hello");
myPrefs.heightActionPerformed(myEvent);
//empty code
}
COM: <s> test of height action performed method of class preferences </s>
|
funcom_train/20785681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XineOSD createOSD(int xpos, int ypos, int width, int height){
SWIGTYPE_p_xine_osd_s osd = XineLib.xine_osd_new(stream, xpos, ypos, width, height);
if (osd == null) {
return null;
}
return new XineOSD(osd);
}
COM: <s> create an on screen display renderer instance </s>
|
funcom_train/32316762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSuperObjectPropertyPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SubObjectPropertyOf_superObjectProperty_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SubObjectPropertyOf_superObjectProperty_feature", "_UI_SubObjectPropertyOf_type"),
OdmPackage.Literals.SUB_OBJECT_PROPERTY_OF__SUPER_OBJECT_PROPERTY,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the super object property feature </s>
|
funcom_train/37034714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() throws LifecycleException {
// Validate and update our current component state
if (started)
throw new LifecycleException
(sm.getString(getStoreName()+".alreadyStarted"));
lifecycle.fireLifecycleEvent(START_EVENT, null);
started = true;
// Start the background reaper thread
threadStart();
}
COM: <s> prepare for the beginning of active use of the public methods of this </s>
|
funcom_train/4010483 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean pauseAllListener () {
//synchronized (mySPOTLIST) {
Enumeration enu = mySPOTLIST.elements(); // Local enumerator
while (enu.hasMoreElements()) {
SingleSPOT next = (SingleSPOT) enu.nextElement();
// Get the Listener
Listener myListener = next.getListener();
// Start the Listener
myListener.doPause();
}
//}
return true;
}
COM: <s> stop all the listeners </s>
|
funcom_train/9007652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeExternal(DataOutputStream dos) throws IOException {
ExtUtil.writeBool(dos, fallbackDefaultLocale);
ExtUtil.writeBool(dos, fallbackDefaultForm);
ExtUtil.write(dos, new ExtWrapMap(localeData, new ExtWrapMap(String.class, String.class, true)));
ExtUtil.write(dos, new ExtWrapNullable(defaultLocale));
ExtUtil.write(dos, new ExtWrapNullable(currentLocale));
}
COM: <s> write the object to stream </s>
|
funcom_train/43199241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void kinshipEndorsement(Household household1, Household household2) {
String label = "is-relative";
if (household1.getId() != household2.getId()
&& !household1.getRelativeHouseholds().contains(household2.getId())
&& !household2.getRelativeHouseholds().contains(household1.getId())
) {
household1.getRelativeHouseholds().add(household2.getId());
household2.getRelativeHouseholds().add(household1.getId());
householdsMutualEndorsments(household1, household2, label);
}
}
COM: <s> members of households household1 and household2 endorse each other as relatives </s>
|
funcom_train/12838330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setVariableSubstitutionVelocityContext(SessionID sessionID, VelocityContext context) throws SessionFacilitiesException {
if (context == null) {
throw new SessionFacilitiesException("Null argument passed into SessionFacilities::setVariableSubstitutionVelocityContext");
}
getVelocityContextHashtable().put(sessionID, context);
}
COM: <s> this method sets the principals login name for session id </s>
|
funcom_train/21015542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintCurveVectors(Graphics2D g2) {
g2.setStroke(normalStroke);
g2.setColor(doc.getControlsColor());
for (KnotworkEdge edge : doc.getGraph().getEdges()) {
Point2D p, v;
for(KnotworkCurveHandle handle : edge.getHandles()){
p = handle.getPosition();
v = handle.getControl();
if(v!=null)
new LineSegment2D(p, v).draw(g2);
}
}
}
COM: <s> draw vector controls of curves </s>
|
funcom_train/27944861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AllocTypeMethodRef getAllocTypeMethod(TypeRef peer) {
ListIterator itr = getAllocTypeMethods().listIterator();
AllocTypeMethodRef obj;
while (itr.hasNext()) {
obj = (AllocTypeMethodRef) itr.next();
if ( obj.getType().equals( peer ) )
return obj;
}
return null;
}
COM: <s> returns statistic data for given type whose instances were allocated </s>
|
funcom_train/36376548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer getLimitReachedBy() {
Integer l = null;
try {
int maxActions = Integer.parseInt(getMaxActions());
int actions = Integer.parseInt(getMonthlyActions());
l = Math.min(100, (actions * 100) / maxActions);
} catch (Exception ignored) {
}
return l;
}
COM: <s> returns the percentage off reached maximum actions per month </s>
|
funcom_train/44459739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCAPIVersion() throws Exception {
assertNotNull("No XINS version specified.", _capi.getXINSVersion());
assertTrue("The version does not starts with '3.0' but with '" +
_capi.getXINSVersion() + "'", _capi.getXINSVersion().startsWith("3.0"));
}
COM: <s> tests the get xinsversion capi method </s>
|
funcom_train/43408215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonOk() {
if (jButtonLogin == null) {
jButtonLogin = new JButton();
jButtonLogin.setBounds(new java.awt.Rectangle(44,180,94,32));
jButtonLogin.setText("Login");
jButtonLogin.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
CCS.getMainFrame().setVisible(true);
CCS.getLogin().setVisible(false);
}
});
}
return jButtonLogin;
}
COM: <s> this method initializes j button ok </s>
|
funcom_train/38778234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(byte[] s,int len) throws TextPrinterException {
try {
if (port.isPrinterError()) throw new TextPrinterException("Printer reports error.");
if (port.isPrinterTimedOut()) throw new TextPrinterException("Printer reports time out.");
out.write(s,0,len);
} catch (Exception e) {
TextPrinterException t=new TextPrinterException(e.getMessage());
throw t;
}
}
COM: <s> writes an array of bytes to the port </s>
|
funcom_train/28740316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getAdminObjectsInSampleGroup(Integer groupId) throws LimsException {
Collection adminObjects = null;
try {
}
catch (Exception ex) {
LogManager.logMessage(clsName + ".getAdminObjectsInSampleGroup(): ", ex);
throw new LimsException(ex.getMessage());
}
return adminObjects;
}
COM: <s> get admin object in sample group </s>
|
funcom_train/37854632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startTarget(File path) {
try {
myTargetPath = path;
addAttribute(PATH_ATTR, path.getPath());
openTag(TARGET_TAG);
} catch (SAXException e) {
getDebugLog().logSevere(SVNLogType.DEFAULT, e);
}
}
COM: <s> begins an xml tree with the target path for which the </s>
|
funcom_train/45320133 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBotonGestionCobros() {
if (botonGestionCobros == null) {
botonGestionCobros = new JButton();
botonGestionCobros.setText("Gestion de Cobros");
botonGestionCobros.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
padre.cambiarPanel("panelCobros");
}
});
}
return botonGestionCobros;
}
COM: <s> this method initializes boton gestion cobros </s>
|
funcom_train/938019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void layoutVertical() {
scroll.setOrientation(Adjustable.VERTICAL);
final JPanel centro = new JPanel(new GridLayout(months.length, 1));
for (int i = 0; i < months.length; i++) {
centro.add(months[i]);
}
add(centro, BorderLayout.CENTER);
layoutScrollAndYear();
}
COM: <s> method used to layout vertical </s>
|
funcom_train/21320017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int calculateScrollingLen() {
TextPaint tp = getPaint();
Rect rect = new Rect();
String strTxt = getText().toString();
tp.getTextBounds(strTxt, 0, strTxt.length(), rect);
int scrollingLen = rect.width() + getWidth();
rect = null;
return scrollingLen;
}
COM: <s> calculate the scrolling length of the text in pixel </s>
|
funcom_train/36189057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onServiceModification(ServiceReference ref) {
pssIpojoLog("onServiceModification",ref, null);
List list = getRecordsByRef(ref);
for (int i = 0; i < list.size(); i++) { // Stop the implied record
Record rec = (Record) list.get(i);
rec.update();
}
}
COM: <s> a used service is modified </s>
|
funcom_train/33265202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension getMinimumSize(int rows, int cols) {
Dimension min;
if ((rows == 0) && (cols == 0)) {
min = linesPanel.getMinimumSize();
} else {
min = fixedSize(rows, cols);
}
Insets i = getInsets();
min.width += i.left+i.right;
min.height += i.top+i.bottom;
return min;
}
COM: <s> returns the specified minimum size dimensions of the text area gadget </s>
|
funcom_train/9344896 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void build() {
String filename = ((FileEditorInput)getEditorInput()).getPath().toOSString();
filename = filename.replaceAll("\\\\","\\\\\\\\");
try {
FSTBuilder.fileBuilder(filename,null);
}catch (Exception x) {
x.printStackTrace();
}
IWorkspace workspace = ResourcesPlugin.getWorkspace();
try {
workspace.getRoot().refreshLocal(IResource.DEPTH_INFINITE,null);
}catch(Exception x) {
x.printStackTrace();
}
}
COM: <s> sorts the words in page 0 and shows them in page 2 </s>
|
funcom_train/22784197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEntry() {
// assertEquals(12245, Configuration.getInt("instance.controlport"));
Configuration.set("test.foo", "lala");
Configuration.set("test.bar", 42);
assertEquals("lala", Configuration.getString("test.foo"));
assertEquals(42, Configuration.getInt("test.bar"));
try {
Configuration.getString("test.nonexistant");
Configuration.getInt("test.nonexistant");
fail();
} catch (ConfigurationValueNotFoundException e) {
/* ok */
}
Configuration.remove("test.foo");
try {
Configuration.getString("test.foo");
fail();
} catch (ConfigurationValueNotFoundException e) {
/* ok */
}
}
COM: <s> mal test only tests the two get value methodes of an entry </s>
|
funcom_train/28122381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setArrow(int direction, int size) {
Direction = direction;
Size = size - 1;
switch (Direction) {
case DIRECTION_LEFT:
case DIRECTION_RIGHT:
setSize(size + 1, size + 1);
break;
case DIRECTION_UP:
case DIRECTION_DOWN:
setSize(size + 1, size + 1);
break;
}
repaint();
}
COM: <s> set the arrow size and direction </s>
|
funcom_train/303503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ServerCommand getServerCommand() {
ServerCommand sc = new ServerCommand();
sc.setLogDecodedSQL(this.logDecodedSQL);
sc.setQueryTimeout(this.queryTimeout);
sc.setTimeoutBeforeWarning(this.timeoutBeforeWarning);
sc.setUserInfo(this.userInfo);
sc.setValuesMap(getValuesMap());
return sc;
}
COM: <s> returns a standard server command </s>
|
funcom_train/2882272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getScopeList(Vector scopeNames) {
String scopeList ="";
for (Enumeration e = scopeNames.elements(); e.hasMoreElements() ; ){
String newScope = (String) e.nextElement();
scopeList += (scopeList.equals("")) ? "" : ",";
scopeList += newScope;
}
return scopeList;
}
COM: <s> converts slp scopes vector into mslp scopes string </s>
|
funcom_train/39846811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getFAQs() {
if (logger.isDebugEnabled()) {
logger.debug("getFAQs() - start");
}
if (logger.isDebugEnabled()) {
logger.debug("getFAQs() - end - return value = " + fAQs);
}
return fAQs;
}
COM: <s> p get all of the questions and answers in this category as a </s>
|
funcom_train/44850012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean clearSuspendDates() {
Timestamp lZero = new Timestamp(1000);
try {
BOMHelper.getParticipantHome().suspendParticipation(getActor().getActorID(), lZero, lZero);
return true;
}
catch (VException exc) {
LOG.error("Error while clearing the suspend dates!", exc); //$NON-NLS-1$
}
return false;
}
COM: <s> callback method to clear the suspend period </s>
|
funcom_train/2027248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SessionNodeType getSessionNodeType(NodeTypeName nodeTypeName) {
SessionNodeType nodeType = (SessionNodeType) this.primaryNodeTypes.get(nodeTypeName);
if (nodeType == null) {
nodeType = (SessionNodeType) this.mixinNodeTypes.get(nodeTypeName);
}
return nodeType;
}
COM: <s> returns the node type with the specified name as a </s>
|
funcom_train/38525098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set getAll(Collection names) {
String name = null;
HashSet toReturn = new HashSet();
for(Iterator it = names.iterator(); it.hasNext();) {
name = (String)it.next();
toReturn.add(classList.get(name));
}
// end of for ()
return toReturn;
}
COM: <s> return a set of all the dep class corresponding to the strings collection </s>
|
funcom_train/68378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateMeasure() {
Measure w = getSelectedMeasure();
if (linked) {
double mult = w.getAmount();
if (curMeasure != null) {
double grams = curMeasure.getGrams() * multiplier.getValue();
mult = grams/w.getGrams();
}
multiplier.setValue(mult);
}
setFocus();
curMeasure = w;
fireChangeEvent();
}
COM: <s> update the widget after a weight change has occurred </s>
|
funcom_train/16784954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInvokingService() {
// InvokingServiceDocument invokingServiceDoc = InvokingServiceDocument.Factory
// .newInstance();
// InvocationType invocationType = invokingServiceDoc
// .addNewInvokingService();
//
// EntityTypeEnum entityType = EntityTypeEnum.SERVICE;
//
// invocationHelper(invocationType, entityType);
//
InvokingServiceDocument invokingServiceDoc = makeInvokingService();
try {
ingester.ingestInvokingService(invokingServiceDoc);
} catch (IngestException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
COM: <s> service invocation testers </s>
|
funcom_train/42262660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int nearestToBall(boolean withGoalKeeper) {
int nearest = 0;
double distance = Double.MAX_VALUE;
double tmp = Double.MAX_VALUE;
Point2d ball = Camera.getInstance().getBallPosition();
int loopBorder = lastRobot;
if (withGoalKeeper == false)
--loopBorder;
for(int i=firstRobot; i<=loopBorder; ++i) {
tmp = MathToolBox.squareDistBetween(ball, Camera.getInstance().getRobotPosition(i));
if (tmp < distance) {
distance = tmp;
nearest = i;
}
}
return nearest;
}
COM: <s> checks for a robot which is the nearest to the ball </s>
|
funcom_train/15606499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean remove(Object obj) {
if (comparator==null && !(obj instanceof Comparable)) throw new
IllegalStateException("You cannot add a non-Comparable object "+
"to this set, unless you constructed it with a Comparator");
int index=findObjectOrInsertPosition(obj);
if (index>=0) {
remove (index);
return true;
}
return false;
}
COM: <s> higher performance override of the default abstract remove method </s>
|
funcom_train/7965347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeMainPage(ServletOutputStream output) throws IOException {
String startTime = statisticsManager.getStartTimeString();
double totalTime = statisticsManager.getRunningTime();
long iterationNumber = statisticsManager.getIterationCounter();
String mainPage =
htmlPrinter.generateMainSite(startTime, totalTime, iterationNumber);
output.println(mainPage);
}
COM: <s> writes main page to given servlet output stream </s>
|
funcom_train/21405673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void read(DataInputStream dis) throws IOException, InstantiationException, IllegalAccessException {
setRepeatQtnsData(PersistentHelper.read(dis,new RepeatQtnsData().getClass()));
//Set the runtime identifiers.
if(repeatQtnsDatas != null){
for(byte i=0; i<repeatQtnsDatas.size(); i++)
((RepeatQtnsData)repeatQtnsDatas.elementAt(i)).setId((byte)(i+1));
}
}
COM: <s> reads the repeat qtns data collection object from the supplied stream </s>
|
funcom_train/3945791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateTitleType_MaxLength(String titleType, DiagnosticChain diagnostics, Map context) {
int length = titleType.length();
boolean result = length <= 200;
if (!result && diagnostics != null)
reportMaxLengthViolation(ImscpRootv1p1p2Package.eINSTANCE.getTitleType(), titleType, length, 200, diagnostics, context);
return result;
}
COM: <s> validates the max length constraint of em title type em </s>
|
funcom_train/1041696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String modelString =
"value="
+ getValue()
+ ", "
+ "extent="
+ getExtent()
+ ", "
+ "min="
+ getMinimum()
+ ", "
+ "max="
+ getMaximum()
+ ", "
+ "adj="
+ getValueIsAdjusting();
return getClass().getName() + "[" + modelString + "]";
}
COM: <s> returns a string that displays all of the bounded range model properties </s>
|
funcom_train/7533132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rollback() {
if (isClosed) {
return;
}
synchronized (database) {
if (rowActionList.size() != 0) {
try {
database.logger.writeToLog(this, Token.T_ROLLBACK);
} catch (HsqlException e) {}
}
database.txManager.rollback(this);
clearIndexRoots();
}
}
COM: <s> rolls back any uncommited transaction this session may have open </s>
|
funcom_train/46086396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateTabText(Feed context) {
int i = 0;
for (Iterator<Entrie> iterator = context.getEntries().iterator(); iterator.hasNext();) {
Entrie sheet = (Entrie) iterator.next();
bar.addTab(sheet.getTitle());
sheetsUrls.put(sheet.getTitle(), getBootstrapSpreadsheet(i));
i++;
}
if(bar.getTabCount() > 0)
bar.selectTab(0);
}
COM: <s> this function is called when sheets title are retrieved </s>
|
funcom_train/9238089 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toLowerCase(final String input) {
final char[] result = input.toCharArray();
for (int i = 0; i < input.length(); ++i) {
if (result[i] >= 0 && result[i] < lowercase.length) {
result[i] = lowercase[result[i]];
} else {
result[i] = result[i];
}
}
return new String(result);
}
COM: <s> get the lowercase version of a string for this server </s>
|
funcom_train/12836497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AMSAgentDescription createAMSAgentDescription(final OpalAgent anAgent) {
final String state = anAgent.getStateString() ;
final AMSAgentDescription desc =
new AMSAgentDescription(
new AgentIdentifier(
new Parameter[] {
new GenericParameter("name", new GenericWord(anAgent.getAgentName().toString())) }),
anAgent.getPlatform().getName(),
state);
return desc;
}
COM: <s> utility function to create an amsagent description </s>
|
funcom_train/45836512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getUsersBaseDN(String username) {
try {
findUserDN(username, baseDN);
return baseDN;
}
catch (Exception e) {
try {
if (alternateBaseDN != null) {
findUserDN(username, alternateBaseDN);
return alternateBaseDN;
}
}
catch (Exception ex) {
Log.debug(ex.getMessage(), ex);
}
}
return null;
}
COM: <s> returns the base dn for the given username </s>
|
funcom_train/50242947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Iterator getExtras() {
// SeatPreference targetSeat =
// new SeatPreference(SeatPreference.NAME2_BUMP);
// return selectParticipantsByFirstSeatingChoice(this.participants,targetSeat);
return new Iterator() {
public boolean hasNext() {
return false;
}
public Object next() {
throw new NoSuchElementException(
"ParticipationForm.getExtras(): deprecated, empty iterator");
}
public void remove() {
throw new UnsupportedOperationException(
"ParticipationForm.getExtras(): deprecated, empty iterator");
}
};
}
COM: <s> returns a read only iterator of extra participants </s>
|
funcom_train/21644642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JCheckBoxMenuItem getOptionsShowRankingCheckBoxMenuItem() {
if (optionsShowRankingCheckBoxMenuItem == null) {
optionsShowRankingCheckBoxMenuItem = new JCheckBoxMenuItem();
optionsShowRankingCheckBoxMenuItem.setText("Ranking Panel");
optionsShowRankingCheckBoxMenuItem.setMnemonic('R');
optionsShowRankingCheckBoxMenuItem.setDisplayedMnemonicIndex(0);
optionsShowRankingCheckBoxMenuItem.addActionListener(eventHandler);
}
return optionsShowRankingCheckBoxMenuItem;
}
COM: <s> return the options show ranking check box menu item </s>
|
funcom_train/28269026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Integer readOctal(){
StringBuffer buffer = new StringBuffer();
while(true){
int c = reader.nextChar();
if(c==-1){
break;
}else{
if(c >= '0' && c <= '7'){
buffer.append((char)c);
}else{
if(isWhitespace((char)c)){
reader.pushback();
break;
}else{
throw new RuntimeException("Invalid octal value!!! Line "+ sourceline);
}
}
}
}
if(buffer.length() > 0){
return new Integer(Integer.parseInt(buffer.toString(),8));
}else{
throw new RuntimeException("Empty octal string!!! Line "+sourceline);
}
}
COM: <s> helper function that converts a character stream from octal to integer </s>
|
funcom_train/27844536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testValueChanged() throws Exception {
ListSelectionEvent event = new ListSelectionEvent(this, 0, 1, true);
_selectionChangeListener.valueChanged(event);
assertFalse(_action.isExecuted());
event = new ListSelectionEvent(this, 0, 1, false);
_selectionChangeListener.valueChanged(event);
assertTrue(_action.isExecuted());
}
COM: <s> method test value changed is testing value changed </s>
|
funcom_train/18938396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void allocate( WorkerEntry chosenWorker ) {
if ( !GridProcessState.UNSTARTED.equals( this.state ) ) {
throw new IllegalResultException( "This replica is already running or has already finished execution",
replicaHandle );
}
this.workerEntry = chosenWorker;
this.replicaAccounting = new GridProcessAccounting(workerEntry.getRequestSpec(),
getWorkerEntry().getWorkerID(), null, workerEntry.getWorkerSpec());
}
COM: <s> marks this code grid process code as running in other words this </s>
|
funcom_train/50248048 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getIndentationString() {
// calculate idention string if tabs should be converted to spaces
if (_prefs.getBoolean(PythonPreferencePage.INSERT_SPACES)) {
int tabAmount = _prefs.getInt(PythonPreferencePage.INSERT_SPACES_AMOUNT);
StringBuffer tabRepresent = new StringBuffer();
while (tabAmount > 0) {
tabRepresent.append(" ");
tabAmount--;
}
return tabRepresent.toString();
}
else
{
return "\t";
}
}
COM: <s> returns the current configured indentation string as defined in the users </s>
|
funcom_train/40519005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
if (files.size() == 0)
return; // don't close nothing
observer.close();
//int[] selected = list.getFocus();
//for (int i = selected.length - 1; i >= 0; i--) {
// files.remove(selected[i]);
//}
//list.close();
}
COM: <s> close all windows belonging to data items selected </s>
|
funcom_train/35846869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void targetAdded(TargetEvent e) {
Object[] addedTargets = e.getAddedTargets();
// we put the targets 'backwards' in the history
// since the first target in the addedTargets array is
// the first one selected.
for (int i = addedTargets.length - 1; i >= 0; i--) {
putInHistory(addedTargets[i]);
}
}
COM: <s> listener for additions of targets to the selected targets </s>
|
funcom_train/40749786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean hasNoDimensions() {
if ((this.startPoint.getLeft().intValue() == this.endPoint.getLeft().intValue())
&& (this.startPoint.getTop().intValue() == this.endPoint.getTop().intValue())){
return true;
} else {
return false;
}
}
COM: <s> returns true if section has no dimensions </s>
|
funcom_train/39220452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNodesList() {
nodesFieldsComboBox.removeAllItems();
ArrayList<Field> al = new ArrayList<Field>();
al.addAll(Guess.getGraph().getNodeSchema().allFields());
Collections.sort(al);
Iterator<Field> it = al.iterator();
while (it.hasNext()) {
Field f = (Field) it.next();
nodesFieldsComboBox.addItem(f);
}
nodesFieldsComboBox.setSelectedIndex(0);
}
COM: <s> fills the combobox of fields for the nodes </s>
|
funcom_train/19101795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean backFire() {
if (backStates.isEmpty()) {
return false;
}
Map old_state = (Map) backStates.lastElement();
setNetState(old_state);
backStates.removeElementAt(backStates.size()-1);
PetriTransition[] transt = getTransitions();
// notifies all transitions of the change
for (int i = 0; i < transt.length; i++){
transt[i].setAttribute("Active", new Boolean(isActive(transt[i])));
}
return true;
}
COM: <s> inherited from petri net interface </s>
|
funcom_train/27960047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int lastIndexOf(Object elem, int index) {
if (index > elementCount - 1)
throw new ArrayIndexOutOfBoundsException(index);
for (int i = index; i>=0; i--) {
if ((elementData[i]==elem) ||
elementData[i].equals(elem)) return i;
}
return -1;
}
COM: <s> returns the index of the first occurence of b elem b when searching </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.