__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/26492332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void locationInsertDB(Node site, int sid) {
NodeList allLocations = ((Element)site).getElementsByTagName("location");
for (int i = 0; i < allLocations.getLength(); i++) {
insertThisLocation(allLocations.item(i), sid);
}
}
COM: <s> insert locations in the db </s>
|
funcom_train/13812431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() {
String h2DatabaseFile = System.getProperty(
LOG_DATABASE_PATH_PROP, DEFAULT_LOG_DATABASE_PATH);
try {
init(h2DatabaseFile);
}
catch(LogTestException ltce) {
logger.warn("Server log database file " + h2DatabaseFile +
" does not exist. Server log testing will be disabled.");
this.enabled = false;
// This will cause tests to fail, when instead we just want
// to ignore tests.
//
// throw ltce;
}
}
COM: <s> initializes using the h2 database specified in the log database path prop </s>
|
funcom_train/8090178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PaceMatrix fittingIntervals( DoubleVector data ) {
DoubleVector left = data.cat( data.minus( fittingIntervalLength ) );
DoubleVector right = data.plus( fittingIntervalLength ).cat( data );
PaceMatrix a = new PaceMatrix(left.size(), 2);
a.setMatrix(0, left.size()-1, 0, left);
a.setMatrix(0, right.size()-1, 1, right);
return a;
}
COM: <s> contructs the set of fitting intervals for mixture estimation </s>
|
funcom_train/31102924 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DOMEntityResolver getEntityResolver() {
DOMEntityResolver domEntityResolver = null;
try {
DOMEntityResolver entityResolver = (DOMEntityResolver)fConfiguration.getProperty(ENTITY_RESOLVER);
if (entityResolver != null &&
entityResolver instanceof DOMEntityResolverWrapper) {
domEntityResolver = ((DOMEntityResolverWrapper)entityResolver).getEntityResolver();
}
} catch (XMLConfigurationException e) {
}
return domEntityResolver;
}
COM: <s> if a code domentity resolver code has been specified each time a </s>
|
funcom_train/44162346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection prepareCollection(String name) {
Collection col = null;
try {
String driver = "org.apache.xindice.client.xmldb.DatabaseImpl";
Class c = Class.forName(driver);
Database database = (Database) c.newInstance();
DatabaseManager.registerDatabase(database);
col = DatabaseManager.getCollection("xmldb:xindice:///db/jrapid/"
+ name);
} catch (Exception e) {
e.printStackTrace();
}
return col;
}
COM: <s> prepare collection prepares collection to extract data </s>
|
funcom_train/645300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dumpTree(String prefix) {
System.err.println(prefix + action + ", cost [" + costGuessedSelf + ","
+ costGuessedTotal + "," + costActualSelf + ","
+ costActualTotal + "] [" + info + "]");
for (int i = 0; i < children.size(); i++)
children.get(i).dumpTree(prefix + " ");
}
COM: <s> dump this node and all its children to tt stderr tt </s>
|
funcom_train/6505672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void nextBytes(byte[] bytes) {
int numRequested = bytes.length;
int numGot = 0, rnd = 0;
while (true) {
for (int i = 0; i < BYTES_PER_INT; i++) {
if (numGot == numRequested)
return;
rnd = (i==0 ? next(BITS_PER_BYTE * BYTES_PER_INT)
: rnd >> BITS_PER_BYTE);
bytes[numGot++] = (byte)rnd;
}
}
}
COM: <s> generates random bytes and places them into a user supplied </s>
|
funcom_train/26454506 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(PageContext pageContext, String baseUrl) {
this.context = pageContext.getServletContext();
this.request = (HttpServletRequest) pageContext.getRequest();
this.response = (HttpServletResponse) pageContext.getResponse();
this.baseUrl = baseUrl;
}
COM: <s> initialize forwarder from jsp </s>
|
funcom_train/27900431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String makeFilename(File file, File destDir) {
if ( file == null ) return null;
String name = Util.encodeFilename(file.getName());
if ( (new File(destDir, "image").exists()) ) {
name = "image/"+name;
}
return name;
}
COM: <s> makes a canonical filename out of a possibly messy input filename </s>
|
funcom_train/10616104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testKeyStore03() throws KeyStoreException {
assertTrue(NotSupportMsg, JKSSupported);
KeyStore ks;
for (int i = 0; i < validValues.length; i++) {
ks = KeyStore.getInstance(validValues[i]);
assertEquals("Incorrect type", ks.getType(), validValues[i]);
}
}
COM: <s> test for code get instance string type code method </s>
|
funcom_train/42944443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setClientIfAvailable(ClientSocket clientSocket) {
boolean rtn = false;
synchronized (this.runLock) {
if (this.client != null) {
rtn = false; // not available
}
else {
this.client = clientSocket;
this.runLock.notify();
rtn = true;
}
}
return rtn;
}
COM: <s> sets the client socket if client is avaliable </s>
|
funcom_train/7718731 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRow(Key dbKey, List<String> row) {
if (row.size() != header.size()) {
System.err.println(ErrorConsts.ROW_SIZE_ERROR);
return;
}
rows.add(row);
dbKeys.add(KeyFactory.keyToString(dbKey));
}
COM: <s> add a row of data to result table </s>
|
funcom_train/5399479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String format(SAXParseException spe) {
int lineNo = spe.getLineNumber();
int colNo = spe.getColumnNumber();
return ((lineNo != -1) ? "Line: " + lineNo : "")
+ ((colNo != -1) ? " Column: " + colNo : "")
+ " -- " + spe.getMessage();
}
COM: <s> add line and column numbers to exception message </s>
|
funcom_train/50338578 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean nameOK(CatalogTreeNode node, String name) {
TreeNode[] nodes = node.getPath();
for (int i=0; i<nodes.length; i++) {
if (name.equals(nodes[i].toString())) {
return false;
}
}
return true;
}
COM: <s> node names in the path to the root must be unique </s>
|
funcom_train/45250267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sleepGroup(GroupInfo group, JobInfo info) {
synchronized (listenersKey) {
for (int i = 0; i < listeners.length; i++) {
IJobProgressManagerListener listener = listeners[i];
if (isNeverDisplaying(info.getJob(), listener.showsDebug()))
continue;
if (listener.showsDebug() || group.isActive())
listener.refreshGroup(group);
else
listener.removeGroup(group);
}
}
}
COM: <s> refresh the group when info is sleeping </s>
|
funcom_train/24152972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNotSelectedDateBackground() {
System.out.println("notSelectedDateBackground");
Color color = Color.ORANGE;
CalendarPanel calendar = new CalendarPanel();
calendar.setNotSelectedDateBackground(color);
assertEquals("Wrong notSelectedDateBackground:", color, calendar.getNotSelectedDateBackground());
}
COM: <s> test of property not selected date background of class com </s>
|
funcom_train/3830034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCoordinateSystem( CS_CoordinateSystem crs ) {
super.setCoordinateSystem( crs );
if ( aggregate != null ) {
for ( int i = 0; i < aggregate.size(); i++ ) {
( (GM_Object_Impl)getObjectAt( i ) ).setCoordinateSystem( crs );
}
setValid( false );
}
}
COM: <s> sets the spatial reference system </s>
|
funcom_train/41691901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getIndividualsWithObjectProperty(ATermAppl r, ATermAppl o) {
ensureConsistency();
if( !isIndividual( o ) ) {
handleUndefinedEntity( o + " is not an individual!" );
return Collections.emptyList();
}
Role role = rbox.getRole( r );
ATermAppl invR = role.getInverse().getName();
return getObjectPropertyValues( invR, o );
}
COM: <s> list all subjects with the given value for the specified object property </s>
|
funcom_train/40766742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setLastAccessTime() {
LOG.finest("Setting last access time for : " + this.fileName + " as : "
+ this.lastAccessTimeOfFile);
this.lastAccessTimeSet = WindowsFileTimeUtil.setFileAccessTime(this.fileName, lastAccessTimeOfFile);
}
COM: <s> this method sets the last access time back to the file </s>
|
funcom_train/51343754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
final StringBuilder sb = new StringBuilder();
sb.append("BlockingIterator");
sb.append("{ open=" + open);
sb.append(", futureIsDone=" + futureIsDone);
sb.append(", bufferIsOpen=" + BlockingBuffer.this.open);
sb.append(", nextE=" + (nextE != null));
sb.append("}");
return sb.toString();
}
COM: <s> safe non blocking representation of the iterator state </s>
|
funcom_train/29862315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stateChanged(TriStateEvent event) {
updateSelectedWordCount();
// Object node = event.getSource();
// if (node != null && node instanceof TriStateTreeNode) {
// TriStateTreeNode tsn = (TriStateTreeNode) node;
// System.out.println(tsn.getUserObject() + ": " + event.getState());
// }
}
COM: <s> implemented by classes interested in state changes of a </s>
|
funcom_train/7286770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void releaseConnection() {
// Release the connection through the ManagedConnection instead of the
// ConnectionManager directly. This lets the connection control how
// it is released.
try {
managedConn.releaseConnection();
} catch(IOException ignored) {
this.log.debug("IOException releasing connection", ignored);
}
managedConn = null;
}
COM: <s> returns the connection back to the connection manager </s>
|
funcom_train/21871359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton8() {
if (jButton8 == null) {
jButton8 = new JButton();
jButton8.setText("Paso nivel");
jButton8.setPreferredSize(new java.awt.Dimension(150,30));
jButton8.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
p.jugadores[p.turno].pasoNivel();
}
});
}
return jButton8;
}
COM: <s> this method initializes j button8 </s>
|
funcom_train/29712368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasNonTransparentChild(Node node) {
if (!node.hasChildNodes()) {
return false;
} else {
NodeList children = node.getChildNodes();
for (int i = 0, n = children.getLength(); i < n; i++) {
Object child = children.item(i);
if (isText((Node) child)) {
if (!isTransparentText((Node) child)) {
return true;
}
} else {
return true;
}
}
}
return false;
}
COM: <s> to see if a node has child that is not transparent child only </s>
|
funcom_train/37434709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DOMContext getRoot() throws XMLException {
try {
Node instanceNode = XPathAPI.selectSingleNode(this.getNode(), "/*");
return create(instanceNode);
} catch (TransformerException e) {
throw new XMLException("Cannot get root", e);
}
}
COM: <s> returns a dom context for the root element of the current document </s>
|
funcom_train/7421652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int countListsWithGateway(Map<StartEvent, List<Gateway>> map, Gateway gateway) {
int counter = 0;
for (Iterator<List<Gateway>> it = map.values().iterator(); it.hasNext();) {
List<Gateway> gateways = it.next();
if (gateways.contains(gateway)) {
counter++;
}
}
return counter;
}
COM: <s> counts the lists contained in the map that contain the given gateway </s>
|
funcom_train/49331246 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void error(String message, boolean throwException) {
message = message +
", current thread = " + Thread.currentThread() +
", locking thread=" + lockingThread +
", locking locations=" + locations;
ConcurrencyException ex = new ConcurrencyException(message, lockingLocation);
if (!errorReported) {
errorReported = true;
Application.getExceptionHandler().handleErrorCondition(ex);
} else {
log.error(message, ex);
}
if (throwException) {
throw ex;
}
}
COM: <s> raise an error </s>
|
funcom_train/46858463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEndTurn() throws JawException {
Game game = TestUtil.getStartedGame();
game.endTurn(TestUtil.p1);
game.endTurn(TestUtil.p2);
game.endTurn(TestUtil.p3);
game.endTurn(TestUtil.p4);
game.endTurn(TestUtil.p1);
game.endTurn(TestUtil.p2);
}
COM: <s> should not throw any exceptions </s>
|
funcom_train/31724250 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeSonars(String clid, String n, long s, double[] sonars) throws RemoteException {
StringBuffer sb = new StringBuffer();
sb.append(sonars.length);
sb.append(" ");
for (int i=0; i<sonars.length; i++) {
sb.append(sonars[i]);
sb.append(" ");
}
addEntry(clid, n, "SONAR", s, sb.toString());
}
COM: <s> writes a sonar reading entry to the log </s>
|
funcom_train/13503802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean getDSVersionable(Entry entry) {
if (getDatastreamId(entry).equals("AUDIT")) {
return false;
}
List<Category> versionable = entry.getCategories(MODEL.VERSIONABLE.uri);
if (versionable.isEmpty() || versionable.size() > 1) {
return true;
} else {
return Boolean.valueOf(versionable.get(0).getTerm());
}
}
COM: <s> note audit datastreams always return false otherwise defaults to true </s>
|
funcom_train/37067687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeIndexToDisk(String fileName) throws IOException {
this.file = new File(fileName);
DataOutputStream out = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(file)));
for (int i = 0; i < index.length; i++)
out.writeLong(index[i]);
out.close();
// once we know output successfull, set these:
onDisk = true;
index = null; // clear memory
}
COM: <s> writes the index information to disk clears data from memory </s>
|
funcom_train/50572390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String generateRandomLowerString() {
Random rand = new Random();
int length = rand.nextInt(10);
char[] tempArray = new char[length];
for (int i = 0; i < tempArray.length; i++) {
int nextInt = 97 + rand.nextInt(26);
tempArray[i] = (char) nextInt;
} // end for
return new String(tempArray);
} // end generateRandomLowerString()
COM: <s> generates random lower strings </s>
|
funcom_train/3442453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void conditionalWrite() throws IOException {
if(buffer.length > size){
if(DEBUG){
System.out.println("internal buffer length " + buffer.length + " increased size limit : " + size);
System.out.println("Data: ('" + new String(buffer.ch, buffer.offset, buffer.length) + "')");
}
writeBufferedData();
}
}
COM: <s> write the buffer data if the buffer size has increased the size specified </s>
|
funcom_train/10278801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseValue(String transformString){
String matches[] = transformString.split("\\s*;\\s*");
for (int i = 0; i < matches.length; i++) {
String parts[] = matches[i].split("\\s*:\\s*");
parts[0] = parts[0].trim();
parts[1] = parts[1].trim();
endValues.put( parts[0].toLowerCase(), parts[1].toLowerCase() );
}
}
COM: <s> parses a transformation string and saves the values </s>
|
funcom_train/46628548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Criteria createCreteria(Session session, SessionActivityToken bean) {
Criteria criteria = session.createCriteria(SessionActivityToken.class);
if (bean.getToken() != null && !"".equals(bean.getToken().trim())) {
criteria.add(Property.forName("token").like("%" + bean.getToken() + "%"));
}
return criteria;
}
COM: <s> creates custom criteria relative to entity </s>
|
funcom_train/13304783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIsAllowedToParticipantPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_InformationModel_isAllowedToParticipant_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_InformationModel_isAllowedToParticipant_feature", "_UI_InformationModel_type"),
NegotiationPackage.Literals.INFORMATION_MODEL__IS_ALLOWED_TO_PARTICIPANT,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the is allowed to participant feature </s>
|
funcom_train/27843486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean doCatch(Binding binding, Exception exception) {
if (!_exceptionClass.isInstance(exception)) {
return false;
}
for (Iterator i = _feedBacks.iterator(); i.hasNext();) {
FeedBack feedBack = (FeedBack) i.next();
feedBack.onError(binding, exception);
}
return true;
}
COM: <s> attempts to catch the exception </s>
|
funcom_train/21610811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStringRoundTrip() {
final StringValue original = new StringValue("this is a string.");
final JsonValue converted = original.asJsonValue();
final StringValue reverted = converted.asString();
assertEquals("Inverted should be equals to original.", original.getNativeValue(), reverted.getNativeValue());
}
COM: <s> tests the string value json value string value round trip </s>
|
funcom_train/257230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getDetailFields(int reqSet) {
Collection fields = new ArrayList();
for(int r=0; r<rsInputFieldsTableModel[reqSet].getRowCount(); r++)
if ( ((Boolean)(rsInputFieldsTableModel[reqSet].getValueAt(r,2))).booleanValue())
fields.add(rsInputFieldsTableModel[reqSet].getValueAt(r,0).toString());
return fields;
}
COM: <s> return the list of fields to be used in the detail view </s>
|
funcom_train/44165896 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element toXMLElement() {
Element result = createMessage(getXMLElementTagName(),
"unit", unitId,
"carrier", carrierId);
if (directionString != null) {
result.setAttribute("direction", directionString);
}
return result;
}
COM: <s> convert this embark message to xml </s>
|
funcom_train/35838706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean restoreViewLinks(PCSession session, String sViewID) throws SQLException {
// DBConnection dbcon = getDatabaseManager().requestConnection(session.getModelName()) ;
//
// boolean added = DBViewLink.restoreViewLinks(dbcon, sViewID);
//
// getDatabaseManager().releaseConnection(session.getModelName(),dbcon);
return true;
}
COM: <s> restores all links to this view </s>
|
funcom_train/48725168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setKeyFile(String keyFilePath) {
if (validParameter(keyFilePath)) {
File keyFile = new File(keyFilePath.trim());
if (keyFile.exists()) {
getSvnRepository().setKeyFile(keyFile);
} else {
System.err.println("No key file found at '" + keyFilePath + "'");
}
}
}
COM: <s> set the private key file to use for ssh authentication to subversion </s>
|
funcom_train/15625561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unSetCursor(@NotNull final Point pos) {
beginTransaction();
try {
try {
unsetFlags(pos.x, pos.y, pos.x, pos.y, GRID_FLAG_CURSOR);
} catch (final ArrayIndexOutOfBoundsException ignored) {
// happens after map resizes if the map cursor was within the cut off area
}
} finally {
endTransaction();
}
}
COM: <s> un highlights the given cursor position </s>
|
funcom_train/42639178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkJacobi(Matrix jacobi) {
if (jacobi == null) throw new IllegalArgumentException("Jacobi matrix for system G(x) = 0 wasn't set");
if (jacobi.getColumnCount() != jacobi.getRowCount()) throw new IllegalArgumentException("Jacobi matrix for system G(x) = 0 should be square");
}
COM: <s> some check of jacobi matrix of system g x 0 </s>
|
funcom_train/39426066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ToolType getDbEngineRef() {
if(unappliedMods.isSetDbEngineRef()){
return (ToolType) unappliedMods.getDbEngineRef();
}else if(dbElement.isSetDbEngineRef()){
return (ToolType) dbElement.getDbEngineRef();
}
return null;
}
COM: <s> get the value of db db engine ref </s>
|
funcom_train/46857371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ProjectChanged(Project p) {
// If the user closed the project remove any registered event handers
// and empty the combo box
if (p == null) {
currentLayer.removeModifiedCollectionListener(this);
currentLayer.removeSelectionChangedListener(this);
currentLayer = null;
cmbElements.setModel(new DefaultComboBoxModel());
cmbElements.setEnabled(false);
getLblMessage().setText("No project loaded");
getScrollPane().setViewportView(lblMessage);
currentComponent = lblMessage;
}
}
COM: <s> called when the user closes opens or creates a new project </s>
|
funcom_train/33857185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIllegalArguments() {
try {
RandomUtils.JVM_RANDOM.nextInt(-1);
fail("expecting IllegalArgumentException");
} catch (IllegalArgumentException ex) {
// empty
}
try {
JVMRandom.nextLong( -1L );
fail("expecting IllegalArgumentException");
} catch (IllegalArgumentException ex) {
// empty
}
}
COM: <s> make sure that illegal arguments fail </s>
|
funcom_train/51611447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void makeDvis(String texPath) throws IOException {
File workPath = new File(output_path, texPath);
runLatex("latex", workPath, "questions.tex");
runLatex("latex", workPath, "answers.tex");
runLatex("latex", workPath, "solutions.tex");
zipFiles(workPath, "dvi");
}
COM: <s> creates dvis from the template </s>
|
funcom_train/45643603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDummyItem() {
HexTableItem item = new HexTableItem(this, SWT.NONE);
for (int i = 0; i < EHEP.TABLE_NUM_DATA_COLUMNS; i++) {
//
// Read buffer, convert bytes to strings and store them into the row
//
item.setText(i+1, EHEP.TABLE_EMPTY_CELL);
} // for
//
// Compress the size required for offset displaying
//
packColumns();
}
COM: <s> inserts an empty dummy item </s>
|
funcom_train/16912005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void commitChanges() {
for (int i = 0; i < ruleList.size(); i++) {
SubtractiveNormalizationSynapse synapseRef = (SubtractiveNormalizationSynapse) ruleList.get(i);
if (!tfLearningRate.getText().equals(NULL_STRING)) {
synapseRef.setLearningRate(Double.parseDouble(tfLearningRate.getText()));
}
}
}
COM: <s> called externally when the dialog is closed to commit any changes made </s>
|
funcom_train/45776665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCellNote(Cell cell, CellNote note) {
if (cell == null) {
throw new IllegalArgumentException("Cell cannot be null.");
}
if (note == null) {
throw new IllegalArgumentException("Note cannot be null.");
}
if (cell.isEditable()) {
executeCommand(new EditCellNoteCommand(cell, note));
}
}
COM: <s> sets note attached to the given cell </s>
|
funcom_train/11702802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean processCas(Object[] aCasList) {
if (aCasList == null) {
return false;
}
boolean doProcess = false;
// If at least one cas has a dependant feature, process the entire set
for (int i = 0; i < aCasList.length; i++) {
if (processCas(aCasList[i])) {
doProcess = true;
break;
}
}
return doProcess;
}
COM: <s> returns true if the cas bundles should be processed by the cas processor </s>
|
funcom_train/39176825 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Icon getIcon() {
if(icon == null) {
ResourceData rd = Gate.getCreoleRegister().get(className);
String iconName = rd.getIcon();
if(iconName == null) {
// generic PR icon if this resource doesn't specify one
iconName = "pr";
}
icon = gate.gui.MainFrame.getIcon(iconName);
}
return icon;
}
COM: <s> get a suitable icon for this pr </s>
|
funcom_train/19433948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BufferedImage loadImage( String file ) throws IOException {
BufferedImage bufferedImage = ImageIO.read( new BufferedInputStream(
TextureLoader.class.getClassLoader().getResourceAsStream( file ) ) );
if ( bufferedImage == null ) {
throw new IOException( "Couldn't find " + file );
}
return bufferedImage;
}
COM: <s> load a given file as a buffered image </s>
|
funcom_train/4756047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void validateParameters(double[] parameters) {
if (parameters == null) {
throw new NullArgumentException(LocalizedFormats.INPUT_ARRAY);
}
if (parameters.length != 4) {
throw new DimensionMismatchException(4, parameters.length);
}
if (parameters[3] == 0) {
throw new ZeroException();
}
}
COM: <s> validates parameters to ensure they are appropriate for the evaluation of </s>
|
funcom_train/243648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDataSource() throws DataSourceManagerException, SQLException {
DataSourceManager manager = new MySQLDataSourceManager();
DataSource ds = manager.getDataSource();
assertNotNull("DataSource was null", ds);
Connection con = ds.getConnection();
assertNotNull("Connection could not be retrieved / was null", con);
}
COM: <s> basic test to test that the data source is created and configured correctly </s>
|
funcom_train/10842490 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InstallTask createTask(final TaskResourceGroup group) {
final TaskResource toActivate = group.getActiveResource();
if ( !toActivate.getType().equals(InstallableResource.TYPE_CONFIG) ) {
return null;
}
final InstallTask result;
if (toActivate.getState() == ResourceState.UNINSTALL) {
result = new ConfigRemoveTask(group, this.configAdmin);
} else {
result = new ConfigInstallTask(group, this.configAdmin);
}
return result;
}
COM: <s> create a task to install or uninstall a configuration </s>
|
funcom_train/48558542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand3() {
if (okCommand3 == null) {//GEN-END:|226-getter|0|226-preInit
okCommand3 = new Command("OK", Command.OK, 0);//GEN-LINE:|226-getter|1|226-postInit
}//GEN-BEGIN:|226-getter|2|
return okCommand3;
}
COM: <s> returns an initiliazed instance of ok command3 component </s>
|
funcom_train/39035801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RegexpType determineRegexpType() {
switch (tag) {
case ALL:
return RegexpType.PERMUTATION;
case CHOICE:
return RegexpType.ALTERNATION;
case SEQUENCE:
return RegexpType.CONCATENATION;
default:
// if it's a regular element, we don't know the type yet
// this has to stay null, because the element can have a type defined in some named CType
return null;
}
}
COM: <s> match tag of current instance to a </s>
|
funcom_train/22471161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String listKeywords() {
String keywords = "";
Keywordbag bag = getKeywordbag();
if (bag == null) {
return "";
}
for (Keyword key : bag.getKeywords()) {
keywords += key.getName() + ", ";
}
return (keywords.length() >= 2) ? keywords.substring(0, keywords.length() - 2) : "";
}
COM: <s> returns the songs keywords as a comma separated </s>
|
funcom_train/16310107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAfterPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_AbstractEntity_after_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_AbstractEntity_after_feature", "_UI_AbstractEntity_type"),
PstlPackage.Literals.ABSTRACT_ENTITY__AFTER,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the after feature </s>
|
funcom_train/34196594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isPackage(String packageName, String classType) {
if (isEmptyString(packageName)) {
return classType.indexOf('.') == -1;
} else {
return (classType.startsWith(packageName) && classType.lastIndexOf('.') == packageName.length());
}
}
COM: <s> checks if the given class description is in the package specified </s>
|
funcom_train/7292328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private long monthStart(int year, int month) {
if (civil) {
return (long)Math.ceil(29.5*month)
+ (year-1)*354 + (long)Math.floor((3+11*year)/30.0);
} else {
return trueMonthStart(12*(year-1) + month);
}
}
COM: <s> return the day on which the given month starts </s>
|
funcom_train/10804818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeEdge(Edge edge) {
Collection<Edge> edges = _nodes.get(edge.getFrom());
if (edges == null)
return false;
boolean rem = edges.remove(edge);
if (rem && !edge.isDirected()) {
edges = _nodes.get(edge.getTo());
if (edges != null)
edges.remove(edge);
}
return rem;
}
COM: <s> remove an edge from the graph </s>
|
funcom_train/42451872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rotate(double Degrees)throws IllegalStateException{
if(!x.isEmpty() && !y.isEmpty()){
MatrixConversion mc = new MatrixConversion();
Matrix temp = util.combine(x,y);
temp = mc.RotateClockwise(temp, Degrees);
x = temp.selectColumns(Calculation.Ret.NEW, 0);
y = temp.selectColumns(Calculation.Ret.NEW, 1);
} else throw new IllegalStateException("no XY data loaded");
}
COM: <s> rotates the xy data about the origin </s>
|
funcom_train/28989943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visitDragDouble(DragDouble dragDouble){
float[] delta=this.getDelta();
if((delta[0]*delta[1]>0) || (delta[2]*delta[3]>0) && !isGesture){
this.gesture.onDrag(finger1.id(),getCenterX(), getCenterY());
this.isGesture=true; // a rotation has been found
}
}
COM: <s> proceed a dual drag finger </s>
|
funcom_train/11672529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object remove(int index) {
Object oldValue = ea[index];
List list = new ArrayList(Arrays.asList(ea));
list.remove(index);
ea = list.toArray(ea);
numElems = ea.length;
numElems--;
if (--last <= 0) {
last = numElems;
}
if (first == maxSize) {
first = 0;
}
return oldValue;
}
COM: <s> removes the element at the specified position in this list </s>
|
funcom_train/41163527 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(CoTechnical entity) {
EntityManagerHelper.log("saving CoTechnical instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved co technical entity </s>
|
funcom_train/1886442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFractal(Fractal fractal) {
if (fractal == null) {
throw new NullPointerException("fractal is null");
}
if (!fractal.equals(this.fractal)) {
this.fractal = fractal;
scaledCenterX = 0L;
scaledCenterY = 0L;
scale = 1.0;
firePropertyChange("fractal", null, fractal); // todo
repaint();
}
}
COM: <s> changes the fractal displayed by this pane </s>
|
funcom_train/15913396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RECategory getCategoryWithName(String p_catName) {
try {
for (Iterator iter = contents.iterator(); iter.hasNext();) {
RECategory cat = (RECategory)iter.next();
if (cat.getName().equals(p_catName)) {
return cat;
}
}
return null;
} catch (NullPointerException npe) {
return null;
}
}
COM: <s> returns the category with the passed name if it is among the </s>
|
funcom_train/39309231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void hardwareUnregistered(HardwareUnregisteredEvent event) {
// retrieve a reference to the newly unregistered hardware object
UnregisteredHardware unregisteredHardware = event.getUpdatedHardware();
RegisteredHardware registeredHardware = event.getOldHardware();
// remove the node from the registered branch
removeRegisteredHardware(registeredHardware);
// add it to the unregistered branch
addUnregisteredHardware(unregisteredHardware);
}
COM: <s> called when an existing hardware object is unregistered </s>
|
funcom_train/3715347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // protected void quitProgram() {
// if (JOptionPane.showConfirmDialog (frame,
// "Are you sure you want to quit ?", "Confirm",
// JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE) ==
// JOptionPane.YES_OPTION) {
// quitProgramDirectly();
// }
// }
COM: <s> quit after confirmation entry by user </s>
|
funcom_train/17157442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeUser(User user) {
Consistency.notNull(user,
new IllegalArgumentException("user should not be null"));
if (!this.isLoggedIn(user)) {
throw new UserNotLoggedInException(
"user must be logged in for removal");
}
this.usersToBeRemoved.add(user);
}
COM: <s> removes the given user from skejula after its logout if it is already </s>
|
funcom_train/22746761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setURLFrame(String id, String data) {
if ((id.charAt(0) == 'W')
&& !id.equals(ID3v2Frames.USER_DEFINED_URL)) {
setGenericFrame(id, null, null, data);
// updateFrameData(id, data.getBytes());
}
}
COM: <s> set the data contained in a url frame </s>
|
funcom_train/18287431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File findPreverifyExecutable(File directory) {
File[] files = directory.listFiles(new FileFilter() {
public boolean accept(File pathname) {
String name = pathname.getName();
return pathname.isDirectory() ||
(name.equals("preverify.exe") || name.equals("preverify"));
}
});
File executable = null;
for (int i = 0; i < files.length; i++) {
if (files[i].isDirectory()) {
executable = findPreverifyExecutable(files[i]);
} else {
executable = files[i];
break;
}
}
return executable;
}
COM: <s> find a preverify executable in the specified directory or </s>
|
funcom_train/10888866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void deleteLeastUsedEntry() {
poolLock.lock();
try {
BasicPoolEntry entry = freeConnections.remove();
if (entry != null) {
deleteEntry(entry);
} else if (log.isDebugEnabled()) {
log.debug("No free connection to delete");
}
} finally {
poolLock.unlock();
}
}
COM: <s> delete an old free pool entry to make room for a new one </s>
|
funcom_train/19251592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() {
logger.info("Resetting.");
LearningStrategyDecorator dec = settingsPanel.getDecorator();
dec.init();// Sets currentIndex to 0.
dec.setVisible(settingsPanel.nothingHidden());
Map data = dec.getCurrentData();
allCardsPanel.repaint();
if (data != null )
populateFlashCard();
updateAction();
}
COM: <s> initializes the data provider </s>
|
funcom_train/17203815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNumberOfNonvolatileFPRs() {
if (VM.BuildForPowerPC) {
return ArchitectureSpecific.RegisterConstants.NUM_FPRS - getFirstNonVolatileFPR();
} else if (VM.BuildForIA32) {
return ArchitectureSpecific.RegisterConstants.NUM_NONVOLATILE_FPRS - getFirstNonVolatileFPR();
} else if (VM.VerifyAssertions) {
VM._assert(VM.NOT_REACHED);
}
return -1;
}
COM: <s> return the number of non volatile fprs used by this method </s>
|
funcom_train/39911091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetEnable() {
System.out.println("getEnable");
Employee instance = new Employee();
int expResult = 0;
int result = instance.getEnable();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get enable method of class buissness </s>
|
funcom_train/45237150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCmdSetMyselfBusy() {
if (cmdSetMyselfBusy == null) {//GEN-END:|159-getter|0|159-preInit
// write pre-init user code here
cmdSetMyselfBusy = new Command("Definir Ocupado", Command.ITEM, 0);//GEN-LINE:|159-getter|1|159-postInit
// write post-init user code here
}//GEN-BEGIN:|159-getter|2|
return cmdSetMyselfBusy;
}
COM: <s> returns an initiliazed instance of cmd set myself busy component </s>
|
funcom_train/23900414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int scanTestName(String s, int start, StringBuffer testName) {
boolean inQuote = false;
int i = start;
for (; i < s.length(); i++) {
char c = s.charAt(i);
if (c == '\\' && !inQuote) {
inQuote = true;
continue;
} else if (inQuote) {
inQuote = false;
testName.append(c);
} else if (c == ',')
break;
else
testName.append(c);
}
return i;
}
COM: <s> append the test name from code s code to code test name code </s>
|
funcom_train/29031654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void buyTowerPerShortcut(IConstants.Towers tower) {
Grid g = null;
// get the highlighted grid (cell)
for (int i = 0; i < gridArray.length; i++) {
for (int j = 0; j < gridArray[0].length; j++) {
if (gridArray[i][j].getHighlight())
g = gridArray[i][j];
}
}
this.buyTower(tower, g);
}
COM: <s> this method is used to buy a tower per shortcut </s>
|
funcom_train/29932680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNumbers() {
String[] exp = new String[] {"11", ",", "15", "-", "17"};
List<DocumentToken> tokens = lem.lemmatize("11, 15-17", null);
assertEquals(exp.length, tokens.size());
int i = 0;
for(DocumentToken token : tokens) {
assertEquals(exp[i], token.getLemma());
assertFalse(exp[i], token.isLemmaUnknown());
i++;
}
}
COM: <s> tests if the parser is able to parse numbers </s>
|
funcom_train/8084847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setShowClassPanel(boolean scp) {
if (!scp && m_showClassPanel) {
remove(m_classSurround);
} else if (scp && !m_showClassPanel) {
add(m_classSurround, BorderLayout.SOUTH);
}
m_showClassPanel = scp;
repaint();
}
COM: <s> set whether the class panel should be shown or not </s>
|
funcom_train/31906792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireDOMFocusInEvent(EventTarget target) {
DocumentEvent docEvt =
(DocumentEvent)((Element)target).getOwnerDocument();
UIEvent uiEvt = (UIEvent)docEvt.createEvent("UIEvents");
uiEvt.initUIEvent("DOMFocusIn", true, false, null, 0);
target.dispatchEvent(uiEvt);
}
COM: <s> fires a domfocus in event to the specified target </s>
|
funcom_train/37835857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateMoney() {
int amount = 0;
for (HashMap<String, RPObject> stack : money.values()) {
for (RPObject obj : stack.values()) {
amount += obj.getInt("quantity");
}
}
final String text = "Money: " + amount;
SwingUtilities.invokeLater(new Runnable() {
public void run() {
panel.setMoney(text);
}
});
}
COM: <s> count the money and update the label text </s>
|
funcom_train/44706709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addWidgets() {
add(new Label(GlobalizationUtil.globalize("cms.ui.authoring.content_type")));
add(new Label(getItemSelectionModel().getContentType().getLabel()));
add(new Label(GlobalizationUtil.globalize("cms.ui.language.field")));
add(new LanguageWidget(LANGUAGE));
super.addWidgets();
}
COM: <s> add various widgets to the form </s>
|
funcom_train/36955875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean processResourceDeltas(IResourceDelta[] deltas, Object parent) {
if (deltas == null)
return false;
if (deltas.length > 1) {
// more than one child changed, refresh from here downwards
postRefresh(parent, ORIGINAL, parent);
return true;
}
for (int i= 0; i < deltas.length; i++) {
if (processResourceDelta(deltas[i], parent))
return true;
}
return false;
}
COM: <s> process resource deltas </s>
|
funcom_train/6347921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMapCode(String mapCode, int layer, int x, int y) {
((DefaultTileMapLayer) map.get(layer)).setMapCode(mapCode, x, y);
} // setMapCode(String mapCode, int layer, int x, int y)
COM: <s> sets the usual two character map code which identifies the tile </s>
|
funcom_train/14262571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeXliff(String text) {
if ((text == null) || (text.length() == 0)) {
return; // Hmmm ... Nothing to output
}
try {
xliffOut.write(text);
xliffOut.flush(); // For debugging
}
catch(IOException e) {
System.err.println("Error writing to XLIFF: " + e.getMessage());
}
}
COM: <s> write the specified text to the output xliff stream </s>
|
funcom_train/18786899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuilder buffer = new StringBuilder();
buffer.append(name);
buffer.append("(");
buffer.append(reason);
buffer.append(")");
if (text != null) {
buffer.append(text);
}
return buffer.toString();
}
COM: <s> returns a string representation of the object </s>
|
funcom_train/1066712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void buildActions() {
addRetargetAction(new UndoRetargetAction());
addRetargetAction(new RedoRetargetAction());
// addRetargetAction(new DeleteRetargetAction());
// register create action for each registered editor
// RetargetAction action;
// for( NestedEditorDescriptor desc : getEditorRegistry().getEditorDescriptors() ){
// addRetargetAction( new CreateDiagramRetargetAction( desc.getCreateButtonDescriptor()) );
// }
// // Delete current diagram
// addRetargetAction(new DeleteDiagramRetargetAction());
}
COM: <s> load actions declared in extensions and load default actions undo redo delete </s>
|
funcom_train/40225580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNestedEntity() throws Exception {
final Marshaler marshaler = getMarshaler();
Assert.assertTrue(marshaler != null);
final IEntity e = getEntityBeanFactory().getEntityCopy(NestedEntity.class);
Assert.assertNotNull(e);
final Model model = marshaler.marshalEntity(e, MarshalOptions.UNCONSTRAINED_MARSHALING);
Assert.assertNotNull(model);
final IEntity e2 = marshaler.marshalModel(model, e.entityClass());
Assert.assertNotNull(e2);
Assert.assertEquals(e, e2);
}
COM: <s> tests the marshaling of a nested entity </s>
|
funcom_train/1432885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadResource(String path) {
if( logger.isTraceEnabled() )
logger.trace( "Resource: " + path );
File fp = new File( path );
if( !fp.exists() && !ignoreMissingResources ) {
throw new GclException( "File/Path does not exist" );
}
loadResource( fp, "" );
}
COM: <s> reads local resources from jar files class folders jar library </s>
|
funcom_train/30196786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetNomeImpiego() {
System.out.println("setNomeImpiego");
String nomeImpiego = "test";
Impiego instance = new Impiego();
instance.setNomeImpiego(nomeImpiego);
String result = instance.getNomeImpiego();
assertEquals("test", result);
}
COM: <s> test of set nome impiego method of class com </s>
|
funcom_train/41766417 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void keyRepeated(int keyCode) {
int game = Display.getInstance().getGameAction(keyCode);
if (game == Display.GAME_DOWN || game == Display.GAME_UP || game == Display.GAME_LEFT || game == Display.GAME_RIGHT) {
keyPressed(keyCode);
keyReleased(keyCode);
}
}
COM: <s> if this component is focused the key repeat event </s>
|
funcom_train/22353916 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fire(EventObject e, boolean synchronous) {
if (EventDispatcher.log.isDebugEnabled()) {
EventDispatcher.log.debug("EventDispatcher(" + e + "," + synchronous + "): fired event ",
new Exception());
}
if (synchronous) {
new Notifier(e).run();
} else {
queue.push(e);
}
}
COM: <s> forwards an event to all registered listeners for this event type </s>
|
funcom_train/44942412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDirectoryOperation(DirectoryOperation op, File f) {
updatedFiles.addAll(op.getUpdatedFiles());
newFiles.addAll(op.getNewFiles());
unchangedFiles.addAll(op.getUnchangedFiles());
deletedFiles.addAll(op.getDeletedFiles());
recursedDirectories.add(f);
}
COM: <s> add the contents of another directory operation </s>
|
funcom_train/15488288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Unit find(String unitName) {
if(ZUtils.DEBUG) {
ZUtils.assert_(unitName != null);
}
for(int i = 0; i < units.size(); i++) {
if(((Unit) units.get(i)).getFullName().equals(unitName))
return (Unit) units.get(i);
}
File f = findFile(unitName);
if(f == null) return null;
return compiler.firstRun(f).getUnit();
}
COM: <s> searches a unit </s>
|
funcom_train/12174836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean strContainsOnly(String format, String allowed) {
char c;
for (int i = 0; i < format.length(); i++) {
c = format.charAt(i);
if (allowed.indexOf(c) == -1) {
return false;
}
}
return true;
}
COM: <s> check to see whether the format contains only the allowed characters </s>
|