nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Test { public static void main ( String [ ] args ) throws IOException , ClassNotFoundException , GitAPIException , InvalidRemoteException , TransportException { new Settings ( ) ; DataStatistics ds = new DataStatistics ( ) ; ds . init ( ) ; DownloadRepo dr = new DownloadRepo ( ) ; <START_BUG> dr . pullRepo ( "ckaestne" , "TypeChef" ) ; <END_BUG> } }

Fix:
dr . cloneRepo ( "ckaestne" , "TypeChef" ) ;
Buggy code:
public class BackgroundInitializerTest { private void checkInitialize ( BackgroundInitializerTest . BackgroundInitializerTestImpl init ) { } @ Test public void testInitialize ( ) { } @ Test public void testGetActiveExecutorBeforeStart ( ) { } @ Test public void testGetActiveExecutorExternal ( ) { } @ Test public void testGetActiveExecutorTemp ( ) { } @ Test public void testInitializeTempExecutor ( ) { } @ Test public void testSetExternalExecutor ( ) throws Exception { } @ Test public void testSetExternalExecutorAfterStart ( ) throws ConcurrentException { } @ Test public void testStartMultipleTimes ( ) { } @ Test ( expected = IllegalStateException . class ) public void testGetBeforeStart ( ) throws ConcurrentException { } @ Test public void testGetRuntimeException ( ) throws Exception { } @ Test public void testGetCheckedException ( ) throws Exception { } @ Test public void testGetInterruptedException ( ) throws Exception { } @ Test public void testIsStartedFalse ( ) { } @ Test public void testIsStartedTrue ( ) { } @ Test public void testIsStartedAfterGet ( ) { } private static class BackgroundInitializerTestImpl extends BackgroundInitializer < Integer > { Exception ex ; boolean shouldSleep ; volatile int initializeCalls ; public BackgroundInitializerTestImpl ( ) { } public BackgroundInitializerTestImpl ( ExecutorService exec ) { } @ Override protected Integer initialize ( ) throws Exception { if ( ( ex ) != null ) { throw ex ; } if ( shouldSleep ) { Thread . sleep ( 60000L ) ; } <START_BUG> return ++ ( initializeCalls ) ; <END_BUG> } } }

Fix:
return Integer . valueOf ( ( ++ ( initializeCalls ) ) ) ;
Buggy code:
public class EditorController { @ FXML private ToggleGroup modes ; @ FXML private ScrollPane nodes ; @ FXML private MenuItem addPlatform ; private ContextMenu addPopup ; private Mode mode ; private Point popupPos ; private Level level ; private Stage window ; @ FXML public void setMove ( ) { } @ FXML public void setAdd ( ) { } public ScrollPane getScrollPane ( ) { } public Mode getMode ( ) { } public void setStage ( Stage stage ) { } @ FXML public void addPlatform ( ) { } @ FXML private void initialize ( ) { } public void setLevel ( Level l ) { level = l ; ( ( Group ) ( nodes . getContent ( ) ) ) . getChildren ( ) . addAll ( level . getAllPlatforms ( ) ) ; level . getAllPlatforms ( ) . parallelStream ( ) . forEach ( ( p ) -> p . setupEditFunctions ( ) ) ; <START_BUG> level . addDragpoints ( ( ( Group ) ( nodes . getContent ( ) ) ) ) ; <END_BUG> setupPlatformUpdates ( ) ; } public void setupContextMenu ( ) { } @ SuppressWarnings ( "rawtypes" ) public void setupPlatformUpdates ( ) { } @ FXML public void save ( ) { } @ FXML public void saveAndExit ( ) { } @ FXML public void saveAs ( ) { } }

Fix:
( ( Group ) ( nodes . getContent ( ) ) ) . getChildren ( ) . addAll ( level . getDragpoints ( ) ) ;
Buggy code:
public class EnumType extends Type { private List < EnumField > fields ; public EnumType ( String name , List < EnumField > fields ) { } public List < EnumField > getFields ( ) { } @ Override public void analyze ( AnalysisContext context ) { Set < String > enumNames = new HashSet < String > ( ) ; for ( EnumField field : fields ) { <START_BUG> if ( ! ( fieldNames . add ( field . getName ( ) ) ) ) { <END_BUG> context . error ( "duplicate_field" , field . getName ( ) , this . getName ( ) ) ; } } for ( EnumField field : fields ) { field . analyze ( context ) ; } } public EnumField getField ( String fieldName , AnalysisContext context ) { } }

Fix:
if ( ! ( enumNames . add ( field . getName ( ) ) ) ) {
Buggy code:
public class TestSizeBoundedOptimize extends LuceneTestCase { private void addDocs ( IndexWriter writer , int numDocs ) throws IOException { } private static IndexWriterConfig newWriterConfig ( ) throws IOException { } public void testByteSizeLimit ( ) throws Exception { Directory dir = new RAMDirectory ( ) ; IndexWriterConfig conf = TestSizeBoundedOptimize . newWriterConfig ( ) ; IndexWriter writer = new IndexWriter ( dir , conf ) ; final int numSegments = 15 ; for ( int i = 0 ; i < numSegments ; i ++ ) { int numDocs = ( i == 7 ) ? 30 : 1 ; addDocs ( writer , numDocs ) ; } writer . close ( ) ; SegmentInfos sis = new SegmentInfos ( ) ; sis . read ( dir ) ; <START_BUG> double min = sis . info ( 0 ) . sizeInBytes ( ) ; <END_BUG> conf = TestSizeBoundedOptimize . newWriterConfig ( ) ; LogByteSizeMergePolicy lmp = new LogByteSizeMergePolicy ( ) ; lmp . setMaxMergeMB ( ( ( min + 1 ) // ( 1 << 20 ) ) ) ; conf . setMergePolicy ( lmp ) ; writer = new IndexWriter ( dir , conf ) ; writer . optimize ( ) ; writer . close ( ) ; sis = new SegmentInfos ( ) ; sis . read ( dir ) ; assertEquals ( 3 , sis . size ( ) ) ; } public void testNumDocsLimit ( ) throws Exception { } public void testLastSegmentTooLarge ( ) throws Exception { } public void testFirstSegmentTooLarge ( ) throws Exception { } public void testAllSegmentsSmall ( ) throws Exception { } public void testAllSegmentsLarge ( ) throws Exception { } public void testOneLargeOneSmall ( ) throws Exception { } public void testMergeFactor ( ) throws Exception { } public void testSingleNonOptimizedSegment ( ) throws Exception { } public void testSingleOptimizedSegment ( ) throws Exception { } public void testSingleNonOptimizedTooLargeSegment ( ) throws Exception { } }

Fix:
double min = sis . info ( 0 ) . sizeInBytes ( true ) ;
Buggy code:
public abstract class UnivariateRealSolverImpl extends ConvergingAlgorithmImpl implements UnivariateRealSolver { protected double functionValueAccuracy ; protected double defaultFunctionValueAccuracy ; protected boolean resultComputed = false ; protected double result ; protected double functionValue ; @ Deprecated protected UnivariateRealFunction f ; @ Deprecated protected UnivariateRealSolverImpl ( final UnivariateRealFunction f , final int defaultMaximalIterationCount , final double defaultAbsoluteAccuracy ) { } protected UnivariateRealSolverImpl ( final int defaultMaximalIterationCount , final double defaultAbsoluteAccuracy ) { } protected void checkResultComputed ( ) throws IllegalStateException { } public double getResult ( ) { } public double getFunctionValue ( ) { } public void setFunctionValueAccuracy ( final double accuracy ) { } public double getFunctionValueAccuracy ( ) { } public void resetFunctionValueAccuracy ( ) { } protected final void setResult ( final double newResult , final int iterationCount ) { } protected final void setResult ( final double x , final double fx , final int iterationCount ) { } protected final void clearResult ( ) { } protected boolean isBracketing ( final double lower , final double upper , final UnivariateRealFunction function ) throws FunctionEvaluationException { } protected boolean isSequence ( final double start , final double mid , final double end ) { } protected void verifyInterval ( final double lower , final double upper ) { if ( lower >= upper ) { <START_BUG> throw MathRuntimeException . createIllegalArgumentException ( "endpoints<seq2seq4repair_space>do<seq2seq4repair_space>not<seq2seq4repair_space>specify<seq2seq4repair_space>an<seq2seq4repair_space>interval:<seq2seq4repair_space>[{0},<seq2seq4repair_space>{1}]" , lower , upper ) ; <END_BUG> } } protected void verifySequence ( final double lower , final double initial , final double upper ) { } protected void verifyBracketing ( final double lower , final double upper , final UnivariateRealFunction function ) throws FunctionEvaluationException { } }

Fix:
throw MathRuntimeException . createIllegalArgumentException ( ENDPOINTS_NOT_AN_INTERVAL , lower , upper ) ;
Buggy code:
public class Sentence2Pinyin { public static void decare ( List < List < String > > nameArray , List < String > IpinyinList , List < String > firstWordsList , int depth , String sep ) { ArrayList < String > result = new ArrayList < String > ( ) ; result . add ( "" ) ; for ( List pinyinlist : nameArray ) { if ( ( pinyinlist . size ( ) ) >= depth ) { pinyinlist = pinyinlist . subList ( 0 , depth ) ; } ArrayList < String > tmpPinyinList = new ArrayList < > ( ) ; for ( String partialResult : result ) { for ( Object pinyin : pinyinlist ) { if ( partialResult . equals ( "" ) ) { tmpPinyinList . add ( ( ( ( String ) ( pinyin ) ) + "<seq2seq4repair_space>" ) ) ; } else { tmpPinyinList . add ( ( ( partialResult + ( ( String ) ( pinyin ) ) ) + "<seq2seq4repair_space>" ) ) ; } } } result = tmpPinyinList ; } for ( String pinyin : result ) { StringBuilder tmpFirstLetterStr = new StringBuilder ( ) ; String [ ] splitedPinyin = pinyin . split ( "<seq2seq4repair_space>" ) ; StringBuilder stringBuilder = new StringBuilder ( ) ; for ( String wordsPinyin : splitedPinyin ) { stringBuilder . append ( wordsPinyin ) ; <START_BUG> if ( ( pinyin . length ( ) ) > 0 ) { <END_BUG> tmpFirstLetterStr . append ( wordsPinyin . substring ( 0 , 1 ) ) ; } } IpinyinList . add ( stringBuilder . toString ( ) ) ; firstWordsList . add ( tmpFirstLetterStr . toString ( ) ) ; } } static HashMap totalWordsHashMap = new HashMap ( ) ; public static void loadTatalWordsPinyin ( ) { } public static void getPinyin ( String Iname , ArrayList < String > IpinyinList , ArrayList < String > IfirstWordPinyin ) { } public static void getPinyin ( String Iname , ArrayList < String > pinyinList , ArrayList < String > firstWordPinyin , int width ) { } public static void getPinyin ( String Iname , ArrayList < String > pinyinList , ArrayList < String > firstWordPinyin , int width , int depth ) { } public static void getPinyin ( String Iname , ArrayList < String > pinyinList , ArrayList < String > firstWordPinyin , int width , int depth , String sep ) { } public static void main ( String [ ] args ) { } }

Fix:
if ( ( wordsPinyin . length ( ) ) > 0 ) {
Buggy code:
public class NativeManagementAddHandler extends AbstractAddStepHandler { public static final String OPERATION_NAME = ModelDescriptionConstants . ADD ; private final LocalHostControllerInfoImpl hostControllerInfo ; public NativeManagementAddHandler ( final LocalHostControllerInfoImpl hostControllerInfo ) { } protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override protected boolean requiresRuntime ( OperationContext context ) { } @ Override protected void performRuntime ( final OperationContext context , final ModelNode operation , final ModelNode model , final ServiceVerificationHandler verificationHandler , final List < ServiceController < ? > > newControllers ) throws OperationFailedException { NativeManagementAddHandler . populateHostControllerInfo ( hostControllerInfo , context , model ) ; final ServiceTarget serviceTarget = context . getServiceTarget ( ) ; <START_BUG> ManagementChannelRegistryService . addService ( serviceTarget ) ; <END_BUG> ManagementRemotingServices . installRemotingEndpoint ( serviceTarget , MANAGEMENT_ENDPOINT , hostControllerInfo . getLocalHostName ( ) , MANAGEMENT , null , null ) ; final boolean onDemand = context . isBooting ( ) ; NativeManagementAddHandler . installNativeManagementServices ( serviceTarget , hostControllerInfo , verificationHandler , newControllers , onDemand ) ; } static void populateHostControllerInfo ( LocalHostControllerInfoImpl hostControllerInfo , OperationContext context , ModelNode model ) throws OperationFailedException { } public static void installNativeManagementServices ( final ServiceTarget serviceTarget , final LocalHostControllerInfo hostControllerInfo , final ServiceVerificationHandler verificationHandler , final List < ServiceController < ? > > newControllers , final boolean onDemand ) { } }

Fix:
ManagementChannelRegistryService . addService ( serviceTarget , MANAGEMENT_ENDPOINT ) ;
Buggy code:
public class OI { private final Joystick driverPad = new Joystick ( RobotMap . DRIVE_PAD ) ; private final Joystick operatorPad = new Joystick ( RobotMap . OPERATOR_PAD ) ; private Button headingButton = new edu . wpi . first . wpilibj . buttons . JoystickButton ( driverPad , 1 ) ; private Button fieldCentricButton = new edu . wpi . first . wpilibj . buttons . JoystickButton ( driverPad , 2 ) ; private Button resetGyroButton = new edu . wpi . first . wpilibj . buttons . JoystickButton ( driverPad , 7 ) ; public int getPOVDirection ( ) { } public double getJoystickX ( ) { } public double getJoystickY ( ) { } public double getJoystickSpin ( ) { } public boolean isHoldHeading ( ) { } public boolean isFieldCentric ( ) { } public boolean isResetGyroButton ( ) { } public double getOperatorJoystickY ( ) { <START_BUG> return Utils . deadband ( operatorPad . getRawAxis ( 1 ) , 0.1 , 0 ) ; <END_BUG> } }

Fix:
return - ( Utils . deadband ( operatorPad . getRawAxis ( 1 ) , 0.1 , 0 ) ) ;
Buggy code:
@ Service @ ApplicationScoped public class ProjectServiceImpl extends AbstractProjectService < Project > implements ProjectService < Project > { public ProjectServiceImpl ( ) { } @ Inject public ProjectServiceImpl ( @ Named ( "ioStrategy" ) IOService ioService , POMService pomService , ProjectConfigurationContentHandler projectConfigurationContentHandler , ConfigurationService configurationService , ConfigurationFactory configurationFactory , Event < NewProjectEvent > newProjectEvent , Event < NewPackageEvent > newPackageEvent , Event < RenameProjectEvent > renameProjectEvent , Event < DeleteProjectEvent > deleteProjectEvent , Event < InvalidateDMOProjectCacheEvent > invalidateDMOCache , User identity , SessionInfo sessionInfo ) { } @ Override public Project resolveProject ( final Path resource ) { } @ Override public Project newProject ( final Repository repository , final String projectName , final POM pom , final String baseUrl ) { final FileSystem fs = Paths . convert ( repository . getRoot ( ) ) . getFileSystem ( ) ; try { final Path fsRoot = repository . getRoot ( ) ; final Path projectRootPath = Paths . convert ( Paths . convert ( fsRoot ) . resolve ( projectName ) ) ; ioService . startBatch ( new FileSystem [ ] { fs } , makeCommentedOption ( ( ( "New<seq2seq4repair_space>project<seq2seq4repair_space>[" + projectName ) + "]" ) ) ) ; pomService . create ( projectRootPath , baseUrl , pom ) ; final Project project = resolveProject ( projectRootPath ) ; <START_BUG> newProjectEvent . fire ( new NewProjectEvent ( project , sessionInfo ) ) ; <END_BUG> final String [ ] legalJavaGroupId = IdentifierUtils . convertMavenIdentifierToJavaIdentifier ( pom . getGav ( ) . getGroupId ( ) . split ( "\\." , ( - 1 ) ) ) ; final String [ ] legalJavaArtifactId = IdentifierUtils . convertMavenIdentifierToJavaIdentifier ( pom . getGav ( ) . getArtifactId ( ) . split ( "\\." , ( - 1 ) ) ) ; final String defaultWorkspacePath = ( ( StringUtils . join ( legalJavaGroupId , "//" ) ) + "//" ) + ( StringUtils . join ( legalJavaArtifactId , "//" ) ) ; final Path defaultPackagePath = Paths . convert ( Paths . convert ( projectRootPath ) . resolve ( MAIN_RESOURCES_PATH ) ) ; final Package defaultPackage = resolvePackage ( defaultPackagePath ) ; final Package defaultWorkspacePackage = doNewPackage ( defaultPackage , defaultWorkspacePath , false ) ; newPackageEvent . fire ( new NewPackageEvent ( defaultWorkspacePackage ) ) ; return project ; } catch ( Exception e ) { throw ExceptionUtilities . handleException ( e ) ; } finally { ioService . endBatch ( ) ; } } @ Override public Project simpleProjectInstance ( final org . uberfire . java . nio . file . Path nioProjectRootPath ) { } @ Override public Project resolveParentProject ( Path resource ) { } @ Override public Project resolveToParentProject ( Path resource ) { } No newline ; at end ; of file ; }

Fix:
newProjectEvent . fire ( new NewProjectEvent ( project , getSessionId ( ) , getIdentityName ( ) ) ) ;
Buggy code:
public class DefaultDeployer extends AbstractLogEnabled implements Composable , Deployer { private static final Resources REZ = ResourceManager . getPackageResources ( DefaultDeployer . class ) ; private Deployer m_parent ; private ComponentManager m_componentManager ; private PackageManager m_packageManager ; private Map m_classLoaderDeployers = new HashMap ( ) ; private Map m_fileDeployers ; public DefaultDeployer ( ) { } private DefaultDeployer ( final DefaultDeployer parent ) { } public void compose ( final ComponentManager componentManager ) throws ComponentException { } public Deployer createChildDeployer ( ComponentManager componentManager ) throws ComponentException { } public TypeDeployer createDeployer ( final ClassLoader loader ) throws DeploymentException { } public TypeDeployer createDeployer ( final File file ) throws DeploymentException { try { <START_BUG> URLClassLoader classLoader = getClassLoaderForFile ( file ) ; <END_BUG> return createDeployment ( classLoader , file . toURL ( ) ) ; } catch ( Exception e ) { final String message = DefaultDeployer . REZ . getString ( "deploy-from-file.error" , file ) ; throw new DeploymentException ( message , e ) ; } } private URLClassLoader getClassLoaderForFile ( final File file ) throws Exception { } private Deployment createDeployment ( final ClassLoader loader , final URL jarUrl ) throws Exception { } private URL [ ] buildClasspath ( final File file , final File [ ] dependencies ) throws MalformedURLException { } private File [ ] getOptionalPackagesFor ( final File typeLibrary ) throws Exception { } private void checkFile ( final File file ) throws DeploymentException { } }

Fix:
final URLClassLoader classLoader = getClassLoaderForFile ( file ) ;
Buggy code:
public class WordCountTopology { public static class SplitSentence extends ShellBolt implements IRichBolt { public SplitSentence ( ) { } @ Override public void declareOutputFields ( OutputFieldsDeclarer declarer ) { } @ Override public Map < String , Object > getComponentConfiguration ( ) { } } public static class WordCount extends BaseBasicBolt { Map < String , Integer > counts = new HashMap < String , Integer > ( ) ; @ Override public void execute ( Tuple tuple , BasicOutputCollector collector ) { } @ Override public void declareOutputFields ( OutputFieldsDeclarer declarer ) { } } public static void main ( String [ ] args ) throws Exception { TopologyBuilder builder = new TopologyBuilder ( ) ; builder . setSpout ( "spout" , new RandomSentenceSpout ( ) , 5 ) ; builder . setBolt ( "split" , new WordCountTopology . SplitSentence ( ) , 8 ) . shuffleGrouping ( "spout" ) ; builder . setBolt ( "count" , new WordCountTopology . WordCount ( ) , 12 ) . fieldsGrouping ( "split" , new Fields ( "word" ) ) ; Config conf = new Config ( ) ; conf . setDebug ( true ) ; if ( ( args != null ) && ( ( args . length ) > 0 ) ) { conf . setNumWorkers ( 3 ) ; <START_BUG> StormSubmitter . submitTopologyWithProgressBar ( args [ 0 ] , conf , builder . createTopology ( ) ) ; <END_BUG> } else { conf . setMaxTaskParallelism ( 3 ) ; LocalCluster cluster = new LocalCluster ( ) ; cluster . submitTopology ( "word-count" , conf , builder . createTopology ( ) ) ; Thread . sleep ( 10000 ) ; cluster . shutdown ( ) ; } } }

Fix:
StormSubmitter . submitTopology ( args [ 0 ] , conf , builder . createTopology ( ) ) ;
Buggy code:
public class Elfo { private String nome ; private int experiencia ; private int flechas = 42 ; public Elfo ( String nome ) { } public Elfo ( String nome , int flechas ) { } public void atirarFlecha ( Dwarf dwarf ) { ( experiencia ) ++ ; ( flechas ) -- ; <START_BUG> dwarf . perdeVida ( ) ; <END_BUG> } public int getFlechas ( ) { } public int getExperiencia ( ) { } public String getNome ( ) { } public String toString ( ) { } No newline ; at end ; of file ; }

Fix:
dwarf . receberFlecha ( ) ;
Buggy code:
public abstract class Tournoi { private ArrayList < Equipe > equipes = new ArrayList < Equipe > ( ) ; private Scanner sc1 ; private Scanner sc2 ; public void pasEgalite ( Equipe eq1 , Equipe eq2 ) { } public void saisieScores ( Equipe eq1 , Equipe eq2 ) { } public void ajoutTeamDynamique ( Equipe uneTeam ) { } public Equipe [ ] ajoutTeamFixe ( int i , Equipe [ ] tab , Equipe uneTeam ) { } public void winLose ( Equipe eq1 , Equipe eq2 ) { } public void affichage ( Equipe [ ] tab ) { } public Equipe best ( Equipe [ ] tab ) { } public Equipe teamGagnante ( Equipe teamUn , Equipe teamDeux ) { } public boolean rechercheEquipe ( String nom ) { <START_BUG> Iterator < Equipe > it = equipes . iterator ( ) ; <END_BUG> while ( ( it . hasNext ( ) ) == true ) { Equipe e = it . next ( ) ; if ( ( e . getDescription ( ) . matches ( nom ) ) == true ) { return true ; } } return false ; } public List < Equipe > getEquipes ( ) { } public void setEquipes ( ArrayList < Equipe > equipes ) { } No newline ; at end ; of file ; }

Fix:
Iterator < Equipe > it = getEquipes ( ) . iterator ( ) ;
Buggy code:
public class Start { private static MegaMole mole ; public static void main ( String [ ] args ) { <START_BUG> Start . mole = MegaMole . getMole ( ) ; <END_BUG> Start . mole . start ( ) ; } No newline ; at end ; of file ; }

Fix:
Start . mole = MegaMole . getMegaMole ( ) ;
Buggy code:
@ Component public class KeyPairPlugin extends AbstractFullstopPlugin { private static final Logger LOG = LoggerFactory . getLogger ( KeyPairPlugin . class ) ; private static final String EC2_SOURCE_EVENTS = "ec2.amazonaws.com" ; private static final String EVENT_NAME = "RunInstances" ; private final ClientProvider cachingClientProvider ; private final ViolationStore violationStore ; @ Autowired public KeyPairPlugin ( final ClientProvider cachingClientProvider , final ViolationStore violationStore ) { } @ Override public boolean supports ( final CloudTrailEvent event ) { } @ Override public void processEvent ( final CloudTrailEvent event ) { List < String > keyNames = CloudtrailEventSupport . containsKeyNames ( event . getEventData ( ) . getRequestParameters ( ) ) ; if ( ! ( CollectionUtils . isEmpty ( keyNames ) ) ) { <START_BUG> violationStore . save ( String . format ( "KeyPair<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>blank,<seq2seq4repair_space>but<seq2seq4repair_space>was<seq2seq4repair_space>{}" , keyNames ) ) ; <END_BUG> } } }

Fix:
violationStore . save ( String . format ( "KeyPair<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>blank,<seq2seq4repair_space>but<seq2seq4repair_space>was<seq2seq4repair_space>%s" , keyNames ) ) ;
Buggy code:
public class _Suite extends BaseTestCase { private _Suite ( String name ) { } public static Test suite ( ) { TestSuite suite = new TestSuite ( "store" ) ; suite . addTest ( BootAllTest . suite ( ) ) ; suite . addTest ( ClassLoaderBootTest . suite ( ) ) ; suite . addTest ( StreamingColumnTest . suite ( ) ) ; suite . addTest ( Derby3625Test . suite ( ) ) ; suite . addTest ( Derby4577Test . suite ( ) ) ; <START_BUG> suite . addTest ( Derby151Test . suite ( ) ) ; <END_BUG> suite . addTest ( Derby4676Test . suite ( ) ) ; suite . addTest ( BootLockTest . suite ( ) ) ; suite . addTest ( PositionedStoreStreamTest . suite ( ) ) ; suite . addTest ( OSReadOnlyTest . suite ( ) ) ; suite . addTest ( BackupRestoreTest . suite ( ) ) ; suite . addTest ( OfflineBackupTest . suite ( ) ) ; suite . addTest ( LiveLockTest . suite ( ) ) ; suite . addTest ( ClobReclamationTest . suite ( ) ) ; suite . addTest ( IndexSplitDeadlockTest . suite ( ) ) ; suite . addTest ( HoldCursorJDBC30Test . suite ( ) ) ; suite . addTest ( AccessTest . suite ( ) ) ; if ( SanityManager . DEBUG ) { suite . addTest ( HoldCursorExternalSortJDBC30Test . suite ( ) ) ; } if ( JDBC . vmSupportsJDBC3 ( ) ) { suite . addTest ( EncryptionKeyAESTest . suite ( ) ) ; suite . addTest ( EncryptionKeyBlowfishTest . suite ( ) ) ; suite . addTest ( EncryptionKeyDESTest . suite ( ) ) ; suite . addTest ( EncryptionAESTest . suite ( ) ) ; } return suite ; } }

Fix:
suite . addTest ( InterruptResilienceTest . suite ( ) ) ;
Buggy code:
public class FilenameSelector extends BaseExtendSelector { private String pattern = null ; private String regex = null ; private boolean casesensitive = true ; private boolean negated = false ; public static final String NAME_KEY = "name" ; public static final String CASE_KEY = "casesensitive" ; public static final String NEGATE_KEY = "negate" ; public static final String REGEX_KEY = "regex" ; private RegularExpression reg ; private Regexp expression ; public FilenameSelector ( ) { } public String toString ( ) { <START_BUG> StringBuffer buf = new StringBuffer ( "{filenameselector<seq2seq4repair_space>name:<seq2seq4repair_space>" ) ; <END_BUG> if ( ( pattern ) != null ) { buf . append ( pattern ) ; } if ( ( regex ) != null ) { buf . append ( regex ) . append ( "<seq2seq4repair_space>[as<seq2seq4repair_space>regular<seq2seq4repair_space>expression]" ) ; } buf . append ( "<seq2seq4repair_space>negate:<seq2seq4repair_space>" ) . append ( negated ) ; buf . append ( "<seq2seq4repair_space>casesensitive:<seq2seq4repair_space>" ) . append ( casesensitive ) ; buf . append ( "}" ) ; return buf . toString ( ) ; } public void setName ( String pattern ) { } public void setRegex ( String pattern ) { } public void setCasesensitive ( boolean casesensitive ) { } public void setNegate ( boolean negated ) { } public void setParameters ( Parameter [ ] parameters ) { } public void verifySettings ( ) { } public boolean isSelected ( File basedir , String filename , File file ) { } }

Fix:
StringBuilder buf = new StringBuilder ( "{filenameselector<seq2seq4repair_space>name:<seq2seq4repair_space>" ) ;
Buggy code:
public class CCCheckout extends ClearCase { public static final String FLAG_RESERVED = "-reserved" ; public static final String FLAG_UNRESERVED = "-unreserved" ; public static final String FLAG_OUT = "-out" ; public static final String FLAG_NODATA = "-ndata" ; public static final String FLAG_BRANCH = "-branch" ; public static final String FLAG_VERSION = "-version" ; public static final String FLAG_NOWARN = "-nwarn" ; public static final String FLAG_COMMENT = "-c" ; public static final String FLAG_COMMENTFILE = "-cfile" ; public static final String FLAG_NOCOMMENT = "-nc" ; private boolean m_Reserved = true ; private String m_Out = null ; private boolean m_Ndata = false ; private String m_Branch = null ; private boolean m_Version = false ; private boolean m_Nwarn = false ; private String m_Comment = null ; private String m_Cfile = null ; public void setBranch ( String branch ) { } public void setComment ( String comment ) { } public void setCommentFile ( String cfile ) { } public void setNoData ( boolean ndata ) { } public void setNoWarn ( boolean nwarn ) { } public void setOut ( String outf ) { } public void setReserved ( boolean reserved ) { } public void setVersion ( boolean version ) { } public String getBranch ( ) { } public String getComment ( ) { } public String getCommentFile ( ) { } public boolean getNoData ( ) { } public boolean getNoWarn ( ) { } public String getOut ( ) { } public boolean getReserved ( ) { } public boolean getVersion ( ) { } public void execute ( ) throws BuildException { Commandline commandLine = new Commandline ( ) ; Project aProj = getProject ( ) ; int result = 0 ; if ( ( getViewPath ( ) ) == null ) { setViewPath ( aProj . getBaseDir ( ) . getPath ( ) ) ; } commandLine . setExecutable ( getClearToolCommand ( ) ) ; commandLine . createArgument ( ) . setValue ( COMMAND_CHECKOUT ) ; checkOptions ( commandLine ) ; result = run ( commandLine ) ; if ( result != 0 ) { String msg = "Failed<seq2seq4repair_space>executing:<seq2seq4repair_space>" + ( commandLine . toString ( ) ) ; <START_BUG> throw new BuildException ( msg , location ) ; <END_BUG> } } private void getBranchCommand ( Commandline cmd ) { } private void getCommentCommand ( Commandline cmd ) { } private void getCommentFileCommand ( Commandline cmd ) { } private void getOutCommand ( Commandline cmd ) { } private void checkOptions ( Commandline cmd ) { } }

Fix:
throw new BuildException ( msg ) ;
Buggy code:
@ SuppressWarnings ( "unused" ) public class EventEntityUpdate { @ SubscribeEvent public void PlayerTickEvent ( LivingEvent . LivingUpdateEvent event ) { if ( ( event . entityLiving ) instanceof EntityPlayer ) { EntityPlayer player = ( ( EntityPlayer ) ( event . entityLiving ) ) ; NBTTagCompound tag = player . getEntityData ( ) ; int linkCooldown = tag . getInteger ( "LinkCooldown" ) ; <START_BUG> if ( linkCooldown != ( - 0 ) ) { <END_BUG> linkCooldown -- ; tag . setInteger ( "LinkCooldown" , linkCooldown ) ; } } } }

Fix:
if ( linkCooldown > 0 ) {
Buggy code:
public class TextBuddyTest { @ Test public void testExcecuteCommand ( ) { TextBuddy . checkFileExist ( ) ; <START_BUG> TextBuddy . executeCommand ( "search<seq2seq4repair_space>soft" ) ; <END_BUG> } }

Fix:
TextBuddy . executeCommand ( "search<seq2seq4repair_space>software" ) ;
Buggy code:
public class Hello implements IHello { public void hello ( String from ) { <START_BUG> System . out . println ( ( ( ( this . getClass ( ) . getName ( ) ) + ".hello<seq2seq4repair_space>from=" ) + from ) ) ; <END_BUG> } }

Fix:
System . out . println ( ( "hello<seq2seq4repair_space>from=" + from ) ) ;
Buggy code:
public class PaintAction { private static PaintAction INSTANCE ; private static Logger log = Logger . getLogger ( PaintAction . class ) ; private PaintAction ( ) { } public static PaintAction inst ( ) { } public LOG_ENTRY_TYPE isValidTerm ( String go_id , Bioentity node , Tree tree ) { if ( node . isPruned ( ) ) { return LOG_ENTRY_TYPE . PRUNE ; } if ( OWLutil . isExcluded ( go_id ) ) { return LOG_ENTRY_TYPE . EXCLUDED ; } if ( ( OWLutil . isAnnotatedToTerm ( node . getAnnotations ( ) , go_id ) ) != null ) { return LOG_ENTRY_TYPE . ALREADY_ASSOCIATED ; } WithEvidence withs = new WithEvidence ( tree , node , go_id ) ; if ( withs . lacksEvidence ( ) ) { return LOG_ENTRY_TYPE . UNSUPPORTED ; } if ( OWLutil . descendantsAllBroader ( node , go_id , true ) ) { return LOG_ENTRY_TYPE . TOO_SPECIFIC ; } <START_BUG> if ( ! ( TaxonChecker . checkTaxons ( node , go_id ) ) ) { <END_BUG> return LOG_ENTRY_TYPE . WRONG_TAXA ; } return null ; } public GeneAnnotation propagateAssociation ( Family family , Bioentity node , String go_id , String date , int qualifiers ) { } private GeneAnnotation _propagateAssociation ( Bioentity node , String go_id , int qualifiers , String reference , String date , boolean negate , List < String > top_with , List < String > exp_withs ) { } private GeneAnnotation createAnnotation ( Bioentity node , String go_id , int qualifiers , String reference , String date , boolean is_MRC , boolean is_directNot , List < String > withs ) { } private void removeMoreGeneralTerms ( Bioentity node , String go_id , List < GeneAnnotation > removed ) { } private void removeMoreGeneralTermsFromNode ( Bioentity node , String go_id , List < GeneAnnotation > removed ) { } public void pruneBranch ( Bioentity node , String date , boolean log_it ) { } private boolean restoreInheritedAssociations ( Family family , Bioentity node ) { } int getGOqualifiers ( int current ) { } private void collectAncestorTerms ( Bioentity ancestral_node , List < GeneAnnotation > ancestral_collection ) { } private synchronized GeneAnnotation _removeAssociation ( Bioentity node , String go_id ) { } public void setNot ( Family family , Bioentity node , GeneAnnotation assoc , String evi_code , boolean log_op ) { } private void propagateNegationDown ( Bioentity node , GeneAnnotation assoc , boolean is_not ) { } }

Fix:
if ( ! ( TaxonChecker . checkTaxons ( tree , node , go_id ) ) ) {
Buggy code:
public class NominatimPOIProvider { public static final String MAPQUEST_POI_SERVICE = "http:////open.mapquestapi.com//nominatim//v1//" ; public static final String NOMINATIM_POI_SERVICE = "http:////nominatim.openstreetmap.org//" ; protected String mService ; public NominatimPOIProvider ( ) { } public void setService ( String serviceUrl ) { } private StringBuffer getCommonUrl ( String facility , int maxResults ) { } private String getUrlInside ( BoundingBoxE6 bb , String type , int maxResults ) { } private String getUrlCloseTo ( GeoPoint p , String type , int maxResults , double maxDistance ) { } public ArrayList < POI > getThem ( String url ) { } public ArrayList < POI > getPOICloseTo ( GeoPoint position , String facility , int maxResults , double maxDistance ) { } public ArrayList < POI > getPOIInside ( BoundingBoxE6 boundingBox , String facility , int maxResults ) { } public ArrayList < POI > getPOIAlong ( ArrayList < GeoPoint > path , String facility , int maxResults , double maxWidth ) { StringBuffer url = getCommonUrl ( facility , maxResults ) ; url . append ( ( "&routewidth=" + maxWidth ) ) ; url . append ( "&route=" ) ; boolean isFirst = true ; for ( GeoPoint p : path ) { if ( isFirst ) isFirst = false ; else url . append ( "," ) ; String lat = Double . toString ( p . getLatitude ( ) ) ; lat = lat . substring ( 0 , Math . min ( lat . length ( ) , 7 ) ) ; String lon = Double . toString ( p . getLongitude ( ) ) ; lon = lon . substring ( 0 , Math . min ( lon . length ( ) , 7 ) ) ; <START_BUG> url . append ( ( ( lat + "," ) + lon ) ) ; <END_BUG> } return getThem ( url . toString ( ) ) ; } }

Fix:
url . append ( ( ( lon + "," ) + lat ) ) ;
Buggy code:
public class Main { public static void main ( String [ ] args ) { String wsAddress = ( ( args . length ) > 0 ) ? args [ 0 ] : "0.0.0.0" ; int wsPort = ( ( args . length ) > 1 ) ? Integer . parseInt ( args [ 1 ] ) : 24444 ; String mcAddress = ( ( args . length ) > 2 ) ? args [ 2 ] : "localhost" ; int mcPort = ( ( args . length ) > 3 ) ? Integer . parseInt ( args [ 3 ] ) : 25565 ; System . out . println ( ( ( ( ( ( ( ( ( "WS(" + wsAddress ) + ":" ) + wsPort ) + ")<seq2seq4repair_space><--><seq2seq4repair_space>MC(" ) + mcAddress ) + ":" ) + mcPort ) + ")" ) ) ; <START_BUG> WebThread webThread = new WebThread ( wsAddress , wsPort , mcAddress , mcPort , null , new PacketFilter ( ) ) ; <END_BUG> webThread . start ( ) ; } }

Fix:
WebThread webThread = new WebThread ( wsAddress , wsPort , mcAddress , mcPort , null , new PacketFilter ( ) , true ) ;
Buggy code:
public class LoginFilter implements Filter { @ Override public void destroy ( ) { } @ Override public void doFilter ( ServletRequest request , ServletResponse response , FilterChain chain ) throws IOException , ServletException { HttpServletRequest req = ( ( HttpServletRequest ) ( request ) ) ; HttpSession session = req . getSession ( ) ; boolean isUserLogged = ( session . getAttribute ( "player" ) ) != null ; HttpServletResponse res = ( ( HttpServletResponse ) ( response ) ) ; try { String requestURI = req . getRequestURI ( ) ; boolean publicPages = requestURI . endsWith ( "faces//index.xhtml" ) ; if ( isUserLogged && ( ( requestURI . endsWith ( "faces//index.xhtml" ) ) || ( requestURI . equals ( req . getContextPath ( ) ) ) ) ) { <START_BUG> res . sendRedirect ( ( ( req . getContextPath ( ) ) + "//game//domino.xhtml" ) ) ; <END_BUG> } else if ( isUserLogged ) { chain . doFilter ( request , response ) ; } else if ( ( ! isUserLogged ) && publicPages ) { chain . doFilter ( request , response ) ; } else { res . sendRedirect ( ( ( req . getContextPath ( ) ) + "//faces//index.xhtml" ) ) ; } } catch ( Exception e ) { e . printStackTrace ( ) ; res . sendRedirect ( ( ( req . getContextPath ( ) ) + "//faces//index.xhtml" ) ) ; } } @ Override public void init ( FilterConfig arg0 ) throws ServletException { } }

Fix:
res . sendRedirect ( ( ( req . getContextPath ( ) ) + "//game//game.xhtml" ) ) ;
Buggy code:
public class PackageResource extends WebResource { private static Map resourceMap = new HashMap ( ) ; final String absolutePath ; final Locale locale ; final String style ; final Class scope ; public static void bind ( Application application , Class scope , String name , Locale locale , String style ) { <START_BUG> Resource resource = application . getSharedResources ( ) . get ( scope , name , locale , style ) ; <END_BUG> if ( resource == null ) { resource = PackageResource . get ( scope , name , locale , style ) ; application . getSharedResources ( ) . add ( scope , name , locale , style , resource ) ; } } public static void bind ( Application application , Class scope , String name ) { } public static PackageResource get ( final Class scope , final String path ) { } public static PackageResource get ( final Class scope , final String path , final Locale locale , final String style ) { } private PackageResource ( final Class scope , final String path , final Locale locale , final String style ) { } public IResourceStream getResourceStream ( ) { } }

Fix:
Resource resource = application . getSharedResources ( ) . get ( scope , name , locale , style , true ) ;
Buggy code:
public class StringToPathConverter extends AbstractConverter { public StringToPathConverter ( ) { } <START_BUG> protected Object convert ( Object original , Context context ) throws ConverterException { <END_BUG> return null ; } }

Fix:
protected Object convert ( Object original , Object context ) throws ConverterException {
Buggy code:
public class PrintMetrics extends HttpServlet { @ EJB private MetricsApiSessionBean metricsApiSessionBean ; private String deploymentName = "myTestDeployment" ; protected void processRequest ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { response . setContentType ( "text//html;charset=UTF-8" ) ; initializeMetricProperties ( ) ; try ( PrintWriter out = response . getWriter ( ) ) { out . println ( "<!DOCTYPE<seq2seq4repair_space>html>" ) ; out . println ( "<html>" ) ; out . println ( "<head>" ) ; out . println ( "<title>Servlet<seq2seq4repair_space>PrintMetrics<//title>" ) ; out . println ( "<//head>" ) ; out . println ( "<body>" ) ; out . println ( "<h1>Servlet<seq2seq4repair_space>PrintMetrics<seq2seq4repair_space>:<seq2seq4repair_space><//h1>" ) ; <START_BUG> metricsApiSessionBean . countClass ( ) ; <END_BUG> out . println ( MetricsCacheApi . printMetricsCache ( deploymentName ) ) ; out . println ( "<br>Successful<seq2seq4repair_space>Run<seq2seq4repair_space>...<//br>" ) ; out . println ( "<//body>" ) ; out . println ( "<//html>" ) ; } } private void initializeMetricProperties ( ) { } @ Override protected void doGet ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } @ Override protected void doPost ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } @ Override public String getServletInfo ( ) { } }

Fix:
metricsApiSessionBean . countMethod ( ) ;
Buggy code:
public class TypePatternTestCase extends TestCase { public TypePatternTestCase ( String name ) { } World world ; public void testStaticMatch ( ) { } public void testImportResolve ( ) { } public void testImportMatch ( ) { } public void testImportMatchWithInners ( ) { } private void checkImportMatch ( String wildPattern , String [ ] importedPackages , String [ ] importedNames , String matchName , boolean shouldMatch ) { } private WildTypePattern makeResolvedWildTypePattern ( String wildPattern , String [ ] importedPackages , String [ ] importedNames ) { } private WildTypePattern resolve ( WildTypePattern unresolved , String [ ] importedPrefixes , String [ ] importedNames ) { } public static final String [ ] ZERO_STRINGS = new String [ 0 ] ; public void testInstanceofMatch ( ) { } private void checkIllegalInstanceofMatch ( String pattern , String name ) { try { TypePattern p = makeTypePattern ( pattern ) ; ResolvedTypeX type = world . resolve ( name ) ; <START_BUG> FuzzyBoolean result = p . matchesInstanceof ( type ) ; <END_BUG> } catch ( AbortException e ) { return ; } assertTrue ( ( ( ( ( "matching<seq2seq4repair_space>" + pattern ) + "<seq2seq4repair_space>with<seq2seq4repair_space>" ) + name ) + "<seq2seq4repair_space>should<seq2seq4repair_space>fail" ) , false ) ; } private void checkInstanceofMatch ( String pattern , String name , FuzzyBoolean shouldMatch ) { } private TestScope makeTestScope ( ) { } private TypePattern makeTypePattern ( String pattern ) { } private void checkMatch ( String pattern , String name , boolean shouldMatch ) { } private void checkPatternMatch ( TypePattern p , String name , boolean shouldMatch ) { } public void testSerialization ( ) throws IOException { } private void checkSerialization ( String string ) throws IOException { } }

Fix:
p . matchesInstanceof ( type ) ;
Buggy code:
public class NonPassivatingBackingCacheImpl < K extends Serializable , V extends Cacheable < K > > extends AbstractBackingCache < K , V , NonPassivatingBackingCacheEntry < K , V > > implements BackingCacheEntryFactory < K , V , NonPassivatingBackingCacheEntry < K , V > > { private final StatefulObjectFactory < V > factory ; private final Map < K , NonPassivatingBackingCacheEntry < K , V > > cache = new ConcurrentHashMap < K , NonPassivatingBackingCacheEntry < K , V > > ( ) ; private final StatefulTimeoutInfo timeout ; private volatile ScheduledExecutorService executor ; private final ThreadFactory threadFactory ; private final Map < K , Future < ? > > expirationFutures = new ConcurrentHashMap < K , Future < ? > > ( ) ; private final ServerEnvironment environment ; private final IdentifierFactory < K > identifierFactory ; public NonPassivatingBackingCacheImpl ( IdentifierFactory < K > identifierFactory , StatefulObjectFactory < V > factory , ThreadFactory threadFactory , StatefulTimeoutInfo timeout , ServerEnvironment environment ) { } public NonPassivatingBackingCacheImpl ( IdentifierFactory < K > identifierFactory , StatefulObjectFactory < V > factory , ScheduledExecutorService executor , StatefulTimeoutInfo timeout , ServerEnvironment environment ) { } @ Override public K createIdentifier ( ) { } @ Override public Affinity getStrictAffinity ( ) { } @ Override public Affinity getWeakAffinity ( K key ) { } @ Override public boolean hasAffinity ( K key ) { } @ Override public NonPassivatingBackingCacheEntry < K , V > create ( ) { } @ Override public NonPassivatingBackingCacheEntry < K , V > createEntry ( V item ) { } @ Override public void destroyEntry ( NonPassivatingBackingCacheEntry < K , V > entry ) { } @ Override public NonPassivatingBackingCacheEntry < K , V > get ( K key ) throws NoSuchEJBException { } @ Override public NonPassivatingBackingCacheEntry < K , V > peek ( K key ) throws NoSuchEJBException { } @ Override public NonPassivatingBackingCacheEntry < K , V > release ( K key ) { NonPassivatingBackingCacheEntry < K , V > entry = cache . get ( key ) ; if ( entry == null ) { <START_BUG> ROOT_LOGGER . cacheEntryNotFound ( key ) ; <END_BUG> return null ; } if ( ! ( entry . isInUse ( ) ) ) { throw MESSAGES . cacheEntryNotInUse ( key ) ; } entry . decreaseUsageCount ( ) ; if ( ! ( entry . isInUse ( ) ) ) { this . scheduleExpiration ( key , false ) ; } return entry ; } @ Override public void discard ( K key ) { } @ Override public void remove ( K key ) { } @ Override public boolean isClustered ( ) { } @ Override public void start ( ) { } @ Override public void stop ( ) { } private void scheduleExpiration ( K id , boolean cancel ) { } }

Fix:
log . debug ( ( ( "SFSB<seq2seq4repair_space>instance<seq2seq4repair_space>with<seq2seq4repair_space>session<seq2seq4repair_space>ID<seq2seq4repair_space>" + key ) + "<seq2seq4repair_space>not<seq2seq4repair_space>available<seq2seq4repair_space>in<seq2seq4repair_space>cache" ) ) ;
Buggy code:
public class InterceptingWebViewClient extends WebViewClient { private static final Logger LOG = LoggerFactory . getLogger ( InterceptingWebViewClient . class ) ; @ Override @ TargetApi ( 21 ) public WebResourceResponse shouldInterceptRequest ( WebView view , WebResourceRequest request ) { } @ Override @ SuppressWarnings ( "deprecation" ) public WebResourceResponse shouldInterceptRequest ( WebView view , String url ) { if ( ( url . startsWith ( PROTOCOL_NAME ) ) || ( url . startsWith ( ClasspathURLStreamHandler . PROTOCOL_NAME ) ) ) { try { <START_BUG> InterceptingWebViewClient . LOG . info ( ( "Trying<seq2seq4repair_space>to<seq2seq4repair_space>load<seq2seq4repair_space>URL<seq2seq4repair_space>" + url ) ) ; <END_BUG> String mime ; if ( ( url . lastIndexOf ( '.' ) ) > ( url . lastIndexOf ( '//' ) ) ) { String ext = url . substring ( ( ( url . lastIndexOf ( '.' ) ) + 1 ) ) ; mime = MimeTypeMap . getSingleton ( ) . getMimeTypeFromExtension ( ext ) ; } else { mime = "text//html" ; } return new WebResourceResponse ( mime , "UTF-8" , new URL ( url ) . openStream ( ) ) ; } catch ( Exception e ) { InterceptingWebViewClient . LOG . error ( "Cannot<seq2seq4repair_space>load<seq2seq4repair_space>custom<seq2seq4repair_space>protocol<seq2seq4repair_space>resource" , e ) ; } } return super . shouldInterceptRequest ( view , url ) ; } }

Fix:
InterceptingWebViewClient . LOG . info ( ( "Loading<seq2seq4repair_space>URL<seq2seq4repair_space>" + url ) ) ;
Buggy code:
public class TaskAdapter extends Task { Object proxy ; public void setProxy ( Object o ) { } public Object getProxy ( ) { } public void execute ( ) throws TaskException { Method setProjectM = null ; try { Class c = proxy . getClass ( ) ; setProjectM = c . getMethod ( "setProject" , new Class [ ] { Project . class } ) ; if ( setProjectM != null ) { <START_BUG> setProjectM . invoke ( proxy , new Object [ ] { project } ) ; <END_BUG> } } catch ( NoSuchMethodException e ) { } catch ( Exception ex ) { log ( ( "Error<seq2seq4repair_space>setting<seq2seq4repair_space>project<seq2seq4repair_space>in<seq2seq4repair_space>" + ( proxy . getClass ( ) ) ) , MSG_ERR ) ; throw new TaskException ( "Error" , ex ) ; } Method executeM = null ; try { Class c = proxy . getClass ( ) ; executeM = c . getMethod ( "execute" , new Class [ 0 ] ) ; if ( executeM == null ) { log ( ( "No<seq2seq4repair_space>public<seq2seq4repair_space>execute()<seq2seq4repair_space>in<seq2seq4repair_space>" + ( proxy . getClass ( ) ) ) , MSG_ERR ) ; throw new TaskException ( ( "No<seq2seq4repair_space>public<seq2seq4repair_space>execute()<seq2seq4repair_space>in<seq2seq4repair_space>" + ( proxy . getClass ( ) ) ) ) ; } executeM . invoke ( proxy , null ) ; return ; } catch ( Exception ex ) { log ( ( "Error<seq2seq4repair_space>in<seq2seq4repair_space>" + ( proxy . getClass ( ) ) ) , MSG_ERR ) ; throw new TaskException ( "Error" , ex ) ; } } }

Fix:
setProjectM . invoke ( proxy , new Object [ ] { getProject ( ) } ) ;
Buggy code:
public class WicketMessageResolver implements IComponentResolver { private static final Logger log = LoggerFactory . getLogger ( WicketMessageResolver . class ) ; private static final String DEFAULT_VALUE = "DEFAULT_WICKET_MESSAGE_RESOLVER_VALUE" ; private static final long serialVersionUID = 1L ; public boolean resolve ( final MarkupContainer container , final MarkupStream markupStream , final ComponentTag tag ) { } public static class MessageLabel extends WebComponent { private static final long serialVersionUID = 1L ; public MessageLabel ( final String id , final String messageKey ) { } protected void onComponentTagBody ( MarkupStream markupStream , ComponentTag openTag ) { final String key = getModelObjectAsString ( ) ; <START_BUG> final String value = getLocalizer ( ) . getString ( key , this , WicketMessageResolver . DEFAULT_VALUE ) ; <END_BUG> if ( ( value != null ) && ( ! ( WicketMessageResolver . DEFAULT_VALUE . equals ( value ) ) ) ) { replaceComponentTagBody ( markupStream , openTag , value . trim ( ) ) ; } else { WicketMessageResolver . log . debug ( "No<seq2seq4repair_space>value<seq2seq4repair_space>found<seq2seq4repair_space>for<seq2seq4repair_space>wicket:message<seq2seq4repair_space>tag<seq2seq4repair_space>with<seq2seq4repair_space>key:<seq2seq4repair_space>{}" , key ) ; markupStream . setCurrentIndex ( ( ( markupStream . getCurrentIndex ( ) ) - 1 ) ) ; ComponentTag tag = markupStream . getTag ( ) ; markupStream . next ( ) ; if ( ! ( tag . isOpenClose ( ) ) ) { MarkupElement body = markupStream . get ( ) ; if ( body instanceof RawMarkup ) { replaceComponentTagBody ( markupStream , openTag , body . toCharSequence ( ) ) ; } } } } protected void onComponentTag ( ComponentTag tag ) { } } }

Fix:
final String value = getLocalizer ( ) . getString ( key , getParent ( ) , WicketMessageResolver . DEFAULT_VALUE ) ;