__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/12528490 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean createNewFile() throws IOException {
SecurityManager security = System.getSecurityManager();
if (security != null) {
security.checkWrite(path);
}
if (0 == path.length()) {
throw new IOException(Msg.getString("KA012")); //$NON-NLS-1$
}
return newFile0(getAbsolutePath());
}
COM: <s> creates a new empty file on the file system according to the path </s>
|
funcom_train/9889613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadFromStanfordFile(String title) {
try {
ISlideData[] slideData = super.loadStanfordFile(title);
if (slideData != null) {
addFeatures(slideData);
setMaxCY3AndCY5();
}
} catch (Exception e) {
ShowThrowableDialog.show(mainframe, "Load Data Error", e);
}
}
COM: <s> loads stanford file </s>
|
funcom_train/33412370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void validateData() {
boolean isValid = true;
if (getQueryText() == null) {
isValid = true;
} else if (getQueryText().equals("")) { //$NON-NLS-1$
isValid = true;
} else {
try {
ClassTools.parseDefinition(getQueryText());
} catch (Exception e) {
isValid = false;
}
}
if (isValid)
setMessage(Messages.DataSetWizardPage_DEFAULT_MESSAGE);
else
setMessage(
Messages.DataSetWizardPage_REQUIRES_VALID_INPUT_VALUE,
ERROR);
setPageComplete(isValid);
}
COM: <s> validates the user defined value in the page control exists and not a </s>
|
funcom_train/46063275 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateTemporaryKeyEntry() {
String emailaddress = "sabina@jeger.net";
TemporaryKeyImpl result = null;
String ipaddress = "130.60.112.10";
RegistrationManager rm = RegistrationManager.getInstance();
result = rm.createTemporaryKeyByEmail(emailaddress,ipaddress,rm.REGISTRATION);
assertTrue(result != null);
emailaddress = "sabina@jeger.ch";
result = rm.createTemporaryKeyByEmail(emailaddress,ipaddress,rm.REGISTRATION);
assertTrue(result != null);
emailaddress = "info@jeger.net";
result = rm.createTemporaryKeyByEmail(emailaddress,ipaddress,rm.REGISTRATION);
assertTrue(result != null);
}
COM: <s> test load of temp key </s>
|
funcom_train/21502436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addExponentPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_UnitFactor_exponent_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_UnitFactor_exponent_feature", "_UI_UnitFactor_type"),
TypeSystemPackage.Literals.UNIT_FACTOR__EXPONENT,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the exponent feature </s>
|
funcom_train/3976220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadMetadata() {
this.dataDocument = context.getWavelet().getDataDocument(METADATA_DOC);
if (dataDocument != null) {
try {
String[] items = dataDocument.split(METADATA_FIELD_SEP_REGEX);
this.iterationName = items[0];
this.startDate = items[1];
this.duration = items[2];
this.recipients = items[3];
} catch (IndexOutOfBoundsException iobx) {
// Receiving an exception means that the data document has not
// yet
// been fully populated.
}
hasChanged = false;
}
}
COM: <s> deserializes the previous state of the poll metadata from the data stored </s>
|
funcom_train/20885496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDefaultNoValueString(String defaultNoValueString) {
if (defaultNoValueString.equals(GeneralConstants.DEFAULT_STRING)) {
this.defaultNoValueString = InitialConfiguration.get(DEFAULT_NO_VALUE_STRING,
Defaults.DEFAULT_NO_VALUE_STRING);
} else {
this.defaultNoValueString = defaultNoValueString;
}
}
COM: <s> sets the default no value string </s>
|
funcom_train/4195447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void end() {
if (done) {
return;
}
done = true;
removeCallFromAllWhisperGroups();
memberSender.end();
memberReceiver.end();
if (rtcpReceiver != null && rtcpReceiver != loneRtcpReceiver) {
rtcpReceiver.end();
}
/*
* Don't leave whisper groups or change private mixes if
* the call is migrating.
*/
if (migrating == false) {
notifyMemberDoneListeners();
synchronized (conferenceManager) {
removeMyPrivateMixes();
synchronized (privateMixesForMe) {
removePrivateMixesForMe();
}
}
}
printStatistics();
}
COM: <s> member is leaving a conference </s>
|
funcom_train/37080535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ChadoDatabase getSelectedDatabase() {
Object selections[] = databaseComboBox.getSelectedObjects();
if ((selections != null) && (selections.length == 1)) {
String newval = selections[0].toString();
if (!newval.equals(CUSTOM_DB_PROMPT)) {
return getChadoDatabaseByName(newval);
}
}
return null;
}
COM: <s> returns database select in database combo box </s>
|
funcom_train/35219509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refreshMenus() {
newEventMenuItem.setEnabled(Cal.getLogic().getCalendarManager().getAllCalendars().size() > 0);
boolean calendarSelected = calendarCheckboxes.getSelectedCalendar() != null;
editCalendarMenuItem.setEnabled(calendarSelected);
deleteCalendarMenuItem.setEnabled(calendarSelected);
}
COM: <s> refreshes the status of the menu items in the main menu </s>
|
funcom_train/9869665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFechaultima(java.util.Date newVal) {
if ((newVal != null && this.fechaultima != null && (newVal.compareTo(this.fechaultima) == 0)) ||
(newVal == null && this.fechaultima == null && fechaultima_is_initialized)) {
return;
}
this.fechaultima = newVal;
fechaultima_is_modified = true;
fechaultima_is_initialized = true;
}
COM: <s> setter method for fechaultima </s>
|
funcom_train/9026344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void aboutToBeShown() {
for (int i = 0; i < sections.length; i++) {
final ISection section = sections[i];
ISafeRunnable runnable = new ISafeRunnable() {
public void run() throws Exception {
section.aboutToBeShown();
}
public void handleException(Throwable exception) {
/* not used */
}
};
SafeRunner.run(runnable);
}
}
COM: <s> sends the lifecycle event to the pages sections </s>
|
funcom_train/11730461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected long getLength(InternalValue value) throws RepositoryException {
long length;
switch (value.getType()) {
case NAME:
case PATH:
String str = ValueFormat.getJCRString(value, sessionContext);
length = str.length();
break;
default:
length = value.getLength();
break;
}
return length;
}
COM: <s> determines the length of the given value </s>
|
funcom_train/40129194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean onSelected(int menuId) {
boolean selected = menuId == m_MenuId;
if (selected && m_Listeners != null) {
ActionEvent evt = new ActionEvent(this,0,"");
for (Enumeration listeners = m_Listeners.elements(); listeners.hasMoreElements(); ) {
ActionListener listener = (ActionListener)listeners.nextElement();
listener.actionPerformed(evt);
}
}
return selected;
}
COM: <s> callback when user selects menu item find it by comparing menu ids </s>
|
funcom_train/20499774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasWon(){
for(int i = 0; i < board.getGrid().length; i++){
for(int j = 0; j < board.getGrid().length; j++){
if(!(board.getGrid()[i][j].isOccupied())){
return false;
}
}
}
return true;
}
COM: <s> checks if the current player has won the game by checking with the </s>
|
funcom_train/38728321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String doCreateContact() throws RitaException {
logger.info("Creating contact...");
DataFacade f = MBeanUtils.getDataFacade();
setOrganizationName(organizationName);
// check organization
if (contact.getOrg() == null) {
MBeanUtils.addFormMessage("newcmr_badorg_message");
return "failure";
}
contact.setId(new Contact.Id(f.getActiveSite().getId()));
contact.setProject(f.getActiveProject());
f.save(contact);
return "success";
}
COM: <s> persist a new contact </s>
|
funcom_train/46752122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copyAllFrom(DisplayModel m) {
if (m == null) {
return;
}
this.setId(m.getId());
this.setDisplay(m.getDisplay());
this.setShortDisplay(m.getShortDisplay());
this.setIdvalue(m.getIdvalue());
this.setIdentifierSourceRefId(m.getIdentifierSourceRefId());
this.setIdentifierSource(m.getIdentifierSource());
this.setCategoryReferenceId(m.getCategoryReferenceId());
this.setReferenceObject(m.getReferenceObject());
}
COM: <s> copys the id and display from the model </s>
|
funcom_train/45648640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getContent(URLConnection _u) throws java.io.IOException {
ByteArrayOutputStream buf=new ByteArrayOutputStream();
InputStream in=_u.getInputStream();
byte[] buffer = new byte[1024];
int rcnt=0;
while ( (rcnt=in.read(buffer))>0 )
buf.write(buffer, 0, rcnt);
return buf.toByteArray();
}
COM: <s> gets the content from the connection </s>
|
funcom_train/25141240 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Font getFont() {
if (!isSimpleString()) {
return null;
} else {
AttributedCharacterIterator strIt = str.getIterator();
if (strIt.getAllAttributeKeys().isEmpty()) {
return font;
} else {
Font _font = (Font) strIt.getAttribute(TextAttribute.FONT);
return _font;
}
}
}
COM: <s> return the unique font of the backing attributed string </s>
|
funcom_train/40534989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getFieldSerializerClassName() {
String sourceName = serializationOracle.getFieldSerializerName(getSerializableClass());
int qualifiedSourceNameStart = sourceName.lastIndexOf('.');
if (qualifiedSourceNameStart >= 0) {
sourceName = sourceName.substring(qualifiedSourceNameStart + 1);
}
return sourceName;
}
COM: <s> returns the name of the field serializer which will deal with this class </s>
|
funcom_train/39363296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTableNames(String[] tableNames) {
Validate.notNull(tableNames, "Argument tableNames must not be null");
Validate.noNullElements(tableNames,
"Argument tableNames must not contain null elements.");
for (int i = 0; i < tableNames.length; i++) {
tableNames[i] = tableNames[i].trim();
}
tableFilter = new IncludeTableFilter(tableNames);
}
COM: <s> set the table names to include in the fixtures loaded by this loader </s>
|
funcom_train/17184187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void print() {
if(routingTable.size() == 0) {
logger.info("Dump routing table: routing table is empty");
} else {
logger.info("Dump routing table:");
}
for(int i=0; i<routingTable.size(); i++) {
logger.info("===== " + (i+1) + ". Entry =====");
routingTable.get(i).print();
}
}
COM: <s> prints the complete bgp routing table to the logger </s>
|
funcom_train/22959577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Light createAmbientLight(){
AmbientLight amb = new AmbientLight(new Color3f(0.6f, 0.6f, 0.6f));
BoundingSphere bs = new BoundingSphere(new Point3d(0,0,0), 50);
amb.setInfluencingBounds(bs);
return amb;
}
COM: <s> creates ambient light </s>
|
funcom_train/48148171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getColumnSortRank(int columnIndex) {
for (int i = 0; i < sortingColumns.size(); i++) {
SortedColumnInfo sortedColumnInfo = (SortedColumnInfo) sortingColumns.get(i);
if (sortedColumnInfo.getColumnIndex() == columnIndex)
return i + 1;
}
return -1;
}
COM: <s> returns columns sort rank within all sorted columns </s>
|
funcom_train/2862630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
if (set == BIB1) {
switch (type) {
case BIB1_use:
return "use=" + value;
case BIB1_relation:
return "relation=" + value;
case BIB1_position:
return "position=" + value;
case BIB1_structure:
return "structure=" + value;
case BIB1_truncation:
return "truncation=" + value;
case BIB1_newtonIds:
return "newtonId=" + value;
}
}
return ("(type=" + type + ";value=" + value + ") ");
}
COM: <s> return a string describing the type and value of this attribute object </s>
|
funcom_train/48795979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addComponentTrace(String componentId, Observation obs) {
Record compTraceRecord = outputRecordCollection.getRecord(componentId);
if (compTraceRecord == null) {
compTraceRecord = new Record(new HashSet());
}
Set componentTrace = (Set) compTraceRecord.getValue();
componentTrace.add(obs);
outputRecordCollection.setRecord(componentId, compTraceRecord);
}
COM: <s> add observation into the collection of observations for componentid </s>
|
funcom_train/375429 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNameWithinAProperty() {
ConfigString string = new ConfigString("@{a.${name}.c}", variables, properties);
assertTrue("sub failed in expand", string.expand("b", properties));
assertEquals("A.B.C", string.toString());
string.reset(); // Reintialize
}
COM: <s> test name within a property </s>
|
funcom_train/32316245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addObjectPropertyExpressionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ObjectHasValue_objectPropertyExpression_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ObjectHasValue_objectPropertyExpression_feature", "_UI_ObjectHasValue_type"),
OdmPackage.Literals.OBJECT_HAS_VALUE__OBJECT_PROPERTY_EXPRESSION,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the object property expression feature </s>
|
funcom_train/7305265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PyObject set(int index, PyObject value) {
if (index >= 0 && index < size) {
PyObject existing = baseArray[index];
baseArray[index] = value;
return existing;
}
throw new ArrayIndexOutOfBoundsException(
"Index must be between " + 0 + " and " +
(size - 1) + ", but was " + index);
}
COM: <s> set the value at an index position in the array </s>
|
funcom_train/13675784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void prepareEnvironment() {
m_Environment = new Properties();
//prepare the environment
m_Environment.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.ldap.LdapCtxFactory");
m_Environment.put(Context.PROVIDER_URL, m_ContextURL);
}//prepareEnvironment
COM: <s> prepares the environment that is used for the build </s>
|
funcom_train/36376465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ModelAndView deactivate(HttpServletRequest request, HttpServletResponse response) {
ModelAndView mav = new ModelAndView();
try {
itemService.deactivate(request);
return MessageBlock.createSingle(mav, MSG.OPERATION_SUCCESSFUL, "deactivate", MSG.SUCCESS);
} catch (Exception e) {
return MessageBlock.createSingle(mav, MSG.ITEM_NOT_EXISTS, "deactivate", MSG.ERROR);
}
}
COM: <s> dectivates an item </s>
|
funcom_train/39881787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getLowestSetBit() {
prepareJavaRepresentation();
if (sign == 0) {
return -1;
}
// (sign != 0) implies that exists some non zero digit
int i = getFirstNonzeroDigit();
return ((i << 5) + Integer.numberOfTrailingZeros(digits[i]));
}
COM: <s> returns the position of the lowest set bit in the twos complement </s>
|
funcom_train/11651447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isRedirect() {
final String[] REDIRECT_CODES = { "301", "302", "303" }; // NOT 304!
String code = getResponseCode();
for (int i = 0; i < REDIRECT_CODES.length; i++) {
if (REDIRECT_CODES[i].equals(code)) {
return true;
}
}
return false;
}
COM: <s> determine whether this result is a redirect </s>
|
funcom_train/1559608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateMenuPointCapturing() {
if (menuPointCapturing == null)
return;
String pos = Integer.toString(app.getEuclidianView()
.getPointCapturingMode());
for (int i = 0; i < 4; i++) {
JRadioButtonMenuItem mi = (JRadioButtonMenuItem) menuPointCapturing
.getMenuComponent(i);
String ac = mi.getActionCommand();
if (ac.substring(0, 1).equals(pos)) {
mi.setSelected(true);
break;
}
}
}
COM: <s> update the point capturing menu </s>
|
funcom_train/46293425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() throws IOException {
if (LOG.isInfoEnabled())
LOG.info("close");
maybeMergesExecutorService.shutdown();
mergeThreadPool.shutdown();
commitThreadPool.shutdown();
snapshotLogManager.close();
transactionLog.close();
for (Index index : indexes.getIndexes()) {
index.close();
}
}
COM: <s> stops the thread pools closes the transaction log closes the indexes </s>
|
funcom_train/11020441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TemplateGeneratorBuilder addResourcesTemplateSuiteGenerator(TemplateSuiteGenerator generator) {
if (resourcesOutputDirectory == null) {
throw new NullPointerException(
"Resources output directory not specified, call 'setClassesOutputDirectory' first");
}
templateSuiteGenerators.add(new TSGeneratorDirectoryPair(
resourcesOutputDirectory, generator));
generatingResources = true;
return this;
}
COM: <s> adds a new template suite generator to generate resources </s>
|
funcom_train/25701832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeEntityWrapper (EntityWrapper removeChild) {
/*
MFNode childrenEntities = (MFNode) getX3dNode().getField("removeChildrenEntities");
// Had to use setValue, set1Value and append not working right
childrenEntities.setValue(1, new X3DNode [] { removeChild.getX3dNode() });
*/
}
COM: <s> remove an entity wrapper from this entity wrapper as a child </s>
|
funcom_train/46457559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object addObject(Object obj, boolean postEdit) {
if (obj == null) return null;
// determine row number
int row = objects.size(); // end of table
if (isRemovable(obj)) {
if (removablesAtTop) {
row = getRemovableRowCount(); // after removable rows
}
}
else if (!removablesAtTop) {
row = row - getRemovableRowCount(); // before removable rows
}
return addObject(obj, row, postEdit, true);
}
COM: <s> adds an object </s>
|
funcom_train/22655522 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void toggleAdvancedPanel () {
if (_advancedPanel.isVisible()) {
// Hide the panel
_advancedPanel.setVisible(false);
_advancedFilterButton.setText(InsightConstants
.getLiteral("FILTER_BUTTON_ADVANCED_SHOW"));
// Clear the criteria formed in the advanced window
_filterCriteria = new FilterCriteria();
} else {
// Show the panel
_advancedPanel.setVisible(true);
_advancedFilterButton.setText(InsightConstants
.getLiteral("FILTER_BUTTON_ADVANCED_HIDE"));
}
// Correct the size of the dialog
this.resizeDialog();
}
COM: <s> shows or hides the advanced filter ui component </s>
|
funcom_train/26221317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getAgentComboBox() {
if (agentComboBox == null) {
agentComboBox = new JComboBox();
agentComboBox.setPreferredSize(new Dimension(100, 24));
agentComboBox.setEnabled(false);
agentComboBox.addItem("Host not running");
}
return agentComboBox;
}
COM: <s> this method initializes agent combo box </s>
|
funcom_train/2898047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNodeCloseUpView(NodeCloseUpView aNodeCloseUpView) {
// TODO closeUpView auskommentiert
/*
* myNodeCloseUpView.removeNodeEventListener(myCommunicator);
* this.remove((JComponent) myNodeCloseUpView); myNodeCloseUpView =
* aNetView; aNetView.addNodeEventListener(myCommunicator); //TODO
*/
}
COM: <s> sets a new code node close up view code implementation on this </s>
|
funcom_train/16482443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showEnginePreferences(EnginePreferences enginePreferences) {
bufferDaysSpinner.setValue(enginePreferences.bufferDays);
badFeelDaysBeforeSpinner.setValue(enginePreferences.badFeelDaysBefore);
badFeelDaysAfterSpinner.setValue(enginePreferences.badFeelDaysAfter);
regularMinDaysSpinner.setValue(enginePreferences.regularMinLength);
regularMaxDaysSpinner.setValue(enginePreferences.regularMaxLength);
}
COM: <s> show the engine preferences specified in the preferences dialog </s>
|
funcom_train/25099097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAllowChangeCardinalityPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DeviationAttributeSet_allowChangeCardinality_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DeviationAttributeSet_allowChangeCardinality_feature", "_UI_DeviationAttributeSet_type"),
VehiclefeaturemodelingPackage.Literals.DEVIATION_ATTRIBUTE_SET__ALLOW_CHANGE_CARDINALITY,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the allow change cardinality feature </s>
|
funcom_train/32056595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsCellEditable() {
System.out.println("testIsCellEditable");
DefaultGraphCellEditor dgce = new DefaultGraphCellEditor();
String str = new String("hello");
EventObject eo = new EventObject(str);
assertEquals("is cell editable", dgce.isCellEditable(eo), false);
}
COM: <s> this function tests cell editable function of default graph cell editor class </s>
|
funcom_train/3443627 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update() {
setRangeProperties(
maxDQ.numberColumn.getDoubleMin(),
minDQ.numberColumn.getDoubleMax()
- maxDQ.numberColumn.getDoubleMin(),
maxDQ.numberColumn.getDoubleMin(),
minDQ.numberColumn.getDoubleMax(),
false);
}
COM: <s> updates the state </s>
|
funcom_train/15811230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ListIterator getHeaders(String headerName) {
if (headerName == null)
throw new NullPointerException("null headerName");
SIPHeader sipHeader = (SIPHeader) nameTable.get(SIPHeaderNamesCache.toLowerCase(headerName));
// empty iterator
if (sipHeader == null)
return new LinkedList().listIterator();
if (sipHeader instanceof SIPHeaderList) {
return ((SIPHeaderList) sipHeader).listIterator();
} else {
return new HeaderIterator(this, sipHeader);
}
}
COM: <s> get a sip header or header list given its name </s>
|
funcom_train/28292908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getPreventActivation() {
if (_Debug) {
System.out.println(" :: SeqActivity --> BEGIN - " +
"getPreventActivation");
System.out.println(" ::--> " + mPreventActivation);
System.out.println(" :: SeqActivity --> END - " +
"getPreventActivation");
}
return mPreventActivation;
}
COM: <s> retrieves the value of the choice constraint prevent activation sequencing </s>
|
funcom_train/40334591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean login(String username, char[] password){
String pass = null;
try {
MessageDigest md = MessageDigest.getInstance("MD5");
md.update(new String(password).getBytes());
byte[] hash = md.digest();
pass = new BigInteger(1, hash).toString(16);
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
}
int answer = client.authenticate(username, pass);
return answer != 0;
}
COM: <s> provides communication with the client regarding login affairs </s>
|
funcom_train/20066998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean abort() {
try {
while (this.getStatus() == Status.ACTIVE) {
if (statusUpdater.compareAndSet(this, Status.ACTIVE, Status.ABORTED)) {
return true;
}
}
return this.getStatus() == Status.ABORTED;
} finally {
wakeUp();
}
}
COM: <s> tries to abort transaction </s>
|
funcom_train/29560696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initTransientData(InitialisationContext initialisationContext) {
this.context = initialisationContext;
for (ServerStore store : idStoreMap.values()) {
store.initTransientData(initialisationContext);
}
synchronized (deletedStoresByVersion) {
for (ArrayList<Integer> als : deletedStoresByVersion.values()) {
for (Integer storeId : als) {
ServerStore store = idStoreMap.get(storeId);
store.initTransientData(initialisationContext);
}
}
}
}
COM: <s> completely initialise transient data throughout repository </s>
|
funcom_train/34565932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static final class LocationImpl implements Location {
public int getCharacterOffset() { return -1; }
public int getColumnNumber() { return -1; }
public int getLineNumber() { return -1; }
public String getPublicId() { return null; }
public String getSystemId() { return null; }
}
COM: <s> dummy location implementation </s>
|
funcom_train/40699039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTripItem(final TripItem item) {
this.tripItem = item;
final Trip trip = singletonComponents.getTripService().getTrip(tripItem.getTripId());
isViewer = singletonComponents.getUserUtils().isViewer(
trip, singletonComponents.getUtils().getUserEmail());
populateView();
}
COM: <s> method will extract viewer info from trip item and will call populate view </s>
|
funcom_train/43269074 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Concept getConcept() {
if (concept == null) {
try {
concept = (Concept) ConceptDAO.getInstance().findByPK(conceptId +
"");
} catch (DAOException e) {
if (log.isWarnEnabled()) {
log.warn(
"Failed to look up Concept with id = " +
conceptId + ".",
e);
}
}
}
return concept;
}
COM: <s> this call is always done useing a dao theres no caching </s>
|
funcom_train/44852536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public QueryResult getChilds(Long inQuestionID, Integer[] inState) throws VException, SQLException {
KeyObject lKey = new KeyObjectImpl();
lKey.setValue(QuestionHierarchyHome.KEY_PARENT_ID, inQuestionID);
lKey.setValue(BOMHelper.getKeyStates(QuestionHome.KEY_STATE, inState));
return select(lKey);
}
COM: <s> returns all childs of the specified question being in the specified states </s>
|
funcom_train/3596379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Color getEmotionColour(double evaluation, double activation) {
double hue = getEmotionHue(evaluation,activation);
if (Double.isNaN(hue))
return Color.WHITE;
double x = evaluation;
double y = activation;
double sat = Math.sqrt(x*x + y*y);
return Color.getHSBColor((float)hue,(float)sat,1.0f);
}
COM: <s> p returns the colour for the specified emotion </s>
|
funcom_train/1006118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAngleStart(Point2D p) {
// Bias the dx and dy by the height and width of the oval.
double dx = getHeight() * (p.getX() - getCenterX());
double dy = getWidth() * (p.getY() - getCenterY());
setAngleStart(-Math.toDegrees(Math.atan2(dy, dx)));
}
COM: <s> sets the starting angle of this arc to the angle that the </s>
|
funcom_train/8712545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int put(Object key, Object val) {
final Set theSet;
if (theMap.containsKey(key)) {
theSet = (Set)theMap.get(key);
} else {
theSet = new HashSet(23);
theMap.put(key, theSet);
}
theSet.add(val);
return theSet.size();
}
COM: <s> adds val to the set associated with key in the map </s>
|
funcom_train/35278021 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void calculateLocalInertia(float mass, javax.vecmath.Vector3f vector) {
if (cShape == null) {
return;
}
if (this instanceof MeshCollisionShape) {
vector.set(0, 0, 0);
} else {
cShape.calculateLocalInertia(mass, vector);
}
}
COM: <s> used internally not safe </s>
|
funcom_train/50091111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int numberOfUnplacedHeavyAtoms(IAtomContainer ac) {
int nUnplacedHeavyAtoms=0;
for (int i = 0; i < ac.getAtomCount(); i++) {
if (!ac.getAtom(i).getFlag(CDKConstants.ISPLACED) && !ac.getAtom(i).equals("H")) {
nUnplacedHeavyAtoms+=1;
}
}
return nUnplacedHeavyAtoms;
}
COM: <s> gets number of unplaced heavy atoms no flag isplaced no hydrogens </s>
|
funcom_train/38416162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removePlayer(Player player) {
if ( !players.containsKey(player.getPrimaryKey()) ) {
Debug.signal( Debug.CRITICAL, this, "removePlayer failed: key "+player.getPrimaryKey()
+" not found in "+this );
return false;
}
players.remove( player.getPrimaryKey() );
return true;
}
COM: <s> removes a player from this chat room </s>
|
funcom_train/51652647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deselect (int start, int end) {
checkWidget();
//TODO - check range
if (start == 0 && end == itemCount - 1) {
deselectAll ();
} else {
int length = end - start + 1;
if (length <= 0) return;
int [] ids = new int [length];
for (int i=0; i<length; i++) ids [i] = end - i + 1;
deselect (ids, length);
}
}
COM: <s> deselects the items at the given zero relative indices in the receiver </s>
|
funcom_train/11734176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NodePropBundle readBundle(NodeId id) throws IOException {
long start = cin.getByteCount();
NodePropBundle bundle = new NodePropBundle(id);
if (version >= BundleBinding.VERSION_3) {
readBundleNew(bundle);
} else {
readBundleOld(bundle);
}
bundle.setSize(cin.getByteCount() - start);
return bundle;
}
COM: <s> deserializes a code node prop bundle code from a data input stream </s>
|
funcom_train/7627920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void listen(PhoneStateListener listener, int events) {
String pkgForDebug = mContext != null ? mContext.getPackageName() : "<unknown>";
try {
Boolean notifyNow = (getITelephony() != null);
mRegistry.listen(pkgForDebug, listener.callback, events, notifyNow);
} catch (RemoteException ex) {
// system process dead
}
}
COM: <s> registers a listener object to receive notification of changes </s>
|
funcom_train/22002535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset(boolean resetcrc) {
header_found = part_found = trailer_found = false;
idx = max = 0;
written = total_written = 0;
linenum = 0;
decode_data = false;
// data from header
line_length = null;
header_size = null;
part = total_parts = null;
filename = null;
// data from trailer
trailer_size = null;
crc_value = pcrc_value = null;
if (resetcrc) crc.reset();
pcrc.reset();
// data from part
pbegin = pend = null;
}
COM: <s> resets the instance internal state </s>
|
funcom_train/9817918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkOrphan() {
if (getParent() != null) // You aren't orphan.
return false;
if (orphanAllowed())
return true;
// You are orphan, but it is not allowed.
throw new BuildException("Circuit element of " + getClass() +
" must have a parent in order to be constructed.");
}
COM: <s> this checks to see if you are orphan without parent </s>
|
funcom_train/7427146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setScrollDirector(final PScrollDirector scrollDirector) {
if (this.scrollDirector != null) {
this.scrollDirector.unInstall();
}
this.scrollDirector = scrollDirector;
if (scrollDirector != null) {
this.scrollDirector.install(this, (PCanvas) getView());
}
}
COM: <s> set the scroll director on this viewport </s>
|
funcom_train/7874465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Status destroyFavorite(long id) throws TwitterException {
requireCredentials();
String url = String.format("http://twitter.com/favorites/destroy/%d.json",
id);
String response = getTwitterHttpManager().post(url);
return Status.newFromJsonString(response);
}
COM: <s> un favorites the status specified in the id parameter as the authenticating </s>
|
funcom_train/49758553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createMenu(JMenu menu) {
menu.add(new JMenuItem(new AbstractAction("New comment node") {
public void actionPerformed(ActionEvent e) {
createNewCommentNode();
}
}));
menu.add(new JMenuItem(new AbstractAction("New comment edge") {
public void actionPerformed(ActionEvent e) {
createNewCommentEdge();
}
}));
}
COM: <s> the gui uses this function to create the menu for the concrete diagram </s>
|
funcom_train/17975750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ValueObject getValueObjectById( String definitionId ) {
ValueObject valueObject = this.getDefinitionByIdMap().get(definitionId);
if ( null == valueObject ) {
getLogger(this.getClass()).error("Cannot find VO definition for the given definition id <" + definitionId + ">.");
throw new DefinitionNotFoundException(definitionId);
}
return valueObject;
}
COM: <s> this method resolves a value object definition given its definition id </s>
|
funcom_train/31160233 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void waitEvents(){
try {
if (inspectors.size()>0){
notifyInspectableEvent(new InspectableEvent(this,InspectableEvent.TYPE_NEWSTATE));
}
synchronized (trapEventQueue){
if (inputEvents.size()==0){
busy=false;
trapEventQueue.notifyAll();
if (isSpy){
spy("WAIT");
spyState();
}
trapEventQueue.wait();
}
busy=true;
}
if (isSpy){
spy("[core ] AWAKED]");
spyState();
}
} catch (InterruptedException ex){
}
}
COM: <s> blocks the vm thread of control waiting for events incoming </s>
|
funcom_train/12541047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IAnnotationModel getDiffer() {
// get annotation model extension
ISourceViewer viewer= getSourceViewer();
if (viewer == null)
return null;
IAnnotationModel m= viewer.getAnnotationModel();
IAnnotationModelExtension model;
if (m instanceof IAnnotationModelExtension)
model= (IAnnotationModelExtension) m;
else
return null;
// get diff model if it exists already
return model.getAnnotationModel(IChangeRulerColumn.QUICK_DIFF_MODEL_ID);
}
COM: <s> extracts the line differ from the displayed documents annotation model </s>
|
funcom_train/1326930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void waitUntil (long time, UnitOfWork unitOfWork) throws Exception {
while (true) {
long delay = time - currentSystemTime();
if (delay < 0) {
return;
} else {
if (isFastStop() && !isRunAllowed()) {
throw new AlreadyStoppedException();
}
try {
sleep(delay);
} catch (InterruptedException e) {
handleSleepInteruptedException(e);
}
}
}
}
COM: <s> wait until the given system time before continuing </s>
|
funcom_train/39892312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean in(Host h) {
int[] arrayedAddr = parseDotted(h.dottedNetAddress);
// if error occurs
if (arrayedAddr == null)
return false;
// see whether h in this sub net according to IP address and sub net mask
for (int i = 0; i < arrayedAddr.length; i++)
arrayedAddr[i] &= intSubNetMask[i];
return compareByte(arrayedAddr, intSubNetAddr);
}
COM: <s> test if a host belongs to this sub net </s>
|
funcom_train/25753251 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept(File dir, String name) {
// Convert the file name to upper case, and compare it to image
// file extensions. Yeah, it's a bit of a hack, but whatever.
String ucName = name.toUpperCase();
return (ucName.endsWith(JPG) || ucName.endsWith(JPEG)
|| ucName.endsWith(GIF) || ucName.endsWith(PNG));
}
COM: <s> the method that must be implemented by any object that filters filenames </s>
|
funcom_train/41257282 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Move makeMove(Board board) {
startTime = System.currentTimeMillis();
resultEvaluation = rec(board, maxDepth, -evaluator.getInf(), evaluator.getInf());
if (!moveValidator.isValid(board, moveToMake))
moveToMake = null;
finTime = System.currentTimeMillis();
printLog();
nodesSearched = 0;
nodesFoundInCache = 0;
return moveToMake;
}
COM: <s> makes a move </s>
|
funcom_train/37821190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateVar(SymbolTable symbolTable) throws SymbolException {
if (declaration.getVarDecl() != null) {
List<Ident> vars = declaration.getVarDecl().getDeclaredVars();
int addressCounter = 1;
for (Ident ident : vars) {
symbolTable.add(Symbol.varSymbol(ident.getName(), addressCounter));
++addressCounter;
}
}
}
COM: <s> fills the symbol table with the declared variables </s>
|
funcom_train/32635895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void shutdownScienceApplication() {
try {
xmlrpcClient.execute("sciapp.shutdown", new Vector());
} catch (XmlRpcException e) {
SpotCheckLogger.println("SpotCheckThread.shutdown: Error shutting down science application: " + e);
} catch (IOException e) {
SpotCheckLogger.println("SpotCheckThread.shutdown: Error shutting down science application: " + e);
}
}
COM: <s> shuts down the science application via xml rpc </s>
|
funcom_train/45716050 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addYtemDef(YtemDefOJ ytemDef) {
if (ytemDefList.add(ytemDef)) {
ytemDef.setParent(this);
changed = true;
OJ.getEventProcessor().fireYtemDefChangedEvent(ytemDef.getYtemDefName(), YtemDefChangedEventOJ.YTEMDEF_ADDED);
return true;
}
return false;
}
COM: <s> append an ytem type to the end of the ytem defs list </s>
|
funcom_train/19130593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void disableImage() throws CommPortException {
MICDisableImageCommand cmd = new MICDisableImageCommand();
try {
port.addCommPortEvent(cmd);
port.open();
port.write(cmd.getSendBytes(), false);
} finally {
if (port != null) {
port.removeCommPortEvent();
port.close();
}
}
}
COM: <s> sends the disable image command </s>
|
funcom_train/42068175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addBlockStartPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CuePoint_blockStart_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CuePoint_blockStart_feature", "_UI_CuePoint_type"),
WavPackage.Literals.CUE_POINT__BLOCK_START,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the block start feature </s>
|
funcom_train/16707287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CosignConnectionList borrowCosignConnectionList() throws Exception {
rwLock.getReadLock();
try {
validatePoolState ();
return (CosignConnectionList) thePool.borrowObject();
} catch (Exception e) {
if ( log.isErrorEnabled() ) {
log.error( "Failed to borrow CosignConnectionList from pool", e );
}
throw e;
} finally {
rwLock.releaseLock();
}
}
COM: <s> this method attempts to borrow a cosign connection list from the pool </s>
|
funcom_train/18947140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void redispatchMouseEvent( MouseEvent e ) {
Point point = SwingUtilities.convertPoint( parent, e.getPoint(), container );
Component component = SwingUtilities.getDeepestComponentAt( container, point.x, point.y );
if (component == null) {
return;
}
MouseEvent converted = SwingUtilities.convertMouseEvent( parent, e, component );
component.dispatchEvent( converted );
}
COM: <s> redispatches the event br </s>
|
funcom_train/35121655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void displayingMessageLabel() {
if (JpowderInternalframe.getnumberOfJpowderInternalframe() == 1) {
chartPlotterPane.remove(messageLabel);
chartPlotterPane.repaint();
}
// if (JpowderInternalframe.getnumberOfJpowderInternalframe() == 0) {
// chartPlotterPane.add(messageLabel);
// chartPlotterPane.repaint();
// }
}
COM: <s> this methods checks for internalframe inside the chart plotter pane and if it </s>
|
funcom_train/48525458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRange(IdRange range) {
IdRange notRange = range.getComplementRange();
IdSet set = storage.scan(notRange);
Iterator i = set.getIterator();
while (i.hasNext()) {
Id next = (Id) i.next();
storage.unstore(next, new ListenerContinuation("Removal of " + next, environment));
}
}
COM: <s> this upcall is to notify the application of the range of keys for </s>
|
funcom_train/18640960 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WorkflowContainerCtx getContainer() {
if (containerCtx == null) {
Object container = getSession().getContext(
containerCtxName);
if (container instanceof WorkflowContainerCtx) {
containerCtx = (WorkflowContainerCtx) container;
} else {
throw new IllegalStateException("Invalid container: "
+ container.getClass() + " doesn't extend "+WorkflowContainerCtx.class);
}
}
return containerCtx;
}
COM: <s> returns the container context </s>
|
funcom_train/34811243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(Oligo[] oligos, int oligoLength){
StringBuffer s = new StringBuffer();
s.append(Num.formatNumberOneFraction(score)); s.append("\t");
s.append(oligos[leftFlankingIndex].getStart());s.append("\t");
s.append(peakBP);s.append("\t");
s.append(oligos[rightFlankingIndex].getStart()+oligoLength);
return s.toString();
}
COM: <s> score left peak right </s>
|
funcom_train/3560998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DbConnection getNewConnection() throws DbException {
try {
Class.forName(driver);
} catch (ClassNotFoundException e) {
throw new DbException("SQL Driver class not found", e);
}
try {
Connection conn = DriverManager.getConnection(connectString, userName, password);
conn.setAutoCommit(autoCommit);
return new DbConnection(this, conn);
} catch (SQLException e) {
System.out.println(e.getMessage());
throw new DbException(e);
}
}
COM: <s> return a brand new db connection </s>
|
funcom_train/9869433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEntrada(String newVal) {
if ((newVal != null && this.entrada != null && (newVal.compareTo(this.entrada) == 0)) ||
(newVal == null && this.entrada == null && entrada_is_initialized)) {
return;
}
this.entrada = newVal;
entrada_is_modified = true;
entrada_is_initialized = true;
}
COM: <s> setter method for entrada </s>
|
funcom_train/3861905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setThrottle(long throttle) {
if (throttle < MINIMUM_THROTTLE) {
SperoLog.DOWNLOAD.warn("The configured throttle " + throttle + " is less than the minimum throttle " + MINIMUM_THROTTLE + ". This will be overridden with the minimum throttle.");
cContext.setThrottle(new Throttle(MINIMUM_THROTTLE));
}
else {
cContext.setThrottle(new Throttle(throttle));
}
}
COM: <s> sets the throttle length in milliseconds </s>
|
funcom_train/37587376 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void currThreadDied() {
assert EventQueue.isDispatchThread();
_lock.startRead();
try {
int size = _listeners.size();
for (int i = 0; i < size; i++) _listeners.get(i).currThreadDied();
}
finally { _lock.endRead(); }
}
COM: <s> called when the current thread dies </s>
|
funcom_train/4232670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int scanData() throws IOException {
int samples = 1;
while (reader.readLine() != null) {
samples++;
}
reader.close();
reader = getReader();
int i = 0;
while (i++ < headerLength) {
reader.readLine();
}
return samples;
}
COM: <s> scan the data and determine how many samples there are in the file </s>
|
funcom_train/9877839 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean applySettings() {
boolean valid = validateValues();
if(valid) {
lem.setBinLimitsAndColors(getCutoff(0), getCutoff(1),getCutoff(2),getCutoff(3),getCutoff(4),
getColor(0), getColor(1), getColor(3), getColor(4));
}
return valid;
}
COM: <s> applies current settings to lem preview </s>
|
funcom_train/34068996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Socket verifyIfLogged(ClientPeer peer) {
if(peer.getId().equals(this.loginName)){
return null;
}
Socket socket = new Socket();
try {
socket.connect(new InetSocketAddress(InetAddress.getByName(peer.getIp()), peer.getTcpPort()), this.TIMEOUT);
} catch (Exception e) {
socket = null;
}
return socket;
}
COM: <s> this method returns a socket if a given peer is on line or </s>
|
funcom_train/34141967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private URL makeGeoURL(double lat, double lon) throws MalformedURLException {
StringBuilder url = new StringBuilder();
url.append(URL_GEO_STRING).append(lat).append(",").append(lon);
return new URL(url.toString());
}
COM: <s> prepares the url to connect to the reverse geocoding server from the </s>
|
funcom_train/27825412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireExtensionsWillChange(Collection changeInfos) {
Object[] listeners=m_listenerList.getListenerList();
for (int i=listeners.length-2;i>=0;i-=2)
if (listeners[i]==ExensionChangeListener.class)
((ExensionChangeListener)listeners[i+1]).extensionsWillChange(this,changeInfos);
}
COM: <s> fires a notification about changes </s>
|
funcom_train/14277492 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOptionRaw(byte code, byte[] buf) {
if (buf == null) { // clear parameter
this.removeOption(code);
} else {
this.setOption(new DHCPOption(code, buf)); // exception here if code=0 or code=-1
}
}
COM: <s> sets the option specified for the option </s>
|
funcom_train/13514504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TransactionRecover setRecover(int type) {
if (txnRecover == null) {
if (type == TransactionRecover.NORMAL_RECOVER) {
txnRecover = new NormalTransactionRecoverImpl(this);
} else if (type == TransactionRecover.CATASTROPHIC_RECOVER) {
txnRecover = new CatastrophicTxnRecoverImpl(this);
}
}
return txnRecover;
}
COM: <s> set transaction abort recover function </s>
|
funcom_train/3320196 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(java.awt.event.ActionEvent arg1) {
if (TargetIndexPanel.getIndexTableModel().isEmpty())
return;
int option =
JOptionPane.showConfirmDialog(
JHelpDevFrame.getAJHelpDevToolFrame(),
"Do you really want to delete all index entries?",
"Question",
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE);
if (option == JOptionPane.YES_OPTION) {
doIt();
}
}
COM: <s> clears the index and asks before </s>
|
funcom_train/1996930 | /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("<br /><br />aDoc.text(" + '"' + "link to " + '"' + ");");
aDoc.textCr(
"Link aLink = new Link("
+ '"'
+ "CrossLogic"
+ '"'
+ ","
+ '"'
+ "www.crosslogic.com)");
aDoc.text("aDoc.add(aLink);");
}
COM: <s> p renders an snippet of example source code in html </s>
|
funcom_train/16913263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected CustomToolBar createEditToolBar() {
CustomToolBar editTools = new CustomToolBar();
for (Action action : actionManager.getNetworkEditingActions()) {
editTools.add(action);
}
editTools.add(actionManager.getZeroSelectedObjectsAction());
editTools.add(actionManager.getRandomizeObjectsAction());
return editTools;
}
COM: <s> create the edit tool bar </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.