__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/8688755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void buildFinished(BuildEvent event) {
if (event.getException() == null && fileSuccess != null) {
// build successfull!
play(event.getProject(), fileSuccess, loopsSuccess, durationSuccess);
} else if (event.getException() != null && fileFail != null) {
play(event.getProject(), fileFail, loopsFail, durationFail);
}
}
COM: <s> fired after the last target has finished </s>
|
funcom_train/28297492 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemoveProperty() throws Exception {
Entry entry =
dvm.new Entry(Package.class, Sphere.class, Package.NAME,
Sphere.NAME);
Entry entry2 =
dvm.new Entry(IsClassOf.class, Sphere.class, IsClassOf.NAME,
Sphere.NAME);
dvm.set(entry);
dvm.set(entry2);
DataConversion<Integer, Color3f> conversion = createConversion();
dvm.setProperty(Package.class, Package.CLASSES_ATTR,
Sphere.COLOR_ATTRIBUTE, conversion);
TestListener listener = new TestListener();
dvm.addListener(listener);
boolean result =
dvm.removeProperty(Package.class, Sphere.COLOR_ATTRIBUTE);
assertTrue(result);
assertTrue(listener.wasPropertyChanged());
}
COM: <s> test remove property </s>
|
funcom_train/46150519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSliderDir() {
if (sliderIdx == -1) {
System.out.println("slider data unavailable");
return NONE;
}
else {
float sliderCoord = comps[sliderIdx].getPollData();
int sliderc = Math.round(sliderCoord);
if (sliderc == -1)
return NORTH;
else if (sliderc == 0)
return NONE;
else if (sliderc == 1)
return SOUTH;
else {
System.out.println("Slider value out of range: " + sliderc);
return NONE;
}
}
}
COM: <s> return the slider stick compass direction </s>
|
funcom_train/9564339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPageSize(Rectangle pageSize) {
if(!guessFormat(pageSize, false)) {
this.pageWidth = (int) (pageSize.getWidth() * RtfElement.TWIPS_FACTOR);
this.pageHeight = (int) (pageSize.getHeight() * RtfElement.TWIPS_FACTOR);
this.landscape = pageWidth > pageHeight;
}
}
COM: <s> set the page size to use </s>
|
funcom_train/35739626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processMultipleCmd(String cmd) {
HistoryQueue queue = getHistoryQueue();
if (queue != null) {
queue.addCommand(cmd);
}
StringTokenizer tokens = new StringTokenizer(cmd, ";");
while (tokens.hasMoreElements()) {
processPipeCmd(tokens.nextToken());
}
}
COM: <s> process the cmd cmd commands </s>
|
funcom_train/1799086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getElementCount() {
int elementCount = 0;
if (state.elements != null) {
for (Object elementValue : state.elements.values()) {
if (elementValue instanceof Collection) {
elementCount += (castElementCollection(elementValue)).size();
} else {
elementCount++;
}
}
}
return elementCount;
}
COM: <s> returns the number of child elements present on this element </s>
|
funcom_train/13999578 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int onLine() throws DBException {
if (conn == null) {
throw new DBException("You are not connected");
}
Statement stat;
ResultSet rs;
try {
stat = conn.createStatement();
rs = stat.executeQuery("SELECT COUNT(*) FROM ALGOL_USER WHERE STAT = \"ON\";");
rs.absolute(1);
return rs.getInt(1);
} catch (SQLException e) {
throw new DBException("Error while executing a sql statemen:" + e.getMessage());
}
}
COM: <s> returns the number of online users </s>
|
funcom_train/29986547 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected FieldDoc getFieldDoc(final FieldDoc originalDoc) {
if (originalDoc == null) {
return null;
}
Object found = get(originalDoc);
if (found == null) {
found = this.factory.createFieldDoc(originalDoc);
put(originalDoc, found);
}
return (FieldDoc) found;
}
COM: <s> returns a wrapped instance of the supplied field doc object </s>
|
funcom_train/39528845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean confirmNewText() {
boolean canClearText= true;
if (getEditor().mustSave()) {
canClearText= JOptionPane.showConfirmDialog(frame, "Current text has been modified.\nReally replace it ?","Confirm replacement",JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION;
}
return canClearText;
}
COM: <s> returns true if the current document can be replaced by something else </s>
|
funcom_train/22678549 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doEdit() {
int idx = messageTable.getSelectedRow();
if (idx >= 0) {
MessageItem item = messageModel.items.get(idx);
textArea.setText(item.content);
textArea.setVisible(true);
textArea.setLocationRelativeTo(null);
if (textArea.isAccepted()) {
item.content = textArea.getText();
messageModel.fireTableRowsUpdated(idx, idx);
panelChanged();
}
}
}
COM: <s> perform editing in of contents </s>
|
funcom_train/50428310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setType(int type) {
if (type != NORMAL && type != UTILITY && type != DECISION)
throw new RuntimeException("Invalid node type");
if (type == UTILITY && evidenceValue != null)
throw new RuntimeException("Cannot assign an evidence node as a utility_node!");
this.type = type;
}
COM: <s> sets the type </s>
|
funcom_train/20443562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setMass(float m) {
mass = m;
if (mass < INFINITE_MASS) {
invMass = 1.0f / mass;
// I = mass * (size.x * size.x + size.y * size.y) / 12.0f;
I = (mass * shape.getSurfaceFactor()) / 12.0f;
invI = 1.0f / I;
} else {
invMass = 0.0f;
I = INFINITE_MASS;
invI = 0.0f;
}
}
COM: <s> set the mass of the body </s>
|
funcom_train/29723247 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getJComboBoxSchema() {
if (jComboBoxSchema == null) {
jComboBoxSchema = new JComboBox();
jComboBoxSchema.setFont(new Font("Dialog", Font.PLAIN, 12));
jComboBoxSchema.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
if (updating)
return;
onShemaChanged();
}
});
}
return jComboBoxSchema;
}
COM: <s> this method initializes j combo box schema </s>
|
funcom_train/40712642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSolved(boolean dispResult) {
if(dispResult) {
solvedLabel.setForeground(new Color(0xdb, 0xa3, 0));
solvedLabel.setText("Solved");
}
else {
solvedLabel.setForeground(Color.red);
solvedLabel.setText("Failed");
}
}
COM: <s> sets solved state to solved or failed </s>
|
funcom_train/45231291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Response execute() throws org.json.JSONException {
com.softwoehr.pigiron.functions.ProfileQueryDM pigfunc = new com.softwoehr.pigiron.functions.ProfileQueryDM
(
getHostSpecifier()
, host.getPortNumber()
, user.getUid()
, user.getPassword()
, getTargetIdentifier()
);
execute(pigfunc,requestor,response);
return response;
}
COM: <s> execute the pig iron vsmapi call we have set up in this instance </s>
|
funcom_train/32867203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ResourceEntry findResourceInternal(File file, String path){
ResourceEntry entry = new ResourceEntry();
try {
entry.source = getURI(new File(file, path));
entry.codeBase = getURL(new File(file, path));
} catch (MalformedURLException e) {
return null;
}
return entry;
}
COM: <s> find specified resource in local repositories </s>
|
funcom_train/16915154 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SynapseNode findSynapseNode(final Synapse s) {
for (Iterator<SynapseNode> i = getSynapseNodes().iterator(); i
.hasNext();) {
SynapseNode node = i.next();
if (s == node.getSynapse()) {
return node;
}
}
return null;
}
COM: <s> find the synapse node corresponding to a given model synapse </s>
|
funcom_train/50940188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removeCurrentBean() {
Bank e = (Bank)jComboBox.getSelectedItem();
if ( e != null )
EuroBudget.getInstance().getDataModel().removeBank(e);
//cmodel.removeElementAt(ind);
//int ind = jComboBox.getSelectedIndex();
}
COM: <s> remove a bean in the data model list </s>
|
funcom_train/22440796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Variant invoke(int dispIdMember, Variant[] rgvarg, int[] rgdispidNamedArgs) {
Variant pVarResult = new Variant();
int result = invoke(dispIdMember, COM.DISPATCH_METHOD, rgvarg, rgdispidNamedArgs, pVarResult);
return (result == COM.S_OK) ? pVarResult : null;
}
COM: <s> invokes a method on the ole object the method has optional parameters </s>
|
funcom_train/36987554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void render(Rectangle rectangle) {
double width = rectangle.getWidth();
double height = rectangle.getHeight();
indentAndAdd(RECT_FORMAT.form(new double[] {
rectangle.getCenter().getX() - width / 2,
-rectangle.getCenter().getY() - height / 2, width, height}));
addShapeAttributes(rectangle);
}
COM: <s> renders a rectangle </s>
|
funcom_train/37072128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public StringMap fromServletRequest(javax.servlet.ServletRequest request) {
java.util.Enumeration e = request.getParameterNames();
java.util.Map m = new java.util.HashMap();
while(e.hasMoreElements()) {
String key = (String) e.nextElement();
m.put(key, request.getParameter(key));
}
return new StringMap(m);
}
COM: <s> returns a string map from an servlet request </s>
|
funcom_train/42385873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer process(ExampleStateProvider state) {
try {
return state.get(this, LEFT) / state.get(this, RIGHT);
} catch (ArithmeticException e) {
if (state.get(this, CATCH_DIVISION_BY_ZERO)) {
return state.get(this, DIVISION_BY_ZERO_RESULT);
} else {
throw e;
}
}
}
COM: <s> processes the integer division operation </s>
|
funcom_train/571314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static private void runNewVm(){
try{
Properties p = System.getProperties();
Object item = p.get("java.class.path");
Runtime.getRuntime().exec( "java -cp " + item.toString() + " "
+ MXJManager.class.getName() + " " + Path.getBasicDir() );
} catch ( Exception e ) {
e.printStackTrace();
Log.userWarningMsg( e );
}
}
COM: <s> run a new jvm with the gui </s>
|
funcom_train/31800368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean saveLang(String userId, String lang ) {
boolean retVal;
retVal = true;
logger.info("UserProfile EJB activated (saveLang). Processing demand.");
try {
UserProfileTO upTO = new UserProfileTO();
upTO.setLanguage(lang);
upTO.setUserProfile_id(userId);
upDAO.update(upTO);
} catch (DAOException e) {
retVal = false;
logger.info(e.getMessage());
}
logger.info("UserProfile EJB (saveLang) finished.");
return retVal;
}
COM: <s> this method saves users interface language </s>
|
funcom_train/50155891 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeRecManageInfo(RecManageInfo rmi) {
prtln("writeRecManageInfo with rmi.id: " + rmi.getId());
String fileName = getFilenameFromId(rmi.getId());
File recInfoFile = new File(manageDir, fileName);
try {
Dom4jUtils.writeDocToFile(rmi.getDoc(), recInfoFile);
} catch (Exception e) {
prtlnErr("XMLManager.writeRecManageInfo() error: " + e);
}
}
COM: <s> write a rec manage info instance to disk </s>
|
funcom_train/42475791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void namesDelete(List names, HttpServletRequest request) {
assert names != null : "Parameter 'names' must not be null.";
assert request != null : "Parameter 'request' must not be null.";
final int index = Integer.parseInt(request.getParameter("index"));
if (index >= names.size()) return; // if the user deletes a name which is not stored yet
names.remove(index);
}
COM: <s> deletes a name from the list of names </s>
|
funcom_train/29842283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ageHistoryCountItems() {
// check if there are any values earlier than specified by the history count...
if ((getItemCount() > 1) && (this.historyCount > 0)) {
final long latest = getTimePeriod(getItemCount() - 1).getSerialIndex();
while ((latest - getTimePeriod(0).getSerialIndex()) >= this.historyCount) {
this.data.remove(0);
}
}
}
COM: <s> age items in the series </s>
|
funcom_train/25049153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Leaf getFirstLeaf() {
if(this instanceof Leaf) {
return (Leaf)this;
} else if(this instanceof Submenu) {
Submenu submenu = (Submenu) this;
for(MenuItem submenuItem: submenu.getMenuItems()) {
Leaf subLeaf = submenuItem.getFirstLeaf();
if(subLeaf != null) {
return subLeaf;
}
}
}
return null;
}
COM: <s> returns first leaf for the item </s>
|
funcom_train/14615111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeObject(ObjectOutputStream stream) throws IOException {
ObjectOutputStream.PutField fields = stream.putFields();
if( empty ) {
fields.put( "numberValue", null );
} else {
fields.put( "numberValue", new Long( numberValue ));
}
// Synthesize this property for 1.8 compatibility
stream.writeFields();
}
COM: <s> for serialization write this object as a single code long code value </s>
|
funcom_train/20400421 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object parse(String arg) throws ParseException {
Byte result = null;
try {
result = Byte.decode(arg);
} catch (NumberFormatException e) {
throw (
new ParseException(
"Unable to convert '" + arg + "' to a Byte.",
e));
}
return (result);
}
COM: <s> parses the specified argument into a byte </s>
|
funcom_train/29272841 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String encrypt(String str) {
try {
// Encode the string into bytes using utf-8
byte[] utf8 = str.getBytes("UTF8");
// Encrypt
byte[] enc = ecipher.doFinal(utf8);
// Encode bytes to base64 to get a string
return new Base64(true).encodeToString(enc);
} catch (BadPaddingException e) {
e.printStackTrace();
} catch (IllegalBlockSizeException e) {
e.printStackTrace();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return null;
}
COM: <s> takes a single string as an argument and returns an encrypted version </s>
|
funcom_train/26440454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String str = "";
switch (align) {
case TOP: str = ",align=top"; break;
case CENTER: str = ",align=center"; break;
}
return getClass().getName() + "[hgap=" + hgap + ",vgap=" + vgap + str + "]";
}
COM: <s> returns the string representation of this flow layouts values </s>
|
funcom_train/31365339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Iterator componentIterator (final Object component) {
return new Iterator() {
private Iterator i = componentNameIterator();
public boolean hasNext () { return i.hasNext(); }
public Object next () {
return getSubcomponent((BeanComponent) component,
(String) i.next());
}
public void remove () {
throw new UnsupportedOperationException("can't remove");
}};
}
COM: <s> iterator over subcomponents </s>
|
funcom_train/50139138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getRowNumber() {
// Determine if embedded in an IterateTag
Tag tag = findAncestorWithClass(this, IterateTag.class);
if (tag == null)
return 1;
// Determine the current row number
IterateTag iterator = (IterateTag)tag;
// return iterator.getLengthCount() + 1;
return iterator.getIndex() + 1;
}
COM: <s> determine the row number from the iterate tag </s>
|
funcom_train/13750324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean canOverdrive() throws OneWireIOException, OneWireException {
try {
//synchronized (conn) {
// send beginExclusive command
getDataOutputStream().writeByte(CMD_CANOVERDRIVE);
getDataOutputStream().flush();
// check return value for success
checkReturnValue();
// next parameter should be the return from beginExclusive
return getDataInputStream().readBoolean();
//}
} catch (IOException ioe) {
throw new OneWireException(COMM_FAILED + ioe.getMessage());
}
}
COM: <s> returns whether adapter can physically support overdrive mode </s>
|
funcom_train/44872219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getMinorPanel() {
if (minorPanel == null) {
minorLabel = new JLabel();
minorLabel.setText("Minor Tick Spacing");
minorLabel.setToolTipText("Show/Hide minor tick marks");
minorPanel = new JPanel();
minorPanel.setLayout(new BoxLayout(getMinorPanel(),
BoxLayout.X_AXIS));
minorPanel.add(getMinorCheckBox(), null);
minorPanel.add(minorLabel, null);
}
return minorPanel;
}
COM: <s> this method initializes minor panel </s>
|
funcom_train/13692914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateNodesWithYPos(int pos){
GuiNode tmpnode;
for(Enumeration en = nodes.elements(); en.hasMoreElements();) {
tmpnode = (GuiNode)en.nextElement();
if (tmpnode == null)
continue;
if (tmpnode.selectionMode) {
tmpnode.y = pos;
}
}
setNodes(nodes);
setLinks(links);
repaint();
}
COM: <s> updates nodes position with the given y coordinate </s>
|
funcom_train/18865451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean addObject(jgnashObject object) {
if (!object.hasValidHashCode()) { // already have a unique ID
object.setHashCode(get_uID(object));
}
if (!uIDMap.containsKey(object.hashCode()) ) {
uIDMap.add(object);
return true;
}
return false;
}
COM: <s> adds an object to the list </s>
|
funcom_train/803775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void relabelSuffixLocants(Fragment parentFrag) {
// TODO just N at the moment.
for(Atom a : atomList) {
if(a.getElement().equals("N")) {
String locant = "N";
while((getIDFromLocant(locant) > 0) ||
(parentFrag.getIDFromLocant(locant) > 0)) {
locant = locant + "'";
}
a.replaceLocant(locant);
} else {
a.clearLocants();
}
}
}
COM: <s> relables the atoms in a fragment created as a result of </s>
|
funcom_train/9237723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Action getAction(final ActionComponent component, final String target) {
for (Action action : actions) {
if (action.getConditions().get(0).getComponent() == component
&& action.getConditions().get(0).getTarget().equalsIgnoreCase(target)) {
return action;
}
}
return null;
}
COM: <s> retrieve an action with a condition that checks the specified component </s>
|
funcom_train/21845104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Value getNextValue() {
Value v = null;
if( currentFormat >= formatCommands.size()) {
status = new Status(Status.EOF);
return null;
}
fActive = true;
while (fActive) {
Command cmd = formatCommands.get(currentFormat++);
// System.out.println("CALLING FORMAT " + cmd );
v = cmd.method.run(this, cmd);
}
return v;
}
COM: <s> use the previously compiled format specifications to fetch the next </s>
|
funcom_train/8241616 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSession() {
// we don't need specify a session if storage is not specified or incorrect. in this case
// we warn the user by means a warning message
if (!isStorageNotSpecified()) {
notify(new StartSessionType(DateUtil.formatDate(new Date()), inputSession));
}
}
COM: <s> starts a new session </s>
|
funcom_train/26454501 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String trimExtention(String str) {
int lastDot = str.lastIndexOf(".");
int lastSlash = str.lastIndexOf("/");
if ((lastDot > -1) && (lastDot > lastSlash)) {
return str.substring(0, lastDot);
} else {
return str;
}
}
COM: <s> trim the file extention from url </s>
|
funcom_train/18745342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addNode(AspectNode modelNode) {
if (isForThisLevel(modelNode)) {
// put the node on this level
this.modelNodes.add(modelNode);
}
// put the node on the sublevels, if it is supposed to be there
if (isForNextLevel(modelNode)) {
for (Level1 sublevel : this.children) {
sublevel.addNode(modelNode);
}
}
}
COM: <s> considers adding a node to the set of nodes on this level </s>
|
funcom_train/39790526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getVisibleComponentCount() {
if (children == null) {
return 0;
} else {
int visibleComponentCount = 0;
Iterator it = children.iterator();
while (it.hasNext()) {
Component component = (Component) it.next();
if (component.isVisible()) {
++visibleComponentCount;
}
}
return visibleComponentCount;
}
}
COM: <s> returns the number of strong visible strong immediate child </s>
|
funcom_train/8034943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBinaryTreeAlgorithmStrategy() {
if (binaryTree instanceof AVLTree) {
algorithmStrategy = new AVLTreeAlgorithmStrategy((AVLTree) binaryTree);
} else if (binaryTree instanceof RedBlackTree) {
algorithmStrategy = new RedBlackTreeAlgorithmStrategy((RedBlackTree) binaryTree);
} else {
algorithmStrategy = new BinarySearchTreeAlgorithmStrategy((BinarySearchTree) binaryTree);
}
}
COM: <s> sets the binary tree algorithm strategy in order to call the algorithms </s>
|
funcom_train/34998779 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getAvatarPathConfigKey(Avatar avatar) {
String avatarConfigKey = null;
if (avatar == null) {
return avatarConfigKey;
}
if (avatar.getAvatarType() == AvatarType.AVATAR_UPLOAD) {
avatarConfigKey = ConfigKeys.AVATAR_UPLOAD_DIR;
}
else if (avatar.getAvatarType() == AvatarType.AVATAR_GALLERY) {
avatarConfigKey = ConfigKeys.AVATAR_GALLERY_DIR;
}
return avatarConfigKey;
}
COM: <s> get the key in config that for give avatar to find the path </s>
|
funcom_train/46165147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Hotspot checkCoordinatesForHotspot(int x, int y) {
// Loop through each hotspot in insert order
for (Iterator<String> it = hotspots.keySet().iterator(); it.hasNext();) {
String key = it.next();
Hotspot hotspot = hotspots.get(key);
// If a hotspot contains the given coordinates, return it.
// Giving preference to hotspots that were inserted later.
if (hotspot.getArea().contains(x, y)) {
return hotspot;
}
}
return null;
}
COM: <s> checks if the given coordinates are located within a background hotspot </s>
|
funcom_train/24921800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean hasAnyPostcondition(Activity act) {
Set outL = XMLUtil.getOutgoingTransitions(act);
Iterator it = outL.iterator();
while (it.hasNext()) {
if (!((Transition) it.next()).getCondition().toValue().equals("")) {
return true;
}
}
return false;
}
COM: <s> returns true if given activity has at least one outgoing transition with condition </s>
|
funcom_train/30006495 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void preparationDataHasChanged(PreparationDataEvent e) {
if (e != null) {
this.setDataHasChanged(true);
for (DataChangedListener cur : this.getDataChangedListeners()) {
cur.preparationDataChanged(e);
}
}
else {
throw new NullPointerException("The preparation data event is null.");
}
}
COM: <s> calls all registered listeners </s>
|
funcom_train/15954464 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInsertChararray() throws BMLException{
String lsValue = "Good";
DataString ldString = new DataString(fBlank);
ldString.setString(lsValue);
char lcValue[] = {'1','2','3'};
ldString.insert(1,lcValue);
assertEquals("G123ood",ldString.toString());
}
COM: <s> test of insert method using offset char </s>
|
funcom_train/39185919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean saveAsGif(String path) {
if (!okForGif(imp))
return false;
try {
GifEncoder encoder = new GifEncoder(fi.width, fi.height, (byte[])fi.pixels, fi.reds, fi.greens, fi.blues);
OutputStream output = new BufferedOutputStream(new FileOutputStream(path));
encoder.write(output);
output.close();
}
catch (IOException e) {
showErrorMessage(e);
return false;
}
updateImp(fi, fi.GIF_OR_JPG);
return true;
}
COM: <s> save the image in gif format using the specified path </s>
|
funcom_train/47950716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Questionable previous() {
if(hasQuestionInThatDirection(-1)) {
try {
this.currentElement--;
this.humanReadableQuestionNumber = this.currentElement + "";
return this.elements.get(this.keyElements[this.currentElement]);
//return this.tempElements[this.currentElement];
}
catch(ArrayIndexOutOfBoundsException e) { //goofed
return null; //there really weren't any more in that direction!
}
}
return null;
}
COM: <s> get the previous selection atom </s>
|
funcom_train/4434869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void newMap(MapModel.MapInfo info) {
if (info.type==MapModel.MapType.hex) {
model = new HexMapModel(info);
}
else {
model = new SquareMapModel(info);
}
// reset their states
resetControlState();
// resize and repaint
resetSize();
hexZoom();
}
COM: <s> initiates a new map model </s>
|
funcom_train/44714040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Component createComponent() {
// Create the form with the name attribute
Form form;
if (getFormContainer() != null) {
form = new Form(getHTMLName(), getFormContainer());
} else {
form = new Form(getHTMLName());
}
// Set the action attribute
form.setAction(getAction());
// Add the process listener
addProcessListeners(form);
// Add the components
addComponents(form);
return form;
}
COM: <s> create a bebop form using the persistent information in this form domain object </s>
|
funcom_train/32040900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSelectPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SendMailType_select_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SendMailType_select_feature", "_UI_SendMailType_type"),
ImsldPackage.eINSTANCE.getSendMailType_Select(),
true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the select feature </s>
|
funcom_train/1033624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vec3f getVelocity() {
Vec3f result = null;
float[] vel = new float[3];
al.alGetSourcefv(sourceID, AL.AL_VELOCITY, vel, 0);
result = new Vec3f(vel[0], vel[1], vel[2]);
return result;
}
COM: <s> gets the velocity vector of the source </s>
|
funcom_train/41153257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getPerformance(int evaluation) {
double result;
result = Double.NaN;
switch (evaluation) {
case EVALUATION_CC:
result = m_CC;
break;
case EVALUATION_RMSE:
result = m_RMSE;
break;
case EVALUATION_RRSE:
result = m_RRSE;
break;
case EVALUATION_MAE:
result = m_MAE;
break;
case EVALUATION_RAE:
result = m_RAE;
break;
case EVALUATION_COMBINED:
result = (1 - StrictMath.abs(m_CC)) + m_RRSE + m_RAE;
break;
case EVALUATION_ACC:
result = m_ACC;
break;
default:
throw new IllegalArgumentException("Evaluation type '" + evaluation + "' not supported!");
}
return result;
}
COM: <s> returns the performance measure </s>
|
funcom_train/8859850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void saveMp3File(final String mp3FileName) throws Exception {
FileHelper.createAndUseTempFile("TempWav", ".wav", new FileHelper.TempFileUser() {
public void useTempFile(String tempFileName) throws Exception {
AMFMAudioFileCreator.this.saveWavFile(tempFileName);
AMFMAudioFileCreator.convertWavToMp3(tempFileName, mp3FileName);
}
});
}
COM: <s> saves the music as a mp3 file </s>
|
funcom_train/37470114 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveOptions( HttpServletRequest aRequest, HttpSession aSession ) {
IntactUserI user = IntactUser.getCurrentInstance(aSession);
String[] result = aRequest.getParameterValues( ATTRIBUTE_OPTION_CHILDREN );
if ( result != null )
user.addHighlightOption( ATTRIBUTE_OPTION_CHILDREN, result[0] );
}
COM: <s> allows to update the session object with options stored in the request </s>
|
funcom_train/12189702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNumberStringArg() throws Exception {
Expression exp = compileExpression("number('99.9')");
Value result = exp.evaluate(context);
assertTrue("fn:number should result in a double value",
result instanceof DoubleValue);
assertEquals("fn:number expression result should be 99.9",
99.9,
((DoubleValue) result).asJavaDouble(),
0.1);
}
COM: <s> test the number function with a string argument </s>
|
funcom_train/32780884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isWaitUntilValid(TimeInstant waitUntil, String where) {
if (waitUntil != null && TimeInstant.isBefore(waitUntil, presentTime())) {
sendWarning(
"Cannot wait at the MessageCrossbar! Command Ignored.",
"MessageCrossbar: " + getName() + " Method " + where,
"The parameter waitUntil is before the current simulation time.",
"Please pass a valid TimeInstant to this method.");
return false;
}
return true;
}
COM: <s> checks whether the given time instant is valid </s>
|
funcom_train/1111228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Graphics getTransparentOffgraphics() {
Rectangle rect = getBounds();
if ((offscreen == null || offgraphics == null)
|| (offscreen instanceof BufferedImage && ((((BufferedImage) offscreen)
.getWidth() != rect.width) || ((BufferedImage) offscreen)
.getHeight() != rect.height))) {
offscreen = new BufferedImage(rect.width, rect.height,
BufferedImage.TYPE_INT_RGB);
offgraphics = offscreen.getGraphics();
offgraphics.setClip(0, 0, rect.width, rect.height);
}
return offgraphics;
}
COM: <s> returns the current double buffering graphics object </s>
|
funcom_train/22233303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getMaximumLOD() {
if (isLiveOrCompiled()) {
if (!this.getCapability(ALLOW_LOD_RANGE_READ)) {
throw new CapabilityNotSetException(
J3dI18N.getString("Texture41"));
}
}
return ((TextureRetained)this.retained).getMaximumLOD();
}
COM: <s> retrieves the maximum level of detail for this texture object </s>
|
funcom_train/34781747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGameboy(final Gameboy instance) {
// store instance
this.gameboy = instance;
// register as observer for screen refresh
final VideoChip vic = this.gameboy.getVideoChip();
vic.addObserver(this);
// create image where the Gameboy screen content is copied to
this.screenImage = new BufferedImage(VideoChip.SCREEN_WIDTH, VideoChip.SCREEN_HEIGHT, BufferedImage.TYPE_INT_ARGB);
// set the preferred size
setScaling(1);
}
COM: <s> set the instance being displayed </s>
|
funcom_train/9372240 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawCentered(Bitmap d, Canvas c, int x, int y) {
int w = d.getWidth();
int h = d.getHeight();
c.drawBitmap(d, x - (w / 2), y - (h / 2), mPaint);
}
COM: <s> draw the bitmap so that its centered </s>
|
funcom_train/12564663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getXMLSpace() {
if (xmlSpace != XML_SPACE_INHERIT) {
return xmlSpace;
} else {
ModelNode ancestor = parent;
while (ancestor != null) {
if (ancestor instanceof ElementNode) {
return ((ElementNode) parent).getXMLSpace();
}
ancestor = ancestor.parent;
}
return XML_SPACE_DEFAULT;
}
}
COM: <s> defines how the node handles white spaces </s>
|
funcom_train/45692187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPanPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PartWithCommon_pan_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PartWithCommon_pan_feature", "_UI_PartWithCommon_type"),
EsxPackage.Literals.PART_WITH_COMMON__PAN,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the pan feature </s>
|
funcom_train/41775420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected XStream createXstream(MediaType mediaType) {
XStream result = null;
try {
result = new XStream(xmlDriverClass.newInstance());
result.setMode(XStream.NO_REFERENCES);
if (this.object != null) {
result.processAnnotations(object.getClass());
}
} catch (Exception e) {
Context.getCurrentLogger().log(Level.WARNING,
"Unable to create the XStream driver.", e);
}
return result;
}
COM: <s> creates an xstream object based on a media type </s>
|
funcom_train/42626437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void finishConfirmCredentials(final boolean result) {
Log.v(Constants.LOG_TAG, "finishConfirmCredentials("
+ this.hostPreferences + ")");
String accountName = buildAccountName(this.hostPreferences);
final Account account = new Account(accountName, Constants.ACCOUNT_TYPE);
this.mAccountManager.setPassword(account, this.mPassword);
final Intent intent = new Intent();
intent.putExtra(AccountManager.KEY_BOOLEAN_RESULT, result);
setAccountAuthenticatorResult(intent.getExtras());
setResult(RESULT_OK, intent);
finish();
}
COM: <s> called when response is received from the server for confirm credentials </s>
|
funcom_train/32775768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void work(double workingDuration){
double quarterDuration = workingDuration/4;
//0.52 radian = ca. 30 degree
//get the sand
this.rotY(0.52, new TimeSpan(quarterDuration,TimeUnit.SECONDS));
//put it on the truck
this.rotY(-1.04, new TimeSpan(quarterDuration*2,TimeUnit.SECONDS));
//reset position
this.rotY(0.52, new TimeSpan(quarterDuration,TimeUnit.SECONDS));
}
COM: <s> animate the working </s>
|
funcom_train/5381007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initialize() {
if (fields != null) {
Iterator e = fields.iterator();
while (e.hasNext()) {
FieldEditor pe = (FieldEditor) e.next();
pe.setPage(this);
pe.setPropertyChangeListener(this);
pe.setPreferenceStore(getPreferenceStore());
pe.load();
}
}
}
COM: <s> initializes all field editors </s>
|
funcom_train/15622402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addColumn(edu.udo.cs.miningmart.m4.Column c) throws M4Exception {
cs2col.checkNameExists((edu.udo.cs.miningmart.m4.core.Column) c, this);
cs2col.add(this, (edu.udo.cs.miningmart.m4.core.Column) c);
}
COM: <s> add a column to this columnsets columns </s>
|
funcom_train/19100932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JDrawingView getDrawingArea() {
if (drawingArea == null) {
try {
drawingArea = new org.jarp.gui.jhotdraw.editor.JDrawingView(this, 2048, 2048);
drawingArea.setBounds(0, 0, 100, 311);
} catch (Throwable ivjExc) {
handleException(ivjExc);
}
}
return drawingArea;
}
COM: <s> return the drawing area property value </s>
|
funcom_train/49638164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void queuePayload(Payload payload) {
if (log.isTraceEnabled()) {
//noinspection DuplicateStringLiteralInspection
log.trace("Queueing " + payload + " in " + this);
}
if (!accepts(payload)) {
throw new IllegalArgumentException(String.format(
"%s does not accept %s", this, payload));
}
pusher.add(payload);
}
COM: <s> add a payload to the queue blocking until the queue accepts it </s>
|
funcom_train/27947393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAll(ISet_char set) {
if (set instanceof CharSet) this.set.addAll(((CharSet)set).set);
else {
final ISet_char.Iterator it = set.iterator();
for (int i=set.size(); i>0; --i) this.set.add(it.next());
}
}
COM: <s> adds all chars from set to this iset char without adding doublicates </s>
|
funcom_train/47514900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadBackgroundImage() {
if(chooser == null){
chooser = new JFileChooser(".");
chooser.addChoosableFileFilter(new AnalyzeImageFileFilter());
chooser.addChoosableFileFilter(new NiftiImageFileFilter());
chooser.setPreferredSize(new Dimension(640,480));
}
int option = chooser.showDialog(this, "Load Background Image");
if (option == JFileChooser.APPROVE_OPTION) {
bgImagePath = chooser.getSelectedFile().getAbsolutePath();
ResultsCommandManager.setBackgroundImage(
chooser.getSelectedFile());
}
}
COM: <s> loads a background image as a nifti analyze image and executes a </s>
|
funcom_train/40627798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testListen_Extreme() throws Exception {
checkListen_Extreme(false);
assertEquals(5000, getEventCount(TEST_DOMAIN));
assertEquals(5000, getEventCount(TEST_DOMAIN_2));
assertEquals(5000, getEventCount(TEST_DOMAIN_3));
}
COM: <s> adding 15000 events and a single listen at the end without threads </s>
|
funcom_train/18057776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addEventHandler(String eventName, XEEventHandler eh) {
if (!eventSink.containsKey(eventName)) {
HandlerVector v = new HandlerVector();
v.add(eh);
eventSink.put(eventName, v);
} else {
HandlerVector v = eventSink.get(eventName);
v.add(eh);
}
}
COM: <s> add an event handler for a specific event name </s>
|
funcom_train/4900618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCenterPosition(GeoPosition geoPosition) {
tilesToLoad = 0;
tilesLoaded = 0;
allPainted = false;
GeoPosition oldVal = getCenterPosition();
setCenter(getTileFactory().geoToPixel(geoPosition, zoom));
repaint();
GeoPosition newVal = getCenterPosition();
firePropertyChange("centerPosition", oldVal, newVal);
}
COM: <s> a property indicating the center position of the map </s>
|
funcom_train/37649339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean validateMessage() {
boolean flValid = true;
String message = messageText.getText();
if (StringUtil.isEmpty(message)) {
MessageDialog.openWarning(getShell(), getMessage(StringKeys.WARNING_TITLE),
getMessage(StringKeys.WARNING_MESSAGE_MANDATORY));
messageText.setFocus();
flValid = false;
}
return flValid;
}
COM: <s> perform the message validation </s>
|
funcom_train/4755674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getNorm() {
double sum = 0;
Iterator<Entry> it = sparseIterator();
Entry e;
while (it.hasNext() && (e = it.next()) != null) {
final double value = e.getValue();
sum += value * value;
}
return FastMath.sqrt(sum);
}
COM: <s> returns the l sub 2 sub norm of the vector </s>
|
funcom_train/24181834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void tryAddImport(AST ast, String fullyQualifiedName) {
if (!this.resolvedImports.containsKey(fullyQualifiedName)) {
ImportDeclaration importDeclaration = ast.newImportDeclaration();
importDeclaration.setName(ast.newName(fullyQualifiedName));
this.resolvedImports.put(fullyQualifiedName, importDeclaration);
}
hasModifications = true;
}
COM: <s> creates and stores import declaration for fqn passed as parameter is it </s>
|
funcom_train/34314089 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void calculateHLoss(boolean[] bipartition, boolean[] truth, Set<LabelNode> children) {
for (LabelNode child : children) {
int labelPos = labelPosition.get(child.getName());
if (bipartition[labelPos] == truth[labelPos]) {
calculateHLoss(bipartition, truth, child.getChildren());
} else {
loss += 1;
}
}
}
COM: <s> recursively calculates the hierarchical loss </s>
|
funcom_train/26192813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProva(String prova) throws java.beans.PropertyVetoException {
String oldProva = this.prova;
vetoableChangeSupport.fireVetoableChange("prova", oldProva, prova);
this.prova = prova;
propertySupport.firePropertyChange("prova", oldProva, prova);
}
COM: <s> setter for property prova </s>
|
funcom_train/43245374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetAlternateSSN() {
System.out.println("getAlternateSSN");
PatientDemographicsDG2Object instance = new PatientDemographicsDG2Object();
String expResult = "";
String result = instance.getAlternateSSN();
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 alternate ssn method of class org </s>
|
funcom_train/19258530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void runTest(TestHarness harness) {
setup();
final Icon ICON = new ImageIcon(getClass().getResource("/demo/pic.gif"));
label.setIcon(ICON);
harness.check(label.getIcon(), ICON);
container.add(label);
harness.check(label.getIcon(), ICON);
finish();
}
COM: <s> verifies that the label can store and </s>
|
funcom_train/27826535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean equals(PropertyInstance propertyInstance1,PropertyInstance propertyInstance2) throws KAONException {
return equals(propertyInstance1.getProperty(),propertyInstance2.getProperty()) && equals(propertyInstance1.getSourceInstance(),propertyInstance2.getSourceInstance()) && valueEquals(propertyInstance1.getTargetValue(),propertyInstance2.getTargetValue());
}
COM: <s> checks whether two property instances are equal </s>
|
funcom_train/35064981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getSaturationDescription() throws MetadataException {
if (!getDirectory().containsTag(ExifDirectory.TAG_SATURATION)) {
return null;
}
int saturation = getDirectory().getInt(ExifDirectory.TAG_SATURATION);
switch (saturation) {
case 0 :
return "Normal";
case 1 :
return "Low saturation";
case 2 :
return "High saturation";
default :
return null;
}
}
COM: <s> 0 normal 1 low saturation 2 high saturation </s>
|
funcom_train/51204512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void okButtonActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_okButtonActionPerformed
{//GEN-HEADEREND:event_okButtonActionPerformed
for(PreferencePanel panel : preferencePanels)
{
if(!panel.savePreferences())
{
preferencesTabbedPane.setSelectedIndex(preferencePanels.indexOf(panel));
return;
}
}
dispose();
}//GEN-LAST:event_okButtonActionPerformed
COM: <s> saves the users properties with the new altered preferences and then </s>
|
funcom_train/5460722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getShortName(String uri) {
if (uri.indexOf('#') > 0)
uri = uri.substring(uri.lastIndexOf('#') + 1);
else if (uri.indexOf('/') > 0)
uri = uri.substring(uri.lastIndexOf('/') + 1);
return uri;
}
COM: <s> the passed uri identifies something on the web probably a namespace </s>
|
funcom_train/25032080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void performHierarchicalMove(AttributeList identifier) throws IOException, DicomException, DicomNetworkException {
new MoveSOPClassSCU(hostname,port,calledAETitle,callingAETitle,callingAETitle,getMoveSOPClassUID(),identifier,debugLevel);
}
COM: <s> p retrieve dicom object s </s>
|
funcom_train/26227341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void precolorInitVariables() {
Iterator insts = start.getInstructions();
while (insts.hasNext()) {
QInst inst = (QInst) insts.next();
if (inst instanceof QDeclareInitialised) {
QOperand op = inst.getDefined().getOperand();
if (op instanceof QSSAVar) {
SSAVar var = ((QSSAVar)op).getSSAVar();
var.setColor(var.getSourceIndex());
}
}
}
}
COM: <s> precolor the ssa init variable </s>
|
funcom_train/3925771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDEFName( String newDEFName ) {
defuseName = newDEFName;
VrmlElement root = getRoot();
if ( root instanceof Scene ) {
Scene sroot = (Scene)root;
TokenEnumerator te = sroot.getTokenEnumerator();
int offset = getFirstTokenOffset();
offset = te.getNextToken( offset );
te.replace( offset, newDEFName );
}
}
COM: <s> set the def name this does not adjust subsequent use nodes </s>
|
funcom_train/11738456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stateChanged(ChangeEvent e) {
resetRemoveButtons();
// find source view
Component selected = getSelectedComponent();
while (selected instanceof JScrollPane) {
selected = ((JScrollPane) selected).getViewport().getView();
}
ExistingSelectionProcessor proc = (ExistingSelectionProcessor) selected;
proc.processExistingSelection(e);
}
COM: <s> handle focus when tab changes </s>
|
funcom_train/7271283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCustomExt(String name) {
Set<String> customExts = this.customPanel.getElements();
customExts.add(name);
this.customUnchecked = this.customPanel.getRawUncheckedElementsAsSet();
this.customPanel.setElements(customExts, this.customUnchecked);
this.switchPanel(this.customKey);
this.sidePanel.setItemSelected(this.customKey);
}
COM: <s> adds a new extension of type name </s>
|
funcom_train/22211564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init() {
typeComboBox.addItem(TEXT);
typeComboBox.addItem(NUM);
typeComboBox.addItem(DATE);
typeComboBox.setSelectedIndex(-1);
text.addKeyListener(new KeyAdapter() {
public void keyReleased(KeyEvent e) {
if (e.getKeyChar()=='\n')
okButton_actionPerformed(null);
}
});
}
COM: <s> initialize type combo </s>
|
funcom_train/1069112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean testAttributeUmlType(Object target, String value) {
if (! (target instanceof Element)) {
return false;
}
try {
Class t = Class.forName("org.eclipse.uml2.uml."+value);
if (t.isInstance(target)) {
return true;
}
} catch (Exception e) {
Debug.log(IStatus.ERROR, "No class found with this name : org.eclipse.uml2.uml."+value);
}
// For anything else
return false;
}
COM: <s> test if target object is a uml object from type value </s>
|
funcom_train/25291536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getDecayFilter() {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_DECAY_FILTER_READ))
throw new CapabilityNotSetException(Ding3dI18N.getString("AuralAttributes31"));
return ((AuralAttributesRetained)this.retained).getDecayFilter();
}
COM: <s> retrieve decay filter </s>
|
funcom_train/43327469 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint(Graphics g, Rectangle viewRect) {
// paint only the area within the viewport, +/- graphHeight pixels
int graphHeight = fontHeight + 101 + padY;
int yLo = viewRect.y - graphHeight;
int yHi = viewRect.y + viewRect.height + graphHeight;
g.translate(0, yLo);
paintArea(g, yLo, yHi);
}
COM: <s> paint the area within a viewport the parent component should </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.