__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/48521735 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onMessage(Message recvMsg) {
ServiceLocator sl = new ServiceLocator();
boolean sendmail = sl.getBoolean(JNDINames.SEND_MAIL);
try {
TextMessage recdTM = (TextMessage) recvMsg;
Mail mail = (Mail) marshaller.unmarshal(new StringSource(recdTM.getText()));
if (sendmail) {
doWork(mail);
} else {
logger.info("Received mail message.\n" + mail);
}
} catch (Exception je) {
throw new EJBException(je);
}
}
COM: <s> receive a jms message containing the order that is completed generate </s>
|
funcom_train/34562553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int parentPre(final String path) {
try {
final Nodes n = xquery(pn2xp(dirname(path), true));
return n.size() == 0 ? -1 : n.nodes[0];
} catch(final QueryException ex) {
ex.printStackTrace();
return -1;
}
}
COM: <s> evaluates given path and returns the pre value of the parent directory if </s>
|
funcom_train/13894224 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFrame(JFrame frame) {
if(this.frame != null) {
throw new IllegalStateException("setFrame may only be called once (with a non-null value)");
}
if(frame != null) {
JMenu menu = Plugin.Utils.getMenuNamed(frame.getJMenuBar(), "Commands", true);
menu.add(showDialog);
}
this.frame = frame;
}
COM: <s> registers a menu item commands sm command </s>
|
funcom_train/16910802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAttachedCouplings(final Attribute attribute) {
for (Coupling<?> coupling : getCouplings()) {
if (attribute instanceof Consumer<?>) {
if (coupling.getConsumer() == attribute) {
removeCoupling(coupling);
}
}
if (attribute instanceof Producer<?>) {
if (coupling.getProducer() == attribute) {
removeCoupling(coupling);
}
}
}
}
COM: <s> removes all couplings associated with a producer or consumer </s>
|
funcom_train/25656692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public String endodeLongArray(long[] ints) {
if (ints == null || ints.length == 0)
return "";
StringBuffer tmp = new StringBuffer(1024);
tmp.append(ints[0]);
for (int i = 1 ; i < ints.length ; i++) {
tmp.append(',');
tmp.append(ints[i]);
}
return tmp.toString();
}
COM: <s> encode the long array as a string </s>
|
funcom_train/10671068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Result testAddListenerMethod() {
try {
if (!eventSetDescriptor[0].getAddListenerMethod().getName().equals(
"addFredListener")) {
throw new Exception("mistake in getAddListenerMethod");
}
return passed();
} catch (Exception e) {
e.printStackTrace();
return failed(e.getMessage());
}
}
COM: <s> verify that get add listener method of event set descriptor returns correct </s>
|
funcom_train/29682726 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void formatDirectory(File directory) {
String[] children = directory.list();
if (children != null) {
for (String name : children) {
logger.debug("looking at " + directory.getAbsolutePath()
+ File.separator + name);
File temp = new File(directory.getAbsolutePath()
+ File.separator + name);
if (temp.isDirectory()) {
formatDirectory(temp);
} else if (name.endsWith(".java")) {
formatFile(temp);
} else {
logger.debug("is nothing");
}
}
}
}
COM: <s> format files within a directory </s>
|
funcom_train/14092967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void centerOnScreen(final Window win) {
Dimension screenDim = Toolkit.getDefaultToolkit().getScreenSize();
Rectangle frameDim = win.getBounds();
win.setLocation((screenDim.width - frameDim.width) / 2, (screenDim.height - frameDim.height) / 2);
}
COM: <s> this method is used to center the specified window on the screen </s>
|
funcom_train/11720852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Transaction createTransaction(DavResourceLocator locator, LockInfo lockInfo) {
if (TransactionConstants.GLOBAL.equals(lockInfo.getScope())) {
return new GlobalTransaction(locator, new TxActiveLock(lockInfo));
} else {
return new LocalTransaction(locator, new TxActiveLock(lockInfo));
}
}
COM: <s> build the transaction object associated by the lock </s>
|
funcom_train/10947640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearPaymentMethodsById(List<String> paymentMethodIdsToRemove) {
if (UtilValidate.isEmpty(paymentMethodIdsToRemove)) return;
for (Iterator<CartPaymentInfo> iter = paymentInfo.iterator(); iter.hasNext();) {
CartPaymentInfo info = iter.next();
if (paymentMethodIdsToRemove.contains(info.paymentMethodId)) {
iter.remove();
}
}
}
COM: <s> remove all the payment methods based on the payment method ids </s>
|
funcom_train/20790094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WorkflowScript findByPrimaryKey(Integer id) {
try {
WorkflowScript workflowScriptBean = (WorkflowScript) getSession().get(WorkflowScript.class, id);
return workflowScriptBean;
} catch (HibernateException ex) {
log.error("findByPrimaryKey: failed with hibernate exception", ex);
throw convertHibernateAccessException(ex);
}
}
COM: <s> find a code workflow script code by its primary key </s>
|
funcom_train/23638672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processRequest(SOAPEnvelope req, SOAPEnvelope resp) throws SOAPException {
try{
SubjectDescription user = getCurrentUser();
MatchRule owner = createMatchRule("owner");
log.debug("User: " + user);
//router.setSlaUser(user);
router.processRequest(req,resp, user, owner);
} catch(SOAPException se){
throw new SOAPException(se.getMessage(),se);
} catch(RemoteException se){
throw new SOAPException(se.getMessage(),se);
}
}
COM: <s> process the request </s>
|
funcom_train/3057701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void bind(Object object, String name) throws ObjectNameNotUniqueException {
try {
Session s = getSession();
Name nameObj = new Name( name, object.getClass(), s.save(object) );
s.save(nameObj);
//TODO: handle ObjectNameNotUniqueException properly
}
catch (HibernateException he) {
throw new ODMGRuntimeException( he.getMessage() );
}
}
COM: <s> bind a name to a persistent object making the object persistent if necessary </s>
|
funcom_train/32795344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void instrumentMarkedRwiElements() {
CollectMarkedElementsVisitor cmev = new CollectMarkedElementsVisitor();
rwiElements = cmev.getAllMarkedElements();
for (int i = 0; i < rwiElements.length; i++) {
addElementTypesToNode((RwiNode) rwiElements[i]);
}
run();
for (int i = 0; i < rwiElements.length; i++) {
removeElementTypesFromNode((RwiNode) rwiElements[i]);
}
}
COM: <s> instruments elements that are currently marked by running the injector </s>
|
funcom_train/18740110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getGrammarName() {
StringBuilder result =
new StringBuilder(new File(
GRAMMAR_FILTER.stripExtension(this.grammarLocation)).getName());
if (this.startGraphs != null) {
result.append(START_STATE_SEPARATOR);
result.append(this.startGraphs);
}
return result.toString();
}
COM: <s> convenience method to derive the name of a grammar from its location </s>
|
funcom_train/19398035 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void debit( long cents ) throws OverdraftException {
// 5 + 6 > 10
if( account.bal + change >= cents ) {
// 4 = max( 0, 10 - 6 )
low = Math.max(low, cents - change);
// -4 = 6 - 10
change = change - cents;
} else {
/*
* overdraft.
*/
high = Math.min( high, cents - change );
throw new OverdraftException();
}
}
COM: <s> debit the account </s>
|
funcom_train/22573207 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setLabelCursor() {
if (fReadOnly) {
fInstruction.setText(""); //$NON-NLS-1$
fLabelRating.setCursor(Display.getDefault().getSystemCursor(SWT.CURSOR_ARROW));
fBody.setCursor(Display.getDefault().getSystemCursor(SWT.CURSOR_ARROW));
} else {
fInstruction.setText(Messages.RatingsWidget_0);
fLabelRating.setCursor(Display.getDefault().getSystemCursor(SWT.CURSOR_HAND));
fBody.setCursor(Display.getDefault().getSystemCursor(SWT.CURSOR_HAND));
}
}
COM: <s> set the label cursor depending on read only status </s>
|
funcom_train/37079164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // private UpdateTransaction commitGeneNameChange() {
// String guiName = getGuiName();
// String oldName = getEditedFeature().getName();
// UpdateTransaction ut = makeUpdateTransaction(TransactionSubpart.NAME);
// ut.setPreValue(oldName);
// ut.setSubpartValue(guiName);
// ut.editModel();
// return ut;
// }
COM: <s> set model name to gui name return name update transaction </s>
|
funcom_train/34810637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printDistToClosestATGAndTranscript(BindingRegion[] br){
int num = br.length;
int atg =0;
int trans = 0;
for (int i=0; i< num; i++) {
atg = findDistToClosestATG(br[i]);
trans = findDistToClosestTranscript(br[i]);
System.out.println(
br[i].getRank()+"\t"+
br[i].getChromosome()+"\t"+
br[i].getStart()+"\t"+
br[i].getEnd()+"\t"+
atg+"\t"+
trans
);
}
}
COM: <s> prints rank chrom start stop distance to closest atg to closest transcript start </s>
|
funcom_train/50505338 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getRelationships(IClassInfo srcBean) {
List resultList = new LinkedList();
Iterator iter = relationships.iterator();
while(iter.hasNext()) {
Relationship item = (Relationship) iter.next();
if(item.isSourcePartner(srcBean)) {
resultList.add(item);
}
}
return resultList;
}
COM: <s> gets the source relationships of the given bean from </s>
|
funcom_train/886106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireAction(String name) {
Action[] actions = getActions();
Hashtable<Object, Action> actionHash = new Hashtable<Object, Action>();
int count = actions.length;
for (int h = 0; h < count; h++) {
actionHash.put(actions[h].getValue(Action.NAME), actions[h]);
}
Action action = actionHash.get(name);
action.actionPerformed(new ActionEvent(this, 0, "null")); //$NON-NLS-1$
}
COM: <s> fires the action with the given name </s>
|
funcom_train/47024273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleCloseGroup(int groupLevel) {
if(groupLevel == 3 && !this.fontNr.equals("") && !this.fontName.equals("")) {
this.importHeader.importFont(this.fontNr, this.fontName);
this.fontNr = "";
this.fontName = "";
}
}
COM: <s> handles closing of a group during parsing </s>
|
funcom_train/7725306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void squareClicked(int row, int column) {
boolean isMyTurn;
try {
isMyTurn = player.isThisPlayersTurn();
} catch (RemoteException ex) {
isMyTurn = false;
ex.printStackTrace();
}
if (isMyTurn) {
setMark(row, column, myMark);
try {
player.getOpponent().makeMove(row, column);
} catch (RemoteException ex) {
ex.printStackTrace();
}
}
}
COM: <s> called by the square class when an empty square is clicked </s>
|
funcom_train/32061641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void destroyColony(Game game) {
statecheckNull(this.colony, "colony",
"A colony cannot be destroyed on planet "
+ this.getFullPlanetName()
+ " because the planet does not have one.");
Colony tempColonyRef = this.colony;
this.colony = null;
game.colonies.remove(tempColonyRef);
}
COM: <s> destroys the colony on this planetoid and removes it from the game list </s>
|
funcom_train/8676064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put(int key, int value) {
int i = indexOf(key);
if (_filled[i]) {
_value[i] = value;
} else {
_key[i] = key;
_value[i] = value;
_filled[i] = true;
grow();
}
}
COM: <s> adds a key value pair to the map </s>
|
funcom_train/33517255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void flushBase64() throws IOException {
if (position > 0) {
if (encode) {
out.write(encode3to4(b4, buffer, position, options));
position = 0;
} else {
throw new IOException("Base64 input not properly padded.");
} // end else: decoding
} // end if: buffer partially full
} // end flush
COM: <s> method added by phil </s>
|
funcom_train/13995267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComponent createContentPanel() {
if (presentations.length == 1) {
return createViewPanel(presentations[0]);
} else if (presentations.length == 2) {
JSplitPane splitpane = new JSplitPane(
JSplitPane.VERTICAL_SPLIT,
createViewPanel(presentations[0]),
createViewPanel(presentations[1]));
splitpane.setBorder(null);
splitpane.setDividerSize(1);
((BasicSplitPaneUI) splitpane.getUI()).getDivider().setBorder(null);
return splitpane;
}
throw new FatalException("Maximum of two view configs supported");
}
COM: <s> creates a component to display the presentations </s>
|
funcom_train/11676135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object mediateForInlineScript(MessageContext synCtx) throws ScriptException {
ScriptMessageContext scriptMC = new ScriptMessageContext(synCtx, xmlHelper);
Bindings bindings = scriptEngine.createBindings();
bindings.put(MC_VAR_NAME, scriptMC);
Object response;
if (compiledScript != null) {
response = compiledScript.eval(bindings);
} else {
response = scriptEngine.eval(scriptSourceCode, bindings);
}
return response;
}
COM: <s> perform mediation with static inline script of the given scripting language </s>
|
funcom_train/43098704 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetAllPossibleStereotypesStereotypeAndMEContainedInSubPackage() {
Collection stereotypes = Model.getExtensionMechanismsHelper()
.getAllPossibleStereotypes(models, theClass);
assertTrue("The \"" + theStereotype
+ "\" isn't returned, but is possible.", stereotypes
.contains(theStereotype));
}
COM: <s> this method tests the working of get all possible stereotypes when the </s>
|
funcom_train/5395562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetFloatValue() {
System.out.println("getFloatValue");
DBPFloat instance = new DBPFloat();
float expResult = 0.0F;
float result = instance.getFloatValue();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get float value method of class org </s>
|
funcom_train/7293139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getLimit(int field, int limitType) {
switch (field) {
case DAY_OF_WEEK:
case AM_PM:
case HOUR:
case HOUR_OF_DAY:
case MINUTE:
case SECOND:
case MILLISECOND:
case ZONE_OFFSET:
case DST_OFFSET:
case DOW_LOCAL:
case JULIAN_DAY:
case MILLISECONDS_IN_DAY:
return LIMITS[field][limitType];
}
return handleGetLimit(field, limitType);
}
COM: <s> return a limit for a field </s>
|
funcom_train/40440068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasReadPermission(final User user) {
if(readForAll)
return true;
for (final Permission p : permissions)
if (p.getUser() != null) {
if (p.getUser().equals(user) && p.getRead())
return true;
} else if (p.getGroup().contains(user) && p.getRead())
return true;
return false;
}
COM: <s> checks if the specified user has permission to read this file </s>
|
funcom_train/38541446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SourceReader getIncludeReader(String includeString) {
includeString = convertedPath(includeString);
for (int i=0; i<includes.length; ++i){
String fileName = includes[i]+File.separator+includeString;
try{
return new FileSourceReader(fileName);
}catch(FileNotFoundException e){}
}
return null;
}
COM: <s> returns a a </s>
|
funcom_train/50914690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setXFract(double[] value) throws RuntimeException {
if (value == null) {
throw new RuntimeException("null xFract");
}
List<CMLAtom> atomList = this.getAtoms(value.length, "xFract");
int i = 0;
for (CMLAtom atom : atomList) {
atom.setXFract(value[i++]);
}
}
COM: <s> array of fractional x coordinate </s>
|
funcom_train/648564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSlider getSldCompression() {
if (sldCompression == null) {
sldCompression = new JSlider();
sldCompression.setMaximum(9);
sldCompression.setMajorTickSpacing(1);
sldCompression.setPaintLabels(false);
sldCompression.setPaintTicks(true);
sldCompression.setSnapToTicks(true);
sldCompression.addChangeListener(new javax.swing.event.ChangeListener() {
public void stateChanged(javax.swing.event.ChangeEvent e) {
mainGui.setDirty();
}
});
}
return sldCompression;
}
COM: <s> this method initializes j slider </s>
|
funcom_train/2369887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetTurn() {
synchronized (this) {
this.turn = 0;
if (Preference.DEBUGGING.isSet()) {
this.turn = DEBUG_START_TURN;
}
this.state = GameState.ENDED;
this.trickTable = new TrickTable();
this.clearCardSet();
this.clearTricks();
this.fireChange();
}
}
COM: <s> clears the whole game object except registered players </s>
|
funcom_train/20128872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getFractionalDigits(String column) throws SQLException {
if (index.containsKey(column)) {
return fractionalDigits[index.get(column).intValue()];
} else {
final SqlExceptionState state = SqlExceptionState.COLUMN_NOT_FOUND;
throw new SQLException("Column " + column + " does not exist in resultset.", state.name(), state.code());
}
}
COM: <s> returns the designated columns fractional digits </s>
|
funcom_train/7623507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRow(Object[] columnValues) {
if (columnValues.length != columnCount) {
throw new IllegalArgumentException("columnNames.length = "
+ columnCount + ", columnValues.length = "
+ columnValues.length);
}
int start = rowCount++ * columnCount;
ensureCapacity(start + columnCount);
System.arraycopy(columnValues, 0, data, start, columnCount);
}
COM: <s> adds a new row to the end with the given column values </s>
|
funcom_train/12368821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSlider getNodeSizeSlider() {
if (nodeSizeSlider == null) {
nodeSizeSlider = new JSlider();
nodeSizeSlider.addChangeListener(new javax.swing.event.ChangeListener() {
public void stateChanged(javax.swing.event.ChangeEvent e) {
int tmpValue = nodeSizeSlider.getValue();
setNodeSize(tmpValue);
getNodeSizeTextField().setText(Integer.toString(tmpValue));
}
});
}
return nodeSizeSlider;
}
COM: <s> this method initializes node size </s>
|
funcom_train/43424884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addQuality() throws WriteException {
sheet = workbook.createSheet("Qualities", 1);
Label feature = new Label(0, 0, "Feature Id");
sheet.addCell(feature);
Label id = new Label(1, 0, "Id");
sheet.addCell(id);
Label definition = new Label(2, 0, "Defintion");
sheet.addCell(definition);
}
COM: <s> adds a quality sheet to the workbook </s>
|
funcom_train/5260893 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDefinesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_OrganizationUnit_defines_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_OrganizationUnit_defines_feature", "_UI_OrganizationUnit_type"),
BmmPackage.Literals.ORGANIZATION_UNIT__DEFINES,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the defines feature </s>
|
funcom_train/43254745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setCloneableInternal(Cloneable c) {
if (c == null) {
throw new IllegalArgumentException("null Cloneable");
}
if (!this.cloneable.getClass().equals(c.getClass())) {
throw new IllegalArgumentException("Change of type from '" + this.cloneable.getClass().getName() + "' to '" + c.getClass().getName() + "'");
}
this.cloneable = c;
}
COM: <s> allows modification of the cloneable member </s>
|
funcom_train/24376097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initProperties() {
// Complete omar-common loading sequence at first
Properties commonProps = CommonProperties.staticLoadProperties(getClass().getClassLoader(), new Properties());
// Load Provider Properties
props = loadProperties(commonProps);
// initializes <omar.home>
initOmarHomeDir(props);
// Substitute variables
substituteVariables(props);
logProperties("Registry properties", props);
}
COM: <s> initializes the properties performing the full loading sequence </s>
|
funcom_train/46624517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test6() {
expectBuildExceptionContaining("test6", "Manifest is invalid - section starts with incorrect attribute",
"Invalid Manifest");
String output = getLog();
boolean hasWarning = output.indexOf("Manifest sections should start with a \"Name\" attribute") != -1;
assertEquals("Expected warning about section not starting with Name: attribute", true, hasWarning);
}
COM: <s> new section not starting with name attribute </s>
|
funcom_train/2929198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkModelElementWithEvent (Element e) {
checkContraints (e, true);
final List<DesignErrorDescription> errors = Checks.getErrorsForElement (e);
Checks.fireConstraintsCheckedEvent (new ConstraintsCheckedEvent (e, ConstraintsCheckedEvent.CONSTRAINTS_CHECKED, errors));
}
COM: <s> send event after checking </s>
|
funcom_train/10253579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIsolation(int level) {
if (isInMidTransaction()) {
throw Error.error(ErrorCode.X_25001);
}
if (level == SessionInterface.TX_READ_UNCOMMITTED) {
sessionContext.isReadOnly = Boolean.TRUE;
}
if (isolationLevel != level) {
isolationLevel = level;
database.logger.writeToLog(this, getTransactionIsolationSQL());
}
}
COM: <s> sets isolation for the next transaction only </s>
|
funcom_train/24920335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isPatriarchOwner(String fName, User user) {
boolean isOwner = false;
try {
this.selectUsersPatriarchByFamilyName.setInt(1, user.getId());
this.selectUsersPatriarchByFamilyName.setString(2, fName);
ResultSet rs = this.selectUsersPatriarchByFamilyName.executeQuery();
isOwner = rs.first();
} catch (SQLException e) {
e.printStackTrace();
}
return isOwner;
}
COM: <s> determines whether the supplied code user code is the owner of a </s>
|
funcom_train/13255743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkForSave(String msg) {
// Checks if there's an old graph to save
if (data != null && data.isChanged()) {
int resultValue = JOptionPane.showConfirmDialog(this, msg,
"JABA - Warning", JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.WARNING_MESSAGE);
if (resultValue == JOptionPane.YES_OPTION) {
save();
return true;
}
if (resultValue == JOptionPane.CANCEL_OPTION) {
return true;
}
}
return false;
}
COM: <s> shows a confirmation dialog to save before new model or exit operations </s>
|
funcom_train/45064229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getSaveButton() {
if (saveButton == null) {
saveButton = new JButton();
saveButton.setIcon(new ImageIcon(Tools.loadBufferedImage(iconsPath + "disk.png")));
saveButton.setToolTipText("Save");
saveButton.addMouseListener(new MouseAdapter() {
public void mouseExited(MouseEvent e) {
statusBar.setText("");
}
public void mouseEntered(MouseEvent e) {
statusBar.setText("Save the current model");
}
});
}
return saveButton;
}
COM: <s> this method initializes save button </s>
|
funcom_train/43246237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDiagnosis() {
System.out.println("getDiagnosis");
AdmissionObject instance = new AdmissionObject();
String expResult = "";
String result = instance.getDiagnosis();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get diagnosis method of class org </s>
|
funcom_train/33606580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConcatenate() {
System.out.println("concatenate");
assertEquals("{(1-4)(2-3)(5-14)(6-11)(7-10)(8-9)(12-13)(15-16)}",TemperleyLiebTerm.concatenate(instance2,instance8).toString());
}
COM: <s> tests concatenate method </s>
|
funcom_train/19054322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnDirChooser() {
if (btnDirChooser == null) {
btnDirChooser = new JButton();
btnDirChooser.setText("...");
btnDirChooser.setSize(new Dimension(31, 20));
btnDirChooser.setLocation(new Point(405, 45));
btnDirChooser.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
onBtnDirChooserClicked();
}
});
}
return btnDirChooser;
}
COM: <s> this method initializes btn dir chooser </s>
|
funcom_train/21952337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Container createEditorWindow(String title, PropertyEditorUI editor, Container window) {
JInternalFrame jif = new JInternalFrame(title, true, true);
PropertyEditorPane pep = createPropertyEditorPane(editor.getManager(), (SwingPropertyEditor) editor, jif);
jif.getContentPane().add(pep);
jif.pack();
jif.setSize(jif.getPreferredSize());
return jif;
}
COM: <s> this method returns an editor window a jframe in this </s>
|
funcom_train/46763270 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UnitMeasureConversion getConversion(UnitMeasure fromUnit, UnitMeasure toUnit) throws UnitOfMeasureConversionNotFoundException {
if (fromUnit.equals(toUnit)) {
return new UnitMeasureConversion(fromUnit, toUnit, new Value(1));
} else if (hasConversion(fromUnit, toUnit)) {
return getConversionOrNull(fromUnit, toUnit);
} else {
throw new UnitOfMeasureConversionNotFoundException(fromUnit + " --> " + toUnit);
}
}
COM: <s> return the unit of measure conversion </s>
|
funcom_train/31689272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put(String sQName, String sHREF, Object obj) {
this.m_qnameLookup.put(sQName, obj);
this.m_hrefLookup.put(sHREF, obj);
this.m_qname2href.put(sQName, sHREF);
this.m_href2qname.put(sHREF, sQName);
}
COM: <s> adds a new object to the lookup </s>
|
funcom_train/24194791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void internalSpawn() {
this.executionChild = ((ModelInterrupter) this.getModelTask()).getChild().createExecutor(
this.getExecutor(), this);
this.executionChild.addTaskListener(this);
/*
* Register the ExecutionInterrupter so that
* ExecutionPerformInterruption can find it.
*/
this.getExecutor().registerInterrupter(this);
this.executionChild.spawn(this.getContext());
}
COM: <s> spawns its child and registers itself into the list of interrupters of </s>
|
funcom_train/18590008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onReceiveAsk(MessageAsk ask){
synchronized (syncObj) {
Collections.sort(bids,compBids);
if(bids.size() > 0){
MessageBid bid = (MessageBid)bids.getFirst();
double priceAsk = ask.getPrice();
double priceBid = bid.getPrice();
if(priceBid >= priceAsk){
double finalPrice = (priceAsk + priceBid) / 2;
super.match(ask,bid,finalPrice);
bids.remove(bid);
}
else{
asks.add(ask);
}
}
else{
asks.add(ask);
}
}
}
COM: <s> called when a ask is sent by a provider </s>
|
funcom_train/48181399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BasicStroke mkDashedStroke(Stroke origStroke) {
float[] dashArray = {3,3};
if (origStroke instanceof BasicStroke) {
BasicStroke orig = ( BasicStroke)origStroke;
return new BasicStroke(orig.getLineWidth(), orig.getEndCap(),
orig.getLineJoin(), orig.getMiterLimit(),
dashArray, 0);
} else {
return new BasicStroke(1, BasicStroke.CAP_ROUND,
BasicStroke.JOIN_BEVEL, 1,
dashArray, 0);
}
}
COM: <s> creates a dashed basic stroke instance similar to the original stroke </s>
|
funcom_train/22848939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isFileEmpty() throws WrongWorkflowException {
if ((fileName == null) || ("".equals(fileName.trim()))) {
throw new WrongWorkflowException(" must"
+ " be set befor using isFileEmpty()");
}
File f = new File(fileName);
if ((!f.exists()) || (f.length() <= 0)) {
return true;
} else {
return false;
}
}
COM: <s> check whether file name exists or is empty </s>
|
funcom_train/38851623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Matrix all_pairs_shortest_path( Matrix W ) {
int n = W.getRowDimension();
int m = 1;
Matrix L = W.copy();
while( m < n - 1 ){
L = extended_shortest_path(L, L);
m = 2*m;
}
return L;
}
COM: <s> caloculates the shortest paths between all the nodes </s>
|
funcom_train/6205224 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void showJavaNewMenu(IMenuManager menu) {
IMenuManager submenu = new MenuManager(
GaijinUIPlugin.getResourceString(GaijinUIStrings.ActionGroup_New_Label));
new NewWizardMenu(submenu, getWorkbenchSite().getWorkbenchWindow(), false);
menu.appendToGroup(IGaijinMenuConstants.GROUP_NEW, submenu);
}
COM: <s> show the new menu used for java elements </s>
|
funcom_train/14012793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRootLayoutDirection(int layoutDirection) {
switch (layoutDirection) {
case LEFT_TO_RIGHT:
serverMessageElement.setAttribute("root-layout-direction", "ltr");
break;
case RIGHT_TO_LEFT:
serverMessageElement.setAttribute("root-layout-direction", "rtl");
break;
default:
throw new IllegalArgumentException("Illegal layout direction.");
}
}
COM: <s> sets the root layout direction of the application i </s>
|
funcom_train/45520550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void installLAF() {
try {
UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
} catch (ClassNotFoundException e) {
} catch (InstantiationException e) {
} catch (IllegalAccessException e) {
} catch (UnsupportedLookAndFeelException e) {
}
}
COM: <s> installs the look and feel </s>
|
funcom_train/17015461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addNewTracker(TaskTrackerStatus status) {
trackerExpiryQueue.add(status);
// Register the tracker if its not registered
if (getNode(status.getTrackerName()) == null) {
// Making the network location resolution inline ..
resolveAndAddToTopology(status.getHost());
}
}
COM: <s> adds a new node to the jobtracker </s>
|
funcom_train/3906970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element createElement() {
if(_element == null && _ancestorElement != null && _xmlElementPathFragment != null) {
_element = getDataModel().getSchemaDocument()
.addElementByXMLPath(this, _ancestorElement, _xmlElementPathFragment, false);
}
return _element;
}
COM: <s> create the bound element in the xml document </s>
|
funcom_train/25791545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void write(Reference reference) throws IOException {
String uri = reference.toString();
if (Link.isBlankRef(reference)) {
this.writer.write(uri);
} else {
this.writer.append("<");
this.writer.append(uri);
this.writer.append(">");
}
}
COM: <s> writes the representation of a given reference </s>
|
funcom_train/44600348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _test_0001_model_import(){
compileAndExecGivenStatement(
"X.java",
"//@ model import java.util.Set;\n" +
"public class X{\n" +
" public void m() {\n" +
" }\n" +
"}\n",
"new X().m()");
}
COM: <s> import with modifier model </s>
|
funcom_train/34536892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addWhereField(String _field, String _type) {
QueryFieldStructure p = new QueryFieldStructure(_field, "", "", _type);
if (this.where == null) this.where = new Vector<QueryFieldStructure>();
where.addElement(p);
}
COM: <s> adds new field to the where section of the query </s>
|
funcom_train/9021556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() {
// dump objects and start anew
params = new INIConfig();
prep = new Preprocessor(this);
pass = 0;
post = new Postprocessor(this);
listing = new ArrayList<Listing>();
table = new InstructionTable(this);
defines = new HashMap<String, String>();
// define initial defaults
setParam("prefile", DEFAULT_PRE_FILE);
setParam("postfile", DEFAULT_POST_FILE);
align = -1;
// import CONFIG, CONFIG.txt, and CONFIG.ini files from the working
// directory and load parameters from them
importExternalConfig(params);
}
COM: <s> resets and reinitializes the compiler </s>
|
funcom_train/46693092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void start(Actor u) {
if (parent != null) {
Iterator<Link> l = parent.getLinkBySource(relation, u).iterator();
if (l.hasNext()) {
map.put(u.getID(), u);
actors.add(u);
}
while (l.hasNext()) {
intersection.add(l.next().getDestination());
}
}
}
COM: <s> initializes a clique add an actor and initialize the intersection </s>
|
funcom_train/10857794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assertQEx(String message, SolrQueryRequest req, int code ) {
try {
h.query(req);
fail( message );
} catch (SolrException sex) {
assertEquals( code, sex.code() );
} catch (Exception e2) {
throw new RuntimeException("Exception during query", e2);
}
}
COM: <s> makes sure a query throws a solr exception with the listed response code </s>
|
funcom_train/50103981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getColName(int index) {
String col=(String) headerFromNum.get(new Integer(index));
if (col!=null)
return col;
else if (throwExceptions)
throw new IllegalArgumentException("The following column index was not in the header: "+index);
else
return null;
}
COM: <s> return the column name associated with the passed in index i </s>
|
funcom_train/2882300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sfStart() throws SmartFrogException, RemoteException {
super.sfStart();
System.out.println( "ExampleLocator : Locator access point started ");
Thread serviceURLFinder = null;
if (keepLooking){
serviceURLFinder = new KeepLooking();
} else if (activeWait) {
serviceURLFinder = new FindAndDie();
} else {
serviceURLFinder = new TryAndDie();
}
serviceURLFinder.start();
}
COM: <s> retrieve the results </s>
|
funcom_train/33842608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setStartTime(String time, int editRate) throws XmlContentException {
EditUnitNumber startTime = getEditUnitNumber(time,editRate,0,"startTime");
//set timeline duration
timeline.setStartTime(startTime);
//set timeRange startTime
timeRange.setStartTime(startTime);
}
COM: <s> sets the timeline and time rage start time </s>
|
funcom_train/51219734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getDialogPanel() {
if (dialogPanel == null) {
dialogPanel = new JPanel();
dialogPanel.setLayout(new BorderLayout());
dialogPanel.setBorder(BorderFactory.createLineBorder(Color.gray, 1));
dialogPanel.add(getMainPanel(), BorderLayout.CENTER);
}
return dialogPanel;
}
COM: <s> this method initializes dialog panel </s>
|
funcom_train/29871056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJViewTemplateRightSouthPanel() {
if (jViewTemplateRightSouthPanel == null) {
jViewTemplateRightSouthPanel = new JPanel();
jViewTemplateRightSouthPanel.setLayout(new FlowLayout());
jViewTemplateRightSouthPanel.add(getJViewTemplateNewNoteButton());
jViewTemplateRightSouthPanel.add(getJViewTemplateNewTemplateButton());
jViewTemplateRightSouthPanel.add(getJViewTemplateDeleteTemplateButton());
}
return jViewTemplateRightSouthPanel;
}
COM: <s> this method initializes j view template right south panel </s>
|
funcom_train/44341866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AmineSet toAmineSet() {
AmineSet amineSet = null;
if (this.isEmpty())
return new AmineSet();
else
amineSet = new AmineSet(this.size());
if (amineSet.addAll(this)) // this method has been redefined in AmineSet to
// check first that the elements to add can be elements of an AmineSet
return amineSet;
else {
amineSet.clear();
amineSet = null;
return null;
}
}
COM: <s> create an amine set copy of the current amine list </s>
|
funcom_train/35223195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long readLong() throws IOException, ParserError {
StringBuilder sb = new StringBuilder(CAPACITY);
checkReady();
int cp = read();
char ch = (char) cp;
if (Character.isDigit(ch)) {
sb.append(ch);
while (checkReady()) {
cp = read();
ch = (char) cp;
if (Character.isDigit(ch))
sb.append(ch);
else {
unread(cp);
break;
}
}
return Long.parseLong(sb.toString());
} else {
unread(cp);
return environment.getLongFromDictionary(readSymbol());
}
}
COM: <s> tries to read a long or a symbol that resolves to a long </s>
|
funcom_train/38512689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemove1() {
int n0, n1;
n0 = container.size();
expectedEventType = ModelEvent.ITEM_REMOVED;
ProjectItem pi = container.getProjectAt(0);
container.removeProjects(pi);
n1 = container.size() + 1;
assertEquals("remove first " + container, n0, n1);
// Delete also in- and outcoming relations!
assertEquals(0, pi.getIncoming().size());
assertEquals(0, pi.getOutgoing().size());
}
COM: <s> test remove exiting item </s>
|
funcom_train/21952309 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isChanged() {
if (useEnabledBox) {
return (! (enabledBox.isSelected() == origEnabled && originalValue.equals(Integer.toString(currentColor.getRGB()))));
} else {
return (!(originalValue.equals(Integer.toString(currentColor.getRGB()))));
}
}
COM: <s> returns whether or not weve changed the original setting </s>
|
funcom_train/8791714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private WorkspaceDomainObject findRallyObject(long objID, String objType)throws RemoteException {
QueryResult rallyObjResult = service.query(WORKSPACE, rallyProject,
false, false, objType, "(ObjectID = \"" + objID + "\")", "",
false, 0, pageSize);
long numRec = rallyObjResult.getTotalResultCount();
WorkspaceDomainObject rallyObj;
if (numRec != 0) {
return (WorkspaceDomainObject) rallyObjResult.getResults()[0];
}
return null;
}
COM: <s> find a rally object by its id </s>
|
funcom_train/37586559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int _delete(int count, Iterator copyCursor) {
// Guarrantees that it's possible to delete count characters
try {
if (count > 0) copyCursor.move(count);
else move(count); // count <= 0
return deleteRight(copyCursor);
}
catch (Exception e) { throw new IllegalArgumentException("Trying to delete past end of file."); }
}
COM: <s> helper function for delete </s>
|
funcom_train/44710268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int doEndTag() throws JspException {
try {
servePageWithPresentationManager();
} catch (java.io.IOException ioe) {
throw new JspWrapperException(ioe);
} catch (ServletException se) {
if (se.getRootCause() != null) {
throw new JspWrapperException(se);
} else {
throw new JspException(se.toString());
}
}
return EVAL_PAGE;
}
COM: <s> serves the result document with a presentation manager </s>
|
funcom_train/21389061 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean canBeModifiedReflectively() {
if (field.isSynthetic()) {
return false;
}
int modifiers = field.getModifiers();
if (Modifier.isFinal(modifiers) && Modifier.isStatic(modifiers)) {
return false;
}
// CGLib, which is used by this class, adds several fields to classes
// that it creates. If they are changed using reflection, exceptions
// are thrown.
if (field.getName().startsWith("CGLIB$")) {
return false;
}
return true;
}
COM: <s> determines whether the field can be modified using reflection </s>
|
funcom_train/8689008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode() {
int result;
// CheckStyle:MagicNumber OFF
result = (namespace != null ? namespace.hashCode() : 0);
result = 29 * result + (file != null ? file.hashCode() : 0);
result = 29 * result + (url != null ? url.hashCode() : 0);
// CheckStyle:MagicNumber OFF
return result;
}
COM: <s> generate a hashcode depending on the namespace url and file name </s>
|
funcom_train/8632104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWriteDelay(int writeDelay) {
LogSystem log = getLog();
this.writeDelay = writeDelay;
// TODO check if MIN_WRITE_DELAY is a good value
if (writeDelay < SysProperties.MIN_WRITE_DELAY) {
log.setFlushOnEachCommit(true);
} else {
log.setFlushOnEachCommit(false);
}
}
COM: <s> change the write delay </s>
|
funcom_train/8075159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double distance (String string1, String string2) throws Exception {
switch (m_conversionType) {
case CONVERSION_LAPLACIAN:
return 1 / (1 + similarity(string1, string2));
case CONVERSION_UNIT:
return 2 * (1 - similarity(string1, string2));
case CONVERSION_EXPONENTIAL:
return Math.exp(-similarity(string1, string2));
default:
throw new Exception ("Unknown similarity to distance conversion method");
}
}
COM: <s> returns distance between two strings using the current conversion </s>
|
funcom_train/7901516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Comparable getCompareValue(Object o) {
Comparable v = null;
if (o == null) { return null; }
try {
if (sortByGetter == null) {
v = (Comparable)BeanSupport.getProperty(o, getSortBy());
} else {
v = (Comparable)sortByGetter.invoke(o);
}
} catch (Exception e) {
return null; /* give up */
}
if (v != null && v instanceof String) {
v = ((String)v).toLowerCase();
}
return v;
}
COM: <s> tries to get a value from specified object </s>
|
funcom_train/25764079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private RealMatrix newMatrix(double vals[], int nrows) {
int ncols = vals.length / nrows;
RealMatrix matrix = new BlockRealMatrix(nrows, ncols);
int i = 0;
for (int col = 0; col < ncols; col++) {
for (int row = 0; row < nrows; row++) {
double value = vals[i];
matrix.setEntry(row, col, value);
i++;
}
}
return matrix;
}
COM: <s> construct a matrix from a one dimensional packed array </s>
|
funcom_train/43607987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Call_c reconstruct(Receiver target, List arguments) {
if (target != this.target || ! CollectionUtil.equals(arguments,
this.arguments)) {
Call_c n = (Call_c) copy();
n.target = target;
n.arguments = TypedList.copyAndCheck(arguments, Expr.class, true);
return n;
}
return this;
}
COM: <s> reconstruct the call </s>
|
funcom_train/35177201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawChar(Graphics g, char c, int x, int y, int anchors) {
if (isBitmapFont) {
//#sijapp cond.if modules_GFONT="true" #
((BitmapFont)font).drawChar(g, c, x, y);
//#sijapp cond.end#
} else if (font instanceof Font) {
g.setFont((Font)font);
g.drawChar(c, x, y, anchors);
}
}
COM: <s> draws one character </s>
|
funcom_train/43683273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createDOMTree(){
//create the root element <Books>
Element rootEle = dom.createElement("Books");
dom.appendChild(rootEle);
//No enhanced for
Iterator it = myData.iterator();
while(it.hasNext()) {
Book b = (Book)it.next();
//For each Book object create <Book> element and attach it to root
Element bookEle = createBookElement(b);
rootEle.appendChild(bookEle);
}
}
COM: <s> the real workhorse which creates the xml structure </s>
|
funcom_train/15719985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getXmax() {
DataSet d;
double max=0.0;
if(dataset == null | dataset.isEmpty() ) return max;
for (int i=0; i<dataset.size(); i++) {
d = ((DataSet)dataset.elementAt(i));
if(i==0) max = d.getXmax();
else max = Math.max(max,d.getXmax());
}
return max;
}
COM: <s> get the maximum x value of all attached data sets </s>
|
funcom_train/21087510 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDispAttribPropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_AffListe_dispAttrib_feature"),
getString("_UI_PropertyDescriptor_description",
"_UI_AffListe_dispAttrib_feature",
"_UI_AffListe_type"),
SNI_Package.Literals.AFF_LISTE__DISP_ATTRIB, true,
true, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
COM: <s> this adds a property descriptor for the disp attrib feature </s>
|
funcom_train/14661696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Expression replaceSymbol(Symbol s, Expression expr) {
UnaryOperation newUO = null;
try {
newUO = (UnaryOperation) (this.clone());
} catch (CloneNotSupportedException ex) {
}
newUO.setOperand(operand.replaceSymbol(s, expr));
return newUO;
}
COM: <s> replaces all symbols equal to s in this unary operation with the specified </s>
|
funcom_train/43468315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMethodName() {
if (fullInfo == null)
return NA;
if (methodName == null) {
int iend = fullInfo.lastIndexOf('(');
int ibegin = fullInfo.lastIndexOf('.', iend);
if (ibegin == -1)
methodName = NA;
else
methodName = this.fullInfo.substring(ibegin + 1, iend);
}
return methodName;
}
COM: <s> returns the method name of the caller </s>
|
funcom_train/40712652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNextNumberLabel() {
ArrayList<NodeMark> marks = board.getMarks();
for(int i = 1; i < 500; i++) {
String l = String.valueOf(i);
boolean found = false;
for(NodeMark mark : marks) {
if(mark instanceof NodeLabel) {
NodeLabel label = (NodeLabel)mark;
if(l.equals(label.getText())) {
found = true;
break;
}
}
}
if(!found)
return l;
}
return null;
}
COM: <s> finds the first unused numeric label </s>
|
funcom_train/3903757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addActionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_RollupActionType1_action_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_RollupActionType1_action_feature", "_UI_RollupActionType1_type"),
ImsssPackage.Literals.ROLLUP_ACTION_TYPE1__ACTION,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the action feature </s>
|
funcom_train/16398225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTranslate() {
System.out.println("testTranslate");
assertEquals(5, painter.translate(0));
assertEquals(275, painter.translate(9));
painter.setSize(20);
assertEquals(5, painter.translate(0));
assertEquals(185, painter.translate(9));
}
COM: <s> test of translate method of class net </s>
|
funcom_train/50313378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showColumn (TreeColumn column) {
checkWidget ();
if (column == null) error (SWT.ERROR_NULL_ARGUMENT);
if (column.isDisposed ()) error(SWT.ERROR_INVALID_ARGUMENT);
if (column.parent != this) return;
int index = indexOf (column);
if (index == -1) return;
int count = Fox.FXFoldingList_getNumHeaders(handle);
if (0 <= index && index < count) {
Fox.FXHeader_makeItemVisible(Fox.FXFoldingList_getHeader(handle), index);
}
}
COM: <s> shows the column </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.