__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/37777992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validate() throws ApplicationExceptions, FrameworkException {
// stamps the key-values on new FlexField instances
for (FlexField flexField : flexFields.values()) {
if (!flexField.isDatabaseOccurence() && flexField.getValue() != null && flexField.getValue().length() > 0)
stampKeyValues(flexField);
}
}
COM: <s> validates this bean </s>
|
funcom_train/28750532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNewacctnumber(String newVal) {
if ((newVal != null && this.newacctnumber != null && (newVal.compareTo(this.newacctnumber) == 0)) ||
(newVal == null && this.newacctnumber == null && newacctnumber_is_initialized)) {
return;
}
this.newacctnumber = newVal;
newacctnumber_is_modified = true;
newacctnumber_is_initialized = true;
}
COM: <s> setter method for newacctnumber </s>
|
funcom_train/45916951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void paintDisablePattern(Graphics2D g2, Rectangle rect) {
Paint p = g2.getPaint();
g2.setPaint(new TexturePaint(cgfx.disablingPattern,
new Rectangle(rect.x + 1, rect.y + 1,
cgfx.disablingPattern.getWidth(), cgfx.disablingPattern.getHeight())));
g2.fill(new Rectangle(rect.x + 1, rect.y + 1, rect.width - 2, rect.height - 2));
g2.setPaint(p);
}
COM: <s> paint the disabling pattern onto the given rectangle area </s>
|
funcom_train/4881989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getTFnomeMateria () {
if (TFnomeMateria == null) {//GEN-END:|193-getter|0|193-preInit
// write pre-init user code here
TFnomeMateria = new TextField ("Nome Materia (SIGLA)", " ", 32, TextField.ANY);//GEN-LINE:|193-getter|1|193-postInit
// write post-init user code here
}//GEN-BEGIN:|193-getter|2|
return TFnomeMateria;
}
COM: <s> returns an initiliazed instance of tfnome materia component </s>
|
funcom_train/3704333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPrivacyTagTimeToLive(String strTTL) {
//// 1. Do error checking. Throws IllegalArgumentException on fail.
long val = TimeLib.timespanToMillis(strTTL);
//// 2. Set the privacy tag.
Tuple tTTL = getOrCreatePrivacyTag(TUPLE_PRIVACYTAG_TTL);
tTTL.setAttribute(ATTR_VALUE, strTTL);
} // of method
COM: <s> set how long this tuple should last from the received time </s>
|
funcom_train/2386475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resourceCleanup() {
try {
if (connectionResource != null) {
connectionResource.release();
}
}
catch (Exception e) {
LOGGER.log(Level.SEVERE, "unexpected", e); //$NON-NLS-1$
}
finally {
connectionResource = null;
serviceThreadGroup = null;
}
}
COM: <s> clears allocated resources </s>
|
funcom_train/48151332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() {
super.reset();
x.reset();
stdScore.reset();
success.reset();
sample = new int[sampleSize];
estimateGraph.repaint();
stdScoreGraph.repaint();
successGraph.repaint();
sampleTable.setText("Sample");
getRecordTable().append("\tL\tR\tZ\tI");
successTable.update();
}
COM: <s> this method resets the exeperiment </s>
|
funcom_train/40526563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean run() {
try {
return getCompilationPipeline().apply(jobs);
} catch (Planner.UnsatisfiableGoalException ex) {
jobs.getMessageQueue().addMessage(
PluginMessageType.INVALID_PIPELINE,
MessagePart.Factory.valueOf("" + preconditions),
MessagePart.Factory.valueOf("" + goals));
return false;
}
}
COM: <s> run the compiler on all parse trees added via </s>
|
funcom_train/25639156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Content getNavLinkNext(String next) {
Content li;
if (next != null) {
li = HtmlTree.LI(getHyperLink(next, "", nextLabel, "", ""));
}
else
li = HtmlTree.LI(nextLabel);
return li;
}
COM: <s> get link for next file </s>
|
funcom_train/2903155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerKeyBindings(JComponent c){
if(bkgrd != null){
Object[] listener = keyListeners.toArray();
if(listener != null){
for(int i=0; i<listener.length; i++){
if(listener[i] instanceof NativeKeyListener){
NativeKeyListener wl = (NativeKeyListener)listener[i];
if(wl.isRemoved()){
keyListeners.remove(listener[i]);
}
else{
if(c != null){
wl.addKeyBinding(c);
}
}
}
else{
keyListeners.remove(listener[i]);
}
}
}
}
}
COM: <s> register the background for default key bindings </s>
|
funcom_train/45186632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addArchiveActions(JToolBar toolBar) {
toolBar.add(createArchiveAction);
toolBar.add(openArchiveAction);
toolBar.add(appendArchiveAction);
// toolBar.add(convertAction);
toolBar.add(saveArchiveAction);
toolBar.add(archivePropertiesAction);
}
COM: <s> adds file actions to jtool bar </s>
|
funcom_train/4237325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetHoraRecibido() {
System.out.println("getHoraRecibido");
Orden instance = new Orden();
Date prueba = new Date();
instance.setHoraRecibido(prueba);
Date expResult = prueba;
Date result = instance.getHoraRecibido();
assertEquals(expResult, result);
}
COM: <s> test of get hora recibido method of class data </s>
|
funcom_train/33012762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ExtendedMemAgentRegistry copy() {
ExtendedMemAgentRegistry copyInstance = new ExtendedMemAgentRegistry();
for (AID agent : this.agents) {
copyInstance.agents.add(agent);
}
Enumeration<AID> enumerator = statusInfo.keys();
AID agent;
WorkerStatusInfo workerStatusInfo;
while (enumerator.hasMoreElements()) {
agent = enumerator.nextElement();
workerStatusInfo = this.statusInfo.get(agent);
copyInstance.statusInfo.put(agent, workerStatusInfo);
}
return copyInstance;
}
COM: <s> returns a deep copy of this instance </s>
|
funcom_train/37036272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop() throws LifecycleException {
setAvailable(Long.MAX_VALUE);
// Shut down our servlet instance (if it has been initialized)
try {
unload();
} catch (ServletException e) {
log(sm.getString("standardWrapper.unloadException", getName()), e);
}
// Shut down this component
super.stop();
}
COM: <s> stop this component gracefully shutting down the servlet if it has </s>
|
funcom_train/28983083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getSettingsSMPTAddress () {
if (settingsSMPTAddress == null) {//GEN-END:|79-getter|0|79-preInit
// write pre-init user code here
settingsSMPTAddress = new TextField ("SMTP Server Address*:", "server_address.com", 64, TextField.ANY);//GEN-LINE:|79-getter|1|79-postInit
// write post-init user code here
}//GEN-BEGIN:|79-getter|2|
return settingsSMPTAddress;
}
COM: <s> returns an initiliazed instance of settings smptaddress component </s>
|
funcom_train/44877586 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove_this_arc( Arc arc ) {
Arc j, prev;
for( j = head; (j != null) && (j != arc); prev = j, j = j.link );
if( j != null ) {
if( j == current )
current = j.link;
if ( prev != null )
prev.link = j.link;
}
}
COM: <s> removes given arc from bin </s>
|
funcom_train/22928885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCommandHandlers(Map commandHandlerMapping) {
Assert.notNull(commandHandlerMapping, "commandHandlers");
for (Iterator iter = commandHandlerMapping.keySet().iterator(); iter.hasNext();) {
String commandName = (String) iter.next();
setCommandHandler(commandName, (CommandHandler) commandHandlerMapping.get(commandName));
}
}
COM: <s> override the default command handlers with those in the specified map of </s>
|
funcom_train/3085197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Calendar _parseDate() {
String text = getText();
if (text == null || dateFormat == null)
return null;
java.text.ParsePosition pp = new java.text.ParsePosition(0);
java.util.Date dt = dateFormat.parse(text, pp);
if (dt == null || pp.getIndex() < text.length() || pp.getErrorIndex() >= 0)
return null;
Calendar cal = Calendar.getInstance();
cal.setTime(dt);
return cal;
}
COM: <s> returns a calendar by parsing the current text </s>
|
funcom_train/1316777 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void expandCapacity(int minimumCapacity) {
int newCapacity = (payload.length + 1) * 2;
if (newCapacity < 0) {
newCapacity = Integer.MAX_VALUE;
} else if (minimumCapacity > newCapacity) {
newCapacity = minimumCapacity;
}
byte[] newPayload = new byte[newCapacity];
try {
while(curLength > payload.length)
curLength--;
System.arraycopy(payload, 0, newPayload, 0, curLength);
} catch(Exception e) {
}
payload = newPayload;
}
COM: <s> expands the buffer to the specified size </s>
|
funcom_train/20296422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void closeConnection(){
try {
theClient.logger.print_info("Closing connections...");
if(serverSocket != null){
serverSocket.close();
serverSocket = null;
}
if(opponentSocket != null){
opponentSocket.close();
opponentSocket = null;
}
// if(clientToOpponent!=null){
// clientToOpponent.close();
// clientToOpponent = null;
// }
// if(opponentIn != null){
// opponentIn.close();
// opponentIn = null;
// }
} catch (IOException e) {
theClient.logger.print_error("Problem while closing the connection: " + e.getMessage());
}
}
COM: <s> closing the connection sockets </s>
|
funcom_train/13814480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PhotoFolder findSubfolderByName(PhotoFolder folder, String name ) {
PhotoFolder subfolder = null;
for ( int n = 0; n < folder.getSubfolderCount(); n++ ) {
PhotoFolder candidate = folder.getSubfolder( n );
if ( name.equals( candidate.getName() ) ) {
subfolder = candidate;
break;
}
}
return subfolder;
}
COM: <s> finds a subfolder with given name </s>
|
funcom_train/31931056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void appendList(String label, List<String> list, String indent) {
for (int i = 0; i < list.size(); i++) {
m_trace
.append(lines((i == 0 ? label : EMPTY_LABEL), list.get(i), indent));
}
}
COM: <s> append information about the given code list code each element of which </s>
|
funcom_train/31649915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProperty( String name, String value ) {
super.setProperty( name, value );
// It's heavy, dude, that we've gotta hit this for each setProperty():
if ( ! getStandaloneMode() ) {
try {
persistConfiguration();
} catch ( Exception e ) {
SM.warning("Could not persist change to HttpListener props",e);
/* Continue: change will not stick */
}
}
}
COM: <s> sets the properties of this listener </s>
|
funcom_train/26227527 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getInfo(int pos) {
int sub = subscript(pos);
int set = subset(pos);
if (infos != null && sub < infos.length) {
return (infos[sub] >> (2 * set)) & 3;
} else if (parent != null) {
return parent.getInfo(pos);
} else {
return 0;
}
}
COM: <s> returns the definite assignment state of the specified variable or field </s>
|
funcom_train/34908097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPrahKontextuPropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_RozhodovaciMechanizmus_prahKontextu_feature"),
getString("_UI_RozhodovaciMechanizmus_prahKontextu_description"),
GebzPackage.Literals.ROZHODOVACI_MECHANIZMUS__PRAH_KONTEXTU,
true, false, false,
ItemPropertyDescriptor.REAL_VALUE_IMAGE,
getString("_UI_HodnotyPropertyCategory"), null));
}
COM: <s> this adds a property descriptor for the prah kontextu feature </s>
|
funcom_train/22155205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addNeighbor(TorrentStation newStation) {
if (this.knownNeighbors.size() >= TorrentStation.MAX_NEIGHBORS ||
newStation.knownNeighbors.size() >= TorrentStation.MAX_NEIGHBORS || this.knownNeighbors.contains(newStation))
return false;
this.knownNeighbors.add(newStation);
newStation.knownNeighbors.add(this);
return true;
}
COM: <s> add given station to the known neighbors of the currient one </s>
|
funcom_train/21465924 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Instances prepareDataset() {
// prepare the attribute list
attList = new FastVector();
for (AttributeHolder ah : holder) {
attList.addElement(new Attribute(ah.name, ah.possibleValues));
}
// initialize dataset
Instances dataSet = new Instances("LBO", attList, DATASET_CAPACITY);
// set the class index as the last attribute
dataSet.setClassIndex(attList.size() - 1);
return dataSet;
}
COM: <s> prepares the dataset from the examples stored in the holder </s>
|
funcom_train/43394730 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getEinstanceID() {
Enumeration keys = runTimesData.keys();
while (keys.hasMoreElements()) {//traverse the workflows
String key = (String) keys.nextElement();
if (((WorkflowRunTime) runTimesData.get(key)).getText().equals("einstance")) {
return ""+key;
}
}
return null;
}
COM: <s> getting the internal id of the instance started from the end user interface </s>
|
funcom_train/44173657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean closeAllModels(){
final Object[] models;
synchronized(this.models){
models = this.models.toArray();
}
for(int mNr = 0; mNr < models.length; mNr++){
final Model model = (Model)models[mNr];
if(!model.doCloseModel()) return false;
}
synchronized(this.models){
assert(this.models.isEmpty()) : "Models registered after removed all!";
}
return true;
}
COM: <s> returns wether all code model code s could have been closed </s>
|
funcom_train/17529354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printAllNodes(CharacteristicRelationType relationType) {
for(Node n1 : this.nodes) {
int index1 = this.nodes.indexOf(n1);
for(Node n2 : this.nodes) {
int index2 = this.nodes.indexOf(n2);
if (index2 > index1)
continue;
if (matrix[index1][index2].equals(relationType))
System.out.println(relationType + " -- " + n1 + " : " + n2);
}
}
}
COM: <s> dumps all nodes in a given behavioural relation to the standard output </s>
|
funcom_train/35924774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // private boolean deleteOscarCache() {
// String oscarCache = System.getProperty("user.home");
// oscarCache = oscarCache.endsWith(File.separator) ? oscarCache
// : oscarCache + File.separator;
// oscarCache = oscarCache + ".oscar" + File.separator + profileName;
//
// File oscarCacheDirectory = new File(oscarCache);
// return deleteDir(oscarCacheDirectory);
// }
COM: <s> delete the oscar cache directory of the jade node </s>
|
funcom_train/48588058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CalendarEventFeed getEventsByDateRangeQuery(DateTime startTime, DateTime endTime, String domainName, String calendarId) throws ServiceException, IOException, Exception {
prepareCalendarService(domainName, calendarId);
URL feedUrl = new URL(EVENT_FEED_URL);
CalendarQuery myQuery = new CalendarQuery(feedUrl);
myQuery.setMinimumStartTime(startTime);
myQuery.setMaximumStartTime(endTime);
// Send the request and receive the response:
return service.query(myQuery, CalendarEventFeed.class);
}
COM: <s> prints the titles of all events in a specified date time range </s>
|
funcom_train/41162847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CoParagraphTeacher2 update(CoParagraphTeacher2 entity) {
EntityManagerHelper.log("updating CoParagraphTeacher2 instance", Level.INFO, null);
try {
CoParagraphTeacher2 result = getEntityManager().merge(entity);
EntityManagerHelper.log("update successful", Level.INFO, null);
return result;
} catch (RuntimeException re) {
EntityManagerHelper.log("update failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> persist a previously saved co paragraph teacher2 entity and return it or a </s>
|
funcom_train/18657197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addLine( String option, String description ) {
//System.out.println( "addLine " + option );
String[] line = { option, description };
lines.add( line );
maxOptionWidth = Math.max( maxOptionWidth, option.length() + 1);
}
COM: <s> adds a line consisted of an code option code and a description </s>
|
funcom_train/13850055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private TxnMonitorTask taskFor(Txn txn) {
TxnMonitorTask task = txn.monitorTask();
if (task == null) {
logger.log(Level.FINER, "creating TxnMonitorTask for {0}",
txn);
task = new TxnMonitorTask(txn, this, taskManager, wakeupMgr);
txn.monitorTask(task);
taskManager.add(task); // add it after we've set it in the txn
}
return task;
}
COM: <s> return the monitor task for this transaction creating it if </s>
|
funcom_train/39965574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void dealCommunityCards(String name, int noOfCards) {
notifyMessage("%s deals the %s.", dealer, name);
for (int i = 0; i < noOfCards; i++) {
board.add(deck.deal());
}
// notifyBoardUpdated();
}
COM: <s> deals a number of community cards </s>
|
funcom_train/1543383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void definePattern(int aStackTop, int aPrecedence, ConsPointer aPredicate, ConsPointer aBody) throws Exception {
// New branching rule.
PatternRule newRule = new PatternRule(iEnvironment, aStackTop, aPrecedence, aPredicate, aBody);
LispError.check(iEnvironment, aStackTop, newRule != null, LispError.CREATING_RULE, "INTERNAL");
insertRule(aPrecedence, newRule);
}
COM: <s> add a pattern rule to the list of rules </s>
|
funcom_train/50863162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMarsStartDateTime() {
Element root = simulationDoc.getRootElement();
Element timeConfig = root.getChild(TIME_CONFIGURATION);
Element marsStartDate = timeConfig.getChild(MARS_START_DATE_TIME);
String startDate = marsStartDate.getAttributeValue(VALUE);
if ((startDate == null) || startDate.trim().length() == 0)
throw new IllegalStateException("Mars start date time must not be blank.");
return startDate;
}
COM: <s> gets the mars dat time for when the simulation starts </s>
|
funcom_train/8554788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDirInexCreate() {
System.out.println("dirInexCreate");
WebDESOOntology iWDO = null;
String isWindows = "aa";
GetDataStore.dirInexCreate(iWDO, isWindows, 1);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of dir inex create method of class dirindex </s>
|
funcom_train/12262590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean read(Object o) throws PersistentStoreException {
if (o instanceof Sync4jPrincipal) {
try {
super.read(o);
} catch (NotFoundException e) {
if (log.isInfoEnabled()) {
log.info("Did not find principal, attempt adding it.");
}
super.store(o);
super.read(o);
}
return true;
}
return false;
}
COM: <s> read the principal from the data store </s>
|
funcom_train/38414122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void show( Point p ) {
menuDrawable.setNextPosition( p.x, p.y );
if(!isVisible && menuManager!=null) {
menuDrawable.animateMenu();
menuDrawable.tick();
menuManager.getGraphicsDirector().addDrawable( menuDrawable );
isVisible=true;
}
}
COM: <s> to show this menu2 d at the specified screen point </s>
|
funcom_train/41489691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toXML() {
return "<role class='"
+ getClass().getName()
+ "' id='" + getId()
+ "' name='" + getName()
+ "' description='" + getDescription()
+ "' enabled='" + isEnabled()
+ "' />";
}
COM: <s> returns the xml representation of the role br </s>
|
funcom_train/48630759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testProchainTroncon() {
System.out.println("prochainTroncon");
Itineraire instance = new Itineraire();
Troncon expResult = null;
Troncon result = instance.prochainTroncon();
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 prochain troncon method of class itineraire </s>
|
funcom_train/36359764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Spacer getSpacer4() {
if (spacer4 == null) {//GEN-END:|67-getter|0|67-preInit
// write pre-init user code here
spacer4 = new Spacer(16, 1);//GEN-LINE:|67-getter|1|67-postInit
// write post-init user code here
}//GEN-BEGIN:|67-getter|2|
return spacer4;
}
COM: <s> returns an initiliazed instance of spacer4 component </s>
|
funcom_train/18574317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String remove(String path) {
try {
return super.remove(path);
} catch (MMLPathException ex) {
if (trace)
ex.printStackTrace();
} catch (NullValueException ex) {
if (trace)
ex.printStackTrace();
} catch (Exception ex) {
ex.printStackTrace();
com.general.util.AnswerDialog.simpleAlert("" + ex);
}
return null;
}
COM: <s> removes the value at key path </s>
|
funcom_train/40337937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void layoutScale(double scaleX, double scaleY) {
Point2dUtils.Translater translater =
Point2dUtils.newScaleTranslater(scaleX, scaleY);
Map<GraphNode, Point2D> changes = translateNodes(
getExposedGraph().getNodes(), getNodeLocations(),
translater);
viewInfo.editNodeLocations(changes, null);
}
COM: <s> scale the coordinates for all exposed nodes as indicated by the paramters </s>
|
funcom_train/16768213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connect(String server, int port, String application, IPendingServiceCallback connectCallback) {
log.debug("connect server: {} port {} application {} connectCallback {}", new Object[] { server, port, application, connectCallback });
connect(server, port, makeDefaultConnectionParams(server, port, application), connectCallback);
}
COM: <s> connect rtmp client to servers application via given port with given </s>
|
funcom_train/18743313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean showDialog(Simulator simulator) {
this.simulator = simulator;
this.getContentPane().setVisible(true);
this.dialog =
getContentPane().createDialog(simulator.getFrame(), createTitle());
this.dialog.setVisible(true);
return (getContentPane().getValue() == getOkButton());
}
COM: <s> shows the dialog </s>
|
funcom_train/4882794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getNomeMateriaCNF () {
if (nomeMateriaCNF == null) {//GEN-END:|285-getter|0|285-preInit
// write pre-init user code here
nomeMateriaCNF = new StringItem ("Mat\u00E9ria:", "Materia Tal");//GEN-LINE:|285-getter|1|285-postInit
// write post-init user code here
}//GEN-BEGIN:|285-getter|2|
return nomeMateriaCNF;
}
COM: <s> returns an initiliazed instance of nome materia cnf component </s>
|
funcom_train/5395865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testReadLong() throws Exception {
System.out.println("readLong");
BlockDataInputStream instance = null;
long expResult = 0L;
long result = instance.readLong();
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 read long method of class org </s>
|
funcom_train/25708289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void enableInputPanels() {
for(int x=0; x < getJTabbedPane().getTabCount(); x++ ) {
final JPanel c = (JPanel)getJTabbedPane().getComponentAt(x);
enableInputPanels(c);
}
previouslyEnabledComponents.clear();
}
COM: <s> re enables the disabled input panels </s>
|
funcom_train/23998724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getLatitudeAsString() {
DecimalFormat df1 = new DecimalFormat("00");
DecimalFormat df2 = new DecimalFormat("00.000");
String prefix = "N";
if (getLatitude() < 0)
prefix = "S";
int degree = (int) Math.abs(getLatitude());
double minutes = (double) Math
.round((Math.abs(getLatitude()) - degree) * 60 * 1000) / 1000;
return prefix + " " + df1.format(degree) + "\u00B0 "
+ df2.format(minutes) + "\u0027";
}
COM: <s> gets the latitude </s>
|
funcom_train/22232331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
int i;
String description = new String("BoundingPolytope:\n Num Planes ="+planes.length);
for(i = 0; i < planes.length; i++){
description = description+"\n"+mag[i]*planes[i].x+" "+
mag[i]*planes[i].y+" "+mag[i]*planes[i].z+" "+mag[i]*planes[i].w;
}
return description;
}
COM: <s> returns a string representation of this class </s>
|
funcom_train/13274697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setQuality(int quality) {
if (this.quality != quality) {
int oldQuality = this.quality;
this.quality = Math.min(quality, getQualityLevelCount() - 1);
this.propertyChangeSupport.firePropertyChange(Property.QUALITY.name(), oldQuality, quality);
this.home.getEnvironment().setVideoQuality(this.quality);
}
}
COM: <s> sets the rendering quality of the video </s>
|
funcom_train/36840821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getStringFromStream(Process p) throws IOException {
InputStream out=p.getInputStream();
InputStream err= p.getErrorStream() ;
StringBuffer buffer = new StringBuffer();
byte[] b = new byte[100];
int finishedOut = 0;
while (finishedOut != -1 ) {
finishedOut = out.read(b);
if (finishedOut != -1) {
String current = new String(b, 0, finishedOut);
buffer.append(current);
}
}
return buffer.toString();
}
COM: <s> creates a string buffer from the given input stream </s>
|
funcom_train/41777588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void queryNewDeviceForInfo(Device device) {
// TODO: do this in a separate thread.
try {
// first get the list of properties.
device.executeShellCommand(GetPropReceiver.GETPROP_COMMAND, new GetPropReceiver(device));
} catch (IOException e) {
// if we can't get the build info, it doesn't matter too much
}
}
COM: <s> queries a device for its build info </s>
|
funcom_train/50141238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void sendEvent(String message, int user, int type) {
Iterator iter = listeners.iterator();
while (iter.hasNext()) {
IContextManagerListener item = (IContextManagerListener) iter.next();
item.handleContextManagerEvent(new ContextManagerEvent(message, type));
}
}
COM: <s> inform all current context listeners about the event </s>
|
funcom_train/10858590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testParameters() throws Exception {
Similarity sim = getSimilarity("text_params");
assertEquals(LMDirichletSimilarity.class, sim.getClass());
LMDirichletSimilarity lm = (LMDirichletSimilarity) sim;
assertEquals(1000f, lm.getMu(), 0.01f);
}
COM: <s> dirichlet with parameters </s>
|
funcom_train/9231317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addHeaders(HttpMethod connection, Map headers, String prefix) {
if (headers != null) {
for (Iterator i = headers.keySet().iterator(); i.hasNext();) {
String key = (String) i.next();
for (Iterator j = ((List) headers.get(key)).iterator(); j.hasNext();) {
String value = (String) j.next();
connection.addRequestHeader(prefix + key, value);
}
}
}
}
COM: <s> add the given headers to the http urlconnection with a prefix before the </s>
|
funcom_train/27811087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isExcluded(File file) {
// Exclude all hidden files starting with a "." or "@eaDir" (thumbnail dir created on Synology devices).
String name = file.getName();
return name.startsWith(".") || name.startsWith("@eaDir") || name.equals("Thumbs.db");
}
COM: <s> returns whether the given file is excluded </s>
|
funcom_train/11104010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected StringBuffer loadTemplate(PageData page) throws IOException {
StringBuffer buff = new StringBuffer();
InputStream inputStream = page.getInputStream();
int c = 0;
done: while (true) {
c = inputStream.read();
if (c > -1) {
buff.append((char) c);
} else {
break done;
}
}
return buff;
}
COM: <s> p loads the code page code content into a code string buffer code </s>
|
funcom_train/17788640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRestartArbitrary(int[] restartIndexes) {
if (restartIndexes == null) throw new NullPointerException();
for (int i = 0; i < restartIndexes.length; i++) {
if (restartIndexes[i] < 0) throw new IllegalArgumentException("Restar indexes must be greater than 0");
}
type = RESTART_ARBITRARY;
this.restartIndexes = restartIndexes;
}
COM: <s> sets the dpcm type to the restart fixed mode </s>
|
funcom_train/37751523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double get_abs_edge_width(AbsEdge edge) {
switch (edge) {
case TOP:
return get_top_edge_width();
case BOTTOM:
return get_bottom_edge_width();
case LEFT:
return get_left_edge_width();
case RIGHT:
return get_right_edge_width();
default:
throw new RuntimeException("Invalid AbsEdge" + edge);
}
}
COM: <s> gets the width of the given absolute edge </s>
|
funcom_train/3421809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addField(Field field) {
if (fFields == null)
fFields = new Field[4];
else if (fFieldCount == fFields.length)
fFields = resize(fFields, fFieldCount*2);
fFields[fFieldCount++] = field;
} // addField(Field)
COM: <s> adds a field </s>
|
funcom_train/12329693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateStatus(String message, Control control) {
if (control == null) {
throw new NullArgumentException("control");
}
status.put(control, message);
for (String msg : status.values()) {
if (msg != null) {
setErrorMessage(msg);
setPageComplete(false);
return;
}
}
setErrorMessage(null);
setPageComplete(true);
}
COM: <s> sets the current status of the wizard </s>
|
funcom_train/1864760 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean checkMinimumVersion(final String desired, final int actual) {
int idesired;
try {
idesired = Integer.parseInt(desired);
} catch (NumberFormatException ex) {
requirementsError = "'minversion' is a non-integer";
return false;
}
if (actual > 0 && idesired > 0 && actual < idesired) {
requirementsError = "Plugin is for a newer version of DMDirc";
return false;
} else {
return true;
}
}
COM: <s> checks to see if the minimum version requirement of the plugin is </s>
|
funcom_train/2289891 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasRoleForResource(CmsRequestContext context, CmsUser user, CmsRole role, CmsResource resource) {
CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
boolean result;
try {
result = hasRoleForResource(dbc, user, role, resource);
} finally {
dbc.clear();
}
return result;
}
COM: <s> checks if the given user has the given role for the given resource </s>
|
funcom_train/39912255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetEh9() {
System.out.println("setEh9");
TextField tf = null;
Page1 instance = new Page1();
instance.setEh9(tf);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set eh9 method of class timesheetmanagement </s>
|
funcom_train/50748199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void deployFile(String filePath, String fileContent) throws DeploymentException {
try {
File file = new File(filePath);
file.createNewFile();
// Writing file to disk
FileWriter writer = new FileWriter(file);
writer.write(fileContent);
writer.close();
} catch (IOException e) {
e.printStackTrace();
throw new DeploymentException(e);
}
}
COM: <s> creates a file at the provided location and writes its content </s>
|
funcom_train/1917738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean readBoolean(RandomAccessFile raf) throws IOException {
int size = Utils.readUINT16(raf);
if (size != 4)
throw new IllegalStateException(
"Boolean value do require 4 Bytes. (Size value is: " + size
+ ")");
long value = Utils.readUINT32(raf);
boolean result = value == 1;
return result;
}
COM: <s> this method reads a boolean value out of the tag chunk </s>
|
funcom_train/25706975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Vector getVectorFromHashtable(final Hashtable<String,Vector> t, final Board key) {
Vector retval = null;
synchronized( t ) {
retval = t.get(key.getName());
if( retval == null ) {
retval = new Vector();
t.put(key.getName(), retval);
}
}
return retval;
}
COM: <s> gets an vector from a hashtable with given key </s>
|
funcom_train/6488866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void rowRemoved(int index) {
LogTools.trace(logger, 25, "MatrixController.rowRemoved("+index+")");
_mainAdapter.fireTableRowsDeleted(index, index);
_rowAdapter.fireTableRowsDeleted(index, index);
if (index == _selectedRow) {
_selectedRow = -1;
_selectedColumn = -1;
resetSelection();
}
if (_selectedRow > index) {
_selectedRow--;
resetSelection();
}
}
COM: <s> handles the deletion of a row </s>
|
funcom_train/49463363 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AssetDetail getAsset(Db db) throws Exception {
if (db == null) throw new IllegalArgumentException("Must provide db for asset lookup");
if (assetId == null) throw new IllegalStateException("Host meta-data does not have asset id");
AssetDetail asset = DbAssets.getAssetDetail(db, assetId);
if (asset == null) throw new IllegalStateException("Must meta-data does not relate to a valid valid asset");
return asset;
}
COM: <s> return a completed asset object </s>
|
funcom_train/48912943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createRepository(File dataDir, String configData) {
sesameManager = new SesameManager();
sesameManager.createUnmanagedRepository(dataDir, configData);
repositoryConnection = sesameManager.getRepositoryConnection();
try {
repositoryConnection.setAutoCommit(true);
} catch (RepositoryException ex) {
sesameManager.disconnect();
throw new GateOntologyException("Could not set autocommit");
}
init();
}
COM: <s> create an unmanaged repository in the given data directory from the </s>
|
funcom_train/11344941 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onDependencyReconfiguration(ServiceReference[] departs, ServiceReference[] arrivals) {
for (int i = 0; departs != null && i < departs.length; i++) {
callUnbindMethod(departs[i]);
}
for (int i = 0; arrivals != null && i < arrivals.length; i++) {
callBindMethod(arrivals[i]);
}
}
COM: <s> the dependency has been reconfigured </s>
|
funcom_train/36827422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean sQLDeleteFlight(String flightNum) {
boolean result = false;
System.out.println("in delete Flight");
try {
Statement s = conn.createStatement();
s.executeUpdate("DELETE FROM flight" +
" WHERE flightNum = '" + flightNum + "'");
result =
true;
} catch (Exception e) {
result = false;
System.err.println("Failed to delete Flight: " + flightNum);
}
return result;
}
COM: <s> public void s qldelete flight string flight num </s>
|
funcom_train/9685001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Permutation deleteElement(int index) {
int size = size();
int[] newPerm = new int[size - 1];
for (int i = 0, j = 0; i < perm.length; i++) {
if (i == index) {
continue;
}
newPerm[j++] = perm[i];
}
return new Permutation(newPerm);
}
COM: <s> create new permutation wherer mapping for element with index is deleted </s>
|
funcom_train/28672783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addKey1PropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_EntryType_key1_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_EntryType_key1_feature", "_UI_EntryType_type"),
BeansPackage.Literals.ENTRY_TYPE__KEY1,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the key1 feature </s>
|
funcom_train/38384591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void tearDown() throws Exception {
fEditor.close(); fEditor = null;
fSharedEditor.close(); fSharedEditor = null;
fEmptyTestEditor.close(); fEmptyTestEditor = null;
// delete backup
File file = new File(TMP_FILE_NORMAL);
assertTrue("Cannot delete " + file.getAbsolutePath(), file.delete());
super.tearDown();
}
COM: <s> do some clean up </s>
|
funcom_train/49460098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void test04_reset_file() throws Exception {
Logs.logMethodName();
try {
// delete local copy
java.io.File f = new java.io.File(".build/testdata/forprobe");
if (f.exists()) f.delete();
} catch (Exception e) { // do nothing
}
// Just let some time pass
TimeUnit.SECONDS.sleep(2);
assertTrue(com.entelience.util.FileHelper.copyTo("data/full-can.csv", ".build/testdata/forprobe")); // a different file
}
COM: <s> now we change the file </s>
|
funcom_train/25315225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean savePlayerStatistics(Player player,int gameID){
if(player==null || player.getStats()==null || gameID<0){
return false;
}
String code=
"INSERT INTO "+getStatsTable()+" (\n"+
getStatsColumns()+
")"+
"VALUES ("+
"'"+player.getName()+"', "+gameID;
for(StatDataType dataType:StatDataType.values()){
code+=", "+player.getStats().get(dataType);
}
code+=");";
return -1!=execute(code);
}
COM: <s> this function saves the statistics of the given player to the tables </s>
|
funcom_train/2504991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RouteRequest getRequest(String destination) {
RouteRequest request = null;
for (int index = 0; index < routeRequests.size(); index++) {
if (((RouteRequest) routeRequests.get(index)).getDestination().equalsIgnoreCase(destination)
&& ((RouteRequest) routeRequests.get(index)).isInternal())
request = (RouteRequest) routeRequests.get(index);
}
return request;
}
COM: <s> obtains the first </s>
|
funcom_train/20789994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point2D canvasToShape(Point2D p) {
Point2D ptDst = new Point2D.Double();
try {
absTransform.inverseTransform(p, ptDst);
} catch (NoninvertibleTransformException e) {
return p; // oh well, what can we do?
}
ptDst.setLocation(ptDst.getX() - shape.getBounds2D().getMinX(), ptDst.getY() - shape.getBounds2D().getMinY());
return ptDst;
}
COM: <s> converts a point relative to the canvas into a point relative to the </s>
|
funcom_train/31901087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMenuVisibility(boolean state) {
if (menu == null || isVisible() == false) return;
if (state) {
int x = 0;
int y = 0;
if(pos == RIGHT) {
x = getWidth();
} else if(pos == BOTTOM) {
y = getHeight();
}
synchronized(menu) { menu.show(this, x, y); }
}
else {
synchronized(menu) { menu.setVisible(state); }
}
}
COM: <s> sets the visibility of the menu </s>
|
funcom_train/37201070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LAMatrix transpose() {
LAMatrix a = new LAMatrix(getColumnDimension(), getRowDimension());
for (int i=0; i<getColumnDimension(); i++) {
for (int j=0; j < getRowDimension(); j++) {
a.vals[i][j] = vals[j][i];
}
}
return a;
}
COM: <s> computes the transpose of this matrix </s>
|
funcom_train/3076928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getAllProjects() {
List facades = new ArrayList();
Iterator it = Luntbuild.getDao().loadProjects().iterator();
while (it.hasNext()) {
Project project = (Project) it.next();
facades.add(project.getFacade());
}
return facades;
}
COM: <s> return all projects configured in the system </s>
|
funcom_train/22032322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isThisType(byte[] block) {
return block[0] == 0 && block[1] == 0 &&
block[2] == -1 && block[3] == -1 &&
block[4] == 105 && block[5] == 109 &&
block[6] == 112 && block[7] == 114;
}
COM: <s> checks if the given block is a valid header for a openlab file </s>
|
funcom_train/45186716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void appendTapeArchive() {
JFileChooser dialog = new JFileChooser();
// set last direcory
dialog.setCurrentDirectory(new File(lastDir));
int result = dialog.showOpenDialog(jTable);
if (result == JFileChooser.APPROVE_OPTION) {
File filename = dialog.getSelectedFile();
appendTapeArchive(filename);
}
}
COM: <s> shows choose file dialog and appends selected archive to current archive </s>
|
funcom_train/47720997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public T setGroupFooterSplitType(GroupBuilder<?> group, SplitType splitType) {
Validate.notNull(group, "group must not be null");
int index = getObject().getGroups().indexOf(group.getGroup());
Validate.isTrue(index >= 0, "group must be registered");
DRGroup drGroup = getObject().getGroups().get(index);
drGroup.getFooterBand().setSplitType(splitType);
return (T) this;
}
COM: <s> sets the group footer band split type </s>
|
funcom_train/39098774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void register ( String name ) {
if ( name == null ) {
throw new RuntimeException( "Invalid object name" );
}
if ( object_properties.get( name ) == null ) {
object_properties.put( name, new ObjectOption( name, 0 ) );
_make_ordered_list();
}
}
COM: <s> default not mandatory disabled </s>
|
funcom_train/45038672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Report evaluate(String fileName) throws Exception {
File oclFile = new File(EXAMPLE_DIR + fileName);
Report report =
new Evaluator(new ExampleModel()).evaluate(this.parse(oclFile));
System.out.println("File: " + oclFile.getAbsolutePath() + "\n");
System.out.println(report.toString());
return report;
}
COM: <s> evaluates an ocl constraint file </s>
|
funcom_train/18575746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void registerModule(String startCommand) {
// check to see if start command was not provided
if (startCommand.equals(""))
startCommand = "no_start_command.exe";
// register the module
try {
toSbw.registerModule(MODULE_NAME, MODULE_DISPLAY_NAME, MODULE_MGMT_MODE, startCommand, MODULE_HELP);
} catch (SBWException e) {
Logger.log(Logger.FATAL, e);
System.exit(-1);
}
}
COM: <s> register the module </s>
|
funcom_train/37009774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processContext(HttpServletRequest request, Xweb xData) {
XwebContext context = objectFactory.createXwebContext();
xData.setXContext(context);
context.setServerName(request.getServerName());
context.setServerPort(request.getServerPort());
context.setUserAgent(request.getHeader("user-agent"));
context.setUserLocale(request.getLocale().toString());
context.setWebContext(request.getContextPath());
context.setPath(request.getServletPath());
}
COM: <s> process the xcontext data </s>
|
funcom_train/28211978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getJTFlanPacketLost() {
if (jTFlanPacketLost == null) {
jTFlanPacketLost = new JTextField();
jTFlanPacketLost.setPreferredSize(new Dimension(221, 19));
jTFlanPacketLost.setBounds(new Rectangle(183, 40, 221, 15));
}
return jTFlanPacketLost;
}
COM: <s> this method initializes j tflan packet lost </s>
|
funcom_train/28367762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object value(final BasicEntity a) {
final Boolean condition = (Boolean) getLeft().value(a);
if (condition) {
return getRight().value(a);
}
else {
if (getRight() instanceof BinaryOpThenExpr) {
return ((BinaryOpThenExpr) getRight()).value(a, false);
}
else {
return null;
}
}
}
COM: <s> value created 6 sept </s>
|
funcom_train/45860531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected CmsResource mockResource(final String path) throws CmsException {
final CmsResource res = jmock.mock(CmsResource.class, "CmsResource("+path+")");
jmock.checking(new Expectations() {{
allowing(res).getRootPath();
will(returnValue(path));
}});
jmock.checking(new Expectations() {{
allowing(cmsRequest).getSitePath(res);
will(returnValue(path));
}});
jmock.checking(new Expectations() {{
allowing(cms).readResource(path);
will(returnValue(res));
}});
return res;
}
COM: <s> this mocks a cms resource and allows the following method calls </s>
|
funcom_train/38851688 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSelfLoops( int node_id ){
assert( node_id >= 0 && node_id < number_of_nodes );
Pair<Integer, Integer> neighbors = getNeighborsList(node_id);
int numberofneighbors = getNumberOfNeighbors(node_id);
for( int i = 0; i < numberofneighbors; i++ ){
if( links.get(neighbors.getFirst()+i) == node_id ){
if( weights != null ){
return weights.get(neighbors.getSecond()+i);
}else{
return 1;
}
}
}
return 0;
}
COM: <s> returns the selfloops of the node </s>
|
funcom_train/44466716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComponent createParameterComponent(final ParameterDescriptor pd){
FieldView v = getViewer().getViewFactory().createFieldView(getViewer(),
makePropertyDescriptor(pd));
v.setEditable(true);
v.setViewedObject(null);
v.addViewListener(this);
subviewList.add(v);
return v.getComponent();
}
COM: <s> creates a component to show the property represented by the property descriptor </s>
|
funcom_train/48406454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addUseKindPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Activity_useKind_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Activity_useKind_feature", "_UI_Activity_type"),
SpemxtcompletePackage.eINSTANCE.getActivity_UseKind(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the use kind feature </s>
|
funcom_train/11682618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map getDefinedEntries() {
Map definedEntries = new HashMap();
Iterator itr = localRegistry.values().iterator();
while (itr.hasNext()) {
Object o = itr.next();
if (o instanceof Entry
&& ((Entry) o).getType() != Entry.REMOTE_ENTRY) {
definedEntries.put(((Entry) o).getKey(), o);
}
}
return definedEntries;
}
COM: <s> returns the map of defined entries in the configuration excluding the </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.