nus-yam/ex-repair huggingface dataset:
Buggy code:
public abstract class DistributionFactory { protected DistributionFactory ( ) { } public static DistributionFactory newInstance ( ) { DistributionFactory factory = null ; try { DiscoverClass dc = new DiscoverClass ( ) ; <START_BUG> factory = ( ( DistributionFactory ) ( dc . newInstance ( DistributionFactory . class , "org.apache.commons.math.distribution.DistributionFactoryImpl" ) ) ) ; <END_BUG> } catch ( Throwable t ) { return new DistributionFactoryImpl ( ) ; } return factory ; } public abstract BinomialDistribution createBinomialDistribution ( int numberOfTrials , double probabilityOfSuccess ) { } public CauchyDistribution createCauchyDistribution ( double median , double scale ) { } public abstract ChiSquaredDistribution createChiSquareDistribution ( double degreesOfFreedom ) { } public abstract ExponentialDistribution createExponentialDistribution ( double mean ) { } public abstract FDistribution createFDistribution ( double numeratorDegreesOfFreedom , double denominatorDegreesOfFreedom ) { } public abstract GammaDistribution createGammaDistribution ( double alpha , double beta ) { } public abstract TDistribution createTDistribution ( double degreesOfFreedom ) { } public abstract HypergeometricDistribution createHypergeometricDistribution ( int populationSize , int numberOfSuccesses , int sampleSize ) { } public abstract NormalDistribution createNormalDistribution ( double mean , double sd ) { } public abstract NormalDistribution createNormalDistribution ( ) { } public abstract PoissonDistribution createPoissonDistribution ( double lambda ) { } public WeibullDistribution createWeibullDistribution ( double alpha , double beta ) { } }

Fix:
factory = ( ( DistributionFactory ) ( dc . newInstance ( DistributionFactory . class , "org.apache.commons.math.distribution.TestFactoryImpl" ) ) ) ;
Buggy code:
public class Locator { public static File getClassSource ( Class c ) { } public static File getResourceSource ( ClassLoader c , String resource ) { } public static String fromURI ( String uri ) { if ( ! ( uri . startsWith ( "file:" ) ) ) { throw new IllegalArgumentException ( "Can<seq2seq4repair_space>only<seq2seq4repair_space>handle<seq2seq4repair_space>file:<seq2seq4repair_space>URIs" ) ; } if ( uri . startsWith ( "file:////" ) ) { uri = uri . substring ( 7 ) ; } else { uri = uri . substring ( 5 ) ; } uri = uri . replace ( '//' , File . separatorChar ) ; <START_BUG> if ( ( ( ( ( ( File . pathSeparatorChar ) == ';' ) && ( uri . startsWith ( "\\" ) ) ) && ( ( uri . length ( ) ) > 2 ) ) && ( Character . isLetter ( uri . charAt ( 1 ) ) ) ) && ( ( uri . charAt ( 2 ) ) == ':' ) ) { <END_BUG> uri = uri . substring ( 1 ) ; } StringBuffer sb = new StringBuffer ( ) ; CharacterIterator iter = new StringCharacterIterator ( uri ) ; for ( char c = iter . first ( ) ; c != ( CharacterIterator . DONE ) ; c = iter . next ( ) ) { if ( c == '%' ) { char c1 = iter . next ( ) ; if ( c1 != ( CharacterIterator . DONE ) ) { int i1 = Character . digit ( c1 , 16 ) ; char c2 = iter . next ( ) ; if ( c2 != ( CharacterIterator . DONE ) ) { int i2 = Character . digit ( c2 , 16 ) ; sb . append ( ( ( char ) ( ( i1 << 4 ) + i2 ) ) ) ; } } } else { sb . append ( c ) ; } } String path = sb . toString ( ) ; return path ; } public static File getToolsJar ( ) { } public static URL [ ] getLocationURLs ( File location ) throws MalformedURLException { } public static URL [ ] getLocationURLs ( File location , final String [ ] extensions ) throws MalformedURLException { } }

Fix:
if ( ( ( ( ( ( File . pathSeparatorChar ) == ';' ) && ( uri . startsWith ( "\\" ) ) ) && ( ( uri . length ( ) ) > 2 ) ) && ( Character . isLetter ( uri . charAt ( 1 ) ) ) ) && ( ( uri . lastIndexOf ( ':' ) ) > ( - 1 ) ) ) {
Buggy code:
public class PNGImageUtilTestCase { @ Test public void testDecodeImageHeader ( ) throws IOException { } @ Test public void testDecodeImage ( ) throws IOException { ImageDecoder pngDecoder ; ImageDecoder ppmDecoder ; pngDecoder = PNGImageUtil . getInstance ( ) ; ppmDecoder = PPMImageUtil . getInstance ( ) ; FileInputStream fis ; FloatImage ppmImage ; FloatImage pngImage ; String [ ] fileName = new String [ ] { "canon-ixus" , "cmyk-jpeg-format" } ; for ( int i = 0 ; i < ( fileName . length ) ; i ++ ) { fis = new FileInputStream ( ( ( "data//test//PNGImageUtilTestCase//truth//" + ( fileName [ i ] ) ) + ".ppm" ) ) ; ppmImage = ppmDecoder . decodeImage ( fis ) ; assumeNotNull ( ppmImage ) ; fis = new FileInputStream ( ( ( "data//test//PNGImageUtilTestCase//decode//" + ( fileName [ i ] ) ) + ".png" ) ) ; pngImage = pngDecoder . decodeImage ( fis ) ; assumeNotNull ( pngImage ) ; <START_BUG> assertArrayEquals ( ( ( ( fileName [ i ] ) + "<seq2seq4repair_space>decoding<seq2seq4repair_space>fails<seq2seq4repair_space>for<seq2seq4repair_space>" ) + ( fileName [ i ] ) ) , ppmImage . getData ( ) , pngImage . getData ( ) , 0 ) ; <END_BUG> } } @ Test public void testEncodeImage ( ) throws IOException { } }

Fix:
assertEquals ( ( ( ( fileName [ i ] ) + "<seq2seq4repair_space>decoding<seq2seq4repair_space>fails<seq2seq4repair_space>for<seq2seq4repair_space>" ) + ( fileName [ i ] ) ) , ppmImage , pngImage ) ;
Buggy code:
public class TxBridgeOutboundRecoveryService extends AbstractService < OutboundBridgeRecoveryManager > { private OutboundBridgeRecoveryManager outboundBridgeRecoveryManager ; public TxBridgeOutboundRecoveryService ( ) { } @ Override public synchronized OutboundBridgeRecoveryManager getValue ( ) throws IllegalStateException { } @ Override public synchronized void start ( final StartContext context ) throws StartException { final ClassLoader loader = TxBridgeOutboundRecoveryService . class . getClassLoader ( ) ; SecurityActions . setContextLoader ( loader ) ; try { OutboundBridgeRecoveryManager service = new OutboundBridgeRecoveryManager ( ) ; try { service . start ( ) ; } catch ( Exception e ) { <START_BUG> throw new StartException ( "TxBridge<seq2seq4repair_space>outbound<seq2seq4repair_space>recovery<seq2seq4repair_space>service<seq2seq4repair_space>start<seq2seq4repair_space>failed" , e ) ; <END_BUG> } outboundBridgeRecoveryManager = service ; } finally { SecurityActions . setContextLoader ( null ) ; } } public synchronized void stop ( final StopContext context ) { } }

Fix:
throw MESSAGES . txBridgeOutboundRecoveryServiceFailedToStart ( ) ;
Buggy code:
public class ImageUploaderTest { private ImageUploader imageUploader ; private IplImage imageToBeUploaded ; @ Before public void setUp ( ) { <START_BUG> URL url = Application . class . getClassLoader ( ) . getResource ( "TestImages//obama.jpg" ) ; <END_BUG> try { imageToBeUploaded = cvLoadImage ( new File ( url . toURI ( ) ) . getAbsolutePath ( ) ) ; } catch ( URISyntaxException e ) { e . printStackTrace ( ) ; } imageUploader = new ImageUploader ( imageToBeUploaded ) ; } @ Test public void imageTest ( ) throws Exception { } }

Fix:
URL url = ImageUploaderTest . class . getClassLoader ( ) . getResource ( "TestImages//obama.jpg" ) ;
Buggy code:
public class NullIdeManager { private static NullIdeManager ideManager = null ; private NullIdeTaskListManager taskListManager = null ; public static NullIdeManager getIdeManager ( ) { } public void init ( String testProjectPath ) { try { <START_BUG> UserPreferencesAdapter preferencesAdapter = new UserPreferencesStore ( ) ; <END_BUG> ProjectPropertiesAdapter browserProjectProperties = new NullIdeProperties ( testProjectPath ) ; taskListManager = new NullIdeTaskListManager ( ) ; BasicEditor ajdeEditor = new BasicEditor ( ) ; IdeUIAdapter uiAdapter = new NullIdeUIAdapter ( ) ; JFrame nullFrame = new JFrame ( ) ; AjdeUIManager . getDefault ( ) . init ( ajdeEditor , taskListManager , browserProjectProperties , preferencesAdapter , uiAdapter , new IconRegistry ( ) , nullFrame , true ) ; } catch ( Throwable t ) { t . printStackTrace ( ) ; Ajde . getDefault ( ) . getErrorHandler ( ) . handleError ( "Null<seq2seq4repair_space>IDE<seq2seq4repair_space>failed<seq2seq4repair_space>to<seq2seq4repair_space>initialize." , t ) ; } } public List getCompilationSourceLineTasks ( ) { } }

Fix:
UserPreferencesAdapter preferencesAdapter = new UserPreferencesStore ( false ) ;
Buggy code:
public class AddIndexesTaskTest extends BenchmarkTestCase { private static File testDir ; private static File inputDir ; @ BeforeClass public static void beforeClassAddIndexesTaskTest ( ) throws Exception { AddIndexesTaskTest . testDir = createTempDir ( "addIndexesTask" ) ; AddIndexesTaskTest . inputDir = new File ( AddIndexesTaskTest . testDir , "input" ) ; Directory tmpDir = newFSDirectory ( AddIndexesTaskTest . inputDir ) ; try { IndexWriter writer = new IndexWriter ( tmpDir , new org . apache . lucene . index . IndexWriterConfig ( TEST_VERSION_CURRENT , null ) ) ; for ( int i = 0 ; i < 10 ; i ++ ) { writer . addDocument ( new Document ( ) ) ; } <START_BUG> writer . close ( ) ; <END_BUG> } finally { tmpDir . close ( ) ; } } private PerfRunData createPerfRunData ( ) throws Exception { } private void assertIndex ( PerfRunData runData ) throws Exception { } public void testAddIndexesDefault ( ) throws Exception { } public void testAddIndexesDir ( ) throws Exception { } public void testAddIndexesReader ( ) throws Exception { } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public class CodeSnippetSingleNameReference extends SingleNameReference implements InvocationSite , ProblemReasons , EvaluationConstants { EvaluationContext evaluationContext ; FieldBinding delegateThis ; public CodeSnippetSingleNameReference ( char [ ] source , long pos , EvaluationContext evaluationContext ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo , boolean valueRequired ) { } public TypeBinding checkFieldAccess ( BlockScope scope ) { if ( ( delegateThis ) == null ) return super . checkFieldAccess ( scope ) ; FieldBinding fieldBinding = ( ( FieldBinding ) ( binding ) ) ; bits &= ~ ( ASTNode . RestrictiveFlagMASK ) ; bits |= FIELD ; if ( ! ( fieldBinding . isStatic ( ) ) ) { if ( this . evaluationContext . isStatic ) { scope . problemReporter ( ) . staticFieldAccessToNonStaticVariable ( this , fieldBinding ) ; constant = NotAConstant ; return null ; } } <START_BUG> constant = org . eclipse . jdt . internal . compiler . ast . FieldReference . getConstantFor ( fieldBinding , true , this , scope , 0 ) ; <END_BUG> if ( isFieldUseDeprecated ( fieldBinding , scope ) ) scope . problemReporter ( ) . deprecatedField ( fieldBinding , this ) ; return fieldBinding . type ; } public void generateAssignment ( BlockScope currentScope , CodeStream codeStream , Assignment assignment , boolean valueRequired ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public void generateCompoundAssignment ( BlockScope currentScope , CodeStream codeStream , MethodBinding writeAccessor , Expression expression , int operator , int assignmentImplicitConversion , boolean valueRequired ) { } public void generatePostIncrement ( BlockScope currentScope , CodeStream codeStream , CompoundAssignment postIncrement , boolean valueRequired ) { } public void generateReceiver ( CodeStream codeStream ) { } public TypeBinding getReceiverType ( BlockScope currentScope ) { } public TypeBinding reportError ( BlockScope scope ) { } }

Fix:
constant = org . eclipse . jdt . internal . compiler . ast . FieldReference . getConstantFor ( fieldBinding , this , true , scope ) ;
Buggy code:
public class Controller implements ActionListener { private Gui fenetre ; private Model model ; public void setGui ( Gui fenetre ) { } @ Override public void actionPerformed ( ActionEvent e ) { JButton buttonSource = ( ( JButton ) ( e . getSource ( ) ) ) ; switch ( buttonSource . getText ( ) ) { case "Show<seq2seq4repair_space>list" : fenetre . displayAutomataList ( ) ; break ; case "Export" : String dotFile = this . fenetre . getDotFilePath ( ) ; String uppaalFile = this . fenetre . getUppaalFilePath ( ) ; String automataName = this . fenetre . getAutomataName ( ) ; if ( ( ( NO_FILE_SELECTED . equals ( dotFile ) ) || ( NO_FILE_SELECTED . equals ( uppaalFile ) ) ) || ( "" . equals ( automataName ) ) ) { this . fenetre . afficherInfo ( "Dot<seq2seq4repair_space>file,<seq2seq4repair_space>uppaal<seq2seq4repair_space>project<seq2seq4repair_space>and<seq2seq4repair_space>automata<seq2seq4repair_space>name<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>completed" ) ; return ; } this . model = new Model ( dotFile , uppaalFile , automataName ) ; this . model . addObserver ( this . fenetre ) ; <START_BUG> this . model . run ( ) ; <END_BUG> break ; case "Browse.." : this . browseAction ( buttonSource ) ; break ; } } private void browseAction ( JButton button ) { } }

Fix:
this . model . runFromBeginning ( ) ;
Buggy code:
public class ZkCoordinatorTest { @ Mock private DynamicBrokersReader reader ; @ Mock private DynamicPartitionConnections dynamicPartitionConnections ; private KafkaTestBroker broker = new KafkaTestBroker ( ) ; private TestingServer server ; private Map stormConf = new HashMap ( ) ; private SpoutConfig spoutConfig ; private ZkState state ; private SimpleConsumer simpleConsumer ; @ Before public void setUp ( ) throws Exception { } private Map buildZookeeperConfig ( TestingServer server ) { } @ After public void shutdown ( ) throws Exception { simpleConsumer . close ( ) ; broker . shutdown ( ) ; <START_BUG> server . close ( ) ; <END_BUG> } @ Test public void testOnePartitionPerTask ( ) throws Exception { } @ Test public void testPartitionsChange ( ) throws Exception { } private void assertPartitionsAreDifferent ( List < PartitionManager > partitionManagersBefore , List < PartitionManager > partitionManagersAfter , int partitionsPerTask ) { } private List < List < PartitionManager > > getPartitionManagers ( List < ZkCoordinator > coordinatorList ) { } private void waitForRefresh ( ) throws InterruptedException { } private List < ZkCoordinator > buildCoordinators ( int totalTasks ) { } }

Fix:
server . stop ( ) ;
Buggy code:
public class Pdf417CustomUIDemo extends Activity { public static final String TAG = "MainActivity" ; public static final String LICENSE = "BTH7-L4JO-UI5T-JAFP-YSKX-BXZT-SDKE-LKIZ" ; private static final int MY_REQUEST_CODE = 1337 ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } public void onClick ( View v ) { } private boolean checkIfDataIsUrlAndCreateIntent ( String data ) { } @ Override protected void onActivityResult ( int requestCode , int resultCode , Intent data ) { if ( ( requestCode == ( Pdf417CustomUIDemo . MY_REQUEST_CODE ) ) && ( resultCode == ( Pdf417ScanActivity . RESULT_OK ) ) ) { Parcelable [ ] resultArray = data . getParcelableArrayExtra ( EXTRAS_RECOGNITION_RESULT_LIST ) ; StringBuilder sb = new StringBuilder ( ) ; for ( Parcelable p : resultArray ) { if ( p instanceof Pdf417ScanResult ) { Pdf417ScanResult result = ( ( Pdf417ScanResult ) ( p ) ) ; String barcodeData = result . getStringData ( ) ; boolean uncertainData = result . isUncertain ( ) ; BarcodeDetailedData rawData = result . getRawData ( ) ; byte [ ] rawDataBuffer = rawData . getAllData ( ) ; if ( checkIfDataIsUrlAndCreateIntent ( barcodeData ) ) { return ; } else { sb . append ( "PDF417<seq2seq4repair_space>scan<seq2seq4repair_space>data" ) ; if ( uncertainData ) { sb . append ( "This<seq2seq4repair_space>scan<seq2seq4repair_space>data<seq2seq4repair_space>is<seq2seq4repair_space>uncertain!\n\n" ) ; } sb . append ( "<seq2seq4repair_space>string<seq2seq4repair_space>data:\n" ) ; sb . append ( barcodeData ) ; if ( rawData != null ) { sb . append ( "\n\n" ) ; sb . append ( "PDF417<seq2seq4repair_space>raw<seq2seq4repair_space>data:\n" ) ; sb . append ( rawData . toString ( ) ) ; sb . append ( "\n" ) ; sb . append ( "PDF417<seq2seq4repair_space>raw<seq2seq4repair_space>data<seq2seq4repair_space>merged:\n" ) ; sb . append ( "{" ) ; for ( int i = 0 ; i < ( rawDataBuffer . length ) ; ++ i ) { sb . append ( ( ( ( int ) ( rawDataBuffer [ i ] ) ) & 255 ) ) ; if ( i != ( ( rawDataBuffer . length ) - 1 ) ) { sb . append ( ",<seq2seq4repair_space>" ) ; } } sb . append ( "}\n\n\n" ) ; } } } else <START_BUG> if ( p instanceof ZXingRecognizerSettings ) { <END_BUG> ZXingScanResult result = ( ( ZXingScanResult ) ( p ) ) ; BarcodeType type = result . getBarcodeType ( ) ; String barcodeData = result . getStringData ( ) ; if ( checkIfDataIsUrlAndCreateIntent ( barcodeData ) ) { return ; } else { sb . append ( type . name ( ) ) ; sb . append ( "<seq2seq4repair_space>string<seq2seq4repair_space>data:\n" ) ; sb . append ( barcodeData ) ; sb . append ( "\n\n\n" ) ; } } } Intent intent = new Intent ( Intent . ACTION_SEND ) ; intent . setType ( "text//plain" ) ; intent . putExtra ( EXTRA_TEXT , sb . toString ( ) ) ; startActivity ( Intent . createChooser ( intent , getString ( UseWith ) ) ) ; } } }

Fix:
if ( p instanceof ZXingScanResult ) {
Buggy code:
public class CascadeQuestionView extends QuestionView implements AdapterView . OnItemSelectedListener { private static final int POSITION_NONE = - 1 ; private static final long ID_NONE = - 1 ; private static final long ID_ROOT = 0 ; private String [ ] mLevels ; private LinearLayout mSpinnerContainer ; private boolean mFinished ; private CascadeDB mDatabase ; public CascadeQuestionView ( Context context , Question q , SurveyListener surveyListener ) { } private void init ( ) { } @ Override public void onResume ( ) { } @ Override public void onPause ( ) { } private void updateSpinners ( int updatedSpinnerIndex ) { } private void addLevelView ( int position , List < Node > values , int selection ) { if ( values . isEmpty ( ) ) { return ; } LayoutInflater inflater = LayoutInflater . from ( getContext ( ) ) ; View view = inflater . inflate ( cascading_level_item , mSpinnerContainer , false ) ; final TextView text = ( ( TextView ) ( view . findViewById ( text ) ) ) ; final Spinner spinner = ( ( Spinner ) ( view . findViewById ( spinner ) ) ) ; <START_BUG> text . setText ( ( ( ( mLevels ) != null ) && ( ( mLevels . length ) >= position ) ? mLevels [ position ] : "" ) ) ; <END_BUG> Node node = new Node ( CascadeQuestionView . ID_NONE , getContext ( ) . getString ( select ) ) ; values . add ( 0 , node ) ; SpinnerAdapter adapter = new CascadeQuestionView . CascadeAdapter ( getContext ( ) , values ) ; spinner . setAdapter ( adapter ) ; spinner . setTag ( position ) ; spinner . setEnabled ( ( ! ( isReadOnly ( ) ) ) ) ; if ( selection != ( CascadeQuestionView . POSITION_NONE ) ) { spinner . setSelection ( ( selection + 1 ) ) ; } spinner . post ( new Runnable ( ) { public void run ( ) { spinner . setOnItemSelectedListener ( CascadeQuestionView . this ) ; } } ) ; mSpinnerContainer . addView ( view ) ; } @ Override public void onItemSelected ( AdapterView < ? > parent , View view , int position , long id ) { } @ Override public void onNothingSelected ( AdapterView < ? > parent ) { } @ Override public void rehydrate ( QuestionResponse resp ) { } @ Override public void resetQuestion ( boolean fireEvent ) { } @ Override public void captureResponse ( boolean suppressListeners ) { } private Spinner getSpinner ( int position ) { } public boolean isValid ( ) { } class CascadeAdapter extends ArrayAdapter < Node > { CascadeAdapter ( Context context , List < Node > objects ) { } @ Override public View getView ( int position , View convertView , ViewGroup parent ) { } @ Override public View getDropDownView ( int position , View convertView , ViewGroup parent ) { } private void setStyle ( View view , int position ) { } } }

Fix:
text . setText ( ( ( ( mLevels ) != null ) && ( ( mLevels . length ) > position ) ? mLevels [ position ] : "" ) ) ;
Buggy code:
public class TestBuildModule { private static boolean REBUILD = false ; private static final String SYNTAX = "java<seq2seq4repair_space>{classname}<seq2seq4repair_space><[product|module]dir>" ; public static void main ( String [ ] args ) { } static void createModule ( String [ ] args ) { File moduleDir = new File ( args [ 0 ] ) ; File baseDir = moduleDir . getParentFile ( ) ; if ( null == baseDir ) { baseDir = new File ( "." ) ; } File jarDir = new File ( baseDir , "aj-build-jars" ) ; if ( ! ( ( Util . canReadDir ( jarDir ) ) || ( jarDir . mkdirs ( ) ) ) ) { <START_BUG> System . err . println ( ( "unable<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>" + jarDir ) ) ; <END_BUG> return ; } BuildSpec buildSpec = new BuildSpec ( ) ; buildSpec . moduleDir = moduleDir ; buildSpec . jarDir = jarDir ; buildSpec . verbose = true ; buildSpec . failonerror = true ; buildSpec . trimTesting = true ; buildSpec . rebuild = true ; File tempDir = null ; Project project = new Project ( ) ; project . setProperty ( "verbose" , "true" ) ; project . setName ( ( "TestBuildModule.createModule" + ( Arrays . asList ( args ) ) ) ) ; Builder builder = AntBuilder . getBuilder ( "" , project , tempDir ) ; builder . build ( buildSpec ) ; } static void createProduct ( String [ ] args ) { } }

Fix:
System . err . println ( ( "createModule<seq2seq4repair_space>unable<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>" + jarDir ) ) ;
Buggy code:
public class LoadShortestTraceHandler extends AbstractHandler implements IHandler { private List < String > states ; private final Animator animator ; public LoadShortestTraceHandler ( ) { } public Object execute ( final ExecutionEvent event ) throws ExecutionException { String stateId = animator . getCurrentState ( ) . getId ( ) ; try { SetStateCommand . setState ( animator , stateId ) ; } catch ( ProBException e ) { return null ; } loadTrace ( ) ; try { animator . getHistory ( ) . gotoPos ( 0 ) ; } catch ( ProBException e ) { return null ; } State state = animator . getCurrentState ( ) ; try { for ( String nextState : states ) { final Operation op = getOperationByDstId ( nextState , state . getEnabledOperations ( ) ) ; <START_BUG> state = ExploreStateCommand . exploreState ( animator , stateId ) ; <END_BUG> animator . getHistory ( ) . add ( state , op ) ; animator . announceCurrentStateChanged ( state , op ) ; } } catch ( ProBException e ) { e . notifyUserOnce ( ) ; } return null ; } private void loadTrace ( ) { } private Operation getOperationByDstId ( final String dstId , final List < Operation > operations ) { } }

Fix:
state = ExploreStateCommand . exploreState ( animator , nextState ) ;
Buggy code:
public interface OpenJPAEntityManagerFactory extends Serializable , EntityManagerFactory { <START_BUG> public Properties getProperties ( ) ; <END_BUG> public Object putUserObject ( Object key , Object val ) { } public Object getUserObject ( Object key ) { } public StoreCache getStoreCache ( ) { } public StoreCache getStoreCache ( String name ) { } public QueryResultCache getQueryResultCache ( ) { } public OpenJPAEntityManager createEntityManager ( ) { } public OpenJPAEntityManager createEntityManager ( Map props ) { } public static final int CONN_RETAIN_DEMAND = 0 ; public static final int CONN_RETAIN_TRANS = 1 ; public static final int CONN_RETAIN_ALWAYS = 2 ; public OpenJPAConfiguration getConfiguration ( ) { } public void addLifecycleListener ( Object listener , Class ... classes ) { } public void removeLifecycleListener ( Object listener ) { } public void addTransactionListener ( Object listener ) { } public void removeTransactionListener ( Object listener ) { } }

Fix:
public Map < String , Object > getProperties ( ) ;
Buggy code:
public class MaxIterationsExceededExceptionTest extends TestCase { public void testSimpleConstructor ( ) { } public void testComplexConstructor ( ) { <START_BUG> MaxIterationsExceededException ex = new MaxIterationsExceededException ( 1000000 , "Continued<seq2seq4repair_space>fraction<seq2seq4repair_space>convergents<seq2seq4repair_space>failed<seq2seq4repair_space>to<seq2seq4repair_space>converge<seq2seq4repair_space>for<seq2seq4repair_space>value<seq2seq4repair_space>{0}" , new Object [ ] { Double . valueOf ( 1234567 ) } ) ; <END_BUG> assertNull ( ex . getCause ( ) ) ; assertNotNull ( ex . getMessage ( ) ) ; assertTrue ( ( ( ex . getMessage ( ) . indexOf ( "1,000,000" ) ) < 0 ) ) ; assertTrue ( ( ( ex . getMessage ( ) . indexOf ( "1,234,567" ) ) > 0 ) ) ; assertEquals ( 1000000 , ex . getMaxIterations ( ) ) ; assertFalse ( ex . getMessage ( ) . equals ( ex . getMessage ( Locale . FRENCH ) ) ) ; } }

Fix:
MaxIterationsExceededException ex = new MaxIterationsExceededException ( 1000000 , "Continued<seq2seq4repair_space>fraction<seq2seq4repair_space>convergents<seq2seq4repair_space>failed<seq2seq4repair_space>to<seq2seq4repair_space>converge<seq2seq4repair_space>for<seq2seq4repair_space>value<seq2seq4repair_space>{0}" , 1234567 ) ;
Buggy code:
public class ComplexWordParagraphFragment extends SelectableFragment implements View . OnTouchListener { private List < Integer > wordIndexList ; @ Override protected void init ( ) { super . init ( ) ; this . wordIndexList = new ArrayList < > ( ) ; String text = "" ; <START_BUG> for ( String str : ( ( com . jfsiot . touchselect . touchselecttest . activity . MainActivity ) ( getActivity ( ) ) ) . getTextSourse ( 1 ) ) { <END_BUG> text += str ; wordIndexList . add ( text . length ( ) ) ; } free ( ) ; } @ Override public void onResume ( ) { } @ Override protected String [ ] getStringArrayResourse ( ) { } @ Override protected void touchInner ( boolean isLeft , int letterOffset ) { } @ Override protected void touchOuter ( boolean isLeft , int letterOffset ) { } }

Fix:
for ( String str : ( ( com . jfsiot . touchselect . touchselecttest . activity . MainActivity ) ( getActivity ( ) ) ) . getTextSourse ( 0 ) ) {
Buggy code:
public abstract class BaseAnalyzer implements Analyzer { private static final Logger LOGGER = LoggerFactory . getLogger ( BaseAnalyzer . class ) ; private static final long SPIDER_STATUS_POLLING_INTERVAL_IN_SECONDS = 1 ; private static final long AJAX_SPIDER_STATUS_POLLING_INTERVAL_IN_SECONDS = 10 ; private static final long ACTIVE_SCAN_STATUS_POLLING_INTERVAL_IN_SECONDS = 5 ; private String apiKey ; private ClientApi api ; private long analysisTimeoutInMillis ; private long analysisStartTime ; private boolean spiderDidRun = false ; public BaseAnalyzer ( String apiKey , ClientApi api ) { } protected void init ( long analysisTimeoutInMillis ) { } protected void runSpider ( AnalysisInfo analysisInfo ) { String targetUrl = analysisInfo . getTargetUrl ( ) ; BaseAnalyzer . LOGGER . info ( "{}<seq2seq4repair_space>:<seq2seq4repair_space>{}" , SPIDER , targetUrl ) ; try { <START_BUG> ApiResponse resp = api . spider . scan ( apiKey , targetUrl , "" , "" , "" ) ; <END_BUG> String scanId = ( ( br . com . softplan . security . zap . zaproxy . clientapi . core . ApiResponseElement ) ( resp ) ) . getValue ( ) ; waitForScanToFinish ( scanId , SPIDER ) ; spiderDidRun = true ; } catch ( ClientApiException e ) { handleError ( "Error<seq2seq4repair_space>running<seq2seq4repair_space>Spider." , e ) ; } } protected void runAjaxSpider ( AnalysisInfo analysisInfo ) { } @ SuppressWarnings ( "restriction" ) protected void runActiveScan ( AnalysisInfo analysisInfo ) { } protected ZapReport generateReport ( ) { } private List < String > getAndLogSpiderResults ( ) { } private void waitForScanToFinish ( String scanId , ScanType scanType ) { } private int waitSpider ( String scanId , int progress ) { } private int waitAjaxSpider ( String scanId , int progress ) { } private int waitActiveScan ( String scanId , int progress ) { } private void handleError ( String message , Throwable cause ) { } private boolean scanTimeoutReached ( String scanId ) { } private int getAjaxSpiderProgress ( ) throws ClientApiException { } private static void sleep ( long seconds ) { } }

Fix:
ApiResponse resp = api . spider . scan ( apiKey , targetUrl , "" , "" ) ;
Buggy code:
@ ComponentType ( name = "Unit<seq2seq4repair_space>Employees" , description = "Unit<seq2seq4repair_space>employees<seq2seq4repair_space>that<seq2seq4repair_space>are<seq2seq4repair_space>not<seq2seq4repair_space>teachers" ) public class UnitEmployees extends UnitSiteComponent { private Predicate < Employee > isTeacher = ( employee ) -> TEACHER . isMember ( employee . getPerson ( ) . getUser ( ) ) ; private static Predicate < Employee > hasWorkingPlace = ( employee ) -> ( employee . getCurrentWorkingPlace ( ) ) != null ; private static Supplier < TreeMap < Unit , TreeSet < Employee > > > mapFactory = ( ) -> Maps . newTreeMap ( COMPARATOR_BY_NAME_AND_ID ) ; private static Supplier < TreeSet < Employee > > sortedEmployeesFactory = ( ) -> Sets . newTreeSet ( ( e1 , e2 ) -> e1 . getPerson ( ) . compareTo ( e2 . getPerson ( ) ) ) ; @ Override public void handle ( Page page , TemplateContext componentContext , TemplateContext globalContext ) { } private SortedMap < Unit , TreeSet < Employee > > nonTeacherEmployeesByWorkingPlace ( Unit unit ) { } private Stream < Employee > activeNonTeacherEmployeesStream ( Unit unit ) { <START_BUG> return Employee . getAllCurrentActiveWorkingEmployees ( unit ) . stream ( ) . sorted ( ) . filter ( isTeacher . negate ( ) ) ; <END_BUG> } }

Fix:
return Employee . getAllCurrentActiveWorkingEmployees ( unit ) . stream ( ) . filter ( isTeacher . negate ( ) ) ;
Buggy code:
@ RunWith ( Arquillian . class ) public class PureTestCase extends ContainerResourceMgmtTestBase { @ Deployment public static ResourceAdapterArchive createDeployment ( ) throws Exception { } @ ArquillianResource ServiceContainer serviceContainer ; @ Test public void testRegistryConfiguration ( ) throws Throwable { ServiceController < ? > controller = serviceContainer . getService ( RA_REPOSITORY_SERVICE ) ; assertNotNull ( controller ) ; ResourceAdapterRepository repository = ( ( ResourceAdapterRepository ) ( controller . getValue ( ) ) ) ; assertNotNull ( repository ) ; Set < String > ids = repository . getResourceAdapters ( ) ; assertNotNull ( ids ) ; <START_BUG> assertEquals ( 1 , ids . size ( ) ) ; <END_BUG> for ( String piId : ids ) { assertNotNull ( piId ) ; System . out . println ( ( "PID:" + piId ) ) ; assertNotNull ( repository . getResourceAdapter ( piId ) ) ; } } @ Test public void testMetadataConfiguration ( ) throws Throwable { } }

Fix:
assertEquals ( 2 , ids . size ( ) ) ;
Buggy code:
public class AddressProvider implements IAddressProvider { private static AddressProvider addressProvider = new AddressProvider ( BitherApplication . mAddressDbHelper ) ; public static AddressProvider getInstance ( ) { } private SQLiteOpenHelper mDb ; private AddressProvider ( SQLiteOpenHelper db ) { } @ Override public List < Integer > getHDSeeds ( ) { } @ Override public String getEncryptSeed ( int hdSeedId ) { } @ Override public void setEncryptSeed ( int hdSeedId , String encryptedSeed ) { SQLiteDatabase db = this . mDb . getWritableDatabase ( ) ; ContentValues cv = new ContentValues ( ) ; cv . put ( ENCRYPT_SEED , encryptedSeed ) ; <START_BUG> db . update ( HDMAddresses , cv , "hd_seed_id=?" , new String [ ] { Integer . toString ( hdSeedId ) } ) ; <END_BUG> } @ Override public boolean isHDSeedFromXRandom ( int hdSeedId ) { } @ Override public String getHDMFristAddress ( int hdSeedId ) { } @ Override public int addHDKey ( String encryptSeed , String firstAddress , boolean isXrandom ) { } @ Override public HDMBId getHDMBId ( ) { } @ Override public void addHDMBId ( HDMBId hdmId ) { } @ Override public void changeHDMBIdPassword ( String encryptBitherPassword ) { } @ Override public List < HDMAddress > getHDMAddressInUse ( HDMKeychain keychain ) { } @ Override public void prepareHDMAddresses ( int hdSeedId , List < HDMAddress . Pubs > pubsList ) { } @ Override public List < HDMAddress . Pubs > getUncompletedHDMAddressPubs ( int hdSeedId , int count ) { } @ Override public int maxHDMAddressPubIndex ( int hdSeedId ) { } @ Override public int uncompletedHDMAddressCount ( int hdSeedId ) { } @ Override public void completeHDMAddresses ( int hdSeedId , List < HDMAddress > addresses ) { } private ContentValues applyHDMAddressContentValues ( int hdSeedId , int index , byte [ ] pubKeysHot , byte [ ] pubKeysCold ) { } @ Override public void syncComplete ( int hdSeedId , int hdSeedIndex ) { } @ Override public List < Address > getAddresses ( ) { } @ Override public void addAddress ( Address address ) { } @ Override public void removeWatchOnlyAddress ( Address address ) { } @ Override public void trashPrivKeyAddress ( Address address ) { } @ Override public void restorePrivKeyAddress ( Address address ) { } @ Override public void updateSyncComplete ( Address address ) { } @ Override public void updatePrivateKey ( Address address ) { } private ContentValues applyContentValues ( Address address ) { } private HDMAddress applyHDMAddress ( Cursor c , HDMKeychain keychain ) throws AddressFormatException { } private Pubs applyPubs ( Cursor c ) throws AddressFormatException { } private Address applyAddressCursor ( Cursor c ) throws AddressFormatException { } }

Fix:
db . update ( HDSeeds , cv , "hd_seed_id=?" , new String [ ] { Integer . toString ( hdSeedId ) } ) ;
Buggy code:
public class EclipseSourceType extends ResolvedTypeX . ConcreteName { protected ResolvedPointcutDefinition [ ] declaredPointcuts = null ; protected ResolvedMember [ ] declaredMethods = null ; protected ResolvedMember [ ] declaredFields = null ; public List declares = new ArrayList ( ) ; public List typeMungers = new ArrayList ( ) ; private EclipseFactory factory ; private SourceTypeBinding binding ; private TypeDeclaration declaration ; protected EclipseFactory eclipseWorld ( ) { } public EclipseSourceType ( ResolvedTypeX . Name resolvedTypeX , EclipseFactory factory , SourceTypeBinding binding , TypeDeclaration declaration ) { } public boolean isAspect ( ) { } public WeaverStateInfo getWeaverState ( ) { } public ResolvedTypeX getSuperclass ( ) { if ( binding . isInterface ( ) ) <START_BUG> return getResolvedTypeX ( ) . getWorld ( ) . resolve ( OBJECT ) ; <END_BUG> return eclipseWorld ( ) . fromEclipse ( binding . superclass ( ) ) ; } public ResolvedTypeX [ ] getDeclaredInterfaces ( ) { } protected void fillDeclaredMembers ( ) { } public ResolvedMember [ ] getDeclaredFields ( ) { } public ResolvedMember [ ] getDeclaredMethods ( ) { } public ResolvedMember [ ] getDeclaredPointcuts ( ) { } public int getModifiers ( ) { } public String toString ( ) { } public void checkPointcutDeclarations ( ) { } public boolean isInterface ( ) { } public PerClause getPerClause ( ) { } protected Collection getDeclares ( ) { } protected Collection getPrivilegedAccesses ( ) { } protected Collection getTypeMungers ( ) { } public boolean doesNotExposeShadowMungers ( ) { } }

Fix:
return getResolvedTypeX ( ) . getWorld ( ) . getCoreType ( OBJECT ) ;
Buggy code:
public class WelcomeScreen extends ActionBarActivity { private static final String TAG = null ; public static boolean long_or_short ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( welcome_screen ) ; final ImageView image = ( ( ImageView ) ( findViewById ( imageView ) ) ) ; final Animation animationFadeIn = AnimationUtils . loadAnimation ( this , fadein ) ; final Animation animationFadeOut = AnimationUtils . loadAnimation ( this , fadeout ) ; Animation . AnimationListener animListener = new Animation . AnimationListener ( ) { @ Override public void onAnimationStart ( Animation animation ) { } @ Override public void onAnimationRepeat ( Animation animation ) { } @ Override public void onAnimationEnd ( Animation animation ) { image . setImageResource ( eddi ) ; image . startAnimation ( animationFadeIn ) ; } } ; image . startAnimation ( animationFadeOut ) ; animationFadeIn . setAnimationListener ( animListener ) ; animationFadeOut . setAnimationListener ( animListener ) ; final Button switchact = ( ( Button ) ( findViewById ( startbutton ) ) ) ; final Button database = ( ( Button ) ( findViewById ( database_button ) ) ) ; final CheckBox want_user = ( ( CheckBox ) ( findViewById ( newUserCheckBox ) ) ) ; final CheckBox test_time = ( ( CheckBox ) ( findViewById ( longorshort ) ) ) ; switchact . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { if ( want_user . isChecked ( ) ) { WelcomeScreen . long_or_short = test_time . isChecked ( ) ; Intent act2 = new Intent ( view . getContext ( ) , CustomerName . class ) ; startActivity ( act2 ) ; } else { WelcomeScreen . long_or_short = test_time . isChecked ( ) ; <START_BUG> Intent act2 = new Intent ( view . getContext ( ) , Calibration . class ) ; <END_BUG> startActivity ( act2 ) ; } } } ) ; database . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { Intent act2 = new Intent ( view . getContext ( ) , Password_screen . class ) ; startActivity ( act2 ) ; } } ) ; } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } public static void doRestart ( Context c ) { } }

Fix:
Intent act2 = new Intent ( view . getContext ( ) , Calculation . class ) ;
Buggy code:
public final class TargetPointcutSelectionTests { public TargetPointcutSelectionTests . TestInterface testImpl1 ; public TargetPointcutSelectionTests . TestInterface testImpl2 ; public TargetPointcutSelectionTests . TestAspect testAspectForTestImpl1 ; public TargetPointcutSelectionTests . TestAspect testAspectForAbstractTestImpl ; public TargetPointcutSelectionTests . TestInterceptor testInterceptor ; @ Before public void setUp ( ) { <START_BUG> ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext ( "targetPointcutSelectionTests.xml" , getClass ( ) ) ; <END_BUG> testImpl1 = ( ( TargetPointcutSelectionTests . TestInterface ) ( ctx . getBean ( "testImpl1" ) ) ) ; testImpl2 = ( ( TargetPointcutSelectionTests . TestInterface ) ( ctx . getBean ( "testImpl2" ) ) ) ; testAspectForTestImpl1 = ( ( TargetPointcutSelectionTests . TestAspect ) ( ctx . getBean ( "testAspectForTestImpl1" ) ) ) ; testAspectForAbstractTestImpl = ( ( TargetPointcutSelectionTests . TestAspect ) ( ctx . getBean ( "testAspectForAbstractTestImpl" ) ) ) ; testInterceptor = ( ( TargetPointcutSelectionTests . TestInterceptor ) ( ctx . getBean ( "testInterceptor" ) ) ) ; testAspectForTestImpl1 . count = 0 ; testAspectForAbstractTestImpl . count = 0 ; testInterceptor . count = 0 ; } @ Test public void testTargetSelectionForMatchedType ( ) { } @ Test public void testTargetNonSelectionForMismatchedType ( ) { } public static interface TestInterface { public void interfaceMethod ( ) { } } public abstract static class AbstractTestImpl implements TargetPointcutSelectionTests . TestInterface { public void interfaceMethod ( ) { } } public static class TestImpl1 extends TargetPointcutSelectionTests . AbstractTestImpl { } public static class TestImpl2 extends TargetPointcutSelectionTests . AbstractTestImpl { } public static class TestAspect { public int count ; public void increment ( ) { } } public static class TestInterceptor extends TargetPointcutSelectionTests . TestAspect implements MethodInterceptor { public Object invoke ( MethodInvocation mi ) throws Throwable { } } }

Fix:
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext ( "targetPointcutSelectionTests_.xml" , getClass ( ) ) ;
Buggy code:
public class ImportExportLobTest extends ImportExportBaseTest { String fileName ; String lobsFileName ; String lobsFileName2 ; public ImportExportLobTest ( String name ) throws SQLException { } public static Test suite ( ) { } protected void setUp ( ) throws SQLException { } public void testImportTableExportTable ( ) throws IOException , SQLException { } public void testImportDataExportQuery ( ) throws IOException , SQLException { } public void testImportDataExportQueryWithFewColumns ( ) throws IOException , SQLException { } public void testImportWithInvalidHexStrings ( ) throws SQLException { } public void testImportTableExportTableLobsInExtFile ( ) throws IOException , SQLException { } public void testImportTableExportTableLobsInUnqalifiedExtFile ( ) throws IOException , SQLException { } public void testImportDataExportQueryLobsInExtFile ( ) throws IOException , SQLException { doExportQueryLobsToExtFile ( "select<seq2seq4repair_space>*<seq2seq4repair_space>from<seq2seq4repair_space>BOOKS" , fileName , null , null , "8859_1" , lobsFileName ) ; doImportDataLobsFromExtFile ( null , "BOOKS_IMP" , null , null , fileName , null , null , "8859_1" , 0 ) ; verifyData ( "<seq2seq4repair_space>*<seq2seq4repair_space>" ) ; <START_BUG> doImportDataLobsFromExtFile ( null , "BOOKS_IMP" , "PIC,<seq2seq4repair_space>CONTENT,<seq2seq4repair_space>NAME,<seq2seq4repair_space>ID" , "4,<seq2seq4repair_space>3,<seq2seq4repair_space>2,<seq2seq4repair_space>1" , fileName , null , null , null , 1 ) ; <END_BUG> verifyData ( "PIC,<seq2seq4repair_space>CONTENT,<seq2seq4repair_space>NAME,<seq2seq4repair_space>ID" ) ; SupportFilesSetup . deleteFile ( fileName ) ; SupportFilesSetup . deleteFile ( lobsFileName ) ; doExportQueryLobsToExtFile ( "select<seq2seq4repair_space>*<seq2seq4repair_space>from<seq2seq4repair_space>BOOKS_IMP" , fileName , ";" , "%" , null , lobsFileName ) ; doImportDataLobsFromExtFile ( null , "BOOKS_IMP" , null , null , fileName , ";" , "%" , null , 1 ) ; } public void testImportDataExportQueryWithFewColsLobsInExtFile ( ) throws IOException , SQLException { } public void testImportExportInvalideDelimiters ( ) throws IOException , SQLException { } public void testImportTableExportWithInvalidLobFileName ( ) throws IOException , SQLException { } public void testDerby2955ExportQueryLobs ( ) throws SQLException { } private void verifyData ( String cols ) throws IOException , SQLException { } private static void loadData ( Statement s ) throws SQLException { } }

Fix:
doImportDataLobsFromExtFile ( null , "BOOKS_IMP" , "PIC,<seq2seq4repair_space>CONTENT,<seq2seq4repair_space>NAME,<seq2seq4repair_space>ID" , "4,<seq2seq4repair_space>3,<seq2seq4repair_space>2,<seq2seq4repair_space>1" , fileName , null , null , "8859_1" , 1 ) ;
Buggy code:
@ WebServlet ( "//Register" ) public class Register extends HttpServlet { private static final long serialVersionUID = 1L ; public Register ( ) { } protected void doGet ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } protected void doPost ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { String username = request . getParameter ( "username" ) ; String password1 = request . getParameter ( "password1" ) ; String password2 = request . getParameter ( "password2" ) ; String mail = request . getParameter ( "mail" ) ; System . out . println ( "register" ) ; if ( ( ( isStringEmpty ( username ) ) || ( isStringEmpty ( password1 ) ) ) || ( isStringEmpty ( password2 ) ) ) { request . setAttribute ( "errorMessage" , "Please<seq2seq4repair_space>fill<seq2seq4repair_space>out<seq2seq4repair_space>ALL<seq2seq4repair_space>fields!" ) ; request . getRequestDispatcher ( "register.jsp" ) . include ( request , response ) ; return ; } if ( ( password1 . compareTo ( password2 ) ) != 0 ) { request . setAttribute ( "errorMessage" , "Your<seq2seq4repair_space>passwords<seq2seq4repair_space>do<seq2seq4repair_space>not<seq2seq4repair_space>match!" ) ; request . getRequestDispatcher ( "register.jsp" ) . include ( request , response ) ; return ; } User user = new CreatorUser ( username , password1 , mail ) ; HibernateSupport . beginTransaction ( ) ; user . saveToDB ( ) ; HibernateSupport . commitTransaction ( ) ; System . out . println ( "Send<seq2seq4repair_space>redirect<seq2seq4repair_space>from<seq2seq4repair_space>REGSITER<seq2seq4repair_space>to<seq2seq4repair_space>HOME" ) ; <START_BUG> response . sendRedirect ( ( "Home?id=" + ( user . getUserID ( ) ) ) ) ; <END_BUG> return ; } public boolean isStringEmpty ( String str ) { } }

Fix:
response . sendRedirect ( ( "GameList?id=" + ( user . getUserID ( ) ) ) ) ;
Buggy code:
public class view_page extends AppCompatActivity { @ Override protected void onCreate ( Bundle savedInstanceState ) { } public boolean onOptionsItemSelected ( MenuItem item ) { <START_BUG> Intent myIntent = new Intent ( getApplicationContext ( ) , login_screen . class ) ; <END_BUG> startActivityForResult ( myIntent , 0 ) ; return true ; } }

Fix:
Intent myIntent = new Intent ( getApplicationContext ( ) , view_locations . class ) ;
Buggy code:
public class IssueTypePeer extends org . tigris . scarab . om . BaseIssueTypePeer { public static List getAllIssueTypes ( ) throws Exception { Criteria c = new Criteria ( ) ; <START_BUG> c . add ( TEMPLATE , 0 ) ; <END_BUG> return doSelect ( c ) ; } }

Fix:
c . add ( PARENT_ID , 0 ) ;
Buggy code:
public class DefaultEmbeddedCacheManager implements EmbeddedCacheManager { @ SuppressWarnings ( "unchecked" ) private static final ContextClassLoaderSwitcher switcher = ( ( ContextClassLoaderSwitcher ) ( AccessController . doPrivileged ( INSTANTIATOR ) ) ) ; private final String defaultCache ; private final EmbeddedCacheManager container ; public DefaultEmbeddedCacheManager ( EmbeddedCacheManager container , String defaultCache ) { } @ Override public < K , V > Cache < K , V > getCache ( ) { } @ Override public < K , V > Cache < K , V > getCache ( String cacheName ) { } @ Override public < K , V > Cache < K , V > getCache ( String cacheName , boolean start ) { } @ Override public void start ( ) { } @ Override public void stop ( ) { } @ Override public void addListener ( Object listener ) { } @ Override public void removeListener ( Object listener ) { } @ Override public Set < Object > getListeners ( ) { } @ Override public Configuration defineConfiguration ( String cacheName , Configuration configurationOverride ) { <START_BUG> return this . defineConfiguration ( cacheName , this . defaultCache , configurationOverride ) ; <END_BUG> } @ Override public Configuration defineConfiguration ( String cacheName , String templateCacheName , Configuration configurationOverride ) { } @ Override public String getClusterName ( ) { } @ Override public List < Address > getMembers ( ) { } @ Override public Address getAddress ( ) { } @ Override public Address getCoordinator ( ) { } @ Override public boolean isCoordinator ( ) { } @ Override public ComponentStatus getStatus ( ) { } @ Override public GlobalConfiguration getGlobalConfiguration ( ) { } @ Override public Configuration getDefaultConfiguration ( ) { } @ Override public Set < String > getCacheNames ( ) { } @ Override public boolean isRunning ( String cacheName ) { } @ Override public boolean isDefaultRunning ( ) { } @ Override public boolean cacheExists ( String cacheName ) { } @ Override public void removeCache ( String cacheName ) { } private String getCacheName ( String name ) { } @ Override public int hashCode ( ) { } @ Override public String toString ( ) { } class DelegatingCache < K , V > extends AbstractDelegatingAdvancedCache < K , V > { private final AdvancedCache < K , V > cache ; DelegatingCache ( AdvancedCache < K , V > cache ) { } DelegatingCache ( Cache < K , V > cache ) { } @ Override public EmbeddedCacheManager getCacheManager ( ) { } @ Override public AdvancedCache < K , V > getAdvancedCache ( ) { } @ Override public AdvancedCache < K , V > with ( ClassLoader classLoader ) { } @ Override public boolean equals ( Object object ) { } @ Override public int hashCode ( ) { } } }

Fix:
return this . container . defineConfiguration ( this . getCacheName ( cacheName ) , configurationOverride ) ;