__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/32150674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addContainmentPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_UIClass_containment_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_UIClass_containment_feature", "_UI_UIClass_type"),
UIVocabularyPackage.Literals.UI_CLASS__CONTAINMENT,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the containment feature </s>
|
funcom_train/42535337 | /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 MTrans))return false;
if(o == this)return true;
MTrans oo = (MTrans)o;
return (((Object)state).equals(oo.state))&&(((Object)c).equals(oo.c));
}
COM: <s> is the given object equal to this mtrans </s>
|
funcom_train/2786166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Integer getNonSpecialAttrLength(NamedNodeMap attributes) {
int length = 0, maxLength = attributes.getLength();
for (int i = 0; i < maxLength; ++i) {
Attr a = (Attr) attributes.item(i);
if (!isXMLNSAttribute(a)
&& !isRecognizedXMLSchemaInstanceAttribute(a)) {
++length;
}
}
return new Integer(length);
}
COM: <s> the number of attributes not related to namespace declarations </s>
|
funcom_train/37656675 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected PropertyDescriptor createProperty(boolean multiValue) {
return multiValue ?
new DoubleMultiProperty("testDouble", "Test double property", MIN, MAX, new Double[] {-1d,0d,1d,2d}, 1.0f) :
new DoubleProperty("testDouble", "Test double property", MIN, MAX, 9.0, 1.0f);
}
COM: <s> creates and returns a property with a max count value cardinality </s>
|
funcom_train/21851785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRowSpec(int row, RowSpec rowspec) {
FormLayout layout = getFormLayout();
RowSpec newspec = new RowSpec(rowspec.getDefaultAlignment(), rowspec
.getSize(), rowspec.getResizeWeight());
layout.setRowSpec(row, newspec);
m_form.revalidate();
fireGridEvent(new GridViewEvent(this, GridViewEvent.ROW_SPEC_CHANGED));
}
COM: <s> updates the rowspec for the given row </s>
|
funcom_train/1226176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getClusterCount() {
int result = 0;
for (int i = groups.size() - 1; i > -1; i--) {
Group lGroup = (Group) groups.get(i);
if (lGroup.getKind() == GroupKind.CLUSTER) {
result++;
}
}
return result;
}
COM: <s> get number of clusters </s>
|
funcom_train/46620218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void executeProject(BuildListener logger) {
Throwable error;
projectLogger = logger;
try {
buildThread = new Thread(this);
buildThread.setPriority(Thread.MIN_PRIORITY);
buildThread.start();
} catch (RuntimeException exc) {
error = exc;
throw exc;
} catch (Error err) {
error = err;
throw err;
}
}
COM: <s> executes the target set by set target </s>
|
funcom_train/3156302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void ensureRequestFileExists(File requestFile) throws IOException {
// check whether the file exists. if not create
if (!requestFile.exists()) {
File parentFile = requestFile.getParentFile();
if (parentFile != null) {
if (!parentFile.exists()) {
parentFile.mkdirs();
}
}
requestFile.createNewFile();
}
}
COM: <s> checks whether the request file exists and if not creates one </s>
|
funcom_train/5715267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Image getMultipleElementImage() {
//load multiple element image if not yet loaded (e.g. if requested for the fist time)
if(m_multipleElementImage==null)
m_multipleElementImage = FLGImageUtility.loadImageAndWait(getClass().getClassLoader().getResource(ms_multipleElementImageFilename));
return m_multipleElementImage;
}//getMultipleElementImage
COM: <s> returns the image used for multiple element property window </s>
|
funcom_train/29772999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createFrame() {
internalFrame = new JInternalFrame("Addripversion", true, true, true);
internalFrame.setSize(300, 80);
internalFrame.setJMenuBar(getMenubar());
System.out.println("=== Addripversion OPENED ===");
}
COM: <s> creates the internal frame </s>
|
funcom_train/44118519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addTransparentData(byte[] data, ByteArrayOutputStream afpdata) {
// Calculate the length
int l = data.length + 2;
if (l > 255) {
// Check that we are not exceeding the maximum length
throw new IllegalArgumentException(
"Transparent data is longer than 253 bytes: " + data);
}
afpdata.write(new byte[] { BinaryUtils.convert(l)[0], (byte) 0xDB, },
0, 2);
afpdata.write(data, 0, data.length);
}
COM: <s> the transparent data control sequence contains a sequence of code points </s>
|
funcom_train/51197139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testgetWidthReduction() {
System.out.println("getWidthReduction");
try {
jjil.algorithm.GrayReduce instance = new GrayReduce(6,7);
int expectedResult = 6;
int result = instance.getWidthReduction();
assertEquals(expectedResult, result);
} catch (Exception ex) {
ex.printStackTrace();
fail(ex.toString() + " thrown");
}
}
COM: <s> test of get width reduction method of class jjil </s>
|
funcom_train/34564777 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void store(final byte[] str, final int c) {
if(Token.eq(str, hist[pos])) return;
if(pos + 1 == MAX) {
Array.move(hist, 1, -1, pos);
Array.move(cur, 1, -1, pos--);
}
hist[++pos] = str;
cur[pos] = c;
max = pos;
}
COM: <s> stores a string in the history </s>
|
funcom_train/28150754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int read() throws IOException {
if (read<(-1)) read=reader.read();
if (read<0) { malform("Unexpected end of file."); } else if (read=='\n') { x=1; y++; } else { x++; }
int ans = read;
read = -2;
return ans;
}
COM: <s> read the next character </s>
|
funcom_train/22297902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addConnection(CtDataSourceConfig dataSourceConfig) {
if (!cpoUtilConfig.isSetDataConfigs()) {
cpoUtilConfig.addNewDataConfigs();
}
CtDataSourceConfig cdsc = cpoUtilConfig.getDataConfigs().addNewDataConfig();
cdsc.set(dataSourceConfig);
saveConfig();
}
COM: <s> adds a new connection to the configuration </s>
|
funcom_train/12925014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DefineTextField setAlignment(final HorizontalAlign align) {
switch(align) {
case LEFT:
alignment = 0;
break;
case RIGHT:
alignment = Coder.BIT0;
break;
case CENTER:
alignment = Coder.BIT1;
break;
case JUSTIFY:
alignment = Coder.BIT0 | Coder.BIT1;
break;
default:
throw new IllegalArgumentException();
}
return this;
}
COM: <s> sets the alignment of the text either align left align right align center </s>
|
funcom_train/48149723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(){
Thread thread = Thread.currentThread();
while (analysis == thread){
doAnalysis();
stopCount++;
updateCount++;
if (stopNow){
stop();
if (updateCount != 0) update();
}
try {Thread.sleep(1);}
catch (InterruptedException e){
stop();
}
}
}
COM: <s> this method runs the analysis thread </s>
|
funcom_train/36111286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int extractGeneratedId(Statement stmt) throws SQLException {
ResultSet rs = stmt.getGeneratedKeys();
try {
if (!rs.next()) {
throw new IllegalStateException("Failed to obtain generated key");
}
return rs.getInt(1);
} finally {
rs.close();
}
}
COM: <s> extracts the generated id from the given statement through </s>
|
funcom_train/43904261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Iterator iterator(final Class category) {
final DummyFactory[] factories;
if (firstHalf) {
factories = new DummyFactory[] {
new DummyFactory.Example1(), new DummyFactory.Example2(),
};
} else {
factories = new DummyFactory[] { new DummyFactory.Example3(), new DummyFactory.Example4() };
}
return Arrays.asList(factories).iterator();
}
COM: <s> returns an iterator over all </s>
|
funcom_train/22829628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object decode(Object object) {
try {
char[] charArray = object instanceof String ? ((String) object).toCharArray()
: (char[]) object;
return decodeHex(charArray);
} catch (ClassCastException e) {
throw new DecoderException(e.getMessage());
}
}
COM: <s> converts a string or an array of character bytes representing hexidecimal </s>
|
funcom_train/31626709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DefaultTreeNode constructChildViewingNode() {
DefaultTreeNode current;
if (viewRoot == null) {
viewRoot = new DefaultTreeNode();
current = viewRoot;
viewCurrentLevel = viewRoot;
} else {
current = new DefaultTreeNode((DefaultTreeNode) parentNodeStack.peek());
viewCurrentLevel = current;
}
parentNodeStack.push(current);
return current;
}
COM: <s> constructs a child node </s>
|
funcom_train/23867596 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addOrExpression(final String leftOperand, final String rightOperand) {
CDebug.checkParameterNotEmpty(leftOperand, "leftOperand");
CDebug.checkParameterNotEmpty(rightOperand, "rightOperand");
addExpression("(" + leftOperand + " OR " + rightOperand + ")");
}
COM: <s> adds a boolean or expression to this where clause that is created from </s>
|
funcom_train/29803511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createItemCollectionsTable(){
try{
Statement sqlfeed = con.createStatement();
String sqlstring = "CREATE TABLE itemcollections(" +
"bid INTEGER,"+
"cid INTEGER"+
");";
sqlfeed.execute(sqlstring);
}catch (Exception e){
System.out.println(e);
e.printStackTrace();
}//end try/catch
}
COM: <s> creates the item collections table with the following sql </s>
|
funcom_train/29919448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveProperties(Properties properties) {
try {
properties.store(new FileOutputStream(System.getProperty("user.dir") + File.separator
+ "elvyxclient.properties"), null);
} catch (IOException e) {
logger.error("Error saving elvyxclient.properties: " + e.getMessage());
// TODO: Show a dialog
}
}
COM: <s> save the properties file </s>
|
funcom_train/31935913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedIndex(int index) {
if (index < 0)
throw new IllegalArgumentException();
if (names.size() <= index)
throw new IllegalArgumentException();
String title= (String)names.get(index);
JButton btn= getButton(title);
if (btn == null)
return;
btn.doClick();
revalidate();
}
COM: <s> sets the selected index for this tabbedpane </s>
|
funcom_train/30006183 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setEventType(int eventType) {
if (eventType == NODE_CHANGED || eventType == NODE_INSERTED || eventType == NODE_REMOVED ||
eventType == NODE_STRUCTURE_CHANGED) {
this.eventType = eventType;
}
else {
throw new UnsupportedEventTypeException("The event type '" + eventType + "' is unsupported.");
}
}
COM: <s> sets the event type </s>
|
funcom_train/8664253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object nextContent() throws JSONException {
char c;
StringBuilder sb;
do {
c = this.next();
} while (Character.isWhitespace(c));
if (c == 0) {
return null;
}
if (c == '<') {
return XML.LT;
}
sb = new StringBuilder();
for (;;) {
if ((c == '<') || (c == 0)) {
this.back();
return sb.toString().trim();
}
if (c == '&') {
sb.append(this.nextEntity(c));
} else {
sb.append(c);
}
c = this.next();
}
}
COM: <s> get the next xml outer token trimming whitespace </s>
|
funcom_train/45900219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVolume(int volume) {
if (clip != null) {
FloatControl fc = (FloatControl)clip.getControl(FloatControl.Type.MASTER_GAIN);
double minLinear = Math.pow(10, fc.getMinimum() / 20);
double maxLinear = Math.pow(10, fc.getMaximum() / 20);
fc.setValue((float)(20 * Math.log10(minLinear + volume * (maxLinear - minLinear) / 100)));
}
}
COM: <s> set audio volume </s>
|
funcom_train/37657470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void pmdLocatorInit() {
LOGGER.entering(getClass().getName(), "pmdLocatorInit");
assert pmdLocator == null : "pmdLocator already initialized.";
pmdLocator = new PMDLocator();
LOGGER.exiting(getClass().getName(), "pmdLocatorInit");
}
COM: <s> initializes the pmd locator </s>
|
funcom_train/51297237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDocTypeIdsInSQL(Integer[] docIds) {
if (docIds == null && ids != null)
return getDocTypeIdsInSQL();
if (docIds.length == 0)
throw new NullPointerException("Null value in documents ids");
String sql = " (";
boolean flag = true;
for (int id : docIds) {
if (flag) {
sql += " " + id;
flag = false;
continue;
}
sql += ", " + id;
}
sql += ") ";
return sql;
}
COM: <s> retrieve list of ids as sql query </s>
|
funcom_train/3598159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testID() {
try {
List results = engine.search(nom, "($gt gtype):id($gt)!~/h.*/");
results.remove(0); // remove list of vars
Collections.sort(results, new SearchResultIDComparator());
assertTrue(results.size()==9);
NOMElement r1 = (NOMElement)((List)results.get(8)).get(0);
assertTrue(r1.getID().equals("g_9"));
} catch (Throwable ex) {
ex.printStackTrace();
fail("ID test failed!");
}
}
COM: <s> check id retrieval works we know that all gesture types have </s>
|
funcom_train/46759540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Long store(final AccessModel access, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
IChainStore chain = new ChainStore();
try {
Long accessId = store(access, chain, call);
chain.execute();
// return primary key
return accessId;
} catch (Exception ex) {
Log.exception(ex);
Log.error(access);
chain.rollback();
throw ex;
}
}}; return (Long) call(method, call);
}
COM: <s> save the access model model creating a new access or updating existing rows </s>
|
funcom_train/25575985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean saveProject() {
if (this.savePath == null) {
return false;
}
new Thread("HmX Saving") {
@Override
public void run() {
final Cursor previousCursor = ProjectControl.this.hmxClient
.getCursor();
ProjectControl.this.hmxClient.setCursor(new Cursor(
Cursor.WAIT_CURSOR));
try {
IOControl.saveProject(ProjectControl.this.pericope,
ProjectControl.this.savePath);
setSaved(true);
} catch (InternalHmxException ex) {
MessageHandler.showException(ex);
}
ProjectControl.this.hmxClient.setCursor(previousCursor);
}
}.start();
return true;
}
COM: <s> saves the current project to the last stored path </s>
|
funcom_train/11049966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testretStructSNSAS() throws java.lang.Exception {
assertNull(stub.retStructSNSAS(null));
assertNotNull(stub.retStructSNSAS(new Group()));
Group input = new Group();
input.setName("xyz");
input.setMembers(new ArrayOfPerson());
assertNotNull(stub.retStructSNSAS(input));
}
COM: <s> auto generated test method </s>
|
funcom_train/49336721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void valueChanged(TreeSelectionEvent e) {
TreePath[] paths = selectionModel.getSelectionPaths();
if (paths == null) {
figure.setSelection(null);
return;
}
RocketComponent[] components = new RocketComponent[paths.length];
for (int i = 0; i < paths.length; i++)
components[i] = (RocketComponent) paths[i].getLastPathComponent();
figure.setSelection(components);
}
COM: <s> updates the selection in the figure parameters and repaints the figure </s>
|
funcom_train/1711651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void decodeStream(FormObject formObject) {
for(int j=0;j<keySize;j++){
String command =commands[j];
Object field = currentPdfFile.resolveToMapOrString(command, currentField.get(command));
if(debug){
System.out.println("Decoding "+command+" "+field);
}
//@interest: this does not call decodeCommand below in this class
//but in AnnotStream, thereby missing all the key items
decodeFormCommand(command,field,formObject);
}
}
COM: <s> decodes any streams that need previous data to be decoded first </s>
|
funcom_train/40729954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAuthenticationManagerChainLdapLivelink() throws Exception {
setUpChain2();
assertTrue(authManager instanceof AuthenticationManagerChain);
// Livelink user.
assertTrue("Livelink user not authenticated",
authenticate("llglobal", "Gibson"));
// LDAP user
assertTrue("LDAP user not authenticated",
authenticate("gemerson", "test"));
}
COM: <s> tests using an authentication manager chain with the ldap </s>
|
funcom_train/29561518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EnumExclusiveValue find(String option, int attrId) {
if (mgr != null) {
mgr.associateAttrToEnumDef(attrId, this);
}
// Lookup in strings, and then return cached instance
int index = findIndex(option);
if (index == -1){
return null;
}
return new EnumExclusiveValue( attrId, enumDefId, (short)index );
}
COM: <s> get enum value representation of an option given the name </s>
|
funcom_train/21042547 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() {
sender = null;
destinations.clear();
reply_to.clear();
performative = ACLPerformatives.NOT_UNDERSTOOD;
content = null;
reply_with = null;
in_reply_to = null;
encoding = null;
language = null;
ontology = null;
reply_by = 0;
protocol = null;
conversation_id = null;
udParameters.removeAll();
}
COM: <s> resets all the message slots </s>
|
funcom_train/25825075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update() {
// if not visible, do nothing
if(!this.isVisible()) {
return;
}
// if there is no controller, show default view - should never happen
if(this.moduleController == null) {
this.showDefaultView();
return;
}
// if there is no controlled agent, show selection view
if(this.controlledAgentControlInitializer == null) {
this.showSelectionView();
return;
}
// otherwise show control view
this.showControlView();
}
COM: <s> upates the current view </s>
|
funcom_train/3785309 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startMeasurement(String measType)
{ /* startMeasurement */
if(iData.iPix==null)
{ /* make sure the input pixels exist */
iData.checkAndMakeIpix(true);
}
iData.bnd.startMeasurement(measType, isWidth, isHeight);
} /* startMeasurement */
COM: <s> start measurement start measurement of object </s>
|
funcom_train/18861129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected FormBeansType createFormBeans() {
FormBeansType element = StrutsConfigFactory.eINSTANCE
.createFormBeansType();
StrutsConfigType root = ((ConfigEditor) getPage().getEditor())
.getModelRoot();
Command command = SetCommand.create(getEditingDomain(), root,
StrutsConfigPackage.eINSTANCE.getFormBeansType(), element);
if (command.canExecute()) {
getEditingDomain().getCommandStack().execute(command);
}
return element;
}
COM: <s> creates a new form beans element and adds it to the root element </s>
|
funcom_train/44865205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object transform (Class returnClass, Object objectToTransform, TransformerArgs args, TransformContext context) throws XSnapshotTransformException {
String snapshotName = args.getArg1();
if (snapshotName == null) {
throw new XSnapshotTransformException ("No snapshot defined while invoking snapshot converter");
}
Object snapshot = XSnapshotUtils.createSnapshot (objectToTransform, snapshotName, context);
return snapshot;
}
COM: <s> expects the arg1 of transformer args to be the name of a snapshot </s>
|
funcom_train/5078529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PointList transpose(PointList origPoints) {
PointList transposedPoints = new PointList(origPoints.size());
for (int i = 0; i < origPoints.size(); i++) {
transposedPoints.addPoint(transposer.t(origPoints.getPoint(i)));
}
return transposedPoints;
}
COM: <s> transposes a list of points using the code transposer code </s>
|
funcom_train/31658566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComponent getFormletChooserLayout() {
JButton confButton = createButton(expandListofForms);
JButton removeButton = createButton(removeFormFromList);
JPanel hbox = new JPanel();
hbox.setLayout(new BorderLayout());
hbox.add(confBox, BorderLayout.CENTER);
Box buttonBox = Box.createHorizontalBox();
buttonBox.add(confButton);
buttonBox.add(removeButton);
hbox.add(buttonBox, BorderLayout.EAST);
hbox.setBorder(BorderFactory.createTitledBorder("Select Form:"));
return hbox;
}
COM: <s> gets the formlet chooser layout </s>
|
funcom_train/21650078 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSensorType(){
byte[] buf = new byte[8];
int failed = this.getData(0x10, buf, 8);
if(failed!=0) return "failed. ";
String str="l:";
for(int i=0; i<8; i++){
str+=(char)buf[i];
}
return str;
}
COM: <s> method used to know the type of the sensor </s>
|
funcom_train/34634646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int redo() {
int ret = 0;
for (int i = 0; i < this.edits.size(); i++) {
IUndoableEdit edit = (IUndoableEdit) this.edits.get(i);
int j = edit.redo();
if (j>0)
ret+=j;
}
return ret;
}
COM: <s> calls redo on each contained edit in the order that they were added </s>
|
funcom_train/37482950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public Direction getRandomDirection(int l, int m) {
double _x, test, leg;
do {
_x = 1 - 2 * random.next();// -1..1, x=cos(theta)
test = random.next();// 0..1
leg = evaluateLegendre(l, m, _x);
} while (test > (leg * leg));
return new Direction(Amount.valueOf(Math.acos(_x), SI.RADIAN),
randomPhi());
}
COM: <s> generate a random direction using a spherical harmonic distribution </s>
|
funcom_train/41875503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() throws BuildException {
try {
SavantContext context = Global.getContext(getProject());
DependencyPublishMediator mediator = new DependencyPublishMediator();
mediator.mediate(context, checkIntegrationBuild, integrationBuild);
} catch (SavantBuildException sbe) {
if (failOnError) {
log("Unable to publish artifacts for project.");
throw new BuildException(sbe);
}
}
}
COM: <s> publishes the artifact specified from the file specified </s>
|
funcom_train/4715097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Type getMethodType(Symbol methodSymbol, Program program){
Type[] arguments = new Type[methodSymbol.getFormalsList().size()];
int i = 0;
for(Formal formal : methodSymbol.getFormalsList()){
arguments[i] = this.extractType(formal.getType(), program);
++i;
}
Type returnType = this.extractType(methodSymbol.getOutput(), program);
return new MethodType(arguments, returnType);
}
COM: <s> get the method type from the type table </s>
|
funcom_train/19322689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int nextQuoteEnd(int start) {
int index = content.indexOf(MLetTags.QUOTE, start);
while (index > 1) {
if (content.charAt(index - 1) == '\\') { // escape "
index = content.indexOf(MLetTags.QUOTE, index);
}
break;
}
return index;
}
COM: <s> position of ending of quoting </s>
|
funcom_train/20841414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MovementField isInMovementFieldList(Position pos) {
MovementField mf = null;
for (int i = _movementFieldsList.size(); i > 0; i--) {
MovementField movementField;
if ((movementField = (MovementField) _movementFieldsList.get(i - 1))
.isInMovementField(new Position((int) pos.getX(), (int) pos.getY()))) {
mf = movementField;
return mf;
}
}
return mf;
}
COM: <s> checks if is in movement field list </s>
|
funcom_train/32056575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetFont() {
System.out.println("testGetFont");
DefaultGraphCellEditor dgce = new DefaultGraphCellEditor();
Font f = new Font("blah",1,2);
Font f2 = new Font("bleh",2,3);
dgce.setFont(f);
assertEquals("test get font", dgce.getFont(), f);
}
COM: <s> this function tests get font function of default graph cell editor class </s>
|
funcom_train/3904069 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addReadNormalizedMeasurePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ObjectiveMappingType_readNormalizedMeasure_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ObjectiveMappingType_readNormalizedMeasure_feature", "_UI_ObjectiveMappingType_type"),
ImsssPackage.Literals.OBJECTIVE_MAPPING_TYPE__READ_NORMALIZED_MEASURE,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the read normalized measure feature </s>
|
funcom_train/19322388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
ToStringBuilder builder = new ToStringBuilder(this);
if (_serviceURL != null) {
builder.append("JMXServiceURL", _serviceURL.toString());
}
else if (_rmiServer != null) {
builder.append("RMIServer", _rmiServer.toString());
}
return builder.toString();
}
COM: <s> p returns a string representation of this object </s>
|
funcom_train/15867116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validateCategory(Object obj, Errors errors) {
String method = "validateCategory(obj, errors)";
if (logger.isDebugEnabled()) {
logger.debug("BEGIN " + method);
}
ValidationUtils.rejectIfEmptyOrWhitespace(errors, "recipe.category",
"required", "*");
if (logger.isDebugEnabled()) {
logger.debug(errors.getErrorCount() + "errors found");
logger.debug("END " + method);
}
}
COM: <s> validates the category of the new recipe </s>
|
funcom_train/29963362 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getName()
{
String result = null;
if ( this.innerInstances != null )
{
StringBuffer buffer = new StringBuffer();
for(int i = 0; i < this.innerInstances.length; i++)
{
SibType current = this.innerInstances[i];
if ( current == null )
{
buffer.append("null");
}
else
{
buffer.append(current.getName());
}
if ( i < this.innerInstances.length - 1 )
{
buffer.append(", ");
}
}
result = buffer.toString();
}
return result;
}
COM: <s> return the name of the object </s>
|
funcom_train/20269976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LocationSummary calculateLocationSummary(Set<Node> nodes) {
EffectLocation modAccumulator = getBottomLocation();
EffectLocation refAccumulator = getBottomLocation();
for (Node node : nodes) {
LocationSummary nodeLocationSummary = calculateLocationSummary(node);
modAccumulator = modAccumulator.join(nodeLocationSummary.getModSet());
refAccumulator = refAccumulator.join(nodeLocationSummary.getRefSet());
}
return new LocationSummary(modAccumulator, refAccumulator);
}
COM: <s> calculates the abstraction specific side effects </s>
|
funcom_train/34813341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int removeZeroScoringPoints(){
ArrayList<Point> points = new ArrayList<Point>();
int numberRemoved = 0;
for (int i=0; i< positions.length; i++){
if (scores[i] != 0) points.add(new Point(positions[i], scores[i]));
else numberRemoved++;
}
Point[] p = new Point[points.size()];
points.toArray(p);
PointData pd = Point.extractPositionScores(p);
positions = pd.getPositions();
scores = pd.getScores();
return numberRemoved;
}
COM: <s> removes point data with a score of zero returning the number removed </s>
|
funcom_train/17351394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CouponBO getCouponBO(){
CouponBO couponBO = null;
try{
if(this.getCouponId()!=null){
couponBO = CouponDAO.getInstance().read(this.getCouponId());
}
}catch(DataException ex){
ex.printStackTrace();
}
return couponBO;
}
COM: <s> get coupon bo associated with txline </s>
|
funcom_train/46622670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getReplaceValue() {
if (property != null) {
return properties.getProperty(property);
} else if (value != null) {
return value;
} else if (Replace.this.value != null) {
return Replace.this.value.getText();
} else {
//Default is empty string
return new String("");
}
}
COM: <s> get the replacement value for this filter token </s>
|
funcom_train/42643742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected KeyStroke buildKeyStroke(int keyCode, int modifiers, boolean onRelease) {
doubleCheckPropertiesManager();
if (PropertiesManager.checkAndStoreBooleanProperty(propertiesManager,
PropertiesManager.PROPERTY_SHOW_KEYBOARD_SHORTCUTS,
true)) {
return KeyStroke.getKeyStroke(keyCode, modifiers, onRelease);
}
return null;
}
COM: <s> create and return a key stroke with the specified code and modifier </s>
|
funcom_train/36636690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void export() {
//Pick a file
int choice = fileChooser.showSaveDialog(this);
if (choice != JFileChooser.APPROVE_OPTION) {
refresh();
return;
}
String filename = fileChooser.getSelectedFile().getAbsolutePath();
//Write the tree out
try {
synchronized (transformationTree) {
SceneNode.export(filename, (SceneNode) transformationTree.getRoot());
}
}
catch (IOException ioe) {
showExceptionDialog(ioe);
}
refresh();
}
COM: <s> export the tree in a format readable by the ray tracer </s>
|
funcom_train/11792861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private AAType createAATypeForCreate(DiffAADType aad) throws Exception {
logger.debug("createAATypeForCreate started");
AAType aaType = new AAType();
aaType.setTransportType(new URI(
ClientProperties.TRANSPORT_TYPE_DISCRETE_AS_STRING));
aaType.setDescriptor(createDescriptorForCreate(aad));
aaType.setContent(createContentsForCreate());
logger.debug("createAATypeForCreate finished");
return aaType;
}
COM: <s> creates the code aatype code element for the create operation </s>
|
funcom_train/25798388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getMovies(final DataResponse<ArrayList<Movie>> response, final Genre genre, final Context context) {
mHandler.post(new Command<ArrayList<Movie>>(response, this) {
@Override
public void doRun() throws Exception {
response.value = video(context).getMovies(VideoManager.this, genre, getSortBy(SortType.TITLE), getSortOrder(), getHideWatched(context));
}
});
}
COM: <s> gets all movies of a genre from database </s>
|
funcom_train/38416143 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPrevious(String currentMessage) {
if(index==0 || history[index-1]==null) // security (history[index-1]==null) should never occur
return currentMessage;
if( history[index]==null || (index!=HISTORY_MAX_ENTRIES-1 && history[index+1]==null) )
history[index]=currentMessage;
index--;
return history[index];
}
COM: <s> to get the previous message if there is one </s>
|
funcom_train/25738857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void copyModifsInInterval(JPLPFFSequence target, int start, int end) {
JPLPFFSequence.Iterator it = target.iterator();
while (it.hasNext()) {
Integer pos = it.next();
if (pos >= start && pos <= end) {
if (modifs == null) {
modifs = new JPLIModification[end - start + 1];
}
// make a copy of modification object
modifs[pos-start] = target.getModifAt(pos).clone();
}
}
}
COM: <s> copy target subsequence aa modifications </s>
|
funcom_train/6457219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MessageHolder getMessageHolder() {
MessageHolder mh = (MessageHolder) mMessageHolderTable.get(mForumURL);
if (mh == null) {
mh = new MessageHolder(mForumURL, mForumFileString, this, mAppletLocale);
mMessageHolderTable.put(mForumURL, mh);
}
return (mh);
}
COM: <s> gets the message holder attribute of the swing forum applet object </s>
|
funcom_train/9157899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean needsCleaned(NODE node) {
return (node.getResource() == null
|| ((node.getLastUse() > 0) && (node.getLastUse()
< (System.currentTimeMillis() - expirationTime)))
|| ((node.getLeaseTime() > 0) && (node.getLeaseTime()
< (System.currentTimeMillis() - leaseTime))));
}
COM: <s> tests if a pool node needs to be cleaned </s>
|
funcom_train/38316418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int doEndTag() throws JspTagException {
String val = null;
JLCPUser user = (JLCPUser) pageContext.getAttribute("currentOnlineUser");
val = user.getFirstName() + " " + user.getLastName();
JspWriter out = pageContext.getOut();
try {
out.write(val);
} catch (IOException e) {
throw new JspTagException("Error writing to page");
}
return EVAL_PAGE;
}
COM: <s> get the user from the parent tag and print out the users name </s>
|
funcom_train/10532754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetPropertyByContext() {
assertNotNull(_outerControl);
InnerControlBean innercontrol=_outerControl.getDeclaredNestedControl();
assertNotNull(innercontrol);
assertEquals("Bob",innercontrol.getNameFromContext());
assertNull(innercontrol.getJobFromContext());
}
COM: <s> tests outer control getting inner control property from control context </s>
|
funcom_train/20773775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getMaxDisparityChangePixels(int id) {
int ret = -size;
if(id == -1){
ret = globalDisparity.getMaxDisparityChangePixels();
} else if(id >= 0){
if(clusterDisparity.get(id) != null)
ret = clusterDisparity.get(id).getMaxDisparityChangePixels();
} else {
}
return ret;
}
COM: <s> returns max disparity change pixels per ms </s>
|
funcom_train/12176999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void popElement(PAPIElement expectedElement) {
PAPIElement element = (PAPIElement) papiElementStack.pop();
if (expectedElement != null && expectedElement != element) {
throw new IllegalStateException("PAPIELEMENT STACK:"
+ " Expected " + expectedElement
+ " popped " + element);
}
if (logger.isDebugEnabled()) {
logger.debug("PAPI ELEMENT STACK: Popped " + element);
}
}
COM: <s> papi pop the current papi element from the top of the stack </s>
|
funcom_train/47942887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSvOperationMetadataType(SVOperationMetadataType svOperationMetadataType) {
if (LOG.isDebugEnabled()) {
LOG.debug("setSvOperationMetadataType(SVOperationMetadataType) - entering");
}
this.svOperationMetadataType = svOperationMetadataType;
if (LOG.isDebugEnabled()) {
LOG.debug("setSvOperationMetadataType(SVOperationMetadataType) - exiting");
}
}
COM: <s> sets the sv operation metadata type </s>
|
funcom_train/12111343 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MioJButton getJButtonStampa() {
if (jButtonStampa == null) {
jButtonStampa = new MioJButton();
jButtonStampa.setText(Messages.getString("Elenco.Stampa")); //$NON-NLS-1$
jButtonStampa
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
stampa();
}
});
}
return jButtonStampa;
}
COM: <s> this method initializes j button stampa </s>
|
funcom_train/48475131 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HandlerRegistration addCellClickHandler(com.smartgwt.client.widgets.grid.events.CellClickHandler handler) {
if(getHandlerCount(com.smartgwt.client.widgets.grid.events.CellClickEvent.getType()) == 0) setupCellClickEvent();
return doAddHandler(handler, com.smartgwt.client.widgets.grid.events.CellClickEvent.getType());
}
COM: <s> add a cell click handler </s>
|
funcom_train/45686212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showPreferences() {
PreferencesDialog prefDialog = new PreferencesDialog(sspConfig, jfMain);
if (prefDialog.showDialog(configurator, skinManager)) {
// user pressed ok, so update look and feel
skinManager.updateLookAndFeel(sspConfig.getLookAndFeel());
SwingUtilities.updateComponentTreeUI(jfMain);
}
}
COM: <s> shows the about </s>
|
funcom_train/13874113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addReferredPropertyPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PropertyTemplateItem_referredProperty_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PropertyTemplateItem_referredProperty_feature", "_UI_PropertyTemplateItem_type"),
QvttemplatePackage.Literals.PROPERTY_TEMPLATE_ITEM__REFERRED_PROPERTY,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the referred property feature </s>
|
funcom_train/44152563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSampleSize(int n) {
if (n <= 0) {
throw new IllegalArgumentException("sample size must be positive.");
}
sampleSize = n;
domainLowerBound = Math.max(0, sampleSize - numberOfFailures);
domainUpperBound = Math.min(sampleSize, numberOfSuccesses);
}
COM: <s> modify the sample size </s>
|
funcom_train/8079290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double numFalseNegatives(int classIndex) {
double incorrect = 0;
for (int i = 0; i < m_NumClasses; i++) {
if (i == classIndex) {
for (int j = 0; j < m_NumClasses; j++) {
if (j != classIndex) {
incorrect += m_ConfusionMatrix[i][j];
}
}
}
}
return incorrect;
}
COM: <s> calculate number of false negatives with respect to a particular class </s>
|
funcom_train/2614936 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void expToForm(){
jtfBrief.setText(exp.getBrief());
jtfAmount.setText(exp.getAmount().toString());
jtfDate.setText(exp.getDate().toString());
jcbType.setSelectedItem(exp.getType());
jtaNotes.setText(exp.getNotes());
}
COM: <s> void expense to form expense exp </s>
|
funcom_train/1904314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String fromOAIIdentifier(String oaiIdentifier) {
String localIdentifier = null;
if (oaiIdentifier != null) {
String[] oaiIdentifierArray = splitOAIIdentifier(oaiIdentifier);
int len = oaiIdentifierArray.length;
if (len >= 2) {
String scope = oaiIdentifierArray[len - 2];
String identifier = oaiIdentifierArray[len - 1];
localIdentifier = scope + "." + identifier;
}
}
return localIdentifier;
}
COM: <s> utility method to parse the local identifier from the oai identifier </s>
|
funcom_train/26328031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getTotalArmor() {
int totalArmor = 0;
for (int i = 0; i < locations(); i++) {
if (getArmor(i) > 0) {
totalArmor += getArmor(i);
}
if (hasRearArmor(i) && (getArmor(i, true) > 0)) {
totalArmor += getArmor(i, true);
}
}
return totalArmor;
}
COM: <s> returns the total amount of armor on the entity </s>
|
funcom_train/45773630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private XAccessible getVisibleAccessible(XAccessible xacces) {
if (xacces != null) {
if (AccessibilityTools.checkState(xacces.getAccessibleContext(), AccessibleStateType.SHOWING)) {
return xacces;
} else {
getVisibleAccessible(xacces.getAccessibleContext().getAccessibleParent());
}
}
return null;
}
COM: <s> check whether the child object has the status showing otherwise get the parent </s>
|
funcom_train/4882209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getExitCommand1 () {
if (exitCommand1 == null) {//GEN-END:|220-getter|0|220-preInit
// write pre-init user code here
exitCommand1 = new Command ("Sair", Command.EXIT, 0);//GEN-LINE:|220-getter|1|220-postInit
// write post-init user code here
}//GEN-BEGIN:|220-getter|2|
return exitCommand1;
}
COM: <s> returns an initiliazed instance of exit command1 component </s>
|
funcom_train/29908685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getString(String name) {
long h = openKeyHandle(handle, path, true);
byte[] data = Registry.queryValueEx(h, name, 512);
Registry.closeKey(h);
if (data != null)
return NativeHelper.getString(data, true);
return null;
}
COM: <s> gets a string </s>
|
funcom_train/18543932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void prepareGenerator() throws Exception {
if (t_generator == null) {
t_generator = Generator.getDefaultInstance();
}
TGRandom tgr = t_generator.getRandom();
if (tgr.isTestModeOn() == false){
tgr.setTestMode(true);
}
tgr.setFixedResults(t_randomNumbers);
}
COM: <s> prepare the generator and the tgrandom instance for this test </s>
|
funcom_train/1131528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void moveLocation(Location dest, long dt) {
// Not really forces and torques, but suitable enough names.
float force = (lvel * factor + rvel * factor) / 2.f;
// where + is CCW and - is CW
float torque = (rvel * factor - lvel * factor) / 2.f;
// install force
dest.setVelocity(force);
// convert "torque" to angular velocity, rad / sec
float omega = torque / radius;
// rotate robot
dest.setTheta(dest.getTheta() + omega * dt / 1000.f);
dest.increment(dt);
}
COM: <s> modifies a location from wheel speeds in mm sec </s>
|
funcom_train/43213115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
// Remove the lock for all connected data servers. This will only
// happen if lock was set.
synchronized (this.connectedHosts) {
for (String connectedDataServer : this.connectedHosts) {
ConnectionUtil.unlockConnection(connectedDataServer);
}
this.connectedHosts.clear();
}
closed = true;
}
COM: <s> closes the server and shuts down any associated resources </s>
|
funcom_train/47967889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setSavedValues(){
jTextFieldTmin.setText(""+tah.iniData.graphTempMin);
jTextFieldTmax.setText(""+tah.iniData.graphTempMax);
jTextFieldHmin.setText(""+tah.iniData.graphHumMin);
jTextFieldHmax.setText(""+tah.iniData.graphHumMax);
}
COM: <s> method to show the previous values from data </s>
|
funcom_train/14378386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCeil(float height, Texture texture, Rectangle3D texBounds) {
if (texture != null && texBounds == null) {
texBounds = new Rectangle3D(new Vector3D(0, height, 0),
new Vector3D(1, 0, 0), new Vector3D(0, 0, 1), texture.getWidth(), texture.getHeight());
}
ceil = new HorizontalAreaDef(height, texture, texBounds);
}
COM: <s> sets the ceiling height ceiling texture and ceiling texture bounds of </s>
|
funcom_train/29418601 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Override public String toString() {
if (b==BigInteger.ZERO) return "NaN";
else if (a==BigInteger.ZERO) return "0";
else if (b.equals(BigInteger.ONE)) return a.toString();
else return a.toString()+"/"+b;
}
COM: <s> returns a human readable representation of this number </s>
|
funcom_train/18219520 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addSource(final DataSource dataSource) {
dataSources.add(dataSource);
for (final Iterator<Field> it = dataSource.getFields().iterator(); it.hasNext();) {
final Field field = it.next();
fieldMap.put(field.getName(), field);
}
}
COM: <s> adds a data source to the data sources </s>
|
funcom_train/2881782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void weAreDone() {
try {
communicator.removeCallback(theRequest.getXID());
} catch (ServiceLocationException ex) {
owner.logError("ERROR: SlpMessageSender.weAreDone() - Failed to remove callback !", null);
}
if (timer != null) timer.cancel();
timer = null;
theRequest = null;
thePacket = null;
stopWaiting();
}
COM: <s> called when we are done waiting for replies </s>
|
funcom_train/37721272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadText(JTextArea text) {
int listLength = getRowCount();
for (int i=0; i<listLength; i++) {
for (int j=0 ; j<size; j++)
text.append(getSQLColumn(j).get(i).toString());
text.append(((char) Character.LINE_SEPARATOR) + "");
}
}
COM: <s> load the text into the given text area </s>
|
funcom_train/43409893 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Connection getConnectionDB(String lg) {
Connection con = null;
try {
Class.forName(DRIVER);
con = DriverManager.getConnection(BDURL, USER, PASS);
} catch (Exception e) {
logger.log(Level.SEVERE, e.getStackTrace()[0].getMethodName() + "**" + lg + "** ", e);
}
return con;
}
COM: <s> make a connection to db </s>
|
funcom_train/12164682 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddScriptModuleRuleInstances() throws Exception {
MockWebDriverConfiguration config = new MockWebDriverConfiguration();
final MockScriptModule scriptModule = new MockScriptModule("moduleID");
String className = "com.volantis.xml.pipeline.sax.XMLPipelineFilterAdapter";
updateScriptModule(scriptModule, className, "contentType");
config.putScriptModule(scriptModule);
doTest(config);
}
COM: <s> test the adding of rule instances for the script web driver configuration </s>
|
funcom_train/48389444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HandlerRegistration addRestoreClickHandler(com.smartgwt.client.widgets.events.RestoreClickHandler handler) {
if(getHandlerCount(com.smartgwt.client.widgets.events.RestoreClickEvent.getType()) == 0) setupRestoreClickEvent();
return doAddHandler(handler, com.smartgwt.client.widgets.events.RestoreClickEvent.getType());
}
COM: <s> add a on restore click handler </s>
|
funcom_train/22166691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMedia(int fileID, boolean request) {
MP3File fileToAdd = (MP3File) fileHash.get(new Integer(fileID));
if (fileToAdd != null) {
QueueItem newItem = new QueueItem(fileToAdd, request);
queue.addToQueue(newItem);
}
randomSongSelector.addRequestedSongID(fileID);
}
COM: <s> add a file to the queue specifying that it was a request </s>
|
funcom_train/19143295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUVectors (){
U_data = new Vector();
U_var = new Vector();
Double assigned_value = null;
for (int i=0; i<index_array.length; i++) {
try {
assigned_value = new Double(value_array[i]);
VectorDetails element = new VectorDetails(index_array[i], assigned_value);
U_data.add(element);
} catch (NumberFormatException nfe){
U_var.add(new Integer(index_array[i]));
}
}
}
COM: <s> code set uvectors code constructs the u data vector containig the original index </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.