__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/14353673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(FilterConfig config) throws ServletException {
log.info("WebpressoSecurityFilter::init(),init");
sSecurityDoamin = config.getInitParameter("security.domain");
log.info("WebpressoSecurityFilter::init(),sSecurityDoamin = " + sSecurityDoamin);
sLoginFile = config.getInitParameter("java.security.auth.login.config");
log.info("WebpressoSecurityFilter::init(),sLoginFile = " + sLoginFile);
}// end of init()
COM: <s> method name init </s>
|
funcom_train/14307037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void prepareForNode(VPTNode node) {
cmItem.setVisible(node != null &&
(node.isFile() || node.isDirectory() || node.isProject() ||
node.getClass() == VFSFile.class));
} //}}}
//{{{ -renameFile(VPTFile, File) : boolean
COM: <s> disable action only for the root node </s>
|
funcom_train/38500637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List ejbHomeGetPostNumbers(RaceLocal race, String code, int station) {
List rl = null;
try {
Set s = ejbSelectPostNumbersByRaceAndCodeAndStation(race, code, station);
rl = new ArrayList(s);
Collections.sort(rl);
} catch (FinderException fex) {
rl = Collections.EMPTY_LIST;
}
return rl;
}
COM: <s> return all possible post numbers for a specific station </s>
|
funcom_train/32376743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean logout() throws Exception {
boolean b = false;
try {
b = cc.logout();
} catch (ClientConnectorException cce) {
throw new Exception(Messages.getString("ServerDataAccess.Cannot_logout_Original_Message") + cce.getMessage()); //$NON-NLS-1$
}
return b;
}
COM: <s> logs out the user from the server </s>
|
funcom_train/46930977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNotConditionsWithDots() throws Exception {
Map jc = new HashMap();
jc.put("x.a", Boolean.TRUE);
jc.put("x.b", Boolean.FALSE);
assertExpression(jc, "x.a", Boolean.TRUE);
assertExpression(jc, "!x.a", Boolean.FALSE);
assertExpression(jc, "!x.b", Boolean.TRUE);
}
COM: <s> gmj disabled need to fix </s>
|
funcom_train/38939256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMenuBarComponentType(ActionEvent event){
getLoggerWeb().debug("ActionEvent Performed: Creating Menu Bar Structure Row.");
WebSiteComponentType componentTypeMenuBar = new WebSiteComponentType();
componentTypeMenuBar.setWebSiteComponentTypeLayout("");
componentTypeMenuBar.setWebSiteComponentTypeName("MENU_BAR");
listMenuBarComponentType.add(componentTypeMenuBar);
getMenuBarStructure().put(componentTypeMenuBar, new ArrayList<CustomWebSiteComponentQuery>());
}
COM: <s> performs the saving of component type </s>
|
funcom_train/22799485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getCount(QueryBits query) throws DatabaseException {
Connection conn = getConnection();
QueryHelper queryHelper = new QueryHelper(SoftwareQueries.selectSoftwareCountQuery(query));
try {
ResultSet rs = queryHelper.executeQuery(conn);
rs.next();
return rs.getInt("row_count");
} catch (Exception e) {
// Database problem
throw new DatabaseException(e, queryHelper);
} finally {
queryHelper.close();
closeConnection(conn, queryHelper);
}
}
COM: <s> return software count </s>
|
funcom_train/34343257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getEncaBezado1() {
if (encaBezado1 == null) {//GEN-END:|29-getter|0|29-preInit
// write pre-init user code here
encaBezado1 = new TextField("ingrese la palabra", "0", 10, TextField.ANY);//GEN-LINE:|29-getter|1|29-postInit
// write post-init user code here
}//GEN-BEGIN:|29-getter|2|
return encaBezado1;
}
COM: <s> returns an initiliazed instance of enca bezado1 component </s>
|
funcom_train/43237594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testListPlayerNames() {
for (int i = 0; i < peers.length; i++)
holder.addPlayer(peers[i]);
String[] names = holder.listPlayerNames();
for (int i = 0; i < peers.length; i++)
HobbesTestConstants.assertContains(names, peers[i].getName());
}
COM: <s> tests code holder code s ability to list the names of its players </s>
|
funcom_train/29985229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint (Graphics g) {
FontMetrics fm = getFontMetrics (getFont ());
g.setColor (getBackground ());
Dimension d = getSize ();
g.fillRect (0,0, d.width, d.height);
g.setColor (getForeground ());
g.drawString (status, 0, fm.getHeight ());
}
COM: <s> paint this status on a given graphics </s>
|
funcom_train/20631924 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean unlockAssignment(long assignmentId) throws WorkflowException {
boolean res = false;
DTSWFRequest request = new DTSWFRequest();
request.setRequestType("unlockAssignment");
request.setParemeter("assignmentId", new Long(assignmentId));
Boolean result = (Boolean) executeDTSWFRequest(request);
if (result != null) {
res = result.booleanValue();
}
return res;
}
COM: <s> unlocks a given </s>
|
funcom_train/9270359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBytes(byte[] src, int offset, int size) {
if (equalTo(src, offset, size)) {
modified = false;
return;
}
if (buffer.length != size) {
buffer = new byte[size];
}
System.arraycopy(src, offset, buffer, 0, size);
modified = true;
cachedString = null;
}
COM: <s> modify the internal byte buffer </s>
|
funcom_train/12158651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialiseFunctionResolvers() {
FunctionResolverBuilder builder =
StylingFactory.getDefaultInstance().
createFunctionResolverBuilder();
builder.addFunction("attr", new AttrFunction());
builder.addFunction("counter", new CounterFunction());
builder.addFunction("counters", new CountersFunction());
functionResolvers.add(builder.getResolver());
}
COM: <s> initialise the function resolvers with the default set </s>
|
funcom_train/9806571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createTopDesign() throws EdifNameConflictException {
EdifDesign oldDesign = _origEnv.getTopDesign();
EdifCellInstance oldTopInstance = oldDesign.getTopCellInstance();
EdifCell oldTopCell = oldTopInstance.getCellType();
// Call to generate top-cell. This is the recursive call that will
// add all Cells and sub-cells, etc.
createTopCell(oldTopCell);
}
COM: <s> this method creates the top level design for the new environment </s>
|
funcom_train/10801511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isEmbeddedOnly() {
if (_embedded == null) {
ClassMetaData sup = getPCSuperclassMetaData();
if (sup != null)
_embedded = (sup.isEmbeddedOnly()) ? Boolean.TRUE
: Boolean.FALSE;
else
_embedded = Boolean.FALSE;
}
return _embedded.booleanValue();
}
COM: <s> whether the type can only be used as an embedded object </s>
|
funcom_train/15411489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ThreadPool getPool(String poolName) {
synchronized (this) {
ThreadPool threadPool = (ThreadPool) threadPoolCache.get(poolName);
if (threadPool == null) {
threadPool = createThreadPool(poolName);
threadPoolCache.put(poolName, threadPool);
}
return threadPool;
}
}
COM: <s> return the named thread pool </s>
|
funcom_train/18049264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createActions() {
// sampleAction = new Action() {
// public void run() {
// MessageDialog.openInformation(null, "Jdeluxe Plug-in", "Sample Action Executed");
// }
// };
// sampleAction.setText("Sample Action");
// sampleAction.setToolTipText("Sample Action tool tip");
// sampleAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().
// getImageDescriptor(IDE.SharedImages.IMG_OBJS_TASK_TSK));
}
COM: <s> creates the actions </s>
|
funcom_train/33607174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintFrame(Graphics2D g, ShapeStyle style, boolean selected, Point2D p, double r){
style.draw(g, new Ellipse2D.Double(p.getX()-r, p.getY()-r, 2*r, 2*r), selected);
}
COM: <s> paints outside frame at given window location and pixel radius </s>
|
funcom_train/18482477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Model fix(Matrix4 trans) {
List<PolyColl> new_polycolls = new ArrayList<PolyColl>();
for (PolyColl t : polycolls.getList()) {
try {
PolyColl n_t = t.fix(trans);
new_polycolls.add(n_t);
} catch (ZeroLengthException ex) {
ex.printStackTrace();
}
}
Model gg = new Model();
gg.setName(getName());
gg.setPolyColls(new PolyCollList(new_polycolls));
return gg;
}
COM: <s> returns a geometry that is this geometry with the given </s>
|
funcom_train/27787560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Expression findRandomSite(Expression expression) {
int randomNumber = random.nextInt(expression.size());
Expression randomSite = null;
for(Iterator iterator = expression.iterator();
iterator.hasNext();) {
randomSite = (Expression)iterator.next();
// Return if this is the xth random element
if(randomNumber-- <= 0)
break;
}
assert randomSite != null;
return randomSite;
}
COM: <s> randomly pick a node in the given expression </s>
|
funcom_train/27866626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void search() {
String text = searchText.getText();
int index = resultTextArea.getText().indexOf(text,
resultTextArea.getCaretPosition());
if (index == -1) {
JOptionPane.showMessageDialog(this, "Cannot find specified string");
}
else {
resultTextArea.select(index, index + text.length());
}
}
COM: <s> search for a specified string in diagnostic result </s>
|
funcom_train/4008965 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getParameter(int index,String[] args) {
if (args == null)
return null ;
for (int i=0;i<args.length;i++) {
if (args[i].charAt(0) == '-')
i++ ;
else {
if (index == 0)
return args[i] ;
index-- ;
}
}
return null ;
}
COM: <s> return a parameter value </s>
|
funcom_train/1288978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getCatDir() {
if(this.catDir==Directions.Up)return "Up";
else if(this.catDir==Directions.Down)return "Down";
else if(this.catDir==Directions.Left)return "Left";
else if(this.catDir==Directions.Right)return "Right";
else return "Still";
}
COM: <s> get the value of cat dir </s>
|
funcom_train/11036265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unregisterOperationContext(String messageID) {
if (messageID == null) {
if (log.isDebugEnabled()) {
log.debug("messageID is null.");
}
} else {
OperationContext opCtx = operationContextMap.remove(messageID);
contextRemoved(opCtx);
}
}
COM: <s> unregisters the operation context associated with the given message id </s>
|
funcom_train/10958670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPackageFromBundle(Bundle bundle, String packageName) {
this.packageToBundle.put(packageName, bundle.getSymbolicName());
Set<String> pkgs = packagesByBundle.get(bundle);
if (pkgs == null) {
pkgs = new HashSet<String>();
packagesByBundle.put(bundle, pkgs);
}
pkgs.add(packageName);
}
COM: <s> add as bundle package mapping </s>
|
funcom_train/28116683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
_thread = Thread.currentThread();
String line;
try {
while (_thread != null && (line = _input.readLine()) != null) {
_output.println(line);
}
} catch (IOException error) {
// terminate this on an I/O error.
_exception = error;
_thread = null;
}
_input = null;
_output = null;
}
COM: <s> run the reader </s>
|
funcom_train/8492182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JMenuItem getPasteMenuItem() {
if (pasteMenuItem == null) {
pasteMenuItem = new JMenuItem();
pasteMenuItem.setText("Paste");
pasteMenuItem
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
System.out.println("actionPerformed()"); // TODO
// Auto-generated
// Event
// stub
// actionPerformed()
}
});
}
return pasteMenuItem;
}
COM: <s> this method initializes paste menu item </s>
|
funcom_train/16312209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputSource resolveEntity(String publicId, String systemId) {
if (publicId != null && PUBLIC_XHTML.matcher(publicId).matches() && systemId.endsWith(".dtd")) {
URL dtdresource = XHTMLDialect.class.getResource(DTD);
return new InputSource(dtdresource.toExternalForm());
} else
return null;
}
COM: <s> resolves external entites if child filter needs it </s>
|
funcom_train/4757092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean positiveOrNull() {
if (isNaN()) {
field.setIEEEFlagsBits(DfpField.FLAG_INVALID);
dotrap(DfpField.FLAG_INVALID, LESS_THAN_TRAP, this, newInstance(getZero()));
return false;
}
return (sign > 0) || ((mant[mant.length - 1] == 0) && !isInfinite());
}
COM: <s> check if instance is greater than or equal to 0 </s>
|
funcom_train/22550394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean consumeBodyIfNeeded() {
if(_downloader.isBodyConsumed()) {
LOG.debug("Not consuming body.");
return false;
}
_downloader.consumeBody(new State() {
protected void handleState(boolean success) {
if(!success)
handleRFDFailure(_rfd);
}
});
return true;
}
COM: <s> consumes the body of an http request if necessary </s>
|
funcom_train/17178363 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMakeblastdbFolder() {
String operating_system = System.getProperty("os.name").toLowerCase();
if (operating_system.contains("mac os")) {
return DEFALUT_MAC_FOLDER;
} else if (operating_system.contains("windows")) {
return DEFALUT_WINDOWS_FOLDER;
} else {
return DEFALUT_LINUX_FOLDER;
}
}
COM: <s> returns the folder containing the makeblastdb script </s>
|
funcom_train/11320210 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNullRoles() {
// Setup
RoleAccessController controller = new RoleAccessController();
MockRequest request = new MockRequest();
String role = "userRole";
MockPrincipal principal = new MockPrincipal("bob", role);
request.setUserPrincipal(principal);
role = null;
// Perform tests
assertTrue(controller.hasAccess(request, role));
}
COM: <s> check that has access handles and null roles and allows access by default </s>
|
funcom_train/20826897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unpatch(final int[] patchDetailIndexes, final Listener listener) {
PatchParameters parameters = new PatchParameters();
for (int index : patchDetailIndexes) {
Dimmer dimmer = patch.getDetail(index).getDimmer();
dimmer.setChannel(null);
int lanboxChannelId = channelIndex(dimmer);
dimmer.setLanboxChannelId(lanboxChannelId);
parameters.add(dimmer.getId(), lanboxChannelId);
}
patch(parameters, listener);
}
COM: <s> unpatches the dimmers at given indexes </s>
|
funcom_train/8091844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shuffle(Random rand) {
if (m_models.length < 2)
return;
for (int i = 0; i < m_models.length; ++i) {
int swap_index = rand.nextInt(m_models.length - 1);
if (swap_index >= i)
++swap_index; // don't swap with itself
swap(i, swap_index);
}
}
COM: <s> shuffle the models </s>
|
funcom_train/95827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int addClassReference(String fullyQualifiedName) {
if (ClassHolder.isExternalClassName(fullyQualifiedName)) {
fullyQualifiedName = ClassHolder.convertToInternalClassName(fullyQualifiedName);
// System.out.println("addClassReference " + fullyQualifiedName);
}
int name_index = addUtf8Entry(fullyQualifiedName).getIndex();
return addIndexReference(VMDescriptor.CONSTANT_Class, name_index, 0);
}
COM: <s> add a class entry to the pool </s>
|
funcom_train/18787957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected VelocityContext createContext(MetaView view) {
VelocityContext context = new VelocityContext();
context.put(CARTRIDGE_KEY, this);
context.put(CONFIGURATION_KEY, getContext());
context.put(MODEL_KEY, view.getModel());
context.put(PACKAGE_KEY, view.getContext());
context.put(VIEW_KEY, view);
return context;
}
COM: <s> generates the context for a view all its properties imports and own </s>
|
funcom_train/10471998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getLookupArgument(MethodInvocation invocation) {
Expression expr = invocation.getExpression();
String history = getExpressionHistory(expr);
if (history != null) {
List arguments = invocation.arguments();
if (arguments.size() != 0) {
Expression arg = (Expression) arguments.get(0);
if (arg instanceof StringLiteral) {
StringLiteral literal = (StringLiteral) arg;
String resultContext = history + literal.getLiteralValue();
this.lastStrLiteral = literal;
return resultContext;
}
}
}
return null;
}
COM: <s> checks a javax </s>
|
funcom_train/8803749 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int read4() throws java.io.IOException {
if ( 4 <= available()){
int ch = buf[rc++]&0xff, ch2;
ch <<= 24;
ch2 = buf[rc++]&0xff;
ch2 <<= 16;
ch |= ch2;
ch2 = buf[rc++]&0xff;
ch2 <<= 8;
ch |= ch2;
ch |= buf[rc++]&0xff;
return ch;
}
else
throw new java.io.IOException("Unable to read four bytes.");
}
COM: <s> read four bytes into an int using network byte order big endian </s>
|
funcom_train/24082669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addLiteral(OWLLiteral lit) {
if (lit == null) {
throw new IllegalArgumentException("Null argument.");
}
boolean ret = false;
if (!this.literalInvMap.containsKey(lit)) {
Integer id = this.entityManager.createNamedEntity(
IntegerEntityType.LITERAL, lit.getLiteral(), false);
this.literalMap.put(id, lit);
this.literalInvMap.put(lit, id);
ret = true;
}
return ret;
}
COM: <s> adds a literal to the repository </s>
|
funcom_train/34318426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getJComboBox() {
if (jComboBox == null) {
jComboBox = new JComboBox();
jComboBox.setPreferredSize(new Dimension(180, 22));
jComboBox.setSize(new Dimension(144, 22));
jComboBox.setLocation(new Point(80, 20));
this.refreshFieldList();
}
return jComboBox;
}
COM: <s> this method initializes j combo box </s>
|
funcom_train/14141151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getButtonPanel() {
if (buttonPanel == null) {
GridBagConstraints gridBagConstraints3 = new GridBagConstraints();
gridBagConstraints3.weightx = 1.0;
gridBagConstraints3.anchor = GridBagConstraints.CENTER;
gridBagConstraints3.weighty = 1.0;
buttonPanel = new JPanel();
buttonPanel.setLayout(new GridBagLayout());
buttonPanel.setBackground(SystemColor.control);
buttonPanel.add(getOkButton(), gridBagConstraints3);
}
return buttonPanel;
}
COM: <s> this method initializes button panel </s>
|
funcom_train/34557944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void disable() {
if (!isRendered()) {
initDisabled = true;
setAttribute("disabled", true, true);
addListener("render", new Function() {
public void execute() {
disableRendered();
}
});
} else {
disableRendered();
}
}
COM: <s> disable this component </s>
|
funcom_train/34633351 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void configure(final String configFile) {
Resource res = new ClassPathResource(configFile);
BeanFactory factory = new XmlBeanFactory(res);
this.matcher = (HeuristicMatching) factory.getBean("matcher");
this.mergeAlgorithm = (MergeAlgorithm) factory.getBean("mergeAlgorithm");
}
COM: <s> configure the whole </s>
|
funcom_train/23070041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getHasPermission() {
Role currentRole = (Role) getRoles().getRowData();
Task task = (Task) getTasks().getRowData();
if (log.isDebugEnabled()) log.debug("call to getHasPermission with current role: " + currentRole + " signature:" + task.getSignature());
return currentRole.getAuthorizedTasks().contains(task.getSignature());
}
COM: <s> for the current task and the current role is the permission granted </s>
|
funcom_train/3623525 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Coordinates cross(Coordinates b) {
return new Coordinates(this.y_ * b.z_ - this.z_ * b.y_, this.z_ * b.x_
- this.x_ * b.z_, this.x_ * b.y_ - this.y_ * b.x_, Float.NaN);
}
COM: <s> vector cross product </s>
|
funcom_train/25290372 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIgnoreVertexColors(boolean ignoreVertexColors) {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_IGNORE_VERTEX_COLORS_WRITE))
throw new CapabilityNotSetException(Ding3dI18N.getString("RenderingAttributes12"));
if (isLive())
((RenderingAttributesRetained)this.retained).setIgnoreVertexColors(ignoreVertexColors);
else
((RenderingAttributesRetained)this.retained).initIgnoreVertexColors(ignoreVertexColors);
}
COM: <s> sets a flag that indicates whether vertex colors are ignored </s>
|
funcom_train/34527257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void buildRules(GroovyShell shell) throws EvaluationException {
for (String argument : arguments) {
FormatterRule rule = FormatterRule.createFormatterRule(argument, shell);
if (rule == null) {
String msg = "Unable to handler the rule '" + argument + "'.";
throw new EvaluationException(msg);
}
rules.add(rule);
}
}
COM: <s> builds the internal structures of this object after it has been </s>
|
funcom_train/3742596 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dropIndexes() {
String indexdir = settingsConfig.getValue("indexdir");
try {
// Get languages from LanguageManager
Collection<Language> languages = LanguageManager.getInstance().getLanguages();
for (Language language : languages) {
File indexPath = new File(indexdir, language.getIndex());
FileUtils.deleteDirectory(indexPath);
}
} catch (Exception e) {
log.error("createIndexes " + e.getMessage(), e);
}
}
COM: <s> drops all indexes one per language </s>
|
funcom_train/14653726 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getChunkRetrievalTimeSeconds(double activation) {
double time = (rac != null) ? rac.getDEFAULT_LATENCY_SCALE_FACTOR() : 1.0
* (Math.exp(-1 * ((rac != null) ? rac.getDEFAULT_LATENCY_EXPONENT() : 0.1)
* activation));
return time;
}
COM: <s> get chunk retrieval time in seconds </s>
|
funcom_train/43328033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawMinorTic(Graphics g, Rectangle r, double x) {
int pos = (int)(((x - min) / (max - min)) * (double)r.width);
if (flipped) pos = r.width - pos;
pos += r.x;
g.drawLine(pos, r.y+1, pos, r.y+2);
g.drawLine(pos, r.y+r.height-1, pos, r.y+r.height-2);
}
COM: <s> draw a minor tic at a given x position </s>
|
funcom_train/11770482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonSave() {
if (jButtonSave == null) {
jButtonSave = new JButton();
jButtonSave.setFont(GuiFont.FONT_PLAIN);
jButtonSave.setText(rb.getString("jButtonSave"));
jButtonSave.setEnabled(false);
}
return jButtonSave;
}
COM: <s> this method initializes j button save </s>
|
funcom_train/43899286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dispose() {
if (outStream != null) {
try {
outStream.flush();
outStream.close();
} catch (IOException e) {
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE, e.getLocalizedMessage(), e);
}
}
}
}
COM: <s> releases resources held by this </s>
|
funcom_train/41262729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setListRows() {
Cursor cursor = this.cursor;
if (cursor != null) { //if have search results
//Fields from cursor
String[] from = new String[]{DBManager.AUTHOR_SEARCH_NAME};
//UI elements to bind
int[] to = new int[]{R.id.author_name};
//Create a simple cursor adapter
SimpleCursorAdapter rows = new SimpleCursorAdapter(this, R.layout.authorsrow, cursor, from, to);
authorList.setAdapter(rows);
}
}
COM: <s> fills result list in ui </s>
|
funcom_train/4684508 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOriginatorAddress(long origAddr) {
if (origLen == 2) {
rp.setMACPayloadBigEndShortAt(origAddrIndex, (short)(origAddr & 0xffff));
} else {
rp.setMACPayloadBigEndLongAt(origAddrIndex, origAddr);
}
}
COM: <s> set the address of the originator field of the mesh header </s>
|
funcom_train/51812222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUseExistingMap() {
Hashtable<String,Object> map = new Hashtable<String,Object>();
map.put("int", new Integer(5));
MutableInterface obj = (MutableInterface) MapBackedBean.createBean(MutableInterface.class, null, map);
assertEquals("Underlying map not set", 5, obj.getInt());
}
COM: <s> test that passes in an existing map </s>
|
funcom_train/9236254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateColour(final String newColour) {
if (newColour == null || newColour.isEmpty()) {
previewPanel.setBackground(ColourManager.getColour("ffffff"));
previewPanel.setToolTipText("");
} else {
previewPanel.setBackground(ColourManager.parseColour(newColour));
previewPanel.setToolTipText(newColour);
}
}
COM: <s> updates the colour panel </s>
|
funcom_train/23267871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBuscarClientexApe() {
System.out.println("buscarClientexApe");
String apellidoP = "";
Cliente instance = new Cliente();
Cliente expResult = null;
Cliente result = instance.buscarClientexApe(apellidoP);
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 buscar clientex ape method of class capa negocios </s>
|
funcom_train/27943763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean open( java.lang.String strConnection, java.lang.String strUserName, java.lang.String strPassword ) {
try {
conn = java.sql.DriverManager.getConnection( strConnection, strUserName, strPassword );
} catch( java.sql.SQLException e ) {
System.err.println( "JDatabase.open() - SQLException: " + e );
return false;
}
return true;
}
COM: <s> connects to a database server </s>
|
funcom_train/41817240 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand2 () {
if (okCommand2 == null) {//GEN-END:|32-getter|0|32-preInit
// write pre-init user code here
okCommand2 = new Command ("show total", Command.OK, 0);//GEN-LINE:|32-getter|1|32-postInit
// write post-init user code here
}//GEN-BEGIN:|32-getter|2|
return okCommand2;
}
COM: <s> returns an initiliazed instance of ok command2 component </s>
|
funcom_train/2845063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ProjectItem getProjectItem(String nodePath) {
ProjectItemTreeNode node = (ProjectItemTreeNode) nodeMap.get(nodePath);
if (node != null) {
return (ProjectItem) node.getUserObject();
}
else {
System.err.println("null node for path "+nodePath);
}
return null;
}
COM: <s> returns the icon for the specfied path to a node </s>
|
funcom_train/14140911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JProgressBar getLoadProgressBar() {
if (loadProgressBar == null) {
loadProgressBar = new JProgressBar();
loadProgressBar.setBackground(SystemColor.window);
loadProgressBar.setBounds(new Rectangle(160, 55, 286, 22));
loadProgressBar.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
loadProgressBar.setStringPainted(true);
loadProgressBar.setValue(0);
}
return loadProgressBar;
}
COM: <s> this method initializes load progress bar </s>
|
funcom_train/10253950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkValidCheckConstraint() {
HsqlArrayList set = new HsqlArrayList();
Expression.collectAllExpressions(set, this,
subqueryAggregateExpressionSet,
emptyExpressionSet);
if (!set.isEmpty()) {
throw Error.error(ErrorCode.X_0A000,
"subquery in check constraint");
}
}
COM: <s> check valid check constraint </s>
|
funcom_train/11006978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSimpleDocument() {
HWPFDocument doc = HWPFTestDataSamples.openSampleFile("two_images.doc");
RevisionMarkAuthorTable rmt = doc.getRevisionMarkAuthorTable();
assertNotNull(rmt);
assertEquals(1, rmt.getSize());
assertEquals("Unknown", rmt.getAuthor(0));
assertEquals(null, rmt.getAuthor(1));
assertEquals(null, rmt.getAuthor(2));
assertEquals(null, rmt.getAuthor(3));
}
COM: <s> tests that we can load a document with </s>
|
funcom_train/10925640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CMISAllowableAction find(String name) {
List<Element> elements = getElements();
for (Element element : elements) {
if (element instanceof CMISAllowableAction) {
CMISAllowableAction action = (CMISAllowableAction) element;
if (action.getName().equals(name)) {
return action;
}
}
}
return null;
}
COM: <s> finds action by name </s>
|
funcom_train/5339052 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEmpty () {
Vector nums = new Vector();
for (int i = 1; i < 10; i++) {
nums.addElement(new Integer(0));
}
Vector elements = Elements.in(nums).suchThat(nonzero);
assertTrue(elements.size() == 0);
}
COM: <s> test that the quantifier returns an empy vector when no matches </s>
|
funcom_train/7641184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readStringTable(ByteBuffer data, String[] strings) {
int count = strings.length;
int i;
for (i = 0; i < count; i++) {
int nameLen = data.getInt();
String descriptor = getString(data, nameLen);
strings[i] = descriptorToDot(descriptor);
}
}
COM: <s> reads a string table out of data </s>
|
funcom_train/49319884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(ImageColormap colormap) {
return (colorLookupTable == colormap.colorLookupTable
&& colorLookupTableName.equals(colormap.colorLookupTableName)
&& colorLut == colormap.colorLut
&& intensityLookupTable == colormap.intensityLookupTable
&& intensityLookupTableName.equals(colormap.intensityLookupTableName));
}
COM: <s> return true if this object is equivalent to the given one </s>
|
funcom_train/21845401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPermission( String userName, String permission, boolean state) {
String theName = userName.toUpperCase();
User user = users.get(theName);
if( user != null ) {
if( permission.equalsIgnoreCase("MASK") && state == true)
user.setPermissionMask();
else {
user.setPermission(permission.toUpperCase(), state);
dirtyData = true;
}
}
}
COM: <s> set a permission for a named user </s>
|
funcom_train/1198931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeToFile( File dest ) throws IOException {
File m3u = dest;
if( dest.isDirectory() ) {
m3u = new File( dest, dest.getName() + ".m3u" );
}
FileOutputStream out = new FileOutputStream( m3u );
PrintWriter printer = new PrintWriter( out );
printer.print( this.toString() );
printer.close();
out.close();
}
COM: <s> creates a winamp styled playlist from the mp3 files contained in this </s>
|
funcom_train/949738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String nextString (char c ) {
if ( (! more) || (start >= len) ) return null;
start= pos;
while(s.charAt(start) == c && start < len ) start++;
int k1= s.indexOf(c,start);
if ( k1 < 0 ) {
more= false;
pos= len;
if( start < len ) return s.substring(start,len);
else return null;
}
else {
pos= k1+1;
return s.substring(start,k1);
}
}
COM: <s> return next string value separated by c </s>
|
funcom_train/2487805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean useWebService() {
String templateValue = (String) getTemplateSettings().get(GragGenerator.TEMPLATE_USE_WEB_SERVICE);
if (templateValue == null || "false".equalsIgnoreCase(templateValue)) {
return new Boolean(false);
}
else {
return new Boolean(true);
}
}
COM: <s> check if the use web service checkbox was checked to generate a webservice </s>
|
funcom_train/5168694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void releaseFreeConnections() {
trace("ConnectionPoolManager.releaseFreeConnections()");
ConnectionObject co = null;
for (int i = 0; i < connections.size(); i++) {
co = (ConnectionObject) connections.elementAt(i);
if (!co.inUse)
removeConnection(co.connection);
}
}
COM: <s> closes all connections and clears out the connection pool </s>
|
funcom_train/48391676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HandlerRegistration addButtonClickHandler(com.smartgwt.client.widgets.events.ButtonClickHandler handler) {
if(getHandlerCount(com.smartgwt.client.widgets.events.ButtonClickEvent.getType()) == 0) setupButtonClickEvent();
return doAddHandler(handler, com.smartgwt.client.widgets.events.ButtonClickEvent.getType());
}
COM: <s> add a button click handler </s>
|
funcom_train/35073172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void importCustomerShippingAddressId(Transaction txn) {
String customerShippingAddress = getElementText(
txn.getCurrentResponse().getDocument().getDocumentElement(), AuthNetField.ELEMENT_CUSTOMER_ADDRESS_ID.getFieldName());
if(!StringUtils.isEmpty(customerShippingAddress)) {
this.customerShippingAddressIdList.add(customerShippingAddress);
}
}
COM: <s> import the customer shipping address </s>
|
funcom_train/50872752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testClone() {
OMReference reference = new OMReference();
reference.setHref("#12");
OMReference clone = (OMReference) reference.clone();
assertTrue(reference.attributes == clone.attributes &&
reference.getHref() == clone.getHref());
}
COM: <s> test of clone method of class nl </s>
|
funcom_train/8904409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleReceivedFrame(DataFrame dataFrame) throws IOException {
Manager.getInstance().receive(new DataContainer(new String(dataFrame.getData()),dataFrame.getSrcAddress(), dataFrame.getSrcPort()));
dataFrame.setAddressRecognized();
dataFrame.setCopied();
sendFrame(dataFrame);
}
COM: <s> notify manager of data received set copied and send on </s>
|
funcom_train/41163192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(OpenResponse3 entity) {
EntityManagerHelper.log("deleting OpenResponse3 instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(OpenResponse3.class, entity.getOpenResponseId());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent open response3 entity </s>
|
funcom_train/1958774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testValidate() throws VerinecException {
Document d=null;
try {
d = builder.build(new StringReader(validxml));
} catch (Throwable t) {
fail("Could not create jdom: "+t.toString());
}
if (! validator.validate(d)) {
fail("Validate failed "+validator.getLastError().toString());
}
}
COM: <s> test the behaviour of the valiadator with a static test case </s>
|
funcom_train/39482395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTryLockWhenLocked () {
final ReentrantLock lock = new ReentrantLock(fairness);
lock.lock();
Thread t = new Thread(new Runnable() {
public void run () {
threadAssertFalse(lock.tryLock());
}
});
try {
t.start();
t.join();
lock.unlock();
} catch (Exception e) {
unexpectedException();
}
}
COM: <s> try lock on a locked lock fails </s>
|
funcom_train/38543004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBlob(int i, Blob x) throws SQLException {
try {
((PreparedStatement) this.realStatement).setBlob(i, x);
if (i <= this.currentParams.length) {
this.currentParams[i - 1] = x;
}
} catch (SQLException e) {
manageException(e);
throw generateException(e);
}
}
COM: <s> sets the designated parameter to the given code blob code object </s>
|
funcom_train/7641178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkType(EventValueType type) throws InvalidValueTypeException {
if ((type != EventValueType.INT && type != EventValueType.LONG)
&& this != NOT_APPLICABLE) {
throw new InvalidValueTypeException(
String.format("%1$s doesn't support type %2$s", type, this));
}
}
COM: <s> checks that the </s>
|
funcom_train/50091144 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInternuclearSeparation(GVector coords3d) {
for (int l = 0; l < electrostaticInteractionNumber; l++) {
r[l] = ForceFieldTools.distanceBetweenTwoAtomsFrom3xNCoordinates(coords3d, electrostaticInteractionAtomPosition[l][0], electrostaticInteractionAtomPosition[l][1]);
//logger.debug("r[" + l + "]= " + r[l]);
}
}
COM: <s> calculate the internuclear separation rij </s>
|
funcom_train/2876264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void configureClient(HttpClient client) {
if (isEnabled()) {
HostConfiguration hostConfiguration = client.getHostConfiguration();
hostConfiguration.setProxy(proxyHost, proxyPort);
if (isAuthenticating()) {
client.getState().setProxyCredentials(proxyRealm, proxyHost,
new UsernamePasswordCredentials(proxyUser, proxyPassword));
}
}
}
COM: <s> configure an http client from the settinsg </s>
|
funcom_train/28293032 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getObjID() {
if (logger.isDebugEnabled()) {
logger.debug(" :: SeqObjectiveTracking --> BEGIN - " +
"getObjID");
logger.debug(" ::--> " + mObj.mObjID);
logger.debug(" :: SeqObjectiveTracking --> END - " +
"getObjID");
}
return mObj.mObjID;
}
COM: <s> get the objective id of this objective </s>
|
funcom_train/7979494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getTransHops() {
String path = getPathFromSeed();
int transCount = 0;
for(int i=path.length()-1;i>=0;i--) {
if(path.charAt(i)==Link.NAVLINK_HOP) {
break;
}
transCount++;
}
return transCount;
}
COM: <s> tally up the number of transitive non simple link hops at </s>
|
funcom_train/11381741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Counters getCounters() {
Counters result = new Counters();
synchronized (this) {
result.incrAllCounters(getJobCounters());
}
// the counters of TIPs are not updated in place.
// hence read-only access is ok without any locks
incrementTaskCounters(result, maps);
return incrementTaskCounters(result, reduces);
}
COM: <s> returns the total job counters by adding together the job </s>
|
funcom_train/8436221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMaxPatterns(int maxPatterns) {
this.maxPatterns = maxPatterns;
if (maxPatterns > 0) {
patternCounter = new MultiSet<Pattern>(new Comparator<Pattern>() {
public int compare(Pattern obj1, Pattern obj2) {
return patternScores.get(obj1).compareTo(patternScores.get(obj2));
}
});
} else {
patternCounter = null;
}
}
COM: <s> setter for property max patterns </s>
|
funcom_train/16629411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getConceptDescription(Long ID, String separator){
String description = "";
List<Description> descriptionList;
descriptionList = getDescription(ID,Settings.getGuid()).getDescription();
for (int i = 0; i < descriptionList.size(); i++){
description += descriptionList.get(i).getTerm().getValue() + separator;
}
return description;
}
COM: <s> get description of a concept </s>
|
funcom_train/7619192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int startUsingNetworkFeature(String feature, int callingPid, int callingUid) {
if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_MMS)) {
mLastCallingPid = callingPid;
return setEnableApn(Phone.APN_TYPE_MMS, true);
} else {
return -1;
}
}
COM: <s> tells the phone sub system that the caller wants to </s>
|
funcom_train/5374563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Transform (Device device, float m11, float m12, float m21, float m22, float dx, float dy) {
if (device == null) device = Device.getDevice();
if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
this.device = device;
/*
device.checkGDIP();
handle = Gdip.Matrix_new(m11, m12, m21, m22, dx, dy);
if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES);
if (device.tracking) device.new_Object(this);
*/
}
COM: <s> constructs a new transform given all of the elements that represent the </s>
|
funcom_train/48022565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object newInstance() {
try {
Constructor constr = wrappedClass.getDeclaredConstructor(null);
try {
constr.setAccessible(true);
} catch(SecurityException neverMind) {/*Try anyway*/}
return constr.newInstance(null);
} catch (Exception x) {
throw ExceptionUtil.unchecked(x);
}
}
COM: <s> returns a new instance which is created with the default constructor of </s>
|
funcom_train/17679641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addToParamNode(ParamNode n) {
if (n.usageList == null) {
n.usageList = this;
} else {
ParamNodeUsage p = (ParamNodeUsage)n.usageList;
for (; p.next != null; p = p.next);
p.next = this;
}
}
COM: <s> add us to the end of the usage list for n </s>
|
funcom_train/33133543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void resetCurrentVat() {
Vat vat = currentVat.get();
if (vat == null) {
throw new IllegalStateException(
"No vat is installed inthis thread.");
}
if (vat != this) {
throw new IllegalStateException(
"Other vat is installed in this thread: " + vat);
}
synchronized (stateLock) {
if (queue.isEmpty()) {
state = VatState.IDLE;
} else if (runner != null) {
enqueueVat();
} else {
// this is the case when vat was detached
// during its turn
state = VatState.PENDING;
}
}
currentVat.remove();
}
COM: <s> disassociate thread from vat </s>
|
funcom_train/37807982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String internalPart(String room, String user) {
String key = MultiValueHashMap.key(room);
MultiValueHashMap.remove(_rooms, key, user);
if (MultiValueHashMap.size(_rooms, key) == 0) {
return key;
}
return null;
}
COM: <s> part method duplcate used internally by this class </s>
|
funcom_train/36994508 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkCoordinates(final Number[] coords) {
// Confirm dimensionality is the same
if (getDimensionality() != coords.length) {
return false;
}
// Check every value
NumberRange[] ranges = getRanges();
for (int i = 0; i < ranges.length; i++) {
if (!ranges[i].includes(coords[i])) {
return false;
}
}
return true;
}
COM: <s> given a set of coordinates returns true if the coordinates are valid for </s>
|
funcom_train/44157313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void warmupTest(Calculator calc) {
for (int i = 0; i < WARMUP_REPETITION_COUNT; i++) {
calc.getArea(AREA_SIDE_A, AREA_SIDE_B);
// Checkstyle: EmptyBlock off
try {
calc.throwMeAnException();
} catch (CalculatorException e) {
// Okay.
}
// Checkstyle: EmptyBlock on
calc.countNumberOfUppercaseLetters(m_largeText);
}
}
COM: <s> execute one first call for each method to minimize adulterations </s>
|
funcom_train/18835997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearLocal() {
System.out.println("clear");
/* Pull out the currently selected contact */
LocalInfoBean file = (LocalInfoBean)this.getDataTable().getRowData();
FileManager.clearFile(file.getLocalFile());
System.out.println("Clearing: " + file.getFileInfo().getFileName());
}
COM: <s> action to clear the local file </s>
|
funcom_train/13716585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCp2Angle(int cp_angle2) {
this.cp_angle2_is_set_by_user = true;
this.cp_angle2 = (Math.PI*cp_angle2)/180.0;
update_vector(from, to, from_size, to_size);
for (ArrowChangeListener l : arrowChangeListeners)
l.arrowChanged(arrowChangeEvent);
}
COM: <s> sets cp angle2 expressed in degrees </s>
|
funcom_train/29950755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Control previousControl() {
if ( m_controls.size() == 0 ) {
return null;
} else {
if ( m_currentControlIndex > 0 ) {
m_currentControlIndex--;
} else {
m_currentControlIndex = m_controls.size() - 1;
}
return currentControl();
}
}
COM: <s> return previous control of group </s>
|
funcom_train/5718344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension getPreferredSize() {
if (map.isPrinting()) {
return new Dimension(super.getPreferredSize().width
+ (int) (10f * map.getZoom()),
super.getPreferredSize().height);
} else {
return super.getPreferredSize();
}
}
COM: <s> changed to remove the printing bug of java </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.