__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/43475194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected NodeHandle closestPrecedingFinger(Id id) {
cpfFound = false;
temp[2] = this.nodeHandle; //n_id
for (int i = bitsPerKey - 1; (i > -1 && !cpfFound); i--) {
if (finger[i] != null && finger[i].getId().betweenE(this.id, id)) {
temp[2] = finger[i];
cpfFound = true;
}
}
return temp[2];
}
COM: <s> finds the closest preceding finger of a node </s>
|
funcom_train/10875752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNoCFSRatio(double noCFSRatio) {
if (noCFSRatio < 0.0 || noCFSRatio > 1.0) {
throw new IllegalArgumentException("noCFSRatio must be 0.0 to 1.0 inclusive; got " + noCFSRatio);
}
this.noCFSRatio = noCFSRatio;
}
COM: <s> if a merged segment will be more than this percentage </s>
|
funcom_train/8631625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeInt(int x) {
byte[] buff = data;
buff[pos++] = (byte) (x >> 24);
buff[pos++] = (byte) (x >> 16);
buff[pos++] = (byte) (x >> 8);
buff[pos++] = (byte) x;
}
COM: <s> write an integer at the current position </s>
|
funcom_train/39802325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void installSelectionColors() {
if (SwingXUtilities.isUIInstallable(getSelectionBackground())) {
setSelectionBackground(UIManager.getColor("Tree.selectionBackground"));
}
if (SwingXUtilities.isUIInstallable(getSelectionForeground())) {
setSelectionForeground(UIManager.getColor("Tree.selectionForeground"));
}
}
COM: <s> installs selection colors from uimanager </s>
|
funcom_train/51295065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setCloseAction() {
InputMap imap = ((JComponent) getContentPane())
.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
ActionMap amap = ((JComponent) getContentPane()).getActionMap();
// ----close action-----
amap.put("close", new AbstractAction() {
public void actionPerformed(ActionEvent e) {
btnCancel.doClick();
}
});
imap.put(KeyStroke.getKeyStroke(27, 0), "close");
}
COM: <s> action on window close </s>
|
funcom_train/28751594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setChargecomments(String newVal) {
if ((newVal != null && this.chargecomments != null && (newVal.compareTo(this.chargecomments) == 0)) ||
(newVal == null && this.chargecomments == null && chargecomments_is_initialized)) {
return;
}
this.chargecomments = newVal;
chargecomments_is_modified = true;
chargecomments_is_initialized = true;
}
COM: <s> setter method for chargecomments </s>
|
funcom_train/25763174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public byte readByte() throws IOException, EOFException {
//#ifndef NO_NIO
if (fc != null) {
return mbb.get();
}
//#endif /* NO_NIO */
if (startIdx<0 || fpos<startIdx || fpos>endIdx) {
readToBuffer();
}
fpos++;
return data[(int)(fpos-1-startIdx)];
}
COM: <s> reads one signed byte </s>
|
funcom_train/20229284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getMaxCurrentOptions(int selectedOption) {
switch(selectedOption) {
case NEW_GAME:
return 3;
case NEW_GAME_CHARACTER:
return 3;
case CONTINUE:
return 3;
case OPTIONS:
return 3;
case HIGH_SCORES:
return 1;
case HELP:
return 1;
case EXIT:
return 2;
case MAIN:
return 6;
default:
return 0;
}
}
COM: <s> returns the maximum options a given menu has </s>
|
funcom_train/36894662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void extractAllNodes() {
// (node belongs_to_Tree tree)
Property p =instanceModel.getProperty(CDAOUtils.CDAO_NS_PREFIX+"#belongs_to_Tree");
StmtIterator iter = instanceModel.listStatements( null , p, resource);
while (iter.hasNext()) {
Resource nodeResource = iter.nextStatement().getSubject();
Node n = new Node(nodeResource, this);
nodesVector.add(n);
//System.out.println(" " + nodeResource.getURI());
}
}
COM: <s> extracts all the node resource of this tree </s>
|
funcom_train/8641757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setChapterNumber(int number) {
numbers.set(numbers.size() - 1, new Integer(number));
Object s;
for (Iterator i = iterator(); i.hasNext(); ) {
s = i.next();
if (s instanceof Section) {
((Section)s).setChapterNumber(number);
}
}
}
COM: <s> changes the chapter number </s>
|
funcom_train/33758295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getNomeServerField() {
if (nomeServerField == null) {
nomeServerField = new JTextField();
nomeServerField.setBounds(new Rectangle(90, 27, 165, 19));
nomeServerField.setText(this.servidor.getNome());
nomeServerField
.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
}
return nomeServerField;
}
COM: <s> this method initializes nome server field </s>
|
funcom_train/4757548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void paintPlots(Graphics2D g2d, int top, int height, int bottom, int left, int width, int right) {
int x[] = new int[thisResolution + 1];
int y[] = new int[thisResolution + 1];
for (int f = 0; f < numFuncs; ++f) {
paintPlot(g2d, top, height, bottom, left, width, right, x, y, f);
}
}
COM: <s> paints the plotted shapes on the display </s>
|
funcom_train/39278234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void contrast(boolean increase) throws Exception {
double newContrast = new Double(contrastVal / 100.0).doubleValue();
newContrast = (increase) ? newContrast : (newContrast * -1);
filter("org.ure.vlma.gui.Contrast",newContrast);
lbManager.getCurrentImage().getImageOp().setContrastVal((int)newContrast);
}
COM: <s> alters the contrast of the image </s>
|
funcom_train/2904189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ZItem getMounterData(){
Dimension d = getPreferredSize();
int width = getWidth();
int height = getHeight();
int pwidth = (int)d.getWidth();
int pheight = (int)d.getHeight();
if(width > pwidth){
width = pwidth;
}
if(height > pheight){
height = pheight;
}
data.setBoundsData(new ZBounds(getX(), getY(), width, height));
return data;
}
COM: <s> get the data model for this mounter </s>
|
funcom_train/5608224 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reportFailedAssertion(String msg) {
if (aggressiveAssertionsEnabled()) {
throw new IndexingException(msg, new Exception()); // capture stack
}
// Need more configuration control here.
// Currently getting a hillion jillion of these in large clients.
if (false) {
logger.log(Level.WARNING, msg);
}
}
COM: <s> signals a failed assertion about the state of the indexer or index </s>
|
funcom_train/51206743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removePersonne(PersonneValue personneValue ) throws EJBException, RemoveException {
System.out.println("removing personne " + personneValue.getPrimaryKey());
try {
PersonneLocal personneLocal = getPersonneHome().findByPrimaryKey(personneValue.getPersonneId());
personneLocal.remove();
} catch (FinderException e) {
System.out.println("Personne not exist");
//throw new EJBException(e);
}
}
COM: <s> business method remove personne </s>
|
funcom_train/17877643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConcurentRemoveDuringPreviousIteration1() {
final String[] strings = new String[] { "a", "b", "c" };
add(strings);
final ListIterator<String> listIterator = createListIteratorToEnd();
if (listIterator != null) {
remove("c");
if (concurrentAccess()) {
final String[] strings2 = new String[] { "a", "b" };
assertContentPreviousToPrevious(strings2, listIterator, false);
} else {
assertConcurrentException(listIterator);
}
}
}
COM: <s> test remove first element after iterator creation </s>
|
funcom_train/33147772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FacetsSaxParser (InputStream xml) throws IOException, ParserConfigurationException, SAXException, FactoryConfigurationError {
// create a Xerces SAX parser
SAXParser parser = SAXParserFactory.newInstance().newSAXParser();
// parse the document
parser.parse(new InputSource(xml), this);
if (logger.isInfoEnabled()) logger.info("Stream parsed OK, " + descriptors.size() + " descriptors loaded");
}
COM: <s> creates object parses xml from supplied input stream and creates descriptors </s>
|
funcom_train/50342686 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addTurntable(Point2D pt) {
numLayoutTurntables ++;
String name = "";
boolean duplicate = true;
while (duplicate) {
name = "TUR"+numLayoutTurntables;
if (findLayoutTurntableByName(name)==null) duplicate = false;
if (duplicate) numLayoutTurntables ++;
}
LayoutTurntable x = new LayoutTurntable(name,pt,this);
//if (x != null) {
turntableList.add(x);
setDirty(true);
//}
x.addRay(0.0);
x.addRay(90.0);
x.addRay(180.0);
x.addRay(270.0);
}
COM: <s> add a layout turntable at location specified </s>
|
funcom_train/32596670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFormatedString() {
String buffer = sName + "(";
for (int i = 0; i < lAtoms.size(); i++) {
if (i == 0) {
buffer = buffer + lAtoms.get(i).getName();
} else {
buffer = buffer + "," + lAtoms.get(i).getName();
}
}
return buffer + ")";
}
COM: <s> will be used for output the predicate in dlv format </s>
|
funcom_train/172338 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int consumeStack(ConstantPoolGen cpg) {
String signature = getSignature(cpg);
Type[] args = Type.getArgumentTypes(signature);
int sum;
if(opcode == Constants.INVOKESTATIC)
sum = 0;
else
sum = 1; // this reference
int n = args.length;
for (int i = 0; i < n; i++)
sum += args[i].getSize();
return sum;
}
COM: <s> also works for instructions whose stack effect depends on the </s>
|
funcom_train/20134379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadPersonContacts(Context ctx) throws NoIdException{
if(id==ContactsInterface.INVALID_ID||id==ContactsInterface.NO_ID) throw new NoIdException(id);
rawContacts = new ArrayList<PersonContact>();
Cursor c = rawContactsCursor(ctx);
PersonContact pc;
while(c.moveToNext()){
pc = PersonContact.recoverPersonContact(this.id, c.getString(1), c.getString(2));
pc.id = c.getLong(0);
pc.fill(ctx);
rawContacts.add(pc);
}
}
COM: <s> loads the person contacts of the person </s>
|
funcom_train/2267603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void recursiveDelete(File file) {
if (file.isDirectory()) {
File[] files = file.listFiles();
for (int x = 0; x < files.length; x++) {
recursiveDelete(files[x]);
}
}
if (file.exists() && !file.delete()) {
logger.error("Could not delete local entry "
+ file.getAbsolutePath() + ", check permissions");
}
}
COM: <s> if file is a directory it recurses through it and deletes everything </s>
|
funcom_train/18842232 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void flavorsChanged(FlavorEvent e) {
if (log.isDebugEnabled()) {
log.debug("Clipboard contents changed: " + e);
}
try {
currentTransferable = clipboard.getContents(null);
// attempt to enable the action
setEnabled(true);
} catch (IllegalStateException x) {
if (log.isDebugEnabled()) {
log.debug("Clipboard is currently unavailable?", x);
}
}
}
COM: <s> called upon on changes in clipboard contents availability </s>
|
funcom_train/19097134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Area createShadow() {
Ellipse2D ellipse = new Ellipse2D.Double(0.06, 0.06, 0.88, 0.88);
Area shadow = new Area(ellipse);
ellipse = new Ellipse2D.Double(0.08, 0.08, 0.84, 0.84);
shadow.subtract(new Area(ellipse));
return shadow;
}
COM: <s> create the shadow area of a cell </s>
|
funcom_train/18645864 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Identity getMessageIdentity(String name) {
java.util.List<Identity> identities=getMessageIdentities();
Identity ret=null;
if (identities != null) {
for (int i=0; i < identities.size(); i++) {
if (identities.get(i).getName() != null &&
identities.get(i).getName().equals(name)) {
ret = identities.get(i);
}
}
}
return(ret);
}
COM: <s> this method returns the message content identity </s>
|
funcom_train/22471363 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testArchiveName() {
MusicArchiveBean bean = new MusicArchiveBean();
assertNull("The result should be null.",bean.getArchiveName());
bean.setArchiveName("test");
assertEquals("The archive name should have been set.","test",bean.getArchiveName());
bean.setArchiveName(null);
assertNull("The result should be null.",bean.getArchiveName());
}
COM: <s> test the archive name property </s>
|
funcom_train/9984424 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Stylesheet findStylesheet(String name) {
Assert.isNotNull(name);
Iterator<StylesheetPersistenceData> it = fStylesheets.iterator();
while ( it.hasNext() ) {
StylesheetPersistenceData data = it.next();
Stylesheet stylesheet = data.getStylesheet();
if ( data.isEnabled() &&
!data.isDeleted() &&
name.equals( stylesheet.getName() ) )
return stylesheet;
}
return null;
}
COM: <s> returns the first enabled template that matches the name </s>
|
funcom_train/13654746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copyStreams(InputStream input, OutputStream output) throws IOException {
byte[] buffer = new byte[4096];
int read = 0;
while (read != -1) {
read = input.read(buffer);
if (read > 0) {
output.write(buffer, 0, read);
output.flush();
}
}
}
COM: <s> copies the contents from one stream to the other </s>
|
funcom_train/25305569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getStream(OutputStream arg0) throws IOException {
boolean isExportRequest = false;
// Step 0 : writing initial comments. If limit=0 is given, just write counts
isExportRequest = writeCsvComments(arg0);
if (isExportRequest && databaseRequest.getCount() != 0) {
// Step 1 : writing the header of the CSV
writeCsvHeader(arg0);
// Step 2 : writing CSV body
writeCsvBody(arg0);
}
}
COM: <s> get the stream </s>
|
funcom_train/18131498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void collectAndRemove_UsesAndGeneratesBy(Task task) {
for (InputPort port : task.getAllInputPorts()) {
for (Uses use : getUses(port)) {
removeUses(use);
}
}
for (OutputPort port : task.getAllOutputPorts()) {
for (WasGeneratedBy generatedBy : getGeneratedBy(port)) {
removeArtifact(generatedBy.getArtifact());
}
}
}
COM: <s> collect all uses by and generates by relations connected to the task </s>
|
funcom_train/27766603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String ask(String question, String validArgs) throws BuildException {
String askProperty = "input.antmod.ask.internal." + (askCounter++);
Input in = new Input();
in.setProject(getProject());
in.setTaskName("input");
in.setMessage(question);
in.setValidargs(validArgs);
in.setAddproperty(askProperty);
in.execute();
return getProject().getProperty(askProperty);
}
COM: <s> helper method for asking a question </s>
|
funcom_train/35837745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onImportXMLFile(String filename, boolean includeInDetail) {
//
// XMLImport xmlImport = new XMLImport(false, filename, ProjectCompendium.APP.getModel(), oViewPane.getView(), isSmartImport, includeInDetail);
// xmlImport.setViewPaneUI(this);
// xmlImport.start();
}
COM: <s> for importing xml files </s>
|
funcom_train/47733456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double scorefunctionGumbel(double distance) {
// hard coded :( parameters for Gumble distribution
double z = 0; // center
double beta = 1000. * treeDistance;// width
z = Math.exp(-(distance / beta));
// we don't divide by beta (normalisation) to have
// slightly higher values (and to save computation
// time).
return z * Math.exp(-z);// /beta;
}
COM: <s> alternative scoring function the gumble ditribution </s>
|
funcom_train/20636992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(int id, int namespaceId, String userName, char attributeMode, char editMode) throws SQLException {
cat.info("Concept update notification received -> Id: " + id +
" Namespace Id: " + namespaceId +
" Attribute : " + getAttributeDesc(attributeMode) +
" Edit : " + getEditDesc(editMode));
}
COM: <s> not used currently </s>
|
funcom_train/18869657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isInside(int pos, ISourceReference sourceElement) throws CoreException {
if (fCachedRange == null) {
fCachedRange= sourceElement.getSourceRange();
}
ISourceRange range= fCachedRange;
if (range != null) {
int rangeOffset= range.getOffset();
return (rangeOffset <= pos && rangeOffset + range.getLength() > pos);
}
return false;
}
COM: <s> tests if a position is inside the source range of an element </s>
|
funcom_train/7232823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
final String command = e.getActionCommand();
if (command.equals(LOAD_LAYOUT)) {
loadLayout();
} else if (command.equals(SAVE_LAYOUT)) {
saveLayout();
} else if (command.equals(SELECT_LAYOUT)) {
loadLayout (((AbstractButton) e.getSource()).getText());
} else if (command.equals(RANDOM_LAYOUT)) {
randomLayout();
}
}
COM: <s> action listener handler </s>
|
funcom_train/4560814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getIndexFor(int productID) {
for (int i = 0, index = 0, n = count * PARTS; i < n; i += 2, index++) {
if (data[i + PRODUCT_ID] == productID) {
return index;
}
}
return -1;
}
COM: <s> returns the index of the specified product component id </s>
|
funcom_train/556038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AttributeLightMode getAttribute(final String attributeName) {
AttributeLightMode attributeLightMode = null;
for (final Entry<String, AttributeLightMode> attr : attributeList.entrySet()) {
if (attr.getKey().equalsIgnoreCase(attributeName)) {
attributeLightMode = attr.getValue();
break;
}
}
return attributeLightMode;
}
COM: <s> sets the archiving mess configs i list of attributes i included in the </s>
|
funcom_train/41842102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String searchEngines(String constructedURL){
StringBuffer sb = null;
try{
con = new URL(constructedURL);
connection = con.openConnection();
}catch(Exception e){
e.printStackTrace();
}
BufferedReader in = null;
try {
in = new BufferedReader(
new InputStreamReader(
connection.getInputStream()));
sb = new StringBuffer();
String inputLine;
while (
(inputLine = in.readLine()) != null) {
sb.append(inputLine);
}
} catch (IOException e) {
e.printStackTrace();
}
return sb.toString();
}
COM: <s> do the connection to the search engine and get the html document </s>
|
funcom_train/31405754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean updateStatusBar() {
if (MainWindowManager.isMainFrameAvailable()) {
MainWindowManager.getMainFrame().focusTab();
MainWindowManager.getMainFrame().getStatusBar().removeAll();
MainWindowManager.getMainFrame().getStatusBar().updateUI();
return true;
}
return false;
}
COM: <s> clears the status bar returns true if there is a status bar </s>
|
funcom_train/10009908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void deleteCopyright() {
Copyright c = getSelection();
if ( c != null
&& MessageDialog.openQuestion(this.getShell(),
Messages.CopyrightPreferencePage_titleDelete,
NLS.bind(Messages.CopyrightPreferencePage_msgConfirmDelete, c.getLabel())) ) {
if ( input.deleteCopyright(c) ) {
copyrightsList.remove(c);
updateContent();
}
}
}
COM: <s> deletes the currently selected copyright </s>
|
funcom_train/1797603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParent(String parent) {
// check if setting to existing value
if (this.parent == null ? parent != null : !this.parent.equals(parent)) {
// set to new value for customer parameter
this.parent = parent;
setStringCustomParameter("parent", parent);
}
}
COM: <s> sets the content with the given parent </s>
|
funcom_train/46885610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isInsufficientMaterial() {
if ((materialSignature[0] & MAJOR_PIECES_OR_PAWNS) != 0
|| (materialSignature[1] & MAJOR_PIECES_OR_PAWNS) != 0) {
return false;
}
long minors = mask[0][BISHOP] | mask[1][BISHOP]
| mask[0][KNIGHT] | mask[1][KNIGHT];
return BitBoard.countBits(minors) < 2;
}
COM: <s> test if there is insufficient material present to checkmate </s>
|
funcom_train/670502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setChildren(ArrayList children) {
this.children = children;
numChildren = children.size();
if (numChildren > 0) {
DisplayItemBean dib = (DisplayItemBean) children.get(numChildren - 1);
numColumns = dib.getMetadata().getColumnNumber();
} else {
numColumns = 1;
}
}
COM: <s> assumes the children are ordered by get metadata </s>
|
funcom_train/46428030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startPlay(boolean showLinks) {
if (window != null && window.isVisible()) {
window.detachFromConcept();
}
window = new ConceptWindow(this);
showing = true;
window.post(displayContent());
if (showLinks) {
taskLinks.startPlay("Task Links in " + term);
termLinks.startPlay("Term Links in " + term);
}
}
COM: <s> start displaying contents and links called from concept window or memory </s>
|
funcom_train/14327872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BEXI_SqlContext getBEXI_SqlContext(String databaseName) {
if (_SqlContext == null) return null;
int i = 0;
while (i < _SqlContext.size()) {
BEXI_SqlContext sqlContext = _SqlContext.get(i);
if (sqlContext.get_url().equals(databaseName)) {
return sqlContext;
}
i++;
}
return null;
}
COM: <s> return database user instance </s>
|
funcom_train/11379819 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void adjustLoadProbingInterval(boolean overloaded) {
if (overloaded) {
/**
* We should only extend LPE interval when there is no in-flight LPE.
*/
if (inFlightLPE == null) {
loadProbingInterval = Math.min(loadProbingInterval * 2,
LOAD_PROB_INTERVAL_MAX);
}
} else {
loadProbingInterval = LOAD_PROB_INTERVAL_START;
}
}
COM: <s> doing exponential back off probing because load probing could be pretty </s>
|
funcom_train/25382500 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getExecutionTime(AbstractJobTask jobTask) throws UniversalWorkerException {
if (Util.isSet(jobTask)) {
return this.tasksMap.get(jobTask.getJobTaskId()).getExecutionDuration();
} else {
throw new UniversalWorkerException(Status.CLIENT_ERROR_NOT_FOUND, "The job does not exist.");
}
}
COM: <s> get the execution time </s>
|
funcom_train/25450185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element addField(String var, String[] value, String type, String label) {
Element field = addField(var, value);
if (!StringUtils.isEmpty(type)) {
field.addAttribute("type", type);
}
if (!StringUtils.isEmpty(label)) {
field.addAttribute("label", label);
}
return field;
}
COM: <s> add new extension data field with type and label </s>
|
funcom_train/1773047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printExpectedDates(DataQuery dataQuery) {
StringBuilder output = new StringBuilder();
output.append(dataQuery.getDimensions());
for (String date : getListOfDates(dataQuery)) {
output.append(",").append(date);
}
System.out.println(output.toString());
}
COM: <s> prints the expected dates as comma separated values </s>
|
funcom_train/16897778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Response deleteProject(String projectName) {
String request = Req.deleteProjectRequest;
logger.info("requested to delete project: " + projectName);
try {
ProjectManager.deleteProject(projectName);
} catch (Exception e) {
logger.error(e.getMessage());
e.printStackTrace(System.err);
return ServletUtilities.getService().createExceptionResponse(request, e.getMessage());
}
return ServletUtilities.getService().createReplyResponse(request, RepliesStatus.ok);
}
COM: <s> deletes an already built project inside semantic turkey projects list </s>
|
funcom_train/3721586 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init(Parser parser, boolean checkParse) {
this.parser = parser;
apps = new ArrayList<Application>(10);
try {
if (checkParse)
checkWriter = new BufferedWriter(new FileWriter(
ca.uhn.hl7v2.util.Home.getHomeDirectory()
.getAbsolutePath() + "/parse_check.txt", true));
} catch (IOException e) {
log.error(
"Unable to open file to write parse check results. Parse integrity checks will not proceed",
e);
}
}
COM: <s> performs common constructor tasks </s>
|
funcom_train/18032192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getButtonBorder() {
if (m_buttonBorder == null) {
m_buttonBorder = new JButton();
m_buttonBorder.setIcon(FBImage.getIcon(FBImage.BORDER));
m_buttonBorder.setToolTipText(Messages.getString("FBToolbar.9")); //$NON-NLS-1$
m_buttonBorder.setMargin(new Insets(0, 0, 0, 0));
}
return m_buttonBorder;
}
COM: <s> returns the border button </s>
|
funcom_train/44452163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void correctParamReferences(String oldName, String newName) {
for (Reference ref : premises) {
ref.correctParameterReference(oldName, newName);
}
for (Reference ref : consequents) {
ref.correctParameterReference(oldName, newName);
}
for (Call call : calls) {
for (Reference ref : call.getParams()) {
ref.correctParameterReference(oldName, newName);
}
}
}
COM: <s> changes any references to parameter old name to new name </s>
|
funcom_train/18742066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void select(int line, int column) {
try {
int pos = this.textArea.getLineStartOffset(line - 1);
if (column > 0) {
pos += column - 1;
}
this.textArea.select(pos, pos);
this.textArea.requestFocusInWindow();
} catch (BadLocationException e) {
// do nothing
}
}
COM: <s> selects a given line in the text area </s>
|
funcom_train/2952704 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireConfigLoaded(final ConfigEvent e) {
Runnable runnable = new Runnable() {
public void run() {
configLoaded = true;
configListeners.fireEvent("configLoaded", e); //$NON-NLS-1$
}
};
Display.getDefault().asyncExec(runnable);
}
COM: <s> call the config loaded method on all registered config change listeners </s>
|
funcom_train/11643647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetCheckedException() throws Exception {
BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl();
Exception ex = new Exception();
init.ex = ex;
init.start();
try {
init.get();
fail("Exception not thrown!");
} catch (ConcurrentException cex) {
assertEquals("Exception not thrown", ex, cex.getCause());
}
}
COM: <s> tests the get method if background processing causes a checked </s>
|
funcom_train/1864706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Color getPixelColor(final int character, final int x, final int y) {
final int pos = character * size.width * size.height;
if (x >= size.width || y >= size.height || pos >= fontdata.length) {
return Color.white;
} else if (fontdata[pos + y * size.width + x] == 0x01) {
return Color.black;
} else {
return Color.white;
}
}
COM: <s> get the pixel colour for the requested character at the requested x y </s>
|
funcom_train/28643721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Contact findByName(String name) throws DaoException {
Contact result = null;
try {
Map<String, Object> params = new HashMap<String, Object>();
params.put("name", name);
result = initializeContact((Contact) getSingleResult("ContactByName", params));
}
catch (Throwable ex) {
throw new DaoException(ex);
}
return result;
}
COM: <s> retrieves a contact by its name </s>
|
funcom_train/39130294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopListening() throws IOException {
shouldListen = false;
if (socket != null && !socket.isClosed()) {
socket.close();
}
while (isListening() || (socket != null && !socket.isClosed())) {
TimingUtils.sleep(100);
}
}
COM: <s> closes the server socket </s>
|
funcom_train/6255010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processQueue() {
ValueCell vc;
while ((vc = (ValueCell) queue.poll()) != null) {
/*
* vc.isValid() is false, then the vc has been
* dropped, and the value cell currently in hash
* corresponding to vc.key, if exists, must be one
* that has been newly inserted using the same key =>
* can not do hash.remove(vc.key)
*/
if (vc.isValid())
hash.remove(vc.key);
}
}
COM: <s> process the internal reference queue </s>
|
funcom_train/6478064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addToBeliefMap(Predicate newBelief) {
List<Predicate> list = beliefMap.get(newBelief.functor());
if (list == null) {
list = new LinkedList<Predicate>();
list.add(newBelief);
beliefMap.put(newBelief.functor(), list);
} else {
for (Predicate bel : list) {
if (bel.equals(newBelief)) {
return;
}
}
list.add(newBelief);
}
}
COM: <s> method for adding beliefs to the belief map which eliminates duplication </s>
|
funcom_train/1382217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextArea getJTextArea() {
if (jTextArea == null) {
try {
jTextArea = new JTextArea();
jTextArea.setSelectionColor(Color.GRAY); // Generated
jTextArea.setEditable(false); // Generated
jTextArea.setLineWrap(true); // Generated
} catch (java.lang.Throwable e) {
// TODO: Something
}
}
return jTextArea;
}
COM: <s> this method initializes j text area </s>
|
funcom_train/9564033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reinitKeystore(String aKsType, final String aKeyStore, final String aPasswd) {
try {
kall = KeyStoreUtils.createKeyStore();
} catch (Exception e) {
throw new RuntimeException(e);
}
final KeyStore ksToImport = KeyStoreUtils.loadKeyStore(aKsType, aKeyStore, aPasswd);
if (ksToImport != null) {
KeyStoreUtils.copyCertificates(ksToImport, kall);
}
}
COM: <s> initializes keystore load certificates from default keystore </s>
|
funcom_train/17269317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRevert() throws Exception {
System.out.println("revert");
File file = File.createTempFile("testWrite", "txt");
int [] array = {1,2};
RegistryImpl instance = new RegistryImpl(array);
instance.setFile(file);
instance.revert();
File result = instance.getFile();
assertEquals(file, result);
}
COM: <s> test of revert method of class com </s>
|
funcom_train/19313449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected FoValue convertValueToFoValue(final PropertyValue value) {
if (! value.canEvalKeyword()) {
return null;
}
final PvKeyword genericKeyword = value.evalKeyword();
if (! (genericKeyword instanceof FoPropertyKeyword)) {
return null;
}
final FoPropertyKeyword keyword = (FoPropertyKeyword) genericKeyword;
final FoValue keywordValue = keyword.getValue();
return keywordValue;
}
COM: <s> converts a keyword property value to its equivalent fo value </s>
|
funcom_train/20044996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _removeEventListener() {
executeMethod("addEventListener()");
if (disposed) return;
// the second listener should not be called
oObj.removeEventListener( listener2 );
log.println(Thread.currentThread() + " is removing EL " + listener2);
} // finished _removeEventListener()
COM: <s> removes the second of two added listeners </s>
|
funcom_train/18203429 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void show() {
getFrame().setVisible( true );
getFrame().toFront();
if( m_thread == null ) {
m_thread = new Thread( m_bsh, "BeanShell" );
m_thread.setDaemon( true );
m_thread.start();
}
}
COM: <s> shows the shell window and brings it to front </s>
|
funcom_train/29395217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteRelation(Relation r) {
relationsToDump.remove(r);
relationsToDumpTuples.remove(r);
relationsToInit.remove(r);
relationsToLoad.remove(r);
relationsToLoadTuples.remove(r);
relationsToPrintSize.remove(r);
relationsToPrintTuples.remove(r);
nameToRelation.remove(r.getName());
}
COM: <s> delete the given relation </s>
|
funcom_train/5806675 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateFromFile() throws IOException, MarshalException, ValidationException {
if (m_loadedFromFile) {
File surveillanceViewsFile = ConfigFileConstants.getFile(ConfigFileConstants.NSCLIENT_COLLECTION_CONFIG_FILE_NAME);
if (m_lastModified != surveillanceViewsFile.lastModified()) {
this.reload();
}
}
}
COM: <s> reload the nsclient datacollection config </s>
|
funcom_train/13448278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isDragPossible(MouseEvent e) {
if (super.isDragPossible(e)) {
JTree tree = (JTree) this.getComponent(e);
if (tree.getDragEnabled()) {
TreeUI ui = tree.getUI();
TreePath path = ui.getClosestPathForLocation(tree, e.getX(),
e.getY());
if ((path != null) && tree.isPathSelected(path)) {
return true;
}
}
}
return false;
}
COM: <s> determines if the following are true </s>
|
funcom_train/3023873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void convertFirstCStyleCommentToSingleLine() {
if ( special != null
&& special.kind == JavaParserConstants.MULTI_LINE_COMMENT
&& special.image.indexOf('\n')<0) {
//System.out.println(" - converting");
special.kind = JavaParserConstants.SINGLE_LINE_COMMENT;
}
}
COM: <s> if the first special token is a c style comment then pretend it </s>
|
funcom_train/37764879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected H createHandler(UOW uow) {
try {
if (handler == null && handlerClass != null)
handler = (H) handlerClass.getConstructor(UOW.class).newInstance(uow);
return handler;
} catch (Exception e) {
throw new RuntimeException("Can't Create Update Handler Object : " + handlerClass, e);
}
}
COM: <s> creates an itransformation handler instance </s>
|
funcom_train/9883477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private FloatMatrix getSubExperiment(FloatMatrix experiment, int[] features) {
FloatMatrix subExperiment = new FloatMatrix(features.length, experiment.getColumnDimension());
for (int i=0; i<features.length; i++) {
subExperiment.A[i] = experiment.A[features[i]];
}
return subExperiment;
}
COM: <s> gets sub experiment cluster membership only dictated by features </s>
|
funcom_train/11319944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void renderRootMenu(HtmlStringBuffer buffer) {
buffer.elementStart("div");
buffer.appendAttribute("id", getId());
buffer.appendAttribute("class", "menustyle");
buffer.closeTag();
buffer.append("\n");
int depth = 0;
renderMenuList(buffer, this, depth);
buffer.elementEnd("div");
}
COM: <s> render an html representation of the root menu </s>
|
funcom_train/3362850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getComponentIndex(Component c) {
int ncomponents = this.getComponentCount();
Component[] component = this.getComponents();
for (int i = 0 ; i < ncomponents ; i++) {
Component comp = component[i];
if (comp == c)
return i;
}
return -1;
}
COM: <s> returns the index of the specified component </s>
|
funcom_train/31457071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateFinished(int id, UpdateStatistics stat) throws RemoteException {
if ( !updateLock.IsUpdate() ) {
Log.event(Log.ERROR, "node in update when isle is not in update state");
return;
}
NodeItem n = nodes.get(id);
if ( n == null ) {
Log.event(Log.WARNING, "Finish from unknown node " + id);
return;
}
n.end(stat);
countDown.countDown();
}
COM: <s> node finished update </s>
|
funcom_train/2486940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSimpleAttribute(SimpleAttribute simpleAttribute) {
UmlPackageSupplier.getUmlPackage().getCore().getAOwnerFeature().add((Classifier) modelElement, (Attribute) simpleAttribute.getModelElement());
simpleAttributes.put(simpleAttribute.getName(), simpleAttribute);
}
COM: <s> adds a simple attribute to this simple classifier </s>
|
funcom_train/27779568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCacheSize(int size) {
max_size = size;
if (max_size == 0) {
flushCache();
cache = null;
} else if (cache == null) {
cache = new MemBarrel();
} else if (cache.length() > max_size) {
flushCache();
}
}
COM: <s> set the cache size of this buffered tanker to the specified size </s>
|
funcom_train/15719836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void putStringCache(String put){
try {
if(put=="") return;
stringCachePut=stringCachePut%stringCache.length;
stringCache[stringCachePut]=put;
stringCachePut++;
stringCacheIDX=stringCachePut;
if (stringCacheFill<stringCache.length) stringCacheFill++;
}catch (IndexOutOfBoundsException ex){
if (MainClass.DEBUG) {
System.out.println("Console input buffer failed.");
ex.printStackTrace();
}
}
}
COM: <s> this method stores the typed commands </s>
|
funcom_train/26206371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getProperty(final String key, int defaultValue) {
final Object value = get(key);
if (value != null) {
if (value instanceof String) {
defaultValue = Integer.parseInt((String) value);
} else if (value instanceof Integer) {
defaultValue = ((Integer) value).intValue();
}
}
return defaultValue;
}
COM: <s> return the int value for the given code key code </s>
|
funcom_train/4942543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateHexField() {
adjustingHexField++;
try {
int r = red.getIntValue();
int g = green.getIntValue();
int b = blue.getIntValue();
int i = (r << 16) + (g << 8) +b;
String s = Integer.toHexString(i).toUpperCase();
while(s.length()<6)
s = "0"+s;
if(hexField.getText().equalsIgnoreCase(s)==false)
hexField.setText(s);
} finally {
adjustingHexField--;
}
}
COM: <s> update hex field </s>
|
funcom_train/15410912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteMany(Class<?> beanType, Collection<?> ids, Transaction transaction) {
if (ids == null || ids.size() == 0) {
return;
}
BeanDescriptor<?> descriptor = beanDescriptorManager.getBeanDescriptor(beanType);
ArrayList<Object> idList = new ArrayList<Object>(ids.size());
for (Object id : ids) {
// convert to appropriate type if required
idList.add(descriptor.convertId(id));
}
delete(descriptor, null, idList, transaction);
}
COM: <s> delete by a list of ids </s>
|
funcom_train/40414717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addWidget(Widget w, boolean refreshOnDrop, String overflow) {
pickupOrAddWidget(null, w, "Add " + getWidgetDescription(w));
drillDownOnDrop = w instanceof Container;
this.refreshOnDrop = refreshOnDrop;
this.overflow = overflow;
}
COM: <s> add the widget to the layout with support for choosing where to </s>
|
funcom_train/37036347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(int b) throws IOException {
if (suspended)
return;
if (closed)
throw new IOException(sm.getString("responseStream.write.closed"));
if ((length > 0) && (count >= length))
throw new IOException(sm.getString("responseStream.write.count"));
((ResponseBase) response).write(b);
count++;
}
COM: <s> write the specified byte to our output stream </s>
|
funcom_train/35792718 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void invokeMethod(String method) {
if (getMethodClosure() == null)
unableToFindMethod(method);
else {
IMethodClosure scope = getMethodClosure();
IInterpretedMethod currentMethod = scope.getCurrentMethod();
if (currentMethod.isStatic()) {
IInterpretedClass currentClass = currentMethod
.getInterpretedClass();
invokeMethod(currentClass, method);
} else {
IInterpretedClassInstance currentClassInstance = scope
.getCurrentClassInstance();
invokeMethod(currentClassInstance, method);
}
}
}
COM: <s> invoke the method in this class corresponding to the supplied method </s>
|
funcom_train/40873797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setCurrentEditorTab(CTabItem t) {
EditorTab tab = (EditorTab) (t == null ? null : t.getControl());
MainWindow.getInformationPanel().setCurrentEditorTab(tab);
if(tab != null) {
tab.propagateCurrentSelection();
MainWindow.getStatusLine().showValidity(tab.getSchema());
}
else MainWindow.getInformationPanel().setSelection(null);
}
COM: <s> set the current editor tab and restor this tabs </s>
|
funcom_train/23385560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInstall() throws Exception {
System.out.println("install");
ApplicationInstaller instance = ApplicationInstaller.init("http://localhost/~preisler/applications/appWithJarExample/");
doDownload(instance);
instance = ApplicationInstaller.init("http://localhost/~preisler/applications/appWithJarExample");
doDownload(instance);
}
COM: <s> test of install method of class jriaffe </s>
|
funcom_train/3366887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void exportDone(JComponent source, Transferable data, int action) {
// only remove the text if shouldRemove has not been set to
// false by importData and only if the action is a move
if (shouldRemove && action == MOVE) {
TextTransferable t = (TextTransferable)data;
t.removeText();
}
exportComp = null;
}
COM: <s> this method is called after data has been exported </s>
|
funcom_train/25501714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected NameChecker getNewRecordNameChecker() {
if (newRecordNameChecker == null) {
Component editorComponent = getNameTextField().getEditor().getEditorComponent();
if (editorComponent instanceof JTextField) {
newRecordNameChecker =
new NameChecker((JTextField)editorComponent, null, false, getOKButton(), getWarningLabel());
}
}
return newRecordNameChecker;
}
COM: <s> returns new record name checker or null if there isnt one </s>
|
funcom_train/40514648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public static class Util {
private static WelcomeRpcControllerAsync instance;
public static WelcomeRpcControllerAsync getInstance() {
if (instance == null) {
instance = (WelcomeRpcControllerAsync) GWT.create(WelcomeRpcController.class);
ServiceDefTarget target = (ServiceDefTarget) instance;
String ep = EndpointUtils.getInstance().adapt("/welcomeRpcController.rpc");
target.setServiceEntryPoint(ep);
}
return instance;
}
}
COM: <s> utility class for simplifing access to the instance of async service </s>
|
funcom_train/649985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readContent(char firstChar) throws IOException {
int c;
char ch;
String str = ""; str += firstChar;
while ((c = _reader.read()) != -1) {
ch = (char)c;
if (ch == '<') {
_handler.characters(str);
readElement();
return;
}
str += ch;
}
}
COM: <s> reads text content of an element </s>
|
funcom_train/50066838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addLineNumber(char startPc, char lineNumber) {
if (lineDebugInfo) {
if (lineInfo.nonEmpty() && ((char[]) lineInfo.head)[0] == startPc)
lineInfo = lineInfo.tail;
if (lineInfo.isEmpty() || ((char[]) lineInfo.head)[1] != lineNumber)
lineInfo = lineInfo.prepend(new char[] { startPc, lineNumber });
}
}
COM: <s> add a line number entry </s>
|
funcom_train/42183727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MessageData setRead(boolean read) {
if (read == this.read) {
return this;
}
return new MessageData(
messageId,
topicId,
parentId,
forumId,
userId,
subject,
userName,
messageDate,
updateDate,
read, // Not a field
rating,
ignored,
parentUserId);
}
COM: <s> create a new message data if necessary with new state of read flag </s>
|
funcom_train/43902811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected FilterCapabilities createFilterCapabilities() {
FilterCapabilities capabilities = new FilterCapabilities();
capabilities.addAll(FilterCapabilities.LOGICAL_OPENGIS);
capabilities.addAll(FilterCapabilities.SIMPLE_COMPARISONS_OPENGIS);
capabilities.addType(PropertyIsNull.class);
capabilities.addType(PropertyIsBetween.class);
capabilities.addType(Id.class);
capabilities.addType(IncludeFilter.class);
capabilities.addType(ExcludeFilter.class);
return capabilities;
}
COM: <s> sets the capabilities of this filter </s>
|
funcom_train/28506095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void decTime() {
switch(action) {
case 1:
if(agv!=null) {
if(agv.firstElement().isReady()) {
if (container!=null)
agv.firstElement().addContainer(container);
container = null;
action=0;
DoneWithTask=true;
}
}
break;
}
}
COM: <s> calculate next action for the crane </s>
|
funcom_train/613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final private boolean hasSubset(byte[] boxConfiguration1, byte[] boxConfigurationArray, int indexInArray) {
for (int i = 0; i < packedBoardByteSize; i++) {
byte b2 = boxConfigurationArray[indexInArray + i];
// "b2" is a subset, if all its 1-bits survive the ANDing with the first byte
if ((boxConfiguration1[i] & b2) != b2) {
return false;
}
}
return true;
}
COM: <s> returns whether the second passed box configuration is a subset </s>
|
funcom_train/45863994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(int tile, int xtra) {
udgs = (tile >> ROTL_UDGS) & MASK_UDGS;
anim = (tile >> ROTL_ANIM) & MASK_ANIM;
bkwd = ((tile >> ROTL_BKWD) & MASK_BKWD) != 0;
time = (tile >> ROTL_TIME) & MASK_TIME;
data = ((tile >> ROTL_DATA) & MASK_DATA) | xtra;
reset();
}
COM: <s> sets the sequence from the data stored encoded in a pair of ints </s>
|
funcom_train/22552507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUDPPushFailoverAlt() throws Exception {
requestPush(rfdAlt);
try {
serversocket.accept();
fail("tcp attempt was made");
}catch(IOException expected){}
DatagramPacket push = new DatagramPacket(new byte[1000],1000);
udpsocket.receive(push);
ByteArrayInputStream bais = new ByteArrayInputStream(push.getData());
PushRequest pr = (PushRequest)MessageFactory.read(bais);
assertEquals(rfd1.getIndex(),pr.getIndex());
Thread.sleep(5200);
try {
Socket s =serversocket.accept();
s.close();
fail("tcp attempt was made");
}catch(IOException expected){}
Thread.sleep(3000);
}
COM: <s> tests the scenario where an udp push is sent no </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.