__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/1303971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String findPattern(NormalizedString input, int acceptPartial) {
String result = null;
final int[] pos = findPatternPos(input, acceptPartial);
if (pos != null) {
result = input.getOriginal(pos[0], pos[1]);
}
return result;
}
COM: <s> find the non normalized text matching a number within the input </s>
|
funcom_train/41530707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toResponse() {
StringBuilder buffer = new StringBuilder();
buffer.append("-ERR");
if (responseCode != null)
buffer.append(" [").append(responseCode).append(']');
if (getMessage() != null)
buffer.append(' ').append(getMessage());
return buffer.toString();
}
COM: <s> returns a complete pop3 response line corresponding to this error which </s>
|
funcom_train/2288036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addResourceToOrgUnit(CmsObject cms, String ouFqn, String resourceName) throws CmsException {
CmsOrganizationalUnit orgUnit = readOrganizationalUnit(cms, ouFqn);
CmsResource resource = cms.readResource(resourceName);
m_securityManager.addResourceToOrgUnit(cms.getRequestContext(), orgUnit, resource);
}
COM: <s> adds a resource to the given organizational unit </s>
|
funcom_train/1477359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean load() {
File filepath = new File(this.name);
if (!filepath.isDirectory()) {
// path is not a folder path
logger.warning("The given path (" + this.name + ") is not valid");
return false;
}
this.dataList.putAll(fillDataList(filepath, recurse));
return true;
}
COM: <s> finds all valid geographic files for the given datasource and construct </s>
|
funcom_train/50605705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ApplicationCfg parseApplication (String documentPath) {
if (documentPath == null)
throw new NullPointerException("documentPath");
CfgBuilder builder = new CfgBuilder(classLoader, documentPath);
ApplicationCfg appCfg = (ApplicationCfg)builder.buildGraph(schemaValidatingParser);
parseIncludedModules(builder, appCfg.getRootModule());
return appCfg;
}
COM: <s> parses a blues application configuration file </s>
|
funcom_train/19626827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleSSError(ServerSocket ss, IOException e) {
LOG.info("Server Socket Error");
try {
ss.close();
} catch (IOException e1) {
// if it wont close, we can't do anything about it
LOG.error("Error closing socket", e1);
}
}
COM: <s> prints an error message and attempts to close the server socket </s>
|
funcom_train/12813928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toSQL() throws ParseException {
return (isSubQuery()?("("+subQuery.toSQL(false)+")"):tableRef)+((alias==null)?"":(" AS \""+alias+"\""))+((join==null)?"":(" "+join.toSQL()));
}
COM: <s> gets the sql expression of this table reference </s>
|
funcom_train/23278664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void auditAction(String action, String details) {
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
String username = null;
if(auth==null) username="unauthenticatedUser";
else username = auth.getName();
Date date = new Date();
getHibernateTemplate().save(new Audit(action,details,username,date));
}
COM: <s> audits the given action made on the database if it is successful </s>
|
funcom_train/7384457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Rectangle getRectangle() {
int ix = (int) Math.round(x);
int iy = (int) Math.round(y);
int iw = (int) Math.round(width - ix + x);
int ih = (int) Math.round(height - iy + y);
return new Rectangle(ix, iy, iw, ih);
}
COM: <s> returns the bounds as a new rectangle </s>
|
funcom_train/44477775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSpec(LibraryResource res, TripleSpecification spec, Model model){
Resource s = res.getURI();
URI p = spec.getProperty(model);
Node o = spec.getObject(model);
if(spec.isNegation())
model.removeStatement(s, p ,o);
else {
Iterator<Statement> stit = model.findStatements(s, p, o);
if(!stit.hasNext())
model.addStatement(s,p,o);
}
}
COM: <s> makes sure that give resource holds given constrain </s>
|
funcom_train/24121923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
logger.log(Level.FINER, "Starting the state machine"); //$NON-NLS-1$
if (startId == null) {
throw new IllegalStateException("No starting state has been defined."); //$NON-NLS-1$
}
changeState(startId);
}
COM: <s> starts the state machine with the starting state </s>
|
funcom_train/28630285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void classIsActive() {
Package p = getClassesPackage();
assertEquals("Classes", p.getName());
org.eclipse.uml2.uml.Class c = (org.eclipse.uml2.uml.Class) p.getMember("C");
assertEquals("C", c.getName());
assertTrue("C is not active", c.isActive());
}
COM: <s> test that the class c is active </s>
|
funcom_train/47561353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void moveSelectedRight() {
int[] indicies = totalTraitList.getSelectedIndices();
for (int index : indicies) {
if (index >= 0 && index < traitLibrary.size()) {
creatureTraits.add(traitLibrary.get(index));
}
}
totalTraitList.clearSelection();
activeTraitList.setListData(creatureTraits);
}
COM: <s> add library traits to animal </s>
|
funcom_train/34838261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GlueGoal createGoal(String identifier) throws GlueException {
if ((identifier==null)||(identifier=="")) return null;
if (langType.equalsIgnoreCase(wsml_lang)) return ((GlueGoal) new WSML_GlueGoal(identifier));
//if (langType.equalsIgnoreCase(rdf_lang)) return new (identifier);
return null;
}
COM: <s> create a new glue goal </s>
|
funcom_train/16596067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delFFrame(int index) {
for (int i = 0; i < getEFS().getAllFFrames().length; i++) {
if (getEFS().getFFrame(i).equals(getFFrame(index))) {
getEFS().removeFFrame(i);
}
}
updateFFrames();
}
COM: <s> remove the fframe of index </s>
|
funcom_train/44448601 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double getEnvNoise() {
targetLine.start();
byte[] data = new byte[bytes_to_read];
Log.println("Measuring noise...");
notifyChangeWaiters();
double envNoise = 0;
for (int i = 0; i < env_noise_cnt; i++) {
data = new byte[bytes_to_read];
targetLine.read(data, 0, bytes_to_read);
envNoise += energy(data) / env_noise_cnt;
}
Log.println("Environmental noise: " + envNoise);
notifyChangeWaiters();
targetLine.stop();
targetLine.flush();
return envNoise;
}
COM: <s> calculates the environment noise using env noise cnt frames </s>
|
funcom_train/45044376 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validateConvertDatabaseItem() {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
boolean enabled = false;
// If Windows, always yes.
if (SysUtil.isWindows()) {
enabled = true;
// If Running Linux or Mac, must use MySQL to be able to convert to HSQL
} else if (MovieManager.getIt().getDatabase().isMySQL()) {
enabled = true;
}
menuItemConvertDatabase.setEnabled(enabled);
}
});
}
COM: <s> validates if the convert item should be available </s>
|
funcom_train/3129539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void messageSent(MessageEvent e) {
String line = e.getMessage();
PrintStream stream = e.isError() ? stderr : stdout;
if (e.isTagged())
{
// String message = MessageEvent.parseTaggedMessage(taggedLine, e.getMessage());
// if (message != null)
// {
// stream.println(message);
// System.out.println("Tagged");
// }
} else
{
// put every output of the line into a String.
messages = messages + "\n" + line;
if (debug)
System.out.println(line);
}
}
COM: <s> called when the server wants to send a message to be displayed to </s>
|
funcom_train/10928112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getVersionSeriesId(ObjectData object) {
PropertyData<?> versionSeriesId = object.getProperties().getProperties().get(PropertyIds.VERSION_SERIES_ID);
assertNotNull(versionSeriesId);
assertTrue(versionSeriesId instanceof PropertyId);
return ((PropertyId) versionSeriesId).getFirstValue();
}
COM: <s> gets the version series id of an object </s>
|
funcom_train/20890746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getLengthOfPath() {
float distance = 0;
// /* debug */
// OBMPosition[] dbgArr = this.toArray();
// /*/debug */
Iterator<OBMPosition> positionIterator = this.wayPoints.iterator();
OBMPosition lastPosition, presentPosition;
lastPosition = positionIterator.next();
while (positionIterator.hasNext()) {
presentPosition = positionIterator.next();
distance += OBMPosition.getDistance(lastPosition, presentPosition);
lastPosition = presentPosition;
}
return distance;
}
COM: <s> computes and returns the distance between first the and last way point </s>
|
funcom_train/14307136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getChildCount(Object parent) {
VPTNode node = (VPTNode) parent;
if (node.isRoot()) {
return node.getChildCount();
} else if (node.isProject()) {
return ((VPTProject)node).openableNodes.size();
}
Log.log(Log.WARNING, this, "Reached the supposedly unreachable! parent = " + parent);
return 0; // shouldn't reach here
} //}}}
//{{{ +getChild(Object, int) : Object
COM: <s> returns the child at the given index of the given parent </s>
|
funcom_train/18549307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toXML() {
String response = " TRANSACTION=\"" + this.getTransaction().intValue() +
"\" USER=\"" + this.getUser() +
"\" PASSWORD=\"" + this.getPassword() +
"\" LOCALE=\"" + this.getLocale() +
"\" COMMENT=\"" + this.getEncodedComment() + "\"";
return response;
}
COM: <s> this method return a xml with the current attributes of object </s>
|
funcom_train/51782824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void reattachNodeConnections(Node node) {
for (Connection conn : node.getConnections()) {
if (conn.getNode1() != node) conn.getNode1().addConnection(conn);
if (conn.getNode2() != node) conn.getNode2().addConnection(conn);
conn.getParent().addChild(conn);
}
}
COM: <s> called when a remove node operation is undone </s>
|
funcom_train/45502613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public void setAssociatedRoom( Room room ) throws IllegalArgumentException {
if( room == null )
throw new IllegalArgumentException( ZLocalization.getSingleton().getString("ds.z.Area.NoRoomException") );
if(associatedRoom != null )
associatedRoom.deleteArea( this );
associatedRoom= room;
associatedRoom.addArea( this );
}
COM: <s> this operation takes care of setting the room that is associated to this </s>
|
funcom_train/16969828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected long diff_footprint(int x, int y) {
// The maximum size for a long is 9,223,372,036,854,775,807
// The maximum size for an int is 2,147,483,647
// Two ints fit nicely in one long.
long result = x;
result = result << 32;
result += y;
return result;
}
COM: <s> compute a good hash of two integers </s>
|
funcom_train/46332057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getTableName(PointDescription pm) {
String name = pm.getSource() + "$" + pm.getName();
// Translate characters which conflict with SQL syntax
name = name.replace('.', '$');
name = name.replaceAll("\\x2b", "_plus_");
name = name.replaceAll("\\x2d", "_minus_");
return name;
}
COM: <s> return the sql table name for given monitor point </s>
|
funcom_train/2587655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String crear_line(String experimento, String data, String senal, String direccion) {
String line;
if (direccion.compareTo("") == 0) {
line = experimento + "(" + data + "," + senal + ").";
} else {
line = experimento + "(" + data + "," + senal + "," + direccion + ").";
}
return line;
}
COM: <s> return the line to insert to </s>
|
funcom_train/21995424 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object getKey(Connection conn, String filter) throws DatabaseException {
if (log.isDebugEnabled())
log.debug(getClassName() + " getKey: filter=" + filter);
Vector keys = getKeys(conn, filter, null, 0, 1);
return keys.size() > 0 ? keys.get(0) : null;
}
COM: <s> obtain the first matching key for the specified filter </s>
|
funcom_train/570698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeRow( int row ) {
try {
//Remove the row
objects.removeElementAt( row );
// Generate notification
fireTableRowsDeleted( row, row );
} catch ( Throwable th ) { // Ignore, empty table_ ?
System.out.println( "Error in JTableModel_ removeRow() error: " + th );
}
}
COM: <s> remove the row at i row i from the model </s>
|
funcom_train/22001125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OrderComparator getOrderComparator(EODQuoteBundle quoteBundle) {
if (orderByKeyButton.isSelected()) {
// Set order (e.g. by volume).
return new OrderComparator(quoteBundle,
orderByKeyComboBox.getSelectedIndex());
} else {
// Order by expression
assert orderByExpressionButton.isSelected();
return new OrderComparator(quoteBundle, orderByExpression);
}
}
COM: <s> create a new order comparator to order the stocks in the given quote </s>
|
funcom_train/14354731 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() throws BuildException {
try {
updateFile(source,domain);
}//entry
catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
throw new BuildException(e.toString());
}//endcatch
}// end of execute()
COM: <s> method name execute </s>
|
funcom_train/5339742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void buildDetails() {
DETAILS.removeAll();
if(LICENSE.isVerifying())
createVerifying();
else if(!LICENSE.isVerified())
createNotVerified();
else if(!LICENSE.isValid(URN))
createNotValid();
else // LICENSE.isValid()
createValid();
validate();
repaint();
}
COM: <s> builds the details panel </s>
|
funcom_train/16818648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleSimpleTversityAction(StringBuffer buff, String url) {
try {
Document doc = loadTversityPage(url);
Element el = doc.getDocumentElement();
if (!"success".equals(el.getAttribute("status")) )
buff.append("Error: "
+ el.getAttribute("message"));
else
buff.append("Success: " + el.getAttribute("message"));
} catch (SAXException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
COM: <s> handle a simple tversity action such as restarting the db or </s>
|
funcom_train/26491796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String searchElementValue(Node node) {
NodeList list = node.getChildNodes();
String chaineResult ="";
for(int i=0;i<list.getLength();i++){
if(list.item(i).getNodeType()==3){
chaineResult = chaineResult + list.item(i).getNodeValue();
}
else{
chaineResult = chaineResult + searchElementValue(list.item(i));
}
}
return chaineResult;
}
COM: <s> return all the value in the node node and of his sons </s>
|
funcom_train/8023007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stylizeComment(int r, int g, int b, boolean bold, boolean italic) {
setStyleConstants(styles.getStyleForScanValue(Token.COMMENT
.getScanValue()), new Color(r, g, b), bold, italic);
}
COM: <s> set text attributes for scheme comments </s>
|
funcom_train/12711432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DataType findClosestMatchingTypeFor(DataType aDataType) {
for (int theCurrentJDBCType : aDataType.getJDBCType()) {
for (DataType theType : dataTypes) {
for (int theJDBCType : theType.getJDBCType()) {
if (theJDBCType == theCurrentJDBCType) {
return theType;
}
}
}
}
return null;
}
COM: <s> find the closest matching type for a given foreign datatype </s>
|
funcom_train/46455413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void draw(DrawingPanel panel, Graphics g) {
Shape temp = panel.getPixelTransform().createTransformedShape(shape);
Graphics2D g2 = ((Graphics2D) g);
g2.setPaint(color);
g2.fill(temp);
g2.setPaint(edgeColor);
g2.draw(temp);
g2.setPaint(Color.BLACK);
}
COM: <s> draws the shape </s>
|
funcom_train/549971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNumberScalar(String name) {
INumberScalar scalar;
try {
scalar = (INumberScalar) entities.add(name);
addAttribute(scalar);
} catch (ConnectionException e) {
status.status("AttributeTableModel.addNumberScalar: Cannot load attribute " + name, e);
}
}
COM: <s> adds a number scalar attribute in the table </s>
|
funcom_train/48982933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getUnitsInfo() {
XStream xStream = new XStream(new JettisonMappedXmlDriver());
xStream.alias("unit", Unit.class);
List<Unit> results = unitRemote.getByDiscipline(discipline.getId());
setInputStream(new ByteArrayInputStream(xStream.toXML(results).getBytes()));
return "json";
}
COM: <s> retrieves infos about a unit </s>
|
funcom_train/8079522 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected double computeAccuracy(Instances data) throws Exception {
double acc = 0.0;
int num_instances = data.numInstances();
Instance curr;
for(int i=0; i<num_instances; i++){
curr = data.instance(i);
if(curr.classValue() == ((int) classifyInstance(curr))){//correctly classified
acc++;
}
}
//System.out.println("# correctly classified: "+acc);
//System.out.println("total #: "+num_instances);
return (acc/num_instances);
}
COM: <s> computes classification accuracy on the given data </s>
|
funcom_train/47673469 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getVersionValue() {
ObjectName objectName = null;
try {
objectName = new ObjectName(muleDomain + ":type=org.mule.MuleContext,name=MuleServerInfo");
return (String) server.getAttribute(objectName, "Version");
} catch (Exception ex) {
return "ERROR";
}
}
COM: <s> gets the mule version from mules mbean server </s>
|
funcom_train/15892169 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map getAssociated() {
Map map = new HashMap();
List supplierList = new ArrayList();
map.put(SupplierContainerImpl.class, supplierList);
List partList = new ArrayList();
map.put(ProductPartContainerImpl.class, partList);
Iterator itr = container.getContent().iterator();
while (itr.hasNext()) {
PurchaseOrder bean = (PurchaseOrder) itr.next();
handlePurchaseOrder(bean, supplierList, partList);
}
return map;
}
COM: <s> handles the association from code item code with code product code </s>
|
funcom_train/25390954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int StringWidth(char[] string) {
int i;
int w = 0;
int c;
for (i = 0; i < C2JUtils.strlen(string); i++) {
c = Character.toUpperCase(string[i]) - HU_FONTSTART;
if (c < 0 || c >= HU_FONTSIZE)
w += 4;
else
w += hu_font[c].width;
}
return w;
}
COM: <s> find string width from hu font chars </s>
|
funcom_train/2321434 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object invoke(String method, Object args) throws Exception {
Object result;
try { result = Remote.invoke(interceptor, method, args); }
catch(NoSuchMethodException x) { result = CONTINUE; }
return result.equals(CONTINUE) ? Remote.invoke(item, method, args) :
result;
}
COM: <s> this method intercepts the incoming calls </s>
|
funcom_train/10522765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNullSPOutParam() throws Exception {
assertNotNull(testCtrl);
JdbcControl.SQLParameter[] params = new JdbcControl.SQLParameter[1];
params[0] = new JdbcControl.SQLParameter(null, Types.VARCHAR, JdbcControl.SQLParameter.OUT);
testCtrl.getExpensiveProducts(params);
assertEquals(params[0].value, "Widget 4");
}
COM: <s> test that a null value for an sqlparameter of type out does not </s>
|
funcom_train/36851396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Day addWorkdays(int count, HolidayConfig config) {
int step = (count < 0) ? -1 : 1;
count = Math.abs(count);
while (count > 0) {
add(DATE, step);
if (config.isWorkday(this)) {
count--;
}
}
return this;
}
COM: <s> adds an amount of workdays to this object </s>
|
funcom_train/38536277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getLatestEndTime() {
int let = Integer.MIN_VALUE;
for (int i=0; i<possibleResourceIndexList.size(); i++) {
int thisLet = ((ActResourceDomain)resources.get(possibleResourceIndexList.get(i))).getLatestEndTime();
if (thisLet > let) {
let = thisLet;
}
}
return let;
}
COM: <s> returns the latest time that this operation could end </s>
|
funcom_train/37587378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void nonCurrThreadDied() {
assert EventQueue.isDispatchThread();
_lock.startRead();
try {
int size = _listeners.size();
for (int i = 0; i < size; i++) _listeners.get(i).nonCurrThreadDied();
}
finally { _lock.endRead(); }
}
COM: <s> called when any thread other than the current thread dies </s>
|
funcom_train/40690780 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetRandomAccess() {
Multimap<String, Integer> multimap = create();
multimap.put("foo", 1);
multimap.put("foo", 3);
assertTrue(multimap.get("foo") instanceof RandomAccess);
assertTrue(multimap.get("bar") instanceof RandomAccess);
}
COM: <s> confirm that get returns a list implementing random access </s>
|
funcom_train/25792799 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetColumnName() {
String column0 = m_toolTreeModel.getColumnName(ToolTreeModel.VISIBLE_COLUMN);
String column1 = m_toolTreeModel.getColumnName(ToolTreeModel.TOOL_COLUMN);
String column2 = m_toolTreeModel.getColumnName(ToolTreeModel.ID_COLUMN);
assertEquals("Visible", column0);
assertEquals("Tool Name", column1);
assertEquals("ID", column2);
}
COM: <s> tests the correctness of the position with name of the columns </s>
|
funcom_train/39380576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(String value) {
if (value == null) {
String msg = "value parameter cannot be null";
throw new IllegalArgumentException(msg);
}
getOptionList().add(new Option(value));
if (getOptionList().size() == 1) {
setInitialValue();
}
}
COM: <s> add the given option value to the select </s>
|
funcom_train/5079873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setConnectionRouter(ConnectionRouter cr) {
if (cr == null)
cr = ConnectionRouter.NULL;
ConnectionRouter oldRouter = getConnectionRouter();
if (oldRouter != cr) {
connectionRouter.remove(this);
if (connectionRouter instanceof RoutingNotifier)
((RoutingNotifier)connectionRouter).realRouter = cr;
else
connectionRouter = cr;
firePropertyChange(Connection.PROPERTY_CONNECTION_ROUTER, oldRouter, cr);
revalidate();
}
}
COM: <s> sets the connection router which handles the layout of this polyline </s>
|
funcom_train/40359019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void testFixedTimeZone(int offset, String timezone) {
Value.setFeedTimeZone("GMT" + timezone);
Calendar timestamp = Calendar.getInstance();
timestamp.setTimeZone(TimeZone.getTimeZone("GMT" + timezone));
testTimeZoneOffset(timestamp, offset, timezone);
}
COM: <s> tests the given time zone </s>
|
funcom_train/9296073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Bid doBid(Seat bidder) throws DealException {
PrefTradeStepInfo stInfo = new PrefTradeStepInfo(PrefTradeStep.SET_BID);
bidder.tradeStep(this, stInfo);
Bid bid = stInfo.getBid();
if (!contract.isBidCorrect(bidder, bid)) {
throw new DealException("bid " + bid + " is not acceptable");
}
return bid;
}
COM: <s> bidder seat does the bid </s>
|
funcom_train/37062653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initNewProgram() {
UserWattProgHolder uwpHold = null;
try {
uwpHold = new UserWattProgHolder();
newNumber = uwpHold.getHighestProgNum() + 1;
dirname = uwpHold.getStdDirname() + System.getProperty( "file.separator" );
filename = "uwprog_" + newNumber;
} catch (ErgoConfigException e) {
newNumber = 0;
}
}
COM: <s> inits a new program to be filled and saved </s>
|
funcom_train/30276388 | /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 (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final TimeValue other = (TimeValue) obj;
if (changingType != other.changingType) {
return false;
}
if (startTime != other.startTime) {
return false;
}
if (totalTime != other.totalTime) {
return false;
}
return true;
}
COM: <s> indicates whether some other object is equal to this one </s>
|
funcom_train/2501410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void executeValidate(FacesContext context, UIComponent component, Object componentValue) {
log.debug("Validating CPF");
if (!CPF.validateCPF((String) componentValue)) {
String[] params = {(String) componentValue};
FacesMessage message = createFacesMessage(params, Constant.CPF_SUMARY_KEY, CPF_DETAIL_KEY, DEFAULT_MESSAGE, context.getViewRoot().getLocale());
throw new ValidatorException(message);
}
}
COM: <s> call the validation of cpf implemented by </s>
|
funcom_train/9550228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getCatCPanel() {
if (catCPanel == null) {
catCLabel = new JLabel();
catCLabel.setFont(bcFont);
catCLabel.setPreferredSize(bcTextLabelSize);
catCPanel = new JPanel();
catCPanel.setLayout(new BoxLayout(catCPanel,BoxLayout.Y_AXIS));
catCPanel.add(catCLabel);
}
return catCPanel;
}
COM: <s> this method initializes cat apanel </s>
|
funcom_train/38865175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int get(String station, int year, int month, int day) throws Exception {
stn = station;
fromDate = new DateTime(year, month, day);
toDate = new DateTime(year, month, day, 23, 59, 59);
return get();
}
COM: <s> get a array list of ionospheric data for a station year month day </s>
|
funcom_train/2742827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int doStartTag() throws JspException {
IDataComposer dataComposer = HDIVUtil.getDataComposer();
// this property is editable and we must check it
if (property != null) {
StringBuffer tagName = new StringBuffer();
tagName.append(property);
if (indexed) {
prepareIndex(tagName, null);
}
dataComposer.compose(tagName.toString(), "", true);
}
return super.doStartTag();
}
COM: <s> process the start of this tag </s>
|
funcom_train/37555997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point getSize () {
checkWidget();
RECT rect = new RECT ();
OS.GetClientRect (parent.handle, rect);
int width, height;
if ((style & SWT.HORIZONTAL) != 0) {
width = rect.right - rect.left;
height = OS.GetSystemMetrics (OS.SM_CYHSCROLL);
} else {
width = OS.GetSystemMetrics (OS.SM_CXVSCROLL);
height = rect.bottom - rect.top;
}
return new Point (width, height);
}
COM: <s> returns a point describing the receivers size </s>
|
funcom_train/9548958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireChanges(final IResource[] changes) {
Display display = Display.getCurrent();
if (display != null && !display.isDisposed()) {
display.asyncExec(new Runnable() {
public void run() {
Object[] listeners = fListeners.getListeners();
for (int i= 0; i < listeners.length; i++) {
IProblemChangedListener curr = (IProblemChangedListener) listeners[i];
curr.problemsChanged(changes);
}
}
});
}
}
COM: <s> reports a change to all the listeners </s>
|
funcom_train/20079445 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void bind(Element el) {
DOM.setStyleAttribute(elem, "fontSize", DOM.getStyleAttribute(el, "fontSize"));
DOM.setStyleAttribute(elem, "fontStyle", DOM.getStyleAttribute(el, "fontStyle"));
DOM.setStyleAttribute(elem, "fontWeight", DOM.getStyleAttribute(el, "fontWeight"));
}
COM: <s> binds this text metrics instance to an element from which to copy existing </s>
|
funcom_train/44155439 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void update() {
assert Thread.holdsLock(s_dirtiesMonitor);
switch (m_currency) {
case dirty:
for (ObservableValue<?> o : m_dependencies) {
o.unsubscribe(this);
}
m_dependencies = new ArrayList<ObservableValue<?>>();
LiveValue<?> previouslyUpdating = s_updating;
m_currency = Currency.updating;
s_updating = this;
T v = is();
m_currency = Currency.current;
s_updating = previouslyUpdating;
set(v);
break;
case updating:
assert false;
break;
case current:
break;
default:
assert false;
}
}
COM: <s> updates the cached result </s>
|
funcom_train/38535148 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndTimeRange(int start, int end, boolean notify) throws PropagationFailureException {
//This action will be inaffective, thus we return
if ((endTimes.getMin()>=start)&&(endTimes.getMax()<=end)) {
return;
}
setEarliestEndTime(start, notify);
setLatestEndTime(end, notify);
}
COM: <s> restricts the end times of this domain to a range of values </s>
|
funcom_train/26571829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseDragged(MouseEvent e) {
if (gc==null || movingLabel==null || !human.getMyTurn())
return;
if (DEBUG)
System.out.print("d");
movingLabel.setLocation(e.getX()+arbX+piecePaddingX,e.getY()-fourtwoMargin+arbY+piecePaddingY);
}
COM: <s> invoked when a mouse button is pressed on a component and then </s>
|
funcom_train/8686033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void verifySettings() {
if (size < 0) {
setError("The value attribute is required, and must be positive");
} else if (multiplier < 1) {
setError("Invalid Units supplied, must be K,Ki,M,Mi,G,Gi,T,or Ti");
} else if (sizelimit < 0) {
setError("Internal error: Code is not setting sizelimit correctly");
}
}
COM: <s> p checks to make sure all settings are kosher </s>
|
funcom_train/28151507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Override public String toString() {
if (types.length==0) return "";
StringBuilder ans=new StringBuilder();
for(int i=0; i<types.length; i++) {
if (i!=0) ans.append("->");
ans.append(types[i]);
}
return ans.toString();
}
COM: <s> returns the string representation of this product type object </s>
|
funcom_train/19306533 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getCharWidth(final int c) {
final FontUse fontUse = getPrimaryFont();
final Font font = getPrimaryFont().getFont();
fontUse.registerCharUsed(c);
return font.width(c, traitFontSize())
+ this.traitGeneratedBy().traitLetterSpacingOpt(this);
}
COM: <s> computes the width of a character in millipoints </s>
|
funcom_train/42058564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("ServicioInformacionGeneralPort".equals(portName)) {
setServicioInformacionGeneralPortEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/10943399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getSelectedValue(Element elem) {
String locator = elem.getAttributeValue("locator");
String out = elem.getAttributeValue("out");
String text = this.sel.getSelectedValue(locator);
logger.info("getSelectedValue: locator=" + locator + " text="+text);
addParam(out, text);
}
COM: <s> gets the hidden value of a list box </s>
|
funcom_train/44535057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int login2service(int usrid, String login, String pw, String pik) {
// check only on previous successful connection
if (!this.isSEHRService) {
return -1;
}
return (int) AccessControl.checkLogin2Service(usrid, login, pw, pik, fbds);
}
COM: <s> simple login wrapper for checking user access against a sehr service </s>
|
funcom_train/26595165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean moveBackward(_Iterator iterator, Object value, _Reference[] references, int reverse) throws DException {
while (iterator.previous()) {
SuperComparator comparator = reverse == 1 ? leftComparator : rightComparator;
if (comparator.compare(iterator.getColumnValues(references), value) != 0) {
return true;
}
}
return false;
}
COM: <s> this method is called by the previous method </s>
|
funcom_train/1958705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPhysicalNetworks(Element physical) throws VerinecException {
//LogUtil.logJdom(Logger.getLogger(getClass().getName()), physical);
super.setPhysicalNetworks(physical); //exception if not a valid network
try {
FileWriter stream = new FileWriter(networksFile);
xmloutput.output(networks, stream);
stream.close();
} catch (IOException ioe) {
throw new VerinecException("Could not write networks to file", ioe);
}
}
COM: <s> set the networks of this project </s>
|
funcom_train/24540400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void imageComplete(int status){
if (os != null) {
// Not yet completed.
try {
os.writeByte(ImageDataConstants.CMD_DONE);
os.writeInt(status);
os.close();
os = null;
} catch (IOException e) {
e.printStackTrace();
} finally {
if (os != null) {
try {
os.close(); // We had an error while terminating. Just close it to be safe.
} catch (IOException e1) {
}
}
}
}
synchronized (this) {
this.status = ImageDataConstants.NOT_IN_PROGRESS;
notifyAll();
}
}
COM: <s> send image completion status to the host </s>
|
funcom_train/84959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Cacheable t_findCachedSucceed(CacheManager cm, Object key) throws StandardException, T_Fail {
Cacheable entry = cm.findCached(key);
if (entry == null) {
throw T_Fail.testFailMsg("expected item to be in cache");
}
if (!entry.getIdentity().equals(key))
throw T_Fail.testFailMsg("item returned does not match key");
return entry;
}
COM: <s> a call to find cached that is expected to find something </s>
|
funcom_train/8047241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCharacters(VectorFontCharacter[] characters) {
uniCodeToChar.clear();
charNameToChar.clear();
for (int i = 0; i < characters.length; i++) {
VectorFontCharacter currentChar = characters[i];
uniCodeToChar.put(currentChar.getUnicode(), currentChar);
charNameToChar.put(currentChar.getName(), currentChar);
}
this.characters = characters;
}
COM: <s> sets the characters </s>
|
funcom_train/20216001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand1() {
if (okCommand1 == null) {//GEN-END:|155-getter|0|155-preInit
// write pre-init user code here
okCommand1 = new Command("Ok", Command.OK, 0);//GEN-LINE:|155-getter|1|155-postInit
// write post-init user code here
}//GEN-BEGIN:|155-getter|2|
return okCommand1;
}
COM: <s> returns an initiliazed instance of ok command1 component </s>
|
funcom_train/19655761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean updateProduct(long rowId, String title, String body) {
ContentValues args = new ContentValues();
args.put(KEY_TITLE, title);
return mDb.update(DB_TABLE, args, KEY_ID + "=" + rowId, null) > 0;
}
COM: <s> update the product using the details provided </s>
|
funcom_train/43885940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void testTypeExists(String[] featureTypes, String table) {
for (int i = 0; i < featureTypes.length; i++) {
if (featureTypes[i].equalsIgnoreCase(table.toUpperCase())) {
LOGGER.fine("testTypeExists OK: " + table);
return;
}
}
fail("table " + table + " not found in getFeatureTypes results");
}
COM: <s> checks for the existence of code table code in code feature types code </s>
|
funcom_train/27763664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addParameter(String name, String typeName) {
if (configDone)
{
throw new IllegalStateException(CONFIG_DONE_ERROR);
}
LOG.debug("addParameter(" + name + " , " + typeName + ")");
sqlDelegate.addParameter(name, typeName);
}
COM: <s> during configuration calling this method adds a parameter to the current </s>
|
funcom_train/39267425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireTableStructureChanged() {
TableModelEvent e = new TableModelEvent(this, TableModelEvent.HEADER_ROW);
if (tableModelListeners != null) {
for (int i = 0; i < tableModelListeners.size(); i++) {
((TableModelListener)tableModelListeners.elementAt(i)).tableChanged(e);
}
}
}
COM: <s> notifies all listeners that the tables structure has changed </s>
|
funcom_train/39197437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void onEvent(AjaxRequestTarget target) throws RuntimeException {
Request request = RequestCycle.get().getRequest();
String wkt = request.getRequestParameters().getParameterValue("wkt").toString();
WKTReader wktReader = new WKTReader(OpenLayersMapUtils.getGeoFactory());
Geometry geom=null;
try {
geom = wktReader.read(wkt);
} catch (ParseException e) {
// TODO Auto-generated catch block
throw new RuntimeException("Could not parse wkt",e);
}
onDrawEnded(geom, target);
}
COM: <s> typically response parameters that are meant for this event are picket up </s>
|
funcom_train/46378375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clearPanelSet() {
// First, loop through all of the factories and tell them they are about
// to close. It is up to them to decide what to do.
for (PropertiesFactorySPI factory : factoryList) {
factory.close();
}
// We simply clear out the list model and the list of factories
listModel.clear();
factoryList.clear();
}
COM: <s> iterates through all of the properties panels and tell them they are </s>
|
funcom_train/3832484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected DataURL createDataURL( Element element ) throws XMLParsingException {
// required: <Format>
String format = XMLTools.getRequiredStringValue( "Format", wmsNS, element );
// required: <OnlineResource>
URL onlineResource = createOnlineResource( XMLTools.getRequiredChildByName(
"OnlineResource", wmsNS, element ) );
return new DataURL_Impl( format, onlineResource );
}
COM: <s> creates a tt data url tt instance according to the contents of </s>
|
funcom_train/47812414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadTeamData(final List<Team> teams) {
tableTeam.clear();
panel1.clear();
final Button createTeam = new Button("Create Team");
createTeam.addClickHandler(new ClickHandler() {
public void onClick(final ClickEvent event) {
createTeam();
};
});
int i = 0;
while (teams.size() > i) {
createTeamList(teams.get(i), i + 1);
i++;
}
panel1.add(createTeam);
}
COM: <s> this method gets a list from the load methods and forward the data </s>
|
funcom_train/12368696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Element createSVGElement(Graph graph) {
Element svgElement = new Element("svg", svgNamespace);
Attribute width = new Attribute("width", Float.toString(this.widthValue));
Attribute height = new Attribute("height", Float.toString(this.heightValue));
svgElement.setAttribute(width);
svgElement.setAttribute(height);
this.addMainSVGElements(svgElement, graph);
return svgElement;
}
COM: <s> creates the main svg element </s>
|
funcom_train/19309980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equivalent(final RegisteredFontDesc otherDesc) {
return matchPerfect(otherDesc.getRegisteredFontFamily(),
false,
otherDesc.getFontStyle(),
otherDesc.getFontWeight(),
otherDesc.getFontVariant(),
otherDesc.getFontStretch(),
true,
true);
}
COM: <s> determine whether two registered font desc instances have the same set of </s>
|
funcom_train/1382034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnElimina() {
if (btnElimina == null) {
btnElimina = new JButton();
btnElimina.setText("Elimina");
btnElimina.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
eliminaCliente(); // TODO Auto-generated Event stub actionPerformed()
}
});
}
return btnElimina;
}
COM: <s> this method initializes btn elimina </s>
|
funcom_train/31208375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int findColumn(String columnName) throws SQLException {
try {
if(Trace.isDetailed()) Trace.traceQuote(getId(),columnName);
checkClosed();
int result=getColumnIndex(columnName);
if(Trace.isDetailed()) Trace.traceResult(result);
return result;
} catch(Throwable e) {
throw convertThrowable(e);
}
}
COM: <s> searches for a specific column in the result set </s>
|
funcom_train/43396608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processNoteOnEvent(int key, int velocity, int channel) {
Key k = keys[channel][key] = new Key();
k.key = key;
k.channel = channel;
k.velocity = velocity;
k.tick = currentTick;
k.program = currentProgram;
notes.add(k);
}
COM: <s> processes a note on event </s>
|
funcom_train/12741177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AlgSource addSource(XQueryExpression expression, Variable var, boolean islet) throws XQueryException {
ArrayList variables = null;
if (var != null) {
variables = new ArrayList(1);
variables.add(var);
}
if (var == null)
return addSource(expression, variables, islet);
return addSource(var.getParentFLWRExpression(), variables, islet);
}
COM: <s> add a new source in the dependency tree </s>
|
funcom_train/50155584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed( ActionEvent e ) {
String keywords = textInputUrlTextField.getText().replaceAll( " ", "+" );
String queryUrl = (String) newsFeed.textInputElements.get( "link" ) + '?'
+ (String) newsFeed.textInputElements.get( "name" ) + '='
+ keywords;
try {
BrowserLauncher.openURL( queryUrl );
}
catch ( Exception ex ) {
ex.printStackTrace();
}
}
COM: <s> user invoked a search </s>
|
funcom_train/16683511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFileSize() {
final FxPK pk = getPagePK();
if (pk.isNew()) {
return "";
}
BinaryDescriptor binaryDescriptor = (BinaryDescriptor) getPageContent().getValue("/filecontent").getBestTranslation();
return String.valueOf(binaryDescriptor.getSize());
}
COM: <s> returns file size of file stored in file content instance </s>
|
funcom_train/21176215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDefaultErrorPage() {
String errorPage = null;
errorPage = (String) ConfigXMLReader.getConfigMap(configFileUrl).get(ConfigXMLReader.DEFAULT_ERROR_PAGE);
//Debug.logInfo("For DefaultErrorPage got errorPage: " + errorPage, module);
if (errorPage != null) return errorPage;
return "/error/error.jsp";
}
COM: <s> gets the default error page from the config map or static site default </s>
|
funcom_train/32138054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void internal_init() {
LogManager.logDebug("Start internal_init:", this);
LogManager.logInfo("Initializing", this);
configureInsertMode(SMART_INSERT, false);
colorManager = new ColorManager();
setSourceViewerConfiguration(new STPConfiguration(colorManager));
setDocumentProvider(new STPDocumentProvider());
LogManager.logDebug("End internal_init:", this);
}
COM: <s> starts the initialization functions necessary including insert mode color manage source viewer </s>
|
funcom_train/11007015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExtractFromModel() {
Range r = doc.getRange();
String[] text = new String[r.numParagraphs()];
for (int i = 0; i < r.numParagraphs(); i++) {
Paragraph p = r.getParagraph(i);
text[i] = p.text();
}
assertEquals(p_text.length, text.length);
for (int i = 0; i < p_text.length; i++) {
assertEquals(p_text[i], text[i]);
}
}
COM: <s> test model based extraction </s>
|
funcom_train/16513378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void registerMoved(byte undoOperation) {
ScenarioEditorPlugin.getDefault().getUndoList().add(
new ScenarioUndo(this, null, undoOperation));
ScenarioEditorPlugin.getDefault().getFiletypeRegistration().getEditor(
getScenario()).setDirty();
ScenarioEditorPlugin.getDefault().getNavigationTree().refresh(
getCommandContainer());
}
COM: <s> registers a move operation as an undoable operation notifies the editor </s>
|
funcom_train/16532321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateFile(String fileName) {
DocumentBuilderFactory dbfactory = DocumentBuilderFactory.newInstance();
dbfactory.setNamespaceAware(true);
try{
DocumentBuilder domparser = dbfactory.newDocumentBuilder();
document = domparser.parse(new File(fileName));
return isValidXML(document);
}
/* should the following 3 catch blocks throw a generic exception? */
catch(IOException e){
return false;
}
catch(ParserConfigurationException e){
return false;
}
catch(SAXException e){
return false;
}
}
COM: <s> validates the xrm file being loaded </s>
|
funcom_train/5510252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public VersionMarker createVersionMarker(Object stamp) {
try {
String specId = getSpecificationId(stamp);
String versionString = getVersionString(stamp);
VersionIdentifier id = VersionIdentifier
.extractVersionIdentifier(stamp);
Map properties = getProperties(stamp);
VersionSpecification spec = VersionSpecificationFactory
.createVersionSpecificationFromId(specId);
VersionFormat versionFormat = spec.getVersionFormat();
final VersionMarker marker = versionFormat.createVersionMarker(
id, versionFormat.parseVersion(versionString), properties);
return marker;
} catch (VersionException e) {
return VersionMarker.UNKNOWN;
}
}
COM: <s> create a version marker from an arbitrary object </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.