__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/5165500 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void leftButtonPressed() {
int[] indices = m_outList.getSelectedIndices();
for (int i = 0; i < indices.length; i++) {
String removed = (String) m_outListModel.remove(indices[0]);
m_listModel.addElement(removed);
}
}
COM: <s> move selected items from the output list back to the list </s>
|
funcom_train/42134885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean createDataDir() {
File dir = new File(directory);
if (!dir.exists()) {
dir.mkdirs();
}
if (qNeedToMkdir && !dir.exists()) {
logger.error("Record_Archive_Manager::createDataDir:"
+ "mkdir failed: " + directory);
} else {
qNeedToMkdir = false;
}
return (!qNeedToMkdir);
}
COM: <s> creates the data directory </s>
|
funcom_train/3337655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected InputStream openFileRead(File file) {
try {
if (file == null || !file.exists()) {
error(err_file_not_exist + file);
return null;
}
return new FileInputStream(file);
} catch (IOException ioe) {
error(err_stream_create + file);
return null;
}
}
COM: <s> opens a file input stream on a file </s>
|
funcom_train/11728676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetNode() throws RepositoryException, NotExecutableException {
if (!multiple) {
// not testable since format of ID is implementation specific
} else {
try {
prop.getNode();
fail("Property.getNode() called on a multivalue property " +
"should throw a ValueFormatException.");
} catch (ValueFormatException vfe) {
// ok
}
}
}
COM: <s> tests the conversion from binary type to reference or path type </s>
|
funcom_train/5790214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkOpen() throws IOException {
synchronized (stateLock) {
if (aborted) {
throw new IOException("request aborted");
}
switch (outState) {
case OPEN:
return;
case CLOSED:
throw new IOException("stream closed");
case INVALID:
/*
* XXX temporary hack to get around current hotspot bug
* which prevents testing of HTTPS provider. Remove
* following if clause once hotspot issues are
* resolved.
*/
if (outException == null) {
outException = new IOException("stream invalid");
}
throw outException;
}
outState = OPEN;
}
try {
startOutput();
} catch (Throwable th) {
invalidate(th);
}
}
COM: <s> checks to make sure stream is open and start output has been called </s>
|
funcom_train/48931668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void playFromTo(long uStart, long uEnd){
float f = (uStart*bytesSec)/1000000.f;
int start = (int) f;
f = (uEnd*bytesSec)/1000000.f;
int end = (int) f;
if(end%frameSize!=0){
int pEnd = end;
end-=end%frameSize;
System.err.println("Warning, the end offset time needs to match an integral frame size. Old value: "+pEnd+" New value: "+ end);
}
this.play(start,end);
}
COM: <s> play a sound between two time positions </s>
|
funcom_train/5451890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkVarTypeValidity (int RowNo) {
int ColNo = Params.getColumnModel().getColumnIndex (TypeColID);
if (Params.getModel().getValueAt (RowNo, ColNo) == null)
return false;
if (Params.getModel().getValueAt (RowNo, ColNo).toString().length() == 0)
return false;
return true;
}
COM: <s> checks if the type is specified for a certain variable </s>
|
funcom_train/11024491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testArrayIndexedWriteMethod() {
try {
IndexedPropertyDescriptor descriptor =
(IndexedPropertyDescriptor)propertyUtilsBean.getPropertyDescriptor(bean, "stringArray");
assertNotNull("No Array Indexed Write Method", descriptor.getIndexedWriteMethod());
} catch(Exception e) {
fail("Threw exception " + e);
}
}
COM: <s> test indexed write method for an array </s>
|
funcom_train/42784836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shutdown() {
try {
logger.info("Begining shutdown...");
model.getTimeManager().disableTimeRegulation();
model.getTimeManager().disableTimeConstrained();
if (props.getProperty("AUTO_RESIGN").equalsIgnoreCase("YES")) {
resignFederation();
}
if (props.getProperty("AUTO_DESTROY_FEDEX").equalsIgnoreCase("YES")) {
destroyFederation();
}
} catch (Exception e) {
}
disconnect();
exit();
}
COM: <s> template method for application termination </s>
|
funcom_train/38878732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void launchShakeFeedback() {
Notifier not;
if (Preferences.getBoolean("vibrateShake")) {
not = new VibratorNotifier(context);
not.notify(actualEvents);
}
if (Preferences.getBoolean("voiceShake")) {
not = new VoiceNotifier(context);
not.setDescriptions(new String[]{"calls","S M S","email"});
not.notify(actualEvents);
}
// TODO enable condition for other feedback methods
}
COM: <s> launches notifications when shake is detected </s>
|
funcom_train/45248919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void register(IAction action) {
Assert.isNotNull(action, "Action must not be null"); //$NON-NLS-1$
String id = action.getId();
Assert.isNotNull(id, "Action must not have null id"); //$NON-NLS-1$
getActionBarConfigurer().registerGlobalAction(action);
actions.put(id, action);
}
COM: <s> registers the given action with the key binding service </s>
|
funcom_train/3119199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void basicAdd(int index, Page page) {
DamaskUtils.checkValidArgument(
page.getDialog() == this,
page + "'s dialog should be " + page.getDialog());
pages.add(page.getDeviceType(), index, page);
fireElementAdded(index, page);
}
COM: <s> adds the given page to this dialog at the given position </s>
|
funcom_train/20129089 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAutoIncremented(String column) throws SQLException {
if (index.containsKey(column)) {
return autoInc[index.get(column).intValue()];
} else {
final SqlExceptionState state = SqlExceptionState.COLUMN_NOT_FOUND;
throw new SQLException("Column " + column + " does not exist in resultset.", state.name(), state.code());
}
}
COM: <s> indicates whether the designated numeric column is automatically incremented </s>
|
funcom_train/3340136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void blankBox(Point origin_, Dimension size_, int colorpair_) {
blankBoxNative(origin_.x, origin_.y,
origin_.x + size_.width - 1,
origin_.y + size_.height - 1,
colorpair_);
}
COM: <s> blank out a box using the specified color pair </s>
|
funcom_train/12071461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
if (isSingle()) return ta.toString(); //base case
String lts = locTypeToString();
ArgLoc fst = (ArgLoc) locs.get(0);
String result = fst.toString();
for (int i=1; i < locs.size(); i++) {
ArgLoc loc = (ArgLoc) locs.get(i);
result += lts + loc.toString(); //recursive call to elements in list
}
return result;
}
COM: <s> create a string representation of the argument location </s>
|
funcom_train/42188384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JList getJList() {
if (jList == null) {
jList = new JList();
jList.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
public void valueChanged(javax.swing.event.ListSelectionEvent e) {
String harvestName = (String) jList.getSelectedValue();
MyHarvest myHarvest = harvestService
.getMyHarvest(harvestName);
showGains(myHarvest, selectedChart);
}
});
}
return jList;
}
COM: <s> this method initializes j list </s>
|
funcom_train/46152744 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addEventHandler (EventHandler eventHandler) {
EventListener eventListener = eventHandlerToListener.get(eventHandler);
if (eventListener != null) return;
eventListener = new JothUtilEventListener(eventHandler);
eventHandlerToListener.put(eventHandler, eventListener);
eventListener.addToEntity(rootEntity);
}
COM: <s> add the given event handler to the cell </s>
|
funcom_train/23703957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getWaitClassId10g1(long eventId) {
double value = 0;
try {
AshWaitClass10g1 ashWaitClass10g1 = dao.getEventIdWaitClass10g1()
.get(eventId);
if (ashWaitClass10g1 != null) {
value = ashWaitClass10g1.getValueWaitClassId();
} else {
value = 0;
}
} catch (DatabaseException e) {
// TODO Auto-generated catch block
value = 0;
e.printStackTrace();
}
return value;
}
COM: <s> gets the wait class id value from local bdb </s>
|
funcom_train/28973219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void storeMetaData(BinBaseExperimentImportSample samples[]) {
SetupXProvider provider = SetupXFactory.newInstance().createProvider();
UpdateBinBase binbase = new UpdateBinBase();
binbase.setConnection(this.getConnection());
binbase.setRegenerateSampleMetaInfos(true);
for (BinBaseExperimentImportSample sample : samples) {
storeSingleMetadata(provider, binbase, sample);
}
}
COM: <s> store related metadata into the database </s>
|
funcom_train/10588367 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Configuration getConfiguration() throws SAXException, ConfigurationException {
if (this.conf == null) return null;
InterpolatingConfigurationHandler handler = new InterpolatingConfigurationHandler(this.vars, this.conf.getLocation());
DefaultConfigurationSerializer ser = new DefaultConfigurationSerializer();
ser.serialize(handler, this.conf);
return handler.getConfiguration();
}
COM: <s> get a generated configuration with interpolated variable values </s>
|
funcom_train/375413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTwoNamesAndTwoVariables() {
ConfigString string =
new ConfigString("${jnp}.${name}_${company} ${name}", variables, properties);
assertTrue("sub failed in expand", string.expand("mark", variables));
assertEquals(JNP + ".mark_" + COMPANY + " mark", string.toString());
string.reset(); // Reintialize
}
COM: <s> test two names and two variables </s>
|
funcom_train/46195861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String readInput() {
StringBuffer sb = new StringBuffer();
try {
byte[] bytes = new byte[this.in.available()];
this.in.read(bytes);
for (byte b : bytes) {
sb.append((char) b);
}
} catch (Exception e) {
System.err.println("Warning: Could not read the input from the telnet session");
}
return sb.toString();
}
COM: <s> read the input buffer </s>
|
funcom_train/6514722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getActionName(WebContext context) {
HttpServletRequest req = context.getRequest();
StringTokenizer st = new StringTokenizer(
req.getParameter("al"), ","
);
while (st.hasMoreTokens()) {
String actionName = st.nextToken();
if (req.getParameter(actionName) != null) {
return actionName;
}
}
return null; // no action name found
}
COM: <s> a convenience method which will return </s>
|
funcom_train/39467101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void manageBookmarks() {
final JFrame f = new JFrame(ACTION_BUILDER.getString("manageBookmarks_shortdescription"));
f.getContentPane().add(createBookmarkControlPanel());
//f.getContentPane().add(new JScrollPane(new JTree(bookmarks)));
f.pack();
f.setVisible(true);
}
COM: <s> action for managing the bookmarks </s>
|
funcom_train/20139143 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Knob addKnob(final String theName, final float theMin, final float theMax, final int theX, final int theY, final int theDiameter) {
return addKnob(theName, theMin, theMax, theMin, theX, theY, theDiameter);
}
COM: <s> add a knob to your control p5 setup </s>
|
funcom_train/13717557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetReferenceId() {
System.out.println("testGetReferenceId");
Assert.assertEquals(mrSmall1.getReferenceId(), 0);
Assert.assertEquals(mrSmall2.getReferenceId(), 1);
Assert.assertEquals(mrInsideSmallOutside.getReferenceId(), 2);
Assert.assertEquals(mrSmallOutside.getReferenceId(), 123);
}
COM: <s> test of get reference id method of class be </s>
|
funcom_train/25788080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParameters(Properties parameters) {
final Enumeration<?> names = parameters.propertyNames();
while (names.hasMoreElements()) {
final String name = (String) names.nextElement();
getContext().getParameters()
.add(name, parameters.getProperty(name));
}
}
COM: <s> sets parameters on the server </s>
|
funcom_train/3506681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(TreeNode aChild) {
if (aChild == null) {
throw new IllegalArgumentException("argument is null");
}
if (!isNodeChild(aChild)) {
throw new IllegalArgumentException("argument is not a child");
}
remove(getIndex(aChild)); // linear search
}
COM: <s> removes code a child code from this nodes child array giving it a </s>
|
funcom_train/40505636 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Mass getMass(Element e) {
String id = e.getAttribute("id");
double x = Double.parseDouble(e.getAttribute("x"));
double y = Double.parseDouble(e.getAttribute("y"));
double weight = Integer.parseInt(e.getAttribute("weight"));
Mass mass = new Mass(new Point2D.Double(x,y), new Dimension(SIZE,SIZE), Color.GREEN, weight, 0);
map.put(id, mass);
return mass;
}
COM: <s> get the mass object from an xml tree element </s>
|
funcom_train/25316678 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawGear(Gear gear) {
MusicGameImage gearImage = new MusicGameImage(ImageLoader.loadScaledImage("cannonMode/CannonCogWheel.png", gear.getWidth()), gear.getX(), gear.getY());
gearImage.setRotation(gear.getRotation());
images.add(gearImage);
}
COM: <s> draws the gear according to its rotation </s>
|
funcom_train/44705110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateMasterObject() {
DataQuery dq = SessionManager.getSession().retrieveQuery(QUERY_TOP_ITEMS);
ItemCollection c = new ItemCollection
(new DataQueryDataCollectionAdapter(dq, QUERY_ITEM));
while (c.next()) {
ContentItem item = c.getContentItem();
item.autoPropagateMaster(item);
}
c.close();
}
COM: <s> update the master object for all the content items by assuming </s>
|
funcom_train/3619391 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addActorPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_UseCase_actor_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_UseCase_actor_feature", "_UI_UseCase_type"),
EclipsesrsPackage.Literals.USE_CASE__ACTOR,
true,
false,
false,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the actor feature </s>
|
funcom_train/32112129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getShininess() {
//TODO documentation
// check if we are rendering
if(selectedSubmesh == null) {
throw new IllegalStateException("beginRendering must be called " +
"before \"getShininess\"");
}
// get the core material
CoreMaterial coreMaterial;
coreMaterial = model.getCoreModel().getCoreMaterial(selectedSubmesh.getCoreMaterialId());
if(coreMaterial == null) {
return 50.0f;
}
// get the diffuse color of the material
return coreMaterial.getShininess();
}
COM: <s> returns the shininess factor </s>
|
funcom_train/8008661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String formatTime(int minutes) {
int hour = minutes / 60;
int remainder = minutes % 60;
// Convert 0-based 24-hour sequence into 1-based 12-hour sequence.
int h = ((hour + 12 - 1) % 12) + 1;
String result = String.valueOf(h) + ":" + _formatMinutes.format(remainder);
if (hour >= 12)
result += " PM";
else
result += " AM";
return result;
}
COM: <s> returns a formatted time for the specified minutes </s>
|
funcom_train/20804043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resize(int newSize) throws IOException {
if (this.byteBuffer != null) {
this.byteBuffer.force();
}
this.trieFile.setLength(newSize * 8);
FileChannel indexChannel = this.trieFile.getChannel();
this.byteBuffer = indexChannel.map(FileChannel.MapMode.READ_WRITE, 0, newSize * 8);
this.trieDataBuffer = this.byteBuffer.asIntBuffer();
}
COM: <s> increases the size of the trie data file </s>
|
funcom_train/37597949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBackground(String backgroundColor) throws ConfigurationException {
PropertiesConfiguration config = new PropertiesConfiguration();
config.load(PROPERTIES_FILE_NAME);
if (backgroundColor == null) {
config.setProperty("colors.background", "#000000");
} else {
config.setProperty("colors.background", backgroundColor);
}
config.save(PROPERTIES_FILE_NAME);
}
COM: <s> p sets a property called code colors </s>
|
funcom_train/44152550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNumberOfFailures(int n) {
if (n < 0) {
throw new IllegalArgumentException("number of failures must be "
+ "non-negative.");
}
numberOfFailures = n;
domainLowerBound = Math.max(0, sampleSize - numberOfFailures);
domainUpperBound = Math.min(sampleSize, numberOfSuccesses);
}
COM: <s> modify the number of failures </s>
|
funcom_train/25191896 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EventSubscriber (Event event) {
subscriber = new BasicSubscriber ("EventListener-"+event.getType ());
subscriber.addPublicationListener (new MessageListener () {
public void messageAdded (Message msg) {
processMessage (msg);
}
});
Advertisement ad = new EventAdvertisement (event);
logger.info ("Listener Advertisement: "+ad);
subscriber.registerSubscriber (ad);
}
COM: <s> constructor that uses an event object as a template to dynamically </s>
|
funcom_train/12160546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dispose() {
super.dispose();
for (Iterator it = imageCache.values().iterator(); it.hasNext();) {
Image image = (Image) it.next();
if (image != null) {
image.dispose();
}
}
imageCache.clear();
}
COM: <s> disposes of the images in the image cache </s>
|
funcom_train/1169720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JLabel getJLabel1() {
if (jLabelBlack == null) {
jLabelBlack = new JLabel();
jLabelBlack.setText("Black:");
jLabelBlack.setPreferredSize(new java.awt.Dimension(105, 12));
jLabelBlack.setLayout(null);
jLabelBlack.setBounds(10, 28, 127, 13);
}
return jLabelBlack;
}
COM: <s> p getter for the field code j label1 code </s>
|
funcom_train/1082206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fillData (boolean field[][], int row, int col) {
try {
for (int i = 0 ; i<cells.length ; i++)
for (int j = 0; j<cells[i].length ; j++)
field[row+i][col+j] = cells[i][j].getState(maxGen);
}
catch (NotReady e) { throw new java.lang.Error(); }
}
COM: <s> used to gather the results achieved by the worker </s>
|
funcom_train/9388290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dumpHprof() {
try {
String file = "/sdcard/" + mClientData.getClientDescription().replaceAll("\\:.*", "") +
".hprof";
HandleHeap.sendHPDU(this, file);
} catch (IOException e) {
Log.w("ddms", "Send of HPDU message failed");
// ignore
}
}
COM: <s> makes the vm dump an hprof file </s>
|
funcom_train/16317559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean run() {
if (! processCommandLine(args)) {
options.help();
return false;
}
if (! connectToDatabase()) {
return false;
}
try {
run(this, options.nonOptions);
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
COM: <s> runs the application </s>
|
funcom_train/13890096 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String ret = "TurnTest "+ FileUtil.createFilePath(dirPath, testName);
if (verboseLog) {
ret += "\n\tstartData: "+startData;
ret += "\n\texpected data: "+ expectedData;
ret += "\n\tactual data: "+actualData;
ret += "\n\ttest point: "+currentPoint+"\n";
}
return ret;
}
COM: <s> returns a string report of the status of the turn test object </s>
|
funcom_train/25732091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addCategory(String key) {
/*
* Se è già esistente l'element img, aggiungo il tag e basta, altrimenti
* prima lo creo e poi aggiungo il tag
*/
Document xmlDoc = DomXml.instance().getXmlDoc();
createImageElement();
if (exists(key, ElementType.Category))
return false;
Element cat;
cat = xmlDoc.createElement("category");
cat.setAttribute("name", key);
e.appendChild(cat);
return true;
}
COM: <s> adds the category </s>
|
funcom_train/13917252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public Integer getPK(Object[] pInputRecords) throws KETLTransformException {
// lookup value in index
Integer res;
try {
res = this.getSurrogateKey(pInputRecords);
} catch (Error e) {
throw new KETLTransformException(e.getMessage());
}
// if not found then create new value in index
if (res == null && this.mAllowInsert)
return this.createNewSurrogateKey(pInputRecords);
return res;
}
COM: <s> gets the pk </s>
|
funcom_train/2727558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTest(final TestEntity test) {
//FIXME use test holder for this...
this.questionsCount = new LockedPersistenceRunner<Integer>(persistence) {
@Override
protected Integer inLockedPersistence(PersistenceManager persistence) {
final TestEntity fetchedTest = persistence.getEntityById(test.getClass(), test.getId());
return fetchedTest.getQuestionsCount();
}
}.run();
}
COM: <s> todo very very bad code </s>
|
funcom_train/17766170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isMatchedBy(List<QName> probeTypes, WsDiscoveryScopesType probeScopes, MatchBy defaultMatcher) {
MatchBy m = defaultMatcher;
if (probeScopes != null)
m = probeScopes.getMatchBy();
if (m == null)
return false;
return m.match(this, probeTypes, probeScopes);
}
COM: <s> decide whether the given port types and scopes match this service </s>
|
funcom_train/8075056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
AffineMetric metric = new AffineMetric();
metric.setNormalized(m_normalized);
metric.setMatchCost(m_matchCost);
metric.setSubCost(m_subCost);
metric.setGapStartCost(m_gapStartCost);
metric.setGapExtendCost(m_gapExtendCost);
return metric;
}
COM: <s> create a copy of this metric </s>
|
funcom_train/3465403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void keyReleased(KeyEvent e) {
if (e.getKeyCode() == KeyEvent.VK_ENTER ||
e.getKeyCode() == KeyEvent.VK_TAB) {
getParent().remove(editor);
clicked = false;
setText(editor.getText());
setVisible(true);
( (JComponent) getParent()).repaint(getBounds());
}
}
COM: <s> invoked when a key has been released </s>
|
funcom_train/39958678 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object transform(Object target) {
String[] a;
String b;
Date mydate;
a = new String[4];
try {
mydate = (Date) target;
}
catch (ClassCastException cce){
mydate = ((Calendar)target).getTime();
}
df = DateFormat.getDateInstance();
a[0]= df.format(mydate);
System.out.println(a[0]);
StringTokenizer st = new StringTokenizer(a[0],", ");
a[2]=st.nextToken(); //
a[3]=st.nextToken();
a[1]=st.nextToken();
System.out.println(a[1]);
System.out.println(a[2]);
System.out.println(a[3]);
return a;
}
COM: <s> returns the specified calendar argument as an array of strings </s>
|
funcom_train/3046970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onFlush(FlushEvent event) throws HibernateException {
final EventSource source = event.getSession();
if ( source.getPersistenceContext().hasNonReadOnlyEntities() ) {
flushEverythingToExecutions(event);
performExecutions(source);
postFlush(source);
if ( source.getFactory().getStatistics().isStatisticsEnabled() ) {
source.getFactory().getStatisticsImplementor().flush();
}
}
}
COM: <s> handle the given flush event </s>
|
funcom_train/12180674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void disableDisplayArea() {
String[] attributeNames = attributesComposite.getAttributeNames();
for (int i = 0; i < attributeNames.length; i++) {
attributesComposite.setAttributeValue(attributeNames[i], "");
}
ControlUtils.setEnabledHierarchical(displayArea, false);
}
COM: <s> disable the display area setting all attribute values to </s>
|
funcom_train/39107837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public Recordlist getRecordlist(){
if (usersRecords == null) {
if (env.getMode() == Mode.TAG_PREVIEW ||
env.getMode() == Mode.ANONYMOUS_XML_DOWNLOAD ||
env.getMode() == Mode.PREVIEW) {
usersRecords = Recordlist.dummyRecordlistInstance();
}
else {
usersRecords = Recordlist.recordlistInstance(this);
}
}
return usersRecords;
}
COM: <s> returns this users recordlist </s>
|
funcom_train/13965383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String itemsString() {
if (_itemsString == null) {
String key = stringValueForBinding(Keys.itemString, "item");
_itemsString = localizer().localizedStringForKey("ERMBatchSizeControl." + key);
if (_itemsString == null ) {
_itemsString = localizer().localizedStringForKeyWithDefault(key);
}
}
return _itemsString;
}
COM: <s> the string displayed for 100 item s show 10 </s>
|
funcom_train/15625192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(final int type, @NotNull final String name, @NotNull final String displayName, final int minValue, final int maxValue) throws InvalidCheckException {
if (minValue == Integer.MIN_VALUE && maxValue == Integer.MAX_VALUE) {
return;
}
getType(type).add(name, displayName, new Range(minValue, maxValue));
}
COM: <s> adds an attribute to check </s>
|
funcom_train/21606658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isPrimary(String beanName, Object beanInstance) {
if (containsBeanDefinition(beanName)) {
return getMergedLocalBeanDefinition(beanName).isPrimary();
}
if (this.resolvableDependencies.values().contains(beanInstance)) {
return true;
}
BeanFactory parentFactory = getParentBeanFactory();
return (parentFactory instanceof DefaultListableBeanFactory &&
((DefaultListableBeanFactory) parentFactory).isPrimary(beanName, beanInstance));
}
COM: <s> return whether the bean definition for the given bean name has been </s>
|
funcom_train/10655954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddAttributeDiff() {
AttributeSet as1 = sc.addAttribute(sc.getEmptySet(), StyleConstants.Bold, Boolean.TRUE);
AttributeSet as2 = sc
.addAttribute(sc.getEmptySet(), StyleConstants.Bold, Boolean.FALSE);
assertNotSame(as1, as2);
}
COM: <s> add two diffrent key value pair to an empty set </s>
|
funcom_train/50326169 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeSignalMastLogic(SignalMastLogic sml){
if(sml==null)
return;
//Need to provide a method to delete and dispose.
sml.dispose();
signalMastLogic.remove(sml);
firePropertyChange("length", null, Integer.valueOf(signalMastLogic.size()));
}
COM: <s> completely remove the signalmast logic </s>
|
funcom_train/50961685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void cleanUp(TermVector candidate) {
if (dictionary!=null)
{
TermVector remWords = (TermVector)candidate.clone();
remWords.subtract(dictionary);
candidate.subtract(remWords);
}
if (maxSize!=-1) candidate.truncateTo(maxSize);
if (linearlyScale) candidate.linearlyScale();
if (normalize) candidate.normalize();
}
COM: <s> alter a vector to conform to the settings made here </s>
|
funcom_train/15801680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireBrwFileSearch() {
m_isbusy = true;
MultiThreadedFolderSearch s = new MultiThreadedFolderSearch(this,
"*.brw", m_sBaseDir);
/*
* Warning: No other subclass should write to m_statusBox until this
* subclass is done, otherwise it will lead to a deadlock.
*/
s.setStatusBox(m_statusBox);
m_brwThread = new Thread(s);
m_brwThread.start();
}
COM: <s> start the search by creating a new thread and starting it </s>
|
funcom_train/25513366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setStatusLabel(boolean error,String message){
//Error label foreground in red
if(error) lblStatus.setForeground(new Color(255, 0, 0));
//Succesfully label forefround in green
else lblStatus.setForeground(new Color(34, 139, 34));
//Message
if(message==null) message="";
lblStatus.setText(message);
}
COM: <s> function to control lbl status color and message </s>
|
funcom_train/16141060 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
mRunningQ = true;
try {
while (mRunningQ) {
// if not end of stream, add char to string
int i = reader.read();
if(i != -1) {
pushStream.add((char)i, reader.ready());
} else {
mRunningQ = false;
}
}
} catch (IOException e) {
// nothing to do
}
pushStream.close();
mRunningQ = false;
}
COM: <s> run while we are getting input from reader </s>
|
funcom_train/12278808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerModule(String name, Class moduleClass, String messageResourcesKey, boolean primary, boolean secondary, boolean system) {
modules.put(name, new AuthenticationModuleDefinition(name, moduleClass, messageResourcesKey, primary, secondary, system));
}
COM: <s> register a new module definition </s>
|
funcom_train/46321794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FollowSibling ( int siblingDirection, TargetingAction action ) {
//make sure LEFT or RIGHT sibling is specified
if ((siblingDirection != PConstants.LEFT) && (siblingDirection != PConstants.RIGHT)) {
PApplet.println("Warning: the first argument of FollowSibling must be LEFT or RIGHT. Using default LEFT.");
siblingDirection = PConstants.LEFT;
}
this.siblingDirection = siblingDirection;
this.action = action;
}
COM: <s> follow left or right sibling </s>
|
funcom_train/11293001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void putCacheEntry(TypeMapping m, Name name, Object value, Attributes a) {
assertNotClosed();
cache.put(name, value);
final SecondLevelCache slc = mapping.getSecondLevelCache();
if (null != slc) {
a.put(TYPE_MAPPING_KEY, m.hashCode());
slc.putEntry(name, a);
}
}
COM: <s> put an entry into the cache </s>
|
funcom_train/26534654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SaveableData thaw() {
if (o == null) {
String value = util.getFormer();
if (value == null)
o = DEFAULT;
else try {
o = ValueFactory.createQuickly(name, value, data, prefix);
if (o != null) o.setEditable(util.formerEditable);
} catch (MalformedValueException mve) {
o = new MalformedData(value);
}
}
return o;
}
COM: <s> this method is called by the data freezer to thaw a frozen data </s>
|
funcom_train/8339194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemovingSelectedQueryCacheChangesSelection() throws Exception {
QueryCache query = new QueryCache(getContext());
workspace.addQuery(query, getSession());
workspace.setEditorPanelModel(query);
assertEquals(query, workspace.getEditorPanelModel());
workspace.removeChild(query);
assertNotSame(query, workspace.getEditorPanelModel());
}
COM: <s> regression test for bug 1976 </s>
|
funcom_train/12118001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connEtoC51(java.awt.event.ActionEvent arg1) {
try {
// user code begin {1}
// user code end
this.anticipiJMenuItem_ActionPerformed(arg1);
// user code begin {2}
// user code end
} catch (java.lang.Throwable ivjExc) {
// user code begin {3}
// user code end
handleException(ivjExc);
}
}
COM: <s> conn eto c51 anticipi jmenu item </s>
|
funcom_train/1152355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAsBox(float hx, float hy) {
vertices.clear();
vertices.add(new Vec2(-hx, -hy));
vertices.add(new Vec2(hx, -hy));
vertices.add(new Vec2(hx, hy));
vertices.add(new Vec2(-hx, hy));
}
COM: <s> build vertices to represent an axis aligned box </s>
|
funcom_train/34104894 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkReturningMethod() {
pushNewToken();
if ( isCommand() ){
}else if ( isKeyWord( KeyWord.RETURN )){
checkReturnStatement();
pushNewToken();
if ( isSignal(Signal.CLOSING_BRACE) ){
return;
}else{
throw new SyntaxException("Unreachable code" + peekToken() + " '}' was expected here!" );
}
}else{
throw new SyntaxException("Unexpected token " + peekToken());
}
COM: <s> check the syntaxe of the returning method </s>
|
funcom_train/18076801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String normalize(final String original) {
String result = "";
String[] tempNew = original.split("[^a-zA-Z]");
if (tempNew.length == 0) {
result = "submit";
} else {
for (int i = 0; i < tempNew.length; i++) {
result += tempNew[i].toLowerCase();
}
}
return result;
}
COM: <s> converts the text on the submit button to a normalized form </s>
|
funcom_train/50575856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEntry(DiscInfo e) {
ent = e;
for(int i = 0; (i < children.size()) && (i < e.getTocEntries()); i++) {
e.getTocEntry(i).setTrack(i + 1);
((MusicFile) children.get(i)).ent = e.getTocEntry(i);
}
}
COM: <s> copies info from this disc info object into the objects state </s>
|
funcom_train/12167599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getMimeTypes() {
List types = new ArrayList();
for (int i = 0; i < mimeTypes.size(); i++) {
MimeTypeConfiguration mtc =
(MimeTypeConfiguration) mimeTypes.get(i);
types.add(mtc.getValue());
}
return types;
}
COM: <s> get the list of xdime mime types </s>
|
funcom_train/49438967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isOutsideConnection(InetAddress addr) {
// short-circuit for tests.
if(!ConnectionSettings.LOCAL_IS_PRIVATE.getValue())
return true;
byte[] bytes = addr.getAddress();
return !RouterService.isConnectedTo(addr) &&
//!NetworkUtils.isCloseIP(bytes, getAddress(false)) &&
!NetworkUtils.isLocalAddress(addr);
}
COM: <s> determines whether or not this inet address is found an outside </s>
|
funcom_train/49469687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int addOrLookupRealmAccount(String realm, String userName, String userId, String fullUserName) throws Exception {
return addOrLookupRealmAccount(realm, userName, userId, fullUserName, null, null, null, null);
}
COM: <s> wrapper to add or lookup realm account with all null flags </s>
|
funcom_train/38863723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Source toSource(File baseDirectory, File file) {
if (targetPath != null)
return toSource(targetPath, file);
else {
String basePath = baseDirectory.getAbsolutePath();
String filePath = baseDirectory.getAbsolutePath();
if (!filePath.startsWith(basePath)) {
throw new IllegalArgumentException("The specified file '" +
file + "' is not below " + baseDirectory);
}
return toSource(filePath.substring(basePath.length()), file);
}
}
COM: <s> converts the given file to a source </s>
|
funcom_train/1905540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetDelimiter() {
System.out.println("testSetDelimiter");
assertNotNull(iterateTask);
try {
iterateTask.setDelimiter(",");
} catch (Exception e){
e.printStackTrace();
fail("Exception doing setDelimiter(,)");
}
}
COM: <s> test of set delimiter method of class sync4j </s>
|
funcom_train/50892551 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addObjects(IMessage[] messages) {
int newSize = entry + messages.length;
if(newSize > objects.length) {
String msg = "Messge object capacity of "
+ objects.length + " exceeded: " + newSize;
throw new MessageException(msg);
}
for(int i = 0; i < messages.length; i++) {
objects[entry++] = messages[i];
}
}
COM: <s> adds an array of message object to the response </s>
|
funcom_train/18846600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String createPrivateProcessFlowNotFoundException(String tscToken, String sequenceFlowID) {
PropertyMap propertyMap = new PropertyMap();
DiagnosticsListCreator edg;
edg = new DiagnosticsListCreator();
String severityType = DiagnosticsCodes.getErrorDiagnosticsCode();
String exceptionID = "80036";
propertyMap.addPropertyValuePair("sequenceFlowID", sequenceFlowID);
String serExMsg = edg.constructErrorDocOneItemParam(tscToken,
componentID,
severityType,
subSystemCode,
exceptionID,
propertyMap);
return serExMsg;
}
COM: <s> construct private process flow not found exception message </s>
|
funcom_train/46824499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPiece (int x, int y) throws IndexOutOfBoundsException {
// check position is in bounds and then return it value
if (x >= 0 && x < 8 && y >= 0 && y < 8)
return chessPieces[y * 8 + x];
else throw new IndexOutOfBoundsException ("x=" + x + " y=" + y);
}
COM: <s> return the current chess piece </s>
|
funcom_train/46160790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCell(PresentationCell cell) {
this.cell = cell;
// Update the slider values with the current values of the scale and
// spacing for the slides.
scaleSlider.setValue(getScaleSliderValue(cell.getScale()));
spacingSlider.setValue(getSpacingSliderValue(cell.getSpacing(),
cell.getLayout().getLayout()));
}
COM: <s> set the cell associated with the hud panel </s>
|
funcom_train/4363030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addNotification(NotificationInfo notification) {
synchronized (notifications) {
NotificationInfo results[] =
new NotificationInfo[notifications.length + 1];
System.arraycopy(notifications, 0, results, 0,
notifications.length);
results[notifications.length] = notification;
notifications = results;
this.info = null;
}
}
COM: <s> add a new notification to the set of notifications for this mbean </s>
|
funcom_train/31995452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void packet0x4e() {
try {
int creatureId = readInt();
byte lightLevel = readByte();
// int pcUid = commCore.dataCore.getPlayerCharacterUid();
// commCore.dataCore.setPersonalLightLevel(creatureId, lightLevel);
// if (pcUid==creatureId) {
// commCore.client.setPersonalLightLevel(lightLevel);
// }
} catch (IOException e) {
}
}
COM: <s> light change set the personal light level </s>
|
funcom_train/22896060 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void terminate() {
synchronized(this.isRunning) {
if (this.terminateFlag) {
// If we're called and the termination flag is already set, this means
// that we're probably the script-running thread, and should clean up.
log.debug("terminate(): Cleaning up lingering peerhandles");
PeerHandle.threadTerminationCleanup();
} else {
this.terminateFlag = true;
log.debug("wakes up all in terminate");
this.isRunning.notifyAll();
}
}
}
COM: <s> clean up and prepare for termination </s>
|
funcom_train/25073525 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean validateIPAddress() {
String tmpAdress = textfield.getText();
if (tmpAdress.split("\\.").length != 4) {
return false;
}
for (String tmpAddressbyte : tmpAdress.split("\\.")) {
try {
int tmpPart = Integer.parseInt(tmpAddressbyte);
if (tmpPart > 255 || tmpPart < 0) {
return false;
}
} catch (NumberFormatException e) {
return false;
}
}
return true;
}
COM: <s> validates the entered ip address </s>
|
funcom_train/4497191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processHeader(SWFHeader header) {
document.setFrameRate(header.getFrameRate());
document.setFrameSize(header.getFrameSize());
document.setVersion(header.getVersion());
document.setFileLength(header.getFileLength());
document.setFrameCount(header.getFrameCount());
document.setCompressed(header.isCompressed());
}
COM: <s> stores the swf header in the document </s>
|
funcom_train/3035225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void delay(long waitTimeMillis) {
Display display = Display.getCurrent();
// If this is the UI thread,
// then process input.
if (display != null) {
long endTimeMillis = System.currentTimeMillis() + waitTimeMillis;
while (System.currentTimeMillis() < endTimeMillis) {
if (!display.readAndDispatch())
display.sleep();
}
display.update();
}
// Otherwise, perform a simple sleep.
else {
try {
Thread.sleep(waitTimeMillis);
} catch (InterruptedException e) {
// Ignored.
}
}
}
COM: <s> process ui input but do not return for the specified time interval </s>
|
funcom_train/43295504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPath() {
StringBuffer name = new StringBuffer();
if (get_ParentPart() != null) {
name.append(((TestsModelPart) get_ParentPart()).getPath());
name.append("/");
}
if (this instanceof Folder) {
name.append(((Folder) this).getName());
}
if (this instanceof Test) {
name.append(((Test) this).getName());
}
return name.toString();
}
COM: <s> get the path </s>
|
funcom_train/22290684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void center() {
Rect rootViewBounds;
Rect newBounds;
rootViewBounds = rootView.bounds;
newBounds = new Rect((int)((rootViewBounds.width - bounds.width) / 2),
(int)((rootViewBounds.height - bounds.height) / 2),
bounds.width, bounds.height);
if(newBounds.y < 0)
newBounds.y = 0;
setBounds(newBounds);
}
COM: <s> centers the internal windows within its root view </s>
|
funcom_train/2585823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getDomainAxisIndex(ValueAxis axis) {
int result = this.domainAxes.indexOf(axis);
if (result < 0) {
// try the parent plot
Plot parent = getParent();
if (parent instanceof XYPlot) {
XYPlot p = (XYPlot) parent;
result = p.getDomainAxisIndex(axis);
}
}
return result;
}
COM: <s> returns the index of the given domain axis </s>
|
funcom_train/15452434 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void quitCommunity(User member, Community community) {
// recovering the persisted user
member = (User) this.accessControlController.getUser(member.getCode());
if (community != null) {
community.removeMember(member);
member.getEmailPolicy().removeCommunity(community);
this.removeImPolicy(member, community);
this.removeDocumentsPolicy(member, community);
} else {
throw new AccessControlException(ErrorConstraints.COMMUNITY_NOT_FOUND);
}
}
COM: <s> it removes the given user from the community members set </s>
|
funcom_train/46110058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEncoding(String encoding) {
// Cannot reset an encoding on a CharSequence document
if (inputCharSequence != null) {
LOGGER.log(Level.FINE,
"Cannot reset an encoding on a CharSequence input in RawDocument");
return;
}
if (hasReaderBeenCalled) {
LOGGER.log(Level.WARNING,
"Setting an encoding after getReader() has been called is not recommened. "
+ "Subsequent calls to getReader() may use the old encoding if the stream can be reset"
+ " instead of recreated.");
}
this.encoding = encoding;
}
COM: <s> set the input encoding </s>
|
funcom_train/36951589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IType getType(IRubyElement element) throws RubyModelException {
IType type = null;
if (element instanceof IRubyScript) {
type= ((IRubyScript) element).findPrimaryType();
}
else if (element instanceof IType) {
type = (IType) element;
}
else if (element instanceof IMember) {
type = ((IMember)element).getDeclaringType();
}
return type;
}
COM: <s> gets the type of the iruby element </s>
|
funcom_train/32874749 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void placeInfo(SocketHandler sh, Place place) {
Area a = place.getArea();
sh.println(place.getName() + ", " + a.getName());
sh.println();
sh.println(place.getDesc());
sh.println();
exits(sh, place);
players(sh, place);
items(sh, place);
}
COM: <s> display place information </s>
|
funcom_train/17679486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SqlExp normalize(SqlDriver driver, SelectExp sel, boolean convertExists) {
SqlExp r = childList.normalize(driver, sel, convertExists);
if (r != null) {
r.next = childList.next;
childList = r;
}
r = childList.next.normalize(driver, sel, convertExists);
if (r != null) {
childList.next = r;
}
return null;
}
COM: <s> normalize this node i </s>
|
funcom_train/26137246 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void openEditorDialog(SelectionEvent e) {
EditorDialog descriptionDialog;
EditorDialog evaluationDialog;
if (e.widget == editDesc) {
descriptionDialog = new EditorDialog(getShell(), descriptionBuffer);
descriptionDialog.open();
descriptionBuffer.initEdit(descriptionTextField, getShell()
.getDisplay());
descriptionTextField.layout();
}
if (e.widget == editEval) {
evaluationDialog = new EditorDialog(getShell(), evaluationBuffer);
evaluationDialog.open();
evaluationBuffer.initEdit(evaluationTextField, getShell()
.getDisplay());
evaluationTextField.layout();
}
}
COM: <s> opens the assignment editor dialog for editing </s>
|
funcom_train/42971691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getRunningTime() {
long nsCurrent = 0;
String osName = System.getProperty("os.name");
if (osName.indexOf("win") >= 0) {
nsCurrent = (long) (PerfTimer.GetPerfTime() * 1e9);
} else {
nsCurrent = System.nanoTime();
}
return (double) (nsCurrent - nsStart) / 1e9;
}
COM: <s> get the current time in runtime </s>
|
funcom_train/39062086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addLengthPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(new ItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_IMarkingAnnotationNode_length_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_IMarkingAnnotationNode_length_feature", "_UI_IMarkingAnnotationNode_type"),
MarkingPackage.eINSTANCE.getIMarkingAnnotationNode_Length(),
true,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE));
}
COM: <s> this adds a property descriptor for the length feature </s>
|
funcom_train/35284393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String padNum(long num, int totalLen) {
String numStr = Long.toString(num);
int len = totalLen - numStr.length();
String pads = "";
for (int i = 0; i < len; i++) {
pads += " ";
}
return pads + numStr;
}
COM: <s> right aligns a long number with spaces for printing </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.