__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/30276869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHandledColdWI(long answeredTime) {
try {
if (!isColdWIHandled) {
isColdWIHandled = true;
this.answeredTime = answeredTime;
StatSummary.getInstance().changeStatOnHandleColdWI(this);
}
} catch (Exception e) {
if (LOG.isErrorEnabled()) {
LOG.error("Can't set handled cold WI: wiId = " + getWID(), e);
}
}
}
COM: <s> changes wi state if cold wi is handled </s>
|
funcom_train/3114970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private float findAngle(float vectX, float vectY) {
float angle;
if (vectX == 0) {
if (vectY > 0.0) {
angle = (float)Math.PI*3.0f/2.0f;
} else if (vectY == 0.0) {
angle = 0;
} else { //diffY<0
angle = (float)Math.PI/2.0f;
}
} else {
angle = convertMouse2PI( (float)Math.atan( vectY/vectX ), vectX, vectY );
}
return angle;
}
COM: <s> this method takes in a vector and returns </s>
|
funcom_train/1147496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Font getFont1() {
if (font1 == null) {//GEN-END:|110-getter|0|110-preInit
// write pre-init user code here
font1 = Font.getFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_SMALL);//GEN-LINE:|110-getter|1|110-postInit
// write post-init user code here
}//GEN-BEGIN:|110-getter|2|
return font1;
}
COM: <s> returns an initiliazed instance of font1 component </s>
|
funcom_train/46298942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object invoke(Object value) {
if (_methods == null)
initialize(value.getClass());
for (int i = 0; i < _properties.length; i++) {
Method m = _methods[i];
try {
value = m.invoke(value);
} catch (Exception ex) {
throw new IllegalStateException("error invoking property reader: obj="
+ value + " property=" + _properties[i], ex);
}
}
return value;
}
COM: <s> invoke the property path expression against the specified object value </s>
|
funcom_train/25871332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(mNetworkType);
dest.writeString(mState.name());
dest.writeString(mDetailedState.name());
dest.writeInt(mIsFailover ? 1 : 0);
dest.writeInt(mIsAvailable ? 1 : 0);
dest.writeString(mReason);
dest.writeString(mExtraInfo);
}
COM: <s> implement the parcelable interface </s>
|
funcom_train/28759182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRightbackground(String newVal) {
if ((newVal != null && this.rightbackground != null && (newVal.compareTo(this.rightbackground) == 0)) ||
(newVal == null && this.rightbackground == null && rightbackground_is_initialized)) {
return;
}
this.rightbackground = newVal;
rightbackground_is_modified = true;
rightbackground_is_initialized = true;
}
COM: <s> setter method for rightbackground </s>
|
funcom_train/20307196 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteTable( String tableName ) {
String opname = "dropTable";
PreparedStatement ps = null;
try {
ps = m_sql.getPreparedSQLStatement(opname, tableName);
ps.executeUpdate();
return;
} catch (Exception e1) {
throw new RDFRDBException("Failed to delete table ", e1);
}finally {
if(ps!=null)m_sql.returnPreparedSQLStatement(ps);
}
}
COM: <s> delete a table </s>
|
funcom_train/12188701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetException() throws Exception {
// construct an ExtendedSAXParseException with a root cause
Exception rootCause = new Exception();
ExtendedSAXParseException e =
new ExtendedSAXParseException("message", null, rootCause);
assertEquals("Root cause exception should be the Exception passed " +
"in on construction ", rootCause, e.getException());
}
COM: <s> tests the get exception method </s>
|
funcom_train/48151727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() {
super.reset();
for (int i = 0; i < 3; i++)
door[i].close(String.valueOf(i + 1));
getRecordTable().append("\tG\tS\tW");
win.reset();
winGraph.reset();
winTable.reset();
}
COM: <s> this method resets the experiment including the record table the doors </s>
|
funcom_train/44222101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Preferences renew() {
Preferences currentNode =
Preferences.userNodeForPackage(FragmenterPreferences.class);
//
// Renew the default system configuration.
//
this.renewSystemConfig(currentNode);
//
// Flush the setting into persistent store.
//
try {
currentNode.flush();
} catch (Exception ex) {
ex.printStackTrace();
}
return currentNode;
}
COM: <s> renew the preference object on those system default settings </s>
|
funcom_train/8491666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getRefresh() {
if (refresh == null) {
refresh = new JButton();
refresh.setBounds(new Rectangle(66, 36, 103, 16));
refresh.setText("Refresh");
refresh.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
refreshList();
}
});
}
return refresh;
}
COM: <s> this method initializes refresh </s>
|
funcom_train/38470860 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getSUM_BREAK1() {
if (sumBreak1Dirty) {
double aValue = (double) Util.calcDateDifference(Calendar.MINUTE, getBREAK1_START(), getBREAK1_END());
setSUM_BREAK1(aValue);
sumBreak1Dirty = false;
}
return getAsDouble(get(SUM_BREAK1));
}
COM: <s> returns the s um break1 </s>
|
funcom_train/17567878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getVerifyRotationTolerance() {
try {
//Try to get the parameters from Fingerprint SDK.
return fingerprintSDK.getVerificationRotationTolerance();
} catch (GrFingerJavaException e) {
//If fails to load the parameters, writes error to log and returns 0
ui.writeLog(e.getMessage());
return 0;
}
}
COM: <s> returns the current rotation tolerance on verifications </s>
|
funcom_train/13186595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode() {
int result = 193;
result = 37 * result + ObjectUtilities.hashCode(this.stroke);
result = 37 * result + ObjectUtilities.hashCode(this.baseStroke);
result = 37 * result + ObjectUtilities.hashCode(this.outlineStroke);
result = 37 * result + ObjectUtilities.hashCode(this.baseOutlineStroke);
return result;
}
COM: <s> returns a hashcode for the renderer </s>
|
funcom_train/18257120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Coordinate getCoordinateAtPixel(int pixelX, int pixelY) {
// find pixel coord in terms of scape coord
double scale = scale();
double transX = ((double) pixelX / scale);
double transY = ((double) pixelY / scale);
return new Coordinate2DContinuous(transX, transY);
}
COM: <s> returns the agent at the given pixel in this view </s>
|
funcom_train/44562383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void applySettings() {
try {
for (DcFieldDefinition definition : getFieldDefinitions().getDefinitions()) {
DcField field = getField(definition.getIndex());
field.setRequired(definition.isRequired());
field.setEnabled(definition.isEnabled());
}
} catch (Exception e) {
logger.error("Error while applying settings on module " + getName(), e);
}
}
COM: <s> applies the field settings on this module </s>
|
funcom_train/40927891 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getConfirmacionSICommand() {
if (confirmacionSICommand == null) {//GEN-END:|233-getter|0|233-preInit
// write pre-init user code here
confirmacionSICommand = new Command("SI", Command.OK, 0);//GEN-LINE:|233-getter|1|233-postInit
// write post-init user code here
}//GEN-BEGIN:|233-getter|2|
return confirmacionSICommand;
}
COM: <s> returns an initiliazed instance of confirmacion sicommand component </s>
|
funcom_train/2877195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object doFunction() throws SmartFrogFunctionResolutionException {
Object result = null;
for (Enumeration e = context.keys(); e.hasMoreElements();) {
Object key = e.nextElement();
if (result == null) {
result = context.get(key);
} else {
result = doOperator(result, context.get(key));
}
}
return result;
}
COM: <s> implements the functionality of base operator </s>
|
funcom_train/2288104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void applyChanges() throws CmsException {
if (m_userName == null) {
throw new CmsIllegalStateException(Messages.get().container(Messages.ERR_INVALID_USER_CONTEXT_0));
}
validate();
m_cms.setPassword(m_userName, getCurrentPwd(), getNewPwd());
}
COM: <s> sets the new password for the current logged in user </s>
|
funcom_train/39170774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNormalizeString() throws ClassNotFoundException {
System.out.println("normalizeString");
String str = "Ångström";
MetaMapPR instance = new MetaMapPR();
String expResult = "Angstrom";
String result = instance.normalizeString(str);
assertEquals(expResult, result);
}
COM: <s> test of normalize string method of class meta map pr </s>
|
funcom_train/33859701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton() {
if (jButton == null) {
DefaultButtonModel defaultButtonModel = new DefaultButtonModel();
defaultButtonModel.setRollover(false);
jButton = new JButton();
jButton.setText("clear input area");
jButton.setModel(defaultButtonModel);
jButton.setOpaque(true);
jButton.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(java.awt.event.ActionEvent e){
inputTextArea.setText("");
}
});
}
return jButton;
}
COM: <s> this method initializes j button </s>
|
funcom_train/48153555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(){
super.update();
//Show the first throw
diceBoard.setValues(0, x);
diceBoard.setValues(1, y);
diceBoard.setRolled(true);
//If necessary, show the last throw
if (rolls > 1){
diceBoard.setValues(0, u);
diceBoard.setValues(1, v);
diceBoard.setRolled(true);
}
//Update other components
recordTable.addRecord(new double[]{getTime(), x, y, u, v, rolls, win});
profitGraph.repaint();
profitTable.repaint();
}
COM: <s> this method updates the display including the dice board record table and the </s>
|
funcom_train/34340202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getPrecio1() {
if (precio1 == null) {//GEN-END:|36-getter|0|36-preInit
// write pre-init user code here
precio1 = new TextField("2.precio", null, 5, TextField.ANY);//GEN-LINE:|36-getter|1|36-postInit
// write post-init user code here
}//GEN-BEGIN:|36-getter|2|
return precio1;
}
COM: <s> returns an initiliazed instance of precio1 component </s>
|
funcom_train/32752602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseScriptHeader( final File file ) {
try {
final BufferedReader reader = new BufferedReader( new FileReader( file ) );
try {
int count = 0;
while ( count++ < 10 ) { // only attempt to read the first 10 lines
final String line = reader.readLine();
final Matcher matcher = SCRIPT_NOTES_PATTERN.matcher( line );
if ( matcher.matches() && matcher.groupCount() > 0 ) {
_notes = matcher.group(1);
return;
}
}
return;
}
finally {
reader.close();
}
}
catch ( Exception exception ) {
return;
}
}
COM: <s> parse a standard script header for notes </s>
|
funcom_train/25710167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean exitWithSaveDialog() {
boolean save = false;
String title = "Save changes?";
String message = "You have unsaved changes, would you like to save them now?";
int n = JOptionPane.showConfirmDialog(this, message, title, JOptionPane.YES_NO_OPTION);
if (n == JOptionPane.YES_OPTION) {
save = true;
}
return save;
}
COM: <s> display a confirmation dialog asking if the user wants to save their </s>
|
funcom_train/20825387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getChannelIndex(final int row) {
int channelIndex = row - getShow().getNumberOfSubmasters() - 1;
Groups groups = context.getShow().getGroups();
if (groups.isEnabled()) {
Channel channel = groups.getChannel(channelIndex);
channelIndex = channel.getId();
}
return channelIndex;
}
COM: <s> gets the index in the channel collection of the channel on given row </s>
|
funcom_train/133352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removeCorrTier (AbstractTieredMap otherMap, MapTierGlyph otherTier) {
// Figure out which one of our tiers corresponds,
int loc = otherMap.indexOf (otherTier);
if ((loc < 0) || loc > tiers.size())
return;
// Remove the tier's children
MapTierGlyph toRemove = tiers.get(loc);
toRemove.removeChildren();
// Then the tier itself!
tiers.remove(toRemove);
packTiers(true,true);
updateWidget();
// remove ourself from the tier's audience
toRemove.removeTierStateChangeListener (this);
}
COM: <s> given another abstract tiered map and a tier it contains </s>
|
funcom_train/9270505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int maxEncodedLength(String s) {
// maxBytesPerChar() returns a float, which can only hold 24 bits of an
// integer. Therefore, promote the float to a double so that all bits
// are preserved in the intermediate result.
return (int) (s.length() * (double) encoder.maxBytesPerChar());
}
COM: <s> find the maximum number of bytes needed to represent the string in the </s>
|
funcom_train/4652071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected TemplateModel createModel() throws TemplateModelException {
ServletContext servletContext = ServletActionContext
.getServletContext();
HttpServletRequest request = ServletActionContext.getRequest();
HttpServletResponse response = ServletActionContext.getResponse();
ValueStack stack = ServletActionContext.getContext().getValueStack();
Object action = null;
if (invocation != null) {
// Added for NullPointException
action = invocation.getAction();
}
return freemarkerManager.buildTemplateModel(stack, action,
servletContext, request, response, wrapper);
}
COM: <s> build the instance of the scopes hash model including jsp tag lib support </s>
|
funcom_train/306907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStatus(int statusCode) {
if (Protocol.getHeaderResponseStatus(statusCode) != null) {
statusLine = Protocol.HTTP_VERSION + " " + statusCode + " "
+ Protocol.getHeaderResponseStatus(statusCode);
} else {
throw new java.lang.IllegalArgumentException("No such status code");
}
}
COM: <s> sets the status of the response to a certain http status code </s>
|
funcom_train/26615010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItem4() {
if (jMenuItem4 == null) {
jMenuItem4 = new JMenuItem();
jMenuItem4.setText("Insert new Server");
jMenuItem4.addMouseListener(new java.awt.event.MouseAdapter() {
public void mousePressed(java.awt.event.MouseEvent e) {
startPanel.setVisible(false);
insertServerPanel.setVisible(true);
}
});
}
return jMenuItem4;
}
COM: <s> this method initializes j menu item4 </s>
|
funcom_train/45452288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateAccessors2Args() throws Exception {
String testName = "Test Instrument";
String testPackageName = "test.package";
Instrument testInstrument = new Instrument(testName, testPackageName);
assertNotNull("Unable to create instrument", testInstrument);
assertEquals("Name inconsistent:", testName, testInstrument.getName());
}
COM: <s> test creating an instrument using the two argument constructor </s>
|
funcom_train/953739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HashSet getSendableMessageTypes() {
MessageType mt = null;
LinkedHashSet hs = new LinkedHashSet();
/* messges for the provider selection agent */
String[] recomm = {"Query"};
Class[] recommC = {QueryData.class};
mt = new MessageType("ask-recommendation", recomm, recommC );
mt.setAgentSuitable(true);
mt.setGroupSuitable(false);
mt.setCommunitySuitable(false);
hs.add(mt);
return hs; }
COM: <s> define the types of the message which can be sent </s>
|
funcom_train/2380606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateActions(ISelection selection) {
//SyndEntry entry = (SyndEntry)((IStructuredSelection)selection).getFirstElement();
boolean isEmpty = selection.isEmpty();
_actionAddAsResource.setEnabled(!isEmpty);
_actionOpen.setEnabled(!isEmpty);
}
COM: <s> update the actions depending on the tree selection </s>
|
funcom_train/51571777 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void namespace(String ns) {
String nsName = replaceTokens(ns);
if (checkIdentifier(nsName)) {
currentNamespace = namespaces.get(nsName);
if (currentNamespace == null) {
currentNamespace = new UncleScriptNamespace(nsName);
namespaces.put(nsName, currentNamespace);
}
log.log(Level.FINER, "namespace: " + ns);
}
}
COM: <s> defines a namespace </s>
|
funcom_train/51358732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Rect gridNormalize() {
Point c = new Point(), d = new Point();
c.x = Math.min(this.a.x, this.b.x);
c.y = Math.max(this.a.y, this.b.y);
d.x = Math.max(this.a.x, this.b.x);
d.y = Math.min(this.a.y, this.b.y);
return new Rect(c.x,c.y,d.x,d.y);
}
COM: <s> creates a normzlied rectangle according to the cartesian coordinate system </s>
|
funcom_train/23020266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addProxyConnectionHeader(HttpState state, HttpConnection conn) throws IOException, HttpException {
LOG.trace("enter HttpMethodBase.addProxyConnectionHeader(" + "HttpState, HttpConnection)");
if (!conn.isTransparent()) {
if (getRequestHeader("Proxy-Connection") == null) {
addRequestHeader("Proxy-Connection", "Keep-Alive");
}
}
}
COM: <s> generates tt proxy connection keep alive tt request header when </s>
|
funcom_train/18480253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireChangeListeners(ChangeEvent ev) {
java.util.List<ChangeListener> listeners = new ArrayList<ChangeListener>(change_listeners) ;
for(int i = listeners.size() - 1; i >= 0; i--) {
listeners.get(i).stateChanged(ev) ;
}
}
COM: <s> calls all action listeners for a change event </s>
|
funcom_train/29851411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void commandAction(Command command, Displayable displayable) {
StateHolder stateHolder = StateHolder.getInstance();
if (command == List.SELECT_COMMAND) {
int index = getSelectedIndex();
BluemoteDevice device = (BluemoteDevice) deviceList
.elementAt(index);
PluginList plugins = new PluginList(device);
stateHolder.setScreen(plugins);
} else {
switch (command.getCommandType()) {
case Command.EXIT:
stateHolder.destroyMIDlet();
break;
case Command.HELP:
stateHolder.showLogs(this);
break;
}
}
}
COM: <s> todo change this method for clear command selection </s>
|
funcom_train/23410339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addHasRolePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Agent_hasRole_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Agent_hasRole_feature", "_UI_Agent_type"),
AgentsPackage.Literals.AGENT__HAS_ROLE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the has role feature </s>
|
funcom_train/19406589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void cleanupServer() throws IOException {
// stop monitor thread
monitor.stopThread();
monitor = null;
// stop connection threads
while (connectionThreads.size() > 0) {
ConnectionThread t = (ConnectionThread)connectionThreads.remove(0);
t.setSocket(null, true);
}
// close socket
serverSocket.close();
serverSocket = null;
}
COM: <s> cleans up all values for exiting or re reading configuration </s>
|
funcom_train/31098484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDestination(String destinationName, String internalDest) {
if (!idReferences.doesIDExist(internalDest)) {
idReferences.addToUnvalidatedIdList(internalDest);
}
PDFDestination obj = new PDFDestination(idReferences, destinationName, internalDest);
root.getDestinations().add(obj);
}
COM: <s> make a destination object and add it </s>
|
funcom_train/22862643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveTimeDiffSummary() {
try{
// Create file
FileWriter fstream = new FileWriter(currentFileName+".csv");
BufferedWriter out = new BufferedWriter(fstream);
out.write(""+timeDiffs[0]);
for(int i = 1; i< 1000; i++)
out.write(";"+timeDiffs[i]);
//Close the output stream
out.close();
}catch (Exception e){//Catch exception if any
System.err.println("Error: " + e.getMessage());
}
}
COM: <s> store the rendertimes obtained from the used display class to </s>
|
funcom_train/15454525 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addUserRecomendation(User user, float similarity) {
if(this.isConfirmedAccess()){
if (user.getCode() != this.getCode()
&& !this.getAllContacts().contains(user)
&& !this.existsRecommendation(user)) {
UserRecommendation userRecommendation = new UserRecommendation();
userRecommendation.setOwner(this);
userRecommendation.setUser(user);
userRecommendation.setDate(new Date());
this.getRecommendations().add(userRecommendation);
}
}
}
COM: <s> creates and adds a user recomendation </s>
|
funcom_train/50865151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeMembers() {
int[] selectedIndexes = memberList.getSelectedIndices();
Object[] selectedPeople = new Object[selectedIndexes.length];
for (int x = 0; x < selectedIndexes.length; x++)
selectedPeople[x] = memberListModel.elementAt(selectedIndexes[x]);
for (Object aSelectedPeople : selectedPeople) memberListModel.removeElement(aSelectedPeople);
addMembersButton.setEnabled(canAddMembers());
}
COM: <s> remove selected members from the list </s>
|
funcom_train/2710127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStart(Number start) {
if (start == null && this.end == null)
throw new IllegalArgumentException("The segment has already an open end");
if (start != null && this.end != null && start.doubleValue() > this.end.doubleValue()){
this.start = this.end;
this.end = start;
} else {
this.start = start;
}
}
COM: <s> sets an end point of the segment maintaining the existing end point </s>
|
funcom_train/11701996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public String consumeString(InputStream is) throws IOException {
int utflen = readInt(is);
if (utflen > OVERSIZE_KEY_LENGTH) {
throw new IOException(OVERSIZE_FIELD + utflen);
}
byte[] bytearr = new byte[utflen];
readFully(bytearr, is);
return UTFConverter.convertUTFToString(bytearr);
}
COM: <s> consume a string from the input stream </s>
|
funcom_train/3367210 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getBaselineOffset() {
switch(tabPane.getTabPlacement()) {
case JTabbedPane.TOP:
if (tabPane.getTabCount() > 1) {
return 1;
}
else {
return -1;
}
case JTabbedPane.BOTTOM:
if (tabPane.getTabCount() > 1) {
return -1;
}
else {
return 1;
}
default: // RIGHT|LEFT
return (maxTabHeight % 2);
}
}
COM: <s> returns the amount the baseline is offset by </s>
|
funcom_train/47679709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadDefaultValue() throws AppException {
if (defaultValue.startsWith("=")) {
module.getFormulaValue(name,defaultValue.substring(1,defaultValue.length()),-1);
} else {
module.dataMgr.putFieldValue(name, module.fieldSubstitution(module.defaultFieldValueSubstitution(defaultValue),-1,false));
}
}
COM: <s> stores in the data repository the value of the default option in the </s>
|
funcom_train/9673401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Data search(DataHeader dataHeader){
Object object=dbSearch(net.sf.uninet.common.content.data.Data.class,"id == '"+dataHeader.getId()+"'");
if(object!=null){return(Data)object;}
return null;
}
COM: <s> search uni net data </s>
|
funcom_train/22402427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void hide( Arg selection) {
if(selection == null)
throw new NullPointerException( "Can't execute Selection.hide with a null argument");
if(selection.getType() != Arg.STRING)
throw new IllegalArgumentException( "Can't execute Selection.hide with a non STRING argument");
main.hideSelection( selection.getStringValue());
}
COM: <s> unset the selection to visible </s>
|
funcom_train/51653388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getLineHeight () {
checkWidget();
if (txnObject == 0) {
return measureSpace ().v;
}
int [] oLineWidth = new int [1], oLineHeight = new int [1];
OS.TXNGetLineMetrics (txnObject, 0, oLineWidth, oLineHeight);
return OS.Fix2Long (oLineHeight [0]);
}
COM: <s> returns the height of a line </s>
|
funcom_train/2379668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleBrowse() {
FileDialog dialog = new FileDialog(getEditor().getSite().getShell(), SWT.OPEN);
dialog.setText("Select a file");
String path = dialog.open();
if(path != null) {
avatarPath = path;
updateImage(avatarPath);
((PersonalProfileEditor)getEditor()).setDirty(true);
}
}
COM: <s> uses the standard file selection dialog to </s>
|
funcom_train/25765834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeEmtpyTags(Element e) {
NodeList elements = e.getElementsByTagName("*");
for(int i = elements.getLength()-1; i >= 0; i--) {
Node element = elements.item(i);
if (search(element.getNodeName(), Regexps.multimediaTagsRe) == -1 && DOM.getInnerHTML(element).isEmpty()) {
removeElement(element);
}
}
}
COM: <s> remove all empty tags that arent multimedial embed object and img </s>
|
funcom_train/32040108 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createBoundGroup() {
multiplicityGroup = new Group(this, SWT.NONE);
multiplicityGroup.setLayout(new GridLayout());
multiplicityGroup.setText("bounds");
lowerBoundButton = new Button(multiplicityGroup, SWT.CHECK);
lowerBoundButton.setText("Lower bound = 0");
manyButton = new Button(multiplicityGroup, SWT.CHECK);
manyButton.setText("Upper bound = -1");
}
COM: <s> this method initializes multiplicity group </s>
|
funcom_train/22649054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void emitConstructors() throws IOException {
emitConstructors(object, null);
Map<String, Boolean> subclassArgTypes = new HashMap<String, Boolean>();
for (CConstructor c : object.getConstructors())
subclassArgTypes.put(c.getCommaSeparatedArgumentTypes(), true);
emitSuperClassConstructor(object, subclassArgTypes);
}
COM: <s> used to generate code for constructors </s>
|
funcom_train/46742579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ViewOrderContainerModel giveFirst() {
Iterator iter = this.iterator();
if (iter.hasNext()) {
Object o = iter.next();
if (o instanceof ViewOrderContainerModel) {
return (ViewOrderContainerModel) o;
} else {
Log.errorTrace(o.getClass().getName() + "!=ViewOrderContainerModel");
return null;
}
} else {
ViewOrderContainerModel m = new ViewOrderContainerModel();
add(m);
return m;
}
}
COM: <s> return the first view order container found otherwise </s>
|
funcom_train/35716529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleMouseMove(Event event) {
if (!(event.widget instanceof Control))
return;
if (fControl.isFocusControl())
return;
Control eventControl= (Control) event.widget;
//transform coordinates to subject control:
Point mouseLoc= event.display.map(eventControl, fSubjectControl, event.x, event.y);
if (fSubjectArea.contains(mouseLoc))
return;
if (inKeepUpZone(mouseLoc.x, mouseLoc.y, ((IInformationControlExtension3) fControl).getBounds()))
return;
hideInformationControl();
}
COM: <s> handle mouse movement events </s>
|
funcom_train/38384937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUp() throws Exception {
REDFile tmpFile;
REDFileRider rider;
REDEditor editor;
super.setUp();
editor = getSharedTestEditor();
// create a second tmp file
tmpFile = new REDFile(TMP_FILE2);
rider = new REDFileRider(tmpFile);
tmpFile.purge();
rider.writeBytes(LONG_TEXT.getBytes(), LONG_TEXT.length());
assertTrue("Cannot write to current directory. Needed for testing.", rider.getRes() == 0);
tmpFile.close();
}
COM: <s> initializes test data </s>
|
funcom_train/21438142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public String consume(InputStream is) {
try {
BufferedInputStream bis = new BufferedInputStream(is);
int read;
StringBuilder str = new StringBuilder();
while( (read = bis.read())!=-1 )
str.append((char)read);
return str.toString();
}
catch(Exception e) {
LogUtils.report(e);
return "";
}
}
COM: <s> return a string containing all the data read from a stream </s>
|
funcom_train/35249221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void applySearchInfo(SearchInfo searchInfo) {
if (searchInfo != null) {
this.setFirstRow(searchInfo.getFirstRow());
this.setPageSize(searchInfo.getPageSize());
this.setGetTotalRows(searchInfo.isGetTotalRows());
getConditions().addAll(searchInfo.getConditions());
getSorts().addAll(searchInfo.getSorts());
}
}
COM: <s> apply search info to this query info </s>
|
funcom_train/11663483 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Configuration add(String name) throws ReadOnlyException {
if (readOnly) {
throw new ReadOnlyException();
}
Element elem = config.getOwnerDocument().createElement(name);
config.appendChild(elem);
setDirty();
return new Configuration(this, elem, readOnly);
}
COM: <s> add adds a new configuration node to this configuration node </s>
|
funcom_train/11372689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setDeprecatedPropertiesForUpgrade(Properties props) {
deprecatedProperties = new HashMap<String, String>();
String md5 = props.getProperty(DEPRECATED_MESSAGE_DIGEST_PROPERTY);
if (md5 != null) {
deprecatedProperties.put(DEPRECATED_MESSAGE_DIGEST_PROPERTY, md5);
}
}
COM: <s> pull any properties out of the version file that are from older </s>
|
funcom_train/44223080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean existEmbededImage(String imageName){
boolean isExist = false;
for(int i = 0; i < this.embededImages.calculateSize(); i++){
EmbededImage ei = (EmbededImage)this.embededImages.readByNumber(i);
if(ei.get_name().equals(imageName)){
isExist = true;
break;
}
}
return isExist;
}
COM: <s> check if there exists an embeded image whose </s>
|
funcom_train/32749349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getMagField() {
// temporary fix for polarity problem by adding a "-" in the vertical direction
// eventually, should be "-" for both directions to match the SNS convention
if (getOrientation() == IElectromagnet.ORIENT_VER)
return -m_dblField;
else
return m_dblField;
}
COM: <s> return the current magnetic field </s>
|
funcom_train/10299571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTextFontWeight(String weight) {
boolean isBold=false;
if (weight.compareTo("bold") == 0) {
isBold = true;
} else {
isBold = false;
}
textAttribs.removeAttribute(StyleConstants.Bold);
textAttribs.addAttribute(StyleConstants.Bold, new Boolean(isBold));
setFont(getAttributeSetFont(textAttribs));
Font font = getFont();
}
COM: <s> sets the text font weigth for the activator text </s>
|
funcom_train/43403414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PowerForm autogenPowerForm(Form baseForm) {
PowerForm powerForm = autogenPowerForms.get(baseForm);
if (powerForm == null) {
String name = "_Power("+baseForm.getNameString()+")";
powerForm = FormFactory.makePowerForm(name, baseForm);
autogenPowerForms.put(baseForm, powerForm);
register(powerForm);
}
return powerForm;
}
COM: <s> returns a power form with the given base form </s>
|
funcom_train/50865470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double getDistance() {
double result = 0D;
Coordinates[] sites = getSites();
result += getCenterCoords().getDistance(sites[0]);
for (int x = 1; x < sites.length; x++)
result += sites[x - 1].getDistance(sites[x]);
result += sites[sites.length - 1].getDistance(getCenterCoords());
return result;
}
COM: <s> gets the total distance travelled in the mission </s>
|
funcom_train/27943711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removePlugin( int nPluginId, long nProfileId ) {
JUserInfo userInfo = getUserInfo( nProfileId, nPluginId );
userDel( nPluginId, userInfo );
database.execUpdate( "DELETE FROM active_plugins WHERE profile_id=" + nProfileId + " AND plugin_id=" + nPluginId );
return true;
}
COM: <s> remove a plugin from specified </s>
|
funcom_train/3720956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDatatype(String datatype) throws ProfileException {
String oldDatatype = this.datatype;
try {
vetoableChangeSupport.fireVetoableChange("datatype", oldDatatype, datatype);
} catch (Exception e) {
throw new ProfileException(null, e);
}
this.datatype = datatype;
propertyChangeSupport.firePropertyChange("datatype", oldDatatype, datatype);
}
COM: <s> setter for property datatype </s>
|
funcom_train/45077100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(String[] inArgs, Properties inProps) throws org.omg.CORBA.UserException {
//initialize the orb
if (getApplet() == null)
setORB(ORB.init(inArgs, inProps));
else
setORB(ORB.init(theApplet, inProps));
}
COM: <s> initialize the none service interace </s>
|
funcom_train/1123540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkFromTo(int f, int t) throws FromToException {
checkInitialized();
if (f < from || t > to || f > t) {
throw new FromToException("Interval: [" + f + ", " + t + "] is not in configuration interval: [" + from + ", " + to + "]", this);
}
}
COM: <s> checks if given from to interval is inside initialized interval </s>
|
funcom_train/50326761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SecurityElement getSecurityElement(int i) {
SecurityElement se = mHashSE.get(Integer.valueOf(i));
if (se!=null) return se;
else {
se = new SecurityElement(i);
mHashSE.put(Integer.valueOf(i), se);
return se;
}
}
COM: <s> create a new object as needed </s>
|
funcom_train/19307769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MifTextRect curTextRect() {
//temporary fix for NoSuchElementException
if (this.textRects.isEmpty()) {
final MifTextRect textRect = new MifTextRect(1,
this.document.getNewId());
this.textRects.add(textRect);
}
return this.textRects.get(this.textRects.size() - 1);
}
COM: <s> returns the current text rectangle </s>
|
funcom_train/2290462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CmsResourceTranslator getFileTranslator() {
String[] array = m_fileTranslationEnabled ? new String[m_fileTranslations.size()] : new String[0];
for (int i = 0; i < m_fileTranslations.size(); i++) {
array[i] = (String)m_fileTranslations.get(i);
}
return new CmsResourceTranslator(array, true);
}
COM: <s> returns the file resource translator that has been initialized </s>
|
funcom_train/49929217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String timeStr = "";
if (duration > 0) {
timeStr = " (" + duration + " min)";
}
return "<html><pre><b>t=" + startTime + ": " + name.toLowerCase() +
timeStr + " with " + resources +
"</b><br>\t" + preconditions + "</pre></html>";
}
COM: <s> returns a string representation of the action </s>
|
funcom_train/4683972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object get(long timeout) {
synchronized (v) {
if (timeout > 0 && v.isEmpty() && !stopped) {
try {
v.wait(timeout);
} catch (InterruptedException e) {
// it's important to catch this exception because we don't notifyAll in
// put(), so only one thread is unblocked and the thread must consume the
// element even if it has been interrupted
}
}
return pop();
}
}
COM: <s> answer an element from the receiver </s>
|
funcom_train/37228910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndDateTime( String sDateTime, String sPrecision ) {
TSElement e = new TSElement( iLevel + 1, this );
e.setName( "DR.2" );
e.setDateTime( sDateTime );
e.setPrecision( sPrecision );
try {
setComponent( e, 2 );
} catch( MalformedFieldException mfe ) {
mfe.printStackTrace();
}
}
COM: <s> set end datetime string and precision </s>
|
funcom_train/11024145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCopyPropertyConvertToString() {
try {
BeanUtils.copyProperty(bean, "stringProperty", testUtilDate);
} catch (Throwable t) {
fail("Threw " + t);
}
assertEquals("java.util.Date --> String", testStringDate, bean.getStringProperty());
}
COM: <s> test code copy property code converting to a string </s>
|
funcom_train/44478572 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBackground(Color bg) {
super.setBackground(bg);
try {
this.jspPane.setBackground(bg);
this.jpFrame.setBackground(bg);
} catch (NullPointerException ex) {
Logger.getLogger("applets").warning(ex.toString());//$NON-NLS-1$
}
}
COM: <s> sets the background attribute of the auto scroll label object </s>
|
funcom_train/50153882 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getKeyBase() {
String lastPath = path.substring(path.lastIndexOf("/") + 1);
int extensionIndex = lastPath.lastIndexOf(".");
String key = lastPath.substring(0, extensionIndex);
key = key.substring(0, 1).toLowerCase() + key.substring(1);
return key;
}
COM: <s> the base key for this pages messages </s>
|
funcom_train/3273670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeVisibleTransform(){
if(weapon != null && this.attackInitialized && !(weapon instanceof MissileWeaponComponent)){
if (Action.ticks == startTime + shotTime) {
shot.setRenderable(false);
} else {
if (shot != null)
shot.setTransform(shotTrans);
if (wakes != null) {
for(int i=0; i < wakes.length; i++){
wakes[i].setRenderable(wakeModelsVisible[i]);
wakes[i].setTransform(wakeTrans[i]);
}
}
}
}
}
COM: <s> move the wake and shot along the path to the target </s>
|
funcom_train/9117579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeEntry(Object key) {
CacheEntry entry = cache.remove(key);
Cacheable c = entry.getCacheable();
if (c != null && c.getIdentity() != null) {
// The cacheable should not have an identity when it has been
// removed.
c.clearIdentity();
}
entry.free();
}
COM: <s> remove an entry from the cache </s>
|
funcom_train/6519664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object next() {
if (knownMod != modCount)
throw new ConcurrentModificationException();
if (next == null)
throw new NoSuchElementException();
prev = last = next;
next = (key == null ? (Entry)next.succ : next.nextSibling);
index ++;
return type == VALUES ? last.value : type == KEYS ? last.key : last;
}
COM: <s> returns the next element in the iterators sequential view </s>
|
funcom_train/34594487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processWithCache(Reader xmlFile, File xslFile, Writer output, Map<String, Object> parameters) throws TransformerException, IOException {
process(new StreamSource(xmlFile), this.getTemplatesForXslFile(xslFile), new StreamResult(output), parameters);
}
COM: <s> transform an xml and xsl document as code file code s </s>
|
funcom_train/30196999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInsCV() throws Exception {
System.out.println("insCV");
/*
ActionMapping mapping = null;
ActionForm form = null;
HttpServletRequest request = null;
HttpServletResponse response = null;
MenuIntervistatoreAction instance = new MenuIntervistatoreAction();
ActionForward expResult = null;
ActionForward result = instance.insCV(mapping, form, request, response);
assertEquals(expResult, result);
*/
}
COM: <s> test of ins cv method of class com </s>
|
funcom_train/18846961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String createMessagePropertyNotFoundException(String tscToken, String propertyID) {
PropertyMap propertyMap = new PropertyMap();
DiagnosticsListCreator edg;
edg = new DiagnosticsListCreator();
String severityType = DiagnosticsCodes.getErrorDiagnosticsCode();
String exceptionID = "80405";
propertyMap.addPropertyValuePair("propertyID", propertyID);
String serExMsg = edg.constructErrorDocOneItemParam(tscToken,
componentID,
severityType,
subSystemCode,
exceptionID,
propertyMap);
return serExMsg;
}
COM: <s> construct message property not found exception message </s>
|
funcom_train/35677797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAlphanumericToString() {
try {
String javaString = CobolStringSimpleConverter.fromHostSingle(
STRING_FRENCH_CHARSET, STRING_HOST_BYTES.length,
STRING_HOST_BYTES, 0);
assertEquals(STRING_JAVA, javaString);
} catch (CobolConversionException e) {
fail(e.getMessage());
}
}
COM: <s> convert from cobol pic x to java string </s>
|
funcom_train/19747247 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String createClause(String condition, String compareTo) {
if ( condition.equalsIgnoreCase(FilterConditions.OBJECT_IS_NULL) || condition.equalsIgnoreCase(FilterConditions.OBJECT_IS_NOT_NULL) ) {
return createNullComparison(condition);
}
int k = condition.indexOf("{0}");
StringBuffer stringBuffer = new StringBuffer(condition);
stringBuffer.replace(k, k + 3, StringUtil.sqlEscape(compareTo));
return fieldName + " " + stringBuffer.toString();
}
COM: <s> creates clause from specified condition and string to compare our field to </s>
|
funcom_train/22578915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSHA(String message) {
try {
return getDigest(MessageDigest.getInstance("SHA"), message);
} catch (NoSuchAlgorithmException ex) {
// Can't afford to throw a checked exception,
// and this is a pretty rare, but pretty severe problem,
// it's OK to fast fail here
throw new IllegalStateException("Can't create a SHA message disgest", ex);
}
}
COM: <s> produce an sha message digest </s>
|
funcom_train/11691371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addInteractionToVector(String original1, String original2, double weight, Vector data) {
byte[] originalForm1 = bytesForString(original1);
byte[] originalForm2 = bytesForString(original2);
addInteractionToVector(originalForm1, originalForm2, weight, data);
}
COM: <s> adds a value to a vector </s>
|
funcom_train/12112568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connEtoC16(java.awt.event.ActionEvent arg1) {
try {
// user code begin {1}
// user code end
this.aggiungeOnorariJButton_ActionPerformed(arg1);
// user code begin {2}
// user code end
} catch (java.lang.Throwable ivjExc) {
// user code begin {3}
// user code end
handleException(ivjExc);
}
}
COM: <s> conn eto c16 aggiunge onorari jbutton </s>
|
funcom_train/5381634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private long delayFor(int priority) {
//these values may need to be tweaked based on machine speed
switch (priority) {
case Job.INTERACTIVE :
return 0L;
case Job.SHORT :
return 50L;
case Job.LONG :
return 100L;
case Job.BUILD :
return 500L;
case Job.DECORATE :
return 1000L;
default :
Assert.isTrue(false, "Job has invalid priority: " + priority); //$NON-NLS-1$
return 0;
}
}
COM: <s> returns the delay in milliseconds that a job with a given priority can </s>
|
funcom_train/18729025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addLibrary(File f) {
try {
log.debug("Adding library : " + f.getName());
JarFile jf = new JarFile(f, true);
libraries.put(f.getName(), jf);
} catch (Exception e) {
log.error("Can't load : " + f.getName(), e);
}
}
COM: <s> add a library to the class loader </s>
|
funcom_train/1058287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void zoomTo(Rectangle rect) {
Dimension available = getViewport().getClientArea().getSize();
Dimension desired = rect.getSize();
double scaleX = available.width * getZoom() / desired.width;
double scaleY = available.height * getZoom() / desired.height;
double zoom = Math.min(getMaxZoom(), Math.max(getMinZoom(), Math.min(scaleX, scaleY)));
zoomTo(zoom, rect.getCenter());
}
COM: <s> allows implementors to zoom into or out to a rectangular area </s>
|
funcom_train/38494332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void siteNameText_keyPressed (KeyEvent e) {
if (e.getKeyCode() == KeyEvent.VK_ENTER) {
checkLoginChanged(true);
lookupSite(true, false);
siteNameText.requestFocus();
} else {
lookup.setText(MultiLingual.translateWord(pname, "Lookup"));
searchNum = 0; //reset search position
}
}
COM: <s> changes the text of the lookup button to lookup if that was pressed </s>
|
funcom_train/31028613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isPenetrable(EntityID entityID) {
CollisionShape shape = (CollisionShape)this.collisionShapes.get(entityID);
if(shape != null) {
return shape.isPenetrable();
} else {
Logger.error(CollisionManagerSystemCodes.UNKNOWN_ENTITY_ID,
new Object[] {entityID});
}
return true;
}
COM: <s> utility method that returns true if the shape of the provided </s>
|
funcom_train/4210078 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireSubjectUpdatedListeners(String subject, String from) {
SubjectUpdatedListener[] listeners;
synchronized (subjectUpdatedListeners) {
listeners = new SubjectUpdatedListener[subjectUpdatedListeners.size()];
subjectUpdatedListeners.toArray(listeners);
}
for (SubjectUpdatedListener listener : listeners) {
listener.subjectUpdated(subject, from);
}
}
COM: <s> fires subject updated listeners </s>
|
funcom_train/4464241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Set getAddedAnnotations(OWLObject subj) throws OWLException {
Set added = new HashSet();
Iterator i = changes.iterator();
while(i.hasNext()) {
OntologyChange oc = (OntologyChange) i.next();
if (oc instanceof AddAnnotationInstance) {
AddAnnotationInstance change = (AddAnnotationInstance) oc;
if (change.getSubject().equals(subj)) added.add(oc);
}
}
return added;
}
COM: <s> same as get added subj code except this one only checks </s>
|
funcom_train/46752554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBirthDt(DateTimeModel birthDt) {
if (Converter.isDifferent(this.birthDt, birthDt)) {
DateTimeModel oldbirthDt= new DateTimeModel();
oldbirthDt.copyAllFrom(this.birthDt);
this.birthDt.copyAllFrom(birthDt);
setModified("birthDt");
firePropertyChange(String.valueOf(USERS_BIRTHDT), oldbirthDt, birthDt);
}
}
COM: <s> date of birth of the user </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.