__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/8607833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SpawnTemplate getFirstSpawnByNpcId(int npcId) {
List<SpawnGroup> spawnGroups = spawnsByNpcID.get(npcId);
if (spawnGroups == null)
return null;
for (SpawnGroup spawnGroup : spawnGroups) {
if (spawnGroup.getObjects() != null) {
return spawnGroup.getObjects().get(0);
}
}
return null;
}
COM: <s> will return one of possible spawns for this npcid </s>
|
funcom_train/17694945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void dateOfBirthIsSameForDifferentSnapshot() {
final CacheItemStatistics<Object> s1 = fixture.getSnapshot();
safeSleep(200);
fixture.recordEviction(); // invalidates snapshot
safeSleep(200);
final CacheItemStatistics<Object> s2 = fixture.getSnapshot();
Assert.assertNotSame(s1, s2); // just for sure: we have two different snapshots
Assert.assertEquals(s1.getDateOfBirth(), s2.getDateOfBirth());
}
COM: <s> checks whether date of birth stays same for different snapshots </s>
|
funcom_train/9484539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetMetafacadeBuilder_4() {
String path = "resources/builderTestFiles/model_4";
System.setProperty(DirigentConfig.MODEL_PATH, path);
MetafacadeBuilder mfb = MetafacadeBuilder.getMetafacadeBuilder();
assertNotNull(mfb);
assertTrue(mfb instanceof CsvMetafacadeBuilder);
assertNotNull(mfb.getMetafacade("S_HSQL"));
assertNotNull(mfb.getMetafacade("T_EMP"));
assertNotNull(mfb.getMetafacade("M_EMPLOYEE"));
FileComparator
.assertEquals(
"results/builderTests/TestMetafacadeBuilder.expected.query.4.sql",
((IMapping) mfb.getMetafacade("M_EMPLOYEE"))
.getSQLQuery());
}
COM: <s> group by filter join </s>
|
funcom_train/47925646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMavenRepository(String idValue, String nameValue, String urlValue) {
Element repository = document.createElement("repository");
Element id = document.createElement("id");
Element name = document.createElement("name");
Element url = document.createElement("url");
id.setTextContent(idValue);
name.setTextContent(nameValue);
url.setTextContent(urlValue);
repository.appendChild(id);
repository.appendChild(name);
repository.appendChild(url);
repositories.appendChild(repository);
}
COM: <s> adds new maven repository to the pom file </s>
|
funcom_train/45075689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProperties(String file) {
super.setProperties(file);
String flag = props.getProperty("accessFlag", "1");
accessFlag = DecisionResult.from_int(Integer.parseInt(flag));
//name = props.getProperty("name");
cat.debug("setProperties: Created PolicyEvaluatorImpl2 object");
}
COM: <s> set the properties and initialize </s>
|
funcom_train/9663259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void putPager(Widget widget) {
if (widget != null) {
getPanel().add(widget);
getPanel().setCellWidth(widget, "1%");
getPanel().setCellWidth((Widget) getValue(), "98%");
this.pager = widget;
}
}
COM: <s> this method adds a pager widget into the cell </s>
|
funcom_train/2904502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean addTransferRemoteDataTag(XMLTag parent, Vector pm){
if((pm!=null) && (pm.size()>0)){
if(!addHostPortTag(parent, pm)){
return false;
}
String data = (String)pm.remove(0);
if(data != null){
XMLTag.addTag(parent, "data", data);
}
File f = (File)pm.remove(0);
if(f != null){
XMLTag.addTag(parent, "uri", f.toURI().toString());
}
if((f!=null) && (data!=null)){
return true;
}
}
return false;
}
COM: <s> add a set of transfer remote data </s>
|
funcom_train/40766272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String trackListAsString() {
StringBuffer buffer = new StringBuffer();
for (Iterator<ITranscriptMetadata> iter = trackList.iterator(); iter.hasNext();) {
ITranscriptMetadata track = iter.next();
buffer.append(track.toString());
}
return buffer.toString();
}
COM: <s> get the track listing as a string </s>
|
funcom_train/25187268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetFound() {
System.out.println("getFound");
StructureErrorInfo instance = new StructureErrorInfo(1, 2, "1", "2");
String expResult = "2";
String result = instance.getFound();
assertEquals(expResult, result);
}
COM: <s> test of get found method of class structure error info </s>
|
funcom_train/5480394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printString(String s, Font font) throws TextPrinterException {
this.printString(s,currentRow,currentCol,font);
currentCol=currentCol+s.length();
if (currentCol>=(jobSetup.cols-jobSetup.rightMargin)) currentRow++;
if (currentRow>(jobSetup.rows-jobSetup.bottomMargin)) finishPage();
}
COM: <s> print at the current position using a java </s>
|
funcom_train/31660128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveMappings() throws FileNotFoundException, IOException {
FileOutputStream out = null;
try {
String file = getClass().getResource(propertiesFile).getFile();
out = new FileOutputStream(file);
getMappings().store(out, propertiesComment);
} finally {
IOUtils.closeQuietly(out);
}
}
COM: <s> persist mappings to file </s>
|
funcom_train/3657707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Action getActionByVerb(String verb) {
Iterator iter;
if (actionList != null) {
iter = actionList.iterator();
if (iter != null) {
while (iter.hasNext()) {
Action temAction = (Action) iter.next();
String temVerb = temAction.getVerb();
if (temVerb.equalsIgnoreCase(verb)) {
return temAction;
}
}
}
}
return null;
}
COM: <s> returns the action whose verb field is the same with the </s>
|
funcom_train/42896344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected GameState getNextState() {
if(nextState == null) {
for(int index=0; index < GAME_STATES.length; index++) {
GameState state = GAME_STATES[index];
if(equals(state)) {
if(index < GAME_STATES.length - 1) {
nextState = GAME_STATES[index + 1];
break;
}
}
}
}
return nextState;
}
COM: <s> look up the next state </s>
|
funcom_train/17684791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connectionError(final ConnectionErrorEvent e) {
// Reset the enabled status of components
addressTF.requestFocus();
setConfigComponentsEnabled(true);
// Prompt the user to play again
if (e.shouldReset()) {
promptToPlayAgain(rb.getString("error"), rb.getString("errorConnectionLost"), JOptionPane.ERROR_MESSAGE, false);
}
}
COM: <s> connection error method when there is an error with the connection </s>
|
funcom_train/18871924 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getPort() {
Vector V = new Vector();
TRACE.log("recherche de port");
portList = CommPortIdentifier.getPortIdentifiers();
while (portList.hasMoreElements()) {
portId = (CommPortIdentifier) portList.nextElement();
if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL)
V.add(portId.getName());
}
return (V);
}
COM: <s> method get port </s>
|
funcom_train/21087584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTitrePropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_SNI_titre_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_SNI_titre_feature", "_UI_SNI_type"),
SNI_Package.Literals.SNI__TITRE, true, true, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
COM: <s> this adds a property descriptor for the titre feature </s>
|
funcom_train/7692211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Consulado entity) {
EntityManagerHelper.log("saving Consulado 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 consulado entity </s>
|
funcom_train/12264451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String s = "({";
for(Element e : extent)
s = s.concat(e + ",");
if(s.charAt(s.length()-1) == ',')
s = s.substring(0, s.length()-1);
s = s.concat("},{");
for(Property p : intent)
s = s.concat(p + ",");
if(s.charAt(s.length()-1) == ',')
s = s.substring(0, s.length()-1);
s = s.concat("})");
return s;
}
COM: <s> returns a string representation of this concept </s>
|
funcom_train/35751633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanelContentDisplay() {
if (jPanelContentDisplay == null) {
jPanelContentDisplay = new JPanel();
jPanelContentDisplay.setLayout(new BorderLayout());
jPanelContentDisplay.add(getJPanelItemInformation(),
java.awt.BorderLayout.NORTH);
jPanelContentDisplay.add(getJScrollPaneContent(),
java.awt.BorderLayout.CENTER);
}
return jPanelContentDisplay;
}
COM: <s> this method initializes j panel content display </s>
|
funcom_train/19543946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void toggleWaypoint(ZonePoint location) {
// CellPoint cp = renderer.getZone().getGrid().convert(new ZonePoint(dragStartX, dragStartY));
if (walker != null && token.isSnapToGrid() && getZone().getGrid() != null) {
walker.toggleWaypoint(getZone().getGrid().convert(location));
} else {
gridlessPath.addWayPoint(location);
gridlessPath.addPathCell(location);
}
}
COM: <s> add the waypoint if it is a new waypoint </s>
|
funcom_train/1286773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isStartResource(StartElement element) {
String about = attr(element, "about");
String resource = attr(element, "resource");
String property = attr(element, "property");
String content = attr(element, "content");
if (about != null && about.startsWith("?"))
return true;
if (resource != null && resource.startsWith("?"))
return true;
if (content != null && content.startsWith("?"))
return true;
if (property != null && content == null)
return true;
return false;
}
COM: <s> strip out nested resource but dont remove create form resources with </s>
|
funcom_train/10230895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removeAllButLast() {
synchronized (m_certificates) {
JAPCertificate firstCertificate = this.getFirstCertificate();
m_certificates.removeAllElements();
if (firstCertificate != null) {
m_certCount = 0;
} else {
m_certCount = -1;
}
this.add(firstCertificate);
}
}
COM: <s> removes all certificates except the one on the lowest level of this </s>
|
funcom_train/32306566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String localName(int pc, int index) {
for (int i=0; i<local_variable_table.length; i++)
if ((local_variable_table[i].index == index) &&
(local_variable_table[i].start_pc <= pc) &&
(pc <= local_variable_table[i].end_pc()))
return local_variable_table[i].name();
return null;
}
COM: <s> get the debugging name of a local variable </s>
|
funcom_train/22780264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPickedLabel(ArchetypeVertex v) {
String result = null;
Object lbl = v.getUserDatum(JUConstants.LABEL);
if (lbl != null && extraLabels != null) {
String label = lbl.toString();
if (extraLabels.containsKey(label)) {
result = extraLabels.get(label);
}
}
return result;
}
COM: <s> given a vertex extracts an annotation associated with that label </s>
|
funcom_train/8347878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getTxtMovil() {
if (txtMovil == null) {//GEN-END:|201-getter|0|201-preInit
// write pre-init user code here
txtMovil = new TextField("M\u00F3vil:", null, 32, TextField.ANY);//GEN-LINE:|201-getter|1|201-postInit
// write post-init user code here
}//GEN-BEGIN:|201-getter|2|
return txtMovil;
}
COM: <s> returns an initiliazed instance of txt movil component </s>
|
funcom_train/43245131 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetGender() {
System.out.println("getGender");
PatientDemographicsDG1Object instance = new PatientDemographicsDG1Object();
String expResult = "";
String result = instance.getGender();
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 gender method of class org </s>
|
funcom_train/42535496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean applicable(List<TypeUse> form, List<TypeUse> act){
return applicableStar(form,act.map(new List.Map<TypeUse, Option<TypeUse>>(){
public Option<TypeUse> map(TypeUse u){ return Option.some(u); }
}));
}
COM: <s> are the given actual argument types applicable to the formal types </s>
|
funcom_train/4971686 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addNode(CallGraphNode node) {
if (node == null) throw new RuntimeException("### addNode: null");
final GraphNode nodeGr = new GraphNode(graphGr, SWT.NONE, node.getLabel());
registerItem(node, nodeGr);
nodeGr.setBackgroundColor(nodeBackgroundColor(node));
nodeGr.setForegroundColor(nodeForegroundColor(node));
nodeGr.setTooltip(nodeTooltip(node));
}
COM: <s> add a visible graph node for a call graph node </s>
|
funcom_train/18479785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Patch refreshPatch(int i,int j) {
Point3[] new_pts = new Point3[16] ;
int pos = 0 ;
for(int I = 0; I < 4; I++) {
for(int J = 0; J < 4; J++) {
new_pts[pos++] = getCP(I + i,J + j) ;
}
}
return new Patch(new_pts) ;
}
COM: <s> refreshes the patches to reflect current list of control points </s>
|
funcom_train/43230210 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void login() {
final String cookie = Cookies.getCookie("currentUser");
LoginService.Util.getInstance().tryResumeSession(cookie,
new AsyncCallback<User>() {
@Override
public void onSuccess(final User result) {
ApplicationController.this.doLogin(result);
}
@Override
public void onFailure(final Throwable caught) {
ApplicationController.this.getNavigationPanel().clear();
History.newItem(PAGE + "login");
Window.setTitle("IpScrum - Anmeldung");
ApplicationController.this.getLoginWidget().showPopup();
}
});
}
COM: <s> starts the login procedure for the client </s>
|
funcom_train/49870090 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BufferedImage rotateCompassImage(BufferedImage img, double rad){
int w = img.getWidth();
int h = img.getHeight();
BufferedImage dimg = new BufferedImage(w, h, img.getColorModel()
.getTransparency());
Graphics2D g = dimg.createGraphics();
g.rotate(rad, 85, 85);
g.drawImage(img, null, 0, 0);
g.dispose();
return dimg;
}
COM: <s> rotates the compass background </s>
|
funcom_train/8717036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getUniqueAlt() {
int alt = NFA.INVALID_ALT_NUMBER;
int numConfigs = nfaConfigurations.size();
for (int i = 0; i < numConfigs; i++) {
NFAConfiguration configuration = (NFAConfiguration) nfaConfigurations.get(i);
if ( alt==NFA.INVALID_ALT_NUMBER ) {
alt = configuration.alt; // found first alt
}
else if ( configuration.alt!=alt ) {
return NFA.INVALID_ALT_NUMBER;
}
}
return alt;
}
COM: <s> return the uniquely mentioned alt from the nfa configurations </s>
|
funcom_train/31955858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setColumn(int col, Object newData) throws FitsException {
if (data == null) {
getData();
}
if (col < 0 || col >= nFields
|| newData.getClass() != data[col].getClass()
|| Array.getLength(newData) != Array.getLength(data[col])) {
throw new FitsException("Invalid column/column mismatch:" + col);
}
data[col] = newData;
// Invalidate the buffer.
buffer = null;
}
COM: <s> replace a column with new data </s>
|
funcom_train/50531310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getNodeInfo_menuitem() {
if (nodeInfo_menuitem == null) {
nodeInfo_menuitem = new JMenuItem();
nodeInfo_menuitem.setText(I18n.getString("nodeinfo"));
nodeInfo_menuitem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
}
});
}
return nodeInfo_menuitem;
}
COM: <s> this method initializes node info menuitem </s>
|
funcom_train/44459530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void afterShowDialog() {
// Unregister as a listener
int count = _eventSources.size();
for (int i = 0; i < count; i++) {
JComponent component = (JComponent) _eventSources.get(i);
if (component instanceof JTextComponent) {
((JTextComponent)component).getDocument().removeDocumentListener(this);
}
}
}
COM: <s> callback method that is called right after the dialog was displayed </s>
|
funcom_train/7336325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected DocumentBuilder getDocumentBuilder() throws ServletException {
DocumentBuilder documentBuilder = null;
DocumentBuilderFactory documentBuilderFactory = null;
try {
documentBuilderFactory = DocumentBuilderFactory.newInstance();
documentBuilderFactory.setNamespaceAware(true);
documentBuilder = documentBuilderFactory.newDocumentBuilder();
} catch (ParserConfigurationException e) {
throw new ServletException("JAXP initialization failed: " + e.getMessage());
}
return documentBuilder;
}
COM: <s> return jaxp document builder instance </s>
|
funcom_train/9549181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isVirtual() {
/* Note that the capacity is checked. If the content could contain 1000
* bytes but only has 0, it is still real. The content must be able to
* contain 0 bytes, no more no less, for it to be virtual.
*/
if(content.getCapacity() == 0) {
return true;
}
else {
return false;
}
}
COM: <s> returns true if and only if the lump is virtual has a declared </s>
|
funcom_train/45483604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createGoodComposite() throws CompositeAlreadySetupException {
MainWindow.logger.debug("UI: create the good composite");
GoodComposite.init(this.tabFolder);
this.goodComposite = GoodComposite.getInstance();
this.goodComposite.createTable();
CTabItem item = new CTabItem(this.tabFolder, SWT.None);
item.setText("Goods");
item.setControl(this.goodComposite);
}
COM: <s> the control with the good list </s>
|
funcom_train/2488077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSequenceEntity() {
List fields = getFields();
for (int i=0; i < getFields().size(); i++) {
Field field = (Field) fields.get(i);
if (field.isSequenceField()) {
return true;
}
}
return false;
}
COM: <s> check if one of the fields needs a sequence </s>
|
funcom_train/39245076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
setContentPane(getJContentPane());
setTitle("SchemaSpy");
this.setSize(new Dimension(500, 312));
addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
}
COM: <s> this method initializes this </s>
|
funcom_train/19700132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void colorTab(int index, boolean on) {
String color = "";
if (on)
color = ((TabInfo) tabs.get(index)).getColor();
Widget w = list.getWidget(index + 1); // factor in image logo
DOM.setStyleAttribute(w.getElement(), "backgroundColor", color);
}
COM: <s> colors a tab </s>
|
funcom_train/21753834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetObjectSpecification_EmptyKey() throws Exception {
try {
instance = new ConfigurationObjectSpecificationFactory(configurationObject.getChild("valid_config"));
instance.getObjectSpecification(" ", "id");
fail("IllegalArgumentException should be thrown because of the empty key.");
} catch (IllegalArgumentException e) {
// expected.
}
}
COM: <s> test get object specification with empty key </s>
|
funcom_train/33912639 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fillFlightInfo(FlightInfo flightInfo) {
getHtmlEmailTemplate();
templateBuilder.append("<tr>");
templateBuilder.append("<td>");
templateBuilder.append(flightInfo.getFlightDate());
templateBuilder.append("</td>");
templateBuilder.append("<td>");
templateBuilder.append(flightInfo.getFlight());
templateBuilder.append("</td>");
templateBuilder.append("<td>");
templateBuilder.append(flightInfo.getDepartureTime());
templateBuilder.append("</td>");
templateBuilder.append("<td>");
templateBuilder.append(flightInfo.getArrivalTime());
templateBuilder.append("</td>");
templateBuilder.append("<td>");
templateBuilder.append(flightInfo.getTicketPrice());
templateBuilder.append("</td>");
templateBuilder.append("</tr>");
}
COM: <s> populate html table with the necessary row items and values </s>
|
funcom_train/8640180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode() {
int h = hash;
if (h == 0) {
int ptr = 0;
int len = bytes.length;
for (int i = 0; i < len; i++)
h = 31*h + (bytes[ptr++] & 0xff);
hash = h;
}
return h;
}
COM: <s> returns a hash code value for the object </s>
|
funcom_train/49455602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void requestAnError(int errorNumber) {
if (! com.entelience.util.StaticConfig.inUnitTests)
throw new IllegalStateException("Only unit tests may request an error");
if (errorNumber <= NO_ERROR || errorNumber > MAX_ERROR)
throw new IllegalArgumentException("May not request an error which can not happen");
requestError = errorNumber;
}
COM: <s> call from unit tests to set error conditions </s>
|
funcom_train/44011563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetTotalDiscountTaken() {
System.out.println("getTotalDiscountTaken");
TransactionBO instance = new TransactionBO();
double expResult = 0.0;
double result = instance.getTotalDiscountTaken();
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 total discount taken method of class edu </s>
|
funcom_train/11592863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean hasTableAnyContext(FacesContext context, UIComponent component){
boolean hasHeader = component.getFacet(Attributes.HEADER) != null;
boolean hasBody = component.getChildCount() > 0;
boolean hasFooter = component.getFacet(Attributes.FOOTER) != null;
return (hasHeader || hasBody || hasFooter);
}
COM: <s> checks if the table has any header body or footer </s>
|
funcom_train/4377342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getOAuthMessage(OAuthProblemException ex) {
String message = null;
Map<String, Object> exParams = ex.getParameters();
for(Map.Entry<String, Object> entry : exParams.entrySet()){
String k = entry.getKey();
Object v = entry.getValue();
if(k.startsWith("{")){
RJSONObject json;
try {
json = new RJSONObject(k);
String details = json.optString("details");
message = details;
break;
} catch (RJSONException e1) {
}
}
}
return message;
}
}
COM: <s> returns a string returned by meetup </s>
|
funcom_train/9086597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(News entity) {
EntityManagerHelper.log("saving News 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 news entity </s>
|
funcom_train/8047359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected float getLastLineWidth(){
float currentLineWidth = 2 * this.getInnerPaddingLeft() + caretWidth;
for (int i = 0; i < this.characterList.size(); i++) {
IFontCharacter character = this.characterList.get(i);
if (character.getUnicode().equals("\n")){
currentLineWidth = 2 * this.getInnerPaddingLeft() + caretWidth;;
}else{
currentLineWidth += character.getHorizontalDist();
}
}
return currentLineWidth;
}
COM: <s> gets the last line width </s>
|
funcom_train/40857745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Dictionary getDictionary(SolrQueryRequest req) {
float threshold;
try {
threshold = req.getParams().getFloat(THRESHOLD, DEFAULT_DICTIONARY_THRESHOLD);
} catch (NumberFormatException e) {
throw new RuntimeException("Threshold must be a valid positive float", e);
}
IndexReader indexReader = req.getSearcher().getReader();
return new HighFrequencyDictionary(indexReader, termSourceField, threshold);
}
COM: <s> returns a dictionary to be used when building the spell checker index </s>
|
funcom_train/13647978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PrivateKey getPrivateKeyByFingerprintSHA1(byte[] fingerprintStrSHA1) throws Exception {
//this will always return the private key if there is a public and a private key entry with the same serial in
//the keystore
KeystoreCertificate certificate = this.getKeystoreCertificateByFingerprintSHA1(fingerprintStrSHA1);
return (this.getPrivateKey(certificate.getAlias()));
}
COM: <s> returns the private key for a passed fingerprint sha1 </s>
|
funcom_train/51274332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sync_read_success() throws Exception {
driver.get(executionpath + "/test/test.html");
String value = executeNewScript(" import module namespace http-client = \"http://expath.org/ns/http-client\";" +
"http-client:read(\n" +
" \"forecast2.xml\"\n" +
" )[2]/*:forecast/*:city[1]/data(@*:name)");
Assert.assertEquals("Zurich", value);
}
COM: <s> test the expath read function </s>
|
funcom_train/36994287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private InputStream getInputStream(String filename) throws FileNotFoundException {
InputStream result = null;
try {
result = new FileInputStream(filename);
} catch (FileNotFoundException exc) {
// That didn't work out, let's continue.
}
if (result == null) {
result = this.getClass().getClassLoader().getResourceAsStream(filename);
}
return result;
}
COM: <s> return the specified file as an input stream </s>
|
funcom_train/34341692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCmdNuevo() {
if (CmdNuevo == null) {//GEN-END:|31-getter|0|31-preInit
// write pre-init user code here
CmdNuevo = new Command("Regresar a Principal", Command.ITEM, 0);//GEN-LINE:|31-getter|1|31-postInit
// write post-init user code here
}//GEN-BEGIN:|31-getter|2|
return CmdNuevo;
}
COM: <s> returns an initiliazed instance of cmd nuevo component </s>
|
funcom_train/45050379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetValueAsObjectForDateType() throws Exception {
// First format and reinterpret date to clear time fields.
DateFormat dateFormat = SimpleDateFormat.getDateInstance();
final Date expectedDate = dateFormat.parse(dateFormat.format(new Date()));
argument.setDatatype(SQLCallArgument.DATATYPE_DATE);
argument.setValue(dateFormat.format(expectedDate));
checkObjectValueEqual(expectedDate, argument);
}
COM: <s> test that the get value as object operates on a date correctly </s>
|
funcom_train/10483714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCookies(Collection<Cookie> cookies) {
if (cookies == null) {
throw new IllegalArgumentException("null cookie set was passed in");
}
Map<String,Cookie> newCookies = new HashMap<String,Cookie>();
for (Cookie cookie : cookies) {
if (canAcceptCookie(cookie)) {
newCookies.put(cookie.getName(), cookie);
}
}
this.cookies = newCookies;
}
COM: <s> sets the cookies on the message </s>
|
funcom_train/14179957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int saveGame(String sessionId, String gameId) {
try {
Game game = gamesContainer.getGame(gameId);
game.saveGame(sessionId);
return ErrorCodes.OK;
} catch (GameNotFound e) {
return ErrorCodes.GAME_NOT_FOUND;
} catch (UserNotFound e) {
return ErrorCodes.USER_NOT_FOUND;
} catch (NotAllowed e) {
return ErrorCodes.NOT_ALLOWED;
} catch (NotRunning e) {
return ErrorCodes.GAME_NOT_RUNNING;
} catch (Throwable e) {
System.out.println("Exception caught:");
e.printStackTrace();
return ErrorCodes.OK;
}
}
COM: <s> save the current game </s>
|
funcom_train/51296065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getUpdateDefaultSql(T t) {
return t.isOnDefault() ? "UPDATE pos SET is_default = false "
+ "WHERE ref_group = "
+ t.getGroupId()
+ " AND ref_type IN "
+ Arrays.toString(getTypeIdList(t)).replace('[', '(').replace(
']', ')') + ";\n" : "";
}
COM: <s> query to update default workplaces list </s>
|
funcom_train/43232792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateActivationRules(final StateType stateType, final boolean added) {
if (this.getFieldTypes() != null) {
final Iterator<FieldType> fieldTypes = this.getFieldTypes().iterator();
while (fieldTypes.hasNext()) {
final FieldType current = fieldTypes.next();
if (added) {
final ActivationRule ar = this.defaultActivationRule(stateType, current);
this.activationRules.add(ar);
} else {
final ActivationRule ar = this.getSpecificActivationRule(stateType, current);
this.activationRules.remove(ar);
}
}
}
}
COM: <s> updates the activation rules of the state profile </s>
|
funcom_train/29954525 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetDuration() {
System.out.println("setDuration");
double duration = 500.0;
SimuParamObject instance = new SimuParamObject();
instance.setDuration(duration);
double expResult = duration;
double result = instance.getDuration();
System.out.println(result);
assertEquals(expResult, result);
}
COM: <s> test of set duration method of class hbm </s>
|
funcom_train/44010285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fork() {
Lib.assertit(status == statusNew);
Lib.assertit(target != null);
Lib.debug(dbgThread, "Forking thread: " + toString() + " Runnable: "
+ target);
boolean intStatus = Machine.interrupt().disable();
tcb.start(new Runnable() {
public void run() {
runThread();
}
});
ready();
Machine.interrupt().restore(intStatus);
}
COM: <s> causes this thread to begin execution </s>
|
funcom_train/45354291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getJChkPickedUp() {
if (jChkPickedUp == null) {
jChkPickedUp = new JCheckBox();
jChkPickedUp.setBounds(10, 112, 111, 19);
jChkPickedUp
.setHorizontalTextPosition(javax.swing.SwingConstants.LEADING);
jChkPickedUp.setText("Partial Pickup");
}
return jChkPickedUp;
}
COM: <s> this method initializes j chk picked up </s>
|
funcom_train/33263980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension getPreferredSize() {
if (getParent() != null) {
Dimension editSize = edit.getPreferredSize();
Dimension labelSize = label.getPreferredSize();
return new Dimension (editSize.width+labelSize.width+140, editSize.height);
}
return new Dimension(0, 0);
}
COM: <s> gets the preffered size of the data control </s>
|
funcom_train/44535830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDataBase(String dbHost, int dbPort, String dbFile, String dbUser, String dbUserPass) {
this.setDBHost(dbHost);
this.setDBPort(dbPort);
this.setDBFile(dbFile);
this.setDBUser(dbUser);
this.setDBPass(dbUserPass);
}
COM: <s> for client usage set database including host port path to db file and </s>
|
funcom_train/41648715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int parseInt() throws IOException {
int sign = 1;
int ch = read();
if (ch == '-') {
sign = -1;
ch = read();
}
int value = 0;
for (; ch >= '0' && ch <= '9'; ch = read())
value = 10 * value + ch - '0';
_peek = ch;
return sign * value;
}
COM: <s> parses a 32 bit integer value from the stream </s>
|
funcom_train/4074929 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
for(String line : expr) {
output.println("INFIX EXPRESSION:\t" + line.substring(0, line.length()-1));
for(int j = 0; line.charAt(j) != '#'; j++)
buildPostfix(line.charAt(j));
String post = cleanup();
output.println("POSTFIX EXPRESSION:\t" + post);
output.println("EXPRESSION VALUE:\t" + solve(post));
output.println();
}
output.close();
}
COM: <s> converts solves and prints out the results from </s>
|
funcom_train/19972668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void upgradeTable(SQLiteDatabase db, int oldV, int newV) {
Log.i(TAG, "WBD: upgrade table " + sourceName);
// We can simply dump all the old data, since the DB is just
// a cache of web data.
db.execSQL("DROP TABLE IF EXISTS " + sourceName);
createTable(db);
}
COM: <s> upgrade or table in the database to a new version </s>
|
funcom_train/36883875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private OKResponse sendPrivateMessage(StreamableMessage toSend) {
OKResponse response = null;
try {
ObjectOutputStream out = new ObjectOutputStream(
toSend.getOutput());
out.writeObject(toSend.getWrapped());
out.flush();
out.close();
response = new OKResponse();
} catch (IOException e) {
throw new RuntimeException(e);
}
return response;
}
COM: <s> send the private message </s>
|
funcom_train/45074855 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkDatabase(String DBMgrType) {
dbMgr = gov.lanl.Database.DBMgrFactory.current();
try {
dbMgr.txn_begin();
dbMgr.txn_commit();
} catch (DBException db) {
cat.fatal("dbMgr failed with " + DataBase + " " + DBMgrType + " " + db);
System.exit(1);
}
}
COM: <s> check the database connection and abort if it fails </s>
|
funcom_train/22360560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void mergeNodes(RadixTreeNode<T> parent, RadixTreeNode<T> child) {
parent.setKey(parent.getKey() + child.getKey());
parent.setReal(child.isReal());
parent.setValue(child.getValue());
parent.setChildren(child.getChildren());
}
COM: <s> merge a child into its parent node </s>
|
funcom_train/26618213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copy(IContext context) {
m_renderManager = context.getRenderManager();
m_renderingHints = context.getRenderingHints();
m_jarl = context.getJarl();
m_height = context.getHeight();
m_width = context.getWidth();
m_time = context.getTime();
}
COM: <s> copy the params from the other context </s>
|
funcom_train/46702876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void useSelectItems_2() {
Order orderValue = session.load(Order.class, 1L);
Query<Item> items = session.createQuery(Item.ORDER.whereEq(orderValue));
for (Item item : items) {
Order order2 = item.getOrder();
System.out.println("ITEM ROW: " + item + " ORDER: " + order2);
}
}
COM: <s> select one order by id and print its items by a criterion </s>
|
funcom_train/22413737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OsmTypevent getMeaningful(OsmTypinstance osmTypinstance) {
StringBuffer queryString = new StringBuffer("select a from OsmTypevent a where a.osmTypinstance = :osmTypinstance and a.defGraph=1");
List list = getHibernateTemplate().findByNamedParam(queryString.toString(), "osmTypinstance", osmTypinstance);
return (OsmTypevent) list.get(0);
}
COM: <s> gets the event type set as meaningful for an instance type </s>
|
funcom_train/41829222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Amount getSumProfitAmount(final long toDate) {
Amount sumAmount = getProfitAmount(toDate);
log.debug("depositProfit = " + sumAmount);
if (getReplenish().size() > 0)
for (Replenish rep : replenish) {
sumAmount.addToAmount(rep.getProfitAmount(toDate));
}
log.debug("sumProfit = " + sumAmount);
return sumAmount;
}
COM: <s> calculate profit from layoutdate to to date </s>
|
funcom_train/3806311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMimeType() {
ContentTypeField child =
(ContentTypeField) header.getField(Field.CONTENT_TYPE);
ContentTypeField parent = getParent() != null
? (ContentTypeField) getParent().getHeader().
getField(Field.CONTENT_TYPE)
: null;
return ContentTypeField.getMimeType(child, parent);
}
COM: <s> determines the mime type of this code message code </s>
|
funcom_train/29882571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCharCodeForNextCharDownload(int pCharCodeForNextCharDownload) {
mPriFontDownloader.setCharCode(pCharCodeForNextCharDownload);
// PriDebug.infoln(PriDebug.spacesForPclParseMsgs + "PriParseSoftFontBytes set char code (*c#E) for char: " +
// Character.toString((char)pCharCodeForNextCharDownload));
}
COM: <s> set character code for the next char download on pri font downloader </s>
|
funcom_train/1812854 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getProperty(String prop) {
String s = "unknown";
try {
JProp jp = JProp.getInstance();
s = jp.getValue(prop);
} catch (Exception e) {
logger.log(BasicLevel.FATAL, "Error while getProperty : " + e.getMessage());
}
return s;
}
COM: <s> access a property stored in the jon as instance executing the ejb </s>
|
funcom_train/21419318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addEventCode(String valueKey, String value) {
while (hasNextEventCode()) {
try {
getNextEventCodeValuePair();
} catch (Exception e) {
}
} // move to end of list
eventCodesListIterator.add(new ValuePair(valueKey, value));
}
COM: <s> append a supplied event code to this eas cap info </s>
|
funcom_train/12563818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private long frameToTime(int frameNumber) {
long elapsedTime = 0;
for (int i = 0; i < frameTimes.size(); i++) {
long interval = ((Long)frameTimes.elementAt(i)).longValue();
if (i < frameNumber)
elapsedTime += interval;
else
break;
}
return elapsedTime;
}
COM: <s> maps a frame to the corresponding media time </s>
|
funcom_train/45774862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void insertRowAtEnd() {
int l = scrollfields.size();
registerControlGroup( newRow(l), l );
setTotalFieldCount(l+1);
// if the new row is visible, it must have been disabled
// so it should be now enabled...
if ( l- nscrollvalue < nblockincrement )
((ControlRow) ControlGroupVector.get( l - nscrollvalue )).setEnabled(true);
}
COM: <s> insert a blank empty row </s>
|
funcom_train/2467049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void paintComponent(Graphics g) {
AntialiasingManager.activateAntialiasing(g);
Graphics2D g2 = (Graphics2D) g;
g2.drawImage(this.background, 0, 0, null);
g2.setColor(new Color(255, 255, 255, 180));
g2.fillRoundRect(0, 0, getWidth(), getHeight(), 10, 10);
g2.setColor(Constants.BORDER_COLOR);
g2.drawRoundRect(0, 0, getWidth() - 1, getHeight() - 1, 10, 10);
}
COM: <s> overrides the code paint component code method in tt jcomponent tt </s>
|
funcom_train/3703801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSource(Tuple t) {
if (TUPLE_SOURCE.equals(t.getTupleType()) == false) {
throw new IllegalArgumentException("Tuple has type " +
t.getTupleType() + ", should have type: " + TUPLE_SOURCE);
}
tupleSources.addTuple(t);
} // of method
COM: <s> add a source tuple </s>
|
funcom_train/2272445 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
if (o == null)
return false;
if (this == o)
return true;
if (!(o instanceof WSUsernameTokenPrincipal))
return false;
WSUsernameTokenPrincipal that = (WSUsernameTokenPrincipal) o;
if (this.getName().equals(that.getName()))
return true;
return false;
}
COM: <s> compares the specified object with this code wsusername token principal code </s>
|
funcom_train/24083134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Envelope getEnvelopeByName(String name) {
Envelope e = null;
Iterator<Envelope> e_iter = envelopes.iterator();
while( e_iter.hasNext() ) {
Envelope search = e_iter.next();
if( search.getName().equals(name) ) {
e = search;
break;
}
}
return e;
}
COM: <s> given a name get the envelope corresponding to the name </s>
|
funcom_train/48664273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addQuery(QueryId qid, RealizedQuery cube, QueryListener listener) {
synchronized(this.fQueries) {
DataQueryExecutor queryExecutor = new DataQueryExecutor(cube, fReactionDispatcher,
fLogReplayMode ? false : fAnalyzersEnabled, fReactionCoolOff);
queryExecutor.addListener(listener);
this.fQueries.put(qid, queryExecutor);
}
}
COM: <s> creates an object to execute the query of the cube </s>
|
funcom_train/15520342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void startTimer() {
final long second = 1000; // a second
long delay = 5 * second;
long interval = second;
if (conf != null) {
delay = 5 * conf.getScanTime();
interval = conf.getScanTime();
}
this.timer = new Timer();
timerTask = new TimerTask() {
public void run() {
scanCache();
}
};
this.timer.scheduleAtFixedRate(timerTask, delay, interval);
}
COM: <s> start the cache events with a timer </s>
|
funcom_train/8046736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawComponent(GL gl) {
if (isUseDirectGL()){
if (isUseDisplayList()){
int[] displayListIDs = this.getGeometryInfo().getDisplayListIDs();
if (!this.isNoFill())
gl.glCallList(displayListIDs[0]); //Draw fill
if (!this.isNoStroke())
gl.glCallList(displayListIDs[1]); //Draw outline
}else{
drawPureGL(gl);
}
}
}
COM: <s> just draws the character without applying its own local matrix </s>
|
funcom_train/31978614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void access(boolean notify) {
super.access();
//notify javagroups that session has been accessed
if ( notify )
{
SessionMessage msg =
new SessionMessage(SessionMessage.EVT_SESSION_ACCESSED,
null,
this.getId(),
null,
null,
null);
sendMessage(msg);
}
//log("Access has been called in the session");
}
COM: <s> update the accessed time information for this session </s>
|
funcom_train/28362157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void synchronizeWithSelectedServiceIfNeeded() {
synchronized( SYNC_TIMER ) {
final ServiceHandler serviceHandler = _selectedServiceHandler;
if ( serviceHandler != null ) {
final double period = SYNC_TIMER.getDelay() / 1000.0;
if ( !serviceHandler.hasRefreshedInPeriod( period ) ) {
try {
serviceHandler.refresh();
refreshForMonitorSelection();
}
catch( Exception exception ) {
getMainWindow().displayError( "Synchronization Error", "Exception attempting to synchronize with the remote service!", exception );
}
}
}
else {
}
}
}
COM: <s> synchronize the client from the selected service </s>
|
funcom_train/40350132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addGriddedGrowingButtons(Button[] buttons) {
int length = buttons.length;
for (int i = 0; i < length; i++) {
int index = leftToRight ? i : length -1 - i;
addGriddedGrowing(buttons[index]);
if (i < buttons.length - 1)
addRelatedGap();
}
}
COM: <s> adds a sequence of gridded buttons that grow </s>
|
funcom_train/22573807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addIdName(String id, String name) throws SQLException {
StringBuffer sb = new StringBuffer();
sb.append("INSERT INTO ");
sb.append(this.ADT_MAIN_TABLE);
sb.append(" VALUES ");
sb.append("('" + id + "','" + name + "');");
int i = 0;
i = this.executeUpdate(sb.toString());
if (i > 0)
return true;
return false;
}
COM: <s> adds the patient id patient name pair to the database </s>
|
funcom_train/4683039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OutputStream openOutputStream() throws IOException{
// Check that the connection was opened for reading
if (mode != Connector.WRITE && mode != Connector.READ_WRITE) {
throw new IOException("read-only connection");
}
if(out==null){
out = conn.getOutputStream();
}
return out;
}
COM: <s> returns an output stream for this socket </s>
|
funcom_train/34526126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Document loadDocument(String name) {
Document document = null;
String documentPath = getDocumentPath(name);
try {
FileInputStream fin = new FileInputStream(new File(documentPath));
document = createDocument(name, fin);
} catch(Exception ex) {
String msg = "Unable to read the document " +
"from the path '" + documentPath + "'.";
throw new DocumentException(msg, ex);
}
return document;
}
COM: <s> loads a document for the specified name </s>
|
funcom_train/5447084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyBusMemberListeners(Object source, String type) {
BusEvent event = new BusEvent(source, type);
for(int i = 0; i < listeners.size(); i++) {
((BusMemberListener)listeners.elementAt(i)).handleBusEvent(event);
}
}
COM: <s> method to notify all bus member listeners of a bus event </s>
|
funcom_train/28171069 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetBounds() {
System.out.println("getBounds");
BezierPath instance = new BezierPath();
Rectangle expResult = null;
Rectangle result = instance.getBounds();
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 bounds method of class org </s>
|
funcom_train/21656136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtCancelarRegistro() {
if (btCancelarRegistro == null) {
btCancelarRegistro = new JButton();
btCancelarRegistro.setBounds(new Rectangle(645, 570, 150, 21));
btCancelarRegistro.setMnemonic('v');
btCancelarRegistro.setText("Volver Al Menu");
btCancelarRegistro.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
ControladorPrincipal.mostrarMenuPrincipal();
}
});
}
return btCancelarRegistro;
}
COM: <s> this method initializes bt cancelar registro </s>
|
funcom_train/25707868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeRequestPriority(final String id, final int newPrio) {
final List<String> msg = new LinkedList<String>();
msg.add("ModifyPersistentRequest");
msg.add("Global=true");
msg.add("Identifier="+id);
msg.add("PriorityClass=" + Integer.toString(newPrio));
fcpPersistentConnection.sendMessage(msg, true);
}
COM: <s> no answer from node is expected </s>
|
funcom_train/50229329 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNewBaz() {
mManager.currentTransaction().begin();
Baz si = (Baz) XORM.newInstance(mManager, Baz.class);
si.setName("This should disappear");
mManager.makePersistent(si);
mManager.currentTransaction().commit();
}
COM: <s> creates a new baz but doesnt delete it </s>
|
funcom_train/3173369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getName() {
if (name==null) {
// can localize?
Resources resources = Resources.get(instance);
name = resources.getString("option."+property, false);
if (name==null) {
name = resources.getString(property, false);
if (name==null)
name = property;
}
}
// done
return name;
}
COM: <s> accessor name of this option </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.