__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/12119455 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearUpTo(int bit) {
int where = subscript(bit);
/* preaddition of 1 to bit is a clever hack to avoid long arithmetic */
bits[where] &= ~((1 << ((bit + 1) & MASK)) - 1);
while (where-- > 0) {
bits[where] = 0;
}
}
COM: <s> clears all bits up to and including the given bit </s>
|
funcom_train/11103060 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() {
getRecorder().record("init2");
System.out.println("Lifecycle2.init()");
if (FacesContext.getCurrentInstance() == null) {
getRecorder().record("noContext");
System.out.println(" noContext");
}
}
COM: <s> p record an init event </s>
|
funcom_train/17984001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint(Graphics graphics) {
Rectangle r = getDecorationBounds();
Graphics2D g = (Graphics2D)graphics.create();
g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, ghostAlpha));
g.translate(CURSOR_SIZE, CURSOR_SIZE);
icon.paintIcon(getPainter(), g, r.x, r.y);
g.dispose();
}
COM: <s> paint the supplied image with transparency </s>
|
funcom_train/34583371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createSession(SessionDetailsMsg sessionDetails) {
ClientGameSession session = new ClientGameSession(sessionDetails
.getGameName(), sessionDetails.getMaps(), sessionDetails.getPreview(), sessionDetails
.getNrOfPlayers(), sessionDetails.getTotalRounds(), idOffset);
requestedSession = session;
JoinSessionMsg joinMsg = new JoinSessionMsg(session.getName(), playerName);
msgSender.sendMsg(joinMsg);
}
COM: <s> creates a session from the details specified in the given </s>
|
funcom_train/38828172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isComment(String aLine) {
boolean retVal = false;
if (aLine != null) {
aLine = aLine.trim();
int length = COMMENT_CHARACTERS.length;
for (int i=0; i < length; ++i) {
if (aLine.startsWith(COMMENT_CHARACTERS[i]) && !aLine.startsWith("*EOD")
&& !aLine.startsWith("*EOF")) {
retVal = true;
break;
}
}
}
return retVal;
}
COM: <s> determines if this line is a comment line </s>
|
funcom_train/21874830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getOptArg(char opt, String def) {
if (null==this.commandLine) {
logger.error("command line not parsed, cannot resolve option: " + opt);
return null;
}
String optArg = this.commandLine.getOptionValue(opt);
if (null==optArg) {
return def;
}
return optArg;
}
COM: <s> returns options argument value or the provided default value </s>
|
funcom_train/1959127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createNetworks(Element element) {
Iterator iter = element.getChildren("physical_network", element.getNamespace()).iterator();
while (iter.hasNext()) {
Element e = (Element) iter.next();
PhysicalProcessor802 proc = new PhysicalProcessor802();
PhysicalNetworkLayer nl = new PhysicalNetworkLayer(this, proc);
proc.setLayer(nl);
Iterator citer = e.getChildren("connected", element.getNamespace()).iterator();
while (citer.hasNext()) {
String binding = ((Element) citer.next())
.getAttributeValue("binding");
nl.addBinding(binding);
}
physicalnetworklayers.add(nl);
}
}
COM: <s> creates the networks defined in the element </s>
|
funcom_train/20395406 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test6_SortLineitem() throws Exception {
TPPMS sort = new TPPMS();
Table table = new Lineitem();
File file = new File(Utils.FILEPATH_OUTPUT+"/sortoutput.txt");
Utils.clear(file);
long t1 = System.nanoTime();
SQL.orderBy(table, file, new int[]{table.getIndex(Lineitem.FIELD_L_SUPPKEY)}, TPPMS.ASC, Utils.MAX_MEM);
System.out.println((System.nanoTime()-t1)/1000000);
}
COM: <s> test 6 sort lineitem </s>
|
funcom_train/4463142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkState(OWLObject obj, String state) {
if (State.get(obj)!=null) {
if (State.get(obj).toString().equals(state)) return true;
}
else {
System.out.println("*******" + getName(obj)+" is in invalid state *********");
}
return false;
}
COM: <s> check if an owl object is in the state specified </s>
|
funcom_train/3330123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeGroup(Group group) {
if (group == null)
return false;
int position = _contentModel.indexOf(group);
if (position >= 0) {
String name = group.getName();
if (name != null) {
String key = "group:"+name;
_resolver.removeResolvable(key);
}
_contentModel.removeElementAt(position);
return true;
}
return false;
}
COM: <s> removes the given group from this content model group </s>
|
funcom_train/5436911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getColumnText(Object element, int columnIndex) {
if(!(element instanceof String[])) {
return "";
}
if(columnIndex == 0) {
return "";
}
String colData[] = (String[])element;
if(columnIndex > colData.length) {
return null;
}
return colData[columnIndex - 1];
}
COM: <s> returns the corresponding columns text for the given element </s>
|
funcom_train/39024317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testToNameClassMap() {
System.out.println("toNameClassMap");
Map<String, Object> items = null;
Map expResult = null;
Map result = CloneHelper.toNameClassMap(items);
//assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
//fail("The test case is a prototype.");
}
COM: <s> test of to name class map method of class clone helper </s>
|
funcom_train/42709688 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sortCombos() {
Collections.sort(combos, new Comparator<LanduseCombination>() {
public int compare(LanduseCombination c1, LanduseCombination c2) {
if(c1.target < c2.target)
return -1;
else if(c1.target > c2.target)
return +1;
else
return 0;
}
});
}
COM: <s> sort list of combos in place according to target number </s>
|
funcom_train/51344748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public String getHeader() {
return "eventUUID"
+ "\tindexName"
+ "\tpartitionId"
+ "\tfile"
+ "\tmajorEventType"
+ "\tmajorEventValue"
+ "\tminorEventType"
+ "\tminorEventValue"
+ "\tstartTime"
+ "\tendTime"
+ "\telapsed"
+ "\tcomplete"
+ "\thostname"
+ "\tserviceIface"
+ "\tserviceName"
+ "\tserviceUUID"
+ "\tdetails"
+ "\n"
;
}
COM: <s> a header that can be used to interpret the output of </s>
|
funcom_train/27943195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireEditingStopped() {
CellEditorListener listener;
java.lang.Object[] listeners = listenerList.getListenerList();
for( int i = 0; i < listeners.length; i++ ) {
if( listeners[i] == CellEditorListener.class ) {
listener = ( CellEditorListener ) listeners[i + 1];
listener.editingStopped( changeEvent );
}
}
}
COM: <s> dispatch editing stopped event </s>
|
funcom_train/7355952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCellRenderer(BrowserCellRenderer cellRenderer) {
BrowserCellRenderer oldValue = getCellRenderer();
if (cellRenderer != null) {
setColumnCellRenderer(new BrowserCellRendererWrapper(cellRenderer));
} else {
setColumnCellRenderer(new DefaultColumnCellRenderer(this));
}
firePropertyChange(CELL_RENDERER_PROPERTY, oldValue, cellRenderer);
}
COM: <s> sets the delegate thats used to paint each cell in the browser </s>
|
funcom_train/2497053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIceStyle(String style) {
boolean bValid = false;
String[] validStyles = { "rime", "xp", "royale" };
for(String validStyle : validStyles)
if(style.equals(validStyle))
bValid = true;
if(!bValid) throw new RuntimeException("Style passed to setIceStyle must be 'rime', 'xp', or 'royale'.");
this.iceStyle = "./xmlhttp/css/" + style + "/" + style + ".css";
}
COM: <s> sets the css stylesheet to use with the icefaces ajax framework </s>
|
funcom_train/42036662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLayer(int index, Layer layer) {
if(layer == null) {
Debug.warning("Scene.setLayer", "Tried setting to a null Layer");
return;
}
if(index < 0 || index > layerCount) {
Debug.warning("Scene.setLayer", "Tried setting an invalid Layer, index=" + index + ", maximum is " + layerCount);
return;
}
this.layer[index] = layer;
}
COM: <s> replaces a layer object in this scene </s>
|
funcom_train/23442705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAttributeFormDefaultPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SchemaType_attributeFormDefault_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SchemaType_attributeFormDefault_feature", "_UI_SchemaType_type"),
SchemaPackage.Literals.SCHEMA_TYPE__ATTRIBUTE_FORM_DEFAULT,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the attribute form default feature </s>
|
funcom_train/16818456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getClassDesc() {
String s = getModifierDesc();
if (!cl.isInterface()) {
s = s + " class";
}
s = s + " " + cl.getName();
s = s + " " + getExtendsDesc();
s = s + " " + getImplementsDesc();
return s;
}
COM: <s> return a string describing the class the class modifiers </s>
|
funcom_train/48631148 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int fetchVersion() throws SQLException {
Cursor mCursor = mDb.query(true, DATABASE_METADATA,
new String[] { MAX_COUNT }, null, null, null, null, null, null);
if (mCursor != null) {
mCursor.moveToFirst();
}
int response = mCursor.getInt(0);
mCursor.close();
return response;
}
COM: <s> return a cursor positioned at the note that matches the given row id </s>
|
funcom_train/11787070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String paramString() {
StringBuffer result = new StringBuffer();
result.append("minScale=" + minScale);
result.append(",maxScale=" + maxScale);
result.append(",viewZoomPoint=" + (viewZoomPoint == null ? "null" : viewZoomPoint.toString()));
result.append(',');
result.append(super.paramString());
return result.toString();
}
COM: <s> returns a string representing the state of this node </s>
|
funcom_train/46857474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnResidentJobs() {
if (btnResidentJobs == null) {
btnResidentJobs = new JButton();
btnResidentJobs.setText("Select resident job types...");
btnResidentJobs.setPreferredSize(new Dimension(190, 20));
btnResidentJobs.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
SelectResidentJobTypes();
}
});
}
return btnResidentJobs;
}
COM: <s> this method initializes btn resident jobs </s>
|
funcom_train/3836464 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonAddMove() {
if (jButtonAddMove == null) {
jButtonAddMove = new JButton();
jButtonAddMove.setText("Add/move");
jButtonAddMove
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
handleMode = UserEvent.WhanTo_ADDMOVE;
}
});
}
return jButtonAddMove;
}
COM: <s> this method initializes j button add move </s>
|
funcom_train/29828965 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setGUIforConnectionState(boolean connected) {
setConnectButton(connected);
connectMenuItem.setEnabled(!connected);
disconnectMenuItem.setEnabled(connected);
enableMenus(connected);
addContactButton.setEnabled(connected);
delContactButton.setEnabled(connected);
expandGroupsButton.setEnabled(connected);
}
COM: <s> changes the gui according to the connection state </s>
|
funcom_train/4467386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLocation() {
assertEquals(50,rect.getX(),0.001);
assertEquals(60,rect.getY(),0.001);
Point point = new Point(50,60);
assertEquals(point,rect.getLocation());
assertEquals(150,rect.getMaxX(),0.001);
assertEquals(260,rect.getMaxY(),0.001);
assertEquals(50,rect.getMinX(),0.001);
assertEquals(60,rect.getMinY(),0.001);
}
COM: <s> tests the location of the code rectangle code </s>
|
funcom_train/28755972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCalce260(Long newVal) {
if ((newVal != null && this.calce260 != null && (newVal.compareTo(this.calce260) == 0)) ||
(newVal == null && this.calce260 == null && calce260_is_initialized)) {
return;
}
this.calce260 = newVal;
calce260_is_modified = true;
calce260_is_initialized = true;
}
COM: <s> setter method for calce260 </s>
|
funcom_train/29645679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean deepEquals(DeepEquality me, DeepEquality other) {
if (me == other)
return true;
if ((me == null) || (other == null))
return false;
if (!me.getClass().isAssignableFrom(other.getClass()))
return false;
if (isProcessed(me))
return true;
markProcessed(me);
return me.deepCompareFields(other, this);
}
COM: <s> returns code true code if the specified instances are deep </s>
|
funcom_train/3840499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String replace(String str, String pattern, String replace) {
int s = 0;
int e = 0;
StringBuffer result = new StringBuffer();
while ((e = str.indexOf(pattern, s)) >= 0) {
result.append(str.substring(s, e));
result.append(replace);
s = e+pattern.length();
}
result.append(str.substring(s));
return result.toString();
}
COM: <s> replaces a substring with another </s>
|
funcom_train/2437730 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handlePotentialJitterpack(final File file) {
startWait();
if (EventQueue.isDispatchThread()) {
ApplicationWorker worker = Application.getWorker();
worker.submitForParallel(ApplicationWorker.GUARD.protect(new Runnable() {
@Override
public void run() {
handleImpl(file);
}
}));
} else {
handleImpl(file);
}
}
COM: <s> tries to import the specified file as a jitterpak </s>
|
funcom_train/21105114 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
FlowLayout flowLayout2 = new FlowLayout();
this.setLayout(flowLayout2);
this.setSize(156, 30);
this.setPreferredSize(new java.awt.Dimension(156,33));
flowLayout2.setAlignment(java.awt.FlowLayout.RIGHT);
flowLayout2.setHgap(2);
flowLayout2.setVgap(2);
this.add(getbtCancel(), null);
this.add(getbtOK(), null);
}
COM: <s> this method initializes the bean </s>
|
funcom_train/12152837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
boolean init = false;
if (!pipelineReady) {
initPipeline();
init = true;
}
capturing = true;
gpipeline.play();
if (init) {
// Resolution and FPS initialization needs to be done after the
// pipeline is set to play.
initResAndFps();
}
}
COM: <s> starts the capture pipeline </s>
|
funcom_train/39563054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPrimary(){
Enumeration atel = h_Attributes.elements();
while( atel.hasMoreElements() ){
m_Attribute at = ((m_Attribute)atel.nextElement());
if( at.isPrimary() )
return at.getDbName();
}
return "error";
}
COM: <s> get the primary key attribute name for this table </s>
|
funcom_train/800746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addGlobalActions(IMenuManager menuManager) {
menuManager.insertAfter("additions-end", new Separator("ui-actions"));
menuManager.insertAfter("ui-actions", showPropertiesViewAction);
refreshViewerAction.setEnabled(refreshViewerAction.isEnabled());
menuManager.insertAfter("ui-actions", refreshViewerAction);
super.addGlobalActions(menuManager);
}
COM: <s> this inserts global actions before the additions end separator </s>
|
funcom_train/26602093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ProductionRules handlingForRepetitiveGroup(ArrayList rules) {
ArrayList array = new ArrayList();
ProductionRules productionRules = (ProductionRules) rules.remove(rules.size() - 1);
array.add(productionRules);
String nameOfRule = productionRules.nameOfRule;
return checkingForHashMap(nameOfRule, array, REPETITIVEPRODUCTIONRULE, nameOfRule);
}
COM: <s> this method is used for making repetitive production rules for rules passed </s>
|
funcom_train/9979173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void moveClipboard() {
for (NodeContainer nc: clipboard.selectedNodes) {
project.fireChangeEvent(ProjectChangeListener.EventType.NodeMoving, nc, currentPackage);
NodePackage oldParent = nc.getParent();
nc.setParent(currentPackage);
oldParent.getSubNodes().remove(nc);
currentPackage.getSubNodes().add(nc);
project.fireChangeEvent(ProjectChangeListener.EventType.NodeMoved, nc, oldParent);
}
clipboard = null;
}
COM: <s> move clipboard to this package </s>
|
funcom_train/5154247 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int quantile(double quantile) {
if( (quantile < 0) || (quantile > 1) ) throw new RuntimeException("Quantile out of range. Should be in [0, 1] range, value: " + quantile);
int keys[] = sortKeys();
int total = total();
int sum = 0;
for( int k : keys ) {
sum += pdf.get(k);
double p = ((double) sum) / ((double) total);
if( p >= quantile ) return k;
}
return Integer.MAX_VALUE;
}
COM: <s> smallest number whose cdf is larger than a given quantile </s>
|
funcom_train/5380620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void disposeManager() {
Iterator it = mapItemToWrapper.values().iterator();
// Dispose items in addition to removing them.
// See bugs 64024 and 73715 for details.
// Do not use getItems() here as subclasses can override that in bad ways.
while (it.hasNext()) {
IContributionItem item = (IContributionItem) it.next();
item.dispose();
}
removeAll();
}
COM: <s> disposes this sub contribution manager removing all its items </s>
|
funcom_train/18216049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void displayContentForSelectedClassifications() {
// retrieve the IDs of the selected product classifications
ArrayList<String> classificationIDsArray = ((MyOptionList) listBoxClassifications)
.getValuesOfSelectedItems();
ArrayList<String> productIDsArray;
if (classificationIDsArray.isEmpty()) {
productIDsArray = displayAllProducts();
} else {
productIDsArray = displayProducts(classificationIDsArray);
}
displayContentForProducts(productIDsArray);
}
COM: <s> display the corresponding products components etc </s>
|
funcom_train/18726690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean showEditPanel(final JaxoObject o) {
final int old = getHandlePaintMode();
setHandlePaintMode(HANDLE_PAINT_SELECTION);
final JaxoObjectEditPanel p = new JaxoOptionsPanel(o);
p.addChangeListener(new EditPanelListener());
final Rectangle screenBounds = getScreenBounds(o);
final Location l = new Location.RelativeToAvoiding(asComponent(), screenBounds);
p.show(asComponent(), l);
setHandlePaintMode(old);
return p.hasChanged();
}
COM: <s> bring up an edit panel to edit properties of the given jaxo object </s>
|
funcom_train/29720713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getIsVisibleDependenciesPanel() {
Project project = this.projectService
.getProject((String) WebSessionService
.getAttribute(WebSessionService.PROJECT_ID));
Process process = this.projectService.getProcessFromProject(project);
if (process != null) {
this.isVisibleDependenciesPanel = true;
} else {
this.isVisibleDependenciesPanel = false;
}
return this.isVisibleDependenciesPanel;
}
COM: <s> getter of is visible dependencies panel boolean attribute </s>
|
funcom_train/3139255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String buildStorageString(String sujet, String result, IPreferenceStore store) {
String threadStoreSep = getSeparator(store.getString(ext.getForumConnInfo()));
return store.getString(ext.getForumConnInfo()) + threadStoreSep + result
+ ZeroEffortFeedbackPlugin.PREF_STORE_THREAD_SUBJ_SEP + sujet;
}
COM: <s> set the storage string by appending the current list prepending the </s>
|
funcom_train/48910084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtVolver() {
if (btVolver == null) {
btVolver = new JButton();
btVolver.setBounds(new Rectangle(22, 470, 96, 24));
btVolver.setText("<< Atrás");
btVolver.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
PanelAnticipoEmpleado.this.principal.principal();
}
});
}
return btVolver;
}
COM: <s> this method initializes bt volver </s>
|
funcom_train/5607412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PyObject getPyObjectByType(int pos, PyType type) {
PyObject arg = getRequiredArg(pos);
if (!Py.isInstance(arg, type)) {
throw Py.TypeError(String.format("argument %d must be %s, not %s", pos + 1,
type.fastGetName(), arg.getType().fastGetName()));
}
return arg;
}
COM: <s> return a required argument as a py object ensuring the object </s>
|
funcom_train/50268494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadContentsHelp()
{ /*try{ setCurrentFile(contentsHelp); }
catch(Exception e){
JOptionPane.showMessageDialog(this, "Couldn't load the file"+'\n'
+contentsHelp,"Error",JOptionPane.WARNING_MESSAGE );
}
if(!isVisible())
show();*/
}
COM: <s> loads the contents page of the help files </s>
|
funcom_train/49048868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PrefsNavigator createPrefsNavigator() {
String config = ConfigurationManager.getInstance().getProperty("config");
if (config != null && config.equals("stretch")) {
return new StretchPrefsNavigator();
} else if (config != null && config.equals("peptalk")) {
return new PePtalkPrefsNavigator();
} else {
return new InclusiveLearningPrefsNavigator();
}
}
COM: <s> creates a new prefs navigator based on the tile configuration </s>
|
funcom_train/35099649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public T getPrototypeBean() {
Assert.notNull(clonedBean);
T cloneBean;
try {
cloneBean = clonedBean.toClone();
return cloneBean;
} catch ( CloneNotSupportedException e ) {
logger.error("To generate clone object is failed, the detail exception message [" + e.getMessage() + "]");
}
return null;
}
COM: <s> generates a prototype bean object </s>
|
funcom_train/32764976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private LtiDigitalFilter initHighPassFilter() {
LtiDigitalFilter fltHigh = new LtiDigitalFilter( this.getDataSize() );
fltHigh.setInputCoefficients(ProfileDataProcessor.ARR_DBL_HIGHPASS_INP_COEFFS);
fltHigh.setOutputCoefficients(ProfileDataProcessor.ARR_DBL_HIGHPASS_OUT_COEFFS);
return fltHigh;
}
COM: <s> initializes the high pass filter and returns it </s>
|
funcom_train/3945994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean performFinish() {
WorkspaceModifyOperation op= new WorkspaceModifyOperation() {
protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException {
finishPage(monitor);
}
};
try {
getContainer().run(false, true, op);
} catch (InvocationTargetException e) {
return false; // TODO: should open error dialog and log
} catch (InterruptedException e) {
return false; // canceled
}
return true;
}
COM: <s> this method is called when finish button is pressed in </s>
|
funcom_train/8491631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getWidthTile() {
if (widthTile == null) {
widthTile = new JTextField();
widthTile.setBounds(new Rectangle(370, 7, 36, 16));
widthTile.setBackground(Color.green);
widthTile.addCaretListener(new javax.swing.event.CaretListener() {
public void caretUpdate(javax.swing.event.CaretEvent e) {
setNewTileWidth();
}
});
}
return widthTile;
}
COM: <s> this method initializes width tile </s>
|
funcom_train/12168711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean emptyOrWhitespaceOnly(Element element) {
boolean success = true;
for (Node x = element.getHead(); x != null; x = x.getNext()) {
success =
success && (x instanceof Text) && ((Text) x).isWhitespace();
}
return success;
}
COM: <s> check if an element is empty or contains only whitespace </s>
|
funcom_train/33445741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isDisplayOperation(String url) {
if (!StringUtils.isSet(url))
return false;
return url.contains(OP_DISPLAY_BOOKMARK) || url.contains(OP_DISPLAY_NEWSBIN) || url.contains(OP_DISPLAY_NEWS) || url.contains(OP_DISPLAY_SEARCHMARK) || URIUtils.ABOUT_BLANK.equals(url);
}
COM: <s> check wether the given url contains one of the display operations of this </s>
|
funcom_train/32761230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long nextImageID() {
try {
final PreparedStatement statement = _connection.prepareStatement( "select logbook.image_seq.nextval from dual" );
final ResultSet resultSet = statement.executeQuery();
return ( resultSet.next() ) ? resultSet.getLong( 1 ) : 0;
}
catch( SQLException exception ) {
exception.printStackTrace();
throw new RuntimeException( "Exception requesting the next image ID.", exception );
}
}
COM: <s> get the next image entry id </s>
|
funcom_train/36004077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void replaceAllRowsInTable(Vector<Vector> rowData){
DefaultTableModel model = (DefaultTableModel) eventTable.getModel();
while(model.getRowCount()!=0)
model.removeRow(0);
for(Vector row:rowData)
model.addRow(row);
model.fireTableDataChanged();
}
COM: <s> method that adds a row to the table from a vector of strings </s>
|
funcom_train/31124732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getContent() {
StringBuffer buffer = new StringBuffer();
try {
BufferedReader reader = new BufferedReader(new FileReader(log));
while (reader.ready()) {
buffer.append(reader.readLine() + "\n");
}
} catch (Exception e) {
e.printStackTrace();
}
return buffer.toString();
}
COM: <s> gets the content attribute of the pasamuf error logger object </s>
|
funcom_train/25647353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setLinkedModel(ChildModel model) {
// The sub-model cannot be set to null or changed once it is set.
if (this.linkedModel == null && model != null) {
setLinkedModelId(null);
this.linkedModel = model;
linkedModel.setParentModel(getContainingModel());
}
}
COM: <s> sets the linked model for this state </s>
|
funcom_train/10860188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long add(long element) {
if (size >= currentCapacity) {
int newSize = Math.min(currentCapacity <<1, maxSize);
if (newSize < currentCapacity) newSize = Integer.MAX_VALUE; // handle overflow
resize(newSize);
}
size++;
heap[size] = element;
upHeap();
return heap[1];
}
COM: <s> adds an object to a priority queue in log size time </s>
|
funcom_train/9786478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showSaveDialog() {
InputDialog inputDialog = new InputDialog(app, app.getPlain("PerspectiveName"), app.getMenu("SaveCurrentPerspective"), "", false, new SaveInputHandler(this));
inputDialog.showSpecialCharacters(false);
inputDialog.showGreekLetters(false);
inputDialog.setVisible(true);
}
COM: <s> show the prompt which is used to save the current perspective </s>
|
funcom_train/47731804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String generateLispFromDriveElement(DriveElement driveElement) {
String result = "(" + driveElement.getName() + " " + generateLispFromTrigger(driveElement.getTrigger()) + " " + driveElement.getAction();
if (driveElement.getFrequency() != null)
result += generateLispFromTimeUnit(driveElement.getFrequency());
result += ")";
return result;
}
COM: <s> generate a block of lisp from a drive element </s>
|
funcom_train/3466773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getUpperBound() {
// @BEGINPROTECT _3C62353102E5
if (this.hasRanges()) {
int upperBound = Integer.MIN_VALUE;
for (MultiplicityRange range : this.getRanges()) {
upperBound = Math.max(upperBound, range.getLower());
}
return upperBound;
}
return -1;
// @ENDPROTECT
}
COM: <s> returns the largest of all upper bounds </s>
|
funcom_train/18721286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addInputData(String name1, String description1, String[] values1, String startName1) {
int currendIndex = 0;
for (int i = 0; i < values1.length; i++) {
if (values1[i].equalsIgnoreCase(startName1)) {
currendIndex = i;
}
}
addNewEntry(name1, description1, values1, MEDIUM_LENGTH, INPUT_TYPE_COMBOBOX, currendIndex);
}
COM: <s> set as new entry for pull down box </s>
|
funcom_train/46824446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GameHistory () {
moves = new Vector ();
// add some test moves
addMove (new ChessMove (4, 6, 4, 4));
addMove (new ChessMove (4, 1, 4, 3));
addMove (new ChessMove (5, 7, 4, 5));
addMove (new ChessMove (2, 0, 3, 2));
addMove (new ChessMove (4, 6, 4, 4));
}
COM: <s> constructor for the game history </s>
|
funcom_train/3077152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean canCreateProject(String username) {
if (!Luntbuild.getDao().isUserExist(username)) {
return SecurityHelper.isSiteAdmin();
}
// try to retrieve user credentials from local db
User luntUser = Luntbuild.getDao().loadUser(username);
if (luntUser == null) return false;
return luntUser.isCanCreateProject();
}
COM: <s> return true if user exists and can create project </s>
|
funcom_train/135639 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void hideTiers(List<TierLabelGlyph> tier_labels, boolean full_repack, boolean fit_y) {
for (TierLabelGlyph g : tier_labels) {
if (g.getInfo() instanceof TierGlyph) {
TierGlyph tier = (TierGlyph) g.getInfo();
tier.getAnnotStyle().setShow(false);
}
}
repackTheTiers(full_repack, fit_y);
}
COM: <s> hides multiple tiers and then repacks </s>
|
funcom_train/19036463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LinkCollection getLinks(LIDCollection lids) {
LinkCollection links = new LinkCollection();
if(lids != null) {
Link tempLink;
for(int i = 0 ; i < lids.size(); i++) {
tempLink = this.getLink(lids.getLIDAt(i));
if(tempLink != null) {
links.addLink(tempLink);
}
}
}
return links;
}
COM: <s> returns all of the links associated with the provided post </s>
|
funcom_train/22259608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fileInfoGenerated(FileInfoEvent e) {
FileInfoContainer fileInfo = e.getInfoContainer();
if (fileInfo.getClass().equals(ModuleListInformation.class)) {
ModuleListInformation list = (ModuleListInformation)fileInfo;
System.err.println("A file status event was received.");
System.err.println("The status information object is: " + list.getModuleName());
}
}
COM: <s> called when file status information has been received </s>
|
funcom_train/35678380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRelativeLocation() throws Exception {
assertEquals("", CodeGenUtil.relativeLocation(null));
assertEquals("/abc/", CodeGenUtil.relativeLocation("abc"));
assertEquals("/abc/def/", CodeGenUtil.relativeLocation("abc.def"));
}
COM: <s> check that location from pakage name works </s>
|
funcom_train/9339801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BigDecimal hyperoperate(int o, BigDecimal a, BigDecimal b) {
verifyBasic(o, a, b);
final BigDecimal fromSimple = getSimple(o, a, b);
if (fromSimple != null) {
return fromSimple;
}
return new BigDecimal(hyperoperate(o, a.toBigIntegerExact(), b.toBigIntegerExact()));
}
COM: <s> performs hyper code o code of hyperexponent code b code on base </s>
|
funcom_train/26218529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String addSchemeWordList(CacheWordList _wordlist) {
StringBuffer _sbuf = new StringBuffer();
_sbuf.append(
"(define "
+ _wordlist.getListName()
+ " '("
+ _wordlist.defaultList()
+ "))"
+ _endl);
_sbuf.append("(define (" + _wordlist.getFindName() + " Items)" + _endl);
_sbuf.append(
" (find-element Items list-"
+ _wordlist.getWordType()
+ "))"
+ _endl);
return _sbuf.toString();
} // end of the method ...
COM: <s> part of the natural language parsing of the incoming message </s>
|
funcom_train/943888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAsserted(Quad quad) {
Iterator it = this.getMatchingQuads(quad.getContext(), quad.getSubject(),
quad.getPredicate(), quad.getObject(), quad.objectIsLiteral());
return it.hasNext();
}
COM: <s> return true if quad is asserted in this </s>
|
funcom_train/18551813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Message getMessage(String pKey) throws MessageException {
if(pKey == null){
throw new MessageException(this.getClass().getName(), "Null Key");
}
if (this.containsKey(pKey) == false) {
pKey = NO_MESSAGE_CODE;
}
return (Message) this.get(pKey);
}
COM: <s> description retrive a message bean </s>
|
funcom_train/22010123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void Subtract(Monad pM) throws NoReferenceMatchException {
if (!this.isReferenceMatch(pM)) {
throw new NoReferenceMatchException(this, "Can't subtract when frames don't match.", pM);
}
double[] temp = pM.getCoeff();
for(int i=1; i<getLinearDimension()+1; i++) {
this.Coeff[i] = this.Coeff[i] - temp[i];
}
}
COM: <s> monad subtraction this p m </s>
|
funcom_train/2428305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValid() {
OperationId[] siblingIds = hostedWsOp.getSiblingOperations();
if (siblingIds.length == 0) {
return false;
}
boolean isFirstSibling = true;
for (OperationId opId : siblingIds) {
if (!validateSibling(opId, isFirstSibling)) {
return false;
}
isFirstSibling = false;
}
return true;
}
COM: <s> checks if the operation is a valid case of hosted web service forwarding </s>
|
funcom_train/18880708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSlider getJSliderSpeed() {
if (jSliderSpeed == null) {
jSliderSpeed = new JSlider();
jSliderSpeed.setBounds(new Rectangle(15, 116, 246, 40));
jSliderSpeed.setMajorTickSpacing(1);
jSliderSpeed.setPaintTicks(true);
jSliderSpeed.setPaintLabels(true);
jSliderSpeed.setMinimum(-5);
jSliderSpeed.setValue(0);
jSliderSpeed.setSnapToTicks(true);
jSliderSpeed.setMaximum(5);
}
return jSliderSpeed;
}
COM: <s> this method initializes j slider speed </s>
|
funcom_train/38316434 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int doEndTag() throws JspTagException {
JspWriter out = pageContext.getOut();
try {
out.write(String.valueOf(SessionCounter.getActiveGuestCount()));
} catch (IOException e) {
throw new JspTagException("Error writing to page");
}
return EVAL_PAGE;
}
COM: <s> print the active guest count </s>
|
funcom_train/34061174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private float getProp(Vector src, Vector den) {
if ((den.getX() == 0) && (den.getY() == 0)) {
return 0;
}
if (den.getX() != 0) {
return src.getX() / den.getX();
}
return src.getY() / den.getY();
}
COM: <s> get the proportion that the src vector is of the denominator vector </s>
|
funcom_train/10659695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNameSingleEscapedSpace() {
String dn = "CN=\\ ";
byte[] mess = { 0x30, 0x0C, 0x31, 0x0A, 0x30, 0x08, 0x06, 0x03, 0x55,
0x04, 0x03, 0x13, 0x01, 0x20 };
X500Principal principal = new X500Principal(dn);
assertTrue(Arrays.equals(mess, principal.getEncoded()));
}
COM: <s> inits x500 principal with string as single escaped space </s>
|
funcom_train/50360830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public StringWrapper prepare(String s) {
BagOfTokens bag = new BagOfTokens(s, tokenizer.tokenize(s));
double totalWeight = bag.getTotalWeight();
for (Iterator<Token> i=bag.tokenIterator(); i.hasNext(); ) {
Token tok = (Token)i.next();
double freq = bag.getWeight(tok);
bag.setWeight( tok, smoothedProbability(tok, freq, totalWeight) );
}
return bag;
}
COM: <s> preprocess a string by finding tokens and giving them weights w </s>
|
funcom_train/41325535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readPattern(int[] row, int[] column) throws IOException {
int size = row.length;
if (size != column.length)
throw new IllegalArgumentException(
"All arrays must be of the same size");
for (int i = 0; i < size; ++i) {
row[i] = getInt();
column[i] = getInt();
}
}
COM: <s> reads a pattern matrix </s>
|
funcom_train/26020194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMyPhotoIcon(PhotoIcon photo) throws ContactsManagerException {
if (logger.isActivated()) {
logger.info("Set my photo-icon");
}
if (!RcsSettings.getInstance().isSocialPresenceSupported()){
return;
}
try {
setContactPhotoIcon(MYSELF, photo);
} catch (Exception e) {
if (logger.isActivated()) {
logger.error("Internal exception", e);
}
throw new ContactsManagerException(e.getMessage());
}
}
COM: <s> set my photo icon in the eab </s>
|
funcom_train/51527114 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createSuccessMessage(HttpServletRequest request, boolean success) {
ActionMessages messages = new ActionMessages();
ActionMessage msg;
if(success){
msg = new ActionMessage("scienceProjectIdea.deleteProjectIdea.success");
} else {
msg = new ActionMessage("scienceProjectIdea.deleteProjectIdea.failure");
}
messages.add(ActionMessages.GLOBAL_MESSAGE, msg);
addMessages(request, messages);
}
COM: <s> util from hakeems sete user action </s>
|
funcom_train/19761838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInventoryEnums() throws Exception {
_logger.info("----------------------------------------------------------------------------");
_logger.info("Testing com.netstoke.core.commerce.inventory package.");
Class[] classes = new Class[]{InventoryType.class};
testEnumValues(classes);
Long id = null;
try {
InventoryType.valueOf(id);fail();
} catch (NullPointerException e) {assertFalse(e.getMessage().contains("!"));}
try {
id = 9000L;InventoryType.valueOf(id);fail();
} catch (IllegalArgumentException e) {assertFalse(e.getMessage().contains("!"));}
}
COM: <s> tests inventory package enum values </s>
|
funcom_train/22655914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private List getImpliedScopes(String scope) {
List resolvedScopeList = new ArrayList();
if (Artifact.SCOPE_COMPILE.equals(scope)) {
resolvedScopeList.add(Artifact.SCOPE_COMPILE);
} else if (Artifact.SCOPE_RUNTIME.equals(scope)) {
resolvedScopeList.add(Artifact.SCOPE_COMPILE);
resolvedScopeList.add(Artifact.SCOPE_RUNTIME);
} else if (Artifact.SCOPE_TEST.equals(scope)) {
resolvedScopeList.add(Artifact.SCOPE_COMPILE);
resolvedScopeList.add(Artifact.SCOPE_RUNTIME);
resolvedScopeList.add(Artifact.SCOPE_TEST);
}
return resolvedScopeList;
}
COM: <s> gets the list of implied scopes for a a given scope </s>
|
funcom_train/1942321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeGeneralLog(System system, User user, String text) throws SQLException {
PreparedStatement pstmt = con.prepareStatement("INSERT INTO Log (system_id, log_actiontype, log_action, log_timestamp, log_user) VALUES (?,0,?,null,?)");
pstmt.setLong(1, system.getDBID());
pstmt.setString(2, text);
pstmt.setString(3, user.getName());
pstmt.executeUpdate();
pstmt.close();
}
COM: <s> writes a genereal log for given code system code </s>
|
funcom_train/10253560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Expression readCaseWhenExpression() {
Expression l = null;
read();
readThis(Tokens.OPENBRACKET);
l = XreadBooleanValueExpression();
readThis(Tokens.COMMA);
Expression thenelse = XreadRowValueExpression();
readThis(Tokens.COMMA);
thenelse = new ExpressionOp(OpTypes.ALTERNATIVE, thenelse,
XreadValueExpression());
l = new ExpressionOp(OpTypes.CASEWHEN, l, thenelse);
readThis(Tokens.CLOSEBRACKET);
return l;
}
COM: <s> reads a casewhen expression </s>
|
funcom_train/49574244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private StringWriter getStream() throws IOException {
OutputFormat format = new OutputFormat(document, "utf8", true);
StringWriter stringOut = new StringWriter();
XMLSerializer serial = new XMLSerializer(stringOut, format);
serial.asDOMSerializer();
Element elem = document.getDocumentElement();
if (elem != null) {
serial.serialize(elem);
}
return stringOut;
}
COM: <s> devuelve un string writer con el xml </s>
|
funcom_train/30005205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextArea getPreconditionArea() {
if (this.preconditionArea == null) {
this.preconditionArea = new JTextArea();
this.preconditionArea.setLineWrap(true);
this.preconditionArea.setWrapStyleWord(true);
this.preconditionArea.setEditable(false);
this.preconditionArea.setText(this.sequence.getPrecondition());
}
return this.preconditionArea;
}
COM: <s> returns the precondition area </s>
|
funcom_train/22449154 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assign(UserPrefsModel aPrefs) {
setAutoCompleteWords(aPrefs.isAutoCompleteWords());
setShowSimilarAtNotFound(aPrefs.isShowSimilarAtNotFound());
setShowToolTips(aPrefs.isShowToolTips());
setStartMinimized(aPrefs.isStartMinimized());
setMinimizeWhenClosed(aPrefs.isMinimizeWhenClosed());
setMinimizeWhenLoseFocus(aPrefs.isMinimizeWhenLoseFocus());
setFont(aPrefs.getFont());
}
COM: <s> copy all values from another user prefs model object </s>
|
funcom_train/2483494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getKnxMediumString() {
switch (knxmedium) {
case EIBNETIP_Constants.TP0:
return "TP0";
case EIBNETIP_Constants.TP1:
return "TP1";
case EIBNETIP_Constants.PL110:
return "PL110";
case EIBNETIP_Constants.PL132:
return "PL132";
case EIBNETIP_Constants.RF:
return "RF";
default:
return "No such medium known";
}
}
COM: <s> get a human readable representation of the knx medium type </s>
|
funcom_train/41623365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void onSelectedLeftToRightActionPerformed() {
int selectedIndex = this.leftJList.getSelectedIndex();
if (selectedIndex == -1) {
return;
}
List<LIST_ITEM> selectedLeftItems = removeSelectedLeftItems();
this.rightListModel.addAll(selectedLeftItems);
setSelectedIndexOrLast(this.leftJList, selectedIndex);
}
COM: <s> moves all selected items in the left list to the right list </s>
|
funcom_train/4717593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPanRightPureData() {
SynMessage msg = new SYN(SYN.PUREDATA).synth(1).voice(1).pan(100);
assertEquals("Fi", msg.getTypetag());
assertEquals((SynMessage.MAX_24BIT), msg.getArguments()[1]);
assertEquals("/SYN/ID1/V1/PAN", msg.getAddress());
}
COM: <s> voice pan right for pure data </s>
|
funcom_train/39973274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(ReadonlyTColor c) {
boolean isInRange = isValueInConstraint(c.hue(), hueConstraint);
isInRange &= isValueInConstraint(c.saturation(), saturationConstraint);
isInRange &= isValueInConstraint(c.brightness(), brightnessConstraint);
isInRange &= isValueInConstraint(c.alpha(), alphaConstraint);
return isInRange;
}
COM: <s> checks if all hsva components of the given color are within the </s>
|
funcom_train/2903757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(XMLTag spec){
if(spec.tag.compareTo("Menu")==0){
ZMenu m = new ZMenu(spec);
data.add(m);
addMenu(m, rootMenu);
}
else if(spec.tag.compareTo("MenuItem")==0){
ZMenuItem m = new ZMenuItem(spec);
data.add(m);
addMenuItem(m, rootMenu);
}
else if(spec.tag.compareTo("Drawable")==0){
drawerData = new ZDrawable(spec);
initDrawer();
}
else if(spec.tag.compareTo("Bounds")==0){
ZBounds b = new ZBounds(spec);
if(b != null){
if(parentOwner != null){
pwin.setBoundsData(b);
}
else{
setBoundsData(b);
}
}
}
}
COM: <s> initialize drawer menu with a single property tag </s>
|
funcom_train/1811765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void paintSplash() {
g.drawImage(splashBackground, 0, 0, Graphics.TOP | Graphics.LEFT);
g.setColor(0xFFFFFF);
g.fillRect(0, 0, getWidth(), getHeight() - splashIndex * getHeight() / 50);
flushGraphics();
}
COM: <s> paint splash screen </s>
|
funcom_train/3049469 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SAXReader createSAXReader(String file, List errorsList, EntityResolver entityResolver) {
if (saxReader==null) saxReader = new SAXReader();
saxReader.setEntityResolver(entityResolver);
saxReader.setErrorHandler( new ErrorLogger(file, errorsList) );
saxReader.setMergeAdjacentText(true);
saxReader.setValidation(true);
return saxReader;
}
COM: <s> create a dom4j saxreader which will append all validation errors </s>
|
funcom_train/41523770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String accAddProcess(){
Command cmd = getCommand(AddProcessToProtocolable.class);
((AddProcessToProtocolable)cmd).setProtocolable(source);
((AddProcessToProtocolable)cmd).setProcessDefId(idProcessDefSelected);
((AddProcessToProtocolable)cmd).setOwnerId(owner);
((AddProcessToProtocolable)cmd).setDays(days);
((AddProcessToProtocolable)cmd).setImgType(typeSelected);
runCommand(cmd);
return accViewProtocol();
}
COM: <s> adds a new process to the source protocol </s>
|
funcom_train/25011404 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean containsEntry(List<AnnotationEntry<A>> list, AnnotationEntry<A> ref) {
// for (AnnotatedEntry<A> entry: list) {
// if (entry.annotation().equals(ref.annotation())) { // too many false-positives
// if (entry.equals(ref)) { // always false-negatives
// return true;
// }
// }
return false; // above not working correctly
}
}
COM: <s> checks if the entry already exists </s>
|
funcom_train/20630590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void loadVersion(String key, String entry, String attrib, String defaultValue){
versionMap.put(key, defaultValue);
if (jmr == null) {
return;
}
String value = jmr.getEntryAttribValue(entry, attrib);
if (value != null) {
versionMap.put(key, value);
}
}
COM: <s> populates the version map for given key with the value retrieved form manifest </s>
|
funcom_train/12164463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAbsoluteAssetPrefixOverridingBase() throws Exception {
// Test Project
RuntimeProject projectMock = createProject("http://www.volantis.com/webapp/");
doRelativeOrAbsoluteTest("http://www.volantis.com/", projectMock, "/x/y/",
"http://www.volantis.com/");
}
COM: <s> test the absolute asset prefix overrides base </s>
|
funcom_train/8579731 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int number() throws InvalidPropertyPathException {
int result = 0;
assertPropertyPathIsValid(!isEndOfPath() && Character.isDigit((char)nextChar()));
result = nextChar() - '0';
consume();
while (!isEndOfPath() && Character.isDigit((char)nextChar())) {
result *= 10;
result += nextChar() - '0';
consume();
}
return result;
}
COM: <s> method fot the number rule </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.