__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/26021140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ContentProviderOperation modifyMimeTypeForContact(long rawContactId, String rcsNumber, String mimeType, boolean newState, boolean oldState){
if (newState==oldState){
// Nothing to do
return null;
}
if (newState==true){
// We have to insert a new data in the raw contact
return insertMimeTypeForContact(rawContactId, rcsNumber, mimeType);
}else{
// We have to remove the data from the raw contact
return deleteMimeTypeForContact(rawContactId, rcsNumber, mimeType);
}
}
COM: <s> modify the corresponding mimetype row for the contact </s>
|
funcom_train/16707303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateObject( Object connList ) {
CosignConnectionList cosignConnectionList = (CosignConnectionList)connList;
if ( log.isDebugEnabled() ) {
log.debug( "[" + cosignConnectionList.getCosignConListId() + "]: validating cosign connection list" );
}
return cosignConnectionList.areConnectionsValid();
}
COM: <s> this method tests the cosign connection list object to ensure that it has </s>
|
funcom_train/31239590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Vector2f src, Vector2f dest) {
dest.x = (float) Math.cos(Math.toRadians(angle)) * radius;
dest.y = (float) Math.cos(Math.toRadians(angle+90.0f)) * radius;
dest.x -= Math.sin(Math.toRadians(angle)) * radius;
dest.y -= Math.sin(Math.toRadians(angle+90.0f)) * radius;
}
COM: <s> add this polar coordinate to the specified vector2f and place </s>
|
funcom_train/15954693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetTimezone() {
DataDate lDataDate1 = new DataDate(fYear,fMonth,fDay,fTimeZone);
TimeZone lTimeZone = TimeZone.getTimeZone("JST");
lDataDate1.setTimezone(lTimeZone);
assertEquals(lTimeZone,lDataDate1.getTimezone());
}
COM: <s> test of set timezone method </s>
|
funcom_train/31956277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save() {
try {
_properties.store(new FileOutputStream(_file), "JSky User Preferences");
} catch (Exception e) {
System.out.println("Error saving preferences file: " + _file.getPath() + ": " + e.toString());
}
}
COM: <s> save the current preferences to this </s>
|
funcom_train/44026078 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updatePropertiesLinks(HashMap<String, Property> newPties) {
if (newPties != null) {
Set<String> keys = newPties.keySet();
for (Iterator<String> iterator = keys.iterator(); iterator.hasNext();) {
String ptiesCode = iterator.next();
if (properties.get(ptiesCode) instanceof PropertyWidget) {
((PropertyWidget)properties.get(ptiesCode)).setProperty(newPties.get(ptiesCode));
}
}
}
}
COM: <s> changes properties to which property widgets are related </s>
|
funcom_train/15677139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(double x, double y) {
if (this.boundary().contains(x, y))
return true;
double area = this.area();
int winding = this.getWindingNumber(x, y);
if (area > 0) {
return winding == 1;
} else {
return winding == 0;
}
}
COM: <s> returns true if the point x y lies inside the polygon with precision </s>
|
funcom_train/33465462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(int index) {
ensureMutableMessageList();
messages.remove(index);
if (builders != null) {
SingleFieldBuilder<MType, BType, IType> entry =
builders.remove(index);
if (entry != null) {
entry.dispose();
}
}
onChanged();
incrementModCounts();
}
COM: <s> removes the element at the specified position in this list </s>
|
funcom_train/44660080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setActivePage(DialogPage activePage) {
DialogPage oldPage = this.activePage;
Assert.isTrue(activePage == null || pages.contains(activePage));
if (oldPage == activePage) {
return;
}
this.activePage = activePage;
updateMessage();
if (oldPage != null) {
updatePageLabels(oldPage);
}
if (activePage != null) {
updatePageLabels(activePage);
}
}
COM: <s> sets the active page of this composite dialog page </s>
|
funcom_train/16218634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void grow(int h, int v) {
if (h >= 0) {
this.width += h;
} else {
this.x += h;
this.width -= h;
}
if (v >= 0) {
this.height += v;
} else {
this.y += v;
this.height -= v;
}
}
COM: <s> grows this collision rect by code h code width and code v code </s>
|
funcom_train/497203 | /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) {
jPanel1 = new JPanel();
jPanel1.setLayout(new BorderLayout());
jPanel1.add(getHostPanel(), java.awt.BorderLayout.NORTH);
jPanel1.add(getTablePanel(),java.awt.BorderLayout.CENTER );
jPanel1.add(getStatusPanel(), java.awt.BorderLayout.SOUTH);
}
return jPanel1;
}
COM: <s> this method initializes j panel1 </s>
|
funcom_train/12860767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object run(final Object args) throws Exception {
Display display = PlatformUI.createDisplay();
try {
int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
if (returnCode == PlatformUI.RETURN_RESTART) {
return IPlatformRunnable.EXIT_RESTART;
}
return IPlatformRunnable.EXIT_OK;
} finally {
display.dispose();
}
}
COM: <s> the entry point for the plug in </s>
|
funcom_train/43665199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNavigablePropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_XAttribute_navigable_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_XAttribute_navigable_feature",
"_UI_XAttribute_type"),
XmdlPackage.Literals.XATTRIBUTE__NAVIGABLE, true, false, false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
getString("_UI_ReferencePropertyCategory"), null));
}
COM: <s> this adds a property descriptor for the navigable feature </s>
|
funcom_train/8641454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPSXObject(PdfPSXObject psobject) {
checkWriter();
PdfName name = writer.addDirectTemplateSimple(psobject, null);
PageResources prs = getPageResources();
name = prs.addXObject(name, psobject.getIndirectReference());
content.append(name.getBytes()).append(" Do").append_i(separator);
}
COM: <s> adds a post script xobject to this content </s>
|
funcom_train/17416071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initSelectedFileListModel() {
if (this.selectedFileListModel == null) {
this.selectedFileListModel = (SelectedFileListModel) this.configHolder.getObject("global.selected-file-list-model");
this.selectedFileListModel.addSelectedFileListListener(this);
}
}
COM: <s> get and set local instance of selected file list model from config </s>
|
funcom_train/51537811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean flashBacklight(int duration) {
// Grey area of Spec.:
// The spec. does not specify when negative number
// is passed into this function AND the Display is not
// in the foreground. To be safe here, we always
// check for the parameters first.
if (duration < 0) {
throw new IllegalArgumentException();
}
if (!hasForeground) {
return false;
}
return deviceAccess.flashBacklight(displayId, duration);
}
COM: <s> requests a flashing effect for the devices backlight </s>
|
funcom_train/18136606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOutputPortIndex(OutputPort outputPort, int index) {
List<OutputPort> oldOrder = new ArrayList<OutputPort>(outputPortOrder);
outputPortOrder.remove(outputPort);
outputPortOrder.add(index, outputPort);
propertyChangeSupport.firePropertyChange(new PropertyChangeEvent(this,
Task.OUTPUT_PORTS_FIELD, oldOrder, outputPortOrder));
}
COM: <s> method for setting the position of the output port </s>
|
funcom_train/44664956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNameValue(String nameValue){
if (nameValue == null) return;
String[] pair = nameValue.split("=");
if (pair.length != 2){
throw new IllegalArgumentException("The string[" + nameValue +"] is expected have the format [name=value]");
}
name = pair[0];
value = pair[1];
}
COM: <s> set the name and value from a string in the format name value </s>
|
funcom_train/37009502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double blueCovariance() {
double mean=blueMean(), covariance=0.f, temp;
for (int v = 0; v < getHeight(); v++)
{
for (int u = 0; u < getWidth(); u++)
{
temp = blue(u, v) - mean;
covariance += temp*temp;
}
}
covariance /= getWidth()*getHeight();
return covariance;
}
COM: <s> returns the covariance of the blue pixels in band 2 </s>
|
funcom_train/801196 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startHsqldbServer() {
final String database =
PlatformUI.getPreferenceStore().getString(IPreferenceConstants.FILEVIEWER_HOME_PATH)
+ File.separator + ".database";
try {
server.checkRunning(false);
}
catch(RuntimeException e) {
return; //Server is already running
}
server.setDatabaseName(0, "local");
server.setDatabasePath(0, database);
server.setLogWriter(null);
server.setErrWriter(null);
server.start();
}
COM: <s> starts the hsqldb server with one local database </s>
|
funcom_train/29609646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTable getFurnitureTable() {
if (furnitureTable == null) {
Object [] columnsTitle = {"Name", "W", "D", "H"};
Object [][] furnitureData = { {"Bed", "140", "190", "50"},
{"Cheast", "100", "80", "80"},
{"Table", "110", "110", "75"},
{"Chair", "45","45","90"},
{"Bookcase", "90","30","180"}};
furnitureTable = new JTable(furnitureData, columnsTitle);
}
return furnitureTable;
}
COM: <s> this method initializes furniture table </s>
|
funcom_train/38385719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMgrDefaultStyle() {
assertEquals("Mgr default style has wrong foreground color.",
Color.black, fDefaultMgrStyle.getForeground());
assertEquals("Mgr default style has wrong background color.",
Color.white, fDefaultMgrStyle.getBackground());
assertEquals("Mgr default style has wrong lining.",
REDLining.NONE, fDefaultMgrStyle.getLining());
assertEquals("Mgr default style has wrong font.",
new Font("Monospaced", Font.PLAIN, 12),
fDefaultMgrStyle.getFont());
}
COM: <s> tests the properties of the default style of redstyle manager </s>
|
funcom_train/42182498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (obj instanceof ClassPathResource) {
ClassPathResource otherRes = (ClassPathResource) obj;
return (this.path.equals(otherRes.path) &&
ObjectUtils.equals(this.classLoader, otherRes.classLoader) &&
ObjectUtils.equals(this.clazz, otherRes.clazz));
}
return false;
}
COM: <s> this implementation compares the underlying class path locations </s>
|
funcom_train/38808295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addNamespaceDeclaration(final Namespace additionalNamespace) {
// Verify the new namespace prefix doesn't collide with another
// declared namespace, an attribute prefix, or this element's prefix
final String reason = Verifier.checkNamespaceCollision(
additionalNamespace, this);
if (reason != null) {
throw new IllegalAddException(this, additionalNamespace, reason);
}
if (additionalNamespaces == null) {
additionalNamespaces = PArrayList.newInstance(instanceFactory,
INITIAL_ARRAY_SIZE);
}
additionalNamespaces.add(additionalNamespace);
}
COM: <s> adds a namespace declarations to this element </s>
|
funcom_train/49421112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextArea getScoreTextArea() {
if (scoreTextArea == null) {
scoreTextArea = new JTextArea();
scoreTextArea.setFont(new java.awt.Font("Courier New",
java.awt.Font.PLAIN, 12));
}
return scoreTextArea;
}
COM: <s> this method initializes score text area </s>
|
funcom_train/34529820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialise() throws DataSourceException {
String driverName = getDriver();
if ((driverName == null) || (driverName.length() == 0))
throw new DataSourceException("No JDBC driver specified.");
try {
// register the driver
Class.forName(driverName);
} catch (Exception ex) {
String msg = "Couldn't register the driver: " + driverName;
throw new DataSourceException(msg, ex);
}
}
COM: <s> reloads the driver </s>
|
funcom_train/17828187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doDelete() {
String token = tokenizer.next();
if (token != null && "FROM".compareToIgnoreCase(token) == 0) {
token = tokenizer.next();
}
if (token != null) {
listener.foundTableReference(this,
doObjectReference(tokenizer, token));
}
}
COM: <s> called after the tokenizer hits a delete statement and attempts </s>
|
funcom_train/25382521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XMLGregorianCalendar getDestructionTime(AbstractJobTask jobTask) throws UniversalWorkerException {
if (Util.isSet(jobTask)) {
return this.tasksMap.get(jobTask.getJobTaskId()).getDestructionTime();
} else {
throw new UniversalWorkerException(Status.CLIENT_ERROR_NOT_FOUND, "The job does not exist.");
}
}
COM: <s> get the destruction time </s>
|
funcom_train/35541807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testVariableOccurs() {
parseAndCheck(
" 01 myName OCCURS 3 DEPENDING myDep."
,
"(DATA_ITEM (LEVEL 01) (NAME myName) (VARARRAY (HBOUND 3 (DEPENDINGON myDep))))");
parseAndCheck(
" 01 myName OCCURS 3 DEPENDING ON myDep."
,
"(DATA_ITEM (LEVEL 01) (NAME myName) (VARARRAY (HBOUND 3 (DEPENDINGON myDep))))");
}
COM: <s> test variable length table clause </s>
|
funcom_train/1649988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public short getNextHtl() {
if (sHtl.countReports()<COMFORT_LEVEL) {
return MAX_HTL;
} else if (average.currentValue()>0.8) {
//looking good, try lower htl
short htl=(short)(sHtl.currentValue()-0.5);
if (htl<MIN_HTL)
htl=MIN_HTL;
return htl;
} else {
//not so good, try higher htl
short htl=(short)(sHtl.currentValue()+0.5);
if (htl>MAX_HTL)
htl=MAX_HTL;
return htl;
}
}
COM: <s> written to start high and slowly restrict the htl at 80 </s>
|
funcom_train/3612562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Revision addBeginOfLogRevision(final Date date, final int lines, final SortedSet symbolicNames) {
final Revision result = new Revision(this, "0.0", Revision.TYPE_BEGIN_OF_LOG, null, date, null, lines, 0, 0, symbolicNames);
addRevision(result);
return result;
}
COM: <s> adds a begin of log revision to the file </s>
|
funcom_train/44161687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DefaultTreeModel getTree() {
Query query = new Query("queries");
query.setFields(new ArrayList());
query.setSubqueries(xmluts.getQueriesList());
tree = new DefaultTreeModel(makeXMLTreeFromObject(
new DefaultMutableTreeNode(query, false), query.getSubqueries()));
return tree;
}
COM: <s> get tree makes query tree </s>
|
funcom_train/8312080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isXPathNode(Node node) {
if (node == null)
return true;
switch (node.getNodeType()) {
case Node.DOCUMENT_FRAGMENT_NODE:
case Node.DOCUMENT_TYPE_NODE:
case Node.ENTITY_NODE:
case Node.ENTITY_REFERENCE_NODE:
case Node.NOTATION_NODE:
return false;
default:
return true;
}
}
COM: <s> test whether a dom node is usable by xpath </s>
|
funcom_train/2287034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateDates(long dateLastModified, long dateExpires) {
int pos = m_flexContextInfoList.size() - 1;
if (pos < 0) {
// ensure a valid position is used
return;
}
((CmsFlexRequestContextInfo)m_flexContextInfoList.get(pos)).updateDates(dateLastModified, dateExpires);
}
COM: <s> updates the last modified date and the expires date </s>
|
funcom_train/10873838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int put(K key, V val) {
final Set<V> theSet;
if (theMap.containsKey(key)) {
theSet = theMap.get(key);
} else {
theSet = new HashSet<V>(23);
theMap.put(key, theSet);
}
theSet.add(val);
return theSet.size();
}
COM: <s> adds val to the set associated with key in the map </s>
|
funcom_train/48337764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int lastIndexOf(Object o) {
if (null == o) {
for (int i=elements.length-1; i>=0; i--) {
if (null == elements[i]) {
return i;
}
}
} else {
for (int i=elements.length-1; i>=0; i--) {
if (o.equals(elements[i])) {
return i;
}
}
}
return -1;
}
COM: <s> return the index of the last occurrence of the specified element </s>
|
funcom_train/19270005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getReplaced(String substitute, int start, int end) {
int restLength = this.endIndex - end;
StringBuffer buffer = new StringBuffer(start + restLength + substitute.length());
buffer.append(this.chars, this.startIndex, start);
buffer.append(substitute);
buffer.append(this.chars, this.startIndex + end, restLength);
return buffer.toString();
}
COM: <s> this method gets the </s>
|
funcom_train/20678543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PageRuntimeInfo getCurrentPageInfo() {
// first try to obtain page on top of stack - which is not yet released,
// and after that, if stack is empty gives last executed page
if (!pageStack.isEmpty()) {
return (PageRuntimeInfo) pageStack.peek();
} else {
int numOfPages = pageSequence.size();
return (numOfPages > 0 ? (PageRuntimeInfo) pageSequence
.get(numOfPages - 1) : null);
}
}
COM: <s> returns current page runtime info </s>
|
funcom_train/8519869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFlushingInterval(long flushingInterval) {
if (flushingInterval <= 0) {
throw new RuntimeException("Flushing interfal can not be lower or equel to zero");
}
bufferingThread.flushingInterval = flushingInterval;
if (flushingInterval <= 10) {
logger.warn("Flushing interfal is very low, it is set to " + flushingInterval + "ms");
}
}
COM: <s> sets metrics buffer flushing interval time between executing flush method </s>
|
funcom_train/51343141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HashBindingSet copy(final IVariable[] variablesToKeep) {
final HashBindingSet bs = new HashBindingSet();
for (IVariable var : variablesToKeep) {
IConstant val = map.get(var);
if (val != null) {
bs.map.put(var, val);
}
}
return bs;
}
COM: <s> return a shallow copy of the binding set eliminating unecessary </s>
|
funcom_train/5081999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object getConstraintFor (ChangeBoundsRequest request, GraphicalEditPart child) {
RectD2D rect = new PrecisionRectangle(child.getFigure().getBounds());
child.getFigure().translateToAbsolute(rect);
rect = request.getTransformedRectangle(rect);
child.getFigure().translateToRelative(rect);
rect.translate(getLayoutOrigin().getNegated());
return getConstraintFor(rect);
}
COM: <s> generates a draw2d constraint object derived from the specified child edit part using </s>
|
funcom_train/8813142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setToolButtonImage(int index, ImageResource image) {
final HorizontalPanel titleBar = (HorizontalPanel) super.getWidget(HEADER_INDEX);
final FlowPanel toolButtonPanel = (FlowPanel) titleBar.getWidget(1);
final Image button = (Image) toolButtonPanel.getWidget(index);
button.setResource(image);
}
COM: <s> edits a tool button by replacing its current image by the one provided </s>
|
funcom_train/1539217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int size() {
int s = 0;
if ( table == null ) {
return s;
}
for ( Iterator<List> it = table.values().iterator(); it.hasNext(); ) {
List list = it.next();
s += list.size()/2;
}
return s;
}
COM: <s> size of the table </s>
|
funcom_train/3842126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run () {
importFile (getFile(),getImportController());
JOptionPane.showMessageDialog(null, "Total Records["+getImportController().getTotalRecords()+"] inserted ["+getImportController().getInsertedRecords()+"] updated ["+getImportController().getUpdatedRecords()+"]", "Import Success", JOptionPane.INFORMATION_MESSAGE);
}
COM: <s> the import thread run method </s>
|
funcom_train/247738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URL canonify() {
FTPURLImpl res = new FTPURLImpl();
canonify(this, res);
if(res.getComponentCount() == 0) res.setPath(new String[] { "/" });
res.userInfo = userInfo;
res.domain = domain;
res.port = port;
return res;
}
COM: <s> rules for canonification ol </s>
|
funcom_train/33758329 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getAboutPanel() {
if (aboutPanel == null) {
imagem = new JLabel();
imagem.setBounds(new Rectangle(0, 0, 420, 538));
imagem.setIcon(new ImageIcon("src/images/splash.jpg"));
imagem.setText("");
aboutPanel = new JPanel();
aboutPanel.setLayout(null);
aboutPanel.setBounds(new Rectangle(0, 0, 420, 538));
aboutPanel.add(imagem, null);
}
return aboutPanel;
}
COM: <s> this method initializes about panel </s>
|
funcom_train/17785454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSubclassingEnums() {
delayTestFinish(TEST_DELAY);
getService("testSubclassingEnums").echo_SubclassingEnums(Subclassing.A, new AsyncCallback<Subclassing>() {
public void onFailure(Throwable caught) {
rethrowException(caught);
}
public void onSuccess(Subclassing result) {
assertEquals(Subclassing.A, result);
finishTest();
}});
}
COM: <s> test that enums with subclasses can be passed over rpc </s>
|
funcom_train/50443935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Document buildDocument(String filename) {
Document document = null;
File file = new File(config.getXMLPath(filename +
".xml"));
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
try {
DocumentBuilder builder = factory.newDocumentBuilder();
document = builder.parse(file);
} catch (Exception e) {
System.out.println("Exception: " + e);
}
return document;
}
COM: <s> comment java doc method </s>
|
funcom_train/37422332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int storeMyIdSite(long pIdSite, long pIdAdmin, boolean pCommit) throws ClassNotFoundException, SQLException {
String tSql="insert into mysite VALUES ("+ pIdSite +", "+pIdAdmin+")";
return Utility.ExecuteOperation(cConnect,tSql,pCommit);
}
COM: <s> stores the identifier of the own site </s>
|
funcom_train/50142089 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeMember(String item, String group){
IGroup groupInstance = getGroup(group);
IItem itemInstance = getItem(item);
// Look if user is within group (directly)
groupInstance.removeMember(itemInstance);
try{store();}catch(Exception e){e.printStackTrace();}
}
COM: <s> remove an item member from a group </s>
|
funcom_train/7518285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Estrangeiro entity) {
EntityManagerHelper
.log("saving Estrangeiro 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 estrangeiro entity </s>
|
funcom_train/33992846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean feed_PublishTemplatizedAction( TemplatizedAction action ) throws FacebookException, IOException {
return feed_publishTemplatizedAction( action.getTitleTemplate(), action.getTitleParams(), action.getBodyTemplate(), action.getBodyParams(), action
.getBodyGeneral(), action.getPictures(), action.getTargetIds(), action.getPageActorId() );
}
COM: <s> publishes a templatized action for the current user </s>
|
funcom_train/5424755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doInstall(RunData data, Context ctx) throws Exception {
String newFile = data.getParameters().getString("installFileName");
if (newFile == null || newFile.equals("")) {
data.setMessage("No file installed, no file has been specified!");
}
else {
installNewWavGreeting(newFile, data, ctx);
}
}
COM: <s> installs a wav file indicated by the http parameter install file name </s>
|
funcom_train/20504150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Boolean shouldUseBillingAddressForDelivery(Purchase purchase) {
Address address = purchase.getDeliveryAddress();
if (address == null) {
return Boolean.TRUE;
}
return (address.getCountry() == null || address.getCountry().length() == 0)? Boolean.TRUE : Boolean.FALSE;
}
COM: <s> determines whether the billing address should be used as the delivery address </s>
|
funcom_train/1627423 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public KDLeaf nearestBin(Vector tree, short[] dataSetPopulating, int keyptStart)
{
int index = 0;
while(tree.get(index) instanceof KDNode)
{
KDNode innerNode = (KDNode)tree.get(index);
int splitDim = innerNode.getDimension();
double splitPt = innerNode.getSplitPt();
if(dataSetPopulating[keyptStart + splitDim] < splitPt) // left of splitting place
{
index = innerNode.getLeftChild();
}else
{
index = innerNode.getRightChild();
}
}
KDLeaf leafNeighbour = (KDLeaf)tree.get(index);
return leafNeighbour;
}
COM: <s> this method takes a query point and returns the a leaf node </s>
|
funcom_train/26143424 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (this == obj) return true;
if (!(obj instanceof LocalProject)) return false;
final LocalProject localProjectType = (LocalProject) obj;
if (!group.equals(localProjectType.group)) return false;
if (!name.equals(localProjectType.name)) return false;
return true;
}
COM: <s> tests that this project is equal to the given object </s>
|
funcom_train/29814747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createFBL() throws IOException {
fbl.reserveBlock();
fbl.reserveBlock();
fbl.reserveBlock();
fbl.reserveBlock();
fbl.removeBlock(0);
fbl.removeBlock(1);
fbl.close();
assertEquals(FreeBlockList.STATE_INVALID, getState(FreeBlockList.EXT));
assertEquals(FreeBlockList.STATE_VALID, getState(FreeBlockList.EXT2));
}
COM: <s> this method creates a test fbl </s>
|
funcom_train/937261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addProperty(String propertyName, String value) {
if ("text".equals(propertyName)) {
JRadioButton jRadioButton = new JRadioButton(value);
buttons.add(jRadioButton);
buttonGroup.add(jRadioButton);
} else if ("id".equals(propertyName)) {
ids.add(value);
} else {
log.warn("Unsupported property: " + propertyName);
}
}
COM: <s> adds a feature to the property attribute of the radio option object </s>
|
funcom_train/20876797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getRoomName(String delim) {
String roomName = "";
for (Iterator<ExamRoomPlacement> i = getRoomPlacements().iterator(); i.hasNext();) {
ExamRoomPlacement r = i.next();
roomName += r.getRoom().getName();
if (i.hasNext())
roomName += delim;
}
return roomName;
}
COM: <s> room names separated with the given delimiter </s>
|
funcom_train/40528903 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop() {
if (driver == null) {
return;
}
if (driver.getWindowHandles().size() <= 1) {
// quit if no failures (extra windows)
driver.quit();
} else {
// but our window-opener window is not interesting
driver.switchTo().window(firstWindowHandle);
driver.close();
}
driver = null;
}
COM: <s> close the browser if and only if all opened windows have been closed </s>
|
funcom_train/26551387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeField(Field field) {
if (field == null) {
throw new IllegalArgumentException("field cannot be null");
}
// remove from primarykey and indexes if exists in there
// or should we deny the removal then?
// what to do if removal fails but the field exists in the pk/index
fields.remove(field);
}
COM: <s> removes the given field from the vector of fields </s>
|
funcom_train/6206244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void loadOutgoingTransitionHelpers() {
IGaijinWebFlowTransition[] transitions = getGaijinProcessState().getOutgoingTransitions();
IWebFlowTransitionGeneratorHelper[] helpers = new IWebFlowTransitionGeneratorHelper[transitions.length];
for (int i = 0; i < transitions.length; i++) {
helpers[i] = new WebFlowTransitionGeneratorHelper(transitions[i]);
}
outgoingTransitionHelpers = helpers;
}
COM: <s> load the helper classes for outgoing state transitions </s>
|
funcom_train/43889515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBuildDataStore() throws Exception {
DataStore datastore = null;
try {
datastore = DataStoreFinder.getDataStore(getParams());
assertEquals(RegfuncPostgisDataStore.class, datastore.getClass());
} finally {
if (datastore != null) {
datastore.dispose();
}
}
}
COM: <s> test that the factory can be used to build a </s>
|
funcom_train/25778971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAccu2PropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_InstructionExecutionDetails_accu2_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_InstructionExecutionDetails_accu2_feature", "_UI_InstructionExecutionDetails_type"),
CoveragepackagePackage.Literals.INSTRUCTION_EXECUTION_DETAILS__ACCU2,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the accu2 feature </s>
|
funcom_train/45386538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void currentIKr() {
setgkr((0.0135 * Math.pow(getko(), 0.59)) * getscgkr());
setekr(((R * gettemp()) / frdy) * Math.log(getko() / getki()));
doMarkovian();
setikr(getgkr() * getStates()[3] * (v - getekr()));
}
COM: <s> calculates rapidly activating k current </s>
|
funcom_train/34130850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point getPosition() {
// Gather the default values...
Toolkit kit = Toolkit.getDefaultToolkit();
Dimension screen = kit.getScreenSize();
Dimension app = getDimension();
int posx = (screen.width - app.width)/2;
int posy = (screen.height - app.height)/2;
// if ( posx < 0) {
// posx = 0;
// }
// if ( posy < 0) {
// posy = 0;
// }
return new Point( getInteger( XPOS, posx), getInteger( YPOS, posy));
}
COM: <s> returns the x y position on screen of the editor </s>
|
funcom_train/18787514 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCatridge(Cartridge cartridge) {
this.cartridge = cartridge;
stereotypes.setModel(cartridge.getAllStereotypes());
// taggedValueTypes.setModel(cartridge.getTaggedValueTypes());
properties.setModel(cartridge.getAllProperties());
cartridges.setModel(cartridge.getUsedCartridges());
}
COM: <s> sets the new cartridge of the panel </s>
|
funcom_train/8520340 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(GL gl, int width, int height) {
// setup texture renderer
textureRenderer1 = new TextureRenderer(gl);
textureRenderer1.init(gl, width, height);
textureRenderer2 = new TextureRenderer(gl);
textureRenderer2.init(gl, height, width);
// setup shaders
shader_gaussianFilter = new Shader(VERTEXSHADER_GAUSSIANFILTER, FRAGMENTSHADER_GAUSSIANFILTER);
}
COM: <s> initializes this glowifier </s>
|
funcom_train/37829479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void filterOutInteriorOrExteriorZones(final Set<StendhalRPZone> zonesInRegion, final Boolean exterior) {
final Set<StendhalRPZone> removals = new HashSet<StendhalRPZone>();
for (StendhalRPZone zone : zonesInRegion) {
if(exterior) {
if(zone.isInterior()) {
removals.add(zone);
}
} else {
if(!zone.isInterior()) {
removals.add(zone);
}
}
}
zonesInRegion.removeAll(removals);
}
COM: <s> filter out exterior or interior zones from the given set </s>
|
funcom_train/15737987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getScmType() {
String scmType;
Scm scm = getExecutedProject().getScm();
if (scm == null) {
return null;
}
scmType = getScmType(scm.getConnection());
if (scmType != null) {
return scmType;
}
scmType = getScmType(scm.getDeveloperConnection());
return scmType;
}
COM: <s> used to retrieve the scm type </s>
|
funcom_train/11384011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkAccess(UserGroupInformation callerUGI, String owner, ApplicationACL appACL) {
if (!UserGroupInformation.isSecurityEnabled()) {
return true;
}
AccessControlList applicationACL = applicationACLs.get(appACL);
return aclsManager.checkAccess(callerUGI, appACL, owner, applicationACL);
}
COM: <s> check if the calling user has the access to application information </s>
|
funcom_train/27699753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireChangeEvent() {
ChangeEvent evt = null;
Object[] list = listeners.getListenerList();
for(int i = list.length - 2; i >= 0; i -= 2) {
if(list[i]==ChangeListener.class) {
if(evt == null) {// Lazily create the event:
evt = new ChangeEvent(source);
}
((ChangeListener)list[i + 1]).stateChanged(evt);
}
}
}
COM: <s> fire a change event </s>
|
funcom_train/42393336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setup(GraphicListener graphicListener, Animator animator) {
this.graphicListener = graphicListener;
this.canvas.addGLEventListener(graphicListener);
this.graphicListener.setScene(this.scene);
this.animator = animator;
// displayMessage( "Starting new Scene..." );
this.animator.setScene(scene);
// mFrame.setGlCanvas( this.canvas );
oFrame.setup();
this.canvas.requestFocus();
}
COM: <s> sets the graphic listener and the animator </s>
|
funcom_train/26630648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDoubleAdd() throws Exception {
CommandPackage myWP = new CommandPackage();
myWP.addValue("key1","value1");
//Unique Values
String[] valuesAdd = {"key1","value1",
"key2","value2",
"key3","value3"};
//Add Twice to try and force vectoization
myWP.addValues(valuesAdd);
myWP.addValues(valuesAdd);
//Test Results
Object tmpObject = myWP.getValue("key1");
assertTrue(tmpObject instanceof String);
}
COM: <s> check double add </s>
|
funcom_train/3393984 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Name append(char c, Name n) {
byte[] bs = new byte[len + n.len + 1];
getBytes(bs, 0);
bs[len] = (byte)c;
n.getBytes(bs, len+1);
return fromUtf(table, bs, 0, bs.length);
}
COM: <s> return the concatenation of this name the given ascii </s>
|
funcom_train/32780102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCapacity(int newCapacity) {
if (newCapacity < 1) {
sendWarning(
"The capacity of a transporter should be changed to zero or "
+ "a negative value. The capacity will remain unchanged!",
"Transporter : " + getName()
+ " Method: void setCapacity(int newCapacity)",
"A capacity which is zero or negative does not make sense.",
"Make sure to provide a valid positive capacity "
+ "when changing this attribute.");
return; // forget that rubbish
}
this.capacity = newCapacity;
}
COM: <s> sets the capacity of this transporter to a new value </s>
|
funcom_train/8640026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getHeaderHeight() {
float total = 0;
int size = Math.min(rows.size(), headerRows);
for (int k = 0; k < size; ++k) {
PdfPRow row = (PdfPRow)rows.get(k);
if (row != null)
total += row.getMaxHeights();
}
return total;
}
COM: <s> gets the height of the rows that constitute the header as defined by </s>
|
funcom_train/38552583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeMachine(MachineID machineID) {
Cube42NullParameterException.checkNull(machineID,
"machineID",
"removeMachine",
this);
MachineNode mNode = new MachineNode(machineID, this.root);
root.remove(mNode);
this.updateTree();
}
COM: <s> removes the specified machine </s>
|
funcom_train/28555273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stateChanged(ChangeEvent e) {
SpinnerModel spinModel = spinner.getModel();
// Different round selected
if (spinModel instanceof SpinnerNumberModel) {
tableModel.setRound(theIV.getRound((Integer)spinModel.getValue()-1));
tableModel.fireTableDataChanged();
this.setTitle("Round Viewer - Round " + spinModel.getValue());
}
}
COM: <s> listens for changes to the round selector </s>
|
funcom_train/49199374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(Observable arg0, Object arg1) {
if ((arg0 instanceof ProjectObservable) && (arg1 instanceof Integer) && ((Integer)arg1 == ProjectObservable.PROJECT_CLOSED)) {
List<ViewPart> viewsCopy = new ArrayList<ViewPart>();
viewsCopy.addAll(views);
views = new ArrayList<ViewPart>();
for (ViewPart v : viewsCopy) {
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().hideView(v);
}
}
}
COM: <s> observer update method </s>
|
funcom_train/34907775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNumberOfCategoriesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Schedule_numberOfCategories_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Schedule_numberOfCategories_feature", "_UI_Schedule_type"),
AffirmationsPackage.Literals.SCHEDULE__NUMBER_OF_CATEGORIES,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the number of categories feature </s>
|
funcom_train/26455139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int dayOfWeek(int day, int month, int year) {
day += ((month < 3) ? year-- : (year - 2));
return ((((23 * month) / 9) + day + 4 + (year / 4)) - (year / 100) + (year / 400)) % 7;
}
COM: <s> calculate the day of the week </s>
|
funcom_train/37515349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void attachTo(AccessorContainer container) {
if (container instanceof LineNumberInfo) {
if (lineNumbers == null) {
lineNumbers = new ArrayList();
}
lineNumbers.add(new Integer(((LineNumberInfo)container).getLine()));
} else {
// Declares this instruction to be target of a jump, handler, ...
this.isTarget = true;
}
}
COM: <s> notifies this handle that is has been attached to the specified container </s>
|
funcom_train/31936246 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected WorkbenchWizardElement findWizard(String searchId) {
Object[] children = wizardElements.getChildren();
for (int i = 0; i < children.length; ++i) {
WorkbenchWizardElement currentWizard = (WorkbenchWizardElement)children[i];
if (currentWizard.getID().equals(searchId))
return currentWizard;
}
return null;
}
COM: <s> answer the wizard object corresponding to the passed id or null </s>
|
funcom_train/38543360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void storeColor(Color color, Preferences node) {
if (color != null) {
node.putInt(RED_PREFERENCE, color.getRed());
node.putInt(GREEN_PREFERENCE, color.getGreen());
node.putInt(BLUE_PREFERENCE, color.getBlue());
}
}
COM: <s> enables to store a color into the preferences as its rgb components </s>
|
funcom_train/22076475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getReference(Object base, String uri) {
String fname = uri;
String rest = fname;
/* strip leading slashes */
while (fname.startsWith("."))
fname = fname.substring(1);
rest = fname;
/* extract first component and rest */
int i = fname.indexOf('.');
if (i != -1) {
fname = fname.substring(0, i);
rest = rest.substring(i);
}
/* retrieve field from base */
Object o = get(base, fname);
if (o == null)
return null;
/* recursion */
if (rest.startsWith("."))
return get(o, rest);
else
return o;
}
COM: <s> dereferences a chain of dot separated object references </s>
|
funcom_train/39313601 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clickAction(MouseEvent mevt, main_canvas theCanvas) {
dragged = false;
/*FAULT::dragged = true;*/
startX = theCanvas.canvasScale(mevt.getX());
startY = theCanvas.canvasScale(mevt.getY());
System.out.println("Line");
backupImage = theCanvas.getBufferedImage();
System.out.println("Linea");
curImage = theCanvas.getBufferedImage();
System.out.println("Lineb");
theCanvas.setBufferedImage(curImage);
System.out.println("Linec");
}
COM: <s> allows the user to click on the canvas using the line tool </s>
|
funcom_train/7822466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWebUrl(String webUrl) {
try {
RecordStore rs = RecordStore.openRecordStore("photoboxme", false);
rs.setRecord(1, webUrl.getBytes(), 0, webUrl.getBytes().length);
} catch (RecordStoreException e) {
e.printStackTrace(); // To change body of catch statement use File |
// Settings | File Templates.
}
}
COM: <s> update the photo box web url stored in record store </s>
|
funcom_train/28748373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection gets(WfdKey key) throws CommonUtilException {
Collection wfds = null;
try {
//See if this contained in the map.
boolean b = this.containsKey(key);
//Get object by key.
if (b) {
wfds = (Collection) wfdMap.get(key);
}
}
catch (RuntimeException ex) {
throw ex;
}
return wfds;
}
COM: <s> get workflow details by wfd key </s>
|
funcom_train/458685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getY(long y) {
if ((y < Y_MIN) || (y > Y_MAX)) {
throw new IllegalArgumentException(
"Y out of bounds: " + y + "(" + Y_MIN + "," + Y_MAX + ")");
}
return (y - Y_OFFSET) / mYScale;
}
COM: <s> convert a number betwee y min and y max to display coordinates </s>
|
funcom_train/31296181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void busyTone() {
TNGEN t1 = new TNGEN(440, -10, 50);
TNGEN t2 = new TNGEN(330, -30, 30);
TPT tpt = new TPT();
int i = 0;
while(linestate == IN) {
voiceDev.playtone(t1, tpt);
if (linestate == IN)
voiceDev.playtone(t2, tpt);
}
}
COM: <s> busy tone give busy tone indication </s>
|
funcom_train/3033977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void wprintf(String s) {
super.wprintf(s); // also write to text window
messageWindow.textArea.append(s);
try {
int index = messageWindow.textArea.getText().length();
messageWindow.textArea.setCaretPosition(index);
} catch (IllegalArgumentException e) {
}
}
COM: <s> write a string that would go to stdout to the message window </s>
|
funcom_train/12196129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsStandardDevice() {
String device = "_device";
assertFalse("Device \"" + device +
"\" should not be a standard device",
EclipseDeviceRepository.isStandardDevice(device));
device = "device";
assertTrue("Device \"" + device +
"\" should be a standard device",
EclipseDeviceRepository.isStandardDevice(device));
}
COM: <s> test is standard device </s>
|
funcom_train/48959851 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Override public boolean equals(Object obj) {
if ((type != null) && (issue != null) && (target != null) && (obj instanceof Interlink)) {
Interlink linked = (Interlink) obj;
return issue.equals(linked.getIssue()) && target.equals(linked.target) && type.equals(linked.type);
}
return super.equals(obj);
}
COM: <s> interlinks are equal if their properties are equal </s>
|
funcom_train/8323733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String forceNullsCollateLast(String expr) {
// If we need to support other DBMSes, note that the SQL standard
// provides the syntax 'ORDER BY x ASC NULLS LAST'.
if (isMySQL()) {
String addIsNull = "ISNULL(" + expr + "), ";
expr = addIsNull + expr;
}
return expr;
}
COM: <s> modifies an expression in the order by clause to ensure that null </s>
|
funcom_train/24195019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createSearchButton(Composite parent) {
Button button = new Button(parent, SWT.PUSH);
button.setText("Search");
button.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
/* When clicked, the button performs the search. */
button.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
String searchText = searchTextField.getText();
performSearch(searchText);
}
});
}
COM: <s> creates the search button </s>
|
funcom_train/29903445 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IMethod findOverridingMethodInType(IType overridingType, IMethod overridden) throws JavaModelException {
IMethod[] overridingMethods= overridingType.getMethods();
for (int i= 0; i < overridingMethods.length; i++) {
if (isSubsignature(overridingMethods[i], overridden)) {
return overridingMethods[i];
}
}
return null;
}
COM: <s> finds an overriding method in a type </s>
|
funcom_train/7443422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean checkExtensionsConsistency(File file) {
boolean knownExtension = true;
Collection<String> set = Entity.getExtensions(file.getName(),
getMetadataService());
Iterator<String> iterator = set.iterator();
while (iterator.hasNext() && knownExtension) {
knownExtension = getMetadataService().getMetadata(iterator.next()) != null;
}
return knownExtension;
}
COM: <s> check that all extensions of the file correspond to a known metadata </s>
|
funcom_train/46824743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void receiveMessage (XMLElement message) {
if (message.getName().equals(Comm.TABLE_PROPERTY)) {
CommTableProperty commTableProp = new CommTableProperty (message);
if (commTableProp.getKey().equals(IGo.XML_PROP_SIZE)) {
boardComponent.resizeBoard();
invalidate();
validate();
pack();
}
}
}
COM: <s> if a table property comes it it is probobly to resize the board </s>
|
funcom_train/31435574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getArguments(String[] sParse){
StringBuffer sb = new StringBuffer("");
if(sParse != null)
{
for(int i = 0; i < sParse.length; i++)
{
if(sParse[i] != null)
{
sb.append(sParse[i] + " ");
}
}
}
return sb.toString();
}
COM: <s> creates a displayable string from an array of strings </s>
|