nus-yam/ex-repair huggingface dataset:
Buggy code:
class StubFileGenerator { static Hashtable declIDTable = null ; static void doFiles ( Hashtable table , SymbolManager symbolManager , File [ ] inputFiles , File [ ] signatureFiles ) { } static void processFile ( SymbolManager symbolManager , File inputFile , File signatureFile ) { try { String path = StructureUtil . translateAjPathName ( signatureFile . getCanonicalPath ( ) ) ; PrintWriter writer = new PrintWriter ( new BufferedWriter ( new FileWriter ( path ) ) ) ; String packageName = StructureUtil . getPackageDeclarationFromFile ( inputFile ) ; <START_BUG> if ( packageName != null ) { <END_BUG> writer . println ( ( ( "package<seq2seq4repair_space>" + packageName ) + ";" ) ) ; } IProgramElement fileNode = ( ( IProgramElement ) ( AsmManager . getDefault ( ) . getHierarchy ( ) . findElementForSourceFile ( inputFile . getAbsolutePath ( ) ) ) ) ; for ( Iterator it = fileNode . getChildren ( ) . iterator ( ) ; it . hasNext ( ) ; ) { IProgramElement node = ( ( IProgramElement ) ( it . next ( ) ) ) ; if ( node . getKind ( ) . equals ( IMPORT_REFERENCE ) ) { StubFileGenerator . processImportDeclaration ( node , writer ) ; } else { StubFileGenerator . processTypeDeclaration ( node , writer ) ; } } writer . close ( ) ; } catch ( IOException e ) { System . err . println ( e . getMessage ( ) ) ; e . printStackTrace ( ) ; } } private static void processImportDeclaration ( IProgramElement node , PrintWriter writer ) throws IOException { } private static void processTypeDeclaration ( IProgramElement classNode , PrintWriter writer ) throws IOException { } private static void processMembers ( List members , PrintWriter writer , boolean declaringTypeIsInterface ) throws IOException { } private static String genSourceSignature ( IProgramElement classNode ) { } static int nextDeclID = 0 ; static String addDeclID ( IProgramElement decl , String formalComment ) { } static String addToFormal ( String formalComment , String string ) { } }

Fix:
if ( ( packageName != null ) && ( packageName != "" ) ) {
Buggy code:
public class PropPanelModel extends PropPanelPackage implements PluggablePropertyPanel { public PropPanelModel ( ) { } protected boolean isAcceptibleBaseMetaClass ( String baseClass ) { } public Class getClassForPanel ( ) { } public String getModuleName ( ) { } public String getModuleDescription ( ) { } public String getModuleAuthor ( ) { } public String getModuleVersion ( ) { <START_BUG> return ArgoVersion . VERSION ; <END_BUG> } public String getModuleKey ( ) { } }

Fix:
return ArgoVersion . getVersion ( ) ;
Buggy code:
public final class Converter implements IConverter { private final Map classToConverter = new HashMap ( ) ; private IConverter defaultConverter = new IConverter ( ) { public Object convert ( Object value , Class c ) { return OgnlOps . convertValue ( value , c ) ; } public void setLocale ( Locale locale ) { } public Locale getLocale ( ) { } } ; private Locale locale = null ; public ITypeConverter set ( final Class c , final ITypeConverter converter ) { } public void clear ( ) { } public Object convert ( Object value , Class c ) { if ( value == null ) { return null ; } if ( c == null ) { throw new IllegalArgumentException ( "Class<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>null" ) ; } if ( c . isAssignableFrom ( value . getClass ( ) ) ) { return value ; } <START_BUG> ITypeConverter converter = get ( c ) ; <END_BUG> if ( converter == null ) { defaultConverter . setLocale ( locale ) ; return defaultConverter . convert ( value , c ) ; } converter . setLocale ( locale ) ; try { return converter . convert ( value ) ; } catch ( ConversionException e ) { throw e . setConverter ( this ) . setTypeConverter ( converter ) . setLocale ( locale ) . setTargetType ( c ) . setSourceValue ( value ) ; } catch ( Exception e ) { throw new ConversionException ( e ) . setConverter ( this ) . setLocale ( locale ) . setTargetType ( c ) . setSourceValue ( value ) ; } } public ITypeConverter get ( Class c ) { } public final IConverter getDefaultConverter ( ) { } public Locale getLocale ( ) { } public ITypeConverter remove ( Class c ) { } public final void setDefaultConverter ( IConverter defaultConverter ) { } public void setLocale ( Locale locale ) { } public String toString ( Object value ) { } }

Fix:
final ITypeConverter converter = get ( c ) ;
Buggy code:
public class QueryParser { public Query parse ( String query ) { ScrapeQLLexer lexer = new ScrapeQLLexer ( new ANTLRInputStream ( query ) ) ; ScrapeQLParser parser = new ScrapeQLParser ( new CommonTokenStream ( lexer ) ) ; ParseTree tree = parser . parse ( ) ; final Query parsedQuery = new Query ( ) ; ParseTreeWalker . DEFAULT . walk ( new ScrapeQLBaseListener ( ) { @ Override public void enterLoad ( ScrapeQLParser . LoadContext ctx ) { <START_BUG> parsedQuery . load ( ctx . document_name ( ) . getText ( ) ) ; <END_BUG> } @ Override public void enterSelect_single ( ScrapeQLParser . Select_singleContext ctx ) { List < Variable > selectedVariables = new java . util . ArrayList ( ctx . variable_list ( ) . variable ( ) . size ( ) ) ; for ( ScrapeQLParser . VariableContext var : ctx . variable_list ( ) . variable ( ) ) { Variable variable = parseExpression ( var . expr ( ) , parsedQuery . getContext ( ) ) ; variable . as ( var . element_name ( ) . getText ( ) ) ; selectedVariables . add ( variable ) ; } parsedQuery . select ( selectedVariables ) . from ( ctx . from_name ( ) . getText ( ) ) ; } @ Override public void enterOutput ( ScrapeQLParser . OutputContext ctx ) { parsedQuery . output ( ctx . element_name ( ) . getText ( ) ) ; } } , tree ) ; return parsedQuery ; } private String stripEnclosure ( String input ) { } private Variable parseExpression ( ScrapeQLParser . ExprContext ctx , QueryContext qCtx ) { } }

Fix:
parsedQuery . load ( stripEnclosure ( ctx . document_name ( ) . getText ( ) ) ) ;
Buggy code:
public class TestTieredMergePolicy extends LuceneTestCase { public void testForceMergeDeletes ( ) throws Exception { Directory dir = newDirectory ( ) ; IndexWriterConfig conf = newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) ) ) ; TieredMergePolicy tmp = newTieredMergePolicy ( ) ; conf . setMergePolicy ( tmp ) ; conf . setMaxBufferedDocs ( 4 ) ; tmp . setMaxMergeAtOnce ( 100 ) ; tmp . setSegmentsPerTier ( 100 ) ; tmp . setForceMergeDeletesPctAllowed ( 30.0 ) ; IndexWriter w = new IndexWriter ( dir , conf ) ; for ( int i = 0 ; i < 80 ; i ++ ) { Document doc = new Document ( ) ; doc . add ( newField ( "content" , ( "aaa<seq2seq4repair_space>" + ( i % 4 ) ) , TYPE_UNSTORED ) ) ; w . addDocument ( doc ) ; } assertEquals ( 80 , w . maxDoc ( ) ) ; assertEquals ( 80 , w . numDocs ( ) ) ; if ( VERBOSE ) { System . out . println ( "\nTEST:<seq2seq4repair_space>delete<seq2seq4repair_space>docs" ) ; } w . deleteDocuments ( new Term ( "content" , "0" ) ) ; w . forceMergeDeletes ( ) ; assertEquals ( 80 , w . maxDoc ( ) ) ; assertEquals ( 60 , w . numDocs ( ) ) ; if ( VERBOSE ) { System . out . println ( "\nTEST:<seq2seq4repair_space>forceMergeDeletes2" ) ; } <START_BUG> tmp . setForceMergeDeletesPctAllowed ( 10.0 ) ; <END_BUG> w . forceMergeDeletes ( ) ; assertEquals ( 60 , w . maxDoc ( ) ) ; assertEquals ( 60 , w . numDocs ( ) ) ; w . close ( ) ; dir . close ( ) ; } public void testPartialMerge ( ) throws Exception { } public void testForceMergeDeletesMaxSegSize ( ) throws Exception { } }

Fix:
( ( TieredMergePolicy ) ( w . getConfig ( ) . getMergePolicy ( ) ) ) . setForceMergeDeletesPctAllowed ( 10.0 ) ;
Buggy code:
public class IndexBasedHierarchyBuilder extends HierarchyBuilder implements SuffixConstants { public static final int MAXTICKS = 800 ; protected Map cuToHandle ; protected IJavaSearchScope scope ; protected Map binariesFromIndexMatches ; static class Queue { public char [ ] [ ] names = new char [ 10 ] [ ] ; public int start = 0 ; public int end = - 1 ; public void add ( char [ ] name ) { } public char [ ] retrieve ( ) { } public String toString ( ) { } } public IndexBasedHierarchyBuilder ( TypeHierarchy hierarchy , IJavaSearchScope scope ) throws JavaModelException { } public void build ( boolean computeSubtypes ) { JavaModelManager manager = JavaModelManager . getJavaModelManager ( ) ; try { manager . cacheZipFiles ( ) ; if ( computeSubtypes ) { IType focusType = getType ( ) ; boolean focusIsObject = focusType . getElementName ( ) . equals ( new String ( IIndexConstants . OBJECT ) ) ; int amountOfWorkForSubtypes = ( focusIsObject ) ? 5 : 80 ; IProgressMonitor possibleSubtypesMonitor = ( ( this . hierarchy . progressMonitor ) == null ) ? null : new SubProgressMonitor ( this . hierarchy . progressMonitor , amountOfWorkForSubtypes ) ; HashSet localTypes = new HashSet ( 10 ) ; String [ ] allPossibleSubtypes ; if ( ( ( ( Member ) ( focusType ) ) . getOuterMostLocalContext ( ) ) == null ) { allPossibleSubtypes = this . determinePossibleSubTypes ( localTypes , possibleSubtypesMonitor ) ; } else { <START_BUG> allPossibleSubtypes = new String [ 0 ] ; <END_BUG> } if ( allPossibleSubtypes != null ) { IProgressMonitor buildMonitor = ( ( this . hierarchy . progressMonitor ) == null ) ? null : new SubProgressMonitor ( this . hierarchy . progressMonitor , ( 100 - amountOfWorkForSubtypes ) ) ; this . hierarchy . initialize ( allPossibleSubtypes . length ) ; buildFromPotentialSubtypes ( allPossibleSubtypes , localTypes , buildMonitor ) ; } } else { this . hierarchy . initialize ( 1 ) ; this . buildSupertypes ( ) ; } } finally { manager . flushZipFiles ( ) ; } } private void buildForProject ( JavaProject project , ArrayList potentialSubtypes , ICompilationUnit [ ] workingCopies , HashSet localTypes , IProgressMonitor monitor ) throws JavaModelException { } private void buildFromPotentialSubtypes ( String [ ] allPotentialSubTypes , HashSet localTypes , IProgressMonitor monitor ) { } protected org . eclipse . jdt . internal . compiler . env . ICompilationUnit createCompilationUnitFromPath ( Openable handle , IFile file ) { } protected IBinaryType createInfoFromClassFile ( Openable classFile , IResource file ) { } protected IBinaryType createInfoFromClassFileInJar ( Openable classFile ) { } private String [ ] determinePossibleSubTypes ( final HashSet localTypes , IProgressMonitor monitor ) { } public static void searchAllPossibleSubTypes ( IType type , IJavaSearchScope scope , final Map binariesFromIndexMatches , final IPathRequestor pathRequestor , int waitingPolicy , IProgressMonitor progressMonitor ) { } }

Fix:
allPossibleSubtypes = CharOperation . NO_STRINGS ;
Buggy code:
class JAXRSubsystemAdd extends AbstractBoottimeAddStepHandler { static final JAXRSubsystemAdd INSTANCE = new JAXRSubsystemAdd ( ) ; private JAXRSubsystemAdd ( ) { } @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override public void performBoottime ( final OperationContext context , final ModelNode operation , ModelNode model , final ServiceVerificationHandler verificationHandler , final List < ServiceController < ? > > newControllers ) throws OperationFailedException { context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { <START_BUG> JAXRConfiguration config = new JAXRConfiguration ( ) ; <END_BUG> ServiceTarget serviceTarget = context . getServiceTarget ( ) ; newControllers . add ( JAXRBootstrapService . addService ( serviceTarget , config ) ) ; newControllers . add ( JUDDIContextService . addService ( serviceTarget , config ) ) ; context . completeStep ( ) ; } } , RUNTIME ) ; } }

Fix:
JAXRConfiguration config = JAXRConfiguration . INSTANCE ;
Buggy code:
public class GemGeneration { Random random = new Random ( 1 ) ; private int gemNumber = 50 ; public void generateInitialGems ( ArrayList entities , Hero hero ) { } public Gem generateGem ( Gem previous , Hero hero ) { if ( previous == null ) { return new Gem ( 50 , hero . getH ( ) , 15 , 15 ) ; } <START_BUG> double ledgeX = ( previous . getX ( ) ) + 300 ; <END_BUG> double ledgeY = 350 ; if ( ( previous . getY ( ) ) == 350 ) { int determine = random . nextInt ( 2 ) ; if ( determine == 1 ) { ledgeY = 250 ; ledgeX += 250 ; } else { ledgeY = 450 ; ledgeX += 150 ; } } else if ( ( previous . getY ( ) ) == 250 ) { ledgeY = 350 ; ledgeX += 200 ; } else if ( ( previous . getY ( ) ) == 450 ) { int determine = random . nextInt ( 2 ) ; if ( determine == 1 ) { ledgeY = 350 ; ledgeX += 200 ; } else { ledgeY = 550 ; ledgeX += 75 ; } } else if ( ( previous . getY ( ) ) == 550 ) { ledgeY = 450 ; ledgeX += 250 ; } return new Gem ( ledgeX , ledgeY , 15 , 15 ) ; } }

Fix:
double ledgeX = ( previous . getX ( ) ) + 600 ;
Buggy code:
public class LaplaceDistribution extends AbstractRealDistribution { private static final long serialVersionUID = 20141003 ; private final double mu ; private final double beta ; public LaplaceDistribution ( double mu , double beta ) { } public LaplaceDistribution ( RandomGenerator rng , double mu , double beta ) { } public double getLocation ( ) { } public double getScale ( ) { } public double density ( double x ) { } public double cumulativeProbability ( double x ) { } @ Override public double inverseCumulativeProbability ( double p ) throws OutOfRangeException { if ( ( p < 0.0 ) || ( p > 1.0 ) ) { throw new OutOfRangeException ( p , 0.0 , 1.0 ) ; } else if ( p == 0 ) { <START_BUG> return Double . NEGATIVE_INFINITY ; <END_BUG> } else if ( p == 1 ) { return Double . POSITIVE_INFINITY ; } double x = ( p > 0.5 ) ? - ( Math . log ( ( 2.0 - ( 2.0 * p ) ) ) ) : Math . log ( ( 2.0 * p ) ) ; return ( mu ) + ( ( beta ) * x ) ; } public double getNumericalMean ( ) { } public double getNumericalVariance ( ) { } public double getSupportLowerBound ( ) { } public double getSupportUpperBound ( ) { } public boolean isSupportLowerBoundInclusive ( ) { } public boolean isSupportUpperBoundInclusive ( ) { } public boolean isSupportConnected ( ) { } }

Fix:
return 0.0 ;
Buggy code:
public class ConflictResolver { private static transient Logger logger = LoggerFactory . getLogger ( ConflictResolver . class ) ; private static final int DAYS_TO_LOOK_FOR_REPS = 6 ; private ConflictingTimersSet < LazyBonesTimer > conflict ; private List < Program [ ] > repetitions ; public ConflictResolver ( ConflictingTimersSet < LazyBonesTimer > conflict ) { } public void handleConflicts ( ) { LazyBones . getInstance ( ) . getMainDialog ( ) . setVisible ( true ) ; LazyBones . getInstance ( ) . getMainDialog ( ) . showTimeline ( ) ; TimelinePanel tp = LazyBones . getInstance ( ) . getMainDialog ( ) . getTimelinePanel ( ) ; Calendar startTime = ( ( Calendar ) ( conflict . getConflictStartTime ( ) . clone ( ) ) ) ; int timelineStartHour = Integer . parseInt ( LazyBones . getProperties ( ) . getProperty ( "timelineStartHour" ) ) ; if ( ( startTime . get ( Calendar . HOUR_OF_DAY ) ) < timelineStartHour ) { <START_BUG> startTime . add ( Calendar . HOUR_OF_DAY , ( - 1 ) ) ; <END_BUG> } tp . setCalendar ( startTime ) ; LazyBones . getInstance ( ) . getMainDialog ( ) . getTimelinePanel ( ) . repaint ( ) ; } public List < Program > solveConflict ( ) { } private boolean findConflictlessSolution ( List < Program > solution , int programToAdd ) { } private boolean inThePast ( Program candidate ) { } private boolean conflicts ( Program repetition , List < Program > solution ) { } private List < Program [ ] > findRepetitions ( ConflictingTimersSet < LazyBonesTimer > conflictingTimersSet ) { } private String getProgramTitle ( LazyBonesTimer timer ) { } }

Fix:
startTime . add ( Calendar . DAY_OF_MONTH , ( - 1 ) ) ;
Buggy code:
final class KeyBindingService implements INestableKeyBindingService { private IKeyBindingService activeService = null ; private Set enabledContextIds = Collections . EMPTY_SET ; private List enabledSubmissions = new ArrayList ( ) ; private Map handlerSubmissionsByCommandId = new HashMap ( ) ; private List nestedEnabledSubmissions = null ; private List nestedHandlerSubmissions = null ; private final Map nestedServices = new HashMap ( ) ; private final KeyBindingService parent ; private IWorkbenchPartSite workbenchPartSite ; KeyBindingService ( IWorkbenchPartSite workbenchPartSite ) { } KeyBindingService ( IWorkbenchPartSite workbenchPartSite , KeyBindingService parent ) { } private boolean disposed ; public void dispose ( ) { } public boolean activateKeyBindingService ( IWorkbenchSite nestedSite ) { } private final void activateNestedService ( final IKeyBindingService service ) { } private final void deactivateNestedService ( ) { } private final List getEnabledSubmissions ( ) { } private final List getHandlerSubmissions ( ) { } public IKeyBindingService getKeyBindingService ( IWorkbenchSite nestedSite ) { } public String [ ] getScopes ( ) { } private final void normalizeSites ( final List submissionsToModify ) { if ( disposed ) return ; final int size = submissionsToModify . size ( ) ; for ( int i = 0 ; i < size ; i ++ ) { final Object submission = submissionsToModify . get ( i ) ; final Object replacementSubmission ; if ( submission instanceof EnabledSubmission ) { final EnabledSubmission enabledSubmission = ( ( EnabledSubmission ) ( submission ) ) ; <START_BUG> if ( ! ( workbenchPartSite . equals ( enabledSubmission . getActiveWorkbenchSite ( ) ) ) ) { <END_BUG> replacementSubmission = new EnabledSubmission ( enabledSubmission . getActiveShell ( ) , workbenchPartSite , enabledSubmission . getContextId ( ) ) ; } else { replacementSubmission = enabledSubmission ; } } else if ( submission instanceof HandlerSubmission ) { final HandlerSubmission handlerSubmission = ( ( HandlerSubmission ) ( submission ) ) ; if ( ! ( workbenchPartSite . equals ( handlerSubmission . getActiveWorkbenchPartSite ( ) ) ) ) { replacementSubmission = new HandlerSubmission ( null , handlerSubmission . getActiveShell ( ) , workbenchPartSite , handlerSubmission . getCommandId ( ) , handlerSubmission . getHandler ( ) , handlerSubmission . getPriority ( ) ) ; } else { replacementSubmission = handlerSubmission ; } } else { replacementSubmission = submission ; } submissionsToModify . set ( i , replacementSubmission ) ; } } public void registerAction ( IAction action ) { } public boolean removeKeyBindingService ( IWorkbenchSite nestedSite ) { } public void setScopes ( String [ ] scopes ) { } public void unregisterAction ( IAction action ) { } }

Fix:
if ( ! ( workbenchPartSite . equals ( enabledSubmission . getActiveWorkbenchPartSite ( ) ) ) ) {
Buggy code:
@ Controller public class SingUpController { private static final String SIGNUP_VIEW_NAME = "signup//signup" ; @ Autowired private SecurityUserFactory < DocumentLibraryUser > documentLibraryUserSecurityUserFactory ; @ Autowired private DocumentLibraryUserRepository documentLibraryUserRepository ; @ Autowired private UserBookPreferedListRepository userBookPreferedListRepository ; public void setUserBookPreferedListRepository ( UserBookPreferedListRepository userBookPreferedListRepository ) { } public void setDocumentLibraryUserRepository ( DocumentLibraryUserRepository documentLibraryUserRepository ) { } public void setDocumentLibraryUserSecurityUserFactory ( SecurityUserFactory < DocumentLibraryUser > documentLibraryUserSecurityUserFactory ) { } @ RequestMapping ( "//signup" ) public String signup ( Model model ) { } @ RequestMapping ( value = "//signup" , method = RequestMethod . POST ) public String doSignup ( @ ModelAttribute ( "signupForm" ) @ Valid DocumentLibraryUser documentLibraryUser , Errors errors ) { if ( errors . hasErrors ( ) ) { return SingUpController . SIGNUP_VIEW_NAME ; } try { DocumentLibraryUser save = documentLibraryUserRepository . save ( DocumentLibraryUserBuilder . newDocumentLibraryUserBuilder ( documentLibraryUser ) . showShortHelp ( true ) . build ( ) ) ; UserBookPreferedList userBookPreferedList = new UserBookPreferedList ( ) ; userBookPreferedList . setBooksReadList ( new ArrayList ( ) ) ; userBookPreferedList . setDocumentLibraryUser ( documentLibraryUser ) ; userBookPreferedListRepository . save ( userBookPreferedList ) ; SecurityContextHolder . getContext ( ) . setAuthentication ( documentLibraryUserSecurityUserFactory . getAutenticatedUser ( save ) ) ; } catch ( DataAccessException e ) { errors . rejectValue ( "userName" , "userName.error.label" ) ; return SingUpController . SIGNUP_VIEW_NAME ; } <START_BUG> return String . format ( "redirect://%s" , DEFAULT_TARGET_URL_PAGE ) ; <END_BUG> } }

Fix:
return String . format ( "redirect:%s" , DEFAULT_TARGET_URL_PAGE ) ;
Buggy code:
public class UmlModelListener implements MElementListener { Category logger = null ; private static UmlModelListener SINGLETON = new UmlModelListener ( ) ; public static UmlModelListener getInstance ( ) { } private UmlModelListener ( ) { } public void listRoleItemSet ( MElementEvent mee ) { } public void propertySet ( MElementEvent mee ) { } public void recovered ( MElementEvent mee ) { } public void removed ( MElementEvent mee ) { } public void roleAdded ( MElementEvent mee ) { } public void roleRemoved ( MElementEvent mee ) { } protected void notifyModelChanged ( MElementEvent mee ) { <START_BUG> if ( ( ( ( mee . getAddedValue ( ) ) != null ) || ( ( mee . getRemovedValue ( ) ) != null ) ) || ( ! ( mee . getNewValue ( ) . equals ( mee . getOldValue ( ) ) ) ) ) { <END_BUG> TheInstance . getNavPane ( ) . forceUpdate ( ) ; TheInstance . getProject ( ) . setNeedsSave ( true ) ; } } }

Fix:
if ( ( ( ( ( mee . getAddedValue ( ) ) != null ) || ( ( mee . getRemovedValue ( ) ) != null ) ) || ( ( mee . getNewValue ( ) ) == null ) ) || ( ! ( mee . getNewValue ( ) . equals ( mee . getOldValue ( ) ) ) ) ) {
Buggy code:
public class StrikeoutFormatAction extends CheckBoxAction implements ContainerListener , Observer { public StrikeoutFormatAction ( FrameMediator frameMediator ) { } public void update ( Observable arg0 , Object arg1 ) { } public void actionPerformed ( ActionEvent evt ) { } public void componentAdded ( ContainerEvent e ) { <START_BUG> log . debug ( "Re-registering<seq2seq4repair_space>as<seq2seq4repair_space>observer<seq2seq4repair_space>on<seq2seq4repair_space>editor<seq2seq4repair_space>controller" ) ; <END_BUG> ( ( org . columba . mail . gui . composer . ComposerController ) ( getFrameMediator ( ) ) ) . getEditorController ( ) . addObserver ( this ) ; } public void componentRemoved ( ContainerEvent e ) { } }

Fix:
log . info ( "Re-registering<seq2seq4repair_space>as<seq2seq4repair_space>observer<seq2seq4repair_space>on<seq2seq4repair_space>editor<seq2seq4repair_space>controller" ) ;
Buggy code:
public class LogManagerImpl implements LogManager { public static LogManagerImpl logManager = null ; private BundleContext bc ; private Map < String , LoggerImpl > loggers = null ; private CyclicLogger cyclicLogger = null ; public LogManagerImpl ( ) { } public LogManagerImpl ( boolean testInit ) { } public Logger createLogger ( String name ) { } public void releaseLogger ( String name ) { } public String [ ] getRecentEntries ( ) { } public void setBundleContext ( BundleContext bc ) { } public BundleContext getBundleContext ( ) { } @ Override public void setInitParams ( BundleContext bc , Logger l ) { } @ Override public void shutDown ( ) { } @ Override public boolean startUp ( ) { loggers = new HashMap < String , LoggerImpl > ( ) ; Enumeration < URL > props ; Properties p = new Properties ( ) ; try { props = getClass ( ) . getClassLoader ( ) . getResources ( "log4j.properties" ) ; p . load ( props . nextElement ( ) . openStream ( ) ) ; } catch ( Exception e ) { System . err . println ( ( ( "Logging<seq2seq4repair_space>initialisation<seq2seq4repair_space>failed,<seq2seq4repair_space>" + "cannot<seq2seq4repair_space>find<seq2seq4repair_space>log4j.properties<seq2seq4repair_space>file:" ) + e ) ) ; } PropertyConfigurator . configure ( p ) ; org . apache . log4j . Logger . getRootLogger ( ) . info ( "Logging<seq2seq4repair_space>initialized." ) ; CyclicLogger l = new CyclicLogger ( ) ; <START_BUG> String pattern = bc . getProperty ( "eu.sqooss.logbuffer.pattern" ) ; <END_BUG> if ( pattern != null ) { org . apache . log4j . Logger . getRootLogger ( ) . info ( ( ( "Logging<seq2seq4repair_space>to<seq2seq4repair_space>buffer<seq2seq4repair_space>with<seq2seq4repair_space>pattern<seq2seq4repair_space><" + pattern ) + ">" ) ) ; l . setLayout ( new PatternLayout ( pattern ) ) ; } else { org . apache . log4j . Logger . getRootLogger ( ) . info ( "Logging<seq2seq4repair_space>to<seq2seq4repair_space>buffer<seq2seq4repair_space>with<seq2seq4repair_space>simple<seq2seq4repair_space>layout." ) ; l . setLayout ( new SimpleLayout ( ) ) ; } l . setThreshold ( Level . WARN ) ; org . apache . log4j . Logger . getRootLogger ( ) . addAppender ( l ) ; cyclicLogger = l ; LogManagerImpl . logManager = this ; return true ; } }

Fix:
String pattern = ( ( bc ) != null ) ? bc . getProperty ( "eu.sqooss.logbuffer.pattern" ) : null ;
Buggy code:
public class EmptyStatement extends Statement { EmptyStatement ( AST ast ) { } public int getNodeType ( ) { } ASTNode clone ( AST target ) { EmptyStatement result = new EmptyStatement ( target ) ; result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <START_BUG> result . setLeadingComment ( getLeadingComment ( ) ) ; <END_BUG> return result ; } public boolean subtreeMatch ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } int treeSize ( ) { } }

Fix:
result . copyLeadingComment ( this ) ;
Buggy code:
public class NotifyToken extends MessageBase { private static final long serialVersionUID = - 2839149545156931567L ; public NotifyToken ( Message tokenInfo ) { } @ Override public Integer deliver ( ) { ServerAddress book = ServerAddress . getInstance ( ) ; try { boolean newEvent = EventCounter . getInstance ( null ) . isNewEvent ( m . getMyTime ( ) ) ; DummyFrontEntity . getInstance ( ) . addMessage ( ( "Il<seq2seq4repair_space>token<seq2seq4repair_space>è<seq2seq4repair_space>in<seq2seq4repair_space>mano<seq2seq4repair_space>a<seq2seq4repair_space>" + ( m . getMessage ( ) ) ) ) ; book . setTokenPosition ( m . getMessage ( ) ) ; <START_BUG> if ( ! ( m . getSender ( ) . equals ( book . getMyAddress ( ) ) ) ) { <END_BUG> new ComunicationActions ( ) . cicleToken ( m ) ; } else DummyFrontEntity . getInstance ( ) . addMessage ( ( ( ( "Fermo<seq2seq4repair_space>token:<seq2seq4repair_space>" + ( m . getMessage ( ) ) ) + "<seq2seq4repair_space>" ) + newEvent ) ) ; } catch ( EventNotSameException e ) { e . printStackTrace ( ) ; } if ( m . getMessage ( ) . equals ( book . getMyAddress ( ) ) ) { DummyFrontEntity . getInstance ( ) . setPlayerTurn ( true ) ; } return 1 ; } }

Fix:
if ( ( ! ( m . getSender ( ) . equals ( book . getMyAddress ( ) ) ) ) && newEvent ) {
Buggy code:
public class BufferedIndividualRecordLinker implements DisclosureRiskEstimator { private Vector < Instance > originalInstancesBuffer ; private int bufferSize ; private int recordLinkageHits ; private int processedInstances ; public BufferedIndividualRecordLinker ( final int bufferSize ) { } public BufferedIndividualRecordLinker ( ) { } public int getBufferSize ( ) { } public void setBufferSize ( int bufferSize ) { } public int getProcessedInstances ( ) { } public int getRecordLinkageHits ( ) { } @ Override public void restart ( ) { } @ Override public double getCurrentDisclosureRisk ( ) { } @ Override public void estimateDisclosureRiskForInstancePair ( InstancePair instancePair ) { addInstanceToBuffer ( instancePair . originalInstance ) ; <START_BUG> int guess = guessNearestInstance ( instancePair . originalInstance ) ; <END_BUG> if ( guess == ( ( originalInstancesBuffer . size ( ) ) - 1 ) ) { ++ ( recordLinkageHits ) ; } } private int guessNearestInstance ( final Instance targetInstance ) { } private void addInstanceToBuffer ( Instance originalInstance ) { } }

Fix:
int guess = guessNearestInstance ( instancePair . anonymizedInstance ) ;
Buggy code:
public class TaskDetails extends BaseActivity { TextView customer ; TextView ATMDtails ; TextView locationText ; TextView distance ; TextView dueDate ; TextView textViewDis ; Button surveyNow ; private String tag = getClass ( ) . getSimpleName ( ) ; JSONObject taskObj = new JSONObject ( ) ; String atm1 ; String atm2 ; String customerText ; String country ; String distanceVal ; private DateUtility dateUtility ; public static final String taskIDKey = "taskId" ; public static String taskDetais = "taskDetails" ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( task_details ) ; customer = ( ( TextView ) ( findViewById ( R . id . customer ) ) ) ; ATMDtails = ( ( TextView ) ( findViewById ( details_atm ) ) ) ; locationText = ( ( TextView ) ( findViewById ( location ) ) ) ; distance = ( ( TextView ) ( findViewById ( R . id . distance ) ) ) ; dueDate = ( ( TextView ) ( findViewById ( due_date ) ) ) ; surveyNow = ( ( Button ) ( findViewById ( survoeynow_but ) ) ) ; textViewDis = ( ( TextView ) ( findViewById ( textView_distance ) ) ) ; dateUtility = new DateUtility ( ) ; distance . setVisibility ( VISIBLE ) ; try { taskObj = new JSONObject ( getIntent ( ) . getStringExtra ( "taskDetais" ) ) ; Log . d ( tag , taskObj . toString ( ) ) ; } catch ( JSONException e1 ) { e1 . printStackTrace ( ) ; } try { customerText = taskObj . getJSONArray ( "customer" ) . getString ( 1 ) ; <START_BUG> String [ ] atmarr = taskObj . getJSONArray ( "atm" ) . getString ( 1 ) . split ( "," ) ; <END_BUG> if ( ( atmarr . length ) > 0 ) { atm1 = atmarr [ 0 ] ; ATMDtails . setText ( atm1 ) ; } country = taskObj . getJSONArray ( "country" ) . getString ( 1 ) ; dueDate . setText ( dateUtility . getFriendlyDateString ( dateUtility . makeDate ( taskObj . getString ( "visit_time" ) ) ) ) ; distanceVal = taskObj . get ( "distance" ) . toString ( ) ; if ( ( distanceVal ) != null ) { distance . setText ( distanceVal ) ; } else { textViewDis . setVisibility ( GONE ) ; distance . setVisibility ( GONE ) ; } } catch ( JSONException e1 ) { textViewDis . setVisibility ( GONE ) ; distance . setVisibility ( GONE ) ; e1 . printStackTrace ( ) ; } customer . setText ( customerText ) ; locationText . setText ( country ) ; surveyNow . setOnClickListener ( new OnClickListener ( ) { @ Override public void onClick ( View v ) { Intent i = new Intent ( TaskDetails . this , TaskForm . class ) ; try { i . putExtra ( TaskDetails . taskDetais , taskObj . toString ( ) ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } startActivity ( i ) ; } } ) ; } }

Fix:
String [ ] atmarr = taskObj . getJSONArray ( "atm" ) . getString ( 1 ) . split ( "%%" ) ;
Buggy code:
public class Activity_Login extends ActionBarActivity implements HazelEvents { private EditText login_username ; private EditText login_password ; private CheckBox login_remember ; private SharedPreferences sharedPref ; private Hazel hazel ; private Boolean from_saved_info = false ; private ProgressDialog progress ; private Button login_btn ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } public void login_btn_clicked ( View v ) { } private void login ( String username , String password ) { } private void restoreUI ( ) { } @ Override public void onError ( Hazel . HazelCommand duringCommand , String errorMsg ) { } @ Override public void onConnected ( ) { <START_BUG> if ( ( login_remember . isChecked ( ) ) && ( ! ( from_saved_info ) ) ) { <END_BUG> SharedPreferences . Editor editor = sharedPref . edit ( ) ; editor . putString ( "username" , login_username . getText ( ) . toString ( ) ) ; editor . putString ( "password" , login_password . getText ( ) . toString ( ) ) ; editor . apply ( ) ; } else if ( ( ! ( login_remember . isChecked ( ) ) ) && ( from_saved_info ) ) { SharedPreferences . Editor editor = sharedPref . edit ( ) ; editor . remove ( "username" ) ; editor . remove ( "password" ) ; editor . apply ( ) ; } progress . setMessage ( getString ( downloading_personnel ) ) ; } @ Override public void onStaffDownloaded ( ) { } @ Override public void onUserSchedule ( ) { } @ Override public void onStaffSchedule ( ) { } @ Override protected void onStop ( ) { } @ Override protected void onPause ( ) { } }

Fix:
if ( login_remember . isChecked ( ) ) {
Buggy code:
public class BlockLava extends BlockLiquid { public BlockLava ( ) { } @ Override public boolean isCollectible ( GlowBlockState target ) { } @ Override public void onTouch ( GlowEntity entity , GlowBlock block ) { if ( entity instanceof GlowItem ) { GlowItem item = ( ( GlowItem ) ( entity ) ) ; if ( item != null ) { item . remove ( ) ; return ; } } if ( entity instanceof GlowLivingEntity ) { GlowLivingEntity livingEntity = ( ( GlowLivingEntity ) ( entity ) ) ; if ( livingEntity != null ) { if ( livingEntity . canTakeDamage ( CONTACT ) ) { livingEntity . damage ( 4 , CONTACT ) ; <START_BUG> entity . setFireTicks ( 10 ) ; <END_BUG> return ; } } } } }

Fix:
entity . setFireTicks ( 50 ) ;
Buggy code:
public class BasicPartList extends AbstractTableInformationControl { private boolean hiddenTabsBold = true ; private PresentablePartFolder folder ; private IStackPresentationSite site ; private class BasicStackListContentProvider implements IStructuredContentProvider { public BasicStackListContentProvider ( ) { } public void dispose ( ) { } public Object [ ] getElements ( Object inputElement ) { } public void inputChanged ( Viewer viewer , Object oldInput , Object newInput ) { } } private class BasicStackListLabelProvider extends LabelProvider implements IFontProvider { private Font boldFont = null ; public BasicStackListLabelProvider ( ) { } public String getText ( Object element ) { } public Image getImage ( Object element ) { } public Font getFont ( Object element ) { IPresentablePart presentablePart = ( ( IPresentablePart ) ( element ) ) ; AbstractTabItem item = folder . getTab ( presentablePart ) ; if ( ( item . isShowing ( ) ) || ( ! ( hiddenTabsBold ) ) ) <START_BUG> return null ; <END_BUG> if ( ( boldFont ) == null ) { Control control = folder . getTabFolder ( ) . getControl ( ) ; Font originalFont = control . getFont ( ) ; FontData [ ] fontData = originalFont . getFontData ( ) ; for ( int i = 0 ; i < ( fontData . length ) ; i ++ ) fontData [ i ] . setStyle ( ( ( fontData [ i ] . getStyle ( ) ) | ( SWT . BOLD ) ) ) ; boldFont = new Font ( control . getDisplay ( ) , fontData ) ; } return boldFont ; } public void dispose ( ) { } } private class BasicStackListViewerSorter extends ViewerSorter { public BasicStackListViewerSorter ( ) { } public BasicStackListViewerSorter ( Collator collator ) { } public int compare ( Viewer viewer , Object e1 , Object e2 ) { } public int category ( Object element ) { } } public BasicPartList ( Shell parent , int shellStyle , int treeStyle , IStackPresentationSite site , PresentablePartFolder folder ) { } protected TableViewer createTableViewer ( Composite parent , int style ) { } public void setInput ( Object information ) { } protected void gotoSelectedElement ( ) { } protected boolean deleteSelectedElements ( ) { } }

Fix:
return folder . getTabFolder ( ) . getControl ( ) . getFont ( ) ;
Buggy code:
public class UpcomingGamesActivity extends ListActivity { String currentUserId = "" ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override protected void onListItemClick ( ListView l , View v , int position , long id ) { super . onListItemClick ( l , v , position , id ) ; Game game = ( ( Game ) ( v . getTag ( ) ) ) ; Intent intent = new Intent ( this , GameDetailActivity . class ) ; intent . putExtra ( "gameId" , game . getObjectId ( ) ) ; <START_BUG> intent . putExtra ( "currentUserId" , currentUserId ) ; <END_BUG> startActivity ( intent ) ; } }

Fix:
intent . putExtra ( "playerId" , currentUserId ) ;
Buggy code:
public class DeploymentDeployHandler implements OperationStepHandler { public static final String OPERATION_NAME = DEPLOY ; static ModelNode getOperation ( ModelNode address ) { } private final AbstractVaultReader vaultReader ; public DeploymentDeployHandler ( final AbstractVaultReader vaultReader ) { } public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { ModelNode model = context . readModelForUpdate ( EMPTY_ADDRESS ) ; model . get ( ENABLED . getName ( ) ) . set ( true ) ; final ModelNode opAddr = operation . get ( OP_ADDR ) ; PathAddress address = PathAddress . pathAddress ( opAddr ) ; final String name = address . getLastElement ( ) . getValue ( ) ; final String runtimeName = RUNTIME_NAME . resolveModelAttribute ( context , model ) . asString ( ) ; final DeploymentHandlerUtil [ ] contents = DeploymentHandlerUtils . getContents ( CONTENT_ALL . resolveModelAttribute ( context , model ) ) ; DeploymentHandlerUtil . deploy ( context , runtimeName , name , vaultReader , contents ) ; <START_BUG> context . completeStep ( ) ; <END_BUG> } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public interface MailboxTstFactory { <START_BUG> MessageFolder createFolder ( int folderId ) ; <END_BUG> }

Fix:
AbstractMessageFolder createFolder ( int folderId ) ;
Buggy code:
public abstract class AbstractMethodDeclaration extends ASTNode implements ReferenceContext , ProblemSeverities { public MethodScope scope ; public char [ ] selector ; public int declarationSourceStart ; public int declarationSourceEnd ; public int modifiers ; public int modifiersSourceStart ; public Annotation [ ] annotations ; public Argument [ ] arguments ; public TypeReference [ ] thrownExceptions ; public Statement [ ] statements ; public int explicitDeclarations ; public MethodBinding binding ; public boolean ignoreFurtherInvestigation = false ; public boolean needFreeReturn = false ; public Javadoc javadoc ; public int bodyStart ; public int bodyEnd = - 1 ; public CompilationResult compilationResult ; public boolean errorInSignature = false ; AbstractMethodDeclaration ( CompilationResult compilationResult ) { } public void abort ( int abortLevel , IProblem problem ) { } public abstract void analyseCode ( ClassScope classScope , InitializationFlowContext initializationContext , FlowInfo info ) { } public void bindArguments ( ) { } public void bindThrownExceptions ( ) { } public CompilationResult compilationResult ( ) { } public void generateCode ( ClassScope classScope , ClassFile classFile ) { } public void generateCode ( ClassFile classFile ) { } private void checkArgumentsSize ( ) { } public boolean hasErrors ( ) { } public boolean isAbstract ( ) { } public boolean isClinit ( ) { } public boolean isConstructor ( ) { } public boolean isDefaultConstructor ( ) { } public boolean isInitializationMethod ( ) { } public boolean isMethod ( ) { } public boolean isNative ( ) { } public boolean isStatic ( ) { } public abstract void parseStatements ( Parser parser , CompilationUnitDeclaration unit ) { } public StringBuffer print ( int tab , StringBuffer output ) { } public StringBuffer printBody ( int indent , StringBuffer output ) { } public StringBuffer printReturnType ( int indent , StringBuffer output ) { } public void resolve ( ClassScope upperScope ) { if ( ( this . binding ) == null ) { this . ignoreFurtherInvestigation = true ; } try { bindArguments ( ) ; bindThrownExceptions ( ) ; resolveJavadoc ( ) ; <START_BUG> ASTNode . resolveAnnotations ( this . annotations , scope ) ; <END_BUG> resolveStatements ( ) ; } catch ( org . eclipse . jdt . internal . compiler . problem . AbortMethod e ) { this . ignoreFurtherInvestigation = true ; } } public void resolveJavadoc ( ) { } public void resolveStatements ( ) { } public void tagAsHavingErrors ( ) { } public void traverse ( ASTVisitor visitor , ClassScope classScope ) { } public TypeParameter [ ] typeParameters ( ) { } }

Fix:
ASTNode . resolveAnnotations ( scope , this . annotations , this . binding ) ;
Buggy code:
public class I18nFactorySet extends FactorySet { public static final boolean debug = false ; public static final String INSTANCES_CONFIG_PARAMETER_NAME = "instances-config" ; public static final String DEFINITIONS_CONFIG_PARAMETER_NAME = "definitions-config" ; public static final String PARSER_DETAILS_PARAMETER_NAME = "definitions-parser-details" ; public static final String PARSER_VALIDATE_PARAMETER_NAME = "definitions-parser-validate" ; public static final String [ ] DEFAULT_DEFINITION_FILENAMES = new String [ ] { "//WEB-INF//tileDefinitions.xml" , "//WEB-INF//componentDefinitions.xml" , "//WEB-INF//instanceDefinitions.xml" } ; protected DefinitionsFactory defaultFactory ; protected XmlParser xmlParser ; protected boolean isValidatingParser = false ; protected int parserDetailLevel = 0 ; private static final int MAX_BUNDLES_SEARCHED = 2 ; public static final String FILENAME_EXTENSION = ".xml" ; private List filenames ; private Map loaded ; public I18nFactorySet ( ) { } public I18nFactorySet ( ServletContext servletContext , Map properties ) throws DefinitionsFactoryException { } public void initFactory ( ServletContext servletContext , Map properties ) throws DefinitionsFactoryException { } protected void initFactory ( ServletContext servletContext , String proposedFilename ) throws FileNotFoundException , DefinitionsFactoryException { StringTokenizer tokenizer = new StringTokenizer ( proposedFilename , "," ) ; this . filenames = new ArrayList ( tokenizer . countTokens ( ) ) ; while ( tokenizer . hasMoreTokens ( ) ) { <START_BUG> this . filenames . add ( tokenizer . nextToken ( ) ) ; <END_BUG> } loaded = new HashMap ( ) ; defaultFactory = createDefaultFactory ( servletContext ) ; if ( I18nFactorySet . debug ) System . out . println ( ( "default<seq2seq4repair_space>factory:" + ( defaultFactory ) ) ) ; } protected DefinitionsFactory getDefaultFactory ( ) { } protected DefinitionsFactory createDefaultFactory ( ServletContext servletContext ) throws FileNotFoundException , DefinitionsFactoryException { } protected Object getDefinitionsFactoryKey ( String name , ServletRequest request , ServletContext servletContext ) { } protected DefinitionsFactory createFactory ( Object key , ServletRequest request , ServletContext servletContext ) throws DefinitionsFactoryException { } private static List calculatePostixes ( String baseName , Locale locale ) { } private XmlDefinitionsSet parseXmlFiles ( ServletContext servletContext , String postfix , XmlDefinitionsSet xmlDefinitions ) throws DefinitionsFactoryException { } private XmlDefinitionsSet parseXmlFile ( ServletContext servletContext , String filename , XmlDefinitionsSet xmlDefinitions ) throws DefinitionsFactoryException { } private String concatPostfix ( String name , String postfix ) { } }

Fix:
this . filenames . add ( tokenizer . nextToken ( ) . trim ( ) ) ;
Buggy code:
public class FileSet extends DataType { private PatternSet defaultPatterns = new PatternSet ( ) ; private Vector additionalPatterns = new Vector ( ) ; private File dir ; private boolean useDefaultExcludes = true ; public FileSet ( ) { } public void setRefid ( Reference r ) throws BuildException { <START_BUG> if ( ( ( dir ) != null ) || ( ( defaultPatterns . countPatterns ( ) ) > 0 ) ) { <END_BUG> throw tooManyAttributes ( ) ; } if ( ! ( additionalPatterns . isEmpty ( ) ) ) { throw noChildrenAllowed ( ) ; } super . setRefid ( r ) ; } public void setDir ( File dir ) throws BuildException { } public File getDir ( Project p ) { } public PatternSet createPatternSet ( ) { } public NameEntry createInclude ( ) { } public NameEntry createExclude ( ) { } public void setIncludes ( String includes ) { } public void setExcludes ( String excludes ) { } public void setIncludesfile ( File incl ) throws BuildException { } public void setExcludesfile ( File excl ) throws BuildException { } public void setDefaultexcludes ( boolean useDefaultExcludes ) { } public DirectoryScanner getDirectoryScanner ( Project p ) { } public void setupDirectoryScanner ( FileScanner ds , Project p ) { } protected FileSet getRef ( Project p ) { } }

Fix:
if ( ( ( dir ) != null ) || ( defaultPatterns . hasPatterns ( ) ) ) {
Buggy code:
public class WebServer { public static void start ( ) { Log . info ( "WebServer" , "Starting" ) ; Spark . port ( conf . get ( "Web" , "port" , Integer . class ) ) ; <START_BUG> Spark . staticFileLocation ( conf . fetch ( "Paths" , "output" ) ) ; <END_BUG> Spark . get ( "//stop" , ( request , response ) -> { Spark . stop ( ) ; return null ; } ) ; } }

Fix:
Spark . externalStaticFileLocation ( conf . fetch ( "Paths" , "output" ) ) ;
Buggy code:
public class TheRTypeChecker { public static void checkTypes ( List < TheRExpression > arguments , TheRFunctionExpression functionExpression ) throws MatchingException { } public static boolean matchTypes ( TheRType type , TheRType replacementType ) { if ( type instanceof TheRUnionType ) { return ( ( TheRUnionType ) ( type ) ) . contains ( replacementType ) ; } <START_BUG> return ( type . equals ( replacementType ) ) || ( TheRTypeProvider . isSubtype ( type , replacementType ) ) ; <END_BUG> } public static void matchArgs ( List < TheRExpression > arguments , TheRFunctionExpression function , Map < TheRExpression , TheRParameter > matchedParams , List < TheRExpression > matchedByTripleDot , TheRFunctionType functionType ) throws MatchingException { } static void partialMatching ( ArrayList < TheRParameter > formalArguments , ArrayList < TheRExpression > suppliedArguments , Map < TheRExpression , TheRParameter > matchedParams ) throws MatchingException { } static void exactMatching ( ArrayList < TheRParameter > formalArguments , ArrayList < TheRExpression > suppliedArguments , Map < TheRExpression , TheRParameter > matchedParams ) throws MatchingException { } static void positionalMatching ( List < TheRParameter > formalArguments , List < TheRExpression > suppliedArguments , Map < TheRExpression , TheRParameter > matchedParams , List < TheRExpression > matchedByTripleDot , TheRFunctionType functionType ) throws MatchingException { } private static String generateMissingArgErrorMessage ( List < TheRParameter > parameters , int i ) { } private static List < TheRParameter > getMatches ( String name , List < TheRParameter > parameters , boolean usePartial ) { } private static List < TheRExpression > getNamedArguments ( List < TheRExpression > arguments ) { } private static void matchParams ( List < TheRParameter > parameters , List < TheRExpression > arguments , boolean usePartialMatching , Map < TheRExpression , TheRParameter > matchedParams ) throws MatchingException { } private static void checkUnmatchedArgs ( List < TheRExpression > arguments ) throws MatchingException { } }

Fix:
return ( type . equals ( replacementType ) ) || ( TheRTypeProvider . isSubtype ( replacementType , type ) ) ;
Buggy code:
public class Property extends AbstractContainerTask implements Configurable { private static final Resources REZ = ResourceManager . getPackageResources ( Property . class ) ; private String m_name ; private Object m_value ; private boolean m_localScope = true ; public void configure ( final Configuration configuration ) throws ConfigurationException { final String [ ] attributes = configuration . getAttributeNames ( ) ; for ( int i = 0 ; i < ( attributes . length ) ; i ++ ) { final String name = attributes [ i ] ; final String value = configuration . getAttribute ( name ) ; configure ( this , name , value ) ; } final Configuration [ ] children = configuration . getChildren ( ) ; for ( int i = 0 ; i < ( children . length ) ; i ++ ) { try { <START_BUG> final TypeFactory typeFactory = getTypeFactory ( ROLE ) ; <END_BUG> final DataType value = ( ( DataType ) ( typeFactory . create ( children [ i ] . getName ( ) ) ) ) ; configure ( value , children [ i ] ) ; setValue ( value ) ; } catch ( final Exception e ) { final String message = Property . REZ . getString ( "property.no-set.error" ) ; throw new ConfigurationException ( message , e ) ; } } } public void setName ( final String name ) { } public void setValue ( final Object value ) throws TaskException { } public void setLocalScope ( final boolean localScope ) { } public void execute ( ) throws TaskException { } }

Fix:
final TypeFactory typeFactory = getTypeFactory ( DataType . class ) ;
Buggy code:
public class TransparentProxyTest extends AbstractRemoteServiceTest { protected String getClientContainerName ( ) { <START_BUG> return Generic . CLIENT_CONTAINER_NAME ; <END_BUG> } protected void setUp ( ) throws Exception { } protected void tearDown ( ) throws Exception { } public void testTransparentProxy ( ) throws Exception { } }

Fix:
return Generic . CONSUMER_CONTAINER_TYPE ;