idx int64 0 165k | question stringlengths 73 4.15k | target stringlengths 5 918 | len_question int64 21 890 | len_target int64 3 255 |
|---|---|---|---|---|
14,700 | public Map < String , String > getUriVariablesForEntityDelete ( BullhornEntityInfo entityInfo , Integer id ) { Map < String , String > uriVariables = new LinkedHashMap < String , String > ( ) ; addModifyingUriVariables ( uriVariables , entityInfo ) ; uriVariables . put ( ID , id . toString ( ) ) ; return uriVariables ;... | Returns the uri variables needed for an entity DELETE | 92 | 12 |
14,701 | public Map < String , String > getUriVariablesForEntityInsert ( BullhornEntityInfo entityInfo ) { Map < String , String > uriVariables = new LinkedHashMap < String , String > ( ) ; addModifyingUriVariables ( uriVariables , entityInfo ) ; return uriVariables ; } | Returns the uri variables needed for the entity PUT request . | 72 | 13 |
14,702 | public Map < String , String > getUriVariablesForQueryWithPost ( BullhornEntityInfo entityInfo , Set < String > fieldSet , QueryParams params ) { Map < String , String > uriVariables = params . getParameterMap ( ) ; this . addCommonUriVariables ( fieldSet , entityInfo , uriVariables ) ; return uriVariables ; } | Returns the uri variables needed for a query request minus where since that will be in the body | 84 | 19 |
14,703 | public Map < String , String > getUriVariablesForQuery ( BullhornEntityInfo entityInfo , String where , Set < String > fieldSet , QueryParams params ) { Map < String , String > uriVariables = params . getParameterMap ( ) ; this . addCommonUriVariables ( fieldSet , entityInfo , uriVariables ) ; uriVariables . put ( WHER... | Returns the uri variables needed for a query request | 97 | 10 |
14,704 | public Map < String , String > getUriVariablesForSearchWithPost ( BullhornEntityInfo entityInfo , Set < String > fieldSet , SearchParams params ) { Map < String , String > uriVariables = params . getParameterMap ( ) ; this . addCommonUriVariables ( fieldSet , entityInfo , uriVariables ) ; return uriVariables ; } | Returns the uri variables needed for a search request minus query | 84 | 12 |
14,705 | public Map < String , String > getUriVariablesForSearch ( BullhornEntityInfo entityInfo , String query , Set < String > fieldSet , SearchParams params ) { Map < String , String > uriVariables = params . getParameterMap ( ) ; this . addCommonUriVariables ( fieldSet , entityInfo , uriVariables ) ; uriVariables . put ( QU... | Returns the uri variables needed for a search request | 98 | 10 |
14,706 | public Map < String , String > getUriVariablesForIdSearch ( BullhornEntityInfo entityInfo , String query , SearchParams params ) { Map < String , String > uriVariables = params . getParameterMap ( ) ; uriVariables . put ( BH_REST_TOKEN , bullhornApiRest . getBhRestToken ( ) ) ; uriVariables . put ( ENTITY_TYPE , entity... | Returns the uri variables needed for a id search request | 123 | 11 |
14,707 | public Map < String , String > getUriVariablesForResumeFileParse ( ResumeFileParseParams params , MultipartFile resume ) { if ( params == null ) { params = ParamFactory . resumeFileParseParams ( ) ; } Map < String , String > uriVariables = params . getParameterMap ( ) ; String bhRestToken = bullhornApiRest . getBhRestT... | Returns the uri variables needed for a resume file request | 147 | 11 |
14,708 | public Map < String , String > getUriVariablesForResumeTextParse ( ResumeTextParseParams params ) { if ( params == null ) { params = ParamFactory . resumeTextParseParams ( ) ; } Map < String , String > uriVariables = params . getParameterMap ( ) ; String bhRestToken = bullhornApiRest . getBhRestToken ( ) ; uriVariables... | Returns the uri variables needed for a resume text request | 119 | 11 |
14,709 | public Map < String , String > getUriVariablesForGetFile ( BullhornEntityInfo entityInfo , Integer entityId , Integer fileId ) { Map < String , String > uriVariables = new LinkedHashMap < String , String > ( ) ; String bhRestToken = bullhornApiRest . getBhRestToken ( ) ; uriVariables . put ( BH_REST_TOKEN , bhRestToken... | Returns the uri variables needed for a get file request | 167 | 11 |
14,710 | public Map < String , String > getUriVariablesForCorpNotes ( Integer clientCorporationID , Set < String > fieldSet , CorpNotesParams params ) { if ( params == null ) { params = ParamFactory . corpNotesParams ( ) ; } Map < String , String > uriVariables = params . getParameterMap ( ) ; String bhRestToken = bullhornApiRe... | Returns the uri variables needed for a get corp notes call | 180 | 12 |
14,711 | private void addModifyingUriVariables ( Map < String , String > uriVariables , BullhornEntityInfo entityInfo ) { String bhRestToken = bullhornApiRest . getBhRestToken ( ) ; uriVariables . put ( BH_REST_TOKEN , bhRestToken ) ; uriVariables . put ( ENTITY_TYPE , entityInfo . getName ( ) ) ; uriVariables . put ( EXECUTE_F... | Adds common URI Variables for calls that are creating updating or deleting data . | 136 | 15 |
14,712 | public Map < String , String > getUriVariablesForFastFind ( String query , FastFindParams params ) { Map < String , String > uriVariables = params . getParameterMap ( ) ; uriVariables . put ( BH_REST_TOKEN , bullhornApiRest . getBhRestToken ( ) ) ; uriVariables . put ( QUERY , query ) ; return uriVariables ; } | Returns the uri variables needed for a fastFind request | 96 | 11 |
14,713 | protected < C extends CrudResponse , T extends UpdateEntity > List < C > handleMultipleUpdates ( List < T > entityList ) { if ( entityList == null || entityList . isEmpty ( ) ) { return Collections . emptyList ( ) ; } List < EntityUpdateWorker < C > > taskList = new ArrayList < EntityUpdateWorker < C > > ( ) ; for ( T ... | Spins off threads that will call handleUpdateEntity for each entity . | 131 | 14 |
14,714 | protected < P extends ParsedResume > P handleParseResumeText ( String resume , ResumeTextParseParams params ) { Map < String , String > uriVariables = restUriVariablesFactory . getUriVariablesForResumeTextParse ( params ) ; String url = restUrlFactory . assembleParseResumeTextUrl ( params ) ; JSONObject resumeInfoToPos... | Handles the parsing of a resume text . Contains retry logic . | 188 | 14 |
14,715 | protected ParsedResume parseResume ( String url , Object requestPayLoad , Map < String , String > uriVariables ) { ParsedResume response = null ; for ( int tryNumber = 1 ; tryNumber <= RESUME_PARSE_RETRY ; tryNumber ++ ) { try { response = this . performPostResumeRequest ( url , requestPayLoad , uriVariables ) ; break ... | Makes the call to the resume parser . If parse fails this method will retry RESUME_PARSE_RETRY number of times . | 138 | 29 |
14,716 | protected List < FileWrapper > handleGetAllFileContentWithMetaData ( Class < ? extends FileEntity > type , Integer entityId ) { List < FileMeta > metaDataList = this . handleGetEntityMetaFiles ( type , entityId ) ; // Create an ExecutorService with the number of processors available to the Java virtual machine. Executo... | This method will get all the meta data and then handle the fetching of FileContent in a multi - threaded fashion . | 478 | 24 |
14,717 | protected FileWrapper handleGetFileContentWithMetaData ( Class < ? extends FileEntity > type , Integer entityId , Integer fileId ) { FileWrapper fileWrapper = null ; try { FileContent fileContent = this . handleGetFileContent ( type , entityId , fileId ) ; List < FileMeta > metaDataList = this . handleGetEntityMetaFile... | Makes the api call to get both the file content and filemeta data and combines those two to a FileWrapper | 202 | 24 |
14,718 | protected List < FileMeta > handleGetEntityMetaFiles ( Class < ? extends FileEntity > type , Integer entityId ) { Map < String , String > uriVariables = restUriVariablesFactory . getUriVariablesForGetEntityMetaFiles ( BullhornEntityInfo . getTypesRestEntityName ( type ) , entityId ) ; String url = restUrlFactory . asse... | Makes the api call to get the FileMeta data for an entity | 202 | 14 |
14,719 | protected FileContent handleGetFileContent ( Class < ? extends FileEntity > type , Integer entityId , Integer fileId ) { Map < String , String > uriVariables = restUriVariablesFactory . getUriVariablesForGetFile ( BullhornEntityInfo . getTypesRestEntityName ( type ) , entityId , fileId ) ; String url = restUrlFactory .... | Makes the api call to get the file content | 154 | 10 |
14,720 | protected FileWrapper handleAddFileWithMultipartFile ( Class < ? extends FileEntity > type , Integer entityId , MultipartFile multipartFile , String externalId , FileParams params , boolean deleteFile ) { MultiValueMap < String , Object > multiValueMap = null ; try { multiValueMap = restFileManager . addFileToMultiValu... | Makes the api call to add files to an entity . Takes a MultipartFile . | 210 | 19 |
14,721 | protected FileWrapper handleAddFileAndUpdateCandidateDescription ( Integer candidateId , File file , String candidateDescription , String externalId , FileParams params , boolean deleteFile ) { // first add the file FileWrapper fileWrapper = this . handleAddFileWithFile ( Candidate . class , candidateId , file , extern... | Handles logic to add the file to the candidate entity AND updating the candidate . description with the resume text . | 172 | 22 |
14,722 | protected < P extends ParsedResume > P addFileThenHandleParseResume ( Class < ? extends FileEntity > type , Integer entityId , MultipartFile multipartFile , String externalId , FileParams fileParams , ResumeFileParseParams params ) { FileWrapper fileWrapper = handleAddFileWithMultipartFile ( type , entityId , multipart... | Makes the api call to both parse the resume and then attach the file . File is only attached if the resume parse was successful . | 151 | 27 |
14,723 | protected FileApiResponse handleDeleteFile ( Class < ? extends FileEntity > type , Integer entityId , Integer fileId ) { Map < String , String > uriVariables = restUriVariablesFactory . getUriVariablesDeleteFile ( BullhornEntityInfo . getTypesRestEntityName ( type ) , entityId , fileId ) ; String url = restUrlFactory .... | Makes the api call to delete a file attached to an entity . | 139 | 14 |
14,724 | protected < C extends CrudResponse , T extends AssociationEntity > C handleAssociateWithEntity ( Class < T > type , Integer entityId , AssociationField < T , ? extends BullhornEntity > associationName , Set < Integer > associationIds ) { Map < String , String > uriVariables = restUriVariablesFactory . getUriVariablesFo... | Makes the api call to create associations . | 213 | 9 |
14,725 | public < T extends BullhornEntity > CrudResponse handleHttpFourAndFiveHundredErrors ( CrudResponse response , HttpStatusCodeException error , Integer id ) { response . setChangedEntityId ( id ) ; Message message = new Message ( ) ; message . setDetailMessage ( error . getResponseBodyAsString ( ) ) ; message . setSeveri... | Updates the passed in CrudResponse with the HttpStatusCodeException thrown by the RestTemplate . | 154 | 21 |
14,726 | private void displayMBeans ( HttpServletRequest request , HttpServletResponse response ) throws ServletException , IOException { Iterator mbeans ; try { mbeans = getDomainData ( ) ; } catch ( Exception e ) { throw new ServletException ( "Failed to get MBeans" , e ) ; } request . setAttribute ( "mbeans" , mbeans ) ; Req... | Display all MBeans | 129 | 5 |
14,727 | private void inspectMBean ( HttpServletRequest request , HttpServletResponse response ) throws ServletException , IOException { String name = request . getParameter ( "name" ) ; if ( trace ) log . trace ( "inspectMBean, name=" + name ) ; try { MBeanData data = getMBeanData ( name ) ; request . setAttribute ( "mbeanData... | Display a MBeans attributes and operations | 166 | 8 |
14,728 | private void updateAttributes ( HttpServletRequest request , HttpServletResponse response ) throws ServletException , IOException { String name = request . getParameter ( "name" ) ; if ( trace ) log . trace ( "updateAttributes, name=" + name ) ; Enumeration paramNames = request . getParameterNames ( ) ; HashMap < Strin... | Update the writable attributes of a MBean | 329 | 10 |
14,729 | private void invokeOpByName ( HttpServletRequest request , HttpServletResponse response ) throws ServletException , IOException { String name = request . getParameter ( "name" ) ; if ( trace ) log . trace ( "invokeOpByName, name=" + name ) ; String [ ] argTypes = request . getParameterValues ( "argType" ) ; String [ ] ... | Invoke a MBean operation given the method name and its signature . | 240 | 15 |
14,730 | private MBeanData getMBeanData ( final String name ) throws PrivilegedActionException { return AccessController . doPrivileged ( new PrivilegedExceptionAction < MBeanData > ( ) { public MBeanData run ( ) throws Exception { return Server . getMBeanData ( name ) ; } } ) ; } | Get the MBean data for a bean | 71 | 9 |
14,731 | @ SuppressWarnings ( { "unchecked" } ) private AttributeList setAttributes ( final String name , final HashMap attributes ) throws PrivilegedActionException { return AccessController . doPrivileged ( new PrivilegedExceptionAction < AttributeList > ( ) { public AttributeList run ( ) throws Exception { return Server . se... | Set attributes on a MBean | 83 | 7 |
14,732 | private void writeTransaction ( Definition def , Writer out , int indent ) throws IOException { writeWithIndent ( out , indent , "/**\n" ) ; writeWithIndent ( out , indent , " * Returns an <code>javax.resource.spi.LocalTransaction</code> instance.\n" ) ; writeWithIndent ( out , indent , " *\n" ) ; writeWithIndent ( out... | Output Transaction method | 588 | 3 |
14,733 | private static Class < ? > [ ] getFields ( Class < ? > clz ) { List < Class < ? > > result = new ArrayList < Class < ? > > ( ) ; Class < ? > c = clz ; while ( ! c . equals ( Object . class ) ) { try { Field [ ] fields = SecurityActions . getDeclaredFields ( c ) ; if ( fields . length > 0 ) { for ( Field f : fields ) { ... | Get the classes for all the fields | 272 | 7 |
14,734 | public void execute ( Runnable job ) { try { executor . execute ( job ) ; } catch ( RejectedExecutionException e ) { log . warnf ( e , "Job rejected: %s" , job ) ; } } | Execute a job | 51 | 4 |
14,735 | public int getIdleThreads ( ) { if ( executor instanceof ThreadPoolExecutor ) { final ThreadPoolExecutor tpe = ( ThreadPoolExecutor ) executor ; return tpe . getPoolSize ( ) - tpe . getActiveCount ( ) ; } return - 1 ; } | Get the number of idle threads | 64 | 6 |
14,736 | public boolean isLowOnThreads ( ) { if ( executor instanceof ThreadPoolExecutor ) { final ThreadPoolExecutor tpe = ( ThreadPoolExecutor ) executor ; return tpe . getActiveCount ( ) >= tpe . getMaximumPoolSize ( ) ; } return false ; } | Is the pool low on threads ? | 64 | 7 |
14,737 | public static Pool createPool ( String type , ConnectionManager cm , PoolConfiguration pc ) { if ( type == null || type . equals ( "" ) ) return new DefaultPool ( cm , pc ) ; type = type . toLowerCase ( Locale . US ) ; switch ( type ) { case "default" : return new DefaultPool ( cm , pc ) ; case "stable" : return new St... | Create a pool | 200 | 3 |
14,738 | static Set < PasswordCredential > getPasswordCredentials ( final Subject subject ) { if ( System . getSecurityManager ( ) == null ) return subject . getPrivateCredentials ( PasswordCredential . class ) ; return AccessController . doPrivileged ( new PrivilegedAction < Set < PasswordCredential > > ( ) { public Set < Pass... | Get the PasswordCredential from the Subject | 106 | 9 |
14,739 | static StackTraceElement [ ] getStackTrace ( final Thread t ) { if ( System . getSecurityManager ( ) == null ) return t . getStackTrace ( ) ; return AccessController . doPrivileged ( new PrivilegedAction < StackTraceElement [ ] > ( ) { public StackTraceElement [ ] run ( ) { return t . getStackTrace ( ) ; } } ) ; } | Get stack trace | 88 | 3 |
14,740 | public static void main ( String [ ] args ) { boolean quiet = false ; String outputDir = "." ; //put report into current directory by default int arg = 0 ; String [ ] classpath = null ; if ( args . length > 0 ) { while ( args . length > arg + 1 ) { if ( args [ arg ] . startsWith ( "-" ) ) { if ( args [ arg ] . endsWith... | Validator standalone tool | 412 | 4 |
14,741 | protected LocalXAResource getLocalXAResource ( ManagedConnection mc ) throws ResourceException { TransactionalConnectionManager txCM = ( TransactionalConnectionManager ) cm ; LocalXAResource xaResource = null ; String eisProductName = null ; String eisProductVersion = null ; String jndiName = cm . getConnectionManagerC... | Get a LocalXAResource instance | 419 | 8 |
14,742 | protected XAResource getXAResource ( ManagedConnection mc ) throws ResourceException { TransactionalConnectionManager txCM = ( TransactionalConnectionManager ) cm ; XAResource xaResource = null ; if ( cm . getConnectionManagerConfiguration ( ) . isWrapXAResource ( ) ) { String eisProductName = null ; String eisProductV... | Get a XAResource instance | 634 | 7 |
14,743 | @ Override public void prefill ( ) { if ( isShutdown ( ) ) return ; if ( poolConfiguration . isPrefill ( ) ) { ManagedConnectionPool mcp = pools . get ( getPrefillCredential ( ) ) ; if ( mcp == null ) { // Trigger the initial-pool-size prefill by creating the ManagedConnectionPool getManagedConnectionPool ( getPrefillC... | Prefill the connection pool | 113 | 5 |
14,744 | @ Override public Credential getPrefillCredential ( ) { if ( this . prefillCredential == null ) { if ( cm . getSubjectFactory ( ) == null || cm . getConnectionManagerConfiguration ( ) . getSecurityDomain ( ) == null ) { prefillCredential = new Credential ( null , null ) ; } else { prefillCredential = new Credential ( S... | Get prefill credential | 145 | 4 |
14,745 | protected boolean isRarArchive ( URL url ) { if ( url == null ) return false ; return isRarFile ( url ) || isRarDirectory ( url ) ; } | Does the URL represent a . rar archive | 39 | 9 |
14,746 | protected boolean isRarFile ( URL url ) { if ( url != null && url . toExternalForm ( ) . endsWith ( ".rar" ) && ! url . toExternalForm ( ) . startsWith ( "jar" ) ) return true ; return false ; } | Does the URL represent a . rar file | 57 | 9 |
14,747 | @ Override public Object getAnnotation ( ) { try { if ( isOnField ( ) ) { Class < ? > clazz = cl . loadClass ( className ) ; while ( ! clazz . equals ( Object . class ) ) { try { Field field = SecurityActions . getDeclaredField ( clazz , memberName ) ; return field . getAnnotation ( annotationClass ) ; } catch ( Throwa... | Get the annotation . | 321 | 4 |
14,748 | public DataSources parse ( XMLStreamReader reader ) throws Exception { DataSources dataSources = null ; //iterate over tags int iterate ; try { iterate = reader . nextTag ( ) ; } catch ( XMLStreamException e ) { //found a non tag..go on. Normally non-tag found at beginning are comments or DTD declaration iterate = read... | Parse a - ds . xml file | 200 | 9 |
14,749 | public void store ( DataSources metadata , XMLStreamWriter writer ) throws Exception { if ( metadata != null && writer != null ) { writer . writeStartElement ( XML . ELEMENT_DATASOURCES ) ; if ( metadata . getDataSource ( ) != null && ! metadata . getDataSource ( ) . isEmpty ( ) ) { for ( DataSource ds : metadata . get... | Store a - ds . xml file | 252 | 8 |
14,750 | protected void storeDriver ( Driver drv , XMLStreamWriter writer ) throws Exception { writer . writeStartElement ( XML . ELEMENT_DRIVER ) ; if ( drv . getName ( ) != null ) writer . writeAttribute ( XML . ATTRIBUTE_NAME , drv . getValue ( XML . ATTRIBUTE_NAME , drv . getName ( ) ) ) ; if ( drv . getModule ( ) != null )... | Store a driver | 513 | 3 |
14,751 | public static ClassDefinition createClassDefinition ( Serializable s , Class < ? > clz ) { if ( s == null || clz == null ) return null ; String name = clz . getName ( ) ; long serialVersionUID = 0L ; byte [ ] data = null ; ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; InputStream is = null ; try { try { ... | Create a class definition | 288 | 4 |
14,752 | private static Field getSerialVersionUID ( Class < ? > clz ) { Class < ? > c = clz ; while ( c != null ) { try { Field svuf = SecurityActions . getDeclaredField ( clz , "serialVersionUID" ) ; SecurityActions . setAccessible ( svuf ) ; return svuf ; } catch ( Throwable t ) { // No serialVersionUID definition } c = c . g... | Find the serialVersionUID field | 103 | 6 |
14,753 | protected WorkManager parseWorkManager ( XMLStreamReader reader ) throws XMLStreamException , ParserException , ValidateException { WorkManagerSecurity security = null ; while ( reader . hasNext ( ) ) { switch ( reader . nextTag ( ) ) { case END_ELEMENT : { if ( CommonXML . ELEMENT_WORKMANAGER . equals ( reader . getLo... | Parse workmanager element | 243 | 5 |
14,754 | protected void storeAdminObject ( AdminObject ao , XMLStreamWriter writer ) throws Exception { writer . writeStartElement ( CommonXML . ELEMENT_ADMIN_OBJECT ) ; if ( ao . getClassName ( ) != null ) writer . writeAttribute ( CommonXML . ATTRIBUTE_CLASS_NAME , ao . getValue ( CommonXML . ATTRIBUTE_CLASS_NAME , ao . getCl... | Store admin object | 523 | 3 |
14,755 | public static AnnotationScanner getAnnotationScanner ( ) { if ( active != null ) return active ; if ( defaultImplementation == null ) throw new IllegalStateException ( bundle . noAnnotationScanner ( ) ) ; return defaultImplementation ; } | Get the annotation scanner | 54 | 4 |
14,756 | void writeConfigPropsDeclare ( Definition def , Writer out , int indent ) throws IOException { if ( getConfigProps ( def ) == null ) return ; for ( int i = 0 ; i < getConfigProps ( def ) . size ( ) ; i ++ ) { writeWithIndent ( out , indent , "/** " + getConfigProps ( def ) . get ( i ) . getName ( ) + " */\n" ) ; if ( d... | Output Configuration Properties Declare | 260 | 5 |
14,757 | void writeConfigProps ( Definition def , Writer out , int indent ) throws IOException { if ( getConfigProps ( def ) == null ) return ; for ( int i = 0 ; i < getConfigProps ( def ) . size ( ) ; i ++ ) { String name = getConfigProps ( def ) . get ( i ) . getName ( ) ; String upcaseName = upcaseFirst ( name ) ; //set writ... | Output Configuration Properties | 457 | 3 |
14,758 | public synchronized Object verifyConnectionListener ( ConnectionListener cl ) throws ResourceException { for ( Map . Entry < Object , Map < ManagedConnectionPool , ConnectionListener > > entry : transactionMap . entrySet ( ) ) { if ( entry . getValue ( ) . values ( ) . contains ( cl ) ) { try { TransactionalConnectionM... | Verify if a connection listener is already in use | 181 | 10 |
14,759 | public static List < Failure > validateConfigPropertiesType ( ValidateClass vo , String section , String failMsg ) { List < Failure > failures = new ArrayList < Failure > ( 1 ) ; for ( ConfigProperty cpmd : vo . getConfigProperties ( ) ) { try { containGetOrIsMethod ( vo , "get" , cpmd , section , failMsg , failures ) ... | validate ConfigProperties type | 148 | 6 |
14,760 | private static void containGetOrIsMethod ( ValidateClass vo , String getOrIs , ConfigProperty cpmd , String section , String failMsg , List < Failure > failures ) throws NoSuchMethodException { String methodName = getOrIs + cpmd . getConfigPropertyName ( ) . getValue ( ) . substring ( 0 , 1 ) . toUpperCase ( Locale . U... | validated object contain get or is Method | 358 | 8 |
14,761 | protected org . ironjacamar . core . connectionmanager . listener . ConnectionListener getConnectionListener ( Credential credential ) throws ResourceException { org . ironjacamar . core . connectionmanager . listener . ConnectionListener result = null ; Exception failure = null ; // First attempt boolean isInterrupted... | Get a connection listener | 459 | 4 |
14,762 | private org . ironjacamar . core . connectionmanager . listener . ConnectionListener associateConnectionListener ( Credential credential , Object connection ) throws ResourceException { log . tracef ( "associateConnectionListener(%s, %s)" , credential , connection ) ; if ( isShutdown ( ) ) { throw new ResourceException... | Associate a ConnectionListener | 609 | 5 |
14,763 | private boolean shouldEnlist ( ConnectionListener cl ) { if ( cmConfiguration . isEnlistment ( ) && cl . getManagedConnection ( ) instanceof LazyEnlistableManagedConnection ) return false ; return true ; } | Should enlist the ConnectionListener | 49 | 5 |
14,764 | static WARClassLoader createWARClassLoader ( final Kernel kernel , final ClassLoader parent ) { return AccessController . doPrivileged ( new PrivilegedAction < WARClassLoader > ( ) { public WARClassLoader run ( ) { return new WARClassLoader ( kernel , parent ) ; } } ) ; } | Create a WARClassLoader | 63 | 5 |
14,765 | static WebAppClassLoader createWebAppClassLoader ( final ClassLoader cl , final WebAppContext wac ) { return AccessController . doPrivileged ( new PrivilegedAction < WebAppClassLoader > ( ) { public WebAppClassLoader run ( ) { try { return new WebAppClassLoader ( cl , wac ) ; } catch ( IOException ioe ) { return null ;... | Create a WebClassLoader | 87 | 5 |
14,766 | void generateRaCode ( Definition def ) { if ( def . isUseRa ( ) ) { generateClassCode ( def , "Ra" ) ; generateClassCode ( def , "RaMeta" ) ; } if ( def . isGenAdminObject ( ) ) { for ( int i = 0 ; i < def . getAdminObjects ( ) . size ( ) ; i ++ ) { generateMultiAdminObjectClassCode ( def , "AoImpl" , i ) ; generateMul... | generate resource adapter code | 121 | 5 |
14,767 | void generateOutboundCode ( Definition def ) { if ( def . isSupportOutbound ( ) ) { if ( def . getMcfDefs ( ) == null ) throw new IllegalStateException ( "Should define at least one mcf class" ) ; for ( int num = 0 ; num < def . getMcfDefs ( ) . size ( ) ; num ++ ) { generateMultiMcfClassCode ( def , "Mcf" , num ) ; ge... | generate outbound code | 305 | 5 |
14,768 | void generateInboundCode ( Definition def ) { if ( def . isSupportInbound ( ) ) { if ( def . isDefaultPackageInbound ( ) ) generateClassCode ( def , "Ml" , "inflow" ) ; generateClassCode ( def , "As" , "inflow" ) ; generateClassCode ( def , "Activation" , "inflow" ) ; generatePackageInfo ( def , "main" , "inflow" ) ; }... | generate inbound code | 102 | 5 |
14,769 | void generateMBeanCode ( Definition def ) { if ( def . isSupportOutbound ( ) ) { generateClassCode ( def , "MbeanInterface" , "mbean" ) ; generateClassCode ( def , "MbeanImpl" , "mbean" ) ; generatePackageInfo ( def , "main" , "mbean" ) ; } } | generate MBean code | 77 | 6 |
14,770 | void generateClassCode ( Definition def , String className , String subDir ) { if ( className == null || className . equals ( "" ) ) return ; try { String clazzName = this . getClass ( ) . getPackage ( ) . getName ( ) + ".code." + className + "CodeGen" ; String javaFile = Definition . class . getMethod ( "get" + classN... | generate class code | 285 | 4 |
14,771 | void generateMultiMcfClassCode ( Definition def , String className , int num ) { if ( className == null || className . equals ( "" ) ) return ; if ( num < 0 || num + 1 > def . getMcfDefs ( ) . size ( ) ) return ; try { String clazzName = this . getClass ( ) . getPackage ( ) . getName ( ) + ".code." + className + "CodeG... | generate multi mcf class code | 295 | 7 |
14,772 | void generateMultiAdminObjectClassCode ( Definition def , String className , int num ) { if ( className == null || className . equals ( "" ) ) return ; try { String clazzName = this . getClass ( ) . getPackage ( ) . getName ( ) + ".code." + className + "CodeGen" ; Class < ? > clazz = Class . forName ( clazzName , true ... | generate multi admin object class code | 329 | 7 |
14,773 | void generateAntIvyXml ( Definition def , String outputDir ) { try { FileWriter antfw = Utils . createFile ( "build.xml" , outputDir ) ; BuildIvyXmlGen bxGen = new BuildIvyXmlGen ( ) ; bxGen . generate ( def , antfw ) ; antfw . close ( ) ; FileWriter ivyfw = Utils . createFile ( "ivy.xml" , outputDir ) ; IvyXmlGen ixGe... | generate ant + ivy build . xml and ivy files | 226 | 13 |
14,774 | void generateGradle ( Definition def , String outputDir ) { try { FileWriter bgfw = Utils . createFile ( "build.gradle" , outputDir ) ; BuildGradleGen bgGen = new BuildGradleGen ( ) ; bgGen . generate ( def , bgfw ) ; bgfw . close ( ) ; } catch ( IOException ioe ) { ioe . printStackTrace ( ) ; } } | generate gradle build . gradle | 96 | 8 |
14,775 | void generateRaXml ( Definition def , String outputDir ) { if ( ! def . isUseAnnotation ( ) ) { try { outputDir = outputDir + File . separatorChar + "src" + File . separatorChar + "main" + File . separatorChar + "resources" ; FileWriter rafw = Utils . createFile ( "ra.xml" , outputDir + File . separatorChar + "META-INF... | generate ra . xml | 159 | 5 |
14,776 | void generateIronjacamarXml ( Definition def , String outputDir ) { try { String resourceDir = outputDir + File . separatorChar + "src" + File . separatorChar + "main" + File . separatorChar + "resources" ; writeIronjacamarXml ( def , resourceDir ) ; if ( def . getBuild ( ) . equals ( "maven" ) ) { String rarDir = outp... | generate ant ironjacamar . xml | 160 | 8 |
14,777 | void generateMbeanXml ( Definition def , String outputDir ) { String mbeanName = def . getDefaultValue ( ) . toLowerCase ( Locale . US ) ; if ( def . getRaPackage ( ) != null && ! def . getRaPackage ( ) . equals ( "" ) ) { if ( def . getRaPackage ( ) . indexOf ( ' ' ) >= 0 ) { mbeanName = def . getRaPackage ( ) . subst... | generate mbean deployment xml | 267 | 6 |
14,778 | void generatePackageInfo ( Definition def , String outputDir , String subDir ) { try { FileWriter fw ; PackageInfoGen phGen ; if ( outputDir . equals ( "test" ) ) { fw = Utils . createTestFile ( "package-info.java" , def . getRaPackage ( ) , def . getOutputDir ( ) ) ; phGen = new PackageInfoGen ( ) ; } else { if ( subD... | generate package . html | 243 | 5 |
14,779 | void generateEisCode ( Definition def ) { try { String clazzName = this . getClass ( ) . getPackage ( ) . getName ( ) + ".code.TestEisCodeGen" ; String javaFile = def . getDefaultValue ( ) + "Handler.java" ; FileWriter fw = Utils . createTestFile ( javaFile , def . getRaPackage ( ) , def . getOutputDir ( ) ) ; Class < ... | generate Eis test server | 189 | 6 |
14,780 | static void setThreadContextClassLoader ( final ClassLoader cl ) { AccessController . doPrivileged ( new PrivilegedAction < Object > ( ) { public Object run ( ) { Thread . currentThread ( ) . setContextClassLoader ( cl ) ; return null ; } } ) ; } | Set the thread context class loader | 60 | 6 |
14,781 | static void closeURLClassLoader ( final URLClassLoader cl ) { AccessController . doPrivileged ( new PrivilegedAction < Object > ( ) { public Object run ( ) { if ( cl != null ) { try { cl . close ( ) ; } catch ( IOException ioe ) { // Ignore } } return null ; } } ) ; } | Close an URLClassLoader | 73 | 5 |
14,782 | private static void outputRaDesc ( RaImpl raImpl , PrintStream out ) throws ParserConfigurationException , SAXException , IOException , TransformerFactoryConfigurationError , TransformerConfigurationException , TransformerException { String raString = "<resource-adapters>" + raImpl . toString ( ) + "</resource-adapters... | Output Resource Adapter XML description | 257 | 5 |
14,783 | private static boolean scanArchive ( Connector cmd ) { if ( cmd == null ) return true ; if ( cmd . getVersion ( ) == Version . V_16 || cmd . getVersion ( ) == Version . V_17 ) { if ( ! cmd . isMetadataComplete ( ) ) return true ; } return false ; } | Should the archive be scanned for annotations | 70 | 7 |
14,784 | private static Map < String , String > getIntrospectedProperties ( String clz , URLClassLoader cl , PrintStream error ) { Map < String , String > result = null ; try { Class < ? > c = Class . forName ( clz , true , cl ) ; result = new TreeMap < String , String > ( ) ; Method [ ] methods = c . getMethods ( ) ; for ( Met... | Get the introspected properties for a class | 273 | 9 |
14,785 | private static void removeIntrospectedValue ( Map < String , String > m , String name ) { if ( m != null ) { m . remove ( name ) ; if ( name . length ( ) == 1 ) { name = name . toUpperCase ( Locale . US ) ; } else { name = name . substring ( 0 , 1 ) . toUpperCase ( Locale . US ) + name . substring ( 1 ) ; } m . remove ... | Remove introspected value | 172 | 5 |
14,786 | private static String getValueString ( XsdString value ) { if ( value == null || value == XsdString . NULL_XSDSTRING ) return "" ; else return value . getValue ( ) ; } | get correct value string | 45 | 4 |
14,787 | public static synchronized void getConnectionListener ( String poolName , Object mcp , Object cl , boolean pooled , boolean interleaving , Throwable callstack ) { if ( ! interleaving ) { if ( pooled ) { log . tracef ( "%s" , new TraceEvent ( poolName , Integer . toHexString ( System . identityHashCode ( mcp ) ) , Trace... | Get connection listener | 410 | 3 |
14,788 | public static synchronized void returnConnectionListener ( String poolName , Object mcp , Object cl , boolean kill , boolean interleaving , Throwable callstack ) { if ( ! interleaving ) { if ( ! kill ) { log . tracef ( "%s" , new TraceEvent ( poolName , Integer . toHexString ( System . identityHashCode ( mcp ) ) , Trac... | Return connection listener | 424 | 3 |
14,789 | public static synchronized void clearConnectionListener ( String poolName , Object mcp , Object cl ) { log . tracef ( "%s" , new TraceEvent ( poolName , Integer . toHexString ( System . identityHashCode ( mcp ) ) , TraceEvent . CLEAR_CONNECTION_LISTENER , Integer . toHexString ( System . identityHashCode ( cl ) ) ) ) ;... | Clear connection listener | 88 | 3 |
14,790 | public static synchronized void enlistConnectionListener ( String poolName , Object mcp , Object cl , String tx , boolean success , boolean interleaving ) { if ( ! interleaving ) { if ( success ) { log . tracef ( "%s" , new TraceEvent ( poolName , Integer . toHexString ( System . identityHashCode ( mcp ) ) , TraceEvent... | Enlist connection listener | 392 | 4 |
14,791 | public static synchronized void delistConnectionListener ( String poolName , Object mcp , Object cl , String tx , boolean success , boolean rollbacked , boolean interleaving ) { if ( ! rollbacked ) { if ( ! interleaving ) { if ( success ) { log . tracef ( "%s" , new TraceEvent ( poolName , Integer . toHexString ( Syste... | Delist connection listener | 587 | 4 |
14,792 | public static synchronized void createConnectionListener ( String poolName , Object mcp , Object cl , Object mc , boolean get , boolean prefill , boolean incrementer , Throwable callstack ) { if ( get ) { log . tracef ( "%s" , new TraceEvent ( poolName , Integer . toHexString ( System . identityHashCode ( mcp ) ) , Tra... | Create connection listener | 376 | 3 |
14,793 | public static synchronized void destroyConnectionListener ( String poolName , Object mcp , Object cl , boolean ret , boolean idle , boolean invalid , boolean flush , boolean error , boolean prefill , boolean incrementer , Throwable callstack ) { if ( ret ) { log . tracef ( "%s" , new TraceEvent ( poolName , Integer . t... | Destroy connection listener | 718 | 3 |
14,794 | public static synchronized void createManagedConnectionPool ( String poolName , Object mcp ) { log . tracef ( "%s" , new TraceEvent ( poolName , Integer . toHexString ( System . identityHashCode ( mcp ) ) , TraceEvent . MANAGED_CONNECTION_POOL_CREATE , "NONE" ) ) ; } | Create managed connection pool | 78 | 4 |
14,795 | public static synchronized void destroyManagedConnectionPool ( String poolName , Object mcp ) { log . tracef ( "%s" , new TraceEvent ( poolName , Integer . toHexString ( System . identityHashCode ( mcp ) ) , TraceEvent . MANAGED_CONNECTION_POOL_DESTROY , "NONE" ) ) ; } | Destroy managed connection pool | 79 | 4 |
14,796 | public static synchronized void pushCCMContext ( String key , Throwable callstack ) { log . tracef ( "%s" , new TraceEvent ( "CachedConnectionManager" , "NONE" , TraceEvent . PUSH_CCM_CONTEXT , "NONE" , key , callstack != null ? toString ( callstack ) : "" ) ) ; } | Push CCM context | 79 | 4 |
14,797 | public static synchronized void popCCMContext ( String key , Throwable callstack ) { log . tracef ( "%s" , new TraceEvent ( "CachedConnectionManager" , "NONE" , TraceEvent . POP_CCM_CONTEXT , "NONE" , key , callstack != null ? toString ( callstack ) : "" ) ) ; } | Pop CCM context | 78 | 4 |
14,798 | public static synchronized void registerCCMConnection ( String poolName , Object mcp , Object cl , Object connection , String key ) { log . tracef ( "%s" , new TraceEvent ( poolName , Integer . toHexString ( System . identityHashCode ( mcp ) ) , TraceEvent . REGISTER_CCM_CONNECTION , Integer . toHexString ( System . id... | Register CCM connection | 113 | 4 |
14,799 | public static synchronized void unregisterCCMConnection ( String poolName , Object mcp , Object cl , Object connection , String key ) { log . tracef ( "%s" , new TraceEvent ( poolName , Integer . toHexString ( System . identityHashCode ( mcp ) ) , TraceEvent . UNREGISTER_CCM_CONNECTION , Integer . toHexString ( System ... | Unregister CCM connection | 115 | 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.