__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
|---|---|---|
funcom_train/10622820
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void processMouseWheel(Point where, long when, int modifiers, int wheelRotation) {
MouseWheelEvent mwe = new MouseWheelEvent(choice, MouseEvent.MOUSE_WHEEL, when,
modifiers, where.x, where.y, 0, false, MouseWheelEvent.WHEEL_UNIT_SCROLL, 1,
wheelRotation);
scrollController.mouseWheelMoved(mwe);
}
COM: <s> mouse wheel event processing by vertical scrollbar </s>
|
funcom_train/22778914
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private JPanel getMainPane() {
if (mainPane == null) {
mainPane = new JPanel();
mainPane.setLayout(new BorderLayout());
mainPane.add(getNamePane(), BorderLayout.NORTH);
mainPane.add(getAnnotationPane(), BorderLayout.CENTER);
mainPane.add(getButtonPane(), BorderLayout.SOUTH);
}
return mainPane;
}
COM: <s> this method initializes j content pane </s>
|
funcom_train/17848661
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setMinimumSize(Dimension dim) {
super.setMinimumSize(dim);
Dimension current = getSize();
if (current.width < dim.width) {
current.width = dim.width;
}
if (current.height < dim.height) {
current.height = dim.height;
}
setSize(current);
}
COM: <s> set the minimum size </s>
|
funcom_train/23352400
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public StringBuilder insert(int offset, char c) {
synchronized (this) {
int newcount = count + 1;
if (newcount > value.length) {
expandCapacity(newcount);
} else if (shared) {
copy();
}
System.arraycopy(value, offset, value, offset + 1, count - offset);
value[offset] = c;
count = newcount;
return this;
}
}
COM: <s> inserts the string representation of the code char code </s>
|
funcom_train/22929377
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testGetInvocation_IndexOutOfBounds() throws Exception {
commandHandler.handleCommand(COMMAND, session);
try {
commandHandler.getInvocation(2);
fail("Expected IndexOutOfBoundsException");
}
catch (IndexOutOfBoundsException expected) {
LOG.info("Expected: " + expected);
}
}
COM: <s> test the get invocation method passing in an invalid index </s>
|
funcom_train/45830394
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void notifyListeners (int eventType, Event event) {
DefaultRSWTApplication application= DefaultRSWTApplication.getApplication();
callClient("notifyListeners",
new String[] { Integer.class.getName(), PeerEvent.class.getName() },
new Object[] { new Integer(eventType), DefaultRSWTApplication.createPeerEvent(event) });
}
COM: <s> notifies all of the receivers listeners for events </s>
|
funcom_train/49350037
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public JButton getFinishButton() {
if (finishButton == null) {
finishButton = new JButton();
finishButton.setText(resource.getString("finish"));
finishButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
NewGraphicWizardController controller = NewGraphicWizardController.instance();
controller.doFinish();
}
});
}
return finishButton;
}
COM: <s> this method initializes finish button </s>
|
funcom_train/40690782
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testReplaceValuesRandomAccess() {
Multimap<String, Integer> multimap = create();
multimap.put("foo", 1);
multimap.put("foo", 3);
assertTrue(multimap.replaceValues("foo", Arrays.asList(2, 4))
instanceof RandomAccess);
assertTrue(multimap.replaceValues("bar", Arrays.asList(2, 4))
instanceof RandomAccess);
}
COM: <s> confirm that replace values returns a list implementing random access </s>
|
funcom_train/1834011
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private Language getLanguageForLocalizedName(final String languageName) {
for (final Language element : Language.LANGUAGES) {
if (NO_MOTHER_TONGUE.equals(languageName)) {
return Language.DEMO;
}
if (languageName.equals(messages.getString(element.getShortName()))) {
return element;
}
}
return null;
}
COM: <s> get the language object for the given localized language name </s>
|
funcom_train/51546848
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public ContactItem getContactItemByJID(String bareJID) {
final Iterator iter = new ArrayList(contactItems).iterator();
while (iter.hasNext()) {
ContactItem item = (ContactItem)iter.next();
if (item.getFullJID().equals(bareJID)) {
return item;
}
}
return null;
}
COM: <s> returns a code contact item code by the users bare bare jid </s>
|
funcom_train/35167684
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setChartData(String name, String header, double[] data) {
Chart nc = null;
ListIterator<Chart> i = charts.listIterator();
while (i.hasNext()) {
Chart t = i.next();
if (t.name.equals(name)) {
nc = t;
break;
}
}
if (nc != null) {
nc.addData(header, data);
} else {
nc = new Chart(name);
nc.addData(header, data);
charts.add(nc);
}
}
COM: <s> makes report parser to process named chart and puts there one data </s>
|
funcom_train/25648360
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void removeGraphEditor(int index) {
this.tabPanel.remove(index);
if ((index - 1) > -1 && (index - 1) < titleUpdaters.size()) {
EventQueue.removeListener(titleUpdaters.get(index - 1));
titleUpdaters.remove(index - 1);
}
}
COM: <s> remove a graph editor tab on given index </s>
|
funcom_train/21772222
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String getCachedTermJSON(String ont_url) throws IOException{
String json = null;
init();
OntResource requested_ont = ct.getOntResource(ont_url);
String local_json = "";
local_json = requested_ont.getProperty(termFile).getString();
if(local_json!=null){
BufferedReader read = new BufferedReader(new FileReader(local_json));
if(read==null){
return json;
}
String line = read.readLine();
json="";
while(line!=null){
json+=line;
line = read.readLine();
}
}
closeConnection();
return json;
}
COM: <s> looks for a cached json term file and returns its contents </s>
|
funcom_train/47998532
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void startGameLobbyPoll() {
// cleaning the model
this.gameLobbyModel.clearGameLobbyModel();
// Prepare timer and task
this.gameLobbyPollTask = new GameLobbyPollTask();
this.gameLobbyPollTimer = new Timer();
// Schedule the task to be executed regulary
this.gameLobbyPollTimer.scheduleAtFixedRate(gameLobbyPollTask, 500, 500);
}
COM: <s> starts the poll for new game lobby data </s>
|
funcom_train/21611005
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testGraphValidation1() {
final String program =
"InvalidGraph():<'sub', Print('A label'), <'a' , x, 'b'> >;";
try {
interpreter.process(program);
fail("Expected exception.");
} catch (InterpreterException ie) {
assertTrue("Unespected exception.", ie.getCause() instanceof ValidationException);
}
}
COM: <s> test a graph validation version 1 </s>
|
funcom_train/21778214
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String getRuleViewSetKey() {
((PartialPlanViewSet) viewSet).incrRuleFrameCnt();
return new String( ViewConstants.RULE_INSTANCE_VIEW.replaceAll( " ", "") + "-" +
((PartialPlanViewSet) viewSet).getRuleFrameCnt());
}
COM: <s> code get rule view set key code </s>
|
funcom_train/10787847
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void onTradeCommitted(ServiceEvent.TradeCommitted event) {
Trader trader = session.getTrader();
Trade trade = event.getPayload();
if ((trader.equals(trade.getSeller()) && _type == Ask.class)
|| (trader.equals(trade.getBuyer()) && _type == Bid.class)) {
insert(trade);
}
}
COM: <s> on receipt of the event determines if it is relevant for this instance </s>
|
funcom_train/16394952
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void applyTemplate(UpcallCommandEntry entry, UpcallInteractionEnterOrEditForm form) {
form.setTemplateId(entry.getId());
// overwrite input fields with template information
form.setJndiName(entry.getJndiName());
form.setParameter1(entry.getParameter1());
form.setParameter2(entry.getParameter2());
form.setParameter3(entry.getParameter3());
form.setParameter4(entry.getParameter4());
form.setParameter5(entry.getParameter5());
}
COM: <s> fills form with values from template </s>
|
funcom_train/555261
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void pushSelectedSnapshots() {
Hashtable<String, Snapshot> selectedSnapshots = Snapshot.getSelectedSnapshots();
if (selectedSnapshots == null) {
return;
}
Iterator<Snapshot> it = selectedSnapshots.values().iterator();
int i = 0;
SnapshotDetailTabbedPane tabbedPane = SnapshotDetailTabbedPane.getInstance();
while (it.hasNext()) {
Snapshot nextSnapshot = it.next();
tabbedPane.addSnapshotDetail(nextSnapshot);
i++;
}
}
COM: <s> displays on screen the selected state of snapshots contained in this </s>
|
funcom_train/47105908
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private JMenuItem getJMenuItemWeapon10() {
JMenuItem menuItem = new JMenuItem();
menuItem.setText(Weapon.W_10.getItemName());
menuItem.setEnabled(false);
menuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
setPlrReadiedWeapon(Weapon.W_10);
}
});
return menuItem;
}
COM: <s> creates the eleventh choice for the weapon menu </s>
|
funcom_train/3324490
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected boolean validateEditorInputState() {
ITextEditor editor = getTextEditor();
if (editor instanceof ITextEditorExtension2)
return ((ITextEditorExtension2) editor).validateEditorInputState();
else if (editor instanceof ITextEditorExtension)
return !((ITextEditorExtension) editor).isEditorInputReadOnly();
else if (editor != null)
return editor.isEditable();
else
return false;
}
COM: <s> checks and validates the editors modifiable state </s>
|
funcom_train/8273240
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("AuthUser".equals(portName)) {
setAuthUserEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/2546724
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String qdel(int jobId) throws InvalidCredentialsException, GridEngineActionFailedException, Exception {
String cmd = SgeCommandConstants.COMMAND_QDEL + SgeCommandConstants.COMMAND_SEPERATOR + jobId;
SecureCommandTunnel tunnel = new SecureCommandTunnel(credentials, cmd);
return tunnel.execute();
}
COM: <s> remove a job from the queue </s>
|
funcom_train/45640034
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void update() throws Exception {
if (installScript != null) {
executeInstallScript();
} else {
LocalSessionFactoryBean sessionFactoryBean = getLocalSessionFactory();
try {
sessionFactoryBean.updateDatabaseSchema();
} catch (Exception e) {
log.error(e, e);
}
}
}
COM: <s> updates the database schema </s>
|
funcom_train/50153157
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: static private void task_change(int tasknum) {
try {
// get the task from the data model
Task task = TaskModel.getReference().getTask(tasknum);
if (task == null)
return;
// display the task editor
new TaskView(task, TaskView.Action.CHANGE, null).showView();
} catch (Exception e) {
Errmsg.getErrorHandler().errmsg(e);
}
}
COM: <s> open the task editor to edit a task </s>
|
funcom_train/3902532
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void addMaxtimeallowedPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DocumentRoot_maxtimeallowed_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DocumentRoot_maxtimeallowed_feature", "_UI_DocumentRoot_type"),
AdlcpRootv1p2Package.Literals.DOCUMENT_ROOT__MAXTIMEALLOWED,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the maxtimeallowed feature </s>
|
funcom_train/3447424
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private int percolateUp(int cur, int o) {
int i = cur;
while ((i > TOP)
&& (comp.compare(heap.get(parent(i)), o) > 0)) {
int parentElt = heap.get(parent(i));
heap.set(i, parentElt);
i = parent(i);
}
// place object in heap at appropriate place
heap.set(i, o);
return i;
}
COM: <s> moves the element code o code at position code cur code </s>
|
funcom_train/23898410
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void addColumn(String headerLabel) {
if (!columnExists(headerLabel)) {
TableColumn col = new TableColumn(model.getColumnCount());
// Ensure that auto-create is off
if (this.getAutoCreateColumnsFromModel()) {
throw new IllegalStateException();
}
col.setHeaderValue(headerLabel);
this.addColumn(col);
model.addColumn(headerLabel.toString());
}
}
COM: <s> add an attribute column </s>
|
funcom_train/35026647
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void readConfig(Config config, String configPath, String childElementName, Class<T> childElementClass) {
super.readConfig(config, configPath);
List<T> childStates = ConfigurableFactory.newListFromConfig(config, configPath + "/" + childElementName, childElementClass);
for (T state : childStates) {
StateHelper.registerState(state);
this.attachChild(state);
}
}
COM: <s> configures this object from config </s>
|
funcom_train/51656149
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setClipping (Path path) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (path != null && path.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
setClipping(0);
if (path != null) {
initGdip();
int mode = OS.GetPolyFillMode(handle) == OS.WINDING ? Gdip.FillModeWinding : Gdip.FillModeAlternate;
Gdip.GraphicsPath_SetFillMode(path.handle, mode);
Gdip.Graphics_SetClip(data.gdipGraphics, path.handle);
}
}
COM: <s> sets the area of the receiver which can be changed </s>
|
funcom_train/15608094
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public List getModelsForCriterion(FeatureCriterion lFeatureCriterion) {
mFeatureCriterion = lFeatureCriterion;
// Construct and invoke an event handler which does a SAX parse and
// reacts to events generated by the input file.
GenomicsExchangeHandler eventHandler = new GenomicsExchangeHandler( new LinkedListElementStacker(),
(FeatureHandlerBase)this);
eventHandler.loadFile(mSource);
return mReturnList;
} // End method
COM: <s> returns a feature model given criteria to match </s>
|
funcom_train/26259701
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testEmbeddedCollectionFromChildrenDirectCRUD() throws Exception {
execute("CRUD.new");
setValue("id","FATHER");
setValue("description", "THE FATHER");
execute("Collection.new", "viewObject=xava_view_children");
setValue("id", "JOHN");
setValue("description", "THIS IS JOHN");
execute("Collection.save");
assertNoErrors();
assertCollectionRowCount("children", 1);
execute("Collection.removeSelected", "row=0,viewObject=xava_view_children");
}
COM: <s> tests if you can add children directly when having a new </s>
|
funcom_train/38509368
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void writeInt( int x ) throws IOException {
byte[] b = new byte[4];
for(int i=0; i<4; ++i ) {
b[i] = (byte)(x & 0xff); // BigEndian
x = x >> 8;
}
int ts = totalSize;
write( b, 0, 4 );
totalSize = ts;
}
COM: <s> write an int to page but not as part of the blob </s>
|
funcom_train/26282644
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Dimension minimumLayoutSize(Container container) {
// 3 * thickness case makes sure we have room for center component
int side = Math.max(2 * thickness + length, 3 * thickness);
// add in room for insets
Insets insets = container.getInsets();
return new Dimension(insets.left + side + insets.right,
insets.top + side + insets.bottom);
}
COM: <s> returns the minimum size of this layout which is the smallest dimension </s>
|
funcom_train/19353808
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public OWLOntology asOWLOntology(URI uri) throws OWLOntologyCreationException, OWLOntologyChangeException {
OWLOntology newOnt = baseOntologyManager.createOntology(uri);
LinkedList<AddAxiom> addaxs = new LinkedList<AddAxiom>();
for (OWLAxiom ax : axioms) {
addaxs.add(new AddAxiom(newOnt, ax));
}
baseOntologyManager.applyChanges(addaxs);
return newOnt;
}
COM: <s> returns this module as a new ontology </s>
|
funcom_train/17046838
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int read(DataInput dataInput) throws IOException {
int count = dataInput.readInt();
final long availableBytes = Runtime.getRuntime().freeMemory();
if (availableBytes > count) {
for (int i = 0; i < count; ++i) {
addByte(dataInput.readByte());
}
}
else {
// not enough memory. report the magnitude of the bytes.
count = -count;
}
return count;
}
COM: <s> read the integer count and count bytes from the data input adding to </s>
|
funcom_train/2582098
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public RegularTimePeriod previous() {
Second result = null;
if (this.second != FIRST_SECOND_IN_MINUTE) {
result = new Second(this.second - 1, getMinute());
}
else {
Minute previous = (Minute) getMinute().previous();
if (previous != null) {
result = new Second(LAST_SECOND_IN_MINUTE, previous);
}
}
return result;
}
COM: <s> returns the second preceding this one </s>
|
funcom_train/20742116
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String cancel() {
if (newTaskBean.getPageName() != null) {
try {
m_wikiService.deletePage(newTaskBean.getPageName());
} catch (EmForgeException ex) {
logger.error(getLocalizedMessage("cannotRemoveTemporaryPage") + " " + newTaskBean.getPageName(), ex);
}
}
clean();
newTaskBean.setStep(STEP_PROJECT_AND_WORKFLOW);
return "tasks";
}
COM: <s> clear data in the form and go back to main page </s>
|
funcom_train/10505874
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void mergeDependencies(DependencyDescriptor[] dependencies) {
DefaultModuleDescriptor md = getMd();
for (int i = 0; i < dependencies.length; i++) {
DependencyDescriptor dependencyDescriptor = dependencies[i];
Message.debug("Merging dependency with: "
+ dependencyDescriptor.getDependencyRevisionId().toString());
md.addDependency(dependencyDescriptor);
}
}
COM: <s> describes how dependencies should be inherited </s>
|
funcom_train/47279752
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean doesResultTableExist() throws SQLObjectException {
MatchMakerSession session = getSession();
if (session == null) {
throw new IllegalStateException("Session has not been setup " +
"for the project, you will need session to check the result table");
}
return session.tableExists(getResultTableSPDatasource(),
getResultTableCatalog(), getResultTableSchema(),
getResultTableName());
}
COM: <s> returns true if the current result table of this project exists </s>
|
funcom_train/2558328
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void ensureCapacity(int min) {
if(buf.length < min) {
int size = buf.length * 2;
int max = Math.max(min, size);
char[] temp = new char[max];
System.arraycopy(buf, 0, temp, 0, count);
buf = temp;
}
}
COM: <s> this ensure that there is enough space in the buffer to allow </s>
|
funcom_train/49145814
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Date getCourseSeriesStartDate() {
Date ret = null;
if (person.getCourseSeries() != null) {
Collection<CourseSeries> courseSeries = person.getCourseSeries();
for (CourseSeries cs : courseSeries) {
if (ret == null) {
ret = cs.getValidFrom();
} else if (cs.getValidFrom().after(ret)) {
ret = cs.getValidFrom();
}
}
}
return ret;
}
COM: <s> gets the most recent date of a course series </s>
|
funcom_train/35751508
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(new BorderLayout());
jContentPane.add(getJPanelNorth(), java.awt.BorderLayout.NORTH);
jContentPane.add(getJPanelSouth(), java.awt.BorderLayout.SOUTH);
jContentPane.add(getJPanelCenter(), java.awt.BorderLayout.CENTER);
}
return jContentPane;
}
COM: <s> this method initializes j content pane </s>
|
funcom_train/27740561
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public long getFileSize() {
if (fileSize == -2) {
List<String> lengthValues = getList(Option.XL);
long size = -1;
for (String value : lengthValues) {
try {
size = Long.parseLong(value);
} catch (NumberFormatException nfe) {
// ignore
}
}
fileSize = size >= 0 ? size : -1;
}
return fileSize;
}
COM: <s> returns the file size of the file of this magnet </s>
|
funcom_train/2839877
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void replaceAll(StringBuffer text, String source, String target) {
int index = 0;
while((index = text.toString().indexOf(source, index)) != -1)
{
text.replace(index, index+source.length(), target);
index += target.length();
}
}
COM: <s> replace occurrences of source in text with target </s>
|
funcom_train/41837311
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private AlertDialog getAlertDialog() {
AlertDialog.Builder builder = new AlertDialog.Builder(this.context);
builder.setTitle(R.string.no_radar_title);
builder.setIcon(android.R.drawable.ic_dialog_info);
String[] items = { this.context.getString(R.string.download_radar_app),
this.context.getString(R.string.search_for_other_radar_app) };
builder.setItems(items, this);
builder.setNegativeButton(R.string.cancel, this);
AlertDialog alert = builder.create();
return alert;
}
COM: <s> return the alert dialog </s>
|
funcom_train/2625376
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private boolean matches(ByteOrderMark bom) {
if (bom.length() != fbLength) {
return false;
}
for (int i = 0; i < bom.length(); i++) {
if (bom.get(i) != firstBytes[i]) {
return false;
}
}
return true;
}
COM: <s> check if the bytes match a bom </s>
|
funcom_train/19268235
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void show(int millis) {
final Timer timer = new Timer(millis, new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
logger.fine("Closing Splashscreen");
dispose();
}
});
super.show();
timer.setRepeats(false);
timer.start();
}
COM: <s> show the splash screen for a set number of millis </s>
|
funcom_train/18241842
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void handleColorChange() {
// This log message is going to have to be removed soon, it's
// really going to slow things down...
Log.log(Log.INFO, new Throwable(),
ResourceUtil.getMessage(TDBAssemblyConsensusSegmentPanel.class, "some_color_changed"));
this.repaint();
}
COM: <s> utility method to repaint ourselves on a color change </s>
|
funcom_train/46716816
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void populate() {
String scount = Settings.get("watch.count");
if(scount==null){
Settings.set("watch.count","0");
return;
}
int count = Integer.parseInt(scount);
for(int i=0; i<count; i++){
model.addElement(Settings.get("watch."+i));
}
}
COM: <s> load existing watch folders </s>
|
funcom_train/26201427
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void curveto(int x1,int y1,int x2,int y2,int x3,int y3) {
newPath();
pw.println(cxy(x1,y1)+cxy(x2,y2)+cxy(x3,y3)+"c");
lx=x3;
ly=y3;
}
COM: <s> this extension appends a bezier curve to the path </s>
|
funcom_train/2286751
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean isLockableBy(CmsUser user) {
if (getSystemLock().isPublish()) {
return false;
}
if (getEditionLock().isUnlocked() && getSystemLock().isUnlocked()) {
return true;
}
return getEditionLock().isOwnedBy(user);
}
COM: <s> checks if a resource can be locked by a user </s>
|
funcom_train/20885514
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public XmlDataTypeDefaultNameRegistry getDataTypeDefaultNameRegistry() {
if (this.dataTypeDefaultNameRegistry == null) {
XmlDataTypeDefaultNameRegistry initialRegistry = InitialConfiguration.get(
DATA_TYPE_DEFAULT_NAME_REGISTRY, DEFAULT_DATA_TYPE_DEFAULT_NAME_REGISTRY_PROVIDER);
this.dataTypeDefaultNameRegistry = initialRegistry.createCopy();
}
return this.dataTypeDefaultNameRegistry;
}
COM: <s> returns the data type default name registry to be used </s>
|
funcom_train/31250303
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setInvisible(boolean invis) {
int index = getSelectedIndex();
String line;
if (invis) {
conn.doMode(Settings.getUsername(), "+i");
line = "# You are now hidden from users in your Buddy List.";
isInvisible = true;
} else {
conn.doMode(Settings.getUsername(), "-i");
line = "# You are now visible to users in your Buddy List.";
isInvisible = false;
}
if (index >= 0)
updateTab(index, line, Settings.getServerColor());
}
COM: <s> sets our invisibility which determines whether those in the buddy list </s>
|
funcom_train/10513299
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void deleteAllFiles(File aFile) {
if (aFile.isDirectory()) {
File[] someFiles = aFile.listFiles();
for (int i = 0; i < someFiles.length; i++) {
deleteAllFiles(someFiles[i]);
}
}
aFile.delete();
}
COM: <s> delete a file </s>
|
funcom_train/4067842
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Location metersToDegrees(Location loc) {
loc = (Location.Location2D)loc;
return new Location.Location2D((float)(loc.getX()*(METERS_PER_DEGREE))+minX,
(float)(loc.getY()*(METERS_PER_DEGREE))+minY);
}
COM: <s> changes coordinates from 0 based lat long to coordinates on this map </s>
|
funcom_train/26226440
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void refExceptionHandler(Token exTypeAndName, Token action) {
super.refExceptionHandler(exTypeAndName, action);
if (currentExceptionSpec == null) {
Utils.panic("exception handler processing internal error");
}
currentExceptionSpec.addHandler(new ExceptionHandler(exTypeAndName, action));
}
COM: <s> add an exception handler to an exception spec </s>
|
funcom_train/25056520
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void addFile(File file) {
if (file.isDirectory()) {
File[] fastaFiles = file.listFiles();
for (File fastaFile : fastaFiles) {
if (fastaFile.isDirectory()) {
addFile(fastaFile);
}
else {
filterDmaFile(fastaFile);
}
}
}
else {
filterDmaFile(file);
}
}
COM: <s> recursively adds files that matches provided extensions in the directory </s>
|
funcom_train/32347782
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testNoCity() throws ParseException {
String s = "Date, November 5, Headcount, 250, "
+ "DollarsPerHead, 9.95, " + "HasSite, false";
ReservationBuilder b = new ForgivingBuilder();
new ReservationParser(b).parse(s);
try {
Reservation r = b.build();// should throw an exception
fail("Should throw a BuilderException");
} catch (BuilderException expected) {
}
}
COM: <s> test that we disallow a missing city </s>
|
funcom_train/22356561
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void propertyChange(PropertyChangeEvent p1) {
boolean enabled = ((Boolean) p1.getNewValue()).booleanValue();
if (enabled) {
putValue(Action.NAME, name + ": " + undo.getRedoPresentationName());
} else {
putValue(Action.NAME, name);
}
setEnabled(enabled);
}
COM: <s> updates the state of the menu item </s>
|
funcom_train/44158092
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testWalkVisitorError() {
String[] names = {
"/one", "/one/ERROR", "/one/ERROR/two", "/one/three"
};
LinkedObject root = createObjects(names);
m_processor.expect(
new Notification("markRed", "LinkedObject /"),
new Notification("markRed", "LinkedObject /one"),
new Notification("visit", "LinkedObject /one/three")
);
m_walker.run(root);
m_processor.validateAnyOrder();
}
COM: <s> the visitor declares an object in error </s>
|
funcom_train/21413951
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void createPackageContents() {
if (isCreated) return;
isCreated = true;
// Create classes and their features
itemEClass = createEClass(ITEM);
createEAttribute(itemEClass, ITEM__PUBLICATION_DATE);
bookEClass = createEClass(BOOK);
createEAttribute(bookEClass, BOOK__TITLE);
createEAttribute(bookEClass, BOOK__PAGES);
createEAttribute(bookEClass, BOOK__CATEGORY);
createEReference(bookEClass, BOOK__AUTHOR);
// Create enums
bookCategoryEEnum = createEEnum(BOOK_CATEGORY);
}
COM: <s> creates the meta model objects for the package </s>
|
funcom_train/170601
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void calculateOffset(int z, Insets inset) {
int numCr = crSpec[z].length;
crOffset[z] = new int[numCr + 1];
crOffset[z][0] = (z == C) ? inset.left : inset.top;
for (int counter = 0; counter < numCr; counter++) {
crOffset[z][counter + 1] = crOffset[z][counter]
+ crSize[z][counter];
}
}
COM: <s> calculates the offset of each cr </s>
|
funcom_train/18244073
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void setModel() throws SeqdataException {
try {
QualityClassModel.setModel(this.model);
this.model = (IQualityClassModel) QualityClassModel.getModel().clone();
}
catch (CloneNotSupportedException cns) {
String message = ResourceUtil.getResource(QualityClassDialog.class, "text.caught_clone_exception");
throw new SeqdataException(message);
}
}
COM: <s> make our current copy of the model the current model </s>
|
funcom_train/18790381
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setWorkMobileNumber(PhoneNumber workMobileNumber) {
if (((this.workMobileNumber != null) && !this.workMobileNumber.equals(workMobileNumber)) ||
((this.workMobileNumber == null) && (workMobileNumber != null))) {
this.workMobileNumber = workMobileNumber;
setModified(true);
}
}
COM: <s> sets the new value of the simple property work mobile number </s>
|
funcom_train/1338277
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Line getLineFor(LineSegment ls) {
// trace forward and back
Set<LineSegment> visited = new HashSet<LineSegment>();
Line front = new Line();
trace(front, ls.p1, ls, visited);
Collections.reverse(front.getPath());
trace(front, ls.p2, ls, visited);
return front;
}
COM: <s> every line segment is part of a single line </s>
|
funcom_train/13427337
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void makeLayout() {
this.guiElementsContainer.add(this.slider);
this.guiElementsContainer.add(this.vertexSelector);
this.guiElementsContainer.add(this.resetViewButton);
this.guiElementsContainer.add(this.displayEdgesCheckBox);
this.setLayout(new BorderLayout());
this.add(this.graphDisplay, BorderLayout.CENTER);
this.add(this.guiElementsContainer, BorderLayout.SOUTH);
}
COM: <s> builds the layout of this gui </s>
|
funcom_train/3026875
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void add(FileSummary summary, LinkedList list) {
Iterator iter = summary.getTypes();
if (iter != null) {
while (iter.hasNext()) {
TypeSummary typeSummary = (TypeSummary) iter.next();
if (isIncluded(typeSummary)) {
list.add(typeSummary.getName());
}
}
}
}
COM: <s> adds the type in a certain file </s>
|
funcom_train/18481417
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setCombineAlphaFunction2(CombineColorFunction combine_alpha_function2) {
if (combine_alpha_function2 != this.combine_alpha_function2) {
CombineColorFunction old = this.combine_alpha_function2 ;
this.combine_alpha_function2 = combine_alpha_function2 ;
notifyChanged(COMBINEALPHAFUNCTION2,old,combine_alpha_function2) ;
}
}
COM: <s> sets the combinefunction for the alpha component for source 2 </s>
|
funcom_train/19431979
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setMissingSuit(final Player player, final Suit suit) {
for (Rank rank : Rank.values()) {
if (rank != Rank.JACK || GameType.NULL.equals(getGameType()) || GameType.RAMSCH.equals(getGameType())) {
possiblePlayerCards.get(player).remove(Card.getCard(suit, rank));
}
}
}
COM: <s> adjusts the knowledge when a player has not followed a suit </s>
|
funcom_train/41110131
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private String normalizeRequestParameters(List<QParameter> parameters) {
StringBuffer sb = new StringBuffer();
QParameter p = null;
for (int i = 0, size = parameters.size(); i < size; i++) {
p = parameters.get(i);
sb.append(p.mName);
sb.append("=");
sb.append(p.mValue);
if (i < size - 1) {
sb.append("&");
}
}
return sb.toString();
}
COM: <s> normalizes the request parameters according to the spec </s>
|
funcom_train/26411488
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void removeDeadFiles() {
for (Iterator i = sourceFiles.keySet().iterator(); i.hasNext(); ) {
String shortFileName = (String)i.next();
File absoluteFile =
new File(diskPath + File.separator + shortFileName);
if (!absoluteFile.exists())
sourceFiles.remove(shortFileName);
}
}
COM: <s> iterate over the files in the source files set removing </s>
|
funcom_train/32114580
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testParseParamComments() throws Exception {
JavaDoc javaDoc = new JavaDoc("here is a method\n@param param1 param1 comment\n@param param2\nparam2 comment");
HashMap<String,String> map = DecoratedExecutableDeclaration.parseParamComments(javaDoc);
assertEquals("param1 comment", map.get("param1"));
assertEquals("param2 comment", map.get("param2"));
}
COM: <s> tests parsing param comments </s>
|
funcom_train/21879566
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Object execute() throws Exception {
resultsList = new ArrayList();
this.processContext();
Object a = go();
if (a != null) {
resultsList.add(a);
}
ProcessResult p = new ProcessResultBase(resultsList);
p.setAggregate(true);
return p;
}
COM: <s> execute process bean logic </s>
|
funcom_train/51072325
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public TreeSet getPermissions(String username){
try{
Collection permissions = ServiceLocator.getAuthorizationCheckerLocalHome().create().getUserPermissions(username);
TreeSet result = new TreeSet();
for (Iterator i=permissions.iterator();i.hasNext();){
result.add( ((PermissionLocal)i.next()).getPermissionIdentifier() );
}
return result;
} catch ( Exception e ) {
e.printStackTrace();
return null;
}
}
COM: <s> retrieves a treeset with permissions </s>
|
funcom_train/2610214
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void triggerMediaEstablished(PayloadType bestPt) {
ArrayList listeners = getListenersList();
Iterator iter = listeners.iterator();
while (iter.hasNext()) {
JingleListener li = (JingleListener) iter.next();
if (li instanceof JingleMediaListener) {
JingleMediaListener mli = (JingleMediaListener) li;
mli.mediaEstablished(bestPt);
}
}
}
COM: <s> trigger a session established event </s>
|
funcom_train/14520491
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Collection getAdminEntityObjects() {
ArrayList returnval = new ArrayList();
Iterator i = getAdminEntities().iterator();
while (i.hasNext()) {
AdminEntityDataLocal ae = (AdminEntityDataLocal) i.next();
returnval.add(ae.getAdminEntity());
}
return returnval;
} // getAdminEntityObjects
COM: <s> returns all the adminentities as collection of admin entity </s>
|
funcom_train/32113937
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void decreaseHitPoints(int amount) {
this.hitPoints -= amount;
if (hitPoints <= 0) {
fallen = true;
if (player instanceof HumanPlayer) {
GuiMain gui = ((HumanPlayer)player).getControllerGui();
gui.showPlayerData();
JOptionPane.showMessageDialog(gui, getName()+" is dead...\n\nPress OK to quit.", "", JOptionPane.OK_OPTION);
System.exit(0);
}
}
}
COM: <s> decrease the hit points </s>
|
funcom_train/13491236
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Object perform(Term[] parameter,Session session) throws IllegalArgumentException, UnsupportedOperationException {
boolean result = false;
try {
Object obj = parameter[0].resolve (session);
if (obj!= null) type.isAssignableFrom(obj.getClass());
} catch(Exception x) {
throw new IllegalArgumentException ();
}
return Boolean.valueOf(false);
}
COM: <s> perform the function using an array of terms as parameters </s>
|
funcom_train/22945766
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean isFirstNormalDistrbution() {
KolmogorovTest kt = new KolmogorovTest(this.a, new Normal());
//System.out.println("normal a "+kt.getTestStatistic());
//System.out.println("normal a "+kt.getSP());
return kt.getSP() >= 0.05;
}
COM: <s> test data if is normal distribution </s>
|
funcom_train/24357145
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected int getCap(int penStyle) {
switch (penStyle & 0xF00) {
case EMFConstants.PS_ENDCAP_ROUND:
return BasicStroke.CAP_ROUND;
case EMFConstants.PS_ENDCAP_SQUARE:
return BasicStroke.CAP_SQUARE;
case EMFConstants.PS_ENDCAP_FLAT:
return BasicStroke.CAP_BUTT;
default:
logger.warning("got unsupported pen style " + penStyle);
return BasicStroke.CAP_ROUND;
}
}
COM: <s> returns a basic stroke join for an emf pen style </s>
|
funcom_train/29768664
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void save(PrintWriter writer) {
Iterator<Line> it = this.lines.iterator();
while (it.hasNext()) {
writer.println(((Line) it.next()).toString());
}
if (writer.checkError()) {
throw new IoException(IoErrors.WriterCouldNotFlushProperly);
}
}
COM: <s> prints this section to a print writer </s>
|
funcom_train/46884345
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String dumpGame() {
StringBuffer result = new StringBuffer();
for (int i = 1; i < ply; i++) {
History hist = (History) history.get(i);
result.append(Move.toString(hist.lastMove));
result.append(" ");
}
result.append(Move.toString(lastMove));
return result.toString();
}
COM: <s> dump a game </s>
|
funcom_train/24122874
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private StringBuilder makeWarning(final TNode shadowedNode) {
StringBuilder warning = new StringBuilder();
warning.append("in specification ");
appendSpecification(warning, fNativeFunctions.get(shadowedNode.fId));
warning.append(" the symbol ");
warning.append(shadowedNode.fNodeName.toUpperCase());
warning.append(" is shadowed by ");
return warning;
}
COM: <s> creates the prefix of the warning text for shadowing warnings </s>
|
funcom_train/40059058
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void showPower() {
Power p = (Power) powerList.getSelectedValue();
statusBar.setText("Getting Compendium Entry for " + p.getName());
this.validate();
// only now should we look up the ID for the power.
p.setId(CompendiumSearcher.getPowerID(p.getName()));
if (p.getId() != 0) {
PowerFrame pf = new PowerFrame(p);
pf.setVisible(true);
}
statusBar.setText("Done");
}
COM: <s> pop up a frame with the power description in it </s>
|
funcom_train/17678139
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void appendPrimaryKeyConstraint(JdbcTable t, CharBuf s) {
s.append("constraint ");
s.append(t.pkConstraintName);
s.append(" primary key (");
appendColumnNameList(t.pk, s);
s.append(')');
}
COM: <s> add the primary key constraint part of a create table statement to s </s>
|
funcom_train/9994136
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testCommandAction() throws AssertionFailedException {
System.out.println("commandAction");
PrefsMenu instance = null;
Command c_1 = null;
Displayable d_1 = null;
instance.commandAction(c_1, d_1);
fail("The test case is a prototype.");
}
COM: <s> test of test command action method of class prefs menu </s>
|
funcom_train/13995501
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testElementAggregation() throws Exception {
// default
assertAggregationSize(1, oa1.getObjectCs());
// create
objectCManager.createObjectC(oa1);
assertAggregationSize(2, oa1.getObjectCs());
// remove
objectCManager.remove(oc1);
assertAggregationSize(1, oa1.getObjectCs());
// change
((ObjectC) oa1.getObjectCs().get(0)).setObjectA(oa2);
assertAggregationSize(0, oa1.getObjectCs());
}
COM: <s> tests the not cached element aggregation </s>
|
funcom_train/8368809
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Command getSwitchAccount() {
if (switchAccount == null) {//GEN-END:|380-getter|0|380-preInit
// write pre-init user code here
switchAccount = new Command("Account wechseln", Command.SCREEN, 1);//GEN-LINE:|380-getter|1|380-postInit
// write post-init user code here
}//GEN-BEGIN:|380-getter|2|
return switchAccount;
}
COM: <s> returns an initiliazed instance of switch account component </s>
|
funcom_train/19381217
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void save() throws SQLException, DataStoreException {
//If extra info is blank then delete the record.
if ((_txtSummary.getValue() == null ||
_txtSummary.getValue().trim().equals(""))) {
deleteSummary();
} else {
_dsSummary.update();
}
_dsKeyWords.update();
}
COM: <s> called after the save button of the summary display box has been pressed </s>
|
funcom_train/44161907
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean update(Component c, double t) {
com.fluendo.jkate.Event ev = kin.ev;
if (ev == null) return false;
if (t >= ev.end_time) return false;
if (t < ev.start_time) {
alive = false;
}
else {
alive = true;
}
Dimension d = c.getSize();
return kin.update(t-ev.start_time, d, d);
}
COM: <s> updates the item at the given time </s>
|
funcom_train/1742841
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void bulge(Geo3D.Mesh mesh) {
pt closest;
/*
* Loop over the interior points (the border points are points
* 0 to this.size() - 1, and the rest up to mesh.size() - 1 are the
* interior points).
*/
for (int i = this.size(); i < mesh.size(); i++) {
Geo3D.pt3 point = mesh.get(i);
pt point2d = p.P(point.x, point.y);
closest = this.project(point2d);
scanSphere(mesh, point2d, point2d.disTo(closest));
}
}
COM: <s> bulge from ball transform in bulge example </s>
|
funcom_train/193988
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean canMark(int x, int y) {
// can't mark a field if game is over...
if (game.getFlow().isOver()) {
return false;
}
// or if it is not running, e.g. paused
if (!game.getFlow().isRunning()) {
return false;
}
switch (getFieldValue(x, y)) {
case OCCUPIED:
return false;
}
return true;
}
COM: <s> checks if the specified field could be target of a mark action </s>
|
funcom_train/48978203
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Constraint findTargetConstraint(Constraint constraint, Assignment assigment) {
// Create a copy of the constraint first.
Constraint copy = IotaCopyUtil.copy(constraint);
// Apply the variable assignment.
IotaVariableSubstituter substituter = new IotaVariableSubstituter(assigment);
substituter.applyTo(copy);
// Try to find a matching target constraint.
for (Constraint target : targetConstraints) {
if (IotaEqualityUtil.equals(copy, target)) return target;
}
// Not found.
return null;
}
COM: <s> find a target constraint that matches the given argument constraint and </s>
|
funcom_train/4918057
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testShortJvmOption() throws Exception {
this.record_Factory(COMMAND, "jvm-option", "jo", true);
this.record_Command(COMMAND, "jvm-option", "jo");
this.record_Argument(COMMAND, "jvm-option", "-Done=a");
this.doTest("-jo -Done=a", COMMAND);
}
COM: <s> ensure can end short options with a jvm option value for a system </s>
|
funcom_train/28423846
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void doIf() throws BuildException {
// execute all nested tasks
for ( Enumeration e = tasks.elements(); e.hasMoreElements(); ) {
Task task = ( Task ) e.nextElement();
if ( task instanceof Breakable ) {
task.perform();
if ( ( ( Breakable ) task ).doBreak() ) {
setBreak( true );
return ;
}
}
else {
task.perform();
}
}
}
COM: <s> do the if part of the if else </s>
|
funcom_train/37421034
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void initialize() {
if(DEBUG)
System.out.println("GoTServer startup....");
queue = new StringQueue();
new ParserFeeder(queue);
try{
this.selector = Selector.open();
this.selectableChannel =
ServerSocketChannel.open();
this.selectableChannel.configureBlocking(false);
InetSocketAddress isa =
new InetSocketAddress(host, this.port );
this.selectableChannel.socket().bind(isa);
System.out.println("Initiating server on "
+isa+" port: "+port);
} catch (IOException ioe) {
System.out.println("Server initialization failed");
ioe.printStackTrace();
System.exit(1);
}
}
COM: <s> this method initializes the server by setting </s>
|
funcom_train/23267848
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testSetFechaVencimiento() {
System.out.println("setFechaVencimiento");
String fechaVencimiento = "";
Amortizaciones instance = new Amortizaciones();
instance.setFechaVencimiento(fechaVencimiento);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set fecha vencimiento method of class capa negocios </s>
|
funcom_train/5341021
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int add(DataLine line, int row) {
TableLine tl = (TableLine)line;
if(allow(tl)) {
return super.add(line, row);
} else {
HIDDEN.add(tl);
_numSources += tl.getLocationCount();
if(_useMetadata)
METADATA.addNew(tl);
return -1;
}
}
COM: <s> determines whether or not this line should be added </s>
|
funcom_train/4357966
|
/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();
// 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>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.