__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/45878700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UnitValue getAirPressureCorrection() throws IOException {
if (pressureCorrection == null) {
double pressureCorrectionHPa = pressure(device.read(MemoryMap.AIR_PRESSURE_CORRECTION, 3)) - 1000.0;
pressureCorrection = new UnitValue(pressureCorrectionHPa, PressureUnit.HECTOPASCAL);
}
return pressureCorrection;
}
COM: <s> pressure correction stored in the station </s>
|
funcom_train/3857774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected MBeanAttributeInfo findAttributeInfo(javax.management.MBeanInfo beanInfo, String attributeName) {
MBeanAttributeInfo[] attributes = beanInfo.getAttributes();
for (int counter = 0; counter < attributes.length; counter++) {
if (attributes[counter].getName().equals(attributeName)) {
return attributes[counter];
}
}
return null;
}
COM: <s> helper function to find the mbean attribute info for the indicated attribute name </s>
|
funcom_train/8469582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addTo(Calendar c) {
c.add(Calendar.YEAR, years);
c.add(Calendar.MONTH, months);
c.add(Calendar.WEEK_OF_YEAR, weeks);
c.add(Calendar.DAY_OF_YEAR, days);
c.add(Calendar.HOUR_OF_DAY, hours);
}
COM: <s> adds the duration of this time span to the provided </s>
|
funcom_train/29054394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void catchAllItems( boolean onlyIfOutside) {
try {
Iterator iter = m_items.tuples();
while (iter.hasNext()) {
NodeItem aNodeItem = (NodeItem) iter.next();
catchItem(aNodeItem, onlyIfOutside);
}
} catch ( Exception ignore) {
// very occasionally a concurrent modification exception is
// thrown here
// we choose to ignore this and catch the items next round
}
}
COM: <s> ensures that all node items belonging to this zone are placed within </s>
|
funcom_train/9553788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Section getSectionByName(String name) {
Section section = defaultSection;
if (name == null) {
return section;
}
for (Map.Entry<String, Section> entry : sections.entrySet()) {
if (name.equals(entry.getValue().getName())) {
return entry.getValue();
}
}
return section; // since we have the default settings for owner and group outside the actual default section
}
COM: <s> returns the section with the specified name </s>
|
funcom_train/19887193 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetPrice() {
System.out.println("setPrice");
double price = 0.0;
testRevenueSource instance = null;
instance.setPrice(price);
// 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 price method of class edu </s>
|
funcom_train/18440232 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float friendsEntries() {
float percent;
String sql = "SELECT count(*) FROM entry WHERE security='1';";
percent = (((float) sqlCount(sql) / (float) entries()) * 100);
if (log.isDebugEnabled())
log.debug("friendsEntries(): percent is " + percent);
return percent;
}
COM: <s> percentage of friends entries as compared to total </s>
|
funcom_train/2415198 | /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 ("konga_jdbc_infoprovider".equals(portName)) {
setkonga_jdbc_infoproviderEndpointAddress(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/22232188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SceneGraphPath pickClosest( PickShape pickShape ) {
if (universe == null) {
throw new IllegalStateException(J3dI18N.getString("Locale4"));
}
PickInfo pickInfo = pickClosest( PickInfo.PICK_BOUNDS,
PickInfo.SCENEGRAPHPATH, pickShape);
if(pickInfo == null) {
return null;
}
return pickInfo.getSceneGraphPath();
}
COM: <s> returns a scene graph path which references the pickable item </s>
|
funcom_train/12304282 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NameOpValue getParam(String attribute) {
if (_relations == null || attribute == null) return null;
Iterator iter = _relations.iterator();
NameOpValue nv;
String canonAttrib = canonicalize(attribute);
String tmpCanonAttrib = null;
while(iter.hasNext()) {
nv = (NameOpValue)iter.next();
tmpCanonAttrib = canonicalize(nv.getAttribute());
if (tmpCanonAttrib.equalsIgnoreCase(canonAttrib)) {
return nv;
}
}
return null;
}
COM: <s> returns the relation associated with the given attribute </s>
|
funcom_train/8347424 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getExitCommand1() {
if (exitCommand1 == null) {//GEN-END:|75-getter|0|75-preInit
// write pre-init user code here
exitCommand1 = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|75-getter|1|75-postInit
// write post-init user code here
}//GEN-BEGIN:|75-getter|2|
return exitCommand1;
}
COM: <s> returns an initiliazed instance of exit command1 component </s>
|
funcom_train/20846166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void onShutdown() {
Log.debug("LocalToolkit.onShutdown");
if (CoreController.getAbstractServices() != null) {
Enumeration e = CoreController.getAbstractServices().elements();
while (e.hasMoreElements()) {
AbstractService aservice = (AbstractService) e.nextElement();
if (aservice instanceof IHostingService) {
IHostingService device = (IHostingService) aservice;
if (aservice.isRunning()) {
device.sendBye();
}
}
}
}
}
COM: <s> called if the vm normally shutdowns </s>
|
funcom_train/41444989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNotActive() {
if (currentDrawing.getChildren().contains(selectionFigure)) {
selectionFigure.removeMouseMotionListener(this);
selectionFigure.removeMouseListener(this);
}
if (currentSelection != null) {
//System.out.println("Removing Mouse linster from " + currentSelection.size());
for (Iterator iter = currentSelection.iterator(); iter.hasNext();) {
Figure selected = (Figure) iter.next();
selected.removeMouseMotionListener(this);
selected.removeMouseListener(this);
}
}
}
COM: <s> de actecive the dragging system for the old selection </s>
|
funcom_train/43889298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFeatures(Feature[] features) {
if ((features == null) || (features.length == 0)) {
throw new IllegalArgumentException("Provided features are empty");
}
synchronized (memory) {
for (int i = 0; i < features.length; i++) {
addFeatureInternal(features[i]);
}
}
}
COM: <s> configures memory data store with feature array </s>
|
funcom_train/46691373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createAlbumart() {
GridData gridData10 = new GridData();
gridData10.horizontalAlignment = GridData.FILL;
gridData10.grabExcessHorizontalSpace = false;
gridData10.grabExcessVerticalSpace = false;
gridData10.heightHint = 150;
gridData10.verticalAlignment = GridData.FILL;
albumart = new Canvas(sShell, SWT.NONE);
albumart.setLayoutData(gridData10);
albumart.addPaintListener(new PaintListener()
{
public void paintControl(PaintEvent e) {
if(albumimage!=null)
e.gc.drawImage(albumimage, 0, 0);
}
});
}
COM: <s> this method initializes albumart </s>
|
funcom_train/42193763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OutputStream getOutputStream() {
try {
// ensure that we have a result stream
if (null==streamResult.getOutputStream()) {
setWriter(null);
makeWriter();
}
} catch (XPathException e) {
e.printStackTrace();
}
return super.getOutputStream();
}
COM: <s> before returning the output stream make sure that it is not null </s>
|
funcom_train/2955743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void self_explain(int select, ConstraintCollection e) {
switch (select) {
case PalmRealInterval.INF:
e.merge(this.explanationOnInf);
break;
case PalmRealInterval.SUP:
e.merge(this.explanationOnSup);
break;
case PalmRealInterval.DOM:
e.merge(this.explanationOnInf);
e.merge(this.explanationOnSup);
break;
}
}
COM: <s> explains the state of this expression lower upper bounds or all domain </s>
|
funcom_train/10357397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSubject() throws MessagingException {
String subject = getSingleHeader("Subject");
if (subject == null) {
return null;
} else {
try {
// this needs to be unfolded before decodeing.
return MimeUtility.decodeText(MimeUtility.unfold(subject));
} catch (UnsupportedEncodingException e) {
// ignored.
}
}
return subject;
}
COM: <s> returns the value of the subject header </s>
|
funcom_train/31955973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void randomInit(String filename) throws FitsException {
String permissions = "r";
File f = new File(filename);
if (!f.exists() || !f.canRead()) {
throw new FitsException("Non-existent or unreadable file");
}
if (f.canWrite()) {
permissions += "w";
}
try {
dataStr = new BufferedFile(filename, permissions);
((BufferedFile) dataStr).seek(0);
} catch (IOException e) {
throw new FitsException("Unable to open file " + filename);
}
}
COM: <s> initialize using buffered random access </s>
|
funcom_train/2958187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (!(obj instanceof OpenBitSet))
return false;
if (this == obj)
return true;
OpenBitSet set = (OpenBitSet) obj;
checkInvariants();
set.checkInvariants();
if (wordsInUse != set.wordsInUse)
return false;
// Check words in use by both BitSets
for (int i = 0; i < wordsInUse; i++)
if (words[i] != set.words[i])
return false;
return true;
}
COM: <s> compares this object against the specified object </s>
|
funcom_train/35716010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void triggerContentAssist() {
if (fFramePosition instanceof ProposalPosition) {
ProposalPosition pp= (ProposalPosition) fFramePosition;
ICompletionProposal[] choices= pp.getChoices();
if (choices != null && choices.length > 0) {
fAssistant.setCompletions(choices);
fAssistant.showPossibleCompletions();
return;
}
}
fAssistant.setCompletions(new ICompletionProposal[0]);
fAssistant.hidePossibleCompletions();
}
COM: <s> trigger content assist on choice positions </s>
|
funcom_train/41016330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startListening() {
if (mLocationManager != null) {
mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, MIN_TIME,
MIN_DISTANCE, this);
if (!mLocationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {
showDialog(DIALOG_NO_GPS_ID);
} else {
mWantsLocation = true;
setProgressBarIndeterminateVisibility(true);
}
}
}
COM: <s> helpers for starting stopping monitoring of gps changes below </s>
|
funcom_train/44771130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object o) {
Index other = (Index) o;
int val = numDocs < other.numDocs ? -1 : (numDocs == other.numDocs ? 0 : 1);
if (val != 0) {
return val;
} else {
return name.compareTo(other.name);
}
}
COM: <s> indexes are first ordered by </s>
|
funcom_train/5475159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTabbedPane getTb_area() {
if (tb_area == null) {
tb_area = new JTabbedPane();
tb_area.setBounds(new java.awt.Rectangle(4,30,973,663));
tb_area.addTab("Planos", null, getPan_planos(), null);
tb_area.addTab("Modelos", null, getPan_modelos(), null);
}
return tb_area;
}
COM: <s> this method initializes tb area </s>
|
funcom_train/22178533 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private List openEditor(List<ColorData> initList) {
logger.debug("opening color flow editor");
ColorFlowDialog dialog = new ColorFlowDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
dialog.setValueList(initList);
if (Dialog.OK == dialog.open()) {
return dialog.getValueList();
}
return null;
}
COM: <s> opens the edit and returns the edited color map </s>
|
funcom_train/16604391 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isControllerDown(int controller) {
if (controller >= getControllerCount()) {
return false;
}
if (controller == ANY_CONTROLLER) {
for (int i=0;i<controllers.size();i++) {
if (isControllerDown(i)) {
return true;
}
}
return false;
}
return ((Controller) controllers.get(controller)).getYAxisValue() > 0.5f
|| ((Controller) controllers.get(controller)).getPovY() > 0.5f;
}
COM: <s> check if the controller has the down direction pressed </s>
|
funcom_train/25967822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void nextRealToken(StringTokenizer st){
if(!st.hasMoreTokens()){
//System.out.println("No more tokens");
nextToken = "";
return;
}
nextToken = st.nextToken();
while(nextToken.equals(" ")||nextToken.equals("\n")||nextToken.equals("\t")){
if(nextToken.equals("\n")){
lineNumber ++;
}
if(!st.hasMoreTokens()){
nextToken = "";
return;
}
nextToken = st.nextToken();
}
//System.out.println(" df "+nextToken);
return;
}
COM: <s> helper method to remove whitespaces </s>
|
funcom_train/4230853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getTarget(Object edge) {
Object cell = null;
cell = DefaultGraphModel.getTargetVertex(model, edge);
if (cell != null && !isVertex(cell)) {
// Check to see if the edge has been promoted
if (edgePromotion) {
while (model.getParent(cell) != null && !isVertex(cell)) {
cell = model.getParent(cell);
}
} else {
return null;
}
if (isVertex(cell)) {
return cell;
} else {
return null;
}
}
return cell;
}
COM: <s> returns the vertex that is connected to the target end of the specified </s>
|
funcom_train/50079036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getClassName(String fileName) {
String newName = fileName.replace(File.separatorChar,'.');
// Because zipfiles don't have platform specific seperators
newName = newName.replace('/','.');
return newName.substring(0, fileName.length() - 6);
}
COM: <s> p returns the fully qualified class name of a class from its path </s>
|
funcom_train/47545759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getMinimum () {
checkWidget ();
int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle);
GtkAdjustment adjustment = new GtkAdjustment ();
OS.memmove (adjustment, hAdjustment);
int digits = OS.gtk_spin_button_get_digits (handle);
for (int i = 0; i < digits; i++) adjustment.lower *= 10;
return (int) adjustment.lower;
}
COM: <s> returns the minimum value which the receiver will allow </s>
|
funcom_train/33006576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
//System.out.println("Closing the streams");
if (dataInStrm != null)
dataInStrm.kill();
if (ctrlInStrm != null)
ctrlInStrm.kill();
while(!dataSock.isClosed())
dataSock.close();
while(!ctrlSock.isClosed())
ctrlSock.close();
dataSock=null;
ctrlSock=null;
}
COM: <s> close all the rtp rtcp streams </s>
|
funcom_train/36996189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Iterator selectNodeList( String expr, Node node ) throws TransformerException {
try {
//com.iv.flash.util.Log.info("selectNodeList("+expr+", node="+node.getNodeName()+")");
return XPath.select(expr, node);
} catch( XPathException e ) {
throw new TransformerException(e);
}
}
COM: <s> evaluates xpath to list of nodes </s>
|
funcom_train/1151275 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void absorbExamplesSD(Vector<DataPoint> xvec, int i1, int i2) {
if (!(this instanceof TruncatedGradient)) throw new UnsupportedOperationException("Only TG can emulate SD");
createMissingBlocks();
for(LearnerBlock block: blocks) {
block.dis.ensureCommitted();
block.validateExamples(xvec, i1,i2);
(( TruncatedGradient.TruncatedGradientLearnerBlock)block).absorbExamplesSD(xvec, i1, i2);
}
}
COM: <s> the sd emulating act </s>
|
funcom_train/51483461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkMinimumSize() {
Dimension d = getDrawingSize();
boolean bloat = false;
if (fViewSize.height < d.height) {
fViewSize.height = d.height+10;
bloat = true;
}
if (fViewSize.width < d.width) {
fViewSize.width = d.width+10;
bloat = true;
}
if (bloat)
setSize(fViewSize);
}
COM: <s> bloat the drawing if necessary to contain all objects </s>
|
funcom_train/38971520 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add_return(Dato param){
if (local_return == null){
local_return = new Dato[]{};
}
//update the setting tracker
local_returnTracker = true;
java.util.List list =
org.apache.axis2.databinding.utils.ConverterUtil.toList(local_return);
list.add(param);
this.local_return =
(Dato[])list.toArray(
new Dato[list.size()]);
}
COM: <s> auto generated add method for the array for convenience </s>
|
funcom_train/22232208 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode() {
long bits = 1L;
for (int i = 0; i < planes.length; i++) {
bits = 31L * bits + HashCodeUtil.doubleToLongBits(planes[i].x);
bits = 31L * bits + HashCodeUtil.doubleToLongBits(planes[i].y);
bits = 31L * bits + HashCodeUtil.doubleToLongBits(planes[i].z);
bits = 31L * bits + HashCodeUtil.doubleToLongBits(planes[i].w);
}
return (int) (bits ^ (bits >> 32));
}
COM: <s> returns a hash code value for this bounding polytope object </s>
|
funcom_train/10367355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetStats() {
stats.threadsInUse.setLowerBound(0);
stats.threadsInUse.setUpperBound(0);
stats.threadsInUse.setCurrent(0);
stats.threadsInUse.setLowWaterMark(0);
stats.threadsInUse.setHighWaterMark(0);
stats.setStartTime();
}
COM: <s> reset all statistics in pool stats impl object </s>
|
funcom_train/16086349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String get(String key) {
String res = prPr.getProperty(key);
if (res == null) {
List<Preference> l = model.getPrefs();
for (Preference p : l)
if (p.getName().equals(key)) {
res = p.getDefaultValue();
if (res == null)
res = "";
break;
}
}
return res;
}
COM: <s> returns value of preference </s>
|
funcom_train/8263417 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addImageListener(ImageListener listener) {
ArrayList l = this.imageListeners;
java.awt.Image currentImage;
synchronized(l) {
currentImage = this.image;
l.add(listener);
}
if(currentImage != null) {
// Call listener right away if there's already an
// image; holding no locks.
listener.imageLoaded(new ImageEvent(this, currentImage));
// Should not call onload handler here. That's taken
// care of otherwise.
}
}
COM: <s> adds a listener of image loading events </s>
|
funcom_train/23267806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetFechaCreacion() {
System.out.println("getFechaCreacion");
Prestamos instance = new Prestamos();
String expResult = "";
String result = instance.getFechaCreacion();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get fecha creacion method of class capa negocios </s>
|
funcom_train/40627902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testListen_ExtremeThreading_4() throws Exception {
checkListen_ExtremeThreading_4(false);
assertEquals(900, getEventCount(TEST_DOMAIN));
assertEquals(600, getEventCount(TEST_DOMAIN_2));
assertEquals(600, getEventCount(TEST_DOMAIN_3));
}
COM: <s> adding 2100 events with multithreading and a listen thread at every third event </s>
|
funcom_train/19591975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void lookAt(Vector3f position, Vector3f upVector, boolean takeParentInAccount) {
compVecA.set(position).subtractLocal(getWorldTranslation());
getLocalRotation().lookAt(compVecA, upVector);
if (takeParentInAccount && parent!=null)
getLocalRotation().multLocal(parent.getWorldRotation().inverse());
}
COM: <s> code look at code is a convenience method for auto setting the local </s>
|
funcom_train/44772530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifyNodeRemoved(ChildNodeEntry removed) {
synchronized (listeners) {
MapIterator iter = listeners.mapIterator();
while (iter.hasNext()) {
NodeStateListener l = (NodeStateListener) iter.next();
if (l != null) {
l.nodeRemoved(this, removed.getName(),
removed.getIndex(), removed.getUUID());
}
}
}
}
COM: <s> notify the listeners that a child node entry has been removed </s>
|
funcom_train/39853295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object remove(Object key) {
if (key == null) {
return null;
}
KeyAndValue kv = (KeyAndValue)this.map.remove(((String)key).toLowerCase());
if (kv == null) {
return null;
} else {
return kv.getValue();
}
}
COM: <s> removes the mapping for this key from this map if present </s>
|
funcom_train/45257031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initializeApplicationColors() {
StartupThreading.runWithoutExceptions(new StartupRunnable() {
public void runWithException() {
ColorDefinition[] colorDefinitions = WorkbenchPlugin
.getDefault().getThemeRegistry().getColors();
ThemeElementHelper.populateRegistry(getThemeManager().getTheme(
IThemeManager.DEFAULT_THEME), colorDefinitions,
PrefUtil.getInternalPreferenceStore());
}
});
}
COM: <s> initialize colors defined by the new color definitions extension point </s>
|
funcom_train/10836337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPath() {
if (getProperty() != null) {
try {
return getProperty().getPath();
} catch (RepositoryException re) {
// fallback
log.warn("getPath: Cannot retrieve path of entry " + getName(),
re);
}
}
// fallback if no resource property or an error accessing the path of
// the property
return getSafePath();
}
COM: <s> returns the path of the property containing the resource </s>
|
funcom_train/43292665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected IFigure createFigure() {
NodeFigure figure;
if (getModel() == null)
return null;
if (getModel() instanceof LayoutProcessDocument)
figure = new ProcessDocumentFigure((LayoutProcessDocument) getModel());
else if (getModel() instanceof LayoutPipelineProcess)
figure = new PipelineProcessFigure((LayoutPipelineProcess) getModel());
else
figure = new GateFigure();
return figure;
}
COM: <s> returns a newly created figure of this </s>
|
funcom_train/28993580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isVisibleFor(User u) {
boolean answer = false;
if (getContent() == null) {
return false;
}
if ((getContent().isReleased() && getContent()
.checkPermission(
u,
AbstractAccessControlMediator
.getPermissionByName(IDatabaseConstants.DBV_PERMISSION_READ)))
|| getContent().getAcl().isOwner(u)) {
answer = true;
}
return answer;
}
COM: <s> answer true if this content node is visible for the specified user </s>
|
funcom_train/7581673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUserEnabled(boolean userSelected) {
getEditUserItem().setEnabled(userSelected);
getRemoveUserItem().setVisible(userSelected);
getRemoveUserItem().setEnabled(userSelected);
getAddAccountItem().setEnabled(userSelected);
if (userSelected) {
getDeleteMenuItem().setVisible(!userSelected);
}
}
COM: <s> updates the menu items status depending on whether an user is selected or </s>
|
funcom_train/19270113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Weekday getNext() {
switch (this) {
case MONDAY:
return TUESDAY;
case TUESDAY:
return WEDNESDAY;
case WEDNESDAY:
return THURSDAY;
case THURSDAY:
return FRIDAY;
case FRIDAY:
return SATURDAY;
case SATURDAY:
return SUNDAY;
case SUNDAY:
return MONDAY;
default :
throw new IllegalCaseException(Weekday.class, this);
}
}
COM: <s> this method gets the next </s>
|
funcom_train/20891832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseDimensionElement(Element dimensionElement) throws ConfigurationException {
String x = dimensionElement.getAttributeValue("x");
String y = dimensionElement.getAttributeValue("y");
try {
factory.putConfiguration("xSize", x);
factory.putConfiguration("ySize", y);
} catch (NumberFormatException e) {
throw new ConfigurationException("invalid dimension element", e);
}
}
COM: <s> parses a dimension element </s>
|
funcom_train/37823097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void undo() {
// the order of treatise is important; the last step of the list has to be undone first
// e.g. undo of the deletion described above: firstly the recreation of the node, than the recreation of the edges
for (int i = mySteps.size()-1; i >= 0; i--) {
mySteps.get(i).undo();
}
}
COM: <s> undoes all the steps represented by this complex step </s>
|
funcom_train/42207447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean createAndDeleteFolder(String folderName, String filePath) {
boolean result = false;
try {
File file = new File(filePath + folderName);
if (file.exists()) {
file.delete();
System.out.println("dir alreay exist, had been delete");
result = true;
} else {
file.mkdir();
System.out.println("dir was not exist, had been created");
result = true;
}
} catch (Exception ex) {
result = false;
System.out.println("CreateAndDeleteFolder is error:" + ex);
}
return result;
}
COM: <s> create file and delete dir </s>
|
funcom_train/14500986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void activate(String authenticationcode) throws CryptoTokenAuthenticationFailureException, CryptoTokenOfflineException {
try {
catoken.activate(authenticationcode);
} catch (CATokenOfflineException e) {
throw new CryptoTokenOfflineException(e.getMessage());
} catch (CATokenAuthenticationFailedException e) {
throw new CryptoTokenAuthenticationFailureException(e.getMessage());
}
}
COM: <s> method activating the cryptographic token using the given key </s>
|
funcom_train/10806648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNodeName() {
return (this.namespace != null
&& !"".equals(this.namespace.getPrefix()) &&
!(OMConstants.XMLNS_NS_PREFIX.equals(this.attrName)))
? this.namespace.getPrefix() + ":" + this.attrName
: this.attrName;
}
COM: <s> returns the name of this attribute </s>
|
funcom_train/45088291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void executeBlockingJob(final JPPFJob job) throws Exception {
// set the job in blocking mode.
job.setBlocking(true);
// Submit the job and wait until the results are returned.
// The results are returned as a list of JPPFTask instances,
// in the same order as the one in which the tasks where initially added the job.
List<JPPFTask> results = jppfClient.submit(job);
// process the results
processExecutionResults(results);
}
COM: <s> execute a job in blocking mode </s>
|
funcom_train/27943848 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onRegisterExistingUser( java.lang.String strNickName, java.lang.String strNewUserId, java.lang.String strPasswd ) {
JUserInfo userInfo = new JUserInfo( strNewUserId, strNickName, strPasswd, JPlugin.STATUS_ONLINE );
setUserInfo( userInfo );
fireOnLogin();
}
COM: <s> implement the on register existing user </s>
|
funcom_train/10676230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean execute() throws Exception {
String str = "dkk\u13ff\uffff\u0000\ubebe";
char[] str1 = str.toCharArray();
char[] str2 = nativeExecute(str);
if (str1.length != str2.length)
return false;
for (int iii = 0; iii < str1.length; iii++)
if (str1[iii] != str2[iii])
return false;
return true;
}
COM: <s> native code returns characters array from argument string </s>
|
funcom_train/50862685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateDimensions(ConstructionStage stage) {
if (!stage.getInfo().isUnsetDimensions()) {
if (stage.getInfo().getWidth() != width) width = stage.getInfo().getWidth();
if (stage.getInfo().getLength() != length) length = stage.getInfo().getLength();
}
}
COM: <s> updates the width and length dimensions to a construction stage </s>
|
funcom_train/32876100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPseudoRandomFunction(long pseudoRandomFunction) {
if (pseudoRandomFunction != PseudoRandomFunctionType.HMAC_SHA1) {
throw new IllegalArgumentException("Illegal value for argument\"pseudoRandomFunction\": " +
Functions.toHexString(pseudoRandomFunction));
}
pseudoRandomFunction_ = pseudoRandomFunction;
}
COM: <s> set the pseudo random function prf to used to generate the key </s>
|
funcom_train/4358333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeMessageDestinationRef(String name) {
entries.remove(name);
MessageDestinationRef mdr = null;
synchronized (mdrs) {
mdr = (MessageDestinationRef) mdrs.remove(name);
}
if (mdr != null) {
support.firePropertyChange("messageDestinationRef",
mdr, null);
mdr.setNamingResources(null);
}
}
COM: <s> remove any message destination reference with the specified name </s>
|
funcom_train/9006682 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private TransportMessage loadMessage(int recordId) throws IOException, DeserializationException{
try {
init();
byte[] data = messageRecordStore.getRecord(recordId);
TransportMessage message = new TransportMessage();
ExtUtil.deserialize(data, message);
return message;
} catch (RecordStorageException e) {
//#if debug.output==verbose || debug.output==exception
System.out.println(e);
//#endif
throw new IOException(e.getMessage());
}
catch (DeserializationException uee) {
uee.printStackTrace();
throw uee;
}
}
COM: <s> loads transport message with given record id from rms </s>
|
funcom_train/42970154 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void discoverDevicesUsingArp() {
try {
Process p;
// Invokes a OS Native command "arp -a" to get all registers in the arp table
p = Runtime.getRuntime().exec("arp -a");
// read the command output
Set<String> neighbourIpVector = this.readResult(p.getInputStream());
// notifies the listener the end fo the search
listener.deviceDiscoveryFinished(new Vector<String>(neighbourIpVector));
p.destroy();
}
catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> discover devices in the network accessing the arp table of the os </s>
|
funcom_train/46040174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeUnsafeHeaders(HttpRequest request) {
// Host must be removed.
final String[] badHeaders = new String[] {
// No legitimate reason to over ride these.
// TODO: We probably need to test variations as well.
"Host", "Accept", "Accept-Encoding"
};
for (String bad : badHeaders) {
request.removeHeader(bad);
}
}
COM: <s> removes unsafe headers from the header set </s>
|
funcom_train/12649568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeExternalData(Externalizable obj) throws IOException {
Object oldObj = curObj;
ObjectStreamClass oldDesc = curDesc;
PutFieldImpl oldPut = curPut;
curObj = obj;
curDesc = null;
curPut = null;
if (protocol == PROTOCOL_VERSION_1) {
obj.writeExternal(this);
} else {
bout.setBlockDataMode(true);
obj.writeExternal(this);
bout.setBlockDataMode(false);
bout.writeByte(TC_ENDBLOCKDATA);
}
curObj = oldObj;
curDesc = oldDesc;
curPut = oldPut;
}
COM: <s> writes externalizable data of given object by invoking its </s>
|
funcom_train/45697848 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildDepthFirstList(final List<Tree<T, U, V>> list, final Tree<T, U, V> node) {
list.add(node);
for (Tree child : node.getChildren()) {
// NOTE, recursion
buildDepthFirstList(list, child);
}
}
COM: <s> helper method for </s>
|
funcom_train/6205345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setChoice(Object choice) {
this.choice = choice;
if (!currentValue.getControl().isDisposed()) {
if (choice == null) {
currentValue.setImage(ERROR_IMAGE);
currentValue.setText(getNoChoiceErrorLabel());
} else {
currentValue.setImage(lProvider.getImage(choice));
currentValue.setText(lProvider.getText(choice));
}
currentValue.getControl().update();
choiceChanged();
}
}
COM: <s> set the current object choice </s>
|
funcom_train/32760562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getValueAt( final int row, final int column ) {
final NodeRecord record = _records.get( row );
if ( record != null ) {
switch ( column ) {
case NAME_COLUMN:
return record.getNodeID();
case SEQUENCE_COLUMN:
return record.getSequenceID();
case STATUS_COLUMN:
return toStatusString( record );
case EXCLUDE_COLUMN:
return toExcludeString( record );
case MODIFY_COLUMN:
return toModifyString( record );
case COMMENT_COLUMN:
return record.getModificationComment();
default:
return null;
}
}
else {
return null;
}
}
COM: <s> get the value to display in the specified cell </s>
|
funcom_train/3563188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeData(Long dataID) throws DbException {
NVPair[] parms;
parms = new NVPair[1];
parms[0] = new NVPair("dataID", dataID.toString());
simpleRequest(REMOVE_DATA_PAGE, "Cannot remove data set", parms);
}
COM: <s> deletes a data item </s>
|
funcom_train/49045734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButtonMenuItem getJRadioButtonDivIntoConst() {
if (buttDivIntoConst == null) {
buttDivIntoConst = new JRadioButtonMenuItem();
buttDivIntoConst.setText("c / Image");
buttDivIntoConst.setToolTipText("divide constant by image");
buttDivIntoConst.addActionListener(this);
buttDivIntoConst.setActionCommand("parameter");
}
return buttDivIntoConst;
}
COM: <s> this method initializes the option div into const </s>
|
funcom_train/5597459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPage(URL url) throws IOException{
forwardList.clear();
forward.setEnabled(false);
URL p = viewer.getPage();
if(p != null){
backList.addFirst(p);
sizeCheck(backList);
backward.setEnabled(true);
}
viewer.setPage(url);
viewer.getHighlighter().removeAllHighlights();
}
COM: <s> sets the page of the jeditor pane and </s>
|
funcom_train/34675319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addLoading(String reason, Reference relatesTo, String contributesTo, String dependsOn, Rate rate) {
addLine(new RateBehaviour(generateLineId(), reason, relatesTo, contributesTo, dependsOn, BehaviourType.LOAD, rate));
}
COM: <s> add a loading with a generated line id and the specified arguments </s>
|
funcom_train/23853384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initGUI() {
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
setTitle(_("SessionManagement.Title"));
setResizable(false);
getContentPane().setLayout(new BorderLayout());
getContentPane().add(getSessionsPanel(), BorderLayout.CENTER);
getContentPane().add(getNewSessionPanel(), BorderLayout.NORTH);
pack();
}
COM: <s> initializes the gui of this dialog </s>
|
funcom_train/2029101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void service(HttpServletRequest request, HttpServletResponse response) throws IOException {
getServletContext().log(
"Attempt to call service method on YanLoaderServlet as [" +
request.getRequestURI() + "] was ignored");
response.sendError(HttpServletResponse.SC_BAD_REQUEST);
}
COM: <s> this should never even be called since no mapping to this servlet should </s>
|
funcom_train/29829202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Enumeration agentsEnumeration() {
// reads the agents and stores into hashtable
Vector agentsVector = new Vector();
Enumeration agentsEnum = agents.agents();
while (agentsEnum.hasMoreElements()) {
Agent a = (Agent) agentsEnum.nextElement();
agentsVector.add(a);
}
return agentsVector.elements();
}
COM: <s> returns code enumeration code of agents </s>
|
funcom_train/12709255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isModified(IndexExpression aExpression, boolean aUseName) {
if (!StringUtils.isEmpty(expression)) {
return !expression.equals(aExpression.getExpression());
}
if (aUseName) {
return !attributeRef.getName().equals(
aExpression.getAttributeRef().getName());
}
return !attributeRef.equals(aExpression.getAttributeRef());
}
COM: <s> test if this expression is not equals to another expression </s>
|
funcom_train/21112161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setMessageType(int messageType) {
if ((messageType == LONG_MESSAGE) || (messageType == ERROR)
|| (messageType == WARNING) || (messageType == INFORMATION)) {
this.messageType = messageType;
} else {
throw new IllegalArgumentException("Inavlid message type on SAWSTextOutputCallback.");
}
}
COM: <s> method that sets the type of the message to be displayed </s>
|
funcom_train/4742326 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExecuteAction() throws Exception{
ActionRegistry ar = new ActionRegistry(ActionCallType.DAEMON_CALL, null);
GetRefreshsAction action = ar.getAction(GetRefreshsAction.class);
// 1
action.setProperties("Daemon", "Daemon");
List<Refresh> list = action.call();
System.out.println(list.size());
}
COM: <s> as there is no senseful testing this has to be tested by hand </s>
|
funcom_train/2362219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Context loadContext() throws Exception {
Document document = loadContextSendRequest();
int turn = parseTurn(document);
List<Message> broadcasts = parseHeaders(document, BROADCAST);
List<Message> messages = parseHeaders(document, MESSAGE);
List<Message> hypercasts = parseHeaders(document, HYPERCAST);
return new Context(turn, broadcasts, messages, hypercasts);
}
COM: <s> load context all messages from server </s>
|
funcom_train/18808987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIterateDomainExtent() {
XYDataset dataset = createXYDataset1();
Range r = DatasetUtilities.iterateDomainExtent(dataset);
assertEquals(1.0, r.getLowerBound(), DELTA);
assertEquals(3.0, r.getUpperBound(), DELTA);
}
COM: <s> some tests for the iterate domain extent method </s>
|
funcom_train/8411109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ImageIcon getTypedIcon() {
if ((type != null) && !type.equals("")) {
return new ImageIcon(Toolkit.getDefaultToolkit().getImage(
"src/aash/catalog/views/button/round_button_" + type + ".png").getScaledInstance(radius,
radius, Image.SCALE_DEFAULT));
} else {
return null;
}
}
COM: <s> return the icon of the button </s>
|
funcom_train/925517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getAttributeValue() {
StringBuffer ip = new StringBuffer();
byte[] data = getAttributeData();
if (data == null || data.length != 4)
throw new RuntimeException("ip attribute: expected 4 bytes attribute data");
ip.append(data[0] & 0x0ff);
ip.append(".");
ip.append(data[1] & 0x0ff);
ip.append(".");
ip.append(data[2] & 0x0ff);
ip.append(".");
ip.append(data[3] & 0x0ff);
return ip.toString();
}
COM: <s> returns the attribute value ip number as a string of the </s>
|
funcom_train/18807553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getObject(final int item) {
Object result = null;
if (item >= 0 && item < this.data.size()) {
final KeyedObject kobj = (KeyedObject) this.data.get(item);
if (kobj != null) {
result = kobj.getObject();
}
}
return result;
}
COM: <s> returns an object </s>
|
funcom_train/28418957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean parseValue(String rule) {
if (rule.contains("VALUE[")) {
int i = rule.indexOf("VALUE[") + 6;
String s = rule.substring(i); s = s.substring(0,s.indexOf("]"));
value=s;
return true;
}
return false;
}
COM: <s> fetch the value to set from the rule </s>
|
funcom_train/13848086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeGroups(String[] oldGroups) {
testArrayForNullElement(oldGroups);
boolean maybeDiscard;
synchronized (registrars) {
if (terminated)
throw new IllegalStateException("discovery terminated");
if (groups == null)
throw new UnsupportedOperationException(
"can't remove from \"any groups\"");
maybeDiscard = removeGroupsInt(oldGroups);
}
if (maybeDiscard)
maybeDiscardRegistrars();
}//end removeGroups
COM: <s> remove a set of groups from the set to be discovered </s>
|
funcom_train/24078040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public boolean identical(ICategory c1, ICategory c2) {
if (c1 == c2) {
return true;
}
if (!equivalent(c1, c2)) {
return false;
}
if (!StructureUtils.equivalent(c1.getProfileDown(), c2.getProfileDown())) {
return false;
}
if (!StructureUtils.equivalent(c1.getProfileUp(), c2.getProfileUp())) {
return false;
}
return true;
}
COM: <s> tests whether the given objects have equal name and profiles </s>
|
funcom_train/21189212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFullPath() {
StringBuffer result = new StringBuffer();
String folderName = getFolderName();
if (folderName != null) {
result.append(folderName).append("/");
}
result.append(getFileName());
return result.toString().replace('\\', '/');
}
COM: <s> concatenates the folder name and file name of the modification into a </s>
|
funcom_train/3655136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void flush() throws IOException {
super.flush();
if (position > 0) {
if (encode) {
out.write(Base64.encode3to4(buffer, position));
position = 0;
} // end if: encoding
else {
throw new IOException("Base64 input not properly padded.");
} // end else: decoding
} // end if: buffer partially full
out.flush();
} // end flush
COM: <s> appropriately pads base64 notation when encoding </s>
|
funcom_train/43065689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getItem(int position) {
//return position;
View v = listView.getChildAt(position);
ViewHolder holder = (ViewHolder) v.getTag();
holder.position = position;
holder.cb.setChecked(checkedItems[position]);
return (ViewHolder) v.getTag();
}
COM: <s> since the data comes from an array just returning the index is </s>
|
funcom_train/10915633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element getTestRoot(File testFile) throws TransformerException {
Transformer transformer = getTestcase2ChecksStylesheet().newTransformer();
DOMResult res = new DOMResult();
transformer.transform(new StreamSource(testFile), res);
Document doc = (Document) res.getNode();
return doc.getDocumentElement();
}
COM: <s> returns the element from the given xml file that encloses the tests </s>
|
funcom_train/23351359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetTipLabelCustomizer(boolean state) {
if(tlc != null) {tlc.dispose();}
tlc = new TipLabelCustomizer(frame, this, (frame.otuMetadata != null),
(frame.sampleMetadata != null));
tlc.setVisible(state);
}
COM: <s> resets tip label customizer object based on new otu metadata </s>
|
funcom_train/14296085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getTaggedValueValuesByName(Object pElement, String pName) {
Element theElement = (Element) pElement;
Stereotype stype = getStereotypeAsStereotype(theElement);
if (stype != null) {
List sList = StereotypesHelper.getStereotypePropertyValueAsString(theElement, stype, pName);
if (sList.size() != 0) {
return Collections.unmodifiableList(sList);
}
}
return null;
}
COM: <s> returns the list of data values of the tagged value with the name </s>
|
funcom_train/50313208 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setThumb (int value) {
checkWidget();
if (value < 1) return;
int range = Fox.FXScrollbar_getRange(handle);
if (value < 1 || value > range) return;
Fox.FXScrollbar_setPage(handle, value);
int selection = Fox.FXScrollbar_getPosition(handle);
if(selection + value > range)
Fox.FXScrollbar_setPosition(handle, range - value);
}
COM: <s> sets the size of the receivers thumb relative to the </s>
|
funcom_train/10628654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPosNegFirstShorter() {
String numA = "293478573489347658763745839457637";
String numB = "-2837462783428374767845648748973847593874837948575684767";
String res = "-2837462783428374767845615168483972194300564226167553532";
BigInteger aNumber = new BigInteger(numA);
BigInteger bNumber = new BigInteger(numB);
BigInteger result = aNumber.xor(bNumber);
assertTrue(res.equals(result.toString()));
}
COM: <s> xor for a positive and a negative number the first is shorter </s>
|
funcom_train/12709673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean elementExists(String aUniqueName, boolean aCaseSensitive) {
for (T theElement : this) {
if (aCaseSensitive) {
if (aUniqueName.equals(theElement.getUniqueName())) {
return true;
}
} else {
if (aUniqueName.equalsIgnoreCase(theElement.getUniqueName())) {
return true;
}
}
}
return false;
}
COM: <s> check if a named element already exists in this list </s>
|
funcom_train/36253171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStatFile() throws Exception {
Path file = new Path("/home/user/testfile-" + UUID.randomUUID().toString()
+ ".dat");
sftpFs.create(file);
FileStatus fstat1 = sftpFs.getFileStatus(file);
assertNotNull("Status not null", fstat1);
sftpFs.delete(file, false);
}
COM: <s> test getting the status of a file </s>
|
funcom_train/50310683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadConfig() throws ClientException {
String fileName = ClientConstants.CLIENT_PROPERTIES_FILE;
config = new Properties();
try {
config.load(new FileInputStream(fileName));
Logger.log(Logger.DEBUG, "Client: Loaded properties [" + fileName
+ "]: " + config.toString(), this);
}
catch (IOException e) {
throw new ClientException(
"Error while accessing properties file [" + fileName + "]: " + e);
}
}
COM: <s> loads configuration file and stores values in porperties </s>
|
funcom_train/22123889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent evt) {
if (count++ > numRepeats) {
stopFlashing();
return;
}
// Sets the background and foreground opposite
// to they current colors
// orig colors now --> set to given colors
if (comp.getBackground() == origBg) {
comp.setBackground(bgColor);
comp.setForeground(Color.blue);
} else { // new colors --> reset
comp.setBackground(origBg);
comp.setForeground(origFg);
}
}
COM: <s> changes the foreground and background colors to the </s>
|
funcom_train/10800185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DataCache getDataCache(String name, boolean create) {
if (name == null || (_cache != null && name.equals(_cache.getName())))
return _cache;
if (_cache != null)
return _cache.getPartition(name, create);
return null;
}
COM: <s> returns the named cache </s>
|
funcom_train/50911156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IntSet notIn(IntSet is) {
IntSet ix = new IntSet();
for (int i = 0; i < this.nelem; i++) {
int ii = this.elementAt(i);
if (!is.contains(ii)) {
ix.addElement(ii);
}
}
return ix;
}
COM: <s> elements only in first set </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.