__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/28298165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showPupUpMenu(MouseEvent e) {
TransBaseMap map=mainPane.getMap();
if (map!=null) {
setPopUpMenu(map);
if (popup!=null) popup.show(e.getComponent(), e.getX(), e.getY());
}
}
COM: <s> shows the popup menu </s>
|
funcom_train/10666018 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int testCreateInitCtx() {
env = null;
initCtx = null;
echo("DYNAMIC_KEY=" + DYNAMIC_KEY);
try {
getInitCtx();
echo(getEnv());
} catch (NamingException e) {
e.printStackTrace();
return fail(e);
}
return pass();
}
COM: <s> sets environment properties and creates initial context object </s>
|
funcom_train/43672310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean incorporate(BasicEvent oldEvent) {
// if( (oldEvent instanceof NodeEvent) &&
// (this.getSource() == oldEvent.getSource()) &&
// (this.getID() == oldEvent.getID()) ) {
//
// return ((NodeEvent) oldEvent).nodeID == this.nodeID;
//
// } else
return false;
}
COM: <s> used by the code event manager code to fuse successive events together </s>
|
funcom_train/49200614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAlternativeStartSlidePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Slide_alternativeStartSlide_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Slide_alternativeStartSlide_feature", "_UI_Slide_type"),
TransformedPackage.Literals.SLIDE__ALTERNATIVE_START_SLIDE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the alternative start slide feature </s>
|
funcom_train/25063291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean selectTab(int index) {
checkTabIndex(index);
if (tabListeners != null) {
if (!tabListeners.fireBeforeTabSelected(this, index))
return false;
}
setSelectionStyle(selectedTab, false);
selectedTab = panel.getWidget(index + 1);
setSelectionStyle(selectedTab, true);
if (tabListeners != null)
tabListeners.fireTabSelected(this, index);
return true;
}
COM: <s> programmatically selects the specified tab </s>
|
funcom_train/3493094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getNewLinks(HTMLPage page) {
List links = page.getOutLinks();
URL url = page.getLink().getURL();
ListIterator iterator = links.listIterator();
while(iterator.hasNext()) {
Link link = (Link)iterator.next();
if(!url.getHost().equals(link.getURL().getHost()))
iterator.remove();
else if (!link.getURL().getPath().startsWith(getDirectory(firstURL)))
iterator.remove();
}
return links;
}
COM: <s> gets links from the page that are in or below the starting </s>
|
funcom_train/37903996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int xupdate(String collectionName, byte[] xupdate) throws PermissionDeniedException, EXistException {
try {
return xupdate(XmldbURI.xmldbUriFor(collectionName), new String(xupdate, DEFAULT_ENCODING));
} catch (Throwable e) {
handleException(e);
return -1;
}
}
COM: <s> the method code xupdate code </s>
|
funcom_train/16910426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getResolvedError() {
HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
String error = "";
Throwable ex = (Throwable) request.getAttribute("javax.servlet.error.exception");
if (ex != null) {
while (ex.getCause() != null) {
ex = ex.getCause();
}
if (ex instanceof PermissionDeniedException) {
error = ((PermissionDeniedException) ex).toString(request);
} else {
error = ex.toString();
}
}
return error;
}
COM: <s> looks for an error in the current request attributes and resolves it </s>
|
funcom_train/19767274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel() {
if (jPanel == null) {
jPanel = new JPanel();
jPanel.setLayout(new BorderLayout(0, 5));
jPanel.setBounds(new java.awt.Rectangle(18,118,557,227));
jPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(3, 3,
0, 3));
jPanel.add(getJScrollPane(), java.awt.BorderLayout.CENTER);
}
return jPanel;
}
COM: <s> this method initializes j panel </s>
|
funcom_train/11024414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetIndexedArguments() {
try {
bean.set("intArray", -1, new Integer(0));
fail("Should throw IndexOutOfBoundsException");
} catch (IndexOutOfBoundsException e) {
// Expected response
} catch (Throwable t) {
fail("Threw " + t + " instead of IndexOutOfBoundsException");
}
}
COM: <s> corner cases on set indexed property invalid arguments </s>
|
funcom_train/14093075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDragEventData1() {
m_event1 = new DragEventData(this, SRC1);
validate(m_event1, this, SRC1, null, DEFAULT_SLEEPTIME);
m_event2 = new DragEventData(this, SRC2);
validate(m_event2, this, SRC2, null, DEFAULT_SLEEPTIME);
}
COM: <s> test constructor 1 </s>
|
funcom_train/25086962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPinCountPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PicDioConfig_pinCount_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PicDioConfig_pinCount_feature", "_UI_PicDioConfig_type"),
dioPackage.Literals.PIC_DIO_CONFIG__PIN_COUNT,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the pin count feature </s>
|
funcom_train/50865868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void displayMission(TravelMission mission, Coordinates mapCenter, String mapType, Graphics g) {
for (int x = 0; x < mission.getNumberOfNavpoints(); x++) {
NavPoint navpoint = mission.getNavpoint(x);
displayNavpoint(navpoint, mapCenter, mapType, g);
}
}
COM: <s> displays the navpoints in a travel mission </s>
|
funcom_train/3158276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBounds(int x, int y, int width, int height) {
_compLocX = x;
_compLocY = y;
if (_dblbufImg != null
&& (_dblbufImg.getWidth() != width
|| _dblbufImg.getHeight() != height)) {
_dblbufImg = null;
_dblbufG2D = null;
}
super.setBounds(x, y, width, height);
}
COM: <s> moves and resizes this component </s>
|
funcom_train/18747602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Edge createEdge(Node[] ends, Map<String,String> attributes) {
if (ends.length == BinaryEdge.END_COUNT) {
return new AttributeEdge2(ends, new AttributeLabel(attributes));
} else {
return new AttributeEdge1(ends, new AttributeLabel(attributes));
}
}
COM: <s> callback factory method to create an attribute edge with given ends and </s>
|
funcom_train/45792759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getVisitAuditCount() {
ArrayList list = (ArrayList) getHibernateTemplate().find("select count(id) from org.spirit.bean.impl.BotListUserVisitLog");
if (list == null)
return -1;
if (list.get(0) instanceof java.lang.Integer) {
return ((Integer) list.get(0)).longValue();
} else {
return -1;
}
}
COM: <s> get the total users visited </s>
|
funcom_train/21616528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void priceGetHistory(String cur1, String cur2, int limit, int bType) {
Price price = PriceController.getInstance().getPrice(cur1, cur2);
if (price == null)
printError(cur1+"/"+cur2+" does not exist", 4);
else {
try {
printArray(price.historyToString(limit, bType));
} catch (SQLException e) {
printError("Could not get price history", 3);
}
}
}
COM: <s> get the history of a given price </s>
|
funcom_train/3768093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String format(LogRecord rec) {
String str = rec.getLoggerName();
int temp = str.lastIndexOf(".");
if (temp != -1) {
str = str.substring(temp + 1);
}
return rec.getLevel().getName() + ": " + str + ": " + rec.getMessage() +
"\n";
}
COM: <s> format the given log record and return the formatted string </s>
|
funcom_train/800948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init(ReactionEditor page) {
this.setLayout(new FillLayout());
drawingPanel = new DrawingPanel(this.getDisplay());
IChemModel model = null;
model = page.getModelFromEditorInputMolecule();
jcpModel = new JChemPaintModel(model);
drawingPanel.setJChemPaintModel(jcpModel);
// jcpModel.activate();
registerSpecMolController();
jcpModel.getRendererModel().addCDKChangeListener(page);
}
COM: <s> initializes the composite itself creates drawing panel and jcp model </s>
|
funcom_train/30075798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ModelAndView departmentsHandler(HttpServletRequest request, HttpServletResponse response) throws ServletException {
Map model = new HashMap();
model.put("departments", gpir.getDepartments());
model.put("institutions", gpir.getInstitutions());
return new ModelAndView("departmentsView", "model", model);
}
COM: <s> custom handler for departments display </s>
|
funcom_train/19367512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNormalisedString(String s) {
switch (this) {
case REPLACE:
return s.replaceAll("\\t|\\n|\\r", " ");
case COLLAPSE:
return REPLACE.getNormalisedString(s).replaceAll("\\s+", " ").trim();
default:
return s;
}
}
COM: <s> gets the normalised version of a string </s>
|
funcom_train/32748104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateData(RasterDocument data) {
this.setExternalGL(data.getDisplayGridLimits());
this.bufBpmPts.setBufferLength(data.getDataBufferSize());
this.bufBpmPts.setPointSize(data.getBpmPointSize());
this.drawEllipse(data);
this.refreshGraphJPanel();
}
COM: <s> the application data has changed so we must reformate the grid </s>
|
funcom_train/7612359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void assertTopAligned(View first, View second) {
int[] xy = new int[2];
first.getLocationOnScreen(xy);
int firstTop = xy[1];
second.getLocationOnScreen(xy);
int secondTop = xy[1];
assertEquals("views are not top aligned", firstTop, secondTop);
}
COM: <s> assert that two views are top aligned that is that their top edges </s>
|
funcom_train/21848130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ImageIcon loadImage(String imageName) {
try {
ClassLoader classloader = getClassLoader();
java.net.URL url = classloader.getResource(imageName);
if (url != null) {
ImageIcon icon = new ImageIcon(url);
return icon;
} else {
System.err.println("AppResourceLoader.loadImage failed: " + imageName);
}
} catch (Exception e) {
System.err.println("AppResourceLoader.loadImage failed: " + imageName);
e.printStackTrace();
}
return getEmptyIcon();
}
COM: <s> helper utility to load an image file from the application images directory </s>
|
funcom_train/1058668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addWhiteboardFilePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Posterboard_whiteboardFile_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Posterboard_whiteboardFile_feature", "_UI_Posterboard_type"),
PosterboardPackage.Literals.POSTERBOARD__WHITEBOARD_FILE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the whiteboard file feature </s>
|
funcom_train/7280584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMsgNone() throws Exception {
UDPCrawlerPing msgNone = new UDPCrawlerPing(new GUID(GUID.makeGuid()), 0, 0,(byte)0);
UDPCrawlerPong reply = crawlerPongFactory.createUDPCrawlerPong(msgNone);
byte[] payload = reply.getPayload();
assertEquals(0,payload[0]);
assertEquals(0,payload[1]);
}
COM: <s> sends a message requesting 0 leafs and 0 ups </s>
|
funcom_train/20622632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void loadModule(String moduleName) {
UserManagerModule mod = createModule(moduleName);
if (mod != null) {
getLoadedModules().addElement (mod);
// done: the module should evrthing it needs from this method call ...
mod.initModule(getModuleMgr());
}
}
COM: <s> loads a module with the given name </s>
|
funcom_train/21336727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void noOrderExecution2Phases() {
// execute one phase
oe.execute();
checkUnitMove(new Coords(2,1), 1);
checkUnitMove(new Coords(8, 6), 2);
Assert.assertFalse("One mvt to execute", oe.isTerminated());
// second phase
oe.execute();
checkUnitMove(new Coords(3, 1), 1);
checkUnitMove(new Coords(8, 7), 2);
/*
* No more unit to move.
*/
Assert.assertTrue("No mvt to execute", oe.isTerminated());
}
COM: <s> no order is a mvt order </s>
|
funcom_train/7777708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void delete (HttpServletRequest request, HttpServletResponse response) throws IOException {
String username = request.getParameter("username");
String password = request.getParameter("password");
PrintWriter out = response.getWriter();
try {
PatronAccountControl pc = new PatronAccountControl();
pc.delete(username, password);
out.println(getSuccess().toXML());
} catch (ErrorBean e) {
out.println(e.toXML());
}
}
COM: <s> passes the id of the reservation to be deleted to </s>
|
funcom_train/40392974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addGeneSymbol(java.lang.String param){
if (localGeneSymbol == null){
localGeneSymbol = new java.lang.String[]{};
}
java.util.List list =
org.apache.axis2.databinding.utils.ConverterUtil.toList(localGeneSymbol);
list.add(param);
this.localGeneSymbol =
(java.lang.String[])list.toArray(
new java.lang.String[list.size()]);
}
COM: <s> auto generated add method for the array for convenience </s>
|
funcom_train/31936518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean readElement(IConfigurationElement element) {
String tagName = element.getName();
if (tagName.equals(TAG_OBJECT_CONTRIBUTION)) {
processObjectContribution(element);
return true;
}
if (tagName.equals(ViewerActionBuilder.TAG_CONTRIBUTION_TYPE)) {
return true;
}
return false;
}
COM: <s> implements abstract method to handle configuration elements </s>
|
funcom_train/41776876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getStringByNull(long virtualAddress) {
StringBuilder builder = new StringBuilder();
byte[] tt = new byte[1];
for (long i = virtualAddress; (tt[0] = memory[memoryMap(i)]) != 0; i++) {
builder.append(new String(tt));
}
if (log.isDebugEnabled()) {
log.debug(builder.toString());
}
return builder.toString();
}
COM: <s> the string ended in first null byte </s>
|
funcom_train/4689742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getPathToInitialWsdl() {
IWizard wizard = getWizard();
if (wizard instanceof NewWizard) {
IStructuredSelection selection = ((NewWizard) wizard)
.getSelection();
if ((selection != null) && !selection.isEmpty()) {
Object obj = selection.getFirstElement();
if (obj instanceof IFile) {
IFile file = (IFile) obj;
if (WSDL.equals(file.getFileExtension())) {
return file.getLocation().toOSString();
}
}
}
}
return null;
}
COM: <s> method returns path to initially selected wsdl if any </s>
|
funcom_train/43605579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void finishPass(Pass p, boolean okay) {
List passes = passes();
status &= okay;
for (int i = nextPass; i < passes.size(); i++) {
Pass pass = (Pass) passes.get(i);
if (pass == p) {
nextPass = i + 1;
return;
}
}
throw new InternalCompilerError("Pass " + p + " was not a pending " +
"pass.");
}
COM: <s> inform this code job code that pass code p code has finished </s>
|
funcom_train/26224163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RngCommand (String sessionID, String address, String authnProtocol, String cookie, String userName, String friendlyName) {
String[] args = new String[6];
args[0] = sessionID;
args[1] = address;
args[2] = authnProtocol;
args[3] = cookie;
args[4] = userName;
args[5] = friendlyName;
setArgs(args);
setTransactionID (-1);
}
COM: <s> creates a new rng command </s>
|
funcom_train/784959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Shape triangle_left(float x, float y, float height) {
m_path.reset();
m_path.moveTo(x+height, y);
m_path.lineTo(x+height, y+height);
m_path.lineTo(x, y+height/2);
m_path.closePath();
return m_path;
}
COM: <s> returns a left pointing triangle of the given dimenisions </s>
|
funcom_train/13596846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnAdd() {
if (btnAdd == null) {
btnAdd = new JButton(Messages.getString("GeneralUI.ButtonAdd")); //$NON-NLS-1$
btnAdd.setName("btnAdd"); //$NON-NLS-1$
btnAdd.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
addEditWord(true);
}
});
}
return btnAdd;
}
COM: <s> this method initializes j button3 </s>
|
funcom_train/18513118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element createElement(String tagName) throws DOMException {
if (errorChecking && !isXMLName(tagName, true)) { throw new DOMException(
DOMException.INVALID_CHARACTER_ERR, "DOM002 Illegal character"); }
ElementImpl result = new ElementImpl(this, tagName);
return result;
}
COM: <s> creates an element having this document as its owner doc </s>
|
funcom_train/3730629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unbatch() {
task.log("--> Scheduler.unbatch", Project.MSG_VERBOSE);
for (int i = 0; i < batchTests.size(); i++) {
((BatchTest)batchTests.elementAt(i)).unbatch(this);
}
batched = false;
batchTests = new Vector();
}
COM: <s> pass through the list of batch tests creating individual tests </s>
|
funcom_train/39537177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getPixelledNumber(String str){
double i=0;
if(str!=null && ! str.equals("")){
if(! Character.isDigit(str.charAt(str.length()-1))){
String unit=str.substring(str.length()-2, str.length());
String nb=str.substring(0, str.length()-2);
try{
i=Double.parseDouble(nb);
}catch (Exception ex){}
if(unit.equals("cm")){
i=i*28.340080972;
}else if(unit.equals("mm")){
i=i*2.830188679;
}
}else{
try{
i=Double.parseDouble(str);
}catch (Exception ex){}
}
}
return i;
}
COM: <s> computed the number corresponding to this string in pixel </s>
|
funcom_train/31415949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void flush() throws IOException {
try {
m_WriteLock.acquire();
m_BaseIO.flush();
} catch (InterruptedException ex) {
Activator.getServices().error("flush()", ex);
} finally {
m_WriteLock.release();
}
}//flush (implements the famous iToilet)
COM: <s> method to flush the low level buffer </s>
|
funcom_train/18428020 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ServoKeyFrames recalculateFrameNumbers(ServoKeyFrames frames) {
Iterator frameIt = frames.keyFrames.iterator();
KeyFrame actual;
int evolutionFrameNumber = 0;
while (frameIt.hasNext()) {
actual = (KeyFrame) frameIt.next();
int temp = actual.frameNumber;
actual.frameNumber += evolutionFrameNumber;
evolutionFrameNumber += temp;
}
return frames;
}
COM: <s> transforms the fram numbers of the given servo key frames to board coordinates </s>
|
funcom_train/17827094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAlias (Alias alias) {
for (int i = 0; i < aliases.size(); i++) {
if (alias.getName().equals(aliases.get(i).getName())) {
aliases.remove(i);
break;
}
}
aliases.add(alias);
}
COM: <s> adds an alias to this manager </s>
|
funcom_train/1011735 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void kspecinit(Knotvector knotvector) {
// DONE
this.kspec = new Knotspec();
kspec.inkbegin = new CArrayOfFloats(knotvector.knotlist, 0);
kspec.inkend = new CArrayOfFloats(knotvector.knotlist,
knotvector.knotcount);
kspec.prestride = knotvector.stride;
kspec.order = knotvector.order;
kspec.next = null;
}
COM: <s> initializes knotspec according to knotvector </s>
|
funcom_train/23869636 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void accomodateRoutedNet(Net net){
for(PIP p : net.getPIPs()){
router.setWireAsUsed(p.getTile(), p.getStartWire(), net);
router.setWireAsUsed(p.getTile(), p.getEndWire(), net);
router.markIntermediateNodesAsUsed(p, net);
}
}
COM: <s> some designs may already have some routed nets </s>
|
funcom_train/42715489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setActiveTab(String id) {
TabFolder folder = (TabFolder) screen.getWidget("main_tabfolder");
TabItem tabItem = (TabItem) screen.getWidget(id + "Tab");
folder.setCurrentTabItem(tabItem);
/* while(!folder.getCurrentTabItem().equals(tabItem))
{
folder.selectNextTab();
}
*/ }
COM: <s> shows the active tab </s>
|
funcom_train/20602698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Move pMove(final Coord source, final Coord destination) {
assert(source != null);
assert(destination != null);
final Move m = new Move(this, source, destination);
if (isLastPossibleStep(destination)){
m.transformMovingPieceTo(getMyQueenPiece());
}
return m;
}
COM: <s> move a pawn from its source to its destination </s>
|
funcom_train/48663521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel() {
if (jPanel == null) {
GridBagConstraints gridBagConstraints26 = new GridBagConstraints();
gridBagConstraints26.gridx = 1;
gridBagConstraints26.gridy = 0;
jPanel = new JPanel();
jPanel.setLayout(new GridBagLayout());
jPanel.add(getJRadioButton(), new GridBagConstraints());
jPanel.add(getJRadioButton1(), gridBagConstraints26);
}
return jPanel;
}
COM: <s> this method initializes j panel </s>
|
funcom_train/16769072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sendRecordStopNotify() {
Status stopStatus = new Status(StatusCodes.NS_RECORD_STOP);
stopStatus.setClientid(getStreamId());
stopStatus.setDetails(getPublishedName());
StatusMessage stopMsg = new StatusMessage();
stopMsg.setBody(stopStatus);
try {
connMsgOut.pushMessage(stopMsg);
} catch (IOException err) {
log.error("Error while pushing message.", err);
}
}
COM: <s> sends record stop notifications </s>
|
funcom_train/13866347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addItemElement(Element tdElem) {
Element tr;
if (vertical) {
tr = DOM.createTR();
DOM.appendChild(body, tr);
} else {
tr = DOM.getChild(body, 0);
}
DOM.appendChild(tr, tdElem);
}
COM: <s> physically add the td element of a </s>
|
funcom_train/17142565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double distanceToPoint(CPointInt point) {
if (orthogonalVector == null)
orthogonalVector = (CPointInt) Calculator2D.hatPoint(relativeVector);
double distanceOfStartPoint = Calculator2D.dotProduct(orthogonalVector,startPoint);
double distanceOfPoint = Calculator2D.dotProduct(orthogonalVector,startPoint);
return distanceOfPoint - distanceOfStartPoint;
}
COM: <s> same unnormalized point distance to line used in splitting line </s>
|
funcom_train/9663454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setCurrentPageNumber(int page) {
Pageable pageable = getModel();
if (page < pageable.getTotalPagesNumber())
pageable.setCurrentPageNumber(page);
if (isPageNumberBoxDisplayed())
getPageNumber().setText(String.valueOf(page + 1));
display();
}
COM: <s> setter for property current page number </s>
|
funcom_train/37520486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int drawUnselectedText(Graphics g, int x, int y, int p0, int p1) throws BadLocationException {
g.setColor(unselected);
Document doc = getDocument();
Segment s = SegmentCache.getSharedSegment();
doc.getText(p0, p1 - p0, s);
int ret = Utilities.drawTabbedText(s, x, y, g, this, p0);
SegmentCache.releaseSharedSegment(s);
return ret;
}
COM: <s> renders the given range in the model as normal unselected text </s>
|
funcom_train/3674621 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ActionTransform findTransform(String name) {
// First, check our locally defined transforms
ActionTransform transform = transforms.findTransform(name);
if (transform != null) {
return (transform);
}
// Second, check the globally defined transforms
//return (getMappings().getServlet().findTransform(name));
return null;
}
COM: <s> return the code action transform code with the specified name if any </s>
|
funcom_train/34710352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void enableUi(final boolean enabled) {
this.btnAdvancedOptions.setEnabled(enabled);
this.btnSetScanFolder.setEnabled(enabled);
this.inpFetchMetadata.setEnabled(enabled);
this.btnDoScan.setEnabled(enabled);
this.btnDoImportMovies.setEnabled(enabled);
}
COM: <s> used by scan start stop to en disable whole user interface </s>
|
funcom_train/3710942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void undoLastRange() {
if (rangeLast > 0) {
rangeLast--;
recomputeRanges = true;
recomputeValuesInRanges();
if (notify) {
setChanged();
notifyObservers(new RangeData(rangeLast, averageWavelengthInRange, averageValueInRange, averageErrorInRange, getUnits()));
}
}
}
COM: <s> undoes the last range </s>
|
funcom_train/42193846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNameCode() {
switch (nodeKind) {
case Type.ELEMENT:
case Type.ATTRIBUTE:
case Type.PROCESSING_INSTRUCTION:
case Type.NAMESPACE:
return docWrapper.getNamePool().allocate(getPrefix(), getURI(), getLocalPart());
default:
return -1;
}
}
COM: <s> get name code </s>
|
funcom_train/45547292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(ByteBuffer out, final byte value) {
switch (this) {
case BYTE:
out.put(value);
break;
case SHORT:
out.putShort(value);
break;
case INT:
out.putInt(value);
break;
case LONG:
out.putLong(value);
break;
default:
throw new AssertionError(this);
}
}
COM: <s> writes the given code value code to the given code out code buffer </s>
|
funcom_train/18645283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getIdentityName() {
String ret=ID_NAME_PREFIX;
for (int i=0; i < getTokens().size(); i++) {
String token=(String)getTokens().get(i);
if (i > 0) {
ret += ID_NAME_SEPARATOR;
}
ret += token;
}
return(ret);
}
COM: <s> this method returns the internally generated name for this </s>
|
funcom_train/130259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getMapData (byte enable_input, byte enable_output) {
try {
sendHeader (PLAYER_MSGTYPE_REQ, 2); /* 2 byte payload */
os.writeByte (enable_input);
os.writeByte (enable_output);
os.flush ();
} catch (Exception e) {
System.err.println ("[Energy] : Couldn't send command: " + e.toString ());
}
}
COM: <s> configuration request controll recharging </s>
|
funcom_train/33398593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Control getControl(String controlType) {
try {
Class cls = Class.forName(controlType);
synchronized (controls) {
Control cs[] = getControls();
for (int i = 0; i < cs.length; i++) {
if (cls.isInstance(cs[i])) {
return cs[i];
}
}
}
return null;
} catch (Exception e) {
// no such controlType or such control
return null;
}
}
COM: <s> retrieve the first control that implements the given class or interface </s>
|
funcom_train/37214025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Document getUnsentEvents(boolean clear) {
synchronized (unsentEvents) {
Element rootElement = new Element("events");
for (Iterator i = unsentEvents.iterator(); i.hasNext();) {
String eventString = (String) i.next();
rootElement.addContent(new Element(eventString));
}
if (clear) {
// Clear in memory representation
unsentEvents.clear();
// Write empty event file
writeEventState();
}
return new Document(rootElement);
}
}
COM: <s> return a jdom document containing all the unsent events </s>
|
funcom_train/20688409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ResponseAPDU load(boolean lastBlock, int blockNumber, byte[] loadFileDataBlock) throws CardException {
return cardChannel.transmit(new CommandAPDU(0x80, 0xE8, lastBlock ? 0x80 : 0x00, blockNumber, loadFileDataBlock, 0x00));
}
COM: <s> loads file into the card </s>
|
funcom_train/18955761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean existAccessDefinition(String pool, String objid) {
Session session = MCRHIBConnection.instance().getSession();
MCRACCESSPK key = new MCRACCESSPK(pool, objid);
List l = session.createCriteria(MCRACCESS.class).add(Restrictions.eq("key", key)).list();
if (l.size() == 1) {
return true;
}
return false;
}
COM: <s> internal helper method to check existance of object </s>
|
funcom_train/20898475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getAccessDate() {
// Get the sql compatible acccess date
String accDate = DateFormatter.getSqlDateString(this.accessDate);
if (logger.isFinestEnabled()) {
logger.finest("Accession :"
+ this.accession
+ " Access date :"
+ this.accessDate
+ " The Sql Access date :"
+ accDate);
}
//return DateFormatter.getSqlDateString(this.accessDate);
return accDate;
}
COM: <s> the code get access date code method here </s>
|
funcom_train/48480430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HandlerRegistration addRecordDropHandler(com.smartgwt.client.widgets.grid.events.RecordDropHandler handler) {
if(getHandlerCount(com.smartgwt.client.widgets.grid.events.RecordDropEvent.getType()) == 0) setupRecordDropEvent();
return doAddHandler(handler, com.smartgwt.client.widgets.grid.events.RecordDropEvent.getType());
}
COM: <s> add a handler that fires when records are dropped onto this list grid </s>
|
funcom_train/10790265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Table importTable(Table table) {
if (table == null)
return null;
Table copy = addTable(table.getIdentifier());
Column[] cols = table.getColumns();
for (int i = 0; i < cols.length; i++)
copy.importColumn(cols[i]);
copy.importPrimaryKey(table.getPrimaryKey());
return copy;
}
COM: <s> import a table from another schema </s>
|
funcom_train/6508539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean less (Stats s) {
if (this.hits<s.getHits())
return true;
else if (this.hits==s.getHits()) {
if (this.kills<s.getKills())
return true;
else if (this.kills==s.kills){
if (this.name.toUpperCase().compareTo(s.name.toUpperCase())<0)
return true;
else
return false;
}
else
return false;
}
else
return false;
}
COM: <s> helper method for implementing the code comparable code interface </s>
|
funcom_train/18861092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createDialogContent(Composite parent) {
Composite container = new Composite(parent, SWT.NONE);
container.setLayoutData(new GridData(GridData.FILL_BOTH));
container.setLayout(new GridLayout(3, false));
id = new TextAttributeField(this, StrutsConfigPackage.eINSTANCE
.getIdentifiableType_Id());
id.createContents(container, null, 3);
className = new ClassAttributeField(this, StrutsConfigPackage.eINSTANCE
.getConfigurableType_ClassName());
className.createContents(container, null, 3);
initializeFieldValues();
}
COM: <s> creates the content of the dialog area </s>
|
funcom_train/4529368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(DataOutput out) throws IOException {
new DatanodeID(node).write(out);
out.writeLong(node.getCapacity());
out.writeLong(node.getRemaining());
out.writeLong(node.getLastUpdate());
out.writeInt(node.getXceiverCount());
}
COM: <s> public method that serializes the information about a </s>
|
funcom_train/25133087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Property addProperty(String property) {
ServerWidget widget = (ServerWidget) layer.getARINCWidget(lastWidgetID);
Object oldValue = widget.getPropertyValue(property);
Property prop = new Property(oldValue);
lastProperties = getProperties(lastWidgetID);
lastProperties.put(property, prop);
return prop;
}
COM: <s> add a new widget property change to this undoable edit </s>
|
funcom_train/34900124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEditable (boolean editable) {
if (selectAllButton != null) {
selectAllButton.setEnabled(editable);
}
if (deselectAllButton != null) {
deselectAllButton.setEnabled(editable);
}
if (keepSelectedButton != null) {
keepSelectedButton.setEnabled(editable);
}
if (deleteSelectedButton != null) {
deleteSelectedButton.setEnabled(editable);
}
}
COM: <s> set whether this table is editable or not </s>
|
funcom_train/45029680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set allConceptNames(URI kbURI) throws ReasonerException {
AsksDocument asks = AsksDocument.Factory.newInstance();
Asks ask = asks.addNewAsks();
ask.setUri(kbURI.toString());
ask.addNewAllConceptNames().setId("query");
Set result = askNames(asks);
return result;
}
COM: <s> returns the code set code of code string code s corresponding </s>
|
funcom_train/36359542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Spacer getSpacer() {
if (spacer == null) {//GEN-END:|59-getter|0|59-preInit
// write pre-init user code here
spacer = new Spacer(16, 1);//GEN-LINE:|59-getter|1|59-postInit
// write post-init user code here
}//GEN-BEGIN:|59-getter|2|
return spacer;
}
COM: <s> returns an initiliazed instance of spacer component </s>
|
funcom_train/45692164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPartCountPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Sample_partCount_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Sample_partCount_feature", "_UI_Sample_type"),
EsxPackage.Literals.SAMPLE__PART_COUNT,
false,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the part count feature </s>
|
funcom_train/13271901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsPoint(float x, float y, float margin) {
if (margin == 0) {
return getShape().contains(x, y);
} else {
return getShape().intersects(x - margin, y - margin, 2 * margin, 2 * margin);
}
}
COM: <s> returns code true code if this camera contains </s>
|
funcom_train/21323817 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeOldStuff() {
final long current = System.currentTimeMillis();
synchronized( cache )
{
Iterator i = cache.values().iterator();
while( i.hasNext() )
{
ContributionBox cb = (ContributionBox)i.next();
if( current-cb.timeStamp > CONTRIBUTION_TIMEOUT )
i.remove();
}
}
synchronized( commands )
{
Iterator i = commands.values().iterator();
while( i.hasNext() )
{
Long t = (Long)i.next();
if( current-t.longValue()>COMMAND_TIMEOUT ) i.remove();
}
}
}
COM: <s> removes contributions and commands that are older than </s>
|
funcom_train/37816526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean zoom(double value, Point2D p){
this.zoom = zoom + (value/5);
double newScale = Math.exp(zoom);
if ((newScale>=20 && value > 0) || (newScale<=0.2 && value < 0)) {
gui.setStatusText(Messages.getString("hoare", "view.zoomError"));
this.zoom = zoom - (value/5);
return false;
} else {
gui.setStatusText("");
graph.setScale(newScale, p);
}
return true;
}
COM: <s> zooming the graph with e value 5 as function </s>
|
funcom_train/3419329 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected SecretKey engineGenerateKey() {
SecretKeySpec aesKey = null;
if (this.random == null) {
this.random = SunJCE.RANDOM;
}
byte[] keyBytes = new byte[keySize];
this.random.nextBytes(keyBytes);
aesKey = new SecretKeySpec(keyBytes, "AES");
return aesKey;
}
COM: <s> generates the aes key </s>
|
funcom_train/50908953 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean validateRookMove(Square origin, Square destination) {
// ensure we are moving in a straight line
if (origin.getCoord().x != destination.getCoord().x
&& origin.getCoord().y != destination.getCoord().y)
{
return false;
}
return !isPieceBlocking(origin, destination);
}
COM: <s> validates weather the specified rook move is legal but does not check </s>
|
funcom_train/14123084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTextSize(String width, String height) {
this.width = width;
if (Integer.valueOf(height.replaceAll("px", "")).intValue() < 26) {
height = "25";
}
this.height = height;
if (textFrame != null) {
textFrame.setWidth(width);
textFrame.setHeight(height);
}
}
COM: <s> sets the text frames size in pixels not including decorations such as </s>
|
funcom_train/15676456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void logoff() {
// BufferedReader br = IRCir;
BufferedWriter bw = IRCor;
try {
if (!ircsend("quit terminating"))
;
bw.write("quit terminating");
bw.newLine();
bw.flush();
} catch (Exception e) {
System.out.println("[IRC] logoff error: " + e);
System.exit(0);
}
}
COM: <s> logs off from the irc server </s>
|
funcom_train/2708534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void renameProject(int projId, String name) throws ServerExceptions {
try {
Persistence pers = getPersistence();
if (pers == null) throw new ServerExceptions ("Rename Project Failed: User not logged in");
else {
pers.renameProject(projId, name);
}
} catch (PersistenceException e) {
throw new ServerExceptions ("Renaming Failed: Unable to connect to database.");
}
}
COM: <s> rename a project </s>
|
funcom_train/24187414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSeparator(String parent, List<String> pseudoParents) {
separator = new String[pseudoParents.size() + 1];
int i = 0;
if (parent != null) {
separator[0] = parent;
neighbours.put(parent, 0);
i++;
}
for (int j = 0; j < pseudoParents.size(); j++) {
separator[i] = pseudoParents.get(j);
neighbours.put(pseudoParents.get(j), i);
i++;
}
nbrOfSeparators = neighbours.size();
}
COM: <s> sets the separator of this variable </s>
|
funcom_train/33705716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTitle(String title) {
LOGGER.entering("UserStory", "setTitle", title);
if (title == null) {
throw new IllegalArgumentException("Title should not be null");
}
this.title = title;
LOGGER.exiting("UserStory", "setTitle", this.title);
}
COM: <s> changes the title of this </s>
|
funcom_train/49636863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File findResource (String name) {
for (String path : getClassPath()) {
String testPath = bundleDir.getAbsolutePath() + File.separator
+ path + File.separator + name;
File testFile = new File (testPath);
log.trace ("Testing " + testFile);
if (testFile.exists()) {
return testFile;
}
}
return null;
}
COM: <s> locate a named resource within the classpath of this bundle </s>
|
funcom_train/32943604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HarvestResourceNodeTreeBuilder getHarvestResultTree(Long harvestResultOid) {
HarvestResult result = targetInstanceDao.getHarvestResult(harvestResultOid);
Iterator<HarvestResource> it = result.getResources().values().iterator();
HarvestResourceNodeTreeBuilder tree = new HarvestResourceNodeTreeBuilder();
while(it.hasNext()) {
HarvestResource res = it.next();
try {
if(res.getName().startsWith("http")) {
tree.addNode(res);
}
}
catch(MalformedURLException ex) {
ex.printStackTrace();
}
}
return tree;
}
COM: <s> get a tree of the harvest result </s>
|
funcom_train/39049786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
String sessionServerKey = getClientSessionServerKey(nodeId);
DataService dataService = getInstance().getDataService();
try {
dataService.removeObject(
dataService.getServiceBinding(sessionServerKey));
getProtocolDescriptorsMap().remove(nodeId);
} catch (NameNotBoundException e) {
// already removed
return;
} catch (ObjectNotFoundException e) {
}
dataService.removeServiceBinding(sessionServerKey);
}
COM: <s> removes the client session server proxy and binding and </s>
|
funcom_train/35838683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put(String sUserID, String sessionID) {
Vector vtSessions = null;
if (htUserSessions.containsKey(sUserID)) {
vtSessions = (Vector)htUserSessions.get(sUserID);
vtSessions.addElement(sessionID);
}
else {
vtSessions = new Vector(10);
vtSessions.addElement(sessionID);
htUserSessions.put(sUserID, vtSessions);
}
}
COM: <s> adds a service to the cache against the given user id </s>
|
funcom_train/10626072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean addChecks(Object targetChild) {
// Child can not be null
if (targetChild == null) {
throw new IllegalArgumentException(Messages.getString("beans.2A")); //$NON-NLS-1$
}
// Each child should appear only once in a given BeanContext
if (containsKey(targetChild)) {
return false;
}
return validatePendingAdd(targetChild);
}
COM: <s> check if we can add this child to bean context </s>
|
funcom_train/3843225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeProperties() throws IOException {
String[] preferences = super.preferenceNames();
for (int i = 0; i < preferences.length; i++) {
String name = preferences[i];
try {
setProperty(name, getString(name));
} catch (CoreException e) {
throw new IOException(Messages.getString("PropertyStore.Cannot_write_resource_property") + name); //$NON-NLS-1$
}
}
}
COM: <s> writes modified preferences into resource properties </s>
|
funcom_train/40312334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetTableName_InvalidColumn3() {
try
{
ResultSetMetaData resMetaData = new DefaultResultSetMetaData(metaDataEntry);
resMetaData.getTableName(10);
fail("SQLException is expected.");
}
catch(SQLException e)
{
//ensure the SQLException is thrown by getTableName method.
assertEquals("The sqlstate mismatches", "22003", e.getSQLState());
}
}
COM: <s> tests get table name with column index larger than the number of column </s>
|
funcom_train/22285352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ButtonWidget getCurrent() {
ButtonWidget result = this;
if (group != null) {
// search for this button
int index;
for (index = 0; index < parent.nwidgets; index++) {
Widget w = parent.widgets[index];
if (w instanceof ButtonWidget) {
ButtonWidget b = (ButtonWidget)w;
if (group.equals(b.group) && b.value) {
result = b;
break;
}
}
}
}
return result;
}
COM: <s> get the current button with the value in the group </s>
|
funcom_train/16875433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopAllToggles()
{
if (_buffs != null)
{
synchronized (_buffs)
{
if (!_buffs.isEmpty())
{
for (L2Effect e : _buffs)
if (e != null && e.getSkill().isToggle())
e.exit();
}
}
}
}
COM: <s> exit all toggle type effects </s>
|
funcom_train/50982668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConstructor_Exception() {
final Throwable throwable = new OutOfMemoryError();
try {
new ResourceException( (Throwable)null );
fail( "expected exception" );
}
catch( final NullPointerException e ) {
// Expected path
}
assertEquals( throwable, new ResourceException( throwable ).getEnclosedException() );
}
COM: <s> test the exception constructor </s>
|
funcom_train/9645288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void changeAttribute() throws XMLNotValidException {
// Write the name...
getQualityElement().setAttribute("name", getSelectedFunction());
// ...and the invert-checkbox
if (buttonInvert.getSelection())
getQualityElement().setAttribute("invert", "true");
else
getQualityElement().setAttribute("invert", "false");
}
COM: <s> call it if a attribute was changed </s>
|
funcom_train/23703211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isSelectionStackedChart() {
boolean tmp = false;
Iterator iStart = listenersStart.iterator();
while (iStart.hasNext()) {
Object
currListeners = iStart.next();
if (currListeners instanceof StackedChart){
StackedChart
tempObj = (StackedChart) currListeners;
tmp = tempObj.isMouseDragged();
}
}
return tmp;
}
COM: <s> checks if is selection stacked chart </s>
|
funcom_train/33365149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createSShell() {
sShell = new Shell();
sShell.setText("New user");
createComposite();
createComposite1();
sShell.setSize(new Point(565, 244));
sShell.setLayout(new FillLayout());
sShell.addShellListener(new org.eclipse.swt.events.ShellAdapter() {
public void shellClosed(org.eclipse.swt.events.ShellEvent e) {
extractFormData();
}
});
}
COM: <s> this method initializes s shell </s>
|
funcom_train/33398843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBackButton() {
if (backButton == null) {
backButton = new JButton();
// backButton.setText("back");
backButton.setOpaque(false);
backButton.setIcon(Images.get(Images.MEDIA_REWIND));
backButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
setRate(-2.0f);
}
});
}
return backButton;
}
COM: <s> this method initializes back button </s>
|
funcom_train/2673917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
int i = 0;
while (i < numItems) {
buttonCheck[i].setSelection(false);
if (optionType[i] == kostText) {
textBox[i].setText("");
} else {
if (optionType[i] == kostCombo) {
comboList[i].select(0);
}
}
i++;
}
}
COM: <s> initialize the various fields in the dialog </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.