__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/2876896 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Set sfGetTags(Object attribName, Object node) throws SmartFrogRuntimeException, RemoteException {
Set tags = null;
if (node instanceof Prim) {
tags = ((Prim) node).sfGetTags(attribName);
} else if (node instanceof ComponentDescription) {
tags = ((ComponentDescription) node).sfGetTags(attribName);
}
return tags;
}
COM: <s> get tags for an attribute </s>
|
funcom_train/44533516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPath() {
String path = "";
if (this.projectDir != null)
path += this.projectDir + fileSeparator;
if (this.componentDir != null)
path += this.componentDir + fileSeparator;
if ((this.productDir != null) &&
!(this.file.startsWith(InvictaConstants.FILE_SEPARATOR)))
path += this.productDir + fileSeparator;
path += this.file;
return cleanPath(path);
}
COM: <s> returns the path of the file of this product </s>
|
funcom_train/28749676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAcctnumber(String newVal) {
if ((newVal != null && this.acctnumber != null && (newVal.compareTo(this.acctnumber) == 0)) ||
(newVal == null && this.acctnumber == null && acctnumber_is_initialized)) {
return;
}
this.acctnumber = newVal;
acctnumber_is_modified = true;
acctnumber_is_initialized = true;
}
COM: <s> setter method for acctnumber </s>
|
funcom_train/3921457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCanCopyElement() {
LearningDesign ld = new LearningDesign();
assertFalse("Should not be able to Copy Element", ld.canCopyElement(new Element("anything")));
assertFalse("Should not be able to Copy Element",
ld.canCopyElement(new Element("item", LD_EditorHandler.IMSLD_NAMESPACE_10)));
}
COM: <s> just a simple test until learning design class supports copy cut and paste </s>
|
funcom_train/18486901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWebContext(String context) {
try {
if (context == null || context.equals("")) {
throw new Exception(
"Invalid web context, should have at least one letter");
}
this.webContext = context;
} catch (Exception ex) {
outError.fireOutPin("" + JavaUtils.stackToString(ex));
}
}
COM: <s> set web application context name </s>
|
funcom_train/37571604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addFiling(LxmlFiling filing) throws SOAPException {
if (filing.getContent() == null)
throw new NullPointerException("An SOAPMessageWrapper cannot attach an LxmlFiling with no content.");
addAttachment(new DataHandler(filing.getContent(), "text/plain"), "text/xml",
Constants.FILING_ATTACHMENT_ID);
}
COM: <s> add the xml content of filing as an attachement </s>
|
funcom_train/13392397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void defineAll(Map map) {
capabilities.putAll(map);
for (Enumeration en = capabilities.keys(); en.hasMoreElements();) {
Object key = en.nextElement();
if (key instanceof String && key.equals(DESCRIPTION)) {
description = capabilities.get(key).toString();
}
}
}
COM: <s> define all platform capability mappings to the platform capability map </s>
|
funcom_train/46730111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ApplicationViewModel getAppView(BaseAction action) throws Exception {
// action initiated from a drop down display model list
if (action.hasValue() && action.getValue() instanceof DisplayModel) {
DisplayModel appViewForId = (DisplayModel) action.getValue();
ApplicationViewModel view = SecurityService.getApplicationView(appViewForId.getId());
return view;
} else {
return new ApplicationViewModel();
}
}
COM: <s> check the action for containing a list of application views </s>
|
funcom_train/51714583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanelApplication() {
if (jPanelApplication == null) {
GridBagConstraints gridBagConstraints6 = new GridBagConstraints();
gridBagConstraints6.gridx = 0;
gridBagConstraints6.gridy = 0;
jPanelApplication = new JPanel();
jPanelApplication.setLayout(new GridBagLayout());
jPanelApplication.setSize(new Dimension(169, 107));
jPanelApplication.add(getJCheckBoxOption1(), gridBagConstraints6);
}
return jPanelApplication;
}
COM: <s> this method initializes j panel application </s>
|
funcom_train/2329481 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public VectorSize readVectorSize(VectorInfo info) throws IOException {
// Always read the vector size
int size = getInt();
// For coordinate vectors we also read the number of entries
if (info.isDense())
return new VectorSize(size);
else {
int numEntries = getInt();
return new VectorSize(size, numEntries);
}
}
COM: <s> reads in the size of a vector </s>
|
funcom_train/37443942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSelectedLocale() {
final Locale locale = getLocale();
for (int i = 0; i < availableLocales.length; i++) {
if (locale.equals(availableLocales[i])) {
return Integer.toString(i);
}
}
LOGGER.info("getSelectedLocale():returned null");
return null;
}
COM: <s> determines the index of the current locale </s>
|
funcom_train/18105059 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void activate(MIDletEventListener l, MIDlet m) {
Display d = getDisplay(m);
DisplayAccess da = d.accessor;
synchronized (displays) {
if (displays.indexOf(da) != -1) {
// do not allow duplicates
return;
}
d.midletEventListener = l;
displays.addElement(da);
notifyWantsForeground(da, da.wantsForeground());
}
}
COM: <s> places the display of the given midlet in the list of active </s>
|
funcom_train/18548566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(TransferObject to, Connection c) throws DataAccessException {
PreparedStatement pstmt = null;
try {
ResourceTO rto = (ResourceTO)to;
pstmt = c.prepareStatement("delete from resource where id=? and project_id=?");
pstmt.setString(1, rto.getId());
pstmt.setString(2, rto.getProject().getId());
pstmt.executeUpdate();
} catch (SQLException e) {
throw new DataAccessException(e);
}finally{
super.closeStatement(null, pstmt);
}
}
COM: <s> remove a resource from data base related with project id </s>
|
funcom_train/18756730 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MerlotDOMNode getNodeForPath(TreePath tp) {
MerlotDOMNode node = null;
Object n = tp.getLastPathComponent();
if (n instanceof MerlotDOMNode) {
node = (MerlotDOMNode) n;
} else {
MerlotDebug.msg("unknown tree node object type: " + n);
}
return node;
}
COM: <s> gets the node for path attribute of the xmleditor doc ui object </s>
|
funcom_train/22360733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void eatWhiteSpace() throws IOException {
int c = 0;
while ((c = in.read()) != -1) {
if ((c != ' ') && (c != '\t')) {
in.unread(c);
break;
}
}
eos = c == -1;
}
COM: <s> consumes the stream up the next non whitespace character </s>
|
funcom_train/17787235 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCacheType(String sessionID, int cacheType) {
if (!clientSessionTargets.containsKey(sessionID)) {
throw new IllegalArgumentException("There is none session with the id \""
+ sessionID + "\"");
}
clientSessionTargets.get(sessionID).setCacheDescriptorType(cacheType);
}
COM: <s> obs this method must be replaced by the </s>
|
funcom_train/34566801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private FTExpr ftOr(final boolean prg) throws QueryException {
final FTExpr e = ftAnd(prg);
if(!consumeWS(FTOR)) return e;
FTExpr[] list = { e };
do list = Array.add(list, ftAnd(prg)); while(consumeWS(FTOR));
return new FTOr(list);
}
COM: <s> ft145 parses ftor </s>
|
funcom_train/34589613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void notifyInstanceControllers(NodeServerEvent e, InstanceStatus status) {
for (Map<String, InstanceController> map : controllers.values()) {
if (map.containsKey(e.getServer())) {
map.get(e.getServer()).onStatusEvent(e, status);
}
}
}
COM: <s> notify all instance controllers about a server status event </s>
|
funcom_train/25179754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void serialize() throws IdealizeUnavailableResourceException {
ObjectOutputStream out = null;
try {
out = new ObjectOutputStream(new FileOutputStream(
this.serializableFileName));
out.writeObject(t);
out.flush();
out.close();
} catch (FileNotFoundException e) {
throw new IdealizeUnavailableResourceException(
"StorableRecommender: serialize(): could not find "
+ this.serializableFileName, e);
} catch (IOException e) {
throw new IdealizeUnavailableResourceException(
"StorableRecommender: serialize(): could not record object "
+ this.serializableFileName, e);
}
}
COM: <s> serialize object to disc </s>
|
funcom_train/43615703 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getVotes(int id, int index){
String query = "SELECT `votes" + index +"` FROM `poll` WHERE `id`="+id+" LIMIT 0 , 1";
runquery(query);
int result = 0;
try{ result = rs.getInt("votes"+index); }
catch(SQLException e){ e.printStackTrace(); }
return result;
}
COM: <s> retrives number of votes for index choice of id poll </s>
|
funcom_train/23182824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initModules() {
if (serialActive) {
if (this.serialReplicationActive) {
this.startSerial(serialProfile, replicationProfile);
} else {
this.startSerial(serialProfile, null);
}
}
if (kmlServerActive) {
this.startKMLServer(this.kmlProfile);
}
if (shipPlotterActive) {
this.startShipPlotterTask(shipPlotterProfile);
}
if (networkClientActive) {
this.startNetworkClientTask(networkClientProfile);
}
// TODO make this right
initPositionDeleteTask(30);
}
COM: <s> this method initializes all optional modules of the core </s>
|
funcom_train/47109539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void filterDuplicate(List<SelectItem> sourceList, Collection<? extends EntityImpl> targetList) {
Iterator<SelectItem> iter = sourceList.iterator();
while (iter.hasNext()) {
SelectableItem dropDown = (SelectableItem) iter.next().getValue();
EntityImpl impl = (EntityImpl) dropDown.getValue();
if (targetList.contains(impl)) {
iter.remove();
}
}
}
COM: <s> removes all elements from the source list that are in the target list </s>
|
funcom_train/31782421 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendMessage( String userName, String message ) throws MSNException {
if( notificationServer != null ) {
try {
notificationServer.sendMessage( userName, message );
} catch( MSNException e ) {
throw e;
}
}
else
throw new MSNException( MSNException.MSN_EX_NOT_CONNECTED );
}
COM: <s> send a message to a buddy </s>
|
funcom_train/50100101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TreePath getPath(){
MutableTreeNode node = (MutableTreeNode)getParent();
ArrayList<MutableTreeNode> pathList = new ArrayList<MutableTreeNode>();
pathList.add(this);
while(node!=null) {
pathList.add(node);
node = (MutableTreeNode) node.getParent();
}
Object [] path = new Object[pathList.size()];
int i = pathList.size()-1;
for(Iterator it = pathList.iterator(); it.hasNext();--i)
path[i]=it.next();
pathList=null;
return new TreePath(path);
}
COM: <s> return the path of the page on the tree </s>
|
funcom_train/6433927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveHostFile() {
try {
File hostFile = new File(propertyList.getHostFileName());
FileOutputStream outStream = new FileOutputStream(hostFile);
ObjectOutputStream objectStream = new ObjectOutputStream(outStream);
objectStream.writeObject((List)getHosts());
} catch (IOException ie) {}
}
COM: <s> save the current list of hosts to the hostfile </s>
|
funcom_train/20044695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _removeRefreshListener() {
requiredMethod("refresh()");
listenerCalled[0] = false;
oObj.removeRefreshListener(listener) ;
oObj.refresh();
tRes.tested("removeRefreshListener()", !listenerCalled[0]);
if (listenerCalled[0])
log.println("RefreshListener was called after removing");
}
COM: <s> removes the listener added before and calls code refresh code </s>
|
funcom_train/5265061 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void _addReachablePeer(Set<PeerID> reachable, PeerID a) {
if (reachable.contains(a)) return;
reachable.add(a);
VersionizedMap<String, String> db = peers.get(a);
if (db!=null) {
String conn = db.get("connectedTo");
if (conn!=null) {
StringTokenizer st = new StringTokenizer(conn);
while(st.hasMoreTokens()) {
_addReachablePeer(reachable, new PeerID(st.nextToken()));
}
}
}
}
COM: <s> find all peers that are reachable from the given peer </s>
|
funcom_train/20079479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void hook(int eventType, Listener listener) {
if (map == null) {
map = new HashMap();
}
Integer type = new Integer(eventType);
List listeners = (List) map.get(type);
if (listeners == null) {
listeners = new ArrayList();
map.put(type, listeners);
}
if (!listeners.contains(listener)) {
listeners.add(listener);
}
}
COM: <s> hooks the listener by the given event type and element </s>
|
funcom_train/16556222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private FGeometry readPointText(StreamTokenizer tokenizer) throws IOException, ParseException {
String nextToken = getNextEmptyOrOpener(tokenizer);
if (nextToken.equals("EMPTY")) {
return null;
}
Coordinate c = getPreciseCoordinate(tokenizer);
FPoint2D point = new FPoint2D(c.x, c.y );
getNextCloser(tokenizer);
return ShapeFactory.createGeometry(point);
}
COM: <s> creates a code point code using the next token in the stream </s>
|
funcom_train/23328925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Override protected void startup() {
addExitListener(new ExitListener() {
public boolean canExit(EventObject arg0) {
int option = JOptionPane.showConfirmDialog(null, "Really Exit?");
return option == JOptionPane.YES_OPTION;
}
public void willExit(EventObject arg0) {
}
});
show(new ArticEditorView(this));
}
COM: <s> at startup create and show the main frame of the application </s>
|
funcom_train/20499945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkPromotion(){
int offset = 0;
if (player1){offset = 7; }
for (int i =0; i<Board.SIZE; i++){
if(board.getGrid()[i][offset].getPiece() instanceof Pawn){
return true;
}
}
return false;
}
COM: <s> checks if the players pawn should undergo a promotion </s>
|
funcom_train/45622815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addComponentsLocationPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_GenerateBootstrapperType_componentsLocation_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_GenerateBootstrapperType_componentsLocation_feature", "_UI_GenerateBootstrapperType_type"),
MSBPackage.eINSTANCE.getGenerateBootstrapperType_ComponentsLocation(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the components location feature </s>
|
funcom_train/37885107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getAllResults(Sequence sequence){
List result = new ArrayList();
try {
SequenceIterator i = sequence.iterate();
while(i.hasNext()){
String path = i.nextItem().getStringValue();
result.add(path);
}
} catch (XPathException ex) {
logger.error("xQuery issue.", ex);
result=null;
}
return result;
}
COM: <s> convert sequence into list of strings </s>
|
funcom_train/31747707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean assignPrinterJobToService(PrinterJob printerJob, boolean useDefault) {
if (useDefault) {
PrintService defService = PrintServiceLookup.lookupDefaultPrintService();
if (defService != null) {
// Printer
// printerJob.
// defService.getA
try {
// printerJob.printDialog(attributes)
printerJob.setPrintService(defService);
} catch (PrinterException e) {
return false;
}
return true;
} else
return printerJob.printDialog();
}
else {
return printerJob.printDialog();
}
}
COM: <s> assigns the given printer job to a print service </s>
|
funcom_train/31462672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer sb = new StringBuffer();
sb.append(getMessage());
if(nestedException != null) {
sb.append("\nNested exception ");
sb.append(nestedException.getClass().getName());
sb.append(": ");
sb.append(nestedException.getMessage());
}
return sb.toString();
}
COM: <s> returns a string representation of the exception including </s>
|
funcom_train/3598161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testText() {
try {
List results = engine.search(nom, "($w word):!text($w)");
results.remove(0); // remove list of vars
Collections.sort(results, new SearchResultIDComparator());
assertTrue(results.size()==8);
NOMElement r1 = (NOMElement)((List)results.get(7)).get(0);
assertTrue(r1.getID().equals("w_8"));
} catch (Throwable ex) {
ex.printStackTrace();
fail("Text test failed!");
}
}
COM: <s> check text retrieval works unfortunately nothing in this </s>
|
funcom_train/45247716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(){
StringBuffer sb = new StringBuffer();
sb.append("[D_EnableQuickCommMessage=["); //$NON-NLS-1$
sb.append("srvUsername="); //$NON-NLS-1$
sb.append(this.srvUsername );
sb.append("; isDisableEachChat="); //$NON-NLS-1$
sb.append(this.isDisableEachChat);
sb.append("]"); //$NON-NLS-1$
return sb.toString();
}
COM: <s> returns a string consisting of do not disturb service </s>
|
funcom_train/44107794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ResultSet execute(String sql) throws SQLException {
ServerConsoleServlet.printSystemLog("sql= " + sql, ServerConsoleServlet.LOG_VDEBUG);
if (dbtype.equals("file")) return null;
statement = conn.createStatement();
if(sql.indexOf("doc_info") > 0)
System.out.print("\n");
return statement.executeQuery(sql);
}
COM: <s> this method is for running select query </s>
|
funcom_train/37588570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testProperExceptionThrowing() {
try {
DummyOpenDefDoc dummy = new DummyOpenDefDoc();
dummy.modifiedOnDisk();
fail("DummyOpenDefDoc did not throw UnsupportedOperationException");
}
catch (UnsupportedOperationException e) {
//Do nothing, this is expected.
}
catch(Exception e) {
fail("DummyOpenDefDoc did not throw UnsupportedOperationException, but " + e);
}
}
COM: <s> creates a dummy open def doc and ensures that it properly </s>
|
funcom_train/1237076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getDepth() {
if (depth != null) {
return depth.intValue();
}
ValueBinding vb = getValueBinding("depth");
Integer v = vb != null ? (Integer) vb.getValue(getFacesContext())
: null;
return v != null ? v.intValue() : 15;
}
COM: <s> depth attribute for pie charts </s>
|
funcom_train/41503862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void blockThread() {
// TODO: Implement MiniScheduler::blockThread()
System.out.println("jkl 2 ");
runningThread.stopExecution();
runningThread.setThreadState(MiniThread.THREAD_BLOCKED);
blockedQueue.put(runningThread.getTid(), runningThread);
MiniThread temp = readyQueue.getHead();
temp.setThreadState(MiniThread.THREAD_RUNNING);
runningThread = temp;
temp.resumeExecution();
}
COM: <s> b un implemented b invoked when the thread requests and io operation </s>
|
funcom_train/13687000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int openDialog(Shell aParentShell) {
dialogResult = SWT.CANCEL; // when user presses escape
if (dialog == null || dialog.isDisposed())
createDialog(aParentShell);
dialog.pack();
Manager.reduceDistance(aParentShell, dialog);
dialog.open();
Display display = parent.getDisplay();
while (!dialog.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
return dialogResult;
}
COM: <s> creates a self contained standalone dialog </s>
|
funcom_train/15401862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getImagePixelAspectRatio() {
int[] imagePixelAspectRatio = getImagePixelAspectRatioArray();
if (imagePixelAspectRatio != null) {
if (imagePixelAspectRatio.length == 2) {
String pixelRatio = new String("x = "
+ NUM_FORMAT.format(imagePixelAspectRatio[0]) + " y = "
+ NUM_FORMAT.format(imagePixelAspectRatio[1]));
return pixelRatio;
}
}
return new String();
}
COM: <s> returns ratio of the vertical size and horizontal size of the pixels in </s>
|
funcom_train/27766737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPlanet(Vector Planets) {
int a;
for (a = 0; a < Planets.size(); a++) {
Planet p = (Planet) Planets.elementAt(a);
if (p.getName().equals(planet)) {
loc = p.getCenter();
for (int b = 0; b < ships.size(); b++) {
Group g = (Group) ships.elementAt(b);
g.setPlanet(Planets);
}
return;
}
}
}
COM: <s> sets the planet attribute of the battle object </s>
|
funcom_train/50814035 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void postEvent( EventObject event ) {
if( LOGGING ) {
System.out.println( "EventBus received : " + event.toString() ) ;
}
EventDispatcher disp = new EventDispatcher( event ) ;
// Events need to be dispatched on the AWTEvent thread, as the UI
// components assume that.
if( EventQueue.isDispatchThread() ) {
disp.run() ;
} else {
EventQueue.invokeLater( disp ) ;
}
}
COM: <s> method used for sending an event to the bus </s>
|
funcom_train/2522548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPadding(int padding){
this.padding = padding;
GridBagConstraints gbc = new GridBagConstraints();
gbc.fill = GridBagConstraints.BOTH;
gbc.insets = new Insets(0, padding, 0, 0);
this.add(b_SelectFile, gbc);
}
COM: <s> sets the distance between dropdown and button </s>
|
funcom_train/25365722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addFinishedtalkingPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_RoomEvent_finishedtalking_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_RoomEvent_finishedtalking_feature", "_UI_RoomEvent_type"),
LeveleditorPackage.Literals.ROOM_EVENT__FINISHEDTALKING,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the finishedtalking feature </s>
|
funcom_train/46760911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PortalUserModel getPortalUserByUserLogin(final String username, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
return PatientData.getPortalUserByUserLogin(username, call);
}}; return (PortalUserModel) call(method, call);
}
COM: <s> get view patient models for the list of patient ids </s>
|
funcom_train/40884801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Matrix4 set (Matrix3 mat) {
val[0] = mat.vals[0];
val[1] = mat.vals[1];
val[2] = mat.vals[2];
val[3] = 0;
val[4] = mat.vals[3];
val[5] = mat.vals[4];
val[6] = mat.vals[5];
val[7] = 0;
val[8] = 0;
val[9] = 0;
val[10] = 1;
val[11] = 0;
val[12] = mat.vals[6];
val[13] = mat.vals[7];
val[14] = 0;
val[15] = mat.vals[8];
return this;
}
COM: <s> sets this matrix to the given 3x3 matrix </s>
|
funcom_train/26604684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseReleased(IDocumentTree tree, java.awt.event.MouseEvent e) {
if (e.isPopupTrigger()) {
Object node = tree.getSelectedNode().getUserObject();
showEditingMenu(tree, node, e.getX(), e.getY());
}
}
COM: <s> invoked when a mouse button has been released on a component </s>
|
funcom_train/49723514 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BandwidthEntry getEntry(I_AddressPair ap) {
BandwidthEntry entry = (BandwidthEntry) table.get(ap.getLogicalAddress().toString());
if (entry != null
&& !entry.getAddressPair().getPhysicalAddress().equals(ap.getPhysicalAddress())) {
removeEntry(ap.getLogicalAddress());
entry = null;
}
return entry;
}
COM: <s> gets an entry with address pair from the bandwidth table </s>
|
funcom_train/48747446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void display(PrintWriter out, int depth) throws HtmlException {
this.padWithTabs(out,depth);
out.print("<input");
if (cSSClass != null) {
out.print(" class=\"" + cSSClass + "\"");
}
if (cSSID != null) {
out.print(" id=\"" + cSSID + "\"");
}
out.println(" type=hidden name=" + fieldName
+ " value=\"" + fieldValue + "\"/>");
setDisplayed();
} /* display(PrintWriter) */
COM: <s> display the hidden field to a form </s>
|
funcom_train/18741316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void passDownMatchToSuccessors(AbstractReteMatch m) {
ReteNetworkNode previous = null;
int repeatedSuccessorIndex = 0;
for (ReteNetworkNode n : this.getSuccessors()) {
repeatedSuccessorIndex =
(n != previous) ? 0 : (repeatedSuccessorIndex + 1);
n.receive(this, repeatedSuccessorIndex, m);
previous = n;
}
}
COM: <s> passes down a given match to the successors </s>
|
funcom_train/8096430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFindPrefixes() {
Vector<String> prefixes = m_Trie.getWithPrefix("this");
assertEquals("Different number of prefixes returned", 2, prefixes.size());
prefixes = m_Trie.getWithPrefix("blah");
assertEquals("Different number of prefixes returned", 0, prefixes.size());
}
COM: <s> tests the finding of prefixes </s>
|
funcom_train/40222091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean writeObject (Object o) {
if (out == null) return false;
// make sure that only one thread is writing at a time.
synchronized (writeSemaphore) {
ObjectOutputStream oos = null;
boolean retValue = true;
try {
oos = new ObjectOutputStream (out);
oos.writeObject(o);
oos.flush();
} catch (IOException ioe) {
// nothing to do!
retValue = false;
}
try {
if (!retValue) {
if (oos != null) {
oos.close();
}
}
} catch (IOException e) {
// nothing to do.
}
return retValue;
}
}
COM: <s> writes an object to the output stream </s>
|
funcom_train/51269784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object o) {
int result = super.compareTo(o);
if(result == 0 && o instanceof CompareLiteral){
CompareLiteral cL = (CompareLiteral) o;
int compareType = Utils.compareComparator(this.compareType, cL.compareType);
if(compareType == 0){
int compareComparator = Utils.compareComparator(this.comparator, cL.comparator);
return compareComparator;
}
return compareType;
}
return result;
}
COM: <s> needed to compare literals depending on their dependencies </s>
|
funcom_train/17535730 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ErrorHandler getDefaultErrorHandler() {
return new ErrorHandler() {
public void error(SAXParseException ex) throws SAXException {
if (context.isEmpty()) System.err.println("Missing DOCTYPE.");
throw ex;
}
public void fatalError(SAXParseException ex) throws SAXException {
throw ex;
}
public void warning(SAXParseException ex) throws SAXException {
// ignore
}
};
}
COM: <s> creates default error handler used by this parser </s>
|
funcom_train/39474883 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public void performMove(SingleMove move) {
int playerno = move.player();
moveChecker(playerno, move.from(), move.to());
if (move.isHit()) {
assert getPoint(3 - playerno, 25 - move.to()) == 1;
moveChecker(3 - playerno, 25 - move.to(), 25);
}
}
COM: <s> include a move into the data </s>
|
funcom_train/21742195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void out() {
String tmpRelationSchemaOut = new String();
for (Iterator<String> i = attributes.iterator(); i.hasNext();) {
String tmpRelationSchemaColumn = i.next();
tmpRelationSchemaOut += tmpRelationSchemaColumn;
if (i.hasNext()) {
tmpRelationSchemaOut += ", ";
}
}
System.out.println("(" + tmpRelationSchemaOut + ")");
}
COM: <s> prints the relation schema on console </s>
|
funcom_train/49319286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateTicks() {
// 4 tick marks
int ticks = (int) ((fScaleMax.getValue() - fScaleMin.getValue()) / 4);
fSlider.setLabelTable(null);
fSlider.setMajorTickSpacing(ticks);
fSlider.setMinorTickSpacing((int) ticks / 5);
}
COM: <s> update the tickmarks on the slider scale </s>
|
funcom_train/10912417 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getBorderAndPaddingWidthEnd() {
int margin = 0;
BorderProps bps = (BorderProps) getTrait(Trait.BORDER_END);
if (bps != null) {
margin = bps.width;
}
Integer padWidth = (Integer) getTrait(Trait.PADDING_END);
if (padWidth != null) {
margin += padWidth;
}
return margin;
}
COM: <s> return the sum of region border and padding end </s>
|
funcom_train/21951782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void init() {
try {
source = (DataSource) NamingUtils.lookup(SystemProperties.get(SystemProperties.DATA_SOURCE));
} catch (NamingException ne) {
System.out.println("Naming exception:" + ne.getMessage());
System.out.println("Data Source:" + SystemProperties.get(SystemProperties.DATA_SOURCE));
throw new SystemException(ne);
}
}
COM: <s> initializes the connection manager </s>
|
funcom_train/8090949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(Object o1, Object o2) {
int comparison = 0;
if (o1 instanceof EnsembleLibraryModel
&& o2 instanceof EnsembleLibraryModel) {
comparison = ((String) ((EnsembleLibraryModel) o1)
.getStringRepresentation())
.compareTo(((String) ((EnsembleLibraryModel) o2)
.getStringRepresentation()));
}
return comparison;
}
COM: <s> compares its two arguments for order </s>
|
funcom_train/7421671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Component getNextComponent() {
Component result = computeAttachedErrorEvents(false);
if (result == null) {
result = computeSequence();
}
if (result == null) {
// compute other well-structured components
result = computeWellStructured();
}
if (result == null) {
result = computeQuasiStructured();
}
if (result == null) {
result = computeGeneralizedFlow();
}
if (result == null) {
result = computeSynchronizingProcessComponent();
}
return result;
}
COM: <s> returns the next component that can be found in the container </s>
|
funcom_train/11404057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Conduit getConduit() {
Message message = new MessageImpl();
Exchange exchange = new ExchangeImpl();
message.setExchange(exchange);
exchange.put(MessageObserver.class, new ClientMessageObserver(this));
exchange.put(Bus.class, bus);
prepareConduitSelector(message);
return getConduitSelector().selectConduit(message);
}
COM: <s> gets the conduit responsible for a transport level </s>
|
funcom_train/18739851 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addStartGraph(String startGraphName) {
String name = startGraphName;
if (name.startsWith(this.grammarLocation)) {
name = name.substring(this.grammarLocation.length() + 1);
}
if (name.endsWith(".gst")) {
name = name.substring(0, name.length() - 4);
}
this.startGraphs.add(name);
}
COM: <s> adds an active start graph to be used for state space generation </s>
|
funcom_train/32305403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int defaultEdge(HCodeElement hce) {
HCodeEdge[] succ = (HCodeEdge[]) cfg.succC(hce).toArray(new HCodeEdge[0]);
// hacks for SWITCH & other common cases.
if (succ.length!=2) return 0;
int maxedge=0, maxscore=d(succ[0].to());
for (int i=1; i<succ.length; i++) {
int score = d(succ[i].to());
if (score > maxscore) {
maxedge=i; maxscore=score;
}
}
return maxedge;
}
COM: <s> default edge corresponds to the edge with largest shortest path </s>
|
funcom_train/8915444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearSearchResultsWithoutPathEndpoints() {
for(int rowIndex = 0; rowIndex < rows; rowIndex ++) {
for(int columnIndex = 0; columnIndex < columns; columnIndex ++) {
MapCell cell = getMapCell(rowIndex, columnIndex);
cell.setNothingCell();
}
}
if(startCell != null)
setStartCellTo(startCell);
if(goalCell != null)
setGoalCellTo(goalCell);
}
COM: <s> clears search results but keeps the path end points </s>
|
funcom_train/44832639 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JGMethod getMethod(String methodName) {
Iterator iter = methods.iterator();
while (iter.hasNext()) {
JGMethod method = (JGMethod) iter.next();
if (method.getName().equals(methodName)) {
return method;
}// if
}// while
return null;
}
COM: <s> getter for methods by name </s>
|
funcom_train/1440668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddConnectionData() {
System.out.println("addConnectionData");
ConnectionData data1 = new ConnectionData();
ConnectionData data2 = new ConnectionData();
ServerDataContainerImpl instance = new ServerDataContainerImpl();
instance.addConnectionData(data1);
instance.addConnectionData(data2);
List<ConnectionData> result = instance.getConnectionDataList();
assertEquals(result.size(), 2);
assertTrue(result.contains(data2));
assertTrue(result.contains(data1));
}
COM: <s> test of add connection data method of class server data container impl </s>
|
funcom_train/45645406 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processLine(String line) throws CLIException {
if (line.trim().equals("?")) {
output.output(hint, outputConverter);
} else {
List<Token> tokens = Token.tokenize(line);
if (tokens.size() > 0) {
String discriminator = tokens.get(0).getString();
processCommand(discriminator, tokens);
}
}
}
COM: <s> you can operate shell linewise without entering the command loop </s>
|
funcom_train/37190016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void itemStateChanged(ItemEvent itemEvent) {
if(!fromCode) {
fromCode = true;
final JCheckBox checkBox = (JCheckBox)(itemEvent.getItem());
final int stateChange = itemEvent.getStateChange();
if(stateChange == ItemEvent.SELECTED) checkBox.setSelected(false);
if(stateChange == ItemEvent.DESELECTED) checkBox.setSelected(true);
fromCode = false;
}
}
COM: <s> keeps check boxes the way they were if they are clicked on </s>
|
funcom_train/9202745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean remove(Node node) {
// check for null
if (node == null) return false;
// check for empty tree
if (this.root == null) return false;
// make sure this node is contained in the tree
if (this.contains(node)) {
// remove the node
this.removeNode(node);
// return true that the node was removed
return true;
}
// otherwise return false
return false;
}
COM: <s> removes the given node from this tree and returns </s>
|
funcom_train/14661886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private NumSelector getParamMixingProbSelector() {
if (paramMixingProbSelector == null) {
paramMixingProbSelector = new NumSelector();
paramMixingProbSelector.setMinimumSize(new Dimension(110, 20));
paramMixingProbSelector.setPrecision(2);
paramMixingProbSelector.setNumber(1.0);
paramMixingProbSelector.setRangeExpr("(0.0, 1.0]");
paramMixingProbSelector.setPreferredSize(new Dimension(110, 20));
}
return paramMixingProbSelector;
}
COM: <s> this method initializes param mixing prob selector </s>
|
funcom_train/6261284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetAnotherAscByOwned() {
owned1.setOwner(owner1);
// testing
owned1.setOwner(owner2);
assertNull(owner1.getOwned());
assertEquals(owned1.getOwner(), owner2);
assertEquals(owner2.getOwned(), owned1);
}
COM: <s> tests associaion unlinking and setting association with another object </s>
|
funcom_train/28349200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void print() {
System.out.println("Sys = " + getSystem() + " subsys = " + getSubSystem() + " spname = " + getSPName() + " spVal = " + getSPValueAsString() + " rbname = " + getRBName() + " rbVal = " + getRBValueAsString() + " urbasp = " + _useRB);
}
COM: <s> dump to screen </s>
|
funcom_train/49703948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkTextChanges() {
textChanged = false;
if (null != text) {
TextSignature newSig = new TextSignature(text);
textChanged = ! page.hasSimilarSignature(newSig);
page.setSignature(newSig);
if (textChanged) {
page.setLastChange(System.currentTimeMillis());
}
}
}
COM: <s> determine if the page changed by analysing the text signature </s>
|
funcom_train/8897927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(SSBNNode ssbnnode) {
this.setSSBNNode(ssbnnode);
//this.node = ssbnnode.getResident(); //setSSBNNode already does it.
this.mebn = this.node.getMFrag().getMultiEntityBayesianNetwork();
String pseudocode = this.node.getTableFunction();
if (this.ssbnnode.getProbNode() != null) {
this.setCpt(this.ssbnnode.getProbNode().getPotentialTable());
}
this.init(pseudocode);
}
COM: <s> use this method to initialize this parser on ssbn generation step </s>
|
funcom_train/34636587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean shouldBeEnabled() {
if (window == null)
return false;
IWorkbenchPart activePart = null;
if (window.getActivePage() != null) {
activePart = window.getActivePage().getActivePart();
}
if (!(activePart instanceof CommonNavigator)) {
return false;
}
if (selection == null || selection.size() < 1) {
return false;
}
if (selection.getFirstElement() instanceof Category) {
return false;
}
return true;
}
COM: <s> figures out whether or not this action should be enabled </s>
|
funcom_train/43667163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenu getEditMenu() {
if (editMenu == null) {
editMenu = new JMenu("Edit");
editMenu.setFont(new Font(Constants.FONT, Constants.FONT_STYLE_TOOL, 12));
editMenu.setMnemonic(KeyEvent.VK_E);
editMenu.add(getUndoItem());
editMenu.add(getRedoItem());
editMenu.add(getCutItem());
editMenu.add(getCopyItem());
editMenu.add(getPasteItem());
editMenu.add(getSelectItem());
}
return editMenu;
}
COM: <s> this method initializes edit menu </s>
|
funcom_train/42076533 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeResult(String name) {
StringBuffer buff = (StringBuffer) m_HashResults.get(name);
if (buff != null) {
m_HashResults.remove(name);
m_Model.removeElement(name);
m_HashObjs.remove(name);
System.gc();
}
}
COM: <s> removes one of the result buffers from the history </s>
|
funcom_train/4233014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAgedItems(long latest, boolean notify) {
long minAge = latest - this.getMaximumItemAge();
boolean removed = false;
while (data.size() > 0 && getTimePeriod(0).getSerialIndex() <= minAge) {
data.remove(0);
removed = true;
}
if (removed && notify) {
fireSeriesChanged();
}
}
COM: <s> remove items that are older than the maximum item age relative to the </s>
|
funcom_train/51204715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_cancelButtonActionPerformed
{//GEN-HEADEREND:event_cancelButtonActionPerformed
// If you ever started negotiating, stop and remove the negotiation listener
if (negotiator != null)
{
negotiator.cancelNegotiation();
negotiator.removeListener(this);
}
// Dispose this window
dispose();
}//GEN-LAST:event_cancelButtonActionPerformed
COM: <s> when cancel is clicked dispose the window </s>
|
funcom_train/8452598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Real calculateFunctionValueForOnePoint(Map<String, List<Double>> sampledPoints, ExpressionConfiguration function, int index){
if(index < 0){
throw new RuntimeException("Invalid points index!");
}
function.setType(RealType.TYPE);
for(Entry<String, List<Double>> entry : sampledPoints.entrySet()){
double value = entry.getValue().get(index);
function.defineVariable(entry.getKey(), new Real(value), RealType.TYPE);
}
return (Real)function.evaluateExpression();
}
COM: <s> this method calculates the value of the function in a certain point </s>
|
funcom_train/4203906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setTop(final ScrolledForm top) {
myContextMessageDecoratorAdapter = new ScrolledFormContextMessageDecoratorAdapter(top);
myFormReflow = new IFormReflow() {
@Override
public void reflow() {
top.getDisplay().asyncExec(new Runnable() {
@Override
public void run() {
if (!top.isDisposed()) {
top.layout(true, true);
top.reflow(true);
}
}
});
}
};
setTop(top.getBody());
}
COM: <s> sets the top level element for the context to the specified scrolled form </s>
|
funcom_train/31889987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Connection getConnection(BeeAddress address) {
if (address == null || address.getHost() == null) return null;
//TODO: asi to staci bez vytvareni InetAddress
// try {
// InetAddress a = InetAddress.getByName(address.getHost());
return (Connection) addr2connection.get(address.getHost());
// } catch (UnknownHostException e) {
// return null;
// }
}
COM: <s> finds a connection with given address </s>
|
funcom_train/4780390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String deleteGroup(Document document, String groupName) throws AppException, AppException {
if (groupName == null) {
throw new AppException("application.error.grouprequired");
}
Group group = document.findGroup(groupName);
if (group == null) {
throw new AppException("application.error.unabletofindgroup", groupName);
}
document.deleteGroup(group);
return new FileGenerator(document).generate(true);
}
COM: <s> deletes an existing group </s>
|
funcom_train/1724524 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RelationshipContext applyChangesFromDelta(RelationshipDelta delta) {
RelationshipContext changed = new RelationshipContext(this);
changed.isBottom = isBottom && delta.numberOfChanges() == 0;
for (Entry<Relationship, SevenPointLattice> entry : delta) {
Relationship rel = entry.getKey();
changed.setRelationship(rel, entry.getValue().override(getRelationship(rel)));
}
return changed;
}
COM: <s> apply the changes from a delta lattice </s>
|
funcom_train/21644098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getEditDeleteMenuItem() {
if (editDeleteMenuItem == null) {
editDeleteMenuItem = new JMenuItem();
editDeleteMenuItem.setText("Delete");
editDeleteMenuItem.setMnemonic('l');
editDeleteMenuItem.setDisplayedMnemonicIndex(2);
editDeleteMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0));
editDeleteMenuItem.addActionListener(eventHandler);
}
return editDeleteMenuItem;
}
COM: <s> return the edit delete menu item </s>
|
funcom_train/13211543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean replaceCard(GamePlayer player, Card oldCard, Card newCard) {
if (mapCards.containsKey(player)) {
List cardList = (List)mapCards.get(player);
if (cardList!=null) {
int index = cardList.indexOf(oldCard);
if (index != -1) {
cardList.set(index, newCard);
return true;
}
}
}
return false;
}
COM: <s> replaces a card from the given player with another card </s>
|
funcom_train/1341530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTourImmigration() {
System.out.println("tourImmigration");
Moteur.initialiser();
Constantes.initialiser();
Moteur.setQuotaImmigration(150);
Moteur.tourImmigration();
Assert.assertEquals(150, Moteur.getLnkLand().getLesLandien().size());
}
COM: <s> test of tour immigration method of class caps land </s>
|
funcom_train/42898792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Transaction refund(String senderToken, String transactionID, String callerReference) throws FPSException {
return refund(callerToken, senderToken, transactionID, null, ChargeFeeTo.RECIPIENT, new Date(),
callerReference, null, null, null, null, null, null, null);
}
COM: <s> refund a successfully completed payment transaction </s>
|
funcom_train/29917925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getPropertyAsBoolean(String key){
String value = settings.getProperty(key);
if(value == null){
throw new BadConfigurationException("Error global setting '" + key + "' isn't configured.");
}
value = value.trim();
if(value.equalsIgnoreCase("TRUE")){
return true;
}
if(value.equalsIgnoreCase("FALSE")){
return false;
}
throw new BadConfigurationException("Error global setting '" + key + "' is missconfigured, the value '" + value + "' should be either 'true' or 'false'");
}
COM: <s> help method do fetch a global settings and expects </s>
|
funcom_train/2587388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isConstructorProperty(final String propertyName) {
for (int i = 0; i < this.constructorDefinitions.length; i++) {
final ConstructorDefinition cDef = this.constructorDefinitions[i];
if (propertyName.equals(cDef.getPropertyName())) {
return true;
}
}
return false;
}
COM: <s> returns code true code if the specified property is </s>
|
funcom_train/43233447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkTicketTypeDoublets(final String name) throws DoubleDefinitionException {
final Iterator<TicketType> activeTicketTypesIterator =
this.getModel().getTypeManager().getActiveTicketTypes().iterator();
while (activeTicketTypesIterator.hasNext()) {
final TicketType current = activeTicketTypesIterator.next();
if (current.getTypeName().equals(name)) {
throw new DoubleDefinitionException("Fehler: Ein Ticket-Typ mit diesem Namen existiert bereits!");
}
}
}
COM: <s> checks if doublets of ticket types exist </s>
|
funcom_train/12151850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void show() {
TableMap table = _column.table();
System.out.print(" " + name());
if ( (_type & JTypes.UNSIGNED) != 0 ) {
System.out.print(" unsigned");
}
System.out.println(" " + JTypes.name(_type) + " -> " +
table.name() + "." + _column.name());
}
COM: <s> output a description of this attribute on stdout </s>
|
funcom_train/38288190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NamespaceManager newNsManager() {
if (wizards.size() == 1) {
InsertListChooserWizard first = (InsertListChooserWizard) wizards
.get(0);
return first.newNsManager();
}
MultiWizard w = (MultiWizard) wizards.get(wizards.size() - 1);
FillNewElementWizardProvider p = (FillNewElementWizardProvider) w
.getProvider();
return p.newNsManager();
}
COM: <s> current namespace manager </s>
|
funcom_train/22552907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUnreachableHost() {
CATCHER.endpoint = new ExtendedEndpoint("1.2.3.4", 5000);
RouterService.connect();
sleep(15000);
assertEquals("unexpected successful connect", 0, CATCHER.connectSuccess);
assertGreaterThan("should have received failures", 0, CATCHER.connectFailures);
}
COM: <s> tests to make sure that a connection does not succeed with an </s>
|
funcom_train/3832435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Layer removeLayer(String name) {
for (int i = 0; i < layer.size(); i++) {
Layer ly = (Layer)layer.get(i);
if ( ly.getName() != null ) {
if ( ly.getName().equals(name) ) {
layer.remove(i);
return ly;
}
}
}
return null;
}
COM: <s> removes a layer identified by its name from the parent layer </s>
|
funcom_train/542720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(String s) {
String tmp = "";
if (s != null) {
tmp = s;
}
while (tmp.endsWith("\n")) {
tmp = tmp.substring(0, tmp.length() - 1);
}
setValue(tmp.split("\n"));
}
COM: <s> code set value code sets the value of the property transforming the </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.