__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/24002423 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void println(char x,final AsyncCallback<Boolean> callback) {
synchronized (lock) {
print(x,new AsyncCallback<Boolean>()
{
public void onSuccess(Boolean b)
{
println(callback);
}
public void onFailure(Throwable t)
{
callback.onFailure(t);
}
});
}
}
COM: <s> prints a character and then terminates the line </s>
|
funcom_train/21467461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addItem(final RosterItem item) {
itemsByJID.put(item.getJID(), item);
for (final String group : item.getGroups()) {
List<RosterItem> items = itemsByGroup.get(group);
if (items == null) {
items = new ArrayList<RosterItem>();
itemsByGroup.put(group, items);
}
items.add(item);
}
}
COM: <s> add item either to items by group and items by id </s>
|
funcom_train/14202265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUp() {
Logging.initializeLogging();
try {
factory = new CalanaPacketFactory(new JobDB());
} catch (JAXBException e) {
Assert.fail(e.getMessage());
e.printStackTrace(System.err);
}
resultMessages = new HashMap();
myJob = new Job("MyJobID");
myJob.setApplication("MS doesntWork");
myJob.setWallTime(1000);
// Use the price only!
myJob.setPreference(0);
BrokerFactory bFactory = new BrokerFactory();
brokerContext = bFactory.createBroker("etc/testconfig/broker.xml");
}
COM: <s> start a fresh broker for each test </s>
|
funcom_train/25711813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof GUID)) return false;
final GUID guid = (GUID) o;
if (v[0] != guid.v[0]) return false;
if (v[1] != guid.v[1]) return false;
return true;
}
COM: <s> returns true if two </s>
|
funcom_train/1763634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setup(Vector2 movementDirection, int tileWidth, int tileHeight) {
if (movementDirection != null) {
mDelta.set(movementDirection);
mDelta.normalize();
} else {
mDelta.zero();
}
mTileWidth = tileWidth;
mTileHeight = tileHeight;
}
COM: <s> sets the visitor up for a ray test </s>
|
funcom_train/21918070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mergeWith(ClassifierImpl merge, List<ModelError> errors) {
mergeAttributes(merge, errors);
mergeOperations(merge, errors);
mergeClassAttributes(merge, errors);
mergeClassOperations(merge, errors);
mergeNavigations(merge, errors);
mergeGeneralizations(merge, errors);
mergeStates(merge, errors);
mergeInvariants(merge, errors);
mergeDefinitions(merge, errors);
}
COM: <s> method merge with merges this class with i merge i </s>
|
funcom_train/4755351 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RealMatrix getP() {
if ((cachedP == null) && !singular) {
final int m = pivot.length;
cachedP = MatrixUtils.createRealMatrix(m, m);
for (int i = 0; i < m; ++i) {
cachedP.setEntry(i, pivot[i], 1.0);
}
}
return cachedP;
}
COM: <s> returns the p rows permutation matrix </s>
|
funcom_train/25205116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getLigature(int cp1, int cp2) {
TfmCharInfoWord[] ciwArray = charinfo.getCharinfoword();
if (cp1 < 0 || cp1 >= ciwArray.length) {
return -1;
}
TfmCharInfoWord ciw = ciwArray[cp1];
if (ciw == null || !foundLigKern(ciw) || ligKernTable == null) {
return -1;
}
return ciw.getLigature(cp2);
}
COM: <s> return the ligature </s>
|
funcom_train/33893099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMinimum(int n) {
int newMax = Math.max(n, max);
int newValue = Math.max(n, getValue());
int newExtent = Math.min(newMax - newValue, theExtent);
setRangeProperties(newValue, newExtent, n, newMax, isAdjusting);
}
COM: <s> sets the minimum to i n i </s>
|
funcom_train/32239019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenu getMenuDictionaties() {
if (menuDictionaties == null) {
menuDictionaties = new JMenu();
menuDictionaties.setText("Dictionaries");
menuDictionaties.setMnemonic(KeyEvent.VK_I);
menuDictionaties.add(getMenuJobStatus());
menuDictionaties.add(getMenuPaymentTypes());
}
return menuDictionaties;
}
COM: <s> this method initializes menu dictionaties </s>
|
funcom_train/41823913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
byte ch = 0;
try {
while ((ch = (byte) inStream.read()) != -1)
pStream.print((char) ch);
} catch (IOException e) {
System.err.println("Input or output error: " + e);
return;
}
}
COM: <s> a threads run method does the work </s>
|
funcom_train/44851416 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPropertyDef( PropertyDef inPropertyDef ) {
try {
PropertySet lSet = (PropertySet) this.get(ObjectDefDef.propertyDefs);
if (lSet == null) {
lSet = new PropertySetImpl(this);
this.set(ObjectDefDef.propertyDefs, lSet);
}
lSet.add(new PropertyImpl(lSet, (String)inPropertyDef.get(PropertyDefDef.propertyName), inPropertyDef));
}
catch ( Exception exc ) {
DefaultExceptionHandler.instance().handle(exc);
}
}
COM: <s> adds a property def to the list of property defs </s>
|
funcom_train/31739835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resourceBundleChanged(CResourceBundle resourceBundle) {
super.resourceBundleChanged(resourceBundle);
Enumeration buttons = buttonGroup.getElements();
while (buttons.hasMoreElements()) {
JRadioButtonMenuItem radioButton =
(JRadioButtonMenuItem) buttons.nextElement();
Locale locale = CUtilities.localeFromString(radioButton.getActionCommand());
radioButton.setText(locale.getDisplayName());
}
}
COM: <s> called when the resource bundle has been changed </s>
|
funcom_train/24187209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Problem (String agentName, Map<String, String> owners, Map<String, V[]> domains, List< ? extends UtilitySolutionSpace<V, U> > spaces) {
this(agentName, owners, domains, spaces, false);
}
COM: <s> constructor for a minimization problem </s>
|
funcom_train/18551024 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFileGenerator_writeFileEx() {
System.out.println(xflowsProjectBean.getSourceOutput());
// We Can mess up the environment
xflowsProjectBean.setSourceOutput(null);
try {
FileGenerator.writeFile("test", "com.engitech.xflows", "Class");
} catch (GeneratorException e) {
//Exception caught - Test passed
pass();
return;
}
//Exception Caught
//If it gets this far
fail();
}
COM: <s> tests the exceptions thrown by write file </s>
|
funcom_train/20645689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDim(int height,int widthMoney,int widthCurrency) {
Dimension d1 =
new Dimension(widthMoney <= 0 ? MoneyValueInput.DEF_W : widthMoney
,height <= 0 ? DEF_H : height);
Dimension d2 =
new Dimension(
widthCurrency <= 0 ?
CurrencyChooserCombo.DEF_W : widthCurrency
,height <= 0 ? DEF_H :height);
_setDim(mvi,d1);
_setDim(ccc,d2);
}
COM: <s> set the dimensions of this component </s>
|
funcom_train/21606923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Map createMap(Class mapType, int initialCapacity) {
if (!mapType.isInterface()) {
try {
return (Map) mapType.newInstance();
}
catch (Exception ex) {
throw new IllegalArgumentException(
"Could not instantiate map class [" + mapType.getName() + "]: " + ex.getMessage());
}
}
else if (SortedMap.class.equals(mapType)) {
return new TreeMap();
}
else {
return new LinkedHashMap(initialCapacity);
}
}
COM: <s> create a map of the given type with the given </s>
|
funcom_train/47107747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItemArmor14() {
JMenuItem menuItem = new JMenuItem();
menuItem.setText(Armor.A_14.getItemName());
menuItem.setEnabled(false);
menuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
controller.setPlrReadiedArmor(Armor.A_14);
}
});
return menuItem;
}
COM: <s> creates the fifteenth choice for the armor menu </s>
|
funcom_train/3343792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DpmsState getDpms() {
final boolean display = ((vgaIO.getSEQ(NVSEQX_CLKMODE) & 0x20) == 0);
final int repaint1 = vgaIO.getCRT(NVCRTCX_REPAINT1);
final boolean hsync = ((repaint1 & 0x80) == 0);
final boolean vsync = ((repaint1 & 0x40) == 0);
return new DpmsState(display, hsync, vsync);
}
COM: <s> gets the current dpms state </s>
|
funcom_train/7692238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(Grupo entity) {
EntityManagerHelper.log("deleting Grupo instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(Grupo.class,
entity.getId());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent grupo entity </s>
|
funcom_train/36109303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCommitedRead(boolean commited) {
//by default in Oracle is COMMITTED=2, also it supports SERIALIZABLE=8
//on other can be COMMITTED=1, REPEATABLE=4 or SERIALIZABLE=8
int level = commited ? Connection.TRANSACTION_READ_COMMITTED : Connection.TRANSACTION_READ_UNCOMMITTED;
try{
if(metaData.supportsTransactionIsolationLevel(level))
connection.setTransactionIsolation(level);
}catch(SQLException e){}
}
COM: <s> connection and metadata should be already initialized </s>
|
funcom_train/20678026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doTag() {
HttpServletRequest request = smithContext.getRequest();
setActiveFormTag(request);
// writes open form tag to the output
try {
smithContext.getOut().write(createOpenFormTag());
} catch (IOException e) {
throw new ApplicationException(new ErrMsg(
"error.tag.form.cannot_write_output"), e);
}
addFormTagToRequest(request);
}
COM: <s> implementation of tag execution </s>
|
funcom_train/20660870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getMenuRangeRejItem() {
if (ip2ip == null) {
ip2ip = new JMenuItem();
ip2ip.setText("IP to IP");
ip2ip.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
IP2IP_GUI ipip = new IP2IP_GUI();
ipip.getIP2IP().setVisible(true);
}
});
}
return ip2ip;
}
COM: <s> this method initializes menu range item </s>
|
funcom_train/24059262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setActiveSlide(Slide slide) {
if (!_slides.contains(slide)) return false;
if (slide.equals(_activeSlide)) return true;
Slide oldValue = _activeSlide;
_activeSlide = slide;
_source = _activeSlide.getSize();
_propertyChangeSupport.firePropertyChange("activeSlide", oldValue, _activeSlide);
_propertyChangeSupport.firePropertyChange("source", oldValue, _source);
return true;
}
COM: <s> sets the slide that should be active i </s>
|
funcom_train/8075992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void notifyBatchClassifierListeners(BatchClassifierEvent ce) {
Vector l;
synchronized (this) {
l = (Vector)m_batchClassifierListeners.clone();
}
if (l.size() > 0) {
for(int i = 0; i < l.size(); i++) {
((BatchClassifierListener)l.elementAt(i)).acceptClassifier(ce);
}
}
}
COM: <s> notify all batch classifier listeners of a batch classifier event </s>
|
funcom_train/4605937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isGrenadeEventsPossibleAt(double time) {
for (int i=0;i<grenadeEvents.size();i++) {
if (grenadeEvents.get(i).getStartTime()+CSConstants.GRENADE_TAKE_DELAY >= time
&& grenadeEvents.get(i).getStartTime()-CSConstants.GRENADE_TAKE_DELAY <= time)
return false;
}
return true;
}
COM: <s> this method returns if the player can or not </s>
|
funcom_train/2716398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createSearchPattern(String pattern) {
pattern = pattern + "*";
pattern = pattern.replace("*", ".*");
pattern = pattern.replaceAll("\\?", ".?");
this.searchPattern = Pattern.compile(pattern, Pattern.CASE_INSENSITIVE);
}
COM: <s> creates the search pattern based on search string </s>
|
funcom_train/36991004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveCurrentUrl(){
StringBuffer b = new StringBuffer(100);
HttpServletRequest request = ActionContext.getContext().getRequest();
b.append(request.getRequestURL());
if ( request.getQueryString() != null ) {
b.append("?").append(request.getQueryString());
}
request.getSession().setAttribute(
AuthenticationFilter.CURRENT_URL, b.toString());
}
COM: <s> save current url to session </s>
|
funcom_train/16651922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getString(AtarrabiConfigParam param, String... params) {
String value = this.getString(param);
int i = 0;
while (StringUtils.contains(value, '{') && StringUtils.contains(value, '}')) {
value = StringUtils.replaceOnce(value, "{" + i + "}", params[i]);
i++;
}
return value;
}
COM: <s> delivers the value string of a property </s>
|
funcom_train/27844732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUnregisterBindings() throws Exception {
_activemodelwrapper.registerBinding(new MockBinding());
_activemodelwrapper.registerBinding(new MockBinding());
assertEquals(2, _activemodelwrapper.getBindings().size());
_activemodelwrapper.unregisterBindings();
assertEquals(0, _activemodelwrapper.getBindings().size());
}
COM: <s> method test unregister bindings is testing unregister bindings </s>
|
funcom_train/44589746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void collectSuperTypeNames(ReferenceBinding binding) {
ReferenceBinding superclass = binding.superclass();
if (superclass != null) {
this.addToResult(superclass.compoundName);
this.collectSuperTypeNames(superclass);
}
ReferenceBinding[] interfaces = binding.superInterfaces();
if (interfaces != null) {
for (int i = 0; i < interfaces.length; i++) {
ReferenceBinding interfaceBinding = interfaces[i];
this.addToResult(interfaceBinding.compoundName);
this.collectSuperTypeNames(interfaceBinding);
}
}
}
COM: <s> collects the names of all the supertypes of the given type </s>
|
funcom_train/1123025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean testConditions(Automaton a, WordSet u) {
Graph g = Graph.getGraph(n, a, u, sigma, 1);
monitor.info("Spread thread [" + n + "]: Graph (L^n(S_D),sigma) for wordset " + u + " --- " + g);
return g.isConnectedAperiodic();
}
COM: <s> tests list of neccessary conditions from theorem 13 </s>
|
funcom_train/8526177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isManyToManyLink() {
if (table.getColumnSize() != 2) return false;
for (ColumnDescription column : table.getColumns()) {
if (!table.isForeignKeyColumn(column.getColumnName())) {
return false;
}
if (!table.isPrimaryKeyColumn(column.getColumnName())) {
return false;
}
}
return true;
}
COM: <s> two identifiying foreign keys and no other attributes </s>
|
funcom_train/33256786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void paintWeekdayLabels() {
// write the weekday labels
for (int iDay = 0; iDay < 7; iDay++) {
int index = iDay + firstDayOfWeekOffset - 1;
if (index > 6) {
index = index-7;
}
add(weekdayLabel[index]);
}
}
COM: <s> add the weekday labels </s>
|
funcom_train/2888220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHost(HostType host) throws DatabaseAccessException{
try{
DatabaseEntry key = new DatabaseEntry(host.getId().getBytes());
DatabaseEntry value = new DatabaseEntry();
HostDocument hdoc = HostDocument.Factory.newInstance();
hdoc.setHost(host);
hostBinding.objectToEntry(hdoc, value);
database.put(null, key, value);
}catch(DatabaseException e){
throw new DatabaseAccessException(e);
}
}
COM: <s> it will update store the updated host type object in the database </s>
|
funcom_train/35840909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getZipName() {
if (uniqueName == null) {
return null;
}
String s = PersistenceManager.getInstance().getProjectBaseName(project);
if (uniqueName.length() > 0) {
s += "_" + uniqueName;
}
if (!s.endsWith(getZipFileExtension())) {
s += getZipFileExtension();
}
return s;
}
COM: <s> returns a unique members name for storage in a zipfile </s>
|
funcom_train/44663874 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBindersForFieldTypes(Map binders) {
for (Iterator i = binders.entrySet().iterator(); i.hasNext();) {
Map.Entry entry = (Map.Entry)i.next();
registerBinderForPropertyType((Class)entry.getKey(), (Binder)entry.getValue());
}
}
COM: <s> registers field type binders by extracting the key and value from each entry </s>
|
funcom_train/31430952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public POElem findJoinIrred (POElem a, POElem b) {
if (leq(a, b)) return null;
for (POElem e : meetIrreducibles()) {
if (!leq(a, e)) {
POElem test = (POElem)meet(a,e);
if (!leq(test, b)) a = test;
}
}
return a;
}
COM: <s> this finds a join irreducible element which is minimal with </s>
|
funcom_train/14012136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasQueuedTasks() {
if (taskQueueMap.size() == 0) {
return false;
}
Iterator it = taskQueueMap.values().iterator();
while (it.hasNext()) {
List taskList = (List) it.next();
if (taskList != null && taskList.size() > 0) {
return true;
}
}
return false;
}
COM: <s> determines if there are any queued tasks in any of the task </s>
|
funcom_train/21630201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSchemaTypes(char separator) {
String out = "";
for (String att : getSchemaTypes()) {
out += att + separator;
}
if (out.equals("")) {
return out;
} else {
return out.substring(0, out.length() - 1);
}
}
COM: <s> the types of the schema </s>
|
funcom_train/894735 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getOkButton() {
if (okButton == null) {
okButton = new JButton();
okButton.setText("OK");
okButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
FieldEditor.this.cancelled = false;
FieldEditor.this.setVisible(false);
}
});
}
return okButton;
}
COM: <s> this method initializes ok button </s>
|
funcom_train/8250175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void afterPropertiesSet() throws Exception {
if(pluginRegistrationStore == null) {
throw new ExceptionInInitializerError("No pluginRegistrationStore available");
}
if(pluginManifestReader == null) {
throw new ExceptionInInitializerError("No plugin mainfest reader set by spring");
}
if(StringUtils.isEmpty(webicalVersion)) {
throw new ExceptionInInitializerError("Webical version is required here");
} else {
log.info("Webical version: " + webicalVersion);
}
}
COM: <s> checks the variables hopefully set by spring </s>
|
funcom_train/8343667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void paintTriangle(final Polygon shape, final Graphics g, final boolean enabled) {
if (enabled) {
g.setColor(UIManager.getColor("Button.foreground"));
}
else {
g.setColor(UIManager.getColor("Button.disabledForeground"));
}
g.fillPolygon(shape);
if (enabled) {
g.setColor(UIManager.getColor("Button.shadow"));
}
else {
g.setColor(UIManager.getColor("Button.disabledShadow"));
}
g.drawPolygon(shape);
}
COM: <s> paints a shadow with a shadow which is simple its outline </s>
|
funcom_train/18015409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void genStat(JCTree tree, Env<GenContext> env, int crtFlags) {
if (!genCrt) {
genStat(tree, env);
return;
}
int startpc = code.curPc();
genStat(tree, env);
if (tree.tag == JCTree.BLOCK) crtFlags |= CRT_BLOCK;
code.crt.put(tree, crtFlags, startpc, code.curPc());
}
COM: <s> derived visitor method check whether character range table </s>
|
funcom_train/32144498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void restoreButtonsState(WizardComponentList<WizardButton> panelButtons) {
Map<String, Object> buttonsStateMap = panelButtonStates.get(currentPanel.getId());
for (WizardButton panelButton : panelButtons) {
Object state = buttonsStateMap.get(panelButton.getId());
if (state != null) {
panelButton.restoreState(state);
}
}
}
COM: <s> set some predefined state for all panel buttons </s>
|
funcom_train/22638911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean prepareJsEmulationLibrary(UniversalFile basePath, File destination) {
// Check, whether the destination directory actually exists.
if (!destination.isDirectory()) {
Log.error(TAG, "Destination directory does not exist: " + destination.getAbsolutePath());
return false;
}
// Recursively rename and copy all JS files.
return renameAndCopyJsFiles(basePath, basePath, destination);
}
COM: <s> takes the emulation library and puts it into the destination so it is </s>
|
funcom_train/14307772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isProjectArtifact(Object obj) {
if(obj instanceof ProjectFile && isProjectFile(((ProjectFile)obj).getPath()))
return true;
if(obj instanceof ProjectDirectory)
return getNewDirectory().getPathToFile(((ProjectDirectory)obj).toFile()) != null;
return false;
}
COM: <s> returns code true code if the given object is a project artifact file </s>
|
funcom_train/28363060 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SimpleChartDialog getChartDialog() {
if ( chartDialog != null ) return chartDialog;
Window owner = SwingUtilities.windowForComponent(_chart);
if (owner instanceof Frame) {
chartDialog = new SimpleChartDialog((Frame)owner, _chart, chartAdaptor);
}
else if (owner instanceof Dialog) {
chartDialog = new SimpleChartDialog((Dialog)owner, _chart, chartAdaptor);
}
else {
chartDialog = new SimpleChartDialog(_chart, chartAdaptor);
}
return chartDialog;
}
COM: <s> get the chart dialog and make it if it does not already exist </s>
|
funcom_train/5437148 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMaxPackets(int maxPackets) throws ParfumBallException {
if(maxPackets < 0) {
throw new IllegalArgumentException("MaxPackets [" + maxPackets +
"] must be greater than or equal to 0.");
}
if(started) {
throw new ParfumBallException("Session already started.");
}
this.maxPackets = maxPackets;
}
COM: <s> set the maximum number of packets to be captured in this session </s>
|
funcom_train/36644302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fixParameter(String id, double value) {
Parameter parameter = (Parameter)parameters.get(id);
if (parameter == null) { throw new IllegalArgumentException("parameter with name, "+id+", is unknown");}
parameter.isFixed = true;
parameter.initial = value;
}
COM: <s> fix a parameter </s>
|
funcom_train/12911595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UnknownElement getNestedTask() {
final UnknownElement ret = new UnknownElement("sequential");
ret.setTaskName("sequential");
ret.setNamespace("");
ret.setQName("sequential");
new RuntimeConfigurable(ret, "sequential");
for (int i = 0; i < nestedSequential.getNested().size(); ++i) {
final UnknownElement e = (UnknownElement) nestedSequential
.getNested().get(i);
ret.addChild(e);
ret.getWrapper().addChild(e.getWrapper());
}
return ret;
}
COM: <s> convert the nested sequential to an unknown element </s>
|
funcom_train/3387168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void translateAndSetInterestOps(int ops, SelectionKeyImpl sk) {
int newOps = 0;
// Translate ops
if ((ops & SelectionKey.OP_ACCEPT) != 0)
newOps |= PollArrayWrapper.POLLIN;
// Place ops into pollfd array
sk.selector.putEventOps(sk, newOps);
}
COM: <s> translates an interest operation set into a native poll event set </s>
|
funcom_train/28261386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadImageFromFile() throws IOException {
// Fetch bytes from image file
// open input stream
BufferedInputStream bdis = new BufferedInputStream(new DataInputStream(
new FileInputStream(imageFile)));
// read all bytes (as unsigned) in byte array
bytes = new byte[bdis.available()];
bdis.read(bytes, 0, bytes.length);
// Close input stream
bdis.close();
}
COM: <s> load image from file </s>
|
funcom_train/4731206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setListForWhiteSelection(Object treeElement) {
Object[] listItems = listContentProvider.getElements(treeElement);
List listItemsChecked = new ArrayList();
for (int i = 0; i < listItems.length; ++i) {
listItemsChecked.add(listItems[i]);
}
checkedStateStore.put(treeElement, listItemsChecked);
}
COM: <s> the tree element has been white selected </s>
|
funcom_train/4388472 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Message createMultipartMessage() throws Exception {
Message message = createMimeMessage();
BodyPart part1 = new MimeBodyPart();
part1.setContent(TEXT_PLAIN_CONTENT, TEXT_PLAIN_TYPE);
BodyPart part2 = new MimeBodyPart();
part2.setContent(TEXT_HTML_CONTENT, TEXT_HTML_TYPE);
Multipart multipart = new MimeMultipart();
multipart.addBodyPart(part1);
multipart.addBodyPart(part2);
message.setContent(multipart);
message.saveChanges();
return message;
}
COM: <s> creates the multipart message </s>
|
funcom_train/12156440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Configuration createProxySessionIdConfiguration() {
ConverterTuple[] tuples = {
new ConverterTuple(null, "a", "href"),
new ConverterTuple(null, "xfform", "action"),
};
ProxySessionIdConfiguration config = new ProxySessionIdConfiguration(
tuples, JSessionIDHandler.TARGET_SESSION);
//config.setServerNode(serverNode);
return config;
}
COM: <s> create a configuration for the proxy session idoperation process </s>
|
funcom_train/40322029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleGameOver() {
// Stop game thred
thread.setPaused(true);
// Reset figures
if (figure != null) {
figure.detach();
}
figure = null;
if (nextFigure != null) {
nextFigure.detach();
}
nextFigure = null;
// Handle components
board.setMessage("Game Over");
component.button.setLabel("Start");
}
COM: <s> handles a game over event </s>
|
funcom_train/33948201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Rectangle getRect() {
if (getType() == SHAPE_RECT || getType() == SHAPE_OVAL)
return (Rectangle)mShape;
else if (getType() == SHAPE_POLY) {
Polygon p = (Polygon)mShape;
return p.getBounds();
}
return null;
}
COM: <s> returns the bounds of the shape </s>
|
funcom_train/46733355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCustomControllerRef(DisplayModel customControllerRef) {
if (Converter.isDifferent(this.customControllerRef, customControllerRef)) {
DisplayModel oldcustomControllerRef= new DisplayModel(this);
oldcustomControllerRef.copyAllFrom(this.customControllerRef);
this.customControllerRef.copyAllFrom(customControllerRef);
setModified("customControllerRef");
firePropertyChange(String.valueOf(INVOICETYPES_CUSTOMCONTROLLERREFID), oldcustomControllerRef, customControllerRef);
}
}
COM: <s> custom controller used to process the invoice </s>
|
funcom_train/22362137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMode(int mode) {
switch(mode) {
case MODE_SPLIT:
setMode(mode, splitName != null ? splitName : settings.getProperty("Desktop.SplitSet", "Standard"));
break;
case MODE_FRAME:
setMode(mode, null);
break;
case MODE_LAYOUT:
setMode(mode, layoutName != null ? layoutName : settings.getProperty("Desktop.Layout", "Standard"));
break;
}
}
COM: <s> sets the desktop mode </s>
|
funcom_train/15954401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEquals_true() throws BMLException {
DataBoolean ldBoolean1 = new DataBoolean(fBlank);
ldBoolean1.setString(fValue1);
DataBoolean ldBoolean2 = new DataBoolean(fBlank);
ldBoolean2.setString(fValue_true);
assertEquals("",ldBoolean1, ldBoolean2);
}
COM: <s> test of equals between 1 and true </s>
|
funcom_train/18307599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean checkState() {
boolean result = false;
if (emptyStringAllowed) {
result = true;
}
if (textField == null) {
result = false;
}
final String txt = textField.getText();
result = (txt.trim().length() > 0) || emptyStringAllowed;
// call hook for subclasses
result = result && doCheckState();
if (result) {
clearErrorMessage();
} else {
showErrorMessage(errorMessage);
}
return result;
}
COM: <s> checks whether the text input field contains a valid value or not </s>
|
funcom_train/20871797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void subscribe(Class<?> clazz, EventSubscriber subscriber) {
synchronized (subscribersForClass) {
Set<EventSubscriber> set = subscribersForClass.get(clazz);
if (set == null) {
set = new HashSet<EventSubscriber>();
subscribersForClass.put(clazz, set);
}
set.add(subscriber);
}
if (log.isInfoEnabled())
log.info("added subscriber to class [" + clazz + "]: " + subscriber);
}
COM: <s> subscribes the subscriber to all events published on this event bus </s>
|
funcom_train/38416485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String loadText( String filePath ) {
if( inJar && !isExternal(filePath) ) {
InputStream is = this.getClass().getResourceAsStream( filePath );
if(is==null) return "";
return FileTools.loadTextFromStream( is );
}
else
return FileTools.loadTextFromFile( filePath );
}
COM: <s> to load text from a file </s>
|
funcom_train/51420582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isRemoveDirectAssociations() {
boolean result = true;
InternalModule[] deps = module.getImmediateDependencies();
for (int i = 0; i < deps.length; i++)
try {
result = configuratorProxy.removeDirectAssociations(deps[i]);
} catch (Exception e) {
logger.error(TextUtils.formatLogMessage(
"removeDirectAssociations", module.getDomainName(), module.getObjectName(),
MSGCAT_SYSTEM, ERRORMSG_GENERAL + "-" + e.getMessage()), e);
result = false;
}
return result;
}
COM: <s> removes the associations between module instances that are directly related </s>
|
funcom_train/10627250 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStatic() throws Exception {
int currentId = getTestId();
Statement s = new Statement(StatementTest.class, "nextTestId",
new Object[] {});
s.execute();
assertEquals(++currentId, getTestId());
}
COM: <s> the test checks the method execute for static method </s>
|
funcom_train/26162699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept(File f) {
if (f.isDirectory()) return true;
String filename = f.getName().toLowerCase();
if (filename.endsWith(".txt")) {
filename = filename.substring(0, filename.length() - 5);
if (!filename.endsWith("_"))
return true;
}
return false;
}
COM: <s> returns true when the file is an everquest cartography map </s>
|
funcom_train/14598190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected StringBuffer appendToStringBuffer(StringBuffer buf) {
buf.append(getClass().getName())
.append(_uri).append(uri).append('\"')
.append(_stats).append(stats);
appendArray(buf, _fore, foreLink);
appendArray(buf, _back, backLink);
return buf;
}
COM: <s> same as code to string buffer code except that the code </s>
|
funcom_train/22277139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void encode(Encoder encoder) throws CodingException {
encoder.encodeString(SCRIPT_KEY, script);
encoder.encodeObject(TARGET_KEY, (Codable)target);
encoder.encodeString(COMMAND_KEY, command);
encoder.encodeBoolean(LIVECONNECT_KEY, usingLiveConnect);
}
COM: <s> encodes the script </s>
|
funcom_train/48268554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shortCircuitAddEvent(UiEvent event) {
contentTable.addRowForUiEvent(event, true);
contentTable.setEndIndex(contentTable.getSourceDispatcher().getEventList().size() - 1);
// The row will not be rendered if it is already attached.
contentTable.renderRow(contentTable.getLastRow());
}
COM: <s> immediately adds and renders an event to the table </s>
|
funcom_train/10283813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTime(TagContent time) throws TagFormatException {
// check format
if (time.getTextContent() == null
|| !checkExactLength(time.getTextContent(), 4)
|| !checkNumeric(time.getTextContent())) {
throw new TagFormatException();
}
(new TextFrameEncoding(id3v2, "TIME", time, use_compression)).write();
}
COM: <s> set time format hhmm read from text content </s>
|
funcom_train/18032290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getImageFile(int index) {
if (index < 0 || index >= getThumbnailCount()) {
return null;
}
String filename = m_files[index].getAbsolutePath();
StringBuffer imgFile = new StringBuffer();
imgFile.append(filename.substring(0, filename.lastIndexOf(File.separator) + 1));
imgFile.append(filename.substring(filename.lastIndexOf("thumb") + 5)); //$NON-NLS-1$
return new File(imgFile.toString());
}
COM: <s> returns the file for a given thumbnail index </s>
|
funcom_train/34341687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCmdAnterior() {
if (CmdAnterior == null) {//GEN-END:|26-getter|0|26-preInit
// write pre-init user code here
CmdAnterior = new Command("Atras", Command.BACK, 0);//GEN-LINE:|26-getter|1|26-postInit
// write post-init user code here
}//GEN-BEGIN:|26-getter|2|
return CmdAnterior;
}
COM: <s> returns an initiliazed instance of cmd anterior component </s>
|
funcom_train/13958375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String remoteHostAddress() {
if (WOApplication.application().isDirectConnectEnabled()) {
if (_originatingAddress() != null) {
return _originatingAddress().getHostAddress();
}
}
for (String key : HOST_ADDRESS_KEYS) {
String remoteAddressHeaderValue = headerForKey(key);
if (remoteAddressHeaderValue != null) {
return remoteAddressHeaderValue;
}
}
return UNKNOWN_HOST;
}
COM: <s> returns the remote client host address </s>
|
funcom_train/9494132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkPositive(double[] in) throws IllegalArgumentException {
for (int i = 0; i < in.length; i++) {
if (in[i] <= 0) {
throw MathRuntimeException.createIllegalArgumentException(
"element {0} is not positive: {1}",
i, in[i]);
}
}
}
COM: <s> check all entries of the input array are 0 </s>
|
funcom_train/20312999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkLegalLiteral(String lex, RDFDatatype dtype, Class jtype, Object value) {
Literal l = m.createTypedLiteral(lex, dtype);
assertEquals(l.getValue().getClass(), jtype);
assertEquals(l.getValue(), value);
assertEquals(l.getDatatype(), dtype);
}
COM: <s> check can legally construct a literal with given lex value and dtype </s>
|
funcom_train/3155656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setFileFormatSelector(Request request) {
if (request.getNumOutputProducts() > 0) {
ProductRef ref = request.getOutputProductAt(0);
String format = ref.getFileFormat();
if (format != null) {
_fileCombo.setSelectedItem(format);
}
}
}
COM: <s> updates the file format combo with the request set </s>
|
funcom_train/39378092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void render(HtmlStringBuffer buffer) {
applyMetaData();
// Ensure OID hidden field is set if available after a commit
if (dataObject != null
&& isPersistent(dataObject)
&& StringUtils.isEmpty(oidField.getValue())) {
Object pk = DataObjectUtils.pkForObject(dataObject);
oidField.setValueObject(pk.toString());
}
super.render(buffer);
}
COM: <s> render the html representation of the cayenne form </s>
|
funcom_train/48396045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rotateTo(double position) {
if (acceleration >= 1.0) {
setRotation(position);
return;
}
double distance = Utils.modulus(position, photos.size()) - currentRotation;
if (distance > photos.size() / 2) {
distance -= photos.size();
} else if (distance < photos.size() / -2) {
distance += photos.size();
}
setVelocity(Utils.velocityForDistance(distance, acceleration, velocityThreshold));
}
COM: <s> start an animated rotation to the given position </s>
|
funcom_train/4975504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected IRuleTarget getTarget() {
Object o;
if (target != null) {
return target;
} else {
o = getDigester().peek();
if (o != null && o instanceof IRuleTarget) {
return (IRuleTarget) o;
} else {
throw new IllegalStateException("No object found for key " + key);
}
}
}
COM: <s> the target object instance of property setter is either specified </s>
|
funcom_train/27761866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getBoolean(String key) throws IllegalArgumentException {
if (key == null) {
throw new NoValidEntryException("null key is not permitted");
}
String entry = (String) data.get(key);
if (entry == null) {
throw new NoValidEntryException("no value for key " + key);
}
return Boolean.valueOf(entry).booleanValue();
}
COM: <s> returns the boolean value of the given key </s>
|
funcom_train/9163660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SwitchCase parseCase() {
input.skipAndExpect("case", WordBreaks.INSTANCE);
List<Expression> tests = new ArrayList<Expression>();
tests.add(parseExpression());
char ch = input.skipAndPeek();
while (ch == ',') {
input.expect(',');
tests.add(parseExpression());
ch = input.skipAndPeek();
}
Statement body = parseStatement();
return new SwitchCase(input.getPlace(), tests, body);
}
COM: <s> parses a case of a switch statement </s>
|
funcom_train/35831693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void execCMD( String cmd ) throws IOException {
Runtime run = Runtime.getRuntime();
Process process = run.exec(cmd);
InputStream is = process.getInputStream();
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line;
while ((line = br.readLine()) != null) {
System.out.println(line + "\n");
}
}
COM: <s> method to run an external command </s>
|
funcom_train/21888667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getPnl_user() {
if (pnl_user == null) {
jLabel12 = new JLabel();
jLabel12.setText("Manage System users");
jLabel12.setBounds(new Rectangle(199, 229, 127, 16));
pnl_user = new JPanel();
pnl_user.setLayout(null);
pnl_user.setBounds(new Rectangle(0, 0, 525, 706));
pnl_user.add(jLabel12, null);
}
return pnl_user;
}
COM: <s> this method initializes pnl user </s>
|
funcom_train/1910097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void preformCleanup()
{ int size = fitnessCache.size() / 2;
synchronized(fitnessCache)
{
Set<Entry<String, CacheItem>> entries = fitnessCache.entrySet();
Iterator<Entry<String, CacheItem>> entry = entries.iterator();
while(entry.hasNext() == true && size > 0)
{ entry.next();
entry.remove();
size--;
}
}
}
COM: <s> go through half the hash map and remove those entries </s>
|
funcom_train/32380425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDeleteResourceTypeForFailureCase1() {
System.out.println("testDeleteResourceTypeForFailureCase1");
long[] resourceTypes = null;
ResourceTypeManager resourceTypeManager = new ResourceTypeManager();
int expResult = IdentityMgmtConstants.ACTION_FAILED;
int result = resourceTypeManager.deleteResourceType(resourceTypes);
assertEquals(expResult, result);
}
COM: <s> test of delete resource type method of class com </s>
|
funcom_train/37448868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getDensity() {
// check first for error code
if (_countPossibleInteractions == -1) {
return -1; // error code for no data / no calculation
}
// check if there could be interactions
if (_countPossibleInteractions == 0) {
return 0;
}
// return density
return ((double) _countInteractions / (double) _countPossibleInteractions);
}
COM: <s> the proportion between all possilbe interactions for the two go ids and the </s>
|
funcom_train/50566467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getWord (Vector words, int pos) {
String ts = "{" + ((WordData) words.elementAt(pos)).text + "}";
if (((WordData)words.elementAt(pos)).fieldName.length() > 0) {
ts += " WITHIN " + ((WordData)words.elementAt(pos)).fieldName;
}
return ts;
}
COM: <s> get word gets a single word from the words vector </s>
|
funcom_train/26016625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void disableRetransmissionAlerts() {
if (this.retransmissionAlertTimerTask != null && this.retransmissionAlertEnabled) {
this.retransmissionAlertTimerTask.cancel();
this.retransmissionAlertEnabled = false;
String dialogId = this.retransmissionAlertTimerTask.dialogId;
if (dialogId != null) {
sipStack.retransmissionAlertTransactions.remove(dialogId);
}
this.retransmissionAlertTimerTask = null;
}
}
COM: <s> disable retransmission alerts and cancel associated timers </s>
|
funcom_train/41516675 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unloadMib(String name) {
for (int i = 0; i < loadedMibs.size(); i++) {
if (name.equals(loadedMibs.get(i))) {
if (MibTreeBuilder.getInstance().unloadMib(name)) {
loadedMibs.remove(i);
}
return;
}
}
}
COM: <s> unloads a named mib </s>
|
funcom_train/10870293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDateResolution(String fieldName, DateTools.Resolution dateResolution) {
if (fieldName == null) {
throw new IllegalArgumentException("Field cannot be null.");
}
if (fieldToDateResolution == null) {
// lazily initialize HashMap
fieldToDateResolution = new HashMap<String,DateTools.Resolution>();
}
fieldToDateResolution.put(fieldName, dateResolution);
}
COM: <s> sets the date resolution used by range queries for a specific field </s>
|
funcom_train/30172668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BootNodeClass getBootNode(){
if(this.bootNode==null)
try{
this.bootNode = new BootNodeClass(this.path,this.fnameConfigIni,this.database_ini,this.debug);
}catch(ConfigurationException e){
e.printStackTrace();
this.bootNode = null;
}
return this.bootNode;
}
COM: <s> get reference to the boot node class </s>
|
funcom_train/3619417 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCriticalityPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_UseCase_criticality_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_UseCase_criticality_feature", "_UI_UseCase_type"),
EclipsesrsPackage.Literals.USE_CASE__CRITICALITY,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the criticality feature </s>
|
funcom_train/28874760 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setRed() {
if (jLabel[instrument]!=null) {
jLabel[instrument].setIcon(new javax.swing.ImageIcon(
getClass().getResource("/jitt64/swing/icons/red.png")));
jLabel[instrument].setToolTipText("Not ready to play");
jLabel[instrument].repaint();
}
}
COM: <s> set the semaphore to red </s>
|
funcom_train/49626109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element deserializeToJDOM() {
Element option = new Element(getClass().getSimpleName());
if (getId() != null) {
option.setAttribute("id", getId().toString());
}
if (getName() != null) {
option.setAttribute("name", getName());
}
if (this.value != null) {
option.setAttribute("value", this.value);
}
return option;
}
COM: <s> returns a jdom representation of the option </s>
|
funcom_train/15627357 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean doSaveMap(final boolean performAction) {
final MapControl<G, A, R> mapControl = currentMapControl;
if (mapControl == null || !mapControl.getMapModel().isModified()) {
return false;
}
if (performAction) {
if (!fileControl.save(mapControl)) {
return false;
}
}
return true;
}
COM: <s> executes the save map action </s>
|
funcom_train/12159703 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSelectionListener(ODOMElementSelectionListener listener) {
if (listener != null) {
listeners.add(listener);
// Send the new listener a welcoming event if there is one.
if ((eventElements != null) && (eventElements.size() > 0)) {
listener.selectionChanged(new ODOMElementSelectionEvent(
eventElements));
}
}
}
COM: <s> add a new selection listener </s>
|
funcom_train/35751584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element executeXQuery(String xquery) throws Throwable{
SAXBuilder builder = new SAXBuilder();
StringWriter writer = new StringWriter();
writer.write("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>");
XMLPrinter xwriter = new XMLPrinter(writer);
query.eval(xquery, xwriter);
xwriter.flush();
writer.flush();
//enables parsing with jdom
StringReader reader = new StringReader(writer.getBuffer().toString() + "\n\n");
Document doc = builder.build(reader);
return doc.getRootElement();
}
COM: <s> executes an xquery </s>
|
funcom_train/3525636 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dispatchToComponent(Component c) throws Exception {
if (map != null) {
if (c instanceof Trigger) {
dispatchToTrigger((Trigger)c);
} else if (c instanceof Container) {
c.dispatchEvent(new TriggerEvent(c, map));
}
} else {
Debug.error(
"TriggerDispatcher.dispatchToComponent: map is null");
}
}
COM: <s> p dispatches a code trigger event code to the given component </s>
|
funcom_train/28215552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addInitialValuePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_StateVariable_initialValue_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_StateVariable_initialValue_feature", "_UI_StateVariable_type"),
StateMachinePackage.Literals.STATE_VARIABLE__INITIAL_VALUE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the initial value feature </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.