nus-yam/ex-repair huggingface dataset:
Buggy code:
public class SnapshotListHandler implements OperationStepHandler , DescriptionProvider { public static final String OPERATION_NAME = "list-snapshots" ; private final ConfigurationPersister persister ; public SnapshotListHandler ( ConfigurationPersister persister ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { try { SnapshotInfo info = persister . listSnapshots ( ) ; ModelNode result = context . getResult ( ) ; result . get ( DIRECTORY ) . set ( info . getSnapshotDirectory ( ) ) ; result . get ( NAMES ) . setEmptyList ( ) ; for ( String name : info . names ( ) ) { result . get ( NAMES ) . add ( name ) ; } <START_BUG> context . completeStep ( ) ; <END_BUG> } catch ( Exception e ) { throw new OperationFailedException ( e . getMessage ( ) , new ModelNode ( ) . set ( e . getMessage ( ) ) ) ; } } @ Override public ModelNode getModelDescription ( Locale locale ) { } }

Fix:
context . completeStep ( NOOP_ROLLBACK_HANDLER ) ;
Buggy code:
public class StandardTypeConverter implements TypeConverter { private ConversionService conversionService ; public StandardTypeConverter ( ) { } public StandardTypeConverter ( ConversionService conversionService ) { } @ SuppressWarnings ( "unchecked" ) public < T > T convertValue ( Object value , Class < T > targetType ) throws EvaluationException { } public Object convertValue ( Object value , TypeDescriptor typeDescriptor ) throws EvaluationException { try { <START_BUG> return conversionService . executeConversion ( value , typeDescriptor ) ; <END_BUG> } catch ( ConverterNotFoundException cenfe ) { throw new org . springframework . expression . spel . SpelException ( cenfe , SpelMessages . TYPE_CONVERSION_ERROR , value . getClass ( ) , typeDescriptor . asString ( ) ) ; } catch ( ConversionException ce ) { throw new org . springframework . expression . spel . SpelException ( ce , SpelMessages . TYPE_CONVERSION_ERROR , value . getClass ( ) , typeDescriptor . asString ( ) ) ; } } public boolean canConvert ( Class < ? > sourceType , Class < ? > targetType ) { } public boolean canConvert ( Class < ? > sourceType , TypeDescriptor targetType ) { } }

Fix:
return conversionService . convert ( value , typeDescriptor ) ;
Buggy code:
public class Zip extends MatchingTask { private File zipFile ; private File baseDir ; private boolean doCompress = true ; private boolean doUpdate = false ; private boolean doFilesonly = false ; protected String archiveType = "zip" ; private static long emptyCrc = new CRC32 ( ) . getValue ( ) ; protected String emptyBehavior = "skip" ; private Vector filesets = new Vector ( ) ; private Hashtable addedDirs = new Hashtable ( ) ; private Vector addedFiles = new Vector ( ) ; private boolean addingNewFiles ; private String encoding = null ; public void setZipfile ( File zipFile ) { } public void setBasedir ( File baseDir ) { } public void setCompress ( boolean c ) { } public void setFilesonly ( boolean f ) { } public void setUpdate ( boolean c ) { } <START_BUG> public void addFileset ( ZipFileSet set ) { <END_BUG> filesets . addElement ( set ) ; } public void addZipfileset ( ZipFileSet set ) { } public static class WhenEmpty extends EnumeratedAttribute { public String [ ] getValues ( ) { } } public void setWhenempty ( Zip . WhenEmpty we ) { } public void setEncoding ( String encoding ) { } public void execute ( ) throws BuildException { } protected boolean isAddingNewFiles ( ) { } protected void addFiles ( FileScanner scanner , ZipOutputStream zOut , String prefix , String fullpath ) throws IOException { } protected void addZipEntries ( ZipFileSet fs , DirectoryScanner ds , ZipOutputStream zOut , String prefix ) throws IOException { } protected void initZipOutputStream ( ZipOutputStream zOut ) throws IOException , BuildException { } protected void finalizeZipOutputStream ( ZipOutputStream zOut ) throws IOException , BuildException { } protected boolean createEmptyZip ( File zipFile ) { } protected boolean isUpToDate ( FileScanner [ ] scanners , File zipFile ) throws BuildException { } protected static File [ ] grabFiles ( FileScanner [ ] scanners ) { } protected static File [ ] grabFiles ( FileScanner [ ] scanners , String [ ] [ ] fileNames ) { } protected static String [ ] [ ] grabFileNames ( FileScanner [ ] scanners ) { } protected void zipDir ( File dir , ZipOutputStream zOut , String vPath ) throws IOException { } protected void zipFile ( InputStream in , ZipOutputStream zOut , String vPath , long lastModified ) throws IOException { } protected void zipFile ( File file , ZipOutputStream zOut , String vPath ) throws IOException { } protected void addParentDirs ( File baseDir , String entry , ZipOutputStream zOut , String prefix ) throws IOException { } protected void addFiles ( Vector filesets , ZipOutputStream zOut ) throws IOException { } protected void cleanUp ( ) { } }

Fix:
public void addFileset ( FileSet set ) {
Buggy code:
@ SuppressWarnings ( "restriction" ) public class WSDL2JavaDefaultsConfigWidget extends SimpleWidgetDataContributor { private WSDL2JavaDataModel model ; public WSDL2JavaDefaultsConfigWidget ( ) { } public void setWSDL2JavaDataModel ( WSDL2JavaDataModel model ) { } @ Override public WidgetDataEvents addControls ( final Composite parent , final Listener statusListener ) { final Composite mainComposite = new Composite ( parent , SWT . NONE ) ; GridLayout gridLayout = new GridLayout ( 1 , false ) ; mainComposite . setLayout ( gridLayout ) ; GridData gridData = new GridData ( SWT . FILL , SWT . FILL , true , true ) ; mainComposite . setLayoutData ( gridData ) ; Group wsdl2javaGroup = new Group ( mainComposite , SWT . SHADOW_IN ) ; wsdl2javaGroup . setText ( WSDL2JAVA_GROUP_LABEL ) ; GridLayout wsdl2javalayout = new GridLayout ( 1 , true ) ; wsdl2javaGroup . setLayout ( wsdl2javalayout ) ; gridData = new GridData ( SWT . FILL , SWT . FILL , true , false ) ; wsdl2javaGroup . setLayoutData ( gridData ) ; WSDL2JavaWidgetFactory . createGenerateServerButton ( wsdl2javaGroup , model ) ; WSDL2JavaWidgetFactory . createGenerateImplementationButton ( wsdl2javaGroup , model ) ; WSDL2JavaWidgetFactory . createDefaultValuesButton ( wsdl2javaGroup , model ) ; WSDL2JavaWidgetFactory . createProcessSOAPHeadersButton ( wsdl2javaGroup , model ) ; WSDL2JavaWidgetFactory . createNamespacePackageMappingButton ( wsdl2javaGroup , model ) ; WSDL2JavaWidgetFactory . createExcludesNamespaceMappingButton ( wsdl2javaGroup , model ) ; if ( CXFModelUtils . isAutoNameResolutionPermitted ( ) ) { WSDL2JavaWidgetFactory . createAutoNameResolutionButton ( wsdl2javaGroup , model ) ; } <START_BUG> if ( ( model . getCxfRuntimeVersion ( ) . compareTo ( CXF_VERSION_2_1 ) ) >= 0 ) { <END_BUG> WSDL2JavaWidgetFactory . createNoAddressBindingButton ( wsdl2javaGroup , model ) ; } Group xjcArgGroup = new Group ( mainComposite , SWT . SHADOW_IN ) ; xjcArgGroup . setText ( WSDL2JAVA_XJC_ARG_GROUP_LABEL ) ; GridLayout xjcArgLayout = new GridLayout ( 1 , true ) ; xjcArgGroup . setLayout ( xjcArgLayout ) ; gridData = new GridData ( SWT . FILL , SWT . FILL , true , false ) ; xjcArgGroup . setLayoutData ( gridData ) ; Table xjcArgsTable = WSDL2JavaWidgetFactory . createXJCArgTable ( xjcArgGroup , model ) ; gridData = new GridData ( SWT . FILL , SWT . FILL , true , true ) ; gridData . horizontalSpan = 3 ; gridData . verticalSpan = 6 ; xjcArgsTable . setLayoutData ( gridData ) ; WSDL2JavaWidgetFactory . createXJCDefaultValuesTableItem ( xjcArgsTable , model ) ; WSDL2JavaWidgetFactory . createXJCToStringTableItem ( xjcArgsTable , model ) ; WSDL2JavaWidgetFactory . createXJCToStringMultiLineTableItem ( xjcArgsTable , model ) ; WSDL2JavaWidgetFactory . createXJCToStringSimpleTableItem ( xjcArgsTable , model ) ; WSDL2JavaWidgetFactory . createXJCLocatorTableItem ( xjcArgsTable , model ) ; WSDL2JavaWidgetFactory . createXJCSyncMethodsTableItem ( xjcArgsTable , model ) ; WSDL2JavaWidgetFactory . createXJCMarkGeneratedTableItem ( xjcArgsTable , model ) ; return this ; } }

Fix:
if ( ( model . getDefaultRuntimeVersion ( ) . compareTo ( CXF_VERSION_2_1 ) ) >= 0 ) {
Buggy code:
public class FormBasedXmlQueryDemo extends HttpServlet { private QueryTemplateManager queryTemplateManager ; private CorePlusExtensionsParser xmlParser ; private IndexSearcher searcher ; private Analyzer analyzer = new org . apache . lucene . analysis . standard . StandardAnalyzer ( Version . LUCENE_CURRENT ) ; public FormBasedXmlQueryDemo ( ) { } @ Override public void init ( ServletConfig config ) throws ServletException { } @ Override protected void doPost ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } private void openExampleIndex ( ) throws IOException { RAMDirectory rd = new RAMDirectory ( ) ; IndexWriterConfig iwConfig = new IndexWriterConfig ( Version . LUCENE_CURRENT , analyzer ) ; IndexWriter writer = new IndexWriter ( rd , iwConfig ) ; InputStream dataIn = getServletContext ( ) . getResourceAsStream ( "//WEB-INF//data.tsv" ) ; BufferedReader br = new BufferedReader ( new InputStreamReader ( dataIn , StandardCharsets . UTF_8 ) ) ; String line = br . readLine ( ) ; final FieldType textNoNorms = new FieldType ( TextField . TYPE_STORED ) ; textNoNorms . setOmitNorms ( true ) ; while ( line != null ) { line = line . trim ( ) ; if ( ( line . length ( ) ) > 0 ) { StringTokenizer st = new StringTokenizer ( line , "\t" ) ; Document doc = new Document ( ) ; doc . add ( new org . apache . lucene . document . Field ( "location" , st . nextToken ( ) , textNoNorms ) ) ; doc . add ( new org . apache . lucene . document . Field ( "salary" , st . nextToken ( ) , textNoNorms ) ) ; doc . add ( new org . apache . lucene . document . Field ( "type" , st . nextToken ( ) , textNoNorms ) ) ; doc . add ( new org . apache . lucene . document . Field ( "description" , st . nextToken ( ) , textNoNorms ) ) ; writer . addDocument ( doc ) ; } line = br . readLine ( ) ; } <START_BUG> writer . close ( ) ; <END_BUG> IndexReader reader = DirectoryReader . open ( rd ) ; searcher = new IndexSearcher ( reader ) ; } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public class SassFileContext extends SassContext { protected Sass_File_Context $file_context ; protected SassFileContext ( @ Nonnull Sass_File_Context $file_context ) { } public static SassFileContext create ( @ Nonnull final Path inputFile ) { <START_BUG> final Sass_File_Context $file_context = INSTANCE . sass_make_file_context ( inputFile . toUri ( ) . getPath ( ) ) ; <END_BUG> return new SassFileContext ( $file_context ) ; } @ Override public void compile ( @ WillNotClose @ Nonnull OutputStream outputStream ) throws SassCompilationException , IOException { } @ Override public void setOptions ( @ Nonnull final SassOptions options ) { } @ Override protected void finalize ( ) throws Throwable { } }

Fix:
final Sass_File_Context $file_context = INSTANCE . sass_make_file_context ( inputFile . toFile ( ) . getAbsolutePath ( ) ) ;
Buggy code:
public class MainActivity extends Activity { public static final String SEARCH_QUERY_ID = "search" ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_main ) ; Intent searchIntent = new Intent ( this , SearchResultActivity . class ) ; <START_BUG> searchIntent . putExtra ( MainActivity . SEARCH_QUERY_ID , "Cell" ) ; <END_BUG> startActivity ( searchIntent ) ; } }

Fix:
searchIntent . putExtra ( MainActivity . SEARCH_QUERY_ID , "Harry<seq2seq4repair_space>Potter" ) ;
Buggy code:
public class JvmXml { public static void parseJvm ( final XMLExtendedStreamReader reader , final ModelNode parentAddress , final Namespace expectedNs , final List < ModelNode > updates , final Set < String > jvmNames ) throws XMLStreamException { } public static void parseJvm ( final XMLExtendedStreamReader reader , final ModelNode parentAddress , final Namespace expectedNs , final List < ModelNode > updates , final Set < String > jvmNames , final boolean server ) throws XMLStreamException { } public static ModelNode parseEnvironmentVariables ( final XMLExtendedStreamReader reader , final Namespace expectedNs , ModelNode addOp ) throws XMLStreamException { final ModelNode properties = new ModelNode ( ) ; while ( ( reader . nextTag ( ) ) != ( XMLStreamConstants . END_ELEMENT ) ) { requireNamespace ( reader , expectedNs ) ; if ( ( Element . forName ( reader . getLocalName ( ) ) ) != ( Element . VARIABLE ) ) { throw unexpectedElement ( reader ) ; } final String [ ] array = requireAttributes ( reader , NAME . getLocalName ( ) , VALUE . getLocalName ( ) ) ; requireNoContent ( reader ) ; <START_BUG> properties . add ( array [ 0 ] , array [ 1 ] ) ; <END_BUG> } if ( ! ( properties . isDefined ( ) ) ) { throw missingRequiredElement ( reader , Collections . singleton ( OPTION ) ) ; } addOp . get ( JVM_ENV_VARIABLES ) . set ( properties ) ; return properties ; } private static void parseHeap ( final XMLExtendedStreamReader reader , final ModelNode address , ModelNode addOp ) throws XMLStreamException { } private static void parsePermgen ( final XMLExtendedStreamReader reader , final ModelNode address , ModelNode addOp ) throws XMLStreamException { } private static void parseStack ( final XMLExtendedStreamReader reader , final ModelNode address , ModelNode addOp ) throws XMLStreamException { } private static void parseAgentLib ( final XMLExtendedStreamReader reader , final ModelNode address , ModelNode addOp ) throws XMLStreamException { } private static void parseAgentPath ( final XMLExtendedStreamReader reader , final ModelNode address , ModelNode addOp ) throws XMLStreamException { } private static void parseJavaagent ( final XMLExtendedStreamReader reader , final ModelNode address , ModelNode addOp ) throws XMLStreamException { } private static void parseJvmOptions ( final XMLExtendedStreamReader reader , final ModelNode address , final Namespace expectedNs , final ModelNode addOp ) throws XMLStreamException { } public static void writeJVMElement ( final XMLExtendedStreamWriter writer , final String jvmName , final ModelNode jvmElement ) throws XMLStreamException { } private static boolean checkParseAndSetParameter ( final SimpleAttributeDefinition ad , final String value , final ModelNode operation , final XMLStreamReader reader ) throws XMLStreamException { } }

Fix:
properties . add ( array [ 0 ] , ParseUtils . parsePossibleExpression ( array [ 1 ] ) ) ;
Buggy code:
public class Property extends Task { protected String name ; protected String value ; protected File file ; protected String resource ; protected Path classpath ; protected String env ; protected Reference ref ; protected boolean userProperty ; public Property ( ) { } protected Property ( boolean userProperty ) { } public void setName ( String name ) { } public String getName ( ) { } public void setLocation ( File location ) { } public void setValue ( String value ) { } public String getValue ( ) { } public void setFile ( File file ) { } public File getFile ( ) { } public void setRefid ( Reference ref ) { } public Reference getRefid ( ) { } public void setResource ( String resource ) { } public String getResource ( ) { } public void setEnvironment ( String env ) { } public String getEnvironment ( ) { } public void setClasspath ( Path classpath ) { } public Path createClasspath ( ) { } public void setClasspathRef ( Reference r ) { } public void setUserProperty ( boolean userProperty ) { } public String toString ( ) { } public void execute ( ) throws BuildException { } protected void loadFile ( File file ) throws BuildException { } protected void loadResource ( String name ) { } protected void loadEnvironment ( String prefix ) { } protected void addProperties ( Properties props ) { resolveAllProperties ( props ) ; Enumeration e = props . keys ( ) ; while ( e . hasMoreElements ( ) ) { String name = ( ( String ) ( e . nextElement ( ) ) ) ; String value = ( ( String ) ( props . getProperty ( name ) ) ) ; <START_BUG> String v = ProjectHelper . replaceProperties ( project , value ) ; <END_BUG> addProperty ( name , v ) ; } } protected void addProperty ( String n , String v ) { } private void resolveAllProperties ( Properties props ) throws BuildException { } }

Fix:
String v = project . replaceProperties ( value ) ;
Buggy code:
@ Configuration public class ProxyTransactionManagementConfiguration extends AbstractTransactionManagementConfiguration { @ Bean ( name = TransactionManagementConfigUtils . TRANSACTION_ADVISOR_BEAN_NAME ) @ Role ( BeanDefinition . ROLE_INFRASTRUCTURE ) public BeanFactoryTransactionAttributeSourceAdvisor transactionAdvisor ( ) { BeanFactoryTransactionAttributeSourceAdvisor advisor = new BeanFactoryTransactionAttributeSourceAdvisor ( ) ; advisor . setTransactionAttributeSource ( transactionAttributeSource ( ) ) ; advisor . setAdvice ( transactionInterceptor ( ) ) ; <START_BUG> advisor . setOrder ( this . enableTx . getInt ( "order" ) ) ; <END_BUG> return advisor ; } @ Bean @ Role ( BeanDefinition . ROLE_INFRASTRUCTURE ) public TransactionAttributeSource transactionAttributeSource ( ) { } @ Bean @ Role ( BeanDefinition . ROLE_INFRASTRUCTURE ) public TransactionInterceptor transactionInterceptor ( ) { } }

Fix:
advisor . setOrder ( this . enableTx . < Integer > getNumber ( "order" ) ) ;
Buggy code:
public class ProjectcategorieController extends DbController { private GridPane grid = null ; private String sql_tableName = "Projektkategorie" ; private String sql_idField = "ProjektkategorieID" ; private String sql_select = "SELECT<seq2seq4repair_space>*<seq2seq4repair_space>FROM<seq2seq4repair_space>" + ( sql_tableName ) ; private String sql_newEntry = ( "INSERT<seq2seq4repair_space>INTO<seq2seq4repair_space>" + ( sql_tableName ) ) + "<seq2seq4repair_space>(Bezeichnung)<seq2seq4repair_space>VALUES<seq2seq4repair_space>" ; private String sql_saveEntry = ( "UPDATE<seq2seq4repair_space>" + ( sql_tableName ) ) + "<seq2seq4repair_space>SET<seq2seq4repair_space>" ; private TextField textField_id = new TextField ( ) ; private TextField textField_name = new TextField ( ) ; private String newEntryDisplayTxt ; public ProjectcategorieController ( GridPane grid , Databean bean ) { } @ Override protected void writeDataToForm ( ) { } @ Override protected void makeForm ( ) { } @ Override protected void button_new_handle ( ) { } @ Override protected void button_delete_handle ( ) { } @ Override protected void button_save_handle ( ) { if ( textField_id . getText ( ) . toString ( ) . equals ( newEntryDisplayTxt ) ) { String valueTxt = ( "('" + ( textField_name . getText ( ) ) ) + "')" ; executeSQLQueryWithoutResult ( ( ( sql_newEntry ) + valueTxt ) ) ; button_new . setText ( "Neu" ) ; } else { <START_BUG> String valueTxt = ( "Abteilungsname='" + ( textField_name . getText ( ) ) ) + "'" ; <END_BUG> executeSQLQueryWithoutResult ( ( ( sql_saveEntry ) + valueTxt ) ) ; } updateForm ( sql_select ) ; } }

Fix:
String valueTxt = ( "Bezeichnung='" + ( textField_name . getText ( ) ) ) + "'" ;
Buggy code:
public class WicketAjaxIndicatorAppender extends AbstractBehavior { private Component component ; private static final long serialVersionUID = 1L ; public WicketAjaxIndicatorAppender ( ) { } public void onRendered ( Component component ) { } protected CharSequence getIndicatorUrl ( ) { } protected String getSpanClass ( ) { <START_BUG> return "org.apache.wicket-ajax-indicator" ; <END_BUG> } public String getMarkupId ( ) { } public final void bind ( Component component ) { } }

Fix:
return "wicket-ajax-indicator" ;
Buggy code:
public class TestSpanMultiTermQueryWrapper extends LuceneTestCase { private Directory directory ; private IndexReader reader ; private IndexSearcher searcher ; @ Override public void setUp ( ) throws Exception { super . setUp ( ) ; directory = newDirectory ( ) ; RandomIndexWriter iw = new RandomIndexWriter ( random ( ) , directory ) ; Document doc = new Document ( ) ; Field field = newTextField ( "field" , "" , NO ) ; doc . add ( field ) ; field . setStringValue ( "quick<seq2seq4repair_space>brown<seq2seq4repair_space>fox" ) ; iw . addDocument ( doc ) ; field . setStringValue ( "jumps<seq2seq4repair_space>over<seq2seq4repair_space>lazy<seq2seq4repair_space>broun<seq2seq4repair_space>dog" ) ; iw . addDocument ( doc ) ; field . setStringValue ( "jumps<seq2seq4repair_space>over<seq2seq4repair_space>extremely<seq2seq4repair_space>very<seq2seq4repair_space>lazy<seq2seq4repair_space>broxn<seq2seq4repair_space>dog" ) ; iw . addDocument ( doc ) ; reader = iw . getReader ( ) ; <START_BUG> iw . close ( ) ; <END_BUG> searcher = newSearcher ( reader ) ; } @ Override public void tearDown ( ) throws Exception { } public void testWildcard ( ) throws Exception { } public void testPrefix ( ) throws Exception { } public void testFuzzy ( ) throws Exception { } public void testFuzzy2 ( ) throws Exception { } public void testNoSuchMultiTermsInNear ( ) throws Exception { } public void testNoSuchMultiTermsInNotNear ( ) throws Exception { } public void testNoSuchMultiTermsInOr ( ) throws Exception { } public void testNoSuchMultiTermsInSpanFirst ( ) throws Exception { } }

Fix:
iw . shutdown ( ) ;
Buggy code:
public class MyIntentService extends IntentService { public MyIntentService ( ) { } public static void getPageAndSaveQuotes ( Context context , int pageNumber ) { } public static void getTopPageAndSaveQuotes ( Context context , int pageNumber ) { } @ Override protected void onHandleIntent ( Intent intent ) { } private void handeActionFetchTopTage ( int pageNumber ) { Log . e ( "TAG" , ( "fetching<seq2seq4repair_space>top<seq2seq4repair_space>page:<seq2seq4repair_space>" + pageNumber ) ) ; <START_BUG> int pn = BashorgParser . parseTopTage ( pageNumber ) ; <END_BUG> Prefs . setMaxTopPage ( pn ) ; Intent intent = new Intent ( Constants . ACTION_FETCH_TOP_PAGE ) ; intent . putExtra ( EXTRA_PAGE_NUMBER , pn ) ; sendBroadcast ( intent ) ; Log . e ( "TAG" , ( "loaded<seq2seq4repair_space>top<seq2seq4repair_space>page:<seq2seq4repair_space>" + pn ) ) ; } private void handleActionFetchPage ( int pageNumber ) { } }

Fix:
int pn = BashorgParser . parsePageFromTop ( pageNumber ) ;
Buggy code:
public class RpcClientContainerInstantiator extends BaseContainerInstantiator implements IRemoteServiceContainerInstantiator { private static final String RPC_CONTAINER_TYPE = "ecf.xmlrpc.client" ; public IContainer createInstance ( ContainerTypeDescription description , Object [ ] parameters ) throws ContainerCreateException { try { RpcId ID = null ; if ( ( parameters != null ) && ( ( parameters [ 0 ] ) instanceof RpcId ) ) ID = ( ( RpcId ) ( parameters [ 0 ] ) ) ; else ID = ( ( RpcId ) ( IDFactory . getDefault ( ) . createID ( NAME , parameters ) ) ) ; return new org . eclipse . ecf . remoteservice . rpc . client . RpcClientContainer ( ID ) ; } catch ( Exception e ) { <START_BUG> throw new ContainerCreateException ( Messages . RPC_COULD_NOT_CREATE_CONTAINER , e ) ; <END_BUG> } } public String [ ] getSupportedAdapterTypes ( ContainerTypeDescription description ) { } public Class [ ] [ ] getSupportedParameterTypes ( ContainerTypeDescription description ) { } public String [ ] getImportedConfigs ( ContainerTypeDescription description , String [ ] exporterSupportedConfigs ) { } public Dictionary getPropertiesForImportedConfigs ( ContainerTypeDescription description , String [ ] importedConfigs , Dictionary exportedProperties ) { } public String [ ] getSupportedConfigs ( ContainerTypeDescription description ) { } }

Fix:
throw new ContainerCreateException ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>create<seq2seq4repair_space>RPCClientContainer" , e ) ;
Buggy code:
public interface IConnection { public Object connect ( ID remote , Object data , int timeout ) throws IOException { } public void disconnect ( ) throws IOException { } public boolean isConnected ( ) { } public ID getLocalID ( ) { } public void start ( ) { } public void stop ( ) { } public boolean isStarted ( ) { } public Map getProperties ( ) { } <START_BUG> public IConnectionEventHandler addCommEventListener ( IConnectionEventHandler listener ) ; <END_BUG> public void removeCommEventListener ( IConnectionEventHandler listener ) { } }

Fix:
public void addCommEventListener ( IConnectionEventHandler listener ) ;
Buggy code:
public class Connect extends AsyncTask < Object , Void , Boolean > { private static final String TAG = "sure2015test" ; private Context context ; private Network network ; private ProgressDialog progressDialog ; private boolean connectAndStartDeviceActivity ; @ Override protected Boolean doInBackground ( Object ... args ) { } @ Override protected void onPostExecute ( Boolean validNetworkData ) { progressDialog . dismiss ( ) ; super . onPostExecute ( validNetworkData ) ; if ( ! validNetworkData ) { Toast . makeText ( context , "Invalid<seq2seq4repair_space>network<seq2seq4repair_space>parameters,<seq2seq4repair_space>make<seq2seq4repair_space>sure<seq2seq4repair_space>password<seq2seq4repair_space>is<seq2seq4repair_space>correct.<seq2seq4repair_space>It<seq2seq4repair_space>may<seq2seq4repair_space>be<seq2seq4repair_space>required<seq2seq4repair_space>to<seq2seq4repair_space>reconnect<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>device<seq2seq4repair_space>on<seq2seq4repair_space>the<seq2seq4repair_space>previous<seq2seq4repair_space>page." , LENGTH_LONG ) . show ( ) ; } else if ( connectAndStartDeviceActivity ) { <START_BUG> Intent newActivity = new Intent ( context , Device . class ) ; <END_BUG> newActivity . addFlags ( FLAG_ACTIVITY_NEW_TASK ) ; newActivity . putExtra ( "Device" , network . ssid ) ; context . startActivity ( newActivity ) ; } else { Toast . makeText ( context , "Successful<seq2seq4repair_space>connection" , LENGTH_LONG ) . show ( ) ; } } }

Fix:
Intent newActivity = new Intent ( context , AvailableNetworks . class ) ;
Buggy code:
public class JAXRDependencyProcessor implements DeploymentUnitProcessor { public static ModuleIdentifier APACHE_SCOUT = ModuleIdentifier . create ( "org.apache.ws.scout" ) ; public static ModuleIdentifier JBOSS_JAXR = ModuleIdentifier . create ( "org.jboss.as.jaxr" ) ; public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } private void addDepdenency ( ModuleSpecification moduleSpecification , ModuleLoader moduleLoader , ModuleIdentifier moduleIdentifier ) { <START_BUG> moduleSpecification . addSystemDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( moduleLoader , moduleIdentifier , false , false , true ) ) ; <END_BUG> } @ Override public void undeploy ( DeploymentUnit context ) { } }

Fix:
moduleSpecification . addSystemDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( moduleLoader , moduleIdentifier , false , false , true , false ) ) ;
Buggy code:
class WebVirtualHostAdd extends AbstractAddStepHandler { static final WebVirtualHostAdd INSTANCE = new WebVirtualHostAdd ( ) ; private static final String TEMP_DIR = "jboss.server.temp.dir" ; private static final String HOME_DIR = "jboss.home.dir" ; private static final String [ ] NO_ALIASES = new String [ 0 ] ; private WebVirtualHostAdd ( ) { } @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override protected void performRuntime ( OperationContext context , ModelNode baseOperation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { } static String [ ] aliases ( final ModelNode node ) { } private ModelNode resolveRewriteExpressions ( OperationContext context , ModelNode unresolvedRewriteChildren ) throws OperationFailedException { ModelNode result = new ModelNode ( ) ; for ( Property prop : unresolvedRewriteChildren . asPropertyList ( ) ) { ModelNode resolvedParent = resolveExpressions ( context , prop . getValue ( ) , ATTRIBUTES ) ; result . get ( prop . getName ( ) ) . set ( resolvedParent ) ; if ( prop . getValue ( ) . hasDefined ( CONDITION ) ) { for ( Property conditionProp : prop . getValue ( ) . get ( CONDITION ) . asPropertyList ( ) ) { ModelNode resolvedCondition = resolveExpressions ( context , conditionProp . getValue ( ) , WebReWriteConditionDefinition . ATTRIBUTES ) ; <START_BUG> resolvedParent . get ( CONDITION , conditionProp . getName ( ) ) . set ( resolvedCondition ) ; <END_BUG> } } } return result ; } private ModelNode resolveExpressions ( OperationContext context , ModelNode fullModel , AttributeDefinition ... attributeDefinitions ) throws OperationFailedException { } }

Fix:
result . get ( prop . getName ( ) ) . get ( CONDITION , conditionProp . getName ( ) ) . set ( resolvedCondition ) ;
Buggy code:
public class SmileUtils { public static int [ ] [ ] sort ( Attribute [ ] attributes , double [ ] [ ] x ) { } public static GaussianRadialBasis learnGaussianRadialBasis ( double [ ] [ ] x , double [ ] [ ] centers ) { } public static GaussianRadialBasis [ ] learnGaussianRadialBasis ( double [ ] [ ] x , double [ ] [ ] centers , int p ) { } public static GaussianRadialBasis [ ] learnGaussianRadialBasis ( double [ ] [ ] x , double [ ] [ ] centers , double r ) { if ( r <= 0.0 ) { throw new IllegalArgumentException ( ( "Invlaid<seq2seq4repair_space>scaling<seq2seq4repair_space>parameter:<seq2seq4repair_space>" + r ) ) ; } int k = centers . length ; KMeans kmeans = new KMeans ( x , k , 10 ) ; System . arraycopy ( kmeans . centroids ( ) , 0 , centers , 0 , k ) ; int n = x . length ; int [ ] y = kmeans . getClusterLabel ( ) ; double [ ] sigma = new double [ k ] ; for ( int i = 0 ; i < n ; i ++ ) { sigma [ y [ i ] ] += Math . squaredDistance ( x [ i ] , centers [ y [ i ] ] ) ; } int [ ] ni = kmeans . getClusterSize ( ) ; GaussianRadialBasis [ ] rbf = new GaussianRadialBasis [ k ] ; for ( int i = 0 ; i < k ; i ++ ) { <START_BUG> if ( ( ( ni [ i ] ) >= 5 ) || ( ( sigma [ i ] ) == 0.0 ) ) { <END_BUG> sigma [ i ] = Math . sqrt ( ( ( sigma [ i ] ) // ( ni [ i ] ) ) ) ; } else { sigma [ i ] = Double . POSITIVE_INFINITY ; for ( int j = 0 ; j < k ; j ++ ) { if ( i != j ) { double d = Math . distance ( centers [ i ] , centers [ j ] ) ; if ( d < ( sigma [ i ] ) ) { sigma [ i ] = d ; } } } sigma [ i ] //= 2.0 ; } rbf [ i ] = new GaussianRadialBasis ( ( r * ( sigma [ i ] ) ) ) ; } return rbf ; } public static < T > GaussianRadialBasis learnGaussianRadialBasis ( T [ ] x , T [ ] centers , Metric < T > distance ) { } public static < T > GaussianRadialBasis [ ] learnGaussianRadialBasis ( T [ ] x , T [ ] centers , Metric < T > distance , int p ) { } public static < T > GaussianRadialBasis [ ] learnGaussianRadialBasis ( T [ ] x , T [ ] centers , Metric < T > distance , double r ) { } }

Fix:
if ( ( ( ni [ i ] ) >= 5 ) || ( ( sigma [ i ] ) != 0.0 ) ) {
Buggy code:
public class CursorAdapterImages extends BaseRecyclerCursorAdapter implements ListenerImageSelection { private ListenerFilesCursor filesCursorListener ; private ListenerItemCount itemCountListener ; private Context context ; private int position ; private int count = 0 ; public CursorAdapterImages ( Context context , Cursor c , ListenerFilesCursor filesCursorListener , ListenerItemCount itemCountListener ) { } @ Override public List < Integer > getCursorImagesSelection ( ) { } @ Override public int getDataIndex ( Cursor cursor ) { } @ Override public void setViewClickListener ( View view , String path , int position ) { } @ Override public void setPlayButtonVisibility ( ImageView imageView ) { } @ Override public void loadImageView ( ImageView imageView , Cursor cursor ) { } private final class ImageClickListener implements OnClickListener { private String thumbnail ; private int selectedPosition ; private ImageClickListener ( String thumbnail , int selectedPosition ) { } @ Override public void onClick ( View v ) { position = selectedPosition ; if ( PhotoPicker . getInstance ( ) . isMultiPicker ( ) ) { toggleTick ( position ) ; } else { Uri uri = null ; if ( getCursor ( ) . moveToPosition ( position ) ) { <START_BUG> int id = getCursor ( ) . getInt ( getCursor ( ) . getColumnIndex ( IMAGE_ID ) ) ; <END_BUG> uri = ContentUris . withAppendedId ( EXTERNAL_CONTENT_URI , id ) ; } String imagePath = MediaDAO . getImagePathFromCursor ( context , getCursor ( ) , position ) ; filesCursorListener . onCursorAssetsSelect ( AssetUtil . getMediaModel ( createMediaResultModel ( thumbnail , imagePath , uri ) ) ) ; } } } public List < DeliverMediaModel > getSelectedFilePaths ( ) { } public void toggleTick ( int selectedPosition ) { } private DeliverMediaModel createMediaResultModel ( String thumbnail , String path , Uri uri ) { } }

Fix:
int id = getCursor ( ) . getInt ( getCursor ( ) . getColumnIndex ( _ID ) ) ;
Buggy code:
public class SEDFactory { public static VisitableSampledSpectrum getSED ( double [ ] flux , double wavelengthStart , double wavelengthInterval ) { } public static VisitableSampledSpectrum getSED ( String fileName , double wavelengthInterval ) { } public static VisitableSampledSpectrum getSED ( String fileName , String userSED , double wavelengthInterval ) { assert wavelengthInterval > 0.0 ; <START_BUG> final DefaultArraySpectrum as = DefaultArraySpectrum . fromString ( userSED ) ; <END_BUG> return new DefaultSampledSpectrum ( as , wavelengthInterval ) ; } public static VisitableSampledSpectrum getSED ( SourceDefinitionParameters sdp , Instrument instrument ) { } public static VisitableSampledSpectrum getSED ( SourceDefinitionParameters sdp , double sampling , double observingStart , double observingEnd ) { } }

Fix:
final DefaultArraySpectrum as = DefaultArraySpectrum . fromUserSpectrum ( userSED ) ;
Buggy code:
public class BVREmptyModel extends BVRToolModel { public BVREmptyModel ( File sf ) { } @ Override public SPLCABVRModel getSPLCABVRModel ( ) { } @ Override public BVRModel getBVRModel ( ) { } public void setBVRModel ( BVRModel bvrModel ) { ( ( BVREmptyModel . BVRInnerModel ) ( bvrm ) ) . setBVRModel ( bvrModel ) ; } @ Override public File getFile ( ) { } private class BVRInnerModel extends SPLCABVRModel { public void setBVRModel ( BVRModel _model ) { <START_BUG> buffered_model = _model ; <END_BUG> init ( ) ; } } }

Fix:
loaded_model = _model ;
Buggy code:
public class StringToLong { public static long convertStringToLong ( String s ) { long num = 0 ; String pattern = "(-?)(\\d+)[lL]?" ; Pattern r = Pattern . compile ( pattern ) ; Matcher m = r . matcher ( s ) ; <START_BUG> if ( m . find ( ) ) { <END_BUG> String digitString = m . group ( 2 ) ; for ( int i = 0 ; i < ( digitString . length ( ) ) ; i ++ ) { int digit = Character . getNumericValue ( digitString . charAt ( i ) ) ; num = ( num * 10 ) + digit ; } num = ( m . group ( 1 ) . equals ( "-" ) ) ? - num : num ; } else { throw new NumberFormatException ( "Invalid<seq2seq4repair_space>number<seq2seq4repair_space>string" ) ; } return num ; } }

Fix:
if ( m . matches ( ) ) {
Buggy code:
public class BatchMoveLineHandler extends CommandHandlerWithHelp { public BatchMoveLineHandler ( ) { } @ Override public boolean isAvailable ( CommandContext ctx ) { } @ Override protected void doHandle ( CommandContext ctx ) throws CommandFormatException { BatchManager batchManager = ctx . getBatchManager ( ) ; if ( ! ( batchManager . isBatchActive ( ) ) ) { ctx . printLine ( "No<seq2seq4repair_space>active<seq2seq4repair_space>batch." ) ; return ; } Batch batch = batchManager . getActiveBatch ( ) ; final int batchSize = batch . size ( ) ; if ( batchSize == 0 ) { ctx . printLine ( "The<seq2seq4repair_space>batch<seq2seq4repair_space>is<seq2seq4repair_space>empty." ) ; return ; } <START_BUG> List < String > arguments = ctx . getParsedArguments ( ) . getOtherArguments ( ) ; <END_BUG> if ( arguments . isEmpty ( ) ) { ctx . printLine ( "Missing<seq2seq4repair_space>line<seq2seq4repair_space>number." ) ; return ; } if ( ( arguments . size ( ) ) != 2 ) { ctx . printLine ( ( "Expected<seq2seq4repair_space>two<seq2seq4repair_space>arguments<seq2seq4repair_space>but<seq2seq4repair_space>received:<seq2seq4repair_space>" + arguments ) ) ; return ; } String intStr = arguments . get ( 0 ) ; final int lineNumber ; try { lineNumber = Integer . parseInt ( intStr ) ; } catch ( NumberFormatException e ) { ctx . printLine ( ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>line<seq2seq4repair_space>number<seq2seq4repair_space>'" + intStr ) + "':<seq2seq4repair_space>" ) + ( e . getLocalizedMessage ( ) ) ) ) ; return ; } if ( ( lineNumber < 1 ) || ( lineNumber > batchSize ) ) { ctx . printLine ( ( ( ( lineNumber + "<seq2seq4repair_space>isn't<seq2seq4repair_space>in<seq2seq4repair_space>range<seq2seq4repair_space>[1.." ) + batchSize ) + "]." ) ) ; return ; } intStr = arguments . get ( 1 ) ; final int toLineNumber ; try { toLineNumber = Integer . parseInt ( intStr ) ; } catch ( NumberFormatException e ) { ctx . printLine ( ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>line<seq2seq4repair_space>number<seq2seq4repair_space>'" + intStr ) + "':<seq2seq4repair_space>" ) + ( e . getLocalizedMessage ( ) ) ) ) ; return ; } if ( ( toLineNumber < 1 ) || ( toLineNumber > batchSize ) ) { ctx . printLine ( ( ( ( toLineNumber + "<seq2seq4repair_space>isn't<seq2seq4repair_space>in<seq2seq4repair_space>range<seq2seq4repair_space>[1.." ) + batchSize ) + "]." ) ) ; return ; } batch . move ( ( lineNumber - 1 ) , ( toLineNumber - 1 ) ) ; } @ Override public boolean hasArgument ( int index ) { } }

Fix:
List < String > arguments = ctx . getParsedArguments ( ) . getOtherProperties ( ) ;
Buggy code:
public class AbstractFilterTst extends TestCase { protected AbstractMessageFolder sourceFolder ; protected MailboxTstFactory factory ; public AbstractFilterTst ( String test ) { } public AbstractFilterTst ( MailboxTstFactory factory , String arg0 ) { } public AbstractMessageFolder getSourceFolder ( ) { } protected void setUp ( ) throws Exception { File file = new File ( "test_config" ) ; file . mkdir ( ) ; new Config ( file ) ; Logging . DEBUG = true ; Logging . createDefaultHandler ( ) ; new MailMain ( ) . init ( ) ; new AddressbookMain ( ) . init ( ) ; <START_BUG> PluginManager . getInstance ( ) . initCorePlugins ( ) ; <END_BUG> sourceFolder = factory . createFolder ( 1 ) ; } protected void tearDown ( ) throws Exception { } public Object addMessage ( ) throws Exception { } }

Fix:
PluginManager . getInstance ( ) . initExternalPlugins ( ) ;
Buggy code:
class DomainApiCheckHandler implements HttpHandler { static String PATH = "//management" ; private static final String UPLOAD_REQUEST = ( DomainApiCheckHandler . PATH ) + "//add-content" ; private final ControlledProcessStateService controlledProcessStateService ; private final HttpHandler domainApiHandler ; private final MultiPartHandler uploadHandler = new MultiPartHandler ( ) ; DomainApiCheckHandler ( final ModelControllerClient modelController , final ControlledProcessStateService controlledProcessStateService ) { } @ Override public void handleRequest ( HttpServerExchange exchange ) throws Exception { if ( ! ( commonChecks ( exchange ) ) ) { return ; } <START_BUG> boolean isUpload = DomainApiCheckHandler . UPLOAD_REQUEST . equals ( exchange . getCanonicalPath ( ) ) ; <END_BUG> if ( POST . equals ( exchange . getRequestMethod ( ) ) ) { if ( isUpload ) { uploadHandler . handleRequest ( exchange ) ; return ; } if ( ! ( checkPostContentType ( exchange ) ) ) { return ; } } domainApiHandler . handleRequest ( exchange ) ; } private boolean checkPostContentType ( HttpServerExchange exchange ) throws Exception { } private String extractContentType ( final String fullContentType ) { } private boolean commonChecks ( HttpServerExchange exchange ) throws Exception { } }

Fix:
boolean isUpload = DomainApiCheckHandler . UPLOAD_REQUEST . equals ( exchange . getRequestPath ( ) ) ;
Buggy code:
public class SearchGetHandler extends SearchHandler { int start ; String language = "english" ; public void handle ( HttpServletRequest request , HttpServletResponse response , String urn ) throws SearchException { response . setCharacterEncoding ( "UTF-8" ) ; try { String first = Utils . first ( urn ) ; if ( first . equals ( BUILD ) ) { response . setContentType ( "text//plain" ) ; BuildIndex bi = new BuildIndex ( response ) ; bi . rebuild ( ) ; <START_BUG> } <END_BUG> if ( first . equals ( FIND ) ) { response . setContentType ( "application//json" ) ; String query = request . getParameter ( QUERY ) ; if ( ( query != null ) && ( ( query . length ( ) ) > 0 ) ) { String langStr = request . getParameter ( LANGUAGE ) ; if ( ( langStr != null ) && ( ( langStr . length ( ) ) > 0 ) ) language = langStr ; String startStr = request . getParameter ( START ) ; if ( ( startStr != null ) && ( ( startStr . length ( ) ) > 0 ) ) start = Integer . parseInt ( startStr ) ; Find f = new Find ( ) ; String res = f . search ( query , language , start ) ; response . getWriter ( ) . println ( res ) ; } } else throw new Exception ( ( "Unknown<seq2seq4repair_space>GET<seq2seq4repair_space>service<seq2seq4repair_space>" + first ) ) ; } catch ( Exception e ) { throw new SearchException ( e ) ; } } }

Fix:
} else
Buggy code:
final class StringToNumberConverterFactory implements ConverterFactory < String , Number > { public < T extends Number > Converter < String , T > getConverter ( Class < T > targetType ) { } private static final class StringToNumber < T extends Number > implements Converter < String , T > { private final Class < T > targetType ; public StringToNumber ( Class < T > targetType ) { } public T convert ( String source ) { <START_BUG> if ( "" . equals ( source ) ) { <END_BUG> return null ; } return NumberUtils . parseNumber ( source , this . targetType ) ; } } }

Fix:
if ( ( source . length ( ) ) == 0 ) {
Buggy code:
class BatchSubsystemDefinition extends SimpleResourceDefinition { public static final String NAME = "batch" ; static final PathElement SUBSYSTEM_PATH = PathElement . pathElement ( SUBSYSTEM , BatchSubsystemDefinition . NAME ) ; static final PathElement THREAD_POOL_PATH = PathElement . pathElement ( THREAD_POOL , THREAD_POOL_NAME ) ; private static final String RESOURCE_NAME = ( BatchSubsystemExtension . class . getPackage ( ) . getName ( ) ) + ".LocalDescriptions" ; static StandardResourceDescriptionResolver getResourceDescriptionResolver ( final String keyPrefix ) { } static StandardResourceDescriptionResolver getResourceDescriptionResolver ( final String ... prefixes ) { } static final SimpleAttributeDefinition JOB_REPOSITORY_TYPE = SimpleAttributeDefinitionBuilder . create ( "job-repository-type" , STRING , true ) . setAllowExpression ( false ) . setAttributeMarshaller ( new DefaultAttributeMarshaller ( ) { @ Override public void marshallAsElement ( final AttributeDefinition attribute , final ModelNode resourceModel , final XMLStreamWriter writer ) throws XMLStreamException { } @ Override public void marshallAsElement ( final AttributeDefinition attribute , final ModelNode resourceModel , final boolean marshallDefault , final XMLStreamWriter writer ) throws XMLStreamException { } } ) . setDefaultValue ( new ModelNode ( IN_MEMORY . toString ( ) ) ) . setValidator ( new org . jboss . as . controller . operations . validation . EnumValidator ( JobRepositoryType . class , true , true ) ) . setRestartJVM ( ) . build ( ) ; public static final BatchSubsystemDefinition INSTANCE = new BatchSubsystemDefinition ( ) ; private BatchSubsystemDefinition ( ) { } @ Override public void registerOperations ( final ManagementResourceRegistration resourceRegistration ) { } @ Override public void registerChildren ( final ManagementResourceRegistration resourceRegistration ) { } @ Override public void registerAttributes ( ManagementResourceRegistration resourceRegistration ) { } private static class BatchThreadFactoryResolver extends ThreadFactoryResolver . SimpleResolver { static final BatchSubsystemDefinition . BatchThreadFactoryResolver INSTANCE = new BatchSubsystemDefinition . BatchThreadFactoryResolver ( ) ; private BatchThreadFactoryResolver ( ) { } @ Override protected String getThreadGroupName ( String threadPoolName ) { <START_BUG> return "batch-" + threadPoolName ; <END_BUG> } } static class BatchSubsystemAdd extends AbstractAddStepHandler { static final BatchSubsystemDefinition . BatchSubsystemAdd INSTANCE = new BatchSubsystemDefinition . BatchSubsystemAdd ( ) ; private BatchSubsystemAdd ( ) { } @ Override protected void populateModel ( final ModelNode operation , final ModelNode model ) throws OperationFailedException { } @ Override protected void performRuntime ( final OperationContext context , final ModelNode operation , final ModelNode model , final ServiceVerificationHandler verificationHandler , final List < ServiceController < ? > > newControllers ) throws OperationFailedException { } } }

Fix:
return "Batch<seq2seq4repair_space>Thread" ;
Buggy code:
class RootImpl < X > extends FromImpl < X , X > implements Root < X > { private final Types . Entity < X > _entity ; public RootImpl ( Types . Entity < X > type ) { } public EntityType < X > getModel ( ) { } public void addToContext ( ExpressionFactory factory , MetamodelImpl model , CriteriaQueryImpl < ? > q ) { } @ Override public Value toValue ( ExpressionFactory factory , CriteriaQueryImpl < ? > c ) { SubqueryImpl < ? > subquery = c . getDelegator ( ) ; Path var = null ; Value val = null ; String alias = c . getAlias ( this ) ; <START_BUG> if ( ( ! ( alias . equalsIgnoreCase ( c . ctx ( ) . schemaAlias ) ) ) && ( ( val = c . getRegisteredRootVariable ( this ) ) != null ) ) { <END_BUG> var = factory . newPath ( val ) ; } else if ( inSubquery ( subquery ) ) { Subquery subQ = subquery . getSubQ ( ) ; var = factory . newPath ( subQ ) ; } else { var = factory . newPath ( ) ; var . setSchemaAlias ( alias ) ; } var . setMetaData ( meta ) ; return var ; } @ Override public Expression toKernelExpression ( ExpressionFactory factory , CriteriaQueryImpl < ? > c ) { } public StringBuilder asValue ( AliasContext q ) { } public StringBuilder asVariable ( AliasContext q ) { } }

Fix:
if ( ( ( ( c . ctx ( ) ) != null ) && ( ! ( alias . equalsIgnoreCase ( c . ctx ( ) . schemaAlias ) ) ) ) && ( ( val = c . getRegisteredRootVariable ( this ) ) != null ) ) {
Buggy code:
public class NewMainActivity extends FragmentActivity { private HorizontalScrollView mHorizontalScrollView ; private LinearLayout mLinearLayout ; private ViewPager pager ; private ImageView mImageView ; private int mScreenWidth ; private int item_width ; private int endPosition ; private int beginPosition ; private int currentFragmentIndex ; private boolean isEnd ; private ArrayList < Fragment > fragments ; @ Override protected void onCreate ( Bundle savedInstanceState ) { this . requestWindowFeature ( FEATURE_NO_TITLE ) ; super . onCreate ( savedInstanceState ) ; setContentView ( activity_main ) ; DisplayMetrics dm = new DisplayMetrics ( ) ; getWindowManager ( ) . getDefaultDisplay ( ) . getMetrics ( dm ) ; mScreenWidth = dm . widthPixels ; mHorizontalScrollView = ( ( HorizontalScrollView ) ( findViewById ( hsv_view ) ) ) ; mLinearLayout = ( ( LinearLayout ) ( findViewById ( hsv_content ) ) ) ; item_width = ( ( int ) ( ( ( mScreenWidth ) // 4.0 ) + 0.5F ) ) ; pager = ( ( ViewPager ) ( findViewById ( R . id . pager ) ) ) ; initNav ( ) ; initViewPager ( ) ; <START_BUG> RunDatabaseHelper myDb = new RunDatabaseHelper ( null ) ; <END_BUG> try { myDb . createDataBase ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } private void initViewPager ( ) { } private void initNav ( ) { } private class MyFragmentPagerAdapter extends FragmentPagerAdapter { private ArrayList < Fragment > fragments ; public MyFragmentPagerAdapter ( FragmentManager fm ) { } public MyFragmentPagerAdapter ( FragmentManager fm , ArrayList < Fragment > fragments ) { } @ Override public int getCount ( ) { } @ Override public Fragment getItem ( int position ) { } @ Override public Object instantiateItem ( ViewGroup container , final int position ) { } } }

Fix:
RunDatabaseHelper myDb = new RunDatabaseHelper ( this ) ;