__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/44211084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void findFile(File f) {
try {
File[] list = f.listFiles();
for (int i = 0; i < list.length; i++) {
if (list[i].isDirectory()) {
findFile(list[i]);
} else {
String filename = list[i].getName();
Mp3orOgg(f, filename);
}
}
} catch (NullPointerException e) {
return;
}
}
COM: <s> method find file </s>
|
funcom_train/20118081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean removeTempDump() throws RepositoryException {
if (isCreateTempDump() && !_tempDumpRemoved && _tempDumped) {
_repository.removeDump(getDatabaseName(), DBSchemaSynchronizer.TEMP_DUMP_NAME, false);
actionMessage(Strings.padWithDots("Removing temporary dump") + "ok\n");
_tempDumpRemoved = true;
_tempDumped = false;
return true;
}
return false;
}
COM: <s> remove temp dump database </s>
|
funcom_train/38306619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ChildDefinitionMap addDefinition(ChildDefinition childDef) {
if (containsKey(childDef.getType())) {
throw new RuntimeException("Key " + childDef.getType().getName() + " already exists");
}
put(childDef.getType(), childDef);
return this;
}
COM: <s> adds the given attribute definition instance to the map by using the instances </s>
|
funcom_train/3409922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void store(Object hashed, Object listed, Map map) {
List list = (List)map.get(hashed);
if (list == null) {
list = new ArrayList(1);
map.put(hashed, list);
}
if (!list.contains(listed)) {
list.add(listed);
}
}
COM: <s> stores the listed object under the specified hash key in map </s>
|
funcom_train/22353925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerTranslation(KeyStroke newStroke, KeyStroke oldStroke) {
if (newStroke.equals(oldStroke))
return;
if (!shortCutTranslations.containsKey(oldStroke)) {
keyHandler.removeStroke(oldStroke);
}
keyHandler.addTranslationStroke(newStroke);
shortCutTranslations.put(newStroke, oldStroke);
}
COM: <s> registers a shortcut translation </s>
|
funcom_train/12841550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize() {
if (!isInstalled()) {
return;
}
// clear out old info
projectionDisabled();
fDocument = fViewer.getDocument();
// set projection viewer on new document's adapter factory
if (fViewer.getProjectionAnnotationModel() != null) {
ProjectionModelNodeAdapterFactoryXML factory = getAdapterFactory(true);
if (factory != null) {
factory.addProjectionViewer(fViewer);
}
addAllAdapters();
}
fProjectionNeedsToBeEnabled = false;
}
COM: <s> initialize this provider with the correct document </s>
|
funcom_train/46188633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean inCategory(Category category) {
if (category != null) {
Iterator it = categories.iterator();
while (it.hasNext()) {
Category c = (Category)it.next();
if (c.equals(category) || c.hasParent(category)) {
return true;
}
}
return false;
} else {
return true;
}
}
COM: <s> determines whether this blog entry is in the specified category </s>
|
funcom_train/36733119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("ImgCutoutSoap".equals(portName)) {
setImgCutoutSoapEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/3129619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point computeSize(int wHint, int hHint, boolean changed) {
int width = 0, height = 0;
if (image != null) {
Rectangle bounds = image.getBounds();
width = bounds.width;
height = bounds.height;
}
if (wHint != SWT.DEFAULT){
width = wHint;
}
if (hHint != SWT.DEFAULT){
height = hHint;
}
return new Point(width, height);
}
COM: <s> compute the size of the event icon </s>
|
funcom_train/34876787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireScreenSizeChanged() {
if (listeners != null) {
int size = listeners.size();
for (int i = 0; i < size; i++) {
ScreenListener target =
(ScreenListener)listeners.elementAt(i);
target.onScreenSizeChanged(numRows,numCols);
}
}
}
COM: <s> notify all registered listeners of the on screen size changed event </s>
|
funcom_train/3330972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int indexOf(XMLFieldDescriptor descriptor) {
if (descriptor == null) {
for (int i = 0; i < elementCount; i++) {
if (elements[i] == null) return i;
}
}
else {
for (int i = 0; i < elementCount; i++) {
if (descriptor.equals(elements[i])) return i;
}
}
return -1;
} //-- indexOf
COM: <s> returns the index of the first occurrence of the specified </s>
|
funcom_train/8342473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void layoutStatusBar() {
GridBagConstraints gbc = createDefaultConstraints();
statusBar.setLayout(new GridBagLayout());
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.gridx = 0;
gbc.gridwidth = 4;
gbc.weightx = 1;
gbc.anchor = GridBagConstraints.WEST;
statusBar.add(statusLabel, gbc);
gbc.weightx = 0;
gbc.gridx = GridBagConstraints.RELATIVE;
gbc.gridwidth = 1;
gbc.anchor = GridBagConstraints.EAST;
statusBar.add(progressBar, gbc);
}
COM: <s> layout the status bar </s>
|
funcom_train/48091152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double utilityFunction(GameState currentState){
double calcUtility = utilityConstants[0]*(currentState.numPiecesCurrentPlayer()) + utilityConstants[1]*(currentState.possibleMoves().size()) +
utilityConstants[2] * currentState.numCorners();
if(currentState.currentPlayer() != positive)
return calcUtility;
else
return -calcUtility;
}
COM: <s> given the current state calculates the utility </s>
|
funcom_train/39176790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeFeatureMappings(String gasParam) {
if(featureMappings.containsKey(gasParam)) {
// copy mappings into a new array to avoid concurrent modification
// exception
String[] mappings =
featureMappings.get(gasParam).toArray(
new String[featureMappings.get(gasParam).size()]);
for(String featureName : mappings) {
removeFeatureMapping(gasParam, featureName);
}
}
}
COM: <s> remove all the feature mappings for the given ga s parameter </s>
|
funcom_train/19407895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BagValue union(BagValue v) {
if (!v.elemType().isSubtypeOf(elemType()))
throw new IllegalArgumentException("type mismatch");
if (v.isEmpty())
return this;
BagValue res = new BagValue(elemType());
// add elements of both bags to result
res.fElements.addAll(fElements);
res.fElements.addAll(v.fElements);
return res;
}
COM: <s> returns a new bag which is the union of this and v </s>
|
funcom_train/11694486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double sumOfRowCuts(int row, double [][] cuts) {
double retval = 0.0;
for (int j = 0; j < this.affinity[row].length; j++) {
if (cuts[row][j] != 0.0) {
retval += this.affinity[row][j];
}
}
return retval;
}
COM: <s> utility method for calculating the new diagonal on the specified row of the </s>
|
funcom_train/3556192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private TokenizerProperty insertMapped(char startChar, TokenizerProperty property) {
Character key = new Character(getStartChar(startChar));
PropertyList list = (PropertyList)_nonASCIIMap.get(key);
if (list == null) {
_nonASCIIMap.put(key, new PropertyList(property));
return null;
} else {
return putIntoList(list, property);
}
}
COM: <s> insert a new property into the hash table for real unicode letters </s>
|
funcom_train/36982430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fillFieldValues() {
tolerance.setText(Double.toString(theGaugePanel.getGauge().getProjector().getTolerance()));
perturbationFactor.setText(Double.toString(theGaugePanel.getGauge().getProjector().getPerturbationAmount()));
int i = theGaugePanel.getGauge().getProjector().getAddMethodIndex();
addMethod.setSelectedIndex(i);
}
COM: <s> populate fields with current data </s>
|
funcom_train/16616552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getTasksFile() throws FileNotFoundException {
File file = new File(homeDir, Definitions.DIRNAME_CONFIG + File.separatorChar + Definitions.FILENAME_TASKS);
if (!file.isFile()) {
throw new FileNotFoundException("Could not find tasks definition file \"" + file.getAbsolutePath() + "\"");
}
return file;
}
COM: <s> returns a file object denoting the tasks configuration file tasks </s>
|
funcom_train/4375057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode() {
int hash = LangUtils.HASH_SEED;
hash = LangUtils.hashCode(hash, this.defaultPort);
hash = LangUtils.hashCode(hash, this.scheme.toLowerCase());
hash = LangUtils.hashCode(hash, this.secure);
hash = LangUtils.hashCode(hash, this.socketFactory);
return hash;
}
COM: <s> return a hash code for this object </s>
|
funcom_train/1146356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void paintBackGroundStandard(Graphics g) {
g.setColor(colorBackGroundStandard);
g.fillRect(this.getX() + this.getWidth()/border, this.getY() + this.getHeight()/border,
this.getWidth() - 2*this.getWidth()/border, this.getHeight() - 2*this.getHeight()/border);
}
COM: <s> paint the zone background </s>
|
funcom_train/812712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNodes(SchemaDiagramPart diagram) {
GraphAnimation.recordInitialState(diagram.getFigure());
IFigure fig = diagram.getFigure();
for (int i = 0; i < diagram.getChildren().size(); i++) {
TablePart tp = (TablePart) diagram.getChildren().get(i);
addNodes(tp);
}
}
COM: <s> schema diagram part contribution methods </s>
|
funcom_train/40419061 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String parseXslt(String xmlCode, String xsltCode){
HashMap<String, Object> parameters = new HashMap<String, Object>(2);
parameters.put("xmlsource",xmlCode);
parameters.put("xslt",xsltCode);
PluggableActionResponse response = PluggableActionCaller.call("XSLTRenderAction",parameters);
return (String) response.getParameter("content");
}
COM: <s> transform xml code with given xslt code </s>
|
funcom_train/47308460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop() {
enabled = false;
try {
listener.close();
} catch (IOException ignore) {
}
PlugProxyThread[] list = new PlugProxyThread[group.activeCount()];
group.enumerate(list);
for (PlugProxyThread thread : list) {
thread.disable();
}
}
COM: <s> stops the listener from forwarding data to the remote host </s>
|
funcom_train/19308962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setData(final byte[] data) throws PdfException {
if (data == null) {
return;
}
this.filtersLocked = true;
try {
this.out.write(data);
} catch (final IOException e) {
throw new PdfException(e);
}
this.bytesWritten += data.length;
}
COM: <s> writes some data to this stream </s>
|
funcom_train/31685278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValidProperty(Property prop) {
boolean bIsValid = false;
try {
if(prop != null) {
List availProps = getAvailableProperties();
bIsValid = availProps.contains(prop);
}
} catch (DataAccessException da_e) {
m_logger.log(Level.WARNING, da_e.getLocalizedMessage(), da_e);
bIsValid = false;
}
return bIsValid;
}
COM: <s> returns code true code an instance of the specified code property code </s>
|
funcom_train/11782823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JInternalFrame makeJInternalFrame(Dimension size) {
JInternalFrame frame = new JInternalFrame(viewName, true, true, true, true);
JScrollPane scrollPane = new JScrollPane(this);
frame.setContentPane(scrollPane);
frame.setJMenuBar(getJMenuBar());
frame.setMinimumSize(new Dimension (150, 150));
setPreferredSize(new Dimension(400, 400));
frame.pack();
return frame;
}
COM: <s> returns a frame containing the plot </s>
|
funcom_train/41530834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSocket(Socket socket) throws IOException {
this.socket = socket;
this.input = this.socket.getInputStream();
this.reader = new CRLFTerminatedReader(this.input);
this.writer =
new OutputStreamWriter(this.socket.getOutputStream(),
"US-ASCII");
this.socket.setSoTimeout(TEN_MINUTES);
}
COM: <s> initializes our reader writer and the i o filter chains based on the </s>
|
funcom_train/4494011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void log(String ruleRef,int kind,Object... param) {
if (cancelled)
throw new DerivationCancelledException();
// System.out.println("Log@" + depth + " : " + ruleRef);
this.delegate.add(depth,ruleRef);
this.delegate2.add(depth,kind);
this.derivationCount = this.derivationCount+1;
if (derivationListener!=null)
derivationListener.step(ruleRef, depth, derivationCount);
}
COM: <s> log the use of a clause set </s>
|
funcom_train/46014689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void exportPredictions(String fileName){
if (fileName != null && !fileName.isEmpty()){
System.out.print("Start saving predictions to file " + fileName + "...");
PrintWriter out = null;
try {
out = new PrintWriter(new FileWriter(fileName));
for (double prediction : trainingPredictions) {
out.println(prediction);
}
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
finally{
FileUtils.outputClose(out);
}
System.out.println("Done");
}
}
COM: <s> export the effects predictions to a text file </s>
|
funcom_train/44819296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initSortColumn() {
TableSorter<T, C, R> sorter = getTableSorter();
if (sorter.isReset()) {
resetSortColumn();
return;
}
// TODO: You must initialize all column
TableSorterItem<C> item = sorter.getItem(0);
setSortColumn(item.getColumn());
setDownSort(item.isDown());
}
COM: <s> initialize column by sorter properties </s>
|
funcom_train/12119469 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fastForward(int var) {
if (a == null)
throw new BDDException();
int level = f.var2Level(var);
int i = Arrays.binarySearch(v, level);
if (i < 0 || a[i] != -1)
throw new BDDException();
b[i] = true;
}
COM: <s> fast forward the iteration such that the given variable number is true </s>
|
funcom_train/50163035 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HashMap getEnabledSetsHashMap() {
if (enabledSetsHashMap == null) {
enabledSetsHashMap = new HashMap();
ArrayList es = getEnabledSets();
if (es != null)
for (int i = 0; i < es.size(); i++)
enabledSetsHashMap.put(es.get(i), es.get(i));
}
return enabledSetsHashMap;
}
COM: <s> gets the configured sets that are currently enabled in this repository </s>
|
funcom_train/29825957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void closePool() {
log.debug("closePool::1");
synchronized(log){
try{
while(!_pool.isEmpty()){
Object o = _pool.remove();
_resourceFactory.closeResource(o);
}
}catch(Exception e) {
log.error("Some error in getFromPool(): " + e, e);
}
}
}
COM: <s> this function will close the pool which will result in that </s>
|
funcom_train/8063655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getConnexionList(final AbstractServiceRequest params, final ConnectionListResult result) {
final String userName = params.getLogin();
if (StringUtils.isEmpty(userName)) {
result.setStatus(Status.ERROR);
result.setMessage(ConstMessages.ERR_NO_PARAMETER_USR_PWD);
} else {
result.setStatus(Status.OK);
for (final ConnectionDescription process : this.processList.values()) {
if (userName.equalsIgnoreCase(process.getTerm().getOwner())){
result.getProcessList().add(process);
}
}
result.setMessage(ConstMessages.OK_GENERIC);
}
}
COM: <s> method to get the list of connections from the user </s>
|
funcom_train/26152073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setFileContents(IFile file, StringBuffer contents) {
try {
file.setContents(
new ByteArrayInputStream(contents.toString().getBytes()),
true,
false,
null);
} catch (CoreException e) {
WebAppPlugin.log(e, "setFileContents(IFile file, StringBuffer contents) handling CoreException"); //$NON-NLS-1$
}
}
COM: <s> a convenience method for setting the contents of a the given ifile to </s>
|
funcom_train/43245281 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetECOneCity() {
System.out.println("setECOneCity");
String eCOneCity = "";
EmergencyContactDG3Object instance = new EmergencyContactDG3Object();
instance.setECOneCity(eCOneCity);
// 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 econe city method of class org </s>
|
funcom_train/41664727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void includeLookupConceptViews() {
NeighborsConfig neighborsConfig = getConceptConfig()
.getNeighborsConfig();
for (NeighborConfig neighborConfig : neighborsConfig) {
if (neighborConfig.isParent()) {
String lookupConceptName = neighborConfig
.getDestinationConcept();
LookupConceptView lookupParentConceptView = getComponentView()
.getLookupConceptView(lookupConceptName);
if (lookupParentConceptView != null) {
addLookupConceptView(lookupParentConceptView);
}
}
}
}
COM: <s> includes lookup concept views </s>
|
funcom_train/5395333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testElementData() throws Exception {
log.info("elementData");
String name = "";
String path = "";
String data = "";
instance.elementData(name, path, data);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of element data method of class org </s>
|
funcom_train/29738323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEnumeration(Object[] enumeration) {
Object oldEnumeration[] = this.enumeration;
this.enumeration = new Object[enumeration.length];
System.arraycopy(enumeration, 0, this.enumeration, 0,
enumeration.length);
firePropertyChange("enumeration", oldEnumeration, enumeration);
}
COM: <s> sets the meta data quot enumeration quot property by copying </s>
|
funcom_train/8331224 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void propagateSwtBackground(Component component, Color background, boolean preserveDefaults) {
assert EventQueue.isDispatchThread();
assert component != null;
ResourceConverter converter = ResourceConverter.getInstance();
java.awt.Color bg = converter.convertColor(background);
if (!bg.equals(component.getBackground()) || !preserveDefaults) {
component.setBackground(bg);
}
}
COM: <s> propagates the background color from swt to a given awt swing component </s>
|
funcom_train/43199347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dissolveHousehold(Household household) {
try {
int xLoc = household.getXCoord(),
yLoc = household.getYCoord();
if (xLoc > getGridSizeX()
|| yLoc > getGridSizeY()) {
System.exit(1);
}
space.putObjectAt(household.getXCoord(), household.getYCoord(), null);
household.clearAll();
if (householdList.contains(household)) {
householdList.remove(household);
householdMap.remove(household);
}
System.gc();
} catch (Exception e) {e.printStackTrace();}
}
COM: <s> dissolve the household and clear all neighborhood and kinship links </s>
|
funcom_train/14625268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cleanOutputDir() {
File outputDir = new File(Properties.getConfig("parser.outputDirName"));
for (File file : outputDir.listFiles()){
if (file.isDirectory()) {
deleteDir(file);
}
else if (file.getName().endsWith(".java")){
file.delete();
}
}
}
COM: <s> removes all java source files from the output directory </s>
|
funcom_train/813507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DefaultMutableTreeNode addObject(Object child) {
DefaultMutableTreeNode parentNode = null;
TreePath parentPath = getSelectionPath();
if (parentPath == null) {
parentNode = rootNode;
} else {
parentNode = (DefaultMutableTreeNode)
(parentPath.getLastPathComponent());
}
return addObject(parentNode, child, true);
}
COM: <s> add child to the currently selected node </s>
|
funcom_train/38315303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeFile(long id) throws PersistenceException {
Session session = null;
try {
session = this.sessionManager.getHibernateSession();
session.delete(getFile(id));
} catch (HibernateException he) {
log.error("HibernateException caught removing file.", he);
throw new PersistenceException(he);
} finally {
this.sessionManager.flushCommitCloseSession(session);
}
}
COM: <s> remove a file from the database </s>
|
funcom_train/31890697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Document composeUserEnteredMessage(String user, Room room) {
Element root = DocumentHelper.createElement("userentered");
root.addElement("user").setText(user);
root.addElement("roomname").setText(room.roomname);
root.addElement("roompath").setText(room.roompath);
return DocumentHelper.createDocument(root);
}
COM: <s> composes notification about user entering a room </s>
|
funcom_train/7959926 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ArrayList findDockables(Container base){
ArrayList dockables = new ArrayList(10);
Iterator <Dockable> it = constraintsByDockable.keySet().iterator();
while (it.hasNext()){
Dockable d = it.next();
if (base.isAncestorOf(d.getComponent())){
dockables.add(d);
}
}
return dockables;
}
COM: <s> returns a list of all dockables contained into base </s>
|
funcom_train/29774018 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createVim(Composite parent) {
boolean embd = VimPlugin.getDefault().getPreferenceStore().getBoolean(
PreferenceConstants.P_EMBD);
if (embd) {
try {
createEmbeddedVim(parent);
} catch (Exception e) {
message("Could not create embedded Widget. Falling back to ExternalVim. ",e);
createExternalVim(parent);
}
} else {
createExternalVim(parent);
}
VimPlugin.getDefault().getVimserver(serverID).getEditors().add(this);
}
COM: <s> create a vim instance figuring out if it should be external or embedded </s>
|
funcom_train/20044053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _rowUpdated() {
try {
boolean res = oObj.rowUpdated() ;
tRes.tested("rowUpdated()", true) ;
} catch (SQLException e) {
log.println("Exception occured :") ;
e.printStackTrace(log) ;
tRes.tested("rowUpdated()", false) ;
}
}
COM: <s> just the method is called </s>
|
funcom_train/25990541 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void yyerror (String message, String[] expected, String found) {
String text = ", unexpected " + found + "\n";
//new Exception().printStackTrace();
throw new SyntaxException(PID.GRAMMAR_ERROR, getPosition(null), text, found);
}
COM: <s> syntax error message </s>
|
funcom_train/50739182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Iterator findAllSystemConstants(Domain domain, boolean showGlobal) {
Filter filter = new Filter();
filter.addSelectField("systemConstant");
filter.addFrom("SystemConstant", "systemConstant");
if (showGlobal == false)
filter.addCondition("systemConstant.global='F'");
filter.addParameterCondition("systemConstant.domain.id", "=", domain.getId());
filter.addOrderBy("systemConstant.code");
Iterator list = filter.createQuery(ThreadProperties.getSession()).iterate();
return(list);
}
COM: <s> returns all system constants for the data owner </s>
|
funcom_train/38728363 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void commentChangeEvent(ValueChangeEvent ve) {
String oldValue = ve.getOldValue() == null ? "" : (String) ve
.getOldValue();
String newValue = ve.getNewValue() == null ? "" : (String) ve
.getNewValue();
if (oldValue.trim().equals(newValue.trim())) {
// User added some spaces
return;
}
commentChangeEvent = true;
}
COM: <s> register changes of the comments </s>
|
funcom_train/12184218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNoMatchReplacement() throws Exception {
final String str = "xxxxxxxxxx";
final String search = "z";
final String replace = "y";
final String expected = str;
assertTrue("String replacement failed",
doReplaceAllTest(str, search, replace, expected));
}
COM: <s> tests that no replacement occurs when a match isnt found </s>
|
funcom_train/27782667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void print() {
for (Iterator i = cells.keySet().iterator(); i.hasNext(); ) {
Character ch = (Character) i.next();
Cell c = at(ch);
System.out.print("[" + ch + ":" + c + "]");
}
System.out.println();
}
COM: <s> write the contents of this row to stdout </s>
|
funcom_train/23235285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMinimized(boolean minimized) {
int cheight;
this.minimized = minimized;
if(minimized) {
if(content != null) {
content.setVisible(false);
}
dialog.setSize(
titlebar.getWidth(),
titlebar.getHeight());
contentPane.setSize(
titlebar.getWidth(),
titlebar.getHeight());
} else {
if(content != null) {
content.setVisible(true);
cheight = content.getHeight();
} else {
cheight = 0;
}
dialog.setSize(
titlebar.getWidth(),
titlebar.getHeight() + cheight);
contentPane.setSize(
titlebar.getWidth(),
titlebar.getHeight() + cheight);
}
}
COM: <s> set the window as minimized </s>
|
funcom_train/18935954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getJobIdToCancel() {
DefaultMutableTreeNode node = (DefaultMutableTreeNode) tree.getLastSelectedPathComponent();
if ( node == null )
return -1;
String nodeInfo = (String) node.getUserObject();
if ( !nodeInfo.startsWith( "Job" ) || nodeInfo.startsWith( "Jobs" ) )
return -1;
return getJobId( nodeInfo );
}
COM: <s> returns the job id of the selected job in tree </s>
|
funcom_train/626122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Collection reflectAllInstances(ModelType modelType) {
ClassifierDescriptor typeDescr = modelType.getDescriptor();
ReflectionFactory refFactory = model.getReflectionFactory();
Reflector reflector = refFactory.getReflector(typeDescr);
Set instDescrs = reflector.allInstances();
Collection instances = new Vector(instDescrs.size());
ModelInstance inst = null;
for (Iterator iter = instDescrs.iterator(); iter.hasNext();) {
inst = new ModelInstance(modelType, (InstanceDescriptor) iter.next());
instances.add(inst);
}
return instances;
}
COM: <s> determines all instances of a model type </s>
|
funcom_train/43267972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addObservation(final IObservation observation) {
((IObservationTableModel) getModel()).addObservation(observation);
((TableSorter) getModel()).clearSortingState();
if (log.isDebugEnabled()) {
log.debug("Adding " + observation + " to the table model");
}
}
COM: <s> delegate method that passes the call on to the observation table model </s>
|
funcom_train/2579826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRenderer(XYItemRenderer renderer) {
super.setRenderer(renderer); // not strictly necessary, since the
// renderer set for the
// parent plot is not used
Iterator iterator = this.subplots.iterator();
while (iterator.hasNext()) {
XYPlot plot = (XYPlot) iterator.next();
plot.setRenderer(renderer);
}
}
COM: <s> sets the item renderer for all subplots </s>
|
funcom_train/4289491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSuperStrictPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PropertyReferenceExpression_superStrict_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PropertyReferenceExpression_superStrict_feature", "_UI_PropertyReferenceExpression_type"),
RequirementsPackage.Literals.PROPERTY_REFERENCE_EXPRESSION__SUPER_STRICT,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the super strict feature </s>
|
funcom_train/38808668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_TCC___String_String() throws JHuPeDOMException {
String systemID = "FILE://temp/test.dtd";
DocType theDocType = jhupeDomFactory.newDocType("anElement", systemID);
assertEquals("incorrect element name", "anElement",
theDocType.getElementName());
assertEquals("incorrect system ID", systemID, theDocType.getSystemID());
}
COM: <s> test both the setting of the element name and system id </s>
|
funcom_train/50880258 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addColumn(String inName, char inType, int inLength, int inDecimalPlace) throws Exception{
// update the header.
if (myHeader == null) myHeader = new DbaseFileHeader();
myHeader.addColumn(inName, inType, inLength, inDecimalPlace);
}
COM: <s> adds the column to the file </s>
|
funcom_train/556001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addArchiver(final String archiverName, final int scLoad, final int spLoad, final int imLoad) {
/*
* if ( !_lblist.containsKey(archiverName) ) CLA 16/11/06 {
*/
final LoadBalancedArchiver loadBalancedArchiver = new LoadBalancedArchiver(scLoad, spLoad, imLoad);
loadBalancingList.put(archiverName, loadBalancedArchiver);
// }
}
COM: <s> add an archiver device to the load balanced list </s>
|
funcom_train/50846634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsValid() throws Exception {
int timeout = 500;
Connection conn = newConnection();
boolean expResult = true;
boolean result = conn.isValid(timeout);
assertEquals("isValid", expResult, result);
conn.close();
expResult = false;
result = conn.isValid(timeout);
assertEquals("isValid", expResult, result);
}
COM: <s> test of is valid method of interface java </s>
|
funcom_train/19454191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setRowSelection() {
this.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
if(acceptMarkingOfSeveralRows) {
ListSelectionModel selectionModel = this.getSelectionModel();
selectionModel.addListSelectionListener(
new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) {
if(e.getValueIsAdjusting()) {
return;
}
}
});
}
else {
this.setRowSelectionAllowed(false);
}
}
COM: <s> sets the row selection attribute of the abstract tm table object </s>
|
funcom_train/44495238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String readPosition(int row, int column, int length){
String value = null;
try{
value = session.readPosition(row, column, length);
}catch(JagacyException je){
throw new RuntimeException("Could not retrieve text from the position row '"+row+"', column '"+column+"'.", je);
}
return value;
}
COM: <s> reads the value at the current position </s>
|
funcom_train/45815681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void login() throws Exception {
assertNotNull(resp.getElementWithID("name"));
assertNotNull(resp.getElementWithID("passw"));
changeField("name", "johndoe");
changeField("passw", "secret");
clickButton("submit");
}
COM: <s> faced with the login form perform the necessary steps to log in </s>
|
funcom_train/1972000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(ServiceContext serviceContext) {
log.info(" <<< Invocating init(ServiceContext) >>>");
Object context = serviceContext.getAxisService().getParameterValue("manp2p.context");
if (context != null) {
log.info("ServiceContext is not null");
counter = 2000;
} else {
counter = 0;
}
}
COM: <s> session related methods </s>
|
funcom_train/12838625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean applicationContainsSSLTables(String applicationName) throws ApplicationFacilitiesException {
Vector tableNameVector = getTableNamesAssociatedWithApplication(applicationName);
String tableName = null;
Enumeration en = tableNameVector.elements();
while (en.hasMoreElements()) {
tableName = (String) en.nextElement();
if (tableIsMarkedForSSLAccess(tableName, false)) {
return true;
}
}
return false;
}
COM: <s> returns true if any table in the argument application are marked for ssl </s>
|
funcom_train/22233882 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVelocityScaleFactor(float velocityScaleFactor) {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_VELOCITY_SCALE_FACTOR_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes19"));
((AuralAttributesRetained)this.retained).setVelocityScaleFactor(
velocityScaleFactor);
}
COM: <s> set velocity scale factor applied during doppler effect calculation </s>
|
funcom_train/45075709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProperties(String file) {
super.setProperties(file);
access = true;
String accFlag = props.getProperty("accessFlag", "0");
accessFlag = Integer.parseInt(accFlag);
if (accessFlag == DecisionResult._ACCESS_DECISION_NOT_ALLOWED) access = false;
}
COM: <s> set the properties for configuring the server </s>
|
funcom_train/10181238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initInternal() throws ServletException {
// :FIXME: Document UnavailableException
try {
internal = MessageResources.getMessageResources(internalName);
} catch (MissingResourceException e) {
log.error("Cannot load internal resources from '" + internalName + "'",
e);
throw new UnavailableException
("Cannot load internal resources from '" + internalName + "'");
}
}
COM: <s> p initialize our internal message resources bundle </s>
|
funcom_train/7678758 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeScheduledAlarmsLocked(SQLiteDatabase db) {
if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.d(TAG, "removing scheduled alarms");
}
db.delete(CalendarAlerts.TABLE_NAME,
CalendarAlerts.STATE + "=" + CalendarAlerts.SCHEDULED, null /* whereArgs */);
}
COM: <s> removes the entries in the calendar alerts table for alarms that we have </s>
|
funcom_train/28425709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() throws Exception {
if (runner == null) {
serverSocket = ftpConfig.getSocketFactory().createServerSocket();
runner = new Thread(this);
runner.start();
System.out().println("Server ready :: Apache FTP Server");
log.info("------- Apache FTP Server started ------");
}
}
COM: <s> start the server </s>
|
funcom_train/36852372 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(int position, BigDecimal value) throws IOException, CsvException {
setColConfig(position);
if (value == null) {
writeNull(position);
} else {
writeBuffer(position, Util.format(value, colConfig.getScale(), colConfig.getWriterDecimalChar(), colConfig.isTrim()));
}
}
COM: <s> fills column identified by position with a tt big decimal tt </s>
|
funcom_train/4692323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JFrame getF_iniciando() {
if (f_iniciando == null) {
f_iniciando = new JFrame();
f_iniciando.setSize(new Dimension(228, 132));
f_iniciando.setTitle("RegAdmin");
f_iniciando.setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("/imagenes/Naranjito/Naranjito 16.png")));
f_iniciando.setContentPane(getCp_iniciando());
f_iniciando.setLocationRelativeTo(null);
}
return f_iniciando;
}
COM: <s> this method initializes f iniciando </s>
|
funcom_train/10674460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doKill(String prog) {
String kill = "killall ";
String s = "";
String os = System.getProperty("os.name");
if (os != null && (os.toLowerCase().indexOf("windows") != -1)) {
kill = "taskkill /F /IM ";
s = ".exe";
}
doRunCmd(kill + prog + s);
}
COM: <s> kill the programm </s>
|
funcom_train/12928180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getRoles() throws Exception {
String sql = "select name, description from role order by name";
Vector list = new Vector();
Db database = getDb();
try {
Role obj = null;
Statement stmt = database.getStatement();
ResultSet rs = stmt.executeQuery(sql);
while (rs.next()) {
obj = new Role();
obj.setName(rs.getString("name"));
obj.setDescription(rs.getString("description"));
list.addElement(obj);
}
} finally {
if (database != null)
database.close();
}
return list;
}
COM: <s> this method gets all roles in the database and returns a vector object </s>
|
funcom_train/7720647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doFontDown() {
Editor editor=(Editor)getJPE().getEditor();
int size=editor.doFontDown();
getJPE().say("Font size now "+size);
getJPE().putProperty("setup","fontsize",""+size);
}
COM: <s> shift our fontsize down by 1 </s>
|
funcom_train/987306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void glColor4s (short red, short green, short blue, short alpha) {
CC.gl_color (gl_util.ItoF (gl_util.CLAMP (red, 0, 255)),
gl_util.ItoF (gl_util.CLAMP (green, 0, 255)),
gl_util.ItoF (gl_util.CLAMP (blue, 0, 255)),
gl_util.ItoF (gl_util.CLAMP (alpha, 0, 255)));
}
COM: <s> glvoid gl color4s glshort red glshort green glshort blue glshort alpha </s>
|
funcom_train/32892686 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare( VersionNumber other ) {
for( int i = 0; i < parts() ; i ++ ) {
if( i >= other.parts() ) return 1;
if( component(i) > other.component(i) ) return 1;
if( component(i) < other.component(i) ) return -1;
}
if( other.parts() > parts() ) return -1;
return 0;
}
COM: <s> compare this version number to an other version number </s>
|
funcom_train/11651757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setReplaceExtension(String oldext, String newext) {
if (oldext != null && newext != null) {
this.CHANGEEXT = true;
if (oldext.indexOf(".") < 0 && newext.indexOf(".") < 0) {
this.OLDEXT = "." + oldext;
this.NEWEXT = "." + newext;
} else {
this.OLDEXT = oldext;
this.NEWEXT = newext;
}
}
}
COM: <s> the method will replace the file extension with the new one </s>
|
funcom_train/10194341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initializeKeyGenerator() {
if (autoGenerated && keyGenerator == null) {
if (generatorClassName != null) {
this.keyGenerator = newAutoKeyGenerator(generatorClassName);
} else {
throw new IllegalArgumentException("generatorClassName is null for column " + this);
}
}
this.keyGenerator.setStaticParameters(generatorStaticAttributes);
}
COM: <s> creates and sets auto key generator out of generator class name </s>
|
funcom_train/17546891 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(CompilationController compilationController) throws IOException {
compilationController.toPhase(Phase.ELEMENTS_RESOLVED);
CompilationUnitTree cut = compilationController.getCompilationUnit();
MainMethodVisitor visitor = new MainMethodVisitor(cut, compilationController.getTrees());
visitor.scan(cut, null);
wasMain = visitor.getWasMain();
}
COM: <s> scans the source file looking for the main method </s>
|
funcom_train/16295623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCurrentClassName(java.lang.String currentClassName) {
this.currentClassName = currentClassName;
if(currentClassName!=null){
int p=TripleString.getFirstItemWithClass(currentSet, currentClassName);
if(p>=0)
classList.setSelectedIndex(p);
else
classField.setText(StrUtils.secureString(currentClassName));
}
updateSelection();
}
COM: <s> setter for property current class name </s>
|
funcom_train/43103587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JComponent createControl() {
JPanel view = new JPanel(new BorderLayout());
// Initialization of components
createProductTree();
JScrollPane sp = new JScrollPane(productsTree);
sp.setPreferredSize(new Dimension(ProductsView.TREE_WIDTH, 0));
createProductDetailsPanel();
// Adding them to the view
view.add(sp, BorderLayout.WEST);
view.add(productDetailsPanel, BorderLayout.CENTER);
return view;
}
COM: <s> this method is responsible for creating the main view with products </s>
|
funcom_train/17847752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int indexOfItem(String str) {
String[] arr = getStringArray();
if (arr != null) {
for (int i = 0; i < arr.length; i++) {
if ((arr[i] == null) ? (str == null) : arr[i].equals(str)) {
return i;
}
}
}
return -1;
}
COM: <s> the index of a specific string </s>
|
funcom_train/32117181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String selectWithFileChooser() {
FileFilter fileFilter = new FileNameExtensionFilter(RESOURCE_BUNDLE
.getString("TangaraAction.extensionName"), RESOURCE_BUNDLE //$NON-NLS-1$
.getString("TangaraAction.extension")); //$NON-NLS-1$
JFileChooser chooser = new JFileChooser();
chooser.addChoosableFileFilter(fileFilter);
int returnVal = chooser.showOpenDialog(null);
if (returnVal == JFileChooser.APPROVE_OPTION)
return chooser.getSelectedFile().getAbsolutePath();
return null;
}
COM: <s> return the absolute path name of the opened file </s>
|
funcom_train/46773062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMaskString() {
StringBuffer buf = new StringBuffer();
buf.append('0');
int i = permissions.intValue();
buf.append(octal(i, 6));
buf.append(octal(i, 3));
buf.append(octal(i, 0));
return buf.toString();
}
COM: <s> return the unix style mode mask </s>
|
funcom_train/9851357 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sortParsers(){
Collections.sort(getParsers(), new Comparator<Parser>() {
public int compare(Parser o1, Parser o2) {
String s1 = o1.getParameter(Parser.paramSequence);
String s2 = o2.getParameter(Parser.paramSequence);
int i1 = Integer.parseInt(s1);
int i2 = Integer.parseInt(s2);
if(s1==null || s2==null) return 0;
return i1-i2;
}
});
}
COM: <s> sort parsers according parsers sequence </s>
|
funcom_train/9680092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testA() {
cat.info("Testing Ce for package a");
assertDependencies(
"a",
Arrays.asList(
new String[] {
"a.Test",
"a.Test2",
"a.Test3",
"a.Test4",
"a.Test6"
// "java.lang.Object",
// "A",
// "Base",
// "B",
// "java.lang.String"
}));
cat.info("SUCCESS");
}
COM: <s> tests ce for package code a code </s>
|
funcom_train/20768541 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HardwareInterface getInterface(int n) {
// buildInterfaceList();
if (interfaceList == null || interfaceList.size() == 0) {
return null;
}
if (n > interfaceList.size() - 1) {
return null;
} else {
HardwareInterface hw = interfaceList.get(n);
// log.info("HardwareInterfaceFactoryLinux.getInterace("+n+")="+hw);
return hw;
}
}
COM: <s> build list of devices and return the nth one 0 based </s>
|
funcom_train/31873577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Value read() {
if (this.isReified) {
String argsName[] = {};
Object argsVal[] = {};
return Reification.methodCall(this.reifiedRepresentation,
"read", argsName, argsVal);
} else
return (Value)this.baseRepresentation.value;
}
COM: <s> read the value this reference points to </s>
|
funcom_train/43889497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean canProcess(Map params) {
if (params != null
&& params.get(DBTYPE.key) != null
&& ((String) params.get(DBTYPE.key))
.equalsIgnoreCase((String) DBTYPE.sample)) {
return super.canProcess(rewriteParamsForSuper(params));
} else {
return false;
}
}
COM: <s> return true if the parameters can be used to create a </s>
|
funcom_train/43318514 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAccountActive(XMPPAccount account) {
if (!accounts.contains(account))
throw new IllegalArgumentException("account '" + account
+ "' is not in the current account store");
if (activeAccount != null)
activeAccount.setActive(false);
account.setActive(true);
activeAccount = account;
updateAccountDataToPreferenceStore();
}
COM: <s> makes the given account active </s>
|
funcom_train/37596563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Override public Void visit(ImportDeclaration node) {
print("l."+node.getSourceInfo().getStartLine()+" ImportDeclaration "+node.getName()
+(node.isPackage() ? ".*" : "")+" {");
displayProperties(node);
print("}");
return null;
}
COM: <s> visits an import declaration </s>
|
funcom_train/118930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension getLabelSize(EdgeView view) {
setView(view);
Object label = view.getGraph().convertValueToString(view);
if (label != null && label.toString().length() > 0) {
fontGraphics.setFont(
GraphConstants.getFont(view.getAllAttributes()));
metrics = fontGraphics.getFontMetrics();
int sw = metrics.stringWidth(label.toString());
int sh = metrics.getHeight();
return new Dimension(sw, sh);
}
return null;
}
COM: <s> returns the label size of the specified view in the given graph </s>
|
funcom_train/24367694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addURL(String path) {
URL url = null;
try {
url = new URL(path);
ClassPathManipulator.addURL(url, null);
} catch (MalformedURLException e) {
Application
.debug("PluginManager.addPath: MalformedURLExcepton for "
+ path);
} catch (Throwable e) {
Application.debug("PluginManager.addPath: " + e.getMessage()
+ " for " + path);
}// try-catch
}// addURL(String)
COM: <s> add path for a plugin on the net to classpath </s>
|
funcom_train/19839138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SimpleTrackList recentTracks(int num) throws StrandsServiceException {
assertNotNegative("num", num);
Map<String, String[]> parameter = new HashMap<String, String[]>();
parameter.put("num", new String[] { String.valueOf(num) });
return (SimpleTrackList) request("/recent/tracks", parameter);
}
COM: <s> returns the specified number of most recently released tracks in the </s>
|
funcom_train/32356384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() throws CAException {
// Get the JCALibrary instance.
JCALibrary jca = JCALibrary.getInstance();
// Create a context with default configuration values.
context = jca.createContext(JCALibrary.CHANNEL_ACCESS_JAVA);
// Display basic information about the context.
System.out.println(context.getVersion().getVersionString());
context.printInfo(); System.out.println();
}
COM: <s> initialize jca context </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.