__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/11650814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void listParameters(JavaSamplerContext context) {
if (getLogger().isDebugEnabled()) {
Iterator<String> argsIt = context.getParameterNamesIterator();
while (argsIt.hasNext()) {
String name = argsIt.next();
getLogger().debug(name + "=" + context.getParameter(name));
}
}
}
COM: <s> dump a list of the parameters in this context to the debug log </s>
|
funcom_train/43932270 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void update() {
RPCGenerator.getBillAsync().getBillsByUser(
new AsyncCallback<List<BillVo>>() {
public void onFailure(Throwable arg0) {
Window.alert("Exception:" + arg0);
}
public void onSuccess(List<BillVo> bills) {
for (int i = 0; i < bills.size(); i++) {
set(i, bills.get(i));
}
}
});
}
COM: <s> update function it will invoke different update function base on the </s>
|
funcom_train/17007198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasPendingNaksToIssue() {
if (pendingSequences.size() == 0) {
return false;
}
Enumeration e = pendingSequences.elements();
while (e.hasMoreElements()) {
TreeSet _pendingTemplateSet = (TreeSet) e.nextElement();
if (_pendingTemplateSet.size() > 0) {
return true;
}
}/* end while */
return false;
}
COM: <s> indicates if there are pending naks to issue </s>
|
funcom_train/6436198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isNilReading(AnalyzedGermanTokenReadings analyzedToken) {
final List<AnalyzedGermanToken> germanReadings = analyzedToken.getGermanReadings();
if (germanReadings.size() > 0) {
if ("NIL:SUB".equals(germanReadings.get(0).getPOSTag())) {
return true;
}
}
return false;
}
COM: <s> morphy has about 750 words tagged wkl nil tip sub ignore these </s>
|
funcom_train/12128027 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Attribute getDefaultAttribute(int type, String key) {
Attribute value = null;
Subgraph sg = null;
if(isSubgraph()) sg = (Subgraph)this;
else sg = getSubgraph();
if(sg == null) {
// unattached, so try global attributes
return(Graph.getGlobalAttribute(type,key));
}
switch(type) {
case Grappa.NODE:
value = sg.getNodeAttribute(key);
break;
case Grappa.EDGE:
value = sg.getEdgeAttribute(key);
break;
case Grappa.SUBGRAPH:
value = sg.getLocalAttribute(key);
break;
}
return(value);
}
COM: <s> get the corresponding default attribute for the specified type and key </s>
|
funcom_train/34583624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void play(String filename) {
InputStream fis = null;
try {
fis = ResourceService.getInputStream(filename);
} catch (IllegalArgumentException e) {
logger.info("mp3 not found: " + filename);
return;
}
BufferedInputStream bis = null;
try {
bis = new BufferedInputStream(fis);
player = new Player(bis);
player.play();
} catch (JavaLayerException e) {
e.printStackTrace();
}
}
COM: <s> plays a mp3 file </s>
|
funcom_train/9892164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(Object obj1, Object obj2) {
String[] row1 = (String[]) obj1;
String[] row2 = (String[]) obj2;
boolean isNumber = true;
try{
Integer.parseInt(row1[column]);
}catch(Exception e)
{
e.printStackTrace();
isNumber = false;
}
if(isNumber)
{
return Integer.valueOf(row1[column]).compareTo(Integer.valueOf(row2[column]));
}
else
{
return row1[column].compareTo(row2[column]);
}
}
COM: <s> compares two rows type string using the specified column entry </s>
|
funcom_train/37087054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Point3i getMidMultiEdgePointScreen(Edge e) {
if (e.hasValidMidEdgePoint()) return e.getMidEdgePoint();
// edge.getMidEdgePoint?? should edge know how to gets its midpoint?
Point3i mp = jmolToScreen(getMidMultiEdgePoint(e));
e.setMidEdgePoint(mp);
return mp;
}
COM: <s> edge actually caches midpt from last calc so uses that if still valid </s>
|
funcom_train/17882125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStateHaveChanged() throws HeapRecordableException {
if (!stateChanged) {
if (!loaded && existInFile) {
throw new HeapRecordableException(
"can not change state if not loaded and exist in file");
}
stateChanged = true;
if (dataRecordIdentifier != null) {
/* record this to save at first state change */
heapRecordableManager.stateHaveChanged(this);
}
}
}
COM: <s> set state changed </s>
|
funcom_train/5729161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object object) {
if (this == object) {
return true;
}
if (!(object instanceof BrainContest)) {
return false;
}
final BrainContest that = (BrainContest) object;
if (this.id == null || that.getId() == null || !this.id.equals(that.getId())) {
return false;
}
return true;
}
COM: <s> returns code true code if the argument is an brain contest instance and </s>
|
funcom_train/43400156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Complex asin() {
Complex a = this.product(this);
a.negate();
a.add(1);
a = a.sqrt();
a.add(this.product(new Complex(0, 1)));
a = a.log();
a.multiply(new Complex(0,1));
a.negate();
return a;
}
COM: <s> returns the arcsine of this number </s>
|
funcom_train/29617869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MgisRadioButton getJRadioNo() {
if (jRadioNo == null) {
jRadioNo = new MgisRadioButton();
jRadioNo.setText(AppTextsDAO.get("LABEL_NO"));
jRadioNo.setValue(new Boolean(false));
jRadioNo.setBounds(100,30,60,19);
jRadioNo.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
updateResultBoxAccordingToSelection();
}
});
}
return jRadioNo;
}
COM: <s> this method initializes j radio no </s>
|
funcom_train/20352496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPasswordField getPf_password() {
pf_password = new JPasswordField();
pf_password.setBounds(new Rectangle(26, 235, 179, 20));
tf_username.setFont(new java.awt.Font("Tahoma",0,11));
pf_password.addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent e) {
if (e.getKeyCode() == KeyEvent.VK_ENTER && checkemptEntry()) {
Connect_To_Server();
}
}
});
return pf_password;
}
COM: <s> create a jpassword field and catch inputed data on that jpassword field </s>
|
funcom_train/7980875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processScriptCode(CrawlURI curi, CharSequence cs) {
if((Boolean)getUncheckedAttribute(curi, ATTR_EXTRACT_JAVASCRIPT)) {
this.numberOfLinksExtracted +=
ExtractorJS.considerStrings(curi, cs, getController(), false);
} // else do nothing
}
COM: <s> extract the java script source in the given char sequence </s>
|
funcom_train/29756355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String searchContacts() {
// Remove ourself from session to avoid Hibernate errors
FacesUtils.removeFromSession("organizationBean");
// Set an active search in contactBean to show only contacts related to
// this organization
UIData list = (UIData) FacesUtils.getComponent("organizations:list");
Organization org = (Organization) list.getRowData();
ContactBean contactBean = (ContactBean) FacesUtils
.getBean("contactBean");
// TODO
contactBean.getSearch().setOrganization(org);
return OUTCOME_SEARCH_CONTACTS;
}
COM: <s> method to navigate to organizations contacts </s>
|
funcom_train/48261152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInsert() throws Exception {
System.out.println("insert");
BranchDTO branchDTO = null;
BranchDAO instance = new BranchDAO();
instance.insert(branchDTO);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of insert method of class branch dao </s>
|
funcom_train/36667657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void sendData(Object data, String portName) {
ConnectionAnchor in = oppossitePort.get(portName);
ConnectionAnchor out = new ConnectionAnchor(this, portName);
try{
eventQueue.put(new DataEvent(out, data, in));
} catch(InterruptedException ie){
log.error(msg("Trying to send data event when event queue is already dead."), ie);
}
}
COM: <s> create data event to send data from a port to an opposite port </s>
|
funcom_train/35450747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static private double normalizeProb(double[] prob) {
double maxp = 0, sump = 0;
for(int i=0;i<prob.length;++i) sump += prob[i];
for(int i=0;i<prob.length;++i) {
double p = prob[i] / sump;
if (maxp < p) maxp = p;
prob[i] = p;
}
return maxp;
}
COM: <s> normalize probabilities and check convergence by the maximun probability </s>
|
funcom_train/31089829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testParseDependencyName() throws Exception {
verifyName( "httpunit-1.5.4.jar", "httpunit", "1.5.4", "jar" );
verifyName( "rhino-1.5R4-RC3.jar", "rhino", "1.5R4-RC3", "jar" );
}
COM: <s> verifies that we can parse dependency names with dashes in their versions </s>
|
funcom_train/11687785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getTimeoutsSending() {
if (endpoint.getChildren() != null) {
long timeoutsSending = 0;
for (Endpoint e : endpoint.getChildren()) {
if (e.getMetricsMBean() != null) {
timeoutsSending += e.getMetricsMBean().getTimeoutsSending();
}
}
return timeoutsSending;
} else {
return timeoutsSending;
}
}
COM: <s> number of timeouts sending </s>
|
funcom_train/38436048 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void readConfig(){
/** read properties */
try{
config = new Properties();
config.load(new FileInputStream(CONFIG));
}
catch(FileNotFoundException fnfe){
fail("Can't find configuration file " + CONFIG);
}
catch(IOException ioe){
fail("Error while reading configuration file: "
+ ioe.getMessage());
}
}
COM: <s> read in the configuration file </s>
|
funcom_train/25419485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String makeLabel(String resourceKey) {
String label = this.labels.get(resourceKey);
if (label == null) {
label = this.getMessageBroker().retrieveMessage(resourceKey);
this.labels.put(resourceKey, label);
}
label = Val.chkStr(label);
if (label.length() > 0) {
return label;
} else {
return resourceKey;
}
}
COM: <s> makes the label associated with a resource bundle key </s>
|
funcom_train/10842139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EntityResourceList getEntityResourceList(final String entityId) {
EntityResourceList erl = this.data.get(entityId);
if ( erl == null ) {
for(final EntityResourceList group : this.data.values()) {
if ( entityId.equals(group.getFullAlias()) ) {
erl = group;
break;
}
}
}
return erl;
}
COM: <s> get the resource group for an entity id </s>
|
funcom_train/16818356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Stream dispatch(RemoteCall c) {
if(c instanceof RmeRemoteCall) {
RmeRemoteCall r = (RmeRemoteCall)c;
System.out.println("-----------------------------------------------------------");
System.out.println("Call = " + r.getCallIdentifier());
System.out.println("Origin = " + r.getReturnAddress());
System.out.println("Destiny = " + r.getTargetObjectIdentifier());
}
return super.dispatcher.dispatch(c);
}
COM: <s> the method verifies if this is a remote call of the </s>
|
funcom_train/34974288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkSectionSecurity(String section, String module, HttpServletRequest request) {
Debug.logInfo("### calling PurchasingSecurity.checkSectionSecurity()", module);
HttpSession session = request.getSession();
String organizationPartyId = (String) session.getAttribute("organizationPartyId");
return hasPartyRelationSecurity(module, "_VIEW", organizationPartyId);
}
COM: <s> checks section security </s>
|
funcom_train/39478952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String saveFile(String outputDir, String newFilename) throws IOException {
if (newFilename == null) {
newFilename = filename;
}
File file = new File(outputDir + File.separator + newFilename);
BufferedOutputStream output = new BufferedOutputStream(new FileOutputStream(file.getAbsolutePath()));
output.write(fileAsBytes, 0, fileAsBytes.length);
output.flush();
output.close();
return file.getAbsolutePath();
}
COM: <s> saves the file to output dir renaming it to new filename </s>
|
funcom_train/29783935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void merge(DependentModelTree depTree) {
for(ModuleNode mn : depTree.getModules()) {
for(PackageNode pn : mn.getPackages()) {
for(ClassNode cn : pn.getClasses()) {
addClassNodeToDependentModelTree((DependentModelTree) getRoot(), new ClassDependency(cn.getName()), cn);
}
}
}
((DependentModelTree) getRoot()).sortNodes();
}
COM: <s> merges the other tree into this tree </s>
|
funcom_train/31872982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
if (this.size == 0) return "[IntStack: empty]";
final StringBuffer b = new StringBuffer();
b.append("[IntStack: ");
for (int i = 0; i < this.size-1; i++) {
b.append(this.data[i]).append(", ");
}
b.append(this.data[this.size-1]).append("]");
return b.toString();
}
COM: <s> retuns string representation of this stack </s>
|
funcom_train/6270127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleNewKnowledgeElement(String id, String description) {
if (!description.equals(""))
adaptor.newTopicWithOccurrence(id,"","",null,id+" Description",description);
else
adaptor.newTopic(id, "","",null);
}
COM: <s> callback from knowledge element editor </s>
|
funcom_train/50257170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void update(){
updateFolding();
updateAssist();
try {
outlinePage.update();
} catch (Exception ex) {
// SWT error goes here sometimes ...
}
if(hyperlink!=null && isFileEditorInput()){
hyperlink.setProject(((IFileEditorInput)getEditorInput()).getFile().getProject());
}
if(validation && isFileEditorInput()){
doValidate();
}
}
COM: <s> this method is called in the following timing </s>
|
funcom_train/33601531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void decide(Round round, byte[] value) {
round.getExecution().getLearner().firstMessageProposed.decisionTime = System.nanoTime();
leaderModule.decided(round.getExecution().getId(),
leaderModule.getLeader(round.getExecution().getId(),
round.getNumber()));
round.getExecution().decided(round, value);
}
COM: <s> this is the method invoked when a value is decided by this process </s>
|
funcom_train/40358544 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load() {
for (String dir : dirs) {
loadProps(dir + "/" + name + ".properties");
}
if (!optional && props.size() == 0) {
throw new ConfigException("Property set is empty for path=" + dirs + ", name=" + name);
}
}
COM: <s> load property set from given path for specific diagram name </s>
|
funcom_train/33324536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected IQuery createCountQuery(final String whereClause) {
String query;
if (whereClause == null) {
query = "select count(*) from "+type.get_FullName()+" as o";
} else {
query = "select count(*) from "+type.get_FullName()+" as o where "+whereClause;
}
return createQuery(query);
}
COM: <s> a shortcut for creating a count iquery on the class for this </s>
|
funcom_train/36429563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean get(long lid, long sid, long pid) {
if (ArkDirConstants.isIdUniqueKO(lid) ||
ArkDirConstants.isIdUniqueKO(sid) ||
ArkDirConstants.isIdUniqueKO(pid)) {
return false;
}
this.lid = lid;
this.sid = sid;
this.pid = pid;
try {
select();
} catch (GoldenGateDatabaseException e) {
return false;
}
return true;
}
COM: <s> get the partnership object from db </s>
|
funcom_train/37608711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fragCheck() {
OCity ccc = CMapDriver.getCity();
if (!ccc.isNewBe() && frgno >= 0 && strno >= 0 &&
(ccc.useSt(strno).useFrag(frgno).isSIntr() ||
ccc.useSt(strno).useFrag(frgno).isEIntr())) {
upt = new UPrint(new Frame(),
OMsg.HNO373,
OMsg.EXY617,
OMsg.CEM253);
}
} // end fragCheck()
COM: <s> prints a message if the fragment touches an intersection </s>
|
funcom_train/18149929 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStandardIndustryClassCode(CE standardIndustryClassCode) {
if(standardIndustryClassCode instanceof org.hl7.hibernate.ClonableCollection)
standardIndustryClassCode = ((org.hl7.hibernate.ClonableCollection<CE>) standardIndustryClassCode).cloneHibernateCollectionIfNecessary();
_standardIndustryClassCode = standardIndustryClassCode;
}
COM: <s> sets the property standard industry class code </s>
|
funcom_train/32914843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UpdateResult UpdateApplicationView(ApplicationViewList list, ServiceCall call, DbConnection conn) throws java.rmi.RemoteException, DataAccessException, Exception {
Enumeration e1 = list.elements();
int rowsUpdated = 0;
while (e1.hasMoreElements()) {
ApplicationViewModel acm = (ApplicationViewModel) e1.nextElement();
acm.setRecordTypeRefId(RecordTypeFramework.USERREFERENCE);
rowsUpdated += avda.UpdateApplicationView(acm, call, conn).getRowsUpdated();
}
return new UpdateResult(rowsUpdated,0);
}
COM: <s> update the application view </s>
|
funcom_train/18348063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getResultOutput() throws ExeException {
if (resultEvent == null) {
return null;
}
if (resultEvent.hasOutput()) {
return resultEvent.getOutput();
}
if (resultEvent.hasExeException()) {
logger.config("ER: getResultOutput - throwing ExeException " +
resultEvent.getExeException());
throw resultEvent.getExeException();
}
return null;
}
COM: <s> this method returns the output of the result event or </s>
|
funcom_train/37611679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void recordTest(StatisticsSet statistics, long elapsedTime) {
statistics.reset(m_timedTestsIndex);
statistics.addSample(m_timedTestsIndex, elapsedTime);
setSuccess(statistics, getSuccess(statistics));
// Should only be set for statistics sent to the console.
statistics.setValue(m_untimedTestsIndex, 0);
}
COM: <s> set the elapsed time for the test and normalise statistics </s>
|
funcom_train/1379772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getTxtFiltro() {
if (txtFiltro == null) {
txtFiltro = new JTextField();
txtFiltro.setPreferredSize(new Dimension(200, 20));
txtFiltro.setDocument(new UpperTextDocument());
txtFiltro.getDocument().addDocumentListener(new DocumentListener() {
public void changedUpdate(DocumentEvent e) {
newFilter();
}
public void insertUpdate(DocumentEvent e) {
newFilter();
}
public void removeUpdate(DocumentEvent e) {
newFilter();
}
});
}
return txtFiltro;
}
COM: <s> this method initializes txt filtro </s>
|
funcom_train/34587453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void itemAddedByServer(SyncItemEvent event) {
if (Logger.isLoggable(Logger.DEBUG)) {
Logger.debug
("SyncItemEvent - Item added by server - sourceUri: " +
event.getSourceUri() +
" - key: " +
event.getItemKey().getKeyAsString() );
}
}
COM: <s> notify an item added by the server </s>
|
funcom_train/28224900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createShell() {
shell = new Shell();
shell.setMinimumSize(SHELL_WIDTH, SHELL_HEIGHT);
siafuIcon = new Image(display, getClass().getResourceAsStream(
"/res/misc/icon.png"));
shell.setImage(siafuIcon);
GridLayout glShell = new GridLayout(2, false);
glShell.marginHeight = SHELL_MARGIN_HEIGHT;
shell.setLayout(glShell);
mainMenu = new MainMenu(shell, this, control.getSiafuConfig());
}
COM: <s> create the main shell where the gui runs </s>
|
funcom_train/3888402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addEmailPropertyRefPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_EmailDataType_emailPropertyRef_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_EmailDataType_emailPropertyRef_feature", "_UI_EmailDataType_type"),
ImsldV1p0Package.Literals.EMAIL_DATA_TYPE__EMAIL_PROPERTY_REF,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the email property ref feature </s>
|
funcom_train/17271468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void prepare() {
if (getRequest().getMethod().equalsIgnoreCase("post")) {
// prevent failures on new
String kategorijaId = getRequest().getParameter("kategorija.idk");
if (kategorijaId != null && !kategorijaId.equals("")) {
kategorija = kategorijaManager.get(new Long(kategorijaId));
}
}
}
COM: <s> grab the entity from the database before populating with request parameters </s>
|
funcom_train/11723089 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean matches(String resource, String token, String etag) {
log.debug("matches: Trying to match resource="+resource+", token="+token+","+etag);
IfHeaderList list = get(resource);
if (list == null) {
log.debug("matches: No entry for tag "+resource+", assuming match");
return true;
} else {
return list.matches(resource, token, etag);
}
}
COM: <s> matches the token and etag for the given resource </s>
|
funcom_train/45623737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addUpdateIntervalPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_GenerateDeploymentManifestType_updateInterval_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_GenerateDeploymentManifestType_updateInterval_feature", "_UI_GenerateDeploymentManifestType_type"),
MSBPackage.eINSTANCE.getGenerateDeploymentManifestType_UpdateInterval(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the update interval feature </s>
|
funcom_train/9818447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void printErrorCount() {
if (getErrorCount() == 0)
return;
String error_str;
if (getErrorCount() > 1)
error_str = "There were " + getErrorCount() + " errors on the last simulation run.";
else
error_str = "There was " + getErrorCount() + " error on the last simulation run.";
jout.error.println(error_str);
}
COM: <s> just prints out the number of simulation errors </s>
|
funcom_train/7633812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void enableLongPress() {
mListView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
public boolean onItemLongClick(AdapterView parent, View v, int position, long id) {
positionLongClicked(position);
return true;
}
});
}
COM: <s> attaches a long press listener </s>
|
funcom_train/18782198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sort() {
System.out.println("TrackTable: Sorting"); //$NON-NLS-1$
long t = System.currentTimeMillis();
Collections.sort(listOfTracks, comparator);
System.out.println("TrackTable: Sorted in "+(System.currentTimeMillis()-t)+"ms"); //$NON-NLS-1$
load();
}
COM: <s> sorts the table and loads it into the table displays it </s>
|
funcom_train/31300403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void load() {
Map map = new HashMap();
Cloud cloud = cloudProvider.getCloud();
NodeIterator iter = cloud.getNode(nodeNumber).getRelatedNodes(Constants.BUNDLE_BASE_NODEMANAGER_NAME).nodeIterator();
while (iter.hasNext()) {
BundleBaseName base = new BundleBaseName(iter.nextNode());
map.put(base.getName(), base);
}
synchronized (bundleBaseNames) {
bundleBaseNames.clear();
bundleBaseNames.putAll(map);
}
}
COM: <s> load the child bundle groups and store then in the bundlegroups map </s>
|
funcom_train/29560056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSomeBadlyWrittenObject() {
boolean didThrow = false;
int i = 0;
try {
for (; i < 101; i++) {
s.add(new Crap());
}
} catch (IllegalArgumentException e) {
didThrow = true;
}
assertTrue("expected THashSet to throw an IllegalArgumentException", didThrow);
}
COM: <s> this tests that we throw when people violate the </s>
|
funcom_train/34849356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createParentStatements(String objName, PrintStream out) {
String[] defaults = getDefaults();
if (defaults != null) {
for (int i = 0; i < defaults.length; ++i) {
out.println(
" "
+ objName
+ ".addDefault(\""
+ defaults[i]
+ "\");");
}
}
}
COM: <s> creates java source code statements to configure an parameter as </s>
|
funcom_train/28756243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setKeyid(Long newVal) {
if ((newVal != null && this.keyid != null && (newVal.compareTo(this.keyid) == 0)) ||
(newVal == null && this.keyid == null && keyid_is_initialized)) {
return;
}
this.keyid = newVal;
keyid_is_modified = true;
keyid_is_initialized = true;
}
COM: <s> setter method for keyid </s>
|
funcom_train/5598821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void synchronize() {
if (lastAdjustFromModel) {
setSliderPosition();
} else {
final int value = getSliderValue();
final int extent = getSliderExtent();
if (value!=super.getValue() || extent!=super.getExtent()) {
super.setRangeProperties(value, extent, super.getMinimum(), super.getMaximum(), false);
}
}
}
COM: <s> synchronize the slider position with this model </s>
|
funcom_train/33280214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireHtmlAttributeReplaced(final HtmlAttributeChangeEvent event) {
synchronized (attributeListeners_) {
for (final HtmlAttributeChangeListener listener : attributeListeners_) {
listener.attributeReplaced(event);
}
}
final DomNode parentNode = getParentNode();
if (parentNode instanceof HtmlElement) {
((HtmlElement) parentNode).fireHtmlAttributeReplaced(event);
}
}
COM: <s> support for reporting html attribute changes </s>
|
funcom_train/48792704 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Context getInitialContext() throws Exception {
String url = "http://localhost:1050";
Properties p = new Properties();
p.put(Context.PROVIDER_URL, url);
p.put(Context.SECURITY_PRINCIPAL, "guest");
p.put(Context.SECURITY_CREDENTIALS, "guest123");
return (new InitialContext(p));
}
COM: <s> method get initial context </s>
|
funcom_train/27811222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private InputStream createDownsampledInputStream(Parameters parameters) throws IOException {
String command = settingsService.getDownsamplingCommand();
return createTranscodeInputStream(command, parameters.getMaxBitRate(), parameters.getVideoTranscodingSettings(),
parameters.getMediaFile(), null);
}
COM: <s> returns a downsampled input stream to the music file </s>
|
funcom_train/22019730 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNewConstructors() {
WCSTestCase test1 = new WCSTestCase(logon, requestProperties);
WCSTestCase test2 = new WCSTestCase("testNewConstructors", logon, requestProperties);
assertEquals(logon, test1.getLogon());
assertEquals(requestProperties, test1.getRequestProperties());
assertEquals(logon, test2.getLogon());
assertEquals(requestProperties, test2.getRequestProperties());
assertEquals("testNewConstructors", test2.getName());
}
COM: <s> used to test the contructors that the </s>
|
funcom_train/31944225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParity(String parity) {
parity = parity.toLowerCase();
if (parity.equals("none")) {
m_Parity = SerialPort.PARITY_NONE;
}
if (parity.equals("even")) {
m_Parity = SerialPort.PARITY_EVEN;
}
if (parity.equals("odd")) {
m_Parity = SerialPort.PARITY_ODD;
}
}//setParity
COM: <s> sets the parity schema from the given </s>
|
funcom_train/28761810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCsssubsubheadcolor(String newVal) {
if ((newVal != null && this.csssubsubheadcolor != null && (newVal.compareTo(this.csssubsubheadcolor) == 0)) ||
(newVal == null && this.csssubsubheadcolor == null && csssubsubheadcolor_is_initialized)) {
return;
}
this.csssubsubheadcolor = newVal;
csssubsubheadcolor_is_modified = true;
csssubsubheadcolor_is_initialized = true;
}
COM: <s> setter method for csssubsubheadcolor </s>
|
funcom_train/38724973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setSelectedShapePanel(ShapePanel shapePanel) {
if (selectedShapePanel != null)
selectedShapePanel.setSelected( false );
if (shapePanel == selectedShapePanel) {
selectedShapePanel = null;
} else {
selectedShapePanel = (ShapePanel) shapePanel;
selectedShapePanel.setSelected( true );
}
}
COM: <s> sets the given shape panel to be the selected shape panel </s>
|
funcom_train/9273944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUp() throws Exception {
super.setUp();
Connection conn = getConnection();
conn.setAutoCommit(false);
PreparedStatement insert = conn.prepareStatement(
"INSERT INTO "+tableName+" VALUES ( ?,?,?,?,?,?,?,?,? )");
loadData(insert);
insert.close();
conn.close();
}
COM: <s> clean the default database using the default connection </s>
|
funcom_train/45571483 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getDelay(boolean isReset) {
String attrName = isReset ? "reset" : "add";
Attribute attr = this.rootElement.element("delay").attribute(attrName);
int toReturn = isReset ? 500 : 250;
try {
toReturn = Integer.parseInt(attr.getText());
} catch (NumberFormatException e) {
logger.error("The user has done something stupid, "
+ "i return a default value...");
}
return toReturn;
}
COM: <s> gets the delay for resetting the </s>
|
funcom_train/42185213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetVerticalWordFromSquare() {
System.out.println("getVerticalWordFromSquare");
int row = 8;
int col = 1;
char possibleChar = 'S';
Board instance = BoardFactory.getSampleBoard();
String expResult = "ENVISIONS";
char[] result = instance.getVerticalWordFromSquare(row, col, possibleChar);
assertEquals(expResult, new String(result));
}
COM: <s> test of get vertical word from square method of class board </s>
|
funcom_train/16188672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int countSkills(int level) {
int count=0;
Iterator<String> itr = skills.keySet().iterator();
while(itr.hasNext()) {
Skill s = (Skill)skills.get(itr.next());
if(s.getLevel() == level) {
count++;
}
}
return count;
}
COM: <s> count the skills at a certain level </s>
|
funcom_train/44778082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getItems() {
GenericListModel model = null;
try {
model = (GenericListModel) getModel();
} catch (Exception e) {
return null;
}
Iterator itr = model.iterator();
List result = new ArrayList();
while (itr.hasNext()) {
Object o = itr.next();
if (o != null) {
result.add(o);
}
}
return result;
}
COM: <s> returns items in this list </s>
|
funcom_train/50219750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void hyperlinkUpdate(HyperlinkEvent e) {
if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
// remove the future links as the user has made an explicit selection
for (int i = links.size()-1; i > currentLink; i--) {
links.remove(i);
}
URL u = e.getURL();
links.addElement(u);
currentLink++;
linkActivated(u);
}
}
COM: <s> notification of a change relative to a </s>
|
funcom_train/43245135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsReadonly() {
System.out.println("isReadonly");
PatientDemographicsDG1Object instance = new PatientDemographicsDG1Object();
boolean expResult = true;
boolean result = instance.isReadonly();
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 is readonly method of class org </s>
|
funcom_train/21616572 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updatePrices(String input) {
StringTokenizer strTok = new StringTokenizer(input, ConnectionThread.SPLIT);
prices.get(strTok.nextToken()+strTok.nextToken()).updatePrice(new Float(strTok.nextToken()), new Float(strTok.nextToken()), new Long(strTok.nextToken()));
}
COM: <s> updates prices using an input string </s>
|
funcom_train/12702753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint(Graphics g) {
this.paintComponent(g);
Dimension d=this.getSize();
for (int x=0;x<=d.width;x+=this.m_gridwidth)
for (int y=0;y<=d.height;y+=this.m_gridheight)
g.drawLine(x,y,x,y);
this.paintChildren(g);
}
COM: <s> paint this component </s>
|
funcom_train/36252105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getDomainId(String name) {
int id = -1;
VM.Record v = domainName.get(name);
if ( v==null ) {
this.refreshCache();
v = domainName.get(name);
if (v == null) {
System.err.println("[XenMonitor] getDomainId error. Domain \""+name+"\" doen't exist!!");
}
}
if ( v != null )
id = v.domid.intValue();
return id;
}
COM: <s> converts the vm name into its identifier </s>
|
funcom_train/51274355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void class_addclass() throws Exception {
driver.get(executionpath + "/test/test.html");
executeNewScript("insert node <p>text</p> as first into b:dom()//body");
executeNewScript("b:setStyle(b:dom()//p,'color','red')");
WebElement element = driver.findElementByTagName("p");
String style = element.getAttribute("style");
if (style.endsWith(" "))
style = style.substring(0, style.length()-1);
Assert.assertEquals("color: red;", style);
}
COM: <s> test the b set style function </s>
|
funcom_train/17005892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String destString = "Destinations ->" +
ByteUtilities.printInt(destinations) + " Predicate Count ";
String predicateString = "";
for (int i=31; i >=0; i--) {
predicateString = predicateString +
predicatesInterested[i] + " ";
}
return destString+predicateString;
}
COM: <s> provides us with a string representation of event destinations </s>
|
funcom_train/7310134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Border analyse(JSplitPane splitPane) {
log("DefaultClearLookPolicy.analyse(JSplitPane)");
if (isDecoratingParent(splitPane.getParent())) {
log("SplitPane nested in decorating parent detected.");
return getSplitPaneReplacementBorder();
} else
return null;
}
COM: <s> detects if the specified code jsplit pane code is nested in another </s>
|
funcom_train/28992859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void clearMediator() {
IStateMgrTarget state = getStateMgr();
try {
state.setAttribute(key, null);
} catch (StateMgrException e) {
PortalSystem
.getTrace()
.log(TraceCapable.EXCEPTION,
"EventInfoAdminCommand>>#clearMediator() - Exception occured ");
PortalSystem.handle(e);
}
}
COM: <s> removes any event info admin mediator instance from the state manager </s>
|
funcom_train/41836887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refreshStatus() {
MyLog.v(TAG, "refreshStatus()");
// IF the task is NOT already running DO
if (this.statusTask == null || !this.statusTask.getStatus().equals(AsyncTask.Status.RUNNING)) {
setStatusLoading();
// read the subway status from twitter.com/stminfo
this.statusTask = new StmInfoStatusReader(this, this);
this.statusTask.execute();
}
}
COM: <s> start the refresh status task if not running </s>
|
funcom_train/22233633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getColorIndices(int index, int colorIndices[]) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_COLOR_INDEX_READ))
throw new CapabilityNotSetException(J3dI18N.getString("IndexedGeometryArray11"));
((IndexedGeometryArrayRetained)this.retained).getColorIndices(index, colorIndices);
}
COM: <s> retrieves the color indices associated with the vertices starting at </s>
|
funcom_train/32959253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getElement() {
if (element==null) {
Map<String,String> params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
// Parse the element if specified
element = params.get("element");
if (element==null) {
element = getParameterFromRequest("element");
}
}
// TolvenLogger.info( "getElement: " + element, MenuAction.class);
return element;
}
COM: <s> get the element were currently processing </s>
|
funcom_train/20966503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String parseConfigLine(String cfgLine){
//converts to char array:
char subString []=cfgLine.toCharArray();
boolean foundEqual=false;
String configValue="";
for(int i=0; i<subString.length; i++){
//runs through the char array, and searches for first equalsign:
if (foundEqual==true){
//equal has been found, append all chars after it to this string
configValue += subString[i];
}else if (subString[i]=='='){
foundEqual=true;
}
}
return configValue;
}
COM: <s> inputs a line from the config file eg option foo </s>
|
funcom_train/40212948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuBar getJThMenuBar() {
if (jThMenuBar == null) {
jThMenuBar = new JMenuBar();
jThMenuBar.add(getJFileMenu());
jThMenuBar.add(getJHelpMenu());
}
return jThMenuBar;
}
COM: <s> this method initializes j th menu bar </s>
|
funcom_train/17637704 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Builder screenName(String screenName) {
assert (screenName != null);
if (path != null) {
throw new IllegalStateException(
"Only one of id, userId, or screenName may be set.");
}
path("/users/show.json");
return parameter("screen_name", screenName);
}
COM: <s> the screen name of a user </s>
|
funcom_train/43245322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetECTwoName() {
System.out.println("getECTwoName");
EmergencyContactDG4Object instance = new EmergencyContactDG4Object();
String expResult = "";
String result = instance.getECTwoName();
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 ectwo name method of class org </s>
|
funcom_train/133125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void heardKeyEvent(KeyEvent e) {
if (e.getSource() != component) {
return;
}
int id = e.getID();
for (KeyListener kl : key_listeners) {
if (id == KeyEvent.KEY_PRESSED) {
kl.keyPressed(e);
} else if (id == KeyEvent.KEY_RELEASED) {
kl.keyReleased(e);
} else if (id == KeyEvent.KEY_TYPED) {
kl.keyTyped(e);
}
}
}
COM: <s> processing key events on views component </s>
|
funcom_train/35848556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUsecaseHasExtensionPoints() {
Collection eps = Model.getFacade().getExtensionPoints(uc1);
assertTrue(eps.size() == 3);
assertTrue(eps.contains(ep1));
assertTrue(eps.contains(ep2));
Collection eps2 = Model.getFacade().getExtensionPoints(uc2);
assertNotNull(eps2);
assertTrue(eps2.size() == 0);
}
COM: <s> test that extension points got created correctly during setup </s>
|
funcom_train/39878289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XmlResourceParser loadXmlMetaData(PackageManager pm, String name) {
if (metaData != null) {
int resid = metaData.getInt(name);
if (resid != 0) {
return pm.getXml(packageName, resid, getApplicationInfo());
}
}
return null;
}
COM: <s> load an xml resource attached to the meta data of this item </s>
|
funcom_train/7990213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initCanvas() {
//(nrtilesx, nrtilesy, tilex, tiley, fgcolor, bgcolor, msgfont)
setCanvasSettings(CANV_TILES.x, CANV_TILES.y,
TILESIZE.x, TILESIZE.y,
JGColor.black, JGColor.white, null);
}
COM: <s> sichtbare fl auml che canvas initialisieren </s>
|
funcom_train/27767662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int executeCommand() throws CommandLineException {
try{
BufferedWriter out = new BufferedWriter(new OutputStreamWriter(getOut()));
long now = System.currentTimeMillis();
out.write(TimeConstants.verboseFormat((now - tstamp)));
out.newLine();
out.flush();
return 0;
}
catch(Throwable t){
throw new CommandLineException(t);
}
}
COM: <s> invoke the uptime command and report the time since the starting timestamp </s>
|
funcom_train/31739974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLocale(Locale locale){
this.resourceBundle = PropertyResourceBundle.getBundle(baseName, locale);
Locale.setDefault(locale);
Iterator iterator = resourceBundleChangeListeners.iterator();
while(iterator.hasNext()){
ResourceBundleChangeListener listener =
(ResourceBundleChangeListener) iterator.next();
listener.resourceBundleChanged(this);
}
}
COM: <s> loads the code resource bundle code for the given locale </s>
|
funcom_train/45809849 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String normaliseLocatorReference(LocatorIF loc) {
String reference = loc.getAddress();
String retVal = reference.substring(longestCommonPath(reference,
baseLoc.getAddress()).length());
if (retVal.startsWith("/"))
retVal = retVal.substring(1);
return retVal;
}
COM: <s> internal normalise a given locator reference according to the cxtm spec i </s>
|
funcom_train/28501399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTTS_pitch(float tts_pitch) {
ProgressLogger.getInstance().debug("Enter setTTS_pitch(float)");
TTS_pitch = tts_pitch;
try {
synthProp.setPitch(TTS_pitch);
} catch (Exception e) {
ProgressLogger.getInstance()
.error("failed to set the TTS pitch", e);
e.printStackTrace();
}
ProgressLogger.getInstance().debug("Exit setTTS_pitch(float)");
}
COM: <s> used to change current pitch </s>
|
funcom_train/18728251 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetGrayScaleColor() {
float f = 0.0F;
Color expResult = JaxoColor.BLACK;
Color result = JaxoColor.getGrayScaleColor(f);
assertEquals("Mismatch in getGrayScaleColor!", expResult, result);
assertNull("getGrayScaleColor(f) does not return null for f>1!",
JaxoColor.getGrayScaleColor(1.2f));
}
COM: <s> test of get gray scale color method </s>
|
funcom_train/17670966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
Object x = e.getSource();
if(x.equals(codeIndexButton)) {
codeIndex = codeIndexButton.isSelected();
}
else if(x.equals(backButton)) {
clearSettings();
window.setVisible(false);
prev.setVisible(true);
}
else if(x.equals(nextButton)) {
window.setVisible(false);
WizTitleGUI wgui = new WizTitleGUI(this);
}
}
COM: <s> describes actions to be taken upon component </s>
|
funcom_train/38416496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateMovementAspect() {
realisticRotations = false; // default
speed = 1.0f; // default : very slow speed
if( screenObject==null || screenObject.getLocation()==null )
return;
// if ( screenObject.getLocation().isRoom() )
// realisticRotations = true;
speed = screenObject.getSpeed();
}
COM: <s> to update speed rotations </s>
|
funcom_train/43997413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void Modify(Fund fund) throws DAOException {
try {
Transaction.begin();
Fund dbFund = factory.lookup(fund.getFund_id());
if (dbFund == null) {
throw new DAOException("Employee "+fund.getFund_id()+" no longer exists");
}
dbFund.setName(fund.getName());
dbFund.setTicker(fund.getTicker());
Transaction.commit();
} catch (RollbackException e) {
throw new DAOException(e);
} finally {
if (Transaction.isActive()) Transaction.rollback();
}
}
COM: <s> modify the given fund </s>
|
funcom_train/23233546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(Entity entity) {
IRPZone entityZone = entity.getZone();
// We have ask the zone whether it knows about the entity because
// player-objects stay alive some time after logout.
return zone.equals(entityZone) && zone.has(entity.getID()) && shape.contains(entity.getX(), entity.getY());
}
COM: <s> checks wether an entity is in this area e </s>
|
funcom_train/1349050 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void check() {
Checkbox box = (Checkbox) getFellow("header");
Rows rows = (Rows) getFellow("attrgrid");
List<Component> rowlist = rows.getChildren();
// 获取所有row的checkbox,将其设置为checked="true"
for (Component row : rowlist) {
for (Component element : (List<Component>) row.getChildren()) {
if (element instanceof Checkbox) {
if (box.isChecked()) {
((Checkbox) element).setChecked(true);
} else {
((Checkbox) element).setChecked(false);
}
}
}
}
}
COM: <s> checkbox header row header row </s>
|
funcom_train/2268172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void findProperties(File dir) throws BuildException {
if (!dir.isDirectory())
throw new BuildException(dir.getPath() + " is not a directory");
for (File file : dir.listFiles()) {
if (file.getName().startsWith(".")) {
continue;
} else if (file.isFile() && file.getName().endsWith(".properties")) {
loadProperties(file);
} else if (file.isDirectory()){
findProperties(file);
}
}
}
COM: <s> recursively scans a directory for properties files </s>
|
funcom_train/49889672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reload() {
if (!connection.isAuthenticated()) {
throw new IllegalStateException("Not logged in to server.");
}
if (connection.isAnonymous()) {
throw new IllegalStateException("Anonymous users can't have a roster.");
}
connection.sendPacket(new RosterPacket());
}
COM: <s> reloads the entire roster from the server </s>
|
funcom_train/11102544 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sessionDidActivate(HttpSessionEvent event) {
Enumeration names = event.getSession().getAttributeNames();
while (names.hasMoreElements()) {
String name = (String) names.nextElement();
Object value = event.getSession().getAttribute(name);
if (value != null) {
fireSessionActivate(value);
}
}
}
COM: <s> p respond to a session did activate event </s>
|
funcom_train/2035806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addInvitedUsers() {
AsyncServiceFactory.getUserRPCServiceAsync().getPendingInviteesByAccount(new AsyncSuccessCallback<List<User>>() {
public void onSuccess(List<User> invitedUsers) {
if (invitedUsers.size() > 0) {
createInvitedUserGrid();
invitedUsersGrid.getStore().add(User.createModels(invitedUsers));
}
}
});
}
COM: <s> initialize the invited user grids store by getting the invited users from server </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.