__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/19272684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Boolean parseBoolean(String booleanValue) throws WrongValueTypeException {
if (Boolean.TRUE.toString().equalsIgnoreCase(booleanValue)) {
return Boolean.TRUE;
} else if (Boolean.FALSE.toString().equalsIgnoreCase(booleanValue)) {
return Boolean.FALSE;
} else {
throw new WrongValueTypeException(this, Boolean.class);
}
}
COM: <s> this method parses a boolean value </s>
|
funcom_train/38292768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AID decodeAID() throws ACLCodec.CodecException {
try {
return parser.parseAID(null);
}
catch(jade.lang.acl.TokenMgrError e1) {
throw new ACLCodec.CodecException(getName() + " AID decoding token exception", e1);
}
catch(Exception e) {
e.printStackTrace();
throw new ACLCodec.CodecException(getName() + " AID decoding exception", e);
}
}
COM: <s> parse an agent identifier without it being included within an </s>
|
funcom_train/12866301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer sb = new StringBuffer();
sb.append("[").append(errorCode).append("] ");
if (serviceContext != null) {
sb.append(serviceContext).append(" ");
}
sb.append(" : ").append(message);
return sb.toString();
}
COM: <s> formats the log message </s>
|
funcom_train/49320949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateButton(AbstractButton button, String text, Icon icon) {
if (showText) {
button.setText(text);
} else {
button.setText(null);
}
button.setAlignmentX(CENTER_ALIGNMENT);
if (showPictures) {
button.setIcon(icon);
} else {
button.setIcon(null);
}
}
COM: <s> update the given button to display text and or icons depending on the </s>
|
funcom_train/26573197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleMouseClick(MouseEvent event) {
JTree explorerTree = (JTree) event.getSource();
if (explorerTree != null) {
TreePath path = explorerTree.getSelectionPath();
DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent();
if (node.getUserObject().getClass().getName().equalsIgnoreCase("java.lang.String")) {
return;
} else {
}
}
}
COM: <s> method handle mouse click </s>
|
funcom_train/12160712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStyles(String[] items) {
currentSelection = items;
// This may be called on a dialog that has been disposed, so need
// to check listBuilder.
if (listBuilder != null && !listBuilder.isDisposed()) {
listBuilder.setItems(currentSelection);
}
}
COM: <s> sets the style selection for the dialog and populates the dialogs list </s>
|
funcom_train/28116320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testJMSMessageIDPrefix() throws Exception {
final String prefix = "ID:";
TestContext context = getContext();
Message message = context.getMessage();
// send the message
send(message, DESTINATION);
String messageID = message.getJMSMessageID();
if (!messageID.startsWith(prefix)) {
fail("JMSMessageID must start with prefix=" + prefix);
}
}
COM: <s> verifies that jmsmessage id is prefixed with id </s>
|
funcom_train/26216197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processMouseMotionEvent(MouseEvent mouseEvent) {
LOG.fine("processMouseMotionEvent");
if (mouseEvent.getID() == MouseEvent.MOUSE_DRAGGED) {
if (contains(mouseEvent.getPoint())) {
setFocus(true);
setValue(calculateValue(mouseEvent));
processChangeEvent();
} else {
setFocus(false);
}
}
}
COM: <s> prcesses mouse motion events </s>
|
funcom_train/3749048 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getTabKeys() {
if (logger.isDebugEnabled()) {
logger.debug("getTabKeys() - start");
}
if (logger.isDebugEnabled()) {
logger.debug("getTabKeys() - end - return value = " + tabKeys);
}
return tabKeys;
}
COM: <s> message resource strings for the tab labels </s>
|
funcom_train/12280892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void abort() {
try {
if (this.temporary.exists())
this.temporary.delete();
} catch (FileSystemException e) {
log.error(e);
}
if (this.output != null) try {
this.output.close();
} catch (IOException exception) {
// Swallow the IOException on close
} finally {
this.output = null;
}
}
COM: <s> p abort any data written to the temporary file and delete it </s>
|
funcom_train/2002516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int pointToSymbol(int midCount, ByteSet exclusions) {
int sum = 0;
for (int mid = 0; ; ++mid) {
if (mid != EOF_INDEX && exclusions.contains(mid)) continue;
sum += _count[mid];
if (sum > midCount) return (mid == EOF_INDEX) ? ArithCodeModel.EOF : mid;
}
}
COM: <s> return the symbol corresponding to the specified count given </s>
|
funcom_train/29608994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removePortletName(String portletName) {
// Validate parameter
if (portletName == null)
throw new IllegalArgumentException("Parameter \"portletName\" cannot be NULL");
// Get current values
List<String> values = this.getElementValues(Constants.XML_DESCRIPTOR_ELEMENT_SECURITYCONSTRAINT_PORTLETS_NAME);
// remove value
values.remove(portletName);
// Update list
this.setElementValues(Constants.XML_DESCRIPTOR_ELEMENT_SECURITYCONSTRAINT_PORTLETS_NAME, values);
}
COM: <s> remove portlet name from the collection </s>
|
funcom_train/7797329 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRightHandSide(Expression expression) {
if (expression == null) {
throw new IllegalArgumentException();
}
// an Assignment may occur inside a Expression - must check cycles
ASTNode oldChild = this.rightHandSide;
preReplaceChild(oldChild, expression, RIGHT_HAND_SIDE_PROPERTY);
this.rightHandSide = expression;
postReplaceChild(oldChild, expression, RIGHT_HAND_SIDE_PROPERTY);
}
COM: <s> sets the right hand side of this assignment expression </s>
|
funcom_train/3341190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pull(int count) {
if ((count < 0) || (count > used)) {
// Avoid errors in SYN & FIN situations
// TODO create a better solution for this
if (count > 2) {
throw new IllegalArgumentException("count " + count);
}
} else {
used -= count;
System.arraycopy(data, count, data, 0, used);
}
}
COM: <s> remove the first count byte from this buffer </s>
|
funcom_train/26068415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDecimalPlaces(int places) {
mDecimalPlaces = places;
if(places == 0) {
mNumberFormat = NumberFormat.getIntegerInstance();
mEditText.setKeyListener(DigitsKeyListener.getInstance(false, false));
} else {
mNumberFormat = new DecimalFormat();
mNumberFormat.setMaximumFractionDigits(places);
mNumberFormat.setMinimumFractionDigits(places);
mEditText.setKeyListener(DigitsKeyListener.getInstance(false, true));
}
}
COM: <s> set the number of decimal places the text field allows </s>
|
funcom_train/51188105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton1() {
if (jButton1 == null) {
jButton1 = new JButton();
jButton1.setText("Cargar Imagen a Editar");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
System.out.println
(
"El usuario ha solicitado cargar una imagen para edicion."
);
if(showLoadImageDialog() == JFileChooser.APPROVE_OPTION)
displayImage(displayJAI1);
}
});
}
return jButton1;
}
COM: <s> this method initializes j button1 </s>
|
funcom_train/4359776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected DeltaRequest deserializeDeltaRequest(DeltaSession session, byte[] data) throws ClassNotFoundException, IOException {
try {
session.lock();
ReplicationStream ois = getReplicationStream(data);
session.getDeltaRequest().readExternal(ois);
ois.close();
return session.getDeltaRequest();
}finally {
session.unlock();
}
}
COM: <s> load deltarequest from external node </s>
|
funcom_train/12078705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSystemProperty(String key, String value) {
if (applet != null) {
org.me4se.System.properties.setProperty(key, value);
} else {
try {
java.lang.System.setProperty(key, value);
}
catch(Throwable th) { }
}
}
COM: <s> this method must be called to set system properties because of the applet </s>
|
funcom_train/9806161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addInstance(EdifCellInstance instance, ReplicationType replicationType) {
if (!_cellToReplicate.contains(instance))
throw new EdifRuntimeException("Error: Trying to replicate instance "+instance+" which is not contained by cell "+_cellToReplicate);
_instancesToReplicate.put(instance, replicationType);
}
COM: <s> mark the given edif cell instance with the specified replication type </s>
|
funcom_train/20693339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Element pageToolBar() {
return XHTMLFactory.twoColumns(new PageVersionsMenuBarView(this
.getModel(), this, getRequestingUser()).renderOn(
new XMLRendererContext()).getRootNode(), new PageMenuBarView(
this.getModel(), this, getRequestingUser()).renderOn(
new XMLRendererContext()).getRootNode());
}
COM: <s> method tool bar </s>
|
funcom_train/10210265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateTechniqueEnablement() {
if (colorBox.isSelected()) {
lowButton.setEnabled(true);
highButton.setEnabled(true);
} else {
lowButton.setEnabled(false);
highButton.setEnabled(false);
}
if (widthBox.isSelected()) {
lowWidth.setEnabled(true);
highWidth.setEnabled(true);
} else {
lowWidth.setEnabled(false);
highWidth.setEnabled(false);
}
// update map
if (isUpdateWanted())
doShowOnMap();
}
COM: <s> dis enables widgets for the different visualization techniques depending </s>
|
funcom_train/42953950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setConfigType(String configType) throws ConfigWriterException {
// Set the configuration type.
if (configType.equalsIgnoreCase("static")) {
this.configType = ConfigType.STATIC;
}
else if (configType.equalsIgnoreCase("dynamic")) {
this.configType = ConfigType.DYNAMIC;
}
else {
throw new ConfigWriterException("Invalid configuration type.");
}
}
COM: <s> set the configuration type </s>
|
funcom_train/21020658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readFromFile() {
try {
pic = ImageIO.read(ClassLoader.getSystemResource(arrowPath + position + "/" + getState() + ".png"));
setSize(pic.getWidth(), pic.getHeight());
} catch(Exception ex) {
ex.printStackTrace();
}
}
COM: <s> set the size of the files </s>
|
funcom_train/14267741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LimeXMLDocument getDocument() {
if (document != null)
return document;
else if (metadata != null && !metadata.equals("")) {
try {
document = new LimeXMLDocument(metadata);
return document;
} catch (SAXException e) {
} catch (SchemaNotFoundException e) {
} catch (IOException e) { }
}
return null;//both document and metadata are null
}
COM: <s> returns this metadata as a parsed xml document </s>
|
funcom_train/37447763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void htmlView(AnnotatedObject anAnnotatedObject) throws IOException {
// Start table
beginTable(anAnnotatedObject);
// Header
htmlViewHead(anAnnotatedObject, false);
// Data
htmlViewData(anAnnotatedObject);
// Annotation
htmlViewAnnotation(anAnnotatedObject);
// Xref
htmlViewXref(anAnnotatedObject);
// End table
endTable(anAnnotatedObject);
}
COM: <s> the default html view for an annotated object </s>
|
funcom_train/14092873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConsturctor() {
new AbstractButtonFinder("TEST");
new AbstractButtonFinder("test", false);
new AbstractButtonFinder("test", m_validIcon3);
new AbstractButtonFinder(m_validIcon);
new AbstractButtonFinder("Test", m_validIcon, false);
}
COM: <s> test the constructor </s>
|
funcom_train/39350871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void alloc(Address region, int size) {
// Can't hold a lock while doing anything that might block
// in the deterministic scheduler. Therefore we don't lock,
// and rely on the fact that objects is a concurrent data structure
ObjectReference object = VM.objectModel.getObjectFromStartAddress(region);
objects.put(object,new Entry(object,region,size));
}
COM: <s> register allocation of an object </s>
|
funcom_train/11656473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDomainHandling() throws Exception {
URL url = new URL("http://jakarta.apache.org/");
man.addCookieFromHeader("test=1;domain=.jakarta.apache.org", url);
assertNotNull(man.getCookieHeaderForURL(url));
}
COM: <s> test that the cookie domain field is actually handled as browsers do </s>
|
funcom_train/36107230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUp() {
initAgentIO();
agentIO.addDataModelListener(new DataModelAdapter() {
public void dataChanged(DataModelEvent e) {
String requestType = e.getData().getString(DataIO.REQUEST_TYPE);
if (requestType == null) return;
if (requestType.equals("start.module")) {
start(); //Starting of calculations.
}
}
});
}
COM: <s> initialization of client </s>
|
funcom_train/34266990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void buildPathName() {
StringBuffer lBuffer = new StringBuffer();
lBuffer.append(XmlPersistence.getConfigurationDirectoryPath());
lBuffer.append(File.separator);
lBuffer.append(PersistenceHelper.getProperty(OPENSOURCE_FLYWHEELS_LOCAL));
setPathName(lBuffer.toString());
}
COM: <s> builds the file name for the team xml document </s>
|
funcom_train/36473894 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setActiveTab( int index ) {
// deactivating the old tab:
((ImageItem)this.tabs.get( this.activeTabIndex )).setStyle(this.inactiveStyle);
// activating the new tab:
this.activeTabIndex = index;
((ImageItem)this.tabs.get( index )).setStyle(this.activeStyleUsed);
this.isInitialized = false;
}
COM: <s> changes the active selected tab </s>
|
funcom_train/36819637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void followRun(FollowComponent fc, Mote m){
try{
Thread.sleep(1000);
clip.start();
for(int i = 0; i < NUM_READINGS; ++i)
{
Thread.sleep(SLEEP_TIME);
fc.addReading((int)m.AverageReading(1), true);
fc.repaint();
}
clip.stop();
Thread.sleep(10000);
clip.start();
for(int i = 0; i < NUM_READINGS; ++i)
{
Thread.sleep(SLEEP_TIME);
fc.addReading((int)m.AverageReading(1), false);
fc.repaint();
}
clip.stop();
}catch(InterruptedException e){
System.out.println("Sleep Interrupted");
}
}
COM: <s> based on the pattern set initially players need to </s>
|
funcom_train/46855797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadSettings() {
userText.setText( OverseerSettings.username );
passwordText.setText( OverseerSettings.password );
hostText.setText( OverseerSettings.hostname );
autoConnectCheckBox.setSelection( OverseerSettings.autoConnect );
rememberCheckBox.setSelection( OverseerSettings.rememberConnectionInfo );
}
COM: <s> loads the previously saved connection settings from the </s>
|
funcom_train/7616432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSamples(int x, int y, int w, int h, int b, double dArray[], DataBuffer data) {
int idx = 0;
for (int i = y; i < y + h; i++) {
for (int j = x; j < x + w; j++) {
setSample(j, i, b, dArray[idx++], data);
}
}
}
COM: <s> sets the samples from an double array in the specified band for the </s>
|
funcom_train/29632750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetCHV2Pin(byte[] iNewPin) throws OpenPGPCardException {
try{
iso.resetPin(TLV_CHV2, iNewPin);
}catch(ISO7816Exception ex){
throw new OpenPGPCardException("Could not reset pin. Make sure you've entered CHV3 (" + ex.getMessage()+ ")");
}
}
COM: <s> resets the chv2 pin requires chv3 to have been entered </s>
|
funcom_train/31486261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHumanReadable(boolean flag) {
if (flags == null) {
flags = new byte[4];
flags[0] = flags[1] = flags[2] = flags[3] = 0;
}
if (flag) {
flags[0] = (byte)(flags[0] | 0x80);
} else {
flags[0] = (byte)(flags[0] & (0xFF - 0x80));
}
}
COM: <s> set if this notation is human readable and has no meaning to software </s>
|
funcom_train/47184187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetPassword(long mid, String password) throws DBException {
Connection conn = null;
PreparedStatement ps = null;
try {
conn = factory.getConnection();
ps = conn.prepareStatement("UPDATE Users SET password=? WHERE MID=?");
ps.setString(1, password);
ps.setLong(2, mid);
ps.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
throw new DBException(e);
} finally {
DBUtil.closeConnection(conn, ps);
}
}
COM: <s> change the password of a particular user </s>
|
funcom_train/14059108 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
if (_con == null || _con.isConnected() == false)
throw new IllegalStateException("You must set a connection before starting the thread!");
InGameClientMessage a = null;
for(;;) {
try {
a = _queue.take();
_con.send(a.getContent());
} catch (IOException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
} catch (Throwable e) {
e.printStackTrace();
}
}
}
COM: <s> extracts messages from queue and sends it through connections </s>
|
funcom_train/41208112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setChildrenFocused(boolean focused) {
if ((parentLink!=null) || (childLinks==null)) {
return;
}
for (Enumeration e=childLinks.elements();e.hasMoreElements();) {
HTMLLink child=(HTMLLink)e.nextElement();
child.setFocus(focused);
child.repaint();
}
}
COM: <s> applies or removes the focus style to all this link children if any </s>
|
funcom_train/31013222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int doStartTag() throws JspException {
IterateStack.push(pageContext, this);
collection = this.getCurrentObject();
if (collection == null) {
// no collection
return SKIP_BODY;
} else {
Object object = this.getIterationObject();
CurrentObjectStack.push(pageContext, object);
if (object == null) {
// empty collection
return SKIP_BODY;
} else {
return EVAL_BODY_TAG;
}
}
}
COM: <s> process the start tag by determinig the first iteration object </s>
|
funcom_train/6318503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeJob(String applicationId, Job job) throws GridBrokerException{
if (job!=null){
Job savedJob = store.getJob(applicationId, job.getName());
if (savedJob!=null){
if (savedJob.getStatus()!= JobStatus.READY){
job.terminate();
}
store.removeJob(savedJob);
}
}
}
COM: <s> kills the job and removes it from the database </s>
|
funcom_train/13477064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
if (this == null)
return "()";
StringBuilder res = new StringBuilder(codeLength);// the length has to
// be large to avoid
// to extend it.
// CodeLength seems
// to be enough and
// not too much (DS)
res.append("( ");
for (int i = 0; i < V.length; i++) {
res.append(V[i]);
res.append(' ');
}
res.append(')');
return res.toString();
}
COM: <s> alphanumeric representation method of a conceptual vector </s>
|
funcom_train/49214565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetRowMap() throws CeleritasException {
System.out.println("getRowMap");
DBHelper.init();
String sql = "select test_pk, test_field1 from test_table";
HashMap row = DBHelper.getRowMap(sql);
assertNotNull(row.get("test_pk"));
assertEquals(row.size(), 2);
}
COM: <s> test of get row map method of dbhelper </s>
|
funcom_train/14226813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRefresh(int refresh) throws FrameException {
try {
ByteBuffer byteBuffer = new ByteBuffer(ByteBuffer.SIZE_16BITS);
byteBuffer.put16bits(refresh);
infoElements.put(InfoElement.REFRESH, byteBuffer.getBuffer());
} catch (Exception e) {
throw new FrameException(e);
}
}
COM: <s> sets the register refresh </s>
|
funcom_train/50346624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Element getRootViaURI(boolean verify, InputStream stream) throws org.jdom.JDOMException, java.io.IOException {
if (log.isDebugEnabled()) log.debug("getRootViaURI");
SAXBuilder builder = getBuilder(verify); // argument controls validation
Document doc = builder.build(new BufferedInputStream(stream));
// find root
return doc.getRootElement();
}
COM: <s> find the dtd via a uri and get the root element </s>
|
funcom_train/37829156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void faceNext(GuidedEntity entity) {
if (path != null && nodeReached(entity)) {
Node next = nextNode();
if (next != null) {
entity.faceto(next.getX(), next.getY());
} else {
// There is no next path; Stop the entity so that the
// client gets the information in time
entity.stop();
}
}
}
COM: <s> turn the entity face the next node on the path </s>
|
funcom_train/49049213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getQTTextHeight(String content) {
int value = -1;
String valueString = getQTTextValue (content, QTTEXT_HEIGHT);
if (valueString == null) {
return (-1);
}
try {
value = Integer.parseInt(valueString);
} catch (NumberFormatException nfe) {
return (-1);
}
return (value);
}
COM: <s> parses the argument for the height attribute </s>
|
funcom_train/40311752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConstantFiscalYearCalendarAlgorithm() {
try {
ConstantFiscalYearCalendarAlgorithm algorithm = new ConstantFiscalYearCalendarAlgorithm(dateFormat.parse("2007-11-11"),
new ArrayList<Date>(), new ArrayList<Date>());
assertNotNull("Create ConstantFiscalYearCalendarAlgorithm instance failed.", algorithm);
} catch(IllegalArgumentException iae) {
fail("Create ConstantFiscalYearCalendarAlgorithm instance failed.");
} catch(ParseException pe) {
fail("Error occurs while parsing the string date value.");
}
}
COM: <s> p tests create constant fiscal year calendar algorithm instance </s>
|
funcom_train/17890805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setDir(final DirectoryInfo pDir) throws FileNotFoundException {
dir = pDir;
if (!new File(dir.getPath()).exists()) {
final List<String> replace = new ArrayList<String>();
replace.add(dir.getPath());
throw new FileNotFoundException(Debug.getString(DirectoryReader.class, 8, replace));
}
}
COM: <s> sets the dir to the value of p dir </s>
|
funcom_train/46691158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setFeature(EObject modelObject, EStructuralFeature feature, Object value) {
addFeatureSettingToLog(modelObject, feature, value);
if (feature.isMany()) {
@SuppressWarnings("unchecked")
EList<Object> values = (EList<Object>) modelObject.eGet(feature);
values.add(value);
} else {
modelObject.eSet(feature, value);
}
}
COM: <s> sets a feature to the given value </s>
|
funcom_train/25717713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BigDecimal getDisplayBigDecimal(int offset,int len,int scale,boolean isSigned,boolean isSignLeading,boolean isSignSeperate) {
validate(offset=normalizeOffset(offset),len);
return new BigDecimal(BigInteger.valueOf(getDisplayLong(offset,len,isSigned,isSignLeading,isSignSeperate)),scale);
}
COM: <s> function cobol display usage decimal number from buffer memory </s>
|
funcom_train/7277203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getXMLString() {
StringBuilder fullXML = new StringBuilder();
LimeXMLDocumentHelper.buildXML(fullXML, getSchema(), getAttributeString() + "/>");
//System.out.println("***FTA DEBUG XML SCHEMA: " + fullXML.toString());
return fullXML.toString();
}
COM: <s> constructs an xml string from this document </s>
|
funcom_train/36715189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkForServerConnection() {
try {
if(super.isTextPresent("Connection to server has been lost") ||
super.isElementPresent("//*[contains(text(), 'Connection to server has been lost')]")) {
throw new SeleniumException("Cant Find Connection to Yukon Server");
}
}catch(SeleniumException ex){
log.error(ex);
}
}
COM: <s> check for the server connection error yukon specific error </s>
|
funcom_train/35848633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetHelp() {
ActionStateNotationUml notation =
new ActionStateNotationUml(aActionState);
String help = notation.getParsingHelp();
assertTrue("No help at all given", help.length() > 0);
assertTrue("Parsing help not conform for translation",
help.startsWith("parsing."));
}
COM: <s> test if help is correctly provided </s>
|
funcom_train/46470501 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setChannels(String channelValues[][]) {
if (channelValues.length <= 0) return;
StringBuffer cmd = new StringBuffer();
for (int i = 0; i < channelValues.length; i++) {
setChannel(Integer.parseInt(channelValues[i][0]), channelValues[i][1]);
}
//
// try {
// postCommand(cmd.toString());
// } catch (IOException ioe) {
// System.err.println("DMX: " + ioe);
// }
}
COM: <s> issues a collection of commands </s>
|
funcom_train/29954575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetForceBlock() {
System.out.println("setForceBlock");
ForceBlockObject forceBlock= new ForceBlockObject();
ParametersSetObject instance = new ParametersSetObject();
instance.setForceBlock(forceBlock);
ForceBlockObject result = instance.getForceBlock();
System.out.println(result);
assertEquals(forceBlock, result);
}
COM: <s> test of set force block method of class hbm </s>
|
funcom_train/22026901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addInventory(DodsURL inv) {
DefaultMutableTreeNode temp = new DefaultMutableTreeNode(inv);
treeModel.insertNodeInto(temp, top, top.getChildCount());
TreePath t = new TreePath(treeModel.getPathToRoot(top));
nodes.put(inv, temp);
t = t.pathByAddingChild(temp);
urlTree.setSelectionPath(t);
urlTree.scrollPathToVisible(t);
adjustViewport();
}
COM: <s> add an inventory to the urllist </s>
|
funcom_train/42766584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createMarkAllButtonsForButtonBar(Composite parent) {
// create OK and Cancel buttons by default
createMarkAllButton(parent, MergeConstants.MERGE_ACTION_SKIP_ID
, "Mark all '" + MergeConstants.MERGE_ACTION_SKIP_LABEL + "'");
createMarkAllButton(parent, MergeConstants.MERGE_ACTION_OVERWRITE_ID
, "Mark all '" + MergeConstants.MERGE_ACTION_OVERWRITE_LABEL + "'");
createMarkAllButton(parent, MergeConstants.MERGE_ACTION_AUTOSOLVE_ID
, "Mark all '" + MergeConstants.MERGE_ACTION_AUTOSOLVE_LABEL + "'");
}
COM: <s> adds buttons to this dialogs mark all button bar </s>
|
funcom_train/32304733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static class ExactType extends AbstractList implements Serializable {
public final HClass type;
public final boolean isExact;
public ExactType(HClass type, boolean isExact) {
this.type = type; this.isExact = type.isPrimitive() || isExact;
}
public int size() { return 2; }
public Object get(int index) {
switch(index) {
case 0: return type;
case 1: return new Boolean(isExact);
default: throw new IndexOutOfBoundsException();
}
}
}
COM: <s> implementors of code exact type map code will probably find this </s>
|
funcom_train/42536724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o){
if(!(o instanceof BehDef))return false;
if(o == this)return true;
BehDef oo = (BehDef)o;
return (((Object)name).equals(oo.name))&&(((Object)body).equals(oo.body));
}
COM: <s> is the given object equal to this beh def </s>
|
funcom_train/31890791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void makeWindow(String name) {
if(openWindows.containsKey(name)){
dtop.getWindowManager().setSelectedWindow((BeeWindow) openWindows.get(name));
return;
}
MessengerWindow win = new MessengerWindow(this, name);
openWindows.put(name, win);
dtop.addWindow(win);
}
COM: <s> opens brand new and clear messenger window </s>
|
funcom_train/51811993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void afterPropertiesSet() throws Exception {
Object externalService = services.remove(getBeanName());
if ( externalService != null ) {
// this occurs if the external service existed prior to Spring starting.
external = externalService;
BeanDefinitionUtils.applyConfiguration(externalService,
getWrappedBeanDefinition().getBeanDefinition(),
getSpringAware());
}
else
proxies.put( getBeanName(), this);
}
COM: <s> method called after all properties are set if the external service has </s>
|
funcom_train/42884405 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Rational (BigInteger a, BigInteger b) {
if (b.equals(BigInteger.ZERO)) { this.a=BigInteger.ZERO; this.b=BigInteger.ZERO; }
else if (a.equals(BigInteger.ZERO)) { this.a=BigInteger.ZERO; this.b=BigInteger.ONE; }
else { this.a=a; this.b=b; }
}
COM: <s> constructs a new rational number </s>
|
funcom_train/19321117 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public char getCharacter() {
final org.foray.fotree.fo.prop.PdCharacter property =
(org.foray.fotree.fo.prop.PdCharacter) getProperty(
FoProperty.CHARACTER);
if (property != null) {
return property.getValue();
}
return org.foray.fotree.fo.prop.PdCharacter.getValueNoInstance();
}
COM: <s> returns the character property </s>
|
funcom_train/51209878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void logInfoLn(Object o) {
String s = (null == o ? "null" : o.toString());
Event<GUIEvent> event = new Event<GUIEvent>(this, GUIEvent.class, GUI_LogMessageInfo, s);
LiveGraph.application().eventManager().raiseEvent(event);
}
COM: <s> raises an event to inform listeners that an info message should be displayed </s>
|
funcom_train/13360635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return "[URL='" + getURL() + ", filename='" + getFilename()
+ "', File='" + getFile() + "', date='" + getDate()
+ "', modificationDate='" + getModificationDate() + "', size="
+ getSize() + "]";
}
COM: <s> display as a string used for debugging only </s>
|
funcom_train/22384547 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void transformTop(double[] srcPtr, double[] dstPts, boolean toTop) {
if(toTop) transform(srcPtr, dstPts, true);
if(parent != null)
parent.transformTop(srcPtr, dstPts, toTop);
if(!toTop) transform(srcPtr, dstPts, false);
}
COM: <s> transform the given points between the internal and top level coordinates </s>
|
funcom_train/46019564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isUsername(final Domain domain, final String username) {
boolean isUsername = !isSystemReservedWord(username)
&& !username.equalsIgnoreCase(domain.getServerHost())
&& domain.getUsernameConfiguration().isUsername(username)
&& !domain.getUsernameConfiguration().isReserved(username)
&& !domain.getUsernameConfiguration().isUnallowable(username);
return isUsername;
}
COM: <s> returns whether the username is correct </s>
|
funcom_train/44832761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTabIndex(Integer tabIndex) {
Integer result = (Integer) ComponentUtils.invokeMethod(getPage().getHandler(),
getMethod("onSetTabIndex"), new Object[] {tabIndex});
this.tabIndex = (result != null) ? result : tabIndex;
}
COM: <s> setter for property tab index </s>
|
funcom_train/25099349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addBusSpeedPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_LogicalBus_busSpeed_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_LogicalBus_busSpeed_feature", "_UI_LogicalBus_type"),
HardwaremodelingPackage.Literals.LOGICAL_BUS__BUS_SPEED,
true,
false,
false,
ItemPropertyDescriptor.REAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the bus speed feature </s>
|
funcom_train/3022514 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void useCapitalLettersFromType(String type, StringBuffer buffer) {
for (int ndx = 0; ndx < type.length(); ndx++) {
char ch = type.charAt(ndx);
if (Character.isUpperCase(ch)) {
buffer.append(Character.toLowerCase(ch));
}
}
}
COM: <s> selects the capital letters from the type </s>
|
funcom_train/36770396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void developerChanged() {
if (update) return;
User developer = null;
// Unassigned
if (! (developerBox.getSelectedItem() instanceof String)) {
developer = (User) developerBox.getSelectedItem(); // ((User) developerBox.getSelectedItem()).getName()
}
// Developer Assigned may be null (unassigns the defect from previous Developer)
Controller.getInstance().assignDeveloperToDefect(getDefect(), developer);
}
COM: <s> this method is called when the user modifies the developer value </s>
|
funcom_train/17018885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleMessageFromClientUI(String message) {
if (message.length() > 0 && message.charAt(0) == '#') {
clientCommand(message);
} else if (this.isConnected()) {
try {
this.sendToServer(message);
} catch (IOException e) {
clientUI.display("Could not send message to server.");
}
} else {
clientUI.display("Not connected to server");
}
}
COM: <s> this method handles all data coming from the ui </s>
|
funcom_train/5395267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkJLabel(JLabel label) {
if ((label == xmlgzipConversion) | (label == docserConversion) |
(label == docsergzipConversion))
sb.append("= ");
else if ((label == xmlgzipReadParse) |
(label == docserReadParse) |
(label == docsergzipReadParse))
sb.append("+ ");
}
COM: <s> checks for a type jlabel to append to </s>
|
funcom_train/15914399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setDbType( String dbTypeName ) throws DBException {
if ( DB_TYPE_MYSQL.equals( dbTypeName ) ) {
dbType = new DBTypeMySQL();
}
else if ( DB_TYPE_ORACLE.equals( dbTypeName ) ) {
dbType = new DBTypeOracle();
}
else {
throw new DBException("unknown database type name: "+dbTypeName);
}
}
COM: <s> set the database type </s>
|
funcom_train/25468188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void zoomIn() {
tilesRetriever.clearCache();
this.zoom = zoom + 1;
this.locationTile = Calculus.getTileNumber(loc, zoom);
this.positionOnLocationTile = Calculus.getPositionOnTile(loc, zoom);
Position currentPos = currentTiles.getPositionOnTiles();
mainTile = mainTile.getIn(currentPos);
Position newPos = currentPos.getIn();
this.currentTiles = getTiles(mainTile, newPos);
setChanged();
notifyObservers();
}
COM: <s> zooms in when its possible </s>
|
funcom_train/7614456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public char getGlyphChar(int glyphIndex) {
if ((glyphIndex < 0) || (glyphIndex >= this.getNumGlyphs())) {
// awt.43=glyphIndex is out of vector's limits
throw new IllegalArgumentException(Messages.getString("awt.43")); //$NON-NLS-1$
}
return this.charVector[glyphIndex];
}
COM: <s> returns a character value of the specified glyph </s>
|
funcom_train/12243280 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void calculate() {
//if the object the floater floats on is not drawable, the floater's neither
if(!object.isDrawable()) floater.setDrawable(false);
else floater.setDrawable(true);
if(!floater.isDrawable()) return;
Point3D pos = floater.coords;
Point3D projectedPos=object.projectFloater(pos);
floater.move(projectedPos.x, projectedPos.y, projectedPos.h);
}
COM: <s> updates the floater by projecting it onto its defining object </s>
|
funcom_train/24405945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DumpMode getElementDumpMode(Object object, DumpMode currentDumpMode) {
DumpMode resultingDumpMode = currentDumpMode;
if (object!=null) {
ObjectDumperOptions annotation = object.getClass().getAnnotation(ObjectDumperOptions.class);
if (annotation!=null) {
resultingDumpMode = annotation.value();
}
}
return resultingDumpMode;
}
COM: <s> works out the most appropriate </s>
|
funcom_train/48407139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addOwnedStereotypePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Profile_ownedStereotype_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Profile_ownedStereotype_feature", "_UI_Profile_type"),
SpemxtcompletePackage.eINSTANCE.getProfile_OwnedStereotype(),
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the owned stereotype feature </s>
|
funcom_train/16453155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSplitPane getJSplitPane1() {
if (jSplitPane1 == null) {
jSplitPane1 = new JSplitPane();
jSplitPane1.setResizeWeight(0.0D);
jSplitPane1.setOneTouchExpandable(true);
jSplitPane1.setDividerLocation(250);
jSplitPane1.setContinuousLayout(true);
jSplitPane1.setLeftComponent(getJPanel5());
jSplitPane1.setRightComponent(getJTabbedPane());
}
return jSplitPane1;
}
COM: <s> gets the j split pane1 </s>
|
funcom_train/18745464 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RuleEdge getSelfEdge(RuleNode node, TypeLabel label) {
RuleEdge result = null;
for (RuleEdge edge : this.edgeMap().keySet()) {
if (edge.label().compareTo(label) == 0
&& edge.source().equals(node) && edge.target().equals(node)) {
result = edge;
break;
}
}
return result;
}
COM: <s> returns an self edge from given node with given label </s>
|
funcom_train/5533746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void ensureDirectoryFor(File targetFile) throws BuildException {
final File directory = new File(targetFile.getParent());
if (!directory.exists()) {
if (!directory.mkdirs()) {
throw new BuildException("Unable to create directory: " + directory.getAbsolutePath());
}
}
}
COM: <s> creates directories as needed </s>
|
funcom_train/46161480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setConnectionState(ConnectionState state) {
synchronized (hudShowingLock) {
this.connectionState = state;
// Make an explicit runnable, so that we make sure we've got the
// correct showing state once the runnable is run.
SwingUtilities.invokeLater(new Runnable() {
public void run() {
synchronized (hudShowingLock) {
new HUDDisplayer(isHUDShowing()).run();
}
}
});
}
}
COM: <s> set the connection state and update the hud accordingly </s>
|
funcom_train/44555755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void draw(int x, int y, int width, int height){
if (win!=null) {
ImageCanvas ic = win.getCanvas();
double mag = ic.getMagnification();
x = ic.screenX(x);
y = ic.screenY(y);
width = (int)(width*mag);
height = (int)(height*mag);
ic.repaint(x, y, width, height);
if (ImagePlus.listeners.size()>0 && roi!=null && roi.getPasteMode()!=Roi.NOT_PASTING)
notifyListeners(ImagePlus.UPDATED);
}
}
COM: <s> draws image and roi outline using a clip rect </s>
|
funcom_train/42705859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TimeInterval getInverse() {
EDate lowerBound = (this.upperBound.sameTime(EDate.MAX)) ? EDate.MIN
: this.upperBound.oppose();
EDate upperBound = (this.lowerBound.sameTime(EDate.MIN)) ? EDate.MAX
: this.lowerBound.oppose();
TimeInterval inverse = new TimeInterval(lowerBound, upperBound);
return inverse;
}
COM: <s> return b a if this a b </s>
|
funcom_train/12166815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSubmitWithoutLabelFails() throws Exception {
checkValidationFailsFromFile("validation-xml/submit-without-label-fails.xml",
"validation-error-missing-content", new Object[] {
XFormElements.SUBMIT, XFormElements.LABEL.toString()
});
}
COM: <s> ensure that submit without a label fails </s>
|
funcom_train/37141875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Rectangle getMonthDetailsBoundsAtLocation(int x, int y) {
Rectangle month = getMonthBoundsAtLocation(x, y);
if (month == null) return null;
int startOfDaysY = month.y + getMonthHeaderHeight();
if (y < startOfDaysY) return null;
month.y = startOfDaysY;
month.height = month.height - getMonthHeaderHeight();
return month;
}
COM: <s> returns the bounds of the month details which contains the </s>
|
funcom_train/40382532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean areThereAppointmentsOn(int day) {
boolean thereAre = false;
for (int layersIndex = 0; layersIndex <= highestLayer; layersIndex++) {
ArrayList<AppointmentLayoutDescription> layerDescriptions =
layeredDescriptions.get(layersIndex);
if (overlapsWithDescriptionInLayer(layerDescriptions, day, day)) {
thereAre = true;
break;
}
}
return thereAre;
}
COM: <s> indicates whether there are em any em appointments that encompass the </s>
|
funcom_train/9273906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop() {
stopTime = System.currentTimeMillis();
collect = false;
stop = true;
for (int i = 0; i < threads.length; i++) {
try {
threads[i].join();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
}
COM: <s> stop the load generator </s>
|
funcom_train/11765064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void newGraph() throws IOException{
try {
dirtyHandler();
//really new
//if the user decides not to save changes, the dirty handler is
//not marking the object as not dirty, cause it is not
//applicable for all cases. mark it here.
this.setChanged(false,false);
//close the old
closeGraph();
//create a new one
setModel(createNewGraph());
}
catch (AbortProcessException ab) {
//cancel new? ok. Do nothing
}
}
COM: <s> creates a new model </s>
|
funcom_train/12188848 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNegativeInfinity() throws ExpressionException {
final Function function = new FloorFunction();
Value result = function.invoke(expressionContextMock, new Value[]{
DoubleValue.NEGATIVE_INFINITY});
assertTrue(result instanceof DoubleValue);
assertTrue(Double.NEGATIVE_INFINITY == (((DoubleValue) result).asJavaDouble()));
}
COM: <s> tests if function works correctly for negative infinity </s>
|
funcom_train/19871389 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processItem(Long categoryId, ITreeItem node) {
boolean match = match(categoryId, node);
// multiple selection mode
if (multipleSelection){
if (match){
if (!node.isSelected()) selectAllChildren(node);
node.select(!node.isSelected());
} else
processChildren(categoryId, node);
}
// single selection mode
else {
node.select(match);
processChildren(categoryId, node);
}
}
COM: <s> performs logic to select node and its children for </s>
|
funcom_train/48153982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stateChanged(ChangeEvent e){
if (e.getSource() == sampleScroll.getSlider()){
sampleSize = (int)sampleScroll.getValue();
sample = new double[sampleSize];
setDistributions();
}
else if (e.getSource() == param1Scroll.getSlider()) setDistributions();
else if (e.getSource() == param2Scroll.getSlider()) setDistributions();
}
COM: <s> this method handles the scroll events associated with changes in the sample size </s>
|
funcom_train/20304237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writeIndividuals() {
if (isTrue( OPT_NOINDIVIDUALS )) {
return;
}
if (hasValue( OPT_INDIVIDUALS_SECTION )) {
writeln( 0, getValue( OPT_INDIVIDUALS_SECTION ));
}
if (useOntology()) {
writeOntIndividuals();
}
else {
writeRDFIndividuals();
}
}
COM: <s> write any instances individuals in the vocabulary </s>
|
funcom_train/31941546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("ICWS".equals(portName)) {
setICWSEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/40515684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printStatus() {
System.out.println("HOSTS:");
PrototypedHost[] onlineHosts = getOnlineHosts();
for (int i = 0; i < onlineHosts.length; i++) {
System.out.println(
"\t["
+ onlineHosts[i].getPrototype()
+ ":"
+ onlineHosts[i].getAddress()
+ "]");
}
}
COM: <s> prints data of all online prototyped hosts </s>
|
funcom_train/11321915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void defineParameter(String name) {
if (name == null) {
throw new IllegalArgumentException("Null name parameter");
}
Map<String, Object> localParameters = getParameters();
if (!localParameters.containsKey(name)) {
localParameters.put(name, null);
}
}
COM: <s> defines a button parameter that will have its value bound to a matching </s>
|
funcom_train/7389940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getUserLevel(String idUser){
rs = null;
ContentGroups resultado = new ContentGroups();
String level;
try {
stmt = conn.createStatement();
rs = stmt.executeQuery("SELECT LEVEL_ADMIN FROM USERS WHERE ID = '" + idUser + "'");
Vector tabla= new Vector();
if (rs.next()){
String linea = "";
level = rs.getString("LEVEL_ADMIN");
return (level);
} else {
return (null);
}
} catch (Exception e){
//log.logTxt("getGroups(user):: ERROR: " + e, PGLog.ERROR);
e.printStackTrace();
return(null);
}
}
COM: <s> get level admin of a user </s>
|
funcom_train/42651097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object execute(String operationName, Map<String, Object> params) {
if(logger.isInfoEnabled()) {
logger.info("Executing operation '" + operationName + "' on " + this + " with params: " + params);
}
return getBuilder().triggerActionResultOperation(this, operationName, params);
}
COM: <s> client side helper that transmits the requests to server side method </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.