__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/25198638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printLsr(PrintStream printStream) throws IOException {
Collections.sort(excludeDir);
PrintStream out = printStream;
if (out == null) {
out =
new PrintStream(
new FileOutputStream(basedirectory.getAbsolutePath()
+ File.separator + LS_R));
}
printLsr(out, basedirectory);
out.close();
}
COM: <s> print the ls r information to the print stream </s>
|
funcom_train/7614063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addIIOWriteWarningListener(IIOWriteWarningListener listener) {
if (listener == null) {
return;
}
if (warningListeners == null) {
warningListeners = new ArrayList<IIOWriteWarningListener>();
warningLocales = new ArrayList<Locale>();
}
warningListeners.add(listener);
warningLocales.add(getLocale());
}
COM: <s> adds the iiowrite warning listener </s>
|
funcom_train/32057345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSave() {
System.out.println("testSave");
UserProperties y=UserProperties.getInstance("tmpSaveAll");
y.setProperty("tk","tv");
UserProperties.saveAll();
UserProperties x=UserProperties.getInstance("tmpSaveAll");
assertEquals("tv",x.getProperty("tk"));
}
COM: <s> test of save method of class user properties </s>
|
funcom_train/14652407 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void growList() {
int newListSize;
PluginListElement[] newPluginList;
newListSize = listSize + PluginCore.LIST_GROWTH_SIZE;
newPluginList = new PluginListElement[newListSize];
for (int i = 0; i < listSize; i++) {
newPluginList[i] = pluginList[i];
}
for( int i = listSize; i < newListSize; i++) {
newPluginList[i] = null;
}
pluginList = newPluginList;
listSize = newListSize;
}
COM: <s> increase the size of plugin list by the ammount list growth size </s>
|
funcom_train/38808587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_TCM__String_toString() throws JHuPeDOMException {
// expected value
final Namespace ns = Namespace.getNamespace("prefx",
"http://some.other.place");
final Attribute attr = jhupeDomFactory
.newAttribute("test", "value", ns);
String str = attr.toString();
assertTrue("incorrect toString form",
str.equals("[Attribute: prefx:test=\"value\"]"));
}
COM: <s> test that the to string function works according to the jdom spec </s>
|
funcom_train/20731138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRetiredStatus(ConnectionReader conrdr) {
boolean sendPeer = Global.params().getParamBoolean(ParamServer.STATUS_REPORTER_CONNECTION_PEER);
boolean sendClient = Global.params().getParamBoolean(ParamServer.STATUS_REPORTER_CONNECTION_CLIENT);
if ((sendPeer && conrdr.ifConnectionType(ConnectionReader.TYPE_PEER))
|| (sendClient && conrdr.ifConnectionType(ConnectionReader.TYPE_CLIENT)) ) {
synchronized(retiredStatus) {
retiredStatus.add(appendOneConnection(conrdr));
}
}
return;
}
COM: <s> when connections are disconnected and the controlling object is removed from the </s>
|
funcom_train/38955453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(FilterConfig filterConfig) {
this.filterConfig = filterConfig;
if (filterConfig != null) {
if (filterConfig.getInitParameter("characterEncoding") != null)
characterEncoding = filterConfig.getInitParameter("characterEncoding");
if (filterConfig.getInitParameter("forceEncoding") != null)
forceEncoding = Boolean.parseBoolean(filterConfig.getInitParameter("forceEncoding"));
}
}
COM: <s> init method for this filter </s>
|
funcom_train/23297163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDistance(int i, int j, double dist) {
this.distances.setEntry(i, j, dist);
this.distances.setEntry(j, i, dist);
/*
double[][] distance = this.distances.getArray();
distance[i][j] = distance[j][i] = dist;
* */
}
COM: <s> sets both upper and lower triangles </s>
|
funcom_train/36949646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected IBuffer openBuffer(IProgressMonitor pm, Object info) throws RubyModelException {
char[] contents = findSource();
if (contents != null) {
// create buffer
IBuffer buffer = getBufferManager().createBuffer(this);
if (buffer == null) return null;
BufferManager bufManager = getBufferManager();
bufManager.addBuffer(buffer);
// set the buffer source
if (buffer.getCharacters() == null){
buffer.setContents(contents);
}
// listen to buffer changes
buffer.addBufferChangedListener(this);
return buffer;
}
return null;
}
COM: <s> opens and returns buffer on the source code associated with this class file </s>
|
funcom_train/8022994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stylizeNumVal(int r, int g, int b, boolean bold, boolean italic) {
setStyleConstants(styles.getStyleForScanValue(Token.NUM_VAL
.getScanValue()), new Color(r, g, b), bold, italic);
}
COM: <s> set text attributes for scheme number values </s>
|
funcom_train/29970666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String fixedWidthOutput(String printThis, int width) {
String out = "";
if (printThis.length() > width) {
out += printThis.substring(0, width);
} else {
out += printThis;
String pad = "";
for (int i = width - printThis.length(); i > 0; i--) {
pad += " ";
}
out += pad;
}
return out;
}
COM: <s> returns a padded string of given width containing given string </s>
|
funcom_train/12547840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set getSet(int row, int column) {
String s = (String) getValueAt(row, column);
Set set = new TreeSet();
for (int i = 0; i < s.length(); i++) {
if (s.charAt(i) == '!') {
set.add("");
continue;
}
set.add(s.substring(i, i + 1));
}
return set;
}
COM: <s> returns the character set at a particular location </s>
|
funcom_train/41165286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(CoLearningStrategy entity) {
EntityManagerHelper.log("saving CoLearningStrategy instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved co learning strategy </s>
|
funcom_train/15956369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put(Object obj) {
int hashCodeObject;
if(!useRabin) hashCodeObject = obj.hashCode(); else try {
hashCodeObject = hashRabin(obj);
} catch ( Exception e ) {
useRabin = false;
hashCodeObject = obj.hashCode();
}
for (int i = 0; i < numFunctions; i++) {
//keys[getHash(i, hashCodeObject)] = true;
bitArray.setBit(getHash(i, hashCodeObject));
}
}
COM: <s> adds the specified key in this bloom filter </s>
|
funcom_train/21035422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField makeTextField(int width){
JTextField retVal = new JTextField(width);
retVal.getDocument().addDocumentListener(new DocumentListener() {
public void removeUpdate(DocumentEvent e) {
isDirty = true;
}
public void insertUpdate(DocumentEvent e) {
isDirty = true;
}
public void changedUpdate(DocumentEvent e) {
isDirty = true;
}
});
return retVal;
}
COM: <s> used to create an empty text field </s>
|
funcom_train/16805998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setReturnClass(Class cls) {
if (operationSetManually) {
throw new RuntimeException(
Messages.getMessage("operationAlreadySet"));
}
if (operation == null)
operation = new OperationDesc();
operation.setReturnClass(cls);
TypeMapping tm = getTypeMapping();
operation.setReturnType(tm.getTypeQName(cls));
parmAndRetReq = true;
}
COM: <s> sets the desired return java class </s>
|
funcom_train/36244313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CategorySet list(String categoryCode) throws AppException {
CategorySet objectSet = new CategorySet();
try {
categoryDA = new CategoryDA();
objectSet = categoryDA.readDataSet(categoryCode);
categoryDA = null;
} catch (AppException ex) {
Logger.getLogger(CategoryFcd.class.getName()).log(Level.SEVERE, null, ex);
throw ex;
}
return objectSet;
}
COM: <s> retrieve category details by category code </s>
|
funcom_train/7292440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private long compare(Object that) {
long thatMs;
if (that instanceof Calendar) {
thatMs = ((Calendar)that).getTimeInMillis();
} else if (that instanceof Date) {
thatMs = ((Date)that).getTime();
} else {
throw new IllegalArgumentException(that + "is not a Calendar or Date");
}
return getTimeInMillis() - thatMs;
}
COM: <s> return the difference in milliseconds between the moment this </s>
|
funcom_train/28295974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetData() throws Exception {
Entry entry =
dvm.new Entry(Package.class, Sphere.class, Package.NAME,
Sphere.NAME);
Entry entry2 =
dvm.new Entry(IsClassOf.class, Sphere.class, IsClassOf.NAME,
Sphere.NAME);
dvm.set(entry);
dvm.set(entry2);
Collection<Class<? extends DataAddon>> dataClasses =
dvm.getData(entry.getVisualClass());
assertEquals(dataClasses.size(), 2);
}
COM: <s> test get data </s>
|
funcom_train/2760510 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Event getEvent(String name, boolean mustExist) {
for(int i = 0; i < _events.length; i++) {
if(_events[i].getName().equals(name)) {
return _events[i];
}
}
if(mustExist) {
throw new IllegalArgumentException("Event("+name+") does not exist in step("+getName()+").");
}
return null;
}
COM: <s> returns the event for the supplied name </s>
|
funcom_train/43237556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getCardRadioSelection() throws HolderException {
if (!isCardDialogVisible())
throw new HolderException("Cannot get card radio selection when dialog is hidden");
for (int i = 0; i < cardRadio.length; i++)
if (cardRadio[i].getState())
return i;
return -1; // This should never be the case.
}
COM: <s> gets the index of the currently selected card selection radio button </s>
|
funcom_train/31907191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Bridge getBridge(String namespaceURI, String localName) {
HashMap localNameMap = (HashMap) namespaceURIMap.get(namespaceURI);
if (localNameMap == null) {
return null;
}
Bridge bridge = (Bridge)localNameMap.get(localName);
if (dynamic) {
return bridge == null ? null : bridge.getInstance();
} else {
return bridge;
}
}
COM: <s> returns the bridge associated with the element type </s>
|
funcom_train/16143947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertTab(String text, boolean asHTML, int beforeIndex) {
Label item;
if (asHTML)
item = new HTML(text);
else
item = new Label(text);
item.addClickListener(this);
item.setStyleName("gwt-TabBar" + styleName + "Item");
panel.insert(item, beforeIndex + 1);
}
COM: <s> inserts a new tab at the specified index </s>
|
funcom_train/46019042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Locale getDomainDefaultLocale(final HttpServletRequest request) {
Domain domain = DomainFilter.getDomain(request);
if (domain != null) {
String defaultLocale = domain.getConfiguration().get(
"defaultLocale");
if (DEBUG) {
LOG.debug("domain default locale: " + defaultLocale);
}
return LocaleUtils.toLocale(defaultLocale);
} else {
if (DEBUG) {
LOG.debug("domain is null.");
}
return null;
}
}
COM: <s> get the default locale of current domain </s>
|
funcom_train/50313089 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMinimum (int value) {
checkWidget ();
if (value < 0) return;
int[] range = Fox.FXSlider_getRange(handle);
if (0 <= value && value < range[1]) {
Fox.FXSlider_setRange(handle, value, range[1]);
int selection = Fox.FXSlider_getValue(handle);
if(selection < value)
Fox.FXSlider_setValue(handle, value);
Fox.FXWindow_update(handle); // Fox doesn't correctly redraw the slider
}
}
COM: <s> sets the minimum value that the receiver will allow </s>
|
funcom_train/6260039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isListSetAssociation(AssociationEnd te, AssociationEnd oe) {
boolean mults = jmi.isMultiple(te) && jmi.isMultiple(oe);
boolean isListSet = !isOrdered(oe) && isOrdered(te) && mults;
boolean isSetList = !isOrdered(te) && isOrdered(oe) && mults;
return (isListSet || isSetList);
}
COM: <s> returns true if te oe determine set list association and false in otherwise </s>
|
funcom_train/38353025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addOutPort(int index) {
OutPort newPort = new OutPort(this, index);
outPorts.add(index, newPort);
for (int i = index + 1; i < outPorts.size(); i++) {
((OutPort)outPorts.get(i)).setNumber(i);
}
firePortAddedEvent(newPort);
}
COM: <s> inserts an out port with the specified number </s>
|
funcom_train/22579442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setOperationaStatus(DeviceInterface devIf) {
String sqlString = null;
sqlString = new String ("UPDATE "+I_TBL_NAME
+ " SET operationalStatus='"+devIf.getIfOperStatus()+"'"
+ " WHERE deviceID="+devIf.getDeviceID()
+ " AND ifIndex="+devIf.getIfIndex());
System.out.println("\nDbDeviceInterface.setOperationaStatus:\n sqlString = "+sqlString);
return executeUpdate(sqlString);
}
COM: <s> update a device interface records operational status </s>
|
funcom_train/31125258 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Collection stripNonTestMethods(final IMethod[] methods) throws JavaModelException {
final Collection result = new ArrayList();
if (methods != null) {
for (int i = 0; i < methods.length; i++) {
if (getTestMethodFilterStrategy().accept(methods[i])) {
result.add(methods[i]);
}
}
}
return result;
}
COM: <s> convert the array of methods into a collection </s>
|
funcom_train/15601133 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected GCTerminalView buildTerminal(String termID) {
//build the terminal with ourself as the owner
GCTerminalView newTerm = new GCTerminalView(termID, this.model.toString(), termID +":) ");
this.sendSysEvent(CORE.ID, CORE.ADDCHILDTERM, newTerm);
return newTerm;
}
COM: <s> b purpose b builds a terminal and adds it to the core br </s>
|
funcom_train/28427240 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private byte cryptByte(byte b) {
if (currentByte >= length) {
currentByte = 0;
// cipher.crypt(ivBlock, 0, length, ivBlock, 0);
cipher.update(ivBlock, 0, length, ivBlock, 0);
}
b ^= ivBlock[currentByte];
currentByte++;
return b;
}
COM: <s> encrypts or decrypts a byte in ofb mode encryption and decryption </s>
|
funcom_train/3749023 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getDatabaseDialects() {
if (logger.isDebugEnabled()) {
logger.debug("getDatabaseDialects() - start");
}
if (logger.isDebugEnabled()) {
logger.debug("getDatabaseDialects() - end - return value = "
+ databaseDialects);
}
return databaseDialects;
}
COM: <s> a list of all the string names of the strong hibernate strong </s>
|
funcom_train/13122732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void logon() {
BufferedReader br = IRCir;
BufferedWriter bw = IRCor;
try {
// send user info
bw.write("user " + botName + " ware2 irc :" + botDescription);
bw.newLine();
bw.write("nick " + botName);
bw.newLine();
bw.flush();
} catch (Exception e) {
System.out.println("logon error: " + e);
System.exit(0);
}
return;
}
COM: <s> logs onto the irc server as a user </s>
|
funcom_train/20040057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetData() {
this.setName("");
this.setType("");
this.setContact("");
this.setAffiliatedResearchers("");
this.setCountry("");
this.setResearchKeywords("");
this.setResearchDescription("");
this.setHomePage("");
}
COM: <s> resets the organization data </s>
|
funcom_train/48909489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getComboProductos() {
if (comboProductos == null) {
ModeloListaProducto modelo = new ModeloListaProducto();
comboProductos = new JComboBox();
comboProductos.setModel(modelo);
comboProductos.setBounds(new Rectangle(104, 57, 121, 23));
if(modelo.getSize()>0)
comboProductos.setSelectedIndex(0);
comboProductos.addKeyListener(new KeyAdapter(){
public void keyPressed(KeyEvent e) {
if(e.getKeyCode()==KeyEvent.VK_ENTER)
txfCapacidadMaxima.grabFocus();
}
});
}
return comboProductos;
}
COM: <s> this method initializes jcb productos </s>
|
funcom_train/7384939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void decodeAttributes(mxCodec dec, Node node, Object obj) {
NamedNodeMap attrs = node.getAttributes();
if (attrs != null) {
for (int i = 0; i < attrs.getLength(); i++) {
Node attr = attrs.item(i);
decodeAttribute(dec, attr, obj);
}
}
}
COM: <s> decodes all attributes of the given node using decode attribute </s>
|
funcom_train/39892272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String createInvite(String callerJabberId, String calleeJabberId, String callId) {
String method = "POST";
String url = "/calls/invite";
Map <String, String> paramList = new HashMap<String, String>();
paramList.put("callerJabberId", callerJabberId);
paramList.put("calleeJabberId", calleeJabberId);
paramList.put("callId", callId);
return TB_Request(method, url, paramList);
}
COM: <s> create an invite to a particular call </s>
|
funcom_train/7608103 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
for (int i = 0; i < callbacks.length; i++) {
WSPasswordCallback pc = (WSPasswordCallback)callbacks[i];
String pass = passwords.get(pc.getIdentifier());
if (pass != null) {
pc.setPassword(pass);
return;
}
}
}
COM: <s> it attempts to get the password from the private </s>
|
funcom_train/18183809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void testEqualsSecondObjAllNulls() {
connectionRequestInfoImpl.setRecaptchaHostName(RECAPTCHA_HOST_NAME_TEST);
connectionRequestInfoImpl.setRecaptchaPrivateKey(RECAPTCHA_PRIVATE_KEY_TEST);
assertThat(connectionRequestInfoImpl.equals(secondConnectionRequestInfoImpl), is(false));
assertThat(secondConnectionRequestInfoImpl.equals(connectionRequestInfoImpl), is(false));
}
COM: <s> test inequality on one object all nulls </s>
|
funcom_train/28109252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete() throws SQLException {
// Check that the product exists.
if (!exists())
throw new SQLException("Product, " + model_number + ", doesn't exist.");
// Delete the record.
DBSystem.execute(connection,
"DELETE FROM products WHERE model_number = '" + model_number + "'");
}
COM: <s> deletes the product from the database </s>
|
funcom_train/7881606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void muls(String bin) {
// TO DO
int r1 = Integer.parseInt(bin.substring(8, 11), 2);
int r2 = Integer.parseInt(bin.substring(11, 14), 2);
Integer addr = effAdr(bin);
try {
int temp = twosCompliment(getBinReg(r2))
* Integer.parseInt(memory[addr].toString(), 16);
setReg(r1, temp);
} catch (NumberFormatException e) {
// overflow occurs
}
}
COM: <s> description multiply the value in a register and a location in memory </s>
|
funcom_train/34656453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String result = "Arc:" + id + " weight:" + _weight + " delta:" + _delta;
if (_in == null) {
result += " in:null";
} else {
result += " in:" + _in.getId();
}
if (_out == null) {
result += " out:null";
} else {
result += " out:" + _out.getId();
}
return (result);
}
COM: <s> return description of object </s>
|
funcom_train/13439608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeView() {
String currView = getView();
if (currView==null || !currView.equals("column")) currView="column";
else currView="normal";
PDesktopItem item = getDesktopItem();
if (item!=null) {
item.setView(currView);
mainFrame.setChanged(true);
saveContent();
mainFrame.actualizeLaf();
//loadContent();
setCursorPosition(0, 0);
}
}
COM: <s> toogles the view between normal and column </s>
|
funcom_train/869268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ReferencePart getReferencePart(String namespace, String localname) throws XBRLException {
List<ReferencePart> candidates = getReferenceParts();
for (int i=0; i<candidates.size(); i++) {
ReferencePart part = candidates.get(i);
if (part.getNamespace().equals(namespace) & part.getLocalname().equals(localname)) {
return part;
}
}
return null;
}
COM: <s> get a specific reference part from a reference </s>
|
funcom_train/11023384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEvaluateWithDoubleProperty() {
BeanPropertyValueEqualsPredicate predicate =
new BeanPropertyValueEqualsPredicate("doubleProperty",expectedDoubleValue);
assertTrue(predicate.evaluate(new TestBean(expectedDoubleValue.doubleValue())));
assertTrue(!predicate.evaluate(new TestBean(expectedDoubleValue.doubleValue() - 1)));
}
COM: <s> test evaluate with double property </s>
|
funcom_train/41593128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPublisherPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_Book_publisher_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_Book_publisher_feature", "_UI_Book_type"),
LibraryPackage.Literals.BOOK__PUBLISHER, true, false, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
COM: <s> this adds a property descriptor for the publisher feature </s>
|
funcom_train/50880794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isGenerateAlwaysColumn(String inColumnName){
if (inColumnName == null) return false;
if (myGenerateAlwaysColumns == null) return false;
for (int i=0; i<myGenerateAlwaysColumns.length; i++){
if (inColumnName.equalsIgnoreCase(myGenerateAlwaysColumns[i])){
return true;
}
}
return false;
}
COM: <s> checks if this column is in the set of generate always columns </s>
|
funcom_train/24940163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startOutput(Writer writer) throws IOException {
nextID = 0;
printRule = false;
out = new PrintWriter(new BufferedWriter(writer));
out.println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">");
out.println("<HTML>");
out.println("<BODY>");
SimpleDateFormat df = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss");
out.println("<b>Generated on: " + df.format(new Date())
+ "</b><br><br>");
}
COM: <s> starts the output to a given character stream </s>
|
funcom_train/44875732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUpdatePropogated() {
preferredIndex = 0;
assertEquals("underyling not empty", 0, updates.size());
model.addClassPathChangeListener(this);
assertEquals("Didn't receive update", 1, updates.size());
underlying[0].fireClassPathChangeEvent(classLoader);
assertEquals("Didn't receive update", 2, updates.size());
}
COM: <s> test that verifies that a change event from an underlying model is </s>
|
funcom_train/18738850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RuleEvent normaliseEvent(RuleEvent event) {
RuleEvent result;
if (getReuse() == EVENT && event instanceof AbstractEvent<?,?>) {
result = this.eventMap.put((AbstractEvent<?,?>) event);
if (result == null) {
// the event is new.
result = event;
eventCount++;
}
} else {
result = event;
}
return result;
}
COM: <s> returns a normal event representing a given event </s>
|
funcom_train/11009114 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getLengthOfFormattingRun(int index) {
if(st.sizeOfRArray() == 0) return length();
for(int i = 0; i < st.sizeOfRArray(); i++){
CTRElt r = st.getRArray(i);
if(i == index) return r.getT().length();
}
return -1;
}
COM: <s> returns the number of characters this format run covers </s>
|
funcom_train/3936364 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeUnqualifiedLinks() {
if (docNode == null) return;
TagNode[] lLinks = docNode.getElementsByName("link", true); //$NON-NLS-1$
for (TagNode lLink : lLinks) {
String lRel = lLink.getAttributeByName("rel"); //$NON-NLS-1$
if (lRel.contains(" ")) { //$NON-NLS-1$
lLink.removeFromTree();
}
}
}
COM: <s> removes all code link code elements that can cause problems during rdfa extraction </s>
|
funcom_train/41812545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean goal(String goal) {
Hashtable job = new Hashtable();
job.put("task", "goal");
job.put("goal", goal);
job.put("description", "Prolog system command: " + goal);
bg.schedule(job);
return true;
}
COM: <s> pass a goal to the prolog engine </s>
|
funcom_train/7874452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Status createFavorite(long id) throws TwitterException {
requireCredentials();
String url = String.format("http://twitter.com/favorites/create/%d.json",
id);
String response = getTwitterHttpManager().post(url);
return Status.newFromJsonString(response);
}
COM: <s> favorites the status specified in the id parameter as the authenticating </s>
|
funcom_train/50462912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNativeArchives(List list) {
nativeArchives.clear();
nativeArchives.addAll(list);
super.clearNativeResources();
Iterator it = nativeArchives.iterator();
while(it.hasNext()) {
super.addNativeLib((NativeLibDesc)it.next());
}
}
COM: <s> set the native archives </s>
|
funcom_train/9538507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLineNumber(int ln) {
if (ln == lineNumber) {
return;
}
int old = lineNumber;
lineNumber = ln;
if (javalb != null) {
javalb.setLineNumber(ln);
}
firePropertyChange(PROP_LINE_NUMBER, new Integer(old), new Integer(getLineNumber()));
}
COM: <s> sets number of line to stop on </s>
|
funcom_train/27770377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addObject(SignatureObject object){
String uri = object.getId();
synchronized(this){
if(uri == null){
if(objects.get(uri) != null){
throw new UnsupportedOperationException("Cannot reset default object.");
}
objects.put("", object);
}
else{
objects.put(uri, object);
}
}
}
COM: <s> add an embedded object specification to this signature </s>
|
funcom_train/2289821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public I_CmsHistoryResource readResourceByPublishTag(CmsUUID structureId, int publishTag) throws CmsException {
CmsResource resource = readResource(structureId, CmsResourceFilter.IGNORE_EXPIRATION);
return m_securityManager.readResourceForPublishTag(m_context, resource, publishTag);
}
COM: <s> reads an historical resource in the current project with the given publish tag </s>
|
funcom_train/28743887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WorkflowInfo getWorkflowTemplateInfoById(Integer id) throws SimsException {
//String errMsg = clsName + ".getWorkflowTemplateInfoById(): ";
WorkflowInfo info;
try {
local = this.getWorkflowTemplateLocalById(id);
info = local.getWorkflowInfo();
}
catch (RuntimeException e) {
//Propagate.
throw e;
}
return info;
}
COM: <s> get workflow template info object by id </s>
|
funcom_train/45935563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void copyFileToFile(String src, String dst) throws IOException {
InputStream in = new FileInputStream(new File(src));
OutputStream out =
new FileOutputStream(new File(conf.destDirName, dst));
byte[] buf = new byte[BUFFER_SIZE];
int len;
while ((len = in.read(buf)) > 0) {
out.write(buf, 0, len);
}
in.close();
out.close();
}
COM: <s> copies src file to dst file </s>
|
funcom_train/49130281 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addEffect(Effect effect) {
effects.add(effect);
if (effect.getRenderComponent()) {
this.setRenderComponent(true);
}
if (getStart() == null) {
setStart(effect.getStart());
}
if (getEnd() == null) {
setEnd(effect.getEnd());
}
}
COM: <s> adds an additional effect to this composite effect </s>
|
funcom_train/44137003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyRemoveMedia(OSMElementEditorPanel ec, OSMElement elt, int type) {
for(int i = 0;i < m_ClientList.size();i++) {
OSMElementEditorListener lster = (OSMElementEditorListener)m_ClientList.get(i);
lster.onRemoveMedia(new OSMElementEditorEvent(ec, elt, type));
}
}
COM: <s> to notify a media remove </s>
|
funcom_train/1541028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void invalidateLayout(Container parent) {
checkParent(parent);
// invalidateLayout is called from Container.invalidate, which
// does NOT grab the treelock. All other methods do. To make sure
// there aren't any possible threading problems we grab the tree lock
// here.
synchronized(parent.getTreeLock()) {
isValid = false;
}
}
COM: <s> invalidates the layout indicating that if the layout manager </s>
|
funcom_train/19272718 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Date toDate(Object value) throws WrongValueTypeException {
try {
return (Date) value;
} catch (ClassCastException e) {
try {
return Iso8601UtilImpl.getInstance().parseDate(value.toString());
} catch (Exception e1) {
throw new WrongValueTypeException(this, Date.class);
}
}
}
COM: <s> this method gets the given value object as date </s>
|
funcom_train/35293813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void openNewReqState(Socket socket, Handle handle) {
PEPRequestStateManager manager = (PEPRequestStateManager) this.clientsHandleTable.get(handle.getId().toString());
if (manager == null) {
new Debug().printError(this.getClass().getName(), "PEPREQSTATEMANAGER IS NULL");
} else {
manager.processOpenNewReqState();
}
}
COM: <s> handles an open new request state </s>
|
funcom_train/49104024 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insert(JGraph graph,Rectangle2D bounds) {
List toInsert = new LinkedList();
// view attributes creation:
AttributeMap attributeMap = getAttributeMap(graph,bounds);
// insertion of the cell:
Map viewMap = new Hashtable();
viewMap.put(this, attributeMap);
toInsert.add(this);
// Insert the Vertex and its Attributes (can also use model)
graph.getModel().insert(toInsert.toArray(),
viewMap, null, null, null);
}
COM: <s> insert this cell into the graph object on the point </s>
|
funcom_train/37831284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addTokenToWorld(String name, int x, int y) {
final BoardToken token = (BoardToken) SingletonRepository.getEntityManager().getItem(name);
token.setPosition(x, y);
token.setHomePosition(x, y);
token.setTokenMoveListener(this);
getZone().add(token, false);
tokens.add(token);
}
COM: <s> creates a token and adds it to the world </s>
|
funcom_train/3801758 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNextName(Class objectClass, String newName) {
Map<String, AbstractNamedObject> nameMap = classNameMap.get(objectClass);
if (nameMap == null) {
return newName + "#1";
}
int i = 1;
while (nameMap.containsKey(newName + "#" + i)) {
i++;
}
return newName + "#" + i;
}
COM: <s> gets an unoccupied name for a class </s>
|
funcom_train/18731159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void repaint() {
if (Project.getInstance().getCurrentCamera().getType() == Camera.PERSPECTIVE) {
disableFactor();
} else {
setFactor((int)Project.getInstance().getCurrentCamera().getFactor());
enableFactor();
}
repaint(false);
}
COM: <s> repaint the canvas </s>
|
funcom_train/19097339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JBoard getBoard() {
if (board == null) {
board = new JBoard();
board.setOpaque(true);
board.setBackground(Color.white);
board.setBorder(UIGuidelines.brdMain);
board.setDataModel(m_DataModel);
board.setPreferredSize(new Dimension(440,400));
}
return board;
}
COM: <s> this method initializes board </s>
|
funcom_train/50168447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addField(DataFieldModel field) {
if (field instanceof ListFieldModel) {
ListFieldModel listFieldModel
= (ListFieldModel) field;
String name = listFieldModel.getName();
if (name.equals(PedroResources.EMPTY_STRING) == true) {
listFieldModel.setName(createUnnamedListFieldName());
} //end if ()
} //end if ()
ithUnnamedListField++;
fields.add(field);
fieldHash.put(field.getName(), field);
}
COM: <s> adds a field to the model </s>
|
funcom_train/41876019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStrings() {
MinorVersionComparator c = new MinorVersionComparator();
String v1 = "foo";
String v2 = "bar";
assertSame(v1, c.determineBestVersion(v1, v2));
c = new MinorVersionComparator();
v1 = "foo";
v2 = "foo";
assertSame(v1, c.determineBestVersion(v1, v2));
}
COM: <s> test major minor patch works with just strings </s>
|
funcom_train/25707050 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifyBoardUpdateInformationChanged(final BoardUpdateThread thread, final BoardUpdateInformation bui) {
// notify listeners
final Iterator<BoardUpdateThreadListener> i = registeredListeners.iterator();
while( i.hasNext() ) {
i.next().boardUpdateInformationChanged(thread, bui);
}
}
COM: <s> called from thread to notify all listeners that the board update information changed </s>
|
funcom_train/21941079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Field27 getField27() {
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("27");
if (t == null) {
log.fine("field 27 not found");
return null;
} else {
return new Field27(t.getValue());
}
}
}
COM: <s> iterates through block4 fields and return the first one whose name matches 27 </s>
|
funcom_train/49318014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JButton makeCutLevelsButton() {
if (cutLevelsButton == null)
cutLevelsButton = makeButton(imageDisplay.getCutLevelsAction());
updateButton(cutLevelsButton,
_I18N.getString("cutLevels"),
Resources.getIcon("CutLevels24.gif"));
return cutLevelsButton;
}
COM: <s> make the cut levels button if it does not yet exists </s>
|
funcom_train/42118236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public void BitwiseXOROp() throws ParseException {
/* @bgen(jjtree) Operator */
ASTOperator jjtn000 = new ASTOperator(JJTOPERATOR);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
jjtreeOpenNodeScope(jjtn000);
Token t;
try {
jj_consume_token(XOR);
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
jjtreeCloseNodeScope(jjtn000);
jjtn000.setOperator(getToken(0).kind);
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
jjtreeCloseNodeScope(jjtn000);
}
}
}
COM: <s> bitwise xor op </s>
|
funcom_train/37253955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String fqJavaType(String type) {
if("date".equals(type)) {
return "java.util.Date";
} else if("timestamp".equals(type)) {
return "java.sql.Timestamp";
} else if(javaTypeMap.containsKey(type)) {
return (String) javaTypeMap.get(type);
} else {
return type;
}
}
COM: <s> full qualified java type mapping </s>
|
funcom_train/50022108 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private CategoryNode buildNode(Category iCategory) {
// build a new node
CategoryNode node = new CategoryNode(iCategory);
// add its children
for (final Iterator<Category> iter = categoryService.getSubCategories(iCategory).iterator();iter.hasNext();) {
Category category = iter.next();
node.add(new CategoryNode(category));
}
return node;
}
COM: <s> builds a node and its children if exist </s>
|
funcom_train/20907334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void putFunction(final Function function) {
// Make sure the function name is valid.
isValidName(function.getName());
// Make sure the function name isn't already in use.
final Function existingFunction = (Function) functions.get(function
.getName());
if (existingFunction == null) {
functions.put(function.getName(), function);
} else {
throw new IllegalArgumentException("A function with the same name "
+ "already exists.");
}
}
COM: <s> adds a function to the list of functions to use when evaluating </s>
|
funcom_train/8528183 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateStatusToError(String error) throws ServiceException {
try {
logger.fine("updating file status to error");
DbHelper dh = new DbHelper().open();
dh.setFileStatus(this.mId, STATUS_ERROR);
dh.setFileError(this.mId, error);
} catch (SQLException se) {
logger.severe("SQL Exception:" + se.getMessage());
throw new ServiceException("SQL Exception:" + se.getMessage());
}
}
COM: <s> update status to error </s>
|
funcom_train/50463846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void positionComp(DCComponent comp) {
//Ignore Master Tiles
if(comp instanceof MasterTile) return;
Point loc = comp.getLocation();
if(autoPosition && loc.x == 0 && loc.y == 0) {
Rectangle rect = findFirstEmptyCell(comp.getSize());
comp.setLocation(rect.getLocation());
}
}
COM: <s> after a component is added to the desktop the desktop will call its </s>
|
funcom_train/6289642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getLoadedMessagesCount() {
if (getStorage() == null) return 0;
final int storageSize = getStorage().getSize();
int emptyRootsNumber = 0;
if ( getStorage() instanceof ThreadedEmails ) {
emptyRootsNumber = ((ThreadedEmails)getStorage()).getEmptyRootsNumber();
}
return storageSize - emptyRootsNumber;
}
COM: <s> gets number of messages in this box that are currently loaded </s>
|
funcom_train/18076774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void registerNewChannels() throws Exception {
SocketChannel channel;
NioConnectionStruct channelStruct;
Object attachment;
while (null != (channelStruct = acceptedConnections.removeFirst())) {
channel = channelStruct.channel();
if (channel.isOpen()) {
attachment = channelStruct.attachment();
channel.configureBlocking(false);
channel.register(processSelector, SelectionKey.OP_READ, attachment);
}
}
}
COM: <s> accepts the connection from the shared connection list </s>
|
funcom_train/27943701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addPlugin( int nPluginId, long nProfileId ) {
if( database.execUpdate( "INSERT INTO active_plugins (profile_id, plugin_id) VALUES(" + nProfileId + ", " + nPluginId + ")" ) <= 0 )
return false;
return true;
}
COM: <s> add a plugin in the specified </s>
|
funcom_train/46477880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addActorsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SecurityContextModel_Actors_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SecurityContextModel_Actors_feature", "_UI_SecurityContextModel_type"),
SecurityContextPackage.Literals.SECURITY_CONTEXT_MODEL__ACTORS,
true,
false,
false,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the actors feature </s>
|
funcom_train/42822495 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getExportExpensesCommand() {
if (exportExpensesCommand == null) {//GEN-END:|74-getter|0|74-preInit
// write pre-init user code here
exportExpensesCommand = new Command("Export expenses", Command.SCREEN, 0);//GEN-LINE:|74-getter|1|74-postInit
// write post-init user code here
}//GEN-BEGIN:|74-getter|2|
return exportExpensesCommand;
}
COM: <s> returns an initiliazed instance of export expenses command component </s>
|
funcom_train/34960915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TorontoSchool update(TorontoSchool entity) {
EntityManagerHelper.log("updating TorontoSchool instance", Level.INFO,
null);
try {
TorontoSchool result = getEntityManager().merge(entity);
EntityManagerHelper.log("update successful", Level.INFO, null);
return result;
} catch (RuntimeException re) {
EntityManagerHelper.log("update failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> persist a previously saved toronto school entity and return it or a copy </s>
|
funcom_train/28352898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void guessRFPhaseToPreserveLongitudinalFocusing() {
final Qualifier qualifier = new KeyValueQualifier( LiveParameter.NAME_KEY, RFCavityAgent.PHASE_ADAPTOR.getName() );
final Iterator paramIter = getLiveParameters( qualifier ).iterator();
while ( paramIter.hasNext() ) {
final LiveParameter parameter = (LiveParameter)paramIter.next();
final RFCavityAgent agent = (RFCavityAgent)parameter.getNodeAgent();
agent.preserveDesignFocusingWithPhase();
}
}
COM: <s> make an educated guess for the rf phase to preserve longitudinal focusing </s>
|
funcom_train/31527229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SymTabAST getFirstChildOfType(int type) {
SymTabAST result = null;
AST sibling = getFirstChild();
while (sibling != null) {
if (sibling.getType() == type) {
result = (SymTabAST)sibling;
break;
}
sibling = sibling.getNextSibling();
}
return result;
}
COM: <s> gets first occurence of the child node with a certain type </s>
|
funcom_train/8381562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected RowSet executeQuery(String query) throws SQLException {
Connection c = dataSource.getConnection();
Statement s = c.createStatement();
ResultSet rs = s.executeQuery(query);
CachedRowSet rowSet = new CachedRowSetImpl();
rowSet.populate(rs);
rs.close();
s.close();
c.close();
return rowSet;
}
COM: <s> runs the given query and returns the results in a detached row set </s>
|
funcom_train/50385617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean updateCellEditor(String property, Profile profile) {
int column = getColumnFor(property);
List<String> credentialTypes = getCredentialTypeRegistry()
.getAllTypes();
String type = credentialTypes.get(column - 1);
ICredentialTypeExtensionPoint ext = getCredentialTypeRegistry()
.getDefiningExtension(type);
CellEditor editor = ext.getCellEditor(getTable(), profile);
CellEditor[] editors = getCellEditors();
editors[column] = editor;
setCellEditors(editors);
return editor != null;
}
COM: <s> dynamically resolve the cell editor for the given column and row </s>
|
funcom_train/2422531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getManualConnectionString() {
String s = getProperty(CONNECT_STRING_PROPERTY);
if (StringUtils.isEmpty(s)) {
return s;
}
if (getDriver() instanceof OdbcDriverDescriptor) {
if (!s.endsWith(";")) {
s += ";";
}
}
return s;
}
COM: <s> retrives the connection string that was manually specified by the user </s>
|
funcom_train/3180476 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIndent(String indent) {
// if passed the empty string, change it to null, for marginal
// performance gains later (can compare to null first instead
// of calling equals())
if ("".equals(indent)) {
indent = null;
}
defaultFormat.indent = indent;
}
COM: <s> this will set the indent code string code to use this </s>
|
funcom_train/33057463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeXml(Object o, Writer out) throws IOException, XerialException {
String rootName = (String)tagnameClassMap.get(o.getClass());
if (rootName == null) {
// this class has no tagname mapped to it, so use the
// fully-qualified class name
rootName = o.getClass().getName();
}
writeXml(o, rootName, out);
}
COM: <s> writes an xml for the given object </s>
|
funcom_train/18902948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void commit() throws JenaException {
try {
if (logger.isInfoEnabled()) {
logger.info("Committing transaction");
}
session.commit();
session.setAutoCommit(true);
}
catch (QueryException ex) {
throw new JenaException("Failed to commit transaction", ex);
}
}
COM: <s> if transactions are supported and there is a tranaction in progress </s>
|
funcom_train/25331414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetRelationshipType() {
String nullName = null;
String emptyName = "";
String badName = "bob";
String goodName = "unknown";
assertNull(RelationshipType.getRelationshipType(nullName));
assertNull(RelationshipType.getRelationshipType(emptyName));
assertNull(RelationshipType.getRelationshipType(badName));
assertEquals(RelationshipType.getRelationshipType(goodName), RelationshipType.UNKNOWN);
}
COM: <s> test of get relationship type method of class relationship type </s>
|
funcom_train/25661605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void Login(String userName, String password) throws XMPPException {
try {
// Try to login with "available" presence
this.Login(userName, password, Presence.Type.available);
}
catch (XMPPException e) {
// Disconnect the client if login failed
// Bug #3
chatConnection.disconnect();
throw e;
}
}
COM: <s> logs the chat client into the jabber </s>
|
funcom_train/18593858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map getAttributes() {
Map map = super.getAttributes();
// Only save the class attribute if it's not the default
map.remove(TAG_CLASS);
if (!DEFAULT_CLASS_NAME.equals(getTargetClassName())) {
map.put(TAG_CLASS, getTargetClassName());
}
return map;
}
COM: <s> return custom attributes for an action </s>
|
funcom_train/36666492 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assert_count_gt(String fieldName, Integer counter) {
if (fieldName == null || counter < 0) {
throw new IllegalArgumentException("fieldName param must not be null and counter must not be negative.");
}
Assert.assertTrue(takeCount(fieldName) > counter);
}
COM: <s> checks if number of returned records greater than given number </s>
|
funcom_train/5434873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ORMethod createGetter(String colName, ORMember mem) {
ORMethod m = new ORMethod();
m.setName("get" + colName);
m.addModifier("public");
m.setResult(mem.getType());
m.addBody("return " + mem.getName() + ";");
return m;
}
COM: <s> method create getter </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.