__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/23635993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addVersionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SimulationModel_version_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SimulationModel_version_feature", "_UI_SimulationModel_type"),
CescsmodelPackage.Literals.SIMULATION_MODEL__VERSION,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the version feature </s>
|
funcom_train/37135640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public interface DBConnector {
/**
* The a connection to the database.
*
* @return
* JDBC connection to the database object.
*
* @throws SQLException
* Any SQL errors that may have occured during the connection attempt.
*/
public Connection getConnection() throws SQLException;
/**
* Returns the DatabaseType this database object is representing. This DatabaseType
* will be Vendor specific as defined in the DatabaseType enum structure.
*
* @return
* The type of database this is.
*/
public DatabaseType getDbType();
}
COM: <s> interface which allows retrieval of connection and database type information after </s>
|
funcom_train/19662767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int next(int bits) {
long oldseed, nextseed;
long seed = this.seed;
boolean seedEqualOldseed = false;
do {
oldseed = seed;
nextseed = (oldseed * multiplier + addend) & mask;
seedEqualOldseed = false;
if(seed == oldseed) {
seed = nextseed;
seedEqualOldseed = true;
}
} while (!seedEqualOldseed);
return (int)(nextseed >>> (48 - bits));
}
COM: <s> generates the next pseudorandom number </s>
|
funcom_train/39216855 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getString(String name, String encoding) throws UnsupportedEncodingException {
final Part part = this.partMap.get(name);
if (part == null)
return null;
final String theEncoding = encoding == null ? defaultEncoding : encoding;
return new String(part.data, theEncoding);
}
COM: <s> get the data of a part as a string </s>
|
funcom_train/10080091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public XADataCache getInstance() {
if (bdCache == null) {
try {
bdCache = new BizDocumentDataCache();
if (bdCache.isCacheCreated() == false) {
bdCache = null;
}
}
catch (final Throwable e) {
lf.printStackTrace(e);
return null;
}
}
return bdCache;
}
COM: <s> get instance of biz document data cache </s>
|
funcom_train/18898598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testQuery1() throws Exception {
String queryString =
"select $s $p $o from <rmi://" + hostName +
"/server1#> where $s $p $o ;";
String directAnswer = bean.executeQueryToString(queryString);
String soapAnswer = this.executeSoapCall(queryString);
assertEquals(
"A basic SELECT SOAP iTQL result is not the same as a direct call",
soapAnswer, directAnswer);
}
COM: <s> test the interpreter via a direct call and a soap call </s>
|
funcom_train/12081400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getItemCommand() {
if (itemCommand == null) {//GEN-END:|29-getter|0|29-preInit
// write pre-init user code here
itemCommand = new Command("Item 1", Command.ITEM, 0);//GEN-LINE:|29-getter|1|29-postInit
// write post-init user code here
}//GEN-BEGIN:|29-getter|2|
return itemCommand;
}
COM: <s> returns an initiliazed instance of item command component </s>
|
funcom_train/20270341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void replaceOriginalModuleInputsWithSpecialized() {
for (Node original : specializedInputRootsByOriginal.keySet()) {
Node specialized = specializedInputRootsByOriginal.get(original);
original.removeChildren();
List<Node> specializedChildren = Lists.newLinkedList();
while (specialized.getFirstChild() != null) {
original.addChildToBack(specialized.removeFirstChild());
}
}
}
COM: <s> replaces the original input roots of the initial module with </s>
|
funcom_train/44824260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public QueryParameter getQueryParamByName (String name) {
java.util.Iterator it = queryParams.iterator();
while (it.hasNext()) {
QueryParameter qp = (QueryParameter) it.next();
if (name.equals(qp.getName())) return qp;
}
return null;
}
COM: <s> get a query parameter based on its name </s>
|
funcom_train/27947947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void closeWindowForComponent(JComponent c) {
WorkSpaceInternalFrame frame = getFrame(c);
try {
frame.setClosed(true);
// then is called in automatic way onEditorRemove
}
catch(PropertyVetoException ex) {
DB.getLogger().addMessage("I can't close a frame: " + ex.getMessage());
}
}
COM: <s> p remove the window that contains the given panel </s>
|
funcom_train/22402236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonLoad() {
if (jButtonLoad == null) {
jButtonLoad = new JButton();
jButtonLoad.setText("Load");
jButtonLoad.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
if( isConnected) {
try {
udp.LoadIndex();
} catch (IOException e1) {
e1.printStackTrace();
}
}
}
});
}
return jButtonLoad;
}
COM: <s> this method initializes j button load </s>
|
funcom_train/4237331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetIdMesa() {
System.out.println("getIdMesa");
Mesa prueba = new Mesa();
Orden instance = new Orden();
instance.setIdMesa(prueba);
Mesa expResult = prueba;
Mesa result = instance.getIdMesa();
assertEquals(expResult, result);
}
COM: <s> test of get id mesa method of class data </s>
|
funcom_train/43894174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object oth) {
if (this == oth) {
return true;
}
if (oth instanceof PolygonSymbolizerImpl) {
PolygonSymbolizerImpl other = (PolygonSymbolizerImpl) oth;
return Utilities.equals(this.geometryPropertyName, other.geometryPropertyName)
&& Utilities.equals(fill, other.fill) && Utilities.equals(stroke, other.stroke);
}
return false;
}
COM: <s> compares this polygon symbolizer impl with another </s>
|
funcom_train/1060053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addReferencePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DiagramElement_reference_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DiagramElement_reference_feature", "_UI_DiagramElement_type"),
Di2Package.Literals.DIAGRAM_ELEMENT__REFERENCE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the reference feature </s>
|
funcom_train/11342122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updated(Dictionary<String, ?> config) {
m_lang = (String) config.get("lang");
m_words.clear();
String[] words = (String[]) config.get(WORDS);
for (String word : words) {
m_words.add(word);
}
}
COM: <s> our service will be initialized from config admin </s>
|
funcom_train/50022045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void build(){
setTitle(";Blink");
setSize(640,320);
setLocationRelativeTo(null);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setJMenuBar(new IBlinkMenuBar());
setContentPane(buildContentPane());
}
COM: <s> builds the frame </s>
|
funcom_train/31874977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void keyPressed(KeyEvent e) {
int code = e.getKeyCode();
if (code == KeyEvent.VK_DOWN || code == KeyEvent.VK_UP ||
code == KeyEvent.VK_RIGHT || code == KeyEvent.VK_LEFT) {
handleCursorKey(code);
} else {
tool().keyDown(this, e, code);
}
//checkdamage not necessary?
//(is already done in cmd&handleCursorKey&some tools?but not all?)
checkDamage();
}
COM: <s> handles key down events </s>
|
funcom_train/40336967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void incrStats(Collection<GraphNode> nodes) {
totalCount += nodes.size();
for (GraphNode node : nodes) {
ElementKindDescriptor descr = findDescriptor(node);
if (null == descr) {
otherCount++;
}
else {
int count = kindCounts.get(descr);
kindCounts.put(descr, count + 1);
}
}
}
COM: <s> update the current statistics for the new set of analysis nodes </s>
|
funcom_train/8987628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkRootIsHardDeleted(Integer rootID) throws ApplicationException {
boolean isDeleted = false;
//DmsDocumentDAObject dmsDocumentDAO = new DmsDocumentDAObject(sessionContainer, conn);
DmsRootDAObject dmsRootDAO = new DmsRootDAObject(sessionContainer, conn);
//if the document not exist, then mean is deleted.
isDeleted = !dmsRootDAO.checkDocExist(rootID);
return isDeleted;
}
COM: <s> checks the root is hard deleted or not </s>
|
funcom_train/46732498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setChargeItemId(Long chargeItemId) {
if (!(this.chargeItemId.longValue() == chargeItemId.longValue())) {
Long oldchargeItemId= 0L;
oldchargeItemId = this.chargeItemId.longValue();
this.chargeItemId = chargeItemId.longValue();
setModified("chargeItemId");
firePropertyChange(String.valueOf(INVOICECHARGES_CHARGEITEMID), oldchargeItemId, chargeItemId);
}
}
COM: <s> item being charged </s>
|
funcom_train/3133769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int append(ByteBuffer buffer, int count) throws IOException {
ByteBuffer segment = input.slice();
if(closed) {
throw new TransportException("Transport is closed");
}
int mark = input.position();
int size = mark + count;
if(count > 0) {
input.position(size);
segment.limit(count);
buffer.put(segment);
}
return count;
}
COM: <s> this will append bytes within the transport to the given buffer </s>
|
funcom_train/32018380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeColorModeHighlighting(){
int numComponents = colorModeLegend.getComponentCount();
for(int j=0; j<numComponents; j++){
JPanel panel = (JPanel) colorModeLegend.getComponent(j);
panel.setBorder(new LineBorder(Color.WHITE)); // is white really default ?
}
}
COM: <s> removes highlighting from the color mode legend </s>
|
funcom_train/45856532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void validateVerblijfsObject(nl.vrom.www.bag.stuf._0120.VerblijfsObject_type1[] param){
if ((param != null) && (param.length > 4)){
throw new java.lang.RuntimeException();
}
if ((param != null) && (param.length < 1)){
throw new java.lang.RuntimeException();
}
}
COM: <s> validate the array for verblijfs object </s>
|
funcom_train/3458292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize(VAIBuilderModel model) {
this.model = model;
String rootDirectory = (String)model.getPropertyList().get("vainstall.projectroot");
if (rootDirectory == null) {
rootDirectory = System.getProperty("user.dir");
}
directoryField.setText(rootDirectory);
}
COM: <s> since we need a reference to the root project directory </s>
|
funcom_train/14228202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize(Properties props) {
// handle the properties I care about
// load the addresses and associated terminals
boolean dynamic = this.getRawCapabilities().dynamicAddresses;
DomainMgr dm = this.setDomainMgr(new DomainMgr(this, dynamic));
if (!dynamic) {
dm.loadAddresses();
dm.loadTerminals();
}
// see if dynamic call querying is required
this.setCallMgr(new CallMgr(this, this.getRawCapabilities().throttle));
// turn me on
state = Provider.IN_SERVICE;
}
COM: <s> initialize the provider </s>
|
funcom_train/32764235 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TrialPoint getBestTrialPoint() {
int n = proxyV.size();
for (int i = 0; i < n; i++) {
ParameterProxy proxy = (ParameterProxy) proxyV.get(i);
Variable var = (Variable) proxyToVarMap.get(proxy);
variables.put(var, new Double(proxy.getValue()));
}
TrialPoint newTrialPoint = new TrialPoint(variables);
return newTrialPoint;
}
COM: <s> returns the best solution as the trial point class instance </s>
|
funcom_train/48046231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Instant plus(long amount, TimeUnit unit) {
if (unit == TimeUnit.SECONDS) {
return plusSeconds(amount);
} else if (unit == TimeUnit.MILLISECONDS) {
return plusMillis(amount);
} else if (unit == TimeUnit.NANOSECONDS) {
return plusNanos(amount);
}
return plus(Duration.of(amount, unit));
}
COM: <s> returns a copy of this duration with the specified duration added </s>
|
funcom_train/36556181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JEditorPane getJEditorPane() {
if (jEditorPane == null) {
jEditorPane = new JEditorPane();
jEditorPane.setBounds(new Rectangle(122, 9, 361, 22));
jEditorPane.setText("= ");
jEditorPane.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyTyped(java.awt.event.KeyEvent e) {
jButton1.setEnabled(true);
}
});
}
return jEditorPane;
}
COM: <s> this method initializes j editor pane </s>
|
funcom_train/42642905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCreatorPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_IElement_creator_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_IElement_creator_feature", "_UI_IElement_type"),
DigitalHPSPackage.Literals.IELEMENT__CREATOR,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the creator feature </s>
|
funcom_train/28277569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean validate() {
// Check that at least one type of data has been selected
if (!taskListCheckBox.getSelection() && !taskActivationHistoryCheckBox.getSelection()
&& !taskContextsCheckBox.getSelection()) {
return false;
}
// Check that a destination dir has been specified
if (destDirText.getText().equals("")) {
return false;
}
return true;
}
COM: <s> returns true if the information entered by the user is valid </s>
|
funcom_train/32753736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BeamExcursion getBeamExcursion( final Orbit orbit ) {
if ( _sequence != null ) {
if ( _needsUpdate ) {
generateMap();
}
final MutableBeamExcursion beamExcursion = new MutableBeamExcursion( _sequence );
final List<CoordinateTransfer> coordinateTransfers = _coordinateTransfers;
for ( final CoordinateTransfer transfer : coordinateTransfers ) {
final BeamMarkerRecord record = transfer.getBeamMarkerRecord( orbit );
if ( record != null ) {
beamExcursion.addRecord( record );
}
}
return new BeamExcursion( beamExcursion );
}
else {
return null;
}
}
COM: <s> get a beam excursion from an orbit </s>
|
funcom_train/32057526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testApplyMap() {
Map map1 = new TreeMap();
Map map2 = new TreeMap();
String str1 = "red";
String str2 = "green";
String str3 = "blue";
String str4 = "yellow";
String str5 = "purple";
map2.put(str1, str1);
map2.put(str2, str2);
map2.put(str3, str3);
GraphConstants.setRemoveAll(map1, true);
Map map3 = GraphConstants.applyMap(map1, map2);
assertTrue(map3.size() == 3);
}
COM: <s> this function tests the apply map function of the graph constants class </s>
|
funcom_train/41080602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void focusGained(FocusEvent e) {
if (getText().length() == 0) return;
this.oldValue = value;
numberFormat.setGroupingUsed(false);
setText( numberFormat.format(value));
numberFormat.setGroupingUsed(this.isGrouping());
selectAll();
}
COM: <s> invoked when a component gains the keyboard focus </s>
|
funcom_train/44827047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDelegate (IEnumSvc[] delegateArray) {
delegates.clear();
for (int i=0; delegateArray != null && i < delegateArray.length; i++) {
if (delegateArray[i] instanceof IComposed) {
delegates.add(delegateArray[i]);
} else {
throw new IllegalArgumentException ("Delegate does not implement IComposed: " + delegateArray[i]);
}
}
}
COM: <s> set the array of delegate enumsvc services to use </s>
|
funcom_train/19909579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ToStringBuilder append(String field, Object[] arr) {
appendField(field);
builder.append('{');
boolean oldfirst = first;
first = true;
if (arr != null) {
for (Object item : arr) {
append(null, item);
}
}
first = oldfirst;
builder.append('}');
return this;
}
COM: <s> append array field </s>
|
funcom_train/22261066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void receiveFile(Socket s, OutputStream out, Representation representation) throws IOException {
InputStream in = representation.getInputStream(s);
byte buf[] = new byte[BUFSIZ];
int nread;
while (((nread = in.read(buf, 0, BUFSIZ)) > 0))// && keepGoing)
{
out.write(buf, 0, nread);
}
in.close();
}
COM: <s> reads data from the given socket and converts it from the </s>
|
funcom_train/21058233 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addParameter(final String name, final String value) {
if (value == null) {
throw new IllegalArgumentException();
}
List<String> list = params.get(name);
if (list == null) {
list = new ArrayList<String>();
params.put(name, list);
}
list.add(value);
}
COM: <s> adds a new value to a given parameter name </s>
|
funcom_train/44869157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private WCMDrawGeometricBean getSPoint() {
if (sPoint == null) {
sPoint = new WCMDrawGeometricBean();
sPoint.setFillColor(Color.magenta);
sPoint.setShape(WCMDrawGeometricBean.CROSS);
sPoint.setV(7);
sPoint.setColor(Color.magenta);
sPoint.setY1(getSOfT());
sPoint.setX1(getTInput());
sPoint.setH(7);
if (presentation) {
sPoint.setLineWidth(3);
sPoint.setV(9);
sPoint.setH(9);
}
}
return sPoint;
}
COM: <s> this method initializes s point </s>
|
funcom_train/35045263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void _send(byte[] data, int offset, int length, boolean acquire_lock) throws Exception {
if(acquire_lock)
send_lock.lock();
try {
doSend(data, offset, length);
updateLastAccessed();
}
catch(InterruptedException iex) {
Thread.currentThread().interrupt(); // set interrupt flag again
}
finally {
if(acquire_lock)
send_lock.unlock();
}
}
COM: <s> sends data using the out output stream of the socket </s>
|
funcom_train/47393628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Organism getRandomFitOrganism() {
int count = 0;
double fitness = 0;
double rand = 1;
Organism organism = null;
while (fitness < rand) {
organism = getRandomOrganism();
/* if looped over 1/10 of the pop - select a random organism */
if (count++ > (getMaxPopulationSize() / 10)) {
return organism;
}
fitness = organism.getFitness();
rand = RandomHelper.nextDouble();
}
return organism;
}
COM: <s> selects a random organism based on fitness high fitness increases </s>
|
funcom_train/19825075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getStartOnLaunchBundles() {
ArrayList res = new ArrayList();
for (Iterator i = archives.iterator(); i.hasNext(); ) {
BundleArchive ba = (BundleArchive)i.next();
if (ba.getStartOnLaunchFlag()) {
res.add(ba.getBundleLocation());
}
}
return res;
}
COM: <s> get all bundles tagged to start at next launch of framework </s>
|
funcom_train/3080800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireColumnAdded(TableColumnModelEvent e) {
EventListener[] listeners = listenerList.getListeners(TableColumnModelListener.class);
for (int index = 0; index < listeners.length; ++index) {
((TableColumnModelListener) listeners[index]).columnAdded(e);
}
}
COM: <s> notifies listeners that a column was added </s>
|
funcom_train/46124781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStackTrace(Exception e) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append(e.getMessage());
for (StackTraceElement s: e.getStackTrace()) {
stringBuffer.append("\n\tat "+ s.getClassName()+"."+s.getMethodName()+"("+s.getFileName()+":"+s.getLineNumber()+")");
}
this.stackTrace = stringBuffer.toString();
}
COM: <s> assign the stack trace to the stack trace attribute </s>
|
funcom_train/45640923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyPreAction(ProviderEvent event) {
ProviderListener listeners[] = this.listeners;
for (int i = 0; i < listeners.length; i++) {
ProviderListener listener = listeners[i];
if (log.isDebugEnabled()) {
log.debug("Notify preAction to " + listener + " event = " + event);
}
listener.preAction(event);
}
}
COM: <s> send the given event as a pre event to all registered provider listeners </s>
|
funcom_train/45773963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processWindowEvent(WindowEvent e) {
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
int result = JOptionPane.showConfirmDialog(this, "Do you want to close?.", "Close", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
if (result == 0) {
dispose();
super.processWindowEvent(e);
}
}
}
COM: <s> processing closing event </s>
|
funcom_train/35323005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void onTermination(Throwable exception) {
try {
terminate = true;
cancelTasks();
pool.deregisterWorker(this, exception);
} catch (Throwable ex) { // Shouldn't ever happen
if (exception == null) // but if so, at least rethrown
exception = ex;
} finally {
if (exception != null)
UNSAFE.throwException(exception);
}
}
COM: <s> performs cleanup associated with termination of this worker </s>
|
funcom_train/32656850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void open() {
super.open();
setTitle(dataSource.getName());
File file = null;
if(dataSource instanceof FileDataSource) {
FileDataSource fileDataSource = (FileDataSource)dataSource;
file = new File(fileDataSource.getFile().getPath());
}
else {
file = new File(dataSource.getName());
}
serTree.setFile(file);
}
COM: <s> opens class file in internal window </s>
|
funcom_train/46975933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addedFile(String path, org.opheliadev.ophelia.repository.File file) {
if (parent.verifyCriteria(path)) {
AbstractEvent ae = new AbstractEvent();
ae.type = stdEventType._et_added;
ae.obj = org.opheliadev.ophelia.ObjectHelper.narrow(file);
parent.eventQueue.add(ae);
}
}
COM: <s> operation added file </s>
|
funcom_train/36442302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void menuSetup(JMenuBar mb) {
//first menu
menu = new JMenu("Start");
menu.setMnemonic(KeyEvent.VK_S);
//menu items
createMenuItem(menu, "New Client...",
KeyEvent.VK_N, "NewClient");
createMenuItem(menu, "Exit...",
KeyEvent.VK_E, "Exit");
mb.add(menu);
}
COM: <s> creates a menu and adds items in a list </s>
|
funcom_train/26485642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set getConnectionNames() {
logger.info("METHOD_ENTRY getConnectionNames");
// TODO: Add JNDI-bound names
Set names = null;
if (connConfigs == null) {
names = new HashSet();
} else {
names = connConfigs.keySet();
}
logger.info("METHOD_EXIT getConnectionNames, returning =" + names);
return names;
}
COM: <s> returns the names of configured database connections </s>
|
funcom_train/9139088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void symbolToIdStringBuffer(StringBuffer sb) {
sb.setLength(0);
sb.append(mIdToSymbol.size() + "\r\n");
Set<String> symbolSet = mSymbolToId.keySet();
Iterator<String> iter = symbolSet.iterator();
while (iter.hasNext()) {
String symbol = iter.next();
sb.append(symbol + " <--> " + symbolToID(symbol) + "\r\n");
}
}
COM: <s> formatted the string based representation of this symbol talb object </s>
|
funcom_train/31940087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setMultipleImplements() {
_implementsComboBox.removeAllItems();
ArrayList aList = _currentTable.getImplements();
for (int i = 0; i < aList.size(); i++) {
_implementsComboBox.addItem(aList.get(i));
}
}
COM: <s> sets the multiple interface attributes of the jhibernate table settings panel gui object </s>
|
funcom_train/29768763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFkColumnDeclaration(MapNestedField nestedField) {
String colName = translateFieldToColumn(nestedField, false);
String dbType = getTypeMap().map(nestedField.getType());
String create = Strings.concat(colName, " ", dbType);
return create;
}
COM: <s> creates the declaration of a foreign key db column </s>
|
funcom_train/1310062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifyFailed(MessageClient client) {
MessageQueue failedMessages = client.getFailedMessageQueue();
while (!failedMessages.isEmpty()) {
Message message = failedMessages.poll();
synchronized (client.getMessageListeners()) {
for (MessageListener listener : client.getMessageListeners()) {
sendToListener(message, listener, MessageListener.MESSAGE_EVENT.FAILED);
}
}
synchronized (messageListeners) {
for (MessageListener listener : messageListeners) {
sendToListener(message, listener, MessageListener.MESSAGE_EVENT.FAILED);
}
}
}
}
COM: <s> process the list of certified messages that have failed </s>
|
funcom_train/47497803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadProcesseds(){
String pathHeader = appProps.getProperty("dirProcessados") + appProps.getProperty("controleProcessados");
DefaultTableModel model = new DefaultTableModel();
model.setDataVector(new FileUtils().getHeaderProcessed(pathHeader),headerTableProcessed);
tableProcessed.setModel(model);
}
COM: <s> this method load the processeds files in the processados folder </s>
|
funcom_train/3076931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int execute(String command) {
String message = "Execute command during ognl expression evaluation: " + command;
getAntProject().log(message);
Commandline cmdLine = Luntbuild.parseCmdLine(command);
MyExecTask exec = new MyExecTask("execute", getAntProject(), null, cmdLine, null,
null, org.apache.tools.ant.Project.MSG_VERBOSE);
return exec.executeAndGetResult();
}
COM: <s> execute the specified command </s>
|
funcom_train/25577581 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCloseIcon(String file) {
Icon newIcon = null;
if (file != null)
newIcon = Factory.getIcon(file, "Close");
if (newIcon == null) // use default
newIcon = Factory.DEFAULT_CLOSE_ICON;
// the dockable's actions are created with types
// equaled to the string representation of the resulting states.
Action action = getActionForType(STATE_CLOSE);
if (action != null) {
action.putValue(Action.SMALL_ICON, newIcon);
}
}
COM: <s> sets the close icon for this dockable </s>
|
funcom_train/37267961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setFocusOwner(Component c){
/*
* The focus owner has to be a child of the "tv screen".
*/
boolean ok = Util.isChildOf(ScreenContainer.getInstance(), c);
if(ok){
log.debug("new focus owner: " + c.toString());
focusOwner = c;
}
}
COM: <s> sets the current focus owner in the screen </s>
|
funcom_train/11729167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRestoreProp() throws RepositoryException {
Node propParent = p.getParent();
propParent.checkout();
Version v = propParent.checkin();
propParent.checkout();
p.setValue(newPropValue);
p.save();
propParent.restore(v, false);
assertEquals("On restore of a OnParentVersion-COMPUTE property P, the current P in the workspace will be left unchanged.", p.getString(), newPropValue);
}
COM: <s> test the restore of a on parent version compute property </s>
|
funcom_train/40741739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFocusColumn(GridColumn column) {
checkWidget();
//TODO: check and make sure this item is valid for focus
if (column == null || column.isDisposed() || column.getParent() != this || !column.isVisible()) {
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
focusColumn = column;
intendedFocusColumn = column;
}
COM: <s> sets the focused item to the given column </s>
|
funcom_train/3391106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printStackMapTable(MethodData method) {
StackMapTableData[] stack_map_tb = method.getStackMapTable();
int number_of_entries = stack_map_tb.length;
if (number_of_entries > 0) {
out.println(" StackMapTable: number_of_entries = " + number_of_entries);
for (StackMapTableData frame : stack_map_tb) {
frame.print(this);
}
}
out.println();
}
COM: <s> print stack map table attribute information </s>
|
funcom_train/50820741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int processChain() {
reset();
int count = 0;
for (; count < this.maxRunCount; ++count) {
//System.out.println("Chain execution step " + count + ", chain size = " + this.chain.size());
if (! processNextGoal()) {
break;
}
}
return count;
}
COM: <s> execute the entire chain until its empty </s>
|
funcom_train/50142283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getValidation(String objRef) {
String val = "(" + objRef + ".value.length >= " + min + " && ";
val += objRef + ".value.length <= " + max + ")";
if (required) {
val += " && " + super.getValidation(objRef);
}
return val;
}
COM: <s> returns the scriptcode to check the length of the validated string </s>
|
funcom_train/21125582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
// check argument
if(!((o != null) && (o instanceof ClockSyncTimestamp)))
return false;
// cast
ClockSyncTimestamp oCompareTS = (ClockSyncTimestamp) o;
// compare using the set time and originator
return ((oCompareTS.getTime() == this.getTime()) && (oCompareTS.getOriginatingSite().equals(this.getOriginatingSite())));
}
COM: <s> compares this timestamp with another timestamp </s>
|
funcom_train/3936347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getAttribute(String inXPath, String inAttribute) throws XPatherException {
if (docNode == null) return null;
Object[] lResult = docNode.evaluateXPath(inXPath);
return (lResult.length == 0) ? null : ((TagNode)lResult[0]).getAttributeByName(inAttribute);
}
COM: <s> returns the specified attributes value from the specified xpath element </s>
|
funcom_train/43118116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Image getIcon(final String name, final ClassLoader classLoader) {
if (resourcePool.containsKey(name)) {
return resourcePool.get(name);
}
final Image i = new Image(display, classLoader
.getResourceAsStream(name));
resourcePool.put(name, i);
return i;
}
COM: <s> gets icon with plugins classloader </s>
|
funcom_train/24262141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFieldValidationN4() {
try {
User user = (User) jenineHawthorn.clone();
user.setAffiliation("");
curationService.addUser(admin, user);
fail();
}
catch(MacawException exception) {
int totalNumberOfErrors
= exception.getNumberOfErrors();
assertEquals(1, totalNumberOfErrors);
int numberOfErrors
= exception.getNumberOfErrors(MacawErrorType.INVALID_USER);
assertEquals(1, numberOfErrors);
}
}
COM: <s> ensure that the affliation has a value </s>
|
funcom_train/6456907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ListTerm getSemanticallyNaiveAnnotations() throws JASDLException {
ListTerm annotsClone = (ListTerm) literal.getAnnots().clone(); // clone so as not to affect original literal
annotsClone.remove(getOntologyAnnotation());
return annotsClone;
//TODO: drop anon and named? uneccessary I think since they are isolated to architecture level.
}
COM: <s> returns all non jasdl annotations to this literal </s>
|
funcom_train/46824699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GoBoardComponent (GoModel model) {
// Call constructor in AbstractBoardComponent
super (model.getNumOfCells(), model.getNumOfCells(), CELL_SIZE, CELL_SPACING,
BORDER_WIDTH, DEFAULT_MOUSE_BORDER_WIDTH, false, false, true);
this.model = model; // link to model
// set colours
Color bgColor = new Color (100, 70, 34);
setColours (bgColor, bgColor, bgColor, Color.white);
}
COM: <s> constructor which creates the board </s>
|
funcom_train/22396228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendMessage(MessageNode messageNode) {
trackButtonClick("sendMessage");
if(messageNode instanceof OutgoingMessageNode) {
OutgoingMessageNode outgoingMessage = (OutgoingMessageNode)messageNode;
if(outgoingMessage.isSendAttempted() && !outgoingMessage.isSending()) {
if(validateMessageSender(outgoingMessage)) {
outgoingMessage.sendMessage();
}
}
}
}
COM: <s> send an outgoing message </s>
|
funcom_train/23271308 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setXAxisUpperMargin(double margin) {
XYPlot plot = (XYPlot) this.chart.getPlot();
if (plot != null) {
ValueAxis axis = plot.getDomainAxis();
double old = axis.getUpperMargin();
axis.setUpperMargin(margin);
firePropertyChange("xAxisUpperMargin", old, margin);
}
}
COM: <s> sets the upper margin for the x axis and fires a </s>
|
funcom_train/44592622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAngle() {
for (int i = 0; i < receivers.length; i++) {
approximatelyEquals(
"Angle not right for " + receivers[i],
StrictMath.atan2(
receivers[i].imaginaryPart(),
receivers[i].realPart()
),
receivers[i].angle());
}
}
COM: <s> test the method angle </s>
|
funcom_train/9828709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireJHDLWidgetEvent(Object obj, int id, ArrayList lst){
JHDLWidgetEvent event = new JHDLWidgetEvent(obj, id, lst);
for(int i = 0; i < JHDLWidgetEventListeners.size(); i++)
((JHDLWidgetEventListener)JHDLWidgetEventListeners.get(i))
.JHDLWidgetEventPerformed(event);
}
COM: <s> dispatches the given action to all of the listeners </s>
|
funcom_train/29986641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected PackageDoc getPackageDoc(final PackageDoc originalDoc) {
if (originalDoc == null) {
return null;
}
Object found = get(originalDoc);
if (found == null) {
found = this.factory.createPackageDoc(originalDoc);
put(originalDoc, found);
}
return (PackageDoc) found;
}
COM: <s> returns a wrapped instance of the supplied package doc object </s>
|
funcom_train/50385560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addProfile(Profile profile) throws Exception {
synchronized (profiles) {
String name = profile.getName();
if (profiles.containsKey(name)) {
throw new Exception("Profile already exists!");
}
profileNames.add(name);
profiles.put(name, profile);
persistProfileList();
}
synchronized (getChangeListeners()) {
Iterator<IProfileListViewer> iterator = getChangeListeners().iterator();
while (iterator.hasNext()) {
iterator.next().addProfile(profile);
}
}
}
COM: <s> add a profile to the profile list </s>
|
funcom_train/33149438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Properties getPlaceholders () {
Properties p = new Properties () ;
p.putAll ( _placeholders ) ;
/*
Iterator it = _placeholders.keySet().iterator() ;
while ( it.hasNext() ) {
String name = (String) it.next() ;
p.setProperty( name, _placeholders.getProperty( name ) ) ;
}
*/
return p ;
}
COM: <s> return a list of placeholders </s>
|
funcom_train/8568739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void linkTo(Node node, int weight) {
Link link = new Link(this, node, weight);
outputLinks.add(link);
node.inputLinks.add(link);
// If this was the first input link on the node, set the index to it.
if (node.inputLinks.size() == 1) {
node.inputIndex = 0;
}
}
COM: <s> links this node with the given node with the given weight </s>
|
funcom_train/9363452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetSync() {
if (DebugFlags.WEB_SYNC_MANAGER) {
Log.v(LOGTAG, "*** WebSyncManager resetSync ***");
}
if (mHandler == null) {
return;
}
mHandler.removeMessages(SYNC_MESSAGE);
Message msg = mHandler.obtainMessage(SYNC_MESSAGE);
mHandler.sendMessageDelayed(msg, SYNC_LATER_INTERVAL);
}
COM: <s> reset sync resets sync managers timer </s>
|
funcom_train/47291115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRemotePropertiesSeparator(String remotePropertiesSeparator) {
CommanderTask.validateAttribute(remotePropertiesSeparator, "remotePropertiesSeparator");
//Verifies that the property is a single char.
if (targetsSeparator.length() > 1) {
throw new BuildException("invalid remotePropertiesSeparator '" + remotePropertiesSeparator + "' : must be a single char.");
}
this.remotePropertiesSeparator = remotePropertiesSeparator;
}
COM: <s> sets the separator for the remote properties list </s>
|
funcom_train/1662718 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getNodeValue(String[] nodeNames, String defaultValue) {
SimpleXML node = rootNode;
int nodeIndex = 0;
while ((node != null) && (nodeIndex < nodeNames.length)) {
node = node.getNode(nodeNames[nodeIndex++]);
}
if (node == null) {
return defaultValue;
}
return node.getValue();
}
COM: <s> returns the value of a node </s>
|
funcom_train/19746806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object convertToDate(Class type, Object value) {
if ( value instanceof Date ) {
return value;
}
if ( value instanceof String ) {
try {
if ( StringUtils.isEmpty(value.toString()) ) {
return null;
}
return formatter.parse((String) value);
} catch ( Exception pe ) {
throw new ConversionException("Error converting String to Date");
}
}
throw new ConversionException("Could not convert " +
value.getClass().getName() + " to " +
type.getName());
}
COM: <s> converts specified object to code date code </s>
|
funcom_train/24364505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initSplashScreen() {
// create splash screen image for fast drawing
width = getWidth();
height = getHeight();
splashScreenImage = createImage(width, height);
splashScreenImageGraphics = splashScreenImage.getGraphics();
// load splash image and animated progress image
splashImage = getImage(GeoGebraApplet.class.getResource("splash.gif"));
progressImage = getImage(GeoGebraApplet.class
.getResource("progress.gif"));
// update splash screen image and paint it
updateSplashScreenImage();
}
COM: <s> initializes a loading screen to show progress of downloading jar files </s>
|
funcom_train/41262193 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_flags() {
FileETag etag;
int flags = FileETag.FLAG_CONTENT | FileETag.FLAG_MTIME
| FileETag.FLAG_SIZE;
etag = new FileETag();
assertEquals("Unexpected value", FileETag.DEFAULT_FLAGS, etag
.getFlags());
etag.setFlags(flags);
assertEquals("Unexpected value", flags, etag.getFlags());
}
COM: <s> test flags property access methods </s>
|
funcom_train/34988284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void detectPaths() throws ProgramNotFoundException {
setLaTeXPath(Program.findProgramPath("latex"));
setPDFLaTeXPath(Program.findProgramPath("pdflatex"));
setEpstopdfPath(Program.findProgramPath("epstopdf"));
setDvipngPath(Program.findProgramPath("dvipng"));
setMetaPostPath(Program.findProgramPath("mpost"));
setPDFViewerPath(Program.findPDFViewer());
setPSViewerPath(Program.findPSViewer());
}
COM: <s> sets the paths to the different programs needed by detecting them in the </s>
|
funcom_train/32156503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isDescendent(int id1, int id2) {
if (root.Id == id1)
for (int i = 0 ; i < children.size() ; i++) {
PriorityTree st = children.elementAt(i);
if (st.isInTree(id2))
return true;
}
else
for (int i = 0 ; i < children.size() ; i++) {
PriorityTree st = children.elementAt(i);
if (st.isDescendent(id1, id2))
return true;
}
return false;
}
COM: <s> another consistency check method is id1 a descendent of id2 </s>
|
funcom_train/44779108 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(String filename) {
FileWriter writer = null;
try {
writer = new FileWriter(filename);
write(writer);
}
catch (Exception e) {
e.printStackTrace();
}
finally {
if (writer != null) {
try {
writer.close();
}
catch (Exception e) {
}
}
}
}
COM: <s> writes this xml document to the specified file </s>
|
funcom_train/46632589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getText() {
//String txt = file.getName();
//int n = txt.lastIndexOf('.');
//if ((n > 0) && (n < (txt.length() - 1)))
// txt = txt.substring(0, n);
return file.getName();
}
COM: <s> returns the string to be used to display the tree node </s>
|
funcom_train/22555227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Questionnaire getSelectedQuestionnaire() {
if (this.questionnaireSelectedIndex==-1) log.error("getSelectedQuestionnaire(): there's no index pre selected for questionnaire (-1)");
if (getQuestionnaire(this.questionnaireSelectedIndex)==null) log.error("getSelectedQuestionnaire(): there's no questionnaire for index ("+this.questionnaireSelectedIndex+")");
return getQuestionnaire(this.questionnaireSelectedIndex);
}
COM: <s> returns the currently selected questionnaire set by the selectionindex </s>
|
funcom_train/10521954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void check(Declaration decl, AnnotationProcessorEnvironment env) {
_locale = Locale.getDefault();
if (decl instanceof TypeDeclaration) {
//
// Check method annotations
//
Collection<? extends MethodDeclaration> methods = ((TypeDeclaration) decl).getMethods();
for (MethodDeclaration method : methods) {
checkSQL(method, env);
}
} else if (decl instanceof FieldDeclaration) {
//
// NOOP
//
} else {
//
// NOOP
//
}
}
COM: <s> invoked by the control build time infrastructure to process a declaration of </s>
|
funcom_train/37015769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String registerLearningObject(LearningObjectDTO newLO) {
try {
String uri = toolService.createLearningObject(newLO);
LearningObjectDTO dto = getLearningObject(uri);
loCache.put(uri, dto);
} catch (ArchiveException e) {
e.printStackTrace();
} catch (RemoteException e) {
System.out.println("registerLO(): " + e);
}
return null;
}
COM: <s> registers a learning object in the toolservice </s>
|
funcom_train/38994620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean existsDirectedPath(T node1, T node2){
if(!this.nodes.contains(node1) || !this.nodes.contains(node2))
throw new IllegalArgumentException("The nodes are not in this graph.");
if(node1 == node2)
return true;
// we perform a DFS.
Stack<T> stack = new Stack<T>();
stack.addAll(this.getChildren(node1));
while(!stack.isEmpty()){
T node = stack.pop();
if(node == node2)
return true;
stack.addAll(this.getChildren(node));
}
return false;
}
COM: <s> checks whether there is a directed path from node1 to node2 </s>
|
funcom_train/2867530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeBill(long billID) throws Exception{
CSVControllerIn csvControllerIn = new CSVControllerIn();
Iterator it = csvControllerIn.getBills().iterator();
if ( csvControllerIn.getBills().contains(getBill(billID)) ){
csvControllerIn.getBills().remove(getBill(billID));
} else{
throw new ValueException("bill does not exist: " + billID);
}
}
COM: <s> removes a bill from the list of bills </s>
|
funcom_train/40627224 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UserInfo addUser(String aUserId) {
UserInfo theUserInfo = null;
if(aUserId != null) {
UserInfo theNewUserInfo = new UserInfo(aUserId);
theUserInfo = myUserMap.putIfAbsent(aUserId, theNewUserInfo);
if(theUserInfo == null) {
theUserInfo = theNewUserInfo;
}
}
return theUserInfo;
}
COM: <s> creates and adds the </s>
|
funcom_train/32800529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addBooleanLiteralPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_BooleanLiteralExpCS_booleanLiteral_feature"),
getString("_UI_PropertyDescriptor_description",
"_UI_BooleanLiteralExpCS_booleanLiteral_feature",
"_UI_BooleanLiteralExpCS_type"),
OclPackage.Literals.BOOLEAN_LITERAL_EXP_CS__BOOLEAN_LITERAL,
true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null, null));
}
COM: <s> this adds a property descriptor for the boolean literal feature </s>
|
funcom_train/33703973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTagsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_Operation_tags_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_Operation_tags_feature", "_UI_Operation_type"),
BankabeulePackage.Literals.OPERATION__TAGS, true, false, true,
null, null, null));
}
COM: <s> this adds a property descriptor for the tags feature </s>
|
funcom_train/269593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept (File dir, String name) {
final Iterator exts = this.extensionsSet.iterator();
while (exts.hasNext())
{
String file = exts.next().toString();
log.Applidebug("name: "+file);
if (name.toLowerCase().startsWith(file+"."))
{
return true;
}
}
return false;
}
COM: <s> retrieved if a file accepted by the filter </s>
|
funcom_train/45045706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getExtraInfoEpisodeField(int index, String name) {
String data = getString("SELECT Extra_Info_Episodes." +quote+ name +quote+" "+
"FROM Extra_Info_Episodes "+
"WHERE Extra_Info_Episodes.ID="+index+";", name);
/* Returns the data... */
return data;
}
COM: <s> returns the extra info field with index index named name </s>
|
funcom_train/5445128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMethodRef_ClassName(int Index) {
if ((Index < 1) || (Index >= ItemType.length) || (ItemType[Index] != CONSTANT_METHOD_REF))
throw new ClassFormatError("Constant pool item does not exist");
return getClass(((Integer)ItemValue1[Index]).intValue());
}
COM: <s> get the class name from a method ref constant </s>
|
funcom_train/34849857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void render()
{
/*
* Each model will have its own texture. There is no way around this bind() method at the moment.
*
* The texture will be wrapped around the model based on the texture coordinates of the model.
*/
texture.bind();
GL11.glRotatef(ANGLE_OFFSET, 0.0f, 0.0f, 1.0f);
/*
* Draw the model which was saved as an OpenGL list of vertices and faces.
*/
GL11.glCallList(listID);
}
COM: <s> renders the model which is a display list </s>
|
funcom_train/23181907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Polygon2D getViewPort() {
Polygon2D viewPort = new Polygon2D();
double coorX = -translateX;
double coorY = -translateY;
double coorX1 = coorX + plotterWidth / scale;
double coorY1 = coorY + plotterHeight / scale;
viewPort.addPoint(coorX, coorY);
viewPort.addPoint(coorX1, coorY);
viewPort.addPoint(coorX1, coorY1);
viewPort.addPoint(coorX, coorY1);
return viewPort;
}
COM: <s> returns corner coordinates of the view port </s>
|