__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/17892433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setObject(final Object bean) {
this.bean = bean;
info = BeanInfoFactory.getBeanInfo(bean.getClass());
if (info != null) {
descriptors = info.getPropertyDescriptors();
beanDescriptor = info.getBeanDescriptor();
sortTable(PropertyTableModel.SORT_NAME);
}
}
COM: <s> set the table model to represents the properties of the object </s>
|
funcom_train/34420987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createEmptyProject() {
projectItemCollection = new ItemCollection();
try {
projectItemCollection.replaceItemValue("$processid", new Integer(
100));
projectItemCollection.replaceItemValue("keypublic", false);
projectItemCollection.replaceItemValue("txtname", "");
projectItemCollection.replaceItemValue("txtmembers", "");
projectItemCollection.replaceItemValue("txtdescription", "");
} catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> this method creates an empty team with the necessary initial attributes </s>
|
funcom_train/25471212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init(String wordlist[][]) {
double freq = 0;
String word = null;
double total_words = Integer.parseInt(wordlist[0][1]);
for (int k = 1; k < wordlist.length; k++) {
word = wordlist[k][0];
freq = Integer.parseInt(wordlist[k][1])/total_words;
insert(new PatternWord(word, freq));
++nWords;
}
// System.out.println("size = " + dict.size());
}
COM: <s> this version of init creates the pattern dictionary from an internal array </s>
|
funcom_train/15604644 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isInListAlready(OID Id, List list) {
for (int i = 0; i < list.size(); i++) {
OID temp = ((Feature)(list.get(i))).getOid();
if (temp.equals(Id)) {
return true;
}
}
return false;
}
COM: <s> this method is written to remove the duplicate elements </s>
|
funcom_train/375410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void SKIP_testReadEntireSuspectFile() {
Ip4 ip = new Ip4();
for (PcapPacket packet : TestUtils.getIterable(BUG_FILE)) {
try {
if (packet.getFrameNumber() == 15) {
System.out.println(packet);
System.out.println(packet
.toHexdump(packet.size(), false, false, true));
}
packet.hasHeader(ip);
} catch (NullPointerException e) {
System.out.println(packet.getState().toDebugString());
System.out.println(packet.toHexdump());
throw e;
}
}
}
COM: <s> ski p test read entire suspect file </s>
|
funcom_train/35739630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int exec(String returnvar, String appName, String[] args, ShellEnv env) {
ShellApp app = loadApp(returnvar, appName, env);
if (null == app) {
consoleMessage("Could not load application : " + appName);
return ShellApp.appMiscError;
}
return exec(app, args);
}
COM: <s> load and run a shell application </s>
|
funcom_train/17133798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getCurrentIndex() {
InstructionHandle c = list.getStart();
for(int f = 0;; f++, c = c.getNext()) {
if(c == current)
return f;
else
if(c == list.getEnd())
break;
}
throw new IndexOutOfBoundsException("current handle is not contained in list!");
//should be not possible
}
COM: <s> gets the index of the current instruction </s>
|
funcom_train/1024087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object get(Object member) throws IllegalArgumentException, IllegalAccessException {
if (!isReadable())
throw new IllegalStateException("Property " + propertyName + " of " + memberClass
+ " not readable");
try {
return getter.invoke(member, EMPTY_ARGS);
} catch (InvocationTargetException e) {
throw new UndeclaredThrowableException(e.getTargetException());
}
}
COM: <s> gets the value of this property for the specified object </s>
|
funcom_train/12661423 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CommandLine parseArgs(final String[] args) throws DepotSetupException {
final CommandLineParser parser = new PosixParser();
try {
cli = parser.parse(options, args);
} catch (ParseException e) {
help();
throw new DepotSetupException(e);
}
initArgs();
return cli;
}
COM: <s> processes the command line input </s>
|
funcom_train/8986014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getCurrentLoginUserList() {
ArrayList result = new ArrayList(this.hashLoginUser.values());
for (int i=0; i<result.size();i++) {
AuditLoginOut auditRecord = (AuditLoginOut)result.get(i);
auditRecord.setRecordCount(result.size());
auditRecord.setRowNum(i+1);
}
return(result);
}
COM: <s> get current login user list </s>
|
funcom_train/19259646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifySelectionChanged() {
// Get the old size.
int size = this.getSize();
// Remove all the current list items.
fireIntervalRemoved(this, 0, size-1);
// Find the new element ID list selection index and size.
elemIdx = elemIDList.getSelectedIndex();
size = this.getSize();
// Add in the new list items.
fireIntervalAdded(this, 0, size-1);
attrList.setSelectedIndex(0);
}
COM: <s> method called if the selection in the element id list changes </s>
|
funcom_train/36640036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getMinorTickCount(int majorTickIndex) {
if (!isCalibrated)
calibrate();
if (majorTickIndex==majorTickCount-1)
return (int)((maxAxis-maxTick)/maxTick);
else if (majorTickIndex==-1) {
return (int)((minTick-minAxis)/(minTick/10));
} else
return minorTickCount;
}
COM: <s> returns the number of minor tick marks within each major one </s>
|
funcom_train/14273439 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBirthday(Date newValue) {
setFlags(BIRTHDAY_FLAG, newValue != null); // TODO why 3 flags?
setFlags(BIRTHDAY_FLAG_1, newValue != null); // TODO why 3 flags?
setFlags(BIRTHDAY_FLAG_2, newValue != null); // TODO why 3 flags?
this.birthday = newValue;
} // end-method
COM: <s> sets the birthday line for this record </s>
|
funcom_train/44089323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addProperNameProvider(final ProperNameProvider provider){
properNameProvider.add(provider);
final Enumeration keys = provider.getKeys();
while (keys.hasMoreElements()){
final String key = (String)keys.nextElement();
final String value = provider.getString(key);
if (key != null && value != null){
defaultNames.put(key, value);
}
}
}
COM: <s> adds the propernameprovider and asks him for </s>
|
funcom_train/6201010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void centerOnScreen() {
final Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
final Dimension splashSize = getContentPane().getPreferredSize();
setLocation(screenSize.width / 2 - (splashSize.width / 2), screenSize.height / 2 - (splashSize.height / 2));
}
COM: <s> centers the component in the screen </s>
|
funcom_train/9065264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawFooter(GC gc, String footer, int footerStartY, int footerHeight) {
Point extent = gc.textExtent(footer);
int y = footerStartY + (footerHeight - extent.y) / 2;
gc.drawString(footer, _delegate.getHierarchyRect().x, y);
}
COM: <s> draw the footer </s>
|
funcom_train/24088099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getAverageResidentSize() {
double sum = 0;
for (ExecutionFootprint fp : list) {
sum += fp.getResidentSize();
}
if (list.size()<=0) {
return 0.0;
}
BigDecimal d = new BigDecimal(sum/list.size());
return (d.setScale(2, BigDecimal.ROUND_UP)).doubleValue();
}
COM: <s> calculates the average resident size </s>
|
funcom_train/17932543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(long HRg, long HRl, long PC) {
if (responses.size() == 0) {
return true;
}
for (ResultDetectorEntry resultDetectorEntry : responses) {
if (resultDetectorEntry.getHRg() == HRg)
if (resultDetectorEntry.getHRl() == HRl)
if (resultDetectorEntry.getPC() == PC)
return true;
}
return false;
}
COM: <s> checks if the given context hrg hrl pc is among the detected contexts </s>
|
funcom_train/33278274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cacheBuiltins() {
ctors = new EnumMap<Builtins, BaseFunction>(Builtins.class);
for (Builtins builtin : Builtins.values()) {
Object value = ScriptableObject.getProperty(this, builtin.name());
if (value instanceof BaseFunction) {
ctors.put(builtin, (BaseFunction)value);
}
}
}
COM: <s> cache the built in ecmascript objects to protect them against </s>
|
funcom_train/46223931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEnvironment(String[] classpathEntries, String[] sourcepathEntries, String[] encodings, boolean includeRunningVMBootclasspath) {
this.classpaths = classpathEntries;
this.sourcepaths = sourcepathEntries;
this.sourcepathsEncodings = encodings;
if (encodings != null) {
if (sourcepathEntries == null || sourcepathEntries.length != encodings.length) {
throw new IllegalArgumentException();
}
}
this.bits |= CompilationUnitResolver.INCLUDE_RUNNING_VM_BOOTCLASSPATH;
}
COM: <s> sets the environment to be used when no </s>
|
funcom_train/10520405 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean shouldRun() {
final Project project = getProject();
if ( ifProperty != null &&
project.getProperty(ifProperty) == null ){
return false;
}
if (unlessProperty != null &&
project.getProperty(unlessProperty) != null) {
return false;
}
return true;
}
COM: <s> check whether this test should be run or not </s>
|
funcom_train/18052713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(String s) {
JLabel label= new JLabel(s);
label.setHorizontalAlignment(label.LEFT);
if (numElements == 0) {
label.setBounds(new Rectangle(115, 110, 295, 35));
label.setFont(f1);
} else {
label.setBounds(new Rectangle(115, 110 + numElements * 42, 295, 28));
label.setFont(f2);
}
label.setForeground(Color.white);
add(label);
}
COM: <s> adds a new label to the list representing the name of the player </s>
|
funcom_train/9920329 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getAction() {
int returnInt= 0;
System.out.print("(waiting)"); String decisionString= SavitchIn.readLine();
try{ returnInt= Integer.parseInt(decisionString);
}catch(java.lang.NumberFormatException e){
returnInt= TextIO.testForCommands();
}
return returnInt;
}
COM: <s> gets an action from the user </s>
|
funcom_train/42977033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMinorVersionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Version_minorVersion_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Version_minorVersion_feature", "_UI_Version_type"),
CommonPackage.Literals.VERSION__MINOR_VERSION,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the minor version feature </s>
|
funcom_train/37517931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_simple_class_3() {
try {
CompilationResults results =
compile( saveAs( "SimpleClass3.java",
"public class SimpleClass3;" ) );
expectFailure( results,
"File \"SimpleClass3.java\", line 1, character 27 error: Syntax error: unexpected token: ;" + NEWLINE );
} finally {
remove( "SimpleClass3.java" );
}
}
COM: <s> should fail on the malformed class declaration </s>
|
funcom_train/51387812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCategory(Category category) {
getLayerManager().addCategory(category.getName());
Category actual = getLayerManager().getCategory(category.getName());
for (Iterator i = category.getLayerables().iterator(); i.hasNext();) {
Layerable layerable = (Layerable) i.next();
actual.addPersistentLayerable(layerable);
}
}
COM: <s> called by java2 xml </s>
|
funcom_train/39371398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addState(State st) throws ObjectAlreadyInsertedException {
if (isState(st))
throw new ObjectAlreadyInsertedException(
Turingmachine.class.getCanonicalName()
+ " / the passed state is already part of this turingmachine / not inserting state");
states.add(st);
if (undoRedo != null && undoEnabled)
undoRedo.performedOperation(this, new Operation(
Operation.opType.OVAL_ADD, new Object[]{st}));
}
COM: <s> a state is added to the machine </s>
|
funcom_train/2985830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() {
if (m_isDialog) {
String id = m_perspectiveManager.createNewDialog(m_name, null);
m_perspectiveManager.showDialog(id, null);
m_perspectiveManager.closeScreen(id);
} else {
m_perspectiveManager.openNewScreen(m_name);
}
}
COM: <s> execute the show screen command </s>
|
funcom_train/3631370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setActiveTaxRate(int rate) {
if (rate == PRIMARY_TAX) {
useAltTax = false;
transTax.setRate(taxRecord.taxRate());
} else {
useAltTax = true;
transTax.setRate(taxRecord.altTaxRate());
}
applyTax();
}
COM: <s> switch to specific tax rate </s>
|
funcom_train/45541174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void markValid() {
fInvalidSelection= null;
SelectionChangedEvent event= new SelectionChangedEvent(this, fValidSelection);
Object[] listeners= fSelectionListeners.getListeners();
for (int i= 0; i < listeners.length; i++)
((ISelectionChangedListener) listeners[i]).selectionChanged(event);
listeners= fPostSelectionListeners.getListeners();
for (int i= 0; i < listeners.length; i++)
((ISelectionChangedListener) listeners[i]).selectionChanged(event);
}
COM: <s> marks this selection provider as being valid </s>
|
funcom_train/8716045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSegment(short startCode, short endCode, short idDelta) {
Segment s = new Segment(startCode, endCode, false);
// make sure we remove any old entries
segments.remove(s);
segments.put(s, new Integer(idDelta));
}
COM: <s> add a segment with an id delta </s>
|
funcom_train/2884669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean remove(Object key, Object entry) {
if( map.containsKey(key) ) {
Set s = (Set)map.get(key);
if( s.remove(entry) ) {
if( s.isEmpty() )
map.remove(key);
return true;
}
}
return false;
}
COM: <s> removes a specific association from the data structure </s>
|
funcom_train/26383106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMatchedValues(Object object,Map values) {
if (!matchProperties.hasMatches()) return;
Iterator properties=matchProperties.getMatchedIterator();
while (properties.hasNext()) {
MatchProperty matched=(MatchProperty)properties.next();
values.put(matched.getName(),matched.getOn(object));
}
}
COM: <s> adds values for the matched properties to the given map </s>
|
funcom_train/10860099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BytesRef getIndexedId() {
if (indexedId == null) {
IndexSchema schema = req.getSchema();
SchemaField sf = schema.getUniqueKeyField();
if (sf != null && id != null) {
indexedId = new BytesRef();
sf.getType().readableToIndexed(id, indexedId);
}
}
return indexedId;
}
COM: <s> returns the indexed id for this delete </s>
|
funcom_train/34127911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void buildDialog() {
main = new JPanel();
main.setLayout(new BorderLayout());
QPanel footer = new QPanel();
footer = this.buildFooter();
main.add(footer,BorderLayout.SOUTH);
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent we) {
cancelButtonPressed();
}
});
getRootPane().setDefaultButton(okButton);
setDefaultCloseOperation( HIDE_ON_CLOSE);
}
COM: <s> builds the dialog for the constructors </s>
|
funcom_train/22388131 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeAssigneesForAction(int id) {
// Remove all assignments in the action assignees table
SqlUpdate removeAssignments = new SqlUpdate(dataSource, "DELETE FROM ACTION_ASSIGNEES WHERE ACTION_ID = ?");
removeAssignments.declareParameter(new SqlParameter(Types.NUMERIC));
removeAssignments.update(id);
}
COM: <s> remove the assignees for a specific action </s>
|
funcom_train/44896917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean changeJobProperty(String functionName) {
Vector params = new Vector();
params.addElement(id_);
Object retVal = null;
try {
retVal = caller_.invoke(functionName, params);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if (retVal instanceof Boolean) {
return ((Boolean) retVal).booleanValue();
} else {
return false;
}
}
COM: <s> utility method that is called from the mark done accept jobs etc methods </s>
|
funcom_train/10873646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void or(DocIdSetIterator iter) throws IOException {
if (iter instanceof OpenBitSetIterator && iter.docID() == -1) {
final OpenBitSetIterator obs = (OpenBitSetIterator) iter;
or(obs.arr, obs.words);
} else {
int doc;
while ((doc = iter.nextDoc()) < numBits) {
set(doc);
}
}
}
COM: <s> does in place or of the bits provided by the </s>
|
funcom_train/15462272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ForeignObjectBase getLatestReference(String _key) throws Exception {
ForeignObjectBase now = null;
ForeignObjectBase latest = null;
do {
latest = now;
// Server.commandLine.println("Searching key " + _key + " in the Registry");
try {
now = references.get(_key);
_key = now.getStaticPath();
} catch (Exception e) {
now = null;
}
} while (now != null);
if (latest == null) throw new Exception ("No latest reference found");
return latest;
}
COM: <s> returns the latest reference from the provided object </s>
|
funcom_train/3833212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void moveUp(Theme theme) {
Debug.debugMethodBegin( );
int idx = themesL.indexOf( theme );
if ( idx < themesL.size()-1 ) {
Theme th = (Theme)themesL.get( idx+1 );
swapThemes( theme, th );
}
Debug.debugMethodEnd();
}
COM: <s> move a theme up for one index position index oldindex 1 </s>
|
funcom_train/11648818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Ini resolveIni() {
Ini ini = getIni();
if (CollectionUtils.isEmpty(ini)) {
log.debug("Null or empty Ini instance. Falling back to the default {} file.", DEFAULT_INI_RESOURCE_PATH);
ini = loadDefaultClassPathIni();
}
return ini;
}
COM: <s> tries to resolve the ini instance to use for configuration </s>
|
funcom_train/46454651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void destroy() {
setProperty("parent", null);
if(myProperties!=null) {
for(int i = 0; i<myProperties.length; i++) {
if(myProperties[i]!=null) {
myProperties[i].removeElementListener(this, i);
}
}
}
}
COM: <s> clears any trace of myself specially in the group </s>
|
funcom_train/17544451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FileLock lock() throws IOException {
FileLock current = getLock();
if (current != null) {
throw new FileAlreadyLockedException("File is already locked by [" + current + "]."); // NO18N
}
FileLock l = new FileLock();
lockReference = new WeakReference(l);
return l;
}
COM: <s> taking the lock from the file </s>
|
funcom_train/5459552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAccessDataFile(File accessDataFile) {
this.accessDataFile = accessDataFile;
// TODO: replace the whole configuration way. put all stuff of a datasource into one folder,
// including the config. this will make things a lot easier.
this.logfile = new File(accessDataFile.toString()+".logfile");
}
COM: <s> sets the file where the access data should be persisted </s>
|
funcom_train/9679927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTestConstructor() {
cat.info("Testing LOC for Test constructor");
final BinClass test = (BinClass) getType("Test");
assertEquals(
"LOC",
1,
LocMetric.calculate(test.getDeclaredConstructors()[0]));
cat.info("SUCCESS");
}
COM: <s> tests loc for test constructor </s>
|
funcom_train/13769955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void assertFormulaCell(String message, Cell expectedNumeric, Cell actualFormula, String expectedRef, double delta) {
assertNotNull("Test failed. Expected value must not be empty in cell " + expectedRef, expectedNumeric);
double expected = expectedNumeric.getNumericCellValue();
assertFormulaCell(message, expected, actualFormula, delta);
}
COM: <s> asserts formula calculation result with cells expected value </s>
|
funcom_train/13849529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop() {
Set s = tasks.keySet();
Object[] vals = s.toArray();
//Remove and interrupt all tasks
for (int i = 0; i < vals.length; i++) {
TaskManager.Task t = (TaskManager.Task) vals[i];
pool.remove(t);
}
//Erase record of tasks, results and the
//counting mechanism
tasks = new HashMap();
setPending(-1);
results = null;
}
COM: <s> halt all of the work being performed by </s>
|
funcom_train/10872961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createSequenceFile(Directory dir, String name, byte start, int size) throws IOException {
IndexOutput os = dir.createOutput(name, newIOContext(random));
for (int i=0; i < size; i++) {
os.writeByte(start);
start ++;
}
os.close();
}
COM: <s> creates a file of the specified size with sequential data </s>
|
funcom_train/3715477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HTMLNode firstChild () {
Enumeration list; // Enumeration of this node's children.
Object curr; // Current node from the list.
// Return nothing if this node has no children.
if (children == null) return null;
// Return the first child node.
list = children.elements();
while (list.hasMoreElements()) {
curr = list.nextElement();
// Return the first HTMLNode in the list.
if (curr instanceof HTMLNode)
return (HTMLNode) curr;
}
// Return nothing if there were no HTMLNodes in the list.
return null;
}
COM: <s> returns the first child of this node </s>
|
funcom_train/20356689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String parseParamDefaultValue(ParserInput parserInput, String raw) throws Exception {
Vector tokens = this.tokenizeParams(raw);
if (tokens.size() < 2) {
return null;
}
// table elements mess up default processing, so just return anything after
// the first parameter to avoid having to implement special table logic
String param1 = (String)tokens.elementAt(0);
String value = raw.substring(param1.length() + 1);
return JFlexParserUtil.parseFragment(parserInput, value, JFlexParser.MODE_PREPROCESS);
}
COM: <s> given template parameter content of the form name or name default </s>
|
funcom_train/42709786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JButton getJButtonAddBank() {
if (jButtonAddBank == null) {
jButtonAddBank = new JButton();
jButtonAddBank.setBounds(new Rectangle(10, 260, 121, 21));
jButtonAddBank.setText("Add");
jButtonAddBank.setActionCommand("AddAdress");
}
return jButtonAddBank;
}
COM: <s> this method initializes j button add bank </s>
|
funcom_train/20114816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isChanged(long check_time, ObjectModifyingHelper helper) {
if (null == helper)
return true;
try {
Collection names = getDependentObjects(helper);
for (Iterator i = names.iterator(); i.hasNext();) {
if (isSingleObjectChanged(helper, (String) i.next(), check_time)) {
return true;
}
}
}
catch (Exception e) {
return true;
}
return false;
}
COM: <s> returns was b include b changed since i check time i </s>
|
funcom_train/31947689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPodUUIDPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_EPod_podUUID_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_EPod_podUUID_feature", "_UI_EPod_type"),
SailuserdataPackage.Literals.EPOD__POD_UUID,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the pod uuid feature </s>
|
funcom_train/32138307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IDataSet readFile(File f) {
LogManager.logDebug("Start ImportDataSetAction.readFile", this);
IDataSet data;
readHeader(f);
if(null == labels || null == id)
return null;
data = DataSetFactory.createFilteredDataSet(id, labels);
data.readFromFile(f);
LogManager.logDebug("End ImportDataSetAction.readFile", this);
return data;
}
COM: <s> read the contents of the file into a new data set </s>
|
funcom_train/39491454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteLine (int row) {
if (m_order != null && row != -1 )
{
MOrderLine[] lineas = m_order.getLines();
int numLineas = lineas.length;
if (numLineas > row)
{
//delete line from order
lineas[row].delete(true);
for (int i = row; i < (numLineas - 1); i++)
lineas[i] = lineas[i + 1];
lineas[numLineas - 1] = null;
}
}
} // deleteLine
COM: <s> to erase the lines from order </s>
|
funcom_train/33722683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PathElementInfo getChild(String name) {
PropertyInfo prop = this.modelType.getProperty(name);
if (prop == null) {
return null;
} else {
GenericType childGT = getGenericTypeOfChild(prop);
PathElementInfo child = new PathElementInfo(prop.getName(), prop.getTypeInfo(), this, childGT);
return child;
}
}
COM: <s> returns the path element info for the child with he given name </s>
|
funcom_train/48613679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PersonalItem createRootPersonalItem(IrUser owner, String nameArticles, String name) {
GenericItem genericItem = new GenericItem(nameArticles, name);
genericItem.setOwner(owner);
VersionedItem versionedItem = new VersionedItem(owner, genericItem);
PersonalItem personalItem = owner.createRootPersonalItem(versionedItem);
personalItemDAO.makePersistent(personalItem);
return personalItem;
}
COM: <s> create the root personal item </s>
|
funcom_train/51741311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void logOutput(Process process) throws MojoExecutionException {
BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
String line;
try {
while ((line = reader.readLine()) != null) {
if (!this.swallowOutput) {
this.log.info("JUnit4x log: " + line);
}
}
} catch (IOException ioe) {
throw new MojoExecutionException("IOException thrown reading results from command line!",
ioe);
}
}
COM: <s> copies the log from the test to the maven log </s>
|
funcom_train/2461350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private AffectWord parseLine(String line) {
AffectWord value;
String[] text = line.split(" ");
String word = text[0];
double generalWeight = Double.parseDouble(text[1]);
double happinessWeight = Double.parseDouble(text[2]);
double sadnessWeight = Double.parseDouble(text[3]);
double angerWeight = Double.parseDouble(text[4]);
double fearWeight = Double.parseDouble(text[5]);
double disgustWeight = Double.parseDouble(text[6]);
double surpriseWeight = Double.parseDouble(text[7]);
value = new AffectWord(word, generalWeight, happinessWeight,
sadnessWeight, angerWeight, fearWeight, disgustWeight,
surpriseWeight, normalisator);
return value;
}
COM: <s> parses one line of the synesketch lexicon and returns the </s>
|
funcom_train/43091435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set remove(PySequence seq) {
Iterator it = seq.findGraphElements().iterator();
HashSet hs = new AnnoHashSet("remove(...)");
while(it.hasNext()) {
GraphElement element = (GraphElement)it.next();
if (element instanceof Node)
hs.addAll(removeNode((Node)element));
else if (element instanceof Edge)
hs.addAll(removeEdge((Edge)element));
}
lastMod = System.currentTimeMillis() - 1; // invalidate cache
return(hs);
}
COM: <s> remove nodes and edges from the graph </s>
|
funcom_train/32869519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Directory appendDiskFiles(Directory dir, List<Element> fileList) {
if(fileList != null) {
for(Element currentFile : fileList) {
KatalogFile dirFile = new KatalogFile();
dirFile.setFileName(currentFile.getAttributeValue("name"));
dir.appendFile(dirFile);
}
}
return dir;
}
COM: <s> append each file in the file list as an katalog file </s>
|
funcom_train/14244988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getAllSupertypes(MClassifier cls) {
Collection result = new HashSet();
Collection add = getSupertypes(cls);
do
{
Collection newAdd = new HashSet();
Iterator addIter = add.iterator();
while (addIter.hasNext())
{
MGeneralizableElement next = (MGeneralizableElement) addIter.next();
if (next instanceof MClassifier)
{
newAdd.addAll( getSupertypes((MClassifier) next) );
}
}
result.addAll(add);
add = newAdd;
add.removeAll(result);
}
while (! add.isEmpty());
return result;
}
COM: <s> this method returns all classifiers of which this class is a </s>
|
funcom_train/37389576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visitFieldAccessExpression(JFieldAccessExpression self) {
if (self.ident.equals(JAV_OUTER_THIS)) {// don't generate generated
// fields
print(self.prefix.getType(factory).getCClass().getOwnerType()
+ ".this");
return;
}
int index = self.ident.indexOf("_$");
if (index != -1) {
print(self.ident.substring(0, index)); // local var
} else {
self.prefix.accept(this);
print("." + self.ident);
}
}
COM: <s> prints a field expression </s>
|
funcom_train/36190324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CompositionPlan retrievePlan(CompositionID planID) {
Dbc.require(null != planID && planID.getId() > 0);
String mapKey = this.generateMapKey(planID.getId());
logger.fine("Retrieve a Composition plan - key " + mapKey);
Object object = compositionMap.get(mapKey);
return null != object ? (CompositionPlan) object : null;
}
COM: <s> retrieve a composition plan from the store by the composition id </s>
|
funcom_train/43343192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setScaleVar(int newScale) {
scaleVar = (newScale >= 0 ? newScale : 1);
// Adapt the scaling variables and make the scaling smooth
if (matUrlString.equals("/JMEResources/src/scaler.scalerSource/ninja.material")) {
scaleDouble = scaleVar;
scaleFloat = (float) scaleDouble;
model.setLocalScale(scaleFloat / 10);
}
scaler.simpleUpdate();
}
COM: <s> change the value of scale slider and set new scaler value in </s>
|
funcom_train/3832720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initPool() {
if ( pool == null ) {
pool = WCServicePool.getInstance( descriptors );
} else {
synchronized ( pool ) {
pool.destroy();
pool = WCServicePool.getInstance( descriptors );
}
}
pool.setMaxInstances( maxInstances );
// initialize XX WCServices to the pool
pool.fill( initInstances );
}
COM: <s> initializes the wcservice pool </s>
|
funcom_train/27787805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int checkType() throws TypeMismatchException {
if (getChild(0) != null) {
int type = getChild(0).checkType();
if (type == FLOAT_TYPE || type == INTEGER_TYPE) {
return getType();
} else {
throw new TypeMismatchException(this, type, FLOAT_TYPE);
}
}
return getType();
}
COM: <s> check the optional input argument to the expression </s>
|
funcom_train/11730179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCloneNodes() throws RepositoryException {
// clone referenceable node below non-referenceable node
String dstAbsPath = node2W2.getPath() + "/" + node1.getName();
workspaceW2.clone(workspace.getName(), node1.getPath(), dstAbsPath, true);
// there should not be any pending changes after clone
assertFalse(superuserW2.hasPendingChanges());
}
COM: <s> if successful the changes are persisted immediately there is no need to </s>
|
funcom_train/8091814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void permute( int v[], Random random ) {
for(int i = v.length - 1; i > 0; i-- ) {
int j = random.nextInt( i + 1 );
if( i != j ) {
int tmp = v[i];
v[i] = v[j];
v[j] = tmp;
}
}
}
COM: <s> permutes the elements of a given array </s>
|
funcom_train/2023368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void openDialog() {
setTree(getText());
// activate settings
try {
if (getConnector().isConnected())
setConnector(getConnector());
}
catch (Exception e) {
getParentFrame().println(e);
}
dialog.show();
if (dialog.approved())
setText(getTree());
}
COM: <s> opens the database dialog </s>
|
funcom_train/31438207 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void uninstall() {
if (mWindowMenu != null) {
for (int i = mWindowMenu.getMenuComponentCount() - 1;
i > mLastMenuItemIndex;
i--) {
mWindowMenu.remove(i);
}
}
mDesktop = null;
mWindowMenu = null;
mMenuItems.clear();
mOrderedWindows.clear();
}
COM: <s> reverse of install </s>
|
funcom_train/4175265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean checkState() {
boolean result = false;
if (emptyStringAllowed) {
result = true;
}
if (combo == null) {
result = false;
}
String txt = combo.getText();
result = (txt.trim().length() > 0) || emptyStringAllowed;
// call hook for subclasses
result = result && doCheckState();
if (result) {
clearErrorMessage();
} else {
showErrorMessage(errorMessage);
}
return result;
}
COM: <s> checks whether the text input field contains a valid value or not </s>
|
funcom_train/22864918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update() {
if (changeMask != 0) {
// calculate new shape transformation matrix
setShapeTransformationMatrix(new Matrix4d((double)radius, 0.0, 0.0, 0.0,
0.0, (double)radius, 0.0, 0.0,
0.0, 0.0, (double)radius, 0.0,
0.0, 0.0, 0.0, 1.0));
changeMask = 0;
}
// apply changes to <code>GL20ResourceShape</code>
super.update();
}
COM: <s> update the state of this code gl20 resource shape sphere code </s>
|
funcom_train/22112569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAlertFixed(Alert alert) {
alert.setFixed(true);
// If the alert definition is set to "recover", then we should enable it.
AlertDefinition def = alert.getAlertDefinition();
if (def.isWillRecover() && !def.isEnabled()) {
def.setEnabledStatus(true);
}
}
COM: <s> simply mark an alert object as fixed </s>
|
funcom_train/23991859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OWLClass addClass(String sID) {
//Create "Question" Individual and set the class
IRI iri = IRI.create(businessOntology.getOntologyID().getOntologyIRI() + "#" + sID);
OWLClass choice = df.getOWLClass(iri);
manager.addAxiom(businessOntology, df.getOWLDeclarationAxiom(choice));
return choice;
}
COM: <s> create a class </s>
|
funcom_train/43182244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateInsideTransaction(Role instance, Session openSession) {
log.debug("update Role instance");
try {
openSession.update(instance);
log.error("save or update successfull");
} catch (RuntimeException re) {
log.error("save or update failed");
throw re;
}
}
COM: <s> operator inside transation update instance into database </s>
|
funcom_train/32790885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createDDL() throws IllegalStateException {
if ((theSQLBuilder == null) || (theORMapping == null))
throw new IllegalStateException(
"Missing SQLBuilder and/or ORMapping.");
Iterator<Table> i = theORMapping.getTables().iterator();
theSQLBuilder.reset();
while (i.hasNext()) {
createTable(i.next());
}
i = theORMapping.getTables().iterator();
while (i.hasNext()) {
setForeignKeys(i.next());
}
theScript = theSQLBuilder.getCode();
scriptGenerated = true;
}
COM: <s> creates the ddl script </s>
|
funcom_train/24285292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ArrayList getVarList() {
if (null == varList) {
varList = new ArrayList();
Object firstKey = this.getInstances().firstKey();
Object first = this.instances.get(firstKey);
ProjopObject o = (ProjopObject)first;
Hashtable vars = o.getVars();
Enumeration keys = vars.keys();
while (keys.hasMoreElements()) {
String key = (String)keys.nextElement();
varList.add(key);
}
}
return varList;
}
COM: <s> returns an ordered list of all variable names </s>
|
funcom_train/40451857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear(String user) {
if (isDisabled()) {
return;
}
try {
UriCache uriCache = getCache(user);
uriCache.clear();
}
catch (Exception e) {
this.server.getLogger().warning("Error during DPD front-side cache clear: " +
StackTrace.toString(e));
}
}
COM: <s> clears the cache associated with user </s>
|
funcom_train/13999376 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getCbSelectAllEntities() {
if (cbSelectAllEntities == null) {
cbSelectAllEntities = new JCheckBox();
cbSelectAllEntities.setText(Messages.getString("ExportResults.SelectAll")); //$NON-NLS-1$
cbSelectAllEntities.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (cbSelectAllEntities.isSelected()) {
selectAllEntities();
} else {
clearEntitiesSelection();
}
}});
}
return cbSelectAllEntities;
}
COM: <s> this method initializes cb select all entities </s>
|
funcom_train/43170432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSIFResponse() {
SIFResponse resp = new SIFResponse(SIFGUID.next(),1,false);
System.out.println(resp);
assertTrue(resp.toString().contains("SIF_Response"));
assertTrue(resp.toString().contains("SIF_Header"));
assertTrue(resp.toString().contains("SIF_RequestMsgId"));
assertTrue(resp.toString().contains("SIF_PacketNumber"));
assertTrue(resp.toString().contains("SIF_MorePackets"));
assertTrue(resp.toString().contains("SIF_ObjectData"));
}
COM: <s> test method for </s>
|
funcom_train/20882537 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseAndAdd(String line) {
StringTokenizer tokenizer = new StringTokenizer(line," ");
String phone = tokenizer.nextToken();
float mean = Float.parseFloat(tokenizer.nextToken());
float stddev = Float.parseFloat(tokenizer.nextToken());
phoneDurations.put(phone, new PhoneDuration(mean,stddev));
}
COM: <s> creates a word from the given input line and adds it to the </s>
|
funcom_train/13875205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIsDerivedPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Property_isDerived_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Property_isDerived_feature", "_UI_Property_type"),
EmofPackage.Literals.PROPERTY__IS_DERIVED,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the is derived feature </s>
|
funcom_train/4521153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(VistaProcesoElectoralCols entity) {
LogUtil.log("saving VistaProcesoElectoralCols instance", Level.INFO,
null);
try {
entityManager.persist(entity);
LogUtil.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
LogUtil.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved vista proceso electoral cols </s>
|
funcom_train/19036370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removePostWatch(PID pid) {
if(isConnected()) {
try {
synchronized(this) {
this.getOutputStream().writeInt(ClientMessageCode.REMOVEPOSTWATCH.getIndex());
pid.sendData(this.getOutputStream());
this.getOutputStream().flush();
}
} catch (IOException e) {
this.messageFailed(e);
}
}
}
COM: <s> removes any post watch from the specified post </s>
|
funcom_train/22236762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setCapBits(SceneGraphObject sgo) {
Class<? extends SceneGraphObject> cls = sgo.getClass();
@SuppressWarnings("rawtypes")
Map bits_map = Collections.EMPTY_MAP;
if (overrideCapBitsMap != null)
bits_map = overrideCapBitsMap;
else if (requiredCapBitsMap != null)
bits_map = requiredCapBitsMap;
int[] bits = (int[]) bits_map.get(cls);
int size = (bits == null) ? 0 : bits.length;
for (int i = 0; i < size; i++)
sgo.setCapability(bits[i]);
}
COM: <s> set the frequency bits on this scene graph object according to the </s>
|
funcom_train/19433690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean validateTilesMap( Map tiles ) {
Collection col = tiles.entrySet();
for ( Iterator it = col.iterator(); it.hasNext(); ) {
Map.Entry mapEntry = (Map.Entry) it.next();
if ( ! ( mapEntry.getKey() instanceof Integer )
|| !( mapEntry.getValue() instanceof TileModel ) ) {
return false;
}
}
return true;
}
COM: <s> verifies if the specified map has objects compatible with this class </s>
|
funcom_train/25026906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int strPosTest(String s, int offset, int pos, String[] strTests) {
// check to see if any of the elements in the array are found at
// offset + pos within the search string;
// returns true as soon as any are found
for (int n = 0; n < strTests.length; n++) {
if ((s.indexOf(strTests[n], offset) == offset + pos)) return n;
}
return -1;
}
COM: <s> tests whether any of an array of strings is found at </s>
|
funcom_train/3830676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String ret = "administrativearea = " + administrativearea + "\n" +
"city = " + city + "\n" +
"country = " + country + "\n" +
"deliverypoint = " + deliverypoint + "\n" +
"electronicmailaddress = " + electronicmailaddress + "\n" +
"postalcode =" + postalcode + "\n";
return ret;
}
COM: <s> tp string method </s>
|
funcom_train/6289525 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void attachFileSelection() {
Callback action = new FSBrowserOKAction();
FileSystemBrowser FSBrowser = new FileSystemBrowser(getSendMail().mujMail,getSendMail(), action,
FileSystemBrowser.ChoosingModes.FILES, Lang.get(Lang.FS_BROWSER_SELECT_FILE));
FSBrowser.startBrowser(StartupModes.IN_NEW_THREAD);
}
COM: <s> used to choose file to attach by browsing file system </s>
|
funcom_train/13390999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private WebsterConfigParameters getConfigurationParameters(String[] options) throws ConfigurationException {
WebsterConfigParameters websterConfigParms = new WebsterConfigParameters(this);
Configuration config = ConfigurationProvider.getInstance(options);
// get the webster config parameters
getWebsterConfigurationParameters(config, websterConfigParms);
// get the oar deplyer config parameters
getOarDeploymentParameters(config, websterConfigParms);
return websterConfigParms;
}
COM: <s> get the configuration parameters </s>
|
funcom_train/44221970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void extractFlow(Node top, StringBuffer sb) {
if (top == null)return; // in case of bug in media adaptor
Node n = top.getFirstLeaf();
if (n.bbox.width != 0 || n.bbox.height != 0) extractFlowFixed(top, sb);
else extractFlowStruct(top, sb);
}
COM: <s> traverse document tree and extract text </s>
|
funcom_train/23453146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addFromProcessPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ValueOf_fromProcess_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ValueOf_fromProcess_feature", "_UI_ValueOf_type"),
ProcessPackage.Literals.VALUE_OF__FROM_PROCESS,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the from process feature </s>
|
funcom_train/26282818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
System.out.println("start()");
for (int z = 0; z < 5; z++) {
players[z] = new Player(0, 0, "");
}
game = new CliGame(this);
cliNet = new CliNet(this, game, getDocumentBase());
cliNet.start();
}
COM: <s> starts an applet thread </s>
|
funcom_train/45612155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String get(double arc) {
Iterator<String> counter = pieceMap.keySet().iterator();
//the section angle nearest arc value
double theta = 0.0;
String piece = counter.next();
while (theta < arc && counter.hasNext()) {
piece = counter.next();
theta += theta(piece);
}
return piece;
}
COM: <s> get a piece where the first piece is 0 </s>
|
funcom_train/46457352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Job convert(Job job) throws RemoteException {
if(job instanceof LocalJob) {
Job remote = new RemoteJob(job);
jobs.put(remote, job);
return remote;
}
Object obj = (Job) jobs.get(job);
if(obj==null) return job;
return(Job) obj;
}
COM: <s> wraps a job for forwarding or unwraps it for replies </s>
|
funcom_train/8075997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void notifyTextListeners(TextEvent ge) {
Vector l;
synchronized (this) {
l = (Vector)m_textListeners.clone();
}
if (l.size() > 0) {
for(int i = 0; i < l.size(); i++) {
((TextListener)l.elementAt(i)).acceptText(ge);
}
}
}
COM: <s> notify all text listeners of a text event </s>
|
funcom_train/41381911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void move(IModelElement elementToRename, IModelElement destContainer, String newName) throws LPModelException{
//Create a renameElementOperation
MoveResourceElementsOperation op = new
MoveResourceElementsOperation(new IModelElement[]{elementToRename}, new IModelElement[]{destContainer}, new String[]{newName}, true);
op.processElements();
}
COM: <s> move rename a lpelement to another directory </s>
|
funcom_train/25603418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDependentFeatureUri(){
String dependentFeature = null;
StmtIterator stmt_iter = jenaModel.listStatements(
new SimpleSelector(null, OT.dependentVariables, (Resource) null));
if (stmt_iter.hasNext()){
dependentFeature = stmt_iter.next().getObject().as(Resource.class).getURI();
}
return dependentFeature;
}
COM: <s> returns the dependent features of the model </s>
|
funcom_train/12760893 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cell getCellAt(int aRow, int aColumn) {
/* check for out of bounds */
if (aRow < 0 || aRow >= getRowCount() ||
aColumn < 0 || aColumn >= getColumnCount()) {
return null;
}
Cell temp = (Cell)super.getValueAt(aRow, aColumn);
return temp;
}
COM: <s> this method gets the whole cell object located at the these </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.