__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/40715288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Message createMessage() throws InvalidMessageException {
if (!preserveWhitespace && fragments.size() != 0) {
stripSpacesFromFragments();
}
Message m = (id == null)
? new Message(fragments, properties)
: new Message(id, fragments, properties);
checkForPlaceholdersOverlap(m);
return m;
}
COM: <s> creates a message object using builders current information </s>
|
funcom_train/20240382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCmdDeleteUsuario() {
if (cmdDeleteUsuario == null) {//GEN-END:|174-getter|0|174-preInit
// write pre-init user code here
cmdDeleteUsuario = new Command("Excluir", Command.OK, 0);//GEN-LINE:|174-getter|1|174-postInit
// write post-init user code here
}//GEN-BEGIN:|174-getter|2|
return cmdDeleteUsuario;
}
COM: <s> returns an initiliazed instance of cmd delete usuario component </s>
|
funcom_train/2759375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getResourceAbsoluteName(String resource) {
String testCaseName = getClass().getName();
int dotIdx = testCaseName.lastIndexOf('.');
if(dotIdx == -1) {
return resource;
} else {
return testCaseName.substring(0,dotIdx+1).replace('.','/') + resource;
}
}
COM: <s> returns the absolute name of the supplied resource </s>
|
funcom_train/26278309 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNumberOfFinishedFiles() {
int finished=0;
for(int i=0;i<this._subItemList.size();i++) {
LgTransferQueueSubItem current=(LgTransferQueueSubItem)this._subItemList.get(i);
if(current.getStatus()==LgTransferQueueItem.STATUS_ITEM_FINISHED) finished++;
}
return finished;
}
COM: <s> gets the number of finished sub items so far </s>
|
funcom_train/3593821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUpImage() {
if (properties != null){
String imagepath = (String) properties.get(NConstants.ImagePath);
if (imagepath != null) {
//we need to process the image path to make it suitable for unix. Assume that it will be in windows format in the stylsheet
String neutralImagePath = imagepath.replace('\\', System.getProperty("file.separator").charAt(0));
setImage(image = new ImageIcon(neutralImagePath));
}
}
}
COM: <s> use the imagepath specified in the properties component to data to </s>
|
funcom_train/49333051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setActivityChooserPolicyIfNeeded() {
if (mOnShareTargetSelectedListener == null) {
return;
}
if (mOnChooseActivityListener == null) {
mOnChooseActivityListener = new ShareAcitivityChooserModelPolicy();
}
ActivityChooserModel dataModel = ActivityChooserModel.get(mContext, mShareHistoryFileName);
dataModel.setOnChooseActivityListener(mOnChooseActivityListener);
}
COM: <s> set the activity chooser policy of the model backed by the current </s>
|
funcom_train/8080377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String prefix() throws Exception {
StringBuffer text;
text = new StringBuffer();
if (m_isLeaf) {
text.append("["+m_localModel.dumpLabel(0,m_train)+"]");
}else {
prefixTree(text);
}
return text.toString();
}
COM: <s> returns tree in prefix order </s>
|
funcom_train/27827075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void printSuperConceptRef(Concept concept) throws KAONException {
m_xmlWriter.openTagIndent(Namespaces.RDFS_NS + "subClassOf", true);
m_xmlWriter.printAttributeURI(Namespaces.RDF_NS + "resource", concept.getURI());
m_xmlWriter.closeLastTag();
}
COM: <s> prints a rdfs sub class of reference to a superconcept </s>
|
funcom_train/10836283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DynamicRepositoryClassLoader reinstantiate(Session session, ClassLoader parent) {
log.debug("reinstantiate: Copying {} with parent {}", this, parent);
if (destroyed) {
throw new IllegalStateException("Destroyed class loader cannot be recreated");
}
// create the new loader
DynamicRepositoryClassLoader newLoader =
new DynamicRepositoryClassLoader(session, this, parent);
// return the new loader
return newLoader;
}
COM: <s> reinstantiates this class loader </s>
|
funcom_train/40427089 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
try {
sm = gsl.getSSOSessionManager();
im = gsl.getSSOIdentityManager();
ip = gsl.getSSOIdentityProvider();
if (debug > 0)
log("Agent Started");
} catch (Exception e) {
log("Can't create session/identity managers : \n" + e.getMessage(), e);
}
}
COM: <s> starts the agent </s>
|
funcom_train/15912728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void moveSelf() {
/**
* V tejto metóde sa menia súradnice, poloha, objektu
*/
double oldX=this.x, oldY=this.y, oldZ=this.z;
this.moveBy(this.moveVect);
double newX=this.x, newY=this.y, newZ=this.z;
for (ICanAcceptNotification objekt: this.notifiedObjects) {
objekt.notifyAboutChangetCoordinates(oldX, oldY, oldZ, newX, newY, newZ);
}
}
COM: <s> moves object by its move vector used in spring algorithmimplementation </s>
|
funcom_train/46458176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void zoomOut() {
double dx = xmax-xmin;
double dy = ymax-ymin;
setPreferredMinMax(xmin-dx/2, xmax+dx/2, ymin-dy/2, ymax+dy/2);
validImage = false;
selectionBox.setSize(0, 0);
repaint();
}
COM: <s> zooms out by a factor of two </s>
|
funcom_train/50613209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void performINITING() throws UserException, CouldNoLoadEngineException {
cat.info("engine initing");
notifyObservers(EngineEvent.EV_TO_INIT);
state = STATE_INITING;
solver = config.loadSolver();
createInstantiationTree();
iterLimit = config.getIntProperty("engine.iterLimit");
iterPeriod = config.getIntProperty("engine.log.period");
init();
iter = 1;
runtime = Runtime.getRuntime();
//
// initialize the network. this will initialize the whole network
// traversing recursively all pages
//
rootPage.init();
// initialization completed successfully
state = STATE_PAUSED;
notifyObservers(EngineEvent.EV_INIT);
postMessage(EngineMessage.REPLY_INIT);
notifyObservers(EngineEvent.EV_PAUSE);
}
COM: <s> performs the init state </s>
|
funcom_train/43467232 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAppendTwo() {
ToStringBuilder b = new ToStringBuilder(this);
b.append("fred", "flintstone");
b.append("barney", "rubble");
assertEquals("ToStringBuilderTest [fred='flintstone',barney='rubble']", b.toString());
}
COM: <s> tests appending of 2 fields </s>
|
funcom_train/41665523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPersistenceRelativePath() {
if (persistenceRelativePath == null) {
if (!isExtension() && isPersistent()
&& getPersistenceType().equals("xml")) {
return "data/xml/" + getDomainConfig().getCodeInLowerLetters()
+ Config.SEPARATOR + getCodeInLowerLetters();
}
}
return persistenceRelativePath;
}
COM: <s> gets the persistence relative path relative to classes </s>
|
funcom_train/9799624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void warning(SAXParseException e) throws SAXException {
logger.warn("Error");
String message = "** Parsing error" +
", line " + e.getLineNumber() +
", uri " + e.getSystemId() +
"\n" + e.getMessage();
Exception err = new Exception(message);
recordError(err);
}
COM: <s> sax callback for warning when parsing exceptions are encountered </s>
|
funcom_train/36667334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addOutPortPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SynchroConnection_outPort_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SynchroConnection_outPort_feature", "_UI_SynchroConnection_type"),
DataflowSchemePackage.Literals.SYNCHRO_CONNECTION__OUT_PORT,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the out port feature </s>
|
funcom_train/49104162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeBusForm(String id) {
for (int i = 0; i < busFormList.size(); i++) {
DummyBusForm form = (DummyBusForm)busFormList.get(i);
if (id.equals(form.getId())) {
busFormList.remove(i);
IpssLogger.getLogger().info("Bus removed, id: " + form.getId());
return;
}
}
}
COM: <s> remove the bus form object with the id from the container </s>
|
funcom_train/8353522 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ReadFuture newReadFuture() {
Queue<ReadFuture> readyReadFutures = getReadyReadFutures();
Queue<ReadFuture> waitingReadFutures = getWaitingReadFutures();
ReadFuture future;
synchronized (readyReadFutures) {
future = waitingReadFutures.poll();
if (future == null) {
future = new DefaultReadFuture(this);
readyReadFutures.offer(future);
}
}
return future;
}
COM: <s> todo add method documentation </s>
|
funcom_train/13244337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(IAction action) {
// eseguo il comando di GET -- scarica in locale ma non lo sincronizza con lo stato attuale che ho in remoto
if (m_selection != null && !m_selection.isEmpty()){
RsyncPlugin.setProjectName(getProjectName());
} else {
RsyncPlugin.setProjectName("-1");
}
RsyncPlugin.execRsyncCommand("Downloading from remote server...",5);
}
COM: <s> the action has been activated </s>
|
funcom_train/13501001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getChildren() {
if (m_objectChildren == null) {
m_objectChildren = new ArrayList();
for (int i = 0; i < m_children.size(); i++) {
DivNode child = (DivNode) m_children.get(i);
if (child.getSIPContent() == null)
m_objectChildren.add(child);
}
}
return m_objectChildren;
}
COM: <s> return div node children that are objects </s>
|
funcom_train/20889247 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LayerState getState() {
PhysicalLayerParameter param = new PhysicalLayerParameter(
this.signalStrength, this.minSignalStrength, this.maxSignalStrength,
this.channelCount, this.minFrequency, this.maxFrequency);
return new PhysicalLayerState(PHY_802_11bg.timings, param, this.radioState, 0,
this.signalStrength);
}
COM: <s> used to obtain information about the current state settings of the 802 </s>
|
funcom_train/31936817 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setToolBarVisible(boolean isVisible) {
if (isVisible) {
if (toolBarManager == null)
toolBarManager = createToolBarManager(JToolBar.HORIZONTAL);
}
else {
if (toolBarManager != null) {
JComponent contentPane= (JComponent)getContentPane();
JComponent toolbar= (JComponent)toolBarManager.getContribution();
contentPane.remove(toolbar);
}
}
}
COM: <s> configures this window to have a tool bar </s>
|
funcom_train/22850595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getDirectionVariance(Tuple3d tuple)
{
tuple.x = (squareSumDirectionX - (sumDirectionX * sumDirectionX)) / rayCount;
tuple.y = (squareSumDirectionY - (sumDirectionY * sumDirectionY)) / rayCount;
tuple.z = (squareSumDirectionZ - (sumDirectionZ * sumDirectionZ)) / rayCount;
}
COM: <s> this methods returns the variance of the light direction not normalized </s>
|
funcom_train/45232141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getMniStati() {
if (mniStati == null) {
mniStati = new JMenuItem();
mniStati.setText(Messages.getString("VcMainFrame.mnuState")); //$NON-NLS-1$
mniStati.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
openAnaStati();
}
});
}
return mniStati;
}
COM: <s> this method initializes mni stati </s>
|
funcom_train/38562580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void read(MappedByteBuffer inputBuf) throws IOException, IncorrectFileFormatException{
signature = inputBuf.getInt();
// Check the specified file is an RG File
if(signature != 8271)
throw new IncorrectFileFormatException("RG File");
numstates = inputBuf.getInt();
statearraysize = inputBuf.getInt();
numtransitions = inputBuf.getInt();
transitionrecordsize = inputBuf.getInt();
offsettotransitions = inputBuf.getLong();
}
COM: <s> read in the contents of the reachabiliyt graph header from a specified buffer </s>
|
funcom_train/47140805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void logCloseSalesPoint() {
class T extends LogEntry implements Loggable {
private String name = null;
public T(String name) {
this.name = name;
}
public LogEntry getLogData() { return this; }
public String toString() {
return "SalesPoint " + name + " was closed " + getLogDate() + ".";
}
}
log (new T(getName()));
}
COM: <s> log the closing of the sales point </s>
|
funcom_train/2467134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVisible(boolean isVisible)
{
if(isVisible)
{
this.pack();
if(isSaveSizeAndLocation)
this.setSizeAndLocation();
else
{
this.pack();
this.setCenterLocation();
}
JButton button = this.getRootPane().getDefaultButton();
if(button != null)
button.requestFocus();
}
super.setVisible(isVisible);
}
COM: <s> overwrites the set visible method in order to set the size and the </s>
|
funcom_train/10616683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInvalidKeyException01() {
InvalidKeyException tE = new InvalidKeyException();
assertNull("getMessage() must return null.", tE.getMessage());
assertNull("getCause() must return null", tE.getCause());
}
COM: <s> test for code invalid key exception code constructor assertion </s>
|
funcom_train/36909853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insert(HolderItem item, String key, RuleSet value) {
// check others and if so, insert item
if (item == HolderItem.OTHER) {
others.add(value);
return;
}
// create list if empty
Map<String, List<RuleSet>> map = items.get(item.type);
List<RuleSet> list = map.get(key);
if (list == null) {
list = new ArrayList<RuleSet>();
map.put(key, list);
}
list.add(value);
}
COM: <s> inserts ruleset into group identified by holder type and optionally </s>
|
funcom_train/45865310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String loadCourse() {
if ( selectedCourse != null && selectedCourse.getId() > 0 ) {
course = courseManager.get( selectedCourse.getId() );
selectedCourse = null;
}
else if ( course != null && course.getId() > 0 ) {
// no action
}
else if ( courseId != null ) {
course = courseManager.get( courseId );
courseId = null;
return "success";
}
else {
return "invalid";
}
return null;
}
COM: <s> consider three cases </s>
|
funcom_train/48210774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean fireDbChildPreRemove(int oldIndex, SQLObject oldChild) {
int[] oldIndexArray = new int[1];
oldIndexArray[0] = oldIndex;
List<SQLObject> oldChildList = new ArrayList<SQLObject>(1);
oldChildList.add(oldChild);
return fireDbChildrenPreRemove(oldIndexArray, oldChildList);
}
COM: <s> convenience method for </s>
|
funcom_train/15741564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void execQueue() {
List<IActivityDataObject> activityDataObjects = new ArrayList<IActivityDataObject>();
for (TimedActivityDataObject timedActivity : incomingQueues
.removeActivities()) {
activityDataObjects.add(timedActivity.getActivity());
}
sarosSession.exec(activityDataObjects);
}
COM: <s> executes all activity data objects that are currently in the queue </s>
|
funcom_train/51700356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void prepareDescriptionColumn() {
// namensspalte mit renderer und editor bestücken
CreateIndexCellRenderer renderer = new CreateIndexCellRenderer();
mIndexTable.getColumnModel().getColumn(1)
.setHeaderValue(mBundle.getObject("tableheader.description"));
TableColumn col2 = mIndexTable.getColumnModel().getColumn(1);
TableCellEditor edit2 = new SimpleTableCellEditor(mIndexTable);
col2.setCellRenderer(renderer);
col2.setCellEditor(edit2);
}
COM: <s> prepares the description column with renderer and editor </s>
|
funcom_train/43570781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ManualRequestEditorDialog getResendDialog() {
if (resendDialog == null) {
resendDialog = new ManualRequestEditorDialog(getView().getMainFrame(), false, true, this);
resendDialog.setTitle(Constant.messages.getString("manReq.resend.popup")); // ZAP: i18n
}
return resendDialog;
}
COM: <s> this method initializes resend dialog </s>
|
funcom_train/8487011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void revert(Goban goban) throws BadGobanStateException{
if(goban.getCase(line, column) != this.after){
throw new BadGobanStateException("Cannot apply this modification to the goban, since the after state is not right.");
} else {
goban.setCase(line, column, before);
}
}
COM: <s> reverse patches the given goban from em after em to em before em </s>
|
funcom_train/36003206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setEsbParameters() {
getParameters().put("proxyTargetType", "ESBSERVICE");
EsbServiceParameters esbParameters = new EsbServiceParameters();
esbParameters.setCategory("fooCategory");
esbParameters.setName("barName");
esbParameters.add(getParameters());
}
COM: <s> generate a set of esb service parameters </s>
|
funcom_train/50688219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPrimaryLangCode() {
String primary = null;
Iterator it = this.getUserLangList().iterator();
while (it.hasNext()) {
UserLang temp = (UserLang) it.next();
if (temp.getPrimaryFlag().shortValue() > 0)
primary = temp.getLang().getCode();
}
return primary;
}
COM: <s> returns the language code that is primary for this user </s>
|
funcom_train/22526155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setEditorPartActions(ILDEditorPart part) {
IActionBars actionBars = getActionBars();
// Ask the given part if it wants to contribute an Action Handler
for(int i= 0; i < ACTIONS.length; i++) {
actionBars.setGlobalActionHandler(ACTIONS[i], part.getGlobalActionHandler(ACTIONS[i]));
}
}
COM: <s> set the actions </s>
|
funcom_train/38159248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isCurrentBuffered(HWDate currentDate) {
HWDate beginDateBuffered = new HWDate(this.getNexusBeginDate());
beginDateBuffered.addDays(-ISCURRENT_BUFFERDAYS);
HWDate endDateBuffered = new HWDate(this.getNexusEndDate());
endDateBuffered.addDays(ISCURRENT_BUFFERDAYS);
if (beginDateBuffered.before(currentDate)
&& endDateBuffered.after(currentDate)) {
return true;
} else {
return false;
}
}
COM: <s> tests to see if person nexus is current </s>
|
funcom_train/32381071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void logAMEvent(String eventName, String eventDesc, String categoryName, Map extendedAttr) {
System.out.println(" AM LOG EVENTS : "+ amLogEvents);
if(amLogEvents.contains(eventName)) {
int retStatus = amEventSender.createAndSendEvent(eventName, eventDesc, categoryName, extendedAttr);
System.out.println(" AM RET STATUS : " + retStatus);
}
}
COM: <s> this method is used to log the access service events </s>
|
funcom_train/41447449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSipServletSendsPublish() throws InterruptedException, SipException, ParseException, InvalidArgumentException {
Thread.sleep(TIMEOUT);
Iterator<String> allMessagesIterator = watcher.getAllMessagesContent().iterator();
logger.info("all messages received : ");
while (allMessagesIterator.hasNext()) {
String message = (String) allMessagesIterator.next();
logger.info(message);
}
for (int i = 0; i < PUBLISH_STATES.length; i++) {
assertTrue(watcher.getAllMessagesContent().contains(PUBLISH_STATES[i]));
}
}
COM: <s> call flow tested see rfc 3903 page 23 </s>
|
funcom_train/20044890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _addRemoteContentProvider() {
boolean res = false;
String[] template = new String[]{"file"};
res = oObj.addRemoteContentProvider("ContentID",(XMultiServiceFactory)tParam.getMSF(),
template,aDoneListener);
tRes.tested("addRemoteContentProvider()",res);
}
COM: <s> adds a remote provider </s>
|
funcom_train/19866503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(FilterConfig filterConfig) throws ServletException {
this.filterConfig = filterConfig;
this.encoding = filterConfig.getInitParameter("encoding");
String value = filterConfig.getInitParameter("ignore");
if (value == null)
this.ignore = true;
else if (value.equalsIgnoreCase("true"))
this.ignore = true;
else this.ignore = value.equalsIgnoreCase("yes");
}
COM: <s> place this filter into service </s>
|
funcom_train/16531784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateVertex(Point u) {
if (u.movement_cost != u.rhs && points.contains(u))
u.setKeys(calculateKey(u));
else if (u.movement_cost != u.rhs && !points.contains(u)) {
u.setKeys(calculateKey(u));
points.add(u);
} else if (u.movement_cost == u.rhs && points.contains(u))
points.remove(u);
}
COM: <s> updates a vertex </s>
|
funcom_train/2624621 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void repaintFromLayer(final PBounds viewBounds, final PLayer repaintedLayer) {
TEMP_REPAINT_RECT.setRect(viewBounds);
viewToLocal(TEMP_REPAINT_RECT);
if (getBoundsReference().intersects(TEMP_REPAINT_RECT)) {
Rectangle2D.intersect(TEMP_REPAINT_RECT, getBoundsReference(), TEMP_REPAINT_RECT);
repaintFrom(TEMP_REPAINT_RECT, repaintedLayer);
}
}
COM: <s> repaint from one of the cameras layers </s>
|
funcom_train/20612771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Set findInputTypeMapping(Class type) {
if (type == null)
return null;
Set mapping= (Set)fInputTypeMapping.get(type.getName());
if (mapping != null)
return mapping;
List classList= computeClassList(type);
mapping= getFirstInputTypeMapping(classList);
if (mapping != null)
return mapping;
return getFirstInputTypeMapping(computeInterfaceList(classList));
}
COM: <s> returns the appropriate configuration element for the given type </s>
|
funcom_train/18070980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertEntry(TermEntry newEntry, int sel) {
if(sel < 0 || sel >= entries.size()){
this.addEntry(newEntry);
}else{
List newEntries = new ArrayList();
Iterator it = entries.iterator();
for(int i = 0; i < sel; i ++){
newEntries.add(it.next());
}
//insert it
newEntries.add(newEntry);
//add last
while(it.hasNext()){
newEntries.add(it.next());
}
entries = newEntries;
}
}
COM: <s> insert new terminal entry into this chunk </s>
|
funcom_train/22684207 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTimeShort() throws SynchronisationException, InvalidModelException, ParserException, RendererException{
String in = "A[hasName hasValue _time(10, 20, 10.0)].";
String expected = "value(a:hasName \"10:20:10\"^^<http://www.w3.org/2001/XMLSchema#time>)";
testValue(in, expected);
}
COM: <s> this test checks for transformation of wsml time short datavalue </s>
|
funcom_train/49469139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkState() {
if (db == null)
throw new IllegalStateException(stateErr);
try {
if (db.isClosed())
throw new IllegalStateException(stateErr);
} catch (SQLException e) {
logPSQLException(e);
throw new IllegalStateException(stateErr+" ("+e.getMessage()+")");
}
if (nObjects < 0)
throw new IllegalStateException(stateErr);
if (callDepth < 0)
throw new IllegalStateException(depthErr);
}
COM: <s> check that this db object hasnt already been closed </s>
|
funcom_train/18597070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(Dbms dbms, String table, String id, ServiceContext context) throws Exception {
deleteDb(dbms, table, id);
if (svnMan == null) { // do nothing
Log.error(Geonet.DATA_MANAGER, "SVN repository for metadata enabled but no repository available");
} else {
svnMan.deleteDir(id, context);
}
}
COM: <s> deletes a metadata record given its id </s>
|
funcom_train/458638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getPackets(long t) {
t -= mMaxAge;
synchronized (mConnections) {
Collection active = mConnections.values();
for (Iterator i = active.iterator(); i.hasNext(); ) {
if (t > ((Connection) i.next()).getLastActivity()) {
i.remove();
}
}
return active;
}
}
COM: <s> get the collection of connections we remember using the </s>
|
funcom_train/23411264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDependantPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_MarketDependency_Dependant_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_MarketDependency_Dependant_feature", "_UI_MarketDependency_type"),
OMPackage.Literals.MARKET_DEPENDENCY__DEPENDANT,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the dependant feature </s>
|
funcom_train/8672623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getContentLength() throws IOException {
if (contentLength > 0) {
return contentLength;
} else if (filterIS != null) {
// Ensure all parts are read
this.getContentIDSet();
// Now get the count from the filter
return filterIS.length();
} else {
return -1; // not backed by an input stream
}
}
COM: <s> if the attachments is backed by an input stream then this </s>
|
funcom_train/2294592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CmsRelationFilter filterInternal() {
CmsRelationFilter filter = (CmsRelationFilter)this.clone();
if (filter.m_types.isEmpty()) {
filter.m_types.addAll(CmsRelationType.getAllInternal());
} else {
filter.m_types = new HashSet(CmsRelationType.filterInternal(filter.m_types));
}
return filter;
}
COM: <s> returns an extended filter with internal type restriction </s>
|
funcom_train/35516610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HtmlPage getPage(String pageURL) throws FailingHttpStatusCodeException, MalformedURLException, IOException {
//webClient.addRequestHeader("Name", "Value");
HtmlPage page = webClient.getPage(pageURL); //"http://localhost:8080/jwanalyticsWeb/faces/site1.jsp"
System.out.println("Getting page:" + page.getTitleText());
return page;
}
COM: <s> this will get a website page </s>
|
funcom_train/3111648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void redo3DView(BranchGroup bg) {
// Detach the BranchGroup from our main scene ... we've found the parent
bg.detach();
// Construct the root
root = new BranchGroup();
// Add the bg to our root
root.addChild(bg.cloneTree(true));
// Get the current transform and save it
owner.getCanvasWithMouse().getViewingPlatformTransform().getTransform(t3D);
// Return the child
owner.getTopBranch().addChild(bg);
}
COM: <s> redisplay the 3d view based on the given branch group </s>
|
funcom_train/3100370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void demo14() throws IOException, UnknownHostException, CycApiException {
Log.current.println("Demonstrating usage of the assertGaf api function.\n");
CycFort mt = cycAccess.getKnownConstantByName("PeopleDataMt");
CycList gaf = cycAccess.makeCycList("(#$likesAsFriend #$BillClinton #$JimmyCarter)");
cycAccess.assertGaf(gaf, mt);
}
COM: <s> demonstrates usage of the assert gaf api function </s>
|
funcom_train/44852985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(String inKey, String inValue) {
NodeList lNodes = xml.getElementsByTagName(inKey);
if (lNodes.getLength() == 0) {
Element lSetting = xml.createElement(inKey);
lSetting.setAttribute(ATTRIBUTE_NAME, inValue);
xml.getDocumentElement().appendChild(lSetting);
}
else {
((Element)lNodes.item(0)).setAttribute(ATTRIBUTE_NAME, inValue);
}
}
COM: <s> sets the specified value for the specified key </s>
|
funcom_train/5460096 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void safelySleep(long timeout) {
long begin = System.currentTimeMillis();
long end = begin;
while (end - begin < timeout) {
try {
Thread.sleep(timeout - (end - begin));
} catch (InterruptedException ie) {
// that shouldn't be much of a problem
}
end = System.currentTimeMillis();
}
}
COM: <s> sleep for the given number of </s>
|
funcom_train/26177120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FilterPanel (Application application) {
this.application= application;
this.content= new JPanel(new CardLayout());
this.logger= new TextPaneLogger();
this.inputProperties= new JTextArea(DEMO_PROPERTIES);
this.output= new JTextArea();
buildPanel();
update();
this.logger.setText(null);
this.logger.info("Welcome to the Taglets Demo Application.");
this.logger.debug(
"Fiddle around with the input parameters, " +
"the output will change accordingly.\n\n" +
"Press \"Help\" for more information."
);
}
COM: <s> creates a new filter panel </s>
|
funcom_train/8207856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int clearDatabaseComplete() {
int count;
SQLiteDatabase db = mOpenHelper.getWritableDatabase();
//delete all webcams
count = db.delete(
WebcamHolmes.Webcam.TABLE_NAME,
null,
null);
//delete all categories
count += db.delete(
WebcamHolmes.Category.TABLE_NAME,
null,
null);
db.close();
return count;
}
COM: <s> completely clean the database used in tests </s>
|
funcom_train/7511109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getJComboBoxLaF() {
if (jComboBoxLaF == null) {
for (LookAndFeelInfo laf : UIManager.getInstalledLookAndFeels()) {
lafs.put(laf.getName(), laf.getClassName());
}
jComboBoxLaF = new JComboBox(lafs.keySet().toArray(new String[0]));
jComboBoxLaF.setName("laf");
}
return jComboBoxLaF;
}
COM: <s> this method initializes j combo box la f </s>
|
funcom_train/46524421 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String partittionedMasses(){
return "Partition:"
+ "\tleaves: " + leavesResources.getMass()
+ "\tinternodes: " + internodesResources.getMass()
+ "\tcgo: " + clonalGrowthOrganResources.getMass()
+ "\tfine roots: " + fineRootsResources.getMass()
+ "\tcoarse roots: " + coarseRootsResources.getMass()
+ "\tflowers: " + flowersResources.getMass();
}
COM: <s> this method returns the partitionedd masses as a string </s>
|
funcom_train/28418948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean parseControllerIDRegExp(String rule) {
if (rule.contains("CONTROLLER[")) {
int i = rule.indexOf("CONTROLLER[") + 11;
try {
String s = rule.substring(i);
s = s.substring(0,fetchRegexpEnd(s));
controllerRegexp = s;
} catch (Exception e) {
return false;
}
return true;
}
return false;
}
COM: <s> get the regexp string that describes the given controllers </s>
|
funcom_train/22551946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStringConstructorForNotTimestampedLocs() throws Exception {
for(int i=0; i<HugeTestUtils.VALID_NONTIMESTAMPED_LOCS.length; i++) {
try {
AlternateLocation.create(HugeTestUtils.VALID_NONTIMESTAMPED_LOCS[i]);
} catch(IOException e) {
fail("failed on loc: "+HugeTestUtils.VALID_NONTIMESTAMPED_LOCS[i], e);
}
}
}
COM: <s> tests the constructor that only takes a string argument but in this </s>
|
funcom_train/1440695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetAllConections() throws Exception {
System.out.println("setAllConections");
List<ConnectionData> dataList = new LinkedList<ConnectionData>();
Server server = new Server();
ServerDataContainer container = new ServerDataContainerImpl();
ServerDataListenerImpl instance = new ServerDataListenerImpl(server);
instance.setServerDataContainer(container);
instance.setAllConections(dataList);
assertEquals(dataList, container.getConnectionDataList());
}
COM: <s> test of set all conections method of class server data listener impl </s>
|
funcom_train/11650866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEnded() {
log.debug(whoAmI() + "\ttestEnded");
synchronized (allSamplers) {
Iterator<JavaSampler> i = allSamplers.iterator();
while (i.hasNext()) {
JavaSampler sampler = i.next();
sampler.releaseJavaClient();
i.remove();
}
}
}
COM: <s> method called at the end of the test </s>
|
funcom_train/40687414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getItem(String itemId) throws GoogleReaderException {
LOG.trace("Retrieving the contents of an item");
checkIfAuthenticated();
List<Parameter> parameters = new ArrayList<Parameter>();
parameters.add(new Parameter(Constants.PARAMETER_ITEM_ID, itemId));
parameters.add(new Parameter(Constants.PARAMETER_TOKEN, getToken()));
return httpManager.post(Constants.URL_SEARCH_CONTENTS, parameters,
true);
}
COM: <s> get an items contents as json </s>
|
funcom_train/22613119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object getServicePort(Service serviceModel) {
Object servicePort;
try {
servicePort = new XFireProxyFactory().create(serviceModel,getWebserviceUrl());
return servicePort;
} catch (MalformedURLException e) {
throw new ApplicationContextException("Can't create web service client of type " + getServiceClass()
+ " since the url set with the 'webserviceUrl' property is malformed. It's value is " +
getWebserviceUrl());
}
}
COM: <s> creates an xfire service port for the url at code webservice url code </s>
|
funcom_train/40460119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addKwicksItem(KwicksItem kwicksItem) {
kwicksItem.addMouseOutHandler(kwicksMouseHandler);
kwicksItem.addMouseOverHandler(kwicksMouseHandler);
kwicksItem.position = getWidgetCount();
if (kwicksItem.linkURL != null) {
kwicksItem.addClickHandler(kwicksMouseHandler);
}
this.add(kwicksItem);
}
COM: <s> add the mouse handlers to all incoming kwicksitems and all to list </s>
|
funcom_train/7388555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getStatsCommand() {
if (statsCommand == null) {//GEN-END:|137-getter|0|137-preInit
// write pre-init user code here
statsCommand = new Command("Creature statistics", Command.SCREEN, 0);//GEN-LINE:|137-getter|1|137-postInit
// write post-init user code here
}//GEN-BEGIN:|137-getter|2|
return statsCommand;
}
COM: <s> returns an initiliazed instance of stats command component </s>
|
funcom_train/16532928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int validateLibraryProxyData() {
int returnValue = RET_OK;
//ensure user name is not blank
if (libraryProxyUserNameTextField.getText().isEmpty()) {
JOptionPane.showMessageDialog(this, "User name cannot be blank",
"User name error", JOptionPane.ERROR_MESSAGE);
libraryProxyUserNameTextField.requestFocus();
returnValue = RET_ERR;
}
return returnValue;
}
COM: <s> method called to check for errors with the values entered by the user </s>
|
funcom_train/49319174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (obj instanceof Coordinates) {
Coordinates c = (Coordinates) obj;
return (fRa == c.getRa()) && (fDec == c.getDec()) && (fEquinox == c.getEquinox()) && (fEpoch == c.getEpoch());
}
return false;
}
COM: <s> compares this coordinates object to the specified object and </s>
|
funcom_train/12188200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Reader getReader(String url) throws Exception {
String path = getClass().getPackage().getName().replace('.', '/');
URL inputURL = getResourceURL(path + File.separator + url);
URLConnection inputConnection = inputURL.openConnection();
InputStream inputStream = inputConnection.getInputStream();
return new InputStreamReader(inputStream);
}
COM: <s> utility method to get a reader for the specified file name </s>
|
funcom_train/878517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resize() {
int oldSize = theList.length;
Comparable[] newList = new Comparable[oldSize+16];
/* copy over items */
for (int i = 0; i<theList.length; i++){
newList[i] = theList[i];
}
theList = newList;
///
/// \bug This might lead to a bug as I did not think it through. DO THAT!
///
// index++;
}
COM: <s> adds 16 new slots to the list </s>
|
funcom_train/44735757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected DomainBase createEntity() {
try {
return (DomainBase) factoryClass.getDeclaredMethod("newInstance",
new Class[0]).invoke(null, new Object[0]);
} catch (IllegalAccessException e) {
fail("Bad setup.");
} catch (InvocationTargetException e) {
fail("Bad factory.");
} catch (NoSuchMethodException e) {
fail("Bad factory class.");
}
return null;
}
COM: <s> creates a new domain object for testing </s>
|
funcom_train/8087337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Matrix arrayLeftDivideEquals(Matrix B) {
checkMatrixDimensions(B);
for (int i = 0; i < m; i++) {
for (int j = 0; j < n; j++) {
A[i][j] = B.A[i][j] / A[i][j];
}
}
return this;
}
COM: <s> element by element left division in place a a </s>
|
funcom_train/3429589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Node getHereContextNode(String type) {
if (this.length(this.getBaseNamespace(), type) != 1) {
return null;
}
return XMLUtils.selectNodeText(this._constructionElement.getFirstChild(), this.getBaseNamespace(),
type,0);
}
COM: <s> returns the first text node which contains information from the xpath </s>
|
funcom_train/43694204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected T newInstance() {
try {
// return (T) Component.getInstance(clazz, true);
return (T) clazz.newInstance();
} catch (InstantiationException e) {
getLog().error("could not instantiate class", e);
} catch (IllegalAccessException e) {
getLog().error("could not instantiate class", e);
}
return null;
}
COM: <s> reflection create new instance </s>
|
funcom_train/13863483 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateThread() {
try {
while (!stopped) {
SwingUtilities.invokeAndWait(
new Runnable() {
public void run() {
logger.trace("Start update");
update();
logger.trace("End update");
}
});
Thread.sleep(100);
}
}
catch (Exception e) {
System.err.println("ERROR in TimeControlFrame.updateThread: " + e);
}
}
COM: <s> internal display update thread </s>
|
funcom_train/3429615 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void engineSetProperty(String key, String value) {
java.util.Iterator i = this._properties.keySet().iterator();
while (i.hasNext()) {
String c = (String) i.next();
if (c.equals(key)) {
key = c;
break;
}
}
this._properties.put(key, value);
}
COM: <s> method engine set property </s>
|
funcom_train/44221811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void generateBlankPageImages() throws Exception {
MyStatemachine msm = this.fragment_main_display.get_statemachine();
Fragmenter_maincontrol fmc = msm.get_fragmenter_maincontrol();
for (int i = 1; i <= this.total_pagecount && !fmc.get_stopLoading(); i++) {
this.thumbnail_image.add(i - 1, null);
}
}
COM: <s> this method is used to generate the blank page thumbnails with </s>
|
funcom_train/44710372 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void generateXML(PageState state, Element p) {
if ( isVisible(state) ) {
Element parent = generateParent(p);
for (Iterator i = children(); i.hasNext(); ) {
Component c = (Component) i.next();
// XXX this seems to be a redundant vis check
if ( c.isVisible(state) ) {
c.generateXML(state, parent);
}
}
}
}
COM: <s> generates the xml for this container </s>
|
funcom_train/36416354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset(String... names) {
for(String name : this.validators.keySet()) {
if(names != null && names.length > 0) {
if(!arrayIncludes(names, name))
continue;
}
List<Validator> vals = this.validators.get(name);
for(Validator val : vals) {
val.resetActions();
}
}
for(ValidationAction action : globalActions)
action.reset();
}
COM: <s> resets all the actions specified by a possibly failed previous validation run </s>
|
funcom_train/43245095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetNOKTwoName() {
System.out.println("setNOKTwoName");
String nOKTwoName = "";
EmergencyContactDG2Object instance = new EmergencyContactDG2Object();
instance.setNOKTwoName(nOKTwoName);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set noktwo name method of class org </s>
|
funcom_train/49269707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Response toResponse(EcmException e) {
StringWriter strw = new StringWriter();
//TODO Fault barrier
if (e instanceof FedoraConnectionException){
LOG.warn("caught exception:",e);
} else {
LOG.debug("caught exception",e);
}
JAXB.marshal(new Cleaned(e), strw);
return Response.serverError().entity(
strw.toString()).build();
}
COM: <s> maps a ecm exception to a responce </s>
|
funcom_train/41331480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addParentPropertyChangeListener(PropertyChangeListener listener) {
if (rootParent instanceof JFrame) {
((JFrame) rootParent).addPropertyChangeListener(listener);
} else if (rootParent instanceof JDialog) {
((JDialog) rootParent).addPropertyChangeListener(listener);
}
rootPane.addPropertyChangeListener(listener);
}
COM: <s> add a property change listener to the root pane </s>
|
funcom_train/37868745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void todoTestPartiallyEscapedStringToXmldbURI() {
try {
String escaped = TestConstants.SPECIAL_NAME.replaceAll("%20"," ").replaceAll("%C3%A0","\u00E0");
AnyURIValue anyUri = new AnyURIValue(escaped);
assertEquals(anyUri.toXmldbURI(), TestConstants.SPECIAL_URI);
} catch(Exception e) {
e.printStackTrace();
fail(e.toString());
}
}
COM: <s> todo change any urivalue to directly store the escaped value </s>
|
funcom_train/130074 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void replaceSelection(final String text) {
try {
int startLocation = getCaretLocation()-getSelectionLength();
document.remove( startLocation, getSelectionLength() );
document.insertString( startLocation, text, null );
setCaretLocation( startLocation + text.length() );
setSelectionLength( text.length() );
} catch (BadLocationException ble) {
logger.throwing( getClass().getName(), "replaceSelection", ble );
}
}
COM: <s> replaces the current selection with the supplied text </s>
|
funcom_train/19309267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int weightArrayIndex(final Font.Weight weight) {
/* TODO: Move this ugly little computation to axsl. */
if (weight == Font.Weight.ANY) {
return -1;
}
int index = weight.getNumericWeight()
/ RegisteredFontFamily.WEIGHT_INDEX_FACTOR;
index --;
return index;
}
COM: <s> computes the array index to be used by a given weight value </s>
|
funcom_train/9361342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBitmap(Bitmap bitmap) {
if (!bitmap.isMutable()) {
throw new IllegalStateException();
}
if (mGL != null) {
throw new RuntimeException("Can't set a bitmap device on a GL canvas");
}
throwIfRecycled(bitmap);
native_setBitmap(mNativeCanvas, bitmap.ni());
mBitmap = bitmap;
mDensity = bitmap.mDensity;
}
COM: <s> specify a bitmap for the canvas to draw into </s>
|
funcom_train/8858575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NoteList getGerm() {
assert germ != null : germ; // germ should never be null!
// the germ should be read-only because we only support changing it
// through the setGermString() method. Our section cached germs
// must be updated when the germ changes, and it's easiest to only
// do that the germ string changes
assert germ.isReadOnly();
return germ;
}
COM: <s> returns the germ note list </s>
|
funcom_train/45470743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String className = null;
Class type = getJavaClass();
if (type != null) {
className = type.getName();
} else {
className = "unspecified";
}
return super.toString() + "; descriptor for class: " + className + "; xml name: " + getXMLName();
} //-- toString
COM: <s> returns the string representation of this xmlclass descriptor </s>
|
funcom_train/17947024 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected IFigure createFigure() {
if (getWire() == null)
return null;
PolylineConnection conn = new PolylineConnection();
PolygonDecoration arrow = new PolygonDecoration();
arrow.setTemplate(PolygonDecoration.INVERTED_TRIANGLE_TIP);
arrow.setScale(5,2.5);
conn.setSourceDecoration(arrow);
arrow.setTemplate(PolygonDecoration.TRIANGLE_TIP);
arrow.setScale(5,2.5);
conn.setTargetDecoration(arrow);
conn.setBackgroundColor(ColorConstants.green);
conn.setForegroundColor(ColorConstants.green);
conn.setLineWidth(2);
return conn;
}
COM: <s> returns a newly created figure to represent the connection </s>
|
funcom_train/51813551 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean offer(Object o) {
if (o == null) throw new NullPointerException();
final ReentrantLock lock = this.lock;
lock.lock();
try {
if (count == items.length)
return false;
else {
insert(o);
return true;
}
} finally {
lock.unlock();
}
}
COM: <s> inserts the specified element at the tail of this queue if possible </s>
|
funcom_train/3704536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addValue(String strVal, String strConfidence, String strLink) {
//// 1. Create the tuple.
Tuple t = new Tuple(TUPLE_VALUE);
t.setAttribute(ATTR_VALUE, strVal);
t.setAttribute(ATTR_CONFIDENCE, strConfidence);
t.setAttribute(ATTR_LINK, strLink);
//// 2. Add the data value.
addValue(t);
} // of method
COM: <s> add a new value a confidence level and a link </s>
|
funcom_train/16315689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setApplicationFont(final Font newFont) {
m_font = newFont;
Preferences.setPreference(OConsts.TF_SRC_FONT_NAME, newFont.getName());
Preferences.setPreference(OConsts.TF_SRC_FONT_SIZE, newFont.getSize());
CoreEvents.fireFontChanged(newFont);
}
COM: <s> set new font to application </s>
|
funcom_train/39387610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getCharacterAtDocumentOffset(final ITextViewer viewer, int documentOffset) throws BadLocationException {
if (documentOffset == viewer.getDocument().getLength() && viewer.getDocument().getLength() > 0) {
return viewer.getDocument().getChar(documentOffset - 1);
}
return viewer.getDocument().getChar(documentOffset);
}
COM: <s> get the character position of the document offset which is the cursor position </s>
|
funcom_train/33912533 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Symbol lookup(String name) {
Symbol s = symbols.get(name);
if ( s!=null ) {
return s; // found it
}
// if not, then check enclosing scope
if ( parent!=null ) {
return parent.lookup(name);
}
return null; // couldn't find it
}
COM: <s> try to look up variable with given name </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.