__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/42718453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Vector parsePatternString(String pat) {
Vector temp = new Vector();
StringTokenizer st1 = new StringTokenizer(pat);
StringTokenizer st2, st3;
while (st1.hasMoreTokens()) {
st2 = new StringTokenizer(st1.nextToken(), ";");
while (st2.hasMoreTokens()) {
st3 = new StringTokenizer(st2.nextToken(), ",");
while (st3.hasMoreTokens()) {
temp.add(st3.nextToken());
}
}
}
return temp;
}
COM: <s> parses the specified pat string </s>
|
funcom_train/4257571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Protocol getProtocol() {
Protocol result = (getResourceRef().getBaseRef() != null) ? getResourceRef()
.getBaseRef().getSchemeProtocol()
: null;
if (result == null) {
// Attempt to guess the protocol to use
// from the target reference scheme
result = (getResourceRef() != null) ? getResourceRef()
.getSchemeProtocol() : null;
}
return result;
}
COM: <s> returns the protocol by first returning the base ref </s>
|
funcom_train/5374483 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point getDPI () {
checkDevice ();
/*
int hDC = internal_new_GC (null);
int dpiX = OS.GetDeviceCaps (hDC, OS.LOGPIXELSX);
int dpiY = OS.GetDeviceCaps (hDC, OS.LOGPIXELSY);
internal_dispose_GC (hDC, null);
return new Point (dpiX, dpiY);
*/
return new Point(96, 96);
}
COM: <s> returns a point whose x coordinate is the horizontal </s>
|
funcom_train/2876967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isLeaf() {
//if (children !=null) System.out.println("isLeaf() ["+this.getDN()+"]"
//+children.size());
if ((children != null) && (children.size() > 0)) {
return false;
} else {
return true;
}
}
COM: <s> gets the leaf attribute of the browser entry object </s>
|
funcom_train/7620348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(int key) {
int i = binarySearch(mKeys, 0, mSize, key);
if (i >= 0) {
System.arraycopy(mKeys, i + 1, mKeys, i, mSize - (i + 1));
System.arraycopy(mValues, i + 1, mValues, i, mSize - (i + 1));
mSize--;
}
}
COM: <s> removes the mapping from the specified key if there was any </s>
|
funcom_train/18099920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeElement( boolean element ) {
int index = -1;
for (int i = 0; i < this.size; i++) {
boolean object = this.storedObjects[i];
if ( object == element ) {
index = i;
break;
}
}
if (index == -1) {
return false;
}
for (int i = index+1; i < this.size; i++) {
this.storedObjects[ i-1 ] = this.storedObjects[ i ];
}
this.size--;
return true;
}
COM: <s> removes the first given boolean </s>
|
funcom_train/46017254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getValue() throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, NullPointerException, ExceptionInInitializerError {
if (methodget == null) {
methodget = findMethod(getGetname());
}
if (methodget == null) {
throw new IllegalAccessException("Method \"" + getGetname() + "\" don't exist.");
} else {
return methodget.invoke(getElement());
}
}
COM: <s> gets the value of the element </s>
|
funcom_train/31894597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(){
// Write to File
String soundText;
if (playMusic)
soundText = "on";
else
soundText = "off";
String text = "[PLAYER]\nplayername=" + playerName + "\nmusic=" + soundText +
"\n\n[SERVER]\nservername=" + serverName;
try {
BufferedWriter output = new BufferedWriter(new FileWriter("config" + File.separator + "config.ini"));
output.write(text);
output.close();
} catch (Exception e1) {
new JOptionPane("Error Creating Config File! Permission Denied.");
}
}
COM: <s> saves current settings back to the config file </s>
|
funcom_train/19777400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dependency getSuperDependency() {
if (cls.getSuperclass() != null) {
if (cls.getGenericSuperclass() instanceof Class)
return filter(new Dependency(new ClassWrapper(cls
.getSuperclass(), filter, null)));
else
return filter(new Dependency(new ClassWrapper(cls
.getSuperclass(), filter, cls.getGenericSuperclass())));
} else
return null;
}
COM: <s> get the superclass dependency of the wrapped class </s>
|
funcom_train/40797907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object put(Object key, Object value) {
CachedObject cache = (CachedObject) super.get(key);
if (cache == null) {
super.put(key, new CachedObject(value, timeout));
return null;
}
Object old = cache.get();
cache.set(value);
return old;
}
COM: <s> store an object in the map </s>
|
funcom_train/19865874 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireSelectionChanged(Track trackToPlay) {
final SelectionChangedEvent event = new SelectionChangedEvent(this,
new StructuredSelection(trackToPlay));
Object[] listeners = selectionChangedListeners.getListeners();
for (int i = 0; i < listeners.length; ++i) {
final ISelectionChangedListener l = (ISelectionChangedListener) listeners[i];
SafeRunnable.run(new SafeRunnable() {
public void run() {
l.selectionChanged(event);
}
});
}
}
COM: <s> notifies any selection changed listeners that the views selection has </s>
|
funcom_train/22678895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load(OMElement element) {
originalElement = element;
alias = element.getAttributeValue(TraserConstants.ALIAS);
clazz = element.getAttributeValue(TraserConstants.CLASS);
ref = element.getAttributeValue(TraserConstants.REF);
config = element.getAttributeValue(TraserConstants.CONFIG);
if (config != null) {
fileManager = new ConfigFileManager();
fileManager.load(new File(config));
this.element = fileManager.getRootElement();
} else {
this.element = element;
}
}
COM: <s> load the configuration from the element </s>
|
funcom_train/47398808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getBytesTransferRate(JComboBox combo) {
int rate = 0;
Object selObj = combo.getSelectedItem();
if (!selObj.equals(BYTE_RATES[0])) {
try {
rate = Integer.parseInt(selObj.toString());
}
catch(NumberFormatException ex) {
GuiUtils.showErrorMessage(this, ex.getMessage());
}
}
return rate;
}
COM: <s> get max bytes sec </s>
|
funcom_train/4008486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init() {
Rabbit rabbit;
ObjectRule r1 = new AgingRule(70);
ObjectRule r2 = new ReproductionRule();
ObjectRule r3 = new MovementRule();
for (int i = 0; i < m_Area.getFieldCount() * s_InitRabbitsPerField; i++) {
rabbit = new Rabbit(m_Area.getRandPosition());
rabbit.addRule(r1);
rabbit.addRule(r2);
rabbit.addRule(r3);
add(rabbit);
}
proceedTSChanges();
}
COM: <s> initializes the game </s>
|
funcom_train/2289746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBytes(PreparedStatement statement, int pos, byte[] content) throws SQLException {
if (content.length < 2000) {
statement.setBytes(pos, content);
} else {
statement.setBinaryStream(pos, new ByteArrayInputStream(content), content.length);
}
}
COM: <s> sets the designated parameter to the given java array of bytes </s>
|
funcom_train/39062026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addEditablePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(new ItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_IExtensionAttribute_editable_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_IExtensionAttribute_editable_feature", "_UI_IExtensionAttribute_type"),
MarkingPackage.eINSTANCE.getIExtensionAttribute_Editable(),
true,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE));
}
COM: <s> this adds a property descriptor for the editable feature </s>
|
funcom_train/10925055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCentralDirectoryExtra(byte[] b) {
try {
ZipExtraField[] central =
ExtraFieldUtils.parse(b, false,
ExtraFieldUtils.UnparseableExtraField.READ);
mergeExtraFields(central, false);
} catch (ZipException e) {
throw new RuntimeException(e.getMessage(), e);
}
}
COM: <s> sets the central directory part of extra fields </s>
|
funcom_train/42658627 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void playShortMidi() {
try {
midiPlayer.stop();
mControl.shortMidiEvent(longmidievent[0], longmidievent[1], longmidievent[2]);
midiPlayer.start();
} catch (Exception e) {
UIUtils.log("Error while playing long midi event: " + e.getMessage());
}
}
COM: <s> plays short midi event </s>
|
funcom_train/25775519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(int year, int month, int day, int hour, int min, int sec) {
set(Calendar.YEAR,year);
set(Calendar.MONDAY,month);
set(Calendar.DAY_OF_MONTH,day);
set(Calendar.HOUR_OF_DAY,hour);
set(Calendar.MINUTE,min);
set(Calendar.SECOND,sec);
}
COM: <s> sets to the given time stamp where each element is given as parameter </s>
|
funcom_train/8980117 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSplitPane getJFolderSplitPane() {
if (jFolderSplitPane == null) {
jFolderSplitPane = new JSplitPane();
jFolderSplitPane.setDividerSize(10);
jFolderSplitPane.setDividerLocation(150);
jFolderSplitPane.setRightComponent(getJFolderScrollPane());
jFolderSplitPane.setLeftComponent(getJTreeScrollPane());
}
return jFolderSplitPane;
}
COM: <s> this method initializes j folder split pane </s>
|
funcom_train/18866177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clearSelection() {
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
JTextComponent e = (JTextComponent) TransactionNumberComboBox.this.getEditor().getEditorComponent();
int length = e.getText().length();
int position = e.getCaretPosition();
e.setSelectionStart(length);
e.setSelectionEnd(length);
e.setCaretPosition(position);
}
});
}
COM: <s> clear any text selection and restore the caret position </s>
|
funcom_train/2585341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testClearObservations() {
SimpleHistogramDataset d1 = new SimpleHistogramDataset("D1");
d1.clearObservations();
assertEquals(0, d1.getItemCount(0));
d1.addBin(new SimpleHistogramBin(0.0, 1.0));
d1.addObservation(0.5);
assertEquals(1.0, d1.getYValue(0, 0), EPSILON);
}
COM: <s> some checks for the clear observations method </s>
|
funcom_train/4534694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showAlert(boolean alert) {
if (alert) {
titleLabel.setForeground(new Color(211, 174, 102));
setBackground(new Color(250, 249, 242));
}
else {
setBackground(new Color(239, 245, 250));
titleLabel.setForeground(new Color(65, 139, 179));
}
}
COM: <s> changes the background color </s>
|
funcom_train/44851448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public KeyDef getPrimaryKeyDef() {
try {
//pre
if (this.get(ObjectDefDef.keyDefs) == null) return null;
return (KeyDef)((NameValueList)this.get(ObjectDefDef.keyDefs)).getValue(KeyDefDef.keyType_PrimaryKey);
}
catch ( Exception exc ) {
DefaultExceptionHandler.instance().handle(exc);
return null;
}
}
COM: <s> returns the primary key definition </s>
|
funcom_train/3370806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Accessible getAccessibleSelection(int i) {
if (isSelected()) {
if (i != 0) { // single selection model for JMenuBar
return null;
}
int j = getSelectionModel().getSelectedIndex();
if (getComponentAtIndex(j) instanceof Accessible) {
return (Accessible) getComponentAtIndex(j);
}
}
return null;
}
COM: <s> returns the currently selected menu if one is selected </s>
|
funcom_train/14214196 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDefaultErrorPage() {
String errorPage;
errorPage = (String) ConfigXMLReader.getConfigMap(configFileUrl).get(ConfigXMLReader.DEFAULT_ERROR_PAGE);
//Debug.logInfo("For DefaultErrorPage got errorPage: " + errorPage, module);
if (errorPage != null) return errorPage;
return "/error/error.jsp";
}
COM: <s> gets the default error page from the config map or static site default </s>
|
funcom_train/3810914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void logFinest(JavaMethod pMethod, Object pMsg, Object pValues) {
if (isGeneratingLogging()) {
if (pValues == null) {
pMethod.addLine("logger.finest(mName, ", pMsg, ");");
} else {
pMethod.addLine("logger.finest(mName, ", pMsg, ", ", pValues, ");");
}
}
}
COM: <s> p creates code for logging a message with finest level </s>
|
funcom_train/1550383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doWriteObject(ObjectOutputStream out) throws IOException {
out.writeFloat(loadFactor);
out.writeInt(data.length);
out.writeInt(size);
for (MapIterator it = mapIterator(); it.hasNext();) {
out.writeObject(it.next());
out.writeObject(it.getValue());
}
}
COM: <s> writes the map data to the stream </s>
|
funcom_train/46195986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFirst(Object key, boolean percentDecode) {
SortedSet<String> values = wrappedMap.get(key);
if (values == null || values.isEmpty()) {
return null;
}
String value = values.first();
return percentDecode ? OAuth.percentDecode(value) : value;
}
COM: <s> returns the first value from the set of all values for the given </s>
|
funcom_train/35704269 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJCenterPanel() {
if (jCenterPanel == null) {
jCenterPanel = new JPanel();
jCenterPanel.setLayout(new BoxLayout(getJCenterPanel(), BoxLayout.Y_AXIS));
jCenterPanel.setPreferredSize(new Dimension(200, 200));
jCenterPanel.add(getChartPanel(), null);
jCenterPanel.add(getJTimePanel(), null);
}
return jCenterPanel;
}
COM: <s> this method initializes j center panel </s>
|
funcom_train/47673439 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getStringAttribute(ObjectName p_objectName, String p_attribute) throws NullPointerException, MalformedObjectNameException, MBeanException, AttributeNotFoundException, InstanceNotFoundException, ReflectionException {
return (String) server.getAttribute(p_objectName, p_attribute);
}
COM: <s> gets a string attribute from mules mbean server </s>
|
funcom_train/12162856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateHorizontalMenuSeparator() throws Exception {
for (int index = 0; index < types.length; index++) {
checkClass("createHorizontalMenuSeparator",
getExpectedHorizontalMenuSeparatorRendererClass(
types[index]),
createFactory().createHorizontalMenuSeparator(
types[index]));
}
}
COM: <s> tests that the correct type of separator renderer is created for the </s>
|
funcom_train/48068466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteContent() {
Hashtable ht = new Hashtable(); //<key=string, value=vector of record id>
getHashTableToDel(ht);
try {
MailDB.deleteStorageContent(ht);
} catch (Exception e) {
e.printStackTrace();
}
System.out.println("Contetnt dletedddd");
storageParts.removeAllElements();
}
COM: <s> delete the content of all storage parts and deletes also this storage </s>
|
funcom_train/11722222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SortedMap getProperties(Node node) throws RepositoryException {
SortedMap properties = new TreeMap();
PropertyIterator iterator = node.getProperties();
while (iterator.hasNext()) {
Property property = iterator.nextProperty();
properties.put(property.getName(), property);
}
return properties;
}
COM: <s> returns a sorted map of the properties of the given node </s>
|
funcom_train/32866348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getTimePanel() {
if (timePanel == null) {
minutesLabel = new JLabel();
minutesLabel.setText(" : ");
hoursLabel = new JLabel();
hoursLabel.setText(" : ");
timePanel = new JPanel();
timePanel.add(getHoursField(), null);
timePanel.add(hoursLabel, null);
timePanel.add(getMinutesField(), null);
timePanel.add(minutesLabel, null);
timePanel.add(getSecondField(), null);
}
return timePanel;
}
COM: <s> this method initializes time panel </s>
|
funcom_train/35271695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void serialEvent(SerialPortEvent event) {
switch(event.getEventType()) {
case SerialPortEvent.BI:
case SerialPortEvent.OE:
case SerialPortEvent.FE:
case SerialPortEvent.PE:
case SerialPortEvent.CD:
case SerialPortEvent.CTS:
case SerialPortEvent.DSR:
case SerialPortEvent.RI:
case SerialPortEvent.OUTPUT_BUFFER_EMPTY:
break;
case SerialPortEvent.DATA_AVAILABLE:
waitForInput = false; // We got incoming
break; // Thats it for serial events
}
}
COM: <s> serial event routine </s>
|
funcom_train/49206799 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void persistIgnoredJobs(final XMLMemento memento) {
try {
final IMemento ignoredJobs = memento.createChild(TAG_IGNORED_JOBS);
for (final JobId ignoredJobId : JobStatsManager.getInstance()
.getIgnoredJobIds()) {
final IMemento ignoredJob = ignoredJobs
.createChild(TAG_IGNORED_JOB);
ignoredJob.putString(ATTRIB_JOBID, ignoredJobId
.getJobIdAsString());
}
} catch (Exception e) {
log.error("Could not persist ignored jobs", e);
}
}
COM: <s> persist ignored jobs </s>
|
funcom_train/12812775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void toggleQueriable(int row, int col) {
int nbc = rs_copy.nb_columns;
for( int i=0 ; i<nbc ; i++ ) {
if( getColumnName(i).equals("queriable") ) {
if( col == i ) {
if( getValueAt(row, col).toString().equals("true") ) {
setValueAt("false", row, col);
}
else {
setValueAt("true", row, col);
}
}
break;
}
}
}
COM: <s> if col matches the queriable column its value is is toggled true false </s>
|
funcom_train/10843198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toFilter() {
if (this.version == null || VersionRange.DEFAULT.equals(this.version)) {
return "(symbolicname=" + this.getSymbolicName() + ")";
}
return "(&(symbolicname=" + this.getSymbolicName() + ")"
+ this.getVersion().getFilter() + ")";
}
COM: <s> returns an ldad filter according to the filter syntax specified in </s>
|
funcom_train/32861633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(String from, String to, String call) {
if (classNames.contains(from) == false) {
classNames.add(from);
}
if (classNames.contains(to) == false) {
classNames.add(to);
}
classCalls.add(from);
classCalls.add(to);
callNames.add(call);
}
COM: <s> adds a new call to the list </s>
|
funcom_train/2022823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mousePressed(MouseEvent e) {
int row;
if (e.getComponent() == tableLog) {
row = tableLog.rowAtPoint(e.getPoint());
if ( (e.getClickCount() == 2) && (row > -1) ) {
e.consume();
tabbedPane.setSelectedIndex(1);
}
}
}
COM: <s> invoked when a mouse button has been pressed on a component </s>
|
funcom_train/49319913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ImageDecoder createImageDecoder(InputStream src, ImageDecodeParam param) {
// Add buffering for efficiency (XXX no: done in FITS I/O classes)
//if (!(src instanceof BufferedInputStream)) {
// src = new BufferedInputStream(src);
//}
try {
return new FITSDecoder(new ForwardSeekableStream(src), param);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
COM: <s> instantiates a code fitsdecoder code to read from the </s>
|
funcom_train/29687325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonClose() {
if (jButtonClose == null) {
jButtonClose = new JButton();
jButtonClose.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
doClose();
}
});
jButtonClose.setMnemonic(KeyEvent.VK_UNDEFINED);
jButtonClose.setText("Close");
}
return jButtonClose;
}
COM: <s> this method initializes j button close </s>
|
funcom_train/13373014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createPartControl(Composite parent) {
super.createPartControl(parent);
makeActions();
contributeToActionBars();
getSite().setSelectionProvider(getTreeViewer());
/*
if(MDEPlugin.hasPlatformVersion(2, 1, 0)) {
// enable link to editor by default
try {
this.setLinkingEnabled(true);
} catch (NoSuchMethodError ignore) {
// ignore and continue
System.err.println("MetaSolutionTreeView.setLinkingEnabled is not available!");
}
}
*/
}
COM: <s> this is a callback that will allow us </s>
|
funcom_train/18028140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkStreamIndex(int index0) throws IllegalArgumentException {
if (index0 > -1) {
if (index0 == index + offset) {
} else if ( index0 == index + offset + 1 ) {
nextRecord();
} else {
throw new IllegalArgumentException("index0 must only increment by one");
}
}
length= index + offset + 1;
}
COM: <s> check the stream index specified </s>
|
funcom_train/3859262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Attribute defineAttribute(String aName) {
if (lookupDeclaredAttribute(aName) != null) {
throw new JmoveException("Attribute " + aName + " already defined ");
}
Attribute field = new Attribute();
field.init(myModel, this, aName);
Containment declaration = new Containment();
declaration.connect(this, Declaring.flyweight, field, Member.DeclaredBy.flyweight);
return field;
}
COM: <s> defines an attribute b declared b by this type </s>
|
funcom_train/3409502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasExpired() {
if (maxAge == 0) return true;
// if not specify max-age, this cookie should be
// discarded when user agent is to be closed, but
// it is not expired.
if (maxAge == MAX_AGE_UNSPECIFIED) return false;
long deltaSecond = (System.currentTimeMillis() - whenCreated) / 1000;
if (deltaSecond > maxAge)
return true;
else
return false;
}
COM: <s> reports whether this http cookie has expired or not </s>
|
funcom_train/15401439 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getIndicatorString() {
NumberFormat fmt = NumberFormat.getInstance();
fmt.setMaximumFractionDigits(2);
fmt.setMinimumFractionDigits(2);
String scaleString = new String("magnification x (" + fmt.format(scaleX) + "," + fmt.format(scaleY) + ")");
return scaleString;
}
COM: <s> returns the string output displayed in indicator panel </s>
|
funcom_train/1715667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getValue() {
StringBuffer sb = new StringBuffer();
int len = _tail.length();
int ix = 0;
label: for (; ix < len; ix++) {
char c = _tail.charAt(ix);
switch (c) {
case '(':
case ')':
break label;
case '*':
sb.append(WILDCARD);
break;
case '\\':
if (ix == len - 1) {
break label;
}
sb.append(_tail.charAt(++ix));
break;
default:
sb.append(c);
break;
}
}
_tail = _tail.substring(ix);
return sb.toString();
}
COM: <s> gets the value attribute of the ldapquery object </s>
|
funcom_train/32649112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createWeightThemeComboBox() {
GridData gridData6 = new GridData();
gridData6.widthHint = 80;
weightThemeComboBox = new ThemeComboBox(textDownComposite, SWT.NONE);
weightThemeComboBox.setEmbeddedInBindableGroup(false);
weightThemeComboBox.setBindingSubPath("fontWeight");
weightThemeComboBox.setEnumClass("net.sf.tapestry_jsmenu.themegui.xmlbinding.FontWeight");
weightThemeComboBox.setLayoutData(gridData6);
}
COM: <s> this method initializes weight theme combo box </s>
|
funcom_train/50607590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public void rand(){
assertModifiable();
int aux, ntc;
for (int n=0; n<city.length; n++)
city[n] = n;
for (int n=0; n<city.length; n++) {
ntc = rnd.nextInt(0, city.length - 1);
aux = city[n];
city[n] = city[ntc];
city[ntc] = aux;
}
}
COM: <s> sets this route randomically </s>
|
funcom_train/16584628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void showDocument() {
if (!checkAndNormalizeURI()) {
return;
}
ImageIcon image;
// try {
image = new ImageIcon(
getSvgAsImage(document.toString()));
if (image==null); //Incluir error
this.setPreferredSize(new Dimension(image.getIconWidth(), image.getIconHeight()));
this.setSize(new Dimension(image.getIconWidth(),
image.getIconHeight()));
JLabel label = new JLabel(image);
this.add(label);
// } catch (MalformedURLException e) {
//
// }
}
COM: <s> implements the necessary code to open images in this panel </s>
|
funcom_train/28917968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(final String key, final String value) {
if(key == null) {
throw new IllegalArgumentException("Key may not be null");
}
if(value == null) {
throw new IllegalArgumentException("Value may not be null");
}
this.storage.put(key, value);
}
COM: <s> adds new property to collection </s>
|
funcom_train/2002519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PPMNode rescaleSiblings() {
_count >>= 1; // cheap divide by 2
if (_nextSibling == null) return (_count < MIN_COUNT) ? null : this;
if (_count < MIN_COUNT) return _nextSibling.rescaleSiblings();
_nextSibling = _nextSibling.rescaleSiblings();
return this;
}
COM: <s> rescale the counts on this node and the siblings of this node </s>
|
funcom_train/40873120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private AssociationClass getAssociationClass(Set<md.model.mads.metaschema.Attribute> attributes) {
AssociationClass ac = null;
// If the MADS relationship contains attributes, an UML association class
// must be created with the attributes and associated with the UML relationship
if (attributes.size() > 0) {
ac = new AssociationClass();
addAttributes(attributes, ac);
}
return ac;
}
COM: <s> if the given attribute list contains at least an attribute an association class </s>
|
funcom_train/4496396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(OutputBitStream stream) throws IOException {
for (int i = 0; i < colorTableRGB.length; i++) {
colorTableRGB[i].write(stream);
}
for (int i = 0; i < colorMapPixelData.length; i++) {
stream.writeUI8(colorMapPixelData[i]);
}
}
COM: <s> writes the instance to a bit stream </s>
|
funcom_train/48390080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HandlerRegistration addEventAddedHandler(com.smartgwt.client.widgets.calendar.events.EventAddedHandler handler) {
if(getHandlerCount(com.smartgwt.client.widgets.calendar.events.CalendarEventAdded.getType()) == 0) setupEventAddedEvent();
return doAddHandler(handler, com.smartgwt.client.widgets.calendar.events.CalendarEventAdded.getType());
}
COM: <s> add a event added handler </s>
|
funcom_train/33968772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FMDRequest buildLoginRequest(String username, String password) {
FMDRequest request = mAccountRequest;
if (request == null) {
request = new FMDRequest();
} else {
request.reset();
}
request.requestType = cREQUEST_LOGIN;
request.state = mAppStateManager.getState();
request.method = FMDHTTPConnectionController.cHTTP_POST;
request.request.append(sSERVER_ADDRESS);
request.request.append(sACCOUNT_METHOD);
request.request.append("login/");
request.request.append(encodeMessage(username));
request.request.append('/');
request.request.append(password);
request.request.append(appendFMLParametersUri());
return request;
}
COM: <s> build a request to login </s>
|
funcom_train/41382187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void spawnInBrowser(String outDir) {
Display display = getShell().getDisplay();
try {
final URL url = new URL(
"file://" + outDir + MessagesWizard.LPDocWizard_html+ "index.html?noframes=true");
display.syncExec(new Runnable() {
public void run() {
PlatformUI.getWorkbench().getHelpSystem()
.displayHelpResource(url.toExternalForm());
}
});
} catch (MalformedURLException e) {
e.printStackTrace();
}
}
COM: <s> allow to open a web browser on the html documentation </s>
|
funcom_train/47867343 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getButtonOk() {
if (buttonOk == null) {
buttonOk = new JButton();
buttonOk.setMnemonic(KeyEvent.VK_O);
buttonOk.setText("OK");
buttonOk.setName("buttonOk");
buttonOk.setMinimumSize(buttonMinimumSize);
buttonOk.addActionListener(new java.awt.event.ActionListener() {
@Override
public void actionPerformed(java.awt.event.ActionEvent e) {
save();
close();
}
});
}
return buttonOk;
}
COM: <s> this method initializes button ok </s>
|
funcom_train/22791365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getDayTime(YearMonthDay aDay) {
int result = 0;
for (GroupSet set : data) {
for (TaskGroup proj : set.getGroups()) {
final YearMonthDay day = proj.get(TaskGroup.P_DAY);
if (aDay.equals(day)) {
result += proj.getBusinessTime();
}
}
}
return result;
}
COM: <s> returns a time in minutes for a selected day </s>
|
funcom_train/40676909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateGifDimensions() {
if (imageData.length < 10) {
throw new IllegalArgumentException("corrupt GIF format");
}
ByteBuffer buffer = ByteBuffer.wrap(imageData);
buffer.order(ByteOrder.LITTLE_ENDIAN);
width = buffer.getChar(6) & 0xffff;
height = buffer.getChar(8) & 0xffff;
}
COM: <s> updates the dimension fields of the gif image </s>
|
funcom_train/23057191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JDialog getNewProjectorJDialog() {
if (NewProjectorJDialog == null) {
NewProjectorJDialog = new JDialog();
NewProjectorJDialog.setSize(new Dimension(326, 141));
NewProjectorJDialog.setName("New Projector");
NewProjectorJDialog.setTitle("Add a New Projector");
NewProjectorJDialog.setLocation(new Point(200, 200));
NewProjectorJDialog.setContentPane(getNewProjectorjContentPane());
}
return NewProjectorJDialog;
}
COM: <s> this method initializes new projectorj frame1 </s>
|
funcom_train/40070514 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintComponent(Graphics g) {
super.paintComponent(g);
BufferedImage image = new BufferedImage(getWidth() / myScale,
getHeight() / myScale, BufferedImage.TYPE_INT_RGB);
Graphics gr = image.getGraphics();
drawRealPicture(gr);
g.drawImage(image, 0, 0, image.getWidth() * myScale, image.getHeight()
* myScale, null);
}
COM: <s> first drawn 1 to 1 image is drawn my scale times larger </s>
|
funcom_train/22918792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pause() {
UPNPMessageFactory factory = UPNPMessageFactory.getNewInstance(avTransportService);
ActionMessage message = factory.getMessage("Pause");
message.setInputParameter("InstanceID", "");
setTransportState(PAUSED);
try {
message.service();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (UPNPResponseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
COM: <s> pauses the current current playing track if any </s>
|
funcom_train/46825520 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPlayerStateCount (String state) {
// Get read lock
rwLock.getReadLock();
int count = 0;
Vector vPlayers = getPlayers ();
for (int i = 0; i < this.players.size(); i++) {
Player player = (Player)vPlayers.get(i);
if (player.getState().stringValue().equals(state))
count ++;
}
// release read lock
rwLock.release();
// return count
return count;
}
COM: <s> returns the number of players in a particular state </s>
|
funcom_train/51193214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMilliSecond(short millisecond) throws OperationNotSupportedException {
if (millisecond < 0) {
String err = "milliseconds " + millisecond + " cannot be negative.";
throw new IllegalArgumentException(err);
} else if (millisecond > 999) {
String err = "milliseconds " + millisecond + " is out of bounds: 0 <= milliseconds <= 999.";
throw new IllegalArgumentException(err);
}
_millsecond = millisecond;
}
COM: <s> sets the millisecond field for this date time type </s>
|
funcom_train/9644261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void expand(TreeModelEvent e) {
getTreeTable().getTree().expandPath(e.getTreePath());
if (e.getChildren() != null) {
for (int i = 0; i < e.getChildren().length; i++) {
TreePath path = e.getTreePath().pathByAddingChild(
e.getChildren()[i]);
getTreeTable().getTree().expandPath(path);
}
}
}
COM: <s> expand the tree </s>
|
funcom_train/39314568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFlattenLayer(){
m.flattenLayer(new JDialog(temp, false));
tester.addActionPerformed(new ActionEvent(tester, 1, "poop"));
tester.addActionPerformed(new ActionEvent(tester, 1, "poop"));
m.flattenLayer(new JDialog(temp, false));
assertEquals(m.layerList.size(), 3);
dispose();
}
COM: <s> test of flatten layer method of class main canvas </s>
|
funcom_train/44011545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetCustEmail() {
System.out.println("getCustEmail");
CustomerBO instance = null;
String expResult = "";
String result = instance.getCustEmail();
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 get cust email method of class edu </s>
|
funcom_train/3561462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getArgumentPos(String argName) {
int i, argLength, pos;
argLength = argumentNames.length;
i = 0;
pos = -1;
while (i < argLength) {
if (argumentNames[i].equals(argName)) {
pos = i;
i = argLength;
}
else
i++;
}
return pos;
}
COM: <s> returns the position of an argument </s>
|
funcom_train/18065192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getUpTableComboBox() {
if (upTableComboBox == null) {
Iterator<String> it = tableAttMap.keySet().iterator();
Vector<String> tablesList = new Vector<String>();
while (it.hasNext()){
tablesList.add(it.next());
}
upTableComboBox = new JComboBox(tablesList);
upTableComboBox.setMaximumRowCount(20);
upTableComboBox.setActionCommand("upTable");
upTableComboBox.addActionListener(this);
}
return upTableComboBox;
}
COM: <s> this method initializes up table combo box </s>
|
funcom_train/39534638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void appendVisualResourceChild(SVGHandle handle, Node parentNode, Node childNode){
if(handle!=null && parentNode!=null && childNode!=null){
//creates the resource child
if(parentNode.getNodeName().equals("linearGradient") || parentNode.getNodeName().equals("radialGradient")){
//appends the element to the resource node
parentNode.appendChild(childNode);
}
}
}
COM: <s> appends a child of a resource node to its parent </s>
|
funcom_train/5341702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleLinkChange() {
String label = getNextLabelURLPair().getLabel();
LABEL.setText(label);
FontMetrics fm = LABEL.getFontMetrics(LABEL.getFont());
int width = fm.stringWidth(label);
int height = fm.getHeight();
Dimension preferred = new Dimension(width, height);
LABEL.setPreferredSize(preferred);
GUIMediator.instance().getStatusLine().refresh();
}
COM: <s> handle a change in the current tt label urlpair tt pair </s>
|
funcom_train/43400160 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Complex acos() {
Complex a = this.product(this);
a.negate();
a.add(1);
a = a.sqrt();
a.add(this.product(new Complex(0, 1)));
a = a.log();
a.multiply(new Complex(0,1));
a.add(Math.PI/2);
return a;
}
COM: <s> returns the arccosine of this number </s>
|
funcom_train/33759126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNumber(int row, int column, int number) {
if (numbers == null) {
numbers = new ArrayList<Integer>(width * height);
for (int i = 0; i < width * height; i++)
numbers.add(-1);
}
numbers.set(row * width + column, number);
}
COM: <s> sets the number shown in the specified grid cell </s>
|
funcom_train/42970531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void undeployDriver(String instanceId){
logger.info("Undeploying driver with InstanceId : '"+instanceId+"'");
DriverModel model = dao.retrieve(instanceId);
if (model != null){
UosDriver uDriver = instances.get(model.rowid());
uDriver.destroy();
dao.delete(model.id());
toInitialize.remove(model.id());
}else{
logger.error("Undeploying driver with InstanceId : '"+instanceId+"' was not possible, since it's not present in the current database.");
}
}
COM: <s> method responsible for undeploying the referenced driver instance from the driver </s>
|
funcom_train/45079324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ResultSet getRows(Connection conn) throws SQLException {
ResultSet rs = null;
try {
Statement stmt = conn.createStatement();
logger.debug(this.queryString);
rs = stmt.executeQuery(this.queryString);
if (rs.next() == false) rs = null;
}
catch (Exception e) {
throw new SQLException("Failure in executing report Query.");
}
return rs;
}
COM: <s> returns a result set with the rows corresponding to the </s>
|
funcom_train/15884632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getCancelButton() {
if (cancelButton == null) {
cancelButton = new JButton();
cancelButton.setText("Cancel");
cancelButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
chosenEntry = null;
dispose();
}
});
}
return cancelButton;
}
COM: <s> this method initializes cancel button </s>
|
funcom_train/4755526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkAdditionCompatible(final FieldMatrix<T> m) {
if ((getRowDimension() != m.getRowDimension()) ||
(getColumnDimension() != m.getColumnDimension())) {
throw new MatrixDimensionMismatchException(m.getRowDimension(), m.getColumnDimension(),
getRowDimension(), getColumnDimension());
}
}
COM: <s> check if a matrix is addition compatible with the instance </s>
|
funcom_train/39314408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetUnderline() {
System.out.println("testSetUnderline");
Frame f=new Frame("hello");
Text myText=new Text(f, true, 10, 10);
myText.setUnderline();
assertEquals( myText.getUnderline(),"underline");
assertEquals(myText.Ok.isSelected(), false);
System.out.println(myText.getUnderline());
}
COM: <s> test of set underline method of class text </s>
|
funcom_train/803986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream getStream(String name) throws Exception {
try {
ClassLoader l = Thread.currentThread().getContextClassLoader();
URL url = l.getResource(resourcePath + name);
InputStream i = url.openStream();
return i;
} catch (Exception e) {
e.printStackTrace();
throw new Exception("Could not get resource file: " + name);
}
}
COM: <s> fetches a data file from resource path as an input stream </s>
|
funcom_train/39212661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createTypeOptions() {
GridData gridData3 = new GridData();
gridData3.horizontalSpan = 2;
gridData3.horizontalAlignment = GridData.FILL;
gridData3.grabExcessHorizontalSpace = true;
group2 = new Group(this, SWT.NONE);
group2.setText("Password Protection");
group2.setLayoutData(gridData3);
group2.setLayout(new StackLayout());
}
COM: <s> this method initializes group2 </s>
|
funcom_train/49199900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addShowBackgroundPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Link_showBackground_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Link_showBackground_feature", "_UI_Link_type"),
ExhibitionPackage.Literals.LINK__SHOW_BACKGROUND,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the show background feature </s>
|
funcom_train/40930060 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getMiNumeroOKCommand() {
if (miNumeroOKCommand == null) {//GEN-END:|319-getter|0|319-preInit
// write pre-init user code here
miNumeroOKCommand = new Command("Aceptar", Command.OK, 0);//GEN-LINE:|319-getter|1|319-postInit
// write post-init user code here
}//GEN-BEGIN:|319-getter|2|
return miNumeroOKCommand;
}
COM: <s> returns an initiliazed instance of mi numero okcommand component </s>
|
funcom_train/9065138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ImageRegistry getImageRegistry() {
if (_imageRegistry == null && _backgroundRscName != null) {
_imageRegistry = new ImageRegistry();
ImageDescriptor imgDesc = new ResourceImageDescriptor(_backgroundRscName, this.getClass());
_imageRegistry.put(BACKGROUND, imgDesc.createImage());
}
return _imageRegistry;
}
COM: <s> retrieve initialized image registry </s>
|
funcom_train/32865900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int calculateEffectiveLength(){
//Log.status("eff_length called");
int num = 0;
int pos = loc;
for (int i = 0; i < size; i++){
pos = (++pos) % pool.length;
if ( (attributes[pos] & EXECUTED) != 0) num++;
}
//Log.status("eff_length" + num);
return num;
}
COM: <s> the effective length can be calculated by the number of executed instructions </s>
|
funcom_train/43590239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JTable getScrobbledHistoryTable() {
if (scrobbledHistoryTable == null) {
scrobbledHistoryTable = new JTable();
scrobbledHistoryTable.setShowGrid(true);
scrobbledHistoryTable.setGridColor(new Color(240, 240, 240));
scrobbledHistoryTable.setSelectionBackground(Color.LIGHT_GRAY);
scrobbledHistoryTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
scrobbledHistoryTable.setSelectionForeground(Color.BLACK);
}
return scrobbledHistoryTable;
}
COM: <s> this method initializes scrobbled history table </s>
|
funcom_train/9709151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop(BundleContext bc) throws BundleException {
try {
for (int i = 0; i < webAppDescriptor.servlet.length; i++) {
ServletDescriptor servlet = webAppDescriptor.servlet[i];
httpService.unregister(webAppDescriptor.context
+ servlet.subContext);
}
bc.ungetService(sRef);
httpService = null;
webAppDescriptor = null;
} catch (Exception e) {
throw new BundleException("Failed to unregister resources", e);
}
}
COM: <s> stops the web app </s>
|
funcom_train/41765661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setText(String t) {
this.text = (t != null) ? t : "";
setShouldCalcPreferredSize(true);
if(maxSize < text.length()) {
maxSize = text.length() + 1;
}
// special case to make the text field really fast...
rowStrings=null; //zero the vector inorder to initialize it on the next paint
repaint();
}
COM: <s> sets the text within this text area </s>
|
funcom_train/3393206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addLineNumber(char startPc, char lineNumber) {
if (lineDebugInfo) {
if (lineInfo.nonEmpty() && lineInfo.head[0] == startPc)
lineInfo = lineInfo.tail;
if (lineInfo.isEmpty() || lineInfo.head[1] != lineNumber)
lineInfo = lineInfo.prepend(new char[]{startPc, lineNumber});
}
}
COM: <s> add a line number entry </s>
|
funcom_train/31985451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Entity succ(Entity e) {
if (e==null) {
sendWarning ( "Can not find successor of Entity in Queue!",
"Queue : "
+getName()+" Method: Entity succ(Entity e)",
"The Entity 'e' given as parameter is a null reference!",
"Check to always have valid references when querying for Entities");
return null; // no proper parameter
}
return ql.succ(e);
}
COM: <s> returns the entity enqueued directly after the given entity in the </s>
|
funcom_train/3635495 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected CellView findViewForPoint(Point2D pt) {
double snap = graph.getTolerance();
Rectangle2D r = new Rectangle2D.Double(
pt.getX() - snap,
pt.getY() - snap,
2 * snap,
2 * snap);
for (int i = 0; i < views.length; i++)
if (views[i].intersects(graph.getGraphics(), r))
return views[i];
return null;
}
COM: <s> hook for subclassers to return a different view for a mouse click </s>
|
funcom_train/37018901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mousePressed (MouseEvent ev){
super.mousePressed(ev);
Component acm=MResource.getAncestor("com.malted.lib.gui.MMedia",ev.getComponent());
if (acm!=null) {
MMedia mm=(MMedia)acm;
if (hasTheName(mm,Questions)) {
draggingmedia=mm;
// draggingmedia.setCursor(new Cursor(Cursor.MOVE_CURSOR));
draggingmedia.setCursor(mm.createCursor());
}
}
}
COM: <s> controls mouse pressed event </s>
|
funcom_train/50334378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized protected void sendMessage(AbstractMRMessage m, AbstractMRListener reply) {
msgQueue.addLast(m);
listenerQueue.addLast(reply);
synchronized (xmtRunnable) {
if (mCurrentState == IDLESTATE) {
mCurrentState = NOTIFIEDSTATE;
xmtRunnable.notify();
}
}
if(m!=null)
log.debug("just notified transmit thread with message " +m.toString());
}
COM: <s> this is invoked with messages to be forwarded to the port </s>
|
funcom_train/46628674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeExercice(AddRemoveDocumentRequest request) throws UserException, PracticeException, ExerciceException, ValidationFailedException, SessionExpiredException {
String token = request.getToken();
Locale defaultLocale = Locale.getDefault();
serviceFacade.removeExercicesFromPractice(request.getTargetDocumentId(), request.getDocumentIds(), token, defaultLocale);
}
COM: <s> removes an exercice from a document </s>
|
funcom_train/3098827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void eventDispatcher () {
if (eventQueue.isEmpty()) {
currentEvent = null;
if (verbosity > 2)
Log.current.println("No events to dispatch");
}
else {
currentEvent = (Event) eventQueue.get();
if (verbosity > 2)
Log.current.println("Dispatching " + currentEvent.toString());
}
}
COM: <s> selects and dequeues event instances from the event queue for </s>
|
funcom_train/23791826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void queryNodes() {
if(isRegistered) {
Object[] arg = {incoming_port, name};
OSCMessage msg = new OSCMessage("/query/nodes", arg);
out.send(msg);
} else {
if(verbo > 2) System.err.println("\nSenseWorldDataNetwork warning: the client is not yet registered. Cannot query server.");
}
}
COM: <s> queries the server for all the nodes present on the network </s>
|
funcom_train/20307308 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Functor getMostGroundVersion(Functor f) {
Node[] args = f.getArgs();
Node[] cargs = new Node[args.length];
for (int i = 0; i < args.length; i++) {
cargs[i] = getGroundVersion(args[i]);
}
return new Functor(f.getName(), cargs);
}
COM: <s> return the most ground version of the functor </s>
|
funcom_train/34342062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getEnviarmensaje() {
if (enviarmensaje == null) {//GEN-END:|27-getter|0|27-preInit
// write pre-init user code here
enviarmensaje = new Command("enviarmensaje", Command.OK, 0);//GEN-LINE:|27-getter|1|27-postInit
// write post-init user code here
}//GEN-BEGIN:|27-getter|2|
return enviarmensaje;
}
COM: <s> returns an initiliazed instance of enviarmensaje component </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.