__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/47304675 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addTab(String name, DataEntryPanel panel) {
tabbedPane.addTab(name, panel.getPanel());
panels.add(panel);
if (panel instanceof ChangeListeningDataEntryPanel) {
((ChangeListeningDataEntryPanel) panel).addErrorTextListener(this);
}
}
COM: <s> adds the given panel as a tab of this panel </s>
|
funcom_train/20535175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBoton8() {
if (boton8 == null) {
boton8 = new JButton();
boton8.setBounds(new Rectangle(214, 424, 174, 32));
boton8.setText("Matricula");
boton8.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
control.pedirArchivo("matricula");
}
});
}
return boton8;
}
COM: <s> this method initializes boton8 </s>
|
funcom_train/29932942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DataColumn getColumn(String columnName) throws IESException{
DataColumn currentColumn;
Enumeration<Object> en = this.columns.elements();
this.reset();
while (en.hasMoreElements()) {
currentColumn = (DataColumn)en.nextElement();
if (columnName.compareToIgnoreCase(currentColumn.getName()) == 0) {
return currentColumn;
}
}
// return null... this is acceptable
return null;
}
COM: <s> get a column from the datatable </s>
|
funcom_train/12195025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTerminateCallsCheckStatus() {
AbstractRepository repository = createTestableRepository();
repository.terminating = true;
repository.terminated = true;
try {
repository.terminate();
fail("The terminate() method is not calling checkStatus() or " +
"checkStatus() is broken.");
} catch (RepositoryException e) {
// Success;
}
}
COM: <s> tests that the terminate method calls check status </s>
|
funcom_train/50714572 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireSelectionChanged(final SelectionChangedEvent event) {
Object[] listeners = selectionChangedListeners.getListeners();
for (int i = 0; i < listeners.length; ++i) {
final ISelectionChangedListener l = (ISelectionChangedListener) listeners[i];
Platform.run(new SafeRunnable() {
public void run() {
l.selectionChanged(event);
}
});
}
}
COM: <s> alerts all listeners to any changes </s>
|
funcom_train/3619204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDepthPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ImageData_depth_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ImageData_depth_feature", "_UI_ImageData_type"),
EclipsesrsPackage.Literals.IMAGE_DATA__DEPTH,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the depth feature </s>
|
funcom_train/37076758 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireSingleChange(AnnotationChangeEvent ace) {
ace.setSingularEventState(true); // says this is the only event coming (->redraw)
ChangeList acc = createCoalescer();
acc.addChange(ace);
acc.executeChanges(); // checks for gene,transcript,and translation changes
//annotCngListener.handleAnnotationChangeEvent(ace);
//fireEditSessionDoneEvent(); // ??
}
COM: <s> this will handle firing annotation change event if only one in the series </s>
|
funcom_train/18758241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connectToServer() throws IOException {
if(socket==null){
socket = new Socket(server, port);
try {
serverInput = new ObjectInputStream(socket.getInputStream());
serverOuput = new ObjectOutputStream(socket.getOutputStream());
} catch (IOException e) {
socket = null;
throw e;
}
}
}
COM: <s> makes the connection to the sever </s>
|
funcom_train/27788914 | /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();
sb.append("UserProfileBean: user= " + username);
sb.append(newline);
sb.append("UserProfileBean: userDN= " + userDN);
sb.append(newline);
sb.append("UserProfileBean: emailAddress= " + emailAddress);
sb.append(newline);
sb.append("UserProfileBean: proxyFilename= " + proxyFilename);
sb.append(newline);
sb.append(resourceList.toString());
sb.append(newline);
sb.append(jobHistory.toString());
return sb.toString();
}
COM: <s> return a string representation of a user profile bean </s>
|
funcom_train/23898536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isTextNode() {
String nodeName = getNodeName();
boolean result = Node.TEXT_NODE == getNodeType();
if (result) {
lgr.debug("Is TextNode");
} else {
lgr.debug("Not a TextNode: " + nodeName);
}
return result;
}
COM: <s> check if node is text node </s>
|
funcom_train/3362998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setJMenuBar(JMenuBar menu) {
if(menuBar != null && menuBar.getParent() == layeredPane)
layeredPane.remove(menuBar);
menuBar = menu;
if(menuBar != null)
layeredPane.add(menuBar, JLayeredPane.FRAME_CONTENT_LAYER);
}
COM: <s> adds or changes the menu bar used in the layered pane </s>
|
funcom_train/7613471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getKeyDispatchingTimeout() {
synchronized(service) {
HistoryRecord r = getWaitingHistoryRecordLocked();
if (r == null || r.app == null
|| r.app.instrumentationClass == null) {
return ActivityManagerService.KEY_DISPATCHING_TIMEOUT;
}
return ActivityManagerService.INSTRUMENTATION_KEY_DISPATCHING_TIMEOUT;
}
}
COM: <s> returns the key dispatching timeout for this application token </s>
|
funcom_train/49836834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeChatEventListener(ChatEvent listener) {
synchronized(lastRead) {
lastRead.remove(listener);
addMessage(
new Message(Message.MESSAGE_CONTROL, "#" + name, listener.getName() + " has left the room!", true)
);
}
// clean data
if(size() == 0) clean();
}
COM: <s> a listener is removed from the notification list </s>
|
funcom_train/6220164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getDisplayValue(final XObject value, final Locale locale) {
Locale l = null;
if (value == null || value instanceof Undef) {
return String.format(l, "%.2f", Float.valueOf(0));
}
String val = String.format(l, "%.2f", value.toNumber());
return val.replace('.', this.getProperty("separator", ".").charAt(0));
}
COM: <s> return the display value for this decimal field </s>
|
funcom_train/13958240 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int _groupByOrHavingIndex(EOSQLExpression expression) {
String sql = expression.statement();
int groupByInsertIndex = sql.lastIndexOf(" ORDER BY ");
if (groupByInsertIndex == -1) {
groupByInsertIndex = sql.lastIndexOf(" LIMIT ");
if (groupByInsertIndex == -1) {
groupByInsertIndex = sql.length();
}
}
return groupByInsertIndex;
}
COM: <s> returns the index in the expressions statement where group by and having </s>
|
funcom_train/5572408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setThrownStackTrace(ThrowableInformation throwableInfo) {
String[] stackTraceArray = throwableInfo.getThrowableStrRep();
StringBuffer stackTrace = new StringBuffer();
String nextLine;
for (int i = 0; i < stackTraceArray.length; i++) {
nextLine = stackTraceArray[i] + "\n";
stackTrace.append(nextLine);
}
_thrownStackTrace = stackTrace.toString();
}
COM: <s> set stack trace information associated with this log4 jlog record </s>
|
funcom_train/18090751 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFileDropTarget(final java.awt.Component comp) {
final DropListener listener = new DropListener() {
public void filesDropped(java.io.File[] files) {
fireFileDropHappened(files);
} // end filesDropped
}; // end listener
final boolean recursive = true;
new FileDrop(comp, recursive, listener);
} // end newDropTarget
COM: <s> registers a component as a drop target </s>
|
funcom_train/6476525 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() {
Logger.enter("Activy:reset() - " + this, CLASS_LOG_LEVEL);
super.putArguments(this.originalActivity.getArguments());
super.putFunctor(this.originalActivity.getFunctor());
this.nextChildIndex = 0;
// Set the activity type
this.setType();
}
COM: <s> rest this activy </s>
|
funcom_train/2806275 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeCartItem(int index, LocalDispatcher dispatcher) throws CartItemModifyException {
if (index < 0) return;
if (cartLines.size() <= index) return;
ShoppingCartItem item = (ShoppingCartItem) cartLines.remove(index);
// set quantity to 0 to trigger necessary events
item.setQuantity(0.0, dispatcher, this);
}
COM: <s> remove an item from the cart object </s>
|
funcom_train/42822512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getExpensesummaryCommand() {
if (expensesummaryCommand == null) {//GEN-END:|79-getter|0|79-preInit
// write pre-init user code here
expensesummaryCommand = new Command("Expense Summary", Command.SCREEN, 0);//GEN-LINE:|79-getter|1|79-postInit
// write post-init user code here
}//GEN-BEGIN:|79-getter|2|
return expensesummaryCommand;
}
COM: <s> returns an initiliazed instance of expensesummary command component </s>
|
funcom_train/4404802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toBinaryString() {
StringBuffer str = new StringBuffer();
for ( BigInteger deg = degree(); deg.compareTo( BigInteger.ZERO ) >= 0; deg = deg.subtract( BigInteger.ONE ) ) {
if ( degrees.contains( deg ) ) {
str.append( "1" );
} else {
str.append( "0" );
}
}
return str.toString();
}
COM: <s> returns a string of binary digits presenting this polynomial </s>
|
funcom_train/22439306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getListControl(Composite parent) {
if (_list == null) {
_list = new List(parent, SWT.BORDER | SWT.SINGLE | SWT.V_SCROLL | SWT.H_SCROLL);
_list.addSelectionListener(getSelectionListener());
_list.addDisposeListener(new DisposeListener() {
public void widgetDisposed(DisposeEvent event) {
_list = null;
}
});
} else {
checkParent(_list, parent);
}
return _list;
}
COM: <s> returns this field editors list control </s>
|
funcom_train/23411171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addExpirationConditionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Norm_expirationCondition_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Norm_expirationCondition_feature", "_UI_Norm_type"),
OMPackage.Literals.NORM__EXPIRATION_CONDITION,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the expiration condition feature </s>
|
funcom_train/8671150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean applyFilter(Node node, int nodeType) {
if (fFilter != null && (fWhatToShowFilter & nodeType) != 0) {
short code = fFilter.acceptNode(node);
switch (code) {
case NodeFilter.FILTER_REJECT :
case NodeFilter.FILTER_SKIP :
return false; // skip the node
default : // fall through..
}
}
return true;
}
COM: <s> applies a filter on the node to serialize </s>
|
funcom_train/18466573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void paintImages() {
setupDummy();
if (dummyG != null && imageMap != null) {
for (Image img : imageMap.values()) {
dummyG.drawImage(img, 0, 0, comp.getWidth(), comp.getHeight(),
observer);
}
} else {
System.out.println("PreLoadingImageLoader - Cannot load: dummyG="
+ dummyG + ", imageMap=" + imageMap);
}
}
COM: <s> paints all the images in the map to the dummy image </s>
|
funcom_train/35194771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getPackageName(File f) {
String[] segments = f.toString().split(File.separator);
String sofar = "";
for (int i = 0; i < segments.length; i++) {
sofar += segments[i] + File.separator;
if (sofar.equals(projectRoot)) {
String toReturn = "";
for (int j = i+1; j < segments.length - 1; j++) {
toReturn += segments[j] + ".";
}
toReturn += segments[segments.length-1];
return toReturn;
}
}
return null;
}
COM: <s> returns the package name of the given directory does this by </s>
|
funcom_train/17832866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void expandNewPack(File file, File dist) {
URL url = null;
try {
url = file.toURL();
}
catch (MalformedURLException e) {
Log.error(e);
}
String name = URLFileSystem.getName(url);
File directory = new File(dist, name);
// Unzip contents into directory
unzipPack(file, directory.getParentFile());
}
COM: <s> expands any zipped emoticon packs </s>
|
funcom_train/34807203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getPropertyValue(Element property) {
NodeList nodes = property.getElementsByTagName("VALUE");
if (nodes == null || nodes.getLength() == 0) {
return "";
}
Element value = (Element)nodes.item(0);
return value.getTextContent();
}
COM: <s> get property value </s>
|
funcom_train/21686651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getPlayToneCommand() {
if (playToneCommand == null) {//GEN-END:|38-getter|0|38-preInit
// write pre-init user code here
playToneCommand = new Command("Play entered tone", Command.OK, 0);//GEN-LINE:|38-getter|1|38-postInit
// write post-init user code here
}//GEN-BEGIN:|38-getter|2|
return playToneCommand;
}
COM: <s> returns an initiliazed instance of play tone command component </s>
|
funcom_train/31626131 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCompletionDetail(CreationDetails oneDetail) throws DBException {
if (this.getStatus().equals(STATUS_NEW) && this.get(FLD_ID) == null) {
completionDetails.add(oneDetail);
} else {
oneDetail.set(CreationDetails.FLD_WIZARD_ID, this.get(FLD_ID));
oneDetail.update();
}
}
COM: <s> adds a completion detail to the definition </s>
|
funcom_train/22028789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getKey(int n) {
String card = getCard(n);
if (card == null) {
return null;
}
String key = card.substring(0,8);
if (key.charAt(0) == ' ') {
return "";
}
if (key.indexOf(' ') >= 1) {
key = key.substring(0,key.indexOf(' '));
}
return key;
}
COM: <s> get the nth key in the header </s>
|
funcom_train/12681251 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeSupport(Mini selectedMini,Support support) {
Field f = this.getField(selectedMini);
List<Field> list=support.getSupportKeep().getFieldKeeped(f);
for (Field field : list) {
logger.info("Remove Support["+support.toString()+"] en"+field.toString());
field.getSupports().remove(support);
}
}
COM: <s> remove selected minis support </s>
|
funcom_train/3365451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BasicButtonListener getButtonListener(AbstractButton b) {
MouseMotionListener[] listeners = b.getMouseMotionListeners();
if (listeners != null) {
for (int counter = 0; counter < listeners.length; counter++) {
if (listeners[counter] instanceof BasicButtonListener) {
return (BasicButtonListener)listeners[counter];
}
}
}
return null;
}
COM: <s> returns the button listener for the passed in button or null if one </s>
|
funcom_train/25028991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File makeNewFile() {
File file;
do {
fileIndex++;
// ensures that no repeat of name in current session
// check exisiting files to ensure unique name
} while ((file = new File("NewFile" + fileIndex + ".txt")).exists());
// okay to return mutable file since created it anew in this fn?
// true--prob only unwise if accessor, which gives instance field
return file;
}
COM: <s> makes new file with next non existent file of name format </s>
|
funcom_train/29036624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addLiteralsTextPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Connection_literalsText_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Connection_literalsText_feature", "_UI_Connection_type"),
SystemPackage.Literals.CONNECTION__LITERALS_TEXT,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the literals text feature </s>
|
funcom_train/37611475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TestStatisticsMap reset() {
final TestStatisticsMap result =
new TestStatisticsMap(m_statisticsSetFactory);
new ForEach() {
public void next(Test test, StatisticsSet statistics) {
final StatisticsSet snapshot;
synchronized (statistics) {
snapshot = statistics.snapshot();
statistics.reset();
}
if (!snapshot.isZero()) {
result.put(test, snapshot);
}
}
}
.iterate();
return result;
}
COM: <s> reset all our statistics and return a snapshot </s>
|
funcom_train/45453325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedAssignees(final String[] selectedAssignees) {
if (selectedAssignees == null) {
this.selectedAssignees = null;
return;
}
this.selectedAssignees = new String[selectedAssignees.length];
for (int i = 0; i < selectedAssignees.length; i++) {
this.selectedAssignees[i] = selectedAssignees[i];
}
}
COM: <s> sets the indices of the selected assignees </s>
|
funcom_train/18320569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void showMoveOffsetFeedback(LabelMoveRequest request) {
if (originalOffset == null) {
originalOffset = getLabelFigure().getOffset();
}
Dimension offset = ConnectionLabelOffsetLocator.getNearestOffset(
request.getLocation(), getLabelFigure());
getLabelFigure().setOffset(offset);
}
COM: <s> shows feedback when an offset is being moved </s>
|
funcom_train/10981704 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStrutsFacesExample2() throws Exception {
WebClient webClient = new WebClient();
URL url = new URL("http://localhost:"
+ port + "/struts-faces-example2-" + version);
HtmlPage page = (HtmlPage) webClient.getPage(url);
assertEquals("Struts+Tiles+Faces Example Application",
page.getTitleText());
}
COM: <s> verify that the struts faces example 2 app has started </s>
|
funcom_train/9679911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTestConstructor() {
cat.info("Testing NCLOC for Test constructor");
final BinClass test = (BinClass) getType("Test");
assertEquals(
"NCLOC",
1,
NclocMetric.calculate(test.getDeclaredConstructors()[0]));
cat.info("SUCCESS");
}
COM: <s> tests ncloc for test constructor </s>
|
funcom_train/9920879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadAttributes(int n, String filename) {
int len = attribSize[n];
float[] tmp = new float[len * size];
beginUpdateAttributes(n);
loadFloatArrayFromBinary(filename, tmp, size, len, len);
attributes.put(tmp);
endUpdateAttributes();
}
COM: <s> loads attribute nth from binary file into model </s>
|
funcom_train/51741303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addCommandParameterIfPresent(ArrayList<String> cmdList, char parm, String parmValue) {
if (parmValue != null && parmValue.trim().length() > 0) {
cmdList.add("-" + parm);
cmdList.add(this.getCmdParameterValue(parmValue));
}
}
COM: <s> adds a parameter to the command string </s>
|
funcom_train/35195224 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ResponseElement createElement(String type) throws DOMException {
for (int i = 0; i < allowedTags.length; i++) {
if (allowedTags[i].equals(type)) {
return new ResponseElement(this, super.createElement(type));
}
}
throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Illegal tag: " + type);
}
COM: <s> create an element with name type unless it is not an allowed tag </s>
|
funcom_train/7511108 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DeletionCheckMode getDeletionCheckMode() {
if (currentDeletionCheckMode != null) {
return currentDeletionCheckMode;
}
final DeletionCheckMode default_ = DeletionCheckMode.ACQUIRE_THEN_CHECK;
if (this.virualMode) {
return default_;
}
try {
currentDeletionCheckMode = DeletionCheckMode.valueOf(this.commonConfigInstance
.getString(PARAM_DATA_DELETION_CHECK, default_.name()));
return currentDeletionCheckMode;
} catch (IllegalArgumentException iae) {
return default_;
}
}
COM: <s> return current type of check when user delete row </s>
|
funcom_train/44161644 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDataSource(DataSource ds) {
Collection col = null;
try {
col = prepareCollection("datasources");
XMLResource document = (XMLResource)col.getResource("datasources");
Document doc = makeDocument(document);
this.queryMethods.addDataSource(doc, ds);
document.setContentAsDOM(doc);
col.storeResource(document);
if (col != null) {
col.close();
}
} catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> add data source adds new datasource </s>
|
funcom_train/49159512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionFailed(Player newPlayer, int risk, int targetSection) {
currentPuckHolder = newPlayer;
currentPuckHoldingBlock = this.getOpponentsBlock();
currentRelativeSectionHelper = switchRelativeSection(targetSection);
if (risk == Tactics.RISK_MODERATE || risk == Tactics.RISK_HIGH) {
currentMomentum = MOMENTUM_MODERATE;
} else {
currentMomentum = MOMENTUM_LOW;
}
currentPuckChain = new Player[3];
}
COM: <s> a situation has failed </s>
|
funcom_train/34079390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void makeAdjustTable() {
arAdjustTable[0] = (1 << EG_BITS);
for (int i = 1; i < 128; i++) {
arAdjustTable[i] = (short) ((double) (1 << EG_BITS) - 1 - (1 << EG_BITS) * Math.log(i) / Math.log(128));
}
}
COM: <s> table for ar to log curve </s>
|
funcom_train/171417 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JavaClass loadClass(Class clazz) throws ClassNotFoundException {
String className = clazz.getName();
String name = className;
int i = name.lastIndexOf('.');
if(i > 0) {
name = name.substring(i + 1);
}
return loadClass(clazz.getResourceAsStream(name + ".class"), className);
}
COM: <s> try to find class source via get resource as stream </s>
|
funcom_train/3475300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void open () {
Document xmlEventRecordDocument = new Document();
xmlEventRecordDocument.setRootElement (new Element(getCustomization ().getString (customizationPrefix +
".Root", defaultRoot)));
rootElement = xmlEventRecordDocument.getRootElement ();
if (rootElement.getAttribute ("name") != null) {
setRecordName (rootElement.getAttributeValue ("name"));
}
}
COM: <s> creates a new record with a default root node </s>
|
funcom_train/43098344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object buildAssociationClass(Object end1, Object end2) {
if (end1 == null
|| end2 == null
|| !(end1 instanceof MClassifier)
|| !(end2 instanceof MClassifier)) {
throw new IllegalArgumentException(
"either one of the arguments was null");
}
return buildAssociationClass(
(MClass) buildClass(),
(MClassifier) end1, (MClassifier) end2);
}
COM: <s> builds an association class between classifier end1 and end2 with a </s>
|
funcom_train/21941596 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Field48 getField48() {
if (getSwiftMessage() == null) {
throw new IllegalStateException("SwiftMessage was not initialized");
}
if (getSwiftMessage().getBlock4() == null) {
log.info("block4 is null");
return null;
} else {
final Tag t = getSwiftMessage().getBlock4().getTagByName("48");
if (t == null) {
log.fine("field 48 not found");
return null;
} else {
return new Field48(t.getValue());
}
}
}
COM: <s> iterates through block4 fields and return the first one whose name matches 48 </s>
|
funcom_train/50150997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeSettings() {
// Setup defaults . . .
Properties settings=new Properties();
settings.setProperty("jdbc.dbname",dbname);
settings.setProperty("jdbc.driver",driver);
settings.setProperty("jdbc.url",url);
settings.setProperty("jdbc.username",login);
settings.setProperty("jdbc.password",password);
try { // Read it from our file . . .
FileOutputStream out=new FileOutputStream(iniFile);
settings.store(out,"MCLib2 SQL Library");
out.close();
SortINI.SortINI(iniFile);
}
catch (IOException e) {}
}
COM: <s> write the ini settings to sql </s>
|
funcom_train/38515009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
System.out.println("*contenderstatus*");
String actionString;
if (action == PUT) {
actionString = "put";
} else if (action == REMOVE) {
actionString = "remove";
} else {
actionString = "error";
}
String stringRepresentation = ", action: " + actionString +
", contenderStatus: " +
contenderStatus.getName();
return stringRepresentation;
}
COM: <s> returns a string representation of this contender status effect </s>
|
funcom_train/33635621 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextArea getPostinTextArea() {
if (postinTextArea == null) {
postinTextArea = new JTextArea();
postinTextArea.setBounds(new Rectangle(33, 215, 156, 128));
postinTextArea.setBackground(Color.lightGray);
postinTextArea.setLineWrap(true);
}
return postinTextArea;
}
COM: <s> this method initializes postin text area </s>
|
funcom_train/32057148 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetRendererComponent() {
System.out.println("testGetRendererComponent");
JGraph jgraph = new JGraph();
CellView cellview = null;
boolean flag = false, flag1 = false, flag2 = false;
PortRenderer portRend = new PortRenderer();
portRend.getRendererComponent(jgraph, (PortView)cellview, flag, flag1, flag2);
}
COM: <s> this function tests get renderer component function of port renderer class </s>
|
funcom_train/50911327 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IntSet subSet(Real2Range r) {
IntSet is = new IntSet();
for (int i = 0; i < size(); i++) {
Real2 point = (Real2) vector.get(i);
if (r.includes(point)) {
is.addElement(i);
}
}
return is;
}
COM: <s> create a subset of the points within a box </s>
|
funcom_train/43468630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String hasIsQuery(ZXBO pobjBaseBO, ZXBO pobjHasBO, ZXBO pobjIsBO) throws ZXException {
return hasIsQuery(pobjBaseBO, pobjHasBO, pobjIsBO, "*", false, "*", false);
}
COM: <s> generate a query to retrieve a many to many relation </s>
|
funcom_train/16465118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addWpt(WptType wpt, GpxEntry gpxEntry) {
WptEntry wptEntry = new WptEntry(wpt, gpxEntry.getLayer());
DefaultMutableTreeNode wptNode = new DefaultMutableTreeNode(wptEntry);
model.insertNodeInto(wptNode, gpxEntry.getNode(), gpxEntry.getNode().getChildCount());
}
COM: <s> updates the tree view to show the newly added waypoint </s>
|
funcom_train/18598303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseOperations(Element capabil) {
Element operMd = capabil.getChild("OperationsMetadata", Csw.NAMESPACE_OWS);
if (operMd == null)
log("Missing 'ows:OperationsMetadata' element");
else
for(Object e : operMd.getChildren()) {
Element elem = (Element) e;
if ("Operation".equals(elem.getName())) {
CswOperation oper = extractOperation(elem);
if (oper != null)
operations.put(oper.name, oper);
}
}
}
COM: <s> get available operations in the get capabilities document </s>
|
funcom_train/9913581 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept(File file) {
// if it is hidden, no search again
if (file.isHidden())
{
return false;
}
else {
// if it is dir, so check it's child
if (file.isDirectory())
{
return true;
}
else {
// if it is not a dir, so check it filename
return Pattern.matches(pattern, file.getName());
}
}
}
COM: <s> accepts the file </s>
|
funcom_train/5859079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getViewAsString() {
String result = naming();
for (Enumeration e = rules.elements(); e.hasMoreElements(); ) {
Rule r = (Rule) e.nextElement();
result = result + " (" + r.toString() + ")";
}
return result;
}
COM: <s> returns the whole set of rules of this view concatened in a string </s>
|
funcom_train/23779009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean _confirmDrop(IEslinkSession argSession) {
String title = SessionViewMessages.DropSessionConfirm_title;
String msg = NLS.bind(SessionViewMessages.DropSessionConfirm_message, argSession.getElementName());
return MessageDialog.openQuestion(getShell(), title, msg);
}
COM: <s> asks the user to confirm the drop session operation </s>
|
funcom_train/48110404 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleBooleanAssignment(AssignStmt stmt, Local local) {
if (stmt.getRightOp() instanceof InstanceInvokeExpr) {
InstanceInvokeExpr invokeExpr = (InstanceInvokeExpr) stmt.getRightOp();
Local base = (Local) invokeExpr.getBase();
if (!ourType(base))
out.killConditional(local);
out.setConditional(local, stmt);
}
else
out.killConditional(local);
}
COM: <s> handle the case of an assignment to a boolean local </s>
|
funcom_train/40120851 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getDouble(final String key) throws JSONException {
final Object o = get( key );
try {
return o instanceof Number ? ( ( Number ) o ).doubleValue() : Double.valueOf( ( String ) o ).doubleValue();
} catch ( final Exception e ) {
throw new JSONException( "JSONObject[" + quote( key ) + "] is not a number." );
}
}
COM: <s> get the double value associated with a key </s>
|
funcom_train/4307227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void selectColors(){
// Randomly select color for each player and call the
// setColor() method of each
if ( Math.random() > .5 ) {
playerOne.setColor( Color.blue );
playerTwo.setColor( Color.white );
} else {
playerOne.setColor( Color.white );
playerTwo.setColor( Color.blue );
}
}
COM: <s> this method sets the colors of pieces that each player </s>
|
funcom_train/40931499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int createNewActorSession(int aIID, int actorID) {
ActorSession actorSession = new ActorSession(aIID,actorID,idManager.generateASID());
this.addActorSession(actorSession);
JoinEvent joinEv = new JoinEventImpl(actorSession.getActorSessionID(),"A IMPLEMENTER:username");
onJoinEvent(joinEv);
return actorSession.getActorSessionID();
}
COM: <s> create a new actor session in the application instance corresponding to </s>
|
funcom_train/19816827 | /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 == this) {
return true;
}
if (obj instanceof XYLineEntity && super.equals(obj)) {
XYLineEntity ie = (XYLineEntity) obj;
if (this.series != ie.series) {
return false;
}
return true;
}
return false;
}
COM: <s> tests the entity for equality with an arbitrary object </s>
|
funcom_train/31651963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String unscrub( int tokenIdentity, String value ){
String id = context.getSeparator( tokenIdentity );
String esc = context.getSeparator( TokenIdentity.RELEASE_CHARACTER);
Scanner scanner = new Scanner( value );
StringBuffer buffer = new StringBuffer( );
String temp;
while( scanner.hasCharacter( ) ){
temp = scanner.getCharacter( );
if ( temp.equalsIgnoreCase( id ) ){
buffer.append( esc );
buffer.append( temp );
} else {
buffer.append( temp );
}
}
return buffer.toString( );
}
COM: <s> unscub the string and put in the escape character </s>
|
funcom_train/1797976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(MetadataKey<?> other) {
if (other == this) {
return 0;
}
// If they aren't the same type, put attribute keys at the front.
if (!(other instanceof AttributeKey<?>)) {
return -1;
}
int compare = compareQName(id, other.id);
if (compare != 0) {
return compare;
}
return compareClass(datatype, other.datatype);
}
COM: <s> compares first on id then on datatype </s>
|
funcom_train/18646449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void validateAction(ModelListener l) {
if (getAction() == ExchangeActionType.RESPOND) {
// Confirm that a request is associated with the
// respond
java.util.List reqs=
org.pi4soa.cdl.util.InteractionUtil.getRequestExchangeDetails(this);
if (reqs == null || reqs.size() == 0) {
l.report(this,
getMessage("_NOT_FOUND_REQUEST_FOR_RESPONSE",
new Object[]{}),
ModelListener.ERROR_TYPE);
}
}
}
COM: <s> this method validates the action type associated with </s>
|
funcom_train/2853442 | /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("outgoing message to ")
.append(addr)
.append(':')
.append(port)
.append("\n ")
.append(StringLib.byteArrayToHex(msg, 0, msg.length));
return sb.toString();
}
COM: <s> xxx preliminary format </s>
|
funcom_train/45209897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addMenuItem (JMenu menu, String itemTitle, int mnemonic, int actionMask, String description, boolean enabled) {
assert GameBase.precondition (menu != null, "Menu must exist!");
JMenuItem menuItem = new JMenuItem(itemTitle);
if (mnemonic != 0)
menuItem.setAccelerator(KeyStroke.getKeyStroke(mnemonic, actionMask));
menuItem.getAccessibleContext().setAccessibleDescription(description);
menuItem.addActionListener(this);
menuItem.setEnabled(enabled);
menu.add(menuItem);
}
COM: <s> add a jmenu item to a jmenu </s>
|
funcom_train/951453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void logout() {
boolean loggedOut = false;
try {
loggedOut = database.logout(loginTextField.getText(), passwdTextField.getText());
} catch (Exception e) {}
if (loggedOut) {
String message = "Your logout was successful.";
JOptionPane.showMessageDialog(this, message, "Logout Successful", JOptionPane.INFORMATION_MESSAGE);
this.dispose();
}
else this.statusTextField.setText("Logout failed");
}
COM: <s> handles user command logout user </s>
|
funcom_train/20085551 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSSL(boolean SSL) {
this.SSL = SSL;
if (isSSL()) {
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
setSocketFactoryClass("javax.net.ssl.SSLSocketFactory");
}
if (getSocketFactoryClass().length() > 0) {
}
}
COM: <s> set if is to active ssl suport </s>
|
funcom_train/1241219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPort(int p_port) throws MalformedURIException {
if (p_port >= 0 && p_port <= 65535) {
if (m_host == null) {
throw new MalformedURIException(
"Port cannot be set when host is null!");
}
}
else if (p_port != -1) {
throw new MalformedURIException("Invalid port number!");
}
m_port = p_port;
}
COM: <s> set the port for this uri </s>
|
funcom_train/7531966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void bootstrap(PGridHost host) {
// if the current state is sleeping then the bootstrapping phase starts
synchronized(dataLock) {
Log.v("MyMessage", "MaintenanceManager#bootstrap mPhase(prima if)="+mPhase);
if (mPhase == PHASE_SLEEPS)
mPhase = PHASE_BOOTSTRAP;
Log.v("MyMessage", "MaintenanceManager#bootstrap mPhase (dopo if)="+mPhase);
}
mBootstrapper.addBootstrapHost(host);
Log.v("MyMessage", "bootstrap");
broadcast();
}
COM: <s> adds the given host to the list of bootstrap hosts </s>
|
funcom_train/3786763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addExpr(CSDexpr dbE)
{ /* addExpr */
if(lookupIdxByRspot(dbE)!=-1)
return(true);
regrowExprList(nEPlist+1);
epList[nEPlist++]= dbE;
return(true);
} /* addExpr */
COM: <s> add expr add expr to expr list </s>
|
funcom_train/5419449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
Log.debug("Checking new forwards");
try {
Iterator it = Forwarding.allForwards(s).iterator();
while( it.hasNext() ) {
Forwarding f = (Forwarding)it.next();
try {
f.doForward(s);
} catch( Exception e ) {
Log.print(e);
}
}
}
catch( Exception e ) {
Log.print(e);
}
}
COM: <s> check incoming mail from forward addresses for all groups </s>
|
funcom_train/4366561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void reAllocBuff(int len) {
if (bufferSize + len <= cb.length) {
bufferSize = cb.length;
return;
}
if (len < cb.length) {
len = cb.length;
}
bufferSize = cb.length + len;
char[] tmp = new char[bufferSize];
System.arraycopy(cb, 0, tmp, 0, cb.length);
cb = tmp;
tmp = null;
}
COM: <s> reallocates buffer since the spec requires it to be unbounded </s>
|
funcom_train/47515880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateLagBox() {
int brainView = mRepository.getImagePropertiesModel().getBrainView();
if(allLagsCheckBox.isSelected()){
//allLagsCheckBox.setSelected(true);
lagsField.setEnabled(false);
}else{
ArrayList<Integer> lags = mRepository.getControlPanelModel()
.getLagNumbers(brainView);
String lagString = parseRange(lags);
lagsField.setText(lagString);
lagsField.setEnabled(true);
//allLagsCheckBox.setSelected(false);
}
}
COM: <s> updates the lag filter box </s>
|
funcom_train/23271573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setYAxisGridlinePaint(Paint paint) {
XYPlot plot = (XYPlot) this.chart.getPlot();
if (plot != null) {
Paint old = plot.getRangeGridlinePaint();
plot.setRangeGridlinePaint(paint);
firePropertyChange("yAxisGridlinePaint", old, paint);
}
}
COM: <s> sets the y axis gridline paint and fires a </s>
|
funcom_train/1549671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public V remove(Object key) {
if (fast) {
synchronized (this) {
HashMap<K, V> temp = (HashMap<K, V>) map.clone();
V result = temp.remove(key);
map = temp;
return (result);
}
} else {
synchronized (map) {
return (map.remove(key));
}
}
}
COM: <s> remove any mapping for this key and return any previously </s>
|
funcom_train/10913945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void element(String localName, Attributes atts) throws SAXException {
getDelegateContentHandler().startElement(getMainNamespace(), localName, localName, atts);
getDelegateContentHandler().endElement(getMainNamespace(), localName, localName);
}
COM: <s> convenience method to generate an empty element with attributes </s>
|
funcom_train/3492658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean wasCatchCovered(String className, int srcLine) {
for (int i = 0; i < execIDs.length; i++) {
Boolean b = wasCatchCoveredIn(className, srcLine, execIDs[i]);
if (b == null) {
return null;
}
else if (b.booleanValue()) {
return b;
}
}
return new Boolean(false);
}
COM: <s> determines if the catch at the specified </s>
|
funcom_train/36470054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean mayNotLoseWaypoints() {
int resDlg= MessageBox.IDYES;
if(tmb.myIsWaypointsChanged) {
resDlg=(new MessageBox("Save current Waypoints",
"Current waypoints are not saved.\nYou may Lose changes.\n"
+"Do it anyway?",
MessageBox.MBYESNO)).execute();
}
return (resDlg!=MessageBox.IDYES);
}
COM: <s> ask whether the user accepts to lose waypoints </s>
|
funcom_train/7980406 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadJobs() {
this.jobsDir.mkdirs();
File[] jobs = this.jobsDir.listFiles();
for (int i = 0; i < jobs.length; i++) {
if (jobs[i].isDirectory()) {
File jobFile = getStateJobFile(jobs[i]);
if (jobFile != null) {
loadJob(jobFile);
}
}
}
}
COM: <s> loads any availible jobs in the jobs directory </s>
|
funcom_train/23386130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addButtonBar(String notificationName, Object note) {
if (note instanceof ButtonBar) {
ButtonBarController controller = new ButtonBarController((ButtonBar)note);
JPanel panel = controller.getButtonPanel();
buttonBarPanel.add(panel, panel.getName());
}
}
COM: <s> adds a button bar to the window </s>
|
funcom_train/16759202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addLight() {
LightState ls = DisplaySystem.getDisplaySystem().getRenderer().createLightState();
DirectionalLight dr = new DirectionalLight();
dr.setDiffuse(new ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f));
dr.setAmbient(new ColorRGBA(0.5f, 0.5f, 0.5f, 1.0f));
dr.setEnabled(true);
dr.setDirection(new Vector3f(0.5f, -1, -0.5f));
ls.attach(dr);
rootNode.setRenderState(ls);
}
COM: <s> create a light state and attach a directional light to it </s>
|
funcom_train/35872575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFromStringArray(String[] BBOX) {
if(BBOX.length == 4) {
setMinimumX(Double.valueOf(BBOX[0]).doubleValue());
setMinimumY(Double.valueOf(BBOX[1]).doubleValue());
setMaximumX(Double.valueOf(BBOX[2]).doubleValue());
setMaximumY(Double.valueOf(BBOX[3]).doubleValue());
} else if(BBOX.length == 1) {
setFromBBOXString(BBOX[0]);
}
}
COM: <s> sets from an array of strings </s>
|
funcom_train/24622503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getDoubleAttributeFromNode(Node node, String attributeName ) throws InvalidProjectFileException {
try {
return Double.parseDouble(getAttributeFromNode(node, attributeName));
}
catch(NumberFormatException e) {
throw new InvalidProjectFileException("Invalid double attribute '" + attributeName + "' in node '" + node.getNodeName() + "'.");
}
}
COM: <s> reads a node attribute and parsed it to a double value </s>
|
funcom_train/4553382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getLong(String key) throws JSONException {
Object object = get(key);
try {
return object instanceof Number ?
((Number) object).longValue() :
Long.parseLong((String) object);
} catch (Exception e) {
throw new JSONException("JSONObject[" + quote(key) +
"] is not a long.");
}
}
COM: <s> get the long value associated with a key </s>
|
funcom_train/4852925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear () {
for (int i = 0; i < history.length; ++i)
history[i] = null;
int s = start;
int e = end;
start = end = curr = 0;
if (s != e)
fireRemoved (s, (e > 0) ? e-1 : history.length-1);
}
COM: <s> clear the history </s>
|
funcom_train/24461017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RdfProvenanceArtifact addNewArtifact(String name, String uri) throws OperatorException {
RdfProvenanceArtifact artifact = getArtifact(Resource.uriRef(uri));
if(artifact != null) {
artifact.setName(name);
assertArtifact(artifact);
return artifact;
}
artifact = newArtifact(name, Resource.uriRef(uri));
assertArtifact(artifact);
return artifact;
}
COM: <s> creates and asserts a new artifact with the given uri </s>
|
funcom_train/23235767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean execute(String[] params, String remainder) {
/*
* Reason required
*/
if (remainder.length() == 0) {
return false;
}
RPAction action = new RPAction();
action.put("type", "jail");
action.put("target", params[0]);
action.put("minutes", params[1]);
action.put("reason", remainder);
MidhedavaClient.get().send(action);
return true;
}
COM: <s> execute a chat command </s>
|
funcom_train/27768653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void purgeAllConfigurations(){
String[] uris = null;
synchronized(configs){
if(configs.size() < 1){
uris = new String[0];
}
else{
uris = (String[])configs.keySet().toArray(new String[configs.size()]);
}
}
for (int i = 0; i < uris.length; i++) {
purgeConfiguration(uris[i]);
}
}
COM: <s> remove all configurations from cache </s>
|
funcom_train/16526234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addField(String fName, String fValue, boolean fEncode) {
if (mPostData == null) {
mPostData = fName + "=" + (fEncode ? URLEncoder.encode(fValue) : fValue);
} else {
mPostData += "&" + fName + "=" + (fEncode ? URLEncoder.encode(fValue) : fValue);
}
}
COM: <s> adds a form field called f name with the value f value </s>
|
funcom_train/20148202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Color getFadeStep(Color from, Color to, byte fadeSpeed) {
char red = (char) getFadeComponent(from.getRed(), to.getRed(), fadeSpeed);
char green = (char) getFadeComponent(from.getGreen(), to.getGreen(), fadeSpeed);
char blue = (char) getFadeComponent(from.getBlue(), to.getBlue(), fadeSpeed);
return new Color(red, green, blue);
}
COM: <s> get one step in fade at given fade speed </s>
|
funcom_train/3412707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RescaleOp (float scaleFactor, float offset, RenderingHints hints) {
length = 1;
this.scaleFactors = new float[1];
this.offsets = new float[1];
this.scaleFactors[0] = scaleFactor;
this.offsets[0] = offset;
this.hints = hints;
}
COM: <s> constructs a new rescale op with the desired scale factor </s>
|
funcom_train/46694798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBuildingStatus() {
System.out.println("buildingStatus");
StringQuery instance = new StringQuery();
assertEquals(State.UNINITIALIZED,instance.buildingStatus());
instance.buildQuery("", false, Operation.STARTS_WITH);
assertEquals(State.READY,instance.buildingStatus());
}
COM: <s> test of building status method of class string query </s>
|
funcom_train/48337123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void generateScript(String path) {
// vbs script
Logger log = Logger.getInstance();
log.setPath(path + ".vbs", false);
log.write("Set ws = CreateObject(\"Wscript.Shell\")"
+ Constant.LINESHIFTER);
log.write("ws.run \"" + path + " /start\", vbhide");
log.close();
// cmd script
log.setPath(path + ".cmd", false);
log.write("chdir " + Constant.baseFolder + Constant.LINESHIFTER);
log.write("ant" + Constant.LINESHIFTER);
log.write("exit");
log.close();
}
COM: <s> this script is used to invoke build </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.