__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/37522001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processTree(CompilerPassEnterable tree) {
long lastTime = System.currentTimeMillis();
try {
tree.checkInitializers();
} catch (PositionedError e) {
reportTrouble(e);
}
if (verboseMode()) {
inform( MjcMessages.FILE_INITIALIZERS_CHECKED,
tree.getTokenReference().file(),
new Long(System.currentTimeMillis() - lastTime));
}
}
COM: <s> checks the initializers created during the check interface </s>
|
funcom_train/652591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isSupportedContentType(String contentType) {
/* TODO: implementation */
// if (contentType != null) {
// for (int i= 0; i < fLegalContentTypes.length; i++) {
// if (fLegalContentTypes[i].equals(contentType)) {
// return true;
// }
// }
// }
// return false;
return (contentType != null);
}
COM: <s> returns whether the given type is one of the legal content types </s>
|
funcom_train/11809443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
if (selection != null && selection.isEmpty() == false && selection instanceof IStructuredSelection) {
IStructuredSelection ssel = (IStructuredSelection) selection;
if (ssel.size() > 1)
return;
Object obj = ssel.getFirstElement();
if (obj instanceof DynamicBean) {
if (((DynamicBean) obj).getReferenceClass() == DocumentStorageDTO.class) {
parentDocumentStorage = (DynamicBean) obj;
}
}
}
}
COM: <s> tests if the current workbench selection is a suitable container to use </s>
|
funcom_train/3273982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doMouseMovement(int DX, int DY) {
if (userInterface.isRotateKeyDown()){
doCameraRotate(DX, DY);
} else if (userInterface.isOrbitKeyDown()) {
doCameraOrbit(DX, DY);
}
switch (UIState) {
case UISTATE_MOVEMENT:
if (userInterface.isRotateMovePlaneKeyDown()) {
doMovePlaneRotate(DX, DY);
}
break;
}
}
COM: <s> modifies the camera location based on how much the </s>
|
funcom_train/18315719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetInitialContext()
throws Throwable
{
try
{
EJBServiceLocator locator = EJBServiceLocator.getEJBServiceLocator();
assertNotNull( locator.getInitialContext() );
}
catch( Throwable exc )
{
FrameworkBaseObject.logMessage( "EJBServiceLocatorTest.testGetInitialContext() failed - " + exc.toString() );
throw exc;
}
COM: <s> tests get initial context on ejbservice locator </s>
|
funcom_train/7679518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildUserGroupUris(String groupName) {
mGroupFilterUri = Uri.parse("content://contacts/groups/name/" + groupName
+ "/members/filter/");
mGroupUri = Uri.parse("content://contacts/groups/name/" + groupName + "/members");
}
COM: <s> builds the uris to query when displaying a user group </s>
|
funcom_train/7273217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleConnect(Socket socket) throws IOException {
if(LOG.isDebugEnabled())
LOG.debug("Push (fwt: " + fwt + ") connect to: " + data.getHost() + ":" + data.getPort() + " succeeded");
((NIOMultiplexor) socket).setWriteObserver(new PushConnector(socket, data, fwt, httpAcceptor));
}
COM: <s> starts a new thread thatll do the pushing </s>
|
funcom_train/9362680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void finish() {
if (mAccountAuthenticatorResponse != null) {
// send the result bundle back if set, otherwise send an error.
if (mResultBundle != null) {
mAccountAuthenticatorResponse.onResult(mResultBundle);
} else {
mAccountAuthenticatorResponse.onError(AccountManager.ERROR_CODE_CANCELED,
"canceled");
}
mAccountAuthenticatorResponse = null;
}
super.finish();
}
COM: <s> sends the result or a constants </s>
|
funcom_train/28263114 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getTreeGroupNodeIndex(String groupName) {
int groupCount = friendTreeRoot.getChildCount();
DefaultMutableTreeNode groupNode;
int i = 0;
for(i=0; i<groupCount; i++) {
groupNode = (DefaultMutableTreeNode)friendTreeRoot.getChildAt(i);
//System.out.println("group in tree: " + groupNode.toString());
if(groupNode.toString().equals(groupName)) {
return i;
}
}
return -1;
}
COM: <s> get the index of the group node in friend tree </s>
|
funcom_train/624984 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void caseAIfExpression(AIfExpression node) {
// evaluate the condition
Instance cond = this.evaluateExpression(node.getCondition());
Instance exprValue = null;
// descend and evaluate the correct branch
if (BooleanInstance.TRUE.equals(cond)) {
exprValue = this.evaluateExpression(node.getThenBranch());
} else {
exprValue = this.evaluateExpression(node.getElseBranch());
}
annotate(node, exprValue);
}
COM: <s> evaluates and annotates the value s of an if expression </s>
|
funcom_train/10910975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void renderFootnote(Footnote footnote) {
currentBPPosition += footnote.getTop();
List blocks = footnote.getChildAreas();
if (blocks != null) {
Block sep = footnote.getSeparator();
if (sep != null) {
renderBlock(sep);
}
renderBlocks(null, blocks);
}
}
COM: <s> renders a footnote </s>
|
funcom_train/3393657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String stringValue() {
assert constValue() != null;
if (tag == BOOLEAN)
return ((Integer) constValue()).intValue() == 0 ? "false" : "true";
else if (tag == CHAR)
return String.valueOf((char) ((Integer) constValue()).intValue());
else
return constValue().toString();
}
COM: <s> the constant value of this type converted to string </s>
|
funcom_train/12549242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ArrayInputTable generateArrayInputTable(String key, String[] newValues) {
ArrayInputTable internalArrayInputTable = new ArrayInputTable(newValues);
internalArrayInputTable.setToolTipText(getTranslator().translateMessage(
key + ".toolTipText"));
internalArrayInputTable.setLocalHeaderString(getTranslator()
.translateMessage("element"));
registerComponent(key, internalArrayInputTable);
return internalArrayInputTable;
}
COM: <s> method for generating a new array input table with passed string values </s>
|
funcom_train/3389733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getAccessLevel() {
// Could just compute this once instead of recomputing.
// Check to see if this is worth it.
if (isPublic()) {
return PUBLIC_ACCESS;
} else if (isProtected()) {
return PROTECTED_ACCESS;
} else if (isPackagePrivate()) {
return PACKAGE_ACCESS;
} else if (isPrivate()) {
return PRIVATE_ACCESS;
} else {
throw new CompilerError("getAccessLevel()");
}
}
COM: <s> return the access modifier of this member as a number </s>
|
funcom_train/48184938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printLfOpts() {
List<BitSet> opts = edgeFactory.lfOpts;
for (int i = 0; i < opts.size(); i++) {
BitSet opt = opts.get(i);
out.println("opt[" + i + "]: " + Edge.toString(opt));
}
out.flush();
}
COM: <s> prints the lf optional parts </s>
|
funcom_train/24653549 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doError(HttpServletResponse httpServletResponse, int httpStatus) throws ServletException, IOException {
httpServletResponse.setStatus(httpStatus);
httpServletResponse.setContentType(OAuthConstants.FORM_ENCODING);
Writer w = httpServletResponse.getWriter();
w.write(STATUS_PARAMETER + "=" + CILOGON_STATUS_ERROR + "\n");
w.close();
}
COM: <s> write a standard error status to the response </s>
|
funcom_train/43664445 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addForeignPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_DField_foreign_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_DField_foreign_feature", "_UI_DField_type"),
XmdldbPackage.Literals.DFIELD__FOREIGN, true, false, true,
null, null, null));
}
COM: <s> this adds a property descriptor for the foreign feature </s>
|
funcom_train/8716288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point2D addCommands(PDFPage cmds, AffineTransform transform, int mode) {
if (shape != null) {
GeneralPath outline= (GeneralPath) shape.createTransformedShape(transform);
cmds.addCommand(new PDFShapeCmd(outline, mode));
} else if (page != null) {
cmds.addCommands(page, transform);
}
return advance;
}
COM: <s> add commands for this glyph to a page </s>
|
funcom_train/16894325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedResource(IResource resource) {
selectedResource = resource;
//expand to and select the specified file
List itemsToExpand = new ArrayList();
IContainer parent = resource.getParent();
while (parent != null) {
itemsToExpand.add(0, parent);
parent = parent.getParent();
}
treeViewer.setExpandedElements(itemsToExpand.toArray());
treeViewer.setSelection(new StructuredSelection(resource), true);
}
COM: <s> sets the selected existing file </s>
|
funcom_train/18964985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getString(String key) {
if (!this.parseCalled) {
throw new IllegalStateException("Method parse not invoked");
}
Option option = this.options.get(key);
// If option is non null and valued, return the value, null otherwise.
return option != null
? (option.isValued() ? option.getValue() : null) : null;
}
COM: <s> gets the value for a valued option </s>
|
funcom_train/42385200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OpenMBeanOperationInfoSupport make() {
int sz = sig.size();
OpenMBeanParameterInfoSupport[] arr = new OpenMBeanParameterInfoSupport[sz];
for (int i = 0; i < sz; i++) {
arr[i] = sig.get(i).make();
}
return new OpenMBeanOperationInfoSupport(name, desc, arr, ret, impact);
}
COM: <s> creates a new open mbean operation info support object populated with </s>
|
funcom_train/50759098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void dumpASCII(Utterance utterance) {
if (waveDumpFile != null) {
LPCResult lpcResult =
(LPCResult) utterance.getObject("target_lpcres");
try {
if (waveDumpFile.equals("-")) {
lpcResult.dumpASCII();
} else {
lpcResult.dumpASCII(waveDumpFile);
}
} catch (IOException ioe) {
LOGGER.severe("Can't dump file to " + waveDumpFile + " " + ioe);
throw new Error(ioe);
}
}
}
COM: <s> dumps the wave for the given utterance </s>
|
funcom_train/37830418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object create(final ConfigurableFactoryContext ctx) {
final SpeakerNPC npc = instantiate(getName(ctx));
npc.setBaseHP(100);
npc.setHP(getHP(ctx));
npc.setLevel(getLevel(ctx));
final String clazz = getClass(ctx);
if (clazz != null) {
npc.setEntityClass(clazz);
}
final String description = getDescription(ctx);
if (description != null) {
npc.setDescription(description);
}
final List<Node> path = getPath(ctx);
npc.setPath(new FixedPath(path, path.size() > 0));
npc.setDirection(getDirection(ctx));
createDialog(npc);
return npc;
}
COM: <s> create a damaging area </s>
|
funcom_train/8077017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int locateIndex(int index) {
int min = 0, max = m_Indices.length - 1;
// Binary search
while (max >= min) {
int current = (max + min) / 2;
if (m_Indices[current] > index) {
max = current - 1;
} else if (m_Indices[current] < index) {
min = current + 1;
} else {
return current;
}
}
return max;
}
COM: <s> locates the greatest index that is not greater than the </s>
|
funcom_train/7929114 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean suffixPreceded( String value, String suffix, String preceded ) {
// be-safe !!!
if ((value == null) ||
(suffix == null) ||
(preceded == null) ||
!suffix(value,suffix) ) {
return false ;
}
return suffix(removeSuffix(value,suffix),preceded) ;
}
COM: <s> see if a suffix is preceded by a string </s>
|
funcom_train/24436950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearTable(Thinlet thinlet) {
Object table = thinlet.find("HexTable");
Object[] tableItems = thinlet.getItems(table);
for (int i=0 ; i < (tableItems.length) ; i++) {
if (thinlet.getClass(tableItems[i]).equals("row")) {
thinlet.removeAll(tableItems[i]);
thinlet.remove(tableItems[i]);
}
}
}
COM: <s> clears the hex table rows </s>
|
funcom_train/17047293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTheInterpretation(ParseInterpretation theInterpretation) {
this._theInterpretation = theInterpretation;
if (theInterpretation != null) {
this.setTheInterpretation = true;
for (ExtractionData extraction : extractions) {
if (extraction.interpretations.contains(theInterpretation)) {
this._theExtraction = extraction;
break;
}
}
}
else {
this.setTheInterpretation = false;
this._theExtraction = null;
this.setTheExtraction = false;
}
}
COM: <s> set or override the interpretation for this extraction </s>
|
funcom_train/3926870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void retokenize() {
TokenFactory t = new TokenFactory();
int replacementLineNumber = 0;
numberTokens = 0;
for ( int i = 0; i < numberLines; i++ ) {
if ( processLine( t, lineIdx[ i ], replacementLineNumber )) {
lineIdx[ replacementLineNumber ] = lineIdx[ i ];
replacementLineNumber++;
}
}
numberLines = replacementLineNumber;
tokenScannerOffset = 0;
dirtyFileData = false;
}
COM: <s> retokenize the data in the file data byte array </s>
|
funcom_train/4536138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireUserHasLeft(final ChatRoom room, final String userid) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
for (ChatRoomListener chatRoomListener : new HashSet<ChatRoomListener>(chatRoomListeners)) {
chatRoomListener.userHasLeft(room, userid);
}
}
});
}
COM: <s> notifies users that a user has left a code chat room code </s>
|
funcom_train/49995392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadUserConfiguration() {
for (PortfolioMeasureConfiguration measure : this.measures) {
Measure savedMeausre = getSavedMeasure(measure);
if (savedMeausre != null) {
measure.setMeasureConfiguration(savedMeausre.isEnabled(), getClassifier(savedMeausre),
savedMeausre.getTelemetryParameters());
}
}
}
COM: <s> load users configuration from systems cache </s>
|
funcom_train/42120808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ODEState addScaled(ODEState s, double scale) {
double[] temp = state.clone();
for(int i = 0; i < state.length; i++) {
temp[i] += scale*s.getArray()[i];
}
return new ODEState(temp);
}
COM: <s> p returns a new odestate equal to the sum of this odestate plus </s>
|
funcom_train/5429515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getContentString() {
char charArray[] = new char[ mCharList.size() ];
for( int i=0; i<mCharList.size(); i++ ) {
charArray[i] =
( (CharWrapper)( mCharList.get( i ) ) ).mChar;
}
return new String( charArray );
}
COM: <s> gets the entire content collection as a string </s>
|
funcom_train/20926635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel9() {
if (jPanel9 == null) {
jLabel4 = new JLabel();
jLabel4.setFont(new java.awt.Font("Garamond", java.awt.Font.BOLD, 18));
jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.LEADING);
jLabel4.setText("view filters");
jLabel4.setForeground(java.awt.Color.blue);
jPanel9 = new JPanel();
jPanel9.add(jLabel4, null);
jPanel9.add(getJSplitPane5(), null);
}
return jPanel9;
}
COM: <s> this method initializes j panel9 </s>
|
funcom_train/45622592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSourcesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_LCType_sources_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_LCType_sources_feature", "_UI_LCType_type"),
MSBPackage.eINSTANCE.getLCType_Sources(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the sources feature </s>
|
funcom_train/20308664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean trigger( TriplePattern pattern, DIGAdapter da, Model premises ) {
return trigger( m_subject, pattern.getSubject(), premises ) &&
trigger( m_object, pattern.getObject(), premises ) &&
trigger( m_pred, pattern.getPredicate(), premises ) &&
checkTriple( pattern, da, premises );
}
COM: <s> p answer true if this translator applies to the given triple pattern </s>
|
funcom_train/34283535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRequestProperty(String name, String value) {
headers.add(new BasicHeader(name, value));
// post.addHeader(name, value);
// defaultParameters.setParameter(name, value);
// post.setHeader(name, value);
}
COM: <s> set properties on the outgoing connection </s>
|
funcom_train/19318472 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeInt(int value) throws JMSException {
if(!isBodyModifiable()) {
throw new MessageNotWriteableException("StreamMessage read_only");
}
try {
dos.writeByte((int) TYPE_INT);
dos.writeInt(value);
}
catch(IOException e) {
throw new JMSException(e.getMessage());
}
}
COM: <s> writes an code int code to the stream message </s>
|
funcom_train/21634002 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double function(final int currentNeuron, final int bestNeuron) {
final double[] vector = new double[this.displacement.length];
final int[] vectorCurrent = translateCoordinates(currentNeuron);
final int[] vectorBest = translateCoordinates(bestNeuron);
for (int i = 0; i < vectorCurrent.length; i++) {
vector[i] = vectorCurrent[i] - vectorBest[i];
}
return this.rbf.calculate(vector);
}
COM: <s> calculate the value for the multi rbf function </s>
|
funcom_train/1387287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_RouteSearchBox_Num9() throws Throwable {
MainPage mp = (MainPage) getActivity();
final EditText routeSearchBox =
(EditText) mp.findViewById(com.busstopalarm.R.id.RouteSearchBox);
runTestOnUiThread(new Runnable() {
public void run() {
routeSearchBox.performClick();
}
});
sendKeys("1 2 3 4 5 6 7 8 9");
assertEquals("123456789", routeSearchBox.getText().toString());
}
COM: <s> tests if the route search box accepts number input of nine </s>
|
funcom_train/13390422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void testCheckValue() {
MyPeriodicWatch watch = new MyPeriodicWatch("watch");
watch.setPeriod(500);
TestUtils.sleep(5000);
watch.stop();
Assert.assertTrue(watch.log().length() >= 8);
Assert.assertTrue(watch.log().length() <= 12);
Utils.close(watch.getWatchDataSource());
}
COM: <s> tests the code check value code method </s>
|
funcom_train/32057647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetGridVisible() {
System.out.println("testSetGridVisible");
jgraph.setGridVisible( true );
boolean b = jgraph.isGridVisible();
assertEquals( b, true );
jgraph.setGridVisible( false );
b = jgraph.isGridVisible();
assertEquals( b, false );
}
COM: <s> test of set grid visible method of class jgraph </s>
|
funcom_train/14405980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void showUsage(PrintWriter pw, Options options) {
if (Cli.testMode)
{
Cli.commandExecuted=false;
}
HelpFormatter formatter = new WbemsmtHelpFormatter();
String msg = commandName + " ";
String footer = "\n" + bundle.getString("commanddescription." + ClassUtils.getShortClassName(getClass())) + " \n";
formatter.printHelp(pw,120,msg,"",options,0,0,footer,true);
}
COM: <s> show the usage of the command </s>
|
funcom_train/13683109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private CmdButton getCancelBtn() {
if (cancelAttribInforBtn == null) {
cancelAttribInforBtn = new CmdButton("Cancel","",this.med);
cancelAttribInforBtn.setCommand(new CancelAttribInforCmd(this, med));
cancelAttribInforBtn.addActionListener(this);
cancelAttribInforBtn.setSize(new java.awt.Dimension(80,20));
cancelAttribInforBtn.setLocation(new java.awt.Point(160,250));
}
return cancelAttribInforBtn;
}
COM: <s> this method initializes cancel attrib infor btn </s>
|
funcom_train/12561629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(char cbuf[], int off, int len) throws IOException {
byte[] outputBytes = new byte[2];
int inputChar;
int count = 0;
while (count < len) {
inputChar = 0xffff & cbuf[off + count];
charToBytes(inputChar, outputBytes);
out.write(outputBytes, 0, 2);
count++;
}
}
COM: <s> write a portion of an array of characters </s>
|
funcom_train/18243539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkCancellation() throws AssemblerException {
if (this.job != null && this.job.wasCancelled()) {
Log.log(Log.WARN, new Throwable(),
ResourceUtil.getMessage(TigrAssemblerResultsAnalysis.class, "job_was_cancelled"));
String message = ResourceUtil.getResource(TigrAssemblerResultsAnalysis.class, "message.job_was_cancelled");
throw new AssemblerException(message);
}
}
COM: <s> check if our assembly job has been cancelled and if so stop </s>
|
funcom_train/44712620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getObjectTypes() {
ArrayList result = new ArrayList();
for (Iterator it = m_root.getObjectTypes().iterator();
it.hasNext(); ) {
com.arsdigita.persistence.proto.metadata.ObjectType ot =
(com.arsdigita.persistence.proto.metadata.ObjectType)
it.next();
if (ot.getModel().equals(m_model)) {
result.add(ot);
}
}
return ObjectType.wrap(result);
}
COM: <s> returns a collection of object types that this model contains </s>
|
funcom_train/20078119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getUpdateArtistRatingQuery(String artistId, String rating) {
return "for $artist in //artist[@id='" + artistId + "'] " +
" let $newRating := fn:number($artist/rating) + " + rating +
" return " +
" update replace $artist/rating with " +
" element { \"rating\" }{ $newRating }";
}
COM: <s> update artist rating command </s>
|
funcom_train/37077324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setType(String type) {
if (type != null
&& !(type.equals(SequenceI.INSERTION)
|| type.equals(SequenceI.DELETION)
|| type.equals(SequenceI.SUBSTITUTION) || type
.equals(SequenceI.CLEAR_EDIT))) {
throw new IllegalArgumentException("Invalid type:" + type);
}
this.type = type;
}
COM: <s> sets the type of edit which will happen </s>
|
funcom_train/51611578 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object command, BindException errors) throws Exception {
UserLoginModel auth = (UserLoginModel) command;
if(auth.getUser()!=null)
request.getSession().setAttribute("user", auth.getUser());
String redirectUrl = request.getParameter("url");
if(redirectUrl==null || redirectUrl.length()==0)
redirectUrl = "index.htm";
RedirectView exit = new RedirectView(redirectUrl);
exit.setExposeModelAttributes(false);
return new ModelAndView(exit);
}
COM: <s> sets the user attribute of the session ant redirects to the homepage </s>
|
funcom_train/34339554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCancelar() {
if (Cancelar == null) {//GEN-END:|18-getter|0|18-preInit
// write pre-init user code here
Cancelar = new Command("Cancelar", Command.EXIT, 0);//GEN-LINE:|18-getter|1|18-postInit
// write post-init user code here
}//GEN-BEGIN:|18-getter|2|
return Cancelar;
}
COM: <s> returns an initiliazed instance of cancelar component </s>
|
funcom_train/8207737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getDataFromIntent(Intent intent) {
Bundle extras = intent.getExtras();
//checks if current editing is for a provider or a subservice
if(extras != null) {
mImageToDisplayPath = checkNotNull(extras.getString(ActivityHelper.INTENTKEY_IMAGETODISPLAY_PATH), "ImageToDisplay");
mLogFacility.v("Showing image " + mImageToDisplayPath);
} else {
checkNotNull(null, "ImageToDisplay");
}
}
COM: <s> get data from intent and configured internal fields </s>
|
funcom_train/38556567 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasPermissionWithName(String name) {
Enumeration e = permissions().objectEnumerator();
while (e.hasMoreElements()) {
U_Permission p = (U_Permission)e.nextElement();
if (p.name().equals(name)) {
return true;
}
}
return false;
}
COM: <s> determine if this role has been granted with the permission named </s>
|
funcom_train/2881791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean serviceTypeMatch(SLPDatabaseEntry e, ServiceType type) {
boolean areEqual = false;
ServiceType eType = e.getType();
if (eType.equals(type)) {
areEqual = true;
} else if (eType.getPrincipleTypeName().equalsIgnoreCase(type.getPrincipleTypeName())) {
areEqual = true;
}
return areEqual;
}
COM: <s> checks if a given service type matches that in the database entry </s>
|
funcom_train/40856378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Token peek(int n) throws IOException {
int fillCount = n-inQueue.size();
for (int i=0; i < fillCount; i++) {
Token t = input.next();
if (null==t) return null;
inQueue.addLast(t);
}
return inQueue.get(n-1);
}
COM: <s> peek n tokens ahead in the buffered input stream without modifying </s>
|
funcom_train/41721931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ConstructionEvaluation evaluate(ExpresserModel model) {
if (strategyLibrary == null || strategyLibrary.size() == 0)
return null;
ConstructionEvaluation result = new ConstructionEvaluation();
CompositeCase studentsStrategy = convertModelInStrategy(model, null);
for (CompositeCase solution : strategyLibrary) {
CompositeCaseSimilarityMeasurer measurer = new CompositeCaseSimilarityMeasurer(studentsStrategy, solution);
double similarity = measurer.getSimilarity();
result.addSimilarity(solution.getStrategyName(), similarity);
}
return result;
}
COM: <s> evaluates the given construction </s>
|
funcom_train/19879409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveOrganizations() throws IOException, JAXBException {
Marshaller marshaller;
marshaller = JAXBContext.newInstance(Organizations.class).createMarshaller();
Organizations organizations = new Organizations();
organizations.getOrganization().addAll(this.organizations.values());
marshaller.marshal(organizations, new FileOutputStream(this.path + File.separatorChar
+ this.organizationsFile));
}
COM: <s> save the organizations data to files </s>
|
funcom_train/43568308 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
AstronomicalCalendar clone = null;
try {
clone = (AstronomicalCalendar) super.clone();
} catch (CloneNotSupportedException cnse) {
Helper.SystemOut().print("Required by the compiler. Should never be reached since we implement clone()");
}
clone.setGeoLocation((GeoLocation) getGeoLocation().clone());
clone.setCalendar((Calendar) getCalendar().clone());
clone.setCalculator((ICalculator) getCalculator()
.clone());
return clone;
}
COM: <s> a method that creates a a </s>
|
funcom_train/38396538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void gatherData () {
pointData = f.gatherData(currentLocation);
bufferedRange = calculateBufferedRange();
if (debug) System.out.println("loc: "+formattedLocation()+" buffered range: ("+bufferedRange[0]+","+bufferedRange[1]+")");
}
COM: <s> gathers data from frame and calls calculate buffered range </s>
|
funcom_train/5306036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stateChanged(ChangeEvent event) {
int r = this.slider.getValue();
double angle = Math.PI * 2.0 * (r / 360.0);
this.drawStringPanel2.setAngle(angle);
this.drawStringPanel2.invalidate();
this.drawStringPanel2.repaint();
}
COM: <s> receives change event notification from the slider </s>
|
funcom_train/772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public String getTransformationAsString() {
// If the level isn't displayed transformed return an empty String.
if (getRotationValue() == ROTATION_BY_0_DEGREES && isLevelFlippedHorizontally() == false) {
return "";
}
// Build the transformation string and return it.
String transformationString = "View: Rotated "
+ getRotationAsString()
+ " degrees clockwise";
if (isLevelFlippedHorizontally()) {
transformationString += ", flipped horizontally.";
} else {
transformationString += ".";
}
return transformationString;
}
COM: <s> returns the current transformation as string </s>
|
funcom_train/50077050 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectAllElements() {
Component[] all = this.getComponents();
for(int k = 0; k < all.length; k++) {
try{
if(!focusedElements.contains(all[k])) {
SofaaElement current = (SofaaElement) all[k];
focusedElements.add(current);
current.setSelected(true);
}
}
catch (ClassCastException e) {
/* We skip selection Rectangle */
}
}
}
COM: <s> selects all elements of this work tab </s>
|
funcom_train/26206145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JobSession newSession(final JobFactory factory) {
JobSession session =
(JobSession) factory.getSession(this.url, this.user,
this.password);
if (session != null) {
final JobUser jobUser = JobUser.getUser(session, this.user);
if (jobUser == null || !jobUser.isAdmin) {
session.close();
session = null;
}
}
return session;
}
COM: <s> return a new session for the given factory </s>
|
funcom_train/2386198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List findAlbumsOfType(String label) throws PhotoAlbumException{
try{
return super.executeSimpleNamedQuery("album_findAlbumWithType", "typeLabel", label);
} catch (HibernateException he){
he.printStackTrace();
throw new PhotoAlbumException("Could not find albums with type '" + label + "', cause of an Hibernate problem.");
}
}
COM: <s> find albums with specific type </s>
|
funcom_train/45120435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parsePublishFile() {
if (new File(valuesFile).exists()) {
try {
valueProperties = FileUtils.loadPropertiesFromFile(valuesFile);
versionOptions = getOptionsArray(versionString);
descriptionOptions = getOptionsArray(descriptionString);
buildOptions = getOptionsArray(buildString);
} catch (IOException ioException) {
log.fine("couldn't find file " + valuesFile);
}
}
initParametersValues();
}
COM: <s> parse the publish properties file </s>
|
funcom_train/51537687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void uCallSizeChanged(int w, int h) {
synchronized (Display.LCDUILock) {
// If there is no Display, or if this Displayable is not
// currently visible, we simply record the fact that the
// size has changed
sizeChangeOccurred = (currentDisplay == null) ||
(!currentDisplay.isShown(this));
resetViewport();
}
}
COM: <s> package private equivalent of size changed </s>
|
funcom_train/10575605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void invalidateConnection(Connection conn) throws SQLException {
if (conn instanceof PoolGuardConnectionWrapper) { // normal case
PoolGuardConnectionWrapper pgconn = (PoolGuardConnectionWrapper) conn;
ObjectPool<Connection> pool = pgconn.pool;
Connection delegate = pgconn.delegate;
try {
pool.invalidateObject(delegate);
}
catch (Exception e) {
}
pgconn.delegate = null;
}
else {
throw new SQLException("Invalid connection class");
}
}
COM: <s> invalidates the given connection </s>
|
funcom_train/33493015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItemBGG() {
if (jMenuItemBGG == null) {
jMenuItemBGG = new JMenuItem();
jMenuItemBGG.setText("BGG");
jMenuItemBGG.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
String url = "http://www.boardgamegeek.com/game/" + findTargetGame("id",m_table);
BrowserLauncher.openURL(url);
}
});
}
return jMenuItemBGG;
}
COM: <s> this method initializes j menu item bgg </s>
|
funcom_train/18894415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetMp3s() throws Exception {
try {
Mp3Iterator iter = controller.getMp3Model().getMp3s();
assertTrue("Find returned no mp3s.", iter.hasNext());
iter.close();
}
catch (Exception exception) {
exception.printStackTrace();
throw exception;
}
}
COM: <s> searches for all mp3 </s>
|
funcom_train/34040232 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void iconifyNotes() {
Document mvDocument = (Document) getCurBr().getRoot()
.findBFS("content");
Layer personal = mvDocument.getLayer(Layer.PERSONAL);
if (personal != null) {
getCurBr().eventq(PersonalAnnos.MSG_ICON, "");
getCurBr().repaint();
}
}
COM: <s> iconifies the open notes </s>
|
funcom_train/7507785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getValidListItem(String context, String input, List<String> list) throws ValidationException, IntrusionException {
if (list.contains(input)) return input;
throw new ValidationException( context + ": Invalid list item", "Invalid list item: context=" + context + ", input=" + input, context );
}
COM: <s> returns the list item that exactly matches the canonicalized input </s>
|
funcom_train/4916814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNoTaskName() {
// Record no task name
this.recordReturn(this.configuration, this.configuration.getTaskName(),
null);
this.recordReturn(this.rawWorkMetaData,
this.rawWorkMetaData.getWorkName(), "WORK");
this.issues.addIssue(AssetType.WORK, "WORK", "Task added without name");
// Attempt to construct task meta-data
this.replayMockObjects();
this.constructRawTaskMetaData(false);
this.verifyMockObjects();
}
COM: <s> ensure issue if not </s>
|
funcom_train/25963242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeStartElement(String elementStr) throws APIException {
final String METHOD = "writeStartElement";
try {
logger.start(METHOD);
logger.debug(METHOD, "Input elementStr : " + elementStr, null);
hd.startElement("", "", elementStr, null);
logger.end(METHOD);
} catch (SAXException e) {
throw new APIException(
null,
METHOD,
APIAdapterReturnCodeConstants.RETURNCODE_API_INTERNAL_ERROR,
e.getMessage());
}
}
COM: <s> write xml start tag information writter </s>
|
funcom_train/28743177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SubSampleInfo getInfoById(Integer id) throws SimsException {
//String errMsg = clsName + ".getInfoById(): ";
SubSampleInfo info;
try {
local = this.getLocalById(id);
info = local.getInfo();
}
catch (RuntimeException e) {
//Propagate.
throw e;
}
return info;
}
COM: <s> get info object by id </s>
|
funcom_train/26201734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int printTreeForClass(ClassDoc cd) {
ClassDoc sup = cd.superclass();
int indent = 0;
if (sup != null) {
indent = printTreeForClass(sup);
printStep(indent);
}
if (cd.equals(classdoc)) {
bold(cd.qualifiedName());
} else {
printQualifiedClassLink(cd);
}
println();
return indent + 1;
}
COM: <s> print the class hierarchy tree for this class only </s>
|
funcom_train/23235569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel() {
if (jPanel == null) {
jPanel = new JPanel();
jPanel.setLayout(new BorderLayout());
jPanel.add(getJProgressBar(), BorderLayout.NORTH);
jPanel.add(getJButton(), BorderLayout.WEST);
jPanel.add(getJButton1(), BorderLayout.EAST);
}
return jPanel;
}
COM: <s> this method initializes j panel </s>
|
funcom_train/5602352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final private void keep_alive(PyObject obj) {
int id = System.identityHashCode(memo);
PyList list = (PyList) memo.findValue(id, memo);
if (list == null) {
list = new PyList();
memo.put(id, -1, list);
}
list.append(obj);
}
COM: <s> keeps a reference to the object x in the memo </s>
|
funcom_train/23271255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isBarOutlineVisible() {
CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
if (plot == null) {
return false;
}
BarRenderer renderer = (BarRenderer) plot.getRenderer();
if (renderer == null) {
return false;
}
return renderer.isDrawBarOutline();
}
COM: <s> returns the flag that controls whether or not the bar outlines are </s>
|
funcom_train/25374610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Capabilities getCapabilities() {
Capabilities result;
if (getAssociator() != null)
result = getAssociator().getCapabilities();
else
result = new Capabilities(this);
// set dependencies
for (Capability cap: Capability.values())
result.enableDependency(cap);
result.setOwner(this);
return result;
}
COM: <s> returns default capabilities of the base associator </s>
|
funcom_train/22140872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateFlashCard() throws Exception {
Long polishLang = this.langManager.createLanguage("PL", "Polski");
Long englishLang = this.langManager.createLanguage("EN", "Eenglush");
this.fcManager.create("cat", englishLang, "kot", polishLang, "animals cute carnivores pets");
// Well, let's see if everything happend as expected ...
assertCreation(englishLang, polishLang);
}
COM: <s> test the create method </s>
|
funcom_train/10956197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getText(String key, String defaultValue, List<?> args, ValueStack stack) {
if (this.texts.containsKey(key)) {
return this.texts.get(key);
} else {
return super.getText(key, defaultValue, args, stack);
}
}
COM: <s> this is the method invoked by the </s>
|
funcom_train/7295699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValidInput(TransliteratorParser parser) {
for (int i=0; i<text.length(); ) {
int c = UTF16.charAt(text, i);
i += UTF16.getCharCount(c);
if (!parser.parseData.isMatcher(c)) {
return false;
}
}
return true;
}
COM: <s> return true if this half looks like valid input that is does not </s>
|
funcom_train/24624569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toxml() {
resetError();
sortFields();
StringBuffer bfr = new StringBuffer();
bfr.append("<form name=\"xmlBindFor");
bfr.append(this.gettable().toUpperCase());
bfr.append("\">");
if (fields != null) {
for (int i = 0; i < fields.size(); i++)
bfr.append(fields.get(i).toXml());
}
bfr.append("</form>");
return bfr.toString();
}
COM: <s> return an xml presentation of this field </s>
|
funcom_train/22927191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFile(File file, String module) {
String command = "_add('" + file.getAbsolutePath().replace('\\', '/')
+ "'>>" + module + ").";
logCommand(command);
fConsole.println(command);
fConsole.printFloraPrompt();
fSession.addFile(file.getAbsolutePath().replace('\\', '/'), module);
setChanged();
notifyObservers(module);
clearChanged();
}
COM: <s> adds a code file code to a given module </s>
|
funcom_train/42709829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getFit() {
double fit = 0;
for (int i = 0; i < stats.size(); i++) {
double goal = getSum(goals.get(i));
double sum = getSum(stats.get(i));
fit += (goal-sum)*(goal-sum) * goalWeights.get(i);
}
return fit;
}
COM: <s> simple difference compute overall delta squared difference between stats and goals </s>
|
funcom_train/4094993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDualityPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DecrementEconomicEvent_duality_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DecrementEconomicEvent_duality_feature", "_UI_DecrementEconomicEvent_type"),
ReamodelPackage.Literals.DECREMENT_ECONOMIC_EVENT__DUALITY,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the duality feature </s>
|
funcom_train/33606044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object o){
MAddInt x=(MAddInt)o;
int i=0;
if(nf!=x.nf){return nf-x.nf;}
while(i<nf-1&&get(i)==x.get(i)){i++;}
return get(i)-x.get(i);
}
COM: <s> compare to another mult add int </s>
|
funcom_train/5348692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reply(IpPort reply) throws Exception{
PingReply toSend;
if (reply==null)
toSend = PingReply.create(_solGUID.bytes(),(byte)1);
else
toSend = PingReply.create(_solGUID.bytes(),(byte)1,reply);
replyPong(toSend);
}
COM: <s> send a pong with the specified address back to the pinger </s>
|
funcom_train/35539381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DocNameExtractor (final String docNameField) {
this.docNameField = docNameField;
fldSel = new FieldSelector() {
public FieldSelectorResult accept(String fieldName) {
return fieldName.equals(docNameField) ?
FieldSelectorResult.LOAD_AND_BREAK :
FieldSelectorResult.NO_LOAD;
}
};
}
COM: <s> constructor for doc name extractor </s>
|
funcom_train/48669109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setMultipleStringProp(String propKey, List<?> vals) {
int size = vals.size();
StringBuffer str = new StringBuffer(size * 10);
for(int i = 0; i < size; ++i) {
str.append(vals.get(i).toString());
if(i < (size - 1)) {
str.append(File.pathSeparatorChar);
}
}
setString(propKey, str.toString());
}
COM: <s> packs a collection of values to a certain property br </s>
|
funcom_train/20966623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getAlgSelected() {
if (algSelected == null) {
algSelected = new JComboBox();
algSelected.setBounds(new Rectangle(5, 120, 213, 25));
algSelected.addItem("Naive Counting Algorithm");
algSelected.addItem("Algorithm by JERRUM");
algSelected.addItem("Algorithm by JERRUM (Heat Bath)");
algSelected.addItem("Algorithm by DYER/GREENHILL");
}
return algSelected;
}
COM: <s> this method initializes alg selected </s>
|
funcom_train/50346803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element store(Object o) {
Element e = new Element("perform");
PerformFileModel g = (PerformFileModel) o;
e.setAttribute("name", g.getFileName());
e.setAttribute("type", "XmlFile");
e.setAttribute("class", this.getClass().getName());
return e;
}
COM: <s> default implementation for storing the model contents </s>
|
funcom_train/14606830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
_startTime = getCurrentTime();
_duration = 0;
if (!_isRunning) {
if (_timer == null) {
_timer = new Timer();
_timer.schedule(this, 0, _delay);
}
_isRunning = true;
}
fireStateChanged(new StopwatchEvent(StopwatchEvent.START, this));
}
COM: <s> starts the timer and records the current time as start time </s>
|
funcom_train/3524742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getUserFriendlyMessage() {
StringBuffer msgs = new StringBuffer();
for (Iterator iter = exceptionList.iterator(); iter.hasNext();) {
ModelParseException ex = (ModelParseException) iter.next();
msgs.append(ex.getUserFriendlyMessage());
msgs.append("; ");
}
return msgs.toString();
}
COM: <s> get the user friendly message from all the model parse exceptions </s>
|
funcom_train/36255820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Converter createConverter(FaceletContext ctx) {
if (this.converterId == null) {
throw new TagException(
this.tag,
"Default behavior invoked of requiring a converter-id passed in the constructor, must override ConvertHandler(ConverterConfig)");
}
return ctx.getFacesContext().getApplication().createConverter(this.converterId);
}
COM: <s> create a converter instance </s>
|
funcom_train/856851 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showAbout() {
AboutBox aboutbox = AboutBox.getAboutBox();
aboutbox.setSize(525, 485);
aboutbox.setModal(true);
aboutbox.setLocation(screenSize.width / 2 - aboutbox.getWidth() / 2,
screenSize.height / 2 - aboutbox.getHeight() / 2);
aboutbox.setVisible(true);
}
COM: <s> show about gets the about window </s>
|
funcom_train/1963480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test
public void testMoveable1() {
int pieceCode = -1;
System.out.println("testmoveable: Piececode=" + pieceCode);
generateAllMoves instance = new generateAllMoves();
boolean expResult = false;
boolean result = instance.moveable(pieceCode);
assertEquals(expResult, result);
System.out.println("Test Passed");
}
COM: <s> test of moveable method of class generate all moves </s>
|
funcom_train/17706041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void performDefaults() {
// Get the preference store
IPreferenceStore preferenceStore = getPreferenceStore();
// Reset the fields to the defaults
fieldOne.setText(preferenceStore.getDefaultString(ONE));
fieldTwo.setText(preferenceStore.getDefaultString(TWO));
fieldThree.setText(preferenceStore.getDefaultString(THREE));
}
COM: <s> called when user clicks restore defaults </s>
|
funcom_train/23942795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void execute() {
JDBCConnection conn = null;
try {
final String dataSourceStr = getString(DATASOURCE);
final Pool<JDBCConnection> ds = getPool(JDBCConnection.class, dataSourceStr);
conn = ds.get();
try {
final Session s = new Session(conn.getConnection());
try {
Consignment c;
while ((c = s.next()) != null) {
dispatch(OUT, c.toXML("consignment"));
}
} finally {
s.close();
}
} finally {
ds.put(conn);
}
} catch (Exception ex) {
log(ex);
}
}
COM: <s> activated on trigger </s>
|
funcom_train/46190369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRequest() {
logEntry.setRequest("GET /blog/");
assertEquals("GET /blog/", logEntry.getRequest());
assertEquals("GET", logEntry.getRequestMethod());
assertEquals("/blog/", logEntry.getRequestUri());
}
COM: <s> tests the request property </s>
|
funcom_train/29032526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillWithDefaultValues() {
_sDataElements = System.getProperty("user.home") + "/elements.txt";
_sDataServers = System.getProperty("user.home") + "/servers.txt";
_sDataWatch = System.getProperty("user.home") + "/watch.txt";
}
COM: <s> build the default configuration </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.