nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Launcher { public static final String ANTHOME_PROPERTY = "ant.home" ; public static final String USER_LIBDIR = ".ant//lib" ; public static final String MAIN_CLASS = "org.apache.tools.ant.Main" ; public static void main ( String [ ] args ) { } private void run ( String [ ] args ) throws MalformedURLException { String antHomeProperty = System . getProperty ( Launcher . ANTHOME_PROPERTY ) ; File antHome = null ; File sourceJar = Locator . getClassSource ( getClass ( ) ) ; File jarDir = sourceJar . getParentFile ( ) ; if ( antHomeProperty != null ) { antHome = new File ( antHomeProperty ) ; } if ( ( antHome == null ) || ( ! ( antHome . exists ( ) ) ) ) { antHome = jarDir . getParentFile ( ) ; System . setProperty ( Launcher . ANTHOME_PROPERTY , antHome . getAbsolutePath ( ) ) ; } if ( ! ( antHome . exists ( ) ) ) { throw new IllegalStateException ( ( "Ant<seq2seq4repair_space>home<seq2seq4repair_space>is<seq2seq4repair_space>set<seq2seq4repair_space>incorrectly<seq2seq4repair_space>or<seq2seq4repair_space>" + "ant<seq2seq4repair_space>could<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>located" ) ) ; } File toolsJar = Locator . getToolsJar ( ) ; URL [ ] systemJars = Locator . getLocationURLs ( jarDir ) ; File userLibDir = new File ( System . getProperty ( "user.home" ) , Launcher . USER_LIBDIR ) ; URL [ ] userJars = Locator . getLocationURLs ( userLibDir ) ; int numJars = ( userJars . length ) + ( systemJars . length ) ; if ( toolsJar != null ) { numJars ++ ; } URL [ ] jars = new URL [ numJars ] ; System . arraycopy ( userJars , 0 , jars , 0 , userJars . length ) ; System . arraycopy ( systemJars , 0 , jars , userJars . length , systemJars . length ) ; if ( toolsJar != null ) { jars [ ( ( jars . length ) - 1 ) ] = toolsJar . toURL ( ) ; } StringBuffer baseClassPath = new StringBuffer ( System . getProperty ( "java.class.path" ) ) ; for ( int i = 0 ; i < ( jars . length ) ; ++ i ) { baseClassPath . append ( File . pathSeparatorChar ) ; <START_BUG> baseClassPath . append ( jars [ i ] . getFile ( ) ) ; <END_BUG> } System . setProperty ( "java.class.path" , baseClassPath . toString ( ) ) ; URLClassLoader loader = new URLClassLoader ( jars ) ; try { Class mainClass = loader . loadClass ( Launcher . MAIN_CLASS ) ; AntMain main = ( ( AntMain ) ( mainClass . newInstance ( ) ) ) ; main . startAnt ( args , null , null ) ; } catch ( Throwable t ) { t . printStackTrace ( ) ; } } }

Fix:
baseClassPath . append ( Locator . fromURI ( jars [ i ] . toString ( ) ) ) ;
Buggy code:
public class SourceSelectorTest extends TestCase implements ResourceFactory , FileNameMapper { private Echo taskINeedForLogging = new Echo ( ) ; public SourceSelectorTest ( String name ) { } public void testNoDuplicates ( ) { } public Resource getResource ( String name ) { } public void setFrom ( String s ) { } public void setTo ( String s ) { } public String [ ] mapFileName ( String s ) { <START_BUG> return new String [ ] { "fred<seq2seq4repair_space>colon" , "carot" } ; <END_BUG> } }

Fix:
return new String [ ] { "fred<seq2seq4repair_space>colon" , "carrot<seq2seq4repair_space>ironfoundersson" } ;
Buggy code:
public class MoveFilesAndFoldersOperation extends CopyFilesAndFoldersOperation { public MoveFilesAndFoldersOperation ( Shell shell ) { } protected boolean canPerformAutoRename ( ) { } protected void copy ( IResource [ ] resources , IPath destination , IProgressMonitor subMonitor ) throws CoreException { for ( int i = 0 ; i < ( resources . length ) ; i ++ ) { IResource source = resources [ i ] ; IPath destinationPath = destination . append ( source . getName ( ) ) ; IWorkspace workspace = source . getWorkspace ( ) ; IWorkspaceRoot workspaceRoot = workspace . getRoot ( ) ; boolean isFolder = ( source . getType ( ) ) == ( IResource . FOLDER ) ; boolean exists = workspaceRoot . exists ( destinationPath ) ; if ( isFolder && exists ) { IResource [ ] children = ( ( IContainer ) ( source ) ) . members ( ) ; copy ( children , destinationPath , subMonitor ) ; delete ( source , subMonitor ) ; } else { IResource existing = workspaceRoot . findMember ( destinationPath ) ; boolean canMove = true ; if ( existing != null ) { canMove = delete ( existing , subMonitor ) ; } if ( canMove ) { <START_BUG> source . move ( destinationPath , IResource . KEEP_HISTORY , new SubProgressMonitor ( subMonitor , 0 ) ) ; <END_BUG> } subMonitor . worked ( 1 ) ; if ( subMonitor . isCanceled ( ) ) { throw new OperationCanceledException ( ) ; } } } } protected String getProblemsMessage ( ) { } protected String getProblemsTitle ( ) { } public String validateDestination ( IContainer destination , IResource [ ] sourceResources ) { } }

Fix:
source . move ( destinationPath , ( ( IResource . KEEP_HISTORY ) | ( IResource . SHALLOW ) ) , new SubProgressMonitor ( subMonitor , 0 ) ) ;
Buggy code:
public class TabSpawnable extends JPanel implements Cloneable , Orientable { protected static Category cat = Category . getInstance ( TabProps . class ) ; public final int OVERLAPP = 30 ; private static final String BUNDLE = "UMLMenu" ; String _title = "untitled" ; boolean _tear = false ; protected Orientation orientation ; public TabSpawnable ( ) { } public TabSpawnable ( String tag ) { } public TabSpawnable ( String tag , boolean tear ) { } public Object clone ( ) { } public void setOrientation ( Orientation orientation ) { } public String getTitle ( ) { } public void setTitle ( String t ) { } public TabSpawnable spawn ( ) { <START_BUG> JDialog f = new JDialog ( ProjectBrowser . TheInstance ) ; <END_BUG> f . getContentPane ( ) . setLayout ( new BorderLayout ( ) ) ; f . setTitle ( Argo . localize ( TabSpawnable . BUNDLE , _title ) ) ; TabSpawnable newPanel = ( ( TabSpawnable ) ( clone ( ) ) ) ; if ( newPanel == null ) return null ; if ( newPanel instanceof TabToDoTarget ) { TabToDoTarget me = ( ( TabToDoTarget ) ( this ) ) ; TabToDoTarget it = ( ( TabToDoTarget ) ( newPanel ) ) ; it . setTarget ( me . getTarget ( ) ) ; } else if ( newPanel instanceof TabModelTarget ) { TabModelTarget me = ( ( TabModelTarget ) ( this ) ) ; TabModelTarget it = ( ( TabModelTarget ) ( newPanel ) ) ; it . setTarget ( me . getTarget ( ) ) ; } else if ( newPanel instanceof TabDiagram ) { TabDiagram me = ( ( TabDiagram ) ( this ) ) ; TabDiagram it = ( ( TabDiagram ) ( newPanel ) ) ; it . setTarget ( me . getTarget ( ) ) ; } newPanel . setTitle ( Argo . localize ( TabSpawnable . BUNDLE , _title ) ) ; f . getContentPane ( ) . add ( newPanel , BorderLayout . CENTER ) ; Rectangle bounds = getBounds ( ) ; bounds . height += ( OVERLAPP ) * 2 ; f . setBounds ( bounds ) ; Point loc = new Point ( 0 , 0 ) ; SwingUtilities . convertPointToScreen ( loc , this ) ; loc . y -= OVERLAPP ; f . setLocation ( loc ) ; f . setVisible ( true ) ; if ( ( _tear ) && ( ( getParent ( ) ) instanceof JTabbedPane ) ) ( ( JTabbedPane ) ( getParent ( ) ) ) . remove ( this ) ; return newPanel ; } }

Fix:
JDialog f = new JDialog ( ProjectBrowser . getInstance ( ) ) ;
Buggy code:
public class SelectionOnFieldReference extends FieldReference { public SelectionOnFieldReference ( char [ ] source , long pos ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public TypeBinding resolveType ( BlockScope scope ) { super . resolveType ( scope ) ; if ( ( ( binding ) == null ) || ( ! ( ( ( ( ( binding . isValidBinding ( ) ) || ( ( binding . problemId ( ) ) == ( ProblemReasons . NotVisible ) ) ) || ( ( binding . problemId ( ) ) == ( ProblemReasons . InheritedNameHidesEnclosingName ) ) ) || ( ( binding . problemId ( ) ) == ( ProblemReasons . NonStaticReferenceInConstructorInvocation ) ) ) || ( ( binding . problemId ( ) ) == ( ProblemReasons . NonStaticReferenceInStaticContext ) ) ) ) ) throw new SelectionNodeFound ( ) ; else <START_BUG> throw new SelectionNodeFound ( this , binding ) ; <END_BUG> } }

Fix:
throw new SelectionNodeFound ( binding ) ;
Buggy code:
public class LoggingWebSocketHandlerDecorator extends WebSocketHandlerDecorator { private final Log logger = LogFactory . getLog ( LoggingWebSocketHandlerDecorator . class ) ; public LoggingWebSocketHandlerDecorator ( WebSocketHandler delegate ) { } @ Override public void afterConnectionEstablished ( WebSocketSession session ) throws Exception { } @ Override public void handleMessage ( WebSocketSession session , WebSocketMessage < ? > message ) throws Exception { if ( logger . isTraceEnabled ( ) ) { <START_BUG> logger . trace ( ( ( message + ",<seq2seq4repair_space>" ) + session ) ) ; <END_BUG> } super . handleMessage ( session , message ) ; } @ Override public void handleTransportError ( WebSocketSession session , Throwable exception ) throws Exception { } @ Override public void afterConnectionClosed ( WebSocketSession session , CloseStatus closeStatus ) throws Exception { } }

Fix:
logger . trace ( ( ( ( "Handling<seq2seq4repair_space>" + message ) + "<seq2seq4repair_space>in<seq2seq4repair_space>" ) + session ) ) ;
Buggy code:
@ Path ( "//reflections" ) @ Produces ( MediaType . APPLICATION_JSON ) public class ReflectionResource { private final Reflections reflections ; private final ReflectionRepresentationFactory reflectionRepresentationFactory ; private static final Logger logger = LoggerFactory . getLogger ( ReflectionResource . class ) ; public ReflectionResource ( Reflections reflections , ReflectionRepresentationFactory reflectionRepresentationFactory ) { } @ POST @ UnitOfWork @ Consumes ( MediaType . APPLICATION_JSON ) public Response createReflection ( String jsonReflection ) { } @ GET @ UnitOfWork @ Path ( "//summary" ) public Response getReflections ( @ DefaultValue ( "" ) @ QueryParam ( "content" ) String criteria ) { } @ GET @ UnitOfWork public Response getReflectionsWithCompleteInfo ( @ DefaultValue ( "" ) @ QueryParam ( "content" ) String criteria ) { } @ GET @ UnitOfWork @ Path ( "//getPublishedReflections" ) public Response getPublishedReflections ( @ QueryParam ( "startFrom" ) int startFrom , @ QueryParam ( "filteredLetter" ) String filteredLetter ) { Set < Reflection > reflectionList = reflections . findBy ( startFrom , filteredLetter ) ; if ( ( reflectionList == null ) || ( ( reflectionList . size ( ) ) == 0 ) ) { return Response . status ( NOT_FOUND ) . build ( ) ; } <START_BUG> ReflectionsRepresentation reflectionsSummaryRepresentation = reflectionRepresentationFactory . createReflections ( reflectionList ) ; <END_BUG> return Response . ok ( reflectionsSummaryRepresentation , APPLICATION_JSON ) . build ( ) ; } @ GET @ UnitOfWork @ Path ( "//all" ) public Set < Reflection > getAllReflections ( ) { } @ GET @ UnitOfWork @ Path ( "//edit" ) public ReflectionRepresentation getReflectionById ( @ QueryParam ( "id" ) int id ) { } }

Fix:
ReflectionsSummaryRepresentation reflectionsSummaryRepresentation = reflectionRepresentationFactory . toReflectionsSummaryRepresentation ( reflectionList ) ;
Buggy code:
public class WicketSessionFilter implements Filter { private static final Logger logger = LoggerFactory . getLogger ( WicketSessionFilter . class ) ; private String filterName ; private String sessionKey ; public WicketSessionFilter ( ) { } public void init ( FilterConfig filterConfig ) throws ServletException { } public void doFilter ( ServletRequest request , ServletResponse response , FilterChain chain ) throws IOException , ServletException { } private void cleanupBoundApplicationAndSession ( ) { } private void bindSession ( ServletRequest request , WebApplication application ) { } private WebApplication bindApplication ( ) { WebApplication application = ( ( WebApplication ) ( Application . get ( filterName ) ) ) ; if ( application == null ) { throw new IllegalStateException ( ( ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>wicket<seq2seq4repair_space>application<seq2seq4repair_space>mapped<seq2seq4repair_space>to<seq2seq4repair_space>filter:<seq2seq4repair_space>" + ( filterName ) ) + ".<seq2seq4repair_space>Make<seq2seq4repair_space>sure<seq2seq4repair_space>you<seq2seq4repair_space>set<seq2seq4repair_space>filterName<seq2seq4repair_space>attribute<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>name<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>wicket<seq2seq4repair_space>filter<seq2seq4repair_space>" ) + "for<seq2seq4repair_space>the<seq2seq4repair_space>wicket<seq2seq4repair_space>application<seq2seq4repair_space>whose<seq2seq4repair_space>session<seq2seq4repair_space>you<seq2seq4repair_space>want<seq2seq4repair_space>to<seq2seq4repair_space>access." ) ) ; } <START_BUG> application . set ( ) ; <END_BUG> return application ; } private Session getSession ( HttpSession session , WebApplication application ) { } public void destroy ( ) { } }

Fix:
ThreadContext . setApplication ( application ) ;
Buggy code:
public abstract class AbstractServiceInfoFactory extends AbstractMetadataFactory implements IServiceInfoFactory { protected Map < AbstractServiceInfoFactory . ServiceInfoKey , IServiceInfo > serviceInfos = new HashMap ( ) ; protected class ServiceInfoKey { private EndpointDescription endpointDescription ; private Namespace discoveryNamespace ; private int hashCode = 7 ; public ServiceInfoKey ( EndpointDescription endpointDescription , Namespace discoveryNamespace ) { } public boolean equals ( Object other ) { } public int hashCode ( ) { } } public IServiceInfo createServiceInfoForDiscovery ( IDiscoveryAdvertiser advertiser , EndpointDescription endpointDescription ) { } protected IServiceInfo createServiceInfo ( URI uri , String serviceName , IServiceTypeID serviceTypeID , IServiceProperties serviceProperties ) { } protected IServiceProperties createServiceProperties ( EndpointDescription endpointDescription , IDiscoveryAdvertiser advertiser , IServiceTypeID serviceTypeID , String serviceName , URI uri ) { } protected URI createURI ( EndpointDescription endpointDescription , IDiscoveryAdvertiser advertiser , IServiceTypeID serviceTypeID , String serviceName ) throws URISyntaxException { String path = "//" + serviceName ; <START_BUG> String str = endpointDescription . getID ( ) . getName ( ) ; <END_BUG> URI uri = null ; while ( true ) { try { uri = new URI ( str ) ; if ( ( uri . getHost ( ) ) != null ) { break ; } else { final String rawSchemeSpecificPart = uri . getRawSchemeSpecificPart ( ) ; if ( str . equals ( rawSchemeSpecificPart ) ) { uri = null ; break ; } else { str = rawSchemeSpecificPart ; } } } catch ( URISyntaxException e ) { uri = null ; break ; } } String scheme = RemoteConstants . SERVICE_TYPE ; int port = 32565 ; if ( uri != null ) { port = uri . getPort ( ) ; if ( port == ( - 1 ) ) port = 32565 ; } String host = null ; if ( uri != null ) { host = uri . getHost ( ) ; } else { try { host = InetAddress . getLocalHost ( ) . getHostAddress ( ) ; } catch ( Exception e ) { logInfo ( "createURI" , "failed<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>local<seq2seq4repair_space>host<seq2seq4repair_space>adress,<seq2seq4repair_space>falling<seq2seq4repair_space>back<seq2seq4repair_space>to<seq2seq4repair_space>\'localhost\'." , e ) ; host = "localhost" ; } } return new URI ( scheme , null , host , port , path , null , null ) ; } protected String createServiceName ( EndpointDescription endpointDescription , IDiscoveryAdvertiser advertiser , IServiceTypeID serviceTypeID ) { } protected String createDefaultServiceName ( EndpointDescription endpointDescription , IDiscoveryAdvertiser advertiser , IServiceTypeID serviceTypeID ) { } protected IServiceTypeID createServiceTypeID ( EndpointDescription endpointDescription , IDiscoveryAdvertiser advertiser ) { } public IServiceInfo removeServiceInfoForUndiscovery ( IDiscoveryAdvertiser advertiser , EndpointDescription endpointDescription ) { } public void close ( ) { } }

Fix:
String str = endpointDescription . getContainerID ( ) . getName ( ) ;
Buggy code:
public class ClassMethodMap { private Map < Object , List < ITestNGMethod > > m_classMap = Maps . newHashMap ( ) ; private Map < ITestClass , Set < Object > > m_beforeClassMethods = Maps . newHashMap ( ) ; private Map < ITestClass , Set < Object > > m_afterClassMethods = Maps . newHashMap ( ) ; public ClassMethodMap ( List < ITestNGMethod > methods , XmlMethodSelector xmlMethodSelector ) { } public synchronized boolean removeAndCheckIfLast ( ITestNGMethod m , Object instance ) { List < ITestNGMethod > l = m_classMap . get ( instance ) ; if ( l != null ) { l . remove ( m ) ; for ( ITestNGMethod tm : l ) { <START_BUG> if ( ( tm . getEnabled ( ) ) && ( tm . getRealClass ( ) . equals ( m . getRealClass ( ) ) ) ) <END_BUG> return false ; } return true ; } else { throw new AssertionError ( "l<seq2seq4repair_space>should<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>null" ) ; } } private Class < ? > getMethodClass ( ITestNGMethod m ) { } public Map < ITestClass , Set < Object > > getInvokedBeforeClassMethods ( ) { } public Map < ITestClass , Set < Object > > getInvokedAfterClassMethods ( ) { } public void clear ( ) { } }

Fix:
if ( ( tm . getEnabled ( ) ) && ( tm . getTestClass ( ) . equals ( m . getTestClass ( ) ) ) )
Buggy code:
public class TimeDateConverterClass { public static String convertToSQLDateFormat ( String date ) { } public static String convertToSQLTimeFormat ( String time ) { } public static String convertTime ( String time ) { } public static String numberToStringDate ( String x ) { } public static String convertToStringDate ( String date ) { String [ ] newDate = date . split ( "-" ) ; <START_BUG> return ( ( ( ( TimeDateConverterClass . numberToStringDate ( newDate [ 2 ] ) ) + "<seq2seq4repair_space>" ) + ( newDate [ 1 ] ) ) + "<seq2seq4repair_space>" ) + ( newDate [ 0 ] ) ; <END_BUG> } }

Fix:
return ( ( ( ( TimeDateConverterClass . numberToStringDate ( newDate [ 1 ] ) ) + "<seq2seq4repair_space>" ) + ( newDate [ 2 ] ) ) + "<seq2seq4repair_space>" ) + ( newDate [ 0 ] ) ;
Buggy code:
public class ZDTStudy { public static void main ( String [ ] args ) throws IOException { <START_BUG> if ( ( args . length ) < 2 ) { <END_BUG> throw new JMetalException ( "Missing<seq2seq4repair_space>argument:<seq2seq4repair_space>experiment<seq2seq4repair_space>base<seq2seq4repair_space>directory" ) ; } String experimentBaseDirectory = args [ 0 ] ; List < Problem < DoubleSolution > > problemList = Arrays . < Problem < DoubleSolution > > asList ( new ZDT1 ( ) , new ZDT2 ( ) , new ZDT3 ( ) , new ZDT4 ( ) , new ZDT6 ( ) ) ; List < String > referenceFrontFileNames = Arrays . asList ( "ZDT1.pf" , "ZDT2.pf" , "ZDT3.pf" , "ZDT4.pf" , "ZDT6.pf" ) ; List < TaggedAlgorithm < List < DoubleSolution > > > algorithmList = ZDTStudy . configureAlgorithmList ( problemList ) ; Experiment < DoubleSolution , List < DoubleSolution > > experiment = new org . uma . jmetal . util . experiment . ExperimentBuilder < DoubleSolution , List < DoubleSolution > > ( "ZDTStudy" ) . setAlgorithmList ( algorithmList ) . setProblemList ( problemList ) . setReferenceFrontDirectory ( "//pareto_fronts" ) . setReferenceFrontFileNames ( referenceFrontFileNames ) . setExperimentBaseDirectory ( experimentBaseDirectory ) . setOutputParetoFrontFileName ( "FUN" ) . setOutputParetoSetFileName ( "VAR" ) . setIndicatorList ( Arrays . asList ( new Epsilon < DoubleSolution > ( ) , new Spread < DoubleSolution > ( ) , new GenerationalDistance < DoubleSolution > ( ) , new org . uma . jmetal . qualityindicator . impl . hypervolume . PISAHypervolume < DoubleSolution > ( ) , new InvertedGenerationalDistance < DoubleSolution > ( ) , new InvertedGenerationalDistancePlus < DoubleSolution > ( ) ) ) . setIndependentRuns ( 20 ) . setNumberOfCores ( 8 ) . build ( ) ; new ExecuteAlgorithms ( experiment ) . run ( ) ; new ComputeQualityIndicators ( experiment ) . run ( ) ; new GenerateLatexTablesWithStatistics ( experiment ) . run ( ) ; new GenerateWilcoxonTestTablesWithR ( experiment ) . run ( ) ; new GenerateFriedmanTestTables ( experiment ) . run ( ) ; new GenerateBoxplotsWithR ( experiment ) . setRows ( 3 ) . setColumns ( 3 ) . setDisplayNotch ( ) . run ( ) ; } static List < TaggedAlgorithm < List < DoubleSolution > > > configureAlgorithmList ( List < Problem < DoubleSolution > > problemList ) { } }

Fix:
if ( ( args . length ) != 1 ) {
Buggy code:
public abstract class LogWatcher < E > { private static final Logger log = LoggerFactory . getLogger ( LogWatcher . class ) ; protected CircularList < E > history ; protected long last = - 1 ; public abstract String getName ( ) { } public abstract List < String > getAllLevels ( ) { } public abstract void setLogLevel ( String category , String level ) { } public abstract Collection < LoggerInfo > getAllLoggers ( ) { } public abstract void setThreshold ( String level ) { } public abstract String getThreshold ( ) { } public void add ( E event , long timstamp ) { } public long getLastEvent ( ) { } public int getHistorySize ( ) { } public SolrDocumentList getHistory ( long since , AtomicBoolean found ) { } public abstract long getTimestamp ( E event ) { } public abstract SolrDocument toSolrDocument ( E event ) { } public abstract void registerListener ( ListenerConfig cfg ) { } public void reset ( ) { } public static LogWatcher newRegisteredLogWatcher ( LogWatcherConfig config , SolrResourceLoader loader ) { } private static LogWatcher createWatcher ( LogWatcherConfig config , SolrResourceLoader loader ) { String fname = config . getLoggingClass ( ) ; String slf4jImpl ; try { slf4jImpl = StaticLoggerBinder . getSingleton ( ) . getLoggerFactoryClassStr ( ) ; LogWatcher . log . info ( ( "SLF4J<seq2seq4repair_space>impl<seq2seq4repair_space>is<seq2seq4repair_space>" + slf4jImpl ) ) ; if ( fname == null ) { <START_BUG> if ( ( slf4jImpl . indexOf ( "Log4j" ) ) > 0 ) { <END_BUG> fname = "Log4j" ; } else if ( ( slf4jImpl . indexOf ( "JDK" ) ) > 0 ) { fname = "JUL" ; } } } catch ( Throwable e ) { LogWatcher . log . warn ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>read<seq2seq4repair_space>SLF4J<seq2seq4repair_space>version.<seq2seq4repair_space>LogWatcher<seq2seq4repair_space>will<seq2seq4repair_space>be<seq2seq4repair_space>disabled:<seq2seq4repair_space>" + e ) ) ; return null ; } if ( fname == null ) { LogWatcher . log . info ( "No<seq2seq4repair_space>LogWatcher<seq2seq4repair_space>configured" ) ; return null ; } if ( "JUL" . equalsIgnoreCase ( fname ) ) return new JulWatcher ( slf4jImpl ) ; if ( "Log4j" . equals ( fname ) ) return new Log4jWatcher ( slf4jImpl ) ; try { return loader != null ? loader . newInstance ( fname , LogWatcher . class ) : null ; } catch ( Throwable e ) { LogWatcher . log . warn ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>load<seq2seq4repair_space>LogWatcher<seq2seq4repair_space>{}:<seq2seq4repair_space>{}" , fname , e ) ; } return null ; } }

Fix:
if ( "org.slf4j.impl.Log4jLoggerFactory" . equals ( slf4jImpl ) ) {
Buggy code:
public class PerspectiveRegistry implements IPerspectiveRegistry { private ArrayList children = new ArrayList ( 10 ) ; private String defaultPerspID ; private static final String EXT = "_persp.xml" ; private static final String ID_DEF_PERSP = "PerspectiveRegistry.DEFAULT_PERSP" ; private static final String PERSP = "_persp" ; private static final char SPACE_DELIMITER = '<seq2seq4repair_space>' ; private ArrayList perspToRemove = new ArrayList ( 5 ) ; public PerspectiveRegistry ( ) { } public void addPerspective ( PerspectiveDescriptor desc ) { } public PerspectiveDescriptor createPerspective ( String label , PerspectiveDescriptor originalDescriptor ) { } public void revertPerspectives ( ArrayList perspToRevert ) { } public void deletePerspectives ( ArrayList perspToDelete ) { } public void deletePerspective ( IPerspectiveDescriptor in ) { } void deleteCustomDefinition ( PerspectiveDescriptor desc ) { } boolean hasCustomDefinition ( PerspectiveDescriptor desc ) { } public IPerspectiveDescriptor findPerspectiveWithId ( String id ) { } public IPerspectiveDescriptor findPerspectiveWithLabel ( String label ) { } public String getDefaultPerspective ( ) { } public IPerspectiveDescriptor [ ] getPerspectives ( ) { } public void load ( ) { } private void loadCustom ( ) { } private void unableToLoadPerspective ( IStatus status ) { } public void saveCustomPersp ( PerspectiveDescriptor realDesc , XMLMemento memento ) throws IOException { } public IMemento getCustomPersp ( String id ) throws IOException , WorkbenchException { } private void loadPredefined ( ) { } public void setDefaultPerspective ( String id ) { } public boolean validateLabel ( String label ) { } private void verifyDefaultPerspective ( ) { } private ArrayList getChildren ( ) { <START_BUG> if ( RoleManager . getInstance ( ) . filterRoles ) { <END_BUG> RoleManager manager = RoleManager . getInstance ( ) ; ArrayList filtered = new ArrayList ( ) ; Iterator childIterator = children . iterator ( ) ; while ( childIterator . hasNext ( ) ) { IPerspectiveDescriptor next = ( ( IPerspectiveDescriptor ) ( childIterator . next ( ) ) ) ; if ( manager . isEnabledId ( next . getId ( ) ) ) filtered . add ( next ) ; } return filtered ; } return children ; } }

Fix:
if ( RoleManager . getInstance ( ) . isFiltering ( ) ) {
Buggy code:
public class PuntosConfigurationActivity extends FragmentActivity implements GoogleMap . OnMapLongClickListener , OnMapReadyCallback { private AppCompatEditText logitud ; private AppCompatEditText latitud ; private AppCompatEditText nombre ; private GoogleMap mMap ; private PuntosDAO dao ; private Activity activity = this ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_puntos_configuration ) ; logitud = ( ( AppCompatEditText ) ( findViewById ( R . id . logitud ) ) ) ; latitud = ( ( AppCompatEditText ) ( findViewById ( R . id . latitud ) ) ) ; nombre = ( ( AppCompatEditText ) ( findViewById ( R . id . nombre ) ) ) ; SupportMapFragment mapFragment = ( ( SupportMapFragment ) ( getSupportFragmentManager ( ) . findFragmentById ( map ) ) ) ; mapFragment . getMapAsync ( this ) ; dao = new PuntosDAO ( this ) ; FloatingActionButton fab = ( ( FloatingActionButton ) ( findViewById ( fab ) ) ) ; fab . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { click ( view ) ; } private void click ( View view ) { String longitudText = logitud . getText ( ) . toString ( ) ; <START_BUG> String latitudText = logitud . getText ( ) . toString ( ) ; <END_BUG> Punto punto = new Punto ( ) ; punto . setLatitud ( Double . parseDouble ( latitudText ) ) ; punto . setLongitud ( Double . parseDouble ( longitudText ) ) ; punto . setNombre ( nombre . getText ( ) . toString ( ) ) ; boolean success = dao . insertPunto ( punto ) ; if ( success ) { setResult ( RESULT_OK ) ; finishActivity ( AGREGAR_PUNTOS ) ; finish ( ) ; Snackbar . make ( view , ( ( ( "Longitud<seq2seq4repair_space>" + longitudText ) + "<seq2seq4repair_space>Latitud:<seq2seq4repair_space>" ) + latitudText ) , LENGTH_LONG ) . setAction ( "Action" , null ) . show ( ) ; } else { Snackbar . make ( view , "ERROR<seq2seq4repair_space>AGREGANDO<seq2seq4repair_space>NUEVO<seq2seq4repair_space>PUNTO" , LENGTH_LONG ) . setAction ( "Action" , null ) . show ( ) ; } } } ) ; } @ Override public void onMapReady ( GoogleMap googleMap ) { } @ Override public void onMapLongClick ( LatLng point ) { } No newline ; at end ; of file ; }

Fix:
String latitudText = latitud . getText ( ) . toString ( ) ;
Buggy code:
public class AutoPhotoSampling { private static void autoPhotoSampling ( final ImageView imageView , final Bitmap bitmap , final Uri uri , final Resources resources , final Integer resourceId ) { imageView . getViewTreeObserver ( ) . addOnPreDrawListener ( new ViewTreeObserver . OnPreDrawListener ( ) { @ Override public boolean onPreDraw ( ) { BitmapFactory . Options options = new BitmapFactory . Options ( ) ; options . inJustDecodeBounds = true ; Bitmap readBitmap = null ; int width = imageView . getWidth ( ) ; int height = imageView . getHeight ( ) ; <START_BUG> if ( readBitmap != null ) { <END_BUG> readBitmap = Bitmap . createScaledBitmap ( bitmap , width , height , false ) ; bitmap . recycle ( ) ; } else if ( uri != null ) { BitmapFactory . decodeFile ( uri . getPath ( ) , options ) ; int sampleSize = AutoPhotoSampling . getSampleSize ( options . outWidth , options . outHeight , width , height ) ; options . inSampleSize = sampleSize ; options . inJustDecodeBounds = false ; readBitmap = BitmapFactory . decodeFile ( uri . getPath ( ) , options ) ; } else if ( resources != null ) { BitmapFactory . decodeResource ( resources , resourceId , options ) ; int sampleSize = AutoPhotoSampling . getSampleSize ( options . outWidth , options . outHeight , width , height ) ; options . inSampleSize = sampleSize ; options . inJustDecodeBounds = false ; readBitmap = BitmapFactory . decodeResource ( resources , resourceId , options ) ; } try { imageView . setImageBitmap ( readBitmap ) ; } catch ( NullPointerException e ) { } imageView . invalidate ( ) ; imageView . getViewTreeObserver ( ) . removeOnPreDrawListener ( this ) ; return false ; } } ) ; } public static void autoPhotoSampling ( ImageView imageView , Bitmap bitmap ) { } public static void autoPhotoSampling ( ImageView imageView , Uri uri ) { } public static void autoPhotoSampling ( ImageView imageView , Resources resources , int resourceId ) { } public static int getSampleSize ( int width , int height , int reqWidth , int reqHeight ) { } }

Fix:
if ( bitmap != null ) {
Buggy code:
public class TrayItem extends Item { Tray parent ; ToolTip toolTip ; String toolTipText ; boolean visible = true ; boolean highlight ; NSStatusItem item ; NSImageView view ; static final float BORDER = 8.0F ; public TrayItem ( Tray parent , int style ) { } public void addMenuDetectListener ( MenuDetectListener listener ) { } public void addSelectionListener ( SelectionListener listener ) { } protected void checkSubclass ( ) { } void createHandle ( ) { } void deregister ( ) { } void destroyWidget ( ) { } Point getLocation ( ) { } public Tray getParent ( ) { } public ToolTip getToolTip ( ) { } public String getToolTipText ( ) { } public boolean getVisible ( ) { } void register ( ) { } void releaseHandle ( ) { } void releaseWidget ( ) { } public void removeMenuDetectListener ( MenuDetectListener listener ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void setImage ( Image image ) { } public void setToolTip ( ToolTip toolTip ) { } public void setToolTipText ( String string ) { } void _setToolTipText ( String string ) { } public void setVisible ( boolean visible ) { } void showMenu ( Menu menu ) { } void showMenu ( ) { } void displayMenu ( ) { } boolean shouldShowMenu ( NSEvent event ) { } void mouseDown ( int id , int sel , int theEvent ) { } void mouseDragged ( int id , int sel , int theEvent ) { } void mouseUp ( int id , int sel , int theEvent ) { if ( highlight ) { NSEvent nsEvent = new NSEvent ( theEvent ) ; if ( ( nsEvent . type ( ) ) == ( OS . NSLeftMouseUp ) ) { <START_BUG> postEvent ( ( ( nsEvent . clickCount ( ) ) == 2 ? SWT . DefaultSelection : SWT . Selection ) ) ; <END_BUG> } } highlight = false ; view . setNeedsDisplay ( true ) ; } void rightMouseDown ( int id , int sel , int theEvent ) { } void rightMouseUp ( int id , int sel , int theEvent ) { } void rightMouseDragged ( int id , int sel , int theEvent ) { } void drawRect ( int id , int sel , NSRect rect ) { } }

Fix:
sendSelectionEvent ( ( ( nsEvent . clickCount ( ) ) == 2 ? SWT . DefaultSelection : SWT . Selection ) ) ;
Buggy code:
public final class AppController extends Application { @ Override public void onCreate ( ) { } public static void configureImageLoader ( Context c ) { if ( ! ( ImageLoader . getInstance ( ) . isInited ( ) ) ) { <START_BUG> DisplayImageOptions displayOptions = new DisplayImageOptions . Builder ( ) . cacheInMemory ( true ) . cacheOnDisc ( true ) . displayer ( new FailSafeBitmapDisplayer ( ) ) . build ( ) ; <END_BUG> ImageLoaderConfiguration configuration = new ImageLoaderConfiguration . Builder ( c ) . defaultDisplayImageOptions ( displayOptions ) . build ( ) ; ImageLoader . getInstance ( ) . init ( configuration ) ; ImageLoader . getInstance ( ) . handleSlowNetwork ( true ) ; } } private void forceMenuOverflow ( ) { } }

Fix:
DisplayImageOptions displayOptions = new DisplayImageOptions . Builder ( ) . cacheInMemory ( true ) . cacheOnDisk ( true ) . displayer ( new FailSafeBitmapDisplayer ( ) ) . build ( ) ;
Buggy code:
public abstract class GridSampler { private static GridSampler gridSampler = new DefaultGridSampler ( ) ; public static void setGridSampler ( GridSampler newGridSampler ) { } public static GridSampler getInstance ( ) { } public abstract BitMatrix sampleGrid ( BitMatrix image , int dimension , float p1ToX , float p1ToY , float p2ToX , float p2ToY , float p3ToX , float p3ToY , float p4ToX , float p4ToY , float p1FromX , float p1FromY , float p2FromX , float p2FromY , float p3FromX , float p3FromY , float p4FromX , float p4FromY ) throws NotFoundException { } public BitMatrix sampleGrid ( BitMatrix image , int dimension , PerspectiveTransform transform ) throws NotFoundException { <START_BUG> throw new UnsupportedOperationException ( ) ; <END_BUG> } protected static void checkAndNudgePoints ( BitMatrix image , float [ ] points ) throws NotFoundException { } }

Fix:
throw new IllegalStateException ( ) ;
Buggy code:
public class RssParser extends AsyncTask < String , Integer , String > { private Elements mItems ; private String mUrl ; private OnFeedLoadListener mOnFeedLoadListener ; public RssParser ( String url , OnFeedLoadListener onFeedLoadListener ) { } @ Override protected String doInBackground ( String ... strings ) { try { <START_BUG> Document rssDocument = Jsoup . connect ( mUrl ) . parser ( Parser . xmlParser ( ) ) . get ( ) ; <END_BUG> mItems = rssDocument . select ( "item" ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; return "failure" ; } return "success" ; } @ Override protected void onPostExecute ( String s ) { } }

Fix:
Document rssDocument = Jsoup . connect ( mUrl ) . ignoreContentType ( true ) . parser ( Parser . xmlParser ( ) ) . get ( ) ;
Buggy code:
class LightweightDecoratorManager { private class LightweightRunnable implements ISafeRunnable { private Object element ; private DecorationBuilder decoration ; private LightweightDecoratorDefinition decorator ; private void setValues ( Object object , DecorationBuilder builder , LightweightDecoratorDefinition definition ) { } public void handleException ( Throwable exception ) { } public void run ( ) throws Exception { } } private LightweightDecoratorManager . LightweightRunnable runnable = new LightweightDecoratorManager . LightweightRunnable ( ) ; private HashMap cachedLightweightDecorators = new HashMap ( ) ; private LightweightDecoratorDefinition [ ] lightweightDefinitions ; private static final LightweightDecoratorDefinition [ ] EMPTY_LIGHTWEIGHT_DEF = new LightweightDecoratorDefinition [ 0 ] ; private OverlayCache overlayCache = new OverlayCache ( ) ; LightweightDecoratorManager ( LightweightDecoratorDefinition [ ] definitions ) { } LightweightDecoratorDefinition [ ] getDefinitions ( ) { } LightweightDecoratorDefinition [ ] enabledDefinitions ( ) { } void reset ( ) { } void shutdown ( ) { for ( int i = 0 ; i < ( lightweightDefinitions . length ) ; i ++ ) { if ( lightweightDefinitions [ i ] . isEnabled ( ) ) <START_BUG> lightweightDefinitions [ i ] . setEnabledWithErrorHandling ( false ) ; <END_BUG> } overlayCache . disposeAll ( ) ; } LightweightDecoratorDefinition getDecoratorDefinition ( String decoratorId ) { } LightweightDecoratorDefinition [ ] getDecoratorsFor ( Object element ) { } void getDecorations ( Object element , DecorationBuilder decoration ) { } private void decorate ( Object element , DecorationBuilder decoration , LightweightDecoratorDefinition decorator ) { } OverlayCache getOverlayCache ( ) { } }

Fix:
lightweightDefinitions [ i ] . setEnabled ( false ) ;
Buggy code:
public class Patch extends Exec { private File originalFile ; private File patchFile ; private boolean backup = false ; private boolean ignoreWhitespace = false ; private int strip = - 1 ; private boolean quiet = false ; private boolean reverse = false ; public void setOriginalfile ( File file ) { } public void setPatchfile ( File file ) { } public void setBackups ( boolean backups ) { } public void setIgnorewhitespace ( boolean ignore ) { } public void setStrip ( int num ) throws BuildException { <START_BUG> if ( ( strip ) < 0 ) { <END_BUG> throw new BuildException ( "strip<seq2seq4repair_space>has<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>>=<seq2seq4repair_space>0" , location ) ; } strip = num ; } public void setQuiet ( boolean q ) { } public void setReverse ( boolean r ) { } public final void setCommand ( String command ) throws BuildException { } public void execute ( ) throws BuildException { } }

Fix:
if ( num < 0 ) {
Buggy code:
public class App { public static void main ( String [ ] args ) throws IOException , IllegalArgumentException , URISyntaxException { String protocol = Settings . BASE_PROTOCOL ; String port = ":" + ( Settings . BASE_PORT ) ; <START_BUG> String hostname = InetAddress . getLocalHost ( ) . getHostAddress ( ) ; <END_BUG> String path = Settings . SERVICE_PATH ; if ( hostname . equals ( BASE_URL ) ) { hostname = "localhost" ; } URI baseUrl = new URI ( ( ( ( protocol + hostname ) + port ) + path ) ) ; System . out . println ( "Starting<seq2seq4repair_space>sdelab<seq2seq4repair_space>standalone<seq2seq4repair_space>HTTP<seq2seq4repair_space>server.." ) ; JdkHttpServerFactory . createHttpServer ( baseUrl , App . createApp ( ) ) ; System . out . println ( ( ( "server<seq2seq4repair_space>starts<seq2seq4repair_space>on<seq2seq4repair_space>" + baseUrl ) + "\n<seq2seq4repair_space>[kill<seq2seq4repair_space>the<seq2seq4repair_space>process<seq2seq4repair_space>to<seq2seq4repair_space>exit]" ) ) ; } public static ResourceConfig createApp ( ) { } No newline ; at end ; of file ; }

Fix:
String hostname = Settings . BASE_URL ;
Buggy code:
public class MultiGraphLayeredPane extends JLayeredPane { private GenericLog genLog ; private InfoPanel infoPanel ; private int totalSplits ; private static final long serialVersionUID = 1213851792900715691L ; public MultiGraphLayeredPane ( ) { } private void init ( ) { } public void addGraph ( String header ) { } public boolean removeGraph ( String header ) { } private void removeAllGraphs ( ) { <START_BUG> for ( int i = 0 ; ( this . getComponentCount ( ) ) > 2 ; ) { <END_BUG> if ( ( this . getComponent ( i ) ) instanceof SingleGraphPanel ) { this . removeHierarchyBoundsListener ( ( ( SingleGraphPanel ) ( getComponent ( i ) ) ) ) ; this . remove ( getComponent ( i ) ) ; } else { i ++ ; } } repaint ( ) ; } public void setLog ( GenericLog log ) { } public InfoPanel getInfoPanel ( ) { } public void initGraphs ( ) { } public void setColor ( String header , Color newColor ) { } public int getTotalSplits ( ) { } public void setTotalSplits ( int totalSplits ) { } }

Fix:
for ( int i = 0 ; ( this . getComponentCount ( ) ) > 1 ; ) {
Buggy code:
public class AntiMessServlet extends HttpServlet { private static final long serialVersionUID = 1L ; private RequestDispatcher view ; public AntiMessServlet ( ) { } protected void doPost ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { if ( AntiMessDao . anmelden ( request . getParameter ( "email" ) , request . getParameter ( "password" ) ) ) { response . getWriter ( ) . println ( "<h1>Angemeldet<//h1>" ) ; } else { <START_BUG> view = request . getRequestDispatcher ( "index.html" ) ; <END_BUG> view . forward ( request , response ) ; } } }

Fix:
view = request . getRequestDispatcher ( ".//" ) ;
Buggy code:
public class DateDV extends DateTimeDV { public Object getActualValue ( String content ) throws InvalidDatatypeValueException { } protected DateTimeData parse ( String str ) throws SchemaDateTimeException { <START_BUG> DateTimeData date = new DateTimeData ( this ) ; <END_BUG> int len = str . length ( ) ; int end = getDate ( str , 0 , len , date ) ; parseTimeZone ( str , end , len , date ) ; validateDateTime ( date ) ; if ( ( ( date . utc ) != 0 ) && ( ( date . utc ) != 'Z' ) ) { normalize ( date ) ; } return date ; } protected String dateToString ( DateTimeData date ) { } }

Fix:
DateTimeData date = new DateTimeData ( str , this ) ;
Buggy code:
public class BlockedJobsDialog extends IconAndMessageDialog { private ProgressTreeViewer viewer ; private String blockedTaskName = null ; private Button cancelSelected ; private Cursor arrowCursor ; private Cursor waitCursor ; private IProgressMonitor blockingMonitor ; private JobTreeElement blockedElement = new BlockedJobsDialog . BlockedUIElement ( ) ; private class BlockedUIElement extends JobTreeElement { Object [ ] getChildren ( ) { } String getDisplayString ( ) { } public Image getDisplayImage ( ) { } Object getParent ( ) { } boolean hasChildren ( ) { } boolean isActive ( ) { } boolean isJobInfo ( ) { } public void cancel ( ) { } public boolean isCancellable ( ) { } } public BlockedJobsDialog ( Shell parentShell , IProgressMonitor blocking , IStatus blockingStatus ) { } protected Control createDialogArea ( Composite parent ) { } protected int getMessageLabelStyle ( ) { } void showJobDetails ( Composite parent ) { } private ProgressTreeContentProvider getContentProvider ( ) { } protected Control createButtonBar ( Composite parent ) { } private Button createButton ( Composite parent , String text , SelectionListener listener ) { } private void clearCursors ( ) { } private void clearCursor ( Control control ) { } protected void configureShell ( Shell shell ) { } private void setMessage ( String messageString ) { } protected Image getImage ( ) { <START_BUG> return JFaceResources . getImageRegistry ( ) . get ( DLG_IMG_WARNING ) ; <END_BUG> } public boolean close ( ) { } public void setBlockedTaskName ( String taskName ) { } }

Fix:
return JFaceResources . getImageRegistry ( ) . get ( DLG_IMG_LOCKED ) ;
Buggy code:
public class Opcode { public Instruction inst ; public int [ ] ndata = null ; public String name = null ; public Opcode ( Instruction inst ) { } public Opcode ( Instruction inst , int ndata ) { } public Opcode ( Instruction inst , int ndata1 , int ndata2 ) { } public Opcode ( Instruction inst , String name ) { } public Opcode ( Instruction inst , int ndata , String name ) { } public String toString ( ) { } public final boolean isJumpCode ( ) { <START_BUG> return ( this . inst . compareTo ( IFFAIL ) ) <= 0 ; <END_BUG> } }

Fix:
return ( this . inst . compareTo ( REPCOND ) ) <= 0 ;
Buggy code:
public class DirectionSequenceGenerator { private DirectionSequence getMonoSequence ( MapDirection direction ) { } public DirectionSequence getEastSequence ( ) { } public DirectionSequence getWestSequence ( ) { } public DirectionSequence getNorthEastSequence ( ) { } public DirectionSequence getSouthEastSequence ( ) { } public DirectionSequence getNorthWestSequence ( ) { } public DirectionSequence getSouthWestSequence ( ) { } public DirectionSequence getNorthClockwiseSequence ( ) { } public DirectionSequence getSouthClockwiseSequence ( ) { } public DirectionSequence getSouthCounterClockwiseSequence ( ) { } public DirectionSequence getNorthCounterClockwiseSequence ( ) { } public DirectionSequence getSequenceByInt ( int index ) { DirectionSequence sequence = new DirectionSequence ( ) ; <START_BUG> index = index % 6 ; <END_BUG> switch ( index ) { case 1 : sequence = getEastSequence ( ) ; break ; case 2 : sequence = getWestSequence ( ) ; break ; case 3 : sequence = getNorthClockwiseSequence ( ) ; break ; case 4 : sequence = getSouthClockwiseSequence ( ) ; break ; case 5 : sequence = getSouthCounterClockwiseSequence ( ) ; break ; case 0 : sequence = getNorthCounterClockwiseSequence ( ) ; break ; } return sequence ; } }

Fix:
index = ( Math . abs ( index ) ) % 6 ;
Buggy code:
public class MoreFragment extends Fragment { private LoadResource loadResource ; private RecyclerView mRecyclerView ; private LayoutManager mLayoutManager ; public MoreFragment ( ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { View rootView = inflater . inflate ( fragment_more , container , false ) ; String [ ] sub = new String [ ] { "Visual<seq2seq4repair_space>Art" , "Science" } ; <START_BUG> mRecyclerView = ( ( RecyclerView ) ( rootView . findViewById ( recycler_res ) ) ) ; <END_BUG> mRecyclerView . setHasFixedSize ( true ) ; mLayoutManager = new android . support . v7 . widget . LinearLayoutManager ( getActivity ( ) ) ; mRecyclerView . setLayoutManager ( mLayoutManager ) ; loadResource = new LoadResource ( getActivity ( ) , mRecyclerView , sub , "LowerElem" , 2 ) ; loadResource . execute ( ) ; return rootView ; } }

Fix:
mRecyclerView = ( ( RecyclerView ) ( rootView . findViewById ( recycler_more ) ) ) ;
Buggy code:
public abstract class PostingsReaderBase implements Closeable { public abstract void init ( IndexInput termsIn ) throws IOException { } public abstract BlockTermState newTermState ( ) throws IOException { } public abstract void nextTerm ( FieldInfo fieldInfo , BlockTermState state ) throws IOException { } <START_BUG> public abstract DocsEnum docs ( FieldInfo fieldInfo , BlockTermState state , Bits skipDocs , DocsEnum reuse , int flags ) throws IOException ; <END_BUG> public abstract DocsAndPositionsEnum docsAndPositions ( FieldInfo fieldInfo , BlockTermState state , Bits skipDocs , DocsAndPositionsEnum reuse , int flags ) throws IOException { } public abstract void close ( ) throws IOException { } public abstract void readTermsBlock ( IndexInput termsIn , FieldInfo fieldInfo , BlockTermState termState ) throws IOException { } }

Fix:
public abstract DocsEnum docs ( FieldInfo fieldInfo , BlockTermState state , Bits skipDocs , DocsEnum reuse , boolean needsFreqs ) throws IOException ;
Buggy code:
public class SourceInteractor implements ISourceInteractor { private Context mContext ; private OnSourceSavedListener onSourceSavedListener ; public SourceInteractor ( Context mContext ) { } public void addSourceToDb ( OnSourceSavedListener onSourceSavedListener , SourceItem sourceItem ) { this . onSourceSavedListener = onSourceSavedListener ; String regexUrl = "^(https?|ftp|file):////[-a-zA-Z0-9+&@#//%?=~_|!:,.;]*[-a-zA-Z0-9+&@#//%=~_|]" ; if ( ( ( sourceItem . getSourceName ( ) . isEmpty ( ) ) && ( sourceItem . getSourceUrl ( ) . isEmpty ( ) ) ) && ( sourceItem . getSourceCategoryName ( ) . isEmpty ( ) ) ) { onSourceSavedListener . onFailure ( "name_url_category_empty" ) ; } else if ( sourceItem . getSourceName ( ) . isEmpty ( ) ) { onSourceSavedListener . onFailure ( "name_empty" ) ; } else if ( sourceItem . getSourceUrl ( ) . isEmpty ( ) ) { onSourceSavedListener . onFailure ( "url_empty" ) ; } else if ( sourceItem . getSourceCategoryName ( ) . isEmpty ( ) ) { onSourceSavedListener . onFailure ( "category_empty" ) ; } else if ( ! ( sourceItem . getSourceUrl ( ) . matches ( regexUrl ) ) ) { onSourceSavedListener . onFailure ( "incorrect_url" ) ; } else { Log . e ( "name" , sourceItem . getSourceName ( ) ) ; Log . e ( "url" , sourceItem . getSourceUrl ( ) ) ; Log . e ( "category" , sourceItem . getSourceCategoryName ( ) ) ; Log . e ( "categoryImgId" , String . valueOf ( sourceItem . getSourceCategoryImgId ( ) ) ) ; Log . e ( "date" , sourceItem . getSourceDateAdded ( ) ) ; DatabaseUtil databaseUtil = new DatabaseUtil ( mContext ) ; databaseUtil . saveSourceInDB ( sourceItem ) ; <START_BUG> onSourceSavedListener . onSuccess ( "source_saved" ) ; <END_BUG> } } public void getSourcesFromDb ( OnSourcesLoadedListener onSourcesLoadedListener ) { } public void getSourceItemsFromDb ( OnSourcesLoadedListener onSourcesLoadedListener ) { } @ Override public void editSourceItemInDb ( OnSourcesModifyListener onSourcesModifyListener , SourceItem sourceItem , String sourceNameOld ) { } @ Override public void deleteSourceItemFromDb ( OnSourcesModifyListener onSourcesModifyListener , SourceItem sourceItem ) { } }

Fix:
onSourceSavedListener . onSuccess ( "Source<seq2seq4repair_space>saved" ) ;