__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/11008198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void disabled_testContentType() throws Exception {
String filepath = OpenXML4JTestDataSamples.getSampleFileName("sample.docx");
// Retrieves core properties part
OPCPackage p = OPCPackage.open(filepath, PackageAccess.READ);
PackageRelationship corePropertiesRelationship = p
.getRelationshipsByType(
PackageRelationshipTypes.CORE_PROPERTIES)
.getRelationship(0);
PackagePart coreDocument = p.getPart(corePropertiesRelationship);
ContentTypeManager ctm = new ZipContentTypeManager(coreDocument.getInputStream(), p);
// TODO - finish writing this test
fail();
}
COM: <s> test the properties part content parsing </s>
|
funcom_train/10500694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void endSuite(Throwable caught, AntUnitExecutionNotifier notifier) {
if (hasSuiteTearDown) {
try {
Project newProject = getCleanProject();
newProject.executeTarget(SUITETEARDOWN);
} catch (BuildException e) {
notifier.fireStartTest(SUITETEARDOWN);
fireFailOrError(SUITETEARDOWN, e, notifier);
}
}
getCurrentProject().fireBuildFinished(caught);
isSuiteStarted = false;
}
COM: <s> executes the suite tear down target if presents and report any execution error </s>
|
funcom_train/20888582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void csFreeEvent(AirPerformCarrierSense cs, int pos) {
// time and varTime has passed, without any carrier -> inform the men, err MAC.
csInterval = null;
WakeUpCall wuc = new MACCarrierSensing(sender, 0.0, true);
sendEventTo(wuc, LayerType.MAC);
}
COM: <s> internal method to inform the mac of a free carrier </s>
|
funcom_train/3902818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateCompletionThresholdType_Max(BigDecimal completionThresholdType, DiagnosticChain diagnostics, Map context) {
boolean result = completionThresholdType.compareTo(COMPLETION_THRESHOLD_TYPE__MAX__VALUE) <= 0;
if (!result && diagnostics != null)
reportMaxViolation(AdlcpV1p3Package.Literals.COMPLETION_THRESHOLD_TYPE, completionThresholdType, COMPLETION_THRESHOLD_TYPE__MAX__VALUE, true, diagnostics, context);
return result;
}
COM: <s> validates the max constraint of em completion threshold type em </s>
|
funcom_train/40735666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValueString(String newVal) {
if ((newVal != null && valueString != null && (newVal.compareTo(valueString) == 0)) ||
(newVal == null && valueString == null && valueStringIsInitialized)) {
return;
}
valueString = newVal;
valueStringIsModified = true;
valueStringIsInitialized = true;
}
COM: <s> setter method for value string </s>
|
funcom_train/19810672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void testGetOrganizationViolations() {
Set<Entry<String,String>> violations = this.myIsern.getOrganizationViolations();
for (Entry<String,String> violation : violations) {
assertTrue("Violation's key should be a existed name of Organization",
this.myIsern.hasOrganization(violation.getKey()));
}
}
COM: <s> test get organization violations </s>
|
funcom_train/48615866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doTag() throws JspException {
BasicFormTag formTag = (BasicFormTag) findAncestorWithClass(this,
BasicFormTag.class);
if (formTag == null) {
throw new JspTagException("the <ur:image> tag must"
+ " be nested within a <ur:form> tag");
}
context = (PageContext) getJspContext();
JspWriter out = context.getOut();
try {
out.print("\n<input ");
out.print(getAttributes());
out.print("/>");
} catch (Exception e) {
throw new JspException(e);
}
}
COM: <s> create the image tag </s>
|
funcom_train/17145952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double dot(Vertex o) {
double ret =
x() * o.x() +
y() * o.y() +
z() * o.z();
// Debug.out("Vertex", this + " dot(" + o + ") = " + Debug.num(ret));
return ret;
}
COM: <s> returns the dot product of this vector dotted with the other </s>
|
funcom_train/19371051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void flushIfNeeded(byte[]buffer,Integer count,double fraction,OutputStream ostream){
if (count.doubleValue()>fraction*buffer.length){
try {
ostream.write(buffer);
}
catch (IOException e){
System.out.println("Error writing to nexus file");
}
}
}
COM: <s> support function for write nexus </s>
|
funcom_train/49050662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Lom getAsLom() {
StreamSource metadataSource = new StreamSource(new StringReader(this.toString()));
try {
JAXBContext jaxbcontext = JAXBContext.newInstance(CoreJAXB.getContextPath());
Unmarshaller unmarshaller = jaxbcontext.createUnmarshaller();
return (Lom) unmarshaller.unmarshal(metadataSource);
} catch (JAXBException jbe) {
throw new IllegalStateException(jbe);
}
}
COM: <s> creates a lom instance corresponding to this metadata object </s>
|
funcom_train/39776825 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void renderXhtmlFragment(RenderingContext rc, Element itemXML, String cellId, String xhtml) {
Document document = itemXML.getOwnerDocument();
xhtml = (xhtml == null ? "" : xhtml);
CDATASection cdata = document.createCDATASection(xhtml);
Element xhtmlFragment = document.createElement("xhtmlfragment");
xhtmlFragment.appendChild(cdata);
xhtmlFragment.setAttribute("cellid", cellId);
itemXML.appendChild(xhtmlFragment);
}
COM: <s> creates a messaging fixup xhtmlfragment object to allow the xhtml of a </s>
|
funcom_train/22654965 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Map processEvent(MatchResult result, int validReceiverFormat) {
Map map = new HashMap();
// group zero is the entire match - process all other groups
for (int i = 1; i < result.groups(); i++) {
map.put(matchingKeywords[validReceiverFormat].get(i - 1), result
.group(i));
}
return map;
}
COM: <s> convert the oro match into a map </s>
|
funcom_train/45508172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void closeConnection ( ) {
// If port is alread closed just return.
if ( !open ) { return; }
// Check to make sure sPort has reference to avoid a NPE.
if ( sPort != null ) {
try {
os.close( );
is.close( );
} catch ( IOException e ) {
System.err.println( e );
}
sPort.close( );
}
open = false;
}
COM: <s> close the port and clean up associated elements </s>
|
funcom_train/20342553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getNoteText() {
if (noteText == null) {//GEN-END:|87-getter|0|87-preInit
// write pre-init user code here
noteText = new StringItem("", null);//GEN-LINE:|87-getter|1|87-postInit
getMeetingNoteList().getSelectedIndex();
// write post-init user code here
}//GEN-BEGIN:|87-getter|2|
return noteText;
}
COM: <s> returns an initiliazed instance of note text component </s>
|
funcom_train/42970254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteAll () throws IdNotFoundException, IdNotInformedException{
Connection con;
try{
con = connect();
String sql = "";
PreparedStatement stm = con.prepareStatement(sql);
sql = "delete from " + TABLE_NAME;
stm = con.prepareStatement(sql);
// executes deletion
stm.executeUpdate();
stm.close();
//closes connection
con.close();
} catch (SQLException e){
logger.log(Level.SEVERE, "", e);
}
}
COM: <s> deletes from database all devices </s>
|
funcom_train/10281801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object o) {
XFile f = (XFile) o;
int cmpResult = -1;
if (f.getDate() != null && getDate() != null) {
cmpResult = f.getDate().compareTo(getDate());
}
return cmpResult;
}
COM: <s> compare two objects on the date </s>
|
funcom_train/41662790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void entSet( Entity ent ) {
Entity old = entMap.put( ent.getUniqueId(), ent );
if ( ent instanceof LocalPlayer ) {
if ( localPlayer != 0 ) {
worldLog.log( Level.WARNING, "setting localPlayer again!", ent );
}
localPlayer = ent.getUniqueId();
}
if ( old != dummyEntity ) {
worldLog.log( Level.WARNING, "entity set and old entity wasn't our expected dummy!", old );
}
}
COM: <s> set an entity expects slot to be initialized </s>
|
funcom_train/12068420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getItemYPos( int current, int total , int height, int imageHeight){
int yPos = 0;
yPos = current / numXTiles;
float yStep = (height/numYTiles);
int result = (new Float( (yPos * yStep) + (yStep /2 ) ) ).intValue() - (imageHeight/2) ;
return result;
}
COM: <s> calculates the a items y position based on position in list </s>
|
funcom_train/2442317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addToParent(Container parent, Object layout) {
BoxBuilder row = BoxBuilder.horizontal();
Collection<JButton> buttons = buttonMap.values();
buttons.remove(cancelButton);
row.addAllWithSpace(5, buttons);
row.rigid(50).add(cancelButton);
row.setOpaque(false);
row.addToParent(parent, layout);
}
COM: <s> adds these navigation buttons to a parent container </s>
|
funcom_train/24621692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue( double left, double right, double top, double bottom ) {
childLeft.setValue(new Double(left).toString());
childRight.setValue(new Double(right).toString());
childTop.setValue(new Double(top).toString());
childBottom.setValue(new Double(bottom).toString());
if (parent != null) parent.changed();
notifyObservers();
}
COM: <s> sets new coordinates to the parameter </s>
|
funcom_train/33626214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object otherCardObject) {
Card otherCard = (Card) otherCardObject;
int suitDiff = suitValue.compareTo(otherCard.suitValue);
int rankDiff = rankValue.compareTo(otherCard.rankValue);
if (sortRankMajorOrder) {
if (rankDiff != 0)
return rankDiff;
else
return suitDiff;
} else {
if (suitDiff != 0)
return suitDiff;
else
return rankDiff;
}
}
COM: <s> compares two cards for the purposes of sorting </s>
|
funcom_train/28662563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initContextMenu() {
MenuManager manager = new MenuManager();
manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
Menu menu = manager.createContextMenu(viewer.getControl());
viewer.getControl().setMenu(menu);
getSite().registerContextMenu(manager, viewer);
}
COM: <s> context menu available in the view </s>
|
funcom_train/3360677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void appendRemainingName(Name name) {
// System.out.println("appendingRemainingName: " + name.toString());
// Exception e = new Exception();
// e.printStackTrace();
if (name != null) {
if (this.remainingName != null) {
try {
this.remainingName.addAll(name);
} catch (InvalidNameException e) {
// ignore; shouldn't happen for composite name
}
} else {
this.remainingName = (Name)(name.clone());
}
}
}
COM: <s> adds components to the end of remaining name </s>
|
funcom_train/44011549 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddTxLine() {
System.out.println("addTxLine");
TransLineBO txLine = null;
TransactionBO instance = new TransactionBO();
instance.addTxLine(txLine);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of add tx line method of class edu </s>
|
funcom_train/50076583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean hasIInterface(IInterface iface){
IComponent comp = (IComponent)element;
Collection coll = comp.getAllInterfaces();
if(coll==null) return false;
Iterator iter = coll.iterator();
while(iter.hasNext()){
if(iter.next()==iface) return true;
}
return false;
}
COM: <s> checks if the xarchlib element has this iinterface </s>
|
funcom_train/17008594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String generateIPSecTeardownTunnelCommand(IPSecTunnelInfo tunnelInfo) {
String policyName = tunnelInfo.getPolicy();
String ruleName = tunnelInfo.getRule();
String command = "ipseccmd -w REG -p " + '"' + policyName + '"'
+ " -r " + '"' + ruleName + '"' + " -y";
return command;
}
COM: <s> create the command for tearing down an existing ipsec tunnel </s>
|
funcom_train/31529871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int convertGridLocFromString(String pLocation) {
if(pLocation.equals(TOP_LEFT_STR)) return TOP_LEFT;
else if(pLocation.equals(BOTTOM_LEFT_STR)) return BOTTOM_LEFT;
else if(pLocation.equals(TOP_RIGHT_STR)) return TOP_RIGHT;
else if(pLocation.equals(BOTTOM_RIGHT_STR))return BOTTOM_RIGHT;
return TOP_LEFT;
}
COM: <s> converts the grid location from a string </s>
|
funcom_train/3525695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dispatchToComponent(Component c) throws Exception {
if (map != null) {
if (c instanceof Parameter) {
dispatchToParameter((Parameter)c);
} else if (c instanceof Container) {
c.dispatchEvent(new InputEvent(c, map));
}
} else {
Debug.error(
"InputDispatcher.dispatchToComponent: map is null");
}
}
COM: <s> p dispatches an code input event code to the given component </s>
|
funcom_train/10280798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void onTraverse(TraverseEvent e) {
super.onKeyPressed(e);
// // set selection to the appropriate next element:
// switch (e.keyCode) {
// case SWT.ARROW_UP: // Go to previous item
// case SWT.ARROW_DOWN: // Go to next item
// {
// // Just don't treat the event
// break;
// }
// default: {
// super.onTraverse(e);
// break;
// }
// }
}
COM: <s> overwrite the on traverse method to ignore arrowup and arrowdown events so </s>
|
funcom_train/13345043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void bulkLoad(String gafLocation, boolean force) throws GafDbOperationsException{
//if path is relative the function will convert it to URI
gafLocation = toURI(gafLocation);
GafURLFetch fetch = new GafURLFetch(gafLocation);
Reader reader = new InputStreamReader((InputStream)fetch.next());
bulkload(reader, fetch.getCurrentGafFile(), fetch.getCurrentGafFilePath(), force);
}
COM: <s> load the contents of the gaf file into gold </s>
|
funcom_train/4492709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getAuthCode() {
pd = ProgressDialog.show(Test.this, "title",
"going to the website now...", true);
new Thread() {
public void run() {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri
.parse(Common.TEST_HOST + Common.TEST_PAGE
+ Common.TEST_AUTH_PARAM + Common.APP_KEY));
pd.dismiss();
startActivity(intent);
}
}.start();
}
COM: <s> get auth code from the taobao websites by browser </s>
|
funcom_train/32307835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Temp makeTemp(TEMP t, TempFactory tf) {
Temp treeTemp = t.temp;
assert !frame.getRegFileInfo().isRegister(treeTemp);
Temp instrTemp = (Temp) tempmap.get(treeTemp);
if (instrTemp==null) {
instrTemp = frame.getTempBuilder().makeTemp(t, tf);
tempmap.put(treeTemp, instrTemp);
}
assert instrTemp.tempFactory()==tf;
return instrTemp;
}
COM: <s> tempmap from tree temps to instr temps </s>
|
funcom_train/50538179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Address other) {
UUID val=(UUID)other;
if(this == val)
return 0;
return (this.mostSigBits < val.mostSigBits ? -1 :
(this.mostSigBits > val.mostSigBits ? 1 :
(this.leastSigBits < val.leastSigBits ? -1 :
(this.leastSigBits > val.leastSigBits ? 1 :
0))));
}
COM: <s> compares this uuid with the specified uuid </s>
|
funcom_train/15921918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visitCFGList(List<? extends Term> elements, Term after, int entry) {
Term prev = null;
for (Term c : elements) {
if (prev != null) {
visitCFG(prev, c, Term.ENTRY);
}
prev = c;
}
if (prev != null) {
visitCFG(prev, after, entry);
}
}
COM: <s> utility function to visit all edges in a list </s>
|
funcom_train/2292776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getRelatedActionIds() {
StringBuffer ret = new StringBuffer(32);
Iterator it = m_relatedActionIds.iterator();
while (it.hasNext()) {
ret.append(it.next().toString().trim());
if (it.hasNext()) {
ret.append(',');
}
}
return ret.toString();
}
COM: <s> returns a comma separated list of related list iem selection action ids </s>
|
funcom_train/1060056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addFontFamilyPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DiagramElement_fontFamily_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DiagramElement_fontFamily_feature", "_UI_DiagramElement_type"),
Di2Package.Literals.DIAGRAM_ELEMENT__FONT_FAMILY,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the font family feature </s>
|
funcom_train/17900462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unblock() {
GUIUtils.invokeLater(new Runnable() {
public void run() {
if (!getRootPane().getGlassPane().isVisible()) {
return;
}
getRootPane().getGlassPane().setVisible(false);
}
});
updateCursor(false);
}
COM: <s> indicates that a long running process has ended </s>
|
funcom_train/33294769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getIntValue(Iterator it) throws FormatException {
if (!it.hasNext()) {
throw new FormatException("NOT_ENOUGH_PARAMS");
}
Object obj = it.next();
if (obj instanceof Number) {
return ((Number) obj).intValue();
} else {
throw new FormatException("PARAMETER_WAS_NOT_NUMBER");
}
}
COM: <s> reads a object from iterator and converts it to number </s>
|
funcom_train/8232541 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getStringItem5() {
if (stringItem5 == null) {//GEN-END:|116-getter|0|116-preInit
// write pre-init user code here
stringItem5 = new StringItem("Biblioteca P\u00FAblica Parque El Tunal", "");//GEN-LINE:|116-getter|1|116-postInit
// write post-init user code here
}//GEN-BEGIN:|116-getter|2|
return stringItem5;
}
COM: <s> returns an initiliazed instance of string item5 component </s>
|
funcom_train/19617072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUploadedFile(MultipartFile file) throws IOException {
String fileName = file.getOriginalFilename();
// This happens when the form is submitted, but no file is selected.
if (null == fileName || "".equals(fileName)) {
return;
}
setFileName(fileName);
setBundleContent(file.getBytes());
try {
init();
} catch (IOException e) {
throw new IOException("An error occured while retrieving the "
+ "bytes of the uploaded file.", e);
}
}
COM: <s> set the uploaded file </s>
|
funcom_train/29019338 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point getDPI () {
checkDevice ();
int /*long*/ hDC = internal_new_GC (null);
int dpiX = OS.GetDeviceCaps (hDC, OS.LOGPIXELSX);
int dpiY = OS.GetDeviceCaps (hDC, OS.LOGPIXELSY);
internal_dispose_GC (hDC, null);
return new Point (dpiX, dpiY);
}
COM: <s> returns a point whose x coordinate is the horizontal </s>
|
funcom_train/19575222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean changeJobProperty(String functionName) {
List params = new Vector();
params.add(id_);
Object retVal = caller_.invoke(functionName, params);
if (retVal instanceof Boolean) {
return ((Boolean) retVal).booleanValue();
} else {
return false;
}
}
COM: <s> utility method that is called from the mark done accept jobs etc methods </s>
|
funcom_train/49608764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteUser(String username,EntityManager em,User vo) throws Throwable {
try {
vo.setDeleted(Consts.FLAG_Y);
JPAMethods.merge(em, username, DefaultFieldsCallabacks.getInstance(), vo);
}
catch (Throwable ex) {
Logger.error(null, ex.getMessage(), ex);
throw ex;
}
}
COM: <s> delete logically a user </s>
|
funcom_train/1590414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long set(long instant, int year) {
FieldUtils.verifyValueBounds(this, year, 1, getMaximumValue());
if (iChronology.getYear(instant) <= 0) {
year = 1 - year;
}
return super.set(instant, year);
}
COM: <s> set the year component of the specified time instant </s>
|
funcom_train/9273957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void varchar10() throws SQLException {
PreparedStatement ps = getOrPrepareStatement(
"SELECT VC10 FROM T --DERBY-PROPERTIES index=T_VC10");
ResultSet rs = ps.executeQuery();
while (rs.next()) {
assertNotNull(rs.getString(1));
}
rs.close();
}
COM: <s> test the performance of an index scan on a varchar 10 column </s>
|
funcom_train/26240619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateBuildStepIcons(IToolBarManager manager, BuildStatus buildStatus, boolean yourFault) {
removeAllExistingActions(manager);
BuildStep[] steps = buildStatus.getSteps();
for (int i = 0; i < steps.length; i++) {
manager.add(createAction(steps[i], yourFault));
}
}
COM: <s> update the action buttons in the tool bar specified </s>
|
funcom_train/28661485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void showCustomAlphabetSelection() {
if(mode.isWithCustomComboEntry()) {
comboAlphas.setItem(getComboIndexForUnregisteredAlphabet(), makeAlphaStringForCombo(alphabetInput.getContent(), true));
}
if(mode.isWithCustomButton()) {
btnCustomAlphabet.setText(makeAlphaStringForBtn(alphabetInput.getContent()));
}
}
COM: <s> shows the custom alphabets description in the ui </s>
|
funcom_train/5722676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String selectFileAndConfirmRemove() {
LOGGER.debug("Starting method selectFileAndConfirmRemove");
FolderEntryInfo entry = data.getRowData();
LOGGER.debug("Returning to method selectFileAndConfirmRemove");
LOGGER.debug(entry.getId());
setSessionBean(Constants.COLLABORATION_SELECTED_FOLDERENTRIES, Arrays.asList(new FolderEntryInfo[] { entry }));
return Constants.COLLABORATION_REMOVE_FOLDERENTRY_PAGE;
}
COM: <s> store the selected folder entry into session scope and go to workspace </s>
|
funcom_train/2302320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Rectangle getBounds(Transition transition) {
if (!valid) refreshArrowMap();
CurvedArrow arrow = (CurvedArrow) transitionToArrowMap.get(transition);
Rectangle2D r = arrow.getBounds();
return new Rectangle((int) r.getX(), (int) r.getY(),
(int) r.getWidth(), (int) r.getHeight());
}
COM: <s> returns the bounds for an individual transition </s>
|
funcom_train/4425108 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void migrateNature(IProject project) throws CoreException {
IProjectDescription desc = project.getDescription();
String[] natures = desc.getNatureIds();
for (int i = 0; i < natures.length; i++) {
if ("net.sf.orcc.ui.OrccNature".equals(natures[i])) {
natures[i] = OrccProjectNature.NATURE_ID;
}
}
desc.setNatureIds(natures);
project.setDescription(desc, null);
}
COM: <s> migrates the old orcc nature to the new one </s>
|
funcom_train/118807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setModel(GraphModel model) {
cancelEditing(graph);
if (graphModel != null && graphModelListener != null)
graphModel.removeGraphModelListener(graphModelListener);
graphModel = model;
if (graphModel != null && graphModelListener != null)
graphModel.addGraphModelListener(graphModelListener);
if (graphModel != null) // jmv : to avoid NullPointerException
updateSize();
}
COM: <s> sets the graph model </s>
|
funcom_train/22636569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onDestroy() {
if (currentLevelDialog != null) {
currentLevelDialog.dismiss();
currentLevelDialog = null;
}
if (changeLevelDialog != null) {
changeLevelDialog.dismiss();
changeLevelDialog = null;
}
if (congratulationDialog != null) {
congratulationDialog.dismiss();
congratulationDialog = null;
}
}
COM: <s> should be called before the object is destroyed </s>
|
funcom_train/47184182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int removeAllHospitalAssignmentsFrom(long hcpID) throws DBException {
Connection conn = null;
PreparedStatement ps = null;
try {
conn = factory.getConnection();
ps = conn.prepareStatement("DELETE FROM HCPAssignedHos WHERE HCPID = ?");
ps.setLong(1, hcpID);
return ps.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
throw new DBException(e);
} finally {
DBUtil.closeConnection(conn, ps);
}
}
COM: <s> removes all hospital assignments for a particular hcp </s>
|
funcom_train/28296028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDataNonExistent() throws Exception {
Entry entry =
dvm.new Entry(Package.class, Sphere.class, Package.NAME,
Sphere.NAME);
Entry entry2 =
dvm.new Entry(IsClassOf.class, Sphere.class, IsClassOf.NAME,
Sphere.NAME);
dvm.set(entry);
dvm.set(entry2);
Collection<Class<? extends DataAddon>> dataClasses =
dvm.getData(Cube.class);
assertEquals(dataClasses.size(), 0);
}
COM: <s> test get data non existent </s>
|
funcom_train/8718044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void _index(Object t, Map m) {
if ( t==null ) {
return;
}
int ttype = adaptor.getType(t);
List elements = (List)m.get(new Integer(ttype));
if ( elements==null ) {
elements = new ArrayList();
m.put(new Integer(ttype), elements);
}
elements.add(t);
int n = adaptor.getChildCount(t);
for (int i=0; i<n; i++) {
Object child = adaptor.getChild(t, i);
_index(child, m);
}
}
COM: <s> do the work for index </s>
|
funcom_train/9990159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object apply(Context context, Object arg) {
Object result = null;
if (arg == null) {
throw new NullArgument("Null argument to sinh()");
}
if (arg instanceof Number) {
result = new Double(Math.sinh(((Number) arg).doubleValue()));
} else {
throw new TypeError("Wrong argument type to sinh()");
}
return result;
}
COM: <s> returns the hyperbolic sine of the argument </s>
|
funcom_train/47892129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double getOutgoingWeight(UserType ut) {
Double weight = totalWeights.get(ut);
// if there is no weight available yet, calculate it
if (weight == null) {
weight = new Double(totalOutgoingWeight(ut));
totalWeights.put(ut, weight);
}
//System.out.println(ut.getSimpleName() + " outgoing: " + weight);
return weight;
}
COM: <s> get the weight of the outgoing links from a user type </s>
|
funcom_train/3946098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIsvisiblePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(new ItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ItemType_isvisible_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ItemType_isvisible_feature", "_UI_ItemType_type"),
ImscpRootv1p1p2Package.eINSTANCE.getItemType_Isvisible(),
true,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE));
}
COM: <s> this adds a property descriptor for the isvisible feature </s>
|
funcom_train/37808285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void part(ChatClient client, boolean isSignoff) {
String userId = client.getUserId();
synchronized (_users) {
if (_users.remove(client)) {
// we only send ack if not signing off.
if (_server.getClient(userId) != null) {
client.ackPartRoom(_roomName);
}
notifyPart(userId, isSignoff);
}
}
deop(client);
}
COM: <s> remove a user from this room </s>
|
funcom_train/1481508 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(OpenBitSet other) {
int idx = Math.min(wlen,other.wlen);
long[] thisArr = this.bits;
long[] otherArr = other.bits;
while(--idx>=0) {
thisArr[idx] &= ~otherArr[idx];
}
}
COM: <s> remove all elements set in other </s>
|
funcom_train/36018199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void scanAnnotations(Annotation[] annotations) {
for (Annotation annotation: annotations) {
for (Method method: this.getClass().getDeclaredMethods()) {
if (method.getName().startsWith("addAnnotationAs")) {
method.setAccessible(true);
ReflectionUtils.invokeMethod(method, this, new Object[] { annotation });
method.setAccessible(false);
}
}
}
}
COM: <s> scan the annotations for constraints </s>
|
funcom_train/23777146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent evt) {
Object src = evt.getSource();
if (src instanceof JMenuItem) {
dialog.refresh();
logFrame.showJDialogAsSheet(dialog);
}
if (evt.getActionCommand().equalsIgnoreCase(MessageResourceRegister.getInstance().getValue(MessageKey.BUTTON_CLOSE))) {
logFrame.hideSheet();
}
}
COM: <s> handle action events from dialog </s>
|
funcom_train/41164153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(CoEditorReviewerPairTeacher entity) {
EntityManagerHelper.log("deleting CoEditorReviewerPairTeacher instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(CoEditorReviewerPairTeacher.class, entity.getEditorReviewerPairTeacherId());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent co editor reviewer pair teacher entity </s>
|
funcom_train/39820203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Configuration configure(Document document) throws HibernateException {
log.info( "configuring from XML document" );
org.dom4j.Document doc;
try {
doc = xmlHelper.createDOMReader().read( document );
}
catch ( Exception e ) {
log.error( "problem parsing document", e );
throw new HibernateException( "problem parsing document", e );
}
return doConfigure( doc );
}
COM: <s> use the mappings and properties specified in the given xml document </s>
|
funcom_train/49635976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Sort makeDefaultSorters(boolean reverse) {
normalSort = new Sort(new SortField(field, SortField.Type.STRING, false));
reverseSort = new Sort(new SortField(field, SortField.Type.STRING, true));
return reverse ? reverseSort : normalSort;
}
COM: <s> create default sorter </s>
|
funcom_train/44026038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void AddChild(BasicPageElement element, int row) {
// If adding element is a component
if (element instanceof Component) {
AddComponentChild((Component) element, row);
}
// else if adding element is a slot
else if (element instanceof Slot) {
AddSlotChild((Slot) element, row);
}
// System.out.println(getXMLCode());
parent.updateSlotInfo();
}
COM: <s> adds new child element </s>
|
funcom_train/31102961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Document parseURI(String uri) {
XMLInputSource source = new XMLInputSource(null, uri, null);
// initialize grammar pool
initGrammarPool();
try {
parse(source);
} catch (Exception e){
// do nothing since exceptions are reported via Error handler
if (DEBUG) {
e.printStackTrace();
}
}
return getDocument();
}
COM: <s> parse an xml document from a location identified by an uri reference </s>
|
funcom_train/40760951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateHistory() {
if (currentHistory < (history.size() - 1)) {
next.setEnabled(true);
next.setTitle(history.get(currentHistory + 1).getAbsoluteName());
}
else {
next.setEnabled(false);
next.setTitle("");
}
if (currentHistory > 0) {
prev.setEnabled(true);
prev.setTitle(history.get(currentHistory - 1).getAbsoluteName());
}
else {
prev.setEnabled(false);
prev.setTitle("");
}
}
COM: <s> update navigation buttons state and tips </s>
|
funcom_train/48203498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void adjustSubservicesIds() {
//find the max a the ids
int max = Integer.parseInt(NEWSERVICEID);
for(SmsService service : mSubservices) {
int newId = Integer.parseInt(service.getId());
if (max < newId ) max = newId;
}
//now, rescan the list and set the undefined id
for(SmsService service : mSubservices) {
if (NEWSERVICEID.equals(service.getId())){
max++;
((SmsConfigurableService) service).setId(String.valueOf(max));
}
}
}
COM: <s> finds all the subservices with id equals to sms service </s>
|
funcom_train/5278498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void copyTypes(JavaParameter[] parameters, List<MutableConstructorArgument> arguments) {
for (int i = 0; i < parameters.length; i++) {
arguments.get(i).setType(parameters[i].getType().getValue());
arguments.get(i).setPrimitive(parameters[i].getType().isPrimitive());
}
}
COM: <s> copy type information from an array of </s>
|
funcom_train/8399931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int optInt(String key, int defaultValue) {
Object o = opt(key);
if (o != null) {
if (o instanceof Number) {
return ((Number)o).intValue();
}
try {
return Integer.parseInt((String)o);
} catch (Exception e) {
return defaultValue;
}
}
return defaultValue;
}
COM: <s> get an optional int value associated with a key </s>
|
funcom_train/48527619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writePrimitive(int i, String field) throws IOException {
writer.start("primitive");
if (field != null)
writer.attribute("field", field);
writer.attribute("type", "int");
writer.attribute("value", i);
writer.end("primitive");
}
COM: <s> method which writes a int to the stream as the given field name </s>
|
funcom_train/49928222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public void indexAll() {
Connection jdbcConnection = null;
try {
jdbcConnection = IndexerHelper.getJdbcConnection(dataSource);
logger.info("db connection initialized");
deleteAllFromIndex(jdbcConnection);
addAllToIndex(jdbcConnection);
optimizeIndex();
} catch (SQLException sex) {
logger.error(
"Couldn't initialize database connection for indexing.",
sex);
} finally {
IndexerHelper.closeConnection(jdbcConnection);
logger.info("db connection closed");
}
}
COM: <s> create a jdbc connection calls index batch until it returns false using the </s>
|
funcom_train/3006090 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NodeLocal addChild(String category, String name, Serializable datas) {
NodeLocal result = null;
try {
result = nodeLocalHome().create(
category, name, datas, null);
addChild(result);
} catch (Exception e) {
handleExceptionAsSystemException(e);
}
return result;
}
COM: <s> adds a child to the current node the child category can be different </s>
|
funcom_train/19421749 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void executeSearch() {
String queryStatement = "select userId, useName from userdata, person where person.PersonId=userdata.personId order by userId";
DynaSqlAccessBean dynaBean = new DynaSqlAccessBean(dataSource, queryStatement);
dynaBean.setParameters(new HashMap());
dynaBean.setCommand(DataConnector.READ_COMMAND);
dynaBean.execute();
executionResults = dynaBean.getExecutionResults();
responseCode = dynaBean.getResponseCode();
responseString = dynaBean.getResponseString();
}
COM: <s> p used to execute the filter based read command after all command </s>
|
funcom_train/25779012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addConditionBlockNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Condition_conditionBlockName_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Condition_conditionBlockName_feature", "_UI_Condition_type"),
CoveragepackagePackage.Literals.CONDITION__CONDITION_BLOCK_NAME,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the condition block name feature </s>
|
funcom_train/8306011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void appendIdentityHashCode(StringBuffer buffer, Object object) {
if (this.isUseIdentityHashCode() && object!=null) {
register(object);
buffer.append('@');
buffer.append(Integer.toHexString(System.identityHashCode(object)));
}
}
COM: <s> p append the </s>
|
funcom_train/14274755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVFSFileAttributes(FileReference file, int attributes) throws ConduitHandlerException, NotConnectedException {
try {
jHotSync.setVFSFileAttributes(file, attributes);
} catch (DLPFunctionCallException e) {
throw new ConduitHandlerException(e.toString(), e);
}
} // end-method
COM: <s> sets the atttributes for the specified file </s>
|
funcom_train/32969930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton44() {
if (jButton44 == null) {
jButton44 = new JButton();
jButton44.setRolloverIcon(new ImageIcon(getClass().getResource("/orders/sel/shields2.gif")));
jButton44.setToolTipText("Shields");
jButton44.setPressedIcon(new ImageIcon(getClass().getResource("/orders/push/shields3.gif")));
jButton44.setIcon(new ImageIcon(getClass().getResource("/orders/norm/shields1.gif")));
jButton44.setDoubleBuffered(true);
jButton44.setBounds(new java.awt.Rectangle(536,70,34,34));
jButton44.setBorderPainted(false);
}
return jButton44;
}
COM: <s> this method initializes j button44 </s>
|
funcom_train/26483956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void suppressionProc(Attributes attributes) {
String state = attributes.getValue("hide");
if (state != null && state.length() > 0) {
SuppressionProc sp = section.getSuppressionProc();
state = state.trim().toLowerCase();
if ("true".equals(state)) sp.setHidden(true);
}
}
COM: <s> reads suppression proc </s>
|
funcom_train/20269447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Node eliminateFunctionParamAt(Node function, int argIndex) {
Preconditions.checkArgument(NodeUtil.isFunction(function),
"Node must be a function.");
Node formalArgPtr = NodeUtil.getArgumentForFunction(
function, argIndex);
if (formalArgPtr != null) {
function.getFirstChild().getNext().removeChild(formalArgPtr);
}
return formalArgPtr;
}
COM: <s> eliminates the parameter from a function definition </s>
|
funcom_train/8742002 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createComponents(Event event) {
Popup popup = (Popup) Executions.createComponents("/WEB-INF/zul/LegendPopup.zul", event.getTarget().getRoot(), null);
LegendComposer window = (LegendComposer) popup.getFirstChild();
window.setMapLayer(mapLayer);
window.extractFromPopup();
}
COM: <s> show legend as an overlay window </s>
|
funcom_train/3370058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isExpanded(int row) {
TreeUI tree = getUI();
if(tree != null) {
TreePath path = tree.getPathForRow(this, row);
if(path != null) {
Boolean value = (Boolean)expandedState.get(path);
return (value != null && value.booleanValue());
}
}
return false;
}
COM: <s> returns true if the node at the specified display row is currently </s>
|
funcom_train/46994972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getFilePreferencesMenuItem() {
if (filePreferencesMenuItem == null) {
filePreferencesMenuItem = new JMenuItem();
filePreferencesMenuItem.setText("Preferences...");
filePreferencesMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
SetupDialog dlg = new SetupDialog(ConsoleFrame.this);
dlg.setVisible(true);
}
});
}
return filePreferencesMenuItem;
}
COM: <s> this method initializes file preferences menu item </s>
|
funcom_train/3786840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(int maxRspots)
{ /* init */
clear();
this.maxRspots= maxRspots;
if(maxRspots==0)
{
rspotsList= null;
rspotsNbrs= null;
}
else
{
rspotsList= new CSDRspot[maxRspots];
rspotsNbrs= new int[maxRspots];
}
} /* init */
COM: <s> init initialize rspot list list to specified size if 0 </s>
|
funcom_train/48593666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Set readDirs(File parentFileDir, Dir parentDir) {
File[] dirs = parentFileDir.listFiles(new FileFilter(true));
Set results = new HashSet();
if (dirs != null) {
List fileList = Arrays.asList(dirs);
for (Iterator i = fileList.iterator(); i.hasNext();) {
File fDir = (File) i.next();
Dir dir = read(fDir, parentDir);
results.add(dir);
}
}
return results;
}
COM: <s> reads and saves the dirs that are in parent file dir </s>
|
funcom_train/44594163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setCompilationUnit(ICompilationUnit newData) {
if (newData == null && data != null) {
data = null;
viewer.setInput(null);
}
if (newData != null && !newData.equals(data)) {
data = newData;
refreshView();
}
}
COM: <s> sets the contents to the specified complilation unit </s>
|
funcom_train/23949375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JPanel buildSwitchTab(){
JPanel panel = new JPanel();
JPanel padding = new JPanel();
BoxLayout layout = new BoxLayout( padding, BoxLayout.Y_AXIS );
padding.setLayout( layout );
padding.add( getSwitchListPanel() );
padding.add( getSwitchInfoPanel() );
panel.add( padding );
return panel;
}
COM: <s> builds the tab that desplays switch information </s>
|
funcom_train/46519586 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /* public int getConfForNames(String confNames, boolean needsSort){
String sortedConfNames = null;
if (needsSort){
sortedConfNames = getConfMembers(confNames, null).toString();
}else{
sortedConfNames = confNames;
}
for (int i = 0; i < alIMConfNames.size(); i++){
if (alIMConfNames.get(i).toString().equals(sortedConfNames)){
return i;
}
}
return -1;
}
COM: <s> gets a the conference number for given members of a conference </s>
|
funcom_train/33545277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public User show(String id) throws TwitterException {
String json = makeRegularRequest("http://twitter.com/users/show/" + id
+ ".json");
// FIXME If you are trying to fetch data for a user who is only giving
// updates to
// * friends, the returned text will be "You are not authorized to see
// this
// * user."
User user;
try {
user = new User(new JSONObject(json), null);
} catch (JSONException e) {
throw new TwitterException(e);
}
return user;
}
COM: <s> returns information of a given user specified by id or screen name </s>
|
funcom_train/1741556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNumVisibleButtons() {
checkWidget();
int num = 0;
for (int i = 0; i < mButtons.size(); i++) {
CustomButton b = (CustomButton) mButtons.get(i);
if (b.isVisible())
num++;
}
return num;
}
COM: <s> returns the number of currently visible buttons </s>
|
funcom_train/18807570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setObject(final Comparable key, final Object object) {
final int keyIndex = getIndex(key);
if (keyIndex >= 0) {
final KeyedObject ko = (KeyedObject) this.data.get(keyIndex);
ko.setObject(object);
}
else {
final KeyedObject ko = new KeyedObject(key, object);
this.data.add(ko);
}
}
COM: <s> replaces an existing object or adds a new object to the collection </s>
|
funcom_train/49753385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getStringItem5() {
if (stringItem5 == null) {//GEN-END:|90-getter|0|90-preInit
// write pre-init user code here
stringItem5 = new StringItem("Tiempo de descarga", null);//GEN-LINE:|90-getter|1|90-postInit
// write post-init user code here
}//GEN-BEGIN:|90-getter|2|
return stringItem5;
}
COM: <s> returns an initiliazed instance of string item5 component </s>
|
funcom_train/7687605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void deleteSelected() {
// delete ONLY if this is NOT a new contact.
if (!mAddContact) {
Intent intent = new Intent();
intent.setClass(this, DeleteFdnContactScreen.class);
intent.putExtra(INTENT_EXTRA_NAME, mName);
intent.putExtra(INTENT_EXTRA_NUMBER, mNumber);
startActivity(intent);
}
finish();
}
COM: <s> handle the delete command based upon the state of the activity </s>
|
funcom_train/21022779 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeKey(String keyword) {
if (selectedKeyMap.containsKey(keyword)) {
selectedKeyPanel.remove((Widget) selectedKeyMap.get(keyword));
selectedKeyMap.remove(keyword);
}
// Selects keyword on all keyword panels
keyAllTable.unselectRow(keyword);
keyTopTable.unselectRow(keyword);
keyRelatedTable.unselectRow(keyword);
controlSearchIn.executeSearch(limit);
getKeywordMap(getFiltering()); // Gets related keyMap
refreshClean();
}
COM: <s> remove a key </s>
|
funcom_train/24379235 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node getTypeAsNode(Node node, PromptType type){
if (type != null) {
QName qname = new QName("http://www.imsglobal.org/xsd/imsqti_v2p1", "prompt");
JAXBElement<PromptType> jaxbe =
new JAXBElement<PromptType>(qname, PromptType.class, type);
node = getNode(node, jaxbe);
}
return node;
}
COM: <s> gets the prompt type as a dom node </s>
|
funcom_train/41163056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(MaSingleTextForm entity) {
EntityManagerHelper.log("saving MaSingleTextForm instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved ma single text form entity </s>
|
funcom_train/36401306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFirstLast(boolean abbr) {
String res = getLastOnly();
if (abbr) {
res = (first_abbr == null ? "" : first_abbr + " ") + res;
} else {
res = (first_part == null ? "" : first_part + " ") + res;
}
if (jr_part != null)
res += ", " + jr_part;
return res;
}
COM: <s> returns the authors name in form first von last jr </s>
|
funcom_train/8076115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeResult(String name) {
StringBuffer buff = (StringBuffer) m_Results.get(name);
JTextComponent currentText = (JTextComponent) m_FramedOutput.get(name);
if (buff != null) {
m_Results.remove(name);
m_Model.removeElement(name);
}
}
COM: <s> removes one of the result buffers from the history </s>
|
funcom_train/4744557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UserGroup getSelectedUserGroup() {
UserGroup result = null;
if (this.managedUserGroupsManager.isEditState()) {
result = this.managedUserGroupsManager.getSelectedObject();
} else if (this.ownedUserGroupsManager.isEditState()) {
result = this.ownedUserGroupsManager.getSelectedObject();
}
return result;
}
COM: <s> returns the selected user group </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.