__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/49637331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFilename () {
log.trace("Getting file name for bundle type '" + bundleType + "'");
if (Bundle.Type.CLIENT == bundleType) {
return "client.xml";
} else if (Bundle.Type.SERVICE == bundleType) {
return "service.xml";
} else {
return bundleType.name().toLowerCase() + ".xml";
}
}
COM: <s> get the suggested file name for this buidler </s>
|
funcom_train/7684129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void establishFinalConfirmationState() {
if (mFinalView == null) {
mFinalView = mInflater.inflate(R.layout.master_clear_final, null);
mFinalButton =
(Button) mFinalView.findViewById(R.id.execute_master_clear);
mFinalButton.setOnClickListener(mFinalClickListener);
}
setContentView(mFinalView);
}
COM: <s> configure the ui for the final confirmation interaction </s>
|
funcom_train/40853994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getStringItem7() {
if (stringItem7 == null) {//GEN-END:|88-getter|0|88-preInit
// write pre-init user code here
stringItem7 = new StringItem("Fecha de compra:", compraSeleccionada.getFechaDeCompra());//GEN-LINE:|88-getter|1|88-postInit
// write post-init user code here
}//GEN-BEGIN:|88-getter|2|
return stringItem7;
}
COM: <s> returns an initiliazed instance of string item7 component </s>
|
funcom_train/9566264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected PdfArray copyArray(PdfArray in) throws IOException, BadPdfFormatException {
PdfArray out = new PdfArray();
for (Iterator i = in.listIterator(); i.hasNext();) {
PdfObject value = (PdfObject)i.next();
out.add(copyObject(value));
}
return out;
}
COM: <s> translate a prarray to a pdf array </s>
|
funcom_train/49200085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSceneIdPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Scene_sceneId_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Scene_sceneId_feature", "_UI_Scene_type"),
ExhibitionPackage.Literals.SCENE__SCENE_ID,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the scene id feature </s>
|
funcom_train/48128493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNombreTablaPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Tabla_NombreTabla_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Tabla_NombreTabla_feature", "_UI_Tabla_type"),
ERSMAPackage.Literals.TABLA__NOMBRE_TABLA,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the nombre tabla feature </s>
|
funcom_train/1841062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void send(NetMessage msg) {
if (!(msg instanceof NetMessage.Ip)) throw new IllegalArgumentException("illegal packet type");
NetMessage.Ip ipMsg = (NetMessage.Ip) msg;
if (stats != null) {
stats.recvPacket++;
}
if (!sendLine(ipMsg)) {
packetCache.offer(new PacketEntry(ipMsg));
}
}
COM: <s> called by the network layer to request transmission of a packet that </s>
|
funcom_train/4754631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectParameters(final String... parameters) throws IllegalArgumentException {
selectedParameters = new ArrayList<ParameterConfiguration>();
for (String param : parameters) {
selectedParameters.add(new ParameterConfiguration(param, Double.NaN));
}
paramDim = parameters.length;
parameterJacobiansInARow = new double[paramDim * stateDim];
setInitialParameterJacobians();
}
COM: <s> select the parameters to consider for jacobian matrices processing </s>
|
funcom_train/33901625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void recalculateIndexes() {
int maxX = 0;
int maxY = 0;
for(Coordinate coord: cells.keySet()){
maxX = Math.max(maxX, coord.x);
maxY = Math.max(maxY, coord.y);
}
this.maxX = maxX;
this.maxY = maxY;
logger.debug("MaxX = "+this.maxX+", MaxY = "+this.maxY);
}
COM: <s> recalculate the internal state variables max x and max y </s>
|
funcom_train/45692238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSamplePointerPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PartWithSample_samplePointer_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PartWithSample_samplePointer_feature", "_UI_PartWithSample_type"),
EsxPackage.Literals.PART_WITH_SAMPLE__SAMPLE_POINTER,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the sample pointer feature </s>
|
funcom_train/11744657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isFault() {
if (objectList != null) {
return false;
}
// resolve on the fly if owner is transient... Can't do it in constructor, as
// object may be in an inconsistent state during construction time
// synchronize??
else if (isTransientParent()) {
objectList = new LinkedList();
return false;
}
else {
return true;
}
}
COM: <s> returns whether this list is not yet resolved and requires a fetch </s>
|
funcom_train/9888815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object getUserObject() {
DefaultMutableTreeNode node = (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
if (node == null) {
return null;
}
Object leaf = node.getUserObject();
if (!(leaf instanceof LeafInfo)) {
return null;
}
return((LeafInfo)leaf).getUserObject();
}
COM: <s> returns an user object of a selected leaf info </s>
|
funcom_train/3812419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dispatchSpeechEvent(SpeechEvent event) {
if (event instanceof SpeechEventWrapper) {
SpeechEventWrapper se = (SpeechEventWrapper) event;
PropertyChangeEvent pe =
(PropertyChangeEvent) (se.getEventObject());
firePropertyChangeEvent(pe);
} else {
throw new SpeechError(
"BaseEngineProperties: speech event type error");
}
}
COM: <s> dispatches a code property change event code </s>
|
funcom_train/20740448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getRepositoryLocation(PortletRequest request) {
PortletPreferences prefs = request.getPreferences();
String scmProvider = prefs.getValue(PREF_SCM_PROVIDER, null);
String scmURL = prefs.getValue(PREF_SCM_URL, null);
if (StringUtils.isEmpty(scmProvider) || StringUtils.isEmpty(scmURL)) {
return null;
}
return "scm:" + scmProvider + ":" + scmURL;
}
COM: <s> returns repository location configured on edit page </s>
|
funcom_train/3868343 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getCriticalPath() {
Vector criticalPath = new Vector();
npElemIt = npElemente.iterator();
while (npElemIt.hasNext()) {
NetworkplanElement npElem = (NetworkplanElement) npElemIt.next();
if (npElem.getFp() == 0 && npElem.getGp() == 0)
criticalPath.add(new Integer(npElem.getIndex()));
}
return criticalPath;
}
COM: <s> critical path containing network plan elements that have total </s>
|
funcom_train/28973750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dropResult(int resultId) throws Exception {
logger.debug("dropping: " + resultId);
this.deleteExistingResult.setInt(1, resultId);
this.deleteExistingResultLink.setInt(1, resultId);
logger.debug("dropped result: " + this.deleteExistingResult.execute());
logger.debug("dropped link: " + this.deleteExistingResultLink.execute());
}
COM: <s> dropes the existing result </s>
|
funcom_train/18591566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String result = "Gridlet {id=" + getID() +
", start time=" + startTime +
", expected finish time=" + expectedFinishTime +
", actual finish time=" + actualFinishTime +
", arrival time=" + arrivalTime +
", n. PEs=" + getNumPE() +
", ranges=" + peRangeList + "}";
return result;
}
COM: <s> creates a string representation of this gridlet </s>
|
funcom_train/2609994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TransportCandidate getPreferredCandidate() {
TransportCandidate result = null;
ArrayList cands = (ArrayList) getCandidatesList();
if (cands.size() > 0) {
Collections.sort(cands);
// Return the last candidate
result = (TransportCandidate) cands.get(cands.size() - 1);
System.out.println("Result: " + result.getIp());
}
return result;
}
COM: <s> get the candididate with the highest preference </s>
|
funcom_train/7518226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(Filtro entity) {
EntityManagerHelper.log("deleting Filtro instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(Filtro.class,
entity.getId());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent filtro entity </s>
|
funcom_train/22175720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Event saveResource(RequestContext context) throws Exception {
log("In saveresource");
FileResourceWrapper wrapper = (FileResourceWrapper) getFormObject(context);
if (wrapper.getFileResource().getParentFolder() == null)
wrapper.getFileResource().setParentFolder("/");
if (wrapper.isStandAloneMode()) {
repository.saveResource(null, wrapper.getFileResource());
}
return success();
}
COM: <s> saves the changes made in alone mode back to repository </s>
|
funcom_train/2883588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCaseCTN2() throws Throwable {
if (failedSolver()) return;
Context cxt = parseToContext("ctn2.sf");
Context elc = resolveCD(cxt, "elements");
assertContextResolves(elc, "x", "one");
assertContextResolves(elc, "y", "two");
assertContextResolves(elc, "z", "three");
}
COM: <s> test case ctn2 </s>
|
funcom_train/3457596 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AudioInfo getAudioInfo() {
AudioInfo ai = new AudioInfo();
ai.setDuration(fullDuration);
ai.setArtist(songArtist);
ai.setTitle(songTitle);
ai.setGenre(songGenre);
ai.setYear(songYear);
ai.setUniqueID(this.toString());
return ai;
}
COM: <s> retrieve a data object representing artist title information </s>
|
funcom_train/47359388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean splitOffInternal(Aliasing var, String var_name, TensorPluralTupleLE value, PermissionSetFromAnnotations perms) {
if(!value.get(var).isInStates(perms.getStateInfoPair()))
return false;
// split off permission
value = LinearOperations.splitOff(var, value, perms);
return ! value.get(var).isUnsatisfiable();
}
COM: <s> override this method to manipulate how permissions are split from the given object </s>
|
funcom_train/39276148 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processMessage(LAMessage message, long pointer) {
// Applies analyzers
if (analyzers != null && analyzers.length > 0) {
for (int i = 0; i < analyzers.length; i++) {
analyzers[i].analyze(message, this);
}
}
// Saves messageLabel
saveMessage(message, pointer);
}
COM: <s> apply analyzers on the message label and saves it if required </s>
|
funcom_train/10795859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private URL findXML(Class<?> cls) {
if (_xml != null && cls != null)
for (Map.Entry<URL, Set<String>> entry : _xml.entrySet())
if (entry.getValue().contains(cls.getName()))
return entry.getKey();
return null;
}
COM: <s> locate the xml resource for the given class </s>
|
funcom_train/15617051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean paragraphIsOpen() {
// traverse backwards through the tag stack looking for an open paragraph tag
int i = 0;
while (this.peekTag(++i) != null) {
if (this.peekTag(i).getTagType().equals("p")) {
return true;
}
if (!this.peekTag(i).isInlineTag()) {
// if a block tag is encountered there should be no
// need to check further
break;
}
}
return false;
}
COM: <s> utility method to determine if a paragraph is currently open </s>
|
funcom_train/7660472 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPark2() {
Thread t = new Thread(new Runnable() {
public void run() {
try {
Thread.sleep(SHORT_DELAY_MS);
LockSupport.park();
} catch(Exception e){
threadUnexpectedException();
}
}
});
try {
t.start();
LockSupport.unpark(t);
t.join();
}
catch(Exception e) {
unexpectedException();
}
}
COM: <s> park is released by unpark occurring before park </s>
|
funcom_train/13286719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton22() {
if (jButton22 == null) {
jButton22 = new JButton();
jButton22.setBounds(new Rectangle(59, 332, 400, 25));
jButton22.setText("Abbrechen & Fenster Schließen");
jButton22.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
close();
}
});
}
return jButton22;
}
COM: <s> this method initializes j button22 </s>
|
funcom_train/50982634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testReleaseResource_nullResource() {
final ResourceManager resourceManager = new ResourceManager( getName() );
final ProxyResourceFactory factory = new ProxyResourceFactory();
try {
factory.releaseResource( resourceManager, null );
fail( "Expected exception" );
}
catch( final NullPointerException e ) {
// Expected path
}
}
COM: <s> try passing a null resource into release resource </s>
|
funcom_train/23828155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void events(ContentHandler handler) throws SAXException {
try {
Document d = render();
DOMSource in = new DOMSource(d);
SAXResult res = new SAXResult(handler);
TransformerFactory tf = TransformerFactory.newInstance();
Transformer serial = tf.newTransformer();
serial.setOutputProperty(OutputKeys.INDENT, "yes");
serial.transform(in, res);
} catch (Exception e) {
throw new SAXException(e);
}
}
COM: <s> renders the entire selection into a sax stream of events conforming to the </s>
|
funcom_train/43393416 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean setQuotaInformation(String storageURL, Vector value) {
try {
QuotaSender quotaSender = new QuotaSender(storageURL);
quotaSender.setParameters(value);
// QuotaSender can be only used in local mode !
quotaSender.sendInformations(true);
return Boolean.valueOf(true);
} catch(Exception e) {
e.printStackTrace();
return Boolean.valueOf(false);
}
}
COM: <s> refreshes the quota registry with the quota beans coming as parameters </s>
|
funcom_train/1537369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Coords getMainDirection(){
if (interiorPoint==null)
return coordSys.getNormal();
Coords vn = coordSys.getNormal();
//Application.debug("polygon("+getLabel()+") : "+vn.dotproduct(interiorPoint.sub(getPoint3D(0))));
if (vn.dotproduct(interiorPoint.sub(getPoint3D(0)))>0)
return (Coords) vn.mul(-1); //vn is oriented to interior
else
return vn;
}
COM: <s> return the normal of the polygons plane </s>
|
funcom_train/8083913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop() {
// tell the listenee (upstream bean) to stop
if (m_listenee instanceof BeanCommon) {
((BeanCommon)m_listenee).stop();
}
// stop the io thread
if (m_ioThread != null) {
m_ioThread.interrupt();
m_ioThread.stop();
m_ioThread = null;
m_visual.setStatic();
}
}
COM: <s> stops the bean </s>
|
funcom_train/20307236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void restoreState(LPInterpreter interp) {
interp.unwindTrail(0);
for (int i = 0; i < trailLength; i++) {
interp.bind(trailVars[i], trailValues[i]);
}
if (pVars != null) {
System.arraycopy(pVars, 0, envFrame.pVars, 0, pVars.length);
}
}
COM: <s> restore the state of an interpreter from this frame </s>
|
funcom_train/9702422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createRadioButton(Composite parent,Button btn,String text, String tooltip, boolean visible, boolean editable,boolean selected){
btn = new Button(parent,SWT.RADIO);
btn.setText(text);
btn.setToolTipText(tooltip);
btn.setVisible(visible);
btn.setEnabled(editable);
btn.setSelection(selected);
btn.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
// TODO Implement SelectionEvent
}
});
}
COM: <s> create a radio button </s>
|
funcom_train/40931579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isUserAllowed(Statement statement, String uid, int appID) {
try{
String query = "SELECT * FROM rights WHERE userID='"+ uid +"' AND appID='"+ appID +"'";
cat.info("QUERY: " + query);
ResultSet result = statement.executeQuery(query);
if (result.first()) return true;
}
catch (SQLException e) {e.printStackTrace();}
return false;
}
COM: <s> determine by search the table rights if the user have the rigths </s>
|
funcom_train/2579655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CategoryToolTipGenerator getToolTipGenerator(int row, int column) {
CategoryToolTipGenerator result = null;
if (this.toolTipGenerator != null) {
result = this.toolTipGenerator;
}
else {
result = getSeriesToolTipGenerator(row);
if (result == null) {
result = this.baseToolTipGenerator;
}
}
return result;
}
COM: <s> returns the tool tip generator that should be used for the specified </s>
|
funcom_train/29922543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void grantRemove(UserDO user, ResourceDO resource, UserGroupDO userGroup ) throws ResourceStoreAuthorisationException {
//verify method attribute
this.verifyAttribute(removeResourceAttr);
//checking user is valid
this.authenticatedCheck(user);
this.administratorCheck(user,resource);
//adding attribute to user or group
this.grantAttribute(userGroup,removeResourceAttr,resource);
}//end method
COM: <s> grants the remove resource attribute to user or group </s>
|
funcom_train/46444670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MovieTuple(String name, String category, String director, String lang ,String raters,String rating, String year, String length, String picture) {
_name = name;
_category = category;
_director = director;
_raters = Integer.parseInt(raters);
_rating = Double.parseDouble(rating);
_language = lang;
_year = Integer.parseInt(year);
_length = Integer.parseInt(length);
//_ratings = new TreeSet<RatingTuple>(new CompartorUser());
_ratings=null;
_picture = picture;
}
COM: <s> creates a new instance of movie tuple </s>
|
funcom_train/28363938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setBestSolution(double[] xArr) {
List<ParameterProxy> varsV = getVariables();
Map<ParameterProxy, Double> bestMap = getBestSolutionMap();
for (int i = 0; i < nD; i++) {
ParameterProxy variable = varsV.get(i);
variable.setValue(xArr[i]);
variable.setError(coords_err[i]);
bestMap.put(variable, new Double(xArr[i]));
}
}
COM: <s> sets the best solution parameters </s>
|
funcom_train/37126713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void configureJTree(TreeModel model) {
_tree = new JTree(model);
_tree.getSelectionModel().
setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
// expand the entire tree path
for (int i = 0; i < _tree.getRowCount(); i++) _tree.expandRow(i);
this._tree.setSelectionRow(0);
}
COM: <s> set this jxmltree panel to a jtree configured to suit </s>
|
funcom_train/31625471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeStepAttribute(String key) throws DBException {
StepAttributes sa = new StepAttributes();
sa.setField(StepAttributes.FLD_STEPID, getId());
sa.setField(StepAttributes.FLD_ATTRIBUTEKEY, key);
if (sa.find()) {
sa.delete();
}
clearAttribMap();
}
COM: <s> remove an attribute to be associated with the step </s>
|
funcom_train/17902101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String verifyDate() {
String format = displayDateFormatDialog();
if (format == null || format.length() == 0) {
int yesNo = GUIUtilities.displayConfirmDialog(
getBundle().getString("AsbtractImportExportWorker.cancelProcessConfirm"));
if (yesNo == JOptionPane.YES_OPTION) {
cancelTransfer();
return null;
}
else {
format = displayDateFormatDialog();
}
}
return format;
}
COM: <s> verifies the date format where applicable </s>
|
funcom_train/13478902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void valueChanged(ListSelectionEvent e) {
if (ColonyPanel.this.colony == null)
return;
if (e.getValueIsAdjusting() == false) {
if (constructionList.getSelectedIndex() == -1) {
// No selection, don't do anything ...
} else {
// Selection, set construction ...
ColonyPanel.this.colony.
setConstruction((Construction)constructions.
elementAt(constructionList.
getSelectedIndex()));
updateConstructionDisplay();
}
}
}
COM: <s> handling list selection events triggered by the construction list </s>
|
funcom_train/38258972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addText(JTextPane textPane, String sText,String sStyle) {
//System.out.println(sText);
Document doc = textPane.getDocument();
try {
doc.insertString(doc.getLength(), sText, textPane.getStyle(sStyle));
} catch (BadLocationException e) {
e.printStackTrace();
}
}
COM: <s> adds a string to the current text pane </s>
|
funcom_train/47926084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showFortBattle(final String data) {
JSONDataParser parser;
try {
parser = new JSONDataParser(data);
final Fortbattle battle = parser.getBattle();
player = new GuiPlayer(battle, Applet.class.getPackage().getImplementationVersion());
setContentPane(player);
} catch (final JSONException e) {
e.printStackTrace();
JOptionPane.showMessageDialog(Applet.this, e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE);
}
}
COM: <s> same as in main window </s>
|
funcom_train/14026140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void configureAsLocked() {
_searchClearButton.setAction(_clearAction);
_searchClearButton.setEnabled(_enabled);
_searchContentTF.setAction(null);
_searchContentTF.setEnabled(_enabled);
_searchContentTF.getCaret().setVisible(false);
_searchContentTF.getCaret().setSelectionVisible(false);
_searchContentTF.setCaretPosition(0);
}
COM: <s> set the search field into a locked state inactive </s>
|
funcom_train/22275736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void marshal(OutputStream xmlOutput) throws XMLMarshalingException {
try
{
IBindingFactory factory = BindingDirectory.getFactory(BaseMetaModel.class);
IMarshallingContext context = factory.createMarshallingContext();
context.marshalDocument(this, "UTF-8", null, xmlOutput);
}
catch(JiBXException jbxe)
{
throw new XMLMarshalingException("Error marshaling MetaModel to XML", jbxe);
}
}
COM: <s> creates the xml representation of the meta model </s>
|
funcom_train/598375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStandardConfig() {
StringBuffer algoStr = new StringBuffer();
for (T sh: active.algos(algorithm)) {
algoStr.append(sh.name());
algoStr.append(';');
}
initialize(algoStr.toString());
fireTableRowsUpdated(0, getRowCount());
}
COM: <s> sets the zrtp configure data for this algorithm to a predefined set </s>
|
funcom_train/35284435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String prettyNum(double num) {
String numStr = (new Double(num)).toString();
while (numStr.length() < 4) {
numStr += "0";
}
numStr = numStr.substring(0, numStr.indexOf(".") + 3);
return numStr;
}
COM: <s> formats a double nicely for printing this does not round </s>
|
funcom_train/50298312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setForcedWrites(boolean forced) throws SQLException {
ServiceRequestBuffer srb = createDefaultPropertiesSRB();
srb.addArgument(ISCConstants.isc_spb_prp_write_mode,
(byte) (forced ? ISCConstants.isc_spb_prp_wm_sync
: ISCConstants.isc_spb_prp_wm_async));
executeServicesOperation(srb);
}
COM: <s> enable or disable forced synchronous writes in the database </s>
|
funcom_train/31891296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void minimalizeAll() {
JInternalFrame[] frs = desktop.getAllFrames();
for (int i = 0; i < frs.length; i++) {
try {
frs[i].setIcon(true);
//frs[i].show(false);
frs[i].getDesktopIcon().show();
} catch (Exception ex) {
}
}
desktop.moveToBack(bg);
}
COM: <s> minimalizes all windows </s>
|
funcom_train/50872785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeString(int fIndent, OMString fString) {
writeIndent(fIndent);
mPrintWriter.print("<OMSTR");
writeAttributes(fString.getAttributes());
mPrintWriter.print(">");
mPrintWriter.print(fString.getString() + "</OMSTR>");
if (mPrettyPrint) {
mPrintWriter.println();
}
}
COM: <s> write an omstring </s>
|
funcom_train/16669992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAnimationFrames(int minKeyframe, int maxKeyframe) {
if (maxKeyframe<minKeyframe) return;
if (minKeyframe<0) minKeyframe = 0;
if (maxKeyframe<0) maxKeyframe = 0;
if (minKeyframe>nbFrames - 1) minKeyframe = nbFrames - 1;
if (maxKeyframe>nbFrames - 1) maxKeyframe = nbFrames - 1;
minKey = minKeyframe;
maxKey = maxKeyframe;
length = (maxKey - minKey);
t = minKey;
}
COM: <s> sets the min and max keyframes for the animation to play </s>
|
funcom_train/7271642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setColors(JCheckBox checkBox, boolean isSelected) {
checkBox.setForeground(isSelected ? fileTreeCellRenderer.getTextSelectionColor() : fileTreeCellRenderer.getTextNonSelectionColor());
checkBox.setBackground(isSelected ? fileTreeCellRenderer.getBackgroundSelectionColor() : fileTreeCellRenderer.getBackgroundNonSelectionColor());
}
COM: <s> sets the colors of the checkbox depending on its state </s>
|
funcom_train/25609085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addElementToSelection(Selectable element){
selection.add(element);
element.setFillColor(KredsProperties.selectionColor);
if(selection.size()==1){
//Dont do anything
}else if(selection.size()==2){
for(Selectable s: selection){
s.setListenersEnabled(false);
s.removeMouseListener(selectedElementListener);
s.addMouseListener(selectedElementListener);
}
}else {
element.setListenersEnabled(false);
element.removeMouseListener(selectedElementListener);
element.addMouseListener(selectedElementListener);
}
areaPainter.updateSelection();
//element.repaint();
}
COM: <s> adds an element ccomponent or swire edge to the selection </s>
|
funcom_train/50999441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean useMock() {
String templateValue = (String) getTemplateSettings().get(JagGenerator.TEMPLATE_USE_MOCK);
if (templateValue == null || "false".equalsIgnoreCase(templateValue)) {
return new Boolean(false);
}
else {
return new Boolean(true);
}
}
COM: <s> check if the use mock checkbox was checked to generate a mock implementation </s>
|
funcom_train/21987138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void putIntoQueryIndividuallyTriples(Triple t, RemoteService s) {
MultipleServiceGroup msg = queryIndividuallyTriples.get(t);
if (msg == null) {
msg = new MultipleServiceGroup();
queryIndividuallyTriples.put(t, msg);
sgsPos.add(msg); //FRAGE Kam, hinzu, wozu?
msg.addB(t);
}
msg.addService(s);
}
COM: <s> puts triple into a multiple service group with its </s>
|
funcom_train/27787250 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IFileEODQuoteFilter getFilter(String filterName) {
Iterator iterator = filters.iterator();
IFileEODQuoteFilter filter;
while(iterator.hasNext()) {
filter = (IFileEODQuoteFilter)iterator.next();
if(filter.getName().equals(filterName))
return filter;
}
// String did not match any filter! Default to first
return (IFileEODQuoteFilter)filters.get(0);
}
COM: <s> return instance of filter given its name </s>
|
funcom_train/47129327 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getJavadoc(BodyDeclaration node) {
String javadoc = "";
Javadoc javadocNode = node.getJavadoc();
if (javadocNode != null && !"".equals(javadocNode.toString())) {
javadoc = javadocNode.toString().substring(0, javadocNode.toString().length() - 1);
}
return javadoc;
}
COM: <s> gets the javadoc of an ast node </s>
|
funcom_train/37475683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init() {
if (!Torque.isInit()) {
try {
Torque.init(this.getTorqueProperties());
} catch (Exception e) {
e.printStackTrace();
}
}
addVelocityMacro();
SWAMPProperties.put("bootDate", new Date().toString());
}
COM: <s> initializes services that are needed by swamp </s>
|
funcom_train/2628358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetGUI() {
System.out.println("getGUI");
GUIStructure instance = new GUIStructure();
List expResult = new ArrayList();
/* Test 1 - gui = null */
List result = instance.getGUI();
assertEquals(expResult, result);
/* Test 2 - gui != null */
instance.gui = expResult;
result = instance.getGUI();
assertEquals(expResult,result);
}
COM: <s> test of get gui method of class guistructure </s>
|
funcom_train/4974033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertElementAt(E obj, int index) {
modCount++; atomicModCount.incrementAndGet();
if (index > elementCount) {
throw new ArrayIndexOutOfBoundsException(index
+ " > " + elementCount);
}
ensureCapacityHelper(elementCount + 1);
System.arraycopy(elementData, index, elementData, index + 1, elementCount - index);
elementData[index] = obj;
elementCount++;
}
COM: <s> inserts the specified object as a component in this vector at the </s>
|
funcom_train/23234450 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SheepFood getNearestFood(double range) {
// This way we save several sqrt operations
double squaredDistance = range * range;
SheepFood chosen = null;
for (SheepFood food : getZone().getSheepFoodList()) {
if (food.getAmount() > 0) {
double foodDistance = squaredDistance(food);
if (foodDistance <= squaredDistance) {
chosen = food;
squaredDistance = foodDistance;
}
}
}
return chosen;
}
COM: <s> returns the sheep food that is nearest to the sheeps current position </s>
|
funcom_train/23340205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getGroupBoxCheckBox() {
if (groupBoxCheckBox == null) {
groupBoxCheckBox = new JCheckBox();
groupBoxCheckBox.setText("Group Box");
groupBoxCheckBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
toggleCheckBox(groupBoxCheckBox);
}
});
}
return groupBoxCheckBox;
}
COM: <s> this method initializes group box check box </s>
|
funcom_train/3861047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setView(Component view) {
if (view != this.view) {
if (this.view != null)
viewPort.removeChild(this.view);
this.view = view;
if (view != null)
viewPort.addChild(this.view);
setDelegate(view);
viewPort.setDelegate(view);
// Position the viewed component so its top left corner is flush with the top left of the ViewPort:
view.revalidate();
revalidate();
setViewLocation(0, vertScrollBar.getMaxValue());
}
}
COM: <s> sets the view </s>
|
funcom_train/1306257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("TiendaWebServicesBeanPort".equals(portName)) {
setTiendaWebServicesBeanPortEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/35605551 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStatusCodes(Properties statusCodes) {
for (Enumeration enumeration = statusCodes.propertyNames(); enumeration.hasMoreElements();) {
String viewName = (String) enumeration.nextElement();
Integer statusCode = new Integer(statusCodes.getProperty(viewName));
this.statusCodes.put(viewName, statusCode);
}
}
COM: <s> set the http status code that this exception resolver will </s>
|
funcom_train/14266264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int ultrapeerConnections() {
//TODO3: augment state of this if needed to avoid loop
int ret=0;
for (Iterator iter=_initializedConnections.iterator(); iter.hasNext();){
ManagedConnection mc=(ManagedConnection)iter.next();
if (mc.isSupernodeConnection())
ret++;
}
return ret;
}
COM: <s> returns the number of connections to other ultrapeers </s>
|
funcom_train/13439549 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectId(String id) {
if (id!=null) {
TreeNode found = selectIdRec(topNode, id);
if (found !=null) {
ArrayList listPath = new ArrayList();
listPath.add(0, found);
while (found.getParent()!=null) {
found = found.getParent();
listPath.add(0, found);
}
tree.setSelectionPath(new TreePath(listPath.toArray()));
}
}
}
COM: <s> selects the node with the given id </s>
|
funcom_train/50157399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ActionForward getEditorMapping(ActionMapping mapping) {
// prtln("getEditorMapping ()");
String config = getMetaDataFramework().getEditorConfig();
if (config.equals("noframes")) {
return mapping.findForward("editor");
}
else if (config.equals("frames")) {
prtln("getEditorMapping returning frame-editor");
return mapping.findForward("frame-editor");
}
else {
prtln("unknown editor config: " + config);
return mapping.findForward("editor");
}
}
COM: <s> determines the appropriate editor mapping depending on whether the editor </s>
|
funcom_train/18070743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getSaveGmapMenuItem() {
if (saveGmapMenuItem == null) {
saveGmapMenuItem = new JMenuItem();
saveGmapMenuItem.setText("Save GMap");
saveGmapMenuItem
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
saveGMap();
}
});
}
return saveGmapMenuItem;
}
COM: <s> this method initializes save gmap menu item </s>
|
funcom_train/22264050 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getXmlEditorForm() {
// set "editor mode" attribute (required for link replacement in the root site)
getCms().getRequestContext().setAttribute(CmsRequestContext.ATTRIBUTE_EDITOR, new Boolean(true));
return getXmlEditorForm(m_content.getContentDefinition(), "", true).toString();
}
COM: <s> generates the html form for the xml content editor </s>
|
funcom_train/28755528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPurificationid(Long newVal) {
if ((newVal != null && this.purificationid != null && (newVal.compareTo(this.purificationid) == 0)) ||
(newVal == null && this.purificationid == null && purificationid_is_initialized)) {
return;
}
this.purificationid = newVal;
purificationid_is_modified = true;
purificationid_is_initialized = true;
}
COM: <s> setter method for purificationid </s>
|
funcom_train/8405593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
this.type = readAnyClass(in);
if (isMapped() || isIndexed()) {
this.contentType = readAnyClass(in);
}
// read other values
in.defaultReadObject();
}
COM: <s> reads field values for this object safely </s>
|
funcom_train/16677787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void open(String robotName, boolean resizeable) {
initDialogShell(resizeable);
try {
comp = getComposite(robotName, origin.getContentClass(),
dialogShell);
}
catch (InstantiationException ex) {
logClass.error("Error: " + ex.getMessage() //$NON-NLS-1$
+ Constants.LINE_SEPARATOR, ex);
dialogShell.close();
}
if (comp != null) {
SWTUtil.setGridData(comp, true, true, SWT.FILL, SWT.FILL, 1, 1);
}
openGenericDialog(plugin, robotName);
}
COM: <s> opens a generic dialog for non plugin origin parts </s>
|
funcom_train/1173755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void findAndRemoveFrom(ArrayList<Mana> pool, Mana mana) {
Mana set = null;
for (Mana m : pool) {
if (m.getSourceCard().equals(mana.getSourceCard()) && m.getColor().equals(mana.getColor())) {
set = m;
break;
}
}
removeManaFrom(pool, set);
}
COM: <s> p find and remove from </s>
|
funcom_train/3764097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void xtestNegativeStockBuy() throws Exception{
//Create a Stock with our simulated values
StockOffer testOffer = new StockOffer();
testOffer.setStockName("MEGACORP");
testOffer.setStockPrice(-22);
testOffer.setStockQuantity(1000);
//Run the rules on it
BusinessLayer.evaluateStockPurchase(testOffer);
//Is it what we expected?
assertTrue("NO".equals(testOffer.getRecommendPurchase()));
}
COM: <s> tests the purchase of a stock makes sure the system </s>
|
funcom_train/28016794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setType(final AttributeType _t) {
// <<TODO:DESIGN>> Shouldn't we use the Assert class to stipulate that
// t must not be null? [Jon Aquino]
if (_t == null) {
type_ = AttributeTypeFactory.newAttributeType("default", String.class);
} else {
type_ = _t;
}
}
COM: <s> sets the jcs type of this column </s>
|
funcom_train/10670958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Result testGetPropertyChangeListeners02() {
PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(
"bean1");
propertyChangeSupport.addPropertyChangeListener("property1",
new SimpleListener());
assertEquals(propertyChangeSupport
.getPropertyChangeListeners("property1")[0].getClass(),
SimpleListener.class);
return passed();
}
COM: <s> verify that get property change listeners string selected property name </s>
|
funcom_train/26336192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refreshMapItems( GameMap map ) {
Iterator iter = map.getAllItems().values().iterator();
while( iter.hasNext() ) {
GameItem item = (GameItem) iter.next();
if( item instanceof ItemContainer )
this.refreshInventory( (ItemContainer) item );
}
}
COM: <s> refresh a game map for identified items </s>
|
funcom_train/13446197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int calculateBreakPosition(int p0, int p1) {
int p;
Segment segment = SegmentCache.getSharedSegment();
loadText(segment, p0, p1);
if (wordWrap) {
p = p0 + Utilities.getBreakLocation(segment, metrics,
tabBase, tabBase + getWidth(),
this, p0);
} else {
p = p0 + Utilities.getTabbedTextOffset(segment, metrics,
tabBase, tabBase + getWidth(),
this, p0);
}
SegmentCache.releaseSharedSegment(segment);
return p;
}
COM: <s> this is called by the nested wrapped line </s>
|
funcom_train/2580381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifyListeners(DialLayerChangeEvent event) {
Object[] listeners = this.listenerList.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == DialLayerChangeListener.class) {
((DialLayerChangeListener) listeners[i + 1]).dialLayerChanged(
event);
}
}
}
COM: <s> notifies all registered listeners that the dial layer has changed </s>
|
funcom_train/8342803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getIndexOf(final Object anObject) {
int index = -1;
for(int i = 0; i < getSize(); i++){
if(model.getDataAt(i, displayID).equals(anObject)){
index = i;
break;
}
}
return index;
}
COM: <s> returns the index position of the specified object in the list </s>
|
funcom_train/44166746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean remove(final Locatable locatable) {
if (!(locatable instanceof Unit)) {
throw new IllegalStateException("Not a unit: " + locatable);
}
Unit unit = (Unit) locatable;
if (!contains(unit)) return true;
if (super.remove(unit)) {
unit.setState(Unit.UnitState.ACTIVE);
unit.setMovesLeft(0);
getColony().invalidateCache();
return true;
}
return false;
}
COM: <s> remove the specified locatable from this colony tile </s>
|
funcom_train/3369339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void paintComponent(Graphics g) {
if (ui != null) {
// On the off chance some one created a UI, honor it
super.paintComponent(g);
} else if (isOpaque()) {
g.setColor(getBackground());
g.fillRect(0, 0, getWidth(), getHeight());
}
}
COM: <s> paints this code box code </s>
|
funcom_train/17342618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void toggleTreeNodeExpandedState(String nodeId) {
DefaultMutableTreeNode defaultNode = findTreeNode(nodeId);
if (defaultNode != null) {
NavigationTreeNode node = (NavigationTreeNode) defaultNode.getUserObject();
node.setExpanded(!node.isExpanded());
}
}
COM: <s> utility method to toggle the selected state of the specified node </s>
|
funcom_train/19097466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void newGame() {
NewGameWizard wizNewGame = new NewGameWizard(this, m_DataModel);
wizNewGame.setVisible(true);
if (!wizNewGame.isCancelled()) {
board.setInputPlayer1(JBoard.InputType.keyboard);
board.setInputPlayer2(JBoard.InputType.mouse);
}
}
COM: <s> invoke this method if a new game has to be started </s>
|
funcom_train/23411174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMaintenanceConditionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Norm_maintenanceCondition_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Norm_maintenanceCondition_feature", "_UI_Norm_type"),
OMPackage.Literals.NORM__MAINTENANCE_CONDITION,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the maintenance condition feature </s>
|
funcom_train/18807437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAxisLocation(int location) {
if ((location >= 0) && (location < 3)) {
this.axisLocation = location;
notifyListeners(new PlotChangeEvent(this));
}
else {
throw new IllegalArgumentException(
"ThermometerPlot.setAxisLocation: location not recognised.");
}
}
COM: <s> sets the location at which the axis is displayed with reference to the </s>
|
funcom_train/7792377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setMaxDelimCodePoint() {
if (delimiters == null) {
maxDelimCodePoint = 0;
return;
}
int m = 0;
int c;
int count = 0;
for (int i = 0; i < delimiters.length(); i += Character.charCount(c)) {
c = delimiters.charAt(i);
if (m < c)
m = c;
count++;
}
maxDelimCodePoint = m;
}
COM: <s> set max delim code point to the highest char in the delimiter set </s>
|
funcom_train/47135668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addClosePricePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Trade_closePrice_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Trade_closePrice_feature", "_UI_Trade_type"),
TradingPackage.Literals.TRADE__CLOSE_PRICE,
true,
false,
false,
ItemPropertyDescriptor.REAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the close price feature </s>
|
funcom_train/49624054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public R visit(Alefpp n, A argu) {
R _ret=null;
n.f0.accept(this, argu);
n.f1.accept(this, argu);
n.f2.accept(this, argu);
n.f3.accept(this, argu);
return _ret;
}
COM: <s> f0 use statement </s>
|
funcom_train/22232440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ImageComponent getImage(int level, int face) {
if (isLiveOrCompiled()) {
if(!this.getCapability(ALLOW_IMAGE_READ))
throw new CapabilityNotSetException(
J3dI18N.getString("TextureCubeMap2"));
}
return ((TextureCubeMapRetained)this.retained).getImage(level, face);
}
COM: <s> retrieves the image for a specified mipmap level of a particular </s>
|
funcom_train/21725826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double calcVariance() {
double result = 0.0;
int size = this.portfolio.size();
for(int i = 0; i < size; i++) {
Asset asset1 = this.getAssetAt(i);
for(int j = 0; j < size; j++) {
Asset asset2 = this.getAssetAt(j);
double cov = asset1.calcCovarWith(asset2);
result += asset1.getWeight() * asset2.getWeight() * cov;
}
}
return result;
}
COM: <s> calculate the variance of portfolio </s>
|
funcom_train/10628794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTestBitPositive1() {
byte aBytes[] = {-1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26};
int aSign = 1;
int number = 7;
BigInteger aNumber = new BigInteger(aSign, aBytes);
assertTrue(!aNumber.testBit(number));
}
COM: <s> test bit int n of a positive number </s>
|
funcom_train/49428810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TintAnimator(TimeSource timeSource, Color color) {
if(timeSource == null) {
throw new NullPointerException("timeSource");
}
if(color == null) {
throw new NullPointerException("color");
}
this.timeSource = timeSource;
this.currentTint = new float[12];
setColor(color);
}
COM: <s> creates a new tint animator which starts in the specified color </s>
|
funcom_train/46378328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setGUIEnabled(boolean enabled) {
translationXTF.setEnabled(enabled);
translationYTF.setEnabled(enabled);
translationZTF.setEnabled(enabled);
rotationXTF.setEnabled(enabled);
rotationYTF.setEnabled(enabled);
rotationZTF.setEnabled(enabled);
scaleTF.setEnabled(enabled);
}
COM: <s> sets whether the gui components are active enabled </s>
|
funcom_train/50835897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent arg0) {
if (arg0.getActionCommand()
.equals("Search")) {
UserInputManager.searchFor();
} else if (arg0.getActionCommand()
.equals("Download")) {
UserInputManager.downloadFile();
} else if (arg0.getActionCommand()
.equals("Clear")) {
UserInputManager.clearAllSearchList();
}
}
COM: <s> method for incoming actionevents </s>
|
funcom_train/5891545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void sort(List<ConstraintViolation<?>> viloations){
Collections.sort(viloations, new Comparator<ConstraintViolation<?>>() {
@Override
public int compare(ConstraintViolation<?> o1, ConstraintViolation<?> o2) {
String s1 = o1.getConstraintDescriptor().getAnnotation().toString();
String s2 = o2.getConstraintDescriptor().getAnnotation().toString();
return s1.compareTo(s2);
}
});
}
COM: <s> sort the viloations make multiple violation order more predictable </s>
|