__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/49268541 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TargetBean targetMethod3(TargetBean parameter1, TargetBean parameter2) {
System.out.println("In Target.targetMethod3, parameter1 is " + parameter1 + ", parameter2 is " + parameter2);
TargetBean result = new TargetBean();
result.setForename("Emily");
result.setSurname("Bloggs");
result.setAge(4);
System.out.println("In Target.targetMethod3, returning " + result);
return result;
}
COM: <s> another method this time with two parameters and a return type </s>
|
funcom_train/43244887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetCurrentConnections() {
System.out.println("setCurrentConnections");
int currentConnections = 0;
ServerStatusObject instance = new ServerStatusObject();
instance.setCurrentConnections(currentConnections);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set current connections method of class org </s>
|
funcom_train/8258420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasConverter(Class type) {
Assert.notNull(converterLookup, "converterLookup cannot be null");
Assert.notNull(type, "type cannot be null");
if (type.isArray()) {
type = type.getComponentType();
}
return converterLookup.lookupConverter(type) != null;
}
COM: <s> returns true if there is a registered compass converter for the given type </s>
|
funcom_train/2278552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isCanInstallUpdate() {
if (this.currentVersion == null || this.currentVersion.equals("")) {
return true;
} else {
int oldVersionOk = this.currentVersion.compareTo(this.allowedOldVersion);
if (oldVersionOk == 0 || oldVersionOk >= 1) {
int newVersionOk = this.newVersion.compareTo(this.currentVersion);
return (newVersionOk >= 1);
} else {
return false;
}
}
}
COM: <s> checks if is can install update </s>
|
funcom_train/15406882 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeBinaryMessage(BinaryMessageList msgList) throws IOException {
writeIdList(beanDescriptor, 0, insertIds, msgList);
writeIdList(beanDescriptor, 1, updateIds, msgList);
writeIdList(beanDescriptor, 2, deleteIds, msgList);
}
COM: <s> write the contents into a binary message form </s>
|
funcom_train/39103611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertTab(String title, String icon, Component comp, int index) {
super.insertTab(title, resource.getIcon(icon), comp, null, index);
propertyList.insert(new TabProperty(title, icon), index);
update(resource);
}
COM: <s> insert a tab to cfjtabbed pane client framework jtabbed pane vector at </s>
|
funcom_train/20364427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doClickOn(Point point) {
Point p = leftScroller.getViewport().getViewPosition();
point.x = point.x + p.x;
point.y = point.y + p.y;
if ( parentPanels==null || parentPanels.size()==0 ) {
return;
}
for ( GeneralSkill skill : parentPanels.keySet() ) {
GeneralSkillPanel gsp = parentPanels.get(skill);
if ( gsp.getBounds().contains(point) ) {
setSelected( skill );
return;
}
}
}
COM: <s> respond to mouse click </s>
|
funcom_train/9536990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent ev) {
if (this.sC == null) {
String lang = "VBScript";
this.sC = new ActiveXComponent("ScriptControl");
Dispatch.put(this.sC, "Language", lang);
}
Variant v = Dispatch.call(this.sC, "Eval", this.in.getText());
this.out.setText(v.toString());
}
COM: <s> action method that receives button actions </s>
|
funcom_train/38518311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void members( String member ) {
if( members.contains( member ) ) return;
for( int i=0; i<members.size(); i++ ) if( ((String)members.elementAt(i)).compareTo( member ) > 0 ) {
members.insertElementAt( member, i );
return;
}
members.addElement( member );
}
COM: <s> add a member </s>
|
funcom_train/35682662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConfigFileNotfound() {
try {
new LegStarConfigCommons("tarata.tsointsoin");
} catch (LegStarConfigurationException e) {
assertEquals(
"org.apache.commons.configuration.ConfigurationException:"
+ " Cannot locate configuration source tarata.tsointsoin",
e.getMessage());
}
}
COM: <s> see what happens if configuration file is not found </s>
|
funcom_train/2294905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNavText() {
if (m_text == null) {
// use "lazy initializing"
m_text = (String)m_properties.get(CmsPropertyDefinition.PROPERTY_NAVTEXT);
if (m_text == null) {
m_text = CmsMessages.formatUnknownKey(CmsPropertyDefinition.PROPERTY_NAVTEXT);
}
}
return m_text;
}
COM: <s> returns the value of the property property navtext of this navigation element </s>
|
funcom_train/437957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateProperties() {
if (props != null) {
// Stores the current recent files
int i = 0;
for (int n = getMenuComponentCount() - nonReopenItems; i < n; i++)
props.setProperty("recentfile" + (n - i - 1),
((JMenuItem)getMenuComponent(i)).getText());
for (; (props.getProperty("recentfile" + i)) != null; i++)
props.remove("recentfile" + i);
}
}
COM: <s> updates the recent files in the application properties </s>
|
funcom_train/9201180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private URL makeGeoURL(double lat, double lon) throws MalformedURLException {
StringBuilder url = new StringBuilder();
url.append(URL_GEO_STRING).append("q=").append(lat).append(",").append(lon);
return new URL(url.toString());
}
COM: <s> prepares the url to connect to the reverse geocoding server from the </s>
|
funcom_train/11024379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSimpleInt() {
try {
Object value = bean.get("intProperty");
assertNotNull("Got a value", value);
assertTrue("Got correct type", (value instanceof Integer));
assertEquals("Got correct value",
((Integer) value).intValue(),
123);
} catch (Throwable t) {
fail("Exception: " + t);
}
}
COM: <s> test get simple property on a int property </s>
|
funcom_train/41163779 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(CoCompleteE2 entity) {
EntityManagerHelper.log("saving CoCompleteE2 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 co complete e2 entity </s>
|
funcom_train/42887051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean add(E elt) {
final int i = indexFor(hash(elt), table.length);
for (Entry<E> e = table[i]; e != null; e = e.next) {
if (e.val.equals(elt)) {
return false;
}
}
table[i] = new Entry<E>(elt, table[i]);
if (size++ >= threshold)
resize(2 * table.length);
return true;
}
COM: <s> adds the given element to this set if not already present </s>
|
funcom_train/8544736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void dumpAccount(String account) throws AppException {
logger.info("Dumping account: " + account);
String outputLine = account + "\t";
AdWordsInterface adwordsInterface = new AdWordsInterface(account);
Campaign[] campaigns = adwordsInterface.getAllAdWordsCampaigns();
if (campaigns != null) {
dumpCampaigns(campaigns, adwordsInterface, outputLine);
}
}
COM: <s> dumps an accounts creatives </s>
|
funcom_train/3417875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void append(StringBuffer result, CharacterIterator iterator) {
if (iterator.first() != CharacterIterator.DONE) {
char aChar;
result.append(iterator.first());
while ((aChar = iterator.next()) != CharacterIterator.DONE) {
result.append(aChar);
}
}
}
COM: <s> convenience method to append all the characters in </s>
|
funcom_train/32985965 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete() throws Exception {
Criteria crit = new Criteria();
crit.add(DBWishlistPeer.MOLECULE_ID, getMoleculeId());
crit.add(DBWishlistPeer.SPECTRUM_TYPE_ID, getSpectrumTypeId());
DBWishlistPeer.doDelete(crit);
}
COM: <s> deletes this item </s>
|
funcom_train/24516150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseBoundary(String key, String values){
if(getHttpStatusCode()==206 && key!=null && key.equals("Content-Type")==true){
int index=values.indexOf("boundary");
if(index!=-1){
boundary=values.substring(index+"boundary=".length());
boundaryBytes=boundary.getBytes();
}
}
}
COM: <s> gets boundary sequence from response header for identificating the range </s>
|
funcom_train/7287071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkAbort() throws IOException {
if (wrappedStream != null) {
try {
boolean scws = true; // should close wrapped stream?
if (eofWatcher != null)
scws = eofWatcher.streamAbort(wrappedStream);
if (scws)
wrappedStream.close();
} finally {
wrappedStream = null;
}
}
}
COM: <s> detects stream abort and notifies the watcher </s>
|
funcom_train/28368618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void propagateSignal(final Signal s) {
if (carryingAgent != null) {
((Place.withSignals) carryingAgent).addSignal(s);
} else if ((gridPlace != null) && (s.canPropagateOn(gridPlace))) {
gridPlace.addSignal(s);
}
}
COM: <s> propagate signal created 9 sept </s>
|
funcom_train/48552976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeSection(double[][][] section, int x, int y, int w, int h){
// FIXED: lhchavez sep/09: Changed the update code to a new thread
BufferUpdateEvent bue = new BufferUpdateEvent(section, x, y, w, h);
bufferUpdater.enqueue(bue);
}
COM: <s> overwrites a section of the framebuffer </s>
|
funcom_train/24288618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JSONArray getJSONArray(String key) throws JSONException {
Object o = get(key);
if (o instanceof JSONArray) {
return (JSONArray)o;
}
throw new JSONException("JSONObject[" + quote(key) + //$NON-NLS-1$
"] is not a JSONArray."); //$NON-NLS-1$
}
COM: <s> get the jsonarray value associated with a key </s>
|
funcom_train/41862634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSplitPane getSplitPane() {
if (splitPane == null) {
splitPane = new JSplitPane();
splitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
splitPane.setPreferredSize(new Dimension(300, 118));
splitPane.setDividerLocation(100);
splitPane.setBottomComponent(getPanelResultados());
splitPane.setTopComponent(getScrollPane());
splitPane.setOneTouchExpandable(true);
}
return splitPane;
}
COM: <s> this method initializes split pane </s>
|
funcom_train/14406952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAttributesWithPrefix(String prefix) {
List<String> toBeRemoved = new ArrayList<String>();
for (Iterator<String> iter = sessionData.keySet().iterator(); iter.hasNext();) {
String key = (String) iter.next();
if (key.startsWith(prefix))
{
toBeRemoved.add(key);
}
}
for (Iterator<String> iter = toBeRemoved.iterator(); iter.hasNext();) {
String key = (String) iter.next();
removeAttribute(key);
}
}
COM: <s> remove all the attribute with the key starting with the given prefix </s>
|
funcom_train/36904637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean verifyUser(User user){
String sqlString = "SELECT * FROM USERS WHERE NAME = :name AND PASSWORD = :password ";
Query query = _currentSession.createQuery(sqlString);
query.setString("name", user.getName());
query.setString("password", user.getPassword());
List<User> list = query.list();
if (list == null ){
return false;
}else
{
if (list.get(0) == null){
return false;
}
return true;
}
}
COM: <s> this method will check in the database </s>
|
funcom_train/3392655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DeclaredType getDeclaredType(Type.ClassType t) {
return
hasFlag(t.tsym, Flags.ANNOTATION) ? new AnnotationTypeImpl(env, t) :
hasFlag(t.tsym, Flags.INTERFACE) ? new InterfaceTypeImpl(env, t) :
hasFlag(t.tsym, Flags.ENUM) ? new EnumTypeImpl(env, t) :
new ClassTypeImpl(env, t);
}
COM: <s> returns the declared type corresponding to a given class type </s>
|
funcom_train/22742142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showConfirmation(Event yesEvent, Event noEvent, Displayable yesScreen, Displayable noScreen, String msg) {
ConfirmationDialog confDlg = ConfirmationDialog.getConfirmationDialog(yesEvent, noEvent, yesScreen, noScreen, msg);
confDlg.setItemStateListener(this);
confDlg.setCommandListener(this);
setDisplayable(confDlg);
}
COM: <s> show confirmation screen </s>
|
funcom_train/7518131 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Usuario entity) {
EntityManagerHelper.log("saving Usuario 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 usuario entity </s>
|
funcom_train/46262513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void preApply(GLMatrix3D left) {
preApply(left.m00, left.m01, left.m02, left.m03,
left.m10, left.m11, left.m12, left.m13,
left.m20, left.m21, left.m22, left.m23,
left.m30, left.m31, left.m32, left.m33);
}
COM: <s> apply another matrix to the left of this one </s>
|
funcom_train/13811524 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void reset() throws FailingHttpStatusCodeException, MalformedURLException, IOException {
StringBuilder sb = new StringBuilder();
Formatter formatter = new Formatter(sb, Locale.US);
formatter.format("http://%s/%s/reset.jsp", httpServer, appName);
WebClient wc = new WebClient();
wc.getPage(sb.toString());
}
COM: <s> resets all app parameters disabling forwarding </s>
|
funcom_train/31457580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refresh() {
if(orgView.org != null) {
/* Get the register names and values */
registerNames = ((DebuggableCPU)orgView.org.getVM()).getRegisterNames();
registerValues = orgView.org.getRegisterValues();
registerCount = registerNames == null ? 0 : registerNames.length;
}
else registerValues = null;
registerViewer.revalidate();
registerViewer.repaint();
}
COM: <s> this method refreshes this viewer </s>
|
funcom_train/48982756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String add() {
performValidateAdd();
forum = topic.getForum();
topic.setCreatedBy(getAuthenticatedUser());
if (!hasActionErrors()) {
Long result = topicRemote.add(topic);
if (result != null) {
return listByForum();
}
}
return listByForum();
}
COM: <s> add a new topic </s>
|
funcom_train/25838646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testByteToHexString() {
System.out.println("byteToHexString");
byte[] data = {0x00, 0x00, (byte) 0xff, 0x20};
String expResult = "0000FF20";
String result = Converter.byteToHexString(data);
assertEquals(expResult, result);
}
COM: <s> test of byte to hex string method of class com </s>
|
funcom_train/44163393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Element fountainOfYouth(DummyConnection connection, Element element) {
String migrants = element.getAttribute("migrants");
int n;
try {
n = Integer.parseInt(migrants);
} catch (NumberFormatException e) {
n = -1;
}
for (int i = 0; i < n; i++) {
AIMessage.askEmigrate(getAIPlayer(), 0);
}
return null;
}
COM: <s> replies to fountain of youth offer </s>
|
funcom_train/648705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save() throws IOException {
if (!dirty) {
return;
}
dirty = false;
File out = new File(PROPERTY_FILE_NAME);
FileOutputStream fout = new FileOutputStream(out);
String header = new String("RcpSudoku GUI Properties");
currentProperties.store(fout, header);
}
COM: <s> save the properties to the persistent file system if necessary </s>
|
funcom_train/18861383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createLabel(Composite parent, FormToolkit toolkit) {
Label label = null;
if (toolkit != null) {
label = toolkit.createLabel(parent, getLabelText(), SWT.NULL);
label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
} else {
label = new Label(parent, SWT.NONE);
label.setText(getLabelText());
}
}
COM: <s> creates the fields label </s>
|
funcom_train/28592234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemoveMaxHeap() {
addManyTestInt();
heap.remove(iTest[9]);
assertFalse(heap.contains(iTest[9]));
while (!heap.isEmpty()) {
assertNotSame(heap.getTop(), iTest[9]);
heap.removeTop();
}
}
COM: <s> removes an item from the max heap </s>
|
funcom_train/48217577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String handleFile(String text){
PrintWriter outputStream = null;
try{
outputStream = new PrintWriter(new FileWriter(fileName));
outputStream.print(text);
this.responseString = HTTPConstants.HTTPVersion + " " + HTTPConstants.OK_STATUS
+ " " + HTTPConstants.OK_STATUS_MSG + "\n" + HTTPConstants.RESPONSE_HEADER + text.length();
} catch(Exception e){
return HTTPConstants.FORBIDDEN_STATUS;
} finally{
if (outputStream != null){
try{
outputStream.close();
} catch (Exception e) {
return HTTPConstants.BAD_REQ_STATUS;
}
}
}
return HTTPConstants.OK_STATUS;
}
COM: <s> write to the file </s>
|
funcom_train/11088826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String installComponent(String file, Properties props, boolean deferException) throws Exception {
// TODO: handle deferException
try {
getInstallationService().install(file, props, deferException);
return ManagementSupport.createSuccessMessage("installComponent", file);
} catch (Exception e) {
throw ManagementSupport.failure("installComponent", file, e);
}
}
COM: <s> install a jbi component a service engine or binding component </s>
|
funcom_train/29538479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getBoardPanel() {
if (boardTab == null) {
boardTab = new BoardTab();
boardTab.setCommandDispatcher(commandDispatcher);
board.parseFibsBoard(fibsBoard7);
// board.setAcceptDeclineDouble();
// board.setYourTurnToRollOrDouble(true);
// board.setYouDouble(true);
boardTab.setBoard(board);
boardTab.yourMove(2);
boardTab.updateBoard();
}
return boardTab;
}
COM: <s> this method initializes board panel </s>
|
funcom_train/33852766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearDerefSet(ValueNumber value) {
if (UnconditionalValueDerefAnalysis.DEBUG) {
System.out.println("Clearing dereference of " + value + " for # " + System.identityHashCode(this));
}
valueNumbersUnconditionallyDereferenced.clear(value.getNumber());
derefLocationSetMap.remove(value);
}
COM: <s> clear the set of dereferences for given value number </s>
|
funcom_train/39025018 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getPrefix(String name) throws Exception {
String[] split = null;
split = name.split("\\."); // split the name at the literal dot
// if there are more or less than 2 elements, display an error
if (split.length != 2) {
throw new Exception("ImagesLoader getPrefix() invalid file name: " + name);
}
// return the file name without its extension
return split[0];
}
COM: <s> takes a string file name and returns the name of </s>
|
funcom_train/1650629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasLiveHandshake(long now) {
KeyAgreementSchemeContext c = null;
synchronized(this) {
c = ctx;
}
if(c != null && logMINOR)
Logger.minor(this, "Last used: " + (now - c.lastUsedTime()));
return !((c == null) || (now - c.lastUsedTime() > Node.HANDSHAKE_TIMEOUT));
}
COM: <s> does the node have a live handshake in progress </s>
|
funcom_train/41990538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize() {
// Only send if a connection is open
if (!isConnected()) return;
try {
synchronized(out) {
out.write(128); //Enter SAFE mode, enable interface
out.flush();
out.write(132); //Enter FULL mode, enable motors
out.flush();
}
} catch (IOException e) {
logger.warning("Failed to write initialization: " + e);
disconnect();
}
}
COM: <s> writes the necessary initialization string over serial to the robot </s>
|
funcom_train/11704732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String computeParentContextName(String aContextName) {
String nameWithoutSlash = aContextName.substring(0, aContextName.length() - 1);
int lastSlash = nameWithoutSlash.lastIndexOf('/');
if (lastSlash == -1) // root context
{
return null;
} else {
return aContextName.substring(0, lastSlash + 1);
}
}
COM: <s> get the name of the parent of the given context </s>
|
funcom_train/457831 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateEmptyProjectLegalTaskName() {
tester.startPage(EditProjectPage.class);
final FormTester formTester = tester.newFormTester(MARKUP_ID_FORM);
formTester.setValue(MARKUP_ID_PROJECT_NAME_TEXTFIELD, PROJECT_NAME_EMPTY);
formTester.setValue(MARKUP_ID_TASK_NAME, TASK_NAME_LEGAL);
formTester.submit(MARKUP_ID_TASK_SUBMIT_BUTTON);
assertTrue(formTester.getForm().hasError());
//final String[] message = {INFO_MESSAGE_EMPTY_PROJECT_NAME};
//tester.assertErrorMessages(message);
}
COM: <s> tests the basic creation of a new project empty project name submitted </s>
|
funcom_train/10787323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void tearDown() throws Exception {
try {
super.tearDown();
} finally {
for (EntityManagerFactory emf : emfs.values()) {
try {
// closeEMF() will also close any open/active EMs
closeEMF(emf);
emf = null;
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
COM: <s> closes any emfs created by get emf </s>
|
funcom_train/20401073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void stopStreamReadThread(AsyncStreamReader reader, long timeout) {
if (reader != null) {
reader.setRunning(false);
try {
reader.join(timeout); // give thread a chance to continue reading process output
} catch (InterruptedException e) {
log.error(e);
}
if (reader.isAlive()) {
reader.interrupt();
}
}
}
COM: <s> stops a stream reader thread </s>
|
funcom_train/5711957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetManufaturerC1() throws Exception{
RCapi capi = new RCapi();
String manufacturer = capi.getManufacturer(1);
assertNotNull("check existance of returned string", manufacturer);
assertTrue("check that the manufacturer is not empty", manufacturer.trim().length() != 0);
System.out.println("Manufacturer of Controller 1: " + manufacturer);
}
COM: <s> tests the retrieval of the manufacturer of the controller nr </s>
|
funcom_train/6441362 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void pleaseDontEnableOption(int optionID) throws IOException {
println("DONT "+optionID);
TelnetOption option = getOption(optionID);
if ( option.hasBeenNegotiated() ) return;
if ( !option.isInNegotiation() ) {
negotiateOption(WONT, optionID);
}
option.disable();
}
COM: <s> client says please dont enable option x </s>
|
funcom_train/22497805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void centerDialog(final Frame owner) {
final Dimension dlgSize = getPreferredSize();
final Dimension frmSize = owner.getSize();
final Point loc = owner.getLocation();
setLocation((frmSize.width - dlgSize.width) / 2 + loc.x, (frmSize.height - dlgSize.height) / 2 + loc.y);
}
COM: <s> center this dialog window relative to its owning code frame code </s>
|
funcom_train/41725446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void renderImpl(Graphics gc) {
int colorToRestore = gc.getColor();
gc.setColor(Portability.AQUA);
gc.fillRoundRect(1, 1, itemLayout.getTarget().getWidth()-2,
itemLayout.getTarget().getHeight()-2, 12, 12);
gc.setColor(colorToRestore);
super.renderImpl(gc);
}
COM: <s> method that implements drawable </s>
|
funcom_train/16094660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void registerBrowserService(BundleContext context) {
Dictionary<String, Object> props = new Hashtable<String, Object>();
props.put(Constants.SERVICE_VENDOR, RTBrowseUIActivator.PLUGIN_ID);
props.put(Constants.SERVICE_RANKING, Integer.MIN_VALUE);
context.registerService(IBrowserService.class.getName(), new BrowserServiceImpl(), props);
}
COM: <s> this registers the browser service in osgi </s>
|
funcom_train/10977691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getEnctype() {
if (this.enctype != null) {
return (this.enctype);
}
ValueBinding vb = getValueBinding("enctype");
if (vb != null) {
return ((String) vb.getValue(getFacesContext()));
} else {
return (null);
}
}
COM: <s> p return the encoding type for this form submit </s>
|
funcom_train/2580197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearRangeAxes() {
for (int i = 0; i < this.rangeAxes.size(); i++) {
ValueAxis axis = (ValueAxis) this.rangeAxes.get(i);
if (axis != null) {
axis.removeChangeListener(this);
}
}
this.rangeAxes.clear();
fireChangeEvent();
}
COM: <s> clears the range axes from the plot and sends a </s>
|
funcom_train/14396191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInput(boolean isInput) {
if (isInput) {
if(parameter.getDirection() == ParameterDirectionKind.OUT_LITERAL){
parameter.setDirection(ParameterDirectionKind.INOUT_LITERAL);
}
} else {
if(parameter.getDirection() == ParameterDirectionKind.IN_LITERAL){
parameter.setDirection(ParameterDirectionKind.OUT_LITERAL);
} else if(parameter.getDirection() == ParameterDirectionKind.INOUT_LITERAL){
parameter.setDirection(ParameterDirectionKind.OUT_LITERAL);
}
}
}
COM: <s> turns this parameters input capability on or off </s>
|
funcom_train/31561156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ConstantString WRITESEQF(ConstantString var, boolean append) throws MaverickException {
try {
file.writeBytes(var.toString());
file.writeBytes(ConstantString.LINE_SEPARATOR.toString());
//XXX should flush...
return ConstantString.RETURN_SUCCESS;
} catch (IOException ioe) {
throw new MaverickException(0, ioe);
}
}
COM: <s> write record and flush </s>
|
funcom_train/43213700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void add(BigHash h) {
// First entry doesn't need a new line character
if (this.sbuffer.length() == 0) {
this.sbuffer.append(h.toString());
} // Every entry but first needs a new line
else {
this.sbuffer.append(h.toString());
}
}
COM: <s> append big hash to end of partition </s>
|
funcom_train/3414728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void delayedExecute(RunnableScheduledFuture<?> task) {
if (isShutdown())
reject(task);
else {
super.getQueue().add(task);
if (isShutdown() &&
!canRunInCurrentRunState(task.isPeriodic()) &&
remove(task))
task.cancel(false);
else
prestartCoreThread();
}
}
COM: <s> main execution method for delayed or periodic tasks </s>
|
funcom_train/1482287 | /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 instanceof DisjunctionMaxQuery) ) return false;
DisjunctionMaxQuery other = (DisjunctionMaxQuery)o;
return this.getBoost() == other.getBoost()
&& this.tieBreakerMultiplier == other.tieBreakerMultiplier
&& this.disjuncts.equals(other.disjuncts);
}
COM: <s> return true iff we represent the same query as o </s>
|
funcom_train/9663938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removeGridPanelSubtree(GridPanel panel) {
remove(panel.getParent());
for (GridPanel gridPanel : panel.getChildGridPanels())
removeGridPanelSubtree(gridPanel);
this.gridPanels.removeAll(panel.getChildGridPanels());
panel.getChildGridPanels().clear();
}
COM: <s> this method removes the subtree of panel grids specified by the root panel </s>
|
funcom_train/33660393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addParam(String name, InputStream stream, String contentType, String filename) {
if (this.method != HttpMethod.POST)
throw new IllegalStateException("May only add binary attachment to POST, not to " + this.method);
this.params.put(name, new BinaryAttachment(stream, contentType, filename));
this.hasBinaryAttachments = true;
}
COM: <s> adds a binary attachment </s>
|
funcom_train/42953907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPrimitiveType() {
switch (this.fldType) {
case FIELD_GPS_POINT_1:
return PRIMITIVE_GPS;
case FIELD_GPS_POINT_2:
return PRIMITIVE_GPS;
case FIELD_STRING:
return PRIMITIVE_STRING;
case FIELD_BINARY:
return PRIMITIVE_BINARY;
default:
return PRIMITIVE_LONG;
}
}
COM: <s> gets the primitive type of the field </s>
|
funcom_train/824433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createInternalSubset(String content) {
if ((content.length() > 0) && (content.indexOf("[") > 0)) {
int firstIndex = content.indexOf("[");
int lastIndex = content.lastIndexOf("]");
internalSubset = content.substring(
firstIndex + 1,
lastIndex
);
}
}
COM: <s> patch by jarle h </s>
|
funcom_train/5262862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel1() {
if (jPanel1 == null) {
GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
gridBagConstraints1.fill = GridBagConstraints.BOTH;
gridBagConstraints1.weighty = 1.0;
gridBagConstraints1.weightx = 1.0;
jPanel1 = new JPanel();
jPanel1.setLayout(new GridBagLayout());
jPanel1.add(getJSplitPane11(), gridBagConstraints1);
}
return jPanel1;
}
COM: <s> this method initializes j panel1 </s>
|
funcom_train/25968045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DocumentBuilder getNewDocomentBuilder() throws ParserConfigurationException {
// get an instance of factory
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
// df.setValidating(true);
// df.setNamespaceAware(true);
// XMLErrorHandler errorHandler = new XMLErrorHandler();
// db.setErrorHandler(errorHandler);
// get an instance of builder
DocumentBuilder db = dbf.newDocumentBuilder();
return db;
// create an instance of DOM
//return db.newDocument();
}
COM: <s> rerutns a singleton of a dom document </s>
|
funcom_train/35844322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JComponent getTypeSelector() {
if (typeSelector == null) {
typeSelector = new Box(BoxLayout.X_AXIS);
typeSelector.add(new UMLComboBoxNavigator(
Translator.localize("label.type.navigate.tooltip"),
new UMLComboBox2(
new UMLTaggedValueTypeComboBoxModel(),
new ActionSetTaggedValueType())
));
}
return typeSelector;
}
COM: <s> returns the type selector </s>
|
funcom_train/51572607 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // private boolean isInNestedArchive(File file) {
// String path = file.getPath();
// int ndx = path.indexOf(ARCHIVE_SEPARATOR);
// int nextNdx = -1;
// if (ndx != -1) {
// nextNdx = path.indexOf(ARCHIVE_SEPARATOR, ndx);
// }
// return nextNdx != -1;
// }
COM: <s> whether code file code is contained in an archive which is itself </s>
|
funcom_train/43902757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ContentState getState(Transaction transaction) {
if (state.containsKey(transaction)) {
return (ContentState) state.get(transaction);
} else {
ContentState auto = (ContentState) state.get(Transaction.AUTO_COMMIT);
ContentState copy = (ContentState) auto.copy();
state.put(transaction, copy);
return copy;
}
}
COM: <s> returns state for the entry for a particular transaction </s>
|
funcom_train/20828909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void popState() {
if (stateStack.size() == 0) {
printLinePos();
}
int nextState = ((Integer) stateStack.pop()).intValue();
// System.err.println("pop "+nextState); printLinePos();
if(nextState == PARENMARKER)
printLinePos();
SwitchTo(nextState);
}
COM: <s> pop the state on the state stack and switch to that state </s>
|
funcom_train/19274619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireChangeEvent(UITableModelEvent event) {
for (int i = 0; i < this.listeners.size(); i++) {
UITableModelListener listener = this.listeners.get(i);
try {
listener.tableModelChanged(event);
} catch (Throwable t) {
handleListenerException(listener, t);
}
}
}
COM: <s> this method sends the given event to all </s>
|
funcom_train/625786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setServices(final String[] s) {
if (getMyState() == INIT) {
setMyState(INITC);
} else if (getMyState() == INITB) {
setMyState(EXECUTE);
} else if (getMyState() == DONE) {
setMyState(EXECUTE);
}
services = s;
}
COM: <s> this functions specifies the services to be executed </s>
|
funcom_train/7669784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getDurationMillis(long maxWaitMillis) {
synchronized (this) {
if (! completed) {
try {
wait(maxWaitMillis);
} catch (InterruptedException ex) {
// Ignore it.
}
if (! completed) {
Assert.fail("parker hanging");
}
}
return endMillis - startMillis;
}
}
COM: <s> wait for the test to complete and return the duration </s>
|
funcom_train/33948080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRegionDepicts(SelectionRegion region, Resource instance) {
HashSet aSet = (HashSet)getRegionDepictsTable().get(region);
if (aSet == null) {
aSet = new HashSet();
getRegionDepictsTable().put(region,aSet);
}
aSet.add(instance);
}
COM: <s> associates an instance with a region </s>
|
funcom_train/42201072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void runErrorHandler(int code, PrintWriter out, String url, OutputStream os) {
if (parent.errorHandler == null)
sendHTTP(out, code);
else
parent.errorHandler.action("error", inet, Integer.toString(code) + ";" + url, out, os);
}
COM: <s> runs the error handler </s>
|
funcom_train/22233821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getReverbCoefficient() {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_REVERB_COEFFICIENT_READ))
throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes25"));
return ((AuralAttributesRetained)this.retained).getReverbCoefficient();
}
COM: <s> retrieve reverb coefficient </s>
|
funcom_train/32080309 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setText (String string) {
checkWidget ();
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
if ((style & SWT.ON_TOP) != 0) return;
int strPtr = createDotNetString (string, false);
int shellHandle = topHandle ();
OS.Window_Title (shellHandle, strPtr);
OS.GCHandle_Free (strPtr);
}
COM: <s> sets the receivers text which is the string that the </s>
|
funcom_train/37764140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateTransactionStatusToInProcess(String id) throws FrameworkException, ApplicationExceptions {
UOW uow = null;
try {
uow = new UOW();
updateTransactionStatusToInProcess(uow, id);
uow.commit();
} catch (Exception e) {
throw ExceptionHelper.throwAFR(e);
} finally {
if (uow != null)
uow.rollback();
}
}
COM: <s> retrieves the transaction and update its status to i </s>
|
funcom_train/4557849 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSignUpTickOffHidePassword() {
repEng.newStep("308", "Sign up-Tick off Hide password");
//1. Launch http://hobbes.ontometrics.com/magnetportal/
//2. Click the Manage You Assets link.
//3. Click the Publish Magnet link in the Albums/Tracks page.
//4. Click the cart icon.
//5. Click Sign up button.
//6. Fill in password, and tick off Hide password.
// The filled password is displayed in the textbox.
}
COM: <s> 308 sign up tick off hide password </s>
|
funcom_train/50370063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LdasAndEprs removeSms(String DSmsId) throws Exception {
logger.trace("Calling catalogue service at: " + getEPR().getAddress().getStringValue());
Catalogue cat = makeProxy(Catalogue.class);
RemoveSmsDocument in = RemoveSmsDocument.Factory.newInstance();
in.setRemoveSms(DSmsId);
RemoveSmsResponse resp = cat.RemoveSms(in).getRemoveSmsResponse();
return new LdasAndEprs(resp.getLdas(), resp.getFactories());
}
COM: <s> removes a d sms </s>
|
funcom_train/10801770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getDataCacheTimeout() {
if (_cacheTimeout == Integer.MIN_VALUE) {
if (_super != null)
_cacheTimeout = getPCSuperclassMetaData().
getDataCacheTimeout();
else
_cacheTimeout = _repos.getConfiguration().
getDataCacheTimeout();
}
return _cacheTimeout;
}
COM: <s> the cache timeout for this class </s>
|
funcom_train/40690617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testReplaceValue() {
Jsr166HashMap map = map5();
assertEquals("A", map.get(one));
assertFalse(map.replace(one, "Z", "Z"));
assertEquals("A", map.get(one));
}
COM: <s> replace value fails when the given key not mapped to expected value </s>
|
funcom_train/46265061 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testToString() throws AssertionFailedException {
System.out.println("toString");
Date instance = new Date(cal.getTime());
String expResult_1 = dateString;
String result_1 = instance.toString();
assertEquals(expResult_1, result_1);
}
COM: <s> test of test to string method of class date </s>
|
funcom_train/18726165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateCurrentModeText() {
final String noControl = LANGUAGE.value("mode_none");
final String currentModeText = LANGUAGE.value(currentModeKey);
controlFlag.setText(("".equals(currentModeText)) ? noControl
: LANGUAGE
.message("mode%0", currentModeText));
}
COM: <s> sets the current mode in the flag panel </s>
|
funcom_train/5578264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawCard() {
if (playerhaspicked)
skipTurn();
else {
Zone from = game.getZones().get("Stock");
Zone to = player.getZones().get("Hand");
ActionPick action = new ActionPick();
try {
action.playerActed(new ActionEvent(game, player, from, to,
null));
game.registerAction(action);
} catch (ActionException e) {
// there shouldn't be any problem here !
e.printStackTrace();
}
}
deck.repaint();
}
COM: <s> action made when we draw a card </s>
|
funcom_train/39534791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateMenuItems(){
final SVGHandle handle=
Editor.getEditor().getHandlesManager().getCurrentHandle();
if(handle==null || handle.getSelection()==null ||
(handle.getSelection()!=null &&
handle.getSelection().isSelectionLocked())){
setItemsEnabled(false);
}else{
//getting the selected elements
Set<Element> selectedElements=
handle.getSelection().getSelectedElements();
handleItemsState(handle, selectedElements);
}
}
COM: <s> updates all the menu items </s>
|
funcom_train/48558588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand4() {
if (okCommand4 == null) {//GEN-END:|237-getter|0|237-preInit
okCommand4 = new Command("OK", Command.OK, 0);//GEN-LINE:|237-getter|1|237-postInit
}//GEN-BEGIN:|237-getter|2|
return okCommand4;
}
COM: <s> returns an initiliazed instance of ok command4 component </s>
|
funcom_train/653684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addFo(FileObject fo) {
if (fo.isFolder()) {
FileObject childs[] = fo.getChildren();
for (int i = 0 ; i < childs.length ; i++) {
addFo(childs[i]);
}
} else if (fo.getExt().equals("java")) {
keys.add(fo);
}
}
COM: <s> add all children to the keys </s>
|
funcom_train/3273184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setCurrentShipActions(int currentTime){
Action nextAction = null;
Ship nextShip = null;
// Set the executing Action for each Ship if
// the Ship should be executing an Action at
// the specified moment.
for(ListIterator actions = actionQueue.listIterator(); actions.hasNext();){
// Get the next Action that needs to be calculated.
nextAction = ((Action) actions.next());
if(nextAction.isExecuting(currentTime)){
nextShip = nextAction.ship();
nextShip.setAction(nextAction);
}
}
}
COM: <s> for each action in the action list if the </s>
|
funcom_train/2731433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TupleValue visit(TupleTerm tuple) {
logger.debug("<TupleTerm>");
List<Value> result = new ArrayList<Value>();
if (tuple != null) {
List<?> termList = tuple.getTerms();
for (Object o : termList) {
Term term = MDRConnector.toTerm(o);
Value newValue = visit(term);
result.add(newValue);
}
}
logger.debug("<Value>" + result + "</Value>");
logger.debug("</TupleTerm>");
return new TupleValue(result);
}
COM: <s> evaluates a tuple term </s>
|
funcom_train/49791425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExpected() throws Exception {
TranslateHTMLToLatex c = AllExpectedTests.getConverter();
String inputText = TranslateHTMLToLatex.readFile(getInputFile());
assertNotNull(inputText);
String outputText = TranslateHTMLToLatex.readFile(getExpectedFile());
assertNotNull(outputText);
// replace \r\n with \n
outputText = outputText.replace("\r\n", "\n");
String result = c.convertToTex(getInputFile());
assertStringEquals(outputText, result);
}
COM: <s> test that testcase ext after cleaning equals testcase expected ext exactly </s>
|
funcom_train/48147347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deal(int n){
for (int i = 0; i < 52; i++) deck[i] = i;
int k, u, temp;
//Deal Cards
for (int i = 0; i < n; i++){
k = 52 - i;
u = (int)(Math.random() * k);
card[i].setScore(deck[u]);
temp = deck[k - 1];
deck[k - 1] = deck[u];
deck[u] = temp;
}
}
COM: <s> this method deals n cards </s>
|
funcom_train/7589400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUpperBound(double upperBound) throws JMException {
Class cls = java.lang.String.class;
String name = cls.getName();
Configuration.logger_.severe("Class " + name +
" does not implement method setUpperBound()");
throw new JMException("Exception in " + name + ".setUpperBound()") ;
} // setUpperBound
COM: <s> sets the upper bound for a variable </s>
|
funcom_train/34283815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(long starts, long ends) {
if (Start >= starts) {
if (End <= ends) {
return String.format("%d-%d", Start/1000, End/1000);
} else {
return String.format("%d-%d", Start/1000, ends/1000);
}
} else {
if (End <= ends) {
return String.format("%d-%d", starts/1000, End/1000);
} else {
return null;
}
}
}
COM: <s> represent time interval as string of decimal numbers </s>
|
funcom_train/25647746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void visitState(State state) {
if (!visitedStates.contains(state)) {
visitedStates.add(state);
Iterator<Transition> outboundTransitions = getOutboundTransitions(state);
if (outboundTransitions != null && outboundTransitions.hasNext()) {
stack.push(outboundTransitions);
}
}
}
COM: <s> pushes an iterator of the specified states outgoing transitions on </s>
|
funcom_train/1909910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setStartSymbol(String newStartSymbol){
Rule rule;
for (Rule rule1 : rules) {
rule = rule1;
if (rule.getLHS().getSymbolString().equals(newStartSymbol)) {
startSymbol_index = rules.indexOf(rule);
genotype2Phenotype();// Update phenotype.
return true;
}
}
return false;
}
COM: <s> change start symbol by string </s>
|
funcom_train/39537572 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected RealTimeDataProvider getRealTimeDataProvider(String id) {
RealTimeDataProvider realTimeDataProvider=realTimeDataProviders.get(id);
//if no rtdp has been found, a test simulator or a regular simulator is used
if(realTimeDataProvider==null){
if(isTestVersion){
realTimeDataProvider=rtdpTestSimulator;
}else{
//creating the new data provider
realTimeDataProvider=new ServerRealTimeDataProvider(this, id);
realTimeDataProviders.put(id, realTimeDataProvider);
}
}
return realTimeDataProvider;
}
COM: <s> returns the data provider linked with the given name </s>
|
funcom_train/44491038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Resource createResource(String resourceName) throws NameNotUniqueException {
if (this.resourcesByAlias.containsKey(resourceName)) {
throw new NameNotUniqueException(resourceName);
}
String resId = generateResourceId();
Resource res = new ResourceBase(resId, resourceName, this);
resourcesByAlias.put(resourceName, res);
resourcesById.put(res);
objectsById.put(res);
return res;
}
COM: <s> creates a new resource instance with the specified name </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.