__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/9979085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void link(Vertex v1, Vertex v2) {
getSite().getShell().getDisplay().asyncExec(
new Executor(new Object[] { v1, v2 }) {
public void run() {
// Check if edge is valid
Vertex v1 = (Vertex) params[0];
Vertex v2 = (Vertex) params[1];
NodeContainer firstNode = (NodeContainer) v1
.getUserDatum("node");
NodeContainer secondNode = (NodeContainer) v2
.getUserDatum("node");
navigatorModel.createLink(firstNode, secondNode);
}
});
viewer.repaint();
}
COM: <s> create a link between two vertices </s>
|
funcom_train/32157050 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int dereference(IArray1 array, IVariant index) throws EvaluationException {
if (!index.isReal())
throw new EvaluationException("Array index must be real type");
int i = (int) Math.round(((INumber)index).getDouble());
if (i < 0 || i >= array.getArraySize())
throw new EvaluationException("Array index out of range");
return i;
}
COM: <s> dereference the array </s>
|
funcom_train/31021978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDataSourceConfig(DataSourceConfig datasource) {
IEasyStrutsModel model = (IEasyStrutsModel) getModel();
model.getApplicationConfig().addDataSourceConfig(datasource);
((EasyStrutsFormPage)getPage(EASYSTRUTS_PAGE)).updateTree();
((EasyStrutsFormPage)getPage(EASYSTRUTS_PAGE)).showElement(datasource);
IEditable editable = (IEditable)model;
editable.setDirty(true);
fireSaveNeeded();
}
COM: <s> method add data source config </s>
|
funcom_train/42710425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JButton getJButtonSavePosition() {
if (jButtonSavePosition == null) {
jButtonSavePosition = new JButton();
jButtonSavePosition.setBounds(new Rectangle(10, 220, 131, 21));
jButtonSavePosition.setText("Save");
jButtonSavePosition.setEnabled(false);
jButtonSavePosition.setActionCommand("AddAdress");
}
return jButtonSavePosition;
}
COM: <s> this method initializes j button save position </s>
|
funcom_train/375271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void SKIPtestWinPcapStats() {
WinPcap pcap = WinPcap
.openLive(device, snaplen, promisc, oneSecond, errbuf);
pcap.loop(50, doNothingHandler, null);
WinPcapStat stats = pcap.statsEx();
System.out.printf("stats=%s\n", stats.toString());
pcap.close();
}
COM: <s> ski ptest win pcap stats </s>
|
funcom_train/43245870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetBNPhoneNumber() {
System.out.println("getBNPhoneNumber");
EmergencyContactDG5Object instance = new EmergencyContactDG5Object();
String expResult = "";
String result = instance.getBNPhoneNumber();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get bnphone number method of class org </s>
|
funcom_train/9810224 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SIRequest retrieveFutureProgramEvent(Date time, SIRequestor requestor) throws SIException {
if (requestor == null)
throw new NullPointerException("SIRequestor null");
if (time == null) throw new NullPointerException("null Date");
if (!(time.after(new Date())))
throw new SIException("not a future time value");
int reqKind = Settings.REQ_FUTURE_PROGRAM_EVENT;
return new SIRequestImpl(requestor, service.getLocator(), reqKind, time);
}
COM: <s> retrieves the program event for the specified time </s>
|
funcom_train/13274814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDoorOrWindow(boolean doorOrWindow) {
if (doorOrWindow != this.doorOrWindow) {
this.doorOrWindow = doorOrWindow;
this.propertyChangeSupport.firePropertyChange(Property.DOOR_OR_WINDOW.name(), !doorOrWindow, doorOrWindow);
if (doorOrWindow) {
setStaircaseCutOutShape(null);
setMovable(false);
}
}
}
COM: <s> sets whether imported piece is a door or a window </s>
|
funcom_train/10240686 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isRelativePath(String path) {
String pathN = path.replaceAll("\\\\", "/");
File file = new File(path);
String absPath = file.getAbsolutePath().replaceAll("\\\\", "/");
return !pathN.toLowerCase().equals(absPath.toLowerCase());
}
COM: <s> utility method to check if a path is relative </s>
|
funcom_train/15805303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void insertPending(int uid, CancellableTask timer, Continuation command) {
if (logger.level <= Logger.FINER) {
logger.log("Loading continuation " + uid + " into pending table");
}
timers.put(new Integer(uid), timer);
outstanding.put(new Integer(uid), command);
}
COM: <s> loads the provided continuation into the pending table </s>
|
funcom_train/26365499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DivisionLinkElement takeIfExists(DivisionLinkElement aDivLinkElement) {
try {
Entry aReadEntry = aJavaSpace.takeIfExists(aDivLinkElement, null, JavaSpace.NO_WAIT);
return (DivisionLinkElement)aReadEntry;
} catch (Exception e) {
// PENDING: Better error handling required
e.printStackTrace();
return null;
}
}
COM: <s> take a division link element using the supplied template if one exists </s>
|
funcom_train/36005968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearCachedStyles(boolean propagateToChildren) {
cachedStyles = null;
if (propagateToChildren) {
for (Widget widget = child; widget != null; widget = widget.next) {
widget.clearCachedStyles(propagateToChildren);
}
}
invalidateStylePropertiesCache(!propagateToChildren); // if propagateToChildren is true invalidateStylePropertiesCache is already invoked
invalidate();
}
COM: <s> clear the cached styles </s>
|
funcom_train/20631935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean clearAssignmentLocks(String username) throws WorkflowException {
boolean res = false;
DTSWFRequest request = new DTSWFRequest();
request.setRequestType("clearAssignmentLocks");
request.setParemeter("username", username);
Boolean result = (Boolean) executeDTSWFRequest(request);
if (result != null) {
res = result.booleanValue();
}
return res;
}
COM: <s> clears all assignment locks for the given user </s>
|
funcom_train/24536238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void add(IProxy component, IExpression expression) {
recreateIfNecessary(expression);
IProxyMethod addMethod = dialogTypeProxy.getMethodProxy(expression, "add", //$NON-NLS-1$
new String[] {"java.awt.Component"} //$NON-NLS-1$
);
expression.createSimpleMethodInvoke(addMethod, dialogProxy, new IProxy[] {component}, false);
}
COM: <s> add the component to dialog proxy </s>
|
funcom_train/48978227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isRecursion() {
return (getClause()!=null &&
getClause().getAlternation()!=null &&
getClause().getAlternation().getDefinition()==target &&
getArguments().size()==getClause().getAlternation().getDefinition().getParameters().size());
}
COM: <s> check if this inclusion constitutes a recursion </s>
|
funcom_train/17678946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cleanupForGetQueryPlan(Connection con) {
try {
Statement statement = con.createStatement();
statement.execute("SET PLANONLY OFF");
statement.execute("DELETE FROM PLAN_TABLE");
statement.execute("DELETE FROM PLAN_QUERIES");
} catch (SQLException sqle) {
sqle.printStackTrace();
}
}
COM: <s> cleanup anything done in prepare for get query plan </s>
|
funcom_train/26568590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConcurrency() throws Exception {
MockDisplayable disp = new MockDisplayable();
display.setCurrent(disp);
display.repaint(disp, 0, 0, 10, 10);
assertPrePaintValue(1, disp, 1000);
MockRunner runner = new MockRunner();
display.callSerially(runner);
Thread.sleep(1000);
assertFalse(runner.hasRun);
assertEquals(0, disp.postPaintCount);
synchronized (disp) {
disp.notify();
}
assertEventuallyRun(true, runner, 1000);
assertEquals(1, disp.postPaintCount);
}
COM: <s> according to the spec call serially runnables should be called on the </s>
|
funcom_train/5865272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFrameFgColor(String color) {
if (Objects.equals(color, _fgColor)) {
return;
}
_fgColor = color;
if (_fgColor == null) {
_fgRGB = null;
} else {
_fgRGB = new int[3];
Chart.decode(_fgColor, _fgRGB);
}
fireEvent(ChartDataEvent.CHANGED, null, null);
}
COM: <s> set the foreground color of the dial frame </s>
|
funcom_train/7655368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getPairsList() {
ArrayList result = new ArrayList();
if (generalNames == null) {
return result;
}
Iterator it = generalNames.iterator();
while (it.hasNext()) {
result.add(((GeneralName) it.next()).getAsList());
}
return result;
}
COM: <s> returns the collection of pairs integer tag object name value </s>
|
funcom_train/3708667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void requestBuddyList(){
byte[] b = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
Packet p = new RawData(b);
SNAC s = new SNAC(SNAC_FAMILY_SSI, SNAC_SUBTYPE_GET_BUDDYLIST, SNAC_FLAGS);
s.addPacket(p);
FLAP f = new FLAP((byte)0x02, s, getSequence());
setStatus(Protocol.STATUS_BUDDYLIST);
this.sendFLAP(f);
}
COM: <s> requests the latest ssi buddylist from the oscar server </s>
|
funcom_train/25732873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPartitionIndex(V vertex) {
int i = 0;
// no predicates defined
if (predicates == null || predicates.size() == 0) {
return -1;
}
// evaluate all predicates
for (Predicate<V> pred : predicates) {
if (pred.evaluate(vertex)) {
break;
}
i++;
}
// no predicate match
if (i == predicates.size()) {
return -1;
}
return i;
}
COM: <s> look for the partition of the given vertex </s>
|
funcom_train/26402170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Connection beginTransaction() throws SQLException {
TitanConnection con = (TitanConnection) getConnection();
con.setInUseByTransaction(true);
con.setAutoCommit(false);
getConnectionsInUseByTransactions().put
(Thread.currentThread(), con);
System.out.println("Put " + con + " SIZE = " + getConnectionsInUseByTransactions().size());
return con;
}
COM: <s> reserves a connection to the data store for which this </s>
|
funcom_train/12188792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testString() throws ExpressionException {
final Function function = new StringLengthFunction();
Value result = function.invoke(expressionContextMock,
new Value[]{factory.createStringValue("qwerty")});
assertTrue(result instanceof IntValue);
assertEquals(6, ((IntValue) result).asJavaInt());
}
COM: <s> tests if function works correctly for string </s>
|
funcom_train/1383074 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PlanningMese getSettembre() {
if (settembre == null) {
try {
settembre = new PlanningMese(PlanningMese.SETTEMBRE, dbm, listener, padre);
settembre.setPreferredSize(new Dimension(600, 300)); // Generated
dbm.addDBStateChange(settembre);
} catch (java.lang.Throwable e) {
// TODO: Something
}
}
return settembre;
}
COM: <s> this method initializes settembre </s>
|
funcom_train/46680206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void makeAutoDisplayName(int[] tierNos){
for (int pos=0; pos<tierNos.length; pos++){
Tier t = getBody().getTierAt(tierNos[pos]);
t.setDisplayName(t.getDescription(getHead().getSpeakertable()));
}
}
COM: <s> generates display names automatically this is for compatability with </s>
|
funcom_train/26245043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createMap(String name, String title, int width, int height, boolean world) throws SQLException {
validateName(name);
insertMaps.clearParameters();
insertMaps.setString(1, name);
insertMaps.setString(2, title);
insertMaps.setInt(3, width);
insertMaps.setInt(4, height);
insertMaps.setBoolean(5, world);
insertMaps.executeUpdate();
createTables(name);
}
COM: <s> create a new map in the database </s>
|
funcom_train/18518235 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Item getOrCreateBookByISBN(String isbn, Connection conn) throws Exception {
try {
Item item = null;
item = getItemByISBN(isbn);
if (item == null) {
item = getNewItem(isbn, conn);
}
return item;
} catch (RemoteException e) {
throw new GenericException(e);
}
}
COM: <s> generates an alexandreia item usually a book by its isbn </s>
|
funcom_train/23998130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setImage( int frameindex ) {
if ( anim == null || sceneNode == null )
return;
if ( frameindex < 0 || frameindex > anim.getFrameCount() )
return;
Image img = activeImages.get( frameindex );
Vec2dInt dim = sceneNode.getDimension();
dim.x = img.getWidth( null );
dim.y = img.getHeight( null );
sceneNode.setImage( img );
}
COM: <s> set nodes image with given index </s>
|
funcom_train/37829763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasPlayerMovedAway() {
Player player = SingletonRepository.getRuleProcessor().getPlayer(playerName);
if (player == null) {
return true;
}
if (!player.getZone().getName().equals(zoneName)) {
return true;
}
if (player.getX() != x) {
return true;
}
if (player.getY() != y) {
return true;
}
return false;
}
COM: <s> has the player moved away including leaving the zone or logging out </s>
|
funcom_train/46681511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void tagIt(String option) {
if (tagAllCheckBox.isSelected()) {
tagger.setIndex(0);
tagger.tag(option);
while (showNextSearchitem()) {
tagger.tag(myValue);
}
} else {
tagger.tag(option);
if (moveNext.isSelected()) {
showNextSearchitem();
} else {
int tempIndex = tagger.getIndex();
tagger.setIndex(tagger.getIndex() - 1);
showNextSearchitem();
if (tagger.getIndex() > tempIndex) {
showPreviousSearchItem();
}
}
}
}
COM: <s> tags an element </s>
|
funcom_train/16392505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setGraph (Graph g) {
if (g.getVerticesCount() == 0)
throw new IllegalArgumentException ("Graph has no vertices");
try {
m_Graph = clone (g);
} catch (Exception e) {
e.printStackTrace();
throw new IllegalArgumentException ("Exception while creating copy of the Graph");
}
}
COM: <s> sets the graph that is to be searched for a euler circle </s>
|
funcom_train/13865462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTabHTML(int index, String html) {
assert (index >= 0) && (index < getTabCount()) : "Tab index out of bounds";
ClickDelegatePanel delPanel = (ClickDelegatePanel) panel.getWidget(index + 1);
SimplePanel focusablePanel = delPanel.getFocusablePanel();
focusablePanel.setWidget(new HTML(html));
}
COM: <s> sets a tabs contents via html </s>
|
funcom_train/41575201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StructureNode findNodeForSourceLine(String sourceFilePath, int lineNumber) {
String correctedPath = sourceFilePath.replace('\\', '/');
StructureNode node = findNodeForSourceLineHelper(root, correctedPath, lineNumber);
if (node != null) {
return node;
} else {
return createFileStructureNode(sourceFilePath);
}
}
COM: <s> never returns null </s>
|
funcom_train/44286513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(int sign, int duration, int durationType) {
if (durationType == Duration.HOUR) {
hours += sign * duration;
} else if (durationType == Duration.HALFDAY) {
halfDays += sign * duration;
} else if (durationType == Duration.DAY) {
days += sign * duration;
}
}
COM: <s> adds a duration with a sign </s>
|
funcom_train/42157905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SyndFeed readFromFile(String xml) {
//the feed object
SyndFeed feed = null;
//load the feed from file
try {
//read the feed
feed = new SyndFeedInput().build(new XmlReader(new File(xml)));
} catch(Exception e) {
//output error
err("Unable to load feed '" + xml + "' (" + e.getMessage() + ").");
}
//return the feed
return feed;
}
COM: <s> load a feed from a local file </s>
|
funcom_train/49635659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean alreadyHandled(File file) {
if (file.isDirectory()) {
return false;
}
synchronized (encountered) {
if (encountered.contains(file)) {
return true;
}
if (log.isTraceEnabled()) {
//noinspection DuplicateStringLiteralInspection
log.trace("Adding '" + file + "' to encountered");
}
encountered.add(file);
return false;
}
}
COM: <s> checks whether the file has been encountered before and remembers it </s>
|
funcom_train/33705584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addVariableEntry(String variable, File entry) {
Collection<File> entries = this.variableEntries.get(variable);
if (null == entries) {
entries = new ArrayList<File>();
}
entries.add(entry);
this.variableEntries.put(variable, entries);
}
COM: <s> adds a classpath entry for the given variable name </s>
|
funcom_train/36147940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Class nextClass() {
String str = readString();
if (str == null || "".equals(str)) {
return null;
}
char sep1 = StringUtils.nextCharacterSeparator(getBuffer().getDelimiter());
StringTokenizer stk = new StringTokenizer(str, sep1);
stk.next();
String value = stk.next();
return (Class) getObject(Class.class.getName(), value, sep1);
}
COM: <s> gets the next class object </s>
|
funcom_train/24938315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getGoSpacing() {
Option op = EngineThread.getGenericJob().getOption(
OptionRegistry.ATB_GO_SPACING);
int spacing = ((OptionInt) op).getValueAsInt(CodeLabel.UNSCOPED);
// If spacing is non-negative, then it was specified by the
// user and we need to respect that.
// if (spacing >= 0)
if (spacing != -1) {
return spacing;
}
return getTask().getGoSpacing();
}
COM: <s> returns the go spacing to use for this task either from the user </s>
|
funcom_train/32061892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFuelLevel(float fuellevel) {
// set the fuel in all the fuel cells to the same level
for (Component c : components) {
if (c instanceof StorageComponent ) {
if (c.getTechnology().getType() == TechnologyType.Fuelcell) {
((StorageComponent)c).setStorageAmountByLevel(fuellevel);
}
}
}
}
COM: <s> sets all the fuel cells to a certain amount </s>
|
funcom_train/48784399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void configureEngine(AxisEngine engine) throws ConfigurationException {
try {
if (myInputStream == null) {
myInputStream = resource.openStream();
}
deployment=new Deployment(XMLUtils.newDocument(myInputStream).
getDocumentElement());
deployment.configureEngine(engine);
engine.refreshGlobalOptions();
myInputStream = null;
} catch (Exception e) {
throw new ConfigurationException(e);
}
}
COM: <s> configures the given axis engine with the given descriptor </s>
|
funcom_train/23011260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void kill() {
isLoaded = false;
int count = layers.size();
for(int i=0; i<count; i++){
Layer lyr = getLayerByIndex(i);
lyr.clear(true);
lyr = null;
}
renderers.removeAllElements();
layers.removeAllElements();
layers = null;
domains= null;
themes = null;
themesLayer = null;
}
COM: <s> performs project cleanup after this project instance is not </s>
|
funcom_train/43581135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getConfigButton() {
if (configButton == null) {
configButton = new JButton();
configButton.setIcon(new ImageIcon(Constants.configX));
configButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
displayPanel4.removeAll();
displayPanel4.repaint();
displayPanel4.invalidate();
graphPanel4.removeAll();
graphPanel4.repaint();
graphPanel4.invalidate();
UserConfigureWindow config = new UserConfigureWindow();
config.setVisible(true);
}
});
}
return configButton;
}
COM: <s> this method initializes config button </s>
|
funcom_train/7422458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean validate(File file){
try{
//4. Parse the document you want to check
Source source = new StreamSource(file);
//5. Check the document
this.validator.validate(source);
System.out.println("Generated YAWL file is valid.\n");
return true;
} catch (SAXException ex) {
System.out.println("Generated YAWL file is not valid because ");
System.out.println(ex.getMessage());
} catch (IOException ex) {
// TODO Auto-generated catch block
ex.printStackTrace();
}
return false;
}
COM: <s> validates the given file </s>
|
funcom_train/7261180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private float consectiveMultiplier(){
float multiple;
if( consecutiveUpticks > consecutiveDownticks ){
//Set the consecutive upticks back to zero if the bandwidth is not being used.
if( limitMonitor.bandwidthUsageLow() ){
consecutiveUpticks=0;
}
multiple = calculateUpTickMultiple(consecutiveUpticks);
}else{
multiple = calculateDownTickMultiple(consecutiveDownticks);
limitMonitor.notifyOfDownSignal();
}
return multiple;
}
COM: <s> the longer were get the same signal the stronger it is </s>
|
funcom_train/11945669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void evolve(boolean b) {
if(b && (bi == null)) {
paintImmediately(0, 0, (int) getSize().getWidth(), (int) getSize().getHeight());
return;
}
// mouse down
if(b) applyCrit();
// mouse up
else regulDistances(0);
paintImmediately(0, 0, (int) getSize().getWidth(), (int) getSize().getHeight());
}
COM: <s> evoluting the bspline according to image informations </s>
|
funcom_train/27720105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connect(String email, String pass) throws IOException {
messenger = MsnMessengerFactory.createMsnMessenger(email, pass);
messenger.addMessageListener(this);
messenger.addContactListListener(this);
messenger.addMessengerListener(this);
//messenger.setLogOutgoing(true);
//messenger.setLogIncoming(true);
messenger.login();
}
COM: <s> attempts to establish a connection to the msn network using the provided </s>
|
funcom_train/48527542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addNode(MultiringNode node) {
if (! node.getNodeId().equals(((MultiringNode) nodes.elementAt(0)).getNodeId()))
throw new IllegalArgumentException("Node added does not have the correct nodeId!");
broadcastNewNode(node);
nodes.add(node);
}
COM: <s> this method allows other nodes to be dynamically added to the node </s>
|
funcom_train/27897475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assertMatchInTable(String tableSummaryNameOrId, String regexp) {
assertTablePresent(tableSummaryNameOrId);
assertTrue("Could not match: [" + regexp + "]" + "in table ["
+ tableSummaryNameOrId + "]", getTestingEngine().getTable(
tableSummaryNameOrId).hasMatch(regexp));
}
COM: <s> assert that supplied regexp is matched in a specific table </s>
|
funcom_train/2894023 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setUp_2() throws IOException {
CompoundFileWriter cw = new CompoundFileWriter(dir, "f.comp");
for (int i=0; i<20; i++) {
createSequenceFile(dir, "f" + i, (byte) 0, 2000);
cw.addFile("f" + i);
}
cw.close();
}
COM: <s> setup a larger compound file with a number of components each of </s>
|
funcom_train/44495949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private CacheEntry getCacheEntry(CacheReference cacheReference) throws CacheEntryNotFoundException {
if (cacheReference == null) {
throw new IllegalArgumentException("CacheReference is null");
}
CacheByClassType cacheByClassType = getCacheByClassType(cacheReference.getClassType());
CacheEntry retCacheEntry = cacheByClassType.getCacheEntry(cacheReference.getPrimaryKey());
return retCacheEntry;
}
COM: <s> returns the code cache entry code for the given code cache reference code </s>
|
funcom_train/311222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testVect2Pix_nest() throws Exception {
System.out.println("Start test Vect2Pix_nest !!!!!!!!!!!!!!!!!!!");
int nside = 4;
int ipix = 88;
long respix = 0;
HealpixIndex pt = new HealpixIndex(nside);
// SpatialVector v1 = new SpatialVectorImp(0., 0., 0.);
SpatialVector v1 = pt.pix2vec_nest(ipix);
respix = pt.vec2pix_nest(v1);
assertEquals("respix = " + respix, ipix, respix, 1e-10);
System.out.println("------------------------------------------");
System.out.println(" test vec2pix_nest is done");
}
COM: <s> test vect2 pix nest </s>
|
funcom_train/21965352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void build(String name) {
try {
ProjectsReader projReader = getProjectsReader();
for (Project project : projReader.readProjects())
if (name.equals(project.getName())) {
projReader.buildProject(project);
break;
}
} catch (Exception e) {
handleException(e);
}
}
COM: <s> force the build to begin for the project with the specified name </s>
|
funcom_train/21654486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButton getJEmailButton() {
if (jEmailButton == null) {
jEmailButton = new JRadioButton("Need to add email");
jEmailButton.setSelected(false);
jEmailButton.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent e) {
if (jEmailButton.isSelected()) {
EmailNeed = true;
} else {
EmailNeed = false;
}
}
});
}
return jEmailButton;
}
COM: <s> this method initializes flag button for email </s>
|
funcom_train/598817 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void set(BigIntegerCrypto y) {
if (y.words == null)
set(y.ival);
else if (this != y) {
realloc(y.ival); // TODO: allocate int[y.ival] directly
System.arraycopy(y.words, 0, words, 0, y.ival);
ival = y.ival;
}
}
COM: <s> destructively set the value of this to that of y </s>
|
funcom_train/22676294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String unescape(String s) {
if (s != null) {
StringBuilder b = new StringBuilder();
char last = '\0';
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
if (c != '\\') {
b.append(c);
} else
if (last == '\\') {
b.append(c);
}
last = c;
}
return b.toString();
}
return null;
}
COM: <s> unescape the backslashes from the given string </s>
|
funcom_train/3272903 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readTuple3f(Tuple3f t) throws IOException, MultiplayerException {
readType(Token.LPAREN);
t.x = readFloat();
readType(Token.COMMA);
t.y = readFloat();
readType(Token.COMMA);
t.z = readFloat();
readType(Token.RPAREN);
}
COM: <s> read the x y z values of a tuple3f and fill the </s>
|
funcom_train/11340989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getActions() {
String result = actions;
if (result == null) {
StringBuffer sb = new StringBuffer();
boolean comma = false;
int mask = getActionsMask();
if ((mask & ACTION_PUBLISH) == ACTION_PUBLISH) {
sb.append(PUBLISH);
comma = true;
}
if ((mask & ACTION_SUBSCRIBE) == ACTION_SUBSCRIBE) {
if (comma)
sb.append(',');
sb.append(SUBSCRIBE);
}
actions = result = sb.toString();
}
return result;
}
COM: <s> returns the canonical string representation of the </s>
|
funcom_train/12165523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWriteDefaultSegmentLink() throws Exception {
final AnchorAttributes attributes =
(AnchorAttributes) ProtocolIntegrationTestHelper.
provideAttributes(AnchorAttributes.class);
final VolantisProtocol protocol = getProtocol();
MethodInvoker invoker = new MethodInvoker() {
public void invoke() throws Exception {
protocol.writeDefaultSegmentLink(attributes);
}
};
String expecting = getExpectedWriteDefaultSegmentLinkResult();
ProtocolIntegrationTestHelper.doTest(expectations, protocol, invoker, expecting);
}
COM: <s> this method tests the method public void write default segment link anchor attributes </s>
|
funcom_train/21647903 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void append( Object[] vals ) {
for( int i=0; i< vals.length-1; i++) {
addVal( vals[i], null, false );
}
if( vals.length>1 ) {
addVal( vals[ vals.length -1 ], null, true );
}
}
COM: <s> appends array of values to buffer including comma separators </s>
|
funcom_train/46979973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void add(Class type, Class param, Object obj, String name) {
Method m;
Class params[] = {param, MNamespace.class};
try {
if (obj instanceof Class) {
m = ((Class) obj).getDeclaredMethod(
name,
params);
obj = null;
} else {
m = obj.getClass().getDeclaredMethod(
name,
params);
}
copyfunctions.put(type, new CopyFunction(obj, m));
} catch (Exception e) {
}
}
COM: <s> adds a copy handler for objects of type i type i </s>
|
funcom_train/21827847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetConnection() {
System.out.println("The \"testGetConnection\" is started");
ConnectionImpl conn = null;
try {
conn = (ConnectionImpl)cf.getConnection();
}
catch (Exception e) {
e.printStackTrace();
}
assertNotNull("Cannot get connection", conn);
System.out.println("The \"testGetConnection\" is finished");
}
COM: <s> tests the method com </s>
|
funcom_train/9564456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int convertProtectionLevel() {
int level = 0;
switch(this.protectionLevel) {
case RtfProtection.LEVEL_NONE:
break;
case RtfProtection.LEVEL_REVPROT:
level = 0;
break;
case RtfProtection.LEVEL_ANNOTPROT:
level = 1;
break;
case RtfProtection.LEVEL_FORMPROT:
level = 2;
break;
case RtfProtection.LEVEL_READPROT:
level = 3;
break;
}
return level;
}
COM: <s> converts protection level from internal bitmap value to protlevel output value </s>
|
funcom_train/4557941 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPaymentSettingInputValidPassword() {
repEng.newStep("346", "Payment Settings-Input valid PayPal Password for PayPal");
//1. Goto User Settings:Payment Settings page
//2. Select Payment Options as PayPal
//3. Input valid Email
//4. Input valid PayPal Password.
// Paypal Password should be accepted
// Next button is enabled
}
COM: <s> 346 payment settings input valid pay pal password for pay pal </s>
|
funcom_train/1532873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addMacroXML(String xml) {
boolean ok=true;
try {
//EJmyXMLio.processXMLString("<geogebra format=\""+GeoGebra.XML_FILE_FORMAT+"\">"+xml+"</geogebra>", false, true);
myXMLio.processXmlString(xml, false, true);
} catch (MyError err) {
err.printStackTrace();
showError(err);
ok=false;
} catch (Exception e) {
e.printStackTrace();
ok=false;
showError("LoadFileFailed");
}
return ok;
}
COM: <s> adds a macro from xml </s>
|
funcom_train/31225356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String addUserChannel(String name, String pass, ClientConnection cc) {
if (allowUserChannels == 'n') {
return eAllowed;
}
if (allowUserChannels == 'a' && !cc.isAdmin()) {
return eAdmin;
}
if (!isValidChannel(name)) {
return eName;
}
if (userChannels == null) {
userChannels = new Hashtable();
}
userChannels.put(name, new ChannelManagerItem(pass));
return null;
}
COM: <s> creates a new user channel if valid name and is allowed </s>
|
funcom_train/101846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void preVisibleNotify() {
// finally, if we have any defaults, apply them to our editor panel
Object o;
if((o = wizardParent.getDefaultsForClass(contentClass)) != null) {
setDefaultSelectionFrom((OBJT) o); // apply them to our combobox, perhaps?
myPanel.setDefaultsFrom((OBJT) o); // and fill in our editor pane
}
}
COM: <s> called right before were about to be made visible </s>
|
funcom_train/9869888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTemplate(String newVal) {
if ((newVal != null && this.template != null && (newVal.compareTo(this.template) == 0)) ||
(newVal == null && this.template == null && template_is_initialized)) {
return;
}
this.template = newVal;
template_is_modified = true;
template_is_initialized = true;
}
COM: <s> setter method for template </s>
|
funcom_train/1038920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean attachOpenID(String openid_url,int idUser) throws SQLException {
//insert into user_openids values (openid_url, user_id)
Statement statement = null;
//try {
statement = db.getStatement();
String sql = "INSERT INTO user_openids (openid_url, idUser) VALUES ('"
+openid_url+"', '" +
+idUser+"');";
statement.executeUpdate(sql);
statement.close();
//} catch (SQLException e) {
// e.printStackTrace();
//}
//TODO check openID was Attached
return true;
}
COM: <s> add another openid to a user id </s>
|
funcom_train/49196850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_GenFolder_name_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_GenFolder_name_feature", "_UI_GenFolder_type"),
GenmodelPackage.Literals.GEN_FOLDER__NAME,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the name feature </s>
|
funcom_train/34897414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clearDetails(boolean setBusy) {
projHeader.clear();
projMenuBar.showDefaultMenu();
showDetails(false);
if (setBusy)
showBusyIndicator();
projSetupDetails.clear();
fpDetails.clear();
alignDetails.clear();
statsDetails.clear();
inclDetails.clear();
targetFeatAnnoDetails.clear();
}
COM: <s> hides the pipeline widget the project header and any setup details widgets </s>
|
funcom_train/37835644 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onAdded(final RPObject object) {
if (!object.getRPClass().subclassOf("entity")) {
logger.debug("Skipping non-entity object: " + object);
return;
}
final IEntity entity = add(object);
if (entity == null) {
logger.error("No entity for: " + object);
} else {
if (entity.isOnGround()) {
for (GameObjectListener listener : gameObjectListeners) {
listener.addEntity(entity);
}
}
logger.debug("added " + entity);
}
}
COM: <s> an object was added </s>
|
funcom_train/37764292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMonthlyType() {
Recurrence r = ((TaskMaintenanceComponent) getComponent()).getRecurrence();
return r != null && r instanceof Recurrence.Monthly
&& (((Recurrence.Monthly) r).getDay() == null || ((Recurrence.Monthly) r).getDay() == 0)
? MonthlyType.WEEK.toString() : MonthlyType.DAY.toString();
}
COM: <s> getter for property monthly type </s>
|
funcom_train/19401733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Tuple getTuple() {
if( m_beforeFirst ) {
throw new RdbmsException( RdbmsException.ERR_BEFORE_START, "Before start of cursor." );
}
if( m_afterLast) {
throw new RdbmsException( RdbmsException.ERR_AFTER_END, "Cursor is exhausted." );
}
return m_tuple;
}
COM: <s> return the current tuple that is being visited </s>
|
funcom_train/4285883 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initCaches() throws Qvtr2Exception {
classToServiceCenterMap = ImmutableMap.copyOf(Maps.transformValues(
ctt.getClassToTableMappings(), new Function<Table, String>() {
@Override
public String apply(Table table) {
return computeServiceCenterName(table);
}
}));
serviceCenterToClassMap = ImmutableMultimap.copyOf(
Multimaps.invertFrom(
Multimaps.forMap(classToServiceCenterMap),
HashMultimap.<String,umlMM.Class>create()
));
}
COM: <s> inits translation caches for fast information retrieval </s>
|
funcom_train/28156644 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visitJmlMethodName(JmlMethodName self) {
JmlName[] subnames = self.subnames();
for (int i = 0; i < subnames.length; i++) {
if (i != 0)
print(".");
subnames[i].accept(this);
}
print("(");
if (self.hasParamDisambigList()) {
CType[] params = self.paramDisambigList();
for (int i = 0; i < params.length; i++) {
if (i != 0)
print(", ");
print(toString(params[i]));
}
}
print(")");
}
COM: <s> prints a jml method name </s>
|
funcom_train/12263393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object toBean(ResultSet rs, Class type) throws SQLException {
PropertyDescriptor[] props = this.propertyDescriptors(type);
ResultSetMetaData rsmd = rs.getMetaData();
int[] columnToProperty = this.mapColumnsToProperties(rsmd, props);
int cols = rsmd.getColumnCount();
return this.createBean(rs, type, props, columnToProperty, cols);
}
COM: <s> convert a code result set code row into a java bean </s>
|
funcom_train/49315032 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getGetterMethodNameAlt(String propertyName) {
int l = propertyName.length();
char[] data = new char[l + 3];
data[0] = 'i';
data[1] = 's';
data[2] = Character.toUpperCase(propertyName.charAt(0));
if (l > 1) {
propertyName.getChars(1, l, data, 3);
}
return new String(data);
}
COM: <s> builds the method name inserting the word code is code at the </s>
|
funcom_train/51741333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isArgumentMissing(String args[], int index) {
if (args.length - 1 == index || args[index + 1].startsWith("-")) {
SystemLog.error("The %s flag expects a value to be passed as an "
+ "argument. Please check the help for the meaning of this flag " + "and it's expected value.",
args[index]);
return true;
}
return false;
}
COM: <s> helper method which is called when a parameter is encountered that </s>
|
funcom_train/1303769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean search(int[] codePoints, int startPos, int endPos) {
Node curNode = root;
for (int i = startPos; i < endPos; ++i) {
curNode = curNode.get(codePoints[i]);
if (curNode == null) return false;
}
return curNode.isComplete();
}
COM: <s> search for the code points from start pos inclusive to end pos exclusive </s>
|
funcom_train/10515496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPackages() {
StringBuffer p = new StringBuffer();
final int size = packages.size();
for (int i = 0; i < size; i++) {
if (i > 0) {
p.append(":");
}
p.append(packages.elementAt(i).toString());
}
return p.toString();
}
COM: <s> get the packages as a collon separated list </s>
|
funcom_train/28998462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isIFrameNeeded(final IContentItem ci, String content) {
Properties p = (Properties) propertyRegistry.get(ci.getKey());
boolean answer = false;
return ((isMSIEUserAgent(ci) && content.indexOf("applet") > -1) ||
(p != null && "true".equals(p.get("iframeneeded"))));
}
COM: <s> use the content item properties to determine if an iframe is needed </s>
|
funcom_train/28350848 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Trace getTrace() {
synchronized(_lock) {
// see if we need to generate a new trace or if we can use the cached trace
if ( _cachedTrace == null ) {
double[] positions = new double[_positions.length];
double[] values = new double[_values.length];
System.arraycopy(_positions, 0, positions, 0, _positions.length);
System.arraycopy(_values, 0, values, 0, _values.length);
_cachedTrace = new Trace( _label, _timeStamp, positions, values );
}
return _cachedTrace;
}
}
COM: <s> generate an immutable trace representation of this trace </s>
|
funcom_train/12156309 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isPolicyResource(String resourceName) {
boolean result = false;
String extension = resourceName.substring(
resourceName.lastIndexOf('.') + 1);
FileExtension fileExtension =
FileExtension.getFileExtensionForExtension(extension);
if (fileExtension != null && fileExtension.isPolicyFileExtension()) {
result = true;
}
return result;
}
COM: <s> determine if the resource specified by the given name corresponds to a </s>
|
funcom_train/44289744 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear (int [] indices) {
checkWidget ();
if (indices == null) error (SWT.ERROR_NULL_ARGUMENT);
if (indices.length == 0) return;
for (int i=0; i<indices.length; i++) {
if (!(0 <= indices [i] && indices [i] < getItemCount())) {
error(SWT.ERROR_INVALID_RANGE);
}
}
for (int i=0; i<indices.length; i++) {
clear(indices [i]);
}
}
COM: <s> clears the items at the given zero relative indices in the receiver </s>
|
funcom_train/25751562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addUnitToForce(Unit u, int id) {
Force prevForce = forceIds.get(u.getForceId());
if(null != prevForce) {
prevForce.removeUnit(u.getId());
}
Force force = forceIds.get(id);
if(null != force) {
u.setForceId(id);
force.addUnit(u.getId());
u.setScenarioId(force.getScenarioId());
}
}
COM: <s> add unit to an existing force </s>
|
funcom_train/48336599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected AttributeNameValues queryGenerator() {
AttributeNameValues atts = new AttributeNameValues();
atts.addAttributeNameValue(USERNAME, name);
atts.addAttributeNameValue(LOCATION,location);
atts.addAttributeNameValue(TIMESTAMP,getCurrentTime(), Attribute.LONG);
return atts;
}
COM: <s> this method returns an attribute name values object with the latest presence info </s>
|
funcom_train/38414894 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendChatMessage( SendTextMessage message, PlayerImpl otherPlayer) {
synchronized( connectionLock ) {
if( connection!=null ) {
if( ServerDirector.SHOW_DEBUG )
System.out.println("Player "+getPrimaryKey()+" sending to:"+otherPlayer.getPrimaryKey()+" msg: "+message);
connection.queueMessage( message );
}
}
}
COM: <s> use this method to send a send text message to this player </s>
|
funcom_train/13783092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Projection getFirstAvailable() {
DiffElement[] elements = diffTreeNode.getElements();
if (elements[1].getDiffStatus() == DiffStatus.ADDED) {
// if [1] was added then [0] is absent
return elements[1].getProjection();
} else {
// [0] should be there
return elements[0].getProjection();
}
}
COM: <s> get old projection preferably or new if there is no old one </s>
|
funcom_train/23328276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValidSelection() {
int count = 0;
for (ISubModule sm : constrainedSubModules.keySet()) {
if (constrainedSubModules.get(sm)) {
count++;
}
}
if (count >= getMin() && count <= getMax()) {
return true;
}
return false;
}
COM: <s> determine if the current selection is valid is in min max bounds </s>
|
funcom_train/8630173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInt(int parameterIndex, int x) throws SQLException {
try {
if (isDebugEnabled()) {
debugCode("setInt("+parameterIndex+", "+x+");");
}
setParameter(parameterIndex, ValueInt.get(x));
} catch (Exception e) {
throw logAndConvert(e);
}
}
COM: <s> sets the value of a parameter </s>
|
funcom_train/18191165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawFaceXZ(Graphics g, Color col, double[][] matrix, boolean usePerspective) {
g.setColor(col);
initPolyLine(pos000, posx00, posx0z, pos00z, matrix, usePerspective); // XZ
g.fillPolygon(polyLineX, polyLineY, 5);
}
COM: <s> draws the face xz with the given color </s>
|
funcom_train/2314941 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Method findSetter(String fieldName, Class classOfField) {
String setterName = "set" + fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1);
try {
return findMethod(setterName, new Class [] { classOfField });
} catch (MoreThanOneResult e) {
return null; // Follow the KISS principle. If you declare ambiguous setters - that's your own problem.
}
}
COM: <s> finds a setter method for a field of a given class </s>
|
funcom_train/34967090 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetInstance() throws Exception {
System.out.println("getInstance");
Support supports = Support.NoGetINFO;
SupportsMessage expResult = new SupportsMessage("$Supports NoGetINFO|");
SupportsMessage result = SupportsMessage.getInstance(supports);
assertEquals(expResult.getSupports().get(0), result.getSupports().get(0));
}
COM: <s> test of get instance method of class jhub </s>
|
funcom_train/2302925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isPresent(Satisfier satisfier) {
for (int i = 0; i < tabbed.getTabCount(); i++) {
Component c = tabbed.getComponentAt(i);
if (satisfier.satisfies(c, (Tag) componentTags.get(c)))
return true;
}
return false;
}
COM: <s> detects if there are any components in this environment that </s>
|
funcom_train/2893298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValidSiteArch(String id) {
if (sitearchs == null)
return false;
int nSiteArchs = sitearchs.size();
SiteArch sitearch = null;
for (int i = 0; i < nSiteArchs; i++) {
sitearch = (SiteArch) sitearchs.get(i);
if (sitearch.id.getKey().equals(id))
return true;
}
return false;
}
COM: <s> check if sitearch is in cached list </s>
|
funcom_train/10594988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection searchCopletInstances(CopletDefinition copletDefinition) {
final List list = new ArrayList();
final Iterator i = this.getCopletInstances().iterator();
while ( i.hasNext() ) {
final CopletInstance current = (CopletInstance)i.next();
if ( current.getCopletDefinition().equals(copletDefinition) ) {
list.add(current);
}
}
return list;
}
COM: <s> search for all coplet instances of the coplet definition </s>
|
funcom_train/30276961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void calcAvgSpeedAnswer(StatWorkItem workItem) {
long answeredTime = workItem.getAnsweredTime();
long enqueueTime = workItem.getEnqueueTime();
if (answeredTime != 0 && enqueueTime != 0 && answeredTime > enqueueTime) {
answerSpeed += (answeredTime - enqueueTime) / 1000;
}
if (totalWorkItems > 0) {
queueGraphItem.setAvgSpeedAnswer((int) answerSpeed / totalWorkItems);
}
}
COM: <s> calculates the avg speed answer </s>
|
funcom_train/22047670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getText(int iType) {
switch (iType) {
case ACTUAL:
return tRTFtext.toString();
case TEXT:
return getFormattedText(); // Use this to test the format of turns
case RTF:
return getRTFText();
case HTML:
return getHTMLText();
case FORMATTED:
return getFormattedText();
case STRIPPED:
return getStrippedText();
default:
return "";
}
}
COM: <s> returns text depending on type passed </s>
|
funcom_train/12587694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Long findAnyItemId(final String guid) throws DataAccessException {
Long identity = (Long) getHibernateTemplate().execute(new HibernateCallback() {
public Object doInHibernate(Session session) throws HibernateException, SQLException {
Query query = session.getNamedQuery("isNewsAlreadyPersist");
query.setParameter(0, guid);
return query.uniqueResult();
}
});
return identity;
}
COM: <s> find item id from the database </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.