__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/823608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void copyTables() {
if (prefixTable != null) {
prefixTable = (Hashtable) prefixTable.clone();
} else {
prefixTable = new Hashtable();
}
if (uriTable != null) {
uriTable = (Hashtable) uriTable.clone();
} else {
uriTable = new Hashtable();
}
elementNameTable = new Hashtable();
attributeNameTable = new Hashtable();
declSeen = true;
}
COM: <s> copy on write for the internal tables in this context </s>
|
funcom_train/39935049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setThreshold(String id, int threshold) throws IOException, NotInitialisedException {
if (initialized) {
connection.send(RobotConstants.Communication.FirstToken.SET + ","
+ RobotConstants.Communication.SecondToken.THRESHOLD + "," + id + ","
+ String.valueOf(threshold));
} else {
throw new NotInitialisedException();
}
}
COM: <s> requests a set of a sensor threshold </s>
|
funcom_train/51339687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void push(final Node item) {
assert item != null;
if (n == a.length) {
// extend the size of the backing array.
final Node[] t = new Node[a.length * 2];
// copy the data into the new array.
System.arraycopy(a, 0, t, 0, n);
// replace the backing array.
a = t;
}
a[n++] = item;
}
COM: <s> push an element onto the stack </s>
|
funcom_train/3985385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PVector normalize(PVector target) {
if (target == null) {
target = new PVector();
}
float m = mag();
if (m > 0) {
target.set(x/m, y/m, z/m);
} else {
target.set(x, y, z);
}
return target;
}
COM: <s> normalize this vector storing the result in another vector </s>
|
funcom_train/31289641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sendDtmf(final String dtmf) {
final CharacterInput input;
try {
input = session.getCharacterInput();
} catch (NoresourceError nre) {
logMessage(nre.getMessage());
return;
} catch (ConnectionDisconnectHangupEvent e) {
logMessage(e.getMessage());
return;
}
final char dtmfChar = dtmf.charAt(0);
input.addCharacter(dtmfChar);
}
COM: <s> sends the dtmf to the browser </s>
|
funcom_train/5183276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setDomainFileName(IWizardPage nextPage) {
UMLCreationWizardPage nextWizardPage = (UMLCreationWizardPage) nextPage;
String fileName = getFileName();
String extension = getExtension();
if (fileName.endsWith(extension)) {
fileName = fileName.substring(0, fileName.length() - extension.length());
}
fileName += nextWizardPage.getExtension();
nextWizardPage.setFileName(fileName);
}
COM: <s> 174315 automatically set diagram file extension </s>
|
funcom_train/18193984 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DataTable loadTable(InputStream inputStream) throws XmlParserException, XmlSerializeException {
XmlParser parser = new XmlParser();
XmlDocument document = parser.load(inputStream);
/*
DataTableDefinition definition = new DataTableDefinition();
definition.fromXml(document.getRoot());
*/
DataTableDefinition definition = XmlAutoSerializer.fromXml(DataTableDefinition.class, document.getRoot());
DataTable dataTable = new DataTable(definition);
addTable(dataTable);
return dataTable;
}
COM: <s> load a data table basing itself on an input stream </s>
|
funcom_train/28975408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean evict(Entry entry, EvictableCache cache) {
if(cache instanceof PersistableCache){
PersistableCache pers = (PersistableCache) cache;
if(pers.isPersistant(entry) == true){
List<Entry> notPersistant = pers.getNotPersistantEntries();
for(Entry e : notPersistant){
if(evictionNeeded(cache)){
cache.evict(e);
}
}
entry.setNeedsEviction(false);
return true;
}
}
if(evictionNeeded(cache)){
entry.setNeedsEviction(true);
return true;
}
return false;
}
COM: <s> makes sure that the entry gets evicted </s>
|
funcom_train/37797093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getSeverityThreshold() {
String threshold = SymbolTable.getValue(
"${ant." + SEVERITY_PROPERTY + "}");
if (threshold == null) {
threshold = SymbolTable.getValue("${" + SEVERITY_PROPERTY + "}");
}
if (threshold == null) {
threshold = System.getProperty(SEVERITY_PROPERTY);
}
return threshold;
}
COM: <s> returns the specified severity threshhold for sqlunit by looking it </s>
|
funcom_train/33726005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StereoSample playUnique(int sample) {
if (sample < 0 || sample > samples.length-1)
return null;
if (samples[sample] == null) return null;
if (!isPlaying(sample)) {
// clone sample's playing parameters to allow multiple playings of the same sample
StereoSample pl = new StereoSample(samples[sample]);
play(pl);
return pl;
}
return null;
}
COM: <s> plays the sample immediately if it is not already playing </s>
|
funcom_train/49351872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeFromPersistenceCache(IPersistenceObject persistenceObject, BasicDTO dto) throws BasicException {
try{
persistenceObject.removeFromCache(dto);
}catch(BasicException e){
throw e;
}catch(Exception e){
throw BasicException.basicErrorHandling("Error inserting object", "errorBORemovingObjectFromPersistenceCache", e, log);
}
}
COM: <s> remove the object from persistence cache to optmize performance </s>
|
funcom_train/32150452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected AdapterFactory getAdapterFactory (EPackage pack) {
AdapterFactory cached = cachedAdapterFactories.get(pack);
if (cached == null) {
List<Object> key = new ArrayList<Object>();
key.add(pack); key.add(org.eclipse.emf.edit.provider.IItemPropertySource.class);
Descriptor d = EMFEditPlugin.getComposedAdapterFactoryDescriptorRegistry().getDescriptor(key);
cached = d.createAdapterFactory();
cachedAdapterFactories.put(pack, cached);
}
return cached;
}
COM: <s> get a adapter factory for the specified package </s>
|
funcom_train/37451045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private CvDatabase getNewt() throws IntactException {
CvDatabase newt = DaoFactory.getCvObjectDao(CvDatabase.class).getByXref(CvDatabase.NEWT_MI_REF);
if ( newt == null ) {
throw new IllegalStateException( "Could not find newt in the Database. Please update your controlled vocabularies." );
}
return newt;
}
COM: <s> returns cv database newt </s>
|
funcom_train/31436122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URL setHomeURL(String homeURL) {
URL furby = null;
furby = MiniBrowser.class.getResource("/" + homeURL);
if (furby == null)
{
try
{
furby = new URL("http://jhome.sourceforge.net");
}
catch (MalformedURLException err)
{
err.printStackTrace();
}
}
return furby;
}
COM: <s> sets the home button url location file from the application </s>
|
funcom_train/35111468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean saveModifiedExperiment( String experimentDescription ) {
// send a message to the server to say you are about to send the new experiment file
sendMessage("SAVE_EDIT_CHANGES");
// send the new experiment file
sendMessage(experimentDescription);
// get confirmation back from the server that it has been saved
String confirmation = getMessage();
if(confirmation.equals("SAVED_OK"))
return true;
else
return false;
}
COM: <s> this method wrap the save edit changes command </s>
|
funcom_train/12900949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public Object setInitializationData(Object o, String className, Object initData) throws CoreException {
if (o instanceof IExecutableExtension) {
int colonNdx = className.indexOf(':');
((IExecutableExtension) o).setInitializationData(
null,
null,
initData == null ? (colonNdx == -1 ? null : className.substring(colonNdx + 1)) : initData);
}
return o;
}
COM: <s> set initialization data on the object if it is iexecutable extension </s>
|
funcom_train/45450878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Product createTestProduct() {
String productName = "myProduct";
String productUrlName = "myproduct";
boolean licenseRequired = false;
String productEntryPath = "/myProduct";
Product testProduct = new Product(productName, productUrlName, licenseRequired, productEntryPath);
assertNotNull("Unable to create product", testProduct);
return testProduct;
}
COM: <s> create a test product </s>
|
funcom_train/20896123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetPasswd() {
System.out.println("getPasswd");
User instance = new User();
String expResult = "";
String result = instance.getPasswd();
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 passwd method of class it </s>
|
funcom_train/13211285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JPanel createHighScorePanel(final GameStatistics statistics, final int highScores) {
// create a panel with one row for every highscore
JPanel pnHighScore = new JPanel(new GridLayout(highScores, 1));
placeHighScoreRows(pnHighScore, statistics, highScores);
return pnHighScore;
}
COM: <s> creates the panel that lists the players who have reached a high score </s>
|
funcom_train/35443423 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stateChanged(ChangeEvent e) {
updateUI();
// inform own change listeners
ChangeEvent newE = new ChangeEvent(this);
ChangeListener[] listeners = this.getChangeListeners();
for (int i = 0; i < listeners.length; i++) {
listeners[i].stateChanged(newE);
}
}
COM: <s> implementation of interface change listener </s>
|
funcom_train/14306446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPath() {
StringBuffer sb = new StringBuffer();
for(int i = 0; i < elements.size(); i++) {
sb.append((String)elements.elementAt(i));
if(i < (elements.size() - 1))
sb.append(File.pathSeparator);
}
return sb.toString();
}
COM: <s> returns the path built using this path builder as a single string </s>
|
funcom_train/29618325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected MgisTextField getJOriginCountryField() {
if (jOriginCountryField == null) {
jOriginCountryField = new MgisTextField();
jOriginCountryField.setEditable(false);
jOriginCountryField.setBounds(146, 223, 170, 19);
jOriginCountryField.setValue(m_pdf.getAccession().guessOriginCountry());
}
return jOriginCountryField;
}
COM: <s> this method initializes j origin country field </s>
|
funcom_train/5439242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vec2D rotInternal(double angle) {
double cos = Math.cos(-angle);
double sin = Math.sin(-angle);
double xh = this.x * cos - this.y * sin;
this.y = this.x * sin + this.y * cos;
this.x = xh;
return this;
}
COM: <s> rotates for angle </s>
|
funcom_train/8774228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTopic(String newValue) throws SkypeException {
try {
String command = "ALTER CHAT " + getId() + " SETTOPIC " + newValue;
String responseHeader = "ALTER CHAT SETTOPIC";
String response = Connector.getInstance().execute(command, responseHeader);
Utils.checkError(response);
} catch (ConnectorException e) {
Utils.convertToSkypeException(e);
}
}
COM: <s> set the topic of this chat </s>
|
funcom_train/86301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addWaiters(Dictionary waiters) {
if ((waiting == null) || waiting.isEmpty())
return;
Object previous = this;
for (ListIterator li = waiting.listIterator(); li.hasNext(); ) {
ActiveLock waitingLock = ((ActiveLock) li.next());
Object waiter = waitingLock.getCompatabilitySpace();
waiters.put(waiter, waitingLock);
waiters.put(waitingLock, previous);
previous = waitingLock;
}
}
COM: <s> add the waiters of this lock into this dictionary object </s>
|
funcom_train/6457415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getAuthorClass(int autorizationLevel) {
String authorClass= "AUTHORNAME";
if (autorizationLevel >= AutorizationConstants.ADMIN) {
authorClass= "ADMINAUTHOR";
} else if (autorizationLevel >= AutorizationConstants.VIPMEMBER) {
authorClass= "VIPMEMBER";
} else if (autorizationLevel >= AutorizationConstants.EXECUTIVEMEMBER) {
authorClass= "EXECUTIVEMEMBERAUTHOR";
} else if (autorizationLevel >= AutorizationConstants.MEMBER) {
authorClass= "MEMBERAUTHOR";
} else if (autorizationLevel >= AutorizationConstants.IDENTIFIEDGUEST) {
authorClass= "GUESTAUTHOR";
}
return (authorClass);
}
COM: <s> gets the author class attribute of the forum locale object </s>
|
funcom_train/22368009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initPlugins() {
try {
factory = new PluginsFactory();
PluginSystemLogger.addHandler(new PluginsLoggerHandler());
PluginSystemLogger.setLevel(Level.ALL);
// User plugins folder
factory.setPluginsRepository(getUserPluginsFolder());
// Temporal plugins folder
factory.setTemporalPluginRepository(getTemporalPluginsFolder());
} catch (PluginSystemException e) {
Logger.error(e);
} catch (IOException e) {
Logger.error(e);
}
}
COM: <s> initializes all plugins found in plugins dir </s>
|
funcom_train/19230450 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateEffectiveDate(java.util.Calendar effectiveDate) throws osid.authorization.AuthorizationException {
if (this.explicit == false)
throw new osid.authorization.AuthorizationException (osid.authorization.AuthorizationException.PERMISSION_DENIED);
this.effectiveDate = effectiveDate;
this.modifiedDate = Calendar.getInstance();
this.modifiedDate.setTimeInMillis (System.currentTimeMillis());
}
COM: <s> change the effective date to the new value </s>
|
funcom_train/6204725 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createPropertyNameComponents(Composite parent) {
Label labelName = new Label(parent, SWT.NULL);
labelName.setText(LABEL_PROP_NAME);
textPropertyName = new Text(parent, SWT.SINGLE | SWT.BORDER);
GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
gridData.widthHint = TEXT_WIDGET_WIDTH_HINT;
textPropertyName.setLayoutData(gridData);
String pname = (getInitialProperty() != null) ? getInitialProperty().getName() : "";
textPropertyName.setText(pname);
textPropertyName.addModifyListener(this);
createComponents(parent);
}
COM: <s> create the components that allow the user to enter a unique property name </s>
|
funcom_train/1212727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Value execute(CajuScript caju, Context context, Syntax syntax) throws CajuScriptException {
caju.setRunningLine(getLineDetail());
for (Element element : elements) {
Value v = element.execute(caju, context, syntax);
if (v != null && canElementReturn(element)) {
return v;
}
}
return null;
}
COM: <s> executed this element and all childs elements </s>
|
funcom_train/8081808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getCalculatedNumToSelect() {
if (m_numToSelect >= 0) {
m_calculatedNumToSelect = m_numToSelect;
}
if (m_selectedFeatures.length>0
&& m_selectedFeatures.length<m_calculatedNumToSelect)
{
m_calculatedNumToSelect = m_selectedFeatures.length;
}
return m_calculatedNumToSelect;
}
COM: <s> gets the calculated number to select </s>
|
funcom_train/35612631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(DocumentServiceEntry value) {
this.value = value;
if (value == null) {
link.setText("No File Selected");
link.setStylePrimaryName("lab-FileBox-Empty");
} else {
link.setText(value.getTitle());
link.setStylePrimaryName("lab-FileBox");
}
}
COM: <s> sets the selected value </s>
|
funcom_train/37657458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void disableLogging() {
final LogManager manager = LogManager.getLogManager();
final Enumeration loggers = manager.getLoggerNames();
while (loggers.hasMoreElements()) {
final String logName = (String) loggers.nextElement();
Logger log = manager.getLogger(logName);
log.setLevel(Level.OFF);
}
}
COM: <s> disables logging so that confusion does not happen </s>
|
funcom_train/30197034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testResponsabile() throws Exception {
System.out.println("responsabile");
/*
ActionMapping mapping = null;
ActionForm form = null;
HttpServletRequest request = null;
HttpServletResponse response = null;
EntraAction instance = new EntraAction();
ActionForward expResult = null;
ActionForward result = instance.responsabile(mapping, form, request, response);
assertEquals(expResult, result);
*/
}
COM: <s> test of responsabile method of class com </s>
|
funcom_train/1710443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeText(String text,String target,int id,int currentPage) throws Exception{
OutputStreamWriter output_stream =
new OutputStreamWriter(
new FileOutputStream(target+commonValues.getSeparator()+"page_"+currentPage+"_id"+id + ".txt"));
output_stream.write(text); //write actual data
output_stream.close();
}
COM: <s> save text into file on drive </s>
|
funcom_train/12276164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
// #ifdef DEBUG
if(log.isDebugEnabled())
log.debug("Closing multiplexed connection streams");
// #endif
running = false;
try {
in.close();
}
catch(IOException ioe) {
}
try {
out.close();
}
catch(IOException ioe) {
}
}
COM: <s> close the streams </s>
|
funcom_train/32129032 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isIdPResponse(HttpResponse response) {
boolean ret = false;
if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK)
if (response.containsHeader("Set-Cookie"))
if (response.getHeaders("Set-Cookie")[0].getValue().indexOf(
"JSESSIONID") >= 0)
ret = true;
return ret;
}
COM: <s> analyses if the response is from an id p instance </s>
|
funcom_train/50219972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addToolAbsolute(JInternalFrame tool, int x,int y, int w,int h) {
//System.out.println("addToolAbsolute(JInternalFrame tool, int x,int y, int w,int h)");
desktop.addToolAbsolute(tool, x, y, w, h);
}
COM: <s> adds an internal frame with a tool with given size and position </s>
|
funcom_train/32219345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doRedivideFixup()
{ HamiltPartialPathPiece subPiece;
for( int p = 0; p < numSubPieces; p++ )
{ subPiece = (HamiltPartialPathPiece) subPiecesArray[ p ];
if( subPiece.stoppedForRedivide )
{ subPiece.stoppedForRedivide = false;
subPiece.indexOfLastNodeInPath = subPiece.lastIndexInBackTrack;
break;
}
}
}
COM: <s> find the special piece if its still around and restore the </s>
|
funcom_train/3903723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateWeightType_Max(BigDecimal weightType, DiagnosticChain diagnostics, Map context) {
boolean result = weightType.compareTo(WEIGHT_TYPE__MAX__VALUE) <= 0;
if (!result && diagnostics != null)
reportMaxViolation(ImsssPackage.Literals.WEIGHT_TYPE, weightType, WEIGHT_TYPE__MAX__VALUE, true, diagnostics, context);
return result;
}
COM: <s> validates the max constraint of em weight type em </s>
|
funcom_train/2881386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AttributeList setAttributes(ObjectName name, AttributeList attributes) throws RuntimeConnectionException, ReflectionException, InstanceNotFoundException {
if (!isActive) {
throw new RuntimeConnectionException("ClientConnector not connected");
}
try {
return rmiConnectorServer.setAttributes(name, attributes);
} catch (RemoteException re) {
throw new RuntimeConnectionException(re, re.getMessage());
}
}
COM: <s> sets the attributes attribute of the rmi connector client object </s>
|
funcom_train/7929020 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void assertAnalyzesTo(Analyzer a, String input, String[] output) throws Exception {
TokenStream ts = a.tokenStream("dummy", new StringReader(input));
for (int i=0; i<output.length; i++) {
Token t = ts.next();
assertNotNull(t);
assertEquals(t.termText(), output[i]);
}
assertNull(ts.next());
ts.close();
}
COM: <s> a helper method copied from org </s>
|
funcom_train/9978095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleExceptionMappingSelectionChanged() {
Struts2ExceptionMapping ref = getSelectedMapping();
if (ref == null) {
// Reset and return.
exceptionName.setText("");
mappingName.setText("");
exceptionResult.setText("");
mappingParameters.setParameters(new String[0][]);
}
else {
// Edit it...
exceptionName.setText(ref.exceptionName);
mappingName.setText(ref.mappingName);
exceptionResult.setText(ref.resultName);
mappingParameters.setParameters(ref.getParametersArray());
}
}
COM: <s> exception mapping selection change </s>
|
funcom_train/2586469 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setChosenOtherButtonColor(final Color chosenOtherButtonColor) {
if (chosenOtherButtonColor == null) {
throw new NullPointerException("UIColor must not be null.");
}
final Color oldValue = this.chosenOtherButtonColor;
this.chosenOtherButtonColor = chosenOtherButtonColor;
refreshButtons();
firePropertyChange("chosenOtherButtonColor", oldValue,
chosenOtherButtonColor);
}
COM: <s> redefines the color for the buttons representing the other months </s>
|
funcom_train/6202049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isIntactTag(String tag, org.omegat.filters3.Attributes atts) {
if (dialect.getIntactTags() != null && dialect.getIntactTags().contains(tag))
return true;
else {
if (atts == null) {
if (tag.equals(intacttagName))
atts = intacttagAttributes; // Restore attributes
}
return dialect.validateIntactTag(tag, atts);
}
}
COM: <s> returns whether the tag surrounds intact block of text which we shouldnt </s>
|
funcom_train/3410754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Locale getLocale() {
Locale locale = this.locale;
if (locale != null) {
return locale;
}
Container parent = this.parent;
if (parent == null) {
throw new IllegalComponentStateException("This component must have a parent in order to determine its locale");
} else {
return parent.getLocale();
}
}
COM: <s> gets the locale of this component </s>
|
funcom_train/34983120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setJob(String newVal) {
if ((newVal != null && this.job != null && (newVal.compareTo(this.job) == 0)) ||
(newVal == null && this.job == null && job_is_initialized)) {
return;
}
this.job = newVal;
job_is_modified = true;
job_is_initialized = true;
}
COM: <s> setter method for job </s>
|
funcom_train/20109098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getToken(int protoVer) {
String key = "ProtoToken." + protoVer; //$NON-NLS-1$
String token = Messages.getString(key);
if (token.equals("!" + key + "!")) { //$NON-NLS-1$ //$NON-NLS-2$
token = ""; //$NON-NLS-1$
}
return token.trim();
}
COM: <s> returns the protocol token for a given protocol version </s>
|
funcom_train/14174519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
synchronized (this) {
this.isInquiryCompleted = false;
}
this.discoveryAgent.startInquiry(DiscoveryAgent.GIAC, this);
while (this.isInquiryCompleted == false) {
Thread.sleep(1000);
}
} catch (Exception e) {
synchronized (this) {
this.isInquiryCompleted = true;
}
} finally {
this.disposableMediator.stopAll(this);
}
}
COM: <s> launch remote bluetooth devices scanner </s>
|
funcom_train/19212555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setupDatabasePreCondition(File file) throws Exception {
DatabaseConnection connection = new DatabaseConnection(
getDatabaseConnection());
Statement turnOffConstraints = connection.getConnection()
.createStatement();
turnOffConstraints.execute("SET FOREIGN_KEY_CHECKS=0");
DatabaseOperation.DELETE_ALL.execute(connection,
loadXmlDataset(new File(
FUNCTIONALINTEGRATIONTEST_DATABASE_SCENARIODATA
+ "empty-content.xml")));
Statement turnOnConstraints = connection.getConnection()
.createStatement();
turnOnConstraints.execute("SET FOREIGN_KEY_CHECKS=1");
IDataSet dataset = loadXmlDataset(file);
DatabaseOperation.INSERT.execute(connection, dataset);
}
COM: <s> sets the up database pre condition </s>
|
funcom_train/4523676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void contextDestroyed(ServletContextEvent arg0){
Connection conn = null;
try {
Class.forName("org.hsqldb.jdbcDriver");
conn = DriverManager.getConnection("jdbc:hsqldb:hsql://localhost:"+port+"/"+dbName, "sa", "");
Statement stmt = conn.createStatement();
stmt.executeUpdate("SHUTDOWN;");
} catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> listener web shutdown </s>
|
funcom_train/2880076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doLoadDefault() {
mSmartFrogLocationName.setText(SmartFrogPlugin.getDefault()
.getPreferenceStore().getDefaultString(
SMARTFROG_LOCATION_PREFERENCE));
mRmicLocationName.setText(SmartFrogPlugin.getDefault()
.getPreferenceStore()
.getDefaultString(RMIC_LOCATION_PREFERENCE));
}
COM: <s> do load default is a convenience method which retrieves the default </s>
|
funcom_train/7495829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndRule(int month, int dayOfWeekInMonth, int dayOfWeek, int time) {
getSTZInfo().setEnd(month, dayOfWeekInMonth, dayOfWeek, time, -1, false);
setEndRule(month, dayOfWeekInMonth, dayOfWeek, time, WALL_TIME);
}
COM: <s> sets the daylight savings ending rule </s>
|
funcom_train/25792834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddToList() {
ToolTreeNode node = new ToolTreeNode(createToolInstance("toolinstance"));
node.setVisible(false);
FilterSync filterSyncMock = createMock(FilterSync.class);
m_toolListController.setFilterSync(filterSyncMock);
filterSyncMock.removeToolInstance(node.getToolInstance());
replay(filterSyncMock);
m_toolListController.changedNodeFilter(node);
verify(filterSyncMock);
}
COM: <s> tests visible node with tool instance removed from visible list on filter sync </s>
|
funcom_train/8528050 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireEvent(Event e) {
//get the list of event listeners and performs the call ot its methods.
if (mListeners.containsKey(e.getClass())) {
for (EventListener el : mListeners.get(e.getClass())) {
if (el != null) {
this.performCall(e, el);
}
}
}
}
COM: <s> broadcasts a event to its lesteners </s>
|
funcom_train/3076946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List loadProjectsInternal() {
Session session = SessionFactoryUtils.getSession(getSessionFactory(), false);
try {
Query query = session.createQuery("from Project project order by project.name");
return query.list();
} catch (HibernateException ex) {
logger.error("Error in loadProjects: ", ex);
throw SessionFactoryUtils.convertHibernateAccessException(ex);
}
}
COM: <s> for internal use to bypass authorization </s>
|
funcom_train/41023236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void castSpell(SpellAbility sa) {
getStack().add(sa);
while (sa.hasAspect(MagicWarsModel.ASPECT_HAS_ATTACHED_SPELLS)) {
SpellAbility attachedSpell = (SpellAbility) sa.getSpellChain().getParam();
game.getStack().add(attachedSpell);
sa = attachedSpell;
}
sa.getSourceCard().whenPlayCommand();
}
COM: <s> while casting a spell extracts all attached spells and calls when play command </s>
|
funcom_train/25332765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSetCreationDate() {
DAFeature instance = new DAFeatureImpl();
assertNull(instance.getCreationDate());
Date d = Calendar.getInstance().getTime();
instance.setCreationDate(d);
assertEquals(d,instance.getCreationDate());
}
COM: <s> test of get creation date method of class dafeature </s>
|
funcom_train/31479780 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean merge(Rule rule) {
String target = rule.getTarget();
String match = matcher.match(target);
if (match == null)
return false;
String[] dependencies = new String[prerequisites.length];
for (int i = 0; i < prerequisites.length; i++)
dependencies[i] = Matcher.subst(match, prerequisites[i]);
return rule.tryPattern(match, dependencies, commands, lineNumber);
}
COM: <s> merges a pattern into a rule </s>
|
funcom_train/20986868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startEntity(String name) throws SAXException {
// Our parser doesn't report Paramater entities. Need to make
// changes for that.
// Ignore entity refs while parsing DTD
if (expandEntityRefs || inDTD) {
return;
}
EntityReference e = document.createEntityReference(name);
elementStack[topOfStack++].appendChild(e);
elementStack[topOfStack] = (ParentNode)e;
}
COM: <s> report the beginning of an entity in content </s>
|
funcom_train/42111025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateInternalValue(float value) {
internalCount_++;
if (internalCount_ == 1) {
internalMean_ = value;
internalS_ = 0;
} else {
double newMean = internalMean_ + (value - internalMean_)
/ (internalCount_);
double newS = internalS_ + (value - internalMean_)
* (value - newMean);
internalMean_ = newMean;
internalS_ = newS;
}
}
COM: <s> updates the internal value of this rule adjusting the rule mean and sd </s>
|
funcom_train/685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void informAllUnsync(Generator<E> eventgen) {
/*
* We must not directly use (weakhashmap.keySet()), since it still
* is coupled to the weakhashmap itself, which needs synchronization.
* Hence we first must obtain a copy.
*/
for (L listener : getListenersCopy()) {
final E evt = ((eventgen != null) ? eventgen.generate() : null);
caller.call(listener, evt);
}
}
COM: <s> informs all listeners using objects generated by the passed generator </s>
|
funcom_train/44284040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void labelListener(ChangeEvent e) {
ClickLabel l = (ClickLabel) e.getSource();
int oValue = getValue() + l.getUpDown();
mKnob.setValue(((float) oValue - getValueMin()) / (getValueMax() - getValueMin()));
}
COM: <s> invoked when label is clicked </s>
|
funcom_train/1591037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRounding(DateTimeField field, int mode) {
if (field != null && (mode < ROUND_NONE || mode > ROUND_HALF_EVEN)) {
throw new IllegalArgumentException("Illegal rounding mode: " + mode);
}
iRoundingField = (mode == ROUND_NONE ? null : field);
iRoundingMode = (field == null ? ROUND_NONE : mode);
setMillis(getMillis());
}
COM: <s> sets the status of rounding to use the specified field and mode </s>
|
funcom_train/18243102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getEndOffset() throws SeqdataException {
// Begin with our start offset
int ret = this.getStartOffset();
// Add the size of our gapped sequence data (this is just the
// lsequence, the portion of the gapped sequence corresponding
// to the region between the valid range left and right ends):
ret += this.alignmentDataLength;
// And subtract one to get the final zero-based index at which
// we provide coverage:
ret--;
return ret;
}
COM: <s> the b zero based b offset of this sequence within the </s>
|
funcom_train/33402878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int registerTerm (String term) {
if (this.termDictionary.containsKey (term) ) {
return (this.termDictionary.get (term) );
} else {
this.termDictionary.put (term, this.nextTermId++);
return (this.nextTermId - 1);
}
}
COM: <s> returns the numerical term id of the provided term </s>
|
funcom_train/3846229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void configure(int samplingRate, boolean pal) {
// Set up a precalculated pitch constant
int cpuClock = Synthesizer.CBM_AMIGA_NTSC_CLOCK;
if (pal)
cpuClock = Synthesizer.CBM_AMIGA_PAL_CLOCK;
mixerStepPrecalc = ((cpuClock << 8) / samplingRate) << 4;
}
COM: <s> configure the channel to use the specified sampling </s>
|
funcom_train/16886586 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Documentation xml2Documentation(Element documentationElement) {
Documentation documentation = BPELFactory.eINSTANCE
.createDocumentation();
documentation.setElement(documentationElement);
if (documentationElement.hasAttribute("xml:lang")) {
documentation
.setLang(documentationElement.getAttribute("xml:lang"));
}
if (documentationElement.hasAttribute("source")) {
documentation
.setSource(documentationElement.getAttribute("source"));
}
String text = getText(documentationElement);
if (text != null) {
documentation.setValue(text);
}
return documentation;
}
COM: <s> converts an xml documentation element to a bpel documentation object </s>
|
funcom_train/18837450 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void uploadImage(File[] files) throws IOException {
// add image files into database
for(File file : files) {
// copy attached files into storage directory
FileUtils.copyFile(file.toURI().toURL(), new File(AgentApi.getStorage() + "/" + file.getName()));
}
}
COM: <s> copies files into the persistant storage folder </s>
|
funcom_train/23663454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IProcessor getProcessesor() {
TableSource rulesSource = null;
try {
rulesSource = (TableSource)(getConfigurator().getSource());
} catch (CreationException e) {
log.error("Unable to read source table: " + e.getMessage());
log.debug(e);
return null;
}
try {
return rulesSource.getProcessor();
} catch (RuntimeException e) {
log.error("Unable to read read source table: " + e.getMessage());
log.debug(e);
return null;
}
}
COM: <s> get the processor that contains the rules it should contain exactly 4 columns </s>
|
funcom_train/45840713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getProperty(String propName) throws OMQPropertiesReaderException{
String propVal = properties.getProperty(propName);
if(propVal == null){
throw new OMQPropertiesReaderException("property named " + propName + " was not found in properties file : "+propertiesFileName);
}
return propVal;
}
COM: <s> method get property </s>
|
funcom_train/4135813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPublisherPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ProceedingsBibTexEntry_publisher_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ProceedingsBibTexEntry_publisher_feature", "_UI_ProceedingsBibTexEntry_type"),
BibtexPackage.Literals.PROCEEDINGS_BIB_TEX_ENTRY__PUBLISHER,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the publisher feature </s>
|
funcom_train/48406862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIndexPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Method_Relationship_index_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Method_Relationship_index_feature", "_UI_Method_Relationship_type"),
SpemxtcompletePackage.eINSTANCE.getMethod_Relationship_Index(),
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the index feature </s>
|
funcom_train/11650442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getClientChoice() {
String choice = getPropertyAsString(CLIENT_CHOICE);
// Convert the old test plan entry (which is the language dependent string) to the resource name
if (choice.equals(RECEIVE_STR)){
choice = JMSSubscriberGui.RECEIVE_RSC;
} else if (!choice.equals(JMSSubscriberGui.RECEIVE_RSC)){
choice = JMSSubscriberGui.ON_MESSAGE_RSC;
}
return choice;
}
COM: <s> return the client choice </s>
|
funcom_train/38542515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMaximumSize(final int maxSize) {
if (maxSize >= this.minSize) {
this.maxSize = maxSize;
synchronized (this.freeObjects) {
Object current = null;
while (this.usedObjects.size() + this.freeObjects.size() > this.maxSize) {
current = this.freeObjects.lastElement();
this.freeObjects.remove(current);
removeOld(current);
}
}
}
}
COM: <s> this method enables to change the maximum size of the connection pool </s>
|
funcom_train/19229813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getAsHTML( Map pValues) {
String str = "Metadata: <p>" ;
Iterator it = pValues.keySet().iterator();
while( it.hasNext() ) {
Object key = it.next();
Object value = pValues.get( key);
if( value != null) {
str = str + " <br> "+key.toString()+" - "+value.toString() ;
}
}
return str;
}
COM: <s> get as html </s>
|
funcom_train/38288974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NewElementRuleImpl getElementRuleInstance(Set<ElementExp> exps) {
assert(exps != null) && !exps.isEmpty() : "Invalid exps argument."; //$NON-NLS-1$
NewElementRuleImpl result = elementRules.get(exps);
if (result != null)
return result;
if (parent != null) {
if (parent.hasInstance(exps, true))
return parent.getElementRuleInstance(exps);
}
result = new NewElementRuleImpl(exps, this, schema);
elementRules.put(exps, result);
return result;
}
COM: <s> returns instance of code new element rule impl code for given expression set </s>
|
funcom_train/49943453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Element createPluginRecord(final Document doc, final PluginRecord record) {
Element element = doc.createElement(BoosterPlugin.NAMES.PLUGIN);
element.setAttribute(BoosterPlugin.NAMES.NAME, record.getPluginName());
element.setAttribute(BoosterPlugin.NAMES.VERSION, record.getPluginVersion());
return element;
}
COM: <s> save the list of plugins already seen as there may no longer be </s>
|
funcom_train/4519203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private RButton getRButton3115() {
if (RButton3115 == null) {
RButton3115 = new RButton(3);
RButton3115.setText("Vertical");
RButton3115.setBounds(new Rectangle(300, 180, 120, 30));
RButton3115.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
(new TestMyVerticalTable()).setVisible(true);
}
});
}
return RButton3115;
}
COM: <s> this method initializes rbutton3115 </s>
|
funcom_train/35321121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removePropertyChangeListener(PropertyChangeListener listener) {
if (listener == null) {
return;
}
if (listener instanceof PropertyChangeListenerProxy) {
PropertyChangeListenerProxy proxy =
(PropertyChangeListenerProxy)listener;
// Call two argument remove method.
removePropertyChangeListener(proxy.getPropertyName(),
proxy.getListener());
} else {
this.map.remove(null, listener);
}
}
COM: <s> remove a property change listener from the listener list </s>
|
funcom_train/37866619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSAXHandlers(ContentHandler contentHandler, LexicalHandler lexicalHandler) {
ReceiverToSAX toSAX = new ReceiverToSAX(contentHandler);
toSAX.setLexicalHandler(lexicalHandler);
if (getProperty(EXistOutputKeys.EXPAND_XINCLUDES, "yes")
.equals("yes")) {
xinclude.setReceiver(toSAX);
receiver = xinclude;
} else
receiver = toSAX;
}
COM: <s> set the content handler to be used during serialization </s>
|
funcom_train/9819094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double doubleValue() {
if (isInfinite) {
return Double.POSITIVE_INFINITY * sign;
}
else if (isNaN)
return Double.NaN;
else if (signum() == 0) {
return 0.0 * sign;
}
else {
if (isInfinite)
return sign * 1.0 / 0.0;
else {
return sign * significand.doubleValue()
* Math.pow(2, exponent - numMantBits);
}
}
}
COM: <s> converts this floating point to a double </s>
|
funcom_train/14608046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object convert(Class type, Object value, Locale locale) throws ConversionException {
value = super.convert(type.equals(Byte.class) || type.equals(Byte.TYPE) ? Number.class : type, value, locale);
return (value instanceof Number) ? new Byte(((Number) value).byteValue()) : value;
}
COM: <s> convert data stored in object to a given type using passed locale </s>
|
funcom_train/20146869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getStringItem() {
if (stringItem == null) {//GEN-END:|16-getter|0|16-preInit
// write pre-init user code here
stringItem = new StringItem("A Chicken Desperate to save it's eggs..", "");//GEN-LINE:|16-getter|1|16-postInit
// write post-init user code here
}//GEN-BEGIN:|16-getter|2|
return stringItem;
}
COM: <s> returns an initiliazed instance of string item component </s>
|
funcom_train/4040319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String callToString(String methodName, @Nullable Object... args) {
if (args == null) {
args = new Object[0];
}
return new StringBuilder(methodName)
.append("(")
.append(Joiner.on(", ").useForNull("null").join(args))
.append(")")
.toString();
}
COM: <s> converts a method call to string </s>
|
funcom_train/1653543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEndMarker() {
String methodEndMarker = "ANOTHER-ENDING";
String methodStringToParse = sfsReadyString(SAMPLE_STRING_PAIRS);
try {
SimpleFieldSet methodSFS = new SimpleFieldSet(methodStringToParse,false,false);
assertEquals(methodSFS.getEndMarker(),SAMPLE_END_MARKER);
methodSFS.setEndMarker(methodEndMarker);
assertEquals(methodSFS.getEndMarker(),methodEndMarker);
} catch (IOException aException) {
fail("Not expected exception thrown : " + aException.getMessage()); }
}
COM: <s> tests get set end marker string methods </s>
|
funcom_train/6512231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeRelatedTitle(String title) {
for (int x=0; x<_relatedTitles.length; x++) {
if (title.equalsIgnoreCase(_relatedTitles[x])) {
_relatedTitles = (String[]) ArrayHelper.removeIndex(_relatedTitles, x);
return true;
}
}
return false;
}
COM: <s> remove a related title from this wiki page </s>
|
funcom_train/25483833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try{
long delay = 1000/framerate;
long nextRenderTime = System.currentTimeMillis()+delay;
while(running){
board.refresh();
detectors.detectAll();
if(System.currentTimeMillis()>nextRenderTime){
g = canvas.getGraphics();
g.translate(0, 0);
g.setClip(0, 0, canvas.getWidth(), canvas.getHeight());
board.paint();
canvas.flushGraphics();
nextRenderTime = System.currentTimeMillis()+delay;
}
// long wait = delay-(System.currentTimeMillis()-start);
// if(wait>0)
// Thread.sleep(wait);
}
}catch(Exception e){e.printStackTrace();}
}
COM: <s> runs the game the main loop </s>
|
funcom_train/39911060 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDay() {
System.out.println("getDay");
Timesheet_hour instance = new Timesheet_hour();
int expResult = 0;
int result = instance.getDay();
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 day method of class buissness </s>
|
funcom_train/29670561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
this.setSize(300, 200);
jContentPane = new JPanel();
jContentPane.setLayout(new BorderLayout());
this.setContentPane(jContentPane);
panelBox=new JPanel();
panelBox.setLayout(new BoxLayout(panelBox,BoxLayout.Y_AXIS));
for (Proposition prop : this.vectProp) {
makeLineProp(prop);
}
this.jContentPane.add(panelBox,BorderLayout.CENTER);
this.pack();
this.setVisible(true);
}
COM: <s> this method initializes this </s>
|
funcom_train/14078386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TableCellEditor getCellEditor(int row, int column) {
Correspondance corr = (Correspondance) manager.getCorrespondance(row);
switch (column) {
case 0:
case 1: {
return super.getCellEditor(row, column);
}
case 2: {
JComboBox comboBox = new JComboBox(corr.getPossibleCandidates());
DefaultCellEditor editor = new DefaultCellEditor(comboBox);
editor.getComponent().setForeground(Color.BLACK);
return editor;
}
default:
throw new IllegalArgumentException();
}
}
COM: <s> provide an editor for a given table cell </s>
|
funcom_train/19685391 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void closeConnections() {
for (int i = 0; i < m_daemons.length; i++) {
try {
if (m_daemons[i].socket != null) {
m_daemons[i].socket.close();
m_daemons[i].socket = null;
}
} catch (IOException io_e) {
m_daemons[i].socket = null;
logger.debug(SOCKET_ONCLOSE_ERROR, io_e);
}
}
}
COM: <s> closes the simulator daemons sessions </s>
|
funcom_train/8065707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Rectangle getBounds(Rectangle r) {
if (r == null) {
return getBounds();
}
r.setBounds(content.getX() - HAND_SIZE / 2, content.getY() - HAND_SIZE
/ 2, content.getWidth() + HAND_SIZE, content.getHeight()
+ HAND_SIZE);
return r;
}
COM: <s> returns my bounding box in the given rectangle </s>
|
funcom_train/644567 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void renameSourceFolder() {
try {
File dir = new File("scr");
if (dir.exists()) {
dir.renameTo(new File("src"));
}
} catch (Exception ex) {
JOptionPane.showMessageDialog(null, "Could not rename folder: " + ex);
}
}
COM: <s> in older versions of jcalculator the source folders name is scr </s>
|
funcom_train/4410312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Date parseTime(String attributeValue) {
try {
return formatters[dateTimeFormatterIndex.get()].parseDateTime(attributeValue).toDate();
} catch (Exception e) {
int i = dateTimeFormatterIndex.get();
dateTimeFormatterIndex.compareAndSet(i, 1-i);//atomic
return formatters[dateTimeFormatterIndex.get()].parseDateTime(attributeValue).toDate();
}
}
COM: <s> on windows other format it seems but try both if error occurs </s>
|
funcom_train/50462907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setJavaArchives(List list) {
javaArchives.clear();
javaArchives.addAll(list);
clearClassPath();
Iterator it = javaArchives.iterator();
while(it.hasNext()) {
URL url = (URL)it.next();
ClassPathEntry entry = new ClassPathEntry(url);
addClassPathEntry(entry);
}
}
COM: <s> set the java archives </s>
|
funcom_train/18147467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CV valueOf(String code, String codeSystem) throws CodeValueFactory.Exception {
return valueOf(ValueFactory.getInstance().STvalueOfLiteral(code), ValueFactory.getInstance().UIDvalueOfLiteral(codeSystem), STnull.NI, STnull.NI, STnull.NI);
}
COM: <s> simplified interface to create a code value from just a java string </s>
|
funcom_train/1453787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRoot(boolean root) {
synchronized (monitor()) {
check_orphaned();
org.apache.xmlbeans.SimpleValue target = null;
target = (org.apache.xmlbeans.SimpleValue) get_store()
.find_attribute_user(ROOT$0);
if (target == null) {
target = (org.apache.xmlbeans.SimpleValue) get_store()
.add_attribute_user(ROOT$0);
}
target.setBooleanValue(root);
}
}
COM: <s> sets the root attribute </s>
|
funcom_train/44554464 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDescription() {
String files = "";
for (int i = 0; i < extensions.length; i++)
files += (i > 0 ? ", " : "") + extensions[i];
return DcResources.getText("lblFileFiler", files);
}
COM: <s> get the description of this filter for displaying purposes </s>
|
funcom_train/36678743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Player getPlayerByID(int playerID) {
Player result = null;
for (Player p : players) {
if (p.getId() == playerID) {
result = p;
}
}
if (result == null) {
throw new IllegalArgumentException("Unknown Player ID " + playerID + " available players:" + players);
} else {
return result;
}
}
COM: <s> get a player by id </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.