__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/1812877 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ejbCreate() {
creatorJonasInstanceName = "unknown";
try {
JProp jp = JProp.getInstance();
creatorJonasInstanceName = jp.getValue("jonas.name");
} catch (Exception e) {
logger.log(BasicLevel.FATAL, e.getMessage());
}
itens = new HashMap<String, Integer>();
isModified = true;
}
COM: <s> creation of the ejb </s>
|
funcom_train/4920519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLinkOfficeGovernanceForOfficeSection() {
this.replayMockObjects();
// Add section
OfficeSection section = this.addSection(this.node, "SECTION", null);
// Link
OfficeGovernance governance = this.addGovernance(this.node,
"GOVERNANCE", null);
section.addGovernance(governance);
// TODO test that governance specified
// May have many governances
OfficeGovernance another = this.addGovernance(this.node, "ANOTHER",
null);
section.addGovernance(another);
this.verifyMockObjects();
}
COM: <s> ensure can specify </s>
|
funcom_train/14163440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void saveRedirectSignaler(String pName, Storyboard pStoryboard)throws FocusConfigException{
IRedirectSignaler sig = pStoryboard.getRedirectSignaler(pName);
XmlElement sigElement = new XmlElement("signaler");
sigElement.addAttribute("name", pName);
sigElement.addAttribute("class", sig.getClass().getName());
openAndCloseElement(sigElement);
}
COM: <s> saving an iredirect signaler </s>
|
funcom_train/1437477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTickLabelFontStyle(String cssStyle) {
chartDecorationsChanged = true;
Curve c = getSystemCurve(ticksId);
int nPoints = c.getNPoints();
for (int i = 0; i < nPoints; i++)
c.getPoint(i).setAnnotationFontStyle(cssStyle);
tickLabelFontStyle = cssStyle;
}
COM: <s> specifies the css font style of this </s>
|
funcom_train/31824378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawBackground (GC gc, int x, int y, int width, int height) {
checkWidget ();
if (gc == null) error (SWT.ERROR_NULL_ARGUMENT);
if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
RECT rect = new RECT ();
OS.SetRect (rect, x, y, x + width, y + height);
int hDC = gc.handle;
int pixel = background == -1 ? OS.GetBkColor (hDC) : -1;
drawBackground (hDC, rect, pixel);
}
COM: <s> fills the interior of the rectangle specified by the arguments </s>
|
funcom_train/33964775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetTimeout() {
System.out.println("getTimeout");
TimeoutMatch instance = null;
long result;
// Default
instance = new TimeoutMatch(closure);
result = instance.getTimeout();
assertEquals(Expect4j.TIMEOUT_NOTSET, result);
// Custom
long expected = 555L;
instance = new TimeoutMatch(expected, closure);
result = instance.getTimeout();
assertEquals(expected, result);
}
COM: <s> test of get timeout method of class expect4j </s>
|
funcom_train/10628643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNegNegFirstShorter() {
String numA = "293478573489347658763745839457637";
String numB = "2837462783428374767845648748973847593874837948575684767";
String res = "2837462783428374767845615168483972194300564226167553530";
BigInteger aNumber = new BigInteger(numA);
BigInteger bNumber = new BigInteger(numB);
BigInteger result = aNumber.xor(bNumber);
assertTrue(res.equals(result.toString()));
}
COM: <s> xor for two negative numbers the first is shorter </s>
|
funcom_train/45761243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getTextRange(int startIndex, int endIndex) {
try {
return unoObject.getTextRange(startIndex, endIndex);
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
} catch (com.sun.star.uno.RuntimeException e) {
}
return null;
}
COM: <s> returns the text range between two indices </s>
|
funcom_train/15364987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int readDWord_v1() {
currentOffset += 4;
return ((buffer[currentOffset - 2] & 0xff) << 24) + ((buffer[currentOffset - 1] & 0xff) << 16) +
((buffer[currentOffset - 4] & 0xff) << 8) + (buffer[currentOffset - 3] & 0xff);
}
COM: <s> p reads a dword from the buffer p </s>
|
funcom_train/12117929 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connEtoC5(javax.swing.event.ChangeEvent arg1) {
try {
// user code begin {1}
// user code end
this.jTabbedPane_StateChanged(arg1);
// user code begin {2}
// user code end
} catch (java.lang.Throwable ivjExc) {
// user code begin {3}
// user code end
handleException(ivjExc);
}
}
COM: <s> conn eto c5 jtabbed pane </s>
|
funcom_train/46630201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void prepareCommentArray(String creator, String comment) throws IOException {
try {
if (comment != null && creator == null)
creator= "org.qenherkhopeshef";
if (comment == null)
comment= "";
ByteArrayOutputStream o = new ByteArrayOutputStream();
o.write(creator.getBytes("UTF-16LE"));
o.write(0);o.write(0);
o.write(comment.getBytes("UTF-16LE"));
o.write(0);o.write(0);
o.write(0);o.write(0);
o.close();
header.setComment(o.toByteArray());
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
}
COM: <s> prepare the comment string </s>
|
funcom_train/46982436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsTable(String tableName) throws SQLException {
Statement statement = connection.createStatement();
ResultSet resultSet = statement.executeQuery(SHOWTABLES);
while (resultSet.next() == true) {
String currentTable = resultSet.getString(1);
if (currentTable.equalsIgnoreCase(tableName)) {
return true;
}
}
statement.close();
return false;
}
COM: <s> returns true if the given table name exists in the database referenced </s>
|
funcom_train/18003727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clearTreePaths() {
if (selecting) {
return;
}
selecting = true;
for (TreePath treePath: domTree.getSelectionPaths()) {
while (true) {
try {
domTree.removeSelectionPath(treePath);
break;
} catch (Exception e) {
continue;
}
}
}
selecting = false;
}
COM: <s> clear all selected tree paths </s>
|
funcom_train/11744744 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected List resolvedObjectList() {
if (isFault()) {
synchronized (this) {
// now that we obtained the lock, check
// if another thread just resolved the list
if (isFault()) {
List localList = resolveFromDB();
mergeLocalChanges(localList);
this.objectList = localList;
}
}
}
return objectList;
}
COM: <s> returns internal objects list resolving it if needed </s>
|
funcom_train/31046955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getXMLVersion() {
if (fCurrentEntity != null) {
if (fCurrentEntity.isExternal()) {
return fCurrentEntity.xmlVersion;
}
else {
// ask current entity to find the appropriate XML version
return fCurrentEntity.getXMLVersion();
}
}
return null;
} // getXMLVersion():String
COM: <s> returns the xml version of the current entity </s>
|
funcom_train/20385442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Class getKeyClass(Class parentClass, String property) {
Key annotation = getAnnotation(parentClass, property, Key.class);
if (annotation != null) {
return annotation.value();
}
Class clazz = getClass(parentClass, property, false);
if (clazz != null) {
return clazz;
}
return (Class) XWorkConverter.getInstance().getConverter(parentClass, KEY_PREFIX + property);
}
COM: <s> determines the key class by looking for the value of </s>
|
funcom_train/12596672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void receivePeers(Descriptor[] peers) {
// set peers provided by peer sampling service to be actual cache.
cache = new TManDescriptor[peers.length];
for (int i = 0; i < cache.length; i++) {
cache[i] = (TManDescriptor)peers[i];
}
// initialize start time to instant when protocol starts to communicate.
start = new Date();
System.out.println("TMAN: received peers from Peer Sampling Service.");
}
COM: <s> receives peers to use for startup by peer sampling service </s>
|
funcom_train/12245567 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getUniqValuesAsString() {
Vector<String> contained = new Vector<String>();
if (_keyValues == null)
return "null";
String ret = "";
for (int i = 0; i < _keyValues.length; i++) {
String val = _keyValues[i].getValue();
if (!StringUtil.isStringInVector(val, contained)) {
ret += val + " ";
}
contained.add(val);
}
return ret.trim();
}
COM: <s> return unique list ignoring doublettes of values as blank separated </s>
|
funcom_train/3811729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBasicDelete() {
Table table = getPrimaryKeyTable();
DeleteStatement deleteStatement = table.getDeleteStatement();
SQLGenerator generator = sqlFactory.newSQLGenerator();
generator.setLineTerminator("\n");
String s = generator.getQuery(deleteStatement);
assertEquals("DELETE FROM MySchema.MyTable WHERE MyIndex=?", s);
}
COM: <s> p basic test for creating an code delete code statement </s>
|
funcom_train/11663188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node getContentAsDOM() throws XMLDBException {
try {
if (bytes != null) {
return new DocumentImpl(bytes, symbols, null);
} else {
return DOMParser.toDocument(content);
}
} catch (Exception e) {
throw FaultCodes.createXMLDBException(e);
}
}
COM: <s> returns the content of the resource as a dom node </s>
|
funcom_train/46760581 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getRefId(final String referenceGroup, final String refKey, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
return getReference(referenceGroup, refKey, call).getId();
}}; return (Long) call(method, call);
}
COM: <s> get the reference id for the group and key </s>
|
funcom_train/46729954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start(Component parentDialogOrFrame, String referenceGroup, IGetBaseModelList getModelList) throws Exception {
RefModel ref = new RefModel();
ref.setDisplay(referenceGroup);
setDefaultBaseModel(ref);
this.getModelList = getModelList;
populateTable();
startDialog(ApplicationDialogReference.REFERENCEBUILDER, parentDialogOrFrame, false);
displayDialog();
}
COM: <s> start the application with the defined search </s>
|
funcom_train/25073749 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Project getProjectForHistoryNode(DefaultMutableTreeNode aNode) {
if (!historyNodes.containsValue(aNode)) {
return null;
}
for (Project tmpProject : historyNodes.keySet()) {
if (historyNodes.get(tmpProject).equals(aNode)) {
//log.info("found a Project");
return tmpProject;
}
}
log.warn("found no Project");
return null;
}
COM: <s> returns a project for history node </s>
|
funcom_train/28344708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double compAngleStepSize(IProbe probe, double dL) {
double s1 = this.compProbeLocation(probe);
double s2 = s1 + dL;
double a1 = this.compCurrentAngle(s1);
double a2 = this.compCurrentAngle(s2);
double dAng = a2 - a1;
return dAng;
}
COM: <s> compute the step in the design trajectory angle given the physical </s>
|
funcom_train/1502076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Override public String toString() {
StringBuilder sb = new StringBuilder(String.valueOf(super.numerator()));
if (super.denominator() != 1) sb.append('/').append(super.denominator());
for (int i = 0; i < dots; i++) sb.append('.');
return sb.toString();
}
COM: <s> returns a string representation of this value including dots </s>
|
funcom_train/51162746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode() {
if (hashCode == 0) {
int result = 17;
result = 37 * result + (item == null ? 0 : item.hashCode());
result = 37 * result + (comboBox == null ? 0 : comboBox.hashCode());
hashCode = result;
}
return hashCode;
}
COM: <s> returns a hash code for this item referrence </s>
|
funcom_train/41328678 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stateChanged( ChangeEvent e ) {
Object obj = e.getSource();
if ( obj.equals(vp)) {
Rectangle r = viewPortR.getBounds();
viewPortChangedCore(vp);
r.add(viewPortR.getBounds());
r.grow(2,2);
repaint(r);
}
}
COM: <s> from the change listener interface </s>
|
funcom_train/41581962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkRoute() {
if (D) Log.v(TAG, getString(R.string.check_route));
PhoneWandActivity.swipeBuzz();
updateCurrentLocation();
mOrienter = false;
// Find the route.
new GetDirections().execute(PhoneWandActivity.mCurrentLocation, mDestination);
}
COM: <s> called when the user is checking his her current location direction </s>
|
funcom_train/1477844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void sessionHasExpired(HttpServletRequest request, HttpServletResponse response, String obj) {
String error = "L'objet " + obj + " est manquant (null). La session a du expirer. Recharger l'application";
request.getSession(true).setAttribute(ObjectKeys.SERVLET_ERROR, error);
dispatch(request, response, BaseServlet.JSP_ERROR_PAGE);
return;
}
COM: <s> generates an error message corresponding to session expiration and dispatch to error page </s>
|
funcom_train/43394296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addToWorkflowInstances(StataggregateJob job) {
String wrtid = job.getWrtID();
if (workflowInstances.containsKey(wrtid)) {
WorkflowInstance r = workflowInstances.get(wrtid);
r.stats.addAggregateJob(job);
}
else {
WorkflowInstance r = new WorkflowInstance(wrtid);
r.stats.addAggregateJob(job);
workflowInstances.put(wrtid, r);
}
}
COM: <s> add the job to the correct concrete workflow </s>
|
funcom_train/44128176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT:
public void refreshData() {
try {
this.tableController.setInput(LogHistoryManager.getInstance().getHistory());
}
catch (Exception ex) {
ex.printStackTrace();
throw new DbblRuntimeException(
new Status(
IStatus.ERROR,
DbblPlugin.ID,
-1,
"Unable to refresh data : " + ex.getMessage(),
ex
)
);
}
}
COM: <s> refreshes log data </s>
|
funcom_train/51783601 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setRunExpectations() {
mockConnection.expects(once()).method("getPoints")
.will(returnValue(originalPoints));
mockConnection.expects(once()).method("resetPoints");
mockNotification.expects(once()).method("notifyElementsMoved");
}
COM: <s> expectations for the run method </s>
|
funcom_train/18836613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int changeScale(String newScaleName, int oldScale, JTextField tf) {
int newScale = 1;
if(newScaleName.equals("minutes"))
newScale = 1;
else if(newScaleName.equals("hours"))
newScale = 60;
else if(newScaleName.equals("days"))
newScale = 60*24;
float oldValue = Float.parseFloat(tf.getText());
tf.setText(Float.toString(oldValue * oldScale / newScale));
return newScale;
}
COM: <s> change scale of proxy lifetime </s>
|
funcom_train/32636224 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean kill(String password) throws InvalidPasswordException {
if (!password.equals(Project.instance().getPassword())) {
SysLogger.println("WARNING: Attempt to kill the project server failed due to the use of an incorrect password.");
throw new InvalidPasswordException();
}
// Don't wait for all transactions to complete.
PRCServer.instance().setWaitForTransactions(false);
PRCServer.instance().initiateShutdown();
return true;
}
COM: <s> shuts down the server without waiting for all transitioner transactions to complete </s>
|
funcom_train/26641816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getOpcodeForm(byte[] code, int ofs) {
int i;
if (lengths.length == 1) return 0;
for (i = 0; i < hints.length; i++) {
int form;
form = OpcodeHints.getOpcodeForm(hints[i], code, ofs);
if (form != OpcodeHints.AMBIGUOUS) return(form);
}
return OpcodeHints.getOpcodeForm(OpcodeHints.DEFAULT, code, ofs);
}
COM: <s> utilizing the opcode hints return the numeric value that this </s>
|
funcom_train/10208522 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addForwardEdge(EdgeModel edge) {
forwardEdges.add(edge);
if(firstForwardEdge == null) {
firstForwardEdge = edge;
}
EdgeModel previousEdge = lastForwardEdge;
lastForwardEdge = edge;
if((firstForwardEdge != lastForwardEdge) && (previousEdge != null)) {
previousEdge.setNextEdge(lastForwardEdge);
lastForwardEdge.setPreviousEdge(previousEdge);
}
this.setChanged();
this.notifyObservers(new ObserverNotification(NotificationType.elementChanged, this));
this.clearChanged();
}
COM: <s> adds an edge to the way collection </s>
|
funcom_train/21885498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addChildNodesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ASTNode_childNodes_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ASTNode_childNodes_feature", "_UI_ASTNode_type"),
AstviewerPackage.Literals.AST_NODE__CHILD_NODES,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the child nodes feature </s>
|
funcom_train/3655206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StackLine getLocalOriginLine() {
for (int ii = 0; ii < stackLines_.length; ii++) {
for (int jj = 0; jj < JDK_CLASS_FILTERS.length; jj++) {
if (!stackLines_[ii].getClassName().
startsWith(JDK_CLASS_FILTERS[jj])) {
return stackLines_[ii];
}
}
}
return null;
}
COM: <s> gets the earliest line in this stack trace </s>
|
funcom_train/2711299 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void elements(Collection collection, TransposerFilter filter, ContentHandler handler) throws SAXException {
if (collection != null) {
Iterator iterator = collection.iterator();
while (iterator.hasNext()) {
Object item = iterator.next();
TransposerFilter elementFilter = null;
if (filter != null) {
elementFilter = filter.getTransposerFilterForSubElement(item);
}
getTypeTransposer(item.getClass()).asElement(item, null, elementFilter, handler);
}
}
}
COM: <s> loops over the elements of the collection to transpose them </s>
|
funcom_train/28114464 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onLostFocus(){
draw(false);
inf.draw(false);
if(!drawn) return;
//g=theIM.getGraphics();
g.setColor(Color.black);
g.setXORMode(Color.red);
g.drawRect(rect.x,rect.y,rect.width,rect.height);
}
COM: <s> defines what the ann will do if it loses focus </s>
|
funcom_train/25257192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connectionAccepted(final Socket socket) {
synchronized (tasks) {
final String id = socket.getInetAddress().getHostAddress() + ":" + socket.getPort();
if (!getTasks().containsKey(id)) {
final DownloadTask dt = new DownloadTask(this, null, false, socket);
getPeerList().put(dt.getPeer().toString(), dt.getPeer());
dt.start();
}
}
}
COM: <s> called when a new peer connects to the client </s>
|
funcom_train/39177289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addEntry(K key, V value) {
if(entries == null) {
entries = new ArrayList<MapEntry<K, V>>();
}
MapEntry<K, V> entry = new MapEntry<K, V>();
entry.setKey(key);
entry.setValue(value);
entries.add(entry);
}
COM: <s> add a single entry to this wrapper </s>
|
funcom_train/3946012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSchemaPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(new ItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_MetadataType_schema_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_MetadataType_schema_feature", "_UI_MetadataType_type"),
ImscpRootv1p1p2Package.eINSTANCE.getMetadataType_Schema(),
true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
}
COM: <s> this adds a property descriptor for the schema feature </s>
|
funcom_train/12180437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectDevice(String deviceName) {
DeviceEditorContext context =
(DeviceEditorContext) getODOMEditorContext();
DeviceRepositoryAccessorManager dram =
context.getDeviceRepositoryAccessorManager();
Element device = dram.getHierarchyDeviceElement(deviceName);
List selection = new ArrayList();
selection.add(device);
setSelection(new ODOMElementSelection(selection));
}
COM: <s> set the selection to the named device assuming the named device </s>
|
funcom_train/9645268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Value getAttributeValueOnName(String id, Attribute currentAttribute) {
// Only if currentAttribute.isNominal()
// Get all values of the current attribute
Value[] values = getAttributeValues(currentAttribute);
if (values == null)
return null;
// Check, which value is the correct value and return it.
for (Value value : values) {
if (value.getId().equals(id))
return value;
}
// If no value was founded, return null.
return null;
}
COM: <s> returns the value of the given current attribute with the given id or </s>
|
funcom_train/174268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
// Generated by IntelliJ
if (this == obj) return true;
if (!(obj instanceof ElementFilter)) return false;
final ElementFilter filter = (ElementFilter) obj;
if (name != null ? !name.equals(filter.name) : filter.name != null) return false;
if (namespace != null ? !namespace.equals(filter.namespace) : filter.namespace != null) return false;
return true;
}
COM: <s> returns whether the two filters are equivalent i 46 e 46 the </s>
|
funcom_train/50939909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resetTableColumnList() {
if (tableColumnList == null) {
tableColumnList = new Vector();
} else {
int listSize = tableColumnList.size();
for (int i = 0; i < listSize; i++) {
model.addColumn((TableColumn) tableColumnList.remove(0));
}
}
}
COM: <s> move all the table columns from the hidden table column list to the </s>
|
funcom_train/37824943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int errorReportHandler(PcaEvent event,DataUnit data,Object object){
String tid = data.unpackString();
String level = data.unpackString();
String message = data.unpackString();
new GUIError(Integer.parseInt(level),modules.getModuleByTaskId(tid).getName()
+ ": " + message);
return 0;
}
COM: <s> is called when an error is reported by a module </s>
|
funcom_train/32947910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write( IIndividualSet set ) {
String file = directory + SystemUtils.FILE_SEPARATOR + body + "_" + UniqueID.nextLong() + "." + suffix;
try {
ObjOut out = new ObjOut( new FileOutputStream( file ) );
out.writeObject( set );
out.close();
} catch ( Exception fnfe ) {
EVLog.error( "saving individual collection to file " + file + " failed : unable to open file", fnfe );
}
}
COM: <s> saves the individual set to a file </s>
|
funcom_train/15738514 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void gatherOutput() {
try {
Copier errorCopier = new Copier(processErrorStream);
Copier outputCopier = new Copier(processOutputStream);
errorCopier.start();
outputCopier.start();
errorCopier.join();
outputCopier.join();
if (errorCopier.getLines().size() > 0) {
output = new String[errorCopier.getLines().size()];
errorCopier.getLines().copyInto(output);
} else {
output = new String[outputCopier.getLines().size()];
outputCopier.getLines().copyInto(output);
}
} catch (Exception e) {
output = new String[0];
}
}
COM: <s> reads concurrently both the process standard output and standard error </s>
|
funcom_train/29617984 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JList getJUsedSynonymsList() {
if (jUsedSynonymsList == null) {
jUsedSynonymsList = new JList();
jUsedSynonymsList.setFont(MgisLabel.m_font);
UsedSynonymListSelectionListener listener = new UsedSynonymListSelectionListener(jUsedSynonymsList);
jUsedSynonymsList.getSelectionModel().addListSelectionListener(listener);
jUsedSynonymsList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
}
return jUsedSynonymsList;
}
COM: <s> this method initializes j used synonyms list </s>
|
funcom_train/42536567 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o){
if(!(o instanceof ImportCons))return false;
if(o == this)return true;
ImportCons oo = (ImportCons)o;
return (((Object)first).equals(oo.first))&&(((Object)rest).equals(oo.rest));
}
COM: <s> is the given object equal to this import cons </s>
|
funcom_train/10572522 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testOptional() throws Throwable {
LocalAttrUseDocDocument testDoc =
LocalAttrUseDocDocument.Factory.newInstance();
LocalAttrUseT att = testDoc.addNewLocalAttrUseDoc();
assertTrue(!att.isSetLastPasswordUpdate());
att.setLastPasswordUpdate(Calendar.getInstance());
assertTrue(att.isSetLastPasswordUpdate());
}
COM: <s> test that an optional attr is not set before it is set </s>
|
funcom_train/7979223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String map(CandidateURI cauri) {
// get classKey, via frontier to generate if necessary
String classKey = getController().getFrontier().getClassKey(cauri);
SortedMap tail = map.tailMap(classKey);
if(tail.isEmpty()) {
// wraparound
tail = map;
}
// target node is value of nearest subsequent key
return (String) tail.get(tail.firstKey());
}
COM: <s> look up the crawler node name to which the given candidate uri </s>
|
funcom_train/3724442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void copy(Format format) {
super.copy(format);
if (format instanceof SphereFormat) {
sampleCount = ((SphereFormat)format).getSampleCount();
sampleChecksum = ((SphereFormat)format).getSampleChecksum();
optionnalFields.putAll(((SphereFormat)format).getAllOptionnalFields());
}
}
COM: <s> copy the attribute of format on the current format </s>
|
funcom_train/3544376 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadBankTypes(DefaultTreeModel model, DefaultMutableTreeNode rootNode) {
List<Node> bankTypes = null;
try {
bankTypes = FIGate.getBankTypes();
} catch (Exception e) {
Main.generalErrorHandler(e);
return;
}
for (Node node : bankTypes) {
/* New tree node from bank node */
DefaultMutableTreeNode treeNode = new DefaultMutableTreeNode(node);
/* Adding the new node to the tree */
model.insertNodeInto(treeNode, rootNode, rootNode.getChildCount());
}
}
COM: <s> loads bank type list </s>
|
funcom_train/17544251 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Transaction openTransaction() {
try {
FileLock lock = takeLock();
if (lock != null) {
return new Transaction(lock);
}
} catch (IOException e) {
ErrorManager.getDefault().annotate(e, NbBundle.getMessage(JavaMultiViewDataSynchronizer.class,
"START_TRANSACTION_FAILED"));
}
return null;
}
COM: <s> obtains a binary data lock and crates the </s>
|
funcom_train/18103599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void open(String name, int mode, boolean timeouts) throws IOException {
if(name.charAt(0) != '/' || name.charAt(1) != '/') {
throw new IllegalArgumentException("Protocol must start with \"//\" "+name);
}
name = name.substring(2);
URL url = new URL(name);
conn = url.openConnection();
conn.connect();
}
COM: <s> open the http connection </s>
|
funcom_train/38470873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getSUM_BREAK2() {
if (sumBreak2Dirty) {
double aValue = (double) Util.calcDateDifference(Calendar.MINUTE, getBREAK2_START(), getBREAK2_END());
setSUM_BREAK2(aValue);
sumBreak2Dirty = false;
}
return getAsDouble(get(SUM_BREAK2));
}
COM: <s> returns the s um break2 </s>
|
funcom_train/33758302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getFecharButton() {
if (fecharButton == null) {
fecharButton = new JButton();
fecharButton.setBounds(new Rectangle(492, 359, 109, 24));
fecharButton.setText("Close Server");
fecharButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
System.exit(0);
}
});
}
return fecharButton;
}
COM: <s> this method initializes fechar button </s>
|
funcom_train/6492128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writeRtfSuffix() throws IOException {
// close group that encloses the whole list
writeGroupMark(false);
// reset paragraph defaults to make sure list ends
// but pard causes word97 (and sometimes 2000 too) to crash if the list is nested in a table
if(!m_hasTableParent) writeControlWord("pard");
}
COM: <s> end the list group </s>
|
funcom_train/2337297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void maximizeFrame(JInternalFrame f) {
Rectangle p = desktopPane.getScrollPaneRectangle();
f.setNormalBounds(f.getBounds());
setBoundsForFrame(f, p.x, p.y, p.width, p.height);
try {
f.setSelected(true);
} catch (PropertyVetoException pve) {
System.out.println(pve.getMessage());
}
removeIconFor(f);
}
COM: <s> maximizes the internal frame to the viewport bounds rather </s>
|
funcom_train/11733495 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected CheckSchemaOperation createCheckSchemaOperation() {
InputStream in = DatabaseJournal.class.getResourceAsStream(databaseType + ".ddl");
return new CheckSchemaOperation(conHelper, in, schemaObjectPrefix + DEFAULT_JOURNAL_TABLE).addVariableReplacement(
CheckSchemaOperation.SCHEMA_OBJECT_PREFIX_VARIABLE, schemaObjectPrefix);
}
COM: <s> this method is called from </s>
|
funcom_train/18389293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cancelTransfersInDirectory(DirectoryHandle dir) {
for (RemoteSlave rs : getSlaves()) {
try {
for (RemoteTransfer rt : rs.getTransfers()) {
String path = rt.getPathNull();
if (path != null) {
if (path.startsWith(dir.getPath())) {
rt.abort("Directory is nuked");
}
}
}
} catch (SlaveUnavailableException ignore) {
}
}
}
COM: <s> cancels all transfers in directory </s>
|
funcom_train/44657143 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void prepareValueModel(ValueModel valueModel) {
if (valueModel instanceof BufferedValueModel) {
((BufferedValueModel) valueModel).setCommitTrigger(commitTrigger);
}
// If the value model that we were built on is "dirty trackable" then we
// need to monitor it for changes in its dirty state
if (valueModel instanceof DirtyTrackingValueModel) {
((DirtyTrackingValueModel) valueModel).addPropertyChangeListener(DIRTY_PROPERTY, childStateChangeHandler);
}
}
COM: <s> prepare the provided value model for use in this form model </s>
|
funcom_train/28672812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addResourcePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ImportType_resource_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ImportType_resource_feature", "_UI_ImportType_type"),
BeansPackage.Literals.IMPORT_TYPE__RESOURCE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the resource feature </s>
|
funcom_train/16380584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNoOfSelectedTasksPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(new UnsettablePropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ConfigType_noOfSelectedTasks_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ConfigType_noOfSelectedTasks_feature", "_UI_ConfigType_type"),
CTEPackage.Literals.CONFIG_TYPE__NO_OF_SELECTED_TASKS,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the no of selected tasks feature </s>
|
funcom_train/9527836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected DataTable doQuery() {
QueryCriteria queryCriteria = new QueryCriteria(persister);
queryCriteria.addNamedModels(getSelectedNamedModels());
queryCriteria.setQuery(query);
List<DataColumn> dataColumns = getDataColumns();
RdfTable resultRdfTable = Queryer.selectRdfTable(queryCriteria);
log.info(RdfTableWriter.dataTableToString(resultRdfTable));
DataTable resultDataTable = DataTableFactory.createDataTable(resultRdfTable, dataColumns);
setResultDataTable(resultDataTable);
return resultDataTable;
}
COM: <s> do a sparql query and convert results into a learnable data table </s>
|
funcom_train/20775879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector multiply(Vector v) {
Vector r = Vector.getDefault(v.getDimension());
for (int i = 0; i < this.m; i++) {
float s = 0;
for (int j = 0; j < this.n; j++) {
s += this.get(i, j) * v.get(j);
}
r.set(i, s);
}
return r;
}
COM: <s> multiplies the given vector with the matrix </s>
|
funcom_train/10956163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Container getContainer() {
ConfigurationManager mgr = getConfigurationManager();
if (mgr == null) {
throw new IllegalStateException("The configuration manager shouldn't be null");
} else {
Configuration config = mgr.getConfiguration();
if (config == null) {
throw new IllegalStateException("Unable to load configuration");
} else {
return config.getContainer();
}
}
}
COM: <s> expose the dependency injection container </s>
|
funcom_train/33282694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPosY() {
int cumulativeOffset = 0;
Element element = this;
while (element != null) {
cumulativeOffset += element.jsxGet_offsetTop();
if (element != this) {
cumulativeOffset += element.jsxGet_currentStyle().getBorderTop();
}
element = element.getOffsetParent();
}
return cumulativeOffset;
}
COM: <s> returns this elements y position </s>
|
funcom_train/7505987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isBindingCandidate(Object value) {
return (value != null && !value.getClass().isArray() &&
!(value instanceof Collection) &&
!(value instanceof Map) && !ClassUtils.isPrimitiveOrWrapper(
value.getClass()) &&
!(value instanceof CharSequence) && !(value instanceof Number) &&
!(value instanceof Date));
}
COM: <s> determine whether the given value qualifies as a binding candidate </s>
|
funcom_train/12170326 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void renderOpenString(VolantisProtocol protocol, String stringId) throws ProtocolException {
JavaScriptStringAttributes stringAttributes = new JavaScriptStringAttributes();
stringAttributes.setId(stringId);
stringAttributes.setStyles(StylingFactory.getDefaultInstance()
.createInheritedStyles(
protocol.getMarinerPageContext().getStylingEngine().getStyles(),
DisplayKeywords.NONE));
renderWidgetOpen(protocol, stringAttributes);
}
COM: <s> renders the opening of the string element </s>
|
funcom_train/12164959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWriteOpenCanvas() throws Exception {
final CanvasAttributes attributes =
(CanvasAttributes) ProtocolIntegrationTestHelper.
provideAttributes(CanvasAttributes.class);
final VolantisProtocol protocol = getProtocol();
MethodInvoker invoker = new MethodInvoker() {
public void invoke() throws Exception {
protocol.writeOpenCanvas(attributes);
}
};
String expecting = getExpectedWriteOpenCanvasResult();
ProtocolIntegrationTestHelper.doTest(expectations, protocol, invoker, expecting);
}
COM: <s> this method tests the method public void write open canvas </s>
|
funcom_train/24648628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void serialize(OutputStream outputStream) {
try {
if (isUseNTriples()) {
writeNTriples(outputStream);
} else {
writeRdfXml(outputStream);
}
outputStream.flush();
outputStream.close();
} catch (Exception x) {
throw new GeneralException("Error deserializing configuration", x);
}
}
COM: <s> serializes the content of the context to the given output stream </s>
|
funcom_train/36235497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rebuildEmployeePool(){
jTabbedPaneEmployeePool.removeAll();
panEmployeePool = new PanEmployeePool(srvResource,srvTask, srvMediator);
panPlanning.addCalendarViewListener( new CalendarViewListener(this) );
jTabbedPaneEmployeePool.addTab("MitarbeiterPool", null, panEmployeePool, null);
}
COM: <s> update employee pool </s>
|
funcom_train/51413728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refresh(CMMethod baseMeth, int type) {
this.baseMethod = baseMeth;
this.bindingType = type;
arMaps.clear();
//add the default-parameter-mappings
if(baseMeth != null) {
String[] params = baseMeth.getParameters();
for(int i=0; i<params.length; i++)
addParameter(params[i], i);
}
refresh();
firePropertyChange(PROPERTY_DATACHANGE, false, true);
}
COM: <s> refreshes the editor by setting a new basemethod </s>
|
funcom_train/3291467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getCacheNumbers() {
String results="";
for (Enumeration e=nodeCache.elements();e.hasMoreElements();) {
MMObjectNode n=(MMObjectNode)e.nextElement();
if (!results.equals("")) {
results+=","+n.getNumber();
} else {
results+=n.getNumber();
}
}
return results;
}
COM: <s> get the numbers of the nodes cached will be removed </s>
|
funcom_train/7614994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPropertyChangeListener(String propName, PropertyChangeListener l) {
lockAWT();
try {
if (desktopProperties.isEmpty()) {
initializeDesktopProperties();
}
} finally {
unlockAWT();
}
if (l != null) { // there is no guarantee that null listener will not be
// added
desktopPropsSupport.addPropertyChangeListener(propName, l);
}
}
COM: <s> adds the specified property change listener listener for the specified </s>
|
funcom_train/3292439 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean saveFile(String filename,byte[] value) {
File file = new File(filename);
try {
FileOutputStream outputstream = new FileOutputStream(file);
outputstream.write(value);
outputstream.flush();
outputstream.close();
} catch(Exception e) {
e.printStackTrace();
return(false);
}
return(true);
}
COM: <s> save bytearray to filesystem </s>
|
funcom_train/51336811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_close() {
final BTree btree = BTree.createTransient(new IndexMetadata(UUID
.randomUUID()));
assertEquals(0,btree.getEntryCount());
btree.insert("abc", "def");
assertEquals(1, btree.getEntryCount());
btree.close();
// force re-open.
btree.reopen();
assertEquals(0, btree.getEntryCount());
}
COM: <s> verifies that closing a transient </s>
|
funcom_train/805911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectionChanged(SelectionChangedEvent selectionEvent) {
setErrorMessage(null);
setMessage(null);
IStructuredSelection selection = (IStructuredSelection) selectionEvent
.getSelection();
Object selectedObject = selection.isEmpty() ? null : selection
.getFirstElement();
if (selectedObject instanceof IWizardDescriptor) {
if (selectedObject == selectedElement) {
return;
}
updateWizardSelection((IWizardDescriptor) selectedObject);
} else {
selectedElement = null;
canFinishEarly = false;
hasPages = false;
setSelectedNode(null);
updateDescription(null);
}
}
COM: <s> the user selected either new wizard category s or wizard element s </s>
|
funcom_train/3985557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
// When running inside a browser, start() will be called when someone
// returns to a page containing this applet.
// http://dev.processing.org/bugs/show_bug.cgi?id=581
finished = false;
if (thread != null) return;
thread = new Thread(this, "Animation Thread");
thread.start();
}
COM: <s> called by the browser or applet viewer to inform this applet that it </s>
|
funcom_train/40871897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getChildElementXML() {
Element terminateVmElement = new Element(LinkedProcess.TERMINATE_VM_TAG, LinkedProcess.LOP_FARM_NAMESPACE);
if (this.vmId != null) {
terminateVmElement.setAttribute(LinkedProcess.VM_ID_ATTRIBUTE, this.vmId);
}
return LinkedProcess.xmlOut.outputString(terminateVmElement);
}
COM: <s> get the terminate vm component of this iq packet </s>
|
funcom_train/45622833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addFilePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ReadLinesFromFileType_file_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ReadLinesFromFileType_file_feature", "_UI_ReadLinesFromFileType_type"),
MSBPackage.eINSTANCE.getReadLinesFromFileType_File(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the file feature </s>
|
funcom_train/51556406 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getMembers(int gid) {
try {
Vector v = new Vector();
Connection conn = new Connect().connect();
Statement st = conn.createStatement();
String query = "SELECT uid FROM users_groups WHERE gid=" + gid;
ResultSet rs = st.executeQuery(query);
while (rs.next()) {
User u = new User(rs.getInt("uid"));
v.add(u);
}
rs.close();
st.close();
conn.close();
return v;
} catch (Exception ex) {
log.setDescription("Problem while getting members of group " + gid
+ ". " + ex.toString());
log.setLevel("error");
log.add();
return null;
}
}
COM: <s> gets info about every members of group with given id </s>
|
funcom_train/7619994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onStatusChanged(String provider, int status, Bundle extras) {
Log.i(TAG, "Provider " + provider + " status changed to " + status);
if (status == LocationProvider.OUT_OF_SERVICE ||
status == LocationProvider.TEMPORARILY_UNAVAILABLE) {
nativeProviderError(false, nativeObject);
}
}
COM: <s> called when the provider status changes </s>
|
funcom_train/32950933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkCodes(Set<String> codes, String codesStrToCheck, boolean flag) {
boolean checkFlag = flag;
List<String> checkList = Arrays.asList(Pattern.compile(",").split(codesStrToCheck));
for (String check : checkList) {
checkFlag = false;
if (codes.contains(check)) {
checkFlag = true;
break;
}
}
return checkFlag;
}
COM: <s> performs code checking using the codes in clinical finding and the codes defined </s>
|
funcom_train/9922481 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int lastIndexOf(int ch, int fromIndex) {
int min = offset;
char v[] = value;
for (int i = offset + ((fromIndex >= count) ? count - 1 : fromIndex) ; i >= min ; i--) {
if (v[i] == ch) {
return i - offset;
}
}
return -1;
}
COM: <s> returns the index within this string of the last occurrence of the </s>
|
funcom_train/5380101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Control createContents(Composite parent) {
// Allow the wizard to add pages to itself
// Need to call this now so page count is correct
// for determining if next/previous buttons are needed
wizard.addPages();
Control contents = super.createContents(parent);
// Allow the wizard pages to precreate their page controls
createPageControls();
// Show the first page
showStartingPage();
return contents;
}
COM: <s> the code wizard dialog code implementation of this code window code </s>
|
funcom_train/4840279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ActionMapping match(String inputName, String actionName, ActionConfig actionConfig, ActionSelector actionSelector, MatchContext matchContext, PackageConfig packageConfig) {
return new ActionMapping(actionName, packageConfig.getNamespace(), actionSelector.getMethod(), null);
}
COM: <s> always creates a successful match </s>
|
funcom_train/43097796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOrientation(Orientation orientation) {
super.setOrientation(orientation);
Enumeration pps = panels.elements();
while (pps.hasMoreElements()) {
Object o = pps.nextElement();
if (o instanceof Orientable) {
Orientable orientable = (Orientable) o;
orientable.setOrientation(orientation);
}
}
}
COM: <s> set the orientation of the property panel </s>
|
funcom_train/14245193 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MAssociationEnd getAssociationEnd(MClassifier type, MAssociation assoc) {
if (type == null || assoc == null) return null;
Iterator it = type.getAssociationEnds().iterator();
while (it.hasNext()) {
MAssociationEnd end = (MAssociationEnd)it.next();
if (assoc.getConnections().contains(end)) return end;
}
return null;
}
COM: <s> returns the associationend between some classifier type and some associaton assoc </s>
|
funcom_train/35361966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void replaceAll(JTextComponent target, String replacement) {
SyntaxDocument sDoc = ActionUtils.getSyntaxDocument(target);
if (pattern == null || sDoc == null) {
return;
}
Matcher matcher = sDoc.getMatcher(pattern);
String newText = matcher.replaceAll(replacement);
target.setText(newText);
}
COM: <s> perform a replace all operation on the given component </s>
|
funcom_train/13671221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSelectUnCommitedObject() throws Exception {
ODB odb = null;
try {
deleteBase(BASE_NAME);
odb = open(BASE_NAME);
for (int i = 0; i < 4; i++) {
odb.store(new Function("function " + i));
}
odb.close();
// reopen the database
odb = open(BASE_NAME);
// stores a new function
odb.store(new Function("function uncommited"));
Objects functions = odb.getObjects(Function.class);
assertEquals(5, functions.size());
} finally {
if (odb != null) {
odb.close();
deleteBase(BASE_NAME);
}
}
}
COM: <s> test select objects that are not yet commited </s>
|
funcom_train/44880412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean shouldGenerate(Object metadata) {
JavaClass clazz = (JavaClass) metadata;
return !clazz.isInterface() &&
!clazz.isAbstract() &&
clazz.isA("webwork.action.Action") &&
clazz.getTagsByName("webwork.action", true).length > 0;
}
COM: <s> determine whether this metadata is interesting has to be webwork </s>
|
funcom_train/19719088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private OWLOntology loadCache() throws InvalidCacheException {
OWLOntology oCache = null;
if (!fCache.exists())
throw new InvalidCacheException();
try {
oCache = manager.loadOntologyFromOntologyDocument(fCache);
} catch (OWLOntologyAlreadyExistsException e) {
// If the cache already exists, get it
oCache = manager.getOntology(e.getOntologyID().getOntologyIRI());
} catch (OWLOntologyCreationException e) {
// Every other case should result in a failure
throw new InvalidCacheException();
}
return oCache;
}
COM: <s> tries to load the cache ontology into the default ontology manager </s>
|
funcom_train/49076267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int countJobsInQueue(JobScheduler scheduler) throws JobScheduleError {
int numJobs = 0;
List<JobQueueInfo> info = scheduler.getAppliedQueuesInfo();
Iterator<JobQueueInfo> it = info.iterator();
while(it.hasNext()) {
numJobs += it.next().getJobCount();
}
logger.info("num. jobs in scheduler queues: " + numJobs);
return numJobs;
}
COM: <s> prints out number of jobs in the queues monitored by the given scheduler </s>
|
funcom_train/10983234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getFormBean(PageFlowAction action) {
String formMember = action.getFormBeanMember();
try {
if (formMember != null) {
Field field = getClass().getDeclaredField(formMember);
field.setAccessible(true);
return field.get(this);
}
} catch (Exception e) {
_log.error("Could not use member field " + formMember + " as the form bean.", e);
}
return null;
}
COM: <s> get the flow scoped form bean member associated with the given action config </s>
|
funcom_train/22782332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeAll() {
// check if there is something to do
if (content.isEmpty()) {
return false;
}
// synchronization required because of complex operation
synchronized (content) {
// unsuscribe from all contained albums and delete them
for (T element : content) {
element.removeListener(this);
}
// save changes
repository.remove(content);
// clear album set
content.clear();
// inform listeners - fire basementChanged event
getManager().notifyExchange();
// changes have been made
return true;
}
}
COM: <s> clear this library </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.