__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/9579738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSystemString(final String keyPath, final String value) {
String normalizedKey = normalizeKey(keyPath);
final String path = getPath(normalizedKey);
final String key = getKey(normalizedKey);
setPreferenceValue(path, key, value, this.systemPrefs);
}
COM: <s> stores the given value into the system preferences </s>
|
funcom_train/13286350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Button getStop() {
if (stop == null) {
stop = new Button();
stop.setLabel("Stop");
stop.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
agent.setSendedState(false); // TODO Auto-generated Event stub actionPerformed()
}
});
}
return stop;
}
COM: <s> this method initializes button1 </s>
|
funcom_train/14161394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void tearDown() {
File dir = new File(rootPath);
if (dir.exists()) {
File[] files = dir.listFiles();
for (int i = 0; i < files.length; i++) {
files[i].delete();
}
dir.delete();
}
}
COM: <s> remove all the created files </s>
|
funcom_train/35082210 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkPermission (String action, Journal j) throws GLException {
if (!hasPermission (action, j)) {
throw new GLException (
"User '" + user.getName() + "' (" + user.getId() +
") does not have '" + action + "' permission in journal '" +
j.getName() + "' (" + j.getId() + ")"
);
}
}
COM: <s> check users permission in a given journal </s>
|
funcom_train/29027322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSourcePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_FKRelation_source_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_FKRelation_source_feature", "_UI_FKRelation_type"),
DbdesignerPackage.Literals.FK_RELATION__SOURCE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the source feature </s>
|
funcom_train/34262091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createNewFilePreference() {
this.setModifyController(new NewFilePreferenceController(this));
JPanel lCenterPanel = this.getNewController().buildNewDialog();
this.getNewController().setDirty(false);
EditFilePreferenceDialog lEFPD =
new EditFilePreferenceDialog(this.getParentDialog(),
FmsResourceBundle.getString(FmsResourceBundleKeys.EDIT_FILE_ACTIONS_cc),
true,
this.getNewController(),
lCenterPanel);
lEFPD.initUI();
}
COM: <s> template method to setup a new file preference </s>
|
funcom_train/37646744 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setState(int state) {
_stateNum = state;
switch (state) {
case CONNECTING:
_state = new NormalUploadState(this);
break;
case LIMIT_REACHED:
_state = new LimitReachedUploadState(_fileDesc);
break;
case PUSH_FAILED:
_state = new PushFailedUploadState();
break;
case FREELOADER:
_state = new FreeloaderUploadState();
break;
case BROWSE_HOST:
_state = new BrowseHostUploadState(this, _fileManager, _router);
break;
case FILE_NOT_FOUND:
_state = new FileNotFoundUploadState();
case COMPLETE:
case INTERRUPTED:
break;
}
}
COM: <s> this method changes the appropriate state class based on </s>
|
funcom_train/44136457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isContainMedia(OSMMedia media) {
boolean b = false;
Iterator it = this.m_MediaList.iterator();
while(it.hasNext() && !b) {
OSMMedia m = (OSMMedia)it.next();
if(m.equals(media))
b = true;
}
return b;
}
COM: <s> it looks if the osmpage contained the specified media </s>
|
funcom_train/35953446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void onConfigSelected() {
this.model.setConfig( getConfig() );
this.templateTable.setRowSelectionInterval(0, 0);
if ( getConfigType().equals(ConfigType.MASTER) ) {
this.moveBtn.setText("Restore");
} else {
this.moveBtn.setText("Archive");
}
}
COM: <s> notification that a new template config was selected </s>
|
funcom_train/37721239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load(Table aTable) {
table = new MutableTable(aTable);
guiTable.setModel(table.getModel());
if (dataTypeEditor == null)
dataTypeEditor = new DefaultCellEditor(new JComboBox(table.getColumnDataTypes()));
guiTable.getColumnModel().getColumn(2).setCellEditor(dataTypeEditor);
}
COM: <s> load the table meta data </s>
|
funcom_train/22210207 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButton getExternalRB() {
if (externalRB == null) {
externalRB = new JRadioButton();
externalRB.setText("External");
externalRB.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
externalRB.setComponentOrientation(java.awt.ComponentOrientation.LEFT_TO_RIGHT);
subjectOptionsGroup.add(externalRB);
}
return externalRB;
}
COM: <s> this method initializes j radio button </s>
|
funcom_train/48407021 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addWorkSequenceContextPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_WorkSequence_workSequenceContext_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_WorkSequence_workSequenceContext_feature", "_UI_WorkSequence_type"),
SpemxtcompletePackage.eINSTANCE.getWorkSequence_WorkSequenceContext(),
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the work sequence context feature </s>
|
funcom_train/22477927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BaseNode insertBefore(BaseNode newNode, BaseNode referenceNode) {
int refIndex = referenceNode == null ? get_length() : this.nodes.indexOf(referenceNode);
this.nodes.add(refIndex, newNode);
updateAllIndexes();
return newNode;
}
COM: <s> inserts the new node before the reference node in the list </s>
|
funcom_train/21848162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateComponents(Object src) {
/**
* This is a global update call that is not specific to any event, so we
* create an event.
*/
if (src == null)
src = this;
EventObject evt = null;
if (!(src instanceof EventObject))
evt = new EventObject(src);
JETAContainer view = getView();
if (view != null) {
UIDirector uidirector = view.getUIDirector();
if (uidirector != null)
uidirector.updateComponents(evt);
}
}
COM: <s> forwards the call to the uidirector if it is not null </s>
|
funcom_train/18805675 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long calculateSegmentNumber(long millisecond) {
if (millisecond >= SegmentedTimeline.this.startTime) {
return (millisecond - SegmentedTimeline.this.startTime)
/ SegmentedTimeline.this.segmentSize;
}
else {
return ((millisecond - SegmentedTimeline.this.startTime)
/ SegmentedTimeline.this.segmentSize) - 1;
}
}
COM: <s> calculates the segment number for a given millisecond </s>
|
funcom_train/5018508 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TreeItem getTreeSelection(final Tree tree) {
final TreeItem datasourceTreeItem = getTreeTester().getSelection(tree)[0];
abbot.tester.swt.Robot.syncExec(getDisplay(), this, new Runnable() {
public void run() {
tree.showItem(datasourceTreeItem);
}
});
return datasourceTreeItem;
}
COM: <s> returns the top item of a tree </s>
|
funcom_train/35193109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void drawAxis(Graphics2D g, PlotFrame plotFrame) {
int height = g.getClipBounds().height;
int width = g.getClipBounds().width;
int yAxisWidth = plotFrame.getYAxisWidth();
g.setColor(Color.BLACK);
g.drawLine(width-yAxisWidth-1, 0, width-yAxisWidth-1, height);
}
COM: <s> this will draw the y axis of this indicator </s>
|
funcom_train/51129706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void lateConstruct(String parName, League[] parLeagues) {
this.name = parName;
this.leagues = parLeagues;
// Give all leagues a link to their owner
for (int i = 0; i < parLeagues.length; i++) {
parLeagues[i].setLeagueOwner(this);
}
// Sort leagues by rank
java.util.Arrays.sort(parLeagues);
}
COM: <s> late construct to finish the league owner </s>
|
funcom_train/50328048 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getByte(int b) {
if ((b >= 0) && (b <= 7)) {
int index = b*2 + _RTRoffset+1;
int hi = getHexDigit(index++);
int lo = getHexDigit(index);
if ((hi < 16) && (lo < 16)) {
return (hi*16 + lo);
}
}
return 0;
}
COM: <s> get a hex data byte from the message </s>
|
funcom_train/43245496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSpEmpStatus() {
System.out.println("getSpEmpStatus");
EmploymentDataDG2Object instance = new EmploymentDataDG2Object();
String expResult = "";
String result = instance.getSpEmpStatus();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get sp emp status method of class org </s>
|
funcom_train/12316827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IStatus removeDocument(String name) {
Term term = new Term(FIELD_NAME, name);
try {
ir.deleteDocuments(term);
indexedDocs.remove(name);
} catch (IOException e) {
return new Status(IStatus.ERROR, HelpBasePlugin.PLUGIN_ID, IStatus.ERROR,
"IO exception occurred while removing document " + name //$NON-NLS-1$
+ " from index " + indexDir.getAbsolutePath() + ".", //$NON-NLS-1$ //$NON-NLS-2$
e);
}
return Status.OK_STATUS;
}
COM: <s> deletes a single document from the index </s>
|
funcom_train/40926503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getEntrarBotonCommand() {
if (entrarBotonCommand == null) {//GEN-END:|65-getter|0|65-preInit
// write pre-init user code here
entrarBotonCommand = new Command("Entrar", Command.SCREEN, 1);//GEN-LINE:|65-getter|1|65-postInit
// write post-init user code here
}//GEN-BEGIN:|65-getter|2|
return entrarBotonCommand;
}
COM: <s> returns an initiliazed instance of entrar boton command component </s>
|
funcom_train/21185725 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PersonSecure getPersonSecure(final Person person) {
PersonSecure personSecure = null;
Query query = managerSecure.createQuery(
"SELECT ps "
+ "FROM PersonSecure ps "
+ "WHERE ps.person = '"
+ person.getPseudoPersonId() + "' ");
try {
personSecure =
(PersonSecure) query.getSingleResult();
} catch (NoResultException e) {
personSecure = null;
}
return personSecure;
}
COM: <s> translate a code person code to its corresponding </s>
|
funcom_train/29884277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String varstatement(String type, String vars) {
//System.out.println("Var statement: " + type + vars);
if (type.equals("var")) {
type = "Object";
} else if (type.equals("globalvar")) {
type = "Object";
}
return "/*var statement{"+vars+"}*/";//type + " "+vars;
}
COM: <s> varstatement called when a varstatement is parsed returns the language code </s>
|
funcom_train/4237356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCrearMenu() {
System.out.println("crearMenu");
CapturaOrdenes instance = new CapturaOrdenes();
Vector menu = instance.crearMenu();
Vector platillos = (Vector)menu.get(1);
int expResult = 84;
int result = platillos.size();
assertEquals(expResult, result);
}
COM: <s> test of crear menu method of class restaurante </s>
|
funcom_train/36536364 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillCurrentHeap() {
heap.removeAllElements();
heapIndices.removeAllElements();
dictionariesManager.startTestWordsIteration();
while(dictionariesManager.hasNextTestWord(TestManager.TRANSCRIPTION)) {
WordRecord word = dictionariesManager.getNextTestWord();
heap.addElement(word);
heapIndices.addElement(dictionariesManager.getCurrentIndex());
}
}
COM: <s> gathers all words for test in one array called heap </s>
|
funcom_train/41318352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put (J k1, K k2, V val) {
Map<K,V> i = contains (k1) ? get (k1) : new HashMap<K,V> ();
i.put (k2, val);
outer.put (k1, i);
}
COM: <s> store val t with key pair k1 k2 </s>
|
funcom_train/50327844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendLocoNetMessage(LocoNetMessage msg) {
if (disposed) {
log.error("Message sent after queue disposed");
return;
}
long sendTime = calcSendTimeMSec();
Memo m = new Memo(msg, sendTime, TimeUnit.MILLISECONDS);
queue.add(m);
}
COM: <s> accept a message to be sent after suitable delay </s>
|
funcom_train/24941031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Exit makeExit(int dataCount, Exit.Type type, String label) {
Exit exit = createExit(dataCount, type, label);
exit.setLatency(Latency.ZERO);
assert !exits.containsKey(exit.getTag()) : "Duplicate Exit tag: "
+ exit.getTag();
exits.put(exit.getTag(), exit);
return exit;
}
COM: <s> makes a new </s>
|
funcom_train/42028629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSaturnRouter(Shape shape, String expr, String lineName){
SaturnRouter router = new SaturnRouter();
router.setId(shape.getId());
router.setKey("".equals(expr)?"":expr);
router.setLineName("".equals(lineName)?Messages.getString("SaturnRouterNode.NoNameLine"):lineName); //$NON-NLS-2$
this.routerList.add(router);
}
COM: <s> saturn router node saturn router </s>
|
funcom_train/17206653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int releaseDiscontiguousChunks(Address chunk) {
if (VM.VERIFY_ASSERTIONS) VM.assertions._assert(chunk.EQ(chunkAlign(chunk, true)));
if (chunk.EQ(lastDiscontiguousRegion)) {
lastDiscontiguousRegion = Map.getNextContiguousRegion(chunk);
}
return Map.freeContiguousChunks(chunk);
}
COM: <s> release one or more contiguous chunks associated with a discontiguous </s>
|
funcom_train/50774014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getMOPClass(InjectJModel model, String classname) {
TypeDeclaration recoderClass =
(TypeDeclaration) allClasses.get(classname);
if (recoderClass == null)
return null;
AbstractWeavepoint result = null;
if (recoderClass instanceof InterfaceDeclaration)
result = new RecoderSourceInterface(null, (InterfaceDeclaration)recoderClass);
else if(recoderClass instanceof ClassDeclaration)
result = new RecoderSourceClass(null, (ClassDeclaration)recoderClass);
assert(result != null);
result.setModel(model);
return result;
}
COM: <s> returns the inject j representation of a previously parsed class </s>
|
funcom_train/1663861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void propertyChange(final PropertyChangeEvent evt) {
if("dividerLocation".equals( evt.getPropertyName() )) {
if(System.currentTimeMillis() - lastChange < 500) {
lastChange = System.currentTimeMillis();
return;
}
lastChange = System.currentTimeMillis();
folded = !folded;
if(folded) {
detailPanel.getPanel().setVisible(false);
mainPanel.setDividerLocation(1);
} else {
detailPanel.getPanel().setVisible(true);
mainPanel.setDividerLocation(QueueWatcher.DIVIDER_LOCATION);
}
}
}
COM: <s> called when the split bar position changes </s>
|
funcom_train/49263243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateStatusBar() {
TaskManager manager = TaskManager.getInstance();
ArrayList<Task> tasks = manager.getCurrentTasks();
boolean currentDoing = !tasks.isEmpty();
if (!currentDoing) {
pbTasks.setVisible(false);
pbTasks.setSelection(0);
btInterrupt.setVisible(false);
currentTask = null;
} else {
currentTask = tasks.get(0);
updateProgressBar(currentTask);
pbTasks.setVisible(true);
btInterrupt.setVisible(true);
}
}
COM: <s> updates status bar when a task has started or finished </s>
|
funcom_train/50899258 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean store(JDCConnection oConn) throws SQLException {
java.sql.Timestamp dtNow = new java.sql.Timestamp(DBBind.getTime());
if (isNull(DB.gu_address)) put(DB.gu_address, Gadgets.generateUUID());
if (isNull(DB.bo_active)) put(DB.bo_active, (short)1);
replace(DB.dt_modified, dtNow);
return super.store (oConn);
} // store()
COM: <s> p store address p </s>
|
funcom_train/35355101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getPropertyValue(final String value, final String name) {
if (null != value) {
return value;
}
ValueExpression ve = getValueExpression(name);
if (ve != null) {
return (String) ve.getValue(getFacesContext().getELContext());
} else {
return null;
}
}
COM: <s> return property value </s>
|
funcom_train/15488987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DomoDeviceServiceLinkedServiceInput addLinkedServiceInput(String from, String to, String value) {
DomoDeviceServiceLinkedServiceInput serviceLinkedServiceInput = new DomoDeviceServiceLinkedServiceInput(
(DocumentImpl) this.ownerDocument, from, to, value);
appendChild(serviceLinkedServiceInput);
// return the input Element
return serviceLinkedServiceInput;
}
COM: <s> add a couple of input names to be made in relation </s>
|
funcom_train/1953356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addClientPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CmdEngine_client_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CmdEngine_client_feature", "_UI_CmdEngine_type"),
EnginePackage.Literals.CMD_ENGINE__CLIENT,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the client feature </s>
|
funcom_train/22362809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getItemReserveRelations(ItemType itemType) {
List ret = CollectionFactory.createArrayList(getRelations().size());
for(Iterator iter = getRelations(ReserveRelation.class).iterator(); iter.hasNext();) {
ReserveRelation rel = (ReserveRelation) iter.next();
if(rel.itemType.equals(itemType)) {
ret.add(rel);
}
}
return ret;
}
COM: <s> returns a collection of the reserve relations concerning the given item </s>
|
funcom_train/50446454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void usage() {
System.err.println("Usage: tarproxy [OPTIONS]\n");
// System.out.println(" --tarproxy_home=TARPROXY_INSTALLATION_DIR "
// + "(required)");
// System.out.println(" specifies "
// + "TarProxy's home directory\n");
System.err.println(" -c, --checkconfig validates configuration "
+ "only (doesn't start TarProxy)");
System.err.println(" -?, --help displays this message");
}
COM: <s> displays usage information </s>
|
funcom_train/895601 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getAddEditRemovePanel() {
if (addEditRemovePanel == null) {
addEditRemovePanel = new JPanel();
addEditRemovePanel.add(getAddButton(), null);
addEditRemovePanel.add(getEditButton(), null);
addEditRemovePanel.add(getRemoveButton(), null);
}
return addEditRemovePanel;
}
COM: <s> this method initializes add edit remove panel </s>
|
funcom_train/1444246 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Long getMin(int maxItems) {
if (this.length() == 0)
return null;
if (!(this.getLast() instanceof Long)) {
return null;
}
long min = Long.MAX_VALUE;
for (int i = 0; i < Math.min(this.length(), maxItems); i++) {
if ((Long) this.getLast(i) < min)
min = (Long) this.getLast(i);
}
return min;
}
COM: <s> gets the minimum value of a ring list long </s>
|
funcom_train/28170489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int read() throws IOException {
// rlw
int data;
if (unread.size() > 0) {
data = ((Integer) unread.lastElement()).intValue();
unread.removeElementAt(unread.size() - 1);
} else {
data = reader.read();
}
if (data != -1) { readpos++; }
return data;
}
COM: <s> read the next character </s>
|
funcom_train/36799870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Role readRole(String loginUser, String role) throws DataAccessException {
Role r;
Log.write("Enter", Log.INFO, "readRole", KasaiFacade.class);
r = readRole(role);
Log.write("Exit", Log.INFO, "readRole", KasaiFacade.class);
return r;
}
COM: <s> read a role </s>
|
funcom_train/40722821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeFieldWidgets(String fieldName) {
List<FieldInfo<?>> fields = getFieldInfo(fieldName);
if (fields != null) {
for (FieldInfo<?> field : fields) {
Widget w = field.getWidget();
if (w instanceof HasWidgets) {
HasWidgets h = (HasWidgets) w;
h.clear();
}
}
}
}
COM: <s> removes all child widgets from the field with the specified name </s>
|
funcom_train/46857431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getChkEnabled() {
if (chkEnabled == null) {
chkEnabled = new JCheckBox();
chkEnabled.setText("Enabled");
chkEnabled.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent e) {
currentAccident.setEnabled(chkEnabled.isSelected());
}
});
}
return chkEnabled;
}
COM: <s> this method initializes chk enabled </s>
|
funcom_train/48784654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void create(DeploymentInfo sdi) throws DeploymentException {
log.getCategory().l7dlog(
Priority.INFO,
Constants.ABOUT_TO_CREATE_AXIS_0,
new Object[] { sdi },
null);
if (deployments.containsKey(sdi.url)) {
throw new DeploymentException(
"attempting to redeploy a depoyed module! " + sdi.url);
} else {
deployments.put(sdi.url, sdi);
}
}
COM: <s> describe code create code method here </s>
|
funcom_train/44840861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isWriteable() {
if (_sailList.size() > 0) {
SailConfig topSail = (SailConfig)_sailList.get(0);
try {
Class sailClass = Class.forName(topSail.getSailClass());
return RDF_REPOSITORY_CLASS.isAssignableFrom(sailClass);
}
catch (ClassNotFoundException ignore) {}
}
return false;
}
COM: <s> checks if this repository is writeable </s>
|
funcom_train/18480144 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSane(double a) {
if (GeomUtils.eq(a,Math.ceil(a))) a = Math.ceil(a) ;
else if (GeomUtils.eq(a,Math.floor(a))) a = Math.floor(a) ;
if (a == -0) a = 0 ;
setObject(""+a) ;
}
COM: <s> stops all this </s>
|
funcom_train/8492534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStatic(boolean value) {
if (value) { // static
if (isStatic) {
Utility.error("OPTIMIZATION Object already static : "
+ "setStatic( bool ) in Sprite",
"Sprite.setStatic(bool)#!dinamic");
} else
isStatic = true;
} else { // dinamic
if (!isStatic) {
Utility.error("OPTIMIZATION Object already dinamic : "
+ "setStatic( bool ) in Sprite",
"Sprite.setStatic(bool)#dinamic");
} else
isStatic = false;
}
}
COM: <s> sets to use the static image br </s>
|
funcom_train/50903193 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeTranslations(Map m) throws IOException {
if((m == null) || (m.size() == 0)) {
return;
}
write("TRANSLATION");
newLine();
List sorted = CollectionFactory.createLinkedList(m.keySet());
Collections.sort(sorted);
for(Iterator iter = sorted.iterator(); iter.hasNext();) {
String key = (String) iter.next();
String value = (String) m.get(key);
writeQuotedTag(value, key);
}
}
COM: <s> write the translation table to underlying stream </s>
|
funcom_train/46791420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Iterator entryIterator() {
return new Iterator() {
private Iterator it = getObjects().entrySet().iterator();
public boolean hasNext() {
return it.hasNext();
}
public Object next() {
Map.Entry entry = (Map.Entry) it.next();
return new Entry((COSName) entry.getKey(),
(COSDocumentElement) entry.getValue());
}
public void remove() {
throw new UnsupportedOperationException();
}
};
}
COM: <s> an iterator over all entries returning a collection of </s>
|
funcom_train/3276795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long argsLongObjectLongLongArg(long a, Object obj, long b, long c) {
LOG.debug("public long argsLongObjectLongLongArg(long a, Object obj, long b, long c)");
nap();
return (a + b + c) + obj.hashCode();
}
COM: <s> method args long object long long arg </s>
|
funcom_train/41085791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getResultList(int firstIndex, int resultCount) {
if (reportMaxCount != null && firstIndex + resultCount > reportMaxCount.intValue()) {
resultCount = reportMaxCount.intValue() - firstIndex;
}
query.setFirstResult(firstIndex);
query.setMaxResults(resultCount);
return query.getResultList();
}
COM: <s> returns a page of the query results by calling code javax </s>
|
funcom_train/23279316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addLaunchBoardFile(LaunchBoard lb, LaunchFile file){
if(!validateClass(lb)) throw new ARISException("Invalid Launch Board");
updateFile(file);
lb = getLaunchBoard(lb.getId());
lb.getFiles().add(file);
getHibernateTemplate().update(lb);
}
COM: <s> adds the launch file to the database and updates the launch board </s>
|
funcom_train/50444174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsReference(WordAggregation aggr) {
boolean contains = false;
Text[] textObjectsOfAggr = aggr.getAggregation();
for (int i = 0; i < textObjectsOfAggr.length && !contains; i++) {
if (textObjectsOfAggr[i] instanceof WordAggregation) {
contains = containsReference(
(WordAggregation)textObjectsOfAggr[i]);
}
else {
contains = textObjectsOfAggr[i] instanceof Reference;
}
}
return contains;
} // containsReference
COM: <s> this method tests if the provided word aggregation contains any </s>
|
funcom_train/3395323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PackageDocImpl lookupPackage(String name) {
//### Jing alleges that class check is needed
//### to avoid a compiler bug. Most likely
//### instead a dummy created for error recovery.
//### Should investigate this.
PackageSymbol p = syms.packages.get(names.fromString(name));
ClassSymbol c = getClassSymbol(name);
if (p != null && c == null) {
return getPackageDoc(p);
} else {
return null;
}
}
COM: <s> look up package doc by qualified name </s>
|
funcom_train/19746521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected MimeMessage createMessage(String from, String subject, String[] to, String[] cc, String[] bcc, String templateIdentifier, String locale, Map model) throws BeanNotFoundException, VelocityException {
return createMessage(from, subject, to, cc, bcc, templateIdentifier, locale, model, true);
}
COM: <s> creates simple or mime message according to templates mime type </s>
|
funcom_train/48131261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute(IRichText richText) {
if (richText != null) {
AddLinkDialog dialog = new AddLinkDialog(Display.getCurrent()
.getActiveShell(), richText.getBasePath());
dialog.open();
if (dialog.getReturnCode() == Window.OK) {
String linkURL = dialog.getLink().getURL();
if (linkURL.length() > 0) {
richText.executeCommand(RichTextCommand.ADD_LINK, linkURL);
}
}
}
}
COM: <s> executes the action </s>
|
funcom_train/17588037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CIObj pointsTo(CIObj obj, jq_Field field) {
if (!relHFH.isOpen())
relHFH.load();
Set<Quad> pts = new HashSet<Quad>();
for (Quad site : obj.pts) {
RelView view = relHFH.getView();
view.selectAndDelete(0, site);
view.selectAndDelete(1, field);
Iterable<Quad> res = view.getAry1ValTuples();
for (Quad inst : res)
pts.add(inst);
view.free();
}
return new CIObj(pts);
}
COM: <s> provides the abstract object to which a given instance field </s>
|
funcom_train/14354277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel6() {
if (jPanel6 == null) {
jLabel21 = new JLabel();
jLabel21.setBounds(new Rectangle(9, 8, 28, 16));
jLabel21.setText("Filter");
jPanel6 = new JPanel();
jPanel6.setLayout(null);
jPanel6.setPreferredSize(new Dimension(100, 32));
jPanel6.add(getTxtFilter(), null);
jPanel6.add(jLabel21, null);
}
return jPanel6;
}
COM: <s> this method initializes j panel6 </s>
|
funcom_train/3749025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setActions(final Map actionsParam) {
if (logger.isDebugEnabled()) {
logger.debug("setActions(Map actionsParam = " + actionsParam
+ ") - start");
}
this.actions = actionsParam;
if (logger.isDebugEnabled()) {
logger.debug("setActions(Map) - end");
}
}
COM: <s> this method should only ever be called by the request processor </s>
|
funcom_train/3944337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean above(Point pt) {
if (pt == null || !Point.isValidTriple(pt)) {
throw new IllegalArgumentException(
"above() called with Point that is either null or not valid.");
}
double result;
result = (a * pt.getX()) + (b * pt.getY()) + (c * pt.getZ()) - d;
return (result > 0.0f);
}
COM: <s> does a point lie above the plane </s>
|
funcom_train/25893332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getProbability(String tag, Item item) {
// TODO Modify the multimap to deal with the Probability Distribution
Map<String, ProbabilityDistribution<Item>> eD = tagEquipmentDistribution_
.get(tag);
if (eD != null) {
ProbabilityDistribution<Item> items = eD.get(item.getClass()
.getSimpleName());
if (items != null) {
return items.getProb(item);
}
}
return -1;
}
COM: <s> gets the probability of a particular item being chosen </s>
|
funcom_train/16524583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point locationOf(Tile t) {
for (int y = bounds.y; y < bounds.height + bounds.y; y++) {
for (int x = bounds.x; x < bounds.width + bounds.x; x++) {
if (getTileAt(x, y) == t) {
return new Point(x, y);
}
}
}
return null;
}
COM: <s> returns the first occurance using top down left to right search of </s>
|
funcom_train/11010444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addTitle() {
if (!propsPart.getTitleProperty().hasValue())
return;
Element elem = xmlDoc.getRootElement().element(
new QName(KEYWORD_TITLE, namespaceDC));
if (elem == null) {
// missing, we add it
elem = xmlDoc.getRootElement().addElement(
new QName(KEYWORD_TITLE, namespaceDC));
} else {
elem.clearContent();// clear the old value
}
elem.addText(propsPart.getTitleProperty().getValue());
}
COM: <s> add title property if needed </s>
|
funcom_train/3845869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean matches(AudioFormat format) {
if (format.sampleRate != sampleRate) {
return false;
}
if (format.bitsPerSample != bitsPerSample) {
return false;
}
if (format.channels != channels) {
return false;
}
if (format.signed != signed) {
return false;
}
if (format.bigEndian != bigEndian) {
return false;
}
return true;
}
COM: <s> tests if the given audio format matches with this one </s>
|
funcom_train/8244256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private TextView getGenericView() {
// setting layout
AbsListView.LayoutParams lp = new AbsListView.LayoutParams(
ViewGroup.LayoutParams.FILL_PARENT, // width
64 // height
);
TextView textView = new TextView(_menuView);
textView.setLayoutParams(lp);
textView.setPadding(36, 0, 0, 0);
return textView;
}
COM: <s> sets layout of a text view </s>
|
funcom_train/329099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double distanceToMiles(LatLong destination) {
double dist = Math.pow(60 * (latitude - destination.latitude), 2);
double meanLat = (latitude + destination.latitude) / 2 * Math.PI / 180;
double dist2 = Math.pow(60 * Math.cos(meanLat) * (longitude - destination.longitude), 2);
return Math.sqrt(dist + dist2);
}
COM: <s> calculate the distance from this positions to some other </s>
|
funcom_train/19810779 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCollaborationTypes(String collaborationTypes) {
this.collaborationTypes = collaborationTypes;
this.collaboration.setCollaborationTypes(new CollaborationTypes());
this.collaboration.getCollaborationTypes().getCollaborationType().addAll(
XmlLoader.splitStringToList(this.collaborationTypes, "\n"));
}
COM: <s> set a string that represents collaboration types </s>
|
funcom_train/39170452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void deleteRecursively(File fileOrDir) throws IOException {
if(fileOrDir.isDirectory()) {
for(File f : fileOrDir.listFiles()) {
deleteRecursively(f);
}
}
if(!fileOrDir.delete()) { throw new IOException("Couldn't delete "
+ (fileOrDir.isDirectory() ? "directory " : "file ") + fileOrDir); }
}
COM: <s> delete a file or directory </s>
|
funcom_train/1304068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Segment findLastWithFeature(String feature, Boolean value, int startPos, int endPos) {
Segment result = null;
for (int i = endPos - 1; i >= startPos; --i) {
final Segment segment = segments.get(i);
if (segment.hasFeature(feature, value)) {
result = segment;
break;
}
}
return result;
}
COM: <s> find the last segment with the given feature at or after the start </s>
|
funcom_train/22278874 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMenu(Menu aMenu) {
java.awt.MenuBar menuBar;
menu = aMenu;
if (!menu.isTopLevel()) {
throw new InconsistencyException("menu must be main menu");
}
menu.setApplication(rootView().application());
menuBar = menu.awtMenuBar();
if (awtWindow != null) {
((FoundationFrame) awtWindow).setMenuBar(menuBar);
}
}
COM: <s> sets the external windows menu </s>
|
funcom_train/21611708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testParsePrepositionPredicateConstBodyDeclarationString() throws MUParserException {
ParseTree pt = parser.parse("preposition", "PredicateDeclaration( ) : \"Const String\" ; ");
System.out.println("parse tree: " + pt);
checkParsing(
pt,
"predicate_name", "(", ")",
":",
"const",
";"
);
}
COM: <s> tests parsing of predicate const body declaration </s>
|
funcom_train/44802669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getReferenceObject(String attributeName, Object id) {
if (attributeName == null) {
throw new IllegalArgumentException("AttributeName must be not null");
}
if (id == null) {
throw new IllegalArgumentException("ID must be not null");
}
if (referenceMap == null){
return null;
}
Map<Object, Object> m = referenceMap.get(attributeName);
if (m == null) {
return null;
}
return m.get(id);
}
COM: <s> get reference object by attribute name and object id </s>
|
funcom_train/39885657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean renameTo(File newPath) {
if (path.isEmpty() || newPath.path.isEmpty()) {
return false;
}
SecurityManager security = System.getSecurityManager();
if (security != null) {
security.checkWrite(path);
security.checkWrite(newPath.path);
}
return renameToImpl(absolutePath, newPath.absolutePath);
}
COM: <s> renames this file to </s>
|
funcom_train/2422570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTransferType(FtpTransferType type) {
FtpTransferType old;
synchronized (getDataLock()) {
old = getTransferType();
setProperty(PROPERTY_TRANSFER_TYPE, String.valueOf(type.getId()));
}
if (type != old) {
firePropertyChange(PROPERTY_TRANSFER_TYPE, old, type);
}
}
COM: <s> sets the transfer type to use for the file transfer </s>
|
funcom_train/43913173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode() {
int result = 17;
result = (23 * result) + ((request == null) ? 0 : request.hashCode());
result = (23 * result) + ((request == null) ? 0 : version.hashCode());
result = (23 * result) + ((request == null) ? 0 : service.hashCode());
return result;
}
COM: <s> generate a hash code based on this request object </s>
|
funcom_train/39131982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
try {
while (currentWindowCount > 1) {
issueCommand("getWindows()[" + (currentWindowCount - 1) + "].close();");
waitForLoadComplete();
}
output.close();
input.close();
jsshSocket.close();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
COM: <s> disconnects from the jssh server by closing the network socket </s>
|
funcom_train/18120367 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setLine(int page, int lineNumber, String newLine) {
SortedMap lines = (SortedMap) pages.get(new Integer(page));
if (lines == null) {
lines = new TreeMap();
pages.put(new Integer(page), lines);
}
lines.put(new Integer(lineNumber), newLine);
}
COM: <s> replace a given line </s>
|
funcom_train/16583155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fieldUp(int pos) {
int nu = pattern.getElements().size();
if (pos > 0 && nu > 1) {
int newpos = pos - 1;
Element[] ad = pattern.getArrayElements();
Element ele21 = ad[pos];
Element ele12 = ad[newpos];
ad[newpos] = ele21;
ad[pos] = ele12;
List<Element> elems = new ArrayList<Element>();
for (int i = 0; i < ad.length; i++) {
elems.add(ad[i]);
}
pattern.setElements(elems);
}
}
COM: <s> this method up the selected element one position in the list of elements </s>
|
funcom_train/13203448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private char map(char ch) {
int index = ch - 'A';
if (index < 0 || index >= this.getSoundexMapping().length) {
//throw new IllegalArgumentException("The character is not mapped: " + ch);
return ch;
}
return this.getSoundexMapping()[index];
}
COM: <s> maps the given upper case character to its soudex code </s>
|
funcom_train/19143434 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Scheduler addScheduler(int numThreads, ArrayList hostServices, final String rpcMode){
for (int i=0; i<hostServices.size(); i++) {
((HostService) hostServices.get(i)).setEndpoint("/termK");
}
//String hostEndpoint = contextList + "/termK";
scheduler = new SchedulerForAssembly(hostServices, rpcMode);
this.numJobs = numThreads;
return scheduler;
}
COM: <s> code add scheduler code creates an assembly scheduler for this kmatrix assembler object </s>
|
funcom_train/36181859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addAll(Collection<? extends ServiceItem> allItems) {
if ((allItems != null) && (!allItems.isEmpty())) {
for (Iterator<? extends ServiceItem> i = allItems.iterator(); i
.hasNext();) {
ServiceItem si = i.next();
// Adjust service item with trust calculation and service name
adjustWithDetail(si);
add(si);
}
logger.debug("Merged " + allItems.size() + " results");
return true;
}
return false;
}
COM: <s> add all the service items in the collection </s>
|
funcom_train/4349202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int evaluateStrategicPosition(Board board, int player) {
int total = 0;
for (int i = 0; i < GameLogic.COLS; i++) {
for (int j = 0; j < GameLogic.ROWS; j++) {
if (board.getMatrix()[i][j] == player) {
total += this.values[i][j];
}
}
}
return total;
}
COM: <s> returns the addition of the values of each position from the perspective </s>
|
funcom_train/10605776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(byte[] buf, int off, int nbytes) {
// avoid int overflow, check null buf
if (off <= buf.length && nbytes >= 0 && off >= 0
&& buf.length - off >= nbytes) {
adler = updateImpl(buf, off, nbytes, adler);
} else {
throw new ArrayIndexOutOfBoundsException();
}
}
COM: <s> update this adler32 checksum with the contents of buf starting from </s>
|
funcom_train/16962435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node getById( Long id, Session session) throws HibernateException {
log.debug("getting Node instance with id: " + id);
Node instance = (Node) session.get("com.brevissimus.smartbpm.model.Node", id);
if (instance == null) {
log.debug("get successful, no instance found");
} else {
log.debug("get successful, instance found");
}
return instance;
}
COM: <s> code node code get by id </s>
|
funcom_train/42643204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addUrlPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_RemoteVocabulary_url_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_RemoteVocabulary_url_feature", "_UI_RemoteVocabulary_type"),
ModelPackage.Literals.REMOTE_VOCABULARY__URL,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the url feature </s>
|
funcom_train/43122691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRandomFile(String s) {
// as a hack, you can use a static file - and genarate the same
// session ids ( good for strange debugging )
try {
devRandomSource = s;
File f = new File(devRandomSource);
if (!f.exists())
return;
randomIS = new DataInputStream(new FileInputStream(f));
randomIS.readLong();
} catch (IOException ex) {
randomIS = null;
}
}
COM: <s> use dev random type special device </s>
|
funcom_train/23853141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showGlobalOptionsDialog(MainWindow window) {
List<View> views = new LinkedList<View>();
for (View view : session.getViewManager().getAllViews()) {
views.add(view);
}
configManager.showGlobalOptionsDialog(window.getFrame(), views, window.getActiveView());
}
COM: <s> shows the global config dialog for all views of all frames </s>
|
funcom_train/46741092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCustomControllerRef(DisplayModel customControllerRef) {
if (Converter.isDifferent(this.customControllerRef, customControllerRef)) {
DisplayModel oldcustomControllerRef= new DisplayModel(this);
oldcustomControllerRef.copyAllFrom(this.customControllerRef);
this.customControllerRef.copyAllFrom(customControllerRef);
setModified("customControllerRef");
firePropertyChange(String.valueOf(APPLICATIONCONTROLS_CUSTOMCONTROLLERREFID), oldcustomControllerRef, customControllerRef);
}
}
COM: <s> custom controller for this control </s>
|
funcom_train/15493637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeRole(Role role) {
for (int i = 0; i < containerList.size(); i++) {
if (((PrincipalContainer)containerList.get(containerList.size() -
(i + 1))).getName().equals(role.getName())) {
containerList.remove(containerList.size() - (i + 1));
break;
}
}
}
COM: <s> this method removes the role from the container list </s>
|
funcom_train/12642095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(byte[] b, int off, int len) {
if (b == null) {
throw new NullPointerException();
}
if (off < 0 || len < 0 || off > b.length - len) {
throw new ArrayIndexOutOfBoundsException();
}
crc = updateBytes(crc, b, off, len);
}
COM: <s> updates crc 32 with specified array of bytes </s>
|
funcom_train/2522937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLocalization(){
String errMsg = "Localization string not found.";
assertTrue(errMsg, ScalarStatsDate.Time.toString().indexOf('!') == -1);
assertTrue(errMsg, ScalarStatsDbl.Max.toString().indexOf('!') == -1);
assertTrue(errMsg, Vector2DStatsDbl.MeanAngle.toString().indexOf('!') == -1);
}
COM: <s> check that localization works properties files are found </s>
|
funcom_train/13991296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Statement cloneVantage() throws AcuityException, IllegalStateException {
Individual frame = controllerInterface.getCurrentFrame();
if (frame == null) return null;
Individual vantage = controllerInterface.getCurrentFocusVantage();
if (vantage == null) return null;
Statement retVal = clone(frame.getURI(), CLONE_VANTAGE_PROPERTY, vantage.getURI());
return retVal;
}
COM: <s> clones the current focus vantage within the frame </s>
|
funcom_train/28417829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(byte[] bytes, int offset, int length) {
for (int i=0; i < algorithms.size(); i++) {
((AbstractChecksum)algorithms.elementAt(i)).update(bytes, offset, length);
}
this.length += length;
}
COM: <s> updates all checksums with the specified array of bytes </s>
|
funcom_train/8408271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Iterator iterator() {
if (this.all.length == 0) {
return EmptyIterator.INSTANCE;
}
IteratorChain chain = new IteratorChain();
for (int i = 0; i < this.all.length; ++i) {
chain.addIterator(this.all[i].iterator());
}
return chain;
}
COM: <s> gets an iterator over all the collections in this composite </s>
|
funcom_train/9526920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public KeywordMap (XmlDocument doc, boolean ignoreCase) {
this (ignoreCase, doc.getRootNode ().children ());
XmlNode node = doc.getRootNode ();
for (int x = 0; x < node.children (); x++) {
add (node.getChild (x).getText (), Token.getKeywordId (node.getChild (x).getValue ("id")));
}
}
COM: <s> creates a new code keyword map code </s>
|
funcom_train/9238037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean callChannelAction(final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sMessage, final String sHost) {
final CallbackOnChannelAction cb = (CallbackOnChannelAction)getCallbackManager().getCallbackType("OnChannelAction");
if (cb != null) { return cb.call(cChannel, cChannelClient, sMessage, sHost); }
return false;
}
COM: <s> callback to all objects implementing the channel action callback </s>
|
funcom_train/41684987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DependencySet getMergeDependency( boolean all ) {
if( !isMerged() || !all )
return mergeDepends;
DependencySet ds = mergeDepends;
Node node = mergedTo;
while( node.isMerged() ) {
ds = ds.union( node.mergeDepends, abox.doExplanation() );
node = node.mergedTo;
}
return ds;
}
COM: <s> get the dependency if this node is merged to another node </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.