id stringlengths 11 15 | language stringclasses 1
value | question stringlengths 13 844 | answer stringlengths 1 900 | code stringlengths 162 27.4k | code_original stringlengths 162 26k | code_word_count int64 51 5.96k |
|---|---|---|---|---|---|---|
java-test-2 | java | In which direction did that move to the tangent ? | from the current touch point | private float y ( Touch State s ) { final float curr To Tan = ( float ) Math . sqrt ( ( s . distance * s . distance ) - ( m Scaled Touch Slop * m Scaled Touch Slop ) ) ; return curr To Tan * ( m Scaled Touch Slop / s . distance ) ; } | private float y ( TouchState s ) { final float currToTan = ( float ) Math . sqrt ( ( s . distance * s . distance ) - ( mScaledTouchSlop * mScaledTouchSlop ) ) ; return currToTan * ( mScaledTouchSlop / s . distance ) ; } | 62 |
java-test-7 | java | Does the code create the rcs keystore ? | Yes | private static void create Key Store ( ) throws Key Store Exception , IO Exception { if ( s Key Store != null ) { return ; } try { s Key Store = Key Store . get Instance ( get Keystore Type ( ) ) ; synchronized ( Key Store Manager . class ) { s Key Store . load ( null , KEYSTORE PASSWORD . to Char Array ( ) ) ; } save Key Store To File ( s Key Store ) ; } catch ( No Such Algorithm Exception e ) { throw new Key Store Exception ( STRING , e ) ; } catch ( Certificate Exception e ) { throw new Key Store Exception ( STRING , e ) ; } } | private static void createKeyStore ( ) throws KeyStoreException , IOException { if ( sKeyStore != null ) { return ; } try { sKeyStore = KeyStore . getInstance ( getKeystoreType ( ) ) ; synchronized ( KeyStoreManager . class ) { sKeyStore . load ( null , KEYSTORE_PASSWORD . toCharArray ( ) ) ; } saveKeyStoreToFile ( sKeyStore ) ; } catch ( NoSuchAlgorithmException e ) { throw new KeyStoreException ( STRING , e ) ; } catch ( CertificateException e ) { throw new KeyStoreException ( STRING , e ) ; } } | 128 |
java-test-8 | java | What does the code create ? | the rcs keystore | private static void create Key Store ( ) throws Key Store Exception , IO Exception { if ( s Key Store != null ) { return ; } try { s Key Store = Key Store . get Instance ( get Keystore Type ( ) ) ; synchronized ( Key Store Manager . class ) { s Key Store . load ( null , KEYSTORE PASSWORD . to Char Array ( ) ) ; } save Key Store To File ( s Key Store ) ; } catch ( No Such Algorithm Exception e ) { throw new Key Store Exception ( STRING , e ) ; } catch ( Certificate Exception e ) { throw new Key Store Exception ( STRING , e ) ; } } | private static void createKeyStore ( ) throws KeyStoreException , IOException { if ( sKeyStore != null ) { return ; } try { sKeyStore = KeyStore . getInstance ( getKeystoreType ( ) ) ; synchronized ( KeyStoreManager . class ) { sKeyStore . load ( null , KEYSTORE_PASSWORD . toCharArray ( ) ) ; } saveKeyStoreToFile ( sKeyStore ) ; } catch ( NoSuchAlgorithmException e ) { throw new KeyStoreException ( STRING , e ) ; } catch ( CertificateException e ) { throw new KeyStoreException ( STRING , e ) ; } } | 128 |
java-test-9 | java | What does the code add ? | the given number of period units to this date | public Julian Date add ( int units , int amount ) { Julian Date date = null ; synchronized ( gc ) { gc . set Time ( get Java Date ( ) ) ; gc . add ( units , amount ) ; date = new Julian Date ( gc . get Time ( ) ) ; } return date ; } | public JulianDate add ( int units , int amount ) { JulianDate date = null ; synchronized ( gc ) { gc . setTime ( getJavaDate ( ) ) ; gc . add ( units , amount ) ; date = new JulianDate ( gc . getTime ( ) ) ; } return date ; } | 63 |
java-test-10 | java | Does the code add the given number of period units to this date ? | Yes | public Julian Date add ( int units , int amount ) { Julian Date date = null ; synchronized ( gc ) { gc . set Time ( get Java Date ( ) ) ; gc . add ( units , amount ) ; date = new Julian Date ( gc . get Time ( ) ) ; } return date ; } | public JulianDate add ( int units , int amount ) { JulianDate date = null ; synchronized ( gc ) { gc . setTime ( getJavaDate ( ) ) ; gc . add ( units , amount ) ; date = new JulianDate ( gc . getTime ( ) ) ; } return date ; } | 63 |
java-test-24 | java | How does the code update the documents with partial updates ? | with the given fields | public void updates ( String type , List < String > ids , Metacat Context metacat Context , Object Node node ) { if ( ids == null || ids . is Empty ( ) ) { return ; } try { RETRY ES PUBLISH . call ( null ) ; } catch ( Exception e ) { log . error ( String . format ( STRING , type , ids ) , e ) ; Counter Wrapper . increment Counter ( STRING ) ; log ( STRING , type , ids . to String ( ) , null , e . get Message ( ) , e , BOOL ) ; } } | public void updates ( String type , List < String > ids , MetacatContext metacatContext , ObjectNode node ) { if ( ids == null || ids . isEmpty ( ) ) { return ; } try { RETRY_ES_PUBLISH . call ( null ) ; } catch ( Exception e ) { log . error ( String . format ( STRING , type , ids ) , e ) ; CounterWrapper . incrementCounter ( STRING ) ; log ( STRING , type , ids . toString ( ) , null , e . getMessage ( ) , e , _BOOL ) ; } } | 114 |
java-test-25 | java | Does the code update the documents with partial updates with the given fields ? | Yes | public void updates ( String type , List < String > ids , Metacat Context metacat Context , Object Node node ) { if ( ids == null || ids . is Empty ( ) ) { return ; } try { RETRY ES PUBLISH . call ( null ) ; } catch ( Exception e ) { log . error ( String . format ( STRING , type , ids ) , e ) ; Counter Wrapper . increment Counter ( STRING ) ; log ( STRING , type , ids . to String ( ) , null , e . get Message ( ) , e , BOOL ) ; } } | public void updates ( String type , List < String > ids , MetacatContext metacatContext , ObjectNode node ) { if ( ids == null || ids . isEmpty ( ) ) { return ; } try { RETRY_ES_PUBLISH . call ( null ) ; } catch ( Exception e ) { log . error ( String . format ( STRING , type , ids ) , e ) ; CounterWrapper . incrementCounter ( STRING ) ; log ( STRING , type , ids . toString ( ) , null , e . getMessage ( ) , e , _BOOL ) ; } } | 114 |
java-test-26 | java | What does the code update with the given fields ? | the documents with partial updates | public void updates ( String type , List < String > ids , Metacat Context metacat Context , Object Node node ) { if ( ids == null || ids . is Empty ( ) ) { return ; } try { RETRY ES PUBLISH . call ( null ) ; } catch ( Exception e ) { log . error ( String . format ( STRING , type , ids ) , e ) ; Counter Wrapper . increment Counter ( STRING ) ; log ( STRING , type , ids . to String ( ) , null , e . get Message ( ) , e , BOOL ) ; } } | public void updates ( String type , List < String > ids , MetacatContext metacatContext , ObjectNode node ) { if ( ids == null || ids . isEmpty ( ) ) { return ; } try { RETRY_ES_PUBLISH . call ( null ) ; } catch ( Exception e ) { log . error ( String . format ( STRING , type , ids ) , e ) ; CounterWrapper . incrementCounter ( STRING ) ; log ( STRING , type , ids . toString ( ) , null , e . getMessage ( ) , e , _BOOL ) ; } } | 114 |
java-test-27 | java | How should a source directory name be skipped ? | based on the avoid and limit list | protected boolean check To Skip Directory ( String name ) { if ( dir Suffix Avoids != null ) { for ( int i = NUM ; i < dir Suffix Avoids . length ; i ++ ) { if ( name . ends With ( dir Suffix Avoids [ i ] ) ) { return BOOL ; } } } if ( dir Suffix Limits != null ) { for ( int i = NUM ; i < dir Suffix Limits . length ; i ++ ) { if ( name . ends With ( dir Suffix Limits [ i ] ) ) { return BOOL ; } } return BOOL ; } return BOOL ; } | protected boolean checkToSkipDirectory ( String name ) { if ( dirSuffixAvoids != null ) { for ( int i = _NUM ; i < dirSuffixAvoids . length ; i ++ ) { if ( name . endsWith ( dirSuffixAvoids [ i ] ) ) { return _BOOL ; } } } if ( dirSuffixLimits != null ) { for ( int i = _NUM ; i < dirSuffixLimits . length ; i ++ ) { if ( name . endsWith ( dirSuffixLimits [ i ] ) ) { return _BOOL ; } } return _BOOL ; } return _BOOL ; } | 118 |
java-test-28 | java | Does the code add " val " months to the month object that contains " time " and ? | Yes | @ Override public Enter From Date To To Date Activity . Time Object add ( long time , int val ) { Calendar c = Calendar . get Instance ( ) ; c . set Time In Millis ( time ) ; c . add ( Calendar . MONTH , val ) ; return time Object From Calendar ( c ) ; } | @ Override public EnterFromDateToToDateActivity . TimeObject add ( long time , int val ) { Calendar c = Calendar . getInstance ( ) ; c . setTimeInMillis ( time ) ; c . add ( Calendar . MONTH , val ) ; return timeObjectFromCalendar ( c ) ; } | 63 |
java-test-29 | java | What does the code add to the month object that contains " time " and ? | " val " months | @ Override public Enter From Date To To Date Activity . Time Object add ( long time , int val ) { Calendar c = Calendar . get Instance ( ) ; c . set Time In Millis ( time ) ; c . add ( Calendar . MONTH , val ) ; return time Object From Calendar ( c ) ; } | @ Override public EnterFromDateToToDateActivity . TimeObject add ( long time , int val ) { Calendar c = Calendar . getInstance ( ) ; c . setTimeInMillis ( time ) ; c . add ( Calendar . MONTH , val ) ; return timeObjectFromCalendar ( c ) ; } | 63 |
java-test-39 | java | In which direction do string data read ? | from a inputstream | public static String to String ( final Input Stream is ) throws IO Exception { final Buffered Reader br = new Buffered Reader ( new Input Stream Reader ( is ) ) ; final String Buffer content = new String Buffer ( ) ; String line = br . read Line ( ) ; if ( line != null ) { content . append ( line ) ; while ( ( line = br . read Line ( ) ) != null ) content . append ( STRING + line ) ; } br . close ( ) ; return content . to String ( ) ; } | public static String toString ( final InputStream is ) throws IOException { final BufferedReader br = new BufferedReader ( new InputStreamReader ( is ) ) ; final StringBuffer content = new StringBuffer ( ) ; String line = br . readLine ( ) ; if ( line != null ) { content . append ( line ) ; while ( ( line = br . readLine ( ) ) != null ) content . append ( STRING + line ) ; } br . close ( ) ; return content . toString ( ) ; } | 108 |
java-test-44 | java | Does the code tell ? | Yes | private boolean is Number ( String string ) { String s = string . trim ( ) ; if ( s . length ( ) < NUM ) return BOOL ; double value = NUM ; try { value = Double . parse Double ( s ) ; } catch ( Number Format Exception e ) { return BOOL ; } return BOOL ; } | private boolean isNumber ( String string ) { String s = string . trim ( ) ; if ( s . length ( ) < _NUM ) return _BOOL ; double value = _NUM ; try { value = Double . parseDouble ( s ) ; } catch ( NumberFormatException e ) { return _BOOL ; } return _BOOL ; } | 65 |
java-test-45 | java | What does the code tell ? | whether the string contains a number | private boolean is Number ( String string ) { String s = string . trim ( ) ; if ( s . length ( ) < NUM ) return BOOL ; double value = NUM ; try { value = Double . parse Double ( s ) ; } catch ( Number Format Exception e ) { return BOOL ; } return BOOL ; } | private boolean isNumber ( String string ) { String s = string . trim ( ) ; if ( s . length ( ) < _NUM ) return _BOOL ; double value = _NUM ; try { value = Double . parseDouble ( s ) ; } catch ( NumberFormatException e ) { return _BOOL ; } return _BOOL ; } | 65 |
java-test-46 | java | Do the string contain a number ? | No | private boolean is Number ( String string ) { String s = string . trim ( ) ; if ( s . length ( ) < NUM ) return BOOL ; double value = NUM ; try { value = Double . parse Double ( s ) ; } catch ( Number Format Exception e ) { return BOOL ; } return BOOL ; } | private boolean isNumber ( String string ) { String s = string . trim ( ) ; if ( s . length ( ) < _NUM ) return _BOOL ; double value = _NUM ; try { value = Double . parseDouble ( s ) ; } catch ( NumberFormatException e ) { return _BOOL ; } return _BOOL ; } | 65 |
java-test-47 | java | Does the code initialize the calculated values ? | Yes | private void initialize Values ( ) { mn Size = Math . min ( get Measured Height ( ) , get Measured Width ( ) ) ; mn Ring Radius = ( int ) ( mn Size - mn Ring Width ) / NUM ; mn Inner Circle Radius = ( int ) ( mn Size - ( mn Ring Width * NUM ) ) / NUM ; mn View Center = mn Size / NUM ; mn Line Width = STATUS SYMBOL WIDTH PERCENT * mn Size ; } | private void initializeValues ( ) { mnSize = Math . min ( getMeasuredHeight ( ) , getMeasuredWidth ( ) ) ; mnRingRadius = ( int ) ( mnSize - mnRingWidth ) / _NUM ; mnInnerCircleRadius = ( int ) ( mnSize - ( mnRingWidth * _NUM ) ) / _NUM ; mnViewCenter = mnSize / _NUM ; mnLineWidth = STATUS_SYMBOL_WIDTH_PERCENT * mnSize ; } | 90 |
java-test-48 | java | What does the code initialize ? | the calculated values | private void initialize Values ( ) { mn Size = Math . min ( get Measured Height ( ) , get Measured Width ( ) ) ; mn Ring Radius = ( int ) ( mn Size - mn Ring Width ) / NUM ; mn Inner Circle Radius = ( int ) ( mn Size - ( mn Ring Width * NUM ) ) / NUM ; mn View Center = mn Size / NUM ; mn Line Width = STATUS SYMBOL WIDTH PERCENT * mn Size ; } | private void initializeValues ( ) { mnSize = Math . min ( getMeasuredHeight ( ) , getMeasuredWidth ( ) ) ; mnRingRadius = ( int ) ( mnSize - mnRingWidth ) / _NUM ; mnInnerCircleRadius = ( int ) ( mnSize - ( mnRingWidth * _NUM ) ) / _NUM ; mnViewCenter = mnSize / _NUM ; mnLineWidth = STATUS_SYMBOL_WIDTH_PERCENT * mnSize ; } | 90 |
java-test-49 | java | Where does the code create the gradle wrapper ? | in the project | @ Visible For Testing public static boolean create Gradle Wrapper ( @ Not Null File project Dir Path , @ Not Null String gradle Version ) throws IO Exception { File project Wrapper Dir Path = new File ( project Dir Path , FD GRADLE WRAPPER ) ; if ( ! project Wrapper Dir Path . is Directory ( ) ) { File wrapper Src Dir Path = new File ( Template Manager . get Template Root Folder ( ) , FD GRADLE WRAPPER ) ; if ( ! wrapper Src Dir Path . exists ( ) ) { for ( File root : Template Manager . get Extra Template Root Folders ( ) ) { wrapper Src Dir Path = new File ( root , FD GRADLE WRAPPER ) ; if ( wrapper Src Dir Path . exists ( ) ) { break ; } else { wrapper Src Dir Path = null ; } } } if ( wrapper Src Dir Path == null ) { return BOOL ; } copy Dir Content ( wrapper Src Dir Path , project Dir Path ) ; } File wrapper Properties File = get Gradle Wrapper Properties File Path ( project Dir Path ) ; update Gradle Distribution Url ( gradle Version , wrapper Properties File ) ; return BOOL ; } | @ VisibleForTesting public static boolean createGradleWrapper ( @ NotNull File projectDirPath , @ NotNull String gradleVersion ) throws IOException { File projectWrapperDirPath = new File ( projectDirPath , FD_GRADLE_WRAPPER ) ; if ( ! projectWrapperDirPath . isDirectory ( ) ) { File wrapperSrcDirPath = new File ( TemplateManager . getTemplateRootFolder ( ) , FD_GRADLE_WRAPPER ) ; if ( ! wrapperSrcDirPath . exists ( ) ) { for ( File root : TemplateManager . getExtraTemplateRootFolders ( ) ) { wrapperSrcDirPath = new File ( root , FD_GRADLE_WRAPPER ) ; if ( wrapperSrcDirPath . exists ( ) ) { break ; } else { wrapperSrcDirPath = null ; } } } if ( wrapperSrcDirPath == null ) { return _BOOL ; } copyDirContent ( wrapperSrcDirPath , projectDirPath ) ; } File wrapperPropertiesFile = getGradleWrapperPropertiesFilePath ( projectDirPath ) ; updateGradleDistributionUrl ( gradleVersion , wrapperPropertiesFile ) ; return _BOOL ; } | 221 |
java-test-50 | java | Does the code create the gradle wrapper in the project in the project ? | Yes | @ Visible For Testing public static boolean create Gradle Wrapper ( @ Not Null File project Dir Path , @ Not Null String gradle Version ) throws IO Exception { File project Wrapper Dir Path = new File ( project Dir Path , FD GRADLE WRAPPER ) ; if ( ! project Wrapper Dir Path . is Directory ( ) ) { File wrapper Src Dir Path = new File ( Template Manager . get Template Root Folder ( ) , FD GRADLE WRAPPER ) ; if ( ! wrapper Src Dir Path . exists ( ) ) { for ( File root : Template Manager . get Extra Template Root Folders ( ) ) { wrapper Src Dir Path = new File ( root , FD GRADLE WRAPPER ) ; if ( wrapper Src Dir Path . exists ( ) ) { break ; } else { wrapper Src Dir Path = null ; } } } if ( wrapper Src Dir Path == null ) { return BOOL ; } copy Dir Content ( wrapper Src Dir Path , project Dir Path ) ; } File wrapper Properties File = get Gradle Wrapper Properties File Path ( project Dir Path ) ; update Gradle Distribution Url ( gradle Version , wrapper Properties File ) ; return BOOL ; } | @ VisibleForTesting public static boolean createGradleWrapper ( @ NotNull File projectDirPath , @ NotNull String gradleVersion ) throws IOException { File projectWrapperDirPath = new File ( projectDirPath , FD_GRADLE_WRAPPER ) ; if ( ! projectWrapperDirPath . isDirectory ( ) ) { File wrapperSrcDirPath = new File ( TemplateManager . getTemplateRootFolder ( ) , FD_GRADLE_WRAPPER ) ; if ( ! wrapperSrcDirPath . exists ( ) ) { for ( File root : TemplateManager . getExtraTemplateRootFolders ( ) ) { wrapperSrcDirPath = new File ( root , FD_GRADLE_WRAPPER ) ; if ( wrapperSrcDirPath . exists ( ) ) { break ; } else { wrapperSrcDirPath = null ; } } } if ( wrapperSrcDirPath == null ) { return _BOOL ; } copyDirContent ( wrapperSrcDirPath , projectDirPath ) ; } File wrapperPropertiesFile = getGradleWrapperPropertiesFilePath ( projectDirPath ) ; updateGradleDistributionUrl ( gradleVersion , wrapperPropertiesFile ) ; return _BOOL ; } | 221 |
java-test-51 | java | Does the code create the gradle wrapper in the project ? | Yes | @ Visible For Testing public static boolean create Gradle Wrapper ( @ Not Null File project Dir Path , @ Not Null String gradle Version ) throws IO Exception { File project Wrapper Dir Path = new File ( project Dir Path , FD GRADLE WRAPPER ) ; if ( ! project Wrapper Dir Path . is Directory ( ) ) { File wrapper Src Dir Path = new File ( Template Manager . get Template Root Folder ( ) , FD GRADLE WRAPPER ) ; if ( ! wrapper Src Dir Path . exists ( ) ) { for ( File root : Template Manager . get Extra Template Root Folders ( ) ) { wrapper Src Dir Path = new File ( root , FD GRADLE WRAPPER ) ; if ( wrapper Src Dir Path . exists ( ) ) { break ; } else { wrapper Src Dir Path = null ; } } } if ( wrapper Src Dir Path == null ) { return BOOL ; } copy Dir Content ( wrapper Src Dir Path , project Dir Path ) ; } File wrapper Properties File = get Gradle Wrapper Properties File Path ( project Dir Path ) ; update Gradle Distribution Url ( gradle Version , wrapper Properties File ) ; return BOOL ; } | @ VisibleForTesting public static boolean createGradleWrapper ( @ NotNull File projectDirPath , @ NotNull String gradleVersion ) throws IOException { File projectWrapperDirPath = new File ( projectDirPath , FD_GRADLE_WRAPPER ) ; if ( ! projectWrapperDirPath . isDirectory ( ) ) { File wrapperSrcDirPath = new File ( TemplateManager . getTemplateRootFolder ( ) , FD_GRADLE_WRAPPER ) ; if ( ! wrapperSrcDirPath . exists ( ) ) { for ( File root : TemplateManager . getExtraTemplateRootFolders ( ) ) { wrapperSrcDirPath = new File ( root , FD_GRADLE_WRAPPER ) ; if ( wrapperSrcDirPath . exists ( ) ) { break ; } else { wrapperSrcDirPath = null ; } } } if ( wrapperSrcDirPath == null ) { return _BOOL ; } copyDirContent ( wrapperSrcDirPath , projectDirPath ) ; } File wrapperPropertiesFile = getGradleWrapperPropertiesFilePath ( projectDirPath ) ; updateGradleDistributionUrl ( gradleVersion , wrapperPropertiesFile ) ; return _BOOL ; } | 221 |
java-test-52 | java | What does the code create in the project in the project ? | the gradle wrapper | @ Visible For Testing public static boolean create Gradle Wrapper ( @ Not Null File project Dir Path , @ Not Null String gradle Version ) throws IO Exception { File project Wrapper Dir Path = new File ( project Dir Path , FD GRADLE WRAPPER ) ; if ( ! project Wrapper Dir Path . is Directory ( ) ) { File wrapper Src Dir Path = new File ( Template Manager . get Template Root Folder ( ) , FD GRADLE WRAPPER ) ; if ( ! wrapper Src Dir Path . exists ( ) ) { for ( File root : Template Manager . get Extra Template Root Folders ( ) ) { wrapper Src Dir Path = new File ( root , FD GRADLE WRAPPER ) ; if ( wrapper Src Dir Path . exists ( ) ) { break ; } else { wrapper Src Dir Path = null ; } } } if ( wrapper Src Dir Path == null ) { return BOOL ; } copy Dir Content ( wrapper Src Dir Path , project Dir Path ) ; } File wrapper Properties File = get Gradle Wrapper Properties File Path ( project Dir Path ) ; update Gradle Distribution Url ( gradle Version , wrapper Properties File ) ; return BOOL ; } | @ VisibleForTesting public static boolean createGradleWrapper ( @ NotNull File projectDirPath , @ NotNull String gradleVersion ) throws IOException { File projectWrapperDirPath = new File ( projectDirPath , FD_GRADLE_WRAPPER ) ; if ( ! projectWrapperDirPath . isDirectory ( ) ) { File wrapperSrcDirPath = new File ( TemplateManager . getTemplateRootFolder ( ) , FD_GRADLE_WRAPPER ) ; if ( ! wrapperSrcDirPath . exists ( ) ) { for ( File root : TemplateManager . getExtraTemplateRootFolders ( ) ) { wrapperSrcDirPath = new File ( root , FD_GRADLE_WRAPPER ) ; if ( wrapperSrcDirPath . exists ( ) ) { break ; } else { wrapperSrcDirPath = null ; } } } if ( wrapperSrcDirPath == null ) { return _BOOL ; } copyDirContent ( wrapperSrcDirPath , projectDirPath ) ; } File wrapperPropertiesFile = getGradleWrapperPropertiesFilePath ( projectDirPath ) ; updateGradleDistributionUrl ( gradleVersion , wrapperPropertiesFile ) ; return _BOOL ; } | 221 |
java-test-56 | java | How will the file be encoded ? | in the us_ascii character set | public static void write Pem String To File ( File file , String pem Data To Write ) { try { File Utils . write ( file , pem Data To Write ) ; } catch ( IO Exception e ) { throw new Export Exception ( STRING + file . get Name ( ) , e ) ; } } | public static void writePemStringToFile ( File file , String pemDataToWrite ) { try { FileUtils . write ( file , pemDataToWrite ) ; } catch ( IOException e ) { throw new ExportException ( STRING + file . getName ( ) , e ) ; } } | 61 |
java-test-57 | java | Does the code instantiate a new env var model ? | Yes | public Env Var Model ( Environment Manager Interface env Mgr ) { this . env Mgr = env Mgr ; if ( columns . is Empty ( ) ) { columns . add ( Localisation . get String ( Env Var Dlg . class , STRING ) ) ; columns . add ( Localisation . get String ( Env Var Dlg . class , STRING ) ) ; columns . add ( Localisation . get String ( Env Var Dlg . class , STRING ) ) ; } } | public EnvVarModel ( EnvironmentManagerInterface envMgr ) { this . envMgr = envMgr ; if ( columns . isEmpty ( ) ) { columns . add ( Localisation . getString ( EnvVarDlg . class , STRING ) ) ; columns . add ( Localisation . getString ( EnvVarDlg . class , STRING ) ) ; columns . add ( Localisation . getString ( EnvVarDlg . class , STRING ) ) ; } } | 89 |
java-test-58 | java | What does the code instantiate ? | a new env var model | public Env Var Model ( Environment Manager Interface env Mgr ) { this . env Mgr = env Mgr ; if ( columns . is Empty ( ) ) { columns . add ( Localisation . get String ( Env Var Dlg . class , STRING ) ) ; columns . add ( Localisation . get String ( Env Var Dlg . class , STRING ) ) ; columns . add ( Localisation . get String ( Env Var Dlg . class , STRING ) ) ; } } | public EnvVarModel ( EnvironmentManagerInterface envMgr ) { this . envMgr = envMgr ; if ( columns . isEmpty ( ) ) { columns . add ( Localisation . getString ( EnvVarDlg . class , STRING ) ) ; columns . add ( Localisation . getString ( EnvVarDlg . class , STRING ) ) ; columns . add ( Localisation . getString ( EnvVarDlg . class , STRING ) ) ; } } | 89 |
java-test-59 | java | What does the code create ? | a copy of a bit string | public Bit Vector ( Bit Vector s ) { bits = new int [ s . bits . length ] ; this . nbits = s . nbits ; System . arraycopy ( s . bits , NUM , this . bits , NUM , s . bits . length ) ; } | public BitVector ( BitVector s ) { bits = new int [ s . bits . length ] ; this . nbits = s . nbits ; System . arraycopy ( s . bits , _NUM , this . bits , _NUM , s . bits . length ) ; } | 53 |
java-test-60 | java | Does the code create a copy of a bit string ? | Yes | public Bit Vector ( Bit Vector s ) { bits = new int [ s . bits . length ] ; this . nbits = s . nbits ; System . arraycopy ( s . bits , NUM , this . bits , NUM , s . bits . length ) ; } | public BitVector ( BitVector s ) { bits = new int [ s . bits . length ] ; this . nbits = s . nbits ; System . arraycopy ( s . bits , _NUM , this . bits , _NUM , s . bits . length ) ; } | 53 |
java-test-64 | java | Does the specified implement the proper interface so that we don ' t have to do that for every request ? | Yes | @ Suppress Warnings ( STRING ) private Class validate Class ( Client Config cfg ) { Class clazz = null ; try { clazz = Class . for Name ( cfg . get Access Request Handler Classname ( ) ) ; } catch ( final Class Not Found Exception e ) { LOG . error ( STRING + cfg . get Access Request Handler Classname ( ) + STRING + cfg . get Name ( ) + STRING , e ) ; return null ; } Object inst = null ; try { inst = Injector Holder . get Instance ( clazz ) ; } catch ( Configuration Exception | Provision Exception e ) { LOG . error ( STRING + cfg . get Access Request Handler Classname ( ) + STRING + cfg . get Name ( ) + STRING , e ) ; return null ; } Access Request Handler handler = null ; try { handler = ( Access Request Handler ) inst ; } catch ( final Class Cast Exception e ) { LOG . error ( STRING + cfg . get Access Request Handler Classname ( ) + STRING + cfg . get Name ( ) + STRING , e ) ; return null ; } return clazz ; } | @ SuppressWarnings ( STRING ) private Class validateClass ( ClientConfig cfg ) { Class clazz = null ; try { clazz = Class . forName ( cfg . getAccessRequestHandlerClassname ( ) ) ; } catch ( final ClassNotFoundException e ) { LOG . error ( STRING + cfg . getAccessRequestHandlerClassname ( ) + STRING + cfg . getName ( ) + STRING , e ) ; return null ; } Object inst = null ; try { inst = InjectorHolder . getInstance ( clazz ) ; } catch ( ConfigurationException | ProvisionException e ) { LOG . error ( STRING + cfg . getAccessRequestHandlerClassname ( ) + STRING + cfg . getName ( ) + STRING , e ) ; return null ; } AccessRequestHandler handler = null ; try { handler = ( AccessRequestHandler ) inst ; } catch ( final ClassCastException e ) { LOG . error ( STRING + cfg . getAccessRequestHandlerClassname ( ) + STRING + cfg . getName ( ) + STRING , e ) ; return null ; } return clazz ; } | 215 |
java-test-65 | java | What implements the proper interface so that we don ' t have to do that for every request ? | the specified | @ Suppress Warnings ( STRING ) private Class validate Class ( Client Config cfg ) { Class clazz = null ; try { clazz = Class . for Name ( cfg . get Access Request Handler Classname ( ) ) ; } catch ( final Class Not Found Exception e ) { LOG . error ( STRING + cfg . get Access Request Handler Classname ( ) + STRING + cfg . get Name ( ) + STRING , e ) ; return null ; } Object inst = null ; try { inst = Injector Holder . get Instance ( clazz ) ; } catch ( Configuration Exception | Provision Exception e ) { LOG . error ( STRING + cfg . get Access Request Handler Classname ( ) + STRING + cfg . get Name ( ) + STRING , e ) ; return null ; } Access Request Handler handler = null ; try { handler = ( Access Request Handler ) inst ; } catch ( final Class Cast Exception e ) { LOG . error ( STRING + cfg . get Access Request Handler Classname ( ) + STRING + cfg . get Name ( ) + STRING , e ) ; return null ; } return clazz ; } | @ SuppressWarnings ( STRING ) private Class validateClass ( ClientConfig cfg ) { Class clazz = null ; try { clazz = Class . forName ( cfg . getAccessRequestHandlerClassname ( ) ) ; } catch ( final ClassNotFoundException e ) { LOG . error ( STRING + cfg . getAccessRequestHandlerClassname ( ) + STRING + cfg . getName ( ) + STRING , e ) ; return null ; } Object inst = null ; try { inst = InjectorHolder . getInstance ( clazz ) ; } catch ( ConfigurationException | ProvisionException e ) { LOG . error ( STRING + cfg . getAccessRequestHandlerClassname ( ) + STRING + cfg . getName ( ) + STRING , e ) ; return null ; } AccessRequestHandler handler = null ; try { handler = ( AccessRequestHandler ) inst ; } catch ( final ClassCastException e ) { LOG . error ( STRING + cfg . getAccessRequestHandlerClassname ( ) + STRING + cfg . getName ( ) + STRING , e ) ; return null ; } return clazz ; } | 215 |
java-test-66 | java | What does the specified implement so that we don ' t have to do that for every request ? | the proper interface | @ Suppress Warnings ( STRING ) private Class validate Class ( Client Config cfg ) { Class clazz = null ; try { clazz = Class . for Name ( cfg . get Access Request Handler Classname ( ) ) ; } catch ( final Class Not Found Exception e ) { LOG . error ( STRING + cfg . get Access Request Handler Classname ( ) + STRING + cfg . get Name ( ) + STRING , e ) ; return null ; } Object inst = null ; try { inst = Injector Holder . get Instance ( clazz ) ; } catch ( Configuration Exception | Provision Exception e ) { LOG . error ( STRING + cfg . get Access Request Handler Classname ( ) + STRING + cfg . get Name ( ) + STRING , e ) ; return null ; } Access Request Handler handler = null ; try { handler = ( Access Request Handler ) inst ; } catch ( final Class Cast Exception e ) { LOG . error ( STRING + cfg . get Access Request Handler Classname ( ) + STRING + cfg . get Name ( ) + STRING , e ) ; return null ; } return clazz ; } | @ SuppressWarnings ( STRING ) private Class validateClass ( ClientConfig cfg ) { Class clazz = null ; try { clazz = Class . forName ( cfg . getAccessRequestHandlerClassname ( ) ) ; } catch ( final ClassNotFoundException e ) { LOG . error ( STRING + cfg . getAccessRequestHandlerClassname ( ) + STRING + cfg . getName ( ) + STRING , e ) ; return null ; } Object inst = null ; try { inst = InjectorHolder . getInstance ( clazz ) ; } catch ( ConfigurationException | ProvisionException e ) { LOG . error ( STRING + cfg . getAccessRequestHandlerClassname ( ) + STRING + cfg . getName ( ) + STRING , e ) ; return null ; } AccessRequestHandler handler = null ; try { handler = ( AccessRequestHandler ) inst ; } catch ( final ClassCastException e ) { LOG . error ( STRING + cfg . getAccessRequestHandlerClassname ( ) + STRING + cfg . getName ( ) + STRING , e ) ; return null ; } return clazz ; } | 215 |
java-test-67 | java | Do we do that for every request ? | Yes | @ Suppress Warnings ( STRING ) private Class validate Class ( Client Config cfg ) { Class clazz = null ; try { clazz = Class . for Name ( cfg . get Access Request Handler Classname ( ) ) ; } catch ( final Class Not Found Exception e ) { LOG . error ( STRING + cfg . get Access Request Handler Classname ( ) + STRING + cfg . get Name ( ) + STRING , e ) ; return null ; } Object inst = null ; try { inst = Injector Holder . get Instance ( clazz ) ; } catch ( Configuration Exception | Provision Exception e ) { LOG . error ( STRING + cfg . get Access Request Handler Classname ( ) + STRING + cfg . get Name ( ) + STRING , e ) ; return null ; } Access Request Handler handler = null ; try { handler = ( Access Request Handler ) inst ; } catch ( final Class Cast Exception e ) { LOG . error ( STRING + cfg . get Access Request Handler Classname ( ) + STRING + cfg . get Name ( ) + STRING , e ) ; return null ; } return clazz ; } | @ SuppressWarnings ( STRING ) private Class validateClass ( ClientConfig cfg ) { Class clazz = null ; try { clazz = Class . forName ( cfg . getAccessRequestHandlerClassname ( ) ) ; } catch ( final ClassNotFoundException e ) { LOG . error ( STRING + cfg . getAccessRequestHandlerClassname ( ) + STRING + cfg . getName ( ) + STRING , e ) ; return null ; } Object inst = null ; try { inst = InjectorHolder . getInstance ( clazz ) ; } catch ( ConfigurationException | ProvisionException e ) { LOG . error ( STRING + cfg . getAccessRequestHandlerClassname ( ) + STRING + cfg . getName ( ) + STRING , e ) ; return null ; } AccessRequestHandler handler = null ; try { handler = ( AccessRequestHandler ) inst ; } catch ( final ClassCastException e ) { LOG . error ( STRING + cfg . getAccessRequestHandlerClassname ( ) + STRING + cfg . getName ( ) + STRING , e ) ; return null ; } return clazz ; } | 215 |
java-test-68 | java | Do we pass in the alt - tab state ? | Yes | void compute Min Max Scroll ( Array List < T > data , boolean launched With Alt Tab , boolean launched From Home ) { m Task Progress Map . clear ( ) ; if ( data . is Empty ( ) ) { m Min Scroll P = m Max Scroll P = NUM ; return ; } int task Height = m Task Rect . height ( ) ; float p At Bottom Of Stack Rect = screen Y To Curve Progress ( m Stack Visible Rect . bottom ) ; float p Within Affiliate Top = screen Y To Curve Progress ( m Stack Visible Rect . bottom - m Within Affiliation Offset ) ; float scale = curve Progress To Scale ( p Within Affiliate Top ) ; int scale Y Offset = ( int ) ( ( ( NUM - scale ) * task Height ) / NUM ) ; p Within Affiliate Top = screen Y To Curve Progress ( m Stack Visible Rect . bottom - m Within Affiliation Offset + scale Y Offset ) ; float p Within Affiliate Offset = p At Bottom Of Stack Rect - p Within Affiliate Top ; float p Between Affiliate Offset = p At Bottom Of Stack Rect - screen Y To Curve Progress ( m Stack Visible Rect . bottom - m Between Affiliation Offset ) ; float p Task Height Offset = p At Bottom Of Stack Rect - screen Y To Curve Progress ( m Stack Visible Rect . bottom - task Height ) ; float p Nav Bar Offset = p At Bottom Of Stack Rect - screen Y To Curve Progress ( m Stack Visible Rect . bottom - ( m Stack Visible Rect . bottom - m Stack Rect . bottom ) ) ; float p At Back Most Card Top = NUM ; float p At Front Most Card Top = p At Back Most Card Top ; int task Count = data . size ( ) ; for ( int i = NUM ; i < task Count ; i ++ ) { m Task Progress Map . put ( data . get ( i ) , p At Front Most Card Top ) ; if ( i < ( task Count - NUM ) ) { float p Peek = p Between Affiliate Offset ; p At Front Most Card Top += p Peek ; } } m Max Scroll P = p At Front Most Card Top - ( ( NUM - p Task Height Offset - p Nav Bar Offset ) ) ; m Min Scroll P = data . size ( ) == NUM ? Math . max ( m Max Scroll P , NUM ) : NUM ; if ( launched With Alt Tab && launched From Home ) { m Initial Scroll P = m Max Scroll P ; } else { m Initial Scroll P = p At Front Most Card Top - NUM ; } m Initial Scroll P = Math . min ( m Max Scroll P , Math . max ( NUM , m Initial Scroll P ) ) ; } | void computeMinMaxScroll ( ArrayList < T > data , boolean launchedWithAltTab , boolean launchedFromHome ) { mTaskProgressMap . clear ( ) ; if ( data . isEmpty ( ) ) { mMinScrollP = mMaxScrollP = _NUM ; return ; } int taskHeight = mTaskRect . height ( ) ; float pAtBottomOfStackRect = screenYToCurveProgress ( mStackVisibleRect . bottom ) ; float pWithinAffiliateTop = screenYToCurveProgress ( mStackVisibleRect . bottom - mWithinAffiliationOffset ) ; float scale = curveProgressToScale ( pWithinAffiliateTop ) ; int scaleYOffset = ( int ) ( ( ( _NUM - scale ) * taskHeight ) / _NUM ) ; pWithinAffiliateTop = screenYToCurveProgress ( mStackVisibleRect . bottom - mWithinAffiliationOffset + scaleYOffset ) ; float pWithinAffiliateOffset = pAtBottomOfStackRect - pWithinAffiliateTop ; float pBetweenAffiliateOffset = pAtBottomOfStackRect - screenYToCurveProgress ( mStackVisibleRect . bottom - mBetweenAffiliationOffset ) ; float pTaskHeightOffset = pAtBottomOfStackRect - screenYToCurveProgress ( mStackVisibleRect . bottom - taskHeight ) ; float pNavBarOffset = pAtBottomOfStackRect - screenYToCurveProgress ( mStackVisibleRect . bottom - ( mStackVisibleRect . bottom - mStackRect . bottom ) ) ; float pAtBackMostCardTop = _NUM ; float pAtFrontMostCardTop = pAtBackMostCardTop ; int taskCount = data . size ( ) ; for ( int i = _NUM ; i < taskCount ; i ++ ) { mTaskProgressMap . put ( data . get ( i ) , pAtFrontMostCardTop ) ; if ( i < ( taskCount - _NUM ) ) { float pPeek = pBetweenAffiliateOffset ; pAtFrontMostCardTop += pPeek ; } } mMaxScrollP = pAtFrontMostCardTop - ( ( _NUM - pTaskHeightOffset - pNavBarOffset ) ) ; mMinScrollP = data . size ( ) == _NUM ? Math . max ( mMaxScrollP , _NUM ) : _NUM ; if ( launchedWithAltTab && launchedFromHome ) { mInitialScrollP = mMaxScrollP ; } else { mInitialScrollP = pAtFrontMostCardTop - _NUM ; } mInitialScrollP = Math . min ( mMaxScrollP , Math . max ( _NUM , mInitialScrollP ) ) ; } | 534 |
java-test-69 | java | What does the code compute ? | the minimum and maximum scroll progress values | void compute Min Max Scroll ( Array List < T > data , boolean launched With Alt Tab , boolean launched From Home ) { m Task Progress Map . clear ( ) ; if ( data . is Empty ( ) ) { m Min Scroll P = m Max Scroll P = NUM ; return ; } int task Height = m Task Rect . height ( ) ; float p At Bottom Of Stack Rect = screen Y To Curve Progress ( m Stack Visible Rect . bottom ) ; float p Within Affiliate Top = screen Y To Curve Progress ( m Stack Visible Rect . bottom - m Within Affiliation Offset ) ; float scale = curve Progress To Scale ( p Within Affiliate Top ) ; int scale Y Offset = ( int ) ( ( ( NUM - scale ) * task Height ) / NUM ) ; p Within Affiliate Top = screen Y To Curve Progress ( m Stack Visible Rect . bottom - m Within Affiliation Offset + scale Y Offset ) ; float p Within Affiliate Offset = p At Bottom Of Stack Rect - p Within Affiliate Top ; float p Between Affiliate Offset = p At Bottom Of Stack Rect - screen Y To Curve Progress ( m Stack Visible Rect . bottom - m Between Affiliation Offset ) ; float p Task Height Offset = p At Bottom Of Stack Rect - screen Y To Curve Progress ( m Stack Visible Rect . bottom - task Height ) ; float p Nav Bar Offset = p At Bottom Of Stack Rect - screen Y To Curve Progress ( m Stack Visible Rect . bottom - ( m Stack Visible Rect . bottom - m Stack Rect . bottom ) ) ; float p At Back Most Card Top = NUM ; float p At Front Most Card Top = p At Back Most Card Top ; int task Count = data . size ( ) ; for ( int i = NUM ; i < task Count ; i ++ ) { m Task Progress Map . put ( data . get ( i ) , p At Front Most Card Top ) ; if ( i < ( task Count - NUM ) ) { float p Peek = p Between Affiliate Offset ; p At Front Most Card Top += p Peek ; } } m Max Scroll P = p At Front Most Card Top - ( ( NUM - p Task Height Offset - p Nav Bar Offset ) ) ; m Min Scroll P = data . size ( ) == NUM ? Math . max ( m Max Scroll P , NUM ) : NUM ; if ( launched With Alt Tab && launched From Home ) { m Initial Scroll P = m Max Scroll P ; } else { m Initial Scroll P = p At Front Most Card Top - NUM ; } m Initial Scroll P = Math . min ( m Max Scroll P , Math . max ( NUM , m Initial Scroll P ) ) ; } | void computeMinMaxScroll ( ArrayList < T > data , boolean launchedWithAltTab , boolean launchedFromHome ) { mTaskProgressMap . clear ( ) ; if ( data . isEmpty ( ) ) { mMinScrollP = mMaxScrollP = _NUM ; return ; } int taskHeight = mTaskRect . height ( ) ; float pAtBottomOfStackRect = screenYToCurveProgress ( mStackVisibleRect . bottom ) ; float pWithinAffiliateTop = screenYToCurveProgress ( mStackVisibleRect . bottom - mWithinAffiliationOffset ) ; float scale = curveProgressToScale ( pWithinAffiliateTop ) ; int scaleYOffset = ( int ) ( ( ( _NUM - scale ) * taskHeight ) / _NUM ) ; pWithinAffiliateTop = screenYToCurveProgress ( mStackVisibleRect . bottom - mWithinAffiliationOffset + scaleYOffset ) ; float pWithinAffiliateOffset = pAtBottomOfStackRect - pWithinAffiliateTop ; float pBetweenAffiliateOffset = pAtBottomOfStackRect - screenYToCurveProgress ( mStackVisibleRect . bottom - mBetweenAffiliationOffset ) ; float pTaskHeightOffset = pAtBottomOfStackRect - screenYToCurveProgress ( mStackVisibleRect . bottom - taskHeight ) ; float pNavBarOffset = pAtBottomOfStackRect - screenYToCurveProgress ( mStackVisibleRect . bottom - ( mStackVisibleRect . bottom - mStackRect . bottom ) ) ; float pAtBackMostCardTop = _NUM ; float pAtFrontMostCardTop = pAtBackMostCardTop ; int taskCount = data . size ( ) ; for ( int i = _NUM ; i < taskCount ; i ++ ) { mTaskProgressMap . put ( data . get ( i ) , pAtFrontMostCardTop ) ; if ( i < ( taskCount - _NUM ) ) { float pPeek = pBetweenAffiliateOffset ; pAtFrontMostCardTop += pPeek ; } } mMaxScrollP = pAtFrontMostCardTop - ( ( _NUM - pTaskHeightOffset - pNavBarOffset ) ) ; mMinScrollP = data . size ( ) == _NUM ? Math . max ( mMaxScrollP , _NUM ) : _NUM ; if ( launchedWithAltTab && launchedFromHome ) { mInitialScrollP = mMaxScrollP ; } else { mInitialScrollP = pAtFrontMostCardTop - _NUM ; } mInitialScrollP = Math . min ( mMaxScrollP , Math . max ( _NUM , mInitialScrollP ) ) ; } | 534 |
java-test-70 | java | Where do we pass ? | in the alt - tab state | void compute Min Max Scroll ( Array List < T > data , boolean launched With Alt Tab , boolean launched From Home ) { m Task Progress Map . clear ( ) ; if ( data . is Empty ( ) ) { m Min Scroll P = m Max Scroll P = NUM ; return ; } int task Height = m Task Rect . height ( ) ; float p At Bottom Of Stack Rect = screen Y To Curve Progress ( m Stack Visible Rect . bottom ) ; float p Within Affiliate Top = screen Y To Curve Progress ( m Stack Visible Rect . bottom - m Within Affiliation Offset ) ; float scale = curve Progress To Scale ( p Within Affiliate Top ) ; int scale Y Offset = ( int ) ( ( ( NUM - scale ) * task Height ) / NUM ) ; p Within Affiliate Top = screen Y To Curve Progress ( m Stack Visible Rect . bottom - m Within Affiliation Offset + scale Y Offset ) ; float p Within Affiliate Offset = p At Bottom Of Stack Rect - p Within Affiliate Top ; float p Between Affiliate Offset = p At Bottom Of Stack Rect - screen Y To Curve Progress ( m Stack Visible Rect . bottom - m Between Affiliation Offset ) ; float p Task Height Offset = p At Bottom Of Stack Rect - screen Y To Curve Progress ( m Stack Visible Rect . bottom - task Height ) ; float p Nav Bar Offset = p At Bottom Of Stack Rect - screen Y To Curve Progress ( m Stack Visible Rect . bottom - ( m Stack Visible Rect . bottom - m Stack Rect . bottom ) ) ; float p At Back Most Card Top = NUM ; float p At Front Most Card Top = p At Back Most Card Top ; int task Count = data . size ( ) ; for ( int i = NUM ; i < task Count ; i ++ ) { m Task Progress Map . put ( data . get ( i ) , p At Front Most Card Top ) ; if ( i < ( task Count - NUM ) ) { float p Peek = p Between Affiliate Offset ; p At Front Most Card Top += p Peek ; } } m Max Scroll P = p At Front Most Card Top - ( ( NUM - p Task Height Offset - p Nav Bar Offset ) ) ; m Min Scroll P = data . size ( ) == NUM ? Math . max ( m Max Scroll P , NUM ) : NUM ; if ( launched With Alt Tab && launched From Home ) { m Initial Scroll P = m Max Scroll P ; } else { m Initial Scroll P = p At Front Most Card Top - NUM ; } m Initial Scroll P = Math . min ( m Max Scroll P , Math . max ( NUM , m Initial Scroll P ) ) ; } | void computeMinMaxScroll ( ArrayList < T > data , boolean launchedWithAltTab , boolean launchedFromHome ) { mTaskProgressMap . clear ( ) ; if ( data . isEmpty ( ) ) { mMinScrollP = mMaxScrollP = _NUM ; return ; } int taskHeight = mTaskRect . height ( ) ; float pAtBottomOfStackRect = screenYToCurveProgress ( mStackVisibleRect . bottom ) ; float pWithinAffiliateTop = screenYToCurveProgress ( mStackVisibleRect . bottom - mWithinAffiliationOffset ) ; float scale = curveProgressToScale ( pWithinAffiliateTop ) ; int scaleYOffset = ( int ) ( ( ( _NUM - scale ) * taskHeight ) / _NUM ) ; pWithinAffiliateTop = screenYToCurveProgress ( mStackVisibleRect . bottom - mWithinAffiliationOffset + scaleYOffset ) ; float pWithinAffiliateOffset = pAtBottomOfStackRect - pWithinAffiliateTop ; float pBetweenAffiliateOffset = pAtBottomOfStackRect - screenYToCurveProgress ( mStackVisibleRect . bottom - mBetweenAffiliationOffset ) ; float pTaskHeightOffset = pAtBottomOfStackRect - screenYToCurveProgress ( mStackVisibleRect . bottom - taskHeight ) ; float pNavBarOffset = pAtBottomOfStackRect - screenYToCurveProgress ( mStackVisibleRect . bottom - ( mStackVisibleRect . bottom - mStackRect . bottom ) ) ; float pAtBackMostCardTop = _NUM ; float pAtFrontMostCardTop = pAtBackMostCardTop ; int taskCount = data . size ( ) ; for ( int i = _NUM ; i < taskCount ; i ++ ) { mTaskProgressMap . put ( data . get ( i ) , pAtFrontMostCardTop ) ; if ( i < ( taskCount - _NUM ) ) { float pPeek = pBetweenAffiliateOffset ; pAtFrontMostCardTop += pPeek ; } } mMaxScrollP = pAtFrontMostCardTop - ( ( _NUM - pTaskHeightOffset - pNavBarOffset ) ) ; mMinScrollP = data . size ( ) == _NUM ? Math . max ( mMaxScrollP , _NUM ) : _NUM ; if ( launchedWithAltTab && launchedFromHome ) { mInitialScrollP = mMaxScrollP ; } else { mInitialScrollP = pAtFrontMostCardTop - _NUM ; } mInitialScrollP = Math . min ( mMaxScrollP , Math . max ( _NUM , mInitialScrollP ) ) ; } | 534 |
java-test-71 | java | Does the code compute the minimum and maximum scroll progress values ? | Yes | void compute Min Max Scroll ( Array List < T > data , boolean launched With Alt Tab , boolean launched From Home ) { m Task Progress Map . clear ( ) ; if ( data . is Empty ( ) ) { m Min Scroll P = m Max Scroll P = NUM ; return ; } int task Height = m Task Rect . height ( ) ; float p At Bottom Of Stack Rect = screen Y To Curve Progress ( m Stack Visible Rect . bottom ) ; float p Within Affiliate Top = screen Y To Curve Progress ( m Stack Visible Rect . bottom - m Within Affiliation Offset ) ; float scale = curve Progress To Scale ( p Within Affiliate Top ) ; int scale Y Offset = ( int ) ( ( ( NUM - scale ) * task Height ) / NUM ) ; p Within Affiliate Top = screen Y To Curve Progress ( m Stack Visible Rect . bottom - m Within Affiliation Offset + scale Y Offset ) ; float p Within Affiliate Offset = p At Bottom Of Stack Rect - p Within Affiliate Top ; float p Between Affiliate Offset = p At Bottom Of Stack Rect - screen Y To Curve Progress ( m Stack Visible Rect . bottom - m Between Affiliation Offset ) ; float p Task Height Offset = p At Bottom Of Stack Rect - screen Y To Curve Progress ( m Stack Visible Rect . bottom - task Height ) ; float p Nav Bar Offset = p At Bottom Of Stack Rect - screen Y To Curve Progress ( m Stack Visible Rect . bottom - ( m Stack Visible Rect . bottom - m Stack Rect . bottom ) ) ; float p At Back Most Card Top = NUM ; float p At Front Most Card Top = p At Back Most Card Top ; int task Count = data . size ( ) ; for ( int i = NUM ; i < task Count ; i ++ ) { m Task Progress Map . put ( data . get ( i ) , p At Front Most Card Top ) ; if ( i < ( task Count - NUM ) ) { float p Peek = p Between Affiliate Offset ; p At Front Most Card Top += p Peek ; } } m Max Scroll P = p At Front Most Card Top - ( ( NUM - p Task Height Offset - p Nav Bar Offset ) ) ; m Min Scroll P = data . size ( ) == NUM ? Math . max ( m Max Scroll P , NUM ) : NUM ; if ( launched With Alt Tab && launched From Home ) { m Initial Scroll P = m Max Scroll P ; } else { m Initial Scroll P = p At Front Most Card Top - NUM ; } m Initial Scroll P = Math . min ( m Max Scroll P , Math . max ( NUM , m Initial Scroll P ) ) ; } | void computeMinMaxScroll ( ArrayList < T > data , boolean launchedWithAltTab , boolean launchedFromHome ) { mTaskProgressMap . clear ( ) ; if ( data . isEmpty ( ) ) { mMinScrollP = mMaxScrollP = _NUM ; return ; } int taskHeight = mTaskRect . height ( ) ; float pAtBottomOfStackRect = screenYToCurveProgress ( mStackVisibleRect . bottom ) ; float pWithinAffiliateTop = screenYToCurveProgress ( mStackVisibleRect . bottom - mWithinAffiliationOffset ) ; float scale = curveProgressToScale ( pWithinAffiliateTop ) ; int scaleYOffset = ( int ) ( ( ( _NUM - scale ) * taskHeight ) / _NUM ) ; pWithinAffiliateTop = screenYToCurveProgress ( mStackVisibleRect . bottom - mWithinAffiliationOffset + scaleYOffset ) ; float pWithinAffiliateOffset = pAtBottomOfStackRect - pWithinAffiliateTop ; float pBetweenAffiliateOffset = pAtBottomOfStackRect - screenYToCurveProgress ( mStackVisibleRect . bottom - mBetweenAffiliationOffset ) ; float pTaskHeightOffset = pAtBottomOfStackRect - screenYToCurveProgress ( mStackVisibleRect . bottom - taskHeight ) ; float pNavBarOffset = pAtBottomOfStackRect - screenYToCurveProgress ( mStackVisibleRect . bottom - ( mStackVisibleRect . bottom - mStackRect . bottom ) ) ; float pAtBackMostCardTop = _NUM ; float pAtFrontMostCardTop = pAtBackMostCardTop ; int taskCount = data . size ( ) ; for ( int i = _NUM ; i < taskCount ; i ++ ) { mTaskProgressMap . put ( data . get ( i ) , pAtFrontMostCardTop ) ; if ( i < ( taskCount - _NUM ) ) { float pPeek = pBetweenAffiliateOffset ; pAtFrontMostCardTop += pPeek ; } } mMaxScrollP = pAtFrontMostCardTop - ( ( _NUM - pTaskHeightOffset - pNavBarOffset ) ) ; mMinScrollP = data . size ( ) == _NUM ? Math . max ( mMaxScrollP , _NUM ) : _NUM ; if ( launchedWithAltTab && launchedFromHome ) { mInitialScrollP = mMaxScrollP ; } else { mInitialScrollP = pAtFrontMostCardTop - _NUM ; } mInitialScrollP = Math . min ( mMaxScrollP , Math . max ( _NUM , mInitialScrollP ) ) ; } | 534 |
java-test-72 | java | Does we need to pass in the alt - tab state ? | Yes | void compute Min Max Scroll ( Array List < T > data , boolean launched With Alt Tab , boolean launched From Home ) { m Task Progress Map . clear ( ) ; if ( data . is Empty ( ) ) { m Min Scroll P = m Max Scroll P = NUM ; return ; } int task Height = m Task Rect . height ( ) ; float p At Bottom Of Stack Rect = screen Y To Curve Progress ( m Stack Visible Rect . bottom ) ; float p Within Affiliate Top = screen Y To Curve Progress ( m Stack Visible Rect . bottom - m Within Affiliation Offset ) ; float scale = curve Progress To Scale ( p Within Affiliate Top ) ; int scale Y Offset = ( int ) ( ( ( NUM - scale ) * task Height ) / NUM ) ; p Within Affiliate Top = screen Y To Curve Progress ( m Stack Visible Rect . bottom - m Within Affiliation Offset + scale Y Offset ) ; float p Within Affiliate Offset = p At Bottom Of Stack Rect - p Within Affiliate Top ; float p Between Affiliate Offset = p At Bottom Of Stack Rect - screen Y To Curve Progress ( m Stack Visible Rect . bottom - m Between Affiliation Offset ) ; float p Task Height Offset = p At Bottom Of Stack Rect - screen Y To Curve Progress ( m Stack Visible Rect . bottom - task Height ) ; float p Nav Bar Offset = p At Bottom Of Stack Rect - screen Y To Curve Progress ( m Stack Visible Rect . bottom - ( m Stack Visible Rect . bottom - m Stack Rect . bottom ) ) ; float p At Back Most Card Top = NUM ; float p At Front Most Card Top = p At Back Most Card Top ; int task Count = data . size ( ) ; for ( int i = NUM ; i < task Count ; i ++ ) { m Task Progress Map . put ( data . get ( i ) , p At Front Most Card Top ) ; if ( i < ( task Count - NUM ) ) { float p Peek = p Between Affiliate Offset ; p At Front Most Card Top += p Peek ; } } m Max Scroll P = p At Front Most Card Top - ( ( NUM - p Task Height Offset - p Nav Bar Offset ) ) ; m Min Scroll P = data . size ( ) == NUM ? Math . max ( m Max Scroll P , NUM ) : NUM ; if ( launched With Alt Tab && launched From Home ) { m Initial Scroll P = m Max Scroll P ; } else { m Initial Scroll P = p At Front Most Card Top - NUM ; } m Initial Scroll P = Math . min ( m Max Scroll P , Math . max ( NUM , m Initial Scroll P ) ) ; } | void computeMinMaxScroll ( ArrayList < T > data , boolean launchedWithAltTab , boolean launchedFromHome ) { mTaskProgressMap . clear ( ) ; if ( data . isEmpty ( ) ) { mMinScrollP = mMaxScrollP = _NUM ; return ; } int taskHeight = mTaskRect . height ( ) ; float pAtBottomOfStackRect = screenYToCurveProgress ( mStackVisibleRect . bottom ) ; float pWithinAffiliateTop = screenYToCurveProgress ( mStackVisibleRect . bottom - mWithinAffiliationOffset ) ; float scale = curveProgressToScale ( pWithinAffiliateTop ) ; int scaleYOffset = ( int ) ( ( ( _NUM - scale ) * taskHeight ) / _NUM ) ; pWithinAffiliateTop = screenYToCurveProgress ( mStackVisibleRect . bottom - mWithinAffiliationOffset + scaleYOffset ) ; float pWithinAffiliateOffset = pAtBottomOfStackRect - pWithinAffiliateTop ; float pBetweenAffiliateOffset = pAtBottomOfStackRect - screenYToCurveProgress ( mStackVisibleRect . bottom - mBetweenAffiliationOffset ) ; float pTaskHeightOffset = pAtBottomOfStackRect - screenYToCurveProgress ( mStackVisibleRect . bottom - taskHeight ) ; float pNavBarOffset = pAtBottomOfStackRect - screenYToCurveProgress ( mStackVisibleRect . bottom - ( mStackVisibleRect . bottom - mStackRect . bottom ) ) ; float pAtBackMostCardTop = _NUM ; float pAtFrontMostCardTop = pAtBackMostCardTop ; int taskCount = data . size ( ) ; for ( int i = _NUM ; i < taskCount ; i ++ ) { mTaskProgressMap . put ( data . get ( i ) , pAtFrontMostCardTop ) ; if ( i < ( taskCount - _NUM ) ) { float pPeek = pBetweenAffiliateOffset ; pAtFrontMostCardTop += pPeek ; } } mMaxScrollP = pAtFrontMostCardTop - ( ( _NUM - pTaskHeightOffset - pNavBarOffset ) ) ; mMinScrollP = data . size ( ) == _NUM ? Math . max ( mMaxScrollP , _NUM ) : _NUM ; if ( launchedWithAltTab && launchedFromHome ) { mInitialScrollP = mMaxScrollP ; } else { mInitialScrollP = pAtFrontMostCardTop - _NUM ; } mInitialScrollP = Math . min ( mMaxScrollP , Math . max ( _NUM , mInitialScrollP ) ) ; } | 534 |
java-test-73 | java | What does we need ? | to pass in the alt - tab state | void compute Min Max Scroll ( Array List < T > data , boolean launched With Alt Tab , boolean launched From Home ) { m Task Progress Map . clear ( ) ; if ( data . is Empty ( ) ) { m Min Scroll P = m Max Scroll P = NUM ; return ; } int task Height = m Task Rect . height ( ) ; float p At Bottom Of Stack Rect = screen Y To Curve Progress ( m Stack Visible Rect . bottom ) ; float p Within Affiliate Top = screen Y To Curve Progress ( m Stack Visible Rect . bottom - m Within Affiliation Offset ) ; float scale = curve Progress To Scale ( p Within Affiliate Top ) ; int scale Y Offset = ( int ) ( ( ( NUM - scale ) * task Height ) / NUM ) ; p Within Affiliate Top = screen Y To Curve Progress ( m Stack Visible Rect . bottom - m Within Affiliation Offset + scale Y Offset ) ; float p Within Affiliate Offset = p At Bottom Of Stack Rect - p Within Affiliate Top ; float p Between Affiliate Offset = p At Bottom Of Stack Rect - screen Y To Curve Progress ( m Stack Visible Rect . bottom - m Between Affiliation Offset ) ; float p Task Height Offset = p At Bottom Of Stack Rect - screen Y To Curve Progress ( m Stack Visible Rect . bottom - task Height ) ; float p Nav Bar Offset = p At Bottom Of Stack Rect - screen Y To Curve Progress ( m Stack Visible Rect . bottom - ( m Stack Visible Rect . bottom - m Stack Rect . bottom ) ) ; float p At Back Most Card Top = NUM ; float p At Front Most Card Top = p At Back Most Card Top ; int task Count = data . size ( ) ; for ( int i = NUM ; i < task Count ; i ++ ) { m Task Progress Map . put ( data . get ( i ) , p At Front Most Card Top ) ; if ( i < ( task Count - NUM ) ) { float p Peek = p Between Affiliate Offset ; p At Front Most Card Top += p Peek ; } } m Max Scroll P = p At Front Most Card Top - ( ( NUM - p Task Height Offset - p Nav Bar Offset ) ) ; m Min Scroll P = data . size ( ) == NUM ? Math . max ( m Max Scroll P , NUM ) : NUM ; if ( launched With Alt Tab && launched From Home ) { m Initial Scroll P = m Max Scroll P ; } else { m Initial Scroll P = p At Front Most Card Top - NUM ; } m Initial Scroll P = Math . min ( m Max Scroll P , Math . max ( NUM , m Initial Scroll P ) ) ; } | void computeMinMaxScroll ( ArrayList < T > data , boolean launchedWithAltTab , boolean launchedFromHome ) { mTaskProgressMap . clear ( ) ; if ( data . isEmpty ( ) ) { mMinScrollP = mMaxScrollP = _NUM ; return ; } int taskHeight = mTaskRect . height ( ) ; float pAtBottomOfStackRect = screenYToCurveProgress ( mStackVisibleRect . bottom ) ; float pWithinAffiliateTop = screenYToCurveProgress ( mStackVisibleRect . bottom - mWithinAffiliationOffset ) ; float scale = curveProgressToScale ( pWithinAffiliateTop ) ; int scaleYOffset = ( int ) ( ( ( _NUM - scale ) * taskHeight ) / _NUM ) ; pWithinAffiliateTop = screenYToCurveProgress ( mStackVisibleRect . bottom - mWithinAffiliationOffset + scaleYOffset ) ; float pWithinAffiliateOffset = pAtBottomOfStackRect - pWithinAffiliateTop ; float pBetweenAffiliateOffset = pAtBottomOfStackRect - screenYToCurveProgress ( mStackVisibleRect . bottom - mBetweenAffiliationOffset ) ; float pTaskHeightOffset = pAtBottomOfStackRect - screenYToCurveProgress ( mStackVisibleRect . bottom - taskHeight ) ; float pNavBarOffset = pAtBottomOfStackRect - screenYToCurveProgress ( mStackVisibleRect . bottom - ( mStackVisibleRect . bottom - mStackRect . bottom ) ) ; float pAtBackMostCardTop = _NUM ; float pAtFrontMostCardTop = pAtBackMostCardTop ; int taskCount = data . size ( ) ; for ( int i = _NUM ; i < taskCount ; i ++ ) { mTaskProgressMap . put ( data . get ( i ) , pAtFrontMostCardTop ) ; if ( i < ( taskCount - _NUM ) ) { float pPeek = pBetweenAffiliateOffset ; pAtFrontMostCardTop += pPeek ; } } mMaxScrollP = pAtFrontMostCardTop - ( ( _NUM - pTaskHeightOffset - pNavBarOffset ) ) ; mMinScrollP = data . size ( ) == _NUM ? Math . max ( mMaxScrollP , _NUM ) : _NUM ; if ( launchedWithAltTab && launchedFromHome ) { mInitialScrollP = mMaxScrollP ; } else { mInitialScrollP = pAtFrontMostCardTop - _NUM ; } mInitialScrollP = Math . min ( mMaxScrollP , Math . max ( _NUM , mInitialScrollP ) ) ; } | 534 |
java-test-74 | java | When may this method be called ? | before the recentsconfiguration is set | void compute Min Max Scroll ( Array List < T > data , boolean launched With Alt Tab , boolean launched From Home ) { m Task Progress Map . clear ( ) ; if ( data . is Empty ( ) ) { m Min Scroll P = m Max Scroll P = NUM ; return ; } int task Height = m Task Rect . height ( ) ; float p At Bottom Of Stack Rect = screen Y To Curve Progress ( m Stack Visible Rect . bottom ) ; float p Within Affiliate Top = screen Y To Curve Progress ( m Stack Visible Rect . bottom - m Within Affiliation Offset ) ; float scale = curve Progress To Scale ( p Within Affiliate Top ) ; int scale Y Offset = ( int ) ( ( ( NUM - scale ) * task Height ) / NUM ) ; p Within Affiliate Top = screen Y To Curve Progress ( m Stack Visible Rect . bottom - m Within Affiliation Offset + scale Y Offset ) ; float p Within Affiliate Offset = p At Bottom Of Stack Rect - p Within Affiliate Top ; float p Between Affiliate Offset = p At Bottom Of Stack Rect - screen Y To Curve Progress ( m Stack Visible Rect . bottom - m Between Affiliation Offset ) ; float p Task Height Offset = p At Bottom Of Stack Rect - screen Y To Curve Progress ( m Stack Visible Rect . bottom - task Height ) ; float p Nav Bar Offset = p At Bottom Of Stack Rect - screen Y To Curve Progress ( m Stack Visible Rect . bottom - ( m Stack Visible Rect . bottom - m Stack Rect . bottom ) ) ; float p At Back Most Card Top = NUM ; float p At Front Most Card Top = p At Back Most Card Top ; int task Count = data . size ( ) ; for ( int i = NUM ; i < task Count ; i ++ ) { m Task Progress Map . put ( data . get ( i ) , p At Front Most Card Top ) ; if ( i < ( task Count - NUM ) ) { float p Peek = p Between Affiliate Offset ; p At Front Most Card Top += p Peek ; } } m Max Scroll P = p At Front Most Card Top - ( ( NUM - p Task Height Offset - p Nav Bar Offset ) ) ; m Min Scroll P = data . size ( ) == NUM ? Math . max ( m Max Scroll P , NUM ) : NUM ; if ( launched With Alt Tab && launched From Home ) { m Initial Scroll P = m Max Scroll P ; } else { m Initial Scroll P = p At Front Most Card Top - NUM ; } m Initial Scroll P = Math . min ( m Max Scroll P , Math . max ( NUM , m Initial Scroll P ) ) ; } | void computeMinMaxScroll ( ArrayList < T > data , boolean launchedWithAltTab , boolean launchedFromHome ) { mTaskProgressMap . clear ( ) ; if ( data . isEmpty ( ) ) { mMinScrollP = mMaxScrollP = _NUM ; return ; } int taskHeight = mTaskRect . height ( ) ; float pAtBottomOfStackRect = screenYToCurveProgress ( mStackVisibleRect . bottom ) ; float pWithinAffiliateTop = screenYToCurveProgress ( mStackVisibleRect . bottom - mWithinAffiliationOffset ) ; float scale = curveProgressToScale ( pWithinAffiliateTop ) ; int scaleYOffset = ( int ) ( ( ( _NUM - scale ) * taskHeight ) / _NUM ) ; pWithinAffiliateTop = screenYToCurveProgress ( mStackVisibleRect . bottom - mWithinAffiliationOffset + scaleYOffset ) ; float pWithinAffiliateOffset = pAtBottomOfStackRect - pWithinAffiliateTop ; float pBetweenAffiliateOffset = pAtBottomOfStackRect - screenYToCurveProgress ( mStackVisibleRect . bottom - mBetweenAffiliationOffset ) ; float pTaskHeightOffset = pAtBottomOfStackRect - screenYToCurveProgress ( mStackVisibleRect . bottom - taskHeight ) ; float pNavBarOffset = pAtBottomOfStackRect - screenYToCurveProgress ( mStackVisibleRect . bottom - ( mStackVisibleRect . bottom - mStackRect . bottom ) ) ; float pAtBackMostCardTop = _NUM ; float pAtFrontMostCardTop = pAtBackMostCardTop ; int taskCount = data . size ( ) ; for ( int i = _NUM ; i < taskCount ; i ++ ) { mTaskProgressMap . put ( data . get ( i ) , pAtFrontMostCardTop ) ; if ( i < ( taskCount - _NUM ) ) { float pPeek = pBetweenAffiliateOffset ; pAtFrontMostCardTop += pPeek ; } } mMaxScrollP = pAtFrontMostCardTop - ( ( _NUM - pTaskHeightOffset - pNavBarOffset ) ) ; mMinScrollP = data . size ( ) == _NUM ? Math . max ( mMaxScrollP , _NUM ) : _NUM ; if ( launchedWithAltTab && launchedFromHome ) { mInitialScrollP = mMaxScrollP ; } else { mInitialScrollP = pAtFrontMostCardTop - _NUM ; } mInitialScrollP = Math . min ( mMaxScrollP , Math . max ( _NUM , mInitialScrollP ) ) ; } | 534 |
java-test-75 | java | In which direction is that list ordered in terms of the message i d ' s ? | from lowest to highest | private void insert In Order ( Vector list , Mqtt Wire Message new Msg ) { int new Msg Id = new Msg . get Message Id ( ) ; for ( int i = NUM ; i < list . size ( ) ; i ++ ) { Mqtt Wire Message other Msg = ( Mqtt Wire Message ) list . element At ( i ) ; int other Msg Id = other Msg . get Message Id ( ) ; if ( other Msg Id > new Msg Id ) { list . insert Element At ( new Msg , i ) ; return ; } } list . add Element ( new Msg ) ; } | private void insertInOrder ( Vector list , MqttWireMessage newMsg ) { int newMsgId = newMsg . getMessageId ( ) ; for ( int i = _NUM ; i < list . size ( ) ; i ++ ) { MqttWireMessage otherMsg = ( MqttWireMessage ) list . elementAt ( i ) ; int otherMsgId = otherMsg . getMessageId ( ) ; if ( otherMsgId > newMsgId ) { list . insertElementAt ( newMsg , i ) ; return ; } } list . addElement ( newMsg ) ; } | 119 |
java-test-76 | java | How is that list ordered from lowest to highest ? | in terms of the message i d ' s | private void insert In Order ( Vector list , Mqtt Wire Message new Msg ) { int new Msg Id = new Msg . get Message Id ( ) ; for ( int i = NUM ; i < list . size ( ) ; i ++ ) { Mqtt Wire Message other Msg = ( Mqtt Wire Message ) list . element At ( i ) ; int other Msg Id = other Msg . get Message Id ( ) ; if ( other Msg Id > new Msg Id ) { list . insert Element At ( new Msg , i ) ; return ; } } list . add Element ( new Msg ) ; } | private void insertInOrder ( Vector list , MqttWireMessage newMsg ) { int newMsgId = newMsg . getMessageId ( ) ; for ( int i = _NUM ; i < list . size ( ) ; i ++ ) { MqttWireMessage otherMsg = ( MqttWireMessage ) list . elementAt ( i ) ; int otherMsgId = otherMsg . getMessageId ( ) ; if ( otherMsgId > newMsgId ) { list . insertElementAt ( newMsg , i ) ; return ; } } list . addElement ( newMsg ) ; } | 119 |
java-test-77 | java | Does the code compute the final values for edge functions ? | Yes | private void compute Values ( ) { logger . debug ( STRING ) ; Map < N , Set < D > > all Seeds = new Hash Map < N , Set < D > > ( initial Seeds ) ; for ( N unbalanced Ret Site : unbalanced Ret Sites ) { Set < D > seeds = all Seeds . get ( unbalanced Ret Site ) ; if ( seeds == null ) { seeds = new Hash Set < D > ( ) ; all Seeds . put ( unbalanced Ret Site , seeds ) ; } seeds . add ( zero Value ) ; } for ( Entry < N , Set < D > > seed : all Seeds . entry Set ( ) ) { N start Point = seed . get Key ( ) ; for ( D val : seed . get Value ( ) ) { set Val ( start Point , val , value Lattice . bottom Element ( ) ) ; Pair < N , D > super Graph Node = new Pair < N , D > ( start Point , val ) ; schedule Value Processing ( new Value Propagation Task ( super Graph Node ) ) ; } } logger . debug ( STRING ) ; try { executor . await Completion ( ) ; } catch ( Interrupted Exception e ) { e . print Stack Trace ( ) ; } Set < N > all Non Call Start Nodes = icfg . all Non Call Start Nodes ( ) ; @ Suppress Warnings ( STRING ) N [ ] non Call Start Nodes Array = ( N [ ] ) new Object [ all Non Call Start Nodes . size ( ) ] ; int i = NUM ; for ( N n : all Non Call Start Nodes ) { non Call Start Nodes Array [ i ] = n ; i ++ ; } for ( int t = NUM ; t < num Threads ; t ++ ) { Value Computation Task task = new Value Computation Task ( non Call Start Nodes Array , t ) ; schedule Value Computation Task ( task ) ; } try { executor . await Completion ( ) ; } catch ( Interrupted Exception e ) { e . print Stack Trace ( ) ; } } | private void computeValues ( ) { logger . debug ( STRING ) ; Map < N , Set < D > > allSeeds = new HashMap < N , Set < D > > ( initialSeeds ) ; for ( N unbalancedRetSite : unbalancedRetSites ) { Set < D > seeds = allSeeds . get ( unbalancedRetSite ) ; if ( seeds == null ) { seeds = new HashSet < D > ( ) ; allSeeds . put ( unbalancedRetSite , seeds ) ; } seeds . add ( zeroValue ) ; } for ( Entry < N , Set < D > > seed : allSeeds . entrySet ( ) ) { N startPoint = seed . getKey ( ) ; for ( D val : seed . getValue ( ) ) { setVal ( startPoint , val , valueLattice . bottomElement ( ) ) ; Pair < N , D > superGraphNode = new Pair < N , D > ( startPoint , val ) ; scheduleValueProcessing ( new ValuePropagationTask ( superGraphNode ) ) ; } } logger . debug ( STRING ) ; try { executor . awaitCompletion ( ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } Set < N > allNonCallStartNodes = icfg . allNonCallStartNodes ( ) ; @ SuppressWarnings ( STRING ) N [ ] nonCallStartNodesArray = ( N [ ] ) new Object [ allNonCallStartNodes . size ( ) ] ; int i = _NUM ; for ( N n : allNonCallStartNodes ) { nonCallStartNodesArray [ i ] = n ; i ++ ; } for ( int t = _NUM ; t < numThreads ; t ++ ) { ValueComputationTask task = new ValueComputationTask ( nonCallStartNodesArray , t ) ; scheduleValueComputationTask ( task ) ; } try { executor . awaitCompletion ( ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } } | 404 |
java-test-78 | java | What does the code compute ? | the final values for edge functions | private void compute Values ( ) { logger . debug ( STRING ) ; Map < N , Set < D > > all Seeds = new Hash Map < N , Set < D > > ( initial Seeds ) ; for ( N unbalanced Ret Site : unbalanced Ret Sites ) { Set < D > seeds = all Seeds . get ( unbalanced Ret Site ) ; if ( seeds == null ) { seeds = new Hash Set < D > ( ) ; all Seeds . put ( unbalanced Ret Site , seeds ) ; } seeds . add ( zero Value ) ; } for ( Entry < N , Set < D > > seed : all Seeds . entry Set ( ) ) { N start Point = seed . get Key ( ) ; for ( D val : seed . get Value ( ) ) { set Val ( start Point , val , value Lattice . bottom Element ( ) ) ; Pair < N , D > super Graph Node = new Pair < N , D > ( start Point , val ) ; schedule Value Processing ( new Value Propagation Task ( super Graph Node ) ) ; } } logger . debug ( STRING ) ; try { executor . await Completion ( ) ; } catch ( Interrupted Exception e ) { e . print Stack Trace ( ) ; } Set < N > all Non Call Start Nodes = icfg . all Non Call Start Nodes ( ) ; @ Suppress Warnings ( STRING ) N [ ] non Call Start Nodes Array = ( N [ ] ) new Object [ all Non Call Start Nodes . size ( ) ] ; int i = NUM ; for ( N n : all Non Call Start Nodes ) { non Call Start Nodes Array [ i ] = n ; i ++ ; } for ( int t = NUM ; t < num Threads ; t ++ ) { Value Computation Task task = new Value Computation Task ( non Call Start Nodes Array , t ) ; schedule Value Computation Task ( task ) ; } try { executor . await Completion ( ) ; } catch ( Interrupted Exception e ) { e . print Stack Trace ( ) ; } } | private void computeValues ( ) { logger . debug ( STRING ) ; Map < N , Set < D > > allSeeds = new HashMap < N , Set < D > > ( initialSeeds ) ; for ( N unbalancedRetSite : unbalancedRetSites ) { Set < D > seeds = allSeeds . get ( unbalancedRetSite ) ; if ( seeds == null ) { seeds = new HashSet < D > ( ) ; allSeeds . put ( unbalancedRetSite , seeds ) ; } seeds . add ( zeroValue ) ; } for ( Entry < N , Set < D > > seed : allSeeds . entrySet ( ) ) { N startPoint = seed . getKey ( ) ; for ( D val : seed . getValue ( ) ) { setVal ( startPoint , val , valueLattice . bottomElement ( ) ) ; Pair < N , D > superGraphNode = new Pair < N , D > ( startPoint , val ) ; scheduleValueProcessing ( new ValuePropagationTask ( superGraphNode ) ) ; } } logger . debug ( STRING ) ; try { executor . awaitCompletion ( ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } Set < N > allNonCallStartNodes = icfg . allNonCallStartNodes ( ) ; @ SuppressWarnings ( STRING ) N [ ] nonCallStartNodesArray = ( N [ ] ) new Object [ allNonCallStartNodes . size ( ) ] ; int i = _NUM ; for ( N n : allNonCallStartNodes ) { nonCallStartNodesArray [ i ] = n ; i ++ ; } for ( int t = _NUM ; t < numThreads ; t ++ ) { ValueComputationTask task = new ValueComputationTask ( nonCallStartNodesArray , t ) ; scheduleValueComputationTask ( task ) ; } try { executor . awaitCompletion ( ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } } | 404 |
java-test-79 | java | When should these be edited ? | before each new version / installation of openmap | protected final static void init Hard Coded Properties ( Properties p ) { String Tokenizer tokenizer ; tokenizer = new String Tokenizer ( title , STRING ) ; tokenizer . next Token ( ) ; p . put ( Title , tokenizer . next Token ( ) ) ; tokenizer = new String Tokenizer ( version , STRING ) ; tokenizer . next Token ( ) ; p . put ( Version , tokenizer . next Token ( ) ) ; tokenizer = new String Tokenizer ( build , STRING ) ; tokenizer . next Token ( ) ; try { p . put ( Build Date , tokenizer . next Token ( ) ) ; } catch ( No Such Element Exception e ) { } } | protected final static void initHardCodedProperties ( Properties p ) { StringTokenizer tokenizer ; tokenizer = new StringTokenizer ( title , STRING ) ; tokenizer . nextToken ( ) ; p . put ( Title , tokenizer . nextToken ( ) ) ; tokenizer = new StringTokenizer ( version , STRING ) ; tokenizer . nextToken ( ) ; p . put ( Version , tokenizer . nextToken ( ) ) ; tokenizer = new StringTokenizer ( build , STRING ) ; tokenizer . nextToken ( ) ; try { p . put ( BuildDate , tokenizer . nextToken ( ) ) ; } catch ( NoSuchElementException e ) { } } | 128 |
java-test-80 | java | How are they declared ? | in such a way that they can be easily edited from a build script | protected final static void init Hard Coded Properties ( Properties p ) { String Tokenizer tokenizer ; tokenizer = new String Tokenizer ( title , STRING ) ; tokenizer . next Token ( ) ; p . put ( Title , tokenizer . next Token ( ) ) ; tokenizer = new String Tokenizer ( version , STRING ) ; tokenizer . next Token ( ) ; p . put ( Version , tokenizer . next Token ( ) ) ; tokenizer = new String Tokenizer ( build , STRING ) ; tokenizer . next Token ( ) ; try { p . put ( Build Date , tokenizer . next Token ( ) ) ; } catch ( No Such Element Exception e ) { } } | protected final static void initHardCodedProperties ( Properties p ) { StringTokenizer tokenizer ; tokenizer = new StringTokenizer ( title , STRING ) ; tokenizer . nextToken ( ) ; p . put ( Title , tokenizer . nextToken ( ) ) ; tokenizer = new StringTokenizer ( version , STRING ) ; tokenizer . nextToken ( ) ; p . put ( Version , tokenizer . nextToken ( ) ) ; tokenizer = new StringTokenizer ( build , STRING ) ; tokenizer . nextToken ( ) ; try { p . put ( BuildDate , tokenizer . nextToken ( ) ) ; } catch ( NoSuchElementException e ) { } } | 128 |
java-test-81 | java | What did the code hardcod ? | default properties | protected final static void init Hard Coded Properties ( Properties p ) { String Tokenizer tokenizer ; tokenizer = new String Tokenizer ( title , STRING ) ; tokenizer . next Token ( ) ; p . put ( Title , tokenizer . next Token ( ) ) ; tokenizer = new String Tokenizer ( version , STRING ) ; tokenizer . next Token ( ) ; p . put ( Version , tokenizer . next Token ( ) ) ; tokenizer = new String Tokenizer ( build , STRING ) ; tokenizer . next Token ( ) ; try { p . put ( Build Date , tokenizer . next Token ( ) ) ; } catch ( No Such Element Exception e ) { } } | protected final static void initHardCodedProperties ( Properties p ) { StringTokenizer tokenizer ; tokenizer = new StringTokenizer ( title , STRING ) ; tokenizer . nextToken ( ) ; p . put ( Title , tokenizer . nextToken ( ) ) ; tokenizer = new StringTokenizer ( version , STRING ) ; tokenizer . nextToken ( ) ; p . put ( Version , tokenizer . nextToken ( ) ) ; tokenizer = new StringTokenizer ( build , STRING ) ; tokenizer . nextToken ( ) ; try { p . put ( BuildDate , tokenizer . nextToken ( ) ) ; } catch ( NoSuchElementException e ) { } } | 128 |
java-test-82 | java | Did the code hardcod default properties ? | Yes | protected final static void init Hard Coded Properties ( Properties p ) { String Tokenizer tokenizer ; tokenizer = new String Tokenizer ( title , STRING ) ; tokenizer . next Token ( ) ; p . put ( Title , tokenizer . next Token ( ) ) ; tokenizer = new String Tokenizer ( version , STRING ) ; tokenizer . next Token ( ) ; p . put ( Version , tokenizer . next Token ( ) ) ; tokenizer = new String Tokenizer ( build , STRING ) ; tokenizer . next Token ( ) ; try { p . put ( Build Date , tokenizer . next Token ( ) ) ; } catch ( No Such Element Exception e ) { } } | protected final static void initHardCodedProperties ( Properties p ) { StringTokenizer tokenizer ; tokenizer = new StringTokenizer ( title , STRING ) ; tokenizer . nextToken ( ) ; p . put ( Title , tokenizer . nextToken ( ) ) ; tokenizer = new StringTokenizer ( version , STRING ) ; tokenizer . nextToken ( ) ; p . put ( Version , tokenizer . nextToken ( ) ) ; tokenizer = new StringTokenizer ( build , STRING ) ; tokenizer . nextToken ( ) ; try { p . put ( BuildDate , tokenizer . nextToken ( ) ) ; } catch ( NoSuchElementException e ) { } } | 128 |
java-test-89 | java | What replaces in a specified string ? | all entities and character references | public static String replace All ( String source ) { int region Start = NUM ; for ( String entity = get Next Entity ( source , region Start ) ; entity != null ; entity = get Next Entity ( source , region Start ) ) { String replacement = Entity Map . get ( entity ) ; if ( replacement == null ) { region Start += entity . length ( ) ; continue ; } source = source . replace ( entity , replacement ) ; region Start += replacement . length ( ) ; } return source ; } | public static String replaceAll ( String source ) { int regionStart = _NUM ; for ( String entity = getNextEntity ( source , regionStart ) ; entity != null ; entity = getNextEntity ( source , regionStart ) ) { String replacement = EntityMap . get ( entity ) ; if ( replacement == null ) { regionStart += entity . length ( ) ; continue ; } source = source . replace ( entity , replacement ) ; regionStart += replacement . length ( ) ; } return source ; } | 103 |
java-test-90 | java | Does all entities and character references replace in a specified string ? | Yes | public static String replace All ( String source ) { int region Start = NUM ; for ( String entity = get Next Entity ( source , region Start ) ; entity != null ; entity = get Next Entity ( source , region Start ) ) { String replacement = Entity Map . get ( entity ) ; if ( replacement == null ) { region Start += entity . length ( ) ; continue ; } source = source . replace ( entity , replacement ) ; region Start += replacement . length ( ) ; } return source ; } | public static String replaceAll ( String source ) { int regionStart = _NUM ; for ( String entity = getNextEntity ( source , regionStart ) ; entity != null ; entity = getNextEntity ( source , regionStart ) ) { String replacement = EntityMap . get ( entity ) ; if ( replacement == null ) { regionStart += entity . length ( ) ; continue ; } source = source . replace ( entity , replacement ) ; regionStart += replacement . length ( ) ; } return source ; } | 103 |
java-test-91 | java | Where does all entities and character references replace ? | in a specified string | public static String replace All ( String source ) { int region Start = NUM ; for ( String entity = get Next Entity ( source , region Start ) ; entity != null ; entity = get Next Entity ( source , region Start ) ) { String replacement = Entity Map . get ( entity ) ; if ( replacement == null ) { region Start += entity . length ( ) ; continue ; } source = source . replace ( entity , replacement ) ; region Start += replacement . length ( ) ; } return source ; } | public static String replaceAll ( String source ) { int regionStart = _NUM ; for ( String entity = getNextEntity ( source , regionStart ) ; entity != null ; entity = getNextEntity ( source , regionStart ) ) { String replacement = EntityMap . get ( entity ) ; if ( replacement == null ) { regionStart += entity . length ( ) ; continue ; } source = source . replace ( entity , replacement ) ; regionStart += replacement . length ( ) ; } return source ; } | 103 |
java-test-92 | java | What returns an action <br> ? | function hybrid - wumpus - agent | @ Override public Action execute ( Percept percept ) { kb . make Percept Sentence ( ( Agent Percept ) percept , t ) ; kb . tell Temporal Physics Sentences ( t ) ; Agent Position current = kb . ask Current Position ( t ) ; Set < Room > safe = kb . ask Safe Rooms ( t ) ; if ( kb . ask Glitter ( t ) ) { Set < Room > goals = new Linked Hash Set < Room > ( ) ; goals . add ( new Room ( NUM , NUM ) ) ; plan . add ( new Grab ( ) ) ; plan . add All ( plan Route ( current , goals , safe ) ) ; plan . add ( new Climb ( ) ) ; } Set < Room > unvisited = kb . ask Unvisited Rooms ( t ) ; if ( plan . is Empty ( ) ) { plan . add All ( plan Route ( current , Set Ops . intersection ( unvisited , safe ) , safe ) ) ; } if ( plan . is Empty ( ) && kb . ask Have Arrow ( t ) ) { Set < Room > possible Wumpus = kb . ask Possible Wumpus Rooms ( t ) ; plan . add All ( plan Shot ( current , possible Wumpus , safe ) ) ; } if ( plan . is Empty ( ) ) { Set < Room > not Unsafe = kb . ask Not Unsafe Rooms ( t ) ; plan . add All ( plan Route ( current , Set Ops . intersection ( unvisited , not Unsafe ) , safe ) ) ; } if ( plan . is Empty ( ) ) { Set < Room > start = new Linked Hash Set < Room > ( ) ; start . add ( new Room ( NUM , NUM ) ) ; plan . add All ( plan Route ( current , start , safe ) ) ; plan . add ( new Climb ( ) ) ; } Action action = plan . remove ( ) ; kb . make Action Sentence ( action , t ) ; t = t + NUM ; return action ; } | @ Override public Action execute ( Percept percept ) { kb . makePerceptSentence ( ( AgentPercept ) percept , t ) ; kb . tellTemporalPhysicsSentences ( t ) ; AgentPosition current = kb . askCurrentPosition ( t ) ; Set < Room > safe = kb . askSafeRooms ( t ) ; if ( kb . askGlitter ( t ) ) { Set < Room > goals = new LinkedHashSet < Room > ( ) ; goals . add ( new Room ( _NUM , _NUM ) ) ; plan . add ( new Grab ( ) ) ; plan . addAll ( planRoute ( current , goals , safe ) ) ; plan . add ( new Climb ( ) ) ; } Set < Room > unvisited = kb . askUnvisitedRooms ( t ) ; if ( plan . isEmpty ( ) ) { plan . addAll ( planRoute ( current , SetOps . intersection ( unvisited , safe ) , safe ) ) ; } if ( plan . isEmpty ( ) && kb . askHaveArrow ( t ) ) { Set < Room > possibleWumpus = kb . askPossibleWumpusRooms ( t ) ; plan . addAll ( planShot ( current , possibleWumpus , safe ) ) ; } if ( plan . isEmpty ( ) ) { Set < Room > notUnsafe = kb . askNotUnsafeRooms ( t ) ; plan . addAll ( planRoute ( current , SetOps . intersection ( unvisited , notUnsafe ) , safe ) ) ; } if ( plan . isEmpty ( ) ) { Set < Room > start = new LinkedHashSet < Room > ( ) ; start . add ( new Room ( _NUM , _NUM ) ) ; plan . addAll ( planRoute ( current , start , safe ) ) ; plan . add ( new Climb ( ) ) ; } Action action = plan . remove ( ) ; kb . makeActionSentence ( action , t ) ; t = t + _NUM ; return action ; } | 393 |
java-test-93 | java | Does function hybrid - wumpus - agent return an action <br> ? | Yes | @ Override public Action execute ( Percept percept ) { kb . make Percept Sentence ( ( Agent Percept ) percept , t ) ; kb . tell Temporal Physics Sentences ( t ) ; Agent Position current = kb . ask Current Position ( t ) ; Set < Room > safe = kb . ask Safe Rooms ( t ) ; if ( kb . ask Glitter ( t ) ) { Set < Room > goals = new Linked Hash Set < Room > ( ) ; goals . add ( new Room ( NUM , NUM ) ) ; plan . add ( new Grab ( ) ) ; plan . add All ( plan Route ( current , goals , safe ) ) ; plan . add ( new Climb ( ) ) ; } Set < Room > unvisited = kb . ask Unvisited Rooms ( t ) ; if ( plan . is Empty ( ) ) { plan . add All ( plan Route ( current , Set Ops . intersection ( unvisited , safe ) , safe ) ) ; } if ( plan . is Empty ( ) && kb . ask Have Arrow ( t ) ) { Set < Room > possible Wumpus = kb . ask Possible Wumpus Rooms ( t ) ; plan . add All ( plan Shot ( current , possible Wumpus , safe ) ) ; } if ( plan . is Empty ( ) ) { Set < Room > not Unsafe = kb . ask Not Unsafe Rooms ( t ) ; plan . add All ( plan Route ( current , Set Ops . intersection ( unvisited , not Unsafe ) , safe ) ) ; } if ( plan . is Empty ( ) ) { Set < Room > start = new Linked Hash Set < Room > ( ) ; start . add ( new Room ( NUM , NUM ) ) ; plan . add All ( plan Route ( current , start , safe ) ) ; plan . add ( new Climb ( ) ) ; } Action action = plan . remove ( ) ; kb . make Action Sentence ( action , t ) ; t = t + NUM ; return action ; } | @ Override public Action execute ( Percept percept ) { kb . makePerceptSentence ( ( AgentPercept ) percept , t ) ; kb . tellTemporalPhysicsSentences ( t ) ; AgentPosition current = kb . askCurrentPosition ( t ) ; Set < Room > safe = kb . askSafeRooms ( t ) ; if ( kb . askGlitter ( t ) ) { Set < Room > goals = new LinkedHashSet < Room > ( ) ; goals . add ( new Room ( _NUM , _NUM ) ) ; plan . add ( new Grab ( ) ) ; plan . addAll ( planRoute ( current , goals , safe ) ) ; plan . add ( new Climb ( ) ) ; } Set < Room > unvisited = kb . askUnvisitedRooms ( t ) ; if ( plan . isEmpty ( ) ) { plan . addAll ( planRoute ( current , SetOps . intersection ( unvisited , safe ) , safe ) ) ; } if ( plan . isEmpty ( ) && kb . askHaveArrow ( t ) ) { Set < Room > possibleWumpus = kb . askPossibleWumpusRooms ( t ) ; plan . addAll ( planShot ( current , possibleWumpus , safe ) ) ; } if ( plan . isEmpty ( ) ) { Set < Room > notUnsafe = kb . askNotUnsafeRooms ( t ) ; plan . addAll ( planRoute ( current , SetOps . intersection ( unvisited , notUnsafe ) , safe ) ) ; } if ( plan . isEmpty ( ) ) { Set < Room > start = new LinkedHashSet < Room > ( ) ; start . add ( new Room ( _NUM , _NUM ) ) ; plan . addAll ( planRoute ( current , start , safe ) ) ; plan . add ( new Climb ( ) ) ; } Action action = plan . remove ( ) ; kb . makeActionSentence ( action , t ) ; t = t + _NUM ; return action ; } | 393 |
java-test-116 | java | For what purpose does the code update the value graph ? | to account for a given instruction | private void process Instruction ( Instruction s ) { if ( s . is Dynamic Linking Point ( ) ) { process Call ( s ) ; } else if ( Move . conforms ( s ) ) { process Move ( s ) ; } else if ( s . operator ( ) == PI ) { process Pi ( s ) ; } else if ( New . conforms ( s ) ) { process New ( s ) ; } else if ( New Array . conforms ( s ) ) { process New Array ( s ) ; } else if ( Unary . conforms ( s ) ) { process Unary ( s ) ; } else if ( Guarded Unary . conforms ( s ) ) { process Guarded Unary ( s ) ; } else if ( Null Check . conforms ( s ) ) { process Null Check ( s ) ; } else if ( Zero Check . conforms ( s ) ) { process Zero Check ( s ) ; } else if ( Binary . conforms ( s ) ) { process Binary ( s ) ; } else if ( Guarded Binary . conforms ( s ) ) { process Guarded Binary ( s ) ; } else if ( Inline Guard . conforms ( s ) ) { process Inline Guard ( s ) ; } else if ( If Cmp . conforms ( s ) ) { process If Cmp ( s ) ; } else if ( Call . conforms ( s ) ) { process Call ( s ) ; } else if ( Monitor Op . conforms ( s ) ) { process Call ( s ) ; } else if ( Prepare . conforms ( s ) ) { process Call ( s ) ; } else if ( Attempt . conforms ( s ) ) { process Call ( s ) ; } else if ( Cache Op . conforms ( s ) ) { process Call ( s ) ; } else if ( A Load . conforms ( s ) ) { process A Load ( s ) ; } else if ( Put Field . conforms ( s ) ) { process Put Field ( s ) ; } else if ( Put Static . conforms ( s ) ) { process Put Static ( s ) ; } else if ( A Store . conforms ( s ) ) { process A Store ( s ) ; } else if ( Phi . conforms ( s ) ) { process Phi ( s ) ; } else if ( s . operator ( ) == IR PROLOGUE ) { process Prologue ( s ) ; } } | private void processInstruction ( Instruction s ) { if ( s . isDynamicLinkingPoint ( ) ) { processCall ( s ) ; } else if ( Move . conforms ( s ) ) { processMove ( s ) ; } else if ( s . operator ( ) == PI ) { processPi ( s ) ; } else if ( New . conforms ( s ) ) { processNew ( s ) ; } else if ( NewArray . conforms ( s ) ) { processNewArray ( s ) ; } else if ( Unary . conforms ( s ) ) { processUnary ( s ) ; } else if ( GuardedUnary . conforms ( s ) ) { processGuardedUnary ( s ) ; } else if ( NullCheck . conforms ( s ) ) { processNullCheck ( s ) ; } else if ( ZeroCheck . conforms ( s ) ) { processZeroCheck ( s ) ; } else if ( Binary . conforms ( s ) ) { processBinary ( s ) ; } else if ( GuardedBinary . conforms ( s ) ) { processGuardedBinary ( s ) ; } else if ( InlineGuard . conforms ( s ) ) { processInlineGuard ( s ) ; } else if ( IfCmp . conforms ( s ) ) { processIfCmp ( s ) ; } else if ( Call . conforms ( s ) ) { processCall ( s ) ; } else if ( MonitorOp . conforms ( s ) ) { processCall ( s ) ; } else if ( Prepare . conforms ( s ) ) { processCall ( s ) ; } else if ( Attempt . conforms ( s ) ) { processCall ( s ) ; } else if ( CacheOp . conforms ( s ) ) { processCall ( s ) ; } else if ( ALoad . conforms ( s ) ) { processALoad ( s ) ; } else if ( PutField . conforms ( s ) ) { processPutField ( s ) ; } else if ( PutStatic . conforms ( s ) ) { processPutStatic ( s ) ; } else if ( AStore . conforms ( s ) ) { processAStore ( s ) ; } else if ( Phi . conforms ( s ) ) { processPhi ( s ) ; } else if ( s . operator ( ) == IR_PROLOGUE ) { processPrologue ( s ) ; } } | 470 |
java-test-117 | java | Does the code update the value graph to account for a given instruction ? | Yes | private void process Instruction ( Instruction s ) { if ( s . is Dynamic Linking Point ( ) ) { process Call ( s ) ; } else if ( Move . conforms ( s ) ) { process Move ( s ) ; } else if ( s . operator ( ) == PI ) { process Pi ( s ) ; } else if ( New . conforms ( s ) ) { process New ( s ) ; } else if ( New Array . conforms ( s ) ) { process New Array ( s ) ; } else if ( Unary . conforms ( s ) ) { process Unary ( s ) ; } else if ( Guarded Unary . conforms ( s ) ) { process Guarded Unary ( s ) ; } else if ( Null Check . conforms ( s ) ) { process Null Check ( s ) ; } else if ( Zero Check . conforms ( s ) ) { process Zero Check ( s ) ; } else if ( Binary . conforms ( s ) ) { process Binary ( s ) ; } else if ( Guarded Binary . conforms ( s ) ) { process Guarded Binary ( s ) ; } else if ( Inline Guard . conforms ( s ) ) { process Inline Guard ( s ) ; } else if ( If Cmp . conforms ( s ) ) { process If Cmp ( s ) ; } else if ( Call . conforms ( s ) ) { process Call ( s ) ; } else if ( Monitor Op . conforms ( s ) ) { process Call ( s ) ; } else if ( Prepare . conforms ( s ) ) { process Call ( s ) ; } else if ( Attempt . conforms ( s ) ) { process Call ( s ) ; } else if ( Cache Op . conforms ( s ) ) { process Call ( s ) ; } else if ( A Load . conforms ( s ) ) { process A Load ( s ) ; } else if ( Put Field . conforms ( s ) ) { process Put Field ( s ) ; } else if ( Put Static . conforms ( s ) ) { process Put Static ( s ) ; } else if ( A Store . conforms ( s ) ) { process A Store ( s ) ; } else if ( Phi . conforms ( s ) ) { process Phi ( s ) ; } else if ( s . operator ( ) == IR PROLOGUE ) { process Prologue ( s ) ; } } | private void processInstruction ( Instruction s ) { if ( s . isDynamicLinkingPoint ( ) ) { processCall ( s ) ; } else if ( Move . conforms ( s ) ) { processMove ( s ) ; } else if ( s . operator ( ) == PI ) { processPi ( s ) ; } else if ( New . conforms ( s ) ) { processNew ( s ) ; } else if ( NewArray . conforms ( s ) ) { processNewArray ( s ) ; } else if ( Unary . conforms ( s ) ) { processUnary ( s ) ; } else if ( GuardedUnary . conforms ( s ) ) { processGuardedUnary ( s ) ; } else if ( NullCheck . conforms ( s ) ) { processNullCheck ( s ) ; } else if ( ZeroCheck . conforms ( s ) ) { processZeroCheck ( s ) ; } else if ( Binary . conforms ( s ) ) { processBinary ( s ) ; } else if ( GuardedBinary . conforms ( s ) ) { processGuardedBinary ( s ) ; } else if ( InlineGuard . conforms ( s ) ) { processInlineGuard ( s ) ; } else if ( IfCmp . conforms ( s ) ) { processIfCmp ( s ) ; } else if ( Call . conforms ( s ) ) { processCall ( s ) ; } else if ( MonitorOp . conforms ( s ) ) { processCall ( s ) ; } else if ( Prepare . conforms ( s ) ) { processCall ( s ) ; } else if ( Attempt . conforms ( s ) ) { processCall ( s ) ; } else if ( CacheOp . conforms ( s ) ) { processCall ( s ) ; } else if ( ALoad . conforms ( s ) ) { processALoad ( s ) ; } else if ( PutField . conforms ( s ) ) { processPutField ( s ) ; } else if ( PutStatic . conforms ( s ) ) { processPutStatic ( s ) ; } else if ( AStore . conforms ( s ) ) { processAStore ( s ) ; } else if ( Phi . conforms ( s ) ) { processPhi ( s ) ; } else if ( s . operator ( ) == IR_PROLOGUE ) { processPrologue ( s ) ; } } | 470 |
java-test-118 | java | What does the code update to account for a given instruction ? | the value graph | private void process Instruction ( Instruction s ) { if ( s . is Dynamic Linking Point ( ) ) { process Call ( s ) ; } else if ( Move . conforms ( s ) ) { process Move ( s ) ; } else if ( s . operator ( ) == PI ) { process Pi ( s ) ; } else if ( New . conforms ( s ) ) { process New ( s ) ; } else if ( New Array . conforms ( s ) ) { process New Array ( s ) ; } else if ( Unary . conforms ( s ) ) { process Unary ( s ) ; } else if ( Guarded Unary . conforms ( s ) ) { process Guarded Unary ( s ) ; } else if ( Null Check . conforms ( s ) ) { process Null Check ( s ) ; } else if ( Zero Check . conforms ( s ) ) { process Zero Check ( s ) ; } else if ( Binary . conforms ( s ) ) { process Binary ( s ) ; } else if ( Guarded Binary . conforms ( s ) ) { process Guarded Binary ( s ) ; } else if ( Inline Guard . conforms ( s ) ) { process Inline Guard ( s ) ; } else if ( If Cmp . conforms ( s ) ) { process If Cmp ( s ) ; } else if ( Call . conforms ( s ) ) { process Call ( s ) ; } else if ( Monitor Op . conforms ( s ) ) { process Call ( s ) ; } else if ( Prepare . conforms ( s ) ) { process Call ( s ) ; } else if ( Attempt . conforms ( s ) ) { process Call ( s ) ; } else if ( Cache Op . conforms ( s ) ) { process Call ( s ) ; } else if ( A Load . conforms ( s ) ) { process A Load ( s ) ; } else if ( Put Field . conforms ( s ) ) { process Put Field ( s ) ; } else if ( Put Static . conforms ( s ) ) { process Put Static ( s ) ; } else if ( A Store . conforms ( s ) ) { process A Store ( s ) ; } else if ( Phi . conforms ( s ) ) { process Phi ( s ) ; } else if ( s . operator ( ) == IR PROLOGUE ) { process Prologue ( s ) ; } } | private void processInstruction ( Instruction s ) { if ( s . isDynamicLinkingPoint ( ) ) { processCall ( s ) ; } else if ( Move . conforms ( s ) ) { processMove ( s ) ; } else if ( s . operator ( ) == PI ) { processPi ( s ) ; } else if ( New . conforms ( s ) ) { processNew ( s ) ; } else if ( NewArray . conforms ( s ) ) { processNewArray ( s ) ; } else if ( Unary . conforms ( s ) ) { processUnary ( s ) ; } else if ( GuardedUnary . conforms ( s ) ) { processGuardedUnary ( s ) ; } else if ( NullCheck . conforms ( s ) ) { processNullCheck ( s ) ; } else if ( ZeroCheck . conforms ( s ) ) { processZeroCheck ( s ) ; } else if ( Binary . conforms ( s ) ) { processBinary ( s ) ; } else if ( GuardedBinary . conforms ( s ) ) { processGuardedBinary ( s ) ; } else if ( InlineGuard . conforms ( s ) ) { processInlineGuard ( s ) ; } else if ( IfCmp . conforms ( s ) ) { processIfCmp ( s ) ; } else if ( Call . conforms ( s ) ) { processCall ( s ) ; } else if ( MonitorOp . conforms ( s ) ) { processCall ( s ) ; } else if ( Prepare . conforms ( s ) ) { processCall ( s ) ; } else if ( Attempt . conforms ( s ) ) { processCall ( s ) ; } else if ( CacheOp . conforms ( s ) ) { processCall ( s ) ; } else if ( ALoad . conforms ( s ) ) { processALoad ( s ) ; } else if ( PutField . conforms ( s ) ) { processPutField ( s ) ; } else if ( PutStatic . conforms ( s ) ) { processPutStatic ( s ) ; } else if ( AStore . conforms ( s ) ) { processAStore ( s ) ; } else if ( Phi . conforms ( s ) ) { processPhi ( s ) ; } else if ( s . operator ( ) == IR_PROLOGUE ) { processPrologue ( s ) ; } } | 470 |
java-test-119 | java | What did it perform when either the subscribe or unsubscribe buttons are pressed ? | the mqtt subscribe or unsubscribe | public void subscription ( String topic , int qos , boolean sub ) { set Title Text ( STRING ) ; if ( connected ) { try { String [ ] these Topics = new String [ NUM ] ; int [ ] these Qo S = new int [ NUM ] ; these Topics [ NUM ] = topic ; these Qo S [ NUM ] = qos ; synchronized ( this ) { if ( sub ) { write Logln ( STRING + topic + STRING + qos ) ; } else { write Logln ( STRING + topic ) ; } } if ( sub ) { mqtt . subscribe ( these Topics , these Qo S ) ; } else { mqtt . unsubscribe ( these Topics ) ; } } catch ( Exception ex ) { set Title Text ( STRING ) ; J Option Pane . show Message Dialog ( frame , ex . get Message ( ) , STRING , J Option Pane . ERROR MESSAGE ) ; } } else { set Title Text ( STRING ) ; } } | public void subscription ( String topic , int qos , boolean sub ) { setTitleText ( STRING ) ; if ( connected ) { try { String [ ] theseTopics = new String [ _NUM ] ; int [ ] theseQoS = new int [ _NUM ] ; theseTopics [ _NUM ] = topic ; theseQoS [ _NUM ] = qos ; synchronized ( this ) { if ( sub ) { writeLogln ( STRING + topic + STRING + qos ) ; } else { writeLogln ( STRING + topic ) ; } } if ( sub ) { mqtt . subscribe ( theseTopics , theseQoS ) ; } else { mqtt . unsubscribe ( theseTopics ) ; } } catch ( Exception ex ) { setTitleText ( STRING ) ; JOptionPane . showMessageDialog ( frame , ex . getMessage ( ) , STRING , JOptionPane . ERROR_MESSAGE ) ; } } else { setTitleText ( STRING ) ; } } | 188 |
java-test-120 | java | What did it write if the history window is open when either the subscribe or unsubscribe buttons are pressed ? | an entry in the history log | public void subscription ( String topic , int qos , boolean sub ) { set Title Text ( STRING ) ; if ( connected ) { try { String [ ] these Topics = new String [ NUM ] ; int [ ] these Qo S = new int [ NUM ] ; these Topics [ NUM ] = topic ; these Qo S [ NUM ] = qos ; synchronized ( this ) { if ( sub ) { write Logln ( STRING + topic + STRING + qos ) ; } else { write Logln ( STRING + topic ) ; } } if ( sub ) { mqtt . subscribe ( these Topics , these Qo S ) ; } else { mqtt . unsubscribe ( these Topics ) ; } } catch ( Exception ex ) { set Title Text ( STRING ) ; J Option Pane . show Message Dialog ( frame , ex . get Message ( ) , STRING , J Option Pane . ERROR MESSAGE ) ; } } else { set Title Text ( STRING ) ; } } | public void subscription ( String topic , int qos , boolean sub ) { setTitleText ( STRING ) ; if ( connected ) { try { String [ ] theseTopics = new String [ _NUM ] ; int [ ] theseQoS = new int [ _NUM ] ; theseTopics [ _NUM ] = topic ; theseQoS [ _NUM ] = qos ; synchronized ( this ) { if ( sub ) { writeLogln ( STRING + topic + STRING + qos ) ; } else { writeLogln ( STRING + topic ) ; } } if ( sub ) { mqtt . subscribe ( theseTopics , theseQoS ) ; } else { mqtt . unsubscribe ( theseTopics ) ; } } catch ( Exception ex ) { setTitleText ( STRING ) ; JOptionPane . showMessageDialog ( frame , ex . getMessage ( ) , STRING , JOptionPane . ERROR_MESSAGE ) ; } } else { setTitleText ( STRING ) ; } } | 188 |
java-test-121 | java | When is this method called ? | when either the subscribe or unsubscribe buttons are pressed . it performs the mqtt subscribe or unsubscribe and writes an entry in the history log if the history window is open | public void subscription ( String topic , int qos , boolean sub ) { set Title Text ( STRING ) ; if ( connected ) { try { String [ ] these Topics = new String [ NUM ] ; int [ ] these Qo S = new int [ NUM ] ; these Topics [ NUM ] = topic ; these Qo S [ NUM ] = qos ; synchronized ( this ) { if ( sub ) { write Logln ( STRING + topic + STRING + qos ) ; } else { write Logln ( STRING + topic ) ; } } if ( sub ) { mqtt . subscribe ( these Topics , these Qo S ) ; } else { mqtt . unsubscribe ( these Topics ) ; } } catch ( Exception ex ) { set Title Text ( STRING ) ; J Option Pane . show Message Dialog ( frame , ex . get Message ( ) , STRING , J Option Pane . ERROR MESSAGE ) ; } } else { set Title Text ( STRING ) ; } } | public void subscription ( String topic , int qos , boolean sub ) { setTitleText ( STRING ) ; if ( connected ) { try { String [ ] theseTopics = new String [ _NUM ] ; int [ ] theseQoS = new int [ _NUM ] ; theseTopics [ _NUM ] = topic ; theseQoS [ _NUM ] = qos ; synchronized ( this ) { if ( sub ) { writeLogln ( STRING + topic + STRING + qos ) ; } else { writeLogln ( STRING + topic ) ; } } if ( sub ) { mqtt . subscribe ( theseTopics , theseQoS ) ; } else { mqtt . unsubscribe ( theseTopics ) ; } } catch ( Exception ex ) { setTitleText ( STRING ) ; JOptionPane . showMessageDialog ( frame , ex . getMessage ( ) , STRING , JOptionPane . ERROR_MESSAGE ) ; } } else { setTitleText ( STRING ) ; } } | 188 |
java-test-122 | java | Did it perform the mqtt subscribe or unsubscribe when either the subscribe or unsubscribe buttons are pressed ? | Yes | public void subscription ( String topic , int qos , boolean sub ) { set Title Text ( STRING ) ; if ( connected ) { try { String [ ] these Topics = new String [ NUM ] ; int [ ] these Qo S = new int [ NUM ] ; these Topics [ NUM ] = topic ; these Qo S [ NUM ] = qos ; synchronized ( this ) { if ( sub ) { write Logln ( STRING + topic + STRING + qos ) ; } else { write Logln ( STRING + topic ) ; } } if ( sub ) { mqtt . subscribe ( these Topics , these Qo S ) ; } else { mqtt . unsubscribe ( these Topics ) ; } } catch ( Exception ex ) { set Title Text ( STRING ) ; J Option Pane . show Message Dialog ( frame , ex . get Message ( ) , STRING , J Option Pane . ERROR MESSAGE ) ; } } else { set Title Text ( STRING ) ; } } | public void subscription ( String topic , int qos , boolean sub ) { setTitleText ( STRING ) ; if ( connected ) { try { String [ ] theseTopics = new String [ _NUM ] ; int [ ] theseQoS = new int [ _NUM ] ; theseTopics [ _NUM ] = topic ; theseQoS [ _NUM ] = qos ; synchronized ( this ) { if ( sub ) { writeLogln ( STRING + topic + STRING + qos ) ; } else { writeLogln ( STRING + topic ) ; } } if ( sub ) { mqtt . subscribe ( theseTopics , theseQoS ) ; } else { mqtt . unsubscribe ( theseTopics ) ; } } catch ( Exception ex ) { setTitleText ( STRING ) ; JOptionPane . showMessageDialog ( frame , ex . getMessage ( ) , STRING , JOptionPane . ERROR_MESSAGE ) ; } } else { setTitleText ( STRING ) ; } } | 188 |
java-test-123 | java | Are any exceptions caught in a dialog box ? | Yes | public void subscription ( String topic , int qos , boolean sub ) { set Title Text ( STRING ) ; if ( connected ) { try { String [ ] these Topics = new String [ NUM ] ; int [ ] these Qo S = new int [ NUM ] ; these Topics [ NUM ] = topic ; these Qo S [ NUM ] = qos ; synchronized ( this ) { if ( sub ) { write Logln ( STRING + topic + STRING + qos ) ; } else { write Logln ( STRING + topic ) ; } } if ( sub ) { mqtt . subscribe ( these Topics , these Qo S ) ; } else { mqtt . unsubscribe ( these Topics ) ; } } catch ( Exception ex ) { set Title Text ( STRING ) ; J Option Pane . show Message Dialog ( frame , ex . get Message ( ) , STRING , J Option Pane . ERROR MESSAGE ) ; } } else { set Title Text ( STRING ) ; } } | public void subscription ( String topic , int qos , boolean sub ) { setTitleText ( STRING ) ; if ( connected ) { try { String [ ] theseTopics = new String [ _NUM ] ; int [ ] theseQoS = new int [ _NUM ] ; theseTopics [ _NUM ] = topic ; theseQoS [ _NUM ] = qos ; synchronized ( this ) { if ( sub ) { writeLogln ( STRING + topic + STRING + qos ) ; } else { writeLogln ( STRING + topic ) ; } } if ( sub ) { mqtt . subscribe ( theseTopics , theseQoS ) ; } else { mqtt . unsubscribe ( theseTopics ) ; } } catch ( Exception ex ) { setTitleText ( STRING ) ; JOptionPane . showMessageDialog ( frame , ex . getMessage ( ) , STRING , JOptionPane . ERROR_MESSAGE ) ; } } else { setTitleText ( STRING ) ; } } | 188 |
java-test-124 | java | Did it write an entry in the history log if the history window is open when either the subscribe or unsubscribe buttons are pressed ? | Yes | public void subscription ( String topic , int qos , boolean sub ) { set Title Text ( STRING ) ; if ( connected ) { try { String [ ] these Topics = new String [ NUM ] ; int [ ] these Qo S = new int [ NUM ] ; these Topics [ NUM ] = topic ; these Qo S [ NUM ] = qos ; synchronized ( this ) { if ( sub ) { write Logln ( STRING + topic + STRING + qos ) ; } else { write Logln ( STRING + topic ) ; } } if ( sub ) { mqtt . subscribe ( these Topics , these Qo S ) ; } else { mqtt . unsubscribe ( these Topics ) ; } } catch ( Exception ex ) { set Title Text ( STRING ) ; J Option Pane . show Message Dialog ( frame , ex . get Message ( ) , STRING , J Option Pane . ERROR MESSAGE ) ; } } else { set Title Text ( STRING ) ; } } | public void subscription ( String topic , int qos , boolean sub ) { setTitleText ( STRING ) ; if ( connected ) { try { String [ ] theseTopics = new String [ _NUM ] ; int [ ] theseQoS = new int [ _NUM ] ; theseTopics [ _NUM ] = topic ; theseQoS [ _NUM ] = qos ; synchronized ( this ) { if ( sub ) { writeLogln ( STRING + topic + STRING + qos ) ; } else { writeLogln ( STRING + topic ) ; } } if ( sub ) { mqtt . subscribe ( theseTopics , theseQoS ) ; } else { mqtt . unsubscribe ( theseTopics ) ; } } catch ( Exception ex ) { setTitleText ( STRING ) ; JOptionPane . showMessageDialog ( frame , ex . getMessage ( ) , STRING , JOptionPane . ERROR_MESSAGE ) ; } } else { setTitleText ( STRING ) ; } } | 188 |
java-test-125 | java | Where are any exceptions caught ? | in a dialog box | public void subscription ( String topic , int qos , boolean sub ) { set Title Text ( STRING ) ; if ( connected ) { try { String [ ] these Topics = new String [ NUM ] ; int [ ] these Qo S = new int [ NUM ] ; these Topics [ NUM ] = topic ; these Qo S [ NUM ] = qos ; synchronized ( this ) { if ( sub ) { write Logln ( STRING + topic + STRING + qos ) ; } else { write Logln ( STRING + topic ) ; } } if ( sub ) { mqtt . subscribe ( these Topics , these Qo S ) ; } else { mqtt . unsubscribe ( these Topics ) ; } } catch ( Exception ex ) { set Title Text ( STRING ) ; J Option Pane . show Message Dialog ( frame , ex . get Message ( ) , STRING , J Option Pane . ERROR MESSAGE ) ; } } else { set Title Text ( STRING ) ; } } | public void subscription ( String topic , int qos , boolean sub ) { setTitleText ( STRING ) ; if ( connected ) { try { String [ ] theseTopics = new String [ _NUM ] ; int [ ] theseQoS = new int [ _NUM ] ; theseTopics [ _NUM ] = topic ; theseQoS [ _NUM ] = qos ; synchronized ( this ) { if ( sub ) { writeLogln ( STRING + topic + STRING + qos ) ; } else { writeLogln ( STRING + topic ) ; } } if ( sub ) { mqtt . subscribe ( theseTopics , theseQoS ) ; } else { mqtt . unsubscribe ( theseTopics ) ; } } catch ( Exception ex ) { setTitleText ( STRING ) ; JOptionPane . showMessageDialog ( frame , ex . getMessage ( ) , STRING , JOptionPane . ERROR_MESSAGE ) ; } } else { setTitleText ( STRING ) ; } } | 188 |
java-test-126 | java | What must it have ? | an even multiple of 4 data characters ( not counting \ n ) , padded out with = as needed | public byte [ ] decode ( String s ) { byte [ ] b = new byte [ ( s . length ( ) / NUM ) * NUM ] ; int cycle = NUM ; int combined = NUM ; int j = NUM ; int len = s . length ( ) ; int dummies = NUM ; for ( int i = NUM ; i < len ; i ++ ) { int c = s . char At ( i ) ; int value = ( c <= NUM ) ? char To Value [ c ] : IGNORE ; switch ( value ) { case IGNORE : break ; case PAD : value = NUM ; dummies ++ ; default : switch ( cycle ) { case NUM : combined = value ; cycle = NUM ; break ; case NUM : combined <<= NUM ; combined |= value ; cycle = NUM ; break ; case NUM : combined <<= NUM ; combined |= value ; cycle = NUM ; break ; case NUM : combined <<= NUM ; combined |= value ; b [ j + NUM ] = ( byte ) combined ; combined >>>= NUM ; b [ j + NUM ] = ( byte ) combined ; combined >>>= NUM ; b [ j ] = ( byte ) combined ; j += NUM ; cycle = NUM ; break ; } break ; } } if ( cycle != NUM ) { throw new Array Index Out Of Bounds Exception ( STRING ) ; } j -= dummies ; if ( b . length != j ) { byte [ ] b2 = new byte [ j ] ; System . arraycopy ( b , NUM , b2 , NUM , j ) ; b = b2 ; } return b ; } | public byte [ ] decode ( String s ) { byte [ ] b = new byte [ ( s . length ( ) / _NUM ) * _NUM ] ; int cycle = _NUM ; int combined = _NUM ; int j = _NUM ; int len = s . length ( ) ; int dummies = _NUM ; for ( int i = _NUM ; i < len ; i ++ ) { int c = s . charAt ( i ) ; int value = ( c <= _NUM ) ? charToValue [ c ] : IGNORE ; switch ( value ) { case IGNORE : break ; case PAD : value = _NUM ; dummies ++ ; default : switch ( cycle ) { case _NUM : combined = value ; cycle = _NUM ; break ; case _NUM : combined <<= _NUM ; combined |= value ; cycle = _NUM ; break ; case _NUM : combined <<= _NUM ; combined |= value ; cycle = _NUM ; break ; case _NUM : combined <<= _NUM ; combined |= value ; b [ j + _NUM ] = ( byte ) combined ; combined >>>= _NUM ; b [ j + _NUM ] = ( byte ) combined ; combined >>>= _NUM ; b [ j ] = ( byte ) combined ; j += _NUM ; cycle = _NUM ; break ; } break ; } } if ( cycle != _NUM ) { throw new ArrayIndexOutOfBoundsException ( STRING ) ; } j -= dummies ; if ( b . length != j ) { byte [ ] b2 = new byte [ j ] ; System . arraycopy ( b , _NUM , b2 , _NUM , j ) ; b = b2 ; } return b ; } | 314 |
java-test-127 | java | Must it have an even multiple of 4 data characters ( not counting \ n ) , padded out with = as needed ? | Yes | public byte [ ] decode ( String s ) { byte [ ] b = new byte [ ( s . length ( ) / NUM ) * NUM ] ; int cycle = NUM ; int combined = NUM ; int j = NUM ; int len = s . length ( ) ; int dummies = NUM ; for ( int i = NUM ; i < len ; i ++ ) { int c = s . char At ( i ) ; int value = ( c <= NUM ) ? char To Value [ c ] : IGNORE ; switch ( value ) { case IGNORE : break ; case PAD : value = NUM ; dummies ++ ; default : switch ( cycle ) { case NUM : combined = value ; cycle = NUM ; break ; case NUM : combined <<= NUM ; combined |= value ; cycle = NUM ; break ; case NUM : combined <<= NUM ; combined |= value ; cycle = NUM ; break ; case NUM : combined <<= NUM ; combined |= value ; b [ j + NUM ] = ( byte ) combined ; combined >>>= NUM ; b [ j + NUM ] = ( byte ) combined ; combined >>>= NUM ; b [ j ] = ( byte ) combined ; j += NUM ; cycle = NUM ; break ; } break ; } } if ( cycle != NUM ) { throw new Array Index Out Of Bounds Exception ( STRING ) ; } j -= dummies ; if ( b . length != j ) { byte [ ] b2 = new byte [ j ] ; System . arraycopy ( b , NUM , b2 , NUM , j ) ; b = b2 ; } return b ; } | public byte [ ] decode ( String s ) { byte [ ] b = new byte [ ( s . length ( ) / _NUM ) * _NUM ] ; int cycle = _NUM ; int combined = _NUM ; int j = _NUM ; int len = s . length ( ) ; int dummies = _NUM ; for ( int i = _NUM ; i < len ; i ++ ) { int c = s . charAt ( i ) ; int value = ( c <= _NUM ) ? charToValue [ c ] : IGNORE ; switch ( value ) { case IGNORE : break ; case PAD : value = _NUM ; dummies ++ ; default : switch ( cycle ) { case _NUM : combined = value ; cycle = _NUM ; break ; case _NUM : combined <<= _NUM ; combined |= value ; cycle = _NUM ; break ; case _NUM : combined <<= _NUM ; combined |= value ; cycle = _NUM ; break ; case _NUM : combined <<= _NUM ; combined |= value ; b [ j + _NUM ] = ( byte ) combined ; combined >>>= _NUM ; b [ j + _NUM ] = ( byte ) combined ; combined >>>= _NUM ; b [ j ] = ( byte ) combined ; j += _NUM ; cycle = _NUM ; break ; } break ; } } if ( cycle != _NUM ) { throw new ArrayIndexOutOfBoundsException ( STRING ) ; } j -= dummies ; if ( b . length != j ) { byte [ ] b2 = new byte [ j ] ; System . arraycopy ( b , _NUM , b2 , _NUM , j ) ; b = b2 ; } return b ; } | 314 |
java-test-128 | java | How do this method mark parameter ? | with the specified index as output | public void register Out Param ( int index , int type ) throws SQL Exception { FB Procedure Param param = get Input Param ( index ) ; if ( param == null || param == Null Param . NULL PARAM ) { param = get Output Param ( index ) ; } else { add Output Param ( param ) ; if ( ! param . is Value Set ( ) ) { input Params . set ( param . get Position ( ) , null ) ; } } if ( param == null || param == Null Param . NULL PARAM ) { throw new SQL Exception ( STRING , SQL State Constants . SQL STATE INVALID COLUMN ) ; } param . set Type ( type ) ; } | public void registerOutParam ( int index , int type ) throws SQLException { FBProcedureParam param = getInputParam ( index ) ; if ( param == null || param == NullParam . NULL_PARAM ) { param = getOutputParam ( index ) ; } else { addOutputParam ( param ) ; if ( ! param . isValueSet ( ) ) { inputParams . set ( param . getPosition ( ) , null ) ; } } if ( param == null || param == NullParam . NULL_PARAM ) { throw new SQLException ( STRING , SQLStateConstants . SQL_STATE_INVALID_COLUMN ) ; } param . setType ( type ) ; } | 133 |
java-test-129 | java | Do this method mark parameter with the specified index as output ? | Yes | public void register Out Param ( int index , int type ) throws SQL Exception { FB Procedure Param param = get Input Param ( index ) ; if ( param == null || param == Null Param . NULL PARAM ) { param = get Output Param ( index ) ; } else { add Output Param ( param ) ; if ( ! param . is Value Set ( ) ) { input Params . set ( param . get Position ( ) , null ) ; } } if ( param == null || param == Null Param . NULL PARAM ) { throw new SQL Exception ( STRING , SQL State Constants . SQL STATE INVALID COLUMN ) ; } param . set Type ( type ) ; } | public void registerOutParam ( int index , int type ) throws SQLException { FBProcedureParam param = getInputParam ( index ) ; if ( param == null || param == NullParam . NULL_PARAM ) { param = getOutputParam ( index ) ; } else { addOutputParam ( param ) ; if ( ! param . isValueSet ( ) ) { inputParams . set ( param . getPosition ( ) , null ) ; } } if ( param == null || param == NullParam . NULL_PARAM ) { throw new SQLException ( STRING , SQLStateConstants . SQL_STATE_INVALID_COLUMN ) ; } param . setType ( type ) ; } | 133 |
java-test-130 | java | What do this method mark with the specified index as output ? | parameter | public void register Out Param ( int index , int type ) throws SQL Exception { FB Procedure Param param = get Input Param ( index ) ; if ( param == null || param == Null Param . NULL PARAM ) { param = get Output Param ( index ) ; } else { add Output Param ( param ) ; if ( ! param . is Value Set ( ) ) { input Params . set ( param . get Position ( ) , null ) ; } } if ( param == null || param == Null Param . NULL PARAM ) { throw new SQL Exception ( STRING , SQL State Constants . SQL STATE INVALID COLUMN ) ; } param . set Type ( type ) ; } | public void registerOutParam ( int index , int type ) throws SQLException { FBProcedureParam param = getInputParam ( index ) ; if ( param == null || param == NullParam . NULL_PARAM ) { param = getOutputParam ( index ) ; } else { addOutputParam ( param ) ; if ( ! param . isValueSet ( ) ) { inputParams . set ( param . getPosition ( ) , null ) ; } } if ( param == null || param == NullParam . NULL_PARAM ) { throw new SQLException ( STRING , SQLStateConstants . SQL_STATE_INVALID_COLUMN ) ; } param . setType ( type ) ; } | 133 |
java-test-131 | java | What is this used as such ? | to output them | void write Maps ( Enumeration maps ) throws IO Exception { if ( maps != null ) { while ( maps . has More Elements ( ) ) { Map map = ( Map ) maps . next Element ( ) ; String name = map . get Name ( ) ; incr Indent ( ) ; indent Smart ( ) ; write ( STRING ) ; if ( name != null ) { write ( STRING ) ; write ( name ) ; write ( STRING ) ; } else { write ( STRING ) ; } write Line Separator ( ) ; incr Indent ( ) ; Attribute Set [ ] areas = map . get Areas ( ) ; if ( areas != null ) { for ( int counter = NUM , max Counter = areas . length ; counter < max Counter ; counter ++ ) { indent Smart ( ) ; write ( STRING ) ; write Attributes ( areas [ counter ] ) ; write ( STRING ) ; write Line Separator ( ) ; } } decr Indent ( ) ; indent Smart ( ) ; write ( STRING ) ; write Line Separator ( ) ; decr Indent ( ) ; } } } | void writeMaps ( Enumeration maps ) throws IOException { if ( maps != null ) { while ( maps . hasMoreElements ( ) ) { Map map = ( Map ) maps . nextElement ( ) ; String name = map . getName ( ) ; incrIndent ( ) ; indentSmart ( ) ; write ( STRING ) ; if ( name != null ) { write ( STRING ) ; write ( name ) ; write ( STRING ) ; } else { write ( STRING ) ; } writeLineSeparator ( ) ; incrIndent ( ) ; AttributeSet [ ] areas = map . getAreas ( ) ; if ( areas != null ) { for ( int counter = _NUM , maxCounter = areas . length ; counter < maxCounter ; counter ++ ) { indentSmart ( ) ; write ( STRING ) ; writeAttributes ( areas [ counter ] ) ; write ( STRING ) ; writeLineSeparator ( ) ; } } decrIndent ( ) ; indentSmart ( ) ; write ( STRING ) ; writeLineSeparator ( ) ; decrIndent ( ) ; } } } | 213 |
java-test-132 | java | How are maps not stored ? | as elements in the document | void write Maps ( Enumeration maps ) throws IO Exception { if ( maps != null ) { while ( maps . has More Elements ( ) ) { Map map = ( Map ) maps . next Element ( ) ; String name = map . get Name ( ) ; incr Indent ( ) ; indent Smart ( ) ; write ( STRING ) ; if ( name != null ) { write ( STRING ) ; write ( name ) ; write ( STRING ) ; } else { write ( STRING ) ; } write Line Separator ( ) ; incr Indent ( ) ; Attribute Set [ ] areas = map . get Areas ( ) ; if ( areas != null ) { for ( int counter = NUM , max Counter = areas . length ; counter < max Counter ; counter ++ ) { indent Smart ( ) ; write ( STRING ) ; write Attributes ( areas [ counter ] ) ; write ( STRING ) ; write Line Separator ( ) ; } } decr Indent ( ) ; indent Smart ( ) ; write ( STRING ) ; write Line Separator ( ) ; decr Indent ( ) ; } } } | void writeMaps ( Enumeration maps ) throws IOException { if ( maps != null ) { while ( maps . hasMoreElements ( ) ) { Map map = ( Map ) maps . nextElement ( ) ; String name = map . getName ( ) ; incrIndent ( ) ; indentSmart ( ) ; write ( STRING ) ; if ( name != null ) { write ( STRING ) ; write ( name ) ; write ( STRING ) ; } else { write ( STRING ) ; } writeLineSeparator ( ) ; incrIndent ( ) ; AttributeSet [ ] areas = map . getAreas ( ) ; if ( areas != null ) { for ( int counter = _NUM , maxCounter = areas . length ; counter < maxCounter ; counter ++ ) { indentSmart ( ) ; write ( STRING ) ; writeAttributes ( areas [ counter ] ) ; write ( STRING ) ; writeLineSeparator ( ) ; } } decrIndent ( ) ; indentSmart ( ) ; write ( STRING ) ; writeLineSeparator ( ) ; decrIndent ( ) ; } } } | 213 |
java-test-133 | java | Is this used to output them as such ? | Yes | void write Maps ( Enumeration maps ) throws IO Exception { if ( maps != null ) { while ( maps . has More Elements ( ) ) { Map map = ( Map ) maps . next Element ( ) ; String name = map . get Name ( ) ; incr Indent ( ) ; indent Smart ( ) ; write ( STRING ) ; if ( name != null ) { write ( STRING ) ; write ( name ) ; write ( STRING ) ; } else { write ( STRING ) ; } write Line Separator ( ) ; incr Indent ( ) ; Attribute Set [ ] areas = map . get Areas ( ) ; if ( areas != null ) { for ( int counter = NUM , max Counter = areas . length ; counter < max Counter ; counter ++ ) { indent Smart ( ) ; write ( STRING ) ; write Attributes ( areas [ counter ] ) ; write ( STRING ) ; write Line Separator ( ) ; } } decr Indent ( ) ; indent Smart ( ) ; write ( STRING ) ; write Line Separator ( ) ; decr Indent ( ) ; } } } | void writeMaps ( Enumeration maps ) throws IOException { if ( maps != null ) { while ( maps . hasMoreElements ( ) ) { Map map = ( Map ) maps . nextElement ( ) ; String name = map . getName ( ) ; incrIndent ( ) ; indentSmart ( ) ; write ( STRING ) ; if ( name != null ) { write ( STRING ) ; write ( name ) ; write ( STRING ) ; } else { write ( STRING ) ; } writeLineSeparator ( ) ; incrIndent ( ) ; AttributeSet [ ] areas = map . getAreas ( ) ; if ( areas != null ) { for ( int counter = _NUM , maxCounter = areas . length ; counter < maxCounter ; counter ++ ) { indentSmart ( ) ; write ( STRING ) ; writeAttributes ( areas [ counter ] ) ; write ( STRING ) ; writeLineSeparator ( ) ; } } decrIndent ( ) ; indentSmart ( ) ; write ( STRING ) ; writeLineSeparator ( ) ; decrIndent ( ) ; } } } | 213 |
java-test-134 | java | When did the code use to convert raw characters to their escaped version ? | when these raw version can not be used as part of an ascii string literal | protected String add escapes ( String str ) { String Buffer retval = new String Buffer ( ) ; char ch ; for ( int i = NUM ; i < str . length ( ) ; i ++ ) { switch ( str . char At ( i ) ) { case NUM : continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; default : if ( ( ch = str . char At ( i ) ) < NUM || ch > NUM ) { String s = STRING + Integer . to String ( ch , NUM ) ; retval . append ( STRING + s . substring ( s . length ( ) - NUM , s . length ( ) ) ) ; } else { retval . append ( ch ) ; } continue ; } } return retval . to String ( ) ; } | protected String add_escapes ( String str ) { StringBuffer retval = new StringBuffer ( ) ; char ch ; for ( int i = _NUM ; i < str . length ( ) ; i ++ ) { switch ( str . charAt ( i ) ) { case _NUM : continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; default : if ( ( ch = str . charAt ( i ) ) < _NUM || ch > _NUM ) { String s = STRING + Integer . toString ( ch , _NUM ) ; retval . append ( STRING + s . substring ( s . length ( ) - _NUM , s . length ( ) ) ) ; } else { retval . append ( ch ) ; } continue ; } } return retval . toString ( ) ; } | 241 |
java-test-135 | java | What did the code use when these raw version can not be used as part of an ascii string literal ? | to convert raw characters to their escaped version | protected String add escapes ( String str ) { String Buffer retval = new String Buffer ( ) ; char ch ; for ( int i = NUM ; i < str . length ( ) ; i ++ ) { switch ( str . char At ( i ) ) { case NUM : continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; default : if ( ( ch = str . char At ( i ) ) < NUM || ch > NUM ) { String s = STRING + Integer . to String ( ch , NUM ) ; retval . append ( STRING + s . substring ( s . length ( ) - NUM , s . length ( ) ) ) ; } else { retval . append ( ch ) ; } continue ; } } return retval . to String ( ) ; } | protected String add_escapes ( String str ) { StringBuffer retval = new StringBuffer ( ) ; char ch ; for ( int i = _NUM ; i < str . length ( ) ; i ++ ) { switch ( str . charAt ( i ) ) { case _NUM : continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; default : if ( ( ch = str . charAt ( i ) ) < _NUM || ch > _NUM ) { String s = STRING + Integer . toString ( ch , _NUM ) ; retval . append ( STRING + s . substring ( s . length ( ) - _NUM , s . length ( ) ) ) ; } else { retval . append ( ch ) ; } continue ; } } return retval . toString ( ) ; } | 241 |
java-test-136 | java | Did the code use to convert raw characters to their escaped version when these raw version can not be used as part of an ascii string literal ? | Yes | protected String add escapes ( String str ) { String Buffer retval = new String Buffer ( ) ; char ch ; for ( int i = NUM ; i < str . length ( ) ; i ++ ) { switch ( str . char At ( i ) ) { case NUM : continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; default : if ( ( ch = str . char At ( i ) ) < NUM || ch > NUM ) { String s = STRING + Integer . to String ( ch , NUM ) ; retval . append ( STRING + s . substring ( s . length ( ) - NUM , s . length ( ) ) ) ; } else { retval . append ( ch ) ; } continue ; } } return retval . to String ( ) ; } | protected String add_escapes ( String str ) { StringBuffer retval = new StringBuffer ( ) ; char ch ; for ( int i = _NUM ; i < str . length ( ) ; i ++ ) { switch ( str . charAt ( i ) ) { case _NUM : continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; case STRING : retval . append ( STRING ) ; continue ; default : if ( ( ch = str . charAt ( i ) ) < _NUM || ch > _NUM ) { String s = STRING + Integer . toString ( ch , _NUM ) ; retval . append ( STRING + s . substring ( s . length ( ) - _NUM , s . length ( ) ) ) ; } else { retval . append ( ch ) ; } continue ; } } return retval . toString ( ) ; } | 241 |
java-test-139 | java | Is a pathiterator used to figure out the points to use to add to the toshape ? | Yes | public static General Path append Shape Edge ( General Path to Shape , General Path add Shape , boolean line To ) { boolean DEBUG = Debug . debugging ( STRING ) ; int point Count = NUM ; if ( add Shape == null ) { return to Shape ; } if ( to Shape == null ) { return add Shape ; } to Shape . append ( add Shape , line To ) ; return to Shape ; } | public static GeneralPath appendShapeEdge ( GeneralPath toShape , GeneralPath addShape , boolean lineTo ) { boolean DEBUG = Debug . debugging ( STRING ) ; int pointCount = _NUM ; if ( addShape == null ) { return toShape ; } if ( toShape == null ) { return addShape ; } toShape . append ( addShape , lineTo ) ; return toShape ; } | 82 |
java-test-140 | java | What do you close ? | the path yourself | public static General Path append Shape Edge ( General Path to Shape , General Path add Shape , boolean line To ) { boolean DEBUG = Debug . debugging ( STRING ) ; int point Count = NUM ; if ( add Shape == null ) { return to Shape ; } if ( to Shape == null ) { return add Shape ; } to Shape . append ( add Shape , line To ) ; return to Shape ; } | public static GeneralPath appendShapeEdge ( GeneralPath toShape , GeneralPath addShape , boolean lineTo ) { boolean DEBUG = Debug . debugging ( STRING ) ; int pointCount = _NUM ; if ( addShape == null ) { return toShape ; } if ( toShape == null ) { return addShape ; } toShape . append ( addShape , lineTo ) ; return toShape ; } | 82 |
java-test-141 | java | Do the points use to add to the toshape ? | Yes | public static General Path append Shape Edge ( General Path to Shape , General Path add Shape , boolean line To ) { boolean DEBUG = Debug . debugging ( STRING ) ; int point Count = NUM ; if ( add Shape == null ) { return to Shape ; } if ( to Shape == null ) { return add Shape ; } to Shape . append ( add Shape , line To ) ; return to Shape ; } | public static GeneralPath appendShapeEdge ( GeneralPath toShape , GeneralPath addShape , boolean lineTo ) { boolean DEBUG = Debug . debugging ( STRING ) ; int pointCount = _NUM ; if ( addShape == null ) { return toShape ; } if ( toShape == null ) { return addShape ; } toShape . append ( addShape , lineTo ) ; return toShape ; } | 82 |
java-test-142 | java | Do you want it to be a polygon ? | Yes | public static General Path append Shape Edge ( General Path to Shape , General Path add Shape , boolean line To ) { boolean DEBUG = Debug . debugging ( STRING ) ; int point Count = NUM ; if ( add Shape == null ) { return to Shape ; } if ( to Shape == null ) { return add Shape ; } to Shape . append ( add Shape , line To ) ; return to Shape ; } | public static GeneralPath appendShapeEdge ( GeneralPath toShape , GeneralPath addShape , boolean lineTo ) { boolean DEBUG = Debug . debugging ( STRING ) ; int pointCount = _NUM ; if ( addShape == null ) { return toShape ; } if ( toShape == null ) { return addShape ; } toShape . append ( addShape , lineTo ) ; return toShape ; } | 82 |
java-test-143 | java | Do you close the path yourself ? | Yes | public static General Path append Shape Edge ( General Path to Shape , General Path add Shape , boolean line To ) { boolean DEBUG = Debug . debugging ( STRING ) ; int point Count = NUM ; if ( add Shape == null ) { return to Shape ; } if ( to Shape == null ) { return add Shape ; } to Shape . append ( add Shape , line To ) ; return to Shape ; } | public static GeneralPath appendShapeEdge ( GeneralPath toShape , GeneralPath addShape , boolean lineTo ) { boolean DEBUG = Debug . debugging ( STRING ) ; int pointCount = _NUM ; if ( addShape == null ) { return toShape ; } if ( toShape == null ) { return addShape ; } toShape . append ( addShape , lineTo ) ; return toShape ; } | 82 |
java-test-144 | java | What do you want ? | it to be a polygon | public static General Path append Shape Edge ( General Path to Shape , General Path add Shape , boolean line To ) { boolean DEBUG = Debug . debugging ( STRING ) ; int point Count = NUM ; if ( add Shape == null ) { return to Shape ; } if ( to Shape == null ) { return add Shape ; } to Shape . append ( add Shape , line To ) ; return to Shape ; } | public static GeneralPath appendShapeEdge ( GeneralPath toShape , GeneralPath addShape , boolean lineTo ) { boolean DEBUG = Debug . debugging ( STRING ) ; int pointCount = _NUM ; if ( addShape == null ) { return toShape ; } if ( toShape == null ) { return addShape ; } toShape . append ( addShape , lineTo ) ; return toShape ; } | 82 |
java-test-145 | java | What is a pathiterator used ? | to figure out the points to use to add to the toshape | public static General Path append Shape Edge ( General Path to Shape , General Path add Shape , boolean line To ) { boolean DEBUG = Debug . debugging ( STRING ) ; int point Count = NUM ; if ( add Shape == null ) { return to Shape ; } if ( to Shape == null ) { return add Shape ; } to Shape . append ( add Shape , line To ) ; return to Shape ; } | public static GeneralPath appendShapeEdge ( GeneralPath toShape , GeneralPath addShape , boolean lineTo ) { boolean DEBUG = Debug . debugging ( STRING ) ; int pointCount = _NUM ; if ( addShape == null ) { return toShape ; } if ( toShape == null ) { return addShape ; } toShape . append ( addShape , lineTo ) ; return toShape ; } | 82 |
java-test-146 | java | What do the points use ? | to add to the toshape | public static General Path append Shape Edge ( General Path to Shape , General Path add Shape , boolean line To ) { boolean DEBUG = Debug . debugging ( STRING ) ; int point Count = NUM ; if ( add Shape == null ) { return to Shape ; } if ( to Shape == null ) { return add Shape ; } to Shape . append ( add Shape , line To ) ; return to Shape ; } | public static GeneralPath appendShapeEdge ( GeneralPath toShape , GeneralPath addShape , boolean lineTo ) { boolean DEBUG = Debug . debugging ( STRING ) ; int pointCount = _NUM ; if ( addShape == null ) { return toShape ; } if ( toShape == null ) { return addShape ; } toShape . append ( addShape , lineTo ) ; return toShape ; } | 82 |
java-test-147 | java | What is used to figure out the points to use to add to the toshape ? | a pathiterator | public static General Path append Shape Edge ( General Path to Shape , General Path add Shape , boolean line To ) { boolean DEBUG = Debug . debugging ( STRING ) ; int point Count = NUM ; if ( add Shape == null ) { return to Shape ; } if ( to Shape == null ) { return add Shape ; } to Shape . append ( add Shape , line To ) ; return to Shape ; } | public static GeneralPath appendShapeEdge ( GeneralPath toShape , GeneralPath addShape , boolean lineTo ) { boolean DEBUG = Debug . debugging ( STRING ) ; int pointCount = _NUM ; if ( addShape == null ) { return toShape ; } if ( toShape == null ) { return addShape ; } toShape . append ( addShape , lineTo ) ; return toShape ; } | 82 |
java-test-148 | java | What do you need ? | to close the path yourself if you want it to be a polygon | public static General Path append Shape Edge ( General Path to Shape , General Path add Shape , boolean line To ) { boolean DEBUG = Debug . debugging ( STRING ) ; int point Count = NUM ; if ( add Shape == null ) { return to Shape ; } if ( to Shape == null ) { return add Shape ; } to Shape . append ( add Shape , line To ) ; return to Shape ; } | public static GeneralPath appendShapeEdge ( GeneralPath toShape , GeneralPath addShape , boolean lineTo ) { boolean DEBUG = Debug . debugging ( STRING ) ; int pointCount = _NUM ; if ( addShape == null ) { return toShape ; } if ( toShape == null ) { return addShape ; } toShape . append ( addShape , lineTo ) ; return toShape ; } | 82 |
java-test-149 | java | Do you need to close the path yourself if you want it to be a polygon ? | Yes | public static General Path append Shape Edge ( General Path to Shape , General Path add Shape , boolean line To ) { boolean DEBUG = Debug . debugging ( STRING ) ; int point Count = NUM ; if ( add Shape == null ) { return to Shape ; } if ( to Shape == null ) { return add Shape ; } to Shape . append ( add Shape , line To ) ; return to Shape ; } | public static GeneralPath appendShapeEdge ( GeneralPath toShape , GeneralPath addShape , boolean lineTo ) { boolean DEBUG = Debug . debugging ( STRING ) ; int pointCount = _NUM ; if ( addShape == null ) { return toShape ; } if ( toShape == null ) { return addShape ; } toShape . append ( addShape , lineTo ) ; return toShape ; } | 82 |
java-test-150 | java | Does the code delete a specified authentication module instance ? | Yes | public void delete Authentication Instance ( String name ) throws AM Configuration Exception { AM Authentication Instance instance = get Authentication Instance ( name ) ; if ( instance == null ) { throw new AM Configuration Exception ( BUNDLE NAME , STRING , new Object [ ] { name } ) ; } if ( is Module Instance In Use ( name ) ) { throw new AM Configuration Exception ( BUNDLE NAME , STRING , new Object [ ] { name } ) ; } String type = get Auth Instance Type ( name ) ; Service Config service Config = instance . get Service Config ( ) ; if ( service Config == null ) { throw new AM Configuration Exception ( BUNDLE NAME , STRING , new Object [ ] { type } ) ; } try { if ( name . equals ( type ) ) { Map attrs = service Config . get Attributes Without Defaults ( ) ; if ( attrs != null ) { service Config . remove Attributes ( attrs . key Set ( ) ) ; } } else { String service Name = service Config . get Service Name ( ) ; Service Config Manager scm = new Service Config Manager ( service Name , token ) ; Service Config org Config = scm . get Organization Config ( realm , null ) ; org Config . remove Sub Config ( name ) ; } if ( is Inherited Auth Instance ( name ) ) { Set < String > module Names = new Hash Set < String > ( ) ; module Names . add ( name ) ; org Service Config . remove Attribute Values ( IS Auth Constants . AUTH ALLOWED MODULES , module Names ) ; } if ( ! System Properties . is Server Mode ( ) ) { build Module Instance For Service ( realm , service Config . get Service Name ( ) ) ; } } catch ( Exception e ) { throw new AM Configuration Exception ( e ) ; } } | public void deleteAuthenticationInstance ( String name ) throws AMConfigurationException { AMAuthenticationInstance instance = getAuthenticationInstance ( name ) ; if ( instance == null ) { throw new AMConfigurationException ( BUNDLE_NAME , STRING , new Object [ ] { name } ) ; } if ( isModuleInstanceInUse ( name ) ) { throw new AMConfigurationException ( BUNDLE_NAME , STRING , new Object [ ] { name } ) ; } String type = getAuthInstanceType ( name ) ; ServiceConfig serviceConfig = instance . getServiceConfig ( ) ; if ( serviceConfig == null ) { throw new AMConfigurationException ( BUNDLE_NAME , STRING , new Object [ ] { type } ) ; } try { if ( name . equals ( type ) ) { Map attrs = serviceConfig . getAttributesWithoutDefaults ( ) ; if ( attrs != null ) { serviceConfig . removeAttributes ( attrs . keySet ( ) ) ; } } else { String serviceName = serviceConfig . getServiceName ( ) ; ServiceConfigManager scm = new ServiceConfigManager ( serviceName , token ) ; ServiceConfig orgConfig = scm . getOrganizationConfig ( realm , null ) ; orgConfig . removeSubConfig ( name ) ; } if ( isInheritedAuthInstance ( name ) ) { Set < String > moduleNames = new HashSet < String > ( ) ; moduleNames . add ( name ) ; orgServiceConfig . removeAttributeValues ( ISAuthConstants . AUTH_ALLOWED_MODULES , moduleNames ) ; } if ( ! SystemProperties . isServerMode ( ) ) { buildModuleInstanceForService ( realm , serviceConfig . getServiceName ( ) ) ; } } catch ( Exception e ) { throw new AMConfigurationException ( e ) ; } } | 352 |
java-test-151 | java | What does the code delete ? | a specified authentication module instance | public void delete Authentication Instance ( String name ) throws AM Configuration Exception { AM Authentication Instance instance = get Authentication Instance ( name ) ; if ( instance == null ) { throw new AM Configuration Exception ( BUNDLE NAME , STRING , new Object [ ] { name } ) ; } if ( is Module Instance In Use ( name ) ) { throw new AM Configuration Exception ( BUNDLE NAME , STRING , new Object [ ] { name } ) ; } String type = get Auth Instance Type ( name ) ; Service Config service Config = instance . get Service Config ( ) ; if ( service Config == null ) { throw new AM Configuration Exception ( BUNDLE NAME , STRING , new Object [ ] { type } ) ; } try { if ( name . equals ( type ) ) { Map attrs = service Config . get Attributes Without Defaults ( ) ; if ( attrs != null ) { service Config . remove Attributes ( attrs . key Set ( ) ) ; } } else { String service Name = service Config . get Service Name ( ) ; Service Config Manager scm = new Service Config Manager ( service Name , token ) ; Service Config org Config = scm . get Organization Config ( realm , null ) ; org Config . remove Sub Config ( name ) ; } if ( is Inherited Auth Instance ( name ) ) { Set < String > module Names = new Hash Set < String > ( ) ; module Names . add ( name ) ; org Service Config . remove Attribute Values ( IS Auth Constants . AUTH ALLOWED MODULES , module Names ) ; } if ( ! System Properties . is Server Mode ( ) ) { build Module Instance For Service ( realm , service Config . get Service Name ( ) ) ; } } catch ( Exception e ) { throw new AM Configuration Exception ( e ) ; } } | public void deleteAuthenticationInstance ( String name ) throws AMConfigurationException { AMAuthenticationInstance instance = getAuthenticationInstance ( name ) ; if ( instance == null ) { throw new AMConfigurationException ( BUNDLE_NAME , STRING , new Object [ ] { name } ) ; } if ( isModuleInstanceInUse ( name ) ) { throw new AMConfigurationException ( BUNDLE_NAME , STRING , new Object [ ] { name } ) ; } String type = getAuthInstanceType ( name ) ; ServiceConfig serviceConfig = instance . getServiceConfig ( ) ; if ( serviceConfig == null ) { throw new AMConfigurationException ( BUNDLE_NAME , STRING , new Object [ ] { type } ) ; } try { if ( name . equals ( type ) ) { Map attrs = serviceConfig . getAttributesWithoutDefaults ( ) ; if ( attrs != null ) { serviceConfig . removeAttributes ( attrs . keySet ( ) ) ; } } else { String serviceName = serviceConfig . getServiceName ( ) ; ServiceConfigManager scm = new ServiceConfigManager ( serviceName , token ) ; ServiceConfig orgConfig = scm . getOrganizationConfig ( realm , null ) ; orgConfig . removeSubConfig ( name ) ; } if ( isInheritedAuthInstance ( name ) ) { Set < String > moduleNames = new HashSet < String > ( ) ; moduleNames . add ( name ) ; orgServiceConfig . removeAttributeValues ( ISAuthConstants . AUTH_ALLOWED_MODULES , moduleNames ) ; } if ( ! SystemProperties . isServerMode ( ) ) { buildModuleInstanceForService ( realm , serviceConfig . getServiceName ( ) ) ; } } catch ( Exception e ) { throw new AMConfigurationException ( e ) ; } } | 352 |
java-test-152 | java | What should we continue ? | making additional http requests in the current produce ( ) call or whether to return the current batch | private boolean should Make Request ( ) { boolean should Make Request = last Request Completed Time == - NUM ; should Make Request |= next != null ; should Make Request |= ( have More Pages && conf . pagination . mode != Pagination Mode . LINK HEADER ) ; should Make Request |= System . current Time Millis ( ) > last Request Completed Time + conf . polling Interval && conf . http Mode == Http Client Mode . POLLING ; return should Make Request ; } | private boolean shouldMakeRequest ( ) { boolean shouldMakeRequest = lastRequestCompletedTime == - _NUM ; shouldMakeRequest |= next != null ; shouldMakeRequest |= ( haveMorePages && conf . pagination . mode != PaginationMode . LINK_HEADER ) ; shouldMakeRequest |= System . currentTimeMillis ( ) > lastRequestCompletedTime + conf . pollingInterval && conf . httpMode == HttpClientMode . POLLING ; return shouldMakeRequest ; } | 90 |
java-test-153 | java | Where do we make additional http requests ? | in the current produce ( ) call | private boolean should Make Request ( ) { boolean should Make Request = last Request Completed Time == - NUM ; should Make Request |= next != null ; should Make Request |= ( have More Pages && conf . pagination . mode != Pagination Mode . LINK HEADER ) ; should Make Request |= System . current Time Millis ( ) > last Request Completed Time + conf . polling Interval && conf . http Mode == Http Client Mode . POLLING ; return should Make Request ; } | private boolean shouldMakeRequest ( ) { boolean shouldMakeRequest = lastRequestCompletedTime == - _NUM ; shouldMakeRequest |= next != null ; shouldMakeRequest |= ( haveMorePages && conf . pagination . mode != PaginationMode . LINK_HEADER ) ; shouldMakeRequest |= System . currentTimeMillis ( ) > lastRequestCompletedTime + conf . pollingInterval && conf . httpMode == HttpClientMode . POLLING ; return shouldMakeRequest ; } | 90 |
java-test-154 | java | What do we return ? | the current batch | private boolean should Make Request ( ) { boolean should Make Request = last Request Completed Time == - NUM ; should Make Request |= next != null ; should Make Request |= ( have More Pages && conf . pagination . mode != Pagination Mode . LINK HEADER ) ; should Make Request |= System . current Time Millis ( ) > last Request Completed Time + conf . polling Interval && conf . http Mode == Http Client Mode . POLLING ; return should Make Request ; } | private boolean shouldMakeRequest ( ) { boolean shouldMakeRequest = lastRequestCompletedTime == - _NUM ; shouldMakeRequest |= next != null ; shouldMakeRequest |= ( haveMorePages && conf . pagination . mode != PaginationMode . LINK_HEADER ) ; shouldMakeRequest |= System . currentTimeMillis ( ) > lastRequestCompletedTime + conf . pollingInterval && conf . httpMode == HttpClientMode . POLLING ; return shouldMakeRequest ; } | 90 |
java-test-155 | java | Do we make additional http requests in the current produce ( ) call ? | Yes | private boolean should Make Request ( ) { boolean should Make Request = last Request Completed Time == - NUM ; should Make Request |= next != null ; should Make Request |= ( have More Pages && conf . pagination . mode != Pagination Mode . LINK HEADER ) ; should Make Request |= System . current Time Millis ( ) > last Request Completed Time + conf . polling Interval && conf . http Mode == Http Client Mode . POLLING ; return should Make Request ; } | private boolean shouldMakeRequest ( ) { boolean shouldMakeRequest = lastRequestCompletedTime == - _NUM ; shouldMakeRequest |= next != null ; shouldMakeRequest |= ( haveMorePages && conf . pagination . mode != PaginationMode . LINK_HEADER ) ; shouldMakeRequest |= System . currentTimeMillis ( ) > lastRequestCompletedTime + conf . pollingInterval && conf . httpMode == HttpClientMode . POLLING ; return shouldMakeRequest ; } | 90 |
java-test-156 | java | Do we return the current batch ? | Yes | private boolean should Make Request ( ) { boolean should Make Request = last Request Completed Time == - NUM ; should Make Request |= next != null ; should Make Request |= ( have More Pages && conf . pagination . mode != Pagination Mode . LINK HEADER ) ; should Make Request |= System . current Time Millis ( ) > last Request Completed Time + conf . polling Interval && conf . http Mode == Http Client Mode . POLLING ; return should Make Request ; } | private boolean shouldMakeRequest ( ) { boolean shouldMakeRequest = lastRequestCompletedTime == - _NUM ; shouldMakeRequest |= next != null ; shouldMakeRequest |= ( haveMorePages && conf . pagination . mode != PaginationMode . LINK_HEADER ) ; shouldMakeRequest |= System . currentTimeMillis ( ) > lastRequestCompletedTime + conf . pollingInterval && conf . httpMode == HttpClientMode . POLLING ; return shouldMakeRequest ; } | 90 |
java-test-157 | java | Should we continue making additional http requests in the current produce ( ) call or whether to return the current batch ? | Yes | private boolean should Make Request ( ) { boolean should Make Request = last Request Completed Time == - NUM ; should Make Request |= next != null ; should Make Request |= ( have More Pages && conf . pagination . mode != Pagination Mode . LINK HEADER ) ; should Make Request |= System . current Time Millis ( ) > last Request Completed Time + conf . polling Interval && conf . http Mode == Http Client Mode . POLLING ; return should Make Request ; } | private boolean shouldMakeRequest ( ) { boolean shouldMakeRequest = lastRequestCompletedTime == - _NUM ; shouldMakeRequest |= next != null ; shouldMakeRequest |= ( haveMorePages && conf . pagination . mode != PaginationMode . LINK_HEADER ) ; shouldMakeRequest |= System . currentTimeMillis ( ) > lastRequestCompletedTime + conf . pollingInterval && conf . httpMode == HttpClientMode . POLLING ; return shouldMakeRequest ; } | 90 |
java-test-158 | java | What do we make in the current produce ( ) call ? | additional http requests | private boolean should Make Request ( ) { boolean should Make Request = last Request Completed Time == - NUM ; should Make Request |= next != null ; should Make Request |= ( have More Pages && conf . pagination . mode != Pagination Mode . LINK HEADER ) ; should Make Request |= System . current Time Millis ( ) > last Request Completed Time + conf . polling Interval && conf . http Mode == Http Client Mode . POLLING ; return should Make Request ; } | private boolean shouldMakeRequest ( ) { boolean shouldMakeRequest = lastRequestCompletedTime == - _NUM ; shouldMakeRequest |= next != null ; shouldMakeRequest |= ( haveMorePages && conf . pagination . mode != PaginationMode . LINK_HEADER ) ; shouldMakeRequest |= System . currentTimeMillis ( ) > lastRequestCompletedTime + conf . pollingInterval && conf . httpMode == HttpClientMode . POLLING ; return shouldMakeRequest ; } | 90 |
java-test-166 | java | Did the code cretae a bufferedimage from an imageproducer ? | Yes | public static Buffered Image create Image ( Image Producer producer ) { Pixel Grabber pg = new Pixel Grabber ( producer , NUM , NUM , - NUM , - NUM , null , NUM , NUM ) ; try { pg . grab Pixels ( ) ; } catch ( Interrupted Exception e ) { throw new Runtime Exception ( STRING ) ; } if ( ( pg . status ( ) & Image Observer . ABORT ) != NUM ) throw new Runtime Exception ( STRING ) ; if ( ( pg . status ( ) & Image Observer . ERROR ) != NUM ) throw new Runtime Exception ( STRING ) ; Buffered Image p = new Buffered Image ( pg . get Width ( ) , pg . get Height ( ) , Buffered Image . TYPE INT ARGB ) ; p . set RGB ( NUM , NUM , pg . get Width ( ) , pg . get Height ( ) , ( int [ ] ) pg . get Pixels ( ) , NUM , pg . get Width ( ) ) ; return p ; } | public static BufferedImage createImage ( ImageProducer producer ) { PixelGrabber pg = new PixelGrabber ( producer , _NUM , _NUM , - _NUM , - _NUM , null , _NUM , _NUM ) ; try { pg . grabPixels ( ) ; } catch ( InterruptedException e ) { throw new RuntimeException ( STRING ) ; } if ( ( pg . status ( ) & ImageObserver . ABORT ) != _NUM ) throw new RuntimeException ( STRING ) ; if ( ( pg . status ( ) & ImageObserver . ERROR ) != _NUM ) throw new RuntimeException ( STRING ) ; BufferedImage p = new BufferedImage ( pg . getWidth ( ) , pg . getHeight ( ) , BufferedImage . TYPE_INT_ARGB ) ; p . setRGB ( _NUM , _NUM , pg . getWidth ( ) , pg . getHeight ( ) , ( int [ ] ) pg . getPixels ( ) , _NUM , pg . getWidth ( ) ) ; return p ; } | 194 |
java-test-167 | java | What did the code cretae ? | a bufferedimage from an imageproducer | public static Buffered Image create Image ( Image Producer producer ) { Pixel Grabber pg = new Pixel Grabber ( producer , NUM , NUM , - NUM , - NUM , null , NUM , NUM ) ; try { pg . grab Pixels ( ) ; } catch ( Interrupted Exception e ) { throw new Runtime Exception ( STRING ) ; } if ( ( pg . status ( ) & Image Observer . ABORT ) != NUM ) throw new Runtime Exception ( STRING ) ; if ( ( pg . status ( ) & Image Observer . ERROR ) != NUM ) throw new Runtime Exception ( STRING ) ; Buffered Image p = new Buffered Image ( pg . get Width ( ) , pg . get Height ( ) , Buffered Image . TYPE INT ARGB ) ; p . set RGB ( NUM , NUM , pg . get Width ( ) , pg . get Height ( ) , ( int [ ] ) pg . get Pixels ( ) , NUM , pg . get Width ( ) ) ; return p ; } | public static BufferedImage createImage ( ImageProducer producer ) { PixelGrabber pg = new PixelGrabber ( producer , _NUM , _NUM , - _NUM , - _NUM , null , _NUM , _NUM ) ; try { pg . grabPixels ( ) ; } catch ( InterruptedException e ) { throw new RuntimeException ( STRING ) ; } if ( ( pg . status ( ) & ImageObserver . ABORT ) != _NUM ) throw new RuntimeException ( STRING ) ; if ( ( pg . status ( ) & ImageObserver . ERROR ) != _NUM ) throw new RuntimeException ( STRING ) ; BufferedImage p = new BufferedImage ( pg . getWidth ( ) , pg . getHeight ( ) , BufferedImage . TYPE_INT_ARGB ) ; p . setRGB ( _NUM , _NUM , pg . getWidth ( ) , pg . getHeight ( ) , ( int [ ] ) pg . getPixels ( ) , _NUM , pg . getWidth ( ) ) ; return p ; } | 194 |
java-test-168 | java | What do them exceed ? | the max length of a tag entry | private static Map . Entry < String , String > maybe Truncate Tag Entry ( Map . Entry < String , String > tag entry ) { String k = tag entry . get Key ( ) ; String v = tag entry . get Value ( ) ; if ( k . length ( ) + v . length ( ) <= MAX TAG KEY VAL CHARS - NUM ) return tag entry ; if ( k . length ( ) > TRUNCATE TAG NAME ) k = k . substring ( NUM , TRUNCATE TAG NAME ) ; if ( k . length ( ) + v . length ( ) > MAX TAG KEY VAL CHARS - NUM ) v = v . substring ( NUM , MAX TAG KEY VAL CHARS - NUM - k . length ( ) ) ; return Simple Map Entry . create ( k , v ) ; } | private static Map . Entry < String , String > maybeTruncateTagEntry ( Map . Entry < String , String > tag_entry ) { String k = tag_entry . getKey ( ) ; String v = tag_entry . getValue ( ) ; if ( k . length ( ) + v . length ( ) <= MAX_TAG_KEY_VAL_CHARS - _NUM ) return tag_entry ; if ( k . length ( ) > TRUNCATE_TAG_NAME ) k = k . substring ( _NUM , TRUNCATE_TAG_NAME ) ; if ( k . length ( ) + v . length ( ) > MAX_TAG_KEY_VAL_CHARS - _NUM ) v = v . substring ( _NUM , MAX_TAG_KEY_VAL_CHARS - _NUM - k . length ( ) ) ; return SimpleMapEntry . create ( k , v ) ; } | 158 |
java-test-169 | java | Do them exceed the max length of a tag entry ? | Yes | private static Map . Entry < String , String > maybe Truncate Tag Entry ( Map . Entry < String , String > tag entry ) { String k = tag entry . get Key ( ) ; String v = tag entry . get Value ( ) ; if ( k . length ( ) + v . length ( ) <= MAX TAG KEY VAL CHARS - NUM ) return tag entry ; if ( k . length ( ) > TRUNCATE TAG NAME ) k = k . substring ( NUM , TRUNCATE TAG NAME ) ; if ( k . length ( ) + v . length ( ) > MAX TAG KEY VAL CHARS - NUM ) v = v . substring ( NUM , MAX TAG KEY VAL CHARS - NUM - k . length ( ) ) ; return Simple Map Entry . create ( k , v ) ; } | private static Map . Entry < String , String > maybeTruncateTagEntry ( Map . Entry < String , String > tag_entry ) { String k = tag_entry . getKey ( ) ; String v = tag_entry . getValue ( ) ; if ( k . length ( ) + v . length ( ) <= MAX_TAG_KEY_VAL_CHARS - _NUM ) return tag_entry ; if ( k . length ( ) > TRUNCATE_TAG_NAME ) k = k . substring ( _NUM , TRUNCATE_TAG_NAME ) ; if ( k . length ( ) + v . length ( ) > MAX_TAG_KEY_VAL_CHARS - _NUM ) v = v . substring ( _NUM , MAX_TAG_KEY_VAL_CHARS - _NUM - k . length ( ) ) ; return SimpleMapEntry . create ( k , v ) ; } | 158 |
java-test-187 | java | Can rmiregistry accept incoming calls now ? | Yes | public synchronized void start ( ) throws Remote Exception { if ( ! is Running ( ) ) { if ( ssf != null ) { registry = Locate Registry . create Registry ( port , null , ssf ) ; } else { registry = Locate Registry . create Registry ( port ) ; } is Running = BOOL ; } } | public synchronized void start ( ) throws RemoteException { if ( ! isRunning ( ) ) { if ( ssf != null ) { registry = LocateRegistry . createRegistry ( port , null , ssf ) ; } else { registry = LocateRegistry . createRegistry ( port ) ; } isRunning = _BOOL ; } } | 63 |
java-test-188 | java | What can rmiregistry accept now ? | incoming calls | public synchronized void start ( ) throws Remote Exception { if ( ! is Running ( ) ) { if ( ssf != null ) { registry = Locate Registry . create Registry ( port , null , ssf ) ; } else { registry = Locate Registry . create Registry ( port ) ; } is Running = BOOL ; } } | public synchronized void start ( ) throws RemoteException { if ( ! isRunning ( ) ) { if ( ssf != null ) { registry = LocateRegistry . createRegistry ( port , null , ssf ) ; } else { registry = LocateRegistry . createRegistry ( port ) ; } isRunning = _BOOL ; } } | 63 |
java-test-189 | java | Is this method used to delete the workflow matrix details ? | Yes | @ Transactional public void delete Work Flowfor Object ( final Map workflowsearchparams ) { final Criteria work Flow Crit = get Criteria For Deleteor Modify ( workflowsearchparams ) ; for ( final Work Flow Matrix matrix : ( List < Work Flow Matrix > ) work Flow Crit . list ( ) ) { workflow Matrix Repository . delete ( matrix ) ; } } | @ Transactional public void deleteWorkFlowforObject ( final Map workflowsearchparams ) { final Criteria workFlowCrit = getCriteriaForDeleteorModify ( workflowsearchparams ) ; for ( final WorkFlowMatrix matrix : ( List < WorkFlowMatrix > ) workFlowCrit . list ( ) ) { workflowMatrixRepository . delete ( matrix ) ; } } | 65 |
java-test-190 | java | What is this method used ? | to delete the workflow matrix details | @ Transactional public void delete Work Flowfor Object ( final Map workflowsearchparams ) { final Criteria work Flow Crit = get Criteria For Deleteor Modify ( workflowsearchparams ) ; for ( final Work Flow Matrix matrix : ( List < Work Flow Matrix > ) work Flow Crit . list ( ) ) { workflow Matrix Repository . delete ( matrix ) ; } } | @ Transactional public void deleteWorkFlowforObject ( final Map workflowsearchparams ) { final Criteria workFlowCrit = getCriteriaForDeleteorModify ( workflowsearchparams ) ; for ( final WorkFlowMatrix matrix : ( List < WorkFlowMatrix > ) workFlowCrit . list ( ) ) { workflowMatrixRepository . delete ( matrix ) ; } } | 65 |
java-test-191 | java | What is this method called ? | to clear any actions that have not been completed | protected synchronized void clear Remaining Actions ( ) { for ( int i = active Action List . size ( ) - NUM ; i >= NUM ; i -- ) { Transit Section Action tsa = active Action List . get ( i ) ; Thread t = tsa . get Waiting Thread ( ) ; if ( t != null ) { t . interrupt ( ) ; } if ( tsa . get Waiting For Sensor ( ) ) { tsa . dispose Sensor Listener ( ) ; } tsa . initialize ( ) ; active Action List . remove ( i ) ; } } | protected synchronized void clearRemainingActions ( ) { for ( int i = _activeActionList . size ( ) - _NUM ; i >= _NUM ; i -- ) { TransitSectionAction tsa = _activeActionList . get ( i ) ; Thread t = tsa . getWaitingThread ( ) ; if ( t != null ) { t . interrupt ( ) ; } if ( tsa . getWaitingForSensor ( ) ) { tsa . disposeSensorListener ( ) ; } tsa . initialize ( ) ; _activeActionList . remove ( i ) ; } } | 109 |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 16