__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/37578133 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showNoLocationAlert() {
Alert alert = new Alert("Unknown Location", "A location could not " +
" be found at that position.", null, null);
alert.setType(AlertType.ERROR);
alert.addCommand(back);
alert.setCommandListener(buttonListener);
alert.setTimeout(5000);
display.setCurrent(alert);
Displayable d = display.getCurrent();
}
COM: <s> displays an alert specifying a location was not found </s>
|
funcom_train/16480589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getReg16(byte index) {
switch (index) {
case 0:
return m_state.getAX();
case 1:
return m_state.getCX();
case 2:
return m_state.getDX();
case 3:
return m_state.getBX();
case 4:
return m_state.getSP();
case 5:
return m_state.getBP();
case 6:
return m_state.getSI();
case 7:
return m_state.getDI();
default:
throw new RuntimeException();
}
}
COM: <s> returns the value of the 16bit register whose index is given </s>
|
funcom_train/4519174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private RButton getRButton2() {
if (RButton2 == null) {
RButton2 = new RButton(2);
RButton2.setText("ComMenu");
RButton2.setBounds(new Rectangle(50, 150, 100, 30));
RButton2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
(new TestComboMenu()).setVisible(true);
}
});
}
return RButton2;
}
COM: <s> this method initializes rbutton2 </s>
|
funcom_train/17732703 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testHoursRollover()
{
logger_.info("Running testHoursRollover...");
ElapsedTime elapsed = new ElapsedTime(0, ElapsedTime.DAY);
ElapsedTime compare = new ElapsedTime(1, 0, 0, 0, 0);
assertEquals("days is incorrect", compare, elapsed);
logger_.debug(elapsed);
}
COM: <s> test hours rollover 24hrs 1 day </s>
|
funcom_train/45692573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addEffectTypePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ParametersFx_effectType_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ParametersFx_effectType_feature", "_UI_ParametersFx_type"),
EsxPackage.Literals.PARAMETERS_FX__EFFECT_TYPE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the effect type feature </s>
|
funcom_train/4366487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void restoreNestedVariables() {
if (nestedVars != null) {
Iterator iter = nestedVars.iterator();
while (iter.hasNext()) {
String varName = (String) iter.next();
varName = findAlias(varName);
Object obj = originalNestedVars.get(varName);
if (obj != null) {
invokingJspCtxt.setAttribute(varName, obj);
} else {
invokingJspCtxt.removeAttribute(varName, PAGE_SCOPE);
}
}
}
}
COM: <s> restores the values of any nested variables in the invoking jsp context </s>
|
funcom_train/16571877 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getSliderPanel() {
if (sliderPanel == null) {
sliderPanel = new JPanel();
sliderPanel.setLayout(null);
sliderPanel.setName("sliderPanel");
if (orientation==VERTICAL){
sliderPanel.setBounds(3, 0, 35, 181);
}else{
sliderPanel.setBounds(5, 0, 300, 26);
}
sliderPanel.setEnabled(false);
sliderPanel.add(getSlider(), null);
}
return sliderPanel;
}
COM: <s> this method initializes slider panel </s>
|
funcom_train/31215560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean concat(final Object[] r, final List bindings) {
String cmd = "";
Object[] retobj = new Object[2];
retobj[0] = r[0];
List list = new ArrayList();
RListUtils.rlist2List((ComplexTerm) r[0], list, 0);
for (ListIterator li = list.listIterator(); li.hasNext();) {
Object o = li.next();
cmd += o;
}
if (!returnObjectMatched(r[1], cmd))
return Boolean.FALSE;
retobj[1] = cmd;
bindings.add(retobj);
return Boolean.TRUE;
}
COM: <s> concatenate a list of strings in code r 0 code </s>
|
funcom_train/31625797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteRelations() throws DBException {
List<Relation> list = getRelations();
for (Iterator<Relation> iterator = list.iterator(); iterator.hasNext();) {
Relation aRelation = iterator.next();
getLogger().debug("deleting Relation src/type: " +
aRelation.getSrcNode().getNodeTitle() + "/" +
aRelation.getRelationTypeName());
aRelation.delete();
}
}
COM: <s> delete all relations associated with this part </s>
|
funcom_train/3100646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void populateGenlPreds(CycFort cycFort) throws UnknownHostException, IOException, CycApiException {
genlPreds = cycAccess.getGenlPreds(cycFort);
genlPreds = this.filterSelectedConstants(genlPreds);
genlPreds = substituteGenlConstantsForNarts(genlPreds);
if (genlPreds.contains(cycAccess.different))
genlPreds.remove(cycAccess.different);
}
COM: <s> populates the genl preds for a cyc predicate </s>
|
funcom_train/2928036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer sb = new StringBuffer("ElementCreateRule[");
sb.append("className=");
sb.append(className);
sb.append(", attributeName=");
sb.append(attributeName);
sb.append(", idAttributeName=");
sb.append(idAttributeName);
sb.append("]");
return (sb.toString());
}
COM: <s> render a printable version of this rule </s>
|
funcom_train/17915329 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CDRArchiveEntry getEntry(String name) throws CDRArchiveEntryNotFoundException {
CDRArchiveEntry entry = null;
for(int i = 0; i < loadedCdrarEntries.size(); i++) {
entry = (CDRArchiveEntry)loadedCdrarEntries.elementAt(i);
if(entry.getName().equals(name)) {
return entry;
}
}
throw new CDRArchiveEntryNotFoundException(name);
}
COM: <s> get the cdrarchive entry matching the name specified </s>
|
funcom_train/4916843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNotConstructWork() {
// Record constructing work
this.record_enhanceOffice();
this.record_teams();
this.record_governance();
this.record_noManagedObjectsAndAdministrators();
this.record_work((RawWorkMetaData<?>) null);
this.record_noOfficeStartupTasks();
this.record_noOfficeEscalationHandler();
this.record_processContextListeners();
// Construct the office
this.replayMockObjects();
this.constructRawOfficeMetaData(true);
this.verifyMockObjects();
}
COM: <s> enable able to handle not constructing </s>
|
funcom_train/786339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkTreeMLSchema(Schema s) throws DataIOException {
for ( int i=0; i<s.getColumnCount(); ++i ) {
Class type = s.getColumnType(i);
if ( TYPES.get(type) == null ) {
throw new DataIOException("Data type unsupported by the "
+ "TreeML format: " + type.getName());
}
}
}
COM: <s> checks if all schema types are compatible with the tree ml specification </s>
|
funcom_train/25579912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int findRowIndexById(String rowID) {
if (rowIndexes.containsKey(rowID))
return rowIndexes.get(rowID);
if (rowID != null) {
for (int i = 0; i < rows.size(); i++) {
if (rowID.equals(rows.get(i).getId())) {
rowIndexes.put(rowID, i);
return i;
}
}
}
rowIndexes.put(rowID, -1);
return -1;
}
COM: <s> find the index of the row </s>
|
funcom_train/31688761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setXML(XMLResource xml) throws PopulateException {
if (isPopulated() == true && ((m_XML != null && m_XML.equals(xml) == false) || (m_XML == null && xml != null))) {
setIsChanged(true);
}
try {
m_XML = CacheHandler.getInstance(m_dsi).getCachePointer(xml);
} catch (CacheException e) {
throw new PopulateException(e.getLocalizedMessage(),e);
}
}
COM: <s> sets the code xmlresource code which determines the content to be presented </s>
|
funcom_train/44317735 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AddItem (DataMapEditor parent, DMItem itemType, DMItem target) {
super();
mParent = parent;
mItemType = itemType;
mTarget = target;
setText("Add " + mItemType.getTypeName() + "...");
setImageDescriptor(ItemImages.getImageDescriptor(itemType));
if (!target.acceptsChildren()) {
setEnabled(false);
} // if
}
COM: <s> the sole constructor </s>
|
funcom_train/3004298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendMessageToUser(Message p_message, String p_loginName) throws SendingException {
try {
p_message.setStringProperty(PROPERTY_NAME_USER, p_loginName);
_publisher.publish(p_message);
} catch (JMSException ex) {
logFatal("MessagingService.sendMessageToUser : " + ex.toString());
throw new SendingException(ex.getLocalizedMessage());
}
}
COM: <s> sends the message to a specific user </s>
|
funcom_train/34261233 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean fileSelectionIsOk(String aFile) {
if (aFile != null) {
File theFlywheelDirectoryFile = new File(getSelectedFlywheel().getDirectoryPath());
File testFile = new File(aFile);
return PersistenceHelperUtility.isAncestorOf(theFlywheelDirectoryFile, testFile);
}
else {
return false;
}
}
COM: <s> verifies if the selected file is within the workspace root </s>
|
funcom_train/18744673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AspectGraph importType() throws IOException {
AspectGraph type = null;
File typeFile = this.allFormatsChooser.getSelectedFile();
if (typeFile != null
&& this.allFormatsChooser.getFileFilter().equals(
this.getNativeFilter(FileType.TYPE))) {
type = AspectGxl.getInstance().unmarshalGraph(typeFile);
}
return type;
}
COM: <s> tries to load the currently selected file as a type graph </s>
|
funcom_train/37841213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void store(OutputStream output) throws IOException {
fireSavingProject();
for (int i = 0; i < functions.size(); i++) {
projectSettings.setProperty("function." + Integer.toString(i),
((Function) functions.elementAt(i)).toString());
}
projectSettings.setProperty("function.number", Integer.toString(functions.size()));
projectSettings.store(output, SAVE_STAMP);
dirty = false;
}
COM: <s> stores the function list into stream </s>
|
funcom_train/44586692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer buffer= new StringBuffer();
IJavaElement[] roots= getElements();
buffer.append('[');
for (int i= 0; i < roots.length; i++) {
buffer.append(roots[i].getElementName());
if (i < (roots.length - 1)) {
buffer.append(", "); //$NON-NLS-1$
}
}
buffer.append(']');
return buffer.toString();
}
COM: <s> returns a printable representation of this region </s>
|
funcom_train/38552558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connectSSC(SubSystemController ssc) throws RemoteException {
Logger.netTrace("connectSSC", this);
Cube42NullParameterException.checkNull(ssc,
"ssc",
"connectSSC",
this);
if(this.isConnected()) {
//Notifies that multiple SSC's are running on the system
Logger.fatal(SSCSystemCodes.MULTIPLE_SSC_RUNNING);
} else {
this.ssc = ssc;
}
}
COM: <s> connects the ssc to the agent </s>
|
funcom_train/21189202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assertStdoutContains(String string) throws CruiseControlException {
if (stdout.indexOf(string) < 0) {
throw new CruiseControlException(
"The stdout of the command \""
+ this.toString()
+ "\" did not contain the required string \""
+ string
+ "\". \n"
+ "Stdout: "
+ stdout
+ "Stderr: "
+ stderr);
}
}
COM: <s> asserts that the stdout of the command contains a </s>
|
funcom_train/45253035 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void closeAllPages() {
// Deactivate active page.
setActivePage(null);
// Clone and deref all so that calls to getPages() returns
// empty list (if call by pageClosed event handlers)
PageList oldList = pageList;
pageList = new PageList();
// Close all.
Iterator itr = oldList.iterator();
while (itr.hasNext()) {
WorkbenchPage page = (WorkbenchPage) itr.next();
firePageClosed(page);
page.dispose();
}
if (!closing) {
showEmptyWindowContents();
}
}
COM: <s> close all of the pages </s>
|
funcom_train/27675386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mustRead( final String sym ) {
if ( !tryRead( sym ) ) {
throw(
Alerts.parse(
"Unexpected symbol",
null
).
culprit( "found", getErrorString() ).
culprit( "wanted", sym ).
origin( this ).
mishap()
);
}
}
COM: <s> tests if the next token is the same as the specified string </s>
|
funcom_train/14227657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void terminalConnectionDropped(final CallId id, final String address, final String terminal, final int cause) {
// define action block
EventHandler eh = new EventHandler() {
public void process(Object o) {
// find, but don't create the call
FreeTerminalConnection tc = ((GenericProvider)o).getCallMgr().getCachedTermConn(id, address, terminal);
if (tc != null)
tc.toDropped(cause);
}
};
// dispatch for processing
this.getEventPool().put(eh);
}
COM: <s> receive and queue up a terminal connection dropped notification event </s>
|
funcom_train/24552296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void append(Command command) {
if (command != null) {
if (command instanceof CompoundCommand && !(command instanceof ForwardUndoCompoundCommand))
commandList.addAll(((CompoundCommand) command).commandList); // Just add them all in instead of nesting. Makes it easier to debug. The only problem is if the command could be added to after adding here, but nobody would think to do that. We wouldn't see that.
else
commandList.add(command);
}
}
COM: <s> adds a command to this compound commands list of commands </s>
|
funcom_train/21249957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getGroupID(String n) {
int i;
for(i=0;i<SNMPgroups.size();i++) {
if(SNMPgroups.get(i).name.compareToIgnoreCase(n)==0) break;
}
if(i>=SNMPgroups.size()) return (-1);
return i;
}
COM: <s> this method return index by string name of variable </s>
|
funcom_train/38351781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int calculateINV(PermutationGenotype gt) {
int[] a = gt.getIntArray();
int count = 0;
for (int i = 0; i < a.length - 1; i++) {
for (int j = i + 1; j < a.length; j++) {
if (a[i] < a[j]) {
count++;
}
}
}
return count;
}
COM: <s> this method returns the number of pairs in correct order </s>
|
funcom_train/47584440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("ComplaintS1SOAP".equals(portName)) {
setComplaintS1SOAPEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/10018053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getMemberSubstanceListOfGroup(int group) {
if (group < 0 || m_nodes[group] != GROUP_NODE) {
throw new EXISchemaRuntimeException(
EXISchemaRuntimeException.NOT_GROUP,
new String[] { String.valueOf(group) });
}
return _getMemberSubstanceListOfGroup(group, m_nodes);
}
COM: <s> returns the list of member substance particles of a group </s>
|
funcom_train/35324687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getSerialVersionUID() {
// REMIND: synchronize instead of relying on volatile?
if (suid == null) {
suid = AccessController.doPrivileged(
new PrivilegedAction<Long>() {
public Long run() {
return computeDefaultSUID(cl);
}
}
);
}
return suid.longValue();
}
COM: <s> return the serial version uid for this class </s>
|
funcom_train/23853637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startHighlighting(final JTree tree, final Subset subset) {
highlightedSubset = subset;
final Timer timer = new Timer(100, null);
highlightCounter = 0;
timer.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if (++highlightCounter == 25) {
highlightedSubset = null;
timer.stop();
}
tree.repaint();
}
});
timer.start();
}
COM: <s> highlights a subset for a few seconds then fades it out </s>
|
funcom_train/3600360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reload() throws IOException {
bundle = new PropertyResourceBundle(new BufferedInputStream(Resolver
.solveSource(propertiesFilename)));
DEFAULT_SERVER_IP = bundle.getString("DEFAULT_SERVER_IP");
DEFAULT_SERVER_PORT = Integer.parseInt(bundle.getString("DEFAULT_SERVER_PORT"));
}
COM: <s> reload from file </s>
|
funcom_train/46150207 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void commitRfidCollection() {
try {
// delete all marked entries
for (RfidToMorse rfid : this.rfidCollection) {
if (rfid.isDeleted()) {
DatabaseFactory.delete(rfid);
}
}
// update any that aren't deleted
for (RfidToMorse rfid : this.rfidCollection) {
if (!rfid.isDeleted())
DatabaseFactory.saveOrUpdate(rfid);
}
// reload the collection
this.rfidCollection.clear();
DatabaseFactory.load(RfidToMorse.class, this.rfidCollection);
} catch (Exception ex) {
ex.printStackTrace();
}
}
COM: <s> store the rfid collection in the database </s>
|
funcom_train/5402722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void uncommentKey(String key) {
for (Iterator iter = bundles.keySet().iterator(); iter.hasNext();) {
Locale locale = (Locale) iter.next();
Bundle bundle = getBundle(locale);
BundleEntry entry = getBundleEntry(locale, key);
if (entry != null) {
bundle.uncommentKey(key);
fireModify(bundle);
}
}
}
COM: <s> uncomment bundle entries matching the code key code </s>
|
funcom_train/43188952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOutputLocator(MediaLocator output) {
if (rtpmrl == null) {
System.out.println("sink: setOutputLocator " + output);
// need to validate the RTPMedialocator
try{
rtpmrl = new RTPMediaLocator(output.toString());
}catch (MalformedURLException e){
rtpmrl = null;
}
} else {
throw new Error("setOutputLocator cannot be called more than once");
}
}
COM: <s> set the output code media locator code </s>
|
funcom_train/21425482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public User updateUser(User user) throws EasyCorrectionException {
if (user == null) {
throw new EasyCorrectionException(ErrorMsgs.OBJ_NOT_FOUND
.msg("User"));
}
// Generates the password's MD5.
String password = MD5Generator.md5(user.getPassword());
user.setPassword(password);
User us = getUser(user.getUserId());
us = (User) SwapperAtributosReflect.swapObject(us, user, User.class);
DAOFactory.DEFAULT.buildUserDAO().update(us);
return us;
}
COM: <s> function used to update a user of the system </s>
|
funcom_train/47676071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int index(AdapterNode child) {
int count = childCount();
for (int i = 0; i < count; i++) {
AdapterNode n = this.child(i);
if (child.getDomNode() == n.getDomNode()) {
return i;
}
}
return -1; // Should never get here.
}
COM: <s> returns the index of the given child </s>
|
funcom_train/22710147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createMetaDataElement(Object value) throws SAXException {
if (value == null) {
throw new NullPointerException("value == null");
}
final String base64 = TSCXMLHelper.encodeMetaData(value, getLogger());
Map<String, String> atts = getNewAttributes();
atts.put(BASE64, base64);
startElement(ELEMENT_META_DATA, atts);
endElement(ELEMENT_META_DATA);
}
COM: <s> starts element for </s>
|
funcom_train/50908803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isChecked(Color c) {
jhess.pieces.King k = new King(c);
Square kingSquare = getSquareContainingPiece(k);
Color threateningColor = Color.BLACK;
if (c.equals(Color.BLACK)) {
threateningColor = Color.WHITE;
}
Collection threateningSquares = getThreateningSquares(kingSquare, threateningColor);
if (threateningSquares.isEmpty()) {
return false;
}
return true;
}
COM: <s> determine if the king of the specified color is in check </s>
|
funcom_train/9928893 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Socket openConnection(final String host, final int port) {
Socket s = null;
try {
s = new Socket();
// timeout for connection establishment is 300 ms
s.connect(new InetSocketAddress(host,port),300);
this.reader = new BufferedReader(new InputStreamReader(s.getInputStream()));
this.printstream = new PrintStream(s.getOutputStream());
}
catch (final Throwable t) {
return null;
}
return s;
}
COM: <s> opens a socket to the given host and port </s>
|
funcom_train/39468674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @ActionMethod public void convert() throws UnsupportedEncodingException {
if (usingClipboardForInput) {
input.selectAll();
input.paste();
}
output.setText(convert(getInputText()));
if (usingClipboardForOutput) {
output.selectAll();
output.copy();
}
}
COM: <s> performs a conversion </s>
|
funcom_train/38337688 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addObjectTypeNode(Template template) {
int newid = engine.getNet().nextNodeId();
ObjectTypeNode newOtn = new ObjectTypeNode(newid, engine
.getWorkingMemory(), net, template);
try {
root.addChild(newOtn);
} catch (NodeException e) {
engine.writeMessage(e.getMessage());
}
}
COM: <s> the method adds an object type node to the hash map </s>
|
funcom_train/9877920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int findIndex(int coord, int index, int start, int end) {
if(start == end)
return start;
if(coordStarts[index] > coord)
return findIndex(coord, start, (index-start)/2+start, index);
else
return findIndex(coord, index, (end-index)/2+start, end);
}
COM: <s> recursive search for loci that contains the passed coord </s>
|
funcom_train/2546827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNewTarget(WorkflowContentElementModel connectionTarget) {
if (connectionTarget == null) {
throw new IllegalArgumentException();
}
setLabel(Messages.getString("ConnectionModelReconnectCommand.1")); //$NON-NLS-1$
newSource = null;
newTarget = connectionTarget;
}
COM: <s> set a new target endpoint for this connection when execute is invoked </s>
|
funcom_train/14093627 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testProcessElement() throws XMLException {
Element element = m_fixture.newElement("assertnotnull",
new String[] {
"actualrefid", "data"});
IXMLTestCase testCase = m_fixture.getTestCase();
testCase.addProperty("data", "TEST");
m_tagHandler = new AssertNotNullTagHandler(element, testCase);
m_tagHandler.processElement();
}
COM: <s> test assertnotnull where value is not null </s>
|
funcom_train/38493252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void emptyRecordStore(String store) {
try {
RecordStore rs =
RecordStore.openRecordStore(store, true);
RecordEnumeration re = rs.enumerateRecords(null, null, true);
for (; re.hasNextElement();) {
rs.deleteRecord(re.nextRecordId());
}
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("Unable to delete recordstore: " + e);
}
}
COM: <s> deletes all records from the record store </s>
|
funcom_train/10910827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OutputStream createOutputStream(int pageNumber) throws IOException {
if (filePrefix == null) {
return null;
} else {
File f = new File(outputDir,
filePrefix + (pageNumber + 1) + "." + fileExtension);
OutputStream os = new BufferedOutputStream(new FileOutputStream(f));
return os;
}
}
COM: <s> creates a new </s>
|
funcom_train/42681680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPlugin(String pluginName,String eventsArray) {
String[] events = eventsArray.split(";");
for(String event : events) {
if(eventListeners.containsKey(event) == false)
eventListeners.put(event, new ArrayList<String>());
eventListeners.get(event).add(pluginName);
}
}
COM: <s> adds a plugin identifier the the event listener hash </s>
|
funcom_train/19176979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Map deepCopy(Map src) {
HashMap map = new HashMap();
if (src != null) {
Iterator it = src.keySet().iterator();
while (it.hasNext()) {
Object key = it.next();
Object value = src.get(key);
map.put(key,value);
}
}
return map;
}
COM: <s> deep copy of a map </s>
|
funcom_train/5395854 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testReadShort() throws Exception {
System.out.println("readShort");
BlockDataInputStream instance = null;
short expResult = 0;
short result = instance.readShort();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of read short method of class org </s>
|
funcom_train/42062158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String readData() throws TimeoutException, IOException {
synchronized (dis) {
try{
return dis.readUTF();
}catch(TimeoutException e){
throw e;
} catch (IOException e){
throw e;
} catch (Throwable t){
//this catch clause is here because
//flush() can throw NullPointerException AFAIHaveExperimented
throw new IOException(t);
}
}
}
COM: <s> this low level method reads raw data from the </s>
|
funcom_train/31346399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Project (int id, String name, String description, String url,
User leader, DevTeamIterator devTeams) {
super (id);
if (null == name)
throw new IllegalArgumentException("The name of a project can not be null");
this.id = id;
this.name = name;
this.description = description;
this.url = url;
this.leader = leader;
this.devTeams = devTeams;
COM: <s> creates a new project based on the passed values </s>
|
funcom_train/10666067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String printCtx(Context ctx) {
String msg = "\n";
try {
msg += " Context name: '" + ctx.getNameInNamespace() + "'";
if (ctx instanceof DirContext) {
msg += "\n Attributes: "
+ ((DirContext) ctx).getAttributes("") + "\n";
}
} catch (NamingException e) {
e.printStackTrace();
}
return msg;
}
COM: <s> string representation of the context object </s>
|
funcom_train/27946101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getPropertyValue() throws IllegalStateException {
if (isValid()) {
DataFolder old = df;
try {
df = getTargetFolder(true);
return df;
} catch (IOException x) {
TopManager.getDefault().notifyException(x);
throw new IllegalStateException();
}
} else {
throw new IllegalStateException();
}
}
COM: <s> get the customized property value </s>
|
funcom_train/18223608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNotesInNumbers() {
String result = "";
Note note = null;
for (int i = 0; i < sequence.size(); i++) {
note = (Note) sequence.elementAt(i).clone();
result += note.getNote();
result += " ";
result += note.getOffset();
result += " ";
result += note.getDuration();
result += " ";
result += note.getVelocity();
result += " ";
}
result = result.trim();
return (result);
}
COM: <s> provide string representation of melody notes as group of numbers </s>
|
funcom_train/50858514 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getView(String name) throws ApplicationException {
Object result = null;
try {
Component component = (Component)views.get(name);
if(component != null) {
ComponentFactory factory = new ComponentFactory();
result = factory.getInstance(component);
}
} catch(Exception e) {
Debug.log(e);
throw new ApplicationException(e);
}
return result;
}
COM: <s> returns view by name </s>
|
funcom_train/16580812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JButton getBLagY() {
if (bLagY == null) {
bLagY = new JButton();
bLagY.setBounds(new java.awt.Rectangle(270,7,28,26));
bLagY.setIcon(iaddpoint);
bLagY.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
operations.setAccepted(false);
matrixCADTool.addOption("lagY");
}
});
}
return bLagY;
}
COM: <s> this method initializes b lag y </s>
|
funcom_train/42680722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void from16Bit(int rgb) {
this.r = (rgb >> 11) << 3;
this.g = ((rgb & DXTMask.GREEN_2BYTE.getMask()) >> 5) << 2;
this.b = ((rgb & DXTMask.BLUE_2BYTE.getMask()) >> 0) << 3;
}
COM: <s> gets the red green and blue from integer </s>
|
funcom_train/25935095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onCreate() {
super.onCreate();
res= this.getResources();
bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
if (bluetoothAdapter == null) {
bDeviceSupportsBluetooth=false;
Log.e(this.getClass().getName(), "Device does not support bluetooth. Service will not start");
//TODO: create notification that bluetooth is not support on current device
}else {
bDeviceSupportsBluetooth=true;
}
}
COM: <s> create the service but do not setup the listeners </s>
|
funcom_train/51412509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initialize() {
tFieldWinActionType = new JTextField();
tFieldWinActionType.setEditable(false);
JPanel northPanel = new JPanel();
northPanel.setLayout(new BoxLayout(northPanel, BoxLayout.Y_AXIS));
northPanel.add(GUITools.createDetailPanel(
Lang.getLang().getString(LangItems.GENERAL_ACTION),
tFieldWinActionType
));
setLayout(new BorderLayout());
add(northPanel, BorderLayout.NORTH);
}
COM: <s> initializes the panel </s>
|
funcom_train/13492561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean print(final Object[] r, final String end) {
String sep = (r.length == 2) ? (String) r[1] : "";
StringBuffer sb = print(r[0], sep);
if (!end.equals("\n")) {
sb.append(end);
print(sb.toString());
} else {
println(sb.toString());
}
return true;
}
COM: <s> optimised version of print println </s>
|
funcom_train/9526744 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void print (PrintStream out) {
if (systemId != null) out.println ("<!DOCTYPE " + rootNode.getName () + " SYSTEM \"" + systemId + "\">");
if (publicId != null) out.println ("<!DOCTYPE HTML PUBLIC \"" + publicId + "\">");
print (out, rootNode, "");
}
COM: <s> prints this document </s>
|
funcom_train/29937885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isGrammar(IPath folderPath, String name) {
Collection<Grammar> targets = getAllElements();
IPath path = folderPath.addTrailingSeparator().append(name);
for (Grammar target : targets) {
IPath sourcePath = target.sourcePath();
if (sourcePath.equals(path)) {
return true;
}
}
return false;
}
COM: <s> returns true if the given file path corresponds to a grammar false </s>
|
funcom_train/36074036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void logout() throws RemoteException {
if (!this.getPlayer().isPlaying()) {
logger.debug(String.format("Logout issued by %s", this.getID()));
Login.logout(this);
} else {
throw new UnsupportedOperationException("Can't perform logout" +
" during a game");
}
}
COM: <s> logout from the server </s>
|
funcom_train/28763355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStartedTime(java.math.BigDecimal value) throws com.intersys.objects.CacheException {
com.intersys.cache.Dataholder dh = new com.intersys.cache.Dataholder (value);
mInternal.setProperty(ii_StartedTime, jj_StartedTime,kk_StartedTime, com.intersys.objects.Database.RET_PRIM, "StartedTime", dh);
return;
}
COM: <s> sets new value for code started time code </s>
|
funcom_train/2537108 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int identifyFontTag(LexicalUnit lu) {
//0: Unknown
//1: font-size
//2: font-weight
//3: font-style
//4: font-family
if (CSSKeywords.isMeasuringUnit(lu)) {
if (lu.getFloatValue() >= 100) return 2;
else return 1;
}
if (CSSKeywords.isFontWeight(lu)) return 2;
if (CSSKeywords.isFontFamily(lu)) return 4;
if (CSSKeywords.isFontStyle(lu)) return 3;
return 0;
}
COM: <s> identifies the parameter type in a font tag </s>
|
funcom_train/28325543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List smartList(Class fromClass, String[] projections, String[] whereEqual,Object[] parameters, OrderBy[] orderBy) {
return smartList(fromClass, projections, WhereClause.getWhereClauseFromStringsEq(whereEqual, parameters), orderBy);
}
COM: <s> return list of pojos </s>
|
funcom_train/17203603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GraphNodeEnumeration outNodes() {
return new GraphNodeEnumeration() {
private GraphNode elt = getLHS();
public boolean hasMoreElements() {
return elt != null;
}
public GraphNode next() {
GraphNode x = elt;
elt = null;
return x;
}
public GraphNode nextElement() {
return next();
}
};
}
COM: <s> return an enumeration of the equations which use the result of this </s>
|
funcom_train/11016619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(byte value) {
switch(value) {
case ErrorConstants.ERROR_NULL:
case ErrorConstants.ERROR_DIV_0:
case ErrorConstants.ERROR_VALUE:
case ErrorConstants.ERROR_REF:
case ErrorConstants.ERROR_NAME:
case ErrorConstants.ERROR_NUM:
case ErrorConstants.ERROR_NA:
_value = value;
_isError = true;
return;
}
throw new IllegalArgumentException("Error Value can only be 0,7,15,23,29,36 or 42. It cannot be "+value);
}
COM: <s> set the error value for the cell </s>
|
funcom_train/262177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize(Properties properties) {
if (properties != null) {
this.properties.putAll(properties);
}
getConfigurationPanel().setCommPort(
this.properties.getProperty(PROPERTY_NAMES[0]));
try {
getConfigurationPanel().setModel(
Integer.parseInt(this.properties
.getProperty(PROPERTY_NAMES[1])));
} catch (NumberFormatException nfe) {
}
try {
computerModel = getCurrentModel();
} catch (InvalidConfigurationException e) {
LOGGER.log(Level.SEVERE,
Messages.getString("suunto.model_invalid"), e);
}
}
COM: <s> initialize this object with the values from the gui panel </s>
|
funcom_train/49469281 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void begin() throws SQLException {
enter(); // depth++
checkState(); // always as this is a transaction
if (readOnly || !transactions) { throw new IllegalStateException(txStateErr); }
if (intx) { throw new IllegalStateException(txInProgress); }
// JDBC sends 'BEGIN' automatically with first SQL...
intx=true;
havePartiallyCommited=false;
_logger.trace("Begin transaction ("+callDepth+")");
}
COM: <s> begin a transaction </s>
|
funcom_train/41026109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton() {
if (jButton == null) {
jButton = new JButton();
jButton.setText(Messages.getString("BluetoothDiscoveryPanel.search"));
jButton.setFont(Matereal.getInstance().getDefaultFont());
jButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
discovery();
}
});
}
return jButton;
}
COM: <s> this method initializes j button </s>
|
funcom_train/15614307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer getNumberOfErrors() {
Integer numberOfErrors = this.getGlobalErrors().size();
for (String fieldId : this.fieldErrors.keySet()) {
List<String> errors = this.fieldErrors.get(fieldId);
numberOfErrors = numberOfErrors + errors.size();
}
return numberOfErrors;
}
COM: <s> number of errors in this result </s>
|
funcom_train/37827508 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
System.err.println(name + " session handed control");
User u = (User) users.get(0);
for(int i = 0; i < datafile.size(); i++)
u.getWbOut().println((String) datafile.elementAt(i));
u.getWbOut().println("ENDDATAFILE");
u.getChatOut().println("Welcome to the " + name + " session, " + u.getUserName());
}
COM: <s> p i right now this is a stub </s>
|
funcom_train/2811502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int addAllToMembers (Collection pMembersList) {
if (pMembersList == null) {
throw new RuntimeException("Attempted to add null container to WFRole#Members!");
}
int lInserted=0;
for(Iterator it = pMembersList.iterator(); it.hasNext(); ) {
try {
WFResource lMembers = (WFResource)it.next();
addMembers( lMembers );
++lInserted;
} catch(Throwable t) {
continue;
}
}
return lInserted;
}
COM: <s> adds all elements in p members list to association members </s>
|
funcom_train/18027315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cancel() {
DataSource dss= this.dataSource; // Note not getDataSource, which is synchronized.
if ( dss != null && dss.asynchronousLoad() && !dom.controller.isHeadless()) {
ProgressMonitor monitor= mon;
if (monitor != null) {
logger.info("cancel running request");
monitor.cancel();
}
}
}
COM: <s> cancel the loading process </s>
|
funcom_train/24513566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void jbtnReplace_actionPerformed(ActionEvent e) {
operation = OP_REPLACE;
replaceChoice = RO_YES;
hide();
if( mode == MODE_PROJECT &&
jcbProject.isSelected() &&
listeners.size() > 0)
{
fireGetFirstDocument();
}
else {
initFind();
replace();
}
}
COM: <s> perform a replace when button replace is pressed </s>
|
funcom_train/3045789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Connection getConnection() throws SQLException {
// get a connection from the pool (thru DriverManager, cfr. Proxool doc)
Connection c = DriverManager.getConnection(proxoolAlias);
// set the Transaction Isolation if defined
if (isolation!=null) c.setTransactionIsolation( isolation.intValue() );
// toggle autoCommit to false if set
if ( c.getAutoCommit()!=autocommit ) c.setAutoCommit(autocommit);
// return the connection
return c;
}
COM: <s> grab a connection </s>
|
funcom_train/31678851 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Real normalize() {
int digitError = this._error.digitLength();
int scale = 9 - digitError;
if (scale >= 0) return this; // Small error.
Real z = FACTORY.object();
z._significand = _significand.times10pow(scale);
z._error = _error.times10pow(scale).plus(LargeInteger.ONE);
z._exponent = _exponent - scale;
return z;
}
COM: <s> normalizes this real maintains error less than 31 bits </s>
|
funcom_train/5708949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void storeMail( String recipient, String text, String subject, String mailFrom ) {
org.hibernate.Session session = HibernateUtil.currentSession();
DuneMail mail = new DuneMail();
mail.setBody(text);
mail.setCreatedDtm(new Date());
mail.setRecipient(recipient);
mail.setStatus(DuneMail.CREATED);
mail.setSubject(subject);
mail.setTries(0);
mail.setMailFrom( mailFrom );
session.save( mail );
}
COM: <s> this method is called from within dune and not from the batch app </s>
|
funcom_train/20334059 | /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 (obj instanceof LocationObject) {
LocationObject cmp=(LocationObject)obj;
if (getLocation()!=cmp.getLocation() &&
(getLocation()==null || !getLocation().equals(cmp.getLocation()))
) return false;
return true;
}
return false;
}
COM: <s> test the equality of this code location object code </s>
|
funcom_train/7292333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int handleGetYearLength(int extendedYear) {
if (civil) {
return 354 + (civilLeapYear(extendedYear) ? 1 : 0);
} else {
int month = 12*(extendedYear-1);
return (int)(trueMonthStart(month + 12) - trueMonthStart(month));
}
}
COM: <s> return the number of days in the given islamic year </s>
|
funcom_train/38999307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void countReferencesFromReferenceInfo() throws Exception {
countReferencesFromReferenceInfo(TagValues.CONSTANT_Methodref);
countReferencesFromReferenceInfo(TagValues.CONSTANT_Fieldref);
//Todo following needs to be reviewed. It might keep little extra information.
countReferencesFromReferenceInfo(TagValues.CONSTANT_InterfaceMethodref);
}
COM: <s> go to each entry of reference info </s>
|
funcom_train/9874552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JRadioButtonMenuItem createJRadioButtonMenuItem(String name, String command, ActionListener listener, ButtonGroup buttonGroup, boolean isSelected) {
JRadioButtonMenuItem item = new JRadioButtonMenuItem(name);
item.setActionCommand(command);
item.addActionListener(listener);
item.setSelected(isSelected);
if (buttonGroup != null) {
buttonGroup.add(item);
}
return item;
}
COM: <s> creates a radio button menu item with specified name acton command and state </s>
|
funcom_train/28262865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
String text = this.localPort + this.localPort + this.localPort + this.localPort +
this.localPort + this.localPort + this.localPort + this.localPort;
Thread t = new Thread(this);
t.start();
//System.out.println("Start receiver thread-----------------------------------------");
rx.start();
//System.out.println("Start transmitter thread--------------------------------------");
tx.start();
//System.out.println("Transmission has started, feel free to write!");
}
COM: <s> starts the chat session </s>
|
funcom_train/25291036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getBackFaceNormalFlip() {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_NORMAL_FLIP_READ))
throw new CapabilityNotSetException(Ding3dI18N.getString("PolygonAttributes6"));
return ((PolygonAttributesRetained)this.retained).getBackFaceNormalFlip();
}
COM: <s> gets the back face normal flip flag </s>
|
funcom_train/42035069 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dispose() {
while (imagesStack.size() > 1) {
try {
pop();
} catch (Exception e) {
// Plow on, but log first.
Logger.getLogger(DrawContext.class.getName()).log(Level.WARNING, "error disposing images " + imagesStack.size(), e);
}
}
imagesStack = null;
infoStack = null;
}
COM: <s> dispose all but the original graphics assuming any remain </s>
|
funcom_train/37450915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Annotation getDefinition( CvObject cvObject ) {
for ( Iterator iterator = cvObject.getAnnotations().iterator(); iterator.hasNext(); ) {
Annotation annotation = (Annotation) iterator.next();
if ( definitionTopic.equals( annotation.getCvTopic() ) ) {
return annotation;
}
}
return null;
}
COM: <s> return a definition for the given cv object </s>
|
funcom_train/37790467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent ae) {
if (params == null)
params = new Object[1];
params[0] = ae;
try {
methodToCall.invoke(target, params);
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
}
COM: <s> reroutes it to a method </s>
|
funcom_train/45623142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSilverlightApplicationPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DocumentRoot_silverlightApplication_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DocumentRoot_silverlightApplication_feature", "_UI_DocumentRoot_type"),
MSBPackage.eINSTANCE.getDocumentRoot_SilverlightApplication(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the silverlight application feature </s>
|
funcom_train/41164794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(ToLinks entity) {
EntityManagerHelper.log("deleting ToLinks instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(ToLinks.class, entity.getLinksId());
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 to links entity </s>
|
funcom_train/2904348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean verify(File src, File trgt, String alias) throws GeneralSecurityException, IOException{
PublicKey pbcKey = kStore.getCertificate(alias).getPublicKey();
sign.initVerify(pbcKey);
FileInputStream fsrc = new FileInputStream(src);
byte[] buff = new byte[fsrc.available()];
fsrc.read(buff, 0, buff.length);
sign.update(buff, 0, buff.length);
fsrc.close();
FileInputStream ftrgt = new FileInputStream(trgt);
byte[] sbuff = new byte[ftrgt.available()];
ftrgt.read(sbuff, 0, sbuff.length);
ftrgt.close();
return sign.verify(sbuff);
}
COM: <s> verify a signed file </s>
|
funcom_train/25372479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String instanceToMatlab(Instance inst) {
StringBuffer result;
int i;
result = new StringBuffer();
// attributes
for (i = 0; i < inst.numAttributes(); i++) {
if (i > 0)
result.append((m_UseTabs ? "\t" : " "));
result.append(m_Format.format(inst.value(i)));
}
return result.toString();
}
COM: <s> turns the instance into a matlab row </s>
|
funcom_train/19411825 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setupComponents(Component[] comps) {
if (comps != null)
for (int i = 0;i<comps.length;i++) {
JPanel p = new JPanel(new FlowLayout(FlowLayout.LEADING));
p.add(comps[i]);
tabPane.add(comps[i].getName(), p);
}
}
COM: <s> setup the components of this dialog </s>
|
funcom_train/21973609 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkClassloadersNameMatchPrefix(final String classPrefix) {
return checkClassloaders(new Predicate() {
public boolean matches(ClassLoader classloader) {
log.debug("Testing prefix "+classPrefix+" "+(classloader.getClass().getName().startsWith(classPrefix)));
return classloader.getClass().getName().startsWith(classPrefix);
}
});
}
COM: <s> utility method to help match environments for class loader prefixes </s>
|
funcom_train/12181164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Format findFormat(String element) {
Format result = null;
if (element != null) {
Iterator iterator = formats.iterator();
while (iterator.hasNext() && result == null) {
Format format = (Format) iterator.next();
if (element.equals(format.getFormatType().getElementName())) {
result = format;
}
}
}
return result;
}
COM: <s> search for the format in the formats list </s>
|
funcom_train/13287076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("name", this.getName())
.append("email", this.getEmailAddress())
.append("ip", this.getInternetAddress())
.toString();
}
COM: <s> returns a string representation of this author </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.