__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/14306469 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void moveDown(int row) {
Object a = elements.elementAt(row);
Object b = elements.elementAt(row + 1);
elements.setElementAt(a, row + 1);
elements.setElementAt(b, row);
fireTableRowsUpdated(row, row + 1);
pathElementTable.setRowSelectionInterval(row + 1, row + 1);
}
COM: <s> move an element down towards the end of the path </s>
|
funcom_train/7443555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PreferenceWriter appendQuality(float quality) {
if (!isValidQuality(quality)) {
throw new IllegalArgumentException(
"Invalid quality value detected. Value must be between 0 and 1.");
}
java.text.NumberFormat formatter = java.text.NumberFormat
.getNumberInstance(java.util.Locale.US);
formatter.setMaximumFractionDigits(2);
append(formatter.format(quality));
return this;
}
COM: <s> formats a quality value </s>
|
funcom_train/44825046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IContext getThreadContext() throws QueryException {
IContext ctx = (IContext) threadContextTable.get (Thread.currentThread());
if (ctx == null) {
QueryException qX = new QueryException ("Invalid thread getting context.");
setLastException (qX);
throw qX;
} else {
return ctx;
}
}
COM: <s> get the icontext object associated with the current thread </s>
|
funcom_train/50701325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean Connect() {
// FIXME: should return true if db is already open and do reference counting
try {
Class.forName("org.postgresql.Driver");
dbConnection = DriverManager.getConnection(dbUrl, uname, passwd);
return true;
}
catch (SQLException e) {
System.out.println("XenoxPostgreSQL.Connect error: " + e.getSQLState());
e.printStackTrace();
}
catch (Exception e) {
System.out.println("XenoxPostgreSQL.Connect error: Unrecognized exception, " + e);
e.printStackTrace();
}
return false;
}
COM: <s> call this before accessing the database </s>
|
funcom_train/1440489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopLogging() {
LogManager.getRootLogger().removeAppender(appender);
Enumeration<String> enumer =
java.util.logging.LogManager.getLogManager().getLoggerNames();
while (enumer.hasMoreElements()) {
java.util.logging.LogManager.getLogManager().
getLogger(enumer.nextElement()).
removeHandler(handler);
}
}
COM: <s> clean up when logging is stopped i </s>
|
funcom_train/28636560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writeCollection(Output out, Collection col) {
if (log.isDebugEnabled()) {
log.debug("writeCollection");
}
out.writeStartArray(col.size());
Iterator it = col.iterator();
boolean isFirst = true;
while (it.hasNext()) {
if (!isFirst) {
out.markElementSeparator();
} else {
isFirst = false;
}
serialize(out, it.next());
}
out.markEndArray();
}
COM: <s> writes a collection to the output </s>
|
funcom_train/50078328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNullComponentName() {
boolean passedTest = false;
try {
this.keeper.fetchComponent(null);
} catch(InvalidParameterException ipe) {
passedTest = true;
}
if (!passedTest) {
TestCase.fail("Keeper did not throw exception when attempting " +
"to fetch a component with a null name");
}
}
COM: <s> this method tests to make sure that an illegal argument exception is </s>
|
funcom_train/28506242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setWater() {
water.setPosition(-396.0f,-3.0f,78f);
water.setColor(0.2f,0.2f,1.0f);
water.setSize(850.0f, 0.0f, 400.0f);
}
COM: <s> sets the water </s>
|
funcom_train/39911508 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetRh1() {
System.out.println("setRh1");
TextField tf = null;
Page1 instance = new Page1();
instance.setRh1(tf);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set rh1 method of class timesheetmanagement </s>
|
funcom_train/36189182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PSSMethodMetadata getMethodByName(String name) {
for (int i = 0; i < m_methods.size(); i++) {
PSSMethodMetadata met = (PSSMethodMetadata) m_methods.get(i);
if (met.getMethod().getName().equals(name)) { return met; }
}
return null;
}
COM: <s> get a method by its name </s>
|
funcom_train/44309711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HydrateObject proxyObject(ObjectContext ctx, Object o) {
HydrateObject ret = null;
params2[0] = ctx;
params2[1] = o;
try {
ret = (HydrateObject)m_proxyConstructor.newInstance(params2);
} catch (Exception e) {
m_log.warn("Can't create proxy", e);
}
params2[0] = null;
params2[1] = null;
return ret;
}
COM: <s> provides a temporary proxy for a non hydrate object </s>
|
funcom_train/678192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private UserAccountBean getUserAccount(){
Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
String username = null;
if (principal instanceof UserDetails) {
username = ((UserDetails)principal).getUsername();
} else {
username = principal.toString();
}
// TODO: Call UserAccountDao.findByUserName()
return null;
}
COM: <s> helper method to get the user account </s>
|
funcom_train/3762244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFilterEntry(String name, String value){
Object[] newEntry = new Object[3];
newEntry[0] = new Boolean(false);
newEntry[1] = name;
newEntry[2] = value;
m_rows.add(newEntry);
int lastElem = m_rows.size()-1;
fireTableRowsInserted(lastElem, lastElem);
}
COM: <s> adds the filter to the list </s>
|
funcom_train/44822248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IView getCurrentViewForPane (ContentPaneDef contentPaneDef) {
if (contentPaneDef == null) return null;
Object view = null;
JPanel container = (JPanel) contentPaneDef.getUserObject();
if (container != null && container.getComponentCount() > 0) {
view = container.getComponent(0);
}
return (IView) view;
}
COM: <s> get the current iview being displayed within a given pane </s>
|
funcom_train/37222697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void draw(ScalablePosition p) {
Iterator it = shapes.iterator();
Iterator posIt = positions.iterator();
while (it.hasNext()) {
ScalablePosition pos = (ScalablePosition) posIt.next();
ScalablePosition finalPos = (ScalablePosition)metricRegion().metricsConsumerFactory().createConsumer(ScalablePosition.class);
finalPos.set(p);
finalPos.add(pos.unscaled(Bag.get().theater().renderer().scale()));
((caffeine.basicgame.io.display.Shape) it.next()).draw(finalPos);
}
}
COM: <s> draws all the shapes </s>
|
funcom_train/4193470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void listen()
{ printLog("inside method listen()",LogLevel.MEDIUM);
if (!statusIs(D_INIT))
{ printLog("first subscription already received",LogLevel.MEDIUM);
return;
}
// else
changeStatus(D_WAITING);
// listen for the first SUBSCRIBE request
sip_provider.addSipProviderListener(new MethodIdentifier(SipMethods.SUBSCRIBE),this);
}
COM: <s> listen for the first subscription request </s>
|
funcom_train/14306416 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void storeToProperty(String name) {
int i = 1;
while (i < getItemCount()) {
//Log.log(Log.DEBUG,this,"Setting '"+name+"."+i+"' to '"+getItemAt(i)+"'");
jEdit.setProperty(name + "." + i, getItemAt(i).toString());
i++;
}
jEdit.unsetProperty(name + "." + i);
}
COM: <s> stores this boxs elements in the given property </s>
|
funcom_train/12211609 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getDependencies(BugVO bug) throws BugzillaException {
try {
BugzillaBugDAO dao = DAOFactory.getInstance().getBugzillaBugDAO();
this.getDependenciesBlocks(bug, dao);
this.getDependenciesDependsOn(bug, dao);
dao.clean();
} catch (BugzillaDAOException e) {
throw new BugzillaException("Database error while getting dependencies: " + e.getMessage(), e);
}
}
COM: <s> populate bug dependencies </s>
|
funcom_train/15370674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Namespace getOrCreateNamespace(final String name) throws MetamodelException {
if ((name == null) || name.equals("")) {
return this;
}
final String current = Util.getFirstPart(name);
final String next = Util.getSecondPart(name); //rest
Namespace currentPackage = getSubNamespace(current);
if(currentPackage == null) {
currentPackage = createNamespace(current);
currentPackage.setParent(this);
}
return currentPackage.getOrCreateNamespace(next);
}
COM: <s> p return the package with the fullyqualified name that </s>
|
funcom_train/44284038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void eventListener(ChangeEvent e) {
DKnob t = (DKnob) e.getSource();
int oValue = Math.round(t.getValue() * (getValueMax() - getValueMin())) + getValueMin();
String oVStr = display(oValue);
mLabel.setText(oVStr);
sendSysex(oValue);
}
COM: <s> invoked when knob is moved </s>
|
funcom_train/25329630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setField(String fieldName, Field f) {
if (loader.debug) {
System.out.println("Adding field " + f.toStringId() +
"\n with name " + fieldName +
"\n to script node " + this.toStringId());
}
f.init(this, FieldSpec, Field.FIELD, f.baseName(fieldName));
}
COM: <s> sets the field attribute of the script object </s>
|
funcom_train/18118500 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getNewProjectMenuItem() {
if (newProjectMenuItem == null) {
newProjectMenuItem = new JMenuItem();
newProjectMenuItem.setText(Messages.getString("MainWindow.newProjectMenuItem")); //$NON-NLS-1$
newProjectMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
control.showNewProjectDialog();
}
});
}
return newProjectMenuItem;
}
COM: <s> this method initializes new project menu item </s>
|
funcom_train/34562789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IO file(final QueryContext ctx) throws QueryException {
final byte[] name = checkStr(expr[0], ctx);
final IO io = IO.get(string(name));
if(!ctx.context.user.perm(User.ADMIN) || !io.exists()) Err.or(DOCERR, name);
return io;
}
COM: <s> returns a file instance for the first argument </s>
|
funcom_train/3927492 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean shiftVert( int fileStartLine ) {
int sy = vscroll.getValue()/fontHeight;
if (fileStartLine < sy) {
sy = fileStartLine;
if (sy < 0) {
sy = 0;
}
vscroll.setValue(sy*fontHeight);
return true;
}
if (fileStartLine >= sy + numberFileLinesDisplayed) {
sy = fileStartLine - numberFileLinesDisplayed + 1;
vscroll.setValue(sy * fontHeight);
doc.extendHilite(sy + numVisibleLines - 1);
return true;
}
return false;
}
COM: <s> shift text vertically so a particular file line is visible </s>
|
funcom_train/39393354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void totalCost(TcoObject root) throws java.lang.Throwable {
printDetails = false;
startHtml();
startBody(null);
// calculate the model
header("1", 1, root);
paragraph(getRsc("CIAllCost"));
startParagraph();
encodeCodes(root.getObjectServer(), root);
endParagraph();
endElement(/* body */);
endElement(/* html */);
}
COM: <s> summarize cost types over all services below root </s>
|
funcom_train/26215442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getString(Vector items) {
StringBuffer buf = new StringBuffer("[");
for ( Iterator i = items.iterator(); i.hasNext(); ) {
buf.append(i.next().toString());
if ( i.hasNext() ) buf.append(", ");
}
return buf.append("]").toString();
}
COM: <s> iterates an array of items building a string of comma delimited </s>
|
funcom_train/3581753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawLine (int x1, int y1, int x2, int y2) {
emitThis ("%drawLine "+x1+" "+y1+" "+x2+" "+y2);
int xps1 = xTrans (x1);
int yps1 = yTrans (y1);
int xps2 = xTrans (x2);
int yps2 = yTrans (y2);
emitThis (xps1+" "+yps1+" moveto "+xps2+" "+yps2+" lineto stroke");
}
COM: <s> draws a line between the coordinates x1 y1 and x2 y2 </s>
|
funcom_train/6351147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SmdpQueryManager getQueryManager() {
SmdpQueryManager smdpQueryManager= null;
if(this.useDbSystem) {
smdpQueryManager= new SmdpQueryManager(this.smdpDatabaseManager);
} else {
smdpQueryManager= new SmdpQueryManager(this.smdpNetworkManager);
}
return(smdpQueryManager);
}
COM: <s> gives a query manager object used to query datasource </s>
|
funcom_train/25311906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void toXML(TransformerHandler tf) throws SAXException {
StringBuffer result = new StringBuffer("");
for (int[] tuple : tuples) {
result.delete(0, result.length());
for (int i : tuple)
result.append( String.valueOf(i)).append(" ");
result.append("|");
tf.characters(result.toString().toCharArray(), 0, result.length());
}
}
COM: <s> it writes the content of this object as the content of xml </s>
|
funcom_train/9120329 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private URL buildMimeTypeGraph() throws IOException {
Distribution distribution = new Distribution();
for (Resource resource : getResources()) {
// Check any records that have a format (mimeType is required if format is present)
if (resource.getFormat() != null) {
String mimeType = resource.getFormat().getMimeType();
distribution.incrementCount(mimeType);
}
}
return (buildPieGraphURL("DDMS%20MimeType%20Distribution", distribution, PIE_GRAPH_3D));
}
COM: <s> traverses the mime types of any loaded records and creates a </s>
|
funcom_train/9489244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void draw(Renderer renderer) {
// points TODO hidden aspect ?
/*
* for (Iterator<Drawable3D> d =
* lists[Drawable3D.DRAW_TYPE_POINTS].iterator(); d.hasNext();)
* d.next().draw(renderer);
*/
// curves
for (Iterator<Drawable3D> d = lists[Drawable3D.DRAW_TYPE_CURVES].iterator(); d
.hasNext();)
d.next().draw(renderer);
}
COM: <s> draw the not hidden solid parts of curves and points </s>
|
funcom_train/51358802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void stepEuler(double dt, double[] vars) {
double[] k, input;
input = new double[vars.length];
//Solve for the slope at t for k1
for (int i = 0; i < vars.length; i++) {
input[i] = vars[i];
}
k= derivative(input);
//Calculate the weighted average;
for (int i = 0; i < vars.length; i++) {
vars[i] += dt * k[i];
}
}
COM: <s> integrates equations using eulers methods </s>
|
funcom_train/4095022 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addInflowTypePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_EconomicResourceType_inflowType_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_EconomicResourceType_inflowType_feature", "_UI_EconomicResourceType_type"),
ReamodelPackage.Literals.ECONOMIC_RESOURCE_TYPE__INFLOW_TYPE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the inflow type feature </s>
|
funcom_train/8882626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void executeBuild() {
System.err.println("Resolving dependencies...");
depContext.resolveAll();
System.err.println("Compiling....");
ICompilerManager.compileAll(vars);
System.err.println("Packaging...");
IPackageManager.packageAll(vars);
}
COM: <s> execute the build cycle resolve compile package </s>
|
funcom_train/45240402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JButton getJButtonCategoriasSitios() {
if (jButtonCategoriasSitios == null) {
jButtonCategoriasSitios = new JButton();
jButtonCategoriasSitios.setIcon(new ImageIcon(getClass().getResource("/br/uesc/computacao/estagio/apresentacao/figuras/folder.png")));
jButtonCategoriasSitios.setLocation(new Point(560, 55));
jButtonCategoriasSitios.setSize(new Dimension(31, 28));
jButtonCategoriasSitios.setBackground(new Color(173, 200, 226));
jButtonCategoriasSitios.setCursor(new Cursor(Cursor.HAND_CURSOR));
}
return jButtonCategoriasSitios;
}
COM: <s> this method initializes j button categorias sitios </s>
|
funcom_train/14402007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addChild(ITreeElement pElement) {
boolean added = iChildrenList.addKeyValuePair(pElement.getCategory(), pElement);
if (added) {
pElement.addChangesListener(this);
pElement.addWbemQueryListener(this);
fireTreeElementEvent(new TreeElementEvent(this, pElement, TreeElementEvent.TYPE_ADD));
}
return added;
}
COM: <s> adds the passed tree element as child to its children list </s>
|
funcom_train/33282685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPosX() {
int cumulativeOffset = 0;
Element element = this;
while (element != null) {
cumulativeOffset += element.jsxGet_offsetLeft();
if (element != this) {
cumulativeOffset += element.jsxGet_currentStyle().getBorderLeft();
}
element = element.getOffsetParent();
}
return cumulativeOffset;
}
COM: <s> returns this elements x position </s>
|
funcom_train/22277940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void encode(Encoder encoder) throws CodingException {
encoder.encodeObject(ITEMS_KEY, items);
encoder.encodeObject(SUPERITEM_KEY, superitem);
encoder.encodeObject(PROTOTYPEITEM_KEY, prototypeItem);
encoder.encodeObject(BORDER_KEY, border);
encoder.encodeObject(BACKGROUNDCOLOR_KEY, backgroundColor);
encoder.encodeBoolean(TRANSPARENT_KEY, transparent);
}
COM: <s> encodes the menu instance </s>
|
funcom_train/2291352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (obj instanceof CmsSearchFieldMapping) {
CmsSearchFieldMapping other = (CmsSearchFieldMapping)obj;
return CmsStringUtil.isEqual(m_type, other.m_type) && CmsStringUtil.isEqual(m_param, other.m_param);
}
return false;
}
COM: <s> two mappings are equal if the type and the parameter is equal </s>
|
funcom_train/4301638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processCheckpoint() throws HsqlException {
boolean defrag;
String token;
session.checkAdmin();
session.checkDDLWrite();
defrag = false;
token = tokenizer.getString();
// fredt - todo - catch misspelt qualifiers here and elsewhere
if (token.equals(Token.T_DEFRAG)) {
defrag = true;
}
database.logger.checkpoint(defrag);
}
COM: <s> responsible for handling checkpoint defrag </s>
|
funcom_train/11827036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCancel_Command () {
if (Cancel_Command == null) {//GEN-END:|14-getter|0|14-preInit
// write pre-init user code here
Cancel_Command = new Command ("Cancel", Command.CANCEL, 0);//GEN-LINE:|14-getter|1|14-postInit
// write post-init user code here
}//GEN-BEGIN:|14-getter|2|
return Cancel_Command;
}
COM: <s> returns an initiliazed instance of cancel command component </s>
|
funcom_train/47887140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void chkRightLedActionPerformed(ActionEvent evt) {
if (chkRightLed.isSelected()) {
control.changeLedsIntensity(
(double) slideLedsIntensity.getValue() / 10,
TuxAPIConst.SSV_RIGHT);
}
else {
control.setLeds(TuxAPIConst.SSV_OFF, TuxAPIConst.SSV_RIGHT);
}
}
COM: <s> event right led checkbox changed </s>
|
funcom_train/811966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDefaultServerURL(){
String serverStr=Activator.getDefault().getPluginPreferences()
.getString(BiomartConstants.BIOMART_SERVERS_PREFERENCE);
String[] servers=AddRemoveListFieldEditor.parseString(serverStr);
if (servers==null) return null;
return servers[0];
}
COM: <s> get from preference store and return topmost server url default </s>
|
funcom_train/12807988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteBodyRows() {
ArrayList<PdfPRow> rows2 = new ArrayList<PdfPRow>();
for (int k = 0; k < headerRows; ++k)
rows2.add(rows.get(k));
rows = rows2;
totalHeight = 0;
if (totalWidth > 0)
totalHeight = getHeaderHeight();
}
COM: <s> removes all of the rows except headers </s>
|
funcom_train/17890841 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void logFileStatus() {
if (status != Status.FILE_OK) {
final List<String> replace = new ArrayList<String>();
replace.add(getPath());
log.warn(Debug.getString(FingerprintFile.class, status.getValue(), replace));
}
}
COM: <s> display or log the status of the file if it is not ok </s>
|
funcom_train/28226300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void decrementHealth(int difference) {
if (getArmor() == null)
setHealth(getHealth() - difference);
else {
final int armorDifference = Math.min(getArmor().getStrength(),
difference / 2);
final int healthDifference = difference - armorDifference;
setHealth(getHealth() - healthDifference);
getArmor().setStrength(getArmor().getStrength() - armorDifference);
}
}
COM: <s> override abstract method </s>
|
funcom_train/50914313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAtomRefs4(CMLAtom[] atoms4) throws RuntimeException {
if (atoms4 == null || atoms4.length != 4) {
throw new RuntimeException("Must give 4 atoms");
}
this.setAtomRefs4(new String[] { atoms4[0].getId(), atoms4[1].getId(),
atoms4[2].getId(), atoms4[3].getId(), });
}
COM: <s> sets atoms and their references </s>
|
funcom_train/10267138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String cancelCase(String caseID, String sessionHandle) throws IOException {
Map params = new HashMap();
params.put("action", "cancelCase");
params.put("sessionHandle", sessionHandle);
String result = executePost(_backEndURIStr + "/caseID/" + caseID, params);
return result;
}
COM: <s> cancels the case with case id </s>
|
funcom_train/7627477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public void toArray(JSArrayBuilder array) {
// if (isMedia()) {
// // For media, we send its array (i.e., we don't wrap this in another
// // array as we do for non-media parts).
// tokens.get(0).toArray(array);
// } else {
// array.beginArray();
// addToArray(array);
// array.endArray();
// }
// }
COM: <s> adds the tokens into the given builder as an array </s>
|
funcom_train/47307405 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getCourses(User currentUser){
if(currentUser != null){
if(Role.getAdminRoles().keySet().contains(currentUser.getRoleId())){
// if current user has Admin role, then just retrive all courses
return dao.getCourses();
} else if(Role.getHODRoles().keySet().contains(currentUser.getRoleId())){
// if current courses for HOD's department
return getCourses(currentUser.getDepartment());
} //
} //end if
return null;
}
COM: <s> get the courses list filtered by access privilege </s>
|
funcom_train/50909689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testThrowingWithoutMaximize() {
int result;
int A;
int S;
int B;
for(A=1; A<10; A++) {
for(S=2; S<10; S++) {
for(B=0; B<10; B++) {
result = Dice.roll(A, S, B, false);
assertTrue("Too big result.", result <= A*S+B);
assertTrue("Too small result", 0 <= (A*S+B));
}
}
}
}
COM: <s> tests throwing of dices without maximize rule </s>
|
funcom_train/955549 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String createUpdateStatement() {
StringBuilder sql = new StringBuilder("update ");
sql.append(getTableName()).append(" set ").append(getPlaceHolders());
sql.append(" where ").append(getFetchCondition()).append(";");
return sql.toString();
}
COM: <s> create sql update statement string </s>
|
funcom_train/14176930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createDropDownText(Composite parent) {
int parentWitdh = parent.getSize().x;
// create the list
text = new Text(parent, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
text.setFont(parent.getFont());
// print the stacktrace in the text field
text.setText(getDetail());
GridData data = new GridData();
data.horizontalIndent=0;
data.heightHint = text.getLineHeight() * TEXT_LINE_COUNT;
data.widthHint = parentWitdh;
text.setLayoutData(data);
}
COM: <s> create this dialogs drop down list component </s>
|
funcom_train/4358430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMaxIdleBackup (int backup) {
if (backup == this.maxIdleBackup)
return;
int oldBackup = this.maxIdleBackup;
this.maxIdleBackup = backup;
support.firePropertyChange("maxIdleBackup",
new Integer(oldBackup),
new Integer(this.maxIdleBackup));
}
COM: <s> sets the option to back sessions up to the store after they </s>
|
funcom_train/22165817 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void MergeWith(NamedEntityType pi_NE, NamedEntityExplanation pi_Info) {
// merge bit pos and uids
m_BitValue.or(pi_NE.m_BitValue);
this.MergeUID(pi_NE.m_UID);
// add explanation
AddNewInfo(pi_Info);
}
COM: <s> merge primitive type of current and parameter entity </s>
|
funcom_train/22047528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void debug(Object o, String m) {
String outputString = "Debug: " +
((o != null) ? o.getClass().getName() + ": " : "") +
m;
System.out.println(outputString);
outputMessageToFile(outputString);
}
COM: <s> callback method to be called from the static misc object </s>
|
funcom_train/23028959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JScrollPane getProducenciView() {
if (producenciView == null) {
try {
GridLayout gridLayout = new GridLayout();
gridLayout.setRows(10);
producenciView = new JScrollPane();
producenciView.setBorder(null);
producenciView.setViewportView(getPrducenciPanel());
producenciView.setBounds(new Rectangle(602, 1, 170, 466));
} catch (java.lang.Throwable e) {
// TODO: Something
}
}
return producenciView;
}
COM: <s> this method initializes producenci view </s>
|
funcom_train/12155429 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ActionListener createEventRadioButtonActionListener(final int transferSyntaxUIDIndex) {
ActionListener actionListener = new ActionListener() {
public void actionPerformed(ActionEvent actionEvent) {
if (logger.isDebugEnabled()) {
logger.debug("Entering actionPerformed(" + actionEvent + ").");
}
setTransferSyntaxUIDIndex(transferSyntaxUIDIndex);
if (logger.isDebugEnabled()) {
logger.debug("Exiting actionPerformed(" + actionEvent + ").");
}
}
};
return actionListener;
}
COM: <s> creates listeners for the transfer syntax radio buttons </s>
|
funcom_train/4852801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getRootsField() {
if (rootsField == null) {
rootsField = new JTextField();
rootsField.setPreferredSize(new Dimension(400, 19));
rootsField.setEnabled(true);
rootsField.setColumns(20);
rootsField.addPropertyChangeListener("enabled",
new java.beans.PropertyChangeListener() {
public void propertyChange(java.beans.PropertyChangeEvent e) {
rootsField.setText("");
}
});
}
return rootsField;
}
COM: <s> this method initializes roots field </s>
|
funcom_train/35112120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JSONObject block(String userId) throws PlurkException {
try {
HttpGet method = (HttpGet) PlurkActionSheet.getInstance()
.block(config.args().name("user_id").value(userId).getMap());
return JsonUtils.toObject(executor.execute(method));
} catch (Exception e) {
throw PlurkException.create(e);
}
}
COM: <s> api blocks block </s>
|
funcom_train/47305172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void renameColumn(SQLColumn oldCol, SQLColumn newCol) {
Map<String, SQLObject> colNameMap = new HashMap<String, SQLObject>();
print("\nALTER TABLE ");
print(toQualifiedName(oldCol.getParent()));
print(" ALTER COLUMN ");
print(createPhysicalName(colNameMap, oldCol));
print(" RENAME TO ");
print(createPhysicalName(colNameMap, newCol));
endStatement(StatementType.ALTER, newCol);
}
COM: <s> generate the sql to rename a column </s>
|
funcom_train/7275525 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isActiveDHTCapable() {
long averageTime = getAverageTime();
return _isHardcoreCapable
&& (averageTime >= DHTSettings.MIN_ACTIVE_DHT_AVERAGE_UPTIME.getValue()
&& _currentUptime >= (DHTSettings.MIN_ACTIVE_DHT_INITIAL_UPTIME.getValue()/1000L))
&& networkManager.isGUESSCapable();
}
COM: <s> returns whether ot not a node is active capable </s>
|
funcom_train/28356938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reloadSignals() {
if ( _remoteProxy != null ) {
try {
final int numTypes = _mpsTypes.size();
for ( int type = 0 ; type < numTypes ; type++ ) {
_remoteProxy.reloadSignals(type);
}
}
catch(RemoteMessageException exception) {
_isRemoteStatusOkay = false;
throw new RuntimeException("Remote message exception while reloading signals.", exception);
}
}
}
COM: <s> request the remote service to reload signals from the global database </s>
|
funcom_train/10482731 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void loadContent(ByteArrayInputStream stream) throws MessagingException {
// since this is a byte array input stream, available() returns reliable value.
content = new byte[stream.available()];
try {
// just read everything in to the array
stream.read(content);
} catch (IOException e) {
// should never happen
throw new MessagingException("Error loading content info", e);
}
}
COM: <s> load the message content from the server </s>
|
funcom_train/805752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected WizardCategory findCategory(String id) {
assert invariant() : "PRE: The invariant holds";
// First check if this is the category we are looking for.
if (this.id.equals(id)) {
return this;
}
// If not, check the children.
for (WizardCategory currentCategory : categories) {
WizardCategory childCategory = currentCategory.findCategory(id);
if (childCategory != null) {
return childCategory;
}
}
return null;
}
COM: <s> returns the wizard category corresponding to the passed id or </s>
|
funcom_train/7791274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void disconnect() {
if (model.getCurrentProfile() != null) {
for (AccountData a : model.getCurrentProfile().getAccountData()) {
a.getConnection().disconnect();
a.removeAllFriends();
a.setConnected(false);
}
}
this.model.initializeAllVariables();
return;
}
COM: <s> disconnects all accounts associated with the current profile from the </s>
|
funcom_train/15819868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getAttribute(ObjectName mBean, String string) throws InstanceNotFoundException {
try {
checkAndConnect();
return getMBeanServerConnection().getAttribute(mBean, string);
} catch (org.omg.CORBA.COMM_FAILURE t) {
return null;
} catch (Throwable ex) {
return null;
}
}
COM: <s> get the specified parameter from the mbean </s>
|
funcom_train/4817031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Identifier getClaimedId() {
if (getAuthResultType() != ResultType.AUTH_SUCCESS) {
return null;
}
try {
return isSecure
? new SecureUrlIdentifier(result.getVerifiedId())
: result.getVerifiedId();
} catch (DiscoveryException e) {
log.log(Level.WARNING,
"could not create SecureUrlIdentifier from UrlIdentifier", e);
return null;
}
}
COM: <s> if the response included a claimed id and verified correctly then this </s>
|
funcom_train/8743189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isUpToDate() {
return true;/*
OccurrencesIndex oi = new OccurrencesIndex(occurrencesFilename, getDirectoryName());
SamplingIndex si = new SamplingIndex(getDirectoryName(), null);
return oi.isUpToDate() && si.isUpToDate();*/
}
COM: <s> check if this dataset is up to date </s>
|
funcom_train/16711190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValid() {
assert (getValueFrom() != null) : "Inappropriate null range from value";
assert (getValueTo() != null) : "Inappropriate null range to value";
assert (getValueStep() != null) : "Inappropriate null range step value";
// TODO : Verify content of RangeInput is value, e.g. the range itself.
return true;
}
COM: <s> validate the content of the object </s>
|
funcom_train/46760642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InvoiceTypeModel getInvoiceType(final long invoiceTypeId, final IChainStore chain, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
return BillingData.getInvoiceType(invoiceTypeId, chain, call);
}}; return (InvoiceTypeModel) call(method, call);
}
COM: <s> same transaction return the single invoice type model for the primary key </s>
|
funcom_train/3458618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent evt) {
// extract the control that sends the event
Object source = evt.getSource();
// hardcode this for the moment
try {
getFrame().setVisible(true);
getFrame().setSelected(true);
getFrame().setMaximum(true);
} catch(Exception exc) {
// handle this in the future
// exc.printStackTrace();
}
}
COM: <s> implements the action listener interface </s>
|
funcom_train/17440400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getUrlString() {
String s = new String("");
s += getTypeUrlChar() + ",";
s += color + ",";
// this value is ignored - but has to be a number
s += "0" + ",";
s += String.valueOf(startPoint) + ",";
s += String.valueOf(endPoint);
return s;
}
COM: <s> returns the url for the range marker </s>
|
funcom_train/3991177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void appendSamples(int channel, float[] f, int len) {
int pos = bufferp[channel];
short s;
float fs;
for (int i = 0; i < len;) {
fs = f[i++];
fs = (fs>32767.0f ? 32767.0f
: (fs < -32767.0f ? -32767.0f : fs));
s = (short)fs;
buffer[pos] = s;
pos += channels;
}
bufferp[channel] = pos;
}
COM: <s> accepts 32 new pcm samples </s>
|
funcom_train/8692637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StartElement createStartElement(Element elem) {
// create name
QName tagName = createQName(elem.getQName());
// create attribute & namespace iterators
Iterator attrIter = new AttributeIterator(elem.attributeIterator());
Iterator nsIter = new NamespaceIterator(elem.declaredNamespaces()
.iterator());
// create start event
return factory.createStartElement(tagName, attrIter, nsIter);
}
COM: <s> constructs a stax </s>
|
funcom_train/7876230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWorkingdays(boolean[] workingdays) {
if (workingdays == null) return;
this.workingdays = workingdays;
for (int i = 0; i < paneles.length; i++) {
for (int j = 0; j < paneles[i].length; j++) {
paneles[i][j].setWorking(workingdays[dayorder[j + 1] - 1]);
}
}
}
COM: <s> setter for property workingdays </s>
|
funcom_train/1665372 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FCPConnection duplicate() {
if (!duplicationAllowed)
return this;
Logger.info(this, "Duplicating connection to the node ...");
FCPConnection newConnection;
/* upload limit is useless here, since we can't do a global limit
* on all the connections */
newConnection = new FCPConnection(nodeAddress, port, -1,
duplicationAllowed, localSocket,
autoDownload);
if (!newConnection.connect()) {
Logger.warning(this, "Unable to duplicate socket !");
return this;
}
return newConnection;
}
COM: <s> if duplication allowed returns a copy of this object using a different </s>
|
funcom_train/40634802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createAddThis() {
this.anchorElement.addClassName(CLASS_NAME);
this.anchorElement.setAttribute(ONMOUSEOUT, "addthis_close();");
this.anchorElement.setHref(HREF+getPubId());
this.anchorElement.setInnerHTML(createButtonImageHtml(width, height));
addMouseOverHandler();
addMouseOutHandler();
addClickHandler();
}
COM: <s> sets the state of the anchor element and handles the mouse over events </s>
|
funcom_train/51827164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void tableChanged(TableModelEvent e) {
int row = e.getFirstRow();
int column = e.getColumn();
TableModel model = (TableModel)e.getSource();
Object data = model.getValueAt(row, column);
Object register = model.getValueAt(row,0);
CBPanel.updateOptions(register.toString(),data.toString());
}
COM: <s> this method passes the changed value to cbpanel for updating options </s>
|
funcom_train/44535027 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setMail(String mail) {
if (mail == null || !mail.matches("[w-]+[w-]*)+@([w]+.)+[w-]+")) {
return false;
}
this.mail = mail;
setEMailDisplayName(null); // set default
return true;
}
COM: <s> sets the mail address e </s>
|
funcom_train/18828109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUnknownGenerator(TestHarness harness) {
harness.checkPoint("testUnknownGenerator");
try {
KeyPairGenerator.getInstance("ABC", Registry.GNU_CRYPTO);
harness.fail("testUnknownGenerator()");
} catch (Exception x) {
harness.check(true);
}
}
COM: <s> should fail with an unknown algorithm </s>
|
funcom_train/2579891 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof CombinedDomainCategoryPlot)) {
return false;
}
CombinedDomainCategoryPlot that = (CombinedDomainCategoryPlot) obj;
if (this.gap != that.gap) {
return false;
}
if (!ObjectUtilities.equal(this.subplots, that.subplots)) {
return false;
}
return super.equals(obj);
}
COM: <s> tests the plot for equality with an arbitrary object </s>
|
funcom_train/30196850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetTipoInserimento() {
System.out.println("setTipoInserimento");
String tipoInserimento = "test";
ModalitaInserimento instance = new ModalitaInserimento();
instance.setTipoInserimento(tipoInserimento);
String result = instance.getTipoInserimento();
assertEquals("test", result);
}
COM: <s> test of set tipo inserimento method of class com </s>
|
funcom_train/537122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSize() {
TracksQueue queue = new TracksQueue();
assertSize(0, queue);
queue.offer(this.track1userImportant);
assertSize(1, queue);
queue.offer(this.track2userImportant);
assertSize(2, queue);
queue.clear();
assertSize(0, queue);
}
COM: <s> test size is empty and clear </s>
|
funcom_train/48668497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addLeftComponent(JComponent c) {
if(leftPanel == null) {
leftPanel = new Box(BoxLayout.X_AXIS);
add(leftPanel, BorderLayout.WEST);
}
JPanel container = new JPanel(new BorderLayout(0, 0));
container.setBorder(
BorderFactory.createCompoundBorder(
BorderFactory.createEmptyBorder(2, 0, 0, 2),
new ThinBevelBorder(BevelBorder.LOWERED)));
container.add(c, BorderLayout.CENTER);
leftPanel.add(container);
}
COM: <s> adds a new component to the left hand side of the status bar </s>
|
funcom_train/17508273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void loadNextProcess() {
// TODO Auto-generated method stub
this.cpuProcess=(null); //remove current CPU process
ListIterator li = this.readyQueue.listIterator();
if(li.hasNext()){
Process p =(Process)li.next(); //get the first come first serve process from ready queue
this.setCpuProcess(p);
li.remove(); //remove the last one from ready because it is in CPU
}
}
COM: <s> loads next process on ready queue and removes current executing process </s>
|
funcom_train/35119309 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean endsWith(Sequence suffix) {
if (suffix.length() > this.length()) {
return false;
}
else {
for (int i = 0; i < suffix.length(); i++) {
if (!this.tokenAt(this.length() - i - 1).equals(suffix.tokenAt(suffix.length() - i - 1))) {
return false;
}
}
return true;
}
}
COM: <s> test if the the sequence has the suffix </s>
|
funcom_train/48391682 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HandlerRegistration addCancelClickHandler(com.smartgwt.client.widgets.events.CancelClickHandler handler) {
if(getHandlerCount(com.smartgwt.client.widgets.events.CancelClickEvent.getType()) == 0) setupCancelClickEvent();
return doAddHandler(handler, com.smartgwt.client.widgets.events.CancelClickEvent.getType());
}
COM: <s> add a cancel click handler </s>
|
funcom_train/7264852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void runTest(String request, String[] expected) {
Map<String,String> have = RemoteServerImpl.getArgs(request);
Map<String,String> want = new HashMap<String,String>();
for (int i=0; i<expected.length; i += 2) {
want.put(expected[i], expected[i+1]);
}
assertEquals(want,have);
}
COM: <s> makes sure that a call to </s>
|
funcom_train/50154303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setComponentsEnabled(Component[] comps, boolean enabled) {
for (int i = 0; i < comps.length; i++) {
if (comps[i] instanceof Container
&& comps[i] != scopeBox) { // fixes a weird issue where the contents remain grey ??
setComponentsEnabled(((Container) comps[i]).getComponents(), enabled);
}
comps[i].setEnabled(enabled);
}
}
COM: <s> method set components enabled </s>
|
funcom_train/42157268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JFormattedTextField getTextFromDate() {
if (textFromDate == null) {
textFromDate = new JFormattedTextField(new SimpleDateFormat(
"dd/MM/yyyy"));
textFromDate.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyTyped(java.awt.event.KeyEvent e) {
isValid();
}
});
}
return textFromDate;
}
COM: <s> this method initializes text from date </s>
|
funcom_train/9235807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkTriggerCompatibility() {
boolean compatible = false;
if (type == null || trigger.getSelectedIndex() == 0) {
compatible = false;
} else if (ActionManager.getCompatibleTypes(type).contains(trigger.getSelectedItem())
|| trigger.getSelectedItem() == type) {
compatible = true;
}
return compatible;
}
COM: <s> checks trigger compatibility </s>
|
funcom_train/6290003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addSearchPhrasesToSettings() {
saveAddPhraseSettings();
String[] phrases = searchPhraseForm.getSearchPhrases();
for (int i = 0; i < phrases.length; i++) {
searchSettings.addSearchPhrase(
new SearchPhrase(
phrases[i],
searchPhraseForm.getSearchMode(),
searchPhraseForm.getPhraseImportance(),
getSelectedMessageParts()));
}
}
COM: <s> adds search phrases contained in edit box to search settings </s>
|
funcom_train/17204698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean definitelySame(FieldReference that) {
if (this == that) return true;
if (getName() != that.getName() || getDescriptor() != that.getDescriptor()) {
return false;
}
RVMField mine = peekResolvedField();
RVMField theirs = that.peekResolvedField();
if (mine == null || theirs == null) return false;
return mine == theirs;
}
COM: <s> do this and that definitely refer to the same field </s>
|
funcom_train/18960267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean almostOwned(Player p, Continent co) {
int ownedByPlayer=0;
Vector territoriesContained = co.getTerritoriesContained();
for (int c=0; c< territoriesContained.size() ; c++) {
if ( ((Country)territoriesContained.elementAt(c)).getOwner() == p ) {
ownedByPlayer++;
}
}
if ( ownedByPlayer>=(territoriesContained.size()-2) ) {
return true;
}
else {
return false;
}
}
COM: <s> checks if the player owns almost all of the territories within a continent </s>
|
funcom_train/19842814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean onSuggestionsKey(View v, int keyCode, KeyEvent event) {
boolean handled = false;
// also guard against possible race conditions (late arrival after dismiss)
if (mSearchable != null) {
handled = doSuggestionsKey(v, keyCode, event);
if (!handled) {
handled = refocusingKeyListener(v, keyCode, event);
}
}
return handled;
}
COM: <s> react to the user typing while the suggestions are focused </s>
|
funcom_train/15636890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void onLastCycleEnd() {
System.out.println("######## Validating ########");
if (runvalidation()) {
System.out.println("success!");
} else {
System.out.println("ERROR!");
}
}
COM: <s> when the last cycle ends do verification for each entry in hash map </s>
|
funcom_train/3155773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkForAATSRForwardBand(Band band) {
boolean bRet = false;
int bandIndex;
for (int n = 0; n < _aatsrMDSIndices.length; n++) {
bandIndex = _aatsrMDSIndices[n];
if (ObjectUtils.equalObjects(band.getName(), EnvisatConstants.AATSR_L1B_BAND_NAMES[bandIndex])) {
bRet = true;
break;
}
}
return bRet;
}
COM: <s> checks if the given band is an aatsr forward band </s>
|
funcom_train/21397281 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addNewReading(long newReading) {
calls.incrementAndGet();
total.addAndGet(newReading);
synchronized (lock) {
// this is not entirely thread-safe, must lock
if (newReading < minimum.longValue()) {
minimum.set(newReading);
}
// this is not entirely thread-safe, must lock
if (newReading > maximum.longValue()) {
maximum.set(newReading);
}
}
}
COM: <s> add a new reading to this class </s>
|
funcom_train/23234426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean nextTo(int x, int y, double step) {
Rectangle2D thisArea = getArea();
thisArea.setRect(thisArea.getX() - step, thisArea.getY() - step,
thisArea.getWidth() + 2 * step, thisArea.getHeight() + 2 * step);
return thisArea.contains(x, y);
}
COM: <s> checks whether a certain point is near this entity </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.