__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/40494785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void destroyApp(boolean unconditional) {
if(timer != null)
timer.cancel();
try {
connMgr.close();
} catch (IOException ex) {
ex.printStackTrace();
}
// try {
// userSettings.updateContacts();
// } catch (RecordStoreException ex) {
// ex.printStackTrace();
// }
}
COM: <s> called to signal the midlet to terminate </s>
|
funcom_train/9824319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clock() {
tempresult = compute(in1.get(this), in2.get(this), width, expSize,
mantSize);
Bout[cnt] = tempresult;
cnt = (cnt+1)%(latency); // use to be mult_delay_depth
out.putL(this, Bout[cnt][0]);
flowError.putL(this, Bout[cnt][1]);
}
COM: <s> clock is used in the behavioral model if there is pipelining </s>
|
funcom_train/50331975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void turnoutPushbuttonLockout(boolean pushButtonLockout) {
// Acela turnouts do not currently support lockout
/*
if (log.isDebugEnabled())
log.debug("Send command to "
+ (pushButtonLockout ? "Lock" : "Unlock")
+ " Pushbutton NT" + _number);
byte[] bl = PushbuttonPacket.pushbuttonPkt(prefix, _number, pushButtonLockout);
AcelaMessage m = AcelaMessage.sendPacketMessage(bl);
AcelaTrafficController.instance().sendAcelaMessage(m, null);
*/
}
COM: <s> send a message to the layout to lock or unlock the turnout pushbuttons </s>
|
funcom_train/45026353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void retrieveAssertData() {
String obj = (String) getObject("myObj");
fail();
assertNotNull("Method-Test object should not be null", obj);
assertTrue("Wrong value for retrieved object", obj.startsWith("My "));
addObjectToAssert("result", obj);
}
COM: <s> test retrieving object on a per method test basis </s>
|
funcom_train/1996948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void source(com.crosslogic.strata.htmlobject.Document aDoc) {
aDoc.textCr("Document aDoc = new Document();");
aDoc.textCr("aDoc.text(" + '"' + "Click button to print..." + '"' + ");");
aDoc.textCr(
"aDoc.add( new PrintButton("
+ '"'
+ "print"
+ '"'
+ ","
+ '"'
+ "Print"
+ '"'
+ ");");
}
COM: <s> p this method generates an html stream showing a java example </s>
|
funcom_train/3423609 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getValue(int index) {
if (index < 0 || index >= fLength) {
return null;
}
if(fAttributes[index].value == null && fAttributes[index].xmlValue != null)
fAttributes[index].value = fAttributes[index].xmlValue.toString();
return fAttributes[index].value;
} // getValue(int):String
COM: <s> look up an attributes value by index </s>
|
funcom_train/35260122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void toggleConnection(int i, int j, boolean symmetric) {
if (connection[i][j] != 0) {
connection[i][j] = 0;
} else {
connection[i][j] = 1;
}
if (symmetric) {
connection[j][i] = connection[i][j];
}
}
COM: <s> toggles state associated with the ith row and jth column </s>
|
funcom_train/25704105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setImageDirectory(String dir) {
if (dir == null) {
dir = System.getProperty("user.dir");
errorReporter.warningReport("No image directory set, using: " + dir, null);
}
if (!dir.endsWith("/"))
imgDir = dir + "/";
else
imgDir = dir;
}
COM: <s> set the directory to load images from </s>
|
funcom_train/4257864 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSchemeSpecificPart() {
String result = null;
if (schemeIndex != -1) {
// Scheme found
if (fragmentIndex != -1) {
// Fragment found
result = this.internalRef.substring(schemeIndex + 1,
fragmentIndex);
} else {
// No fragment found
result = this.internalRef.substring(schemeIndex + 1);
}
}
return result;
}
COM: <s> returns the scheme specific part </s>
|
funcom_train/3814958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addTableData(String propName, String propVal){
DefaultTableModel model = (DefaultTableModel)TableParameter.getModel();
Vector<String> myData = new Vector<String>(2);
myData.add(propName);
myData.add(propVal);
model.insertRow(model.getRowCount(),myData);
TableParameter.revalidate();
}
COM: <s> add a row to the table consisting property value and property name </s>
|
funcom_train/17674979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addToClassStateList(StateEntry e) {
int i = e.state.getClassIndex();
e.classPrev = classStateHead[i];
if (classStateHead[i] != null) {
classStateHead[i].classNext = e;
}
e.classNext = null;
classStateHead[i] = e;
}
COM: <s> add e to the double linked class state list for its class </s>
|
funcom_train/45815888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean DetectSpam(BeerEventRecord event) {
// For now we are doing something pretty dumb, which is just to see if
// this record is greater than some threshold.
double max_per_person = 20.0 * TWELVE_OZ_BOTTLE.sizeInOunces();
if(event.getOuncesConsumed() / event.getAttendees() > max_per_person) {
return true;
}
return false;
}
COM: <s> returns true if spam was detected </s>
|
funcom_train/21998737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildPanel() {
panel = new JPanel();
GridBagLayout layout = new GridBagLayout();
GridBagConstraints c = new GridBagConstraints();
panel.setLayout(layout);
c.weightx = 1.0;
c.ipadx = 5;
c.anchor = GridBagConstraints.WEST;
priceReversalTextField = GridBagHelper.addTextRow(panel,
Localization.getString("PRICE_REVERSAL_SCALE"),
"",
layout,
c,
8);
boxPriceTextField = GridBagHelper.addTextRow(panel,
Localization.getString("BOX_PRICE_SCALE"),
"",
layout,
c,
8);
}
COM: <s> build the user interface jpanel </s>
|
funcom_train/18837287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean mouseUp(Event e, int x, int y) {
if(ply != null && x >= 0 && x < SIZE && y >= 0 && y < SIZE) {
int movingTo = indexAt(new Rectangle(x, y, Square.SIZE, Square.SIZE));
ply.setEndPosition(movingTo);
CheckGUI.playerPly(ply);
ply = null;
return true;
} else {
ply = null;
return false;
}
}
COM: <s> if mouse is released when moving a piece move the piece to </s>
|
funcom_train/9575930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void publish(Object message, String topicName) throws NamingException, JMSException {
if (logger.isDebugEnabled()) {
logger.debug("Publishing object [" + message + "] on topic [" + topicName + "]");
}
Topic topic = (Topic)jndi.lookup(topicName);
publish(new ObjectMessageCreator(message), topic);
}
COM: <s> publish an object on a topic </s>
|
funcom_train/10861367 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DocList getDocList(Query query, Query filter, Sort lsort, int offset, int len) throws IOException {
QueryCommand qc = new QueryCommand();
qc.setQuery(query)
.setFilterList(filter)
.setSort(lsort)
.setOffset(offset)
.setLen(len);
QueryResult qr = new QueryResult();
search(qr,qc);
return qr.getDocList();
}
COM: <s> returns documents matching both code query code and code filter code </s>
|
funcom_train/51822479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJLoginButton() {
if (jLoginButton == null) {
jLoginButton = new JButton();
jLoginButton.setAction(new AbstractAction(){
public void actionPerformed(ActionEvent arg0) {
doLogin();
}
});
jLoginButton.setPreferredSize(new Dimension(75, 29));
jLoginButton.setMnemonic(KeyEvent.VK_UNDEFINED);
jLoginButton.setText("Login");
}
return jLoginButton;
}
COM: <s> this method initializes j login button </s>
|
funcom_train/41266457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(MCuenta entity) {
EntityManagerHelper.log("deleting MCuenta instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(MCuenta.class,
entity.getId());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent mcuenta entity </s>
|
funcom_train/20978324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void installClientDecorations(JRootPane root) {
installBorder(root);
JComponent titlePane = createTitlePane(root);
setTitlePane(root, titlePane);
installWindowListeners(root, root.getParent());
installLayout(root);
adjustIconAndBackground();
if (window != null) {
root.revalidate();
root.repaint();
}
}
COM: <s> installs the necessary state onto the jroot pane to render client </s>
|
funcom_train/15606429 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private long gaSuffixToOIDLong(String gaSuffix) {
int value = 0;
long oidNumber = 0L;
for (int i = 0; i < gaSuffix.length(); i++) {
value = POSITIONAL_CONVERSION_MAP.indexOf(gaSuffix.charAt(i));
oidNumber *= 32;
oidNumber += value;
} // For all charactes of input.
return oidNumber;
} // End method: gaSuffixToOIDLong
COM: <s> helper method which carries out conversion of a known ga number </s>
|
funcom_train/51344107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void logTimeout(final long elapsed, final TimeUnit unit) {
log.warn("Waiting on task(s)" + ": elapsed="
+ TimeUnit.NANOSECONDS.toMillis(elapsed) + "ms, #active="
+ getActiveCount() + ", #readWrite="
+ getReadWriteActiveCount() + ", #readOnly="
+ getReadOnlyActiveCount());
}
COM: <s> logs periodic messages during shutdown </s>
|
funcom_train/38353188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void register() {
if (!isRegistered && eventSource != null)
try {
// -- create the method name
Method mthd = EventController.getAddListenerMethodFor(this);
// -- invoke method
mthd.invoke(eventSource, new Object[] { owner });
isRegistered = true;
} catch (Exception e) {
System.out.println("error while registering " + owner + " for event " + eventType + " at source " + eventSource);
e.printStackTrace();
}
}
COM: <s> registers the owning module as event listener for the event at the event </s>
|
funcom_train/1590572 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (this == obj) {
return true;
} else if (obj instanceof ScaledDurationField) {
ScaledDurationField other = (ScaledDurationField) obj;
return (getWrappedField().equals(other.getWrappedField())) &&
(getType() == other.getType()) &&
(iScalar == other.iScalar);
}
return false;
}
COM: <s> compares this duration field to another </s>
|
funcom_train/8980170 | /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(null);
jContentPane.add(getJScrollPane(), null);
jContentPane.add(getJAddButton(), null);
jContentPane.add(getJLoadButton(), null);
jContentPane.add(getJCloseButton(), null);
}
return jContentPane;
}
COM: <s> this method initializes j content pane </s>
|
funcom_train/12162651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetClientVariableName() {
XFImplicitAttributes attributes = new XFImplicitAttributes();
assertNull("getClientVariableName should be null to start with",
attributes.getClientVariableName());
attributes.setClientVariableName("clientVariableName");
assertEquals("getClientVariableName returned wrong value",
"clientVariableName",
attributes.getClientVariableName());
}
COM: <s> test the get client variable name method </s>
|
funcom_train/41691809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getIndividualsWithProperty(ATermAppl r, ATermAppl x) {
Role role = rbox.getRole( r );
if( role == null ) {
handleUndefinedEntity( r + " is not a known property!" );
return Collections.emptyList();
}
if( role.isObjectRole() )
return getIndividualsWithObjectProperty( r, x );
else
return getIndividualsWithDataProperty( r, x );
}
COM: <s> list all subjects with a given property and property value </s>
|
funcom_train/47160729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void replay(Object target) throws Throwable {
Iterator<Record> iterator = records.iterator();
while (iterator.hasNext()) {
Record record = iterator.next();
try {
record.method.invoke(target, record.args);
} catch (InvocationTargetException ex) {
throw ex.getTargetException();
}
}
}
COM: <s> replays all recorded method calls on the given object </s>
|
funcom_train/36232272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setNumberOfMessages(int maxNumberOfMessages) {
Properties p = new Properties();
p.setProperty(LogRegistry.NUMBEROFMESSAGES_CONFIGURATION_PARAMETER,
Integer.toString(maxNumberOfMessages));
ConfigCollection.addContextConfig(p);
this.maxNumberOfMessages = maxNumberOfMessages;
}
COM: <s> this method is called by the log4j framework by introspection if the </s>
|
funcom_train/40623904 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getAvailableWidth() {
int clientWidth = absoluteElem.getPropertyInt("clientWidth");
if (scrollPolicy == ScrollPolicy.BOTH) {
int scrollbarWidth = mockScrollable.getOffsetWidth()
- mockScrollable.getPropertyInt("clientWidth");
clientWidth = absoluteElem.getPropertyInt("clientWidth") - scrollbarWidth
- 1;
}
return Math.max(clientWidth, -1);
}
COM: <s> get the width available for the tables </s>
|
funcom_train/25065816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void retrieveData() {
logger.debug("DetailPanelBuilder retrieveData retrieving data for Camera Acc: " + getAcc());
if (AccessionIdentifierUtil.isProjectOrPublication(getAcc())) {
throw new InvalidAccessionException("Invalid accession: " + getAcc());
}
// Timer needed to give labels time to display .... very goofy
new EntityRetrievalTimer().schedule(200);
}
COM: <s> retrieves the data needed to build the detail sub panel </s>
|
funcom_train/46428126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void immediateProcess(Task task) {
Term content = task.getContent();
if (content.isConstant()) { // does not creat concept for Query?
Concept c = getConcept(content);
c.directProcess(task);
}
if (task.aboveThreshold())
continuedProcess(task, content);
}
COM: <s> imediate processing of a new task </s>
|
funcom_train/20925611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createHeader() {
println("/*");
println(" * Actor "+mDesign.getName()+" ("+mSymbols.getActorClassName()+")");
println(" * Generated on "+new Date()+" from "+mSourceFile.toString());
println(" * by xlim2c version "+sTranslatorVersion);
println(" */");
println();
println("#include \""+sIncludedHeaderFile+"\"");
}
COM: <s> generate header that goes first in the output file </s>
|
funcom_train/5374305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelection (int value) {
checkWidget ();
/*
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
info.fMask = OS.SIF_POS;
info.nPos = value;
SetScrollInfo (handle, OS.SB_CTL, info, true);
*/
if (value < 0) return;
if (value < minimum) {
selection = minimum;
} else if (value > maximum - thumb) {
selection = maximum - thumb;
} else {
selection = value;
}
updateSlider();
}
COM: <s> sets the selection which is the receivers </s>
|
funcom_train/12167812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void end() throws Exception {
Object top = digester.pop();
if (digester.getLogger().isDebugEnabled()) {
digester.getLogger().debug("[BogusObjectCreateRule]{" +
digester.getMatch() + "} Pop " + top.getClass().getName());
}
}
COM: <s> process the end of this element </s>
|
funcom_train/7511115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SupportedLocale getCurrentLocale() {
if (currentLocale != null) {
return currentLocale;
}
final SupportedLocale default_ = Locale.getDefault().equals(Const.LOCALE_RU) ? SupportedLocale.RUSSIAN
: SupportedLocale.ENGLISH;
if (this.virualMode) {
return default_;
}
try {
currentLocale = SupportedLocale.valueOf(this.commonConfigInstance.getString(
PARAM_LOCALE, default_.name()));
return currentLocale;
} catch (IllegalArgumentException iae) {
return default_;
}
}
COM: <s> return current locale from supported list </s>
|
funcom_train/8087977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void applyMissingValuesTreatment(double[] values) throws Exception {
for (int i = 0; i < m_miningMeta.size(); i++) {
MiningFieldMetaInfo mfi = m_miningMeta.get(i);
values[i] = mfi.applyMissingValueTreatment(values[i]);
}
}
COM: <s> apply the missing value treatments if any to an incoming instance </s>
|
funcom_train/11024207 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExecuteWithSimpleBooleanPropertyAndStringValue() {
try {
new BeanPropertyValueChangeClosure("booleanProperty", "true").execute(new TestBean());
fail("Should have thrown an IllegalArgumentException");
} catch (IllegalArgumentException e) {
/* this is what we expect */
}
}
COM: <s> test execute with simple boolean property and string value </s>
|
funcom_train/48909396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getTxfCapacidadMaxima() {
if (txfCapacidadMaxima == null) {
txfCapacidadMaxima = new JTextField();
txfCapacidadMaxima.setBounds(new Rectangle(135, 89, 119, 22));
txfCapacidadMaxima.addKeyListener(new KeyAdapter(){
public void keyPressed(KeyEvent e) {
if(e.getKeyCode()==KeyEvent.VK_ENTER)
txfStock.grabFocus();
}
});
}
return txfCapacidadMaxima;
}
COM: <s> this method initializes txf capacidad maxima </s>
|
funcom_train/18485152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JMenuBar createMenubar() {
JMenuItem mi;
JMenuBar mb = new JMenuBar();
String[] menuKeys = tokenize(properties.getProperty("menubar"));
for (int i = 0; i < menuKeys.length; i++) {
JMenu m = createMenu(menuKeys[i]);
if (m != null) {
mb.add(m);
}
}
return mb;
}
COM: <s> create the menubar for the app </s>
|
funcom_train/44145235 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getURL(JFlowgraph graph, Object cell) {
if (cell instanceof DefaultGraphCell) {
final Object userObject = ((DefaultGraphCell) cell).getUserObject();
if (userObject instanceof GPUserObject) {
Object url = ((GPUserObject) userObject).getProperty(GPUserObject.keyURI);
if (url != null)
return url.toString();
}
}
return cell.toString();
}
COM: <s> override or implement to map from cells to urls </s>
|
funcom_train/825147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readEmissiveColor(String line) {
String[] strings = line.split(" ");
if (strings.length < 5) {
return;
}
emissiveColor = new Color3f(Float.parseFloat(strings[1]), Float.parseFloat(strings[2]), Float.parseFloat(strings[3]));
}
COM: <s> extract the emissive color information from a line of textx and assign </s>
|
funcom_train/31093632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() throws ServletException {
super.init();
logger = ConfigServlet.getLogger();
try {
Context ctx = new InitialContext();
ds = (DataSource) ctx.lookup("java:comp/env/jdbc/handwritten2");
} catch (NamingException e) {
logger.error("JNDI error", e);
}
}
COM: <s> initializes connection pool </s>
|
funcom_train/21482978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DiskStore createNonExpiringDiskStore() {
Cache cache = new Cache("testNonPersistent", 10000, true, true, 2, 1, false, 1);
manager.addCache(cache);
DiskStore diskStore = (DiskStore)cache.getDiskStore();
return diskStore;
}
COM: <s> creates a store which is non expiring so that we can check for </s>
|
funcom_train/51822785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTabbedPane getJMainTab() {
if (jMainTab == null) {
jMainTab = new JTabbedPane();
jMainTab.setName("TabPane");
jMainTab.addTab("Default", null, getJMainTabPane(), null);
jMainTab.addTab("Advanced", null, getJAdvancedTabPane(), null);
}
return jMainTab;
}
COM: <s> this method initializes j main tab </s>
|
funcom_train/26628377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setShareAlikeRequirement( String value ) {
if ( value.equals( "yes" ) ){
this.setDerivativePermission( value );
this.shareAlike = value;
} else if ( value.equals( "no" ) ){
this.shareAlike = value;
} else {
throw new IllegalArgumentException(
"shareAlikeRequirement = \"" + value + "\"" );
}
}
COM: <s> is the user required to license derivative works under the same terms </s>
|
funcom_train/21969243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public Image getImage(Component c, int w, int h) {
Image img = (Image)images.get(Thread.currentThread());
if((img == null) || (img.getWidth(c) < w)||(img.getHeight(c) < h)) {
img = c.createImage(w, h);
images.put(Thread.currentThread(), img);
}return img;
}
COM: <s> gets an image of the requested size </s>
|
funcom_train/18551981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String trimPackageName(String pPackage) {
// We're looking for a space
StringTokenizer stringTokenizer = new StringTokenizer(pPackage, " ");
// Get the first part, the package bit
String temp = pPackage;
while (stringTokenizer.hasMoreTokens()) {
// This is the qualified Class name
temp = stringTokenizer.nextToken();
}
return temp;
}
COM: <s> removes the package appendage from the front of the package string </s>
|
funcom_train/24174996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MBooking getNextBooking(int slot)
{
/* No point seeking if there isn't a booking the slot following range. */
if (slot > this.endSlot) return null;
for ( ; slot < this.slots.length; slot++)
{
if (this.slots[slot] != null) return this.slots[slot];
}
return null;
}
COM: <s> gets the booking that is on the slot or immediately succeeds the </s>
|
funcom_train/45623610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addOptionComparePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_VbcType_optionCompare_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_VbcType_optionCompare_feature", "_UI_VbcType_type"),
MSBPackage.eINSTANCE.getVbcType_OptionCompare(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the option compare feature </s>
|
funcom_train/46261317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doInvalidMessageFormat() {
System.out
.println("\nEnter data to be send with the invalid message format : ");
try {
String data = stdIn.readLine();
RequestMessage request = new RequestMessage("WRITE", transactionId,
++sequenceNumber, data);
String message = constructInvalidMessage(request, data);
socketWriter.println(message);
System.out.println("<<Begin>>" + message + "<<End>>");
} catch (IOException e) {
e.printStackTrace();
}
}
COM: <s> message is constructed in an invalid manner and sent to server </s>
|
funcom_train/28754664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTotalamountofrna(Long newVal) {
if ((newVal != null && this.totalamountofrna != null && (newVal.compareTo(this.totalamountofrna) == 0)) ||
(newVal == null && this.totalamountofrna == null && totalamountofrna_is_initialized)) {
return;
}
this.totalamountofrna = newVal;
totalamountofrna_is_modified = true;
totalamountofrna_is_initialized = true;
}
COM: <s> setter method for totalamountofrna </s>
|
funcom_train/3371761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLabel(String label) {
String oldValue = this.label;
this.label = label;
firePropertyChange("label", oldValue, label);
if (accessibleContext != null) {
accessibleContext.firePropertyChange(
AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY,
oldValue, label);
}
invalidate();
repaint();
}
COM: <s> sets the popup menus label </s>
|
funcom_train/9368800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearWallpaperOffsets(IBinder windowToken) {
try {
ViewRoot.getWindowSession(mContext.getMainLooper()).setWallpaperPosition(
windowToken, -1, -1, -1, -1);
} catch (RemoteException e) {
// Ignore.
}
}
COM: <s> clear the offsets previously associated with this window through </s>
|
funcom_train/50999459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean useJava5() {
String templateValue = (String) getTemplateSettings().get(JagGenerator.TEMPLATE_USE_JAVA5);
if (templateValue == null || "false".equalsIgnoreCase(templateValue)) {
return new Boolean(false);
}
else {
return new Boolean(true);
}
}
COM: <s> check if the use java5 checkbox was checked to generate java5 support </s>
|
funcom_train/2389074 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getMenuItemSave() {
if (menuItemSave == null) {
menuItemSave = new JMenuItem();
menuItemSave.setText("Speichern");
menuItemSave
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e)
{
SaveBSCModell sbm = new SaveBSCModell(bscm);
sbm.show();
}
});
}
return menuItemSave;
}
COM: <s> this method initializes menu item save </s>
|
funcom_train/8708466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getValue(ELContext context, Object base, Object property) {
if (context == null) {
throw new NullPointerException();
}
if (base == null) {
context.setPropertyResolved(true);
if (property instanceof String) {
String attribute = (String) property;
PageContext ctxt = (PageContext) context
.getContext(JspContext.class);
return ctxt.findAttribute(attribute);
}
}
return null;
}
COM: <s> if the base object is code null code searches the page request </s>
|
funcom_train/27822867 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setModel(TableModel tableModel) {
if (tableModel==DUMMY_TABLE_MODEL) {
super.setModel(tableModel);
return;
}
throw new UnsupportedOperationException("Call JTreeTable.setModel(TableModel) is not allowed - use JTreeTable.setTreeTableModel() instead.");
}
COM: <s> overridden to disallow setting table model </s>
|
funcom_train/5399847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEqualDateAndCalendar() {
assertEquals("equal date and calendar", DateUtils.lenientCompare(todayCalendar1, todayDate1), 0);
assertEquals("equal calendar and date", DateUtils.lenientCompare(todayDate1, todayCalendar1), 0);
}
COM: <s> tesing equal date and calendar </s>
|
funcom_train/4900816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point2D convertGeoPositionToPoint(GeoPosition pos) {
//convert from geo to world bitmap
Point2D pt = getTileFactory().geoToPixel(pos, getZoom());
//convert from world bitmap to local
Rectangle bounds = getViewportBounds();
return new Point2D.Double(pt.getX() - bounds.getX(),pt.getY() - bounds.getY());
}
COM: <s> converts the specified geo position to a point in the jxmap viewers </s>
|
funcom_train/14660734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel() {
if (jPanel == null) {
jPanel = new JPanel();
jPanel.setLayout(new BorderLayout());
jPanel.add(getJPanel1(), BorderLayout.CENTER);
jPanel.add(getJPanel2(), BorderLayout.SOUTH);
}
return jPanel;
}
COM: <s> this method initializes j panel </s>
|
funcom_train/29691621 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenu getJMenu5() {
if (jMenu5 == null) {
jMenu5 = new JMenu();
jMenu5.setText("Skill Cal's");
jMenu5.setFont(new Font("Dialog", Font.PLAIN, 10));
jMenu5.add(getJMenuItem81());
jMenu5.add(getJMenuItem6());
jMenu5.add(getJMenuItem8());
jMenu5.add(getJMenuItem7());
jMenu5.add(getJMenuItem5());
}
return jMenu5;
}
COM: <s> this method initializes j menu5 </s>
|
funcom_train/18325733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIncomingAssociationsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ClassElement_incomingAssociations_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ClassElement_incomingAssociations_feature", "_UI_ClassElement_type"),
CoremodelPackage.Literals.CLASS_ELEMENT__INCOMING_ASSOCIATIONS,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the incoming associations feature </s>
|
funcom_train/48152804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void itemStateChanged(ItemEvent e){
if (e.getSource() == targetChoice){
target = (int)(Math.pow(2, targetChoice.getSelectedIndex() + 1));
initial = Math.min(initial, target);
initialScroll.setRange(1, target, 1, initial - 1);
rbGraph.setParameters(initial, target);
reset();
}
else super.itemStateChanged(e);
}
COM: <s> this method handles the choice events assoicated with changing the </s>
|
funcom_train/28887184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isShowNextLink() {
if (this.currentPage != null && this.pages != null
&& this.pages.size() > 0) {
if (this.currentPage.getPageNumber() == this.pages.get(
this.pages.size() - 1).getPageNumber()) {
return false;
}
} else {
return false;
}
return true;
}
COM: <s> does a next page exist uses </s>
|
funcom_train/42279932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsFieldPanel( MappingFieldPanel searchFor ) {
if( myPanels.contains(searchFor) ) return true;
// Try to find the panel below the sub-panels
for( int i = 0; i < myPanels.size(); i++ ) {
if( myPanels.get(i).hasSubField(searchFor) ) return true;
}
return false;
}
COM: <s> check if the container has the given field panel </s>
|
funcom_train/4722567 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getDefaultIdentityXml(final String uniqueId) {
StringBuffer xml = new StringBuffer();
xml.append("<isb>\n");
xml.append("<identity id=\"");
xml.append(uniqueId);
xml.append("\" />");
xml.append("</isb>");
return xml.toString();
}
COM: <s> gets the default identity xml </s>
|
funcom_train/37871716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setDocumentProvider(IConfigurationElement element) {
_element = element;
IConfigurationElement[] description = element
.getChildren("description");
if (description.length > 0) {
setDescription(description[0].getValue());
} else {
setDefaultDescription();
}
String default_filename = element.getAttribute("default");
if (default_filename == null) {
_name.setText("");
} else {
_name.setText(default_filename);
}
}
COM: <s> change the document provider with which the document will save at the </s>
|
funcom_train/169392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillCombo() {
teams.removeAllItems();
for (Iterator iter = menu.teams.iterator(); iter.hasNext();) {
Team element = (Team) iter.next();
teams.addItem(element);
}
teams.setEnabled(true);
deletebutton.setEnabled(true);
if (teams.getItemCount() == 0) {
teams.setEnabled(false);
deletebutton.setEnabled(false);
}
}
COM: <s> methods that fill the combo with the favourite teams </s>
|
funcom_train/50866079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadSimulation() {
if ((loadSimThread == null) || !loadSimThread.isAlive()) {
loadSimThread = new Thread("Load Simulation Thread") {
@Override
public void run() {
loadSimulationProcess();
}
};
loadSimThread.start();
} else {
loadSimThread.interrupt();
}
}
COM: <s> load a previously saved simulation </s>
|
funcom_train/51111842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Query setFirstResult(int startPosition) {
if (startPosition < 0) {
throw new IllegalArgumentException("Invalid first result value: " + startPosition);
}
// TODO: support in core like fetchLimit?
// TODO: hack a temp solution here based on sub-list?
throw new UnsupportedOperationException("TODO");
}
COM: <s> set the position of the first result to retrieve </s>
|
funcom_train/2624799 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PDimension getCanvasDelta() {
final Point2D last = inputManager.getLastCanvasPosition();
final Point2D current = inputManager.getCurrentCanvasPosition();
return new PDimension(current.getX() - last.getX(), current.getY() - last.getY());
}
COM: <s> return the delta between the last and current mouse position in pcanvas </s>
|
funcom_train/43268062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int findColumn(final Object id) {
int idx = 0;
int out = -1;
for (final Enumeration e = getColumns(); e.hasMoreElements(); ) {
final ValueColumn element = (ValueColumn) e.nextElement();
if (element.getIdentifier().equals(id)) {
out = idx;
break;
}
idx++;
}
return out;
}
COM: <s> find a column based on the identifier </s>
|
funcom_train/9818153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BV setValue(char value) {
if (this.is_signed == SIGN_EXT)
return setValue((int) ((short) value), SIGN_EXT); // char -> int zero-pads, so use short's sign-ext
return setValue((int) value, ZERO_PAD); // char -> int zero-pads
}
COM: <s> sets value of bv with zero padding or sign extension as determined </s>
|
funcom_train/2863667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String generateReport(String template) {
return resolver.resolve(template,
new Object[] {
name,
resolver.resolve(size),
new Integer(numRecs),
new Integer(numTerms),
new Integer(postingsLists),
new Integer(numRegions),
new Integer(numDataRegions),
new Integer(numIndxRegions),
new Integer(numMiscRegions),
new Double(time)
});
}
COM: <s> generates a validation report from the data stored </s>
|
funcom_train/13271577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHeight(Float height) {
if (height != this.height
|| (height != null && !height.equals(this.height))) {
Float oldHeight = this.height;
this.height = height;
this.propertyChangeSupport.firePropertyChange(Property.HEIGHT.name(),
oldHeight, height);
}
}
COM: <s> sets the height of this wall </s>
|
funcom_train/4877602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addName(final Locale locale, final String seriesName) {
assert locale != null : "locale is null";
assert seriesName != null : "seriesName is null";
assert getNames() != null : "getNames() is null";
getNames().put(locale, seriesName);
}
COM: <s> adds a language and its associated levels series name to the names series </s>
|
funcom_train/32790238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AttributeCallExp createClassAttributeCall(Classifier srcType, String name) throws WellFormednessException{
AttributeCallExp result = factory.createAttributeCallExp();
Attribute a = srcType.lookupAttribute(name);
result.setReferredAttribute(a);
result.setSrcType(srcType);
typeEvl.getType(result);
return result;
}
COM: <s> creates an instance of attribute call exp for an classifier level attribute </s>
|
funcom_train/21800450 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start(IWorkbenchWindow window) {
if (!is_started) {
if (window != null) {
is_started = true;
this.window = window;
// Update the current handler.
// Not invoke the callback during start.
setCurrentHandler(getHandler(getActiveEditor()));
// Add listeners.
ResourcesPlugin.getWorkspace().addResourceChangeListener(this, IResourceChangeEvent.POST_CHANGE);
window.getSelectionService().addPostSelectionListener(this);
}
}
}
COM: <s> start to monitor the encoding of the active document if not started yet </s>
|
funcom_train/37185661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeRow(int row) {
super.removeRow(row);
for (int index = row; index < this.getRowCount(); index++) {
Layer layer = (Layer)this.dataVector.get(index);
layer.put(Layer.NUMBER, new Integer(index + 1));
}
this.reSort();
}
COM: <s> removes a layer and updates other layers numbers </s>
|
funcom_train/10836294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean expireResource(ClassLoaderResource resource) {
// check whether the resource is expired (only if a class has been loaded)
boolean exp = resource.getLoadedClass() != null && resource.isExpired();
// update dirty flag accordingly
dirty |= exp;
log.debug("expireResource: Loader dirty: {}", isDirty());
// return the expiry status
return exp;
}
COM: <s> checks whether the page backing the resource has been updated with a </s>
|
funcom_train/9889625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void onLoadDirectory() {
try {
ISlideData[] slideData = loadDirectory(data.getSlideMetaData());
if (slideData != null) {
addFeatures(slideData);
setMaxCY3AndCY5();
}
} catch (Exception e) {
ShowThrowableDialog.show(mainframe, "Load Directory Error", e);
}
}
COM: <s> loads data from the user specified directory </s>
|
funcom_train/48152006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDieCount(int n){
Die die;
if (n < 1) n = 1;
if (n > dieCount){
for (int i = dieCount; i < n; i++){
die = new Die(probabilities, size, backColor, spotColor);
die.setToolTipText("Die " + (i + 1));
add(die);
}
dieCount = n;
}
else if (n < dieCount){
for (int i = n; i < dieCount; i++) remove(n);
dieCount = n;
}
validate();
}
COM: <s> this method sets the number of dice </s>
|
funcom_train/27948042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DataSet ( double d[], int n ) throws Exception {
int i;
int k = 0;
length = 0;
if ( d == null || d.length == 0 || n <= 0 ) {
throw new Exception("DataSet: Error in parsed data!");
}
// Copy the data locally.
data = new double[n*stride];
length = n*stride;
System.arraycopy(d, 0, data, 0, length);
// Calculate the data range.
range(stride);
}
COM: <s> instantiate a data set with the parsed data </s>
|
funcom_train/13273382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addChangeListeners(final BackgroundImageWizardController controller) {
controller.addPropertyChangeListener(BackgroundImageWizardController.Property.SCALE_DISTANCE_POINTS,
new PropertyChangeListener () {
public void propertyChange(PropertyChangeEvent ev) {
// If origin values changes update displayed origin
repaint();
}
});
}
COM: <s> adds listeners to code controller code </s>
|
funcom_train/31842841 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testId() {
tm1.setId(0);
tm2.setId(0);
assertEquals(true, tm1.equals(tm2));
tm1.setId(ms.addTeamMember(tm1).getId());
tm2.setId(ms.addTeamMember(tm2).getId());
assertEquals(false, tm1.equals(tm2));
ms.removeTeamMember(tm1);
ms.removeTeamMember(tm2);
}
COM: <s> team member test test id </s>
|
funcom_train/7310765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static private boolean isNumeric(Class<?> c) {
if (c.isPrimitive() && !c.equals(Void.TYPE)) {
return true;
} else if (Number.class.isAssignableFrom(c)) {
return true;
} else if (c.equals(Boolean.class)) {
return true;
} else {
return false;
}
}
COM: <s> returns true if the specified class represents a numeric type </s>
|
funcom_train/1196779 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Node getNodeForId(Integer id) {
Node tmpNode;
for (Iterator nodesIter = allMarkers.values().iterator(); nodesIter.hasNext() ; ) {
tmpNode = (Node) nodesIter.next();
if (tmpNode.id.equals(id))
return tmpNode;
}
return null;
}
COM: <s> loop through all nodes to find the node with the id in question </s>
|
funcom_train/8096171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected CheckAttributeSelection getTester() {
CheckAttributeSelection result;
result = new CheckAttributeSelection();
result.setSilent(true);
result.setSearch(m_Search);
result.setEvaluator(m_Evaluator);
result.setNumInstances(20);
result.setDebug(DEBUG);
result.setPostProcessor(getPostProcessor());
return result;
}
COM: <s> configures the check attribute selection instance used throughout the tests </s>
|
funcom_train/32220608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean commitSession(long sessionId) {
try {
Object obj = HibernateUtil.get(AdlmSession.class, sessionId);
if (obj instanceof AdlmSession) {
Resolve.resolveSession((AdlmSession) obj);
}
else {
log.info("Unable to find session "+sessionId);
return false;
}
OperationQueue.ensureBackendStarted();
} catch (Exception e) {
log.info("Error processing commit on session "+sessionId,e);
return false;
}
return true;
}
COM: <s> commit a session so any changes are written to the adl registery </s>
|
funcom_train/51339877 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public short decodeShort(final byte[] buf, int off) {
int v = 0;
// big-endian.
v += (0xffL & buf[off++]) << 8;
v += (0xffL & buf[off++]) << 0;
if (v < 0) {
v = v + 0x8000;
} else {
v = v - 0x8000;
}
return (short) v;
}
COM: <s> decodes a signed short value as encoded by </s>
|
funcom_train/28911012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void configurePipeline() {
// setup document pipeline
fScanner.setDocumentHandler(fDocumentHandler);
fDocumentHandler.setDocumentSource(fScanner);
fLastComponent = fScanner;
// setup dtd pipeline
if (fDTDScanner != null) {
fDTDScanner.setDTDHandler(fDTDHandler);
fDTDScanner.setDTDContentModelHandler(fDTDContentModelHandler);
}
} // configurePipeline()
COM: <s> configures the pipeline </s>
|
funcom_train/41379915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Control createHeader(Composite parent) {
Label description = new Label(parent, SWT.NONE);
description
.setText(PreferenceMessages.DocReadPreferencePage_description);
GridData gridData = new GridData(SWT.FILL, SWT.BEGINNING, true, false);
gridData.widthHint = 150; // only expand further if anyone else
// requires it
description.setLayoutData(gridData);
return description;
}
COM: <s> creates the swt components of the page </s>
|
funcom_train/18868354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BudgetGoal getBudgetGoal(final Account account) {
if (account == null) {
throw new IllegalArgumentException("Account may not be null");
}
BudgetGoal goal = accountGoals.get(account.getUuid());
if (goal == null) {
goal = new BudgetGoal();
goal.setBudgetPeriod(getBudgetPeriod());
accountGoals.put(account.getUuid(), goal);
}
return goal;
}
COM: <s> returns and accounts goals </s>
|
funcom_train/3925962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void cloneFieldValue( Field result, VrmlElement protoInstance ) {
result.setFieldId( getFieldId() );
FieldValue fv = getFieldValue();
if ( fv != null ) {
FieldValue fvClone = (FieldValue)fv.vrmlClone( protoInstance );
VrmlElement preservedParent = null;
if ( fvClone == fv ) {
preservedParent = fv.getParent();
}
result.setFieldValue( fvClone );
if ( preservedParent != null ) {
fv.setParent( preservedParent );
}
}
}
COM: <s> clone a field value into a new field </s>
|
funcom_train/3084716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onNavigation(WizardNavigationEvent wizardEvent) throws WizardNavigationVetoException {
DemoWizardNavigation demoWiz = null;
if (wizardEvent.getFromComponent() instanceof DemoWizardNavigation) {
demoWiz = (DemoWizardNavigation) wizardEvent.getFromComponent();
}
if (demoWiz != null && demoWiz.buttonNo.isSelected()) {
throw new WizardNavigationVetoException(wizardEvent);
}
}
COM: <s> called by on next and on previous </s>
|
funcom_train/51617209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean rangeIncludesNow( Vector<TimestampRange> timeRanges ) {
long currentTime = Timestamp.getCurrentTime();
for( TimestampRange range : timeRanges )
if( range.getStartTime().getMyTime() < currentTime &&
range.getEndTime().getMyTime() > currentTime )
return true;
return false;
}
COM: <s> determines whether or not the specified time ranges include the current time </s>
|
funcom_train/17565808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Actor create(String p, QuasiBehavior b) {
CreatorInt leCreateur = lookup(p);
Actor refDisAct = null;
try {
refDisAct = leCreateur.createLocal(b);
} catch (RemoteException e) {
throw new CreateException("Unable to create the actor on " + p, e);
}
return refDisAct;
}
COM: <s> actor creation from its behavior on a given place </s>
|
funcom_train/20527456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ResultMetaData getResultMetaData() {
switch (type) {
case StatementTypes.DELETE_WHERE :
case StatementTypes.INSERT :
case StatementTypes.UPDATE_WHERE :
case StatementTypes.MERGE :
return ResultMetaData.emptyResultMetaData;
default :
throw Error.runtimeError(ErrorCode.U_S0500, "StatementDMQL");
}
}
COM: <s> returns the metadata which is empty if the compiled statement does not </s>
|
funcom_train/51501061 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void log(String message) {
Logger logger = container.getLogger();
if (logger != null)
logger.log(this.toString() + ": " + message); //$NON-NLS-1$
else
System.out.println(this.toString() + ": " + message); //$NON-NLS-1$
}
COM: <s> log a message on the logger associated with our container if any </s>
|
funcom_train/26318676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasChameleonShield() {
for (Mounted mEquip : getMisc()) {
MiscType mtype = (MiscType) mEquip.getType();
if (mtype.hasFlag(MiscType.F_CHAMELEON_SHIELD)) {
// The Mek has Chameleon Light Polarization Field
return true;
}
}
return false;
}
COM: <s> does this mech have a chameleon light polarization shield </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.