nus-yam/ex-repair huggingface dataset:
Buggy code:
@ RunWith ( Arquillian . class ) public class BundleReplaceTestCase { static final String BUNDLE_V100_WAB = "webapp-v100.wab" ; static final String BUNDLE_V101_WAB = "webapp-v101.wab" ; static final String WEBAPP_V200_WAR = "webapp-v200.war" ; static final String V100_JAR = "v100.jar" ; static final String V200_JAR = "v200.jar" ; static final String V201_JAR = "v201.jar" ; @ ArquillianResource Deployer deployer ; @ ArquillianResource ManagementClient managementClient ; @ ArquillianResource BundleContext context ; @ Deployment public static Archive < ? > getDeployment ( ) { } @ Test public void testRepeatedDeploy ( ) throws Exception { } @ Test public void testRepeatedInstall ( ) throws Exception { } @ Test public void testInstallRuntimeNameExists ( ) throws Exception { ServerDeploymentHelper server = new ServerDeploymentHelper ( managementClient . getControllerClient ( ) ) ; String runtimeName = server . deploy ( BundleReplaceTestCase . V200_JAR , deployer . getDeployment ( BundleReplaceTestCase . V200_JAR ) ) ; try { try { <START_BUG> context . installBundle ( BundleReplaceTestCase . V200_JAR , deployer . getDeployment ( BundleReplaceTestCase . V100_JAR ) ) ; <END_BUG> Assert . fail ( "BundleException<seq2seq4repair_space>expected" ) ; } catch ( BundleException ex ) { } } finally { server . undeploy ( runtimeName ) ; } } @ Test public void testDirectBundleReplace ( ) throws Exception { } @ Test @ Ignore ( "[AS7-6957]<seq2seq4repair_space>Cannot<seq2seq4repair_space>replace<seq2seq4repair_space>jar<seq2seq4repair_space>that<seq2seq4repair_space>bundle<seq2seq4repair_space>depends<seq2seq4repair_space>on" ) public void testDependentJarReplace ( ) throws Exception { } private String performCall ( String context , String pattern , String param ) throws Exception { } @ Deployment ( name = BundleReplaceTestCase . BUNDLE_V100_WAB , managed = false , testable = false ) public static Archive < ? > getWebApp100 ( ) { } @ Deployment ( name = BundleReplaceTestCase . BUNDLE_V101_WAB , managed = false , testable = false ) public static JavaArchive getWebApp101 ( ) { } @ Deployment ( name = BundleReplaceTestCase . WEBAPP_V200_WAR , managed = false , testable = false ) public static Archive < ? > getWebV200War ( ) { } @ Deployment ( name = BundleReplaceTestCase . V100_JAR , managed = false , testable = false ) public static JavaArchive getV100Jar ( ) { } @ Deployment ( name = BundleReplaceTestCase . V200_JAR , managed = false , testable = false ) public static JavaArchive getV200Jar ( ) { } @ Deployment ( name = BundleReplaceTestCase . V201_JAR , managed = false , testable = false ) public static JavaArchive getV201Jar ( ) { } }

Fix:
context . installBundle ( BundleReplaceTestCase . V200_JAR , deployer . getDeployment ( BundleReplaceTestCase . V201_JAR ) ) ;
Buggy code:
public class ProductFactory implements iProductFactory { public iProduct getProduct ( String instanceName ) { switch ( instanceName ) { case "Apple" : return new Product ( "Apple" , 1.0 ) ; case "Milk" : return new Product ( "Milk" , 0.65 ) ; case "Bread" : <START_BUG> return new Product ( "Apple" , 0.8 ) ; <END_BUG> case "Soup" : return new Product ( "Soup" , 1.0 ) ; default : break ; } return null ; } }

Fix:
return new Product ( "Bread" , 0.8 ) ;
Buggy code:
public class EditorArea extends PartSashContainer { private static final String DEFAULT_WORKBOOK_ID = "DefaultEditorWorkbook" ; private IPartDropListener partDropListener ; private ArrayList editorWorkbooks = new ArrayList ( 3 ) ; private EditorWorkbook activeEditorWorkbook ; private DropTarget dropTarget ; private WorkbenchPage page ; public EditorArea ( String editorId , IPartDropListener listener , WorkbenchPage page ) { } public void addEditor ( EditorPane pane ) { } protected void childAdded ( LayoutPart child ) { } protected void childRemoved ( LayoutPart child ) { } protected EditorWorkbook createDefaultWorkbook ( ) { } protected Composite createParent ( Composite parentWidget ) { } public void dispose ( ) { } protected void disposeParent ( ) { } public EditorWorkbook getActiveWorkbook ( ) { } public String getActiveWorkbookID ( ) { } public ArrayList getEditorWorkbooks ( ) { } public int getEditorWorkbookCount ( ) { } public IPartDropListener getPartDropListener ( ) { } protected boolean isActiveWorkbook ( EditorWorkbook workbook ) { } public void findSashes ( LayoutPart pane , PartPane . Sashes sashes ) { } public void removeAllEditors ( ) { } public void removeEditor ( EditorPane pane ) { } public IStatus restoreState ( IMemento memento ) { } public IStatus saveState ( IMemento memento ) { } public void setActiveWorkbook ( EditorWorkbook newWorkbook , boolean hasFocus ) { } public void setActiveWorkbookFromID ( String id ) { } public void updateTabList ( ) { } public void createControl ( Composite parent ) { } private void addDropSupport ( ) { if ( ( dropTarget ) == null ) { <START_BUG> WorkbenchWindowConfigurer winConfigurer = page . getUnprotectedWindow ( ) . getWindowConfigurer ( ) ; <END_BUG> dropTarget = new DropTarget ( getControl ( ) , ( ( DND . DROP_DEFAULT ) | ( DND . DROP_COPY ) ) ) ; dropTarget . setTransfer ( winConfigurer . getTransfers ( ) ) ; if ( ( winConfigurer . getDropTargetListener ( ) ) != null ) { dropTarget . addDropListener ( winConfigurer . getDropTargetListener ( ) ) ; } } } DropTarget getDropTarget ( ) { } public int getType ( ) { } public boolean allowsAutoFocus ( ) { } }

Fix:
WorkbenchWindowConfigurer winConfigurer = ( ( WorkbenchWindow ) ( page . getWorkbenchWindow ( ) ) ) . getWindowConfigurer ( ) ;
Buggy code:
public class BaseActivity extends ActionBarActivity { @ Override public void onCreate ( Bundle savedInstanceState , PersistableBundle persistentState ) { super . onCreate ( savedInstanceState , persistentState ) ; <START_BUG> CalligraphyConfig . initDefault ( new CalligraphyConfig . Builder ( ) . setDefaultFontPath ( "fonts//Roboto-Roboto.ttf" ) . setFontAttrId ( fontPath ) . build ( ) ) ; <END_BUG> } @ Override protected void attachBaseContext ( Context newBase ) { } }

Fix:
CalligraphyConfig . initDefault ( new CalligraphyConfig . Builder ( ) . setDefaultFontPath ( "fonts//Roboto-Regular.ttf" ) . setFontAttrId ( fontPath ) . build ( ) ) ;
Buggy code:
abstract class OpenGLTab { private GLCanvas glCanvas ; private Composite tabFolderPage ; private boolean stencilSupport ; private static final int DEFAULT_SLEEP_LENGTH = 100 ; abstract void createControls ( Composite composite ) { } Composite createTabFolderPage ( TabFolder tabFolder ) { tabFolderPage = new Composite ( tabFolder , SWT . NONE ) ; tabFolderPage . setLayout ( new GridLayout ( 2 , false ) ) ; GridData gridData = new GridData ( ) ; gridData . heightHint = 400 ; gridData . widthHint = 400 ; gridData . verticalAlignment = GridData . BEGINNING ; GLData data = new GLData ( ) ; data . doubleBuffer = true ; data . stencilSize = 8 ; <START_BUG> glCanvas = new GLCanvas ( tabFolderPage , SWT . NONE , data ) ; <END_BUG> glCanvas . setLayout ( new GridLayout ( ) ) ; glCanvas . setLayoutData ( gridData ) ; glCanvas . setSize ( 400 , 400 ) ; gridData = new GridData ( ) ; gridData . verticalAlignment = GridData . BEGINNING ; Composite controlComposite = new Composite ( tabFolderPage , SWT . NONE ) ; controlComposite . setLayout ( new GridLayout ( ) ) ; controlComposite . setLayoutData ( gridData ) ; setCurrent ( ) ; setupViewingArea ( ) ; int [ ] param = new int [ 1 ] ; GL . glGetIntegerv ( GL_STENCIL_BITS , param ) ; stencilSupport = ( param [ 0 ] ) != 0 ; init ( ) ; if ( ( ! ( isStencilSupportNeeded ( ) ) ) || ( hasStencilSupport ( ) ) ) { createControls ( controlComposite ) ; } else { Label label = new Label ( controlComposite , SWT . NONE ) ; label . setText ( "This<seq2seq4repair_space>tab<seq2seq4repair_space>requires<seq2seq4repair_space>native<seq2seq4repair_space>stencil<seq2seq4repair_space>support." ) ; } return tabFolderPage ; } void dispose ( ) { } GLCanvas getGlCanvas ( ) { } int getSleepLength ( ) { } abstract String getTabText ( ) { } boolean hasStencilSupport ( ) { } abstract void init ( ) { } static void loadTexture ( GLCanvas context , String fileName , int index , int [ ] texture ) { } void render ( ) { } abstract void renderScene ( ) { } boolean isStencilSupportNeeded ( ) { } void setCurrent ( ) { } void setupViewingArea ( ) { } void swap ( ) { } }

Fix:
glCanvas = new GLCanvas ( tabFolderPage , SWT . NO_BACKGROUND , data ) ;
Buggy code:
public class PublisherSampler extends BaseJMSSampler implements TestListener { public static final String INPUT_FILE = "jms.input_file" ; public static final String RANDOM_PATH = "jms.random_path" ; public static final String TEXT_MSG = "jms.text_message" ; public static final String CONFIG_CHOICE = "jms.config_choice" ; public static final String MESSAGE_CHOICE = "jms.config_msg_type" ; private Publisher PUB = null ; private StringBuffer BUFFER = new StringBuffer ( ) ; private static FileServer FSERVER = FileServer . getFileServer ( ) ; private String file_contents = null ; static Logger log = LoggingManager . getLoggerForClass ( ) ; public PublisherSampler ( ) { } public void testStarted ( String test ) { } public void testEnded ( String test ) { } public void testEnded ( ) { } public void testStarted ( ) { } public void testIterationStart ( LoopIterationEvent event ) { } public synchronized void initClient ( ) { } public SampleResult sample ( Entry e ) { } public SampleResult sample ( ) { SampleResult result = new SampleResult ( ) ; <START_BUG> result . setSampleLabel ( ( "PublisherSampler:" + ( this . getTopic ( ) ) ) ) ; <END_BUG> if ( ( this . PUB ) == null ) { this . initClient ( ) ; } int loop = this . getIterationCount ( ) ; if ( ( this . PUB ) != null ) { result . sampleStart ( ) ; for ( int idx = 0 ; idx < loop ; idx ++ ) { String tmsg = this . getMessageContent ( ) ; this . PUB . publish ( tmsg ) ; this . BUFFER . append ( tmsg ) ; } result . sampleEnd ( ) ; String content = this . BUFFER . toString ( ) ; result . setBytes ( content . getBytes ( ) . length ) ; result . setResponseCode ( "message<seq2seq4repair_space>published<seq2seq4repair_space>successfully" ) ; result . setResponseMessage ( ( loop + "<seq2seq4repair_space>messages<seq2seq4repair_space>published" ) ) ; result . setSuccessful ( true ) ; result . setResponseData ( content . getBytes ( ) ) ; result . setSampleCount ( loop ) ; this . BUFFER . setLength ( 0 ) ; } return result ; } public String getMessageContent ( ) { } public String getFileContent ( String path ) { } public void setConfigChoice ( String choice ) { } public String getConfigChoice ( ) { } public void setMessageChoice ( String choice ) { } public String getMessageChoice ( ) { } public void setInputFile ( String file ) { } public String getInputFile ( ) { } public void setRandomPath ( String path ) { } public String getRandomPath ( ) { } public void setTextMessage ( String message ) { } public String getTextMessage ( ) { } }

Fix:
result . setSampleLabel ( getName ( ) ) ;
Buggy code:
public class WebExternalResourceRequestTarget implements IRequestTarget { private static final Log log = LogFactory . getLog ( WebExternalResourceRequestTarget . class ) ; private final String url ; public WebExternalResourceRequestTarget ( String url ) { } public void respond ( RequestCycle requestCycle ) { try { WebResponse webResponse = ( ( wicket . protocol . http . WebRequestCycle ) ( requestCycle ) ) . getWebResponse ( ) ; <START_BUG> final ServletContext context = ( ( wicket . protocol . http . WebApplication ) ( requestCycle . getApplication ( ) ) ) . getWicketServlet ( ) . getServletContext ( ) ; <END_BUG> final InputStream in = context . getResourceAsStream ( url ) ; if ( in != null ) { String contentType = context . getMimeType ( url ) ; if ( contentType != null ) { webResponse . setContentType ( contentType ) ; } try { Streams . copy ( in , webResponse . getHttpServletResponse ( ) . getOutputStream ( ) ) ; } finally { in . close ( ) ; } } else { WebExternalResourceRequestTarget . log . warn ( ( ( "the<seq2seq4repair_space>resource<seq2seq4repair_space>requested<seq2seq4repair_space>by<seq2seq4repair_space>request<seq2seq4repair_space>" + ( requestCycle . getRequest ( ) ) ) + "<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>found" ) ) ; HttpServletResponse httpServletResponse = webResponse . getHttpServletResponse ( ) ; httpServletResponse . sendError ( SC_NOT_FOUND ) ; } } catch ( IOException e ) { throw new wicket . WicketRuntimeException ( ( "Cannot<seq2seq4repair_space>load<seq2seq4repair_space>static<seq2seq4repair_space>content<seq2seq4repair_space>for<seq2seq4repair_space>request<seq2seq4repair_space>" + ( requestCycle . getRequest ( ) ) ) , e ) ; } } public final String getUrl ( ) { } public void detach ( RequestCycle requestCycle ) { } public Object getLock ( RequestCycle requestCycle ) { } public boolean equals ( Object obj ) { } public int hashCode ( ) { } public String toString ( ) { } }

Fix:
final ServletContext context = ( ( wicket . protocol . http . WebApplication ) ( requestCycle . getApplication ( ) ) ) . getServletContext ( ) ;
Buggy code:
public class DescrizioniBodyFragment extends Fragment { private int mPos = - 1 ; private boolean mIsVis = false ; private DescrizioniBodyFragment . ViewHolder viewHolder ; private ImageView mImage ; private LinearLayout mBody ; private static final String [ ] TYPE = new String [ ] { "Guasto" , "Manutenzione" } ; private String mItem = "" ; private boolean mIsG ; private Guasto mG ; private Manutenzione mM ; @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public void onActivityCreated ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { View view = inflater . inflate ( descrizioni_body_fragment , container , false ) ; Bundle args = this . getArguments ( ) ; if ( args != null ) { mPos = args . getInt ( POS ) ; mIsVis = args . getBoolean ( ISVIS ) ; mItem = guastiManutenzioni . get ( mPos ) ; } viewHolder = new DescrizioniBodyFragment . ViewHolder ( ) ; if ( mIsVis ) { mImage = ( ( ImageView ) ( view . findViewById ( image_lavorazioni ) ) ) ; <START_BUG> mBody = ( ( LinearLayout ) ( act . findViewById ( ll_lavorazioni ) ) ) ; <END_BUG> mImage . setVisibility ( GONE ) ; mBody . setVisibility ( VISIBLE ) ; } viewHolder . id = ( ( TextView ) ( view . findViewById ( descrizioni_id_data ) ) ) ; viewHolder . tipo = ( ( TextView ) ( view . findViewById ( descrizioni_tipo_data ) ) ) ; viewHolder . descrizione = ( ( TextView ) ( view . findViewById ( descrizioni_des_data ) ) ) ; if ( mIsVis ) { String desc = mItem . substring ( ( ( mItem . length ( ) ) - 1 ) ) ; int id = Integer . parseInt ( mItem . substring ( 0 , ( ( mItem . length ( ) ) - 1 ) ) ) ; mIsG = desc . equals ( GUASTO ) ; if ( mIsG ) { for ( int i = 0 ; i < ( guasti . size ( ) ) ; i ++ ) { mG = guasti . get ( i ) ; if ( ( mG . getId ( ) ) == id ) { break ; } } } else { for ( int i = 0 ; i < ( manutenzioni . size ( ) ) ; i ++ ) { mM = manutenzioni . get ( i ) ; if ( ( mM . getId ( ) ) == id ) { break ; } } } if ( mIsG ) { viewHolder . id . setText ( mG . getId ( ) ) ; viewHolder . tipo . setText ( DescrizioniBodyFragment . TYPE [ 0 ] ) ; viewHolder . descrizione . setText ( mG . getDescrizione ( ) ) ; } else { viewHolder . id . setText ( mM . getId ( ) ) ; viewHolder . tipo . setText ( DescrizioniBodyFragment . TYPE [ 1 ] ) ; viewHolder . descrizione . setText ( mM . getDescrizione ( ) ) ; } } return view ; } private class ViewHolder { public TextView id ; public TextView tipo ; public TextView descrizione ; } }

Fix:
mBody = ( ( LinearLayout ) ( view . findViewById ( ll_lavorazioni ) ) ) ;
Buggy code:
public class MagesSiteGenerator { public static final String DEFAULT_PLUGIN_DIR = "plugin" ; public static final String DEFAULT_TEMPLATE = "template.html" ; public static final Pattern FILE_NAME_PATTERN = Pattern . compile ( "(.*)(\\..*)?" ) ; public static final String SOURCE_FILE_SUFFIX = ".gmd" ; File sourceDir ; File targetDir ; File pluginDir ; File template ; File resource ; boolean force = false ; List < Plugin > plugins = new ArrayList < > ( ) ; Queue < MagesSiteGenerator . Task > tasks = new LinkedList < > ( ) ; Set < File > sourceSet = new HashSet < > ( ) ; class Task { File source ; File target ; public Task ( File source , File target ) { } } public MagesSiteGenerator ( File sourceDir , File targetDir ) { } public File getSourceDir ( ) { } public File getTargetDir ( ) { } public File getPluginDir ( ) { } public void setPluginDir ( File pluginDir ) { } public boolean isForce ( ) { } public void setForce ( boolean force ) { } public File getTemplate ( ) { } public void setTemplate ( File template ) { } public File getResource ( ) { } public void setResource ( File resource ) { } public void addTask ( String path ) { } public void start ( ) { try { for ( Plugin p : Util . loadPluginsFromDirectory ( pluginDir ) ) { plugins . add ( p ) ; } MagesBuilder builder = new MagesBuilder ( ) ; for ( Plugin p : plugins ) { p . onStart ( this ) ; builder . addPlugin ( p ) ; } if ( ( template ) == null ) { template = new File ( MagesSiteGenerator . DEFAULT_TEMPLATE ) ; } if ( template . exists ( ) ) { builder . addPostFilter ( new TemplateFilter ( FileUtils . readFileToString ( template , "UTF-8" ) ) ) ; } else { builder . addPostFilter ( new TemplateFilter ( ) ) ; } if ( force ) { builder . addProperty ( "force" , true ) ; } Mages mages = builder . build ( ) ; while ( ! ( tasks . isEmpty ( ) ) ) { MagesSiteGenerator . Task task = tasks . poll ( ) ; mages . setProperty ( "currentFile" , task . source ) ; <START_BUG> if ( ( task . source . lastModified ( ) ) > ( task . target . lastModified ( ) ) ) { <END_BUG> String source = FileUtils . readFileToString ( task . source , "UTF-8" ) ; FileUtils . writeStringToFile ( task . target , mages . process ( source ) , "UTF-8" ) ; System . out . println ( ( ( ( task . source . getName ( ) ) + "<seq2seq4repair_space>-><seq2seq4repair_space>" ) + ( task . target . getName ( ) ) ) ) ; } else { System . out . println ( ( ( task . source . getName ( ) ) + "<seq2seq4repair_space>passed." ) ) ; } } for ( Plugin p : plugins ) { p . onDestroy ( this ) ; } } catch ( IOException ex ) { throw new MagesException ( ex ) ; } } }

Fix:
if ( ( ( task . source . lastModified ( ) ) > ( task . target . lastModified ( ) ) ) || ( force ) ) {
Buggy code:
public class Test02Boolean extends TestCase { public static void main ( String [ ] args ) { } final String fieldName = "bi" ; boolean verbose = false ; int maxBasicQueries = 16 ; String [ ] docs1 = new String [ ] { "word1<seq2seq4repair_space>word2<seq2seq4repair_space>word3" , "word4<seq2seq4repair_space>word5" , "ord1<seq2seq4repair_space>ord2<seq2seq4repair_space>ord3" , "orda1<seq2seq4repair_space>orda2<seq2seq4repair_space>orda3<seq2seq4repair_space>word2<seq2seq4repair_space>worda3" , "a<seq2seq4repair_space>c<seq2seq4repair_space>e<seq2seq4repair_space>a<seq2seq4repair_space>b<seq2seq4repair_space>c" } ; SingleFieldTestDb db1 = new SingleFieldTestDb ( docs1 , fieldName ) ; public void normalTest1 ( String query , int [ ] expdnrs ) throws Exception { <START_BUG> BooleanQueryTest bqt = new BooleanQueryTest ( query , expdnrs , db1 , fieldName , this , new BasicQueryFactory ( maxBasicQueries ) ) ; <END_BUG> bqt . setVerbose ( verbose ) ; bqt . doTest ( ) ; } public void test02Terms01 ( ) throws Exception { } public void test02Terms02 ( ) throws Exception { } public void test02Terms03 ( ) throws Exception { } public void test02Terms04 ( ) throws Exception { } public void test02Terms05 ( ) throws Exception { } public void test02Terms06 ( ) throws Exception { } public void test02Terms10 ( ) throws Exception { } public void test02Terms13 ( ) throws Exception { } public void test02Terms14 ( ) throws Exception { } public void test02Terms20 ( ) throws Exception { } public void test02Terms21 ( ) throws Exception { } public void test02Terms22 ( ) throws Exception { } public void test02Terms23 ( ) throws Exception { } public void test03And01 ( ) throws Exception { } public void test03And02 ( ) throws Exception { } public void test03And03 ( ) throws Exception { } public void test04Or01 ( ) throws Exception { } public void test04Or02 ( ) throws Exception { } public void test04Or03 ( ) throws Exception { } public void test05Not01 ( ) throws Exception { } public void test05Not02 ( ) throws Exception { } public void test06AndOr01 ( ) throws Exception { } public void test07AndOrNot02 ( ) throws Exception { } }

Fix:
BooleanQueryTst bqt = new BooleanQueryTst ( query , expdnrs , db1 , fieldName , this , new BasicQueryFactory ( maxBasicQueries ) ) ;
Buggy code:
public final class ContactFacade { public static void addContact ( int uid , String address ) { if ( address == null ) { return ; } if ( ( address . length ( ) ) == 0 ) return ; Address adr ; try { adr = Address . parse ( address ) ; } catch ( ParserException e1 ) { if ( MainInterface . DEBUG ) e1 . printStackTrace ( ) ; return ; } System . out . println ( ( "address:" + address ) ) ; AbstractFolder selectedFolder = ( ( AbstractFolder ) ( addressbookTreeModel . getFolder ( uid ) ) ) ; try { <START_BUG> if ( ! ( selectedFolder . exists ( adr ) ) ) { <END_BUG> Contact card = new Contact ( ) ; String fn = adr . getShortAddress ( ) ; card . set ( FN , fn ) ; card . set ( DISPLAYNAME , fn ) ; card . set ( EMAIL , EMAIL_TYPE_INTERNET , adr . getMailAddress ( ) ) ; selectedFolder . add ( card ) ; } } catch ( Exception e ) { e . printStackTrace ( ) ; } } public static void addContactToCollectedAddresses ( String address ) { } }

Fix:
if ( ( selectedFolder . exists ( adr . getMailAddress ( ) ) ) != null ) {
Buggy code:
public class Argument extends LocalDeclaration { private static final char [ ] SET = "set" . toCharArray ( ) ; public Argument ( char [ ] name , long posNom , TypeReference tr , int modifiers ) { } public void bind ( MethodScope scope , TypeBinding typeBinding , boolean used ) { } public int getKind ( ) { } public boolean isVarArgs ( ) { } public StringBuffer print ( int indent , StringBuffer output ) { } public StringBuffer printStatement ( int indent , StringBuffer output ) { } public TypeBinding resolveForCatch ( BlockScope scope ) { TypeBinding exceptionType = this . type . resolveType ( scope , true ) ; boolean hasError ; if ( exceptionType == null ) { hasError = true ; } else { hasError = false ; switch ( exceptionType . kind ( ) ) { case Binding . PARAMETERIZED_TYPE : if ( exceptionType . isBoundParameterizedType ( ) ) { hasError = true ; scope . problemReporter ( ) . invalidParameterizedExceptionType ( exceptionType , this ) ; } break ; case Binding . TYPE_PARAMETER : scope . problemReporter ( ) . invalidTypeVariableAsException ( exceptionType , this ) ; hasError = true ; break ; case Binding . ARRAY_TYPE : if ( ( ( ( ArrayBinding ) ( exceptionType ) ) . leafComponentType ) == ( TypeBinding . VOID ) ) { scope . problemReporter ( ) . variableTypeCannotBeVoidArray ( this ) ; hasError = true ; } break ; } <START_BUG> if ( ( exceptionType . findSuperTypeErasingTo ( TypeIds . T_JavaLangThrowable , true ) ) == null ) { <END_BUG> scope . problemReporter ( ) . cannotThrowType ( this . type , exceptionType ) ; hasError = true ; } } Binding existingVariable = scope . getBinding ( name , Binding . VARIABLE , this , false ) ; if ( ( existingVariable != null ) && ( existingVariable . isValidBinding ( ) ) ) { if ( ( existingVariable instanceof LocalVariableBinding ) && ( ( this . hiddenVariableDepth ) == 0 ) ) { scope . problemReporter ( ) . redefineArgument ( this ) ; } else { scope . problemReporter ( ) . localVariableHiding ( this , existingVariable , false ) ; } } this . binding = new LocalVariableBinding ( this , exceptionType , modifiers , false ) ; ASTNode . resolveAnnotations ( scope , this . annotations , this . binding ) ; scope . addLocalVariable ( binding ) ; binding . setConstant ( Constant . NotAConstant ) ; if ( hasError ) return null ; return exceptionType ; } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } public void traverse ( ASTVisitor visitor , ClassScope scope ) { } }

Fix:
if ( ( exceptionType . findSuperTypeOriginatingFrom ( TypeIds . T_JavaLangThrowable , true ) ) == null ) {
Buggy code:
public class MapViewTrackingUtilities implements IMapLocationListener , OsmAndCompassListener , OsmAndLocationListener , IRouteInformationListener { private static final int AUTO_FOLLOW_MSG_ID = ( OsmAndConstants . UI_HANDLER_LOCATION_SERVICE ) + 4 ; private long lastTimeAutoZooming = 0 ; private boolean sensorRegistered = false ; private OsmandMapTileView mapView ; private OsmandSettings settings ; private OsmandApplication app ; private boolean isMapLinkedToLocation = false ; private boolean followingMode ; private boolean routePlanningMode ; private boolean showViewAngle = false ; private boolean isUserZoomed = false ; public MapViewTrackingUtilities ( OsmandApplication app ) { } private void addTargetPointListener ( OsmandApplication app ) { } public void setMapView ( OsmandMapTileView mapView ) { } @ Override public void updateCompassValue ( float val ) { } @ Override public void updateLocation ( Location location ) { } private boolean isSmallSpeedForCompass ( Location location ) { } public boolean isShowViewAngle ( ) { } public void switchToRoutePlanningMode ( ) { } public void updateSettings ( ) { } private void registerUnregisterSensor ( net . osmand . Location location ) { } private float defineZoomFromSpeed ( RotatedTileBox tb , float speed ) { } public void autozoom ( Location location ) { if ( location . hasSpeed ( ) ) { long now = System . currentTimeMillis ( ) ; final RotatedTileBox tb = mapView . getCurrentRotatedTileBox ( ) ; float zdelta = defineZoomFromSpeed ( tb , location . getSpeed ( ) ) ; if ( ( Math . abs ( zdelta ) ) >= 0.5 ) { if ( zdelta >= 2 ) { zdelta -= 1 ; } else if ( zdelta <= ( - 2 ) ) { zdelta += 1 ; } <START_BUG> double targetZoom = Math . max ( ( ( ( tb . getZoom ( ) ) + ( tb . getZoomFloatPart ( ) ) ) + zdelta ) , settings . AUTO_ZOOM_MAP . get ( ) . maxZoom ) ; <END_BUG> int threshold = settings . AUTO_FOLLOW_ROUTE . get ( ) ; if ( ( ( now - ( lastTimeAutoZooming ) ) > 4500 ) && ( ( ( now - ( lastTimeAutoZooming ) ) > threshold ) || ( ! ( isUserZoomed ) ) ) ) { isUserZoomed = false ; lastTimeAutoZooming = now ; targetZoom = ( Math . round ( ( targetZoom * 3 ) ) ) // 3.0F ; int newIntegerZoom = ( ( int ) ( Math . round ( targetZoom ) ) ) ; double zPart = targetZoom - newIntegerZoom ; mapView . getAnimatedDraggingThread ( ) . startZooming ( newIntegerZoom , zPart , false ) ; } } } } public void backToLocationImpl ( ) { } private void backToLocationWithDelay ( int delay ) { } public boolean isMapLinkedToLocation ( ) { } public void setMapLinkedToLocation ( boolean isMapLinkedToLocation ) { } @ Override public void locationChanged ( double newLatitude , double newLongitude , Object source ) { } public void switchRotateMapMode ( ) { } @ Override public void newRouteIsCalculated ( boolean newRoute ) { } @ Override public void routeWasCancelled ( ) { } public void setZoomTime ( long time ) { } }

Fix:
double targetZoom = Math . min ( ( ( ( tb . getZoom ( ) ) + ( tb . getZoomFloatPart ( ) ) ) + zdelta ) , settings . AUTO_ZOOM_MAP . get ( ) . maxZoom ) ;
Buggy code:
public class WebXmlInterceptor { private static StringManager sm = StringManager . getManager ( "org.apache.tomcat.core" ) ; public WebXmlInterceptor ( ) { } public int handleContextInit ( Context ctx ) { } private void processWebApp ( Context ctx , InputStream is , boolean internal ) { } private void processServlets ( Context ctx , Enumeration servlets ) { WebComponentDescriptor webComponentDescriptor = ( ( WebComponentDescriptor ) ( servlets . nextElement ( ) ) ) ; String name = webComponentDescriptor . getCanonicalName ( ) ; String description = webComponentDescriptor . getDescription ( ) ; String resourceName = null ; boolean removeResource = false ; if ( webComponentDescriptor instanceof ServletDescriptor ) { resourceName = ( ( ServletDescriptor ) ( webComponentDescriptor ) ) . getClassName ( ) ; if ( ctx . containsServletByName ( name ) ) { String msg = WebXmlInterceptor . sm . getString ( "context.dd.dropServlet" , ( ( ( name + "(" ) + resourceName ) + ")" ) ) ; System . out . println ( msg ) ; removeResource = true ; ctx . removeServletByName ( name ) ; } ctx . addServlet ( name , resourceName , description ) ; } else if ( webComponentDescriptor instanceof JspDescriptor ) { resourceName = ( ( JspDescriptor ) ( webComponentDescriptor ) ) . getJspFileName ( ) ; if ( ! ( resourceName . startsWith ( "//" ) ) ) { resourceName = "//" + resourceName ; } if ( ctx . containsJSP ( resourceName ) ) { String msg = WebXmlInterceptor . sm . getString ( "context.dd.dropServlet" , resourceName ) ; System . out . println ( msg ) ; removeResource = true ; ctx . removeJSP ( resourceName ) ; } ctx . addJSP ( name , resourceName , description ) ; } if ( removeResource ) { <START_BUG> Enumeration levels = ctx . getInitLevles ( ) ; <END_BUG> while ( levels . hasMoreElements ( ) ) { Integer level = ( ( Integer ) ( levels . nextElement ( ) ) ) ; Enumeration servletsOnLevel = ctx . getLoadableServlets ( level ) ; Vector buf = new Vector ( ) ; while ( servletsOnLevel . hasMoreElements ( ) ) { String servletName = ( ( String ) ( servletsOnLevel . nextElement ( ) ) ) ; if ( ctx . containsServletByName ( servletName ) ) { buf . addElement ( servletName ) ; } } ctx . setLoadableServlets ( level , buf ) ; } } int loadOnStartUp = webComponentDescriptor . getLoadOnStartUp ( ) ; if ( loadOnStartUp > ( Integer . MIN_VALUE ) ) { Integer key = new Integer ( loadOnStartUp ) ; ctx . addLoadableServlet ( key , name ) ; } Enumeration = webComponentDescriptor . getInitializationParameters ( ) ; Hashtable initializationParameters = new Hashtable ( ) ; } private void processMimeMaps ( Context ctx , Enumeration mimeMaps ) { } private void processWelcomeFiles ( Context ctx , Enumeration welcomeFiles , boolean internal ) { } private void processErrorPages ( Context ctx , Enumeration errorPages ) { } }

Fix:
Enumeration levels = ctx . getInitLevels ( ) ;
Buggy code:
class Time { double hour ; double min ; double sec ; double day ; double week ; double mon ; double yr ; public String toString ( ) { } public int toSeconds ( ) { } public double toMinutes ( ) { } public double toHours ( ) { } public double toDays ( ) { } public double toWeeks ( ) { } public double toMonths ( ) { } public double toYears ( ) { double y = 0.0 ; y += this . yr ; y += ( this . mon ) // 12.0 ; y += ( ( this . week ) // 4.0 ) // 12.0 ; <START_BUG> y += ( ( this . day ) // 30.0 ) // 12.0 ; <END_BUG> y += ( ( ( this . hour ) // 24.0 ) // 30.0 ) // 12.0 ; y += ( ( ( ( this . min ) // 60.0 ) // 24.0 ) // 30.0 ) // 12.0 ; y += ( ( ( ( ( this . sec ) // 60.0 ) // 60.0 ) // 24.0 ) // 30.0 ) // 12.0 ; return y ; } }

Fix:
y += ( this . day ) // 365.0 ;
Buggy code:
public class CommitWorkingCopyOperation extends JavaModelOperation { public CommitWorkingCopyOperation ( ICompilationUnit element , boolean force ) { } protected void executeOperation ( ) throws JavaModelException { try { beginTask ( Util . bind ( "workingCopy.commit" ) , 2 ) ; CompilationUnit workingCopy = ( ( CompilationUnit ) ( getCompilationUnit ( ) ) ) ; IFile resource = ( ( IFile ) ( workingCopy . getResource ( ) ) ) ; ICompilationUnit primary = workingCopy . getPrimary ( ) ; boolean isPrimary = workingCopy . isPrimary ( ) ; JavaElementDeltaBuilder deltaBuilder = null ; PackageFragmentRoot root = ( ( PackageFragmentRoot ) ( workingCopy . getAncestor ( IJavaElement . PACKAGE_FRAGMENT_ROOT ) ) ) ; <START_BUG> if ( ( root . isOnClasspath ( ) ) && ( resource . isAccessible ( ) ) ) { <END_BUG> if ( ( ! isPrimary ) && ( ! ( primary . isOpen ( ) ) ) ) { primary . open ( null ) ; } if ( ( ! ( Util . isExcluded ( workingCopy ) ) ) && ( ( ! isPrimary ) || ( ! ( workingCopy . isConsistent ( ) ) ) ) ) { deltaBuilder = new JavaElementDeltaBuilder ( primary ) ; } IBuffer primaryBuffer = primary . getBuffer ( ) ; if ( ! isPrimary ) { if ( primaryBuffer == null ) return ; char [ ] primaryContents = primaryBuffer . getCharacters ( ) ; boolean hasSaved = false ; try { IBuffer workingCopyBuffer = workingCopy . getBuffer ( ) ; if ( workingCopyBuffer == null ) return ; primaryBuffer . setContents ( workingCopyBuffer . getCharacters ( ) ) ; primaryBuffer . save ( fMonitor , fForce ) ; primary . makeConsistent ( this ) ; hasSaved = true ; } finally { if ( ! hasSaved ) { primaryBuffer . setContents ( primaryContents ) ; } } } else { primaryBuffer . save ( fMonitor , fForce ) ; primary . makeConsistent ( this ) ; } } else { String encoding = workingCopy . getJavaProject ( ) . getOption ( JavaCore . CORE_ENCODING , true ) ; String contents = workingCopy . getSource ( ) ; if ( contents == null ) return ; try { byte [ ] bytes = ( encoding == null ) ? contents . getBytes ( ) : contents . getBytes ( encoding ) ; ByteArrayInputStream stream = new ByteArrayInputStream ( bytes ) ; if ( resource . exists ( ) ) { resource . setContents ( stream , ( fForce ? ( IResource . FORCE ) | ( IResource . KEEP_HISTORY ) : IResource . KEEP_HISTORY ) , null ) ; } else { resource . create ( stream , fForce , fMonitor ) ; } } catch ( CoreException e ) { throw new JavaModelException ( e ) ; } catch ( UnsupportedEncodingException e ) { throw new JavaModelException ( e , IJavaModelStatusConstants . IO_EXCEPTION ) ; } } JavaModelOperation . setAttribute ( JavaModelOperation . HAS_MODIFIED_RESOURCE_ATTR , JavaModelOperation . TRUE ) ; workingCopy . updateTimeStamp ( ( ( CompilationUnit ) ( primary ) ) ) ; workingCopy . makeConsistent ( this ) ; worked ( 1 ) ; if ( deltaBuilder != null ) { deltaBuilder . buildDeltas ( ) ; if ( ( deltaBuilder . delta ) != null ) { addDelta ( deltaBuilder . delta ) ; } } worked ( 1 ) ; } finally { done ( ) ; } } protected ICompilationUnit getCompilationUnit ( ) { } public IJavaModelStatus verify ( ) { } }

Fix:
if ( isPrimary || ( ( root . isOnClasspath ( ) ) && ( resource . isAccessible ( ) ) ) ) {
Buggy code:
public class CustomViewFactory { public static void createAndAttachCustomView ( JSONObject jsonObject , TableLayout parent ) { } private static void createDurationView ( JSONObject jsonObject , TableLayout parent ) { } private static void createAlphanumericView ( JSONObject jsonObject , TableLayout parent ) { } private static void createNumericView ( JSONObject jsonObject , TableLayout parent ) { ViewGroup viewGroup = CustomViewFactory . getViewGroupWithInitialization ( jsonObject , custom_view_table_row_alphanumeric , parent ) ; EditText editText = ( ( EditText ) ( viewGroup . findViewById ( CustomView_field ) ) ) ; editText . setInputType ( ( ( InputType . TYPE_CLASS_NUMBER ) | ( InputType . TYPE_NUMBER_FLAG_DECIMAL ) ) ) ; <START_BUG> editText . setKeyListener ( DigitsKeyListener . getInstance ( "0123456789.," ) ) ; <END_BUG> editText . setId ( 0 ) ; editText . setTag ( CustomViewFactory . getFieldName ( jsonObject ) ) ; } private static void createUrlView ( JSONObject jsonObject , TableLayout parent ) { } private static void createPictureView ( JSONObject jsonObject , TableLayout parent ) { } private static ViewGroup getViewGroupWithInitialization ( JSONObject jsonObject , int layoutId , TableLayout parent ) { } private static void setHeadingTextView ( ViewGroup viewGroup , String fieldName ) { } private static String getFieldName ( JSONObject jsonObject ) { } }

Fix:
editText . setKeyListener ( DigitsKeyListener . getInstance ( "0123456789.,-" ) ) ;
Buggy code:
public class TestHomePage extends WicketTestCase { public void testSubmitLinkByClickingLink ( ) { } public void testSubmitLinkBySubmittingForm ( ) { tester . startPage ( HomePage . class ) ; tester . assertRenderedPage ( HomePage . class ) ; HomePage home = ( ( HomePage ) ( tester . getLastRenderedPage ( ) ) ) ; tester . setParameterForNextRequest ( "form:text" , "Hello" ) ; <START_BUG> tester . getParametersForNextRequest ( ) . put ( "link" , "" ) ; <END_BUG> tester . submitForm ( "form" ) ; assertEquals ( "Hello" , home . getText ( ) ) ; assertTrue ( "Form.onSubmit()<seq2seq4repair_space>has<seq2seq4repair_space>not<seq2seq4repair_space>been<seq2seq4repair_space>called!" , home . isSubmitted ( ) ) ; assertTrue ( "SubmitLink.onSubmit()<seq2seq4repair_space>has<seq2seq4repair_space>not<seq2seq4repair_space>been<seq2seq4repair_space>called!" , home . isSubmittedViaLink ( ) ) ; } public void testSubmitLinkByUsingFormTester ( ) { } }

Fix:
tester . getParametersForNextRequest ( ) . put ( "link" , new String [ ] { "" } ) ;
Buggy code:
public class CmdEnchant implements UltimateCommand { @ Override public String getName ( ) { } @ Override public String getPermission ( ) { } @ Override public List < String > getAliases ( ) { } @ Override public void run ( final CommandSender cs , String label , String [ ] args ) { if ( ! ( r . perm ( cs , "uc.enchant" , false , true ) ) ) { return ; } if ( ! ( r . isPlayer ( cs ) ) ) { return ; } if ( ! ( r . checkArgs ( args , 0 ) ) ) { r . sendMes ( cs , "enchantUsage" ) ; return ; } Player p = ( ( Player ) ( cs ) ) ; Enchantment ench = EnchantmentDatabase . getByName ( args [ 0 ] ) ; if ( ench == null ) { r . sendMes ( cs , "enchantNotFound" , "%Enchant" , args [ 0 ] ) ; return ; } ItemStack stack = p . getItemInHand ( ) ; if ( ( ( stack == null ) || ( ( stack . getType ( ) ) == null ) ) || ( stack . getType ( ) . equals ( AIR ) ) ) { r . sendMes ( cs , "enchantNoItemInHand" ) ; return ; } String name = ench . getName ( ) . replace ( "_" , "" ) . toLowerCase ( ) ; Integer level = 1 ; if ( ( ( r . checkArgs ( args , 1 ) ) == true ) && ( r . isInt ( args [ 1 ] ) ) ) { level = Integer . parseInt ( args [ 1 ] ) ; } if ( level < 0 ) { level = 0 ; } if ( level == 0 ) { stack . removeEnchantment ( ench ) ; } else { MetaItemStack stack2 = new MetaItemStack ( stack ) ; <START_BUG> stack2 . addEnchantment ( r . perm ( cs , "uc.enchant.unsafe" , false , false ) , ench , level ) ; <END_BUG> p . setItemInHand ( stack2 . getItemStack ( ) ) ; } r . sendMes ( cs , "enchantMessage" , "%Enchant" , name , "%Level" , level , "%Item" , ItemUtil . getName ( stack ) . toLowerCase ( ) ) ; } @ Override public List < String > onTabComplete ( CommandSender cs , Command cmd , String alias , String [ ] args , String curs , Integer curn ) { } }

Fix:
stack2 . addEnchantment ( cs , r . perm ( cs , "uc.enchant.unsafe" , false , false ) , ench , level ) ;
Buggy code:
public class MiniMap < K , V > implements Serializable , Map < K , V > { private static final long serialVersionUID = 1L ; private final K [ ] keys ; private final V [ ] values ; private int size ; private int lastSearchIndex ; @ SuppressWarnings ( "unchecked" ) public MiniMap ( final int maxEntries ) { } public MiniMap ( final Map < ? extends K , ? extends V > map , final int maxEntries ) { } public boolean isFull ( ) { } public int size ( ) { } public boolean isEmpty ( ) { } public boolean containsKey ( final Object key ) { } public boolean containsValue ( final Object value ) { } public V get ( final Object key ) { } public V put ( final K key , final V value ) { } public V remove ( final Object key ) { } <START_BUG> public void putAll ( Map < ? extends K , ? extends V > map ) { <END_BUG> for ( final Map . Entry < ? extends K , ? extends V > entry : map . entrySet ( ) ) { put ( entry . getKey ( ) , entry . getValue ( ) ) ; } } public void clear ( ) { } public Set < K > keySet ( ) { } public Collection < V > values ( ) { } public Set < Map . Entry < K , V > > entrySet ( ) { } private int nextIndex ( final int index ) { } private int nextKey ( final int start ) { } private int nextNullKey ( final int start ) { } private int findKey ( final Object key ) { } private int findKey ( final int start , final Object key ) { } private int findValue ( final int start , final Object value ) { } }

Fix:
public void putAll ( final Map < ? extends K , ? extends V > map ) {
Buggy code:
public class AntStructure extends Task { private final String lSep = System . getProperty ( "line.separator" ) ; private final String BOOLEAN = "%boolean;" ; private final String TASKS = "%tasks;" ; private final String TYPES = "%types;" ; private Hashtable visited = new Hashtable ( ) ; private File output ; public void setOutput ( File output ) { } public void execute ( ) throws BuildException { } private void printHead ( PrintWriter out , Enumeration tasks , Enumeration types ) { <START_BUG> out . println ( "<?xml<seq2seq4repair_space>version=\"1.0\"<seq2seq4repair_space>?>" ) ; <END_BUG> out . println ( "<!ENTITY<seq2seq4repair_space>%<seq2seq4repair_space>boolean<seq2seq4repair_space>\"(true|false|on|off|yes|no)\">" ) ; out . print ( "<!ENTITY<seq2seq4repair_space>%<seq2seq4repair_space>tasks<seq2seq4repair_space>\"" ) ; boolean first = true ; while ( tasks . hasMoreElements ( ) ) { String taskName = ( ( String ) ( tasks . nextElement ( ) ) ) ; if ( ! first ) { out . print ( "<seq2seq4repair_space>|<seq2seq4repair_space>" ) ; } else { first = false ; } out . print ( taskName ) ; } out . println ( "\">" ) ; out . print ( "<!ENTITY<seq2seq4repair_space>%<seq2seq4repair_space>types<seq2seq4repair_space>\"" ) ; first = true ; while ( types . hasMoreElements ( ) ) { String typeName = ( ( String ) ( types . nextElement ( ) ) ) ; if ( ! first ) { out . print ( "<seq2seq4repair_space>|<seq2seq4repair_space>" ) ; } else { first = false ; } out . print ( typeName ) ; } out . println ( "\">" ) ; out . println ( "" ) ; out . print ( "<!ELEMENT<seq2seq4repair_space>project<seq2seq4repair_space>(target<seq2seq4repair_space>|<seq2seq4repair_space>property<seq2seq4repair_space>|<seq2seq4repair_space>taskdef<seq2seq4repair_space>|<seq2seq4repair_space>" ) ; out . print ( TYPES ) ; out . println ( ")*>" ) ; out . println ( "<!ATTLIST<seq2seq4repair_space>project" ) ; out . println ( "<seq2seq4repair_space>name<seq2seq4repair_space>CDATA<seq2seq4repair_space>#REQUIRED" ) ; out . println ( "<seq2seq4repair_space>default<seq2seq4repair_space>CDATA<seq2seq4repair_space>#REQUIRED" ) ; out . println ( "<seq2seq4repair_space>basedir<seq2seq4repair_space>CDATA<seq2seq4repair_space>#IMPLIED>" ) ; out . println ( "" ) ; } private void printTargetDecl ( PrintWriter out ) { } private void printElementDecl ( PrintWriter out , String name , Class element ) throws BuildException { } private void printTail ( PrintWriter out ) { } protected boolean isNmtoken ( String s ) { } protected boolean areNmtokens ( String [ ] s ) { } }

Fix:
out . println ( "<?xml<seq2seq4repair_space>version=\"1.0\"<seq2seq4repair_space>encoding=\"UTF-8\"<seq2seq4repair_space>?>" ) ;
Buggy code:
public class PropertiesFactory implements IPropertiesFactory { private static final Logger log = LoggerFactory . getLogger ( PropertiesFactory . class ) ; private final Map < String , Properties > propertiesCache = new HashMap < String , Properties > ( ) ; private final List < IPropertiesReloadListener > afterReloadListeners = new ArrayList < IPropertiesReloadListener > ( ) ; private final IResourceSettings resourceSettings ; public PropertiesFactory ( final Application application ) { } public void addListener ( final IPropertiesReloadListener listener ) { } public Properties get ( final Class clazz , final String style , final Locale locale ) { final String key = createResourceKey ( clazz , locale , style ) ; Properties props = propertiesCache . get ( key ) ; if ( ( props == null ) && ( ( propertiesCache . containsKey ( key ) ) == false ) ) { <START_BUG> final IResourceStream resource = resourceSettings . getResourceStreamLocator ( ) . locate ( clazz , clazz . getName ( ) . replace ( '.' , '//' ) , style , locale , "properties,xml" ) ; <END_BUG> if ( resource != null ) { props = loadPropertiesFileAndWatchForChanges ( key , resource , clazz , style , locale ) ; } synchronized ( propertiesCache ) { propertiesCache . put ( key , props ) ; } } return props ; } protected final Map getCache ( ) { } public final void clearCache ( ) { } public final String createResourceKey ( final Class componentClass , final Locale locale , final String style ) { } private synchronized Properties loadPropertiesFile ( final String key , final IResourceStream resourceStream , final Class componentClass , final String style , final Locale locale ) { } private final Properties loadPropertiesFileAndWatchForChanges ( final String key , final IResourceStream resourceStream , final Class componentClass , final String style , final Locale locale ) { } }

Fix:
final IResourceStream resource = resourceSettings . getResourceStreamFactory ( ) . locate ( clazz , clazz . getName ( ) . replace ( '.' , '//' ) , style , locale , "properties,xml" ) ;
Buggy code:
public class AlarmReceiver extends BroadcastReceiver { @ Override public void onReceive ( Context context , Intent intent ) { String notifKey = intent . getStringExtra ( "NOTIF_KEY" ) ; SharedStorage . initializeInstance ( context ) ; Log . i ( "AlarmReceiver" , "in<seq2seq4repair_space>Receiver" ) ; if ( notifKey == null ) { Log . i ( "AlarmReceiver" , "notifKey<seq2seq4repair_space>is<seq2seq4repair_space>null" ) ; } else { Log . i ( "AlarmReceiver" , notifKey ) ; Calendar rightNow = Calendar . getInstance ( ) ; Notification n = Storage . getInstance ( ) . getNotification ( notifKey ) ; Lifestyle lifeContainer = Storage . getInstance ( ) . getLifestyle ( n . getLifestyleContainerKey ( ) ) ; Reminder reminderContainer = Storage . getInstance ( ) . getReminder ( n . getReminderContainerKey ( ) ) ; Action action = Storage . getInstance ( ) . getAction ( n . getActionKey ( ) ) ; if ( ( ( ( ( n . isEnabled ( ) ) && ( lifeContainer . isEnabled ( ) ) ) && ( reminderContainer . isEnabled ( ) ) ) && ( ! ( NOTIFICATION_FAILED_KEY . equals ( notifKey ) ) ) ) && ( ! ( ACTION_FAILED_KEY . equals ( action . getKey ( ) ) ) ) ) { Log . i ( "AlarmReceiver" , "Valid<seq2seq4repair_space>notification" ) ; if ( ( ( rightNow . getTimeInMillis ( ) ) - 60000 ) <= ( n . getTime ( ) . getTimeInMillis ( ) ) ) n . sendNotification ( context ) ; <START_BUG> n . setAlarm ( context ) ; <END_BUG> } else { Log . i ( "AlarmReceiver" , "Invalid<seq2seq4repair_space>notification" ) ; if ( ! ( n . isEnabled ( ) ) ) { Log . i ( "AlarmReceiver" , "notification<seq2seq4repair_space>not<seq2seq4repair_space>Enabled" ) ; } if ( ! ( lifeContainer . isEnabled ( ) ) ) { Log . i ( "AlarmReceiver" , "lifestyle<seq2seq4repair_space>not<seq2seq4repair_space>Enabled" ) ; } if ( ! ( reminderContainer . isEnabled ( ) ) ) { Log . i ( "AlarmReceiver" , "reminder<seq2seq4repair_space>not<seq2seq4repair_space>Enabled" ) ; } if ( NOTIFICATION_FAILED_KEY . equals ( notifKey ) ) { Log . i ( "AlarmReceiver" , "Notification<seq2seq4repair_space>key<seq2seq4repair_space>is<seq2seq4repair_space>Failed" ) ; } if ( ACTION_FAILED_KEY . equals ( action . getKey ( ) ) ) { Log . i ( "AlarmReceiver" , "Action<seq2seq4repair_space>Key<seq2seq4repair_space>is<seq2seq4repair_space>Failed" ) ; } } } } No newline ; at end ; of file ; }

Fix:
n . makeNextNotificationTime ( context ) ;