__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/41313532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cursor fetchAllPhotos() {
Cursor mCursor = mCtx.getContentResolver().query(android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
null, null, null, null);
if (mCursor != null) {
android.util.Log.d("lens","LensBlasterDB returning all photos, size = " + mCursor.getCount());
mCursor.moveToFirst();
}
return mCursor;
}
COM: <s> gets all photos in media store database </s>
|
funcom_train/16575616 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getCbLinkFieldTableToImport() {
if (cbLinkFieldTableToImport == null) {
cbLinkFieldTableToImport = new JComboBox();
this.cbLinkFieldTableToImport_model = new DefaultComboBoxModel();
cbLinkFieldTableToImport.setModel(cbLinkFieldTableToImport_model);
cbLinkFieldTableToImport.addItemListener(this);
}
return cbLinkFieldTableToImport;
}
COM: <s> this method initializes cb link field table to import </s>
|
funcom_train/16628305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseDragged(MouseEvent e) {
if (dragging) {
TabStop newTab = createTabStop(e.getX(), e.getY(),
newAlignment);
// Workaround for TabStop.equals not handling null being
// passed in.
if (newTab != tab &&
((newTab != null && tab != null && !newTab.equals(tab)) ||
(newTab == null || tab == null))) {
tab = newTab;
resetTabs();
}
}
}
COM: <s> invoked when a mouse button is pressed on a component and then </s>
|
funcom_train/3133533 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isKeepAlive(){
if(contains("Connection")) {
return !contains("Connection", "close");
} else if(getMajor() > 1) {
return true;
} else if(getMajor() == 1) {
return getMinor() > 0;
}
return false;
}
COM: <s> this is a convenience method that is used to determine whether </s>
|
funcom_train/31517291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void populateIOCombo(Combo theCombo) {
String[] ioTypes = {"Either", "Hostile", "Target"};
int io = 0;
// Create a list of valid days for the hash map.
while (io < ioTypes.length) {
theCombo.add(ioTypes[io]);
io++;
}
// Now put the values in the Combo menu.
theCombo.setText(ioTypes[0]);
return;
}
COM: <s> populate a combo menu with i o types </s>
|
funcom_train/8640324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PdfImportedPage getImportedPage(PdfReader reader, int pageNumber) {
PdfReaderInstance inst = (PdfReaderInstance)importedPages.get(reader);
if (inst == null) {
inst = reader.getPdfReaderInstance(this);
importedPages.put(reader, inst);
}
return inst.getImportedPage(pageNumber);
}
COM: <s> use this method to get a page from other pdf document </s>
|
funcom_train/1721624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isConflict(ContainerComponent c, int requestedX, int requestedY, List<ContainerComponent> selectedComponents) {
List<Rectangle> bounds=new ArrayList<Rectangle>();
bounds.add(new Rectangle(requestedX, requestedY, c.getWidth(), c.getHeight()));
return isConflict(bounds,selectedComponents);
}
COM: <s> check if position of component conflict with any other </s>
|
funcom_train/24625175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Time mapFrameToTime(int frameNumber) {
double time = 0d;
if ((frameNumber < 0) || (frameNumber >= numberOfFrames)) {
return Track.TIME_UNKNOWN;
}
time = frameNumber / ((VideoFormat) getFormat()).getFrameRate();
Time t = new Time(time);
return t;
}
COM: <s> gets the time that corresponds to the specified frame number </s>
|
funcom_train/45130108 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendPage(WebPage page, HttpServletRequest request, HttpServletResponse response) {
//renderReferer(request, page);
renderErrors(request, page);
renderSavedFields(ERROR_KEY, request, page);
removeSavedFields(ERROR_KEY, request);
sendPage(page, response);
}
COM: <s> send the web page to the browser </s>
|
funcom_train/12560964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void testOne() {
declare(testName + " 1: STOP command added to the screen.");
LcduiTestCanvas canvas = new LcduiTestCanvas();
Command stopCmd = new Command("Stop", Command.STOP, 0);
canvas.addCommand(stopCmd);
checkLeftBtn(canvas, stopCmd);
}
COM: <s> this test is for a canvas with just the stop command added </s>
|
funcom_train/20228565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteRole(HRole r) {
Session session = null;
try{
session = HibernateUtil.getSessionFactory().getCurrentSession();
session.beginTransaction();
session.delete(r);
session.getTransaction().commit();
}catch (Exception e)
{
e.printStackTrace();
} finally{
if(session != null && session.isOpen()){
session.close();
}
}
}
COM: <s> deletes a role from the database </s>
|
funcom_train/15825544 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getModifications(Date lastBuild, Date now) {
mailAliases = getMailAliases();
List mods = null;
try {
mods = execHistoryCommand(buildHistoryCommand(lastBuild, now));
} catch (Exception e) {
log.error("Log command failed to execute succesfully", e);
}
if (mods == null) {
return new ArrayList();
}
return mods;
}
COM: <s> returns a list of modifications detailing all the changes between the </s>
|
funcom_train/10561865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String extractPrefixedData(String prefix, String reply) {
int idx = reply.indexOf(prefix);
if (idx == -1) {
return null;
}
// N.B. Cannot use trim before substring as leading space would affect the offset.
return reply.substring(idx+prefix.length()).trim();
}
COM: <s> extract the data from a reply with a prefix e </s>
|
funcom_train/19765295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getSearchCmd() {
if (searchCmd == null) {//GEN-END:|15-getter|0|15-preInit
// write pre-init user code here
searchCmd = new Command("\u786E\u5B9A", Command.ITEM, 0);//GEN-LINE:|15-getter|1|15-postInit
// write post-init user code here
}//GEN-BEGIN:|15-getter|2|
return searchCmd;
}
COM: <s> returns an initiliazed instance of search cmd component </s>
|
funcom_train/37734102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object p_portlet) {
int retVal = 0;
PortletTO portlet = (PortletTO)p_portlet;
int p_row = portlet.getRow();
if (_row > p_row) {
retVal = 1;
} else if (_row < p_row){
retVal = -1;
} else {
int p_col = portlet.getCol();
if (_col > p_col) {
retVal = 1;
} else if (_col < p_col) {
retVal = -1;
}
}
return retVal;
}
COM: <s> implemented to portlets to show in correct row column order </s>
|
funcom_train/12652082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAlertNewTrialsEnabled() {
UserPatient userPatient = new UserPatient();
// Ensure that the holder is empty
assert !userPatient.isAlertNewTrialsEnabled() : "alert upon creation";
// Test the set and get
userPatient.setAlertNewTrialsEnabled(true);
assert userPatient.isAlertNewTrialsEnabled() : "alert not on after set";
}
COM: <s> test alert new trials enabled field </s>
|
funcom_train/41426625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RxSessionState fromInt(int value) throws IllegalArgumentException {
switch (value) {
case 0:
return IDLE;
case 1:
return PENDING_AAR;
case 2:
return PENDING_STR;
case 3:
return PENDING_EVENT;
case 4:
return PENDING_BUFFERED;
case 5:
return OPEN;
default:
throw new IllegalArgumentException("Unknown value for AA Session State: " + value);
}
}
COM: <s> converts a given state value into its equivalent </s>
|
funcom_train/10865852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testContractionsBackwards() throws IOException {
Analyzer a = new ItalianAnalyzer(Version.LUCENE_31);
assertAnalyzesTo(a, "dell'Italia", new String[] { "dell'ital" });
assertAnalyzesTo(a, "l'Italiano", new String[] { "l'ital" });
}
COM: <s> test that we dont enable this before 3 </s>
|
funcom_train/50273277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void create(RouterImpl init) throws IOException, TorException {
// save starting point
routeNodes[0] = new Node(init);
// send create cell, set circID
sendCell(new CellCreate(this));
// wait for answer
Cell created = queue.receiveCell(Cell.CELL_CREATED);
// finish DH-exchange
routeNodes[0].finishDh(created.getPayload());
}
COM: <s> initiates circuit sends create cell </s>
|
funcom_train/31976755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int DB_CALL_SETIN(CommandEvent event, String context, String paramnum, String type, String value) throws Exception{
int qset = 0;
int i = context.indexOf(":");
if (i >= 0){
qset = Integer.parseInt(context.substring(i+1));
context = context.substring(0,i);
}
DatabaseContext dc = (DatabaseContext) event.instance.nv.get(context); //this could be null!
QuerySet qs = dc.getQuerySet(qset);
qs.setParameter(Integer.parseInt(paramnum),type,value,false);
return 1;
}
COM: <s> declare an input variable for the prepared statement </s>
|
funcom_train/24473844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createID() {
String candidateID = StringUtil.convertToJavaIdentifier(this.name);
Node node = this.graph.getNode(candidateID);
while (node != null && node != this) {
candidateID = StringUtil.incrementName(candidateID);
node = this.graph.getNode(candidateID);
}
this.id = candidateID;
for (PortImpl port : getAllPorts()) {
port.createID();
}
}
COM: <s> creates unique node id in the graph that this node belongs to </s>
|
funcom_train/17508633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testThreadPool() throws InterruptedException {
ThreadPool tp = new ThreadPool();
assertEquals(tp.getSize(), ThreadPool.DEFAULT_INITIAL_POOL_SIZE);
assertEquals(tp.getMinSize(), ThreadPool.DEFAULT_MIN_POOL_SIZE);
assertEquals(tp.getMaxSize(), ThreadPool.DEFAULT_MAX_POOL_SIZE);
tp.stopPool();
}
COM: <s> constructs a thread pool using the default constructor </s>
|
funcom_train/42398086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PrintWriter tryCreateTypePrintWriter(final String typeName) {
GeneratorHelper.checkJavaTypeName("parameter:typeName", typeName);
final String packageName = this.getPackageName(typeName);
final String simpleClassName = this.getSimpleClassName(typeName);
return this.getGeneratorContext().tryCreate(this.getTreeLogger(), packageName, simpleClassName);
}
COM: <s> tests if a class has already been generated </s>
|
funcom_train/11101934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void logExceptionMessages(Log log) {
Throwable t = new DummyException();
log.trace("trace", t); // Should not actually get logged
log.debug("debug", t); // Should not actually get logged
log.info("info", t);
log.warn("warn", t);
log.error("error", t);
log.fatal("fatal", t);
}
COM: <s> log messages with exceptions </s>
|
funcom_train/14516323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeEndEntityProfile(String name, EndEntityProfile profile) throws AuthorizationDeniedException{
if(authorizedToProfile(profile, true)){
raadminsession.changeEndEntityProfile(administrator, name,profile);
this.info.endEntityProfilesEdited();
}else
throw new AuthorizationDeniedException("Not authorized to edit end entity profile");
}
COM: <s> method to change a end entity profile </s>
|
funcom_train/19838031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isPrime(int number) {
if (number <= sieveEnd)
return Arrays.binarySearch(primes, number) >= 0;
if (number <= limit())
return PrimaltyTest.isPrime(number, primes, sieveLength);
return PrimaltyTest.millerRabin(number);
}
COM: <s> check wheter the number is prime </s>
|
funcom_train/48351795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean add(Integer l) {
IntCounter i = lockCounts.get(l);
boolean ret;
if (i == null) {
i = new IntCounter(0);
lockCounts.put(l, i);
ret = true;
} else {
ret = false;
}
i.inc();
return ret;
}
COM: <s> adds 1 to the lock count of l </s>
|
funcom_train/21916657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public boolean bagEquals(List source, List arg) {
if (source.size() != arg.size()) {
return false;
}
java.util.List mySource = new ArrayList(source);
java.util.List myArg = new ArrayList(arg);
Iterator it1 = mySource.iterator();
while (it1.hasNext()) {
Object elem1 = it1.next();
if (myArg.contains(elem1)) {
myArg.remove(elem1);
} else {
return false;
}
}
return myArg.isEmpty();
}
COM: <s> implements the equals operation for bags </s>
|
funcom_train/17563637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PTransformActivity animateTransformToBounds(double x, double y, double width, double height, long duration) {
PAffineTransform t = new PAffineTransform();
t.setToScale(width / getWidth(), height / getHeight());
t.setOffset(x, y);
return animateToTransform(t, duration);
}
COM: <s> animate this node from its current transform when the activity starts </s>
|
funcom_train/42262477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int ableToPass() {
int result = -1;
for(int i = roleDispatcher.getFirstRobot(); i<=roleDispatcher.getLastRobot(); ++i) {
if (roleDispatcher.getRole(i) instanceof Supporter) {
if (gD.getBehave().isAbleToPass(robotNumber, i))
return i;
}
}
return result;
}
COM: <s> finds first robot to which ball can be passed </s>
|
funcom_train/7423208 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Document generateDeploymentDescriptor() {
DocumentBuilder builder;
try {
builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document document = builder.newDocument();
/* Create deploy root element */
Element deploy = createDeployElement(document);
/* Create process elements */
List<Element> processes = createProcessElements(document);
/* Append child nodes */
for(Element process : processes) {
deploy.appendChild(process);
}
document.appendChild(deploy);
return document;
} catch (ParserConfigurationException e) {
//TODO Exception handling
e.printStackTrace();
}
return null;
}
COM: <s> entry point to generate the deployment descriptor </s>
|
funcom_train/49438485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addPendingItems() {
synchronized(PENDING) {
for(Iterator i = PENDING.iterator(); i.hasNext(); ) {
PendingOp next = (PendingOp)i.next();
try {
next.channel.register(selector, next.op, next.handler);
} catch(IOException iox) {
next.handler.handleIOException(iox);
}
}
PENDING.clear();
}
}
COM: <s> adds any pending registrations </s>
|
funcom_train/40386124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String setBasicAuthNChain(String basic) {
String authNChain = "";
String basicMsg = "Basic ";
logger.debug("Basic is: " + basic);
if ((!basic.equals(null)) && (!basic.equals(""))) {
//treat basic chain and just get the chain
authNChain = basicMsg + basic;
}
return authNChain;
}
COM: <s> gets the basic chain from the response authorization header </s>
|
funcom_train/2580748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DialScale getScaleForDataset(int datasetIndex) {
DialScale result = (DialScale) this.scales.get(0);
Integer scaleIndex = (Integer) this.datasetToScaleMap.get(datasetIndex);
if (scaleIndex != null) {
result = getScale(scaleIndex.intValue());
}
return result;
}
COM: <s> returns the dial scale for a specific dataset </s>
|
funcom_train/8629331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getObject(int id, boolean ifAvailable) throws SQLException {
if (id == cacheId) {
return cache;
}
Object obj = map.get(id);
if (obj == null && !ifAvailable) {
throw Message.getSQLException(ErrorCode.OBJECT_CLOSED);
}
return obj;
}
COM: <s> get an object from the map if it is stored </s>
|
funcom_train/28720166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void rulerContextMenuAboutToShow(IMenuManager menu) {
//menu.add(new Separator(ITextEditorActionConstants.GROUP_REST));
menu.add(new Separator(ITextEditorActionConstants.MB_ADDITIONS));
//for (Iterator i = fRulerContextMenuListeners.iterator(); i.hasNext();)
// ((IMenuListener) i.next()).menuAboutToShow(menu);
addAction(menu, ITextEditorActionConstants.RULER_MANAGE_BOOKMARKS);
//addAction(menu, ITextEditorActionConstants.RULER_MANAGE_TASKS);
}
COM: <s> sets up the ruler context menu before it is made visible </s>
|
funcom_train/7518214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Filtro entity) {
EntityManagerHelper.log("saving Filtro instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved filtro entity </s>
|
funcom_train/48558198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getExitCommand1() {
if (exitCommand1 == null) {//GEN-END:|143-getter|0|143-preInit
exitCommand1 = new Command("\u0412\u044B\u0445\u043E\u0434", Command.EXIT, 0);//GEN-LINE:|143-getter|1|143-postInit
}//GEN-BEGIN:|143-getter|2|
return exitCommand1;
}
COM: <s> returns an initiliazed instance of exit command1 component </s>
|
funcom_train/22034795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void itemStateChanged(ItemEvent e) {
Object source = e.getItemSelectable();
boolean on = (e.getStateChange() == ItemEvent.SELECTED);
if (source == contours) setMainContours(on);
else if (source == labels) setLabels(on);
else if (source == dashed) setContourInterval(-cwContourInterval);
notifyListeners(new WidgetEvent(this));
}
COM: <s> handles checkbox changes </s>
|
funcom_train/33606729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testClosestOnSegment() {
System.out.println("closestOnSegment");
R2 point1 = null;
R2 point2 = null;
R2 instance = new R2();
R2 expResult = null;
R2 result = instance.closestOnSegment(point1, point2);
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of closest on segment method of class r2 </s>
|
funcom_train/22027045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean userInGroup(CmsDbContext dbc, String username, String groupname) throws CmsException {
List groups = getGroupsOfUser(dbc, username);
for (int i = 0; i < groups.size(); i++) {
if (groupname.equals(((CmsGroup)groups.get(i)).getName())) {
return true;
}
}
return false;
}
COM: <s> returns code true code if a user is member of the given group </s>
|
funcom_train/9279680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void xtestMultiExecWithQueryTimeout() throws SQLException {
Statement stmt = createStatement();
stmt.setQueryTimeout(10);
for (int i = 0; i < 33000; ++i) {
ResultSet rs = stmt.executeQuery("VALUES(1)");
rs.close();
}
}
COM: <s> derby 3198 verify that a statement can be executed </s>
|
funcom_train/26490091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getUrlWML() {
if (!supportsWML())
return null;
if (paramstring==null||paramstring.equals(""))
return (new Link(pageId)).toString();
return (new Link(pageId+"?"+paramstring.toString())).toString();
}
COM: <s> returns the link url for wml devices </s>
|
funcom_train/17869295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getDataValidation () {
if (null == dvv_) {
return "";
} else {
StringBuffer sb = new StringBuffer();
for (int dvIndex = 0; dvIndex < dvv_.size(); dvIndex++) {
sb.append(dvv_.elementAt(dvIndex));
}
return sb.toString();
}
};
COM: <s> get the string representation of all data validations </s>
|
funcom_train/18327295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void serializeXHTMLDocumentToURI(String xhtmlOutputURI) {
System.out.println(RESOURCES.getString("outputFile") + xhtmlOutputURI);
LSSerializer serializer = domLSImpl.createLSSerializer();
//serializer.getDomConfig().setParameter("xml-declaration", Boolean.TRUE);
//serializer.getDomConfig().setParameter("format-pretty-print", Boolean.TRUE);
serializer.writeToURI(question, xhtmlOutputURI);
}
COM: <s> this method serializes the whole of code xhtml document code to the </s>
|
funcom_train/20105066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateTaskStatus(final Task task, final TaskStatus status) throws TaskManagerException, InvalidCurrentUserException, BusinessRuleTwoViolationExceptionDependantTasks, BusinessRuleTwoViolationExceptionTask, BusinessRuleThreeViolationExceptionTaskScheduleDoesNotCoverCurrentTime, BusinessRuleThreeViolationExceptionDeadlineExpired{
checkCurrentUserIsOwnerOfTask(task);
((TaskImpl)task).updateTaskStatus(status);
}
COM: <s> updates the status of the specified </s>
|
funcom_train/51413350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void refreshVisibleStates() {
Row row = cmlRoles.getSelectedRow();
if(row != null) {
if(MAspectRoleClass.isPlayedByClass(cmlRoles.getSelectedRow())) {
cmeRoleCBinding.setVisible(true);
pRolePlayedBy.setVisible(true);
cmeRoleVarAccess.setVisible(true);
pRoleGuard.setVisible(true);
}else {
cmeRoleCBinding.setVisible(false);
pRolePlayedBy.setVisible(false);
cmeRoleVarAccess.setVisible(false);
pRoleGuard.setVisible(false);
}
}
}//refreshVisibleStates
COM: <s> refreshes the visible states of all relevant components according to the roleclass data </s>
|
funcom_train/13402265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dispatch(String hostName, ObjectInputStream ois, ObjectOutputStream oos) throws IOException {
Object result = null;
Throwable error = null;
try {
result = dispatch(ois, hostName);
} catch (Throwable ex) {
error = ex;
}
writeResponse(oos, result, error);
}
COM: <s> dispatch of http put request </s>
|
funcom_train/29606855 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void notifyTreeChange() {
Iterator lIter = treeChangeListeners.iterator();
while (lIter.hasNext()) {
TreeChangeListener l = (TreeChangeListener) lIter.next();
TreeChangeEvent ev = new TreeChangeEvent(getTree());
l.treeChanged(ev);
}
return;
}
COM: <s> notifies all registered tree change listeners of a change in the tree </s>
|
funcom_train/13408242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doCameraLookRight(float speed) {
if (cameraJoint == null)
return;
incr.loadIdentity();
incr.fromAngleAxis(speed, lookVec);
cameraJoint.getLocalRotation().fromRotationMatrix(
incr.mult(cameraJoint.getLocalRotation().toRotationMatrix(
tempMa), tempMb));
cameraJoint.getLocalRotation().normalize();
Runtime.getRuntime().fireCameraChangedListener(cameraNode.getCamera());
}
COM: <s> look to the right </s>
|
funcom_train/44612602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void nullify(CompilationUnitDeclaration unit) {
// Q: do we need to retrieve dirty bits of package and import
// statements too? YC
// TODO: do we have three different visit methods for type, one
// for compilation unit scope, another for class scope, and
// the third for block scope?
if (unit.types != null) {
for (TypeDeclaration type: unit.types) {
type.traverse(this, (CompilationUnitScope) null);
}
}
return;
}
COM: <s> retrieves the dirty bits of all the children ast nodes of the </s>
|
funcom_train/38992171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() {
angles = new Vector<Double>();
cursor.setLocation(20, this.getHeight()/2);
path.reset();
path.moveTo(20, this.getHeight()/2);
name = "New Tile 1";
connect = false;
fill = false;
color = Color.RED;
}
COM: <s> resets the editor to a fresh state </s>
|
funcom_train/25915934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onMediaScannerConnected() {
Log.i(TAG, "MediaScannerConnectionClient.onMediaScannerConnected...");
// The next step happens in the UI thread:
mHandler.post(new Runnable() {
public void run() {
LolcatActivity.this.onMediaScannerConnected();
}
});
}
COM: <s> called when a connection to the media scanner service has been established </s>
|
funcom_train/9065285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRscNames(String plusRscPath, String minusRscPath, String leafRscPath) {
if (_imageRegistry != null) {
_imageRegistry.dispose();
_imageRegistry = null;
}
_plusRscName = plusRscPath;
_minusRscName = minusRscPath;
_leafRscName = leafRscPath;
}
COM: <s> set the paths for images to use a symbols </s>
|
funcom_train/16550899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doSynchonization() {
logger.debug("doSynchonization() called");
crawlerstart = System.currentTimeMillis();
try {
crawler.start(
getInitParams().getProperty("start-server"),
getInitParams().getProperty("start-path", "/") );
} catch (Exception e) {
logger.error("Couldn't start crawler - " + e.getMessage());
}
logger.debug("Crawler has finished");
}
COM: <s> starts the crawler to harwest web links determined by the configuration </s>
|
funcom_train/11111700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File createTemporaryFile() throws IOException {
final File file = File.createTempFile("apache-tika-", ".tmp", tmp);
addResource(new Closeable() {
public void close() throws IOException {
if (!file.delete()) {
throw new IOException(
"Could not delete temporary file "
+ file.getPath());
}
}
});
return file;
}
COM: <s> creates and returns a temporary file that will automatically be </s>
|
funcom_train/50083191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void consumeXML(Element element) {
Element fileName = element.getChild(FILEWRITER, XScufl.XScuflNS);
if (fileName == null) {
return;
}
Attribute completeFileName = fileName.getAttribute(FILENAME, XScufl.XScuflNS);
if (completeFileName == null) {
return;
}
try {
this.fileName = completeFileName.getValue();
} catch (Exception ex) {
System.out.println("consumeXML_Exeption" + ex.toString());
}
}
COM: <s> method which gets a xml element and saves the information to this processor </s>
|
funcom_train/43580288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getEarthMineButton() {
if (earthMineButton == null) {
earthMineButton = new JButton();
earthMineButton.setText("Apply");
earthMineButton.setSize(new Dimension(80, 20));
earthMineButton.setLocation(new Point(356, 477));
earthMineButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
setskin(4);
SkinContainer.setLookAndFeel(getskin());
f.repaint();
}
});
}
return earthMineButton;
}
COM: <s> this method initializes earth mine button </s>
|
funcom_train/51418487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSortCriteriaPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_IterationNode_sortCriteria_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_IterationNode_sortCriteria_feature", "_UI_IterationNode_type"),
JetsetPackage.Literals.ITERATION_NODE__SORT_CRITERIA,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the sort criteria feature </s>
|
funcom_train/39564593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected double invHyperDistance(double distance) {
int i;
if (m_inverseHyperbolicFunction[199]<distance)
i=199;
else
i=findIndex(0,199,distance);
double x2=m_inverseHyperbolicFunction[i];
double x1=m_inverseHyperbolicFunction[i-1];
double j=(distance-x1)/(x2-x1);
return (i+j-1)*10.0;
}
COM: <s> computes the inverse of the hyperbolic distance </s>
|
funcom_train/43933856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void returnPendingMessages(RTMPTConnection client, HttpServletResponse resp) throws IOException {
IoBuffer data = client.getPendingMessages(RESPONSE_TARGET_SIZE);
if (data == null) {
// no more messages to send...
if (client.isClosing()) {
// Tell client to close connection
returnMessage((byte) 0, resp);
} else {
returnMessage(client.getPollingDelay(), resp);
}
return;
}
returnMessage(client, data, resp);
}
COM: <s> send pending messages to client </s>
|
funcom_train/12698595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getParagraphs( int amount ) {
StringBuilder lorem = new StringBuilder();
for( int i = 0; i < amount; i++ ) {
lorem.append( LOREM_IPSUM );
if ( i < amount - 1 ) {
lorem.append( "\n\n" );
}
}
return lorem.toString();
}
COM: <s> returns paragraphs of lorem ipsum </s>
|
funcom_train/26570559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void storeValues() {
lastPosition.setX(sprite.getPosition().getX());
lastPosition.setY(sprite.getPosition().getY());
lastInsideTileX = insideTileX;
lastInsideTileY = insideTileY;
lastCurrentTileX = currentTileX;
lastCurrentTileY = currentTileY;
}
COM: <s> saves the current position values </s>
|
funcom_train/37592651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isTopLevelGroupSelected() {
assert (EventQueue.isDispatchThread() || Utilities.TEST_MODE);
TreePath[] ps = getSelectionPaths();
if (ps == null) { return false; }
for(TreePath p: ps) {
TreeNode n = (TreeNode) p.getLastPathComponent();
if (n instanceof GroupNode<?>) { return true; }
}
return false;
}
COM: <s> returns true if at least one top level group is selected </s>
|
funcom_train/12547938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void changeView(String name) {
if (name.equals("Noninverted Tree")) {
treeDerivationLayout.first(treeDerivationPane);
treeDrawer.setInverted(false);
treePanel.repaint();
} else if (name.equals("Inverted Tree")) {
treeDerivationLayout.first(treeDerivationPane);
treeDrawer.setInverted(true);
treePanel.repaint();
} else if (name.equals("Derivation Table")) {
treeDerivationLayout.last(treeDerivationPane);
}
}
COM: <s> changes the view </s>
|
funcom_train/12301650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean save() {
System.out.println("File: " + configFile);
try {
XMLEncoder xmlStore = new XMLEncoder(new BufferedOutputStream(
new FileOutputStream(configFile)));
xmlStore.writeObject(this);
xmlStore.close();
} catch (Exception eX) {
System.out
.println("Exception thrown when trying to save configuration file using an XML encoder: ");
System.out.println(eX.toString());
System.out.println("File: " + configFile);
return false;
}
return true;
}
COM: <s> save the configuration file </s>
|
funcom_train/17766386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Delivery getDeliveryByID(int deliveryID) {
try {
Delivery d = em.find(Delivery.class, deliveryID);
return d;
} catch (NullPointerException ex) {
//System.err.println("Cannot find entity....");
return null;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
COM: <s> get delivery entity by its id </s>
|
funcom_train/10520478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ArrayList gatherFromArchive(File zip) {
ZipScanner zs = new ZipScanner();
zs.setBasedir(zip);
zs.setIncludes(patterns.getIncludePatterns(getProject()));
zs.setExcludes(patterns.getExcludePatterns(getProject()));
zs.scan();
String[] included = zs.getIncludedFiles();
return testClassNameFromFile(included);
}
COM: <s> return the list of classnames from a zipfile that match </s>
|
funcom_train/2321559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public class gs_main_instance extends PointerType {
public Object fromNative(Object arg0, FromNativeContext arg1) {
return super.fromNative(arg0, arg1);
}
public static class ByReference extends PointerByReference {
public Object fromNative(Object arg0, FromNativeContext arg1) {
return super.fromNative(arg0, arg1);
}
}
}
COM: <s> pointer holding a native ghostscript instance </s>
|
funcom_train/29720040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectNodeActionListener(ActionEvent evt) {
FacesContext context = FacesContext.getCurrentInstance();
Map map = context.getExternalContext().getRequestParameterMap();
String nodeId = (String) map.get("nodeId");
String pageId = (String) map.get("pageId");
this.selectNodeToShow(nodeId, pageId);
}
COM: <s> action listener on a node of the tree </s>
|
funcom_train/42877045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return new StringBuffer("[tag size] ").append(tagSize).append('\t').append("[recordSize] ").append(recordSize).append('\t').append("[listType] ").append(listType).toString();
}
COM: <s> puts the listholder to a string </s>
|
funcom_train/18136603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInputPortIndex(InputPort inputPort, int index) {
List<InputPort> oldOrder = new ArrayList<InputPort>(inputPortOrder);
inputPortOrder.remove(inputPort);
inputPortOrder.add(index, inputPort);
propertyChangeSupport.firePropertyChange(new PropertyChangeEvent(this,
Task.INPUT_PORTS_FIELD, oldOrder, inputPortOrder));
}
COM: <s> method for setting the position of the input port </s>
|
funcom_train/1458708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public static void createAndUseTempFile(String tempFilePrefix, String tempFileSuffix, TempFileUser tempFileUser) throws Exception {
File tempFile = null;
try {
tempFile = File.createTempFile(tempFilePrefix, tempFileSuffix);
String tempFileName = tempFile.getCanonicalPath();
tempFileUser.useTempFile(tempFileName);
} finally {
attemptTempFileDelete(tempFile);
}
}
COM: <s> creates a temporary file and allows a temp file user to use it </s>
|
funcom_train/28112944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean match(int[] keys) {
boolean result = false;
int[] matchedKeys = this.matches(keys);
if (matchedKeys != null) {
// and match
if (andMatch && matchedKeys.length == keys.length)
result = true;
else if (!andMatch)
result = true;
}
return result;
}
COM: <s> performs the actual checks to compare query keys to the protocol own key </s>
|
funcom_train/33831417 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ObjectArrayAssert doesNotHaveDuplicates() {
isNotNull();
Collection<?> actualAsList = list(actual);
Collection<?> duplicates = duplicatesFrom(actualAsList);
if (!duplicates.isEmpty())
fail(concat("array:", actualInBrackets(), " contains duplicate(s):", inBrackets(duplicates)));
return this;
}
COM: <s> verifies that the actual code object code array does not have duplicates </s>
|
funcom_train/51639723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int computeVisualLength(CharSequence seq) {
int size= 0;
int tablen= getVisualTabLengthPreference();
for (int i= 0; i < seq.length(); i++) {
char ch= seq.charAt(i);
if (ch == '\t') {
if (tablen != 0)
size += tablen - size % tablen;
// else: size stays the same
} else {
size++;
}
}
return size;
}
COM: <s> returns the visual length of a given code char sequence code taking into </s>
|
funcom_train/1320793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startProcess(IProgressDialog process) {
this.process = process;
this.setReady(false);
this.setCancel(false);
this.setProgress(0L);
this.setShow(true);
SessionRenderer.addCurrentSession(this.renderGroup);
threadPool.execute(new updateThread());
}
COM: <s> initialize the progress dialog </s>
|
funcom_train/37235404 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("NRDMStoreDataProvider".equals(portName)) {
setNRDMStoreDataProviderEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/16748158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isImageAvailable (String src) {
// get the path of the file in which the <img> tag was used
IPath path = Activator.getDefault().getMyProject().getLocation();
// construct a File object to check if the image exists or not
File available = new File(path.toOSString() + File.separator + src);
return available.exists();
}
COM: <s> this method checks if a passed image file exists or not </s>
|
funcom_train/19073349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Pattern fwdGet() {
Pattern pat;
synchronized (getFwdLock()) {
while (items == 0) {
try {
fwdLock.wait();
} catch (InterruptedException e) {
return null;
}
}
pat = (Pattern)fifo.pop();
items = fifo.size();
fwdLock.notifyAll();
return pat;
}
}
COM: <s> return the first element of the fifo structure if exists </s>
|
funcom_train/51205806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JFieldFk fObjID_CatalogType() throws JException {
if(m_fObjID_CatalogType == null) {
m_fObjID_CatalogType = new JFieldFk("CatalogType", this, new CatalogType());
}
return m_fObjID_CatalogType;
}
COM: <s> catalogtype always filter on the catalogtype </s>
|
funcom_train/22900858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int readIntVar(String line) {
try {
line = line.substring(line.indexOf("=") + 1, line.length());
return Integer.parseInt(line);
} catch (NumberFormatException ex) {
System.err.println("ERROR IN LOADING CONFIG! Letters found where numbers should be! " + ex.getMessage());
return -1;
}
}
COM: <s> reads a line a file and returns its int value </s>
|
funcom_train/10500170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String evaluate() {
validate();
if (url != null) {
return getUrl();
}
if (makeURL) {
try {
return FILE_UTILS.getFileURL(file).toExternalForm();
} catch (MalformedURLException e) {
throw new BuildException(ERROR_NO_URL_CONVERT + file);
}
}
return file.toString();
}
COM: <s> validate our settings </s>
|
funcom_train/13224065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BasicHttpProcessor copy() {
BasicHttpProcessor clone = new BasicHttpProcessor();
if (this.requestInterceptors != null) {
clone.requestInterceptors = new ArrayList(this.requestInterceptors);
}
if (this.responseInterceptors != null) {
clone.responseInterceptors = new ArrayList(this.responseInterceptors);
}
return clone;
}
COM: <s> creates a copy of this instance </s>
|
funcom_train/14354365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getSettingsMenueItem() {
if (settingsMenueItem == null) {
settingsMenueItem = new JMenuItem();
settingsMenueItem.setText("Settings");
settingsMenueItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
SettingDialog dial = new SettingDialog();
dial.setVisible(true);
}
});
}
return settingsMenueItem;
}
COM: <s> this method initializes settings menue item </s>
|
funcom_train/47398849 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void valueChanged(TreeSelectionEvent e) {
TreePath path = e.getPath();
if(path != null) {
DefaultMutableTreeNode node = (DefaultMutableTreeNode)path.getLastPathComponent();
File dir = (File)node.getUserObject();
m_dirText.setText(dir.getAbsolutePath());
}
}
COM: <s> write the dir selection in the text field </s>
|
funcom_train/37768447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parse() throws IOException, SQLException {
// write the initial XML
initialXml();
// add the field info
writeFields();
// add the relationship info
if (m_doNotOverwriteExistingRelationships && m_existingDomainObject != null)
writeExistingRelationships();
else
writeRelationships();
// write the final XML
finalXml();
m_writer.flush();
}
COM: <s> this will write the following xml into the input writer </s>
|
funcom_train/9542863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addPlot(Plot plot) {
if (isSourceNodeSelected()) {
SourceTreeNode node = (SourceTreeNode) getSelectedTreeNode();
Source sourc = node.getSource();
PlotTreeNode child = new PlotTreeNode(plot);
treemodel.insertNodeInto(child, node, node.getChildCount());
sourc.addPlot(plot);
refresh();
JViTo.getApplication().setDirty();
return true;
}
return false;
}
COM: <s> adds a plot to the navigator </s>
|
funcom_train/49460867 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setTodo() throws Exception{
Db db = getDb();
try {
db.enter();
for (Date d : datesTodo) {
Todo.setTodo(db, "com.entelience.report.mim.vpn.AuthenticationSystemReport", d);
// Sets the max event date (needed for probe history)
isDateImported(d);
}
}
finally {
db.exit();
}
}
COM: <s> sets the report </s>
|
funcom_train/16476136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BenchmarkField getFieldByPath(BenchmarkField root, String field_id) {
if(field_id != null) { // should specify a file
BenchmarkField[] all_file_fields = root.getFieldsByPath(field_id); //root.getAllFieldsByType(field_id);
if((all_file_fields == null) || (all_file_fields.length == 0)) return null;
else {
return all_file_fields[0];
}
}
// parameter was null
return null;
}
COM: <s> locate the relevant field within another field </s>
|
funcom_train/23012540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyStatus(int code, Object obj) {
if ((!isKilled) && isProjectLoaded() && code == SP_NET_STOP && obj == null) {
loadedExtent = new FloatRectangle(project.maxExtent);
zoomToFullExtent();
updateMap();
}
}
COM: <s> this method is used by key map to stay in full map extent </s>
|
funcom_train/11724069 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void notifyUpdated(boolean modified) {
// copy listeners to array to avoid ConcurrentModificationException
ItemLifeCycleListener[] la = listeners.values().toArray(new ItemLifeCycleListener[listeners.size()]);
for (int i = 0; i < la.length; i++) {
if (la[i] != null) {
la[i].itemUpdated(this, modified);
}
}
}
COM: <s> notify the listeners that this instance has been updated </s>
|
funcom_train/15721484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseExternallyDefinedRuleNode(RuleSet ruleSet, Node ruleNode) throws RuleSetNotFoundException {
Element ruleElement = (Element) ruleNode;
String ref = ruleElement.getAttribute("ref");
if (ref.endsWith("xml")) {
parseRuleNodeWithExclude(ruleSet, ruleElement, ref);
} else {
parseRuleNodeWithSimpleReference(ruleSet, ref);
}
}
COM: <s> process a reference to a rule </s>
|
funcom_train/2969963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFindByUserName() {
try {
String userName = "funkyboy";
MemberProcess memberProcess = new MemberProcess();
SessionFactory factory = getSessionFactory();
memberProcess.setSessionFactory(factory);
MemberInfo member = memberProcess.findByUserName(userName);
} catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> tests finding a member by user name </s>
|
funcom_train/11687906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProperty(String key, Object value) {
if (key != null && value != null) {
if (isClusteringEnabled) {
Replicator.setAndReplicateState(PROPERTY_KEY_PREFIX + key, value, cfgCtx);
} else {
localProperties.put(key, value);
}
}
}
COM: <s> store a property in the algorithm context </s>
|
funcom_train/16580781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getPCenterPolar() {
if (pCenterPolar == null) {
lblNum = new JLabel();
lblNum.setText("num_elementos");
pCenterPolar = new JPanel();
pCenterPolar.add(lblNum, null);
pCenterPolar.add(getTxtNum(), null);
pCenterPolar.add(getChbRotateElements(), null);
}
return pCenterPolar;
}
COM: <s> this method initializes p center polar </s>
|
funcom_train/25342182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void synchronize() throws IOException, JSONException {
log.info("synchronize");
try {
this.titleService.synchronize();
this.playlistService.synchronize();
this.schedule.synchronize();
} catch (IOException e) {
log.error("error during synchronization", e);
throw e;
} finally {
this.updateStatus(null);
}
}
COM: <s> synchronizes against the laut </s>
|
funcom_train/32154336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setNewOrder(IntArray newOrder) {
if (this.agentsOrder.equals(newOrder))
return false;
if (this.myAgent.agentView != null) {
HashSet<IntExternalVar> view = this.myAgent.agentView.getSetOfExternalVars();
this.agentsOrder = newOrder;
this.myAgent.agentView.refresh(view);
} else
this.agentsOrder = newOrder;
return true;
}
COM: <s> set the agent order to the given order </s>
|
funcom_train/2636003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void inject(Object object) throws InjectorException {
try {
Object fieldValue = provider.provide(field.getType(), field.getName(), annotation);
field.set(object, fieldValue);
} catch (Exception exc) {
throw new InjectorException("Set " + object.getClass() + "." + field.getName() + " failed", exc);
}
}
COM: <s> inject objects field </s>
|
funcom_train/9978085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createGroup6() {
GridData gridData23 = new GridData();
gridData23.horizontalSpan = 2;
gridData23.verticalAlignment = GridData.FILL;
gridData23.grabExcessHorizontalSpace = true;
gridData23.grabExcessVerticalSpace = true;
gridData23.horizontalAlignment = GridData.FILL;
group6 = new Group(composite, SWT.NONE);
group6.setLayout(new GridLayout());
group6.setLayoutData(gridData23);
createParamsPanel1();
group6.setText("Parameters");
}
COM: <s> this method initializes group6 </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.