nus-yam/ex-repair huggingface dataset:
Buggy code:
public class TestDes { @ Test public void mainTest ( ) { } @ Test public void secondTest ( ) { try { String json = "{\"user_id\":\"354720053852963f3ef27300c65bbce\",\"withdraw_coins\":\"10000\",\"withdraw_type\":\"0\"}" ; String userregister = "{\"user_id\":\"354720053852963f3ef27300c65bbce\"}" ; String encrypt = DESCodec . encrypt ( userregister , "MidasForever" ) ; System . out . println ( encrypt ) ; String decrypt = new String ( DESCodec . decrypt ( encrypt , "MidasForever" ) ) ; System . out . println ( decrypt ) ; <START_BUG> decrypt = new String ( DESCodec . decrypt ( "9b413bdffd9c9d092c2849f28c2cc012dd404539504318bb4394f0a5cbbd0b9d35f2baba030e9b2a4d8b571783fbed21c96a5679e77fc6b4a0d60f221cf2f06b76eb14991c7490c0e85bd35b62a9c28d258e36003c06fccd55471670c310370b0f96b29257a2a7f78a15d52c4b6a908ccf7990fb33d45436e843c1d2ae2c20446f4c94bf4cc0fb538a902262318d54634b9147606dfbdb90b5af0ffc3fb55f24db1c06441c4de4b1b17a9c322d5b6af693cd3be08b5fccfd1aed49e1f064ff451d507ac2798d30e18d5b601fedcb75acd80cfbc2dbbc09972706f9ead656dba553192e22af1481065c4c1fa1452f00ed7b689e69fa9804a4c1b54c60dadd18231794aa6f920e48195a01c37bb634358ffda304398e423cba67006d8a824bc2e21bdd287c1e6cf8358953e985d97c4cdea866e28956c278c569319249fe647509" , "MidasForever" ) ) ; <END_BUG> System . out . println ( decrypt ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } }

Fix:
decrypt = new String ( DESCodec . decrypt ( "9b413bdffd9c9d092c2849f28c2cc012dd404539504318bb4394f0a5cbbd0b9d35f2baba030e9b2a4d8b571783fbed21c96a5679e77fc6b4a0d60f221cf2f06b76eb14991c7490c0e85bd35b62a9c28d258e36003c06fccd55471670c310370b0f96b29257a2a7f78a15d52c4b6a908ccf7990fb33d45436e843c1d2ae2c20446f4c94bf4cc0fb538a902262318d54639e8c1c31c9bb348b8f51ef7ed40a2ada008440e9db38579eaca58a205a3ff9b548d6c1f6eceb1f1230c4cfbd0729eb27a2a1c1c84cbda4c77b689e69fa9804a4c1b54c60dadd18231794aa6f920e48195a01c37bb634358ffda304398e423cba67006d8a824bc2e21bdd287c1e6cf8358953e985d97c4cdea866e28956c278c569319249fe647509" , "MidasForever" ) ) ;
Buggy code:
public class ThreeEighthesIntegratorTest { @ Test ( expected = DimensionMismatchException . class ) public void testDimensionCheck ( ) { } @ Test public void testDecreasingSteps ( ) { TestProblemAbstract [ ] problems = TestProblemFactory . getProblems ( ) ; for ( int k = 0 ; k < ( problems . length ) ; ++ k ) { double previousValueError = Double . NaN ; double previousTimeError = Double . NaN ; for ( int i = 4 ; i < 10 ; ++ i ) { TestProblemAbstract pb = problems [ k ] . copy ( ) ; double step = ( ( pb . getFinalTime ( ) ) - ( pb . getInitialTime ( ) ) ) * ( FastMath . pow ( 2.0 , ( - i ) ) ) ; FirstOrderIntegrator integ = new ThreeEighthesIntegrator ( step ) ; TestProblemHandler handler = new TestProblemHandler ( pb , integ ) ; integ . addStepHandler ( handler ) ; EventHandler [ ] functions = pb . getEventsHandlers ( ) ; for ( int l = 0 ; l < ( functions . length ) ; ++ l ) { integ . addEventHandler ( functions [ l ] , Double . POSITIVE_INFINITY , ( 1.0E-6 * step ) , 1000 ) ; } double stopTime = integ . integrate ( pb , pb . getInitialTime ( ) , pb . getInitialState ( ) , pb . getFinalTime ( ) , new double [ pb . getDimension ( ) ] ) ; if ( ( functions . length ) == 0 ) { Assert . assertEquals ( pb . getFinalTime ( ) , stopTime , 1.0E-10 ) ; } double error = handler . getMaximalValueError ( ) ; if ( i > 4 ) { <START_BUG> Assert . assertTrue ( ( error < ( FastMath . abs ( previousValueError ) ) ) ) ; <END_BUG> } previousValueError = error ; double timeError = handler . getMaximalTimeError ( ) ; if ( i > 4 ) { Assert . assertTrue ( ( timeError <= ( FastMath . abs ( previousTimeError ) ) ) ) ; } previousTimeError = timeError ; } } } @ Test public void testSmallStep ( ) { } @ Test public void testBigStep ( ) { } @ Test public void testBackward ( ) { } @ Test public void testKepler ( ) { } private static class KeplerHandler implements StepHandler { public KeplerHandler ( TestProblem3 pb ) { } public void reset ( ) { } public void handleStep ( StepInterpolator interpolator , boolean isLast ) { } private TestProblem3 pb ; private double maxError = 0 ; } @ Test public void testStepSize ( ) { } }

Fix:
Assert . assertTrue ( ( error < ( 1.01 * ( FastMath . abs ( previousValueError ) ) ) ) ) ;
Buggy code:
public class JuzuPortlet implements Portlet , ResourceServingPortlet { private ApplicationContext applicationContext ; private boolean prod ; private PortletConfig config ; private FileSystemScanner < String > devScanner ; private ClassLoader classLoader ; public void init ( PortletConfig config ) throws PortletException { } private Collection < CompilationError > boot ( ) throws PortletException { } private < P , D > void boot ( ReadFileSystem < P > classes , ClassLoader cl ) throws Exception { } public void processAction ( ActionRequest request , ActionResponse response ) throws IOException , PortletException { } public void render ( RenderRequest request , RenderResponse response ) throws IOException , PortletException { Collection < CompilationError > errors = boot ( ) ; if ( errors . isEmpty ( ) ) { RenderContext renderContext = new RenderContext ( classLoader , new PortletRenderBridge ( request , response ) ) ; applicationContext . invoke ( renderContext ) ; PortletSession session = request . getPortletSession ( false ) ; if ( session != null ) { <START_BUG> session . removeAttribute ( "flash" ) ; <END_BUG> } } else { StringBuilder sb = new StringBuilder ( ) ; for ( CompilationError error : errors ) { String at = error . getSource ( ) ; sb . append ( "<p>" ) ; sb . append ( "<div>Compilation<seq2seq4repair_space>error<seq2seq4repair_space>at<seq2seq4repair_space>" ) . append ( at ) . append ( "<seq2seq4repair_space>" ) . append ( error . getLocation ( ) ) . append ( "<//div>" ) ; sb . append ( "<div>" ) ; sb . append ( error . getMessage ( ) ) ; sb . append ( "<//div>" ) ; sb . append ( "<//p>" ) ; } response . getWriter ( ) . print ( sb ) ; } } public void serveResource ( ResourceRequest request , ResourceResponse response ) throws IOException , PortletException { } public void destroy ( ) { } }

Fix:
session . removeAttribute ( "org.juzu.flash_scope" ) ;
Buggy code:
public class Debug extends SubCommand { public Debug ( ) { } @ Override public boolean execute ( final PlotPlayer plr , final String ... args ) { if ( ( ( args . length ) > 0 ) && ( args [ 0 ] . equalsIgnoreCase ( "msg" ) ) ) { final StringBuilder msg = new StringBuilder ( ) ; for ( final C c : C . values ( ) ) { msg . append ( c . s ( ) ) . append ( "\n" ) ; } MainUtil . sendMessage ( plr , msg . toString ( ) ) ; return true ; } StringBuilder information ; String header ; String line ; String section ; { information = new StringBuilder ( ) ; <START_BUG> header = DEUBG_HEADER . s ( ) ; <END_BUG> line = DEBUG_LINE . s ( ) ; section = DEBUG_SECTION . s ( ) ; } { final StringBuilder worlds = new StringBuilder ( "" ) ; for ( final String world : PS . get ( ) . getPlotWorlds ( ) ) { worlds . append ( world ) . append ( "<seq2seq4repair_space>" ) ; } information . append ( header ) ; information . append ( getSection ( section , "Lag<seq2seq4repair_space>//<seq2seq4repair_space>TPS" ) ) ; information . append ( getLine ( line , "Ticks<seq2seq4repair_space>Per<seq2seq4repair_space>Second" , Lag . getTPS ( ) ) ) ; information . append ( getLine ( line , "Lag<seq2seq4repair_space>Percentage" , ( ( ( int ) ( Lag . getPercentage ( ) ) ) + "%" ) ) ) ; information . append ( getLine ( line , "TPS<seq2seq4repair_space>Percentage" , ( ( ( int ) ( Lag . getFullPercentage ( ) ) ) + "%" ) ) ) ; information . append ( getSection ( section , "PlotWorld" ) ) ; information . append ( getLine ( line , "Plot<seq2seq4repair_space>Worlds" , worlds ) ) ; information . append ( getLine ( line , "Owned<seq2seq4repair_space>Plots" , PS . get ( ) . getPlots ( ) . size ( ) ) ) ; information . append ( getSection ( section , "Messages" ) ) ; information . append ( getLine ( line , "Total<seq2seq4repair_space>Messages" , C . values ( ) . length ) ) ; information . append ( getLine ( line , "View<seq2seq4repair_space>all<seq2seq4repair_space>captions" , "//plot<seq2seq4repair_space>debug<seq2seq4repair_space>msg" ) ) ; } { MainUtil . sendMessage ( plr , information . toString ( ) ) ; } return true ; } private String getSection ( final String line , final String val ) { } private String getLine ( final String line , final String var , final Object val ) { } }

Fix:
header = DEBUG_HEADER . s ( ) ;
Buggy code:
public class SpatialOpRecursivePrefixTreeTest extends StrategyTestCase { private SpatialPrefixTree grid ; @ Test @ Repeat ( iterations = 20 ) public void testIntersects ( ) throws IOException { } protected Rectangle gridSnapp ( Shape snapMe ) { double distErrPct = ( ( PrefixTreeStrategy ) ( strategy ) ) . getDistErrPct ( ) ; double distErr = SpatialArgs . calcDistanceFromErrPct ( snapMe , distErrPct , ctx ) ; int detailLevel = grid . getLevelForDistance ( distErr ) ; <START_BUG> List < Node > cells = grid . getNodes ( snapMe , detailLevel , false ) ; <END_BUG> double minX = Double . POSITIVE_INFINITY ; double maxX = Double . NEGATIVE_INFINITY ; double minY = Double . POSITIVE_INFINITY ; double maxY = Double . NEGATIVE_INFINITY ; for ( Node cell : cells ) { assert ( cell . getLevel ( ) ) <= detailLevel ; Rectangle cellR = cell . getShape ( ) . getBoundingBox ( ) ; minX = Math . min ( minX , cellR . getMinX ( ) ) ; maxX = Math . max ( maxX , cellR . getMaxX ( ) ) ; minY = Math . min ( minY , cellR . getMinY ( ) ) ; maxY = Math . max ( maxY , cellR . getMaxY ( ) ) ; } return ctx . makeRectangle ( minX , maxX , minY , maxY ) ; } }

Fix:
List < Node > cells = grid . getNodes ( snapMe , detailLevel , false , true ) ;
Buggy code:
public class GFGame extends BasicGame { Image minimap = null ; Image playerposImage = null ; TiledMap map = null ; TiledMap grasland = null ; TileSet tileset ; int minimapx = 248 ; int minimapy = 200 ; public Player player ; public GameMenu game_menu ; public int zoom = 0 ; public Config config ; private String config_datei = "GameData//Config//Config.ini" ; public WebClient client ; private IRC_Chat irc_chat ; private NeedsDisplay bedürfnis_anzeige ; public AnimalManager animal_manager ; public ObjectManager object_manager ; public GFGame ( ) throws SlickException { } @ Override public void init ( GameContainer gc ) throws SlickException { minimap = new Image ( "materials//mystery.png" ) ; map = new TiledMap ( "materials//mystery1.tmx" , "materials" ) ; playerposImage = new Image ( "materials//point.png" ) ; try { config = new Config ( config_datei ) ; } catch ( IOException ex ) { Logger . getLogger ( GFGame . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; } client = config . getClient ( ) ; client . start ( ) ; client . getPlayerData ( ) ; game_menu = new GameMenu ( "Menu1" , null , 140 , 10 ) ; game_menu = MenuManager . getGameMenu ( game_menu ) ; player = new Player ( ) ; player . setPos ( client . getPlayerPos ( ) ) ; object_manager = new ObjectManager ( config , player ) ; animal_manager = new AnimalManager ( config , player ) ; irc_chat = new IRC_Chat ( client , this , player , config ) ; bedürfnis_anzeige = new NeedsDisplay ( player ) ; <START_BUG> gc . getInput ( ) . addMouseListener ( new GameMouseListener ( this ) ) ; <END_BUG> } @ Override public void update ( GameContainer gc , int delta ) throws SlickException { } @ Override public void render ( GameContainer gc , Graphics g ) throws SlickException { } public static void main ( String [ ] args ) throws SlickException { } public void actionPerformed ( String actionCommand , GameMenuItem menuItem ) { } }

Fix:
gc . getInput ( ) . addMouseListener ( new GameMouseListener ( this , player ) ) ;
Buggy code:
public class VendingMachineTests { VendingMachineKata vendingMachine ; @ Before public void setup ( ) { } @ Test public void exact_change_only_displays_no_change_in_machine ( ) { } @ Test public void exact_change_only_displays_quarter_only_in_machine ( ) { } @ Test public void exact_change_only_displays_dime_only_in_machine ( ) { } @ Test public void exact_change_only_displays_nickel_only_in_machine ( ) { } @ Test public void exact_change_only_does_not_display_when_minimum_change_in_machine ( ) { } @ Test public void exact_change_only_does_not_display_when_minimum_nickels_in_machine ( ) { } @ Test public void insert_coins_displays ( ) { } @ Test public void correct_change_returned ( ) { } @ Test public void invalid_coin ( ) { } @ Test public void sold_out_no_money_inserted ( ) { } @ Test public void sold_out_money_inserted ( ) { } @ Test public void return_coins_none_inserted ( ) { } @ Test public void return_coins_inserted ( ) { } @ Test public void all_coins_added_correctly ( ) { } @ Test public void after_purchase_exact_change_now_required ( ) { } @ Test public void excess_coins_inserted_none_already_in_machine ( ) { vendingMachine . set_change_in_machine ( 0 , 0 , 0 ) ; assertEquals ( "EXACT<seq2seq4repair_space>CHANGE<seq2seq4repair_space>ONLY" , vendingMachine . check_display ( ) ) ; vendingMachine . insert_coin ( "Quarter" ) ; assertEquals ( "$0.25" , vendingMachine . check_display ( ) ) ; assertEquals ( "$0.00" , vendingMachine . check_coin_return ( ) ) ; vendingMachine . insert_coin ( "Quarter" ) ; assertEquals ( "$0.50" , vendingMachine . check_display ( ) ) ; assertEquals ( "$0.00" , vendingMachine . check_coin_return ( ) ) ; vendingMachine . insert_coin ( "Quarter" ) ; assertEquals ( "$0.75" , vendingMachine . check_display ( ) ) ; assertEquals ( "$0.00" , vendingMachine . check_coin_return ( ) ) ; vendingMachine . insert_coin ( "Dime" ) ; assertEquals ( "$0.85" , vendingMachine . check_display ( ) ) ; assertEquals ( "$0.00" , vendingMachine . check_coin_return ( ) ) ; vendingMachine . insert_coin ( "Dime" ) ; assertEquals ( "$0.95" , vendingMachine . check_display ( ) ) ; assertEquals ( "$0.00" , vendingMachine . check_coin_return ( ) ) ; vendingMachine . insert_coin ( "Nickel" ) ; assertEquals ( "$1.00" , vendingMachine . check_display ( ) ) ; assertEquals ( "$0.00" , vendingMachine . check_coin_return ( ) ) ; vendingMachine . return_coins ( ) ; <START_BUG> assertEquals ( "INSERT<seq2seq4repair_space>COINS" , vendingMachine . check_display ( ) ) ; <END_BUG> assertEquals ( "$1.00" , vendingMachine . check_coin_return ( ) ) ; } @ Test public void excess_coins_inserted_some_already_in_machine ( ) { } @ Test public void not_enough_inserted_for_candy ( ) { } @ Test public void not_enough_inserted_for_cola ( ) { } @ Test public void not_enough_inserted_for_chips ( ) { } }

Fix:
assertEquals ( "EXACT<seq2seq4repair_space>CHANGE<seq2seq4repair_space>ONLY" , vendingMachine . check_display ( ) ) ;
Buggy code:
public abstract class Advice extends ShadowMunger { protected AdviceAttribute attribute ; protected AdviceKind kind ; protected Member signature ; protected ResolvedType concreteAspect ; protected List innerCflowEntries = Collections . EMPTY_LIST ; protected int nFreeVars ; protected TypePattern exceptionType ; protected List suppressedLintKinds = null ; public static Advice makeCflowEntry ( World world , Pointcut entry , boolean isBelow , Member stackField , int nFreeVars , List innerCflowEntries , ResolvedType inAspect ) { } public static Advice makePerCflowEntry ( World world , Pointcut entry , boolean isBelow , Member stackField , ResolvedType inAspect , List innerCflowEntries ) { } public static Advice makePerObjectEntry ( World world , Pointcut entry , boolean isThis , ResolvedType inAspect ) { } public static Advice makePerTypeWithinEntry ( World world , Pointcut p , ResolvedType inAspect ) { } public static Advice makeSoftener ( World world , Pointcut entry , TypePattern exceptionType , ResolvedType inAspect , IHasSourceLocation loc ) { } public Advice ( AjAttribute . AdviceAttribute attribute , Pointcut pointcut , Member signature ) { } public boolean match ( Shadow shadow , World world ) { } private void maybeIssueUncheckedMatchWarning ( ResolvedType afterReturningType , ResolvedType shadowReturnType , Shadow shadow , World world ) { } public AdviceKind getKind ( ) { } public Member getSignature ( ) { } public boolean hasExtraParameter ( ) { } protected int getExtraParameterFlags ( ) { } protected int getExtraParameterCount ( ) { } public static int countOnes ( int bits ) { } public int getBaseParameterCount ( ) { } public String [ ] getBaseParameterNames ( World world ) { } public UnresolvedType getExtraParameterType ( ) { } public UnresolvedType getDeclaringAspect ( ) { } protected String extraParametersToString ( ) { } public Pointcut getPointcut ( ) { } public ShadowMunger concretize ( ResolvedType fromType , World world , PerClause clause ) { <START_BUG> Pointcut p = pointcut . concretize ( fromType , signature . getArity ( ) , this ) ; <END_BUG> if ( clause != null ) { Pointcut oldP = p ; p = new org . aspectj . weaver . patterns . AndPointcut ( clause , p ) ; p . copyLocationFrom ( oldP ) ; p . state = Pointcut . CONCRETE ; p . m_ignoreUnboundBindingForNames = oldP . m_ignoreUnboundBindingForNames ; } Advice munger = world . createAdviceMunger ( attribute , p , signature ) ; munger . concreteAspect = fromType ; return munger ; } public String toString ( ) { } public boolean equals ( Object other ) { } private volatile int hashCode = 0 ; public int hashCode ( ) { } public static final int ExtraArgument = 1 ; public static final int ThisJoinPoint = 2 ; public static final int ThisJoinPointStaticPart = 4 ; public static final int ThisEnclosingJoinPointStaticPart = 8 ; public static final int ParameterMask = 15 ; public static final int CanInline = 64 ; public void setLexicalPosition ( int lexicalPosition ) { } public ResolvedType getConcreteAspect ( ) { } }

Fix:
Pointcut p = pointcut . concretize ( fromType , getDeclaringType ( ) , signature . getArity ( ) , this ) ;
Buggy code:
public class LocalizerTest extends WicketTestCase { private IResourceSettings settings ; private Localizer localizer ; public LocalizerTest ( String message ) { } @ Override protected void setUp ( ) throws Exception { } public void testGetStringValidString ( ) { } public void testGetStringMissingStringReturnDefault ( ) { } public void testGetStringMissingStringNoDefault ( ) { } public void testGetStringMissingStringDoNotUseDefault ( ) { } public void testGetStringMissingStringExceptionThrown ( ) { } public void testGetStringPropertySubstitution ( ) { } public void testInComponentConstructor ( ) { <START_BUG> Component myComponent = new LocalizerTest . MyLabel ( new EmptyPage ( ) , "myLabel" ) ; <END_BUG> } public void testTwoComponents ( ) { } public static class MyLabel extends Label { private static final long serialVersionUID = 1L ; public MyLabel ( MarkupContainer parent , final String id ) { } } }

Fix:
new LocalizerTest . MyLabel ( new EmptyPage ( ) , "myLabel" ) ;
Buggy code:
public class ShellBolt implements IBolt { public static Logger LOG = Logger . getLogger ( ShellBolt . class ) ; Process _subprocess ; OutputCollector _collector ; Map < String , Tuple > _inputs = new ConcurrentHashMap < String , Tuple > ( ) ; private String [ ] _command ; private ShellProcess _process ; private volatile boolean _running = true ; private volatile Throwable _exception ; private LinkedBlockingQueue _pendingWrites = new LinkedBlockingQueue ( ) ; private Random _rand ; private Thread _readerThread ; private Thread _writerThread ; public ShellBolt ( ShellComponent component ) { } public ShellBolt ( String ... command ) { } public void prepare ( Map stormConf , TopologyContext context , final OutputCollector collector ) { _rand = new Random ( ) ; _process = new ShellProcess ( _command ) ; _collector = collector ; try { Number subpid = _process . launch ( stormConf , context ) ; ShellBolt . LOG . info ( ( "Launched<seq2seq4repair_space>subprocess<seq2seq4repair_space>with<seq2seq4repair_space>pid<seq2seq4repair_space>" + subpid ) ) ; } catch ( IOException e ) { <START_BUG> throw new RuntimeException ( "Error<seq2seq4repair_space>when<seq2seq4repair_space>launching<seq2seq4repair_space>multilang<seq2seq4repair_space>subprocess" , e ) ; <END_BUG> } _readerThread = new Thread ( new Runnable ( ) { public void run ( ) { while ( _running ) { try { JSONObject action = _process . readMessage ( ) ; if ( action == null ) { } String command = ( ( String ) ( action . get ( "command" ) ) ) ; if ( command . equals ( "ack" ) ) { handleAck ( action ) ; } else if ( command . equals ( "fail" ) ) { handleFail ( action ) ; } else if ( command . equals ( "log" ) ) { String msg = ( ( String ) ( action . get ( "msg" ) ) ) ; ShellBolt . LOG . info ( ( "Shell<seq2seq4repair_space>msg:<seq2seq4repair_space>" + msg ) ) ; } else if ( command . equals ( "emit" ) ) { handleEmit ( action ) ; } } catch ( InterruptedException e ) { } catch ( Throwable t ) { die ( t ) ; } } } } ) ; _readerThread . start ( ) ; _writerThread = new Thread ( new Runnable ( ) { public void run ( ) { while ( _running ) { try { Object write = _pendingWrites . poll ( 1 , TimeUnit . SECONDS ) ; if ( write != null ) { _process . writeMessage ( write ) ; } } catch ( InterruptedException e ) { } catch ( Throwable t ) { die ( t ) ; } } } } ) ; _writerThread . start ( ) ; } public void execute ( Tuple input ) { } public void cleanup ( ) { } private void handleAck ( Map action ) { } private void handleFail ( Map action ) { } private void handleEmit ( Map action ) throws InterruptedException { } private void die ( Throwable exception ) { } }

Fix:
throw new RuntimeException ( ( "Error<seq2seq4repair_space>when<seq2seq4repair_space>launching<seq2seq4repair_space>multilang<seq2seq4repair_space>subprocess\n" + ( _process . getErrorsString ( ) ) ) , e ) ;
Buggy code:
public class UndertowSubsystemTestCase extends AbstractSubsystemBaseTest { public UndertowSubsystemTestCase ( ) { } @ Override protected String getSubsystemXml ( ) throws IOException { <START_BUG> return readResource ( "undertow-1.1.xml" ) ; <END_BUG> } @ Test public void testRuntime ( ) throws Exception { } @ Override protected AdditionalInitialization createAdditionalInitialization ( ) { } private static class RuntimeInitialization extends AdditionalInitialization { protected ControllerInitializer createControllerInitializer ( ) { } @ Override protected void addExtraServices ( ServiceTarget target ) { } } }

Fix:
return readResource ( "undertow-2.0.xml" ) ;
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 . getNavigatorPane ( ) . forceUpdate ( ) ; if ( ( ProjectManager . getManager ( ) . getCurrentProject ( ) ) != null ) ProjectManager . getManager ( ) . getCurrentProject ( ) . setNeedsSave ( true ) ; } } }

Fix:
if ( ( ( ( mee . getAddedValue ( ) ) != null ) || ( ( mee . getRemovedValue ( ) ) != null ) ) || ( ( ( mee . getNewValue ( ) ) != null ) && ( ! ( mee . getNewValue ( ) . equals ( mee . getOldValue ( ) ) ) ) ) ) {
Buggy code:
public class PatternLayout extends Layout { public static final String DEFAULT_CONVERSION_PATTERN = "%m%n" ; public static final String TTCC_CONVERSION_PATTERN = "%r<seq2seq4repair_space>[%t]<seq2seq4repair_space>%p<seq2seq4repair_space>%c<seq2seq4repair_space>%x<seq2seq4repair_space>-<seq2seq4repair_space>%m%n" ; public static final String PATTERN_RULE_REGISTRY = "PATTERN_RULE_REGISTRY" ; private String conversionPattern ; private PatternConverter head ; private boolean handlesExceptions ; public PatternLayout ( ) { } public PatternLayout ( String pattern ) { } public void setConversionPattern ( String conversionPattern ) { } public String getConversionPattern ( ) { } public void activateOptions ( ) { <START_BUG> PatternParser patternParser = new PatternParser ( conversionPattern ) ; <END_BUG> if ( ( this . repository ) != null ) { patternParser . setConverterRegistry ( ( ( Map ) ( this . repository . getObject ( PatternLayout . PATTERN_RULE_REGISTRY ) ) ) ) ; } head = patternParser . parse ( ) ; handlesExceptions = PatternConverter . chainHandlesThrowable ( head ) ; } public void format ( Writer output , LoggingEvent event ) throws IOException { } public boolean ignoresThrowable ( ) { } }

Fix:
PatternParser patternParser = new PatternParser ( conversionPattern , repository ) ;
Buggy code:
@ Controller @ RequestMapping ( "//account" ) public class LoginController { private static final Logger log = LoggerFactory . getLogger ( LoginController . class ) ; @ Autowired UserService userService ; @ RequestMapping ( value = "//user//{pageName}" , method = RequestMethod . GET ) public String userEntry ( @ PathVariable String pageName , Model uiModel ) { } @ RequestMapping ( value = "//user//signin" , method = RequestMethod . POST ) public String userAuthentication ( User user , BindingResult result , Model uiModel , RedirectAttributes redirectAttr ) { System . out . println ( ( "Input:<seq2seq4repair_space>" + user ) ) ; User userSaved = userService . getUser ( user . getUsername ( ) ) ; if ( userSaved == null ) { redirectAttr . addFlashAttribute ( "loginError" , "Sorry,<seq2seq4repair_space>username<seq2seq4repair_space>not<seq2seq4repair_space>found!" ) ; return "redirect://account//user//login" ; } else { if ( ( ( ( ( userSaved . getPassword ( ) . equals ( user . getPassword ( ) ) ) && ( ( userSaved . getAccountNonExpired ( ) ) == true ) ) && ( ( userSaved . getAccountNonLocked ( ) ) == true ) ) && ( ( userSaved . getCredentialsNonExpired ( ) ) == true ) ) && ( ( userSaved . getEnabled ( ) ) == true ) ) { uiModel . addAttribute ( "message" , "Successfully<seq2seq4repair_space>Logged<seq2seq4repair_space>In!" ) ; <START_BUG> return "message" ; <END_BUG> } else { if ( ! ( userSaved . getPassword ( ) . equals ( user . getPassword ( ) ) ) ) { redirectAttr . addFlashAttribute ( "loginError" , "Sorry,<seq2seq4repair_space>password<seq2seq4repair_space>not<seq2seq4repair_space>matched!" ) ; } else { redirectAttr . addFlashAttribute ( "loginError" , "Sorry,<seq2seq4repair_space>account<seq2seq4repair_space>not<seq2seq4repair_space>verified!" ) ; } return "redirect://account//user//login" ; } } } @ RequestMapping ( value = "//user//signup" , method = RequestMethod . POST ) public String userSignUpEntry ( User user , BindingResult result , Model uiModel , RedirectAttributes redirectAttr ) { } }

Fix:
return "layout//main" ;
Buggy code:
public class nsIPromptService extends nsISupports { static final int LAST_METHOD_ID = ( nsISupports . LAST_METHOD_ID ) + 9 ; public static final String NS_IPROMPTSERVICE_IID_STRING = "1630C61A-325E-49ca-8759-A31B16C47AA5" ; public static final nsID NS_IPROMPTSERVICE_IID = new nsID ( nsIPromptService . NS_IPROMPTSERVICE_IID_STRING ) ; public nsIPromptService ( int address ) { } public int Alert ( int parent , char [ ] dialogTitle , char [ ] text ) { <START_BUG> return XPCOM . VtblCall ( ( ( super . LAST_METHOD_ID ) + 1 ) , getAddress ( ) , parent , dialogTitle , text ) ; <END_BUG> } public int AlertCheck ( int parent , char [ ] dialogTitle , char [ ] text , char [ ] checkMsg , boolean [ ] checkValue ) { } public int Confirm ( int parent , char [ ] dialogTitle , char [ ] text , boolean [ ] _retval ) { } public int ConfirmCheck ( int parent , char [ ] dialogTitle , char [ ] text , char [ ] checkMsg , boolean [ ] checkValue , boolean [ ] _retval ) { } public static final int BUTTON_POS_0 = 1 ; public static final int BUTTON_POS_1 = 256 ; public static final int BUTTON_POS_2 = 65536 ; public static final int BUTTON_TITLE_OK = 1 ; public static final int BUTTON_TITLE_CANCEL = 2 ; public static final int BUTTON_TITLE_YES = 3 ; public static final int BUTTON_TITLE_NO = 4 ; public static final int BUTTON_TITLE_SAVE = 5 ; public static final int BUTTON_TITLE_DONT_SAVE = 6 ; public static final int BUTTON_TITLE_REVERT = 7 ; public static final int BUTTON_TITLE_IS_STRING = 127 ; public static final int STD_OK_CANCEL_BUTTONS = 513 ; public int ConfirmEx ( int parent , char [ ] dialogTitle , char [ ] text , int buttonFlags , char [ ] button0Title , char [ ] button1Title , char [ ] button2Title , char [ ] checkMsg , boolean [ ] checkValue , int [ ] _retval ) { } public int Prompt ( int parent , char [ ] dialogTitle , char [ ] text , int [ ] value , char [ ] checkMsg , boolean [ ] checkValue , boolean [ ] _retval ) { } public int PromptUsernameAndPassword ( int parent , char [ ] dialogTitle , char [ ] text , int [ ] username , int [ ] password , char [ ] checkMsg , boolean [ ] checkValue , boolean [ ] _retval ) { } public int PromptPassword ( int parent , char [ ] dialogTitle , char [ ] text , int [ ] password , char [ ] checkMsg , boolean [ ] checkValue , boolean [ ] _retval ) { } public int Select ( int parent , char [ ] dialogTitle , char [ ] text , int count , char [ ] selectList , int [ ] outSelection , boolean [ ] _retval ) { } }

Fix:
return XPCOM . VtblCall ( ( ( nsISupports . LAST_METHOD_ID ) + 1 ) , getAddress ( ) , parent , dialogTitle , text ) ;
Buggy code:
public class ProcessedStatusesCountStatusProcessor implements TwitterStatusProcessor { private static final Logger log = Logger . getLogger ( ProcessedStatusesCountStatusProcessor . class ) ; private TwitterUserRepository twitterUserRepository ; public void setTwitterUserRepository ( TwitterUserRepository twitterUserRepository ) { } @ Override public void process ( Status twitterStatus ) { ProcessedStatusesCountStatusProcessor . log . debug ( "Processing<seq2seq4repair_space>total<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>statuses<seq2seq4repair_space>from<seq2seq4repair_space>user..." ) ; try { TwitterUser user = twitterUserRepository . readById ( twitterStatus . getUser ( ) . getId ( ) ) ; if ( user == null ) { ProcessedStatusesCountStatusProcessor . log . debug ( ( "First<seq2seq4repair_space>time<seq2seq4repair_space>status<seq2seq4repair_space>from<seq2seq4repair_space>user<seq2seq4repair_space>" + ( twitterStatus . getUser ( ) . getId ( ) ) ) ) ; user = new TwitterUser ( ) ; user . setId ( twitterStatus . getUser ( ) . getId ( ) ) ; <START_BUG> user . setProcessedStatusesCount ( 0 ) ; <END_BUG> } else { ProcessedStatusesCountStatusProcessor . log . debug ( ( ( ( "Already<seq2seq4repair_space>processed<seq2seq4repair_space>" + ( user . getProcessedStatusesCount ( ) ) ) + "<seq2seq4repair_space>from<seq2seq4repair_space>user<seq2seq4repair_space>" ) + ( user . getId ( ) ) ) ) ; user . setProcessedStatusesCount ( ( ( user . getProcessedStatusesCount ( ) ) + 1 ) ) ; } twitterUserRepository . save ( user ) ; } catch ( RepositoryException e ) { ProcessedStatusesCountStatusProcessor . log . error ( "Exception<seq2seq4repair_space>caught<seq2seq4repair_space>from<seq2seq4repair_space>repo<seq2seq4repair_space>layer" , e ) ; } } }

Fix:
user . setProcessedStatusesCount ( 1 ) ;
Buggy code:
public class StringToShortConverter extends AbstractConverter { private static final Resources REZ = ResourceManager . getPackageResources ( StringToShortConverter . class ) ; public StringToShortConverter ( ) { } <START_BUG> public Object convert ( final Object object , final Context context ) throws ConverterException { <END_BUG> try { return new Short ( ( ( String ) ( object ) ) ) ; } catch ( final NumberFormatException nfe ) { final String message = StringToShortConverter . REZ . getString ( "convert.bad-short.error" , object ) ; throw new ConverterException ( message , nfe ) ; } } }

Fix:
public Object convert ( final Object object , final Object context ) throws ConverterException {
Buggy code:
@ RestController public class RegistryController { private static final Logger LOGGER = LoggerFactory . getLogger ( RegistryController . class ) ; @ Value ( "${eureka.client.serviceUrl.defaultZone}" ) String eurekaUrl ; @ Value ( "${eureka.username:user}" ) String eurekaUser ; @ Value ( "${eureka.password}" ) String eurekaPassword ; @ Autowired DiscoveryClient discoveryClient ; @ RequestMapping ( value = "//api//application//{id}" , method = RequestMethod . GET ) public ResponseEntity < Object > get ( @ PathVariable String id ) { RegistryController . LOGGER . debug ( "Deliver<seq2seq4repair_space>registered<seq2seq4repair_space>application<seq2seq4repair_space>with<seq2seq4repair_space>ID<seq2seq4repair_space>'{}'" , id ) ; Application application = getInstanceApplication ( discoveryClient . getApplication ( getAppNameFromId ( id ) ) , id ) ; if ( application != null ) { return new ResponseEntity ( application , HttpStatus . OK ) ; } else { <START_BUG> return new ResponseEntity ( application , HttpStatus . NOT_FOUND ) ; <END_BUG> } } private String getAppNameFromId ( String id ) { } @ RequestMapping ( value = "//api//applications" , method = RequestMethod . GET ) public Collection < Application > applications ( @ RequestParam ( value = "name" , required = false ) String name ) { } Collection < Application > getInstancesApplications ( Applications applications ) { } Collection < Application > getInstancesApplication ( com . netflix . discovery . shared . Application application ) { } private static Application mapInstanceInfoToApplication ( InstanceInfo instance ) { } Application getInstanceApplication ( com . netflix . discovery . shared . Application application , String id ) { } }

Fix:
return new ResponseEntity ( null , HttpStatus . NOT_FOUND ) ;
Buggy code:
public class ActionHelper { public static Contact buildContact ( HttpServletRequest request ) { } public static File getContactsXml ( ServletContext servletContext ) { String contactsXmlFilePath = servletContext . getInitParameter ( "contactsXmlFilePath" ) ; <START_BUG> File file = new File ( ActionHelper . class . getClassLoader ( ) . getResource ( contactsXmlFilePath ) . getFile ( ) ) ; <END_BUG> return file ; } public static void goToHomepage ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } public static void goToAdminPage ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } public static void goToUpdatePage ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } }

Fix:
File file = new File ( Thread . currentThread ( ) . getContextClassLoader ( ) . getResource ( contactsXmlFilePath ) . getFile ( ) ) ;
Buggy code:
public abstract class EJBComponentConfiguration extends AbstractComponentConfiguration { public EJBComponentConfiguration ( final EJBComponentDescription description ) { } protected void addComponentSystemInterceptorFactory ( InterceptorFactory interceptorFactory ) { } public String getName ( ) { <START_BUG> return getDescription ( ) . getComponentName ( ) ; <END_BUG> } }

Fix:
return getComponentName ( ) ;
Buggy code:
public class SimpleVec < T > implements IVec < T > { private T [ ] vec ; private int numElements = 0 ; public SimpleVec ( ) { } @ SuppressWarnings ( "unchecked" ) public SimpleVec ( int size ) { } @ Override public int size ( ) { } @ Override public void shrinkBy ( int numElementsToRemove ) { } @ Override public void pop ( ) { } @ Override public void growTo ( int size ) { } @ Override public void growTo ( int size , T pad ) { } private void ensureCapacity ( int size ) { } @ Override public void clear ( ) { } @ Override public void push ( ) { } @ Override public void push ( T elem ) { } @ Override public T last ( ) { } @ Override public T get ( int index ) { } @ Override public void copyTo ( IVec < T > copy ) { } @ Override public void moveTo ( IVec < T > dest ) { } @ Override public boolean remove ( Object element ) { } @ Override public void removeAtIndex ( int index ) { } @ Override public void set ( int index , T element ) { } @ Override public void sort ( Comparator < T > comparator ) { <START_BUG> Arrays . sort ( vec , comparator ) ; <END_BUG> } }

Fix:
Arrays . sort ( vec , 0 , numElements , comparator ) ;
Buggy code:
public class HttpMirrorControlGui extends LogicControllerGui implements ActionListener , JMeterGUIComponent , UnsharedComponent { private static transient Logger log = LoggingManager . getLoggerForClass ( ) ; private JTextField portField ; private JButton stop ; private JButton start ; private static final String ACTION_STOP = "stop" ; private static final String ACTION_START = "start" ; private HttpMirrorControl mirrorController ; public HttpMirrorControlGui ( ) { } public TestElement createTestElement ( ) { } public void modifyTestElement ( TestElement el ) { } public String getLabelResource ( ) { } public Collection getMenuCategories ( ) { } public void configure ( TestElement element ) { } public void actionPerformed ( ActionEvent action ) { } private void init ( ) { setLayout ( new BorderLayout ( 0 , 5 ) ) ; setBorder ( makeBorder ( ) ) ; add ( makeTitlePanel ( ) , BorderLayout . NORTH ) ; JPanel mainPanel = new JPanel ( new BorderLayout ( ) ) ; Box myBox = Box . createVerticalBox ( ) ; myBox . add ( createPortPanel ( ) ) ; mainPanel . add ( myBox , BorderLayout . NORTH ) ; <START_BUG> mainPanel . add ( createControls ( ) , BorderLayout . SOUTH ) ; <END_BUG> add ( mainPanel , BorderLayout . CENTER ) ; } private JPanel createControls ( ) { } private JPanel createPortPanel ( ) { } public void clearGui ( ) { } }

Fix:
mainPanel . add ( createControls ( ) , BorderLayout . CENTER ) ;
Buggy code:
public class WarAnnotationIndexProcessor implements DeploymentUnitProcessor { public static final AttachmentKey < WarAnnotationIndex > ATTACHMENT_KEY = AttachmentKey . create ( WarAnnotationIndex . class ) ; public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { if ( ! ( WarDeploymentMarker . isWarDeployment ( phaseContext . getDeploymentUnit ( ) ) ) ) { return ; } if ( ( phaseContext . getAttachment ( WarAnnotationIndexProcessor . ATTACHMENT_KEY ) ) != null ) { return ; } <START_BUG> final VirtualFile deploymentRoot = phaseContext . getAttachment ( DEPLOYMENT_ROOT ) . getRoot ( ) ; <END_BUG> final WarAnnotationIndex index = WarAnnotationIndex . create ( deploymentRoot ) ; phaseContext . putAttachment ( WarAnnotationIndexProcessor . ATTACHMENT_KEY , index ) ; } public void undeploy ( final DeploymentUnit context ) { } }

Fix:
final VirtualFile deploymentRoot = phaseContext . getDeploymentUnit ( ) . getAttachment ( DEPLOYMENT_ROOT ) . getRoot ( ) ;
Buggy code:
public class Version { private Version ( ) { } public static String id ( ) { <START_BUG> return "4.5-SNAPSHOT-20070831-1702" ; <END_BUG> } public static void main ( String [ ] args ) { } }

Fix:
return "4.5-SNAPSHOT-20070904-1400" ;
Buggy code:
public interface JobOperations extends ResourceOperations { <START_BUG> public JobDefinitionResource createJob ( String name , String defintion , boolean deploy ) ; <END_BUG> public void launchJob ( String name , String jobParameters ) { } public PagedResources < JobDefinitionResource > list ( ) { } public PagedResources < JobExecutionInfoResource > listJobExecutions ( ) { } public JobExecutionInfoResource displayJobExecution ( long jobExecutionId ) { } public List < StepExecutionInfoResource > listStepExecutions ( long jobExecutionId ) { } public void stopJobExecution ( long jobExecutionId ) { } public void restartJobExecution ( long jobExecutionId ) { } public void stopAllJobExecutions ( ) { } public StepExecutionProgressInfoResource stepExecutionProgress ( long jobExecutionId , long stepExecutionId ) { } public StepExecutionInfoResource displayStepExecution ( long jobExecutionId , long stepExecutionId ) { } public JobInstanceInfoResource displayJobInstance ( long instanceId ) { } }

Fix:
public JobDefinitionResource createJob ( String name , String definition , boolean deploy ) ;
Buggy code:
public class PersistenceUnitSearch { private static final boolean traceEnabled = JpaLogger . ROOT_LOGGER . isTraceEnabled ( ) ; public static PersistenceUnitMetadata resolvePersistenceUnitSupplier ( DeploymentUnit deploymentUnit , String persistenceUnitName ) { } private static PersistenceUnitMetadata findPersistenceUnitSupplier ( DeploymentUnit deploymentUnit , String persistenceUnitName ) { } private static PersistenceUnitMetadata findWithinApplication ( DeploymentUnit unit , String persistenceUnitName ) { } private static PersistenceUnitMetadata findWithinLibraryJar ( ResourceRoot moduleResourceRoot , String persistenceUnitName ) { } private static PersistenceUnitMetadata findWithinDeployment ( DeploymentUnit unit , String persistenceUnitName ) { } private static PersistenceUnitMetadata getPersistenceUnit ( DeploymentUnit current , final String absolutePath , String puName ) { final String path ; if ( absolutePath . startsWith ( "..//" ) ) { path = absolutePath . substring ( 3 ) ; } else { path = absolutePath ; } final VirtualFile parent = current . getAttachment ( DEPLOYMENT_ROOT ) . getRoot ( ) . getParent ( ) ; final VirtualFile resolvedPath = parent . getChild ( path ) ; List < ResourceRoot > resourceRoots = DeploymentUtils . allResourceRoots ( DeploymentUtils . getTopDeploymentUnit ( current ) ) ; for ( ResourceRoot resourceRoot : resourceRoots ) { if ( resourceRoot . getRoot ( ) . equals ( resolvedPath ) ) { PersistenceUnitMetadataHolder holder = resourceRoot . getAttachment ( PERSISTENCE_UNITS ) ; if ( holder != null ) { for ( PersistenceUnitMetadata pu : holder . getPersistenceUnits ( ) ) { if ( PersistenceUnitSearch . traceEnabled ) { JpaLogger . ROOT_LOGGER . tracef ( "getPersistenceUnit<seq2seq4repair_space>check<seq2seq4repair_space>'%s'<seq2seq4repair_space>against<seq2seq4repair_space>pu<seq2seq4repair_space>'%s'" , puName , pu . getPersistenceUnitName ( ) ) ; } if ( pu . getPersistenceUnitName ( ) . equals ( puName ) ) { if ( PersistenceUnitSearch . traceEnabled ) { JpaLogger . ROOT_LOGGER . tracef ( "getPersistenceUnit<seq2seq4repair_space>matched<seq2seq4repair_space>'%s'<seq2seq4repair_space>against<seq2seq4repair_space>pu<seq2seq4repair_space>'%s'" , puName , pu . getPersistenceUnitName ( ) ) ; } return pu ; } } } } } <START_BUG> throw JpaMessages . MESSAGES . deploymentUnitNotFound ( absolutePath , puName , current ) ; <END_BUG> } }

Fix:
throw JpaMessages . MESSAGES . persistenceUnitNotFound ( absolutePath , puName , current ) ;
Buggy code:
public class InheritanceHeadTest extends WicketTestCase { public InheritanceHeadTest ( String name ) { } public void test_1 ( ) throws Exception { } public void test_2 ( ) throws Exception { } public void test_3 ( ) throws Exception { <START_BUG> application = new WicketTester ( new WebApplication ( ) { <END_BUG> public Session newSession ( Request request ) { return new wicket . protocol . http . WebSession ( this , request ) . setStyle ( "myStyle" ) ; } public Class getHomePage ( ) { return ConcretePage2 . class ; } } ) ; executeTest ( ConcretePage2 . class , "ExpectedResult3.html" ) ; } }

Fix:
tester = new WicketTester ( new WebApplication ( ) {
Buggy code:
public abstract class AbstractAjaxTimerBehavior extends AbstractDefaultAjaxBehavior { private final Duration updateInterval ; private boolean attachedBodyOnLoadModifier = false ; public AbstractAjaxTimerBehavior ( final Duration updateInterval ) { } protected void onBind ( ) { } protected void onRenderHeadContribution ( final Response response ) { } protected final String getJsTimeoutCall ( final Duration updateInterval ) { <START_BUG> return ( ( ( "setTimeout(function()<seq2seq4repair_space>{<seq2seq4repair_space>" + ( getCallbackScript ( false ) ) ) + "<seq2seq4repair_space>},<seq2seq4repair_space>" ) + ( updateInterval . getMilliseconds ( ) ) ) + ");" ; <END_BUG> } protected final void respond ( final AjaxRequestTarget target ) { } protected abstract void onTimer ( final AjaxRequestTarget target ) { } }

Fix:
return ( ( ( "setTimeout(function()<seq2seq4repair_space>{<seq2seq4repair_space>" + ( getCallbackScript ( false , true ) ) ) + "<seq2seq4repair_space>},<seq2seq4repair_space>" ) + ( updateInterval . getMilliseconds ( ) ) ) + ");" ;
Buggy code:
public class ModClusterStopContext implements OperationStepHandler { static final ModClusterStopContext INSTANCE = new ModClusterStopContext ( ) ; static OperationDefinition getDefinition ( ResourceDescriptionResolver descriptionResolver ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { if ( ( context . isNormalServer ( ) ) && ( ( context . getServiceRegistry ( false ) . getService ( SERVICE_NAME ) ) != null ) ) { context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { ServiceController < ? > controller = context . getServiceRegistry ( false ) . getService ( SERVICE_NAME ) ; final ModClusterServiceMBean service = ( ( ModClusterServiceMBean ) ( controller . getValue ( ) ) ) ; ModClusterLogger . ROOT_LOGGER . debugf ( "stop-context:<seq2seq4repair_space>%s" , operation ) ; final String webHost = ModClusterSubsystemResourceDefinition . VIRTUAL_HOST . resolveModelAttribute ( context , operation ) . asString ( ) ; final String webContext = ModClusterSubsystemResourceDefinition . CONTEXT . resolveModelAttribute ( context , operation ) . asString ( ) ; final int waitTime = ModClusterSubsystemResourceDefinition . WAIT_TIME . resolveModelAttribute ( context , operation ) . asInt ( ) ; try { service . stopContext ( webHost , webContext , waitTime , TimeUnit . SECONDS ) ; } catch ( IllegalArgumentException e ) { <START_BUG> throw new OperationFailedException ( ROOT_LOGGER . contextOrHostNotFound ( webHost , webContext ) ) ; <END_BUG> } context . completeStep ( new OperationContext . RollbackHandler ( ) { @ Override public void handleRollback ( OperationContext context , ModelNode operation ) { service . enableContext ( webHost , webContext ) ; } } ) ; } } , RUNTIME ) ; } context . stepCompleted ( ) ; } }

Fix:
throw new OperationFailedException ( new ModelNode ( ) . set ( ROOT_LOGGER . contextOrHostNotFound ( webHost , webContext ) ) ) ;