id
int32
0
3k
input
stringlengths
43
33.8k
gt
stringclasses
1 value
2,200
<s> package net . bioclipse . opentox . test ; import org . junit . runner . RunWith ; import org . junit . runners . Suite ; import org . junit . runners . Suite . SuiteClasses ; @ RunWith ( Suite . class ) @ SuiteClasses (
2,201
<s> package com . asakusafw . vocabulary . operator ; import java . lang . annotation . Documented ; import java . lang . annotation . ElementType ;
2,202
<s> package org . rubypeople . rdt . internal . ui . workingsets ; import java . util . ArrayList ; import java . util . Arrays ; import java . util . Iterator ; import java . util . List ; import org . eclipse . core . resources . IProject ; import org . eclipse . core . resources . IResource ; import org . eclipse . core . resources . IResourceDelta ; import org . eclipse . core . resources . ResourcesPlugin ; import org . eclipse . core . runtime . IAdaptable ; import org . eclipse . ui . IWorkingSet ; import org . eclipse . ui . IWorkingSetUpdater ; import org . rubypeople . rdt . core . ElementChangedEvent ; import org . rubypeople . rdt . core . IElementChangedListener ; import org . rubypeople . rdt . core . IRubyElement ; import org . rubypeople . rdt . core . IRubyElementDelta ; import org . rubypeople . rdt . core . IRubyProject ; import org . rubypeople . rdt . core . RubyCore ; public class RubyWorkingSetUpdater implements IWorkingSetUpdater , IElementChangedListener { public static final String ID = "" ; private List fWorkingSets ; private static class WorkingSetDelta { private IWorkingSet fWorkingSet ; private List fElements ; private boolean fChanged ; public WorkingSetDelta ( IWorkingSet workingSet ) { fWorkingSet = workingSet ; fElements = new ArrayList ( Arrays . asList ( workingSet . getElements ( ) ) ) ; } public int indexOf ( Object element ) { return fElements . indexOf ( element ) ; } public void set ( int index , Object element ) { fElements . set ( index , element ) ; fChanged = true ; } public void remove ( int index ) { if ( fElements . remove ( index ) != null ) { fChanged = true ; } } public void process ( ) { if ( fChanged ) { fWorkingSet . setElements ( ( IAdaptable [ ] ) fElements . toArray ( new IAdaptable [ fElements . size ( ) ] ) ) ; } } } public RubyWorkingSetUpdater ( ) { fWorkingSets = new ArrayList ( ) ; RubyCore . addElementChangedListener ( this ) ; } public void
2,203
<s> package de . fuberlin . wiwiss . d2rq . server ; import java . util . Enumeration ; import java . util . HashMap ; import java . util . Vector ; import javax . servlet . http . HttpServletRequest ; import javax . servlet . http . HttpServletRequestWrapper ; public class RequestParamHandler { private static final String ATTRIBUTE_NAME_IS_HANDLED = "" ; private final static HashMap < String , String > mimeTypes = new HashMap < String , String > ( ) ; static { mimeTypes . put ( "rdfxml" , "" ) ; mimeTypes . put ( "xml" , "" ) ; mimeTypes . put ( "turtle" , "" ) ; mimeTypes . put ( "ttl" , "" ) ; mimeTypes . put ( "n3" , "" ) ; mimeTypes . put ( "nt" , "text/plain" ) ; mimeTypes . put ( "text" , "text/plain" ) ; } public static String removeOutputRequestParam ( String uri ) { return uri . replaceFirst ( "" , "" ) ; } private final HttpServletRequest request ; private final String requestedType ; public RequestParamHandler ( HttpServletRequest request ) { this . request = request ; requestedType = identifyRequestedType ( request . getParameter ( "output" ) ) ; } public boolean isMatchingRequest ( ) { if ( "true" . equals ( request . getAttribute ( ATTRIBUTE_NAME_IS_HANDLED ) ) ) { return false ; } return requestedType != null ; } public HttpServletRequest getModifiedRequest ( ) { return new WrappedRequest ( ) ; } private String identifyRequestedType ( String parameterValue ) { if ( mimeTypes . containsKey ( parameterValue ) ) { return parameterValue ; } return null ; } private class WrappedRequest extends
2,204
<s> package org . rubypeople . rdt . refactoring . tests . core . inlineclass . conditionchecks ; import java . io . FileNotFoundException ; import java . io . IOException ; import org . jruby . ast . Node ; import org . rubypeople . rdt . refactoring . core . SelectionNodeProvider ; import org . rubypeople . rdt . refactoring . core . inlineclass . ClassInliner ; import org . rubypeople . rdt . refactoring . core . inlineclass . InlineClassConditionChecker ; import org . rubypeople . rdt . refactoring . core . inlineclass . InlineClassConfig ; import org . rubypeople . rdt . refactoring . exception . NoClassNodeException ; import org . rubypeople . rdt . refactoring . nodewrapper . PartialClassNodeWrapper ; import org . rubypeople . rdt . refactoring . tests . FilePropertyData ; import org . rubypeople . rdt . refactoring . tests . FileTestData ; import org . rubypeople . rdt . refactoring . tests . RefactoringConditionTestCase ; public class InlineClassConditionTester extends RefactoringConditionTestCase { private InlineClassConfig config ; private FilePropertyData testData ; public InlineClassConditionTester ( String fileName ) { super ( fileName ) ; } @ Override public void runTest ( ) throws FileNotFoundException , IOException { testData = new FileTestData ( getName ( ) , ".test_source" , ".test_source" ) ; config = new InlineClassConfig ( testData , testData . getIntProperty ( "" ) ) ; InlineClassConditionChecker checker = new InlineClassConditionChecker ( config ) ;
2,205
<s> package com . asakusafw . bulkloader . collector ; import static org . junit . Assert . * ; import java . io . File ; import java . io . FileInputStream ; import java . io . IOException ; import java . util . Properties ; import org . junit . After ; import org . junit . AfterClass ; import org . junit . Before ; import org . junit . BeforeClass ; import org . junit . Test ; import com . asakusafw . bulkloader . bean . ExporterBean ; import com . asakusafw . bulkloader . common . JobFlowParamLoader ; import com . asakusafw . bulkloader . testutil . UnitTestUtil ; public class CollectorTest { @ BeforeClass public static void setUpBeforeClass ( ) throws Exception { UnitTestUtil . setUpBeforeClass ( ) ; UnitTestUtil . setUpEnv ( ) ; } @ AfterClass public static void tearDownAfterClass ( ) throws Exception { UnitTestUtil . tearDownAfterClass ( ) ; } @ Before public void setUp ( ) throws Exception { } @ After public void tearDown ( ) throws Exception { } @ Test public void executeTest01 ( ) throws Exception { String [ ] args = new String [ 5 ] ; args [ 0 ] = "batch01" ; args [ 1 ] = "11" ; args [ 2 ] = "1" ; args [ 3 ] = "11-1" ; args [ 4 ] = "hadoop" ; Collector collector = new StubCollector ( ) ; int result = collector . execute ( args ) ; assertEquals ( 0 , result ) ; } @ Test public void executeTest02 ( ) throws Exception { String [ ] args = new String [ 5 ] ; args [ 0 ] = "target1" ; args [ 1 ] = "batch01" ; args [ 2 ] = "11" ; args [ 3 ] = "11-1" ; args [ 4 ] = "hadoop" ; Collector collector = new StubCollector ( ) { @ Override protected ExportFileSend createExportFileSend ( ) { return new StubExportFileSend ( false ) ; } } ; int result = collector . execute ( args ) ; assertEquals ( 1 , result ) ; } @ Test public void executeTest03 ( ) throws Exception { String [ ] args = new String [ 5 ] ; args [ 0 ] = "target1" ; args [ 1 ] = "batch01" ; args [ 2 ] = "11" ; args [ 3 ] = "11-1" ; args [ 4 ] = "hadoop" ; Collector collector = new StubCollector ( ) { @ Override protected ExportFileSend createExportFileSend ( ) { throw new NullPointerException ( ) ; } } ; int result = collector . execute
2,206
<s> package org . rubypeople . rdt . internal . ui . callhierarchy ; import java . util . Arrays ; import java . util . List ; import org . eclipse . core . runtime . IStatus ; import org . eclipse . jface . action . Action ; import org . eclipse . jface . dialogs . StatusDialog ; import org . eclipse . jface . viewers . ISelection ; import org . eclipse . jface . viewers . StructuredSelection ; import org . eclipse . jface . window . Window ; import org . eclipse . swt . SWT ; import org . eclipse . swt . layout . GridData ; import org . eclipse . swt . widgets . Composite ; import org . eclipse . swt . widgets . Control ; import org . eclipse . swt . widgets . Shell ; import org . eclipse . ui . PlatformUI ; import org . rubypeople . rdt . core . IMethod ; import org . rubypeople . rdt . internal . ui . IRubyHelpContextIds ; import org . rubypeople . rdt . internal . ui . RubyPlugin ; import org . rubypeople . rdt . internal . ui . dialogs . StatusInfo ; import org . rubypeople . rdt . internal . ui . wizards . dialogfields . DialogField ; import org . rubypeople . rdt . internal . ui . wizards . dialogfields . IListAdapter ; import org . rubypeople . rdt . internal . ui . wizards . dialogfields . LayoutUtil ; import org . rubypeople . rdt . internal . ui . wizards . dialogfields . ListDialogField ; import org . rubypeople . rdt . ui . RubyElementLabelProvider ; public class HistoryListAction extends Action { private class HistoryListDialog extends StatusDialog { private ListDialogField fHistoryList ; private IStatus fHistoryStatus ; private IMethod fResult ; private HistoryListDialog ( Shell shell , IMethod [ ] elements ) { super ( shell ) ; setTitle ( CallHierarchyMessages . HistoryListDialog_title ) ; String [ ] buttonLabels = new String [ ] { CallHierarchyMessages . HistoryListDialog_remove_button , } ; IListAdapter adapter = new IListAdapter ( ) { public void customButtonPressed ( ListDialogField field , int index ) { doCustomButtonPressed ( ) ; } public void selectionChanged ( ListDialogField field ) { doSelectionChanged ( ) ; } public void doubleClicked ( ListDialogField field ) { doDoubleClicked ( ) ; } } ; RubyElementLabelProvider labelProvider = new RubyElementLabelProvider ( RubyElementLabelProvider . SHOW_QUALIFIED | RubyElementLabelProvider . SHOW_ROOT ) ; fHistoryList = new ListDialogField ( adapter , buttonLabels , labelProvider ) ; fHistoryList . setLabelText ( CallHierarchyMessages . HistoryListDialog_label ) ; fHistoryList . setElements ( Arrays . asList ( elements ) ) ; ISelection sel ; if ( elements . length > 0 ) { sel = new StructuredSelection ( elements [ 0 ] ) ; } else { sel = new StructuredSelection ( ) ; } fHistoryList . selectElements ( sel ) ; } protected Control createDialogArea ( Composite parent ) { initializeDialogUnits ( parent ) ; Composite composite = ( Composite ) super . createDialogArea ( parent ) ; Composite inner = new Composite ( composite , SWT . NONE ) ; inner . setLayoutData ( new GridData ( GridData . FILL_BOTH ) ) ; inner . setFont ( composite . getFont ( ) ) ; LayoutUtil . doDefaultLayout ( inner , new DialogField [ ] { fHistoryList } , true , 0 , 0 ) ; LayoutUtil . setHeightHint ( fHistoryList . getListControl ( null
2,207
<s> package net . sf . sveditor . core . diagrams ; import java . util . ArrayList ; import java . util . Collection ; import java . util . HashSet ; import java . util . List ; import net . sf . sveditor . core . db . ISVDBItemBase ; import net . sf . sveditor . core . db . SVDBFunction ; import net . sf . sveditor . core . db . SVDBTask ; import net . sf . sveditor . core . db . stmt . SVDBVarDeclItem ; public class DiagNode { private final String fName ; private HashSet < DiagNode > fSuperClasses ; private HashSet < DiagNode > fContainedClasses ; private ISVDBItemBase fISVDBItem ; private List < SVDBVarDeclItem > fMemberDecls ; private List < SVDBFunction > fFuncDecls ; private List < SVDBTask > fTaskDecls ; private boolean fSelected ; public DiagNode ( String name , ISVDBItemBase item ) { this . fName = name ; this . fSelected = false ; this . fMemberDecls = new ArrayList < SVDBVarDeclItem > ( ) ; this . fFuncDecls = new ArrayList < SVDBFunction > ( ) ; this . fTaskDecls = new ArrayList < SVDBTask > ( ) ; this . fISVDBItem = item ; this . fSuperClasses = new HashSet < DiagNode
2,208
<s> package org . rubypeople . rdt . refactoring . nodewrapper ; import java . util . ArrayList ; import java . util . Collection ; import org . jruby . ast . DefsNode ; import org . jruby . ast . MethodDefNode ; import org . jruby . ast . Node ; import org . jruby . ast . SymbolNode ; import org . jruby . lexer . yacc . ISourcePosition ; import org . rubypeople . rdt . refactoring . core . NodeProvider ; import org . rubypeople . rdt . refactoring . signatureprovider . MethodSignature ; import org . rubypeople . rdt . refactoring . util . Constants ; public class MethodNodeWrapper implements INodeWrapper { protected MethodDefNode methodNode ; private final ClassNodeWrapper containingClass ; public MethodNodeWrapper ( MethodDefNode methodDef , ClassNodeWrapper containingClass ) { this
2,209
<s> package net . sf . sveditor . core . docs . html ; import java . util . regex . Matcher ; import java . util . regex . Pattern ; import net . sf . sveditor . core . docs . model . DocFile ; import net . sf . sveditor . core . docs . model . DocModel ; import net . sf . sveditor . core . docs . model . DocTopic ; import net . sf . sveditor . core . docs . model . SymbolTableEntry ; import net . sf . sveditor . core . log . ILogLevel ; import net . sf . sveditor . core . log . LogFactory ; import net . sf . sveditor . core . log . LogHandle ; public class HTMLFromNDMarkup { private final static Pattern patternLink = Pattern . compile ( "" ) ; public enum NDMarkupToHTMLStyle { Tooltip , General } ; private DocModel fModel ; private LogHandle fLog ; public HTMLFromNDMarkup ( ) { this ( null ) ; } public HTMLFromNDMarkup ( DocModel model ) { fModel = model ; fLog = LogFactory . getLogHandle ( "" ) ; } @ SuppressWarnings ( "unused" ) public String convertNDMarkupToHTML ( DocFile docFile , DocTopic docTopic , String markup , NDMarkupToHTMLStyle style ) { String output = "" ; String splitText [ ] = markup . split ( "" ) ; int index = 0 ; while ( index < splitText . length ) { String text = splitText [ index ] ; if ( false ) { } else if ( false ) { } else if ( false ) { } else { if ( false ) { } if ( style != NDMarkupToHTMLStyle . Tooltip ) { while ( true ) { Matcher matcher = patternLink . matcher ( text ) ; if ( matcher . find ( ) ) { String newText = "" ; if ( matcher . start ( ) != 0 ) { newText += text . substring ( 0 , matcher . start ( ) ) ; } newText += buildTextLink ( docFile , docTopic , matcher . group ( 1 ) , matcher . group ( 2 ) , matcher . group ( 3 ) ) ; if ( ! matcher . hitEnd ( ) ) { newText += text . substring ( matcher . end ( ) ) ; } text = newText ; } else { break ; } } } else { Matcher matcher = patternLink . matcher ( text ) ; text = matcher . replaceAll ( "$1" ) ; } text = text . replaceAll ( "\\<h\\>" , "" ) ; text = text . replaceAll ( "\\</h\\>" , "</h4>" ) ; output += text ; } index ++ ; } return output ; } private String buildTextLink ( DocFile docFile , DocTopic docTopic , String target , String name , String original ) { String plainTarget = HTMLUtils . restoreAmpChars ( target ) ; String symbol = SymbolTableEntry . cleanSymbol ( plainTarget ) ; if ( fModel == null ) { fLog . error ( String . format ( "" ) ) ; return "" ; } SymbolTableEntry symbolTableEntry = fModel . getSymbolTable ( ) . resolveSymbol ( docTopic , symbol ) ; if ( symbolTableEntry == null ) {
2,210
<s> package org . oddjob ; import java . io . File ; import java . util . concurrent . Exchanger ; import junit . framework . TestCase ; import org . apache . log4j . Logger ; import org . oddjob . arooa . xml . XMLConfiguration ; import org . oddjob . framework . SimpleJob ; import org . oddjob . io . BufferType ; import org . oddjob . jobs . ExecJob ; import org . oddjob . jobs . WaitJob ; import org . oddjob . state . JobState ; import org . oddjob . state . State ; import org . oddjob . state . StateConditions ; public class MainShutdownTest extends TestCase { private static final Logger logger = Logger . getLogger ( MainTest . class ) ; @ Override protected void setUp ( ) throws Exception { logger . debug ( "" + getName ( ) + "" ) ; } public static class OurSimpleJob extends SimpleJob implements Stoppable { boolean stopped ; Thread t ; Exchanger < Void > exchanger = new Exchanger < Void > ( ) ; @ Override protected synchronized int execute ( ) throws Throwable { t = Thread . currentThread ( ) ; exchanger . exchange ( null ) ; try { while ( true ) { wait ( ) ; } } catch ( InterruptedException e ) { logger . debug ( "" ) ; } return 0 ; } public synchronized void onStop ( ) { stopped = true ; t
2,211
<s> package de . fuberlin . wiwiss . d2rq . server ; import java . io . IOException ; import java . util . Iterator ; import java . util . Map . Entry ; import javax . servlet . ServletException ; import javax . servlet . ServletOutputStream ; import javax . servlet . http
2,212
<s> package org . oddjob . jmx . handlers ; import javax . management . MBeanAttributeInfo ; import javax . management . MBeanNotificationInfo ; import javax . management . MBeanOperationInfo ; import javax . management . MBeanParameterInfo ; import org . oddjob . Stoppable ; import org . oddjob . jmx . client . ClientHandlerResolver ; import org . oddjob . jmx . client . HandlerVersion ; import org . oddjob . jmx . client . VanillaHandlerResolver ; import org . oddjob . jmx . server .
2,213
<s> package net . sf . sveditor . ui . views . objects ; import net . sf . sveditor . core . objects . ObjectsTreeNode ; import net . sf . sveditor . ui . svcp . SVTreeLabelProvider ; import org . eclipse . jface . viewers . StyledString ; import org . eclipse . swt . graphics . Image ; public class ObjectsLabelProvider extends SVTreeLabelProvider {
2,214
<s> package de . fuberlin . wiwiss . d2rq . expr ; import de . fuberlin . wiwiss . d2rq . algebra . ColumnRenamer ; public class Add extends BinaryOperator { public Add ( Expression expr1 , Expression expr2 ) { super ( expr1 , expr2 , "+" ) ; } public Expression renameAttributes ( ColumnRenamer columnRenamer ) { return new Add ( expr1 . renameAttributes ( columnRenamer ) , expr2 . renameAttributes ( columnRenamer ) ) ; } public boolean equals ( Object
2,215
<s> package org . rubypeople . rdt . internal . ui . wizards ; import org . eclipse . osgi . util . NLS ; public class NewWizardMessages extends NLS { private static final String BUNDLE_NAME = "" ; private NewWizardMessages ( ) { } public static String NewContainerWizardPage_container_label ; public static String NewContainerWizardPage_container_button ; public static String NewContainerWizardPage_ChooseSourceContainerDialog_title ; public static String NewContainerWizardPage_ChooseSourceContainerDialog_description ; public static String NewContainerWizardPage_error_EnterContainerName ; public static String NewContainerWizardPage_error_ProjectClosed ; public static String NewContainerWizardPage_warning_NotARubyProject ; public static String NewContainerWizardPage_warning_NotInARubyProject ; public static String NewContainerWizardPage_error_NotAFolder ; public static String NewContainerWizardPage_error_ContainerDoesNotExist ; public static String NewContainerWizardPage_warning_NotOnLoadPath ; public static String AbstractOpenWizardAction_createerror_message ; public static String AbstractOpenWizardAction_createerror_title ; public static String AbstractOpenWizardAction_noproject_title ; public static String AbstractOpenWizardAction_noproject_message ; public static String NewTypeWizardPage_typename_label ; public static String NewTypeWizardPage_superclass_label ; public static String NewTypeWizardPage_superclass_button ; public static String NewTypeWizardPage_interfaces_add ; public static String NewTypeWizardPage_interfaces_remove ; public static String NewTypeWizardPage_interfaces_class_label ; public static String NewTypeWizardPage_interfaces_ifc_label ; public static String NewTypeWizardPage_configure_templates_title ; public static String NewTypeWizardPage_configure_templates_message ; public static String NewTypeWizardPage_InterfacesDialog_message ; public static String NewTypeWizardPage_InterfacesDialog_interface_title ; public static String NewTypeWizardPage_InterfacesDialog_class_title ; public static String NewTypeWizardPage_error_EnterTypeName ; public static String NewTypeWizardPage_operationdesc ; public static String NewTypeWizardPage_default ; public static String NewTypeWizardPage_package_button ; public static String NewTypeWizardPage_package_label ; public static String NewTypeWizardPage_error_InvalidPackageName ; public static String NewTypeWizardPage_warning_DiscouragedPackageName ; public static String NewTypeWizardPage_ChoosePackageDialog_title ; public static String NewTypeWizardPage_ChoosePackageDialog_description ; public static String NewTypeWizardPage_ChoosePackageDialog_empty ; public static String NewElementWizard_op_error_title ; public static String NewElementWizard_op_error_message ; public static String NewFileCreationWizard_title ; public static String NewFileWizardPage_title ; public static String NewFileWizardPage_description ; public static String NewFileWizardPage_scriptname_label ; public static String NewClassCreationWizard_title ; public static String NewClassWizardPage_title ; public static String NewClassWizardPage_description ; public static String NewClassWizardPage_methods_main ; public static String NewClassWizardPage_methods_constructors ; public static String NewClassWizardPage_methods_label ; public static String BrowseToInstalledRubyWizardPage_ERR_MSG_Location_empty ; public static String BrowseToInstalledRubyWizardPage_ERR_MSG_Unable_find_standard_vm_metadata ; public static String BrowseToInstalledRubyWizardPage_LBL_Browse_button ; public static String BrowseToInstalledRubyWizardPage_LBL_Standard_ruby_entry_name ; public static String BrowseToInstalledRubyWizardPage_MSG_Browse_dialog ; public static String BrowseToInstalledRubyWizardPage_MSG_Description ; public static String BrowseToInstalledRubyWizardPage_MSG_Explanation_text ; public static String BrowseToInstalledRubyWizardPage_TTL ; public static String BuildPathsBlock_operationdesc_java ; public static String CPListLabelProvider_new ; public static String CPListLabelProvider_classcontainer ; public static String CPListLabelProvider_willbecreated ; public static String CPListLabelProvider_non_modifiable_attribute ; public static String CPListLabelProvider_systemlibrary ; public static String CPListLabelProvider_none ; public static String CPListLabelProvider_exclusion_filter_separator ; public static String CPListLabelProvider_exclusion_filter_label ; public static String CPListLabelProvider_inclusion_filter_separator ; public static String CPListLabelProvider_all ; public static String CPListLabelProvider_inclusion_filter_label ; public static String CPListLabelProvider_unbound_library ; public static String CPListLabelProvider_unknown_element_label ; public static String CPListLabelProvider_twopart ; public static String ProjectsWorkbookPage_projects_add_button ; public static String ProjectsWorkbookPage_projects_edit_button ; public static String ProjectsWorkbookPage_projects_remove_button ; public static String ProjectsWorkbookPage_projects_label ; public static String ProjectsWorkbookPage_chooseProjects_message ; public static String ProjectsWorkbookPage_chooseProjects_title ; public static String MultipleFolderSelectionDialog_button ; public static String BuildPathDialogAccess_ExistingSourceFolderDialog_new_description ; public static String BuildPathDialogAccess_ExistingSourceFolderDialog_new_title ; public static String BuildPathDialogAccess_ExistingClassFolderDialog_new_description ; public static String BuildPathDialogAccess_ExistingClassFolderDialog_new_title ; public static String LibrariesWorkbookPage_libraries_label ; public static String LibrariesWorkbookPage_exclusion_added_title ; public static String LibrariesWorkbookPage_exclusion_added_message ; public static String LibrariesWorkbookPage_configurecontainer_error_title ; public static String LibrariesWorkbookPage_configurecontainer_error_message ; public static String LibrariesWorkbookPage_NewClassFolderDialog_new_title ; public static String LibrariesWorkbookPage_NewClassFolderDialog_edit_title ; public static String LibrariesWorkbookPage_NewClassFolderDialog_description ; public static String LibrariesWorkbookPage_libraries_addclassfolder_button ; public static String LibrariesWorkbookPage_libraries_edit_button ; public static String LibrariesWorkbookPage_libraries_remove_button ; public static String BuildPathSupport_putoncpdialog_title ; public static String BuildPathSupport_putoncpdialog_message ; public static String NewContainerDialog_error_enterpath ; public static String NewContainerDialog_error_invalidpath ; public static String NewContainerDialog_error_pathexists ; public static String BuildPathsBlock_classpath_up_button ; public static String BuildPathsBlock_classpath_down_button ; public static String BuildPathsBlock_classpath_checkall_button ; public static String BuildPathsBlock_classpath_uncheckall_button ; public static String BuildPathsBlock_classpath_label ; public static String BuildPathsBlock_buildpath_button ; public static String BuildPathsBlock_buildpath_label ; public static String BuildPathsBlock_tab_source ; public static String BuildPathsBlock_tab_projects ; public static String BuildPathsBlock_tab_libraries ; public static String BuildPathsBlock_tab_order ; public static String BuildPathsBlock_warning_EntryMissing ; public static String BuildPathsBlock_warning_EntriesMissing ; public static String BuildPathsBlock_error_EnterBuildPath ; public static String BuildPathsBlock_error_InvalidBuildPath ; public static String OutputLocation_SettingsAsLocation ; public static String OutputLocation_DotAsLocation ; public static String BuildPathsBlock_operationdesc_project ; public static String BuildPathsBlock_RemoveBinariesDialog_title ; public static String BuildPathsBlock_RemoveBinariesDialog_description ; public static String BuildPathsBlock_ChooseOutputFolderDialog_title ; public static String BuildPathsBlock_ChooseOutputFolderDialog_description ; public static String FolderSelectionDialog_button ; public static String LinkFolderDialog_dependenciesGroup_locationLabel_desc ; public static String LinkFolderDialog_dependenciesGroup_browseButton_desc ; public static String LinkFolderDialog_dependenciesGroup_variables_desc ; public static String RubyProjectWizardFirstPage_directory_message ; public static String NewSourceFolderWizardPage_title ; public static String NewFolderDialog_createIn ; public static String AddSourceFolderWizardPage_description ; public static String NewSourceFolderWizardPage_edit_description ; public static String NewSourceFolderWizardPage_root_label ; public static String NewSourceFolderWizardPage_exclude_label ; public static String NewSourceFolderWizardPage_ReplaceExistingSourceFolder_label ; public static String AddSourceFolderWizardPage_ignoreNestingConflicts ; public static String NewSourceFolderWizardPage_ChooseExistingRootDialog_title ; public static String NewSourceFolderWizardPage_ChooseExistingRootDialog_description ; public static String NewSourceFolderWizardPage_error_AlreadyExisting ; public static String NewFolderDialog_folderNameEmpty_alreadyExists ; public static String NewSourceFolderWizardPage_warning_ReplaceSFandOL ; public static String NewSourceFolderWizardPage_warning_ReplaceOL ; public static String AddSourceFolderWizardPage_conflictWarning ; public static String AddSourceFolderWizardPage_addSinglePattern ; public static String NewSourceFolderWizardPage_warning_AddedExclusions ; public static String AddSourceFolderWizardPage_replaceSourceFolderInfo ; public static String NewFolderDialog_linkTargetNotFolder ; public static String NewFolderDialog_linkTargetNonExistent ; public static String NewSourceFolderWizardPage_error_EnterRootName ; public static String NewSourceFolderWizardPage_error_InvalidRootName ; public static String NewSourceFolderWizardPage_error_NotAFolder ; public static String NewSourceFolderWizardPage_error_AlreadyExistingDifferentCase ; public static String ExclusionInclusionDialog_ChooseExclusionPattern_title ; public static String ExclusionInclusionDialog_ChooseExclusionPattern_description ; public static String ExclusionInclusionDialog_ChooseInclusionPattern_title ; public static String ExclusionInclusionDialog_ChooseInclusionPattern_description ; public static String ExclusionInclusionEntryDialog_pattern_button ; public static String ExclusionInclusionEntryDialog_exclude_description ; public static String ExclusionInclusionEntryDialog_include_description ; public static String ExclusionInclusionEntryDialog_error_empty ; public static String ExclusionInclusionEntryDialog_error_notrelative ; public static String ExclusionInclusionEntryDialog_error_exists ; public static String ExclusionInclusionEntryDialog_ChooseExclusionPattern_title ; public static String ExclusionInclusionEntryDialog_ChooseExclusionPattern_description ; public static String ExclusionInclusionEntryDialog_ChooseInclusionPattern_title ; public static String ExclusionInclusionEntryDialog_ChooseInclusionPattern_description ; public static String ExclusionInclusionEntryDialog_exclude_add_title ; public static String ExclusionInclusionEntryDialog_exclude_edit_title ; public static String ExclusionInclusionEntryDialog_exclude_pattern_label ; public static String ExclusionInclusionEntryDialog_include_add_title ; public static String ExclusionInclusionEntryDialog_include_edit_title ; public static String ExclusionInclusionEntryDialog_include_pattern_label ; public static String ExclusionInclusionDialog_title ; public static String ExclusionInclusionDialog_description2 ; public static String ExclusionInclusionDialog_exclusion_pattern_label ; public static String ExclusionInclusionDialog_exclusion_pattern_add ; public static String ExclusionInclusionDialog_exclusion_pattern_add_multiple ; public static String ExclusionInclusionDialog_exclusion_pattern_edit ; public static String ExclusionInclusionDialog_exclusion_pattern_remove ; public static String ExclusionInclusionDialog_inclusion_pattern_label ; public static String ExclusionInclusionDialog_inclusion_pattern_add ; public static String ExclusionInclusionDialog_inclusion_pattern_add_multiple ; public static String ExclusionInclusionDialog_inclusion_pattern_edit ; public static String ExclusionInclusionDialog_inclusion_pattern_remove ; public static String NewSourceFolderCreationWizard_link_title ; public static String NewSourceFolderCreationWizard_title ; public static String NewSourceFolderCreationWizard_edit_title ; public static String SourceContainerWorkbookPage_folders_add_button ; public static String SourceContainerWorkbookPage_folders_link_source_button ; public static String SourceContainerWorkbookPage_folders_edit_button ; public static String SourceContainerWorkbookPage_folders_remove_button ; public static String SourceContainerWorkbookPage_folders_label ; public static String SourceContainerWorkbookPage_folders_check ; public static String SourceContainerWorkbookPage_ExistingSourceFolderDialog_new_title ; public static String SourceContainerWorkbookPage_ExistingSourceFolderDialog_edit_description ; public static String SourceContainerWorkbookPage_ChangeOutputLocationDialog_project_and_output_message ; public static String SourceContainerWorkbookPage_ChangeOutputLocationDialog_project_message ; public static String SourceContainerWorkbookPage_ChangeOutputLocationDialog_title ; public static String SourceContainerWorkbookPage_exclusion_added_title ; public static String SourceContainerWorkbookPage_exclusion_added_message ; public static String NewSourceContainerWorkbookPage_HintTextGroup_title ; public static String DialogPackageExplorer_LabelProvider_SingleExcluded ; public static String DialogPackageExplorer_LabelProvider_MultiExcluded ; public static String DialogPackageExplorer_LabelProvider_Excluded ; public static String DownloadRubyWizardPage_ERR_Downloading_ruby_installer ; public static String DownloadRubyWizardPage_ERR_Installer_exit_failure ; public static String DownloadRubyWizardPage_ERR_Launching_installer ; public static String DownloadRubyWizardPage_LBL_Downloading_ruby_installer ; public static String DownloadRubyWizardPage_LBL_Install_button ; public static String DownloadRubyWizardPage_MSG_Description ; public static String DownloadRubyWizardPage_MSG_Explanation_text ; public static String DownloadRubyWizardPage_TTL ; public static String ClasspathModifier_Monitor_ComparePaths ; public static String NewSourceContainerWorkbookPage_ToolBar_AddSelSFToCP_tooltip ; public static String PackageExplorerActionGroup_FormText_ProjectToBuildpath ; public static String PackageExplorerActionGroup_FormText_PackageToBuildpath ; public static String PackageExplorerActionGroup_FormText_FolderToBuildpath ; public static String PackageExplorerActionGroup_FormText_Default_toBuildpath ; public static String LoadpathModifier_Error_NoNatures ; public static String LoadpathModifier_Monitor_AddToBuildpath ; public static String ClasspathModifier_Monitor_SetNewEntry ; public static String NewSourceFolderWizardPage_warning_ReplaceSF ; public static String ClasspathModifier_Monitor_AddToBuildpath ; public static String ClasspathModifier_Monitor_Excluding ; public static String ClasspathModifier_Monitor_RemovePath ; public static String NewSourceContainerWorkbookPage_ToolBar_AddSelSFToCP_label ; public static String NewSourceContainerWorkbookPage_ToolBar_ClearAll_tooltip ; public static String NewSourceContainerWorkbookPage_ToolBar_ClearAll_label ; public static String NewSourceContainerWorkbookPage_ToolBar_CreateSrcFolder_tooltip ; public static String NewSourceContainerWorkbookPage_ToolBar_CreateSrcFolder_label ; public static String NewSourceContainerWorkbookPage_ToolBar_Link_tooltip ; public static String NewSourceContainerWorkbookPage_ToolBar_Link_label ; public static String NewSourceContainerWorkbookPage_ToolBar_EditOutput_tooltip ; public static String NewSourceContainerWorkbookPage_ToolBar_EditOutput_label ; public static String NewSourceContainerWorkbookPage_ToolBar_Configure_tooltip ; public static String NewSourceContainerWorkbookPage_ToolBar_Configure_label ; public static String NewSourceContainerWorkbookPage_ToolBar_Edit_tooltip ; public static String NewSourceContainerWorkbookPage_ToolBar_Edit_label ; public static String NewSourceContainerWorkbookPage_ToolBar_Unexclude_tooltip ; public static String NewSourceContainerWorkbookPage_ToolBar_Unexclude_label ; public static String NewSourceContainerWorkbookPage_ToolBar_Exclude_tooltip ; public static String NewSourceContainerWorkbookPage_ToolBar_Exclude_label ; public static String NewSourceContainerWorkbookPage_ToolBar_RemoveFromCP_tooltip ; public static String NewSourceContainerWorkbookPage_ToolBar_RemoveFromCP_label ; public static String PackageExplorerActionGroup_NoAction_File ; public static String PackageExplorerActionGroup_NoAction_DefaultPackage ; public static String PackageExplorerActionGroup_NoAction_NullSelection ; public static String PackageExplorerActionGroup_NoAction_MultiSelection ; public static String PackageExplorerActionGroup_NoAction_ArchiveResource ; public static String PackageExplorerActionGroup_NoAction_NoReason ; public static String NewSourceContainerWorkbookPage_ToolBar_Reset_tooltip ; public static String PackageExplorerActionGroup_FormText_Default_ResetAll ; public static String PackageExplorerActionGroup_FormText_createNewSourceFolder ; public static String NewSourceContainerWorkbookPage_ToolBar_AddLibCP_tooltip ; public static String PackageExplorerActionGroup_FormText_ProjectFromBuildpath ; public static String PackageExplorerActionGroup_FormText_fromBuildpath ; public static String PackageExplorerActionGroup_FormText_Default_FromBuildpath ; public static String ClasspathModifier_Monitor_RemoveFromBuildpath ; public static String PackageExplorerActionGroup_FormText_ExcludePackage ; public static String PackageExplorerActionGroup_FormText_ExcludeFile ; public static String PackageExplorerActionGroup_FormText_Default_Exclude ; public static String PackageExplorerActionGroup_FormText_UnexcludeFolder ; public static String
2,216
<s> package com . asakusafw . windgate . file . resource ; import java . io . File ; import java . io . IOException ; import java . text . MessageFormat ; import com . asakusafw . windgate . core . DriverScript ; import com . asakusafw . windgate . core . GateScript ; import com . asakusafw . windgate . core . ProcessScript ; import com . asakusafw . windgate . core . resource . DrainDriver ; import com . asakusafw . windgate . core . resource . ResourceMirror ; import com . asakusafw . windgate . core . resource . SourceDriver ; import com . asakusafw . windgate . core . vocabulary . FileProcess ; public class FileResourceMirror extends ResourceMirror { private final String name ; public FileResourceMirror ( String name ) { if ( name == null ) { throw new IllegalArgumentException ( "" ) ; } this . name = name ; } @
2,217
<s> package org . rubypeople . rdt . refactoring . ui . pages ; import org . eclipse . swt . SWT ; import org . eclipse . swt . layout . FillLayout ; import org . eclipse . swt . widgets . Composite ; import org . rubypeople . rdt .
2,218
<s> package org . oddjob . jmx . server ; import javax . management . JMException ; import javax . management . ObjectName ; import org . oddjob . arooa . ArooaSession ; import org . oddjob
2,219
<s> package net . sf . sveditor . core . db ; public class SVDBModportClockingPortDecl extends SVDBModportPortsDecl { public String fClockingId ; public SVDBModportClockingPortDecl ( ) { super ( SVDBItemType . ModportClockingPortDecl
2,220
<s> package net . sf . sveditor . ui . editor ; import org . eclipse . core . runtime . Assert ; import org . eclipse . jface . text . BadLocationException ; import org . eclipse . jface . text . DocumentEvent ; import org . eclipse . jface . text . IDocument ; import org . eclipse . jface . text . ITextViewer ; import org . eclipse . jface . text . Position ; import org . eclipse . jface . text . contentassist . ICompletionProposal ; import org . eclipse . jface . text . contentassist . ICompletionProposalExtension2 ; import org . eclipse . jface . text . contentassist . IContextInformation ; import org . eclipse .
2,221
<s> package net . sf . sveditor . ui . wizards ; import java . util . ArrayList ; import java . util . List ; import java . util . Map ; import org . eclipse . jface . wizard . IWizard ; import org . eclipse . jface . wizard . IWizardPage ; public abstract class AbstractSVSubWizard implements ISVSubWizard { protected IWizard fWizard ; protected Map < String , Object > fOptions ; protected List <
2,222
<s> package com . asakusafw . vocabulary . operator ; import java . lang . annotation . Documented ; import java .
2,223
<s> package com . asakusafw . bulkloader . log ; import java . sql . Timestamp ; import java . text . DateFormat ; import java . text . MessageFormat ; import java . text . SimpleDateFormat ; import java . util . ResourceBundle ; import org . apache . log4j . Logger ; import org . apache . log4j . MDC ; import com . asakusafw . bulkloader . exception . BulkLoaderReRunnableException ; import com . asakusafw . bulkloader . exception . BulkLoaderSystemException ; public class Log { private static final ResourceBundle BUNDLE = ResourceBundle . getBundle ( "" ) ; private static final String LOG_MESSAGE_ID_NULL_STR = "-" ; private final Logger internal ; public Log ( Class < ? > base ) { if ( base == null ) { throw new IllegalArgumentException ( "" ) ; } this . internal = Logger . getLogger ( base ) ; } public void debugMessage ( String format , Object ... arguments ) { if ( internal . isDebugEnabled ( ) ) { setMessageCode ( "DEBUG" ) ; internal . debug ( MessageFormat . format ( format , arguments ) ) ; clearMessageCode ( ) ; } } public void info ( String code , Object ... arguments ) { if ( internal . isInfoEnabled ( ) ) { String message = message ( code , arguments ) ; setMessageCode ( code ) ; internal . info ( message ) ; clearMessageCode ( ) ; } } public void info ( Throwable exception , String code , Object ... arguments ) { if ( internal . isInfoEnabled ( ) ) { String message = message ( code , arguments ) ; setMessageCode ( code ) ; internal . info ( message , exception ) ; clearMessageCode ( ) ; } } public void warn ( String code , Object ... arguments ) { String message = message ( code , arguments ) ; setMessageCode ( code ) ; internal . warn ( message ) ; clearMessageCode ( ) ; } public void warn ( Throwable exception , String code , Object ... arguments ) { String message = message ( code , arguments ) ; setMessageCode
2,224
<s> package com . asakusafw . bulkloader . cache ; import java . io . IOException ; import java . net . URI ; import java . text . MessageFormat ; import java . util . Arrays ; import java . util . List ; import org . apache . commons . io . IOUtils ; import org . apache . hadoop . conf . Configuration ; import org . apache . hadoop . conf . Configured ; import org . apache . hadoop . util . Tool ; import com . asakusafw . bulkloader . collector . SystemOutManager ; import com . asakusafw . bulkloader . common . BulkLoaderInitializer ; import com . asakusafw . bulkloader . common . Constants ; import com . asakusafw . bulkloader . common . FileNameUtil ; import com . asakusafw . bulkloader . exception . BulkLoaderSystemException ; import com . asakusafw . bulkloader . log . Log ; import com . asakusafw . bulkloader . transfer . FileList ; import com . asakusafw . bulkloader . transfer . FileProtocol ; import com . asakusafw . runtime . core . context . RuntimeContext ; import com . asakusafw . thundergate . runtime . cache . CacheInfo ; import com . asakusafw . thundergate . runtime . cache . CacheStorage ; public class GetCacheInfoRemote extends Configured implements Tool { static final Log LOG = new Log ( GetCacheInfoRemote . class ) ; private static final List < String > PROPERTIES = Constants . PROPERTIES_HC ; String targetName ; String batchId ; String flowId ; String executionId ; String userName ; public static void main ( String [ ] args ) throws Exception { SystemOutManager . changeSystemOutToSystemErr ( ) ; RuntimeContext . set ( RuntimeContext . DEFAULT . apply ( System . getenv ( ) ) ) ; GetCacheInfoRemote service = new GetCacheInfoRemote ( ) ; service . setConf ( new Configuration ( ) ) ; int exitCode = service . run ( args ) ; System . exit ( exitCode ) ; } @ Override public int run ( String [ ] args ) throws Exception { initialize ( args ) ; LOG . info ( "" , targetName , batchId , flowId , executionId , userName ) ; FileList . Reader in =
2,225
<s> package net . ggtools . grand . ui . menu ; import net . ggtools . grand . ui . actions . OpenFileAction ; import net . ggtools . grand . ui . actions . PageSetupAction ; import net . ggtools . grand . ui . actions . PreferenceAction ; import net . ggtools . grand . ui . actions . PrintAction ; import net . ggtools . grand . ui . actions . QuickOpenFileAction ; import net . ggtools . grand . ui . actions . QuitAction ;
2,226
<s> package org . oddjob . scheduling ; import java . util . Date ; import org . oddjob . Resetable ; import org . oddjob . arooa . life . ComponentPersistException ; import org . oddjob . jobs . GrabJob ; import org . oddjob . persist . ArchiveJob ; import org . oddjob . schedules . Interval ; import org . oddjob . schedules . IntervalTo ; import org . oddjob . schedules . schedules . BrokenSchedule ; import org . oddjob . schedules . schedules . CountSchedule ; import org . oddjob . schedules . schedules . DailySchedule ; import org . oddjob . schedules . schedules . DateSchedule ; import org . oddjob . schedules . schedules . DayAfterSchedule ; import org . oddjob . schedules . schedules . DayBeforeSchedule ; import org . oddjob . schedules . schedules . IntervalSchedule ; import org . oddjob . schedules . schedules . MonthlySchedule ; import org . oddjob . schedules . schedules . TimeSchedule ; import org . oddjob . schedules . schedules . WeeklySchedule ; import org . oddjob . schedules . schedules . YearlySchedule ; import org . oddjob . state . CompleteOrNotOp ; import org . oddjob . state . State ; import org . oddjob . state . StateOperator ; public class Timer extends TimerBase { private static final long serialVersionUID = 2009091420120126L ; private boolean haltOnFailure ; private boolean skipMissedRuns ; @ Override protected StateOperator getStateOp ( ) { return new CompleteOrNotOp ( ) ; } @ Override protected void begin ( ) throws ComponentPersistException { super . begin ( ) ; Date currentTime = getClock ( ) . getDate ( ) ; Interval
2,227
<s> package test . modelgen . table . io ; import java . io . IOException ; import javax . annotation . Generated ; import test . modelgen . table . model . PurchaseTranError2 ; import com . asakusafw . runtime . io . ModelOutput ; import com . asakusafw . runtime . io . RecordEmitter ; @ Generated ( "" ) @ SuppressWarnings ( "deprecation" ) public final class PurchaseTranError2ModelOutput implements ModelOutput < PurchaseTranError2 > { private final RecordEmitter emitter ; public PurchaseTranError2ModelOutput ( RecordEmitter emitter ) { if ( emitter == null ) { throw new IllegalArgumentException ( ) ; } this . emitter = emitter ; } @ Override public void write ( PurchaseTranError2 model ) throws IOException { emitter . emit ( model . getSidOption ( ) ) ; emitter . emit ( model . getVersionNoOption ( ) ) ; emitter . emit ( model . getRgstDatetimeOption ( ) ) ; emitter . emit ( model . getUpdtDatetimeOption ( ) ) ; emitter . emit ( model . getPurchaseNoOption ( ) ) ; emitter . emit ( model . getPurchaseTypeOption
2,228
<s> package com . asakusafw . compiler . flow . testing . external ; import java . util . Collections ; import java . util . Set ; import com . asakusafw . compiler . flow . testing . model . Part1 ; import com . asakusafw . compiler . testing . TemporaryInputDescription ; public class Part1MockImporterDescription extends TemporaryInputDescription { @ Override public Class < ? > getModelType ( ) { return Part1 . class ; } @ Override public Set < String >
2,229
<s> package org . rubypeople . rdt . refactoring . tests . core . nodewrapper ; import junit . framework . TestCase ; import org . jruby . ast . ArgsNode ; import org . jruby . ast . ArgumentNode ; import org . jruby . ast . ArrayNode ; import org . jruby . ast . DefnNode ; import org . jruby . ast . NewlineNode ; import org . jruby . ast . RootNode ; import org . jruby . lexer . yacc . IDESourcePosition ; import org . jruby . lexer . yacc . ISourcePosition ; import org . jruby . parser . LocalStaticScope ; import org . rubypeople . rdt . refactoring . documentprovider . StringDocumentProvider ; import org . rubypeople . rdt . refactoring . nodewrapper . ClassNodeWrapper ; import org . rubypeople . rdt . refactoring . nodewrapper . MethodNodeWrapper ; import org . rubypeople . rdt . refactoring . nodewrapper . RealClassNodeWrapper ; public class TC_MethodNodeWrapper extends TestCase { private static final ISourcePosition EMPTY_POSITION = new IDESourcePosition ( ) ; ClassNodeWrapper klass ; public void setUp ( ) { RootNode rootNode = new StringDocumentProvider ( "" , "" ) . getRootNode ( "" ) ; klass = new ClassNodeWrapper ( new RealClassNodeWrapper ( ( ( NewlineNode ) rootNode . getBodyNode ( ) ) . getNextNode ( ) ) ) ; } private MethodNodeWrapper createReaderMethod ( String name ) { MethodNodeWrapper wrapper = new MethodNodeWrapper ( new DefnNode ( EMPTY_POSITION , new ArgumentNode ( EMPTY_POSITION , name ) , new ArgsNode ( EMPTY_POSITION , null , null , null , null , null ) , new LocalStaticScope ( null ) , null ) , klass ) ; return wrapper ; } private MethodNodeWrapper createWriterMethod ( String name ) { MethodNodeWrapper wrapper = new MethodNodeWrapper ( new DefnNode ( EMPTY_POSITION , new ArgumentNode ( EMPTY_POSITION , name ) , new ArgsNode ( EMPTY_POSITION , new ArrayNode ( EMPTY_POSITION , new ArgumentNode ( EMPTY_POSITION , "value" ) ) , null , null , null , null ) , new LocalStaticScope ( null ) , null ) , klass ) ; return wrapper ; } private MethodNodeWrapper createInvalidWriterMethod ( String name ) { MethodNodeWrapper wrapper = new MethodNodeWrapper ( new DefnNode ( EMPTY_POSITION , new ArgumentNode ( EMPTY_POSITION , name ) , new ArgsNode ( EMPTY_POSITION , new ArrayNode ( EMPTY_POSITION
2,230
<s> package org . oddjob . tools . includes ; import java . io . File ; import java . io . FileInputStream ; import java . io . IOException ; import java . io . InputStream ; import junit . framework . TestCase ; import org . oddjob . OurDirs ; public class SnippetFilterTest extends TestCase { public void testFilter ( ) throws IOException { OurDirs dirs = new OurDirs ( ) ; File file = new File ( dirs . base (
2,231
<s> package org . rubypeople . rdt . internal . ui . search ; import java . util . Arrays ; import java . util . HashSet ; import java . util . Iterator ; import java . util . Set ; import org . eclipse . core . runtime . IStatus ; import org . eclipse . core . runtime . Platform ; import org . eclipse . jface . dialogs . IDialogSettings ; import org . eclipse . jface . operation . IRunnableContext ; import org . eclipse . search . ui . ISearchQuery ; import org . eclipse . search . ui . NewSearchUI ; import org . eclipse . ui . IWorkingSet ; import org . eclipse . ui . PlatformUI ; import org . osgi . framework . Bundle ; import org . rubypeople . rdt . core . IRubyElement ; import org . rubypeople . rdt . core . IRubyScript ; import org . rubypeople . rdt . internal . core . util . Messages ; import org . rubypeople . rdt . internal . ui . RubyPlugin ; public class SearchUtil { public static final int LRU_WORKINGSET_LIST_SIZE = 3 ; private static LRUWorkingSetsList fgLRUWorkingSets ; private static final String DIALOG_SETTINGS_KEY = "" ; private static final String STORE_LRU_WORKING_SET_NAMES
2,232
<s> package com . asakusafw . dmdl . spi ; import com . asakusafw . dmdl . Diagnostic ; import com . asakusafw . dmdl . Diagnostic . Level ; import com . asakusafw . dmdl . model . AstAttribute ; import com . asakusafw . dmdl . semantics . Declaration ; import com . asakusafw . dmdl . semantics . DmdlSemantics ; import com . asakusafw . dmdl . semantics . PropertyDeclaration ; public abstract class PropertyAttributeDriver extends AttributeDriver { @ Override public final void process ( DmdlSemantics environment , Declaration declaration , AstAttribute attribute ) { assert attribute . name . toString ( ) . equals ( getTargetName ( ) ) ; if ( ( declaration instanceof PropertyDeclaration ) == false )
2,233
<s> package org . rubypeople . eclipse . testutils ; import org . eclipse . core . resources . IProject ; import org . eclipse . core . resources . IProjectDescription ; import org . eclipse . core . resources . IWorkspace ; import org . eclipse . core . resources . IWorkspaceRoot ; import org . eclipse . core . resources . ResourcesPlugin ; import org . eclipse . core . runtime . CoreException ; public class ResourceTools { public static IProject createProject ( String name ) throws CoreException { IWorkspace workspace = ResourcesPlugin . getWorkspace ( ) ; IWorkspaceRoot root = workspace . getRoot ( ) ; IProject project = root . getProject ( name ) ; if ( ! project . exists ( ) ) { IProjectDescription desc = workspace . newProjectDescription
2,234
<s> package net . sf . sveditor . core . tests . preproc ; import junit . framework . Test ; import junit . framework . TestCase ; import junit . framework . TestSuite ; public class PreProcTests extends TestCase { public static Test suite ( ) { TestSuite suite = new TestSuite ( "PreProcTests" ) ; suite
2,235
<s> package com . pogofish . jadt . comments ; import java . io . Reader ; import com . pogofish . jadt . ast . JavaComment ; import com . pogofish . jadt . comments . javacc . generated . BlockCommentParserImpl ; import com . pogofish . jadt . parser . javacc . JavaCCReader ; import com .
2,236
<s> package com . asakusafw . windgate . hadoopfs . ssh ; import java . io . Closeable ; import java . io . IOException ; import java . io . InputStream ; import java . io . OutputStream ; import java . text . MessageFormat ; import java . util . Arrays ; import java . util . zip . ZipEntry ; import java . util . zip . ZipInputStream ; import java . util . zip . ZipOutputStream ; import org . apache . hadoop . fs . FileStatus ; import org . apache . hadoop . fs . Path ; import org . apache . hadoop . io . DataInputBuffer ; import org . apache . hadoop . io . DataOutputBuffer ; import org . slf4j . Logger ; import org . slf4j . LoggerFactory ; import com . asakusafw . windgate . core . WindGateLogger ; import com . asakusafw . windgate . hadoopfs . HadoopFsLogger ; public final class FileList { static final WindGateLogger WGLOG = new HadoopFsLogger ( FileList . class ) ; static final Logger LOG = LoggerFactory . getLogger ( FileList . class ) ; static final String FIRST_ENTRY_NAME = "" ; static final String LAST_ENTRY_NAME = "" ; public static FileStatus createFileStatus ( Path path ) { if ( path == null ) { throw new IllegalArgumentException ( "" ) ; } return new FileStatus ( 0 , false , 0 , 0 , 0 , 0 , null , null , null , path ) ; } public static FileList . Reader createReader ( InputStream input ) throws IOException { if ( input == null ) { throw new IllegalArgumentException ( "" ) ; } LOG . debug ( "" ) ; return new Reader ( input ) ; } public static FileList . Writer createWriter ( OutputStream output ) throws IOException { if ( output == null ) { throw new IllegalArgumentException ( "" ) ; } LOG . debug ( "" ) ; return new Writer ( output ) ; } private FileList ( ) { return ; } public static class Reader implements Closeable { private final InputStream original ; private final ZipInputStream input ; private final FileStatus current = new FileStatus ( ) ; private final DataInputBuffer buffer = new DataInputBuffer ( ) ; private boolean sawNext ; private boolean sawEof ; Reader ( InputStream input ) throws IOException { assert input != null ; this . original = input ; this . input = new ZipInputStream ( input ) ; ZipEntry first = this . input . getNextEntry ( ) ; if ( first == null || first . getName ( ) . equals ( FIRST_ENTRY_NAME ) == false ) { throw new IOException ( "" ) ; } } public boolean next ( ) throws IOException { while ( sawEof == false ) { ZipEntry entry = input . getNextEntry ( ) ; if ( entry == null ) { throw new IOException ( "" ) ; } LOG . debug ( "" , entry . getName ( ) ) ; if ( entry . getName ( ) . equals ( LAST_ENTRY_NAME ) ) { sawEof = true ; sawNext = false ; consume ( ) ; return false ; } if ( entry . isDirectory ( ) ) { continue ; } LOG . debug ( "opening {}" , entry . getName ( ) ) ; if ( restoreExtra ( entry ) == false ) { throw new IOException ( MessageFormat . format ( "" , entry . getName ( ) ) ) ; } sawNext = true ; return true ; } return false ; } private void consume ( ) throws IOException { byte [ ] buf = new byte [ 1024 ] ; int rest = 0 ; while ( true ) { int read = original . read ( buf ) ; if ( read < 0 ) { break ; } rest += read ; } LOG . debug ( "" , rest ) ; } private boolean restoreExtra ( ZipEntry
2,237
<s> package com . asakusafw . compiler . flow . plan ; import java . text . MessageFormat ; import java . util . List ; import java . util . Set ; import com . asakusafw . compiler . common . Precondition ; import com . asakusafw . utils . collections . Lists ; import com . asakusafw . utils . collections . Sets ; import com . asakusafw . vocabulary . flow . graph . FlowElement ; import com . asakusafw . vocabulary . flow . graph . FlowElementInput ; import com . asakusafw . vocabulary . flow . graph . FlowElementOutput ; import com . asakusafw . vocabulary . flow . graph . FlowGraph ; import com . asakusafw . vocabulary . flow . graph . PortConnection ; public class FlowPath { private final Direction direction ; private final Set < FlowElement > startings ; private final Set < FlowElement > passings ; private final Set < FlowElement > arrivals ; public FlowPath ( Direction direction , Set < FlowElement > startings , Set < FlowElement > passings , Set < FlowElement > arrivals ) { Precondition . checkMustNotBeNull ( direction , "direction" ) ; Precondition . checkMustNotBeNull ( startings , "startings" ) ; Precondition . checkMustNotBeNull ( passings , "passings" ) ; Precondition . checkMustNotBeNull ( arrivals , "arrivals" ) ; this . direction = direction ; this . startings = Sets . freeze ( startings ) ; this . passings = Sets . freeze ( passings ) ; this . arrivals = Sets . freeze ( arrivals ) ; } public Direction getDirection ( ) { return this . direction ; } public Set < FlowElement > getStartings ( ) { return this . startings ; } public Set < FlowElement > getPassings ( ) { return this . passings ; } public Set < FlowElement > getArrivals ( ) { return this . arrivals ; } public FlowBlock createBlock ( FlowGraph graph , int blockSequence , boolean includeStartings , boolean includeArrivals ) { Precondition . checkMustNotBeNull ( graph , "graph" ) ; if ( direction != Direction . FORWARD ) { throw new IllegalStateException ( "" ) ; } if ( includeStartings == false && includeArrivals == false && passings . isEmpty ( ) ) { throw new IllegalArgumentException ( ) ; } Set < FlowElement > elements = createBlockElements ( includeStartings , includeArrivals ) ; List < PortConnection > inputs = createBlockInputs ( includeStartings ) ; List < PortConnection > outputs = createBlockOutputs ( includeArrivals ) ; return new FlowBlock ( blockSequence , graph , inputs , outputs , elements ) ; } private List < PortConnection > createBlockInputs ( boolean includeStartings ) { List < PortConnection > results = Lists . create ( ) ; if ( includeStartings ) { for ( FlowElement element : startings ) { for ( FlowElementInput input : element . getInputPorts ( ) ) { results . addAll ( input . getConnected ( ) ) ; } } } else { for ( FlowElement element : startings ) { for ( FlowElementOutput output : element . getOutputPorts ( ) ) { for ( PortConnection conn : output . getConnected ( ) ) { FlowElement target = conn . getDownstream ( ) . getOwner ( ) ; if ( passings . contains ( target ) || arrivals . contains ( target ) ) { results . add ( conn ) ; } } } } } return results ; } private List < PortConnection > createBlockOutputs ( boolean includeArrivals ) { List <
2,238
<s> package com . asakusafw . yaess . core ; import java . io . Closeable ; import java . io . IOException ; import java . io . OutputStream ; public interface ExecutionMonitor extends Closeable { ExecutionMonitor NULL = new ExecutionMonitor ( ) { @ Override public void progressed ( double deltaSize ) { return ; } @ Override public void setProgress ( double workedSize ) throws IOException { return ; } @ Override public void open ( double taskSize ) { return ; } @ Override public void checkCancelled ( ) throws InterruptedException { if ( Thread . interrupted ( ) ) { throw new InterruptedException ( ) ; } } @ Override public OutputStream getOutput ( ) throws IOException { return
2,239
<s> package com . asakusafw . utils . java . internal . model . syntax ; import com . asakusafw . utils . java . model . syntax . ModelKind ; import com . asakusafw . utils . java . model . syntax . QualifiedType ; import com . asakusafw . utils . java . model . syntax . SimpleName ; import com . asakusafw . utils . java . model . syntax . Type ; import com . asakusafw . utils . java . model . syntax . Visitor ; public final class QualifiedTypeImpl extends ModelRoot implements QualifiedType { private Type qualifier ; private SimpleName simpleName ; @ Override public Type getQualifier
2,240
<s> package org . rubypeople . rdt . refactoring . ui . pages . inlinemethod ; import org . eclipse . osgi . util . NLS ; public class Messages extends NLS { private static final String BUNDLE_NAME = "" ; public static String TargetClassFinderUI_ChooseType ;
2,241
<s> package org . oddjob . jmx . handlers ; import java . util . ArrayList ; import java . util . HashMap ; import java . util . List ; import java . util . Map ; import javax . management . MBeanException ; import javax . management . MalformedObjectNameException ; import javax . management . Notification ; import javax . management . NotificationListener ; import javax . management . ObjectName ; import javax . management . ReflectionException ; import junit . framework . TestCase ; import org . oddjob . Structural ; import org . oddjob . arooa . registry . MockBeanRegistry ; import org . oddjob . jmx . RemoteOperation ; import org . oddjob . jmx . client . ClientInterfaceHandlerFactory ; import org . oddjob . jmx . client . ClientSession ; import org . oddjob . jmx . client . MockClientSession ; import org . oddjob . jmx . client . MockClientSideToolkit ; import org . oddjob . jmx . server . MockServerContext ; import org . oddjob . jmx . server . MockServerSession ; import org . oddjob . jmx . server . MockServerSideToolkit ; import org . oddjob . jmx . server . ServerContext ; import org . oddjob . jmx . server . ServerInterfaceHandler ; import org . oddjob . jmx . server . ServerLoopBackException ; import org . oddjob . jmx . server . ServerSession ; import org . oddjob . structural . ChildHelper ; import org . oddjob . structural . StructuralEvent ; import org . oddjob . structural . StructuralListener ; public class StructuralHandlerFactoryTest extends TestCase { int unique ; class OurHierarchicalRegistry extends MockBeanRegistry { @ Override public String getIdFor ( Object component ) { assertNotNull ( component ) ; return "x" + unique ++ ; } } class OurServerSideToolkit extends MockServerSideToolkit { List < Notification > notifications = new ArrayList < Notification > ( ) ; Map < ObjectName , Object > children = new HashMap < ObjectName , Object > ( ) ; String name = "x" ; int seq = 0 ; @ Override public void sendNotification ( Notification notification ) { notifications . add ( notification ) ; } @ Override public void runSynchronized ( Runnable runnable ) { runnable . run ( ) ; } @ Override public ServerSession getServerSession ( ) { return new MockServerSession ( ) { @ Override public ObjectName createMBeanFor ( Object child , ServerContext childContext ) { try { ObjectName on = new ObjectName ( "test:name=" + name ) ; children
2,242
<s> package org . rubypeople . rdt . internal . ui . filters ; import org . eclipse . core . resources . IProject ; import org . eclipse . core . resources . IResource ; import org . eclipse . core . resources . IStorage ; import org . eclipse . jface . viewers . Viewer ; import org
2,243
<s> package net . sf . sveditor . ui . editor . actions ; import java . util . LinkedList ; import java . util . List ; import java . util . ResourceBundle ; import net . sf . sveditor . ui . editor . SVDocumentPartitions ; import net . sf . sveditor . ui . editor . SVEditor ; import org . eclipse . core . runtime . Assert ; import org . eclipse . jface . text . BadLocationException ; import org . eclipse . jface . text . BadPartitioningException ; import org . eclipse . jface . text . IDocument ; import org . eclipse . jface . text . IDocumentExtension3 ; import org . eclipse . jface . text . ITextSelection ; import org . eclipse . jface . text . ITypedRegion ; public class AddBlockCommentAction extends BlockCommentAction { public AddBlockCommentAction ( ResourceBundle bundle , String prefix , SVEditor editor ) { super ( bundle , prefix , editor ) ; } protected void runInternal ( ITextSelection selection , IDocumentExtension3 docExtension , Edit . EditFactory factory ) throws BadLocationException , BadPartitioningException { int selectionOffset = selection . getOffset ( ) ; int selectionEndOffset = selectionOffset + selection . getLength ( ) ; List < Edit > edits = new LinkedList < Edit > ( ) ; ITypedRegion partition = docExtension . getPartition ( SVDocumentPartitions . SV_PARTITIONING , selectionOffset , false ) ; handleFirstPartition ( partition , edits , factory , selectionOffset ) ; while ( partition . getOffset ( ) + partition . getLength ( ) < selectionEndOffset ) { partition = handleInteriorPartition ( partition , edits , factory , docExtension ) ; } handleLastPartition ( partition , edits , factory , selectionEndOffset ) ; executeEdits ( edits ) ; } private void handleFirstPartition ( ITypedRegion partition , List < Edit > edits , Edit . EditFactory factory , int offset ) throws BadLocationException { int partOffset = partition . getOffset ( ) ; String partType = partition . getType ( ) ; Assert . isTrue ( partOffset <= offset , "" ) ; if ( partType == IDocument . DEFAULT_CONTENT_TYPE ) { edits . add ( factory . createEdit ( offset , 0 , getCommentStart ( ) ) ) ; } else if ( isSpecialPartition ( partType ) ) { edits . add ( factory . createEdit ( partOffset , 0 , getCommentStart ( ) ) ) ; } } private ITypedRegion handleInteriorPartition ( ITypedRegion partition , List < Edit > edits , Edit . EditFactory factory , IDocumentExtension3 docExtension ) throws BadPartitioningException , BadLocationException { String partType = partition . getType ( ) ; int partEndOffset = partition . getOffset ( ) + partition . getLength ( ) ; int tokenLength = getCommentStart ( ) . length ( ) ; if ( partType == SVDocumentPartitions . SV_MULTILINE_COMMENT ) { edits . add ( factory . createEdit ( partEndOffset - tokenLength , tokenLength , "" ) ) ; } partition = docExtension . getPartition ( SVDocumentPartitions . SV_PARTITIONING , partEndOffset , false ) ; partType = partition . getType ( ) ; if ( partType == SVDocumentPartitions . SV_MULTILINE_COMMENT ) { edits . add ( factory . createEdit ( partition . getOffset ( ) , getCommentStart ( ) . length ( ) , "" ) ) ; } return partition ; } private void handleLastPartition ( ITypedRegion partition , List < Edit > edits , Edit
2,244
<s> package com . sun . tools . hat . internal . model ; public class ReferenceChain { private final JavaHeapObject obj ; private final ReferenceChain next ; public ReferenceChain ( JavaHeapObject obj , ReferenceChain next ) { this . obj = obj ; this
2,245
<s> package org . rubypeople . rdt . internal . ui . typehierarchy ; import org . eclipse . jface . action . Action ; import org . eclipse . swt . custom . BusyIndicator ; import org . eclipse . ui . PlatformUI ; import org . rubypeople . rdt . internal . ui . IRubyHelpContextIds ; import org . rubypeople . rdt . internal . ui . RubyPluginImages ; public class ShowInheritedMembersAction extends Action { private MethodsViewer fMethodsViewer ; public ShowInheritedMembersAction ( MethodsViewer viewer , boolean initValue ) { super ( TypeHierarchyMessages . ShowInheritedMembersAction_label ) ; setDescription ( TypeHierarchyMessages . ShowInheritedMembersAction_description ) ; setToolTipText ( TypeHierarchyMessages . ShowInheritedMembersAction_tooltip ) ; RubyPluginImages . setLocalImageDescriptors ( this , "inher_co.gif" ) ; fMethodsViewer = viewer ; PlatformUI . getWorkbench ( ) . getHelpSystem ( ) . setHelp ( this , IRubyHelpContextIds . SHOW_INHERITED_ACTION ) ; setChecked ( initValue ) ; } public void run (
2,246
<s> package com . asakusafw . utils . java . internal . model . syntax ; import com . asakusafw . utils . java . model . syntax . CastExpression ; import com . asakusafw . utils . java . model . syntax . Expression ; import com . asakusafw . utils . java . model . syntax . ModelKind ; import com . asakusafw . utils . java . model . syntax . Type ; import com . asakusafw . utils . java . model . syntax . Visitor ; public final class CastExpressionImpl extends ModelRoot implements CastExpression { private Type type ; private Expression expression ; @ Override public Type getType ( ) { return this . type ; } public void setType ( Type type ) { Util . notNull ( type , "type" ) ; this . type = type ; } @ Override public Expression getExpression ( ) { return this . expression ; } public void setExpression ( Expression expression ) { Util . notNull ( expression
2,247
<s> package test . modelgen . table . model ; import java . io . DataInput ; import java . io . DataOutput ; import java . io . IOException ; import javax . annotation . Generated ; import org . apache . hadoop . io . Text ; import org . apache . hadoop . io . Writable ; import com . asakusafw . runtime . value . DateTime ; import com . asakusafw . runtime . value . DateTimeOption ; import com . asakusafw . runtime . value . IntOption ; import com . asakusafw . runtime . value . LongOption ; import com . asakusafw . runtime . value . StringOption ; import com . asakusafw . vocabulary . model . DataModel ; import com . asakusafw . vocabulary . model . Property ; import com . asakusafw . vocabulary . model . TableModel ; @ Generated ( "" ) @ DataModel @ TableModel ( name = "" , columns = { "SID" , "VERSION_NO" , "TEXTDATA1" , "INTDATA1" , "DATEDATA1" , "RGST_DATE" , "UPDT_DATE" , "ERROR_CODE" } , primary = { } ) @ SuppressWarnings ( "deprecation" ) public class ImportTarget1Error implements Writable { @ Property ( name = "SID" ) private LongOption sid = new LongOption ( ) ; @ Property ( name = "VERSION_NO" ) private LongOption versionNo = new LongOption ( ) ; @ Property ( name = "TEXTDATA1" ) private StringOption textdata1 = new StringOption ( ) ; @ Property ( name = "INTDATA1" ) private IntOption intdata1 = new IntOption ( ) ; @ Property ( name = "DATEDATA1" ) private DateTimeOption datedata1 = new DateTimeOption ( ) ; @ Property ( name = "RGST_DATE" ) private DateTimeOption rgstDate = new DateTimeOption ( ) ; @ Property ( name = "UPDT_DATE" ) private DateTimeOption updtDate = new DateTimeOption ( ) ; @ Property ( name = "ERROR_CODE" ) private StringOption errorCode = new StringOption ( ) ; public long getSid ( ) { return this . sid . get ( ) ; } public void setSid ( long sid ) { this . sid . modify ( sid ) ; } public LongOption getSidOption ( ) { return this . sid ; } public void setSidOption ( LongOption sid ) { this . sid . copyFrom ( sid ) ; } public long getVersionNo ( ) { return this . versionNo . get ( ) ; } public void setVersionNo ( long versionNo ) { this . versionNo . modify ( versionNo ) ; } public LongOption getVersionNoOption ( ) { return this . versionNo ; } public void setVersionNoOption ( LongOption versionNo ) { this . versionNo . copyFrom ( versionNo ) ; } public Text getTextdata1 ( ) { return this . textdata1 . get
2,248
<s> package org . rubypeople . rdt . core ; import org . eclipse . core . resources . IResourceDelta ; import org . jruby . ast . Node ; public interface IRubyElementDelta { public int ADDED = 1 ; public int REMOVED = 2 ; public int CHANGED = 4 ; public int F_CONTENT = 0x000001 ; public int F_MODIFIERS = 0x000002 ; public int F_CHILDREN = 0x000008 ; public int F_MOVED_FROM = 0x000010 ; public int F_MOVED_TO = 0x000020 ; public int F_ADDED_TO_CLASSPATH = 0x000040 ; public int F_REMOVED_FROM_CLASSPATH = 0x000080 ; public int F_CLASSPATH_REORDER = 0x000100 ; public int F_REORDER = 0x000100 ; public int F_OPENED = 0x000200 ; public int F_CLOSED = 0x000400 ; public int F_SUPER_TYPES = 0x000800 ; public int
2,249
<s> package com . asakusafw . bulkloader . common ; import java . util . ArrayList ; import java . util . Arrays ; import java . util . List ; import org . apache . hadoop . io . SequenceFile . CompressionType ; import com . asakusafw . runtime . util . VariableTable ; import com . asakusafw . runtime . util . VariableTable . RedefineStrategy ; public final class Constants { public static final String ASAKUSA_HOME = "ASAKUSA_HOME" ; public static final String THUNDER_GATE_HOME = "" ; public static final String ENV_ARGS = "" ; public static final int EXIT_CODE_SUCCESS = 0 ; public static final int EXIT_CODE_ERROR = 1 ; public static final int EXIT_CODE_WARNING = 2 ; public static final int EXIT_CODE_RETRYABLE = 3 ; public static final List < String > PROPERTIES_DB = Arrays . asList ( new String [ ] { "" } ) ; public static final List < String > PROPERTIES_HC = Arrays . asList ( new String [ ] { "" } ) ; public static final String PROP_KEY_LOG_CONF_PATH = "" ; @ Deprecated public static final String PROP_KEY_HDFS_PROTCOL_HOST = "" ; public static final String PROP_PREFIX_HC_ENV = "" ; public static final String PROP_KEY_BASE_PATH = "base-path" ; public static final String PROP_KEY_SSH_PATH = "ssh.path" ; public static final String PROP_KEY_NAMENODE_HOST = "" ; public static final String PROP_KEY_NAMENODE_USER = "" ; public static final String PROP_KEY_IMP_FILE_DIR = "" ; @ Deprecated public static final String PROP_KEY_EXT_SHELL_NAME = "" ; @ Deprecated public static final String PROP_KEY_CACHE_INFO_SHELL_NAME = "" ; @ Deprecated public static final String PROP_KEY_DELETE_CACHE_SHELL_NAME = "" ; public static final String PROP_KEY_IMP_FILE_COMP_TYPE = "" ; public static final String PROP_KEY_IMP_FILE_COMP_BUFSIZE = "" ; public static final String PROP_KEY_IMP_RETRY_COUNT = "" ; public static final String PROP_KEY_IMP_RETRY_INTERVAL = "" ; public static final String PROP_KEY_EXP_FILE_DIR = "" ; @ Deprecated public static final String PROP_KEY_COL_SHELL_NAME = "" ; public static final String PROP_KEY_EXP_FILE_COMP_BUFSIZE = "" ; public static final String PROP_KEY_EXP_RETRY_COUNT = "" ; public static final String PROP_KEY_EXP_RETRY_INTERVAL = "" ; public static final String PROP_KEY_EXP_COPY_MAX_RECORD = "" ; public static final String PROP_KEY_SYS_COLUMN_SID = "" ; public static final String PROP_KEY_SYS_COLUMN_VERSION_NO = "" ; public static final String PROP_KEY_SYS_COLUMN_RGST_DATE = "" ; public static final String PROP_KEY_SYS_COLUMN_UPDT_DATE = "" ; public static final String PROP_KEY_SYS_COLUMN_TEMP_SID = "" ; public static final String PROP_KEY_IMPORT_TSV_DELETE = "" ; public static final String PROP_KEY_EXPORT_TSV_DELETE = "" ; public static final String PROP_KEY_JDBC_DRIVER = "jdbc.driver" ; public static final String PROP_KEY_DB_URL = "jdbc.url" ; public static final String PROP_KEY_DB_USER = "jdbc.user" ; public static final String PROP_KEY_DB_PASSWORD = "" ; public static final String PROP_KEY_NAME_DB_PRAM = "" ; public static final String PROP_KEY_IMP_SEQ_FILE_COMP_TYPE = "" ; @ Deprecated public static final String PROP_KEY_CACHE_BUILDER_SHELL_NAME = "" ; public static final String PROP_KEY_CACHE_BUILDER_PARALLEL = "" ; public static final String PROP_KEY_EXP_FILE_COMP_TYPE = "" ; public static final String PROP_KEY_EXP_LOAD_MAX_SIZE = "" ; @ Deprecated public static final String PROP_KEY_WORKINGDIR_USE = "" ; public static final String PROP_DEFAULT_LOG_CONF_PATH = "" ; public static final String PROP_DEFAULT_IMP_FILE_COMP_TYPE = FileCompType . STORED . getSymbol ( ) ; public static final String PROP_DEFAULT_IMP_FILE_COMP_BUFSIZE = "32768" ; public static final String PROP_DEFAULT_IMP_RETRY_COUNT = "3" ; public static final String PROP_DEFAULT_IMP_RETRY_INTERVAL = "10" ; public static final String PROP_DEFAULT_EXP_FILE_COMP_TYPE = FileCompType . STORED . getSymbol ( ) ; public static final String PROP_DEFAULT_EXP_FILE_COMP_BUFSIZE = "32768" ; public static final String PROP_DEFAULT_EXP_RETRY_COUNT = "3" ; public static final String PROP_DEFAULT_EXP_RETRY_INTERVAL = "10" ; public static final String PROP_DEFAULT_EXP_LOAD_MAX_SIZE = "16777216" ; public static final String PROP_DEFAULT_EXP_COPY_MAX_RECORD = "100000" ; public static final String PROP_DEFAULT_WORKINGDIR_USE = "false" ; public
2,250
<s> package org . oddjob . designer . components ; import java . io . Serializable ; import org . oddjob . arooa . design . DesignComponentBase ; import org . oddjob . arooa . design . DesignFactory ; import org . oddjob . arooa . design . DesignInstance ; import org . oddjob . arooa . design . DesignProperty ; import org . oddjob . arooa . design . SimpleDesignProperty ; import org . oddjob . arooa . design . screem . BorderedGroup ; import org . oddjob . arooa . design . screem . Form ; import org . oddjob . arooa . design . screem . StandardForm ; import org . oddjob . arooa . life . SimpleArooaClass ;
2,251
<s> package com . lmax . disruptor ; public final class Util { public static int ceilingNextPowerOfTwo ( final int x ) { return 1 << ( 32 - Integer . numberOfLeadingZeros ( x - 1 ) ) ; } public static long getMinimumSequence ( final Consumer [ ] consumers ) { long minimum = Long . MAX_VALUE ; for ( Consumer
2,252
<s> package org . rubypeople . rdt . internal . ui . browsing ; import org . eclipse . core . runtime . IAdaptable ; import org . eclipse . debug . ui . IDebugUIConstants ; import org . eclipse . search . ui . NewSearchUI ; import org . eclipse . ui . IPageLayout ; import org . eclipse . ui . IPerspectiveFactory ; import org . eclipse . ui . IPlaceholderFolderLayout ; import org . eclipse . ui . console . IConsoleConstants ; import org . eclipse . ui . progress . IProgressConstants ; import org . rubypeople . rdt . core . IRubyElement ; import org . rubypeople . rdt . ui . PreferenceConstants ; import org . rubypeople . rdt . ui . RubyUI ; public class RubyBrowsingPerspectiveFactory implements IPerspectiveFactory { static IRubyElement fgRubyElementFromAction ; public RubyBrowsingPerspectiveFactory ( ) { super ( ) ; } public void createInitialLayout ( IPageLayout layout ) { if ( stackBrowsingViewsVertically ( ) ) createVerticalLayout ( layout ) ; else createHorizontalLayout ( layout ) ; layout . addActionSet ( IDebugUIConstants . LAUNCH_ACTION_SET ) ; layout . addActionSet ( RubyUI . ID_ACTION_SET ) ; layout . addActionSet ( RubyUI . ID_ELEMENT_CREATION_ACTION_SET ) ; layout . addActionSet ( IPageLayout . ID_NAVIGATE_ACTION_SET ) ; layout . addShowViewShortcut ( RubyUI . ID_PROJECTS_VIEW ) ; layout . addShowViewShortcut ( RubyUI . ID_TYPES_VIEW ) ; layout . addShowViewShortcut ( RubyUI . ID_MEMBERS_VIEW ) ; layout . addShowViewShortcut ( NewSearchUI . SEARCH_VIEW_ID ) ; layout . addShowViewShortcut ( IConsoleConstants . ID_CONSOLE_VIEW ) ; layout . addShowViewShortcut ( IPageLayout . ID_OUTLINE ) ; layout . addShowViewShortcut ( IPageLayout . ID_PROBLEM_VIEW ) ; layout . addShowViewShortcut ( IPageLayout . ID_RES_NAV ) ; layout . addNewWizardShortcut ( "" ) ; layout . addNewWizardShortcut ( "" ) ; layout . addNewWizardShortcut ( "" ) ; layout . addNewWizardShortcut ( "" ) ; layout . addNewWizardShortcut ( "" ) ; } private void createVerticalLayout ( IPageLayout layout ) { String relativePartId = IPageLayout . ID_EDITOR_AREA ; int relativePos = IPageLayout . LEFT ; IPlaceholderFolderLayout placeHolderLeft = layout . createPlaceholderFolder ( "left" , IPageLayout . LEFT , ( float ) 0.25 , IPageLayout . ID_EDITOR_AREA ) ; placeHolderLeft . addPlaceholder ( IPageLayout . ID_OUTLINE ) ; placeHolderLeft . addPlaceholder ( IPageLayout . ID_RES_NAV ) ; if ( shouldShowProjectsView ( ) ) { layout . addView ( RubyUI . ID_PROJECTS_VIEW , IPageLayout
2,253
<s> package com . asakusafw . compiler . batch ; import com . asakusafw . compiler . flow . processor . operator . UpdateFlowFactory ; import com . asakusafw . compiler . flow . processor . operator . UpdateFlowFactory . WithParameter ; import com . asakusafw . compiler . flow . testing . external . Ex1MockExporterDescription ; import com . asakusafw . compiler . flow . testing . external . Ex1MockImporterDescription ; import com . asakusafw . compiler . flow . testing . model . Ex1 ; import com . asakusafw . vocabulary . flow . Export ; import com . asakusafw . vocabulary
2,254
<s> package com . lmax . disruptor ; import java . util . concurrent . atomic . AtomicLong ; public interface ClaimStrategy { long incrementAndGet ( ) ; long incrementAndGet ( int delta ) ; void setSequence ( long sequence ) ; enum Option { MULTI_THREADED { @ Override public ClaimStrategy newInstance ( ) { return new MultiThreadedStrategy ( ) ; } } , SINGLE_THREADED { @ Override public ClaimStrategy newInstance ( ) { return new SingleThreadedStrategy ( ) ; } } ; abstract ClaimStrategy newInstance ( ) ; } static final class MultiThreadedStrategy implements ClaimStrategy { private final AtomicLong sequence = new AtomicLong ( RingBuffer . INITIAL_CURSOR_VALUE ) ; @ Override public long incrementAndGet ( ) { return sequence . incrementAndGet ( ) ; } @ Override public long incrementAndGet ( final int delta ) { return sequence . addAndGet ( delta ) ; } @ Override public void setSequence ( final long
2,255
<s> package net . sf . sveditor . ui ; import java . io . File ; import java . io . FileInputStream ; import java . io . FileOutputStream ; import java . io . IOException ; import java . io . InputStream ; import java . io . OutputStream ; import java . net . URI ; import net . sf . sveditor . core . Tuple ; import org . eclipse . core . resources . IFile ; import org . eclipse . core . resources . IResource ; import org . eclipse . core . runtime . CoreException ; import org . eclipse . core . runtime . NullProgressMonitor ; import org . eclipse . ui . IEditorInput ; import org . eclipse . ui . IFileEditorInput ; import org . eclipse . ui . IURIEditorInput ; public class EditorInputUtils { public static Tuple < File , IFile > getFileLocation ( IEditorInput input ) { File file = null ; IFile ifile = null ; if ( input instanceof IFileEditorInput ) { ifile
2,256
<s> package org . rubypeople . rdt . internal . corext . util ; import java . util . StringTokenizer ; import org . eclipse . jface . util . IPropertyChangeListener ; import org . eclipse . jface . util . PropertyChangeEvent ; import org . rubypeople . rdt . core . IType ; import org . rubypeople . rdt . internal . ui . RubyPlugin ; import org . rubypeople . rdt . internal . ui . util . StringMatcher ; import org . rubypeople . rdt . ui . PreferenceConstants ; public class TypeFilter implements IPropertyChangeListener { public static TypeFilter getDefault ( ) { return RubyPlugin . getDefault ( ) . getTypeFilter ( ) ; } public static boolean isFiltered ( String fullTypeName ) { return getDefault ( ) . filter ( fullTypeName ) ; } public static boolean isFiltered ( char [ ] fullTypeName ) { return getDefault ( ) . filter ( new String ( fullTypeName ) ) ; } public static boolean isFiltered ( char [ ] packageName , char [ ] typeName ) { return getDefault ( ) . filter ( RubyModelUtil . concatenateName ( packageName , typeName ) ) ; } public static boolean isFiltered ( IType type ) { TypeFilter typeFilter = getDefault ( ) ; if ( typeFilter . hasFilters ( ) ) { return typeFilter . filter ( RubyModelUtil . getFullyQualifiedName ( type ) ) ; } return false ; } private StringMatcher [ ] fStringMatchers ; public TypeFilter ( ) { fStringMatchers = null ; PreferenceConstants . getPreferenceStore ( ) . addPropertyChangeListener ( this ) ; } private synchronized StringMatcher [ ] getStringMatchers ( ) { if ( fStringMatchers == null ) { String str = PreferenceConstants . getPreferenceStore ( ) . getString ( PreferenceConstants . TYPEFILTER_ENABLED ) ; StringTokenizer tok = new StringTokenizer ( str , ";" ) ; int nTokens = tok . countTokens ( ) ; fStringMatchers = new StringMatcher [ nTokens ] ;
2,257
<s> package org . rubypeople . rdt . internal . core ; import org . rubypeople . rdt . core . IBuffer ; import org . rubypeople . rdt . core . IRubyScript ; import org . rubypeople . rdt . core . WorkingCopyOwner ; public class DefaultWorkingCopyOwner extends WorkingCopyOwner { public WorkingCopyOwner primaryBufferProvider ; public static
2,258
<s> package org . rubypeople . rdt . internal . ui . packageview ; import org . eclipse . ui . views . framelist . TreeFrame ; import org . eclipse . ui . views . framelist . TreeViewerFrameSource ; class PackagesFrameSource extends TreeViewerFrameSource { private PackageExplorerPart fPackagesExplorer ; PackagesFrameSource ( PackageExplorerPart explorer ) { super ( explorer . getViewer ( ) ) ; fPackagesExplorer = explorer ; }
2,259
<s> package br . com . caelum . vraptor . dash . uristats ; import java . util . Calendar ; import javax . persistence . Entity ; import javax . persistence . GeneratedValue ; import javax . persistence . Id ; import javax . persistence . Lob ; import javax . persistence . Table ; import org . slf4j . Logger ; import org . slf4j . LoggerFactory ; @ Table ( name = "DashUriStat" ) @ Entity ( name = "DashUriStat" ) public class Stat { @ Id @ GeneratedValue private Long id ; @ Lob private final String uri ; @ Lob private final String queryString ; private final String userId ; private final Calendar createdAt ; private final String verb ; private final String resource ; private final String method ; private final long time ; private final String etag ; private final int resultCode ; private final String hadEtag ; private final String cache ; private final long size ; Stat ( ) { this ( "" , "" , "" , 0 , "" , "" , "" , "" , 0 , "unknown" , "" , 0 ) ; } public Stat ( String userId , String uri , String queryString , long time , String verb , String resource , String action , String etag , int resultCode , String hadEtag , String cache , long size ) { this . userId = userId ; this . uri = uri ; this . queryString = queryString ; this . time = time ; this
2,260
<s> package org . rubypeople . rdt . internal . ui . wizards . buildpaths ; import java . util . List ; import org . eclipse . core . runtime . IPath ; import org . eclipse . core . runtime . Path ; import org . eclipse . jface . dialogs . StatusDialog ; import org . eclipse . jface . viewers . DoubleClickEvent ; import org . eclipse . jface . viewers . IDoubleClickListener ; import org . eclipse . jface . viewers . ISelectionChangedListener ; import org . eclipse . jface . viewers . SelectionChangedEvent ; import org . eclipse . jface . window . Window ; import org . eclipse . swt . SWT ; import org . eclipse . swt . events . SelectionEvent ; import org . eclipse . swt . events . SelectionListener ; import org . eclipse . swt . layout . GridData ; import org . eclipse . swt . widgets . Button ; import org . eclipse . swt . widgets . Composite ; import org . eclipse . swt . widgets . Control ; import org . eclipse . swt . widgets . Label ; import org . eclipse . swt . widgets . Shell ; import org . eclipse . swt . widgets . Text ; import org . eclipse . ui . PlatformUI ; import org . rubypeople . rdt . core . RubyCore ; import org . rubypeople . rdt . internal . ui . IRubyHelpContextIds ; import org . rubypeople . rdt . internal . ui . RubyPlugin ; import org . rubypeople . rdt . internal . ui . dialogs . StatusInfo ; import org . rubypeople . rdt . internal . ui . wizards . NewWizardMessages ; import org . rubypeople . rdt . internal . ui . wizards . dialogfields . IStringButtonAdapter ; import org . rubypeople . rdt . internal . ui . wizards . dialogfields . StringButtonDialogField ; public class VariablePathDialogField extends StringButtonDialogField { public static class ChooseVariableDialog extends StatusDialog implements ISelectionChangedListener , IDoubleClickListener { private VariableBlock fVariableBlock ; public ChooseVariableDialog ( Shell parent , String variableSelection ) { super ( parent ) ; int shellStyle = getShellStyle ( ) ; setShellStyle ( shellStyle | SWT . MAX | SWT . RESIZE ) ; setTitle ( NewWizardMessages . VariablePathDialogField_variabledialog_title ) ; fVariableBlock = new VariableBlock ( false , variableSelection ) ; } protected Control createDialogArea ( Composite parent ) { Composite composite = ( Composite ) super . createDialogArea ( parent ) ;
2,261
<s> package org . rubypeople . rdt . internal . core . pmd ; import java . io . File ; import java . io . FilenameFilter ; import org . rubypeople . rdt . internal . core . util . Util ; public class RubyLanguage implements Language { public static class RubyFileOrDirectoryFilter implements FilenameFilter { public boolean accept ( File dir , String filename ) { return Util . isValidRubyScriptName ( filename ) || ( new File ( dir . getAbsolutePath
2,262
<s> package com . asakusafw . compiler . testing . flow ; import com . asakusafw . compiler . flow . testing . external . Ex1MockImporterDescription ; import com . asakusafw . compiler . flow . testing . model . Ex1 ; import com . asakusafw . compiler . flow . testing . operator . ExOperatorFactory ;
2,263
<s> package org . rubypeople . rdt . ui . actions ; import org . eclipse . jface . util . Assert ; import org . eclipse . ui . IWorkbenchSite ; import org . eclipse . ui . PlatformUI ; import org . rubypeople . rdt . core . IRubyElement ; import org . rubypeople . rdt . internal . ui . IRubyHelpContextIds ; import org . rubypeople . rdt . internal . ui . rubyeditor . RubyEditor ; public class WorkingSetFindAction extends FindAction { private FindAction fAction ; public WorkingSetFindAction ( IWorkbenchSite site , FindAction action , String workingSetName ) { super ( site ) ; init ( action , workingSetName ) ; } public WorkingSetFindAction ( RubyEditor editor , FindAction action , String workingSetName ) { super ( editor ) ; init ( action , workingSetName ) ; } Class [ ] getValidTypes ( ) { return null ; } void
2,264
<s> package com . asakusafw . vocabulary . flow . graph ; import java . text . MessageFormat ; public enum ObservationCount implements FlowElementAttribute { DONT_CARE ( false , false ) { @ Override public ObservationCount and ( ObservationCount other ) { if ( other == null ) { throw new IllegalArgumentException ( "" ) ; } return other ; } } , AT_MOST_ONCE ( true , false ) { @ Override public ObservationCount and ( ObservationCount other ) { if ( other == null ) { throw new IllegalArgumentException ( "" ) ; } if ( other . atLeastOnce ) { return EXACTLY_ONCE ; } return AT_MOST_ONCE ; } } , AT_LEAST_ONCE ( false , true ) { @ Override public ObservationCount and ( ObservationCount other ) { if ( other == null ) { throw new IllegalArgumentException ( "" ) ; } if ( other . atMostOnce ) { return EXACTLY_ONCE ; } return AT_LEAST_ONCE ; } } , EXACTLY_ONCE ( true , true ) { @ Override public ObservationCount and ( ObservationCount other ) { if ( other == null ) { throw new IllegalArgumentException ( "" ) ; } return EXACTLY_ONCE ; } } , ; public final boolean atMostOnce ; public final boolean atLeastOnce ; private ObservationCount (
2,265
<s> package com . asakusafw . testdriver . excel ; import java . io . File ; import java . io . IOException ; import java . net . URI ; import org . slf4j . Logger ; import org . slf4j . LoggerFactory ; import com . asakusafw . testdriver . core . DataModelDefinition ; import com . asakusafw . testdriver . core . DataModelSink ; import com . asakusafw . testdriver . core . DataModelSinkProvider ; import com . asakusafw . testdriver . core . TestContext ; public class ExcelSheetSinkProvider implements DataModelSinkProvider { static final Logger LOG = LoggerFactory . getLogger ( ExcelSheetSinkProvider . class ) ; @ Override public < T > DataModelSink create ( DataModelDefinition < T > definition , URI sink , TestContext context ) throws IOException {
2,266
<s> package org . oddjob . state ; import java . util . Date ; import org . oddjob . framework . JobDestroyedException ; public interface StateChanger < S extends State >
2,267
<s> package org . oddjob . io ; import java . io . File ; import java . io . Serializable ; import org . apache . log4j . Logger ; import org . oddjob . arooa . deploy . annotations . ArooaAttribute ; public class RenameJob implements Runnable , Serializable { private static final long serialVersionUID = 20060117 ; private static final Logger logger = Logger . getLogger ( RenameJob . class ) ; private String name ; private File from ; private File to ; public String getName ( ) { return name ; } public void setName ( String name ) { this . name = name ; } public File getFrom ( ) { return from ; } @ ArooaAttribute public void setFrom ( File file ) { this . from = file ; } public File getTo ( ) { return to ; } @ ArooaAttribute public void setTo ( File file ) { this . to = file ; } public void run ( ) { if ( from == null ) { throw new NullPointerException ( "" ) ; } if ( to == null ) { throw new NullPointerException (
2,268
<s> package net . sf . sveditor . core . tests . index . src_collection ; import java . io . File ; import java . io . FileInputStream ; import java . io . IOException ; import java . io . PrintStream ; import java . util . ArrayList ; import java . util . List ; import junit . framework . TestCase ; import net . sf . sveditor . core . SVCorePlugin ; import net . sf . sveditor . core . db . ISVDBItemBase ; import net . sf . sveditor . core . db . SVDBFile ; import net . sf . sveditor . core . db . SVDBItem ; import net . sf . sveditor . core . db . SVDBItemType ; import net . sf . sveditor . core . db . SVDBMarker ; import net . sf . sveditor . core . db . index . AbstractSVDBIndex ; import net . sf . sveditor . core . db . index . ISVDBFileSystemProvider ; import net . sf . sveditor . core . db . index . ISVDBIndex ; import net . sf . sveditor . core . db . index . ISVDBItemIterator ; import net . sf . sveditor . core . db . index . SVDBIndexRegistry ; import net . sf . sveditor . core . db . index . SVDBSourceCollectionIndexFactory ; import net . sf . sveditor . core . log . LogFactory ; import net . sf . sveditor . core . log . LogHandle ; import net . sf . sveditor . core . tests . IndexTestUtils ; import net . sf . sveditor . core . tests . SVCoreTestsPlugin ; import net . sf . sveditor . core . tests . SVDBTestUtils ; import net . sf . sveditor . core . tests . TestIndexCacheFactory ; import net . sf . sveditor . core . tests . utils . BundleUtils ; import net . sf . sveditor . core . tests . utils . TestUtils ; import org . eclipse . core . resources . IProject ; import org . eclipse . core . runtime . NullProgressMonitor ; public class SrcCollectionBasics extends TestCase { private File fTmpDir ; private IProject fProject ; @ Override protected void setUp ( ) throws Exception { super . setUp ( ) ; fTmpDir = TestUtils . createTempDir ( ) ; fProject = null ; } @ Override protected void tearDown ( ) throws Exception { super . tearDown ( ) ; SVCorePlugin . getDefault ( ) . getSVDBIndexRegistry ( ) . save_state ( ) ; if ( fProject != null ) { TestUtils . deleteProject ( fProject ) ; } if ( fTmpDir != null && fTmpDir . exists ( ) ) { TestUtils . delete ( fTmpDir ) ; fTmpDir = null ; } } public void testFindSourceRecursePkg ( ) { SVCorePlugin . getDefault ( ) . enableDebug ( false ) ; LogHandle log = LogFactory . getLogHandle ( "" ) ; BundleUtils utils = new BundleUtils ( SVCoreTestsPlugin . getDefault ( ) . getBundle ( ) ) ; File project_dir = new File ( fTmpDir , "project_dir" ) ; if ( project_dir . exists ( ) ) { project_dir . delete ( ) ; } utils . copyBundleDirToFS ( "" , project_dir ) ; SVDBIndexRegistry rgy = SVCorePlugin . getDefault ( ) . getSVDBIndexRegistry ( ) ; rgy . init ( TestIndexCacheFactory . instance ( project_dir ) ) ; File path = new File ( project_dir , "" ) ; ISVDBIndex index = rgy . findCreateIndex ( new NullProgressMonitor ( ) , "GENERIC" , path . getAbsolutePath ( ) , SVDBSourceCollectionIndexFactory . TYPE , null ) ; ISVDBItemIterator it = index . getItemIterator ( new NullProgressMonitor ( ) ) ; ISVDBItemBase class1 = null ; ISVDBItemBase class2 = null ; ISVDBItemBase class3 = null ; ISVDBItemBase def_function = null ; List < ISVDBItemBase > markers = new ArrayList < ISVDBItemBase > ( ) ; while ( it . hasNext ( ) ) { ISVDBItemBase tmp_it = it . nextItem ( ) ; String name = SVDBItem . getName ( tmp_it ) ; if ( name . equals ( "class1" ) ) { class1 = tmp_it ; } else if ( name . equals ( "class2" ) ) { class2 = tmp_it ; } else if ( name . equals ( "class3" ) ) { class3 = tmp_it ; } else if ( name . equals ( "def_function" ) ) { def_function = tmp_it ; } else if ( tmp_it . getType ( ) == SVDBItemType . Marker ) { markers . add ( tmp_it ) ; } } for ( ISVDBItemBase warn : markers ) { log . debug ( "" + ( ( SVDBMarker ) warn ) . getMessage ( ) ) ; } assertEquals ( "" , 0 , markers . size ( ) ) ; assertNotNull ( "" , class1 ) ; assertNotNull ( "" , class2 ) ; assertNotNull ( "" , class3 ) ; assertNotNull ( "" , def_function ) ; assertEquals ( "class1" , SVDBItem . getName ( class1 ) ) ; index . dispose ( ) ; LogFactory . removeLogHandle ( log ) ; } public void testFindSourceRecurseNoPkg ( ) { BundleUtils utils = new BundleUtils ( SVCoreTestsPlugin . getDefault ( ) . getBundle ( ) ) ; LogHandle log = LogFactory . getLogHandle ( "" ) ; SVCorePlugin . getDefault ( ) . enableDebug ( false ) ; File project_dir = new File ( fTmpDir , "project_dir" ) ; if ( project_dir . exists ( ) ) { project_dir . delete ( ) ; } utils . copyBundleDirToFS ( "" , project_dir ) ; SVDBIndexRegistry rgy = SVCorePlugin . getDefault ( ) . getSVDBIndexRegistry ( ) ; rgy . init ( TestIndexCacheFactory . instance ( project_dir ) ) ; File path = new File ( project_dir , "" ) ; ISVDBIndex index = rgy . findCreateIndex ( new NullProgressMonitor ( ) , project_dir . getName ( ) , path . getAbsolutePath ( ) , SVDBSourceCollectionIndexFactory . TYPE , null ) ; ISVDBItemIterator it = index . getItemIterator ( new NullProgressMonitor ( ) ) ; ISVDBItemBase class1 = null ; ISVDBItemBase class2 = null ; ISVDBItemBase class3 = null ; ISVDBItemBase def_function = null ; ISVDBItemBase def_task = null ; List < ISVDBItemBase > markers = new ArrayList < ISVDBItemBase > ( ) ; while ( it . hasNext ( ) ) { ISVDBItemBase tmp_it = it . nextItem ( ) ; String name = SVDBItem . getName ( tmp_it ) ; if ( name . equals ( "class1" ) ) { class1 = tmp_it ; } else if ( name . equals ( "class2" ) ) { class2 = tmp_it ; } else if ( name . equals ( "class3" ) ) { class3 = tmp_it ; } else if ( name . equals ( "def_function" ) ) { def_function = tmp_it ; } else if ( name . equals ( "def_task" ) ) { def_task = tmp_it ; } else if ( tmp_it . getType ( ) == SVDBItemType . Marker ) { markers . add ( tmp_it ) ; } } for ( ISVDBItemBase warn : markers ) { log . debug ( "" + ( ( SVDBMarker ) warn ) . getMessage ( ) ) ; } assertEquals ( "" , 0 , markers . size ( ) ) ; assertNotNull ( "" , class1 ) ; assertNotNull ( "" , class2 ) ; assertNotNull ( "" , class3 ) ; assertNotNull ( "" , def_function ) ; assertNotNull ( "" , def_task ) ; assertEquals ( "class1" , SVDBItem . getName ( class1 ) ) ; index . dispose ( ) ; LogFactory . removeLogHandle ( log ) ; } public void testFindSourceRecurseModule ( ) { BundleUtils utils = new BundleUtils ( SVCoreTestsPlugin . getDefault ( ) . getBundle ( ) ) ; LogHandle log = LogFactory . getLogHandle ( "" ) ; SVCorePlugin . getDefault ( ) . enableDebug ( false ) ; File project_dir = new File ( fTmpDir , "project_dir" ) ; if ( project_dir . exists ( ) ) { TestUtils . delete ( project_dir ) ; } utils . copyBundleDirToFS ( "" , project_dir ) ; SVDBIndexRegistry rgy = SVCorePlugin . getDefault ( ) . getSVDBIndexRegistry ( ) ; rgy . init ( TestIndexCacheFactory . instance ( project_dir ) ) ; File path = new File ( project_dir , "" ) ; ISVDBIndex index = rgy . findCreateIndex ( new NullProgressMonitor (
2,269
<s> package net . sf . sveditor . core . db . search ; import net . sf . sveditor . core . db . ISVDBNamedItem ; import net . sf . sveditor . core . db . SVDBItemType ; public class SVDBFindModuleMatcher implements ISVDBFindNameMatcher { public boolean
2,270
<s> package org . rubypeople . rdt . internal . formatter ; import java . io . IOException ; import java . io . InputStream ; import javax . xml . parsers . FactoryConfigurationError ; import javax . xml . parsers . ParserConfigurationException ; import org . rubypeople . rdt . core . formatter . CodeFormatter ; import org . xml . sax . SAXException ;
2,271
<s> package org . rubypeople . rdt . internal . core ; import org . rubypeople . rdt . core . IRubyElement ; import org . rubypeople . rdt . core . RubyModelException ; import org . rubypeople . rdt . internal . core . buffer . LRUCache ; import org . rubypeople . rdt . internal . core . buffer . OverflowingLRUCache ; public class ElementCache extends OverflowingLRUCache { IRubyElement spaceLimitParent = null ; public ElementCache ( int size ) { super ( size ) ; } public ElementCache ( int size , int overflow ) { super ( size , overflow ) ; } protected void ensureSpaceLimit ( int childrenSize , IRubyElement parent ) { int spaceNeeded = 1 + ( int ) ( ( 1 + fLoadFactor )
2,272
<s> package net . sf . sveditor . ui . search ; import net . sf . sveditor . core . db . ISVDBChildItem ; import net . sf . sveditor . core . db . ISVDBItemBase ; import net . sf . sveditor . core . db . SVDBFile ; import net . sf . sveditor . core . db . SVDBItemType ; import org . eclipse . search . ui . text . Match ; public class SVSearchMatch extends Match { private SVDBFile fFile ; public SVSearchMatch ( ISVDBItemBase item ) { super ( item , 0 , 0 ) ; } public SVDBFile getFile ( ) { if ( fFile == null ) { if ( getElement ( ) instanceof ISVDBChildItem ) { ISVDBChildItem it = ( ISVDBChildItem ) getElement ( ) ;
2,273
<s> package com . asakusafw . vocabulary . flow . graph ; import java . text . MessageFormat ; import com . asakusafw . vocabulary . flow . Out ; import com . asakusafw . vocabulary . flow . Source ; public final class FlowOut < T > implements Out < T > { private OutputDescription description ; private FlowElementResolver resolver ; public FlowOut ( OutputDescription description ) { if ( description == null ) { throw new IllegalArgumentException ( "" ) ; } this . description = description ; this . resolver = new FlowElementResolver ( description ) ; } public static < T > FlowOut < T > newInstance ( OutputDescription description ) { return new FlowOut < T > ( description ) ; } public OutputDescription getDescription ( )
2,274
<s> package org . rubypeople . rdt . refactoring . core . mergeclasspartsinfile ; import java . util . ArrayList ; import java . util . Collection ; import org . rubypeople . rdt . refactoring . classnodeprovider . IncludedClassesProvider ; import org . rubypeople . rdt . refactoring . core . IRefactoringConfig ; import org . rubypeople . rdt . refactoring . documentprovider . IDocumentProvider ; import org . rubypeople . rdt . refactoring . nodewrapper . ClassNodeWrapper ; import org . rubypeople . rdt . refactoring . nodewrapper . PartialClassNodeWrapper ; public class MergeClassPartInFileConfig implements IRefactoringConfig { private IDocumentProvider documentProvider ; private Collection < ClassNodeWrapper > selectableClasses ; private PartialClassNodeWrapper selectedClassPart ; private Collection < PartialClassNodeWrapper > checkedClassParts ; private IncludedClassesProvider classNodeProvider ; public MergeClassPartInFileConfig ( IDocumentProvider documentProvider ) { this . documentProvider = documentProvider ; checkedClassParts = new ArrayList < PartialClassNodeWrapper > ( ) ; } public IDocumentProvider getDocumentProvider ( ) { return documentProvider ; } public boolean hasSelectableClasses ( ) {
2,275
<s> package com . asakusafw . compiler . flow . debugging ; import java . lang . reflect . Type ; import com . asakusafw . compiler . flow . LinePartProcessor ; import com . asakusafw . vocabulary . flow . graph . FlowElement ; import com . asakusafw . vocabulary . flow . graph . FlowElementInput ; import com . asakusafw . vocabulary . flow . graph . FlowElementOutput ; import com . asakusafw . vocabulary . flow . graph . FlowElementResolver ; import com . asakusafw . vocabulary . flow . graph . ObservationCount ; import com . asakusafw . vocabulary . flow . graph . OperatorDescription ; import com . asakusafw . vocabulary . flow . graph . PortConnection ; public final class DebuggingUtils { private static final String PORT_IN =
2,276
<s> package org . rubypeople . rdt . internal . ui . workingsets ; import java . util . ArrayList ; import java . util . Arrays ; import java . util . List ; import org . eclipse . jface . action . Action ; import org . eclipse . jface . dialogs . IDialogConstants ; import org . eclipse . ui . IWorkbenchPartSite ; import org . eclipse . ui . IWorkingSet ; public class ConfigureWorkingSetAction extends Action { private
2,277
<s> package com . asakusafw . runtime . stage . input ; import java . io . IOException ; import java . text . MessageFormat ; import java . util . ArrayList ; import java . util . Collections ; import java . util . HashMap ; import java . util . List ; import java . util . Map ; import java . util . Set ; import org . apache . commons . logging . Log ; import org . apache . commons . logging . LogFactory ; import org . apache . hadoop . conf . Configuration ; import org . apache . hadoop . fs . Path ; import org . apache . hadoop . mapreduce . InputFormat ; import org . apache . hadoop . mapreduce . InputSplit ; import org . apache . hadoop . mapreduce . Job ; import org . apache . hadoop . mapreduce . JobContext ; import org . apache . hadoop . mapreduce . Mapper ; import org . apache . hadoop . mapreduce . RecordReader ; import org . apache . hadoop . mapreduce . TaskAttemptContext ; import org . apache . hadoop . mapreduce . lib . input . FileInputFormat ; import org . apache . hadoop . util . ReflectionUtils ; import com . asakusafw . runtime . stage . StageInput ; import com . asakusafw . runtime . stage . input . StageInputSplit . Source ; @ SuppressWarnings ( "rawtypes" ) public class StageInputFormat extends InputFormat { private static final String DEFAULT = "default" ; static final Log LOG = LogFactory . getLog ( StageInputFormat . class ) ; private static final Map < String , Class < ? extends SplitCombiner > > SPLIT_COMBINERS ; static { Map < String , Class < ? extends SplitCombiner > > map = new HashMap < String , Class < ? extends SplitCombiner > > ( ) ; map . put ( DEFAULT , DefaultSplitCombiner . class ) ; map . put ( "disabled" , IdentitySplitCombiner . class ) ; map . put ( "extreme" , ExtremeSplitCombiner . class ) ; SPLIT_COMBINERS = Collections . unmodifiableMap ( map ) ; } @ Override public List < InputSplit > getSplits ( JobContext context ) throws IOException , InterruptedException { List < StageInputSplit > splits = computeSplits ( context ) ; SplitCombiner combiner = getSplitCombiner ( context ) ;
2,278
<s> package org . oddjob . designer . components ; import junit . framework . TestCase ; import org . apache . log4j . Logger ; import org . oddjob . OddjobDescriptorFactory ; import org . oddjob . arooa . ArooaDescriptor ; import org . oddjob . arooa . ArooaParseException ; import org . oddjob . arooa . ArooaType ; import org . oddjob . arooa . design . DesignInstance ; import org . oddjob . arooa . design . DesignParser ; import org . oddjob . arooa . design . view . ViewMainHelper ; import org . oddjob . arooa . standard . StandardArooaSession ; import org . oddjob . arooa .
2,279
<s> package org . rubypeople . rdt . internal . ui . wizards . buildpaths . newsourcepage ; import java . lang . reflect . InvocationTargetException ; import java . util . ArrayList ; import java . util . Iterator ; import java . util . List ; import org . eclipse . core . resources . IResource ; import org . eclipse . core . runtime . CoreException ; import org . eclipse . core . runtime . IProgressMonitor ; import org . eclipse . core . runtime . IStatus ; import org . eclipse . core . runtime . NullProgressMonitor ; import org . eclipse . core . runtime . SubProgressMonitor ; import org . eclipse . jface . action . Action ; import org . eclipse . jface . dialogs . ErrorDialog ; import org . eclipse . jface . dialogs . MessageDialog ; import org . eclipse . jface . operation . IRunnableWithProgress ; import org . eclipse . jface . viewers . ISelection ; import org . eclipse . jface . viewers . ISelectionChangedListener ; import org . eclipse . jface . viewers . IStructuredSelection ; import org . eclipse . jface . viewers . SelectionChangedEvent ; import org . eclipse . jface . viewers . StructuredSelection ; import org . eclipse . swt . widgets . Shell ; import org . eclipse . ui . IWorkbenchPage ; import org . eclipse . ui . IWorkbenchPart ; import org . eclipse . ui . IWorkbenchPartReference ; import org . eclipse . ui . IWorkbenchSite ; import org . eclipse . ui . PlatformUI ; import org . eclipse . ui . part . ISetSelectionTarget ; import org . rubypeople . rdt . core . IRubyProject ; import org . rubypeople . rdt . core . ISourceFolderRoot ; import org . rubypeople . rdt . core . RubyCore ; import org . rubypeople . rdt . core . RubyModelException ; import org . rubypeople . rdt . internal . corext . buildpath . LoadpathModifier ; import org . rubypeople . rdt . internal . ui . RubyPlugin ; import org . rubypeople . rdt . internal . ui . RubyPluginImages ; import org . rubypeople . rdt . internal . ui . wizards . NewWizardMessages ; import org . rubypeople . rdt . internal . ui . wizards . buildpaths . CPListElement ; public class IncludeToBuildpathAction extends Action implements ISelectionChangedListener { private final IWorkbenchSite fSite ; private final List fSelectedElements ; public IncludeToBuildpathAction ( IWorkbenchSite site ) { super ( NewWizardMessages . NewSourceContainerWorkbookPage_ToolBar_Unexclude_label , RubyPluginImages . DESC_ELCL_INCLUDE_ON_BUILDPATH ) ; setToolTipText ( NewWizardMessages . NewSourceContainerWorkbookPage_ToolBar_Unexclude_tooltip ) ; setDisabledImageDescriptor ( RubyPluginImages . DESC_DLCL_INCLUDE_ON_BUILDPATH ) ; fSite = site ; fSelectedElements = new ArrayList ( ) ; } public void run ( ) { IResource resource = ( IResource ) fSelectedElements . get ( 0 ) ; final IRubyProject project = RubyCore . create ( resource . getProject ( ) ) ; try { final IRunnableWithProgress runnable = new IRunnableWithProgress ( ) { public void run ( IProgressMonitor monitor ) throws InvocationTargetException , InterruptedException { try { List result = unExclude ( fSelectedElements , project , monitor ) ; selectAndReveal ( new StructuredSelection ( result ) ) ; } catch ( CoreException e ) { throw new InvocationTargetException ( e ) ; } } } ; PlatformUI . getWorkbench ( ) . getProgressService ( ) . run ( true , false , runnable ) ; } catch ( final InvocationTargetException e ) { if ( e . getCause ( ) instanceof CoreException ) { showExceptionDialog ( ( CoreException ) e . getCause ( ) ) ; } else { RubyPlugin . log ( e ) ; } } catch ( final InterruptedException e ) { } } protected List unExclude ( List elements , IRubyProject project , IProgressMonitor monitor ) throws RubyModelException { if ( monitor == null ) monitor = new NullProgressMonitor ( ) ; try { monitor . beginTask ( NewWizardMessages . LoadpathModifier_Monitor_Including , 2 * elements . size ( ) ) ; List entries = LoadpathModifier . getExistingEntries ( project ) ; for ( int i = 0 ; i < elements . size ( ) ; i ++ ) { IResource resource = ( IResource ) elements . get ( i ) ; ISourceFolderRoot root = LoadpathModifier . getFolderRoot ( resource , project , new SubProgressMonitor ( monitor , 1 ) ) ; if ( root != null ) { CPListElement entry = LoadpathModifier . getLoadpathEntry ( entries , root ) ; LoadpathModifier . unExclude ( resource , entry , project , new SubProgressMonitor ( monitor , 1 ) ) ; } } LoadpathModifier . commitLoadPath ( entries , project , new SubProgressMonitor ( monitor , 4 ) ) ; List resultElements = LoadpathModifier . getCorrespondingElements ( elements , project ) ; return resultElements ; } finally { monitor . done ( ) ; } } public void selectionChanged ( final SelectionChangedEvent event ) { final ISelection selection = event . getSelection ( ) ; if ( selection instanceof IStructuredSelection ) { setEnabled ( canHandle ( ( IStructuredSelection ) selection ) ) ; } else { setEnabled ( canHandle ( StructuredSelection . EMPTY ) ) ; } }
2,280
<s> package org . rubypeople . rdt . internal . debug . core ; public class ExceptionSuspensionPoint extends SuspensionPoint { private String exceptionMessage ; private String exceptionType ; public boolean isBreakpoint ( ) { return false ; } public boolean isException ( ) { return true ; } public boolean isStep ( ) { return false ; } public String toString ( ) { return this . getExceptionType ( ) + " occurred :" + this . getExceptionMessage ( ) ; }
2,281
<s> package com . asakusafw . runtime . directio ; import java . util . concurrent . atomic . AtomicLong ; import com . asakusafw . runtime . directio . util . CountInputStream ; import com . asakusafw . runtime . directio . util . CountOutputStream ; public class Counter { private final AtomicLong
2,282
<s> package org . rubypeople . rdt . ui . search ; import org . eclipse . jface . viewers . ILabelProvider ; import org
2,283
<s> package org . oddjob . script ; import java . io . File ; import java . text . ParseException ; import junit . framework . TestCase ; import org . apache . log4j . Logger ; import org . oddjob . Oddjob ; import org . oddjob . OddjobLookup ; import org . oddjob . arooa . convert . ArooaConversionException ; import org . oddjob . arooa . convert . ArooaConverter ; import org . oddjob . arooa . convert . DefaultConversionRegistry ; import org . oddjob . arooa . convert . DefaultConverter ; import org . oddjob . arooa . reflect . ArooaPropertyException ; import org . oddjob . arooa . standard . StandardArooaSession ; import org . oddjob . arooa . types . ArooaObject ; import org . oddjob . arooa . utils . DateHelper ; import org . oddjob . arooa . xml . XMLConfiguration ; import org . oddjob . state . ParentState ; public class InvokeTypeTest extends TestCase { private static final Logger logger = Logger . getLogger ( InvokeTypeTest . class ) ; @ Override protected void setUp ( ) throws Exception { super . setUp ( ) ; logger . info ( "" + getName ( ) + "" ) ; } public static class Thing { public String simpleStuff ( ) { return "simple" ; } public Object complexStuff ( String s ) { return s ; } public Object complexStuff ( File f , File y ) { return f . toString ( ) + y . toString ( ) ; } public Object complexStuff ( int i , double d ) { return new Double ( d + i ) ; } public void nothing ( ) { } public static String staticThing ( String s ) { return s ; } } public void testSimple ( ) throws ArooaConversionException { InvokeType test = new InvokeType ( ) ; test . setFunction ( "simpleStuff" ) ; test . setSource ( new MethodInvoker ( new Thing ( ) ) ) ; Object result = test . toValue ( ) ; assertEquals ( "simple" , result ) ; } public void testStaticMethodOnObject ( ) throws ArooaConversionException { InvokeType test = new InvokeType ( ) ; test . setArooaSession ( new StandardArooaSession ( ) ) ; test . setFunction ( "staticThing" ) ; test . setSource ( new MethodInvoker ( new Thing ( ) ) ) ; test . setParameters ( 0 , new ArooaObject ( "Apples" ) ) ; assertEquals ( "Apples" , test . toValue ( ) ) ; } public void testClassMethodInvoke ( ) throws ArooaConversionException { InvokeType test = new InvokeType ( ) ; test . setArooaSession ( new StandardArooaSession ( ) ) ; test . setFunction ( "newInstance" ) ; test . setSource ( new MethodInvoker ( Thing . class ) ) ; assertEquals ( Thing . class , test . toValue ( ) . getClass ( ) ) ; } public void testWrongParameters ( ) throws ArooaConversionException { InvokeType test = new InvokeType ( ) ; test . setArooaSession ( new StandardArooaSession ( ) ) ; test . setFunction ( "simpleStuff" ) ; test . setSource ( new MethodInvoker ( new Thing ( ) ) ) ; test . setParameters ( 0 , new ArooaObject ( "Thing" ) ) ; try { test . toValue ( ) ; fail ( "Should fail." ) ; } catch ( RuntimeException e ) { } } public void testNumberToString ( ) throws ArooaConversionException { InvokeType test = new InvokeType ( ) ; test . setArooaSession ( new StandardArooaSession ( ) ) ; test . setFunction ( "complexStuff" ) ; test . setSource ( new MethodInvoker ( new Thing ( ) ) ) ; test . setParameters ( 0 , new ArooaObject ( 1 ) ) ; Object result = test . toValue ( ) ; assertEquals ( "1" , result ) ; } public void testNumbers ( ) throws ArooaConversionException { InvokeType test = new InvokeType ( ) ; test . setArooaSession ( new StandardArooaSession
2,284
<s> package org . rubypeople . rdt . internal . ui . text . ruby ; import org . eclipse . jface . text . Assert ; import org . eclipse . jface . text . IDocument ; import org . eclipse . jface . text . contentassist . IContextInformation ; import org . eclipse . swt . graphics . Image ; import org . rubypeople . rdt . core . CompletionProposal ; import org . rubypeople . rdt . internal . ui . RubyPlugin ; public class LazyRubyCompletionProposal extends AbstractRubyCompletionProposal { protected static final String LPAREN = "(" ; protected static final String RPAREN = ")" ; protected static final String COMMA = "," ; protected static final String SPACE = " " ; private boolean fDisplayStringComputed ; private boolean fReplacementStringComputed ; private boolean fReplacementOffsetComputed ; private boolean fReplacementLengthComputed ; private boolean fCursorPositionComputed ; private boolean fImageComputed ; private boolean fContextInformationComputed ; private boolean fProposalInfoComputed ; private boolean fTriggerCharactersComputed ; private boolean fSortStringComputed ; private boolean fRelevanceComputed ; protected final CompletionProposal fProposal ; protected final RubyContentAssistInvocationContext fInvocationContext ; public LazyRubyCompletionProposal ( CompletionProposal proposal , RubyContentAssistInvocationContext context ) { Assert . isNotNull ( proposal ) ; Assert . isNotNull ( context ) ; fInvocationContext = context ; fProposal = proposal ; } public final char [ ] getTriggerCharacters ( ) { if ( ! fTriggerCharactersComputed ) setTriggerCharacters ( computeTriggerCharacters ( ) ) ; return super . getTriggerCharacters ( ) ; } protected char [ ] computeTriggerCharacters ( ) { return new char [ 0 ] ; } public final void setTriggerCharacters ( char [ ] triggerCharacters ) {
2,285
<s> package org . rubypeople . rdt . internal . debug . ui . launcher ; import java . util . ArrayList ; import java . util . List ; import org . eclipse . core . resources . IFile ; import org . eclipse . core . resources . IProject ; import org . eclipse . core . runtime . CoreException ; import org . eclipse . core . runtime . IAdaptable ; import org . eclipse . core . runtime . IProgressMonitor ; import org . eclipse . core . runtime . IStatus ; import org . eclipse . core . runtime . Status ; import org . eclipse . core . runtime . jobs . Job ; import org . eclipse . debug . core . DebugPlugin ; import org . eclipse . debug . core . ILaunchConfiguration ; import org . eclipse . debug . core . ILaunchConfigurationType ; import org . eclipse . debug . core . ILaunchConfigurationWorkingCopy ; import org . eclipse . debug . core . ILaunchManager ; import org . eclipse . debug . ui . DebugUITools ; import org . eclipse . debug . ui . ILaunchShortcut ; import org . eclipse . jface . dialogs . ErrorDialog ; import org . eclipse . jface . dialogs . MessageDialog ; import org . eclipse . jface . viewers . ISelection ; import org . eclipse . jface . viewers . IStructuredSelection ; import org . eclipse . swt . widgets . Display ; import org . eclipse . ui . IEditorInput ; import org . eclipse . ui . IEditorPart ; import org . rubypeople . rdt . core . IRubyElement ; import org . rubypeople . rdt . debug . ui . InstallDeveloperToolsDialog ; import org . rubypeople . rdt . debug . ui . RdtDebugUiConstants ; import org . rubypeople . rdt . internal . debug . ui . RdtDebugUiMessages ; import org . rubypeople . rdt . internal . debug . ui . RdtDebugUiPlugin ; import org . rubypeople . rdt . internal . ui . RubyPlugin ; import org . rubypeople . rdt . launching . IRubyLaunchConfigurationConstants ; import org . rubypeople . rdt . launching . RubyRuntime ; import com . aptana . rdt . AptanaRDTPlugin ; import com . aptana . rdt . core . gems . ContributedGemRegistry ; import com . aptana . rdt . core . gems . Gem ; import com . aptana . rdt . core . gems . Version ; public class RubyApplicationShortcut implements ILaunchShortcut { private static final String RUBY_PROFILING_GEM_NAME = "ruby-prof" ; private static final String RUBY_DEBUG_IDE_GEM_NAME = "" ; private static final String MINIMUM_RUBY_DEBUG_IDE_VERSION = "0.4.5" ; public void launch ( ISelection selection , String mode ) { Object firstSelection = null ; if ( selection instanceof IStructuredSelection ) { firstSelection =
2,286
<s> package org . rubypeople . rdt . internal . ui . filters ; import org . eclipse . core . resources . IProject ; import org . eclipse . jface . viewers . Viewer ; import org . eclipse . jface . viewers . ViewerFilter ; import org . eclipse . team . core . RepositoryProvider ; import org . rubypeople . rdt . core . IRubyProject ; public class NonSharedProjectFilter extends ViewerFilter { public boolean select ( Viewer viewer , Object parent , Object element ) { if ( element instanceof IProject ) return isSharedProject ( ( IProject ) element ) ; if ( element instanceof IRubyProject ) return isSharedProject (
2,287
<s> package com . asakusafw . compiler . flow . processor . operator ; import com . asakusafw . compiler . flow . processor . ConvertFlowProcessor ; import com . asakusafw . compiler . flow . testing . model . Ex1 ; import com . asakusafw . compiler . flow . testing . model . Ex2 ; import com . asakusafw . vocabulary . operator . Convert ; public abstract class ConvertFlow { private Ex2 ex2 = new Ex2 ( ) ; @ Convert public Ex2 simple ( Ex1 model ) { return withParameter ( model , 1 ) ; }
2,288
<s> package org . rubypeople . rdt . internal . ui . search ; import java . util . Hashtable ; import java . util . List ; import java . util . Map ; import org . eclipse . jface . viewers . AbstractTreeViewer ; import org . eclipse . swt . events . TreeListener ; import org . eclipse . swt . widgets . Control ; import org . eclipse . swt . widgets . Item ;
2,289
<s> package org . rubypeople . rdt . ui . actions ; import org . eclipse . ui . IWorkbenchSite ; import org . eclipse . ui . IWorkingSet ; import org . eclipse . ui . PlatformUI ; import org . rubypeople . rdt . core . IField ; import org . rubypeople . rdt . core . search . IRubySearchConstants ; import org . rubypeople . rdt . internal . ui . IRubyHelpContextIds ; import org . rubypeople . rdt . internal . ui . RubyPluginImages ; import org . rubypeople . rdt . internal . ui . rubyeditor . RubyEditor ; import org . rubypeople . rdt . internal . ui . search . SearchMessages ; public class FindWriteReferencesInWorkingSetAction extends FindReferencesInWorkingSetAction { public FindWriteReferencesInWorkingSetAction ( IWorkbenchSite site ) { super ( site ) ; }
2,290
<s> package com . asakusafw . testdriver . html ; import java . io . Closeable ; import java . io . File ; import java . io . FileOutputStream ; import java . io . IOException ; import java . io . InputStream ; import java . io . OutputStream ; import java . io . OutputStreamWriter ; import java . io . PrintWriter ; import java . math . BigDecimal ; import java . nio . charset . Charset ; import java . text . MessageFormat ; import java . text . SimpleDateFormat ; import java . util . ArrayList ; import java . util . Calendar ; import java . util . Collections ; import java . util . Date ; import java . util . List ; import java . util . Scanner ; import org . slf4j . Logger ; import org . slf4j . LoggerFactory ; import com . asakusafw . testdriver . core . DataModelDefinition ; import com . asakusafw . testdriver . core . DataModelReflection ; import com . asakusafw . testdriver . core . Difference ; import com . asakusafw . testdriver . core . DifferenceSink ; import com . asakusafw . testdriver . core . PropertyName ; import com . asakusafw . testdriver . core . PropertyType ; public class HtmlDifferenceSink implements DifferenceSink { static final Logger LOG = LoggerFactory . getLogger ( HtmlDifferenceSink . class ) ; private static final String CSS_FILE_NAME = "" ; static final Charset CHARSET = Charset . forName ( "UTF-8" ) ; static final List < String > CSS ; static { List < String > lines = new ArrayList < String > ( ) ; InputStream in = HtmlDifferenceSink . class . getResourceAsStream ( CSS_FILE_NAME ) ; if ( in != null ) { try { Scanner scanner = new Scanner ( in , CHARSET . name ( ) ) ; while ( scanner . hasNextLine ( ) ) { IOException exception = scanner . ioException ( ) ; if ( exception != null ) { throw exception ; } lines . add ( scanner . nextLine ( ) ) ; } } catch ( IOException e ) { LOG . warn ( "" , e ) ; lines . clear ( ) ; } finally { try { in . close ( ) ; } catch ( IOException e ) { } } } CSS = Collections . unmodifiableList ( lines ) ; } private final Context context ; private boolean closed ; public HtmlDifferenceSink ( File output , DataModelDefinition < ? > definition ) throws IOException { if ( output == null ) { throw new IllegalArgumentException ( "" ) ; } if ( definition == null ) { throw new IllegalArgumentException ( "" ) ; } boolean succeed = false ; OutputStream os = new FileOutputStream ( output ) ; try { PrintWriter writer = new PrintWriter ( new OutputStreamWriter ( os , CHARSET ) , true ) ; this . context = new Context ( writer , definition ) ; succeed = true ; } finally { if ( succeed == false ) { try { os . close ( ) ; } catch ( IOException e ) { LOG . warn ( MessageFormat . format ( "" , output ) , e ) ; } } } context . writeHeader ( ) ; } @ Override public void put ( Difference difference ) throws IOException { context . writeDifference ( difference ) ; } @ Override public void close ( ) throws IOException { if ( closed ) { return ; } try { context . writeFooter ( ) ; } finally { context . close ( ) ; } closed = true ; } private static class Context implements Closeable { private static final char [ ] ASCII_SPECIAL_ESCAPE = new char [ 0x80 ] ; static { ASCII_SPECIAL_ESCAPE [ '"' ] = '"' ; ASCII_SPECIAL_ESCAPE [ '\b' ] = 'b' ; ASCII_SPECIAL_ESCAPE [ '\t' ] = 't' ; ASCII_SPECIAL_ESCAPE [ '\n' ] = 'n' ; ASCII_SPECIAL_ESCAPE [ '\f' ] = 'f' ; ASCII_SPECIAL_ESCAPE [ '\r' ] = 'r' ; ASCII_SPECIAL_ESCAPE [ '\\' ] = '\\' ; } private final DataModelDefinition < ? > definition ; private final PrintWriter writer ; private final SimpleDateFormat dateFormat = new SimpleDateFormat ( "yyyy/MM/dd" ) ; private final SimpleDateFormat datetimeFormat = new SimpleDateFormat ( "" ) ; private final SimpleDateFormat timeFormat = new SimpleDateFormat ( "HH:mm:ss" ) ; Context ( PrintWriter writer , DataModelDefinition < ? > definition ) { assert writer != null ; assert definition != null ; this . writer = writer ; this . definition = definition ; } public void writeDifference ( Difference difference ) { assert difference != null ; writer . println ( "" ) ; writer . println ( "" ) ; writer . println (
2,291
<s> package com . aptana . rdt . internal . core . parser . warnings ; import org . rubypeople . rdt . core . RubyCore ; import org . rubypeople . rdt . core . parser . warnings . RubyLintVisitor ; import com . aptana . rdt . internal . parser . warnings . SimilarVariableNameVisitor ; public class TC_SimilarVariableNameVisitor extends WarningVisitorTest { @ Override protected RubyLintVisitor createVisitor ( String code ) { return new SimilarVariableNameVisitor ( code ) { @ Override protected String getSeverity ( ) { return RubyCore . WARNING ; } } ; } public void testEmptyHasNoProblems ( ) throws Exception { String code = "" ; parse ( code ) ; assertEquals ( 0 , numberOfProblems ( ) ) ; } public void testReferToLocalWithSimilarName ( ) throws Exception { String code = "class Ralphn" + " def namen" + "" + "" + " endn" + "endn" ; parse ( code ) ; assertEquals ( 1 , numberOfProblems ( ) ) ; } public void testTranspositionDoesntPushSmallVariablesAboveThreshold (
2,292
<s> package com . asakusafw . compiler . operator . processor ; import static org . junit . Assert . * ; import org . junit . Test ; import com . asakusafw . compiler . operator . OperatorCompilerTestRoot ; import com . asakusafw . compiler . operator . model . MockHoge ; import com . asakusafw . utils . graph . Graph ; import com . asakusafw . vocabulary . flow . testing . MockIn ; import com . asakusafw . vocabulary . flow . testing . MockOut ; public class ExtractOperatorProcessorTest extends OperatorCompilerTestRoot { @ Test public void simple ( ) { add ( "" ) ; ClassLoader loader = start ( new ExtractOperatorProcessor ( ) ) ; Object factory = create ( loader , "" ) ; MockIn < MockHoge > in = MockIn . of ( MockHoge . class , "in" ) ; MockOut < MockHoge > a = MockOut . of ( MockHoge . class , "a" ) ; MockOut < MockHoge > b = MockOut . of ( MockHoge . class , "b" ) ; Object gs = invoke ( factory , "example" , in ) ; a . add ( output ( MockHoge . class , gs , "first" ) ) ;
2,293
<s> package org . rubypeople . rdt . internal . ui . text . ruby . hover ; import org . eclipse . jface . text . IInformationControl ; import org . eclipse . jface . text . IInformationControlCreator ; import org . eclipse . jface . text . ITextHoverExtension ; import org . eclipse . jface . text . information . IInformationProviderExtension2 ; import org . eclipse . swt . SWT ; import org . eclipse . swt . widgets . Shell ; import org . eclipse . ui . IEditorPart ; import org . eclipse . ui . part . IWorkbenchPartOrientation ; import org . rubypeople . rdt . core . IMember ; import org . rubypeople . rdt . core . IRubyElement ; import org . rubypeople . rdt . core . ISourceReference ; import org . rubypeople . rdt . core . RubyModelException ; import org . rubypeople . rdt . internal . corext . codemanipulation . StubUtility ; import org . rubypeople .
2,294
<s> package org . rubypeople . rdt . internal . ui . search ; import java . util . ArrayList ; import java . util . Arrays ; import java . util . Collection ; import java . util . HashSet ; import java . util . Set ; import org . eclipse . core . resources . IFolder ; import org . eclipse . core . resources . IProject ; import org . eclipse . core . resources . IResource ; import org . eclipse . core . resources . IWorkspaceRoot ; import org . eclipse . core . resources . ResourcesPlugin ; import org . eclipse . core . runtime . CoreException ; import org . eclipse . core . runtime . IAdaptable ; import org . eclipse . core . runtime . IPath ; import org . eclipse . debug . internal . ui . launchConfigurations . WorkingSetComparator ; import org . eclipse . jface . viewers . ISelection ; import org . eclipse . jface . viewers . IStructuredSelection ; import org . eclipse . jface . window . Window ; import org . eclipse . swt . widgets . Shell ; import org . eclipse . ui . IEditorInput ; import org . eclipse . ui . IWorkingSet ; import org . eclipse . ui . PlatformUI ; import org . eclipse . ui . dialogs . IWorkingSetSelectionDialog ; import org . rubypeople . rdt . core . ILoadpathContainer ; import org . rubypeople . rdt . core . ILoadpathEntry ; import org . rubypeople . rdt . core . IRubyElement ; import org . rubypeople . rdt . core . IRubyProject ; import org . rubypeople . rdt . core . ISourceFolderRoot ; import org . rubypeople . rdt . core . IType ; import org . rubypeople . rdt . core . RubyCore ; import org . rubypeople . rdt . core . RubyModelException ; import org . rubypeople . rdt . core . search . IRubySearchScope ; import org . rubypeople . rdt . core . search . SearchEngine ; import org . rubypeople . rdt . internal . core . util . Messages ; import org . rubypeople . rdt . internal . ui . RubyPlugin ; import org . rubypeople . rdt . ui . RubyUI ; public class RubySearchScopeFactory { private static RubySearchScopeFactory fgInstance ; private final IRubySearchScope EMPTY_SCOPE = SearchEngine . createRubySearchScope ( new IRubyElement [ ] { } ) ; private RubySearchScopeFactory ( ) { } public static RubySearchScopeFactory getInstance ( ) { if ( fgInstance == null ) fgInstance = new RubySearchScopeFactory ( ) ; return fgInstance ; } public IWorkingSet [ ] queryWorkingSets ( ) throws RubyModelException { Shell shell = RubyPlugin . getActiveWorkbenchShell ( ) ; if ( shell == null ) return null ; IWorkingSetSelectionDialog dialog = PlatformUI . getWorkbench ( ) . getWorkingSetManager ( ) . createWorkingSetSelectionDialog ( shell , true ) ; if ( dialog . open ( ) == Window . OK ) { IWorkingSet [ ] workingSets = dialog . getSelection ( ) ; if ( workingSets . length > 0 ) return workingSets ; } return null ; } public IRubySearchScope createRubySearchScope ( IWorkingSet [ ] workingSets , boolean includeRubyVMLibraries ) { if ( workingSets == null || workingSets . length < 1 ) return EMPTY_SCOPE ; Set rubyElements = new HashSet ( workingSets . length * 10 ) ; for ( int i = 0 ; i < workingSets . length ; i ++ ) { IWorkingSet workingSet = workingSets [ i ] ; if ( workingSet . isEmpty ( ) && workingSet . isAggregateWorkingSet ( ) ) { return createWorkspaceScope ( includeRubyVMLibraries ) ; } addRubyElements ( rubyElements , workingSet ) ; } return createRubySearchScope ( rubyElements , includeRubyVMLibraries ) ; } public IRubySearchScope createRubySearchScope ( IWorkingSet workingSet , boolean includeRubyVMLibraries ) { Set rubyElements = new HashSet ( 10 ) ; if ( workingSet . isEmpty ( ) && workingSet . isAggregateWorkingSet ( ) ) { return createWorkspaceScope ( includeRubyVMLibraries ) ; } addRubyElements ( rubyElements , workingSet ) ; return createRubySearchScope ( rubyElements , includeRubyVMLibraries ) ; } public IRubySearchScope createRubySearchScope ( IResource [ ] resources , boolean includeRubyVMLibraries ) { if ( resources == null ) return EMPTY_SCOPE ; Set rubyElements = new HashSet ( resources . length ) ; addRubyElements ( rubyElements , resources ) ; return createRubySearchScope ( rubyElements , includeRubyVMLibraries ) ; } public IRubySearchScope createRubySearchScope ( ISelection selection , boolean includeRubyVMLibraries ) { return createRubySearchScope ( getRubyElements ( selection ) , includeRubyVMLibraries ) ; } public IRubySearchScope createRubyProjectSearchScope ( String [ ] projectNames , boolean includeRubyVMLibraries ) { ArrayList res = new ArrayList ( ) ; IWorkspaceRoot root = ResourcesPlugin . getWorkspace ( ) . getRoot ( ) ; for ( int i = 0 ; i < projectNames . length ; i ++ ) { IRubyProject project = RubyCore . create ( root . getProject ( projectNames [ i ] ) ) ; if ( project . exists ( ) ) { res . add ( project ) ; } } return createRubySearchScope ( res , includeRubyVMLibraries ) ; } public IRubySearchScope createRubyProjectSearchScope ( IRubyProject project , boolean includeRubyVMLibraries ) { return SearchEngine . createRubySearchScope ( new IRubyElement [ ] { project } , getSearchFlags ( includeRubyVMLibraries ) ) ; } public IRubySearchScope createRubyProjectSearchScope ( IEditorInput editorInput , boolean includeRubyVMLibraries ) { IRubyElement elem = RubyUI . getEditorInputRubyElement ( editorInput ) ; if ( elem != null ) { IRubyProject project = elem . getRubyProject ( ) ; if ( project != null ) { return createRubyProjectSearchScope ( project , includeRubyVMLibraries ) ; } } return EMPTY_SCOPE ; } public String getWorkspaceScopeDescription ( boolean includeRubyVMLibraries ) { return includeRubyVMLibraries ? SearchMessages . WorkspaceScope : SearchMessages . WorkspaceScopeNoJRE ; } public String getProjectScopeDescription ( String [ ] projectNames , boolean includeRubyVMLibraries ) { if ( projectNames . length == 0 ) { return SearchMessages . RubySearchScopeFactory_undefined_projects ; } String scopeDescription ; if ( projectNames . length == 1 ) { String label = includeRubyVMLibraries ? SearchMessages . EnclosingProjectScope : SearchMessages . EnclosingProjectScopeNoJRE ; scopeDescription = Messages . format ( label , projectNames [ 0 ] ) ; } else if ( projectNames . length == 2 ) { String label = includeRubyVMLibraries ? SearchMessages . EnclosingProjectsScope2 : SearchMessages . EnclosingProjectsScope2NoJRE ; scopeDescription = Messages . format ( label , new String [ ] { projectNames [ 0 ] , projectNames [ 1 ] } ) ; } else { String label = includeRubyVMLibraries ? SearchMessages . EnclosingProjectsScope : SearchMessages . EnclosingProjectsScopeNoJRE ; scopeDescription = Messages . format ( label , new String [ ] { projectNames [ 0 ] , projectNames [ 1 ] } ) ; } return scopeDescription ; } public String getProjectScopeDescription ( IRubyProject project , boolean includeRubyVMLibraries ) { if ( includeRubyVMLibraries ) { return Messages . format ( SearchMessages . ProjectScope , project . getElementName ( ) ) ; } else { return Messages . format ( SearchMessages . ProjectScopeNoJRE , project . getElementName ( ) ) ; } } public String getProjectScopeDescription ( IEditorInput editorInput , boolean includeRubyVMLibraries ) { IRubyElement elem = RubyUI . getEditorInputRubyElement ( editorInput ) ; if ( elem != null ) { IRubyProject project = elem . getRubyProject ( ) ; if ( project != null ) { return getProjectScopeDescription ( project , includeRubyVMLibraries ) ; } } return Messages . format ( SearchMessages . ProjectScope , "" ) ; } public String getHierarchyScopeDescription ( IType type ) { return Messages . format ( SearchMessages . HierarchyScope , new String [ ] { type . getElementName ( ) } ) ; } public String getSelectionScopeDescription ( IRubyElement [ ] rubyElements , boolean includeRubyVMLibraries ) { if ( rubyElements . length == 0 ) { return SearchMessages . RubySearchScopeFactory_undefined_selection ; } String scopeDescription ; if ( rubyElements . length == 1 ) { String label = includeRubyVMLibraries ? SearchMessages . SingleSelectionScope : SearchMessages . SingleSelectionScopeNoJRE ; scopeDescription = Messages . format ( label , rubyElements [ 0 ] . getElementName ( ) ) ; } else if ( rubyElements . length == 1 ) { String label = includeRubyVMLibraries ? SearchMessages . DoubleSelectionScope : SearchMessages . DoubleSelectionScopeNoJRE ; scopeDescription = Messages . format ( label , new String [ ] { rubyElements [ 0 ] . getElementName ( ) , rubyElements [ 1 ] . getElementName ( ) } ) ; } else { String label = includeRubyVMLibraries ? SearchMessages . SelectionScope : SearchMessages . SelectionScopeNoJRE ; scopeDescription = Messages . format ( label , new String [ ] { rubyElements [ 0 ] . getElementName ( ) , rubyElements [ 1 ] . getElementName ( ) } ) ; } return scopeDescription ; } public String getWorkingSetScopeDescription ( IWorkingSet [ ] workingSets , boolean includeRubyVMLibraries ) { if ( workingSets . length == 0 ) { return SearchMessages . RubySearchScopeFactory_undefined_workingsets ; } if ( workingSets . length == 1 ) { String label = includeRubyVMLibraries ? SearchMessages . SingleWorkingSetScope : SearchMessages . SingleWorkingSetScopeNoJRE ; return Messages . format ( label , workingSets [ 0 ] . getLabel ( ) ) ; } Arrays . sort ( workingSets , new WorkingSetComparator ( ) ) ; if ( workingSets . length == 2 ) { String label = includeRubyVMLibraries ? SearchMessages . DoubleWorkingSetScope : SearchMessages . DoubleWorkingSetScopeNoJRE ; return Messages . format ( label , new String [ ] { workingSets [ 0 ] . getLabel ( ) , workingSets [ 1 ] . getLabel ( ) } ) ; } String label = includeRubyVMLibraries ? SearchMessages . WorkingSetsScope : SearchMessages . WorkingSetsScopeNoJRE ; return Messages . format ( label , new String [ ] { workingSets [ 0 ] . getLabel ( ) , workingSets [ 1 ] . getLabel ( ) } ) ; } public IProject [ ] getProjects ( IRubySearchScope scope ) { IPath [ ] paths = scope . enclosingProjectsAndJars ( ) ; HashSet temp = new HashSet ( ) ; for ( int i = 0 ; i < paths . length ; i ++ ) { IResource resource = ResourcesPlugin . getWorkspace ( ) . getRoot ( ) . findMember ( paths [ i ] ) ; if ( resource != null && resource . getType ( ) == IResource . PROJECT ) temp . add ( resource ) ; } return ( IProject [ ] ) temp . toArray ( new IProject [ temp . size ( ) ] ) ; } public IRubyElement [ ] getRubyElements ( ISelection selection ) { if ( selection instanceof IStructuredSelection && ! selection . isEmpty ( ) ) { return getRubyElements ( ( ( IStructuredSelection ) selection ) . toArray ( ) ) ; } else { return new IRubyElement [ 0 ] ; } } private IRubyElement [ ] getRubyElements ( Object [ ] elements ) { if ( elements . length == 0 ) return new IRubyElement [ 0 ] ; Set result = new HashSet ( elements . length ) ; for ( int i = 0 ; i < elements . length ; i ++ ) { Object selectedElement = elements [ i ] ; if ( selectedElement instanceof IRubyElement ) { addRubyElements ( result , ( IRubyElement ) selectedElement ) ; } else if ( selectedElement instanceof IResource ) { addRubyElements ( result , ( IResource ) selectedElement ) ; } else if ( selectedElement instanceof IWorkingSet ) { IWorkingSet ws = ( IWorkingSet ) selectedElement ; addRubyElements ( result , ws ) ; } else if ( selectedElement instanceof IAdaptable ) { IResource resource = ( IResource ) ( ( IAdaptable ) selectedElement ) . getAdapter ( IResource . class ) ; if ( resource != null ) addRubyElements ( result , resource ) ; } } return ( IRubyElement [ ] ) result . toArray ( new IRubyElement [ result . size ( ) ] ) ; } public IRubySearchScope createRubySearchScope ( IRubyElement [ ] rubyElements , boolean includeRubyVMLibraries ) { if ( rubyElements . length == 0 ) return EMPTY_SCOPE ; return SearchEngine . createRubySearchScope ( rubyElements , getSearchFlags ( includeRubyVMLibraries ) ) ; } private IRubySearchScope createRubySearchScope ( Collection rubyElements , boolean includeRubyVMLibraries ) { if ( rubyElements . isEmpty ( ) ) return EMPTY_SCOPE ; IRubyElement [ ] elementArray = ( IRubyElement [ ] ) rubyElements . toArray ( new IRubyElement [ rubyElements . size ( ) ] ) ; return SearchEngine . createRubySearchScope ( elementArray , getSearchFlags ( includeRubyVMLibraries ) ) ; }
2,295
<s> package com . asakusafw . compiler . flow . example ; import com . asakusafw . compiler . operator . model . MockFoo ;
2,296
<s> package de . fuberlin . wiwiss . d2rq . nodes ; import java . util . Collections ; import java . util . List ; import java . util . Set ; import com . hp . hpl . jena . graph . Node ; import de . fuberlin . wiwiss . d2rq . algebra . ColumnRenamer ; import de . fuberlin . wiwiss . d2rq . algebra . OrderSpec ; import de . fuberlin
2,297
<s> package edsdk ; import com . sun . jna . NativeLong ; import com . sun . jna . Structure ; public class EdsFocusPoint extends Structure { public NativeLong valid ; public NativeLong selected ; public NativeLong justFocus ; public EdsRect rect ; public NativeLong reserved ; public EdsFocusPoint ( ) { super ( ) ; initFieldOrder ( ) ; } protected void initFieldOrder ( ) { setFieldOrder ( new java . lang . String [ ] { "valid" , "selected" , "justFocus" , "rect" , "reserved" } ) ; } public EdsFocusPoint ( NativeLong valid , NativeLong selected , NativeLong justFocus , EdsRect rect
2,298
<s> package net . sf . sveditor . core . db ; import java . util . List ; import net . sf . sveditor . core . db . expr . SVDBExpr ; import net . sf . sveditor . core . db . stmt . SVDBParamPortDecl ; public class SVDBCovergroup extends SVDBModIfcDecl { public enum BinsKW { Bins , IllegalBins , IgnoreBins } ; public SVDBExpr fCoverageEventExpr ; public List < SVDBParamPortDecl > fParamPort ; public SVDBCovergroup ( ) { super ( "" , SVDBItemType . Covergroup ) ; } public SVDBCovergroup ( String name ) { super ( name , SVDBItemType . Covergroup ) ; } public void setParamPort ( List < SVDBParamPortDecl > params ) { fParamPort = params ; } public List < SVDBParamPortDecl > getParamPort ( ) { return fParamPort ; } public void setCoverageEvent ( SVDBExpr expr ) { fCoverageEventExpr = expr ; } public SVDBExpr getCoverageEvent
2,299
<s> package com . team1160 . scouting . h2 ; import java . sql . PreparedStatement ; import java . sql . ResultSet ; import java . sql . SQLException ; import java . util . ArrayList ; import java . util . Collections ; import java . util . LinkedHashMap ; import java . util . List ; import java . util . Map ; public class CommentTable extends H2Table { public CommentTable ( String database ) throws ClassNotFoundException , SQLException { super ( database ) ; statement . executeUpdate ( "" ) ; } public void insert ( int team , int match , String comment ) throws SQLException { PreparedStatement prep = connection . prepareStatement ( "" ) ; prep . setInt ( 1 , team ) ; prep . setInt ( 2 , match ) ; prep . setString ( 3 , comment ) ; prep . addBatch ( ) ; connection . setAutoCommit ( false ) ; prep . executeBatch ( ) ; connection . setAutoCommit ( true ) ; } public String getComment ( int team , int match ) throws SQLException { ResultSet rs ; rs = statement . executeQuery ( "" + Integer . toString ( team ) + "and match=" + Integer . toString ( match ) ) ; rs . next ( ) ; return rs . getString ( "comment" ) ; } public Map < Integer , String > getComments ( int team ) throws SQLException { ResultSet rs ; rs = statement . executeQuery ( "" + Integer . toString ( team ) ) ; Map < Integer , String > comments = new LinkedHashMap < Integer , String > ( ) ; while ( rs . next ( ) ) { Integer key ; String value ; key = rs . getInt ( "match" ) ; value = rs .