__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/24373383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String structure() {
return this.getSubmissionSetIds().size() + " SS + " + this.extrinsicObjects.size() + " EO + " + this.folders.size() + " Fol + " + this.associations.size() + " A + " + this.objectRefs.size() + " OR";
}
COM: <s> return a string that can be used for debugging purposes </s>
|
funcom_train/18454677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireSelectionChanged(ISelection selection) {
// create an event
SelectionChangedEvent event = new SelectionChangedEvent(this, selection);
// fire the event
for (int i = 0; i < fSelectionListeners.size(); ++i) {
((ISelectionChangedListener) fSelectionListeners.get(i)).selectionChanged(event);
}
}
COM: <s> fires a selection changed event </s>
|
funcom_train/48189969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(PosProductDistribute entity) {
LogUtil.log("deleting PosProductDistribute instance", Level.INFO, null);
try {
entity = entityManager.getReference(PosProductDistribute.class,
entity.getId());
entityManager.remove(entity);
LogUtil.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
LogUtil.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent pos product distribute entity </s>
|
funcom_train/41320059 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButton getJRadioButton3() {
if (jRadioButton3 == null) {
jRadioButton3 = new JRadioButton("3", true);
jRadioButton3.setBounds(new Rectangle(30, 150, 21, 21));
jRadioButton3.setBackground(new Color(Integer.valueOf("f3a15a", 16)));
}
return jRadioButton3;
}
COM: <s> this method initializes j radio button3 </s>
|
funcom_train/37110077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getStackTraceString(Exception e) {
String msg = "";
StackTraceElement[] elements = e.getStackTrace();
for (int i=0; i<elements.length; i++) {
msg = msg + elements[i].toString() + "\n";
}
return msg;
}
COM: <s> converts exception e to a string representing the exceptions stack trace </s>
|
funcom_train/19259277 | /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 == this) return true;
if (obj == null) return false;
if (getClass() != obj.getClass()) return false;
UTMCoord newObj = (UTMCoord)obj;
return (newObj.zone == zone && newObj.easting == easting && newObj.northing == northing);
}
COM: <s> returns true if two utm coordinates are equal point to the </s>
|
funcom_train/16797275 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rank(ImageProcessor ip, double radius, int rankType) {
FloatProcessor fp = null;
for (int i=0; i<ip.getNChannels(); i++) {
makeKernel(radius);
fp = ip.toFloat(i, fp);
doFiltering(fp, kRadius, lineRadius, rankType, BRIGHT_OUTLIERS, 50f);
ip.setPixels(i, fp);
}
}
COM: <s> filters an image </s>
|
funcom_train/15649721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent event) {
if (event.getSource().equals(pauseButton))
{
this.setSimulationPaused(!isSimulationPaused());
}
if (event.getSource().equals(saveButton))
{
myAgents.saveAgentsToDB(dbMgr, experiment, run);
System.out.println("Simulation state saved");
saveButton.setEnabled(false);;
}
}
COM: <s> for pausing resuming the simulation </s>
|
funcom_train/9077586 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete() {
// Sanity check (should never happen)
if (table.leadSelectionIndex==-1 || table.anchorSelectionIndex==-1) {
UIManager.getLookAndFeel().provideErrorFeedback(table);
return;
}
int start = table.getSmallestSelectionIndex();
int end = table.getLargestSelectionIndex();
int len = end-start+1;
removeBytes(start, len);
}
COM: <s> removes the currently selected bytes </s>
|
funcom_train/29368629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readXML(InputStream inStream) {
try {
System.setProperty("org.xml.sax.driver", "org.apache.crimson.parser.XMLReaderImpl");
XMLReader reader = XMLReaderFactory.createXMLReader();
reader.setContentHandler(this);
reader.parse(new InputSource(new InputStreamReader(inStream)));
} catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> read xml from input stream and parse generating sax events </s>
|
funcom_train/2537512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPositionRelativeToOther(MTComponent otherComp, Vector3D pos){
Matrix m0 = MTComponent.getTransformToDestinationLocalSpace(otherComp, this);
pos.transform(m0);
Vector3D centerpointGlobal = this.getCenterPointGlobal();
centerpointGlobal.transform(this.getGlobalInverseMatrix()); //to localobj space
centerpointGlobal.transform(this.getLocalMatrix()); //to parent relative space
Vector3D diff = pos.getSubtracted(centerpointGlobal);
this.translate(diff, TransformSpace.RELATIVE_TO_PARENT);
}
COM: <s> sets the position of this component relative to the other specified component </s>
|
funcom_train/23267815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetDniRemitente() {
System.out.println("setDniRemitente");
String dniRemitente = "";
Giros instance = new Giros();
instance.setDniRemitente(dniRemitente);
// 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 dni remitente method of class capa negocios </s>
|
funcom_train/50158838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNodeExistsWithContent(String key) {
// prtln ("nodeExistsWithContent (" + key + ")");
String xpath = XPathUtils.decodeXPath(key);
if (docMap.nodeExists(xpath) && !docMap.isEmpty(xpath)) {
// prtln (" ... node DOES exist and is not empty - returning TRUE");
return "true";
}
else {
// prtln (" ... node does not exist or is empty - returning FALSE");
return "";
}
}
COM: <s> return true if the node exists and it is not empty </s>
|
funcom_train/42760661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Context getContext() {
// This javadoc is copied verbatim in
// Action.java.tmplt. If you change this,
// consider update the template.
Context result = new Context();
result.put("actionID", _actionID);
result.put("playerID", _playerID);
result.put("entityID", _entityID);
return result;
} // getContext
COM: <s> returns the action context </s>
|
funcom_train/45761375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkDrawDocument(){
XComponent xDoc = null;
try{
xDoc = m_SOF.createDrawDoc("DrawTest");
} catch (com.sun.star.uno.Exception e){
failed("Could not create a draw document: " +e.toString());
}
checkListener(xDoc);
closeDoc(xDoc);
}
COM: <s> creates a draw document and check the code xmouse click handler code and </s>
|
funcom_train/49608816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FacilityType updateFacilityType(String username,EntityManager em,FacilityType vo) throws Throwable {
try {
return (FacilityType)JPAMethods.merge(em, username, DefaultFieldsCallabacks.getInstance(), vo);
}
catch (Throwable ex) {
Logger.error(null, ex.getMessage(), ex);
throw ex;
}
finally {
em.flush();
}
}
COM: <s> update a facility type </s>
|
funcom_train/22077829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test09InvalidMappingError() {
/* input */
Map input = new HashMap();
input.put("nom", "Naquin");
/* operations */
this.mods = new ModificationsVariables(output);
mods.modifyAttribute("toto", new VariableString("${nom}"));
sm.setOperations(mods);
try {
sm.modify(input, env);
fail("Should have thrown exception");
} catch (MapperException e) {
// OK
}
}
COM: <s> error on unknown attribute </s>
|
funcom_train/40440197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getETag(FileHeaderDTO file, FileBodyDTO oldBody) {
if (oldBody == null)
return "\"" + file.getFileSize() + "-" + file.getAuditInfo().getModificationDate().getTime() + "\"";
return "\"" + oldBody.getFileSize() + "-" + oldBody.getAuditInfo().getModificationDate().getTime() + "\"";
}
COM: <s> get the etag associated with a file </s>
|
funcom_train/46571102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Label createLabel(final Composite parent, final String text) {
Label label = new Label(parent, SWT.LEFT);
label.setText(text);
GridData data = new GridData();
data.horizontalSpan = 2;
data.horizontalAlignment = GridData.FILL;
label.setLayoutData(data);
return label;
}
COM: <s> utility method that creates a label instance and sets the default layout </s>
|
funcom_train/4891670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long elapsed() {
// total sum so far + time so far into the current lap + pause offset.
if (this.isRunning()) {
long t = this.elapsedTime + this.lapOffset;
return this.isPaused() ? t : t + (getTimeInMillis() - this.lastLapTime);
} else {
return this.elapsedTime;
}
}
COM: <s> includes the time while paused or stopped if a cont has occurred </s>
|
funcom_train/8075905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop() {
// tell all listenees (upstream beans) to stop
Enumeration en = m_listenees.keys();
while (en.hasMoreElements()) {
Object tempO = m_listenees.get(en.nextElement());
if (tempO instanceof BeanCommon) {
System.err.println("Listener is BeanCommon");
((BeanCommon)tempO).stop();
}
}
//
}
COM: <s> stop all action if possible </s>
|
funcom_train/4529571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IOException unwrapRemoteException() {
try {
Class<?> realClass = Class.forName(getClassName());
return instantiateException(realClass.asSubclass(IOException.class));
} catch(Exception e) {
// cannot instantiate the original exception, just return this
}
return this;
}
COM: <s> instantiate and return the exception wrapped up by this remote exception </s>
|
funcom_train/7994292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
for( Runnable $ : services)
pool.execute( $);
connectionListener.start( );
Runtime.getRuntime().addShutdownHook( new Thread() {
public void run( ) {
terminated = true;
}
});
while( !terminated) {
try {
Thread.sleep(1 * 1000);
} catch (InterruptedException e) {
log.error(e);
}
}
connectionListener.stopListen( );
pool.shutdown( );
};
COM: <s> starts the server </s>
|
funcom_train/31669913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleSimpleTag(HTML.Tag t, MutableAttributeSet a, int pos){
if(t.equals(HTML.Tag.IMG) &&
a.isDefined(HTML.Attribute.ALT)){
String altText = (String) a.getAttribute(HTML.Attribute.ALT);
// Gets words
StringTokenizer st = new StringTokenizer(altText);
while(st.hasMoreTokens()){
String word = st.nextToken();
words.add(word);
if(DEBUG){
System.out.println(word);
}
}
}
}
COM: <s> gets all words inside the alternate text for images </s>
|
funcom_train/28423828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Field getField( Class thisClass, String fieldName ) throws NoSuchFieldException {
if ( thisClass == null ) {
throw new NoSuchFieldException( "Invalid field : " + fieldName );
}
try {
return thisClass.getDeclaredField( fieldName );
}
catch ( NoSuchFieldException e ) {
return getField( thisClass.getSuperclass(), fieldName );
}
}
COM: <s> object rape fondle the private parts of an object without its </s>
|
funcom_train/1034037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String currentScopeAsString() {
StringBuffer buf = new StringBuffer(100);
boolean first = true;
Enumeration e = scopeStack.elements();
while(e.hasMoreElements()) {
if(first)
first = false;
else
buf.append("::");
buf.append(e.nextElement().toString());
}
return buf.toString();
}
COM: <s> return the current scope as a string </s>
|
funcom_train/10268346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getAllConditions(RdrNode node) {
ArrayList list = new ArrayList();
if (node != null) {
list.add(node.getCondition());
list.addAll(getAllConditions(node.getTrueChild())) ;
list.addAll(getAllConditions(node.getFalseChild())) ;
}
return list ;
}
COM: <s> recurses the tree collecting the condition from each node </s>
|
funcom_train/937055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRenameWithDirSlashName() throws Exception {
AbstractFile dir = VFS.resolveFile(prefix+testUtils.createTempName());
dir.mkdir();
newFile=VFS.resolveFile(dir,"testFile");
String path=dir.getName()+"/"+newFile.getName();
log.debug("Renaming...");
oldFile.rename(path);
assertFalse("Old file should no longer exists", oldFile.exists());
assertTrue("New file should be exists: "+newFile.getPath(), newFile.exists());
}
COM: <s> tests rename by passing a relative path begining with dir dir name </s>
|
funcom_train/5606909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long readinto(ByteBuffer[] bufs) {
long count = 0;
int bufCount;
for (ByteBuffer buf : bufs) {
if (!buf.hasRemaining()) {
continue;
}
if ((bufCount = readinto(buf)) == 0) {
break;
}
count += bufCount;
}
return count;
}
COM: <s> read bytes into each of the specified byte buffers </s>
|
funcom_train/37082799 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getMethodAndFeatureType(DASFeature theFeature){
if(
theFeature.getMethodLabel() != null
&&
theFeature.getMethodLabel().trim().length() > 0
){
return theFeature.getMethodLabel()+":"+theFeature.getTypeId();
}else{
return theFeature.getTypeId();
}//end if
}
COM: <s> concatenates a das features method label if not null and feature type </s>
|
funcom_train/12163045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInnerLinkRenderers() throws Exception {
// test the inner link renderer
MenuItemBracketingRenderer factoryRenderer =
factory.createInnerLinkRenderer(null);
assertNotNull("Should be am inner link renderer", factoryRenderer);
if (!(factoryRenderer instanceof DefaultAnchorMenuItemRenderer)) {
fail("The factory did not return the expected inner link renderer");
}
}
COM: <s> this tests create inner link renderer </s>
|
funcom_train/36557828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getShirtColor(float[] rgbOut) {
if (rgbOut == null || rgbOut.length < 3)
throw new IllegalArgumentException("Unacceptable array provided!");
rgbOut[0] = shirtColor[0];
rgbOut[1] = shirtColor[1];
rgbOut[2] = shirtColor[2];
}
COM: <s> retrieve the shirt color </s>
|
funcom_train/34562453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void extract() throws IOException {
if(bfc == null) return;
final String fname = bfc.getFileName();
String suffix = "";
if(fname.indexOf('.') != -1) {
final int dot = fname.lastIndexOf('.');
suffix = fname.substring(dot + 1).toLowerCase();
}
process(this, suffix);
finish();
}
COM: <s> extracts metadata and text xml contents from the associated file </s>
|
funcom_train/14615155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TemplateProcessor build() throws ParseException {
List<TemplateProcessor> accumulator = new ArrayList<TemplateProcessor>();
listInstructions = 0;
switchInstructions = 0;
functionInstructions = 0;
Instruction endInstruction = buildInstructions(accumulator);
TemplateArrayList list = new TemplateArrayList(accumulator);
if (endInstruction != null) {
throw new ParseException( "Unexpected instruction" +
parser.atChar());
}
return list;
}
COM: <s> builds the template </s>
|
funcom_train/12180706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LocationDetails getLocationDetails(Element element) {
RegistryEntry entry = new RegistryEntry(element, null);
LocationDetails details = null;
Iterator entries = register.iterator();
while(details==null && entries.hasNext()) {
RegistryEntry next = (RegistryEntry) entries.next();
details = entry.equals(next) ? next.locationDetails : null;
}
return details;
}
COM: <s> get the location details for the specified element </s>
|
funcom_train/28367426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getCurrentMaxX() {
if (zoomGridLimitsV.size() == 0) {
if (externalGridLimits == null || externalGridLimits.isSetXmax() == false) {
return getInnerMaxX();
} else {
return externalGridLimits.getMaxX();
}
} else {
GridLimits gl = zoomGridLimitsV.lastElement();
if (gl.isSetXmax() == false) {
return getInnerMaxX();
}
return gl.getMaxX();
}
}
COM: <s> returns the current max x attribute of the function graphs jpanel object </s>
|
funcom_train/39185624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getInterpolatedPixel(double x, double y) {
if (x<0.0) x = 0.0;
if (x>=width-1.0) x = width-1.001;
if (y<0.0) y = 0.0;
if (y>=height-1.0) y = height-1.001;
//ij.IJ.write("getInterpolatedPixel: "+Math.sqrt((x-oldx)*(x-oldx)+(y-oldy)*(y-oldy)));
//oldx = x; oldy = y;
return getInterpolatedPixel(x, y, pixels);
}
COM: <s> uses bilinear interpolation to find the pixel value at real coordinates x y </s>
|
funcom_train/42670148 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SecurityProxy setupSecurityProxy() {
SecurityProxy secProxy = new SecurityProxy();
/* Set up the crypto.properties */
/* TODO: should read from a properties file */
secProxy.getCryptoProperties().setKeystoreFilename(
"/opt/servicemix/conf/cetus.keystore");
secProxy.getCryptoProperties().setKeystorePassword("cetuspass");
secProxy.getCryptoProperties().setKeystoreAlias("cetuskey");
secProxy.getCryptoProperties().setAliasPassword("cetuspass");
return secProxy;
}
COM: <s> creates and sets up a security proxy instance </s>
|
funcom_train/31626380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isNeedingRollback(WizardPage src) {
Stack backtrace = getBackTrace();
boolean foundInStack = false;
for (int i = 0; i < backtrace.size(); i++) {
WizardPage onePage = (WizardPage) backtrace.get(i);
if (src.equals(onePage)) {
foundInStack = true;
break;
}
}
return foundInStack;
}
COM: <s> checks the backtrace for presence of the given wizard page </s>
|
funcom_train/43585431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetShallow() {
ZSession session = getSession();
int numQueries = 0;
Item item = (Item) session.getShallow(Item.META, "1");
Assert.assertEquals(session.getNumQueries(), numQueries);
Assert.assertTrue(item.isFieldInitialized(Item.ID));
Assert.assertFalse(item.isFieldInitialized(Item.NAME));
Assert.assertFalse(item.isFieldInitialized(Item.RATING));
Assert.assertFalse(item.isFieldInitialized(Item.ACTIVE));
Assert.assertFalse(item.isFieldInitialized(Item.AUTHOR_ID));
}
COM: <s> test code session </s>
|
funcom_train/33705335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ILaunchConfiguration findLaunchConfiguration(String mode) {
ILaunchConfiguration[] configs = getLaunchConfigurations();
ILaunchConfiguration configuration = null;
if (configs.length == 0) {
configuration = createNewConfiguration();
} else if (configs.length == 1) {
configuration = configs[0];
} else {
configuration = chooseConfiguration(configs, mode);
}
return configuration;
}
COM: <s> this method first tries to locate existing launch configurations that are </s>
|
funcom_train/18028778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testClosest() {
System.out.println("closest");
QDataSet ds = null;
double d = 0.0;
int guess = 0;
int expResult = 0;
int result = DataSetUtil.closest(ds, d, guess);
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of closest method of class data set util </s>
|
funcom_train/29018660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CoolItem getItem (int index) {
checkWidget ();
int count = (int)/*64*/OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
if (!(0 <= index && index < count)) error (SWT.ERROR_INVALID_RANGE);
REBARBANDINFO rbBand = new REBARBANDINFO ();
rbBand.cbSize = REBARBANDINFO.sizeof;
rbBand.fMask = OS.RBBIM_ID;
OS.SendMessage (handle, OS.RB_GETBANDINFO, index, rbBand);
return items [rbBand.wID];
}
COM: <s> returns the item that is currently displayed at the given </s>
|
funcom_train/18544265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringBuffer convertToHtml(Locale loc, String mask, Integer dataType, Locale currencyLoc) {
return new StringBuffer("<td class=\"tableCell\" align=\"center\" valign=\"top\">" +
format(loc, mask, dataType, this.getValue(), currencyLoc) + "</td>");
}
COM: <s> convert report result value to html format </s>
|
funcom_train/21869210 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createTransactionContextManagerBean(BeanDefinitionRegistry registry, String transactionManagerId, String transactionContextManagerId) {
RootBeanDefinition transactionContextManagerBeanDefinition = new RootBeanDefinition(
TransactionContextManagerFactoryBean.class);
transactionContextManagerBeanDefinition
.setPropertyValues(new MutablePropertyValues());
transactionContextManagerBeanDefinition.getPropertyValues()
.addPropertyValue(TRANSACTION_MANAGER,
new RuntimeBeanReference(transactionManagerId));
registry.registerBeanDefinition(transactionContextManagerId,
transactionContextManagerBeanDefinition);
}
COM: <s> method creating an instance of the code transaction context manager factory bean code </s>
|
funcom_train/39533529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AffineTransform getTransform(Element shapeElement){
AffineTransform af=null;
if(shapeElement!=null){
//gets the bridge context
BridgeContext ctxt=
handle.getCanvas().getBridgeContext();
if(ctxt!=null){
//gets the graphics node corresponding to the given node
GraphicsNode gnode=null;
try{gnode=ctxt.getGraphicsNode(shapeElement);}catch (Exception e){}
if(gnode!=null){
af=gnode.getTransform();
}else{
af=parseTransform(shapeElement);
}
if(af!=null){
af=new AffineTransform(af);
}
}
}
if(af==null){
af=new AffineTransform();
}
return af;
}
COM: <s> returns the affine transform that is applied to the given element </s>
|
funcom_train/7511437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getJCheckBoxModuleGraphic() {
if (jCheckBoxModuleGraphic == null) {
jCheckBoxModuleGraphic = new JCheckBox();
jCheckBoxModuleGraphic.setText(Messages.getString("MainFrame.moduleImage")); //$NON-NLS-1$
jCheckBoxModuleGraphic.setName("moduleImage"); //$NON-NLS-1$
}
return jCheckBoxModuleGraphic;
}
COM: <s> this method initializes j check box module graphic </s>
|
funcom_train/2427479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNumberOfTables() {
int numberOfTables = 0;
if (tables != null && tables.trim().length() > 0) {
// TODO: What about the highly unlikely (impossible?) case where
// table names contain the separator character?
numberOfTables = tables.split(TABLE_SEPARATOR).length;
}
return numberOfTables;
}
COM: <s> retrieves the number of tables in this code db tables code instance </s>
|
funcom_train/5655235 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object delete() throws EmptyListException {
if (isEmpty()) {
throw new EmptyListException("List is empty.");
}
Node oldHead = head;
head = oldHead.getNext(); // move head one further
length--; // decrease the list's length
return oldHead.getContent(); // return the deleted element's content
}
COM: <s> deletes the first element of the list </s>
|
funcom_train/17769144 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showBullet(Graphics graphic, Color color) {
Polygon bullet = drawBullet();
graphic.setColor(color);
graphic.drawPolygon(bullet);
try {
Thread.sleep(10);
}
catch (InterruptedException e) {}
graphic.setColor(panel.getBackground());
graphic.drawPolygon(bullet);
graphic.dispose();
}
COM: <s> shows the bullet in the window </s>
|
funcom_train/20882775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URL getDatabase() {
if (database == null) {
/* This is merely for backwards compatibility with
* versions of jTTS earlier than v1.2 (i.e.,
* before the voice manager was introduced).
*/
String name = getFeatures().getString(Voice.DATABASE_NAME);
database = this.getClass().getResource(name);
}
return database;
}
COM: <s> gets the url to the database that defines the unit data for this </s>
|
funcom_train/48147530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintComponent(Graphics g){
super.paintComponent(g);
//Draw circle
g.setColor(Color.blue);
drawCircle(g, 0, 0, 1);
//Draw triangle
drawLine(g, 1, 0, -0.5, 0.866);
drawLine(g, 1, 0, -0.5, -0.866);
drawLine(g, -0.5, 0.866, -0.5, -0.866);
//Draw chord
g.setColor(Color.red);
drawLine(g, 1, 0, x, y);
}
COM: <s> this method draws the floor </s>
|
funcom_train/4557922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPaymentSettingWhatIsThis() {
repEng.newStep("339", "Payment Settings- What is this? for Security Code");
//1. Goto User Settings:Payment Settings page
//2. Click What is this? link
// should open What is this? window, the info are:This is the security code from
// the back of your credit card, typically a 3 or 4 digit number. on What is this? page.
}
COM: <s> 339 payment settings what is this for security code </s>
|
funcom_train/44627529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNormalSignalsOnly() {
helpTC(" class A { \n"
+"//@ behavior\n"
+"//@ requires true;\n"
+"//@ signals_only RuntimeException;\n"
+"//@ also\n"
+"//@ normal_behavior\n"
+"//@ assignable \\everything;\n"
+"int m() { return 0; }\n"
+"}"
);
}
COM: <s> tests normal signals only </s>
|
funcom_train/6408529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void applyPassStates(RenderContext<?> context) {
for (int x = RenderState.StateType.values().length; --x >= 0;) {
if (passStates[x] != null) {
savedStates[x] = context.enforcedStateList[x];
context.enforcedStateList[x] = passStates[x];
}
}
}
COM: <s> applies all currently set renderstates to the supplied context </s>
|
funcom_train/2903841 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(){
String tmp = "KeyMap=";
if((keys!=null) && (keys.size()>0)){
Object[] kc = keys.toArray();
for(int i=0; i<kc.length; i++){
if(kc[i] != null){
tmp += kc[i].toString();
}
if((i+1) < kc.length){
tmp += ", ";
}
}
}
return tmp;
}
COM: <s> a string representation of these keys </s>
|
funcom_train/20896704 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IFASTAEntry next() throws NoSuchElementException {
if (logger.isFinestEnabled()) {
logger.finest("Returning entry: " + entry);
}
if (entry == null) {
throw new NoSuchElementException("No elements read. Either hasNext has not been called, " +
" or there are no more entries.");
}
return entry;
}
COM: <s> the method code next code returns the next entry from the file </s>
|
funcom_train/21087465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCommentPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_Commentaire_comment_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_Commentaire_comment_feature",
"_UI_Commentaire_type"),
SNI_Package.Literals.COMMENTAIRE__COMMENT, true, true, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
COM: <s> this adds a property descriptor for the comment feature </s>
|
funcom_train/12831880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void openPreferencePage() {
IWorkbench workbench = PlatformUI.getWorkbench();
PreferenceManager pm = workbench.getPreferenceManager();
if (pm != null) {
PreferenceDialog d = new PreferenceDialog(workbench.getActiveWorkbenchWindow().getShell(),
pm);
d.setSelectedNode(target);
d.create();
if (d.open() == Window.OK) {
close();
}
}
}
COM: <s> opens the preferences with the node selected given by the target parameter </s>
|
funcom_train/50464176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BLXElement getBLXObjectElement() {
BLXElement blxElement = null;
if(extension != null) {
blxElement = new BLXElement(BLXElement.OBJECT_TYPE, extension, objClassName, id);
}
else {
blxElement = new BLXElement(BLXElement.OBJECT_TYPE, serviceName, objClassName, id);
}
blxElement.setContextURL(contextURL);
return blxElement;
}
COM: <s> get the blx element for this helpers blx object </s>
|
funcom_train/46157785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateLayout() {
ClientContextJME.getWorldManager().addRenderUpdater(new RenderUpdater() {
public void update(Object arg) {
// update scale of root node
node.setLocalScale(pdfCell.getScale());
// redo layout.
int i = 0;
for (Spatial s : slides) {
setSpatialPosition(s, i);
i++;
}
}},null);
}
COM: <s> triggers a re layout process based on the latest values from the cell </s>
|
funcom_train/43467212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEquals() {
XMLGen objXMLGen = new XMLGen();
objXMLGen.xmlHeader();
objXMLGen.taggedValue("test", "value");
XMLGen objXMLGen2 = new XMLGen();
objXMLGen2.xmlHeader();
objXMLGen2.taggedValue("test", "value");
assertEquals(true, objXMLGen.equals(objXMLGen2));
}
COM: <s> test the equals method </s>
|
funcom_train/46825770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void drawBorder (Graphics g) {
// wipe the background (spacing colour)
g.setColor (this.spacingColour);
g.fillRect (0, 0, getWidth(), getHeight());
g.setColor (Color.black);
int size = getWidth();
g.drawRect (0, 0, size - 1, size - 1);
g.drawRect (this.borderWidth,
this.borderWidth,
size - 1 - (this.borderWidth * 2),
size - 1 - (this.borderWidth * 2));
}
COM: <s> this method wipes the board and draws the border </s>
|
funcom_train/22570820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void listPersonalDevelopmentPlans(IQueryResultListener listener) throws RestException {
List<IServer> servers = discoverServers();
listener.resetQueryProgress(servers.size());
for (IServer server : servers) {
if (fAsync) {
ListPersonalDevelopmentPlansForServerJob j = new ListPersonalDevelopmentPlansForServerJob(server
.getUrl(), listener, server);
j.schedule();
} else {
listPersonalDevelopmentPlans(server, listener);
}
}
}
COM: <s> list all personal development plans on all known servers </s>
|
funcom_train/8077648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getRawResultOutput() {
StringBuffer result = new StringBuffer();
if (m_deduper == null) {
return "<null> deduper";
}
result.append(toString());
result.append("Deduper model: \n"+m_deduper.toString()+'\n');
// append the performance statistics
if (m_result != null) {
result.append(m_result);
}
return result.toString();
}
COM: <s> gets the raw output from the deduper </s>
|
funcom_train/25333800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetMostRecentEnsemblVersion() throws Exception {
DBRegistry instance = new DBRegistry();
assertNull(instance.getMostRecentEnsemblVersion());
instance.setConfiguration(DataSource.ENSEMBLDB);
assertNotNull(instance.getMostRecentEnsemblVersion());
assertTrue(instance.getMostRecentEnsemblVersion().equals("60"));
}
COM: <s> test of get most recent ensembl version method of class dbregistry </s>
|
funcom_train/13380196 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int findAverage(Map<String, Integer> ratingsMap) {
int total = 0;
int counted = 0;
Set<Entry<String, Integer>> ratingSet = ratingsMap.entrySet();
for (Entry<String, Integer> rating : ratingSet) {
if (rating.getValue().intValue() > MIN_RATING) {
total += rating.getValue().intValue();
counted++;
}
}
return (int) Math.ceil( (double) total / (double) counted);
}
COM: <s> find average rating of submitted words </s>
|
funcom_train/25186663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAttribute(Object obj) {
String attrPrefix = getAttributePrefix();
boolean isNamedAsAttribute = (attrPrefix != null && attrPrefix.length() > 0) && getPath().getLeafName().startsWith(attrPrefix);
boolean isScalar = Utilities.isScalarOrString(obj);
return isNamedAsAttribute && isScalar;
}
COM: <s> used to detect differ attributes from properties </s>
|
funcom_train/49438779 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isValidForIncoming(GUID match, GUID guidReceived, InetSocketAddress addr) {
if(!match.equals(guidReceived))
return false;
String host = addr.getAddress().getHostAddress();
return !ConnectionSettings.LOCAL_IS_PRIVATE.getValue() ||
!RouterService.getConnectionManager().isConnectedTo(host);
}
COM: <s> determines whether or not the specified message is valid for setting </s>
|
funcom_train/38385647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLoadEmpty() {
String structure;
REDText text = getTestText();
// load non existing text (load is done automatically in constructor).
text = new REDText("maynotexist.txt");
text.addREDTextEventListener(fViewListener);
text.addREDTextEventListener(fNormalListener);
text.addREDTextEventListener(fLateListener);
text.load();
checkEvents("beforeLoad()");
structure = text.getStructure();
assertEquals("Structure of non existant file wasn't \"null\"",
"null", structure);
}
COM: <s> tests the load and the get structure methods of redtext for a non </s>
|
funcom_train/23381701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void increment(final ICoverageNode child) {
instructionCounter = instructionCounter.increment(child
.getInstructionCounter());
branchCounter = branchCounter.increment(child.getBranchCounter());
lineCounter = lineCounter.increment(child.getLineCounter());
complexityCounter = complexityCounter.increment(child
.getComplexityCounter());
methodCounter = methodCounter.increment(child.getMethodCounter());
classCounter = classCounter.increment(child.getClassCounter());
}
COM: <s> increments the counters by the values given by another element </s>
|
funcom_train/11004835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLineWidth(double width){
EscherOptRecord opt = (EscherOptRecord)getEscherChild(_escherContainer, EscherOptRecord.RECORD_ID);
setEscherProperty(opt, EscherProperties.LINESTYLE__LINEWIDTH, (int)(width*EMU_PER_POINT));
}
COM: <s> sets the width of line in in points </s>
|
funcom_train/37566118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void renewLease(UTF8 holder) {
synchronized (leases) {
Lease lease = (Lease) leases.get(holder);
if (lease != null) {
sortedLeases.remove(lease);
lease.renew();
sortedLeases.add(lease);
LOG.info("Renewed lease " + lease);
}
}
}
COM: <s> renew the lease s held by the given client </s>
|
funcom_train/34580987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getRefreshCommand () {
if (refreshCommand == null) {//GEN-END:|167-getter|0|167-preInit
// write pre-init user code here
refreshCommand = new Command ("Refresh", Command.SCREEN, 0);//GEN-LINE:|167-getter|1|167-postInit
// write post-init user code here
}//GEN-BEGIN:|167-getter|2|
return refreshCommand;
}
COM: <s> returns an initiliazed instance of refresh command component </s>
|
funcom_train/22900430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendMessage(User user, String message) {
try {
prepWriteBuffer(message + EOL);
channelWrite(user.getChannel(), writeBuffer);
} catch (NullPointerException ex) {
System.err.println("(" + message + ") ERROR: Trying to access a non exsistent client/message! " + ex.getMessage());
}
}
COM: <s> sends a message to the client defined by the user object </s>
|
funcom_train/18586978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAmCoastWatcherActive(int island, boolean active) {
if (island >= 0 && island < americanCoastWatchersList.size()) {
activeAmericanCoastWatchers[island] = active;
this.recalculateCoastWatchers();
} else {
Log.error("getAmCoastWatcherActive called with illegal island "+island);
}
}
COM: <s> sets whether an american coast watcher island is active or not </s>
|
funcom_train/51526468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Transaction readTransaction(String line){
// consider removing and making part of the inputFileReader
StringTokenizer t = new StringTokenizer(line);
List<Item> items = new ArrayList<Item>();
while(t.countTokens() > 1){
items.add(new Item(t.nextToken()));
}
String classLabel = t.nextToken();
Transaction tran = new Transaction(TID++,classLabel,items);
return tran;
}
COM: <s> duplicated from inputfilereader read the tran </s>
|
funcom_train/12155382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IStorageSOPClassSCUFulfillmentStrategyFactory getFactory() {
logger.debug("Entering getFactory().");
IStorageSOPClassSCUFulfillmentStrategyFactory factory = getFactory(/* providerId = */ null);
if (logger.isDebugEnabled()) {
logger.debug("Exiting getFactory(); RV = " + (factory != null ? "[" + factory + "]" : null) + ".");
}
return factory;
}
COM: <s> gets the default fulfillment strategy factory </s>
|
funcom_train/50310522 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cancelJob(Joblet job, boolean kill) throws JobException {
// Currently we ignore the kill parameter
Job theJob = (Job)(jobs.remove(job.getRefID()));
if (theJob != null) {
Logger.log(Logger.INFO,
"Jobs: Stopping job [" + job.getRefID() + "] kill [" +kill+ "]", this);
theJob.cancel();
}
}
COM: <s> request to stop a job </s>
|
funcom_train/14519754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IServiceSessionLocal getServiceSession() {
if (servicesession == null) {
try {
IServiceSessionLocalHome servicesessionhome = (IServiceSessionLocalHome) getLocator().getLocalHome(IServiceSessionLocalHome.COMP_NAME);
servicesession = servicesessionhome.create();
} catch (CreateException e) {
throw new EJBException(e);
}
}
return servicesession;
} //getServiceSession
COM: <s> gets connection a service session used for timed services </s>
|
funcom_train/15626656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setSelectedMapSquare(@Nullable final MapSquare<G, A, R> mapSquare, @Nullable final G gameObject) {
if (selectedMapSquare == mapSquare && selectedGameObject == gameObject) {
return false;
}
selectedMapSquare = mapSquare;
selectedGameObject = gameObject;
fireSelectionChangedEvent();
return true;
}
COM: <s> sets the currently selected map square </s>
|
funcom_train/39482463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetHoldCount () {
ReentrantLock lock = new ReentrantLock(fairness);
for (int i = 1; i <= SIZE; i++) {
lock.lock();
assertEquals(i, lock.getHoldCount());
}
for (int i = SIZE; i > 0; i--) {
lock.unlock();
assertEquals(i - 1, lock.getHoldCount());
}
}
COM: <s> get hold count returns number of recursive holds </s>
|
funcom_train/11721451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected HrefProperty getHrefProperty(DavPropertyName name, Item[] values, boolean isProtected) {
String[] pHref = new String[values.length];
for (int i = 0; i < values.length; i++) {
pHref[i] = getLocatorFromItem(values[i]).getHref(true);
}
return new HrefProperty(name, pHref, isProtected);
}
COM: <s> creates a new href property with the specified name using the given </s>
|
funcom_train/10281133 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void append(LogStyle pStyle, String pText) {
mLog.insert(pText);
StyleRange lStyleRange = new StyleRange();
lStyleRange.start = 0;
lStyleRange.length = pText.length();
lStyleRange.foreground = pStyle.getColor();
mLog.setStyleRange(lStyleRange);
}
COM: <s> append text with a certain style </s>
|
funcom_train/23937291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point2D getDimension(final Point2D view) {
if (element.hasAttribute("width") || element.hasAttribute("height")) {
return new Point2D.Double(dim2pt(DOMUtil.getAttribute(element,
"width").trim()), dim2pt(DOMUtil
.getAttribute(element, "height").trim()));
}
return view;
}
COM: <s> get the dimension of this node from its width and height attributes </s>
|
funcom_train/34823180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireEdgeAdded(DAGEdge edge) {
GraphEdgeChangeEvent<DAGVertex, DAGEdge> e = createGraphEdgeChangeEvent(
GraphEdgeChangeEvent.EDGE_ADDED, edge);
for (int i = 0; i < graphListeners.size(); i++) {
GraphListener<DAGVertex, DAGEdge> l = graphListeners.get(i);
l.edgeAdded(e);
}
}
COM: <s> notify listeners that the specified edge was added </s>
|
funcom_train/45256461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void finishWizards() {
if (deferWizards != null) {
Iterator iter = deferWizards.iterator();
while (iter.hasNext()) {
WorkbenchWizardElement wizard = (WorkbenchWizardElement) iter
.next();
IConfigurationElement config = wizard.getConfigurationElement();
finishWizard(wizard, config);
}
deferWizards = null;
}
}
COM: <s> finishes the addition of wizards </s>
|
funcom_train/21125000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSqlWithoutSentinel(String schema) {
String sql = " (";
sql += getListAsString(columnDefs, ",", schema);
String constraints = getListAsString(constraintDefs, ",", schema);
if (constraints != "") sql += ","+constraints;
sql += ")";
return sql;
}
COM: <s> gets the create table text without the parts that create sentinels </s>
|
funcom_train/18746050 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int markSubsumedStates(Collection<ShapeState> result) {
int markCount = 0;
for (ShapeState subsumed : this.subsumedStates) {
if (subsumed.setSubsumptor(this)) {
markCount++;
if (result != null) {
result.add(subsumed);
}
}
}
this.subsumedStates = null;
return markCount;
}
COM: <s> goes over the list of possible subsumed states and mark them as such </s>
|
funcom_train/38810399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_TCM__String_getAttributeValue_String_OrgJdomNamespace() {
Element element = new Element("el");
element.setAttribute(new Attribute("name", "first", Namespace
.getNamespace("x", "urn:WombatsRUS")));
assertEquals("incorrect value returned", element.getAttributeValue(
"name", Namespace.getNamespace("x", "urn:WombatsRUS")), "first");
}
COM: <s> test get attribute value with name and namespace </s>
|
funcom_train/48151912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e){
if (e.getSource() == okButton){
for (int i = 0; i < size; i++){
try{
probabilities[i] = ((Double)table.getValueAt(0, i)).doubleValue();
}
catch(NumberFormatException x){
probabilities[i] = 0;
}
}
probabilities = Functions.getProbabilities(probabilities);
ok = true;
dispose();
}
else if (e.getSource() == cancelButton){
ok = false;
dispose();
}
}
COM: <s> this message handles the event generated when the user clicks on a button </s>
|
funcom_train/2584459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test1562759() {
StatisticalLineAndShapeRenderer r
= new StatisticalLineAndShapeRenderer(true, false);
assertTrue(r.getBaseLinesVisible());
assertFalse(r.getBaseShapesVisible());
r = new StatisticalLineAndShapeRenderer(false, true);
assertFalse(r.getBaseLinesVisible());
assertTrue(r.getBaseShapesVisible());
}
COM: <s> a simple test for bug report 1562759 </s>
|
funcom_train/51812218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCopyConstructor() {
MutableInterface obj = (MutableInterface) MapBackedBean.createBean(MutableInterface.class, new SimpleReadOnlyImpl());
assertEquals("Incorrect int value", 100, obj.getInt());
assertEquals("Incorrect string value", "Foobar", obj.getString());
assertTrue("Incorrect boolean value", obj.isFlag());
}
COM: <s> test that verifies that copying works </s>
|
funcom_train/12181657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkSelectionValues(PolicyValueModifier pvMod) {
// Get the Combo and retrieve its items.
Combo combo = (Combo) pvMod.getControl();
String[] values = combo.getItems();
// Check that the values are what is expected.
boolean valuesEqual = Arrays.equals(SELECTION_VALUES, values);
return valuesEqual;
}
COM: <s> checks that the inital values of the policy value modifier for selection </s>
|
funcom_train/12656570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addItemAt(int pos, PlaylistItem item) {
cachedPlaylist.add(pos, item);
if (filterPredicate.evaluate(item)) {
filteredPlaylist.add(pos, item);
}
setModified((item == null) ? false : true);
if (playMode == PlayMode.SHUFFLE) {
addToShuffledList(item);
}
fireItemAddedEvent(item);
}
COM: <s> adds a playlist item at a given position in the playlist </s>
|
funcom_train/20743346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getHtmlContent() {
String text = null;
try {
Map model = getModel();
text = VelocityEngineUtils.mergeTemplateIntoString(
velocityEngine, templateName + ".html", model);
} catch (VelocityException ex) {
// html template may not be defined - just ignore it
//log.error("Cannot generate message text:", ex);
}
return text;
}
COM: <s> html messages is not supported yet </s>
|
funcom_train/21460671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double stdev() {
double m = mean();
double total = 0;
final int N = getNumElements();
if( N <= 1 )
throw new IllegalArgumentException("There must be more than one element to compute stdev");
for( int i = 0; i < N; i++ ) {
double x = get(i);
total += (x - m)*(x - m);
}
total /= (N-1);
return Math.sqrt(total);
}
COM: <s> computes the unbiased standard deviation of all the elements </s>
|
funcom_train/20067986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getClassName(String fileName) {
if (fileName.endsWith(CLASS_SUFFIX)) {
String className = fileName.replace(File.separatorChar, '.');
return className.substring(0, className.length() - CLASS_SUFFIX.length());
} else
return null;
}
COM: <s> returns the class name given a file name </s>
|
funcom_train/26379695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String capitalize(String str) {
if (str.length() <= 0)
return str;
String tempCharStr = new String(String.valueOf(str.charAt(0)));
tempCharStr = tempCharStr.toUpperCase();
String finalStr = tempCharStr + str.substring(1, str.length());
return finalStr;
} // End of method capitalize()
COM: <s> capitalize the first character of a string </s>
|
funcom_train/45623221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPublicClassPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_GenerateResourceType_publicClass_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_GenerateResourceType_publicClass_feature", "_UI_GenerateResourceType_type"),
MSBPackage.eINSTANCE.getGenerateResourceType_PublicClass(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the public class feature </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.