__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/51616814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveFile() {
if( filename == null || filename.length() == 0 )
saveFileAs();
else {
boolean result = saveFile( this.filename );
if( result ) {
saved = true;
settings.noteFileUsed( this.filename );
} //no unnoting on saves!
}
}
COM: <s> saves the current object with the current filename </s>
|
funcom_train/8813023 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void get(int id, AsyncCallback<E> callback) {
// If the collection is available, returns the entity immediately.
if (hasBeenSet) {
callback.onSuccess(map.get(id));
}
// Else put the callback in queue to be called later.
else {
queueEntity.add(new EntityAsyncCallback<E>(id, callback));
}
}
COM: <s> gets the entity with the given id </s>
|
funcom_train/37434979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initProxy() {
if (proxyHost != null) {
System.setProperty("http.proxySet", "true");
System.setProperty("http.proxyHost", proxyHost);
System.setProperty("http.proxyPort", proxyPort);
}
}
COM: <s> initializes the proxy if defined </s>
|
funcom_train/2425543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(ServerItem userOrGroup, Permissions permissions) {
leftLabel.setText(Strings.get("Permissions.Label.PermissionsFor"));
// TODO: Implement me: rightLabel.setIcon(userOrGroup.getUi().getDefaultIcon());
rightLabel.setText(userOrGroup.getName() + ":");
setPermissions(permissions);
}
COM: <s> updates the permissions displayed in this panel </s>
|
funcom_train/40166087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUser(User user) {
this.user = user;
StringBuffer sb = new StringBuffer();
sb.append(frame.getTitle()).append(" ").append(user.getDisplayName());
frame.setTitle(sb.toString());
frame.setIconImage(user.getIcon().getImage());
}
COM: <s> sets the given user as the active application user </s>
|
funcom_train/36999552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void destroyCloseables(ServletContext ctx) {
List list = closeables;
if (list == null) return;
try {
for (Iterator ii = list.iterator(); ii.hasNext(); ) {
Object c = ii.next();
try {
Method close = c.getClass().getMethod("close", Util.ZERO_PARAM);
close.setAccessible(true);
close.invoke(c, Util.ZERO_ARG);
} catch (Exception e) {
e.printStackTrace();
}
}
} catch (Throwable t) {
t.printStackTrace();
} finally {
closeables.clear();
}
}
COM: <s> only for internal use </s>
|
funcom_train/3830244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GMLCoordinates getCoordinates() {
Debug.debugMethodBegin( this, "getCoordinates()" );
NodeList nl = element.getElementsByTagNameNS( CommonNamespaces.GMLNS, "coordinates" );
GMLCoordinates c = null;
if ( ( nl != null ) && ( nl.getLength() > 0 ) ) {
c = new GMLCoordinates_Impl( (Element)nl.item( 0 ) );
}
Debug.debugMethodEnd();
return c;
}
COM: <s> returns the coordinate location of the point as gmlcoordinates </s>
|
funcom_train/2505293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SSRRoute getReversePath(SSRRouteRequest request) {
List hops = request.getHops();
List reverseHops = new ArrayList();
for (int index = 0; index < hops.size(); index++) {
reverseHops.add(hops.get(hops.size() - index - 1));
}
return new SSRRoute(request.getSource(), reverseHops);
}
COM: <s> creates the reverse path for the specified route to the specified source </s>
|
funcom_train/48210879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SQLColumn createCopy(SQLTable addTo, boolean preserveSource) {
logger.debug("derived instance SQLColumn constructor invocation.");
SQLColumn c = new SQLColumn();
copyProperties(c, this);
c.setParent(addTo);
if (preserveSource) {
c.sourceColumn = getSourceColumn();
}
logger.debug("getDerivedInstance set ref count to 1");
c.referenceCount = 1;
return c;
}
COM: <s> makes a copy of the given source column </s>
|
funcom_train/43130880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Label rot(int v, int i) {
int w,j=0;
int k=0;
// Find the destination vetrex
while (i>=0) {
if (adj_matrix[v][k] != 0)
i--;
k++;
}
w = k-1;
// Find the return edge
for (int c=0; c<v; c++)
if (adj_matrix[w][c] != 0)
j++;
return new Label(w,j);
}
COM: <s> rot v i w j </s>
|
funcom_train/17814576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean reverse() {
if(this.size() !=0) {
Card card = null;
int stop = this.deck.size();
for(int i=0;i<stop;i++) {
card = this.deck.firstElement();
this.deck.remove(card);
this.deck.insertElementAt(card, stop-i-1);
}
return true;
}
return false;
}
COM: <s> reverse the order of cards in the hand </s>
|
funcom_train/28017657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected File getStorageFile(final URL _url, final long _temp) {
String f = _url.getFile();
f = _temp + f.substring(f.lastIndexOf('/') + 1);
final File tf = new File(System.getProperty("java.io.tmpdir"), f);
return tf;
}
COM: <s> get a temproray file based on the url passed in </s>
|
funcom_train/43410057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JPanel getJAddSupplierPanel() {
if (jAddSupplierPanel == null) {
jAddSupplierPanel = new JPanel();
jAddSupplierPanel.setLayout(new BorderLayout());
jAddSupplierPanel.setToolTipText("Add Supplier");
jAddSupplierPanel.add(getJAddSupplierInnerPanel(), java.awt.BorderLayout.CENTER);
}
return jAddSupplierPanel;
}
COM: <s> this method initializes j add supplier panel </s>
|
funcom_train/18586709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean movedThroughClouds(Hexmap m) {
if ((null != getSecondMove()) &&
(Weather.CLOUDY == m.getWeatherAt(getSecondMove()))) {
return true;
} else if ((null != getFirstMove()) &&
(Weather.CLOUDY == m.getWeatherAt(getFirstMove()))) {
return true;
}
return false;
}
COM: <s> tests whether this tf starts moves through or ends its movement in a </s>
|
funcom_train/20624039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getCurrentId(Connection conn, String tableName) throws SQLException {
long id = 0;
String sql = "SELECT @@identity";
Statement stmt = null;
try {
stmt = conn.createStatement();
ResultSet rset = stmt.executeQuery(sql);
if (rset.next()) {
id = rset.getLong(1);
}
} finally {
closeStmt(stmt);
}
return id;
}
COM: <s> returns current id for the identity column of the table </s>
|
funcom_train/804002 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean matches(IMolecule queryMol, BitSet queryPrint) {
try {
if(queryPrint.equals(fingerPrint) && UniversalIsomorphismTester.isIsomorph(mol, queryMol)) return true;
if(isPlural && FingerprinterTool.isSubset(queryPrint, fingerPrint) && UniversalIsomorphismTester.isSubgraph(queryMol, mol)) return true;
} catch (Exception e) {
}
return false;
}
COM: <s> structure identity or is a plural and query is superstructure </s>
|
funcom_train/46403919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void shootAt(BattleField env, Point2d p) {
Vector2d aim = new Vector2d(p.x - position.x, p.y - position.y);
if (currentWeapon != null) {
currentWeapon.shoot(env, enemies, new Point2d(position.x, position.y), aim);
}
}
COM: <s> shoot in a direction with the current carried </s>
|
funcom_train/45251638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void openWebBrowserError(final String href, final Throwable t) {
String title = WorkbenchMessages.ProductInfoDialog_errorTitle;
String msg = NLS.bind(
WorkbenchMessages.ProductInfoDialog_unableToOpenWebBrowser,
href);
IStatus status = WorkbenchPlugin.getStatus(t);
StatusUtil.handleStatus(status, title + ": " + msg, StatusManager.SHOW, //$NON-NLS-1$
getShell());
}
COM: <s> display an error message </s>
|
funcom_train/51638265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean useDoubleQuotedKey() {
if (fStorage == null)
return false;
String name= fStorage.getName();
return name != null && !"about.properties".equals(name) && !"feature.properties".equals(name) && !"plugin.properties".equals(name); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
COM: <s> returns whether we search the key in double quotes or not </s>
|
funcom_train/33233867 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getExpiredMainSI() {
if (expiredMainSI == null) {//GEN-END:|116-getter|0|116-preInit
// write pre-init user code here
expiredMainSI = new StringItem("Expired Cards:", null);//GEN-LINE:|116-getter|1|116-postInit
// write post-init user code here
}//GEN-BEGIN:|116-getter|2|
return expiredMainSI;
}
COM: <s> returns an initiliazed instance of expired main si component </s>
|
funcom_train/22927576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isInNode(JGraphPane graphPane, Node node, JPowerGraphPoint point, int size, double theScale) {
JPowerGraphRectangle nodeScreenRectangle = new JPowerGraphRectangle(0, 0, 0, 0);
getNodeScreenBounds(graphPane, node, size, theScale, nodeScreenRectangle);
return nodeScreenRectangle.contains(point);
}
COM: <s> checks whether given point is inside the node </s>
|
funcom_train/6268907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fetchSettings() {
//localPort = settings.getLocalAudioPort();
activated = appController.getAppSettings().isAudioActivated();
codecs = appController.getCaptureDeviceHandler().getAudioCodecs();
device = appController.getCaptureDeviceHandler().getAudioDevice();
format = appController.getCaptureDeviceHandler().getAudioFormat();
}
COM: <s> retrieves the settings from the app controller </s>
|
funcom_train/3383218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initializeInputMethodSelectionKey() {
AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
// Look in user's tree
Preferences root = Preferences.userRoot();
inputMethodSelectionKey = getInputMethodSelectionKeyStroke(root);
if (inputMethodSelectionKey == null) {
// Look in system's tree
root = Preferences.systemRoot();
inputMethodSelectionKey = getInputMethodSelectionKeyStroke(root);
}
return null;
}
});
}
COM: <s> initializes the input method selection key definition in preference trees </s>
|
funcom_train/45114908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeTextIntoRemoteFile(String title, String fileData, File fileToWriteTo) throws Exception {
fileToWriteTo = getAsRemoteFile(fileToWriteTo);
report.report(title, fileData.replace("\r\n", "<br>").replace("\n", "<br>"), true);
fileToWriteTo.createNewFile();
FileWriter fw = new FileWriter(fileToWriteTo);
fw.write(fileData);
fw.flush();
fw.close();
}
COM: <s> writes the supplied text into a file on the remote machine </s>
|
funcom_train/25361153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void decrementComponentIDs() {
ArrayList<JPDF> jpdf_list = MainMenu.getInstance().getJpdf_data();
int component_id = component.getId();
for (int i = component_id; i < jpdf_list.size(); i++) {
jpdf_list.get(i).setId(jpdf_list.get(i).getId() - 1);
}
}
COM: <s> decrement the jpdf components that has an id greater than this component </s>
|
funcom_train/7980733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void acquireContinuePermission() {
if (singleThreadMode) {
this.singleThreadLock.lock();
if(!singleThreadMode) {
// If changed while waiting, ignore
while(this.singleThreadLock.isHeldByCurrentThread()) {
this.singleThreadLock.unlock();
}
}
} // else, permission is automatic
}
COM: <s> proceed only if allowed giving crawl controller a chance </s>
|
funcom_train/48189626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getUserList() {
pbh.showProgressDialog("Fetching users");
AjaxRequest getRooms = new AjaxRequest();
getRooms.addParameter("f", "onlineUsers");
getRooms.addParameter("roomid", "" + ChatActivity.roomId);
getRooms.setRequestID(AppConstants.REQUEST_ID_USERLIST); // Mark this request, so the return value handler knows what to do with the result
getRooms.execute(requesthandler);
}
COM: <s> requests a list of currently online users in that room </s>
|
funcom_train/3337784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BufferedReader openFileReader(File file) {
BufferedReader ret = null;
if (file.getName().equals("-")) {
ret = new BufferedReader(in, BUFFER_SIZE);
} else {
ret = IOUtils.openBufferedReader(file, BUFFER_SIZE);
if (ret == null) {
err.format(ERR_FILE, file);
}
}
return ret;
}
COM: <s> attempt to open a file reader writing an error message on failure </s>
|
funcom_train/17567779 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFingerprintSDKVersion() {
try {
return
"Fingerprint SDK version " + GrFingerJava.getMajorVersion() + "." + GrFingerJava.getMinorVersion() + "\n" +
"License type is '" + (GrFingerJava.getLicenseType() == GrFingerJava.GRFINGER_JAVA_FULL ? "Identification" : "Verification") + "'.";
} catch (GrFingerJavaException e) {
return null;
}
}
COM: <s> returns a string containing information about the version of fingerprint sdk being used </s>
|
funcom_train/18023906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBorderTitle(String s) {
if (!s.equals(borderTitle)) {
borderTitle = s;
if (hasBorder) {
EtchedBorder etchedBorder = new EtchedBorder();
TitledBorder titledBorder = new TitledBorder(etchedBorder, borderTitle, TitledBorder.LEFT, TitledBorder.TOP);
setBorder(titledBorder);
}
}
}
COM: <s> set the title that is displayed along the top of this panels border </s>
|
funcom_train/45918302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void registerTubelet(TubeletContainer container) throws TubeletContainerException {
assertEquals("Unespected number of tubelets.", 0, container.getTubelets().size() );
container.registerTubelet(tubeletManifest, TestTubelet.class, new PassThroughValidator());
assertEquals("Unespected number of tubelets.", 1, container.getTubelets().size() );
}
COM: <s> registers the test tubelet inside the container </s>
|
funcom_train/14610550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isDirectory() {
if (this.file != null)
return this.file.isDirectory();
if (this.header != null) {
if (this.header.linkFlag == TarHeader.LF_DIR)
return true;
if (this.header.name.toString().endsWith("/"))
return true;
}
return false;
}
COM: <s> return whether or not this entry represents a directory </s>
|
funcom_train/4233704 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean imageHasThumbnail() {
if (channels.size() == 0) {
return false;
}
String channelName = (String)channels.iterator().next();
String thumbnailChannelName = THUMBNAIL_PLUGIN_NAME + "/" + channelName;
Channel thumbnailChannel = rbnbController.getChannel(thumbnailChannelName);
return thumbnailChannel != null;
}
COM: <s> returns true if there is a thumbnail image channel available for this </s>
|
funcom_train/34268644 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object invokeWriteMethod(Object p_aValue, Class<?> p_aValueClass) {
try {
Object[] theParameterList = { p_aValue };
return this.getWriteMethodObject(p_aValueClass).invoke(this.getDomainObject(), theParameterList);
}
catch (Exception e) {
e.printStackTrace();
return null;
}
}
COM: <s> invokes the write method </s>
|
funcom_train/33060479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(){
System.out.print("|");
//setCalculatedValue(3.14159);
try {
calcUpdate();
try {
updateCalculatedValue();
} catch (Exception e) {
System.out.println("exception updating option price: "
+ e.toString());
} // end of try-catch
} catch (Exception f) {
System.out.println("exception in calcUpdating: "
+ f.toString());
} // end of try-catch
}
COM: <s> describe code update code method here </s>
|
funcom_train/46848176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected HashMap getChildNodeIndices(INode parent) {
HashMap indices = new HashMap();
NodeList children = parent.getChildNodes();
int currInd = ((IDOMElement)parent).startTagHTML().length();
for (int i = 0; i < children.getLength(); i++) {
IDOMElement currEl = (IDOMElement)children.item(i);
indices.put(new Integer(currInd), currEl);
currInd += currEl.getOuterHTML().length();
}
return indices;
}
COM: <s> gets a hash map that maps string indices in </s>
|
funcom_train/16080446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStructLink(StructLink sl)
{
if (structLink == null)
{
this.getElement().appendChild(sl.getElement());
}
else
{
this.getElement().replaceChild(sl.getElement(), structLink.getElement());
}
structLink = sl;
}
COM: <s> set the struct link </s>
|
funcom_train/29018325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getAlpha () {
checkWidget ();
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (5, 1)) {
byte [] pbAlpha = new byte [1];
if (OS.GetLayeredWindowAttributes (handle, null, pbAlpha, null)) {
return pbAlpha [0] & 0xFF;
}
}
return 0xFF;
}
COM: <s> returns the receivers alpha value </s>
|
funcom_train/5725706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteBookmarksOfInstitute(final Long instituteId) {
logger.debug("----------> BEGIN method deleteBookmarksOfInstitute <----------");
Validate.notNull(instituteId, "The instituteId cannot be null.");
try {
desktopService2.unlinkAllFromInstitute(instituteId);
} catch (DesktopException de) {
logger.error(de.getMessage());
}
logger.debug("----------> End method deleteBookmarksOfInstitute <----------");
}
COM: <s> delete bookmarks of the given institute from all users </s>
|
funcom_train/40440195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private FileHeaderDTO getFile(Long folderId, String name) throws ObjectNotFoundException {
if (folderId == null)
throw new ObjectNotFoundException("No parent folder specified");
if (StringUtils.isEmpty(name))
throw new ObjectNotFoundException("No file specified");
FileHeader file = dao.getFile(folderId, name);
return file.getDTO();
}
COM: <s> retrieve a file for the specified user that has the specified name and </s>
|
funcom_train/3329763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createBoundPropertyCode(JSourceCode jsc) {
//notify listeners
jsc.add("notifyPropertyChangeListeners(\"");
jsc.append(getName());
jsc.append("\", null, ");
jsc.append(getName());
jsc.append(");");
} //-- createBoundPropertyCode
COM: <s> creates the necessary source code for notifying </s>
|
funcom_train/40615524 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Value createBlob(InputStream x, long length) {
if (x == null) {
return ValueNull.INSTANCE;
}
if (length <= 0) {
length = -1;
}
Value v = session.getDataHandler().getLobStorage().createBlob(x, length);
return v;
}
COM: <s> create a blob value from this input stream </s>
|
funcom_train/50242403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEntityContext(EntityContext ctx) {
this.context = ctx;
if ( theLog.isDebugEnabled() ) {
theLog.debug( "setEntityContext: context set" );
theLog.debug( "setEntityContext: id == " + this.m_memberId );
}
return;
} // setEntityContext(EntityContext)
COM: <s> set the context and primary key of this instance </s>
|
funcom_train/45810241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getNoCharacteristics() {
Collection retur = new ArrayList();
Collection topics = tm.getTopics();
Iterator it = topics.iterator();
while (it.hasNext()) {
TopicIF topic = (TopicIF)it.next();
Collection candidate = topic.getTopicNames();
if (candidate.size() == 0) {
retur.add(topic);
}
}
return retur;
}
COM: <s> returns all topics with no characteristics </s>
|
funcom_train/13535510 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected GraphModelEdit createRemoveAndCellEdit(Object[] cells, Map attributes, String name) {
// Remove from GraphStructure
ConnectionSet cs = ConnectionSet.create(this, cells, true);
// Remove from Group Structure
ParentMap pm = ParentMap.create(this, cells, true, false);
// Construct Edit
GraphModelEdit edit = createEdit(null, cells, attributes, cs, pm, name);
if (edit != null) {
edit.end();
}
return edit;
}
COM: <s> returns an edit that represents a remove and a change </s>
|
funcom_train/16385281 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isMany() {
boolean many = this.getType().getTypeMultiplicity().equals(
EMultiplicity.ZERO_STAR)
|| this.getType().getTypeMultiplicity().equals(
EMultiplicity.ONE_STAR)
|| this.getType().getTypeMultiplicity().equals(
EMultiplicity.STAR);
return many;
}
COM: <s> return true if this has multiplicity anything other than single </s>
|
funcom_train/25811238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startShrink(SpriteState sprite, int numFrames) {
if (sprite == null || numFrames <= 0) return;
AnimData data = beginPrepare(sprite);
data.mNext = mCounter;
data.xDeltaX = (1<<16) / numFrames;
data.mNumFrames = numFrames;
synchronized(sprite) {
sprite.setZoomXY(1<<16);
endPrepare(sprite, AnimType.SHRINK, data);
}
}
COM: <s> starts a shrinking zoom animation </s>
|
funcom_train/5730307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateAndFindNewestWikiSite() {
final WikiSiteContentInfo wikiSite = createDefaultWikiSiteContentInfo();
wikiService.saveWikiSite(wikiSite);
assertNotNull(wikiSite.getId());
assertNotNull(wikiSite.getWikiSiteId());
final WikiSiteContentInfo newestWikiSite = wikiService.getNewestWikiSiteContent(wikiSite.getWikiSiteId());
assertEquals(wikiSite, newestWikiSite);
}
COM: <s> tests the creation storage and selection of the newest version of </s>
|
funcom_train/9139757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readFieldsMinusArray(DataInput arg0) throws IOException {
arraylength = arg0.readInt();
Map = arg0.readUTF();
Run = arg0.readInt();
DocumentFreq = arg0.readInt();
TermFreq = arg0.readInt();
array = new byte[1];
//System.err.println("DEBUG: Finished Read, ArrayL:"+arraylength+" RunNo:"+Run+" DocF:"+DocumentFreq+" TermF:"+TermFreq+" Buffer:"+array.toString());
}
COM: <s> reads this object from the input stream in apart from the </s>
|
funcom_train/22359448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeUnits(Collection<Unit> units) throws IOException {
if (units == null)
return;
List<Unit> sorted = new ArrayList<Unit>(units);
Comparator<Unit> sortIndexComparator = new SortIndexComparator<Unit>(IDComparator.DEFAULT);
Collections.sort(sorted, sortIndexComparator);
for (Unit u : sorted) {
writeUnit(u);
}
}
COM: <s> write a sequence of unit einheit blocks to the underlying stream </s>
|
funcom_train/11752269 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getDao(Class daoType) {
Object dao = daosByType.get(daoType);
if (dao == null) {
throw new IllegalStateException("No DAO registered for " + daoType);
}
if (!(daoType.isAssignableFrom(dao.getClass()))) {
throw new IllegalStateException("Invalid DAO type registered for " + daoType);
}
return dao;
}
COM: <s> returns a dao instance registered for a given type </s>
|
funcom_train/169292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isFavourite(int teamId) {
String query = "select * from TEAMANALYZER_FAVORITES where TEAMID=" + teamId;
ResultSet rs = Commons.getModel().getAdapter().executeQuery(query);
try {
if (rs.next()) {
return true;
}
} catch (SQLException e) {
// do Nothing
}
return false;
}
COM: <s> check if a team is a favourite team </s>
|
funcom_train/2585383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConstructor() {
DefaultBoxAndWhiskerCategoryDataset dataset
= new DefaultBoxAndWhiskerCategoryDataset();
assertEquals(0, dataset.getColumnCount());
assertEquals(0, dataset.getRowCount());
assertTrue(Double.isNaN(dataset.getRangeLowerBound(false)));
assertTrue(Double.isNaN(dataset.getRangeUpperBound(false)));
}
COM: <s> some basic checks for the constructor </s>
|
funcom_train/8078641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void selectSubSample(Instances data)throws Exception{
m_SplitFilter = new RemoveRange();
m_SubSample = data;
m_SplitFilter.setInputFormat(m_SubSample);
m_SplitFilter.setInstancesIndices(selectIndices(m_SubSample));
m_SubSample = Filter.useFilter(m_SubSample, m_SplitFilter);
}
COM: <s> produces a random sample from m data </s>
|
funcom_train/40615205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SearchRow getSearchRow(Row row) {
SearchRow r = table.getTemplateSimpleRow(columns.length == 1);
r.setKeyAndVersion(row);
for (Column c : columns) {
int idx = c.getColumnId();
r.setValue(idx, row.getValue(idx));
}
return r;
}
COM: <s> create a search row for this row </s>
|
funcom_train/12781331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void leaveBlockExprAssignOp(CAstNode n, CAstNode v, CAstNode a, boolean pre, C c, CAstVisitor<C> visitor) {
delegate.leaveBlockExprAssignOp(n, v, a, pre, c, visitor);
}
COM: <s> visit a block expr op assignment node after visiting the lhs </s>
|
funcom_train/36519751 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPredicate(Term t) {
try {
Class clazz = engine.pcl.loadPredicateClass(
"jp.ac.kobe_u.cs.prolog.builtin", "call", 1, true);
Term[] args = { engine.copy(t) };
code = (Predicate) clazz.newInstance();
code.setArgument(args, new Success(this));
} catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> sets a goal code call t code to this prolog thread </s>
|
funcom_train/882299 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void afterPropertiesSet() throws Exception {
try {
Class.forName(getClassName());
} catch (NullPointerException ex) {
throw new MisconfigurationException("No converter specified for " + //$NON-NLS-1$
getName());
} catch (ClassNotFoundException ex) {
throw new MisconfigurationException("Specified converter " + //$NON-NLS-1$
getClassName() + " not found for " + getName()); //$NON-NLS-1$
}
}
COM: <s> checks the bean for inconsistencies </s>
|
funcom_train/49006125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendException( String message, Throwable ex ) {
try {
sendCode( HTTPResponseCode.SERVER_ERROR_FATAL );
sendContentType( MimeType.TEXT );
println();
println( message );
println();
PrintWriter pw = new PrintWriter( writer );
ex.printStackTrace( pw );
pw.flush();
println();
close();
} catch( Exception ignored ) {}
}
COM: <s> send an exception back to the client any exceptions are suppressed </s>
|
funcom_train/46934620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void destroy() {
if (pool != null) {
if (log.isDebugEnabled()) {
log.debug("X-Hive: Destroy session-pool");
}
while (!pool.empty()) {
XhiveSessionIf session = pool.pop();
session.join();
if (session.isOpen()) {
session.rollback();
}
if (session.isConnected()) {
session.disconnect();
}
if (session.isJoined()) {
session.leave();
}
session.terminate();
}
}
pool = null;
if ( driver != null ) {
driver.close();
}
}
COM: <s> clean up the session pool </s>
|
funcom_train/49791709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getFileExtension(EObject target) {
if (target instanceof ActivityPredicate) {
return "iaml_condition";
}
if (target instanceof DomainIterator) {
return "iaml_iterator";
}
if (target instanceof DomainType) {
return "iaml_schema";
}
if (target instanceof LoginHandler) {
return "iaml_login_handler";
}
if (target instanceof AccessControlHandler) {
return "iaml_access_handler";
}
if (target instanceof ActivityOperation) {
return "iaml_operation";
}
if (target instanceof VisibleThing) {
return "iaml_visual";
}
// must return null if none is found
return null;
}
COM: <s> get the file extension for the given eobject </s>
|
funcom_train/49631660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUserColor(String color) {
Map<String, UserPreference> preferences = getPreferences();
UserPreference up = preferences.get("userColor");
if (null == up) {
up = new UserPreference(getEntity(), "userColor");
preferences.put("userColor", up);
}
up.setValue(color);
//StaticDAO.saveOrUpdate(up);
}
COM: <s> if the underlying code user code is persistent this </s>
|
funcom_train/42199649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Double getCoefficientAtIndex(int index) throws RuntimeException {
if(index >= this.coefficients.size()) {
throw new RuntimeException(MessageFormat.format(MSG_ERROR_INDEX_OUT_OF_RANGE, index, this.coefficients.size()));
}
return this.coefficients.get(index);
}
COM: <s> gets the coefficient at the given index </s>
|
funcom_train/2920051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkAllRulesForUselessLabels() {
if ( type==LEXER ) {
return;
}
Set rules = nameToRuleMap.keySet();
for (Iterator it = rules.iterator(); it.hasNext();) {
String ruleName = (String) it.next();
Rule r = getRule(ruleName);
removeUselessLabels(r.getRuleLabels());
removeUselessLabels(r.getRuleListLabels());
}
}
COM: <s> remove all labels on rule refs whose target rules have no return value </s>
|
funcom_train/32040539 | /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
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ExtendType_schema_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ExtendType_schema_feature", "_UI_ExtendType_type"),
ImsldPackage.eINSTANCE.getExtendType_Schema(),
true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the schema feature </s>
|
funcom_train/18807993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDateConstructor1() {
final TimeZone zone = TimeZone.getTimeZone("GMT");
final Hour h1 = new Hour(new Date(1014307199999L), zone);
final Hour h2 = new Hour(new Date(1014307200000L), zone);
assertEquals(15, h1.getHour());
assertEquals(1014307199999L, h1.getLastMillisecond(zone));
assertEquals(16, h2.getHour());
assertEquals(1014307200000L, h2.getFirstMillisecond(zone));
}
COM: <s> in gmt the 4pm on 21 mar 2002 is java </s>
|
funcom_train/46570135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int childCount() {
int count = 0;
for (int i = 0; i < domNode.getChildNodes().getLength(); i++) {
Node node = domNode.getChildNodes().item(i);
if (node.getNodeType() == Node.ELEMENT_NODE)
{
++count;
}
}
return count;
}
COM: <s> returns the number of children of this </s>
|
funcom_train/42464346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean fileExists(int type, String fileName) {
boolean exists = false;
try {
FileConnection fc = (FileConnection)
Connector.open("file:///" + getDir(type) + fileName);
exists = fc.exists();
fc.close();
}
catch (IOException e) {
log("fileExists", e.toString());
}
return exists;
}
COM: <s> check whether a file exists on the file system </s>
|
funcom_train/7602173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Panel getPnlInput() {
if (pnlInput == null) {
pnlInput = new Panel();
pnlInput.setLayout(new BoxLayout(getPnlInput(), BoxLayout.X_AXIS));
pnlInput.setMinimumSize(new Dimension(200, 100));
pnlInput.setPreferredSize(new Dimension(200, 100));
pnlInput.add(getTfInput(), null);
}
return pnlInput;
}
COM: <s> this method initializes pnl input </s>
|
funcom_train/20310128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void translateInstanceRole( Element expr, Individual ind, OntProperty p, Individual obj) {
Element related = addElement( expr, DIGProfile.RELATED );
addNamedElement( related, DIGProfile.INDIVIDUAL, getResourceID( ind ) );
addNamedElement( related, DIGProfile.RATOM, p.getURI() );
addNamedElement( related, DIGProfile.INDIVIDUAL, getResourceID( obj ) );
}
COM: <s> translate an object property into a dig related element </s>
|
funcom_train/32791199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleLogXor(String codeSrcExp, List<String> args, StringBuffer rule, StringBuffer spec) {
assert(args.size() == 1) : "Logical expression xor needs exactly one argument";
codeAgent.setArgument("rel_exp_1", codeSrcExp);
codeAgent.setArgument("rel_exp_2", args.get(0));
rule.append("logical_expression_tail");
spec.append("xor");
}
COM: <s> parameterizes the code agent for a logical xor operation </s>
|
funcom_train/13258415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean canBeEnabled() {
boolean canBeEnabled = true;
Vector classes = cd.getClassKeys();
Vector stations = sd.getStationKeys();
if ((classes.size() == 0) || (stations.size() == 0) || (getRunnableParametricAnalysis().length == 0)) {
canBeEnabled = false;
}
return canBeEnabled;
}
COM: <s> checks if at least one parametric simulation is avaible </s>
|
funcom_train/3312680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void replaceCover(Cover old, Cover newC){
CDCover temp = null;
for(int i= 0; i<covers.length;i++){
if(covers[i]==old){
covers[i]=newC;
}
}
for(int i= 0; i<getComponentCount();i++){
if(getComponent(i) instanceof CDCover){
if(((CDCover)getComponent(i)).getDrawingPane().getCover() == old)
temp=(CDCover)getComponent(i);
}
}
temp.replaceCover(newC);
old.destroyMe();
}
COM: <s> replaces the old cover with the new one and draws the pane anew </s>
|
funcom_train/7514836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isLoadedRight(){
return !(NUMBER_OF_ROWS == -1 || NUMBER_OF_COLUMNS == -1 ||
POWERUP_TIME_LIMIT == -1 || POWER_PELLET_SCORE == -1 ||
POWER_UP_SCORE == -1 || GHOST_SCORE == -1 ||
GHOSTS_START_POINT == null || PACMAN_START_POINT == -1 ||
map == null || PACMAN_MAX_LIVES == -1);
}
COM: <s> check to see if maze is loaded completely </s>
|
funcom_train/43245041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetEmploymentStatusOptions() throws Exception {
System.out.println("getEmploymentStatusOptions");
String securitytoken = secToken;
org.vistaoutreach.voe.refdata.ws.RefDataServicesImpl instance = new org.vistaoutreach.voe.refdata.ws.RefDataServicesImpl();
String[] expResult = null;
String[] result = instance.getEmploymentStatusOptions(securitytoken);
assertTrue(result.length>0);
}
COM: <s> test of get employment status options method of class org </s>
|
funcom_train/4923313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInvalidateAndImmediatelyCreateNewSession() throws Throwable {
// Record
this.record_instantiate();
this.record_invalidate_sessionInvalidated();
this.record_generate_setSessionId(NEW_SESSION_ID);
this.record_create_sessionCreated(NEW_CREATION_TIME, EXPIRE_TIME,
newAttributes());
this.record_cookie_addSessionId(true, NEW_SESSION_ID, EXPIRE_TIME);
// Invalidate
this.replayMockObjects();
HttpSessionAdministration admin = this
.createHttpSessionAdministration();
admin.invalidate(true);
this.verifyFunctionality(admin, true);
}
COM: <s> ensure can invalidate the </s>
|
funcom_train/2844913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getAnnPaths() {
//itterate over children
List paths = new ArrayList();
for (int ci=0;ci<children.size();ci++) {
paths.add(((ProjectItem) children.get(ci)).getFilePath());
}
return(paths);
}
COM: <s> provides a list of paths to annotated files for this item </s>
|
funcom_train/4352098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object cut() {
Object obj = copy();
HashMap <Drawable, Boolean> mapa = new HashMap<Drawable, Boolean>();
for (Focusable focusable : getFocusedObjects()) {
mapa.put(focusable, true);
getModel().removeElement(focusable);
}
if (diagram.getUndoManager() != null)
diagram.getUndoManager().addEdit(new EditDeleteDrawables(diagram, mapa));
clearFocusedObjects();
return obj;
}
COM: <s> cuts the currently focused objects </s>
|
funcom_train/17670491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPathForNode(NodeGeneric ng) {
String type = "file";
if (ng instanceof NodeDirectory) {
type = "directory";
}
String absPath = ng.absolutePath;
if (absPath == null) {
log.error("Legacy xml! AbsolutePath missing for node!");
}
return "//" + type + "[@absolutePath=\"" + absPath + "\"]";
}
COM: <s> generates a unique xpath locator from the given node </s>
|
funcom_train/27747262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove (int index) {
checkWidget();
if (!(0 <= index && index < getItemCount ())) {
error (SWT.ERROR_ITEM_NOT_REMOVED);
}
String [] oldItems = getItems ();
String [] newItems = new String [oldItems.length - 1];
System.arraycopy (oldItems, 0, newItems, 0, index);
System.arraycopy (oldItems, index + 1, newItems, index, oldItems.length - index - 1);
setItems (newItems);
}
COM: <s> removes the item from the receivers list at the given </s>
|
funcom_train/31478076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream getInputStream() {
try {
return new FileInputStream(getFile(FOR_READING));
} catch (Exception e) {
ResourceManager.getInstance().logException("In Resource.getInputStream(): ", e);
ResourceManager.getInstance().exit(ERROR_FILE_NOT_FOUND,
"Resource '"+name+"' could not be loaded.");
return null;
}
}
COM: <s> returns an input stream for this resource </s>
|
funcom_train/549930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stateChange(StateEvent evt) {
JComponent r = getDeviceRenderer(getDeviceAlias(command.getDevice()));
if (r == null)
return;
r.setBackground(ATKConstant.getColor4State(evt.getState()));
r.setToolTipText(evt.getState());
fireTableRowsUpdated(row, row);
}
COM: <s> changes the state of this listener according a </s>
|
funcom_train/36489685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setActionOnAdministrator(UCController uc) {
ActionListener[] l = adminButton.getActionListeners();
if (l.length > MIN_LISTENERS) {
adminButton.removeActionListener(l[MIN_LISTENERS]);
}
adminButton.addActionListener(new UCCToALAdapter(uc));
}
COM: <s> adds an action listener to the adminstrator button to use a use case </s>
|
funcom_train/47021260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCmdExit() {
if (cmdExit == null) {//GEN-END:|123-getter|0|123-preInit
// write pre-init user code here
cmdExit = new Command(getLocalizedString("Exit"), Command.OK, 20);//GEN-LINE:|123-getter|1|123-postInit
// write post-init user code here
}//GEN-BEGIN:|123-getter|2|
return cmdExit;
}
COM: <s> returns an initiliazed instance of cmd exit component </s>
|
funcom_train/17047535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getParsedText() {
if (_parsedText == null && endState != null) {
String fullText = endState.getData().getInputToken().getTokenizer().getText();
_parsedText = fullText.substring(getStartIndex(), getEndIndex());
}
return _parsedText;
}
COM: <s> the original text used to generate this parse </s>
|
funcom_train/6439920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPassword() {
if (propCMPrj.getProperty(CM_PASSWORD, "").equals("")) {
return null;
}
else {
try {
return SimpleCode.decode(propCMPrj.getProperty(CM_PASSWORD));
}
catch (IllegalArgumentException e) {
return null;
}
}
}
COM: <s> getter stored encoded property </s>
|
funcom_train/17668426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setImports(ICompilationUnit unit) {
imports = "";
try {
IImportDeclaration[] classImports = unit.getImports();
for (IImportDeclaration im : classImports) {
if (!(im.getElementName().startsWith("org.eclipse.jconqurr.")))
imports = imports + "import " + im.getElementName() + ";\n";
}
} catch (JavaModelException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
COM: <s> sets the imports </s>
|
funcom_train/15488483 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSize() {
if(size == -1) {
Variable[] fields = getVariables();
int maxsz = 0;
for(int i = 0; i < fields.length; i++) {
ZField f = (ZField) fields[i];
int sz = f.getOffset() + f.getType().getSize();
if(sz > maxsz)
maxsz = sz;
}
return maxsz;
} else {
return size;
}
}
COM: <s> gets size of an instance of this class in bytes </s>
|
funcom_train/38858964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getSlope() {
Double cs = this.cachedSlope;
if(cs == null) {
SimpleRegression regression = new SimpleRegression();
Map<YearMonth,Double> seriesMap = this.seriesMap;
for(YearMonth key : seriesMap.keySet()) {
double x = key.getYear() * 12 + key.getMonth();
double y = seriesMap.get(key);
// y is never NaN
regression.addData(x, y);
}
cs = regression.getSlope();
this.cachedSlope = cs;
}
return cs.doubleValue();
}
COM: <s> calculates the monthly slope of the series </s>
|
funcom_train/45716065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public YtemDefOJ setYtemDef(int index, YtemDefOJ newYtemDef) {
YtemDefOJ old_ytemDef = (YtemDefOJ) ytemDefList.get(index);
ytemDefList.set(index, newYtemDef);
newYtemDef.setParent(this);
changed = true;
return old_ytemDef;
}
COM: <s> replace old ytem def by new one and set new ytem defs parent </s>
|
funcom_train/11751463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPairs3() throws Exception {
startTest("pairs3");
assertContents("org/apache/cayenne/testdo/testmap/Artist.java", "Artist", "org.apache.cayenne.testdo.testmap",
"_Artist");
assertContents("org/apache/cayenne/testdo/testmap/superart/_Artist.java", "_Artist",
"org.apache.cayenne.testdo.testmap.superart", "CayenneDataObject");
}
COM: <s> test pairs generation including full package path with superclass and </s>
|
funcom_train/25963335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cursor fetchAllNotes() {
return mDb.query(DATABASE_TABLE, new String[] {
ScoreList.ScoreColumns._ID,
ScoreList.ScoreColumns.PUZZLE_ID,
ScoreList.ScoreColumns.SCORE,
ScoreList.ScoreColumns.WIDTH,
ScoreList.ScoreColumns.HEIGHT,
ScoreList.ScoreColumns.CREATED_DATE,
ScoreList.ScoreColumns.MODIFIED_DATE
}, null, null, null, null, null);
}
COM: <s> return a cursor over the list of all notes in the database </s>
|
funcom_train/28308494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setContent(Container container, String message, ContainerStatus status, Object content)throws Exception {
if (storeResultInAttribute != null) {
container.setAttribute(storeResultInAttribute, content);
addLogEntry(container, message + ", stored in attribute " + storeResultInAttribute, status);
}
else {
container.setContent(content, new ContainerLogEntry(getName(), message, status));
}
}
COM: <s> sets the content of the container </s>
|
funcom_train/49262314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void configureOptions() {
boolean isRegex = chkRegex.getSelection();
chkWholeWord.setEnabled(!isRegex);
chkIncremental.setEnabled(!isRegex);
FindReplacePreference preference = FindReplacePreference.getInstance();
preference.setCaseSensitive(chkCaseSensitive.getSelection());
preference.setWrap(chkWrap.getSelection());
preference.setWholeWord(chkWholeWord.getSelection());
preference.setIncremental(chkIncremental.getSelection());
preference.setRegex(chkRegex.getSelection());
}
COM: <s> configure option buttons </s>
|
funcom_train/4659547 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void evaluateParams(UIBean uiBean) {
populateCallbackName(uiBean);
populateMethod(uiBean);
if (formId != null) {
uiBean.addParameter("formId", eval.evaluateExpression(formId));
}
if (href != null) {
uiBean.addParameter("href", eval.evaluateExpression(href));
}
}
COM: <s> adds the common xhr parameters to the uibean </s>
|
funcom_train/34571535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DummyObject (DummyObject d) {
this.x = d.x; this.y = d.y; this.w = d.w; this.h= d.h; this.name = d.name;
this.picX = d.picX; this.picY = d.picY; this.picW = d.picW; this.picH= d.picH; this.pic = d.pic;
this.additionalData = d.additionalData;
}
COM: <s> use to clone a dummyobject </s>
|
funcom_train/26315955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setModes(String[] modes) {
assert ((modes != null) && (modes.length >= 0)) : "List of modes must not be null or empty";
Vector<EquipmentMode> newModes = new Vector<EquipmentMode>(modes.length);
for (String mode : modes) {
newModes.addElement(EquipmentMode.getMode(mode));
}
this.modes = newModes;
}
COM: <s> sets the modes that this type of equipment can be in </s>
|
funcom_train/22232953 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRasterOpEnable(boolean rasterOpEnable) {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_RASTER_OP_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("RenderingAttributes10"));
if (isLive())
((RenderingAttributesRetained)this.retained).setRasterOpEnable(rasterOpEnable);
else
((RenderingAttributesRetained)this.retained).initRasterOpEnable(rasterOpEnable);
}
COM: <s> sets the raster op enable flag for this rendering attributes </s>
|
funcom_train/130146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getMapInformation () {
try {
sendHeader (PLAYER_MSGTYPE_REQ, 1); /* 1 byte payload */
os.writeByte (PLAYER_MAP_GET_INFO_REQ);
os.flush ();
} catch (Exception e) {
System.err.println ("[Map] : Couldn't send PLAYER_MAP_GET_INFO_REQ " +
"command: " + e.toString ());
}
}
COM: <s> configuration request get map information </s>
|
funcom_train/19423998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void logTrace(HttpServletRequest req, Object message, Throwable t) {
Object enhancedMessage = enhanceMessage(req, message);
if (log != null) {
if (t == null) {
log.trace(enhancedMessage);
} else {
log.trace(enhancedMessage, t);
}
} else {
System.out.println("Trace: " + enhancedMessage);
}
}
COM: <s> log an error with trace log level </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.