nus-yam/ex-repair huggingface dataset:
Buggy code:
public class GUnzip extends Task { private File source ; private File dest ; public void setSrc ( String src ) { } public void setDest ( String dest ) { } public void execute ( ) throws BuildException { if ( ( source ) == null ) { throw new BuildException ( "No<seq2seq4repair_space>source<seq2seq4repair_space>specified" ) ; } if ( ! ( source . exists ( ) ) ) { throw new BuildException ( "source<seq2seq4repair_space>doesn't<seq2seq4repair_space>exist" ) ; } if ( source . isDirectory ( ) ) { throw new BuildException ( "Cannot<seq2seq4repair_space>expand<seq2seq4repair_space>a<seq2seq4repair_space>directory" ) ; } if ( ( dest ) == null ) { dest = new File ( source . getParent ( ) ) ; } if ( dest . isDirectory ( ) ) { String sourceName = source . getName ( ) ; int len = sourceName . length ( ) ; if ( ( len > 3 ) && ( ".gz" . equalsIgnoreCase ( sourceName . substring ( ( len - 3 ) ) ) ) ) { dest = new File ( dest , sourceName . substring ( 0 , ( len - 3 ) ) ) ; } else { dest = new File ( dest , sourceName ) ; } } if ( ( source . lastModified ( ) ) > ( dest . lastModified ( ) ) ) { <START_BUG> project . log ( ( ( ( "Expanding<seq2seq4repair_space>" + ( source . getAbsolutePath ( ) ) ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( dest . getAbsolutePath ( ) ) ) ) ; <END_BUG> try { FileOutputStream out = new FileOutputStream ( dest ) ; GZIPInputStream zIn = new GZIPInputStream ( new FileInputStream ( source ) ) ; byte [ ] buffer = new byte [ 8 * 1024 ] ; int count = 0 ; do { out . write ( buffer , 0 , count ) ; count = zIn . read ( buffer , 0 , buffer . length ) ; } while ( count != ( - 1 ) ) ; zIn . close ( ) ; out . close ( ) ; } catch ( IOException ioe ) { String msg = "Problem<seq2seq4repair_space>expanding<seq2seq4repair_space>gzip<seq2seq4repair_space>" + ( ioe . getMessage ( ) ) ; throw new BuildException ( msg , ioe ) ; } } } }

Fix:
log ( ( ( ( "Expanding<seq2seq4repair_space>" + ( source . getAbsolutePath ( ) ) ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( dest . getAbsolutePath ( ) ) ) ) ;
Buggy code:
public class CmdSethome implements UltimateCommand { @ Override public String getName ( ) { } @ Override public String getPermission ( ) { } @ Override public List < String > getAliases ( ) { } @ Override public void run ( final CommandSender cs , String label , String [ ] args ) { if ( ! ( r . isPlayer ( cs ) ) ) { return ; } Player p = ( ( Player ) ( cs ) ) ; if ( ! ( r . perm ( p , "uc.sethome" , true , true ) ) ) { return ; } if ( ( r . checkArgs ( args , 0 ) ) && ( args [ 0 ] . contains ( ":" ) ) ) { if ( ! ( r . perm ( p , "uc.sethome.others" , true , true ) ) ) { return ; } OfflinePlayer t = r . searchOfflinePlayer ( args [ 0 ] . split ( ":" ) [ 0 ] ) ; if ( ( t == null ) || ( ( ! ( t . hasPlayedBefore ( ) ) ) && ( ! ( t . isOnline ( ) ) ) ) ) { r . sendMes ( cs , "playerNotFound" , "%Player" , args [ 0 ] . split ( ":" ) [ 0 ] ) ; return ; } List < String > homes = UC . getPlayer ( t ) . getHomeNames ( ) ; if ( homes . contains ( args [ 0 ] ) ) { r . sendMes ( cs , "sethomeMoved" , "%Home" , args [ 0 ] ) ; } else { r . sendMes ( cs , "sethomeSet" , "%Home" , args [ 0 ] ) ; } if ( ! ( homes . contains ( args [ 0 ] . toLowerCase ( ) . split ( ":" ) [ 1 ] ) ) ) { homes . add ( args [ 0 ] . toLowerCase ( ) . split ( ":" ) [ 1 ] ) ; } UC . getPlayer ( t ) . addHome ( args [ 0 ] . toLowerCase ( ) . split ( ":" ) [ 1 ] , p . getLocation ( ) ) ; return ; } Set < String > multihomes = r . getCnfg ( ) . getConfigurationSection ( "Command.HomeLimits" ) . getKeys ( false ) ; Integer limit = 1 ; if ( multihomes != null ) { for ( String s : multihomes ) { if ( r . perm ( cs , ( "uc.sethome." + ( s . toLowerCase ( ) ) ) , false , false ) ) { if ( limit < ( r . getCnfg ( ) . getInt ( ( "Command.HomeLimits." + s ) ) ) ) { limit = r . getCnfg ( ) . getInt ( ( "Command.HomeLimits." + s ) ) ; } } } } if ( r . perm ( cs , "uc.sethome.unlimited" , false , false ) ) { limit = 999999 ; } List < String > homes = UC . getPlayer ( p ) . getHomeNames ( ) ; if ( ( homes . size ( ) ) >= limit ) { <START_BUG> r . sendMes ( cs , "sethomeMax" , "%Limit" , "%Limit" , limit ) ; <END_BUG> return ; } String name = ( r . checkArgs ( args , 0 ) ) ? args [ 0 ] : "home" ; if ( homes . contains ( name ) ) { r . sendMes ( cs , "sethomeMoved" , "%Home" , name ) ; } else { r . sendMes ( cs , "sethomeSet" , "%Home" , name ) ; } if ( ! ( homes . contains ( name . toLowerCase ( ) ) ) ) { homes . add ( name . toLowerCase ( ) ) ; } UC . getPlayer ( p ) . addHome ( name . toLowerCase ( ) , p . getLocation ( ) ) ; } @ Override public List < String > onTabComplete ( CommandSender cs , Command cmd , String alias , String [ ] args , String curs , Integer curn ) { } }

Fix:
r . sendMes ( cs , "sethomeMax" , "%Limit" , limit ) ;
Buggy code:
public class ContributionDetail extends BaseFragment { private LinearLayout commentsList ; private LinearLayout tagLayout ; private EditText et_enterComment ; private Button commentBtn ; private Contribution contribution ; private LayoutInflater inflater ; public ContributionDetail ( ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } public void fetchTags ( ) { } public void addTag ( final Tag tag ) { TextView tagView = new TextView ( Globals . appContext ) ; tagView . setText ( tag . getName ( ) ) ; tagView . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { Fragment fragment = new TagDetail ( ) ; Bundle args = new Bundle ( ) ; args . putInt ( "TAGID" , tag . getID ( ) ) ; args . putString ( "TAGNAME" , tag . getName ( ) ) ; fragment . setArguments ( args ) ; ( ( MainActivity ) ( getActivity ( ) ) ) . launchFragment ( fragment , ( "#" + ( tag . getName ( ) ) ) , false ) ; } } ) ; <START_BUG> tagView . setTextColor ( getResources ( ) . getColor ( tab_btn_text ) ) ; <END_BUG> tagView . setPadding ( 5 , 5 , 5 , 5 ) ; tagLayout . addView ( tagView ) ; } public void fetchComments ( ) { } public void addComment ( final Comment comment ) { } public void postComment ( ) { } public void upDownVote ( final TextView rateTxt , final Contribution contribution , final int rate ) { } }

Fix:
tagView . setTextColor ( appContext . getResources ( ) . getColor ( tab_btn_text ) ) ;
Buggy code:
public class FrequentItemsFinder { public static void main ( String [ ] arg ) throws IOException { <START_BUG> String input = FrequentItemsFinder . fileToPath ( "testInput.txt" ) ; <END_BUG> String output = ".////output.txt" ; double minsup = 0.4 ; AlgoApriori apriori = new AlgoApriori ( ) ; apriori . runAlgorithm ( minsup , input , output ) ; apriori . printStats ( ) ; } public static String fileToPath ( String filename ) throws UnsupportedEncodingException { } No newline ; at end ; of file ; }

Fix:
String input = FrequentItemsFinder . fileToPath ( "contextPasquier99.txt" ) ;
Buggy code:
public interface ModelDeleteListener { <START_BUG> void onDelete ( int position , Model model ) ; <END_BUG> }

Fix:
void onDelete ( int position ) ;
Buggy code:
public abstract class CachedDatabase extends Database { private final Cache cache ; protected CachedDatabase ( Output output , File pluginFolder ) { } @ Override public User getOwner ( Ownable ownable ) { } @ Override public void run ( ) { DatabaseAction databaseAction ; while ( ( ! ( disable ) ) || ( ! ( queue . isEmpty ( ) ) ) ) { if ( ! ( queue . isEmpty ( ) ) ) { databaseAction = queue . remove ( ) ; if ( ! ( cache . doAction ( databaseAction ) ) ) { getOutput ( ) . printException ( new ActionNotPerformedException ( databaseAction ) ) ; } } else { cache . flush ( ) ; <START_BUG> if ( ( ! ( disable ) ) || ( ! ( queue . isEmpty ( ) ) ) ) <END_BUG> continue ; try { synchronized ( LOCK ) { while ( ( ! ( disable ) ) && ( queue . isEmpty ( ) ) ) { LOCK . wait ( ) ; } } } catch ( InterruptedException e ) { getOutput ( ) . printException ( "Database<seq2seq4repair_space>thread<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>interrupted." , e ) ; } } } cache . flush ( ) ; close ( ) ; } }

Fix:
if ( ( disable ) || ( ! ( queue . isEmpty ( ) ) ) )
Buggy code:
@ WebService ( name = "ContractManagementService" , targetNamespace = "http:////at.ac.tuwien.infosys.aic11.services" ) public interface ContractManagement { @ WebMethod ( operationName = "create_offer" ) <START_BUG> public Offer createOffer ( @ WebParam ( name = "credit_request" ) <END_BUG> CreditRequest creditRequest ) throws ContractManagementException ; @ WebMethod ( operationName = "accept_offer" ) void acceptOffer ( @ WebParam ( name = "offer" ) Offer offer ) throws ContractManagementException { } @ WebMethod ( operationName = "decline_offer" ) void declineOffer ( @ WebParam ( name = "offer" ) Offer offer ) throws ContractManagementException { } @ WebMethod ( operationName = "update_offer" ) void updateOffer ( @ WebParam ( name = "offer" ) Offer offer ) throws ContractManagementException { } }

Fix:
public Offer createOffer ( @ WebParam ( name = "creditRequest" )
Buggy code:
public class BackendTest { @ Test public void testBackendKJVTextZ ( ) throws Exception { } @ Test public void testBackendESV ( ) throws Exception { } @ Test public void testBackendESVFullChapter ( ) throws Exception { } @ Test public void testBackendESV1AndFollowing ( ) throws Exception { } @ Test public void testBackendCrossChapterBoundary ( ) throws Exception { } @ Test public void testBackendMiddleChapter ( ) throws Exception { } @ Test public void testBackendMiddleToEnd ( ) throws Exception { } @ Test public void testBackend2ChaptersStartMiddle ( ) throws Exception { } @ Test public void testBackend2ChaptersStartVerse1 ( ) throws Exception { } @ Test public void testBackend2ChaptersStartVerse0 ( ) throws Exception { } @ Test public void testBackendMHCCCommentsRaw ( ) throws Exception { } @ Test public void testBackendGenevaCommentsZ ( ) throws Exception { } @ Test public void testBackendStrongsGreekRawLd ( ) throws Exception { } @ Test public void testBackendNaveZld ( ) throws Exception { } @ Test public void testBackendJosephus ( ) throws Exception { String version = "Josephus" ; String assertion = "calamity<seq2seq4repair_space>of<seq2seq4repair_space>our<seq2seq4repair_space>whole<seq2seq4repair_space>nation;<seq2seq4repair_space>for<seq2seq4repair_space>those<seq2seq4repair_space>that<seq2seq4repair_space>were<seq2seq4repair_space>fond<seq2seq4repair_space>of" ; final Book currentBook = Books . installed ( ) . getBook ( version ) ; if ( currentBook == null ) { return ; } <START_BUG> Key key = currentBook . getKey ( "The_Life_of_Flavius_Josephus" ) . get ( 5 ) ; <END_BUG> backendTest ( currentBook , key , assertion ) ; } @ Test public void testBackendOt1Nt2Devotional ( ) throws Exception { } private String backendTest ( String version , String reference , String ... assertion ) throws BookException , NoSuchKeyException { } private String backendTest ( Book currentBook , Key key , String ... assertions ) throws BookException { } private static final Logger log = LoggerFactory . getLogger ( BackendTest . class ) ; }

Fix:
Key key = currentBook . getKey ( "The<seq2seq4repair_space>Life<seq2seq4repair_space>of<seq2seq4repair_space>Flavius<seq2seq4repair_space>Josephus" ) . get ( 5 ) ;
Buggy code:
public abstract class AbstractMutableCommandRegistry extends AbstractCommandRegistry implements IMutableCommandRegistry { protected AbstractMutableCommandRegistry ( ) { } public void setActiveKeyConfigurationDefinitions ( List activeKeyConfigurationDefinitions ) { } public void setActivityBindingDefinitions ( List activityBindingDefinitions ) { <START_BUG> activityBindingDefinitions = Util . safeCopy ( activityBindingDefinitions , IActivityBindingDefinition . class ) ; <END_BUG> if ( ! ( activityBindingDefinitions . equals ( this . activityBindingDefinitions ) ) ) { this . activityBindingDefinitions = activityBindingDefinitions ; fireCommandRegistryChanged ( ) ; } } public void setCategoryDefinitions ( List categoryDefinitions ) { } public void setCommandDefinitions ( List commandDefinitions ) { } public void setImageBindingDefinitions ( List imageBindingDefinitions ) { } public void setKeyConfigurationDefinitions ( List keyConfigurationDefinitions ) { } public void setKeySequenceBindingDefinitions ( List keySequenceBindingDefinitions ) { } }

Fix:
activityBindingDefinitions = Util . safeCopy ( activityBindingDefinitions , IContextBindingDefinition . class ) ;
Buggy code:
public abstract class AbstractResource implements IResource { private static final long serialVersionUID = 1L ; public AbstractResource ( ) { } protected abstract AbstractResource . ResourceResponse newResourceResponse ( Attributes attributes ) { } public static class ResourceResponse { private Integer errorCode ; private String errorMessage ; private String fileName = null ; private ContentDisposition contentDisposition = ContentDisposition . INLINE ; private String contentType = null ; private String textEncoding ; private long contentLength = - 1 ; private Time lastModified = null ; private AbstractResource . WriteCallback writeCallback ; private Duration cacheDuration ; private CacheScope cacheScope ; public ResourceResponse ( ) { } public void setError ( Integer errorCode ) { } public void setError ( Integer errorCode , String errorMessage ) { } public Integer getErrorCode ( ) { } public String getErrorMessage ( ) { } public void setFileName ( String fileName ) { } public String getFileName ( ) { } public void setContentDisposition ( ContentDisposition contentDisposition ) { } public ContentDisposition getContentDisposition ( ) { } public void setContentType ( String contentType ) { } public String getContentType ( ) { } public void setTextEncoding ( String textEncoding ) { } protected String getTextEncoding ( ) { } public void setContentLength ( long contentLength ) { } public long getContentLength ( ) { } public void setLastModified ( Time lastModified ) { } public Time getLastModified ( ) { } public boolean dataNeedsToBeWritten ( Attributes attributes ) { WebRequest request = ( ( WebRequest ) ( attributes . getRequest ( ) ) ) ; Time ifModifiedSince = request . getIfModifiedSinceHeader ( ) ; if ( ( ifModifiedSince != null ) && ( ( this . lastModified ) != null ) ) { <START_BUG> Time roundedLastModified = Time . valueOf ( ( ( ( this . lastModified . getMilliseconds ( ) ) // 1000 ) * 1000 ) ) ; <END_BUG> return ifModifiedSince . before ( roundedLastModified ) ; } else { return true ; } } public void disableCaching ( ) { } public void setCacheDurationToMaximum ( ) { } public void setCacheDuration ( Duration duration ) { } public Duration getCacheDuration ( ) { } public CacheScope getCacheScope ( ) { } public void setCacheScope ( WebResponse . CacheScope scope ) { } public void setWriteCallback ( final AbstractResource . WriteCallback writeCallback ) { } public AbstractResource . WriteCallback getWriteCallback ( ) { } } protected void configureCache ( final WebRequest request , final WebResponse response , final AbstractResource . ResourceResponse data , final Attributes attributes ) { } public final void respond ( final Attributes attributes ) { } public abstract static class WriteCallback { public abstract void writeData ( Attributes attributes ) { } protected final void writeStream ( Attributes attributes , InputStream stream ) { } } }

Fix:
Time roundedLastModified = Time . millis ( ( ( ( this . lastModified . getMilliseconds ( ) ) // 1000 ) * 1000 ) ) ;
Buggy code:
@ Entity @ Access ( AccessType . PROPERTY ) @ NamedQueries ( { @ NamedQuery ( name = "ItemCopy.findAll" , query = "SELECT<seq2seq4repair_space>ic<seq2seq4repair_space>FROM<seq2seq4repair_space>ItemCopy<seq2seq4repair_space>ic" ) } ) public class ItemCopy implements Searchable , Serializable { private int id ; private final StringProperty location = new SimpleStringProperty ( ) ; private final ObjectProperty < Item > item = new SimpleObjectProperty < > ( ) ; private final ObjectProperty < Damage > damage = new SimpleObjectProperty < > ( ) ; private final StringProperty copyNumber = new SimpleStringProperty ( ) ; private final ObservableList < Loan > loans = FXCollections . observableArrayList ( ) ; public ItemCopy ( ) { } public ItemCopy ( String copyNumber , String location , Item i , Damage d ) { } <START_BUG> @ OneToMany ( mappedBy = "itemCopy" , cascade = CascadeType . ALL ) <END_BUG> public List < Loan > getLoans ( ) { return this . loans ; } @ Transient public ObservableList < Loan > getObservableLoans ( ) { } public void setLoans ( List < Loan > loans ) { } @ Id @ GeneratedValue ( strategy = GenerationType . IDENTITY ) public int getId ( ) { } public void setId ( int id ) { } public void setCopyNumber ( String copyNumber ) { } public String getCopyNumber ( ) { } public StringProperty copyNumberProperty ( ) { } public StringProperty locationProperty ( ) { } public String getLocation ( ) { } public void setLocation ( String location ) { } @ Enumerated ( EnumType . STRING ) public Damage getDamage ( ) { } public void setDamage ( Damage damage ) { } public ObjectProperty < Damage > damageProperty ( ) { } public ObjectProperty < Item > itemProperty ( ) { } public void setItem ( Item i ) { } @ ManyToOne public Item getItem ( ) { } @ Override public int hashCode ( ) { } @ Override public String toString ( ) { } @ Override public boolean equals ( Object obj ) { } @ Override public boolean test ( String query ) { } }

Fix:
@ OneToMany ( mappedBy = "itemCopy" , cascade = CascadeType . REMOVE )
Buggy code:
public class PaintableBracket extends PaintableObject { String _highlightType ; RGB _outlineColor ; public PaintableBracket ( Position position , RGB foreground , RGB background , String highlightType ) { } @ Override protected void innerPaint ( GC gc , StyledText st , IDocument doc , IRegion widgetRange , Rectangle widgetRect ) { int offset = widgetRange . getOffset ( ) ; int length = widgetRange . getLength ( ) ; if ( length != 1 ) throw new IllegalArgumentException ( String . format ( "length<seq2seq4repair_space>%1$d<seq2seq4repair_space>!=<seq2seq4repair_space>1" , length ) ) ; Point p = st . getLocationAtOffset ( offset ) ; try { String txt = doc . get ( _position . getOffset ( ) , 1 ) ; gc . drawText ( txt , p . x , p . y , ( ( _background ) == null ) ) ; if ( _highlightType . equals ( HighlightTypeValOutline ) ) { Color oldFg = gc . getForeground ( ) ; Color fg = null ; if ( ( _outlineColor ) == null ) { gc . setForeground ( gc . getBackground ( ) ) ; } else { fg = new Color ( Display . getDefault ( ) , _outlineColor ) ; gc . setForeground ( fg ) ; } Point metrics = gc . textExtent ( txt ) ; <START_BUG> Rectangle rect = new Rectangle ( p . x , p . y , metrics . x , metrics . y ) ; <END_BUG> gc . drawRectangle ( rect ) ; gc . setForeground ( oldFg ) ; if ( fg != null ) fg . dispose ( ) ; } } catch ( BadLocationException e ) { Activator . log ( e ) ; } } }

Fix:
Rectangle rect = new Rectangle ( p . x , p . y , ( ( metrics . x ) - 1 ) , ( ( metrics . y ) - 1 ) ) ;
Buggy code:
public class SourcesPage extends WebPage { public class SourceModel extends AbstractReadOnlyModel { public SourceModel ( ) { } public Object getObject ( Component component ) { if ( Strings . isEmpty ( name ) ) { return "" ; } BufferedReader br = null ; try { StringBuffer sb = new StringBuffer ( ) ; br = new BufferedReader ( new InputStreamReader ( page . getResourceAsStream ( name ) ) ) ; while ( br . ready ( ) ) { sb . append ( br . readLine ( ) ) ; sb . append ( "\n" ) ; } return sb . toString ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; return "" ; } finally { IOUtils . closeQuietly ( br ) ; } } } public class PackagedResourcesModel extends AbstractReadOnlyModel implements IDetachable { private final List resources = new ArrayList ( ) ; public PackagedResourcesModel ( ) { } protected void onDetach ( ) { } public Object getObject ( Component component ) { if ( resources . isEmpty ( ) ) { PackageName name = PackageName . forClass ( page ) ; ClassLoader loader = page . getClassLoader ( ) ; <START_BUG> String path = Strings . replaceAll ( name . getName ( ) , "." , "//" ) ; <END_BUG> try { Enumeration urls = loader . getResources ( path ) ; while ( urls . hasMoreElements ( ) ) { URL url = ( ( URL ) ( urls . nextElement ( ) ) ) ; getPackageContents ( url ) ; } } catch ( IOException e ) { e . printStackTrace ( ) ; } } return resources ; } private void getPackageContents ( URL packageListing ) { } } public class FilesBrowser extends WebMarkupContainer { public FilesBrowser ( String id ) { } } public class CodePanel extends WebMarkupContainer { public CodePanel ( String id ) { } } private String name ; private Class page ; private Component codePanel ; private Label filename ; public void setName ( String name ) { } public String getName ( ) { } public SourcesPage ( ) { } public SourcesPage ( Class page ) { } }

Fix:
String path = Strings . replaceAll ( name . getName ( ) , "." , "//" ) . toString ( ) ;
Buggy code:
public class RangeQuery extends MultiTermQuery { private Term lowerTerm ; private Term upperTerm ; private Collator collator ; private String field ; private boolean includeLower ; private boolean includeUpper ; public RangeQuery ( String field , String lowerTerm , String upperTerm , boolean includeLower , boolean includeUpper ) { } public RangeQuery ( String field , String lowerTerm , String upperTerm , boolean includeLower , boolean includeUpper , Collator collator ) { } public RangeQuery ( Term lowerTerm , Term upperTerm , boolean inclusive , Collator collator ) { } public RangeQuery ( Term lowerTerm , Term upperTerm , boolean inclusive ) { } private void init ( Term lowerTerm , Term upperTerm , boolean includeLower , boolean includeUpper , Collator collator ) { } public String getField ( ) { } public Term getLowerTerm ( ) { } public Term getUpperTerm ( ) { } public String getLowerTermText ( ) { } public String getUpperTermText ( ) { } public boolean includesLower ( ) { } public boolean includesUpper ( ) { } public boolean isInclusive ( ) { } public Collator getCollator ( ) { } protected FilteredTermEnum getEnum ( IndexReader reader ) throws IOException { } public String toString ( String field ) { } public boolean equals ( Object o ) { if ( ( this ) == o ) return true ; if ( ! ( o instanceof RangeQuery ) ) return false ; RangeQuery other = ( ( RangeQuery ) ( o ) ) ; <START_BUG> if ( ( ( ( ( this . field ) != ( other . field ) ) || ( ( this . includeLower ) != ( other . includeLower ) ) ) || ( ( this . includeUpper ) != ( other . includeUpper ) ) ) || ( ( ( this . collator ) != null ) && ( ! ( this . collator . equals ( other . collator ) ) ) ) ) { <END_BUG> return false ; } String lowerVal = ( ( this . lowerTerm ) == null ) ? null : lowerTerm . text ( ) ; String upperVal = ( ( this . upperTerm ) == null ) ? null : upperTerm . text ( ) ; String olowerText = ( ( other . lowerTerm ) == null ) ? null : other . lowerTerm . text ( ) ; String oupperText = ( ( other . upperTerm ) == null ) ? null : other . upperTerm . text ( ) ; if ( lowerVal != null ? ! ( lowerVal . equals ( olowerText ) ) : olowerText != null ) return false ; if ( upperVal != null ? ! ( upperVal . equals ( oupperText ) ) : oupperText != null ) return false ; return ( this . getBoost ( ) ) == ( other . getBoost ( ) ) ; } public int hashCode ( ) { } }

Fix:
if ( ( ( ( ( this . field ) != ( other . field ) ) || ( ( this . includeLower ) != ( other . includeLower ) ) ) || ( ( this . includeUpper ) != ( other . includeUpper ) ) ) || ( ( ( ( this . collator ) != null ) && ( ! ( this . collator . equals ( other . collator ) ) ) ) || ( ( ( this . collator ) == null ) && ( ( other . collator ) != null ) ) ) ) {
Buggy code:
public class DateFormatManager { private TimeZone _timeZone = null ; private Locale _locale = null ; private String _pattern = null ; private DateFormat _dateFormat = null ; public DateFormatManager ( ) { } public DateFormatManager ( TimeZone timeZone ) { } public DateFormatManager ( Locale locale ) { } public DateFormatManager ( String pattern ) { } public DateFormatManager ( TimeZone timeZone , Locale locale ) { } public DateFormatManager ( TimeZone timeZone , String pattern ) { } public DateFormatManager ( Locale locale , String pattern ) { } public DateFormatManager ( TimeZone timeZone , Locale locale , String pattern ) { } public synchronized TimeZone getTimeZone ( ) { } public synchronized void setTimeZone ( TimeZone timeZone ) { <START_BUG> timeZone = timeZone ; <END_BUG> configure ( ) ; } public synchronized Locale getLocale ( ) { } public synchronized void setLocale ( Locale locale ) { } public synchronized String getPattern ( ) { } public synchronized void setPattern ( String pattern ) { } public synchronized String getOutputFormat ( ) { } public synchronized void setOutputFormat ( String pattern ) { } public synchronized DateFormat getDateFormatInstance ( ) { } public synchronized void setDateFormatInstance ( DateFormat dateFormat ) { } public String format ( Date date ) { } public String format ( Date date , String pattern ) { } public Date parse ( String date ) throws ParseException { } public Date parse ( String date , String pattern ) throws ParseException { } private synchronized void configure ( ) { } }

Fix:
_timeZone = timeZone ;
Buggy code:
public class GuiColorSelection extends GuiScreen { private GuiSlider sliderR ; private GuiSlider sliderG ; private GuiSlider sliderB ; private GuiSlider sliderA ; protected final int xSize = 177 ; protected final int ySize = 222 ; private EntityLivingBase entity ; private EntityLivingBase tempEntity ; private int r = 255 ; private int g = 255 ; private int b = 255 ; private int a = 100 ; public GuiColorSelection ( EntityLivingBase entity ) { } protected void drawGuiContainerBackgroundLayer ( ) { } @ Override public void initGui ( ) { super . initGui ( ) ; int k = ( ( this . width ) - ( this . xSize ) ) // 2 ; int l = ( ( this . height ) - ( this . ySize ) ) // 2 ; buttonList . add ( new GuiButton ( 1 , ( k + 63 ) , ( l + 190 ) , 50 , 20 , "Confirm" ) ) ; if ( ColorProperties . hasColorProperties ( entity ) ) { ColorObject obj = ColorProperties . getPropsFromEntity ( entity ) . colorObj ; r = ( ( int ) ( ( obj . red ) * 255 ) ) ; g = ( ( int ) ( ( obj . green ) * 255 ) ) ; b = ( ( int ) ( ( obj . blue ) * 255 ) ) ; <START_BUG> a = ( ( int ) ( ( obj . alpha ) * 100 ) ) ; <END_BUG> ColorProperties . setEntityColors ( obj , tempEntity ) ; } this . sliderR = new GuiSlider ( 2 , ( k + 3 ) , ( l + 140 ) , 0 , 255 , r , ( ( EnumChatFormatting . RED ) + ( StatCollector . translateToLocal ( "chat.colorfulmobs.red" ) ) ) , this ) ; buttonList . add ( this . sliderR ) ; this . sliderG = new GuiSlider ( 3 , ( k + 60 ) , ( l + 140 ) , 0 , 255 , g , ( ( EnumChatFormatting . GREEN ) + ( StatCollector . translateToLocal ( "chat.colorfulmobs.green" ) ) ) , this ) ; buttonList . add ( this . sliderG ) ; this . sliderB = new GuiSlider ( 4 , ( k + 117 ) , ( l + 140 ) , 0 , 255 , b , ( ( EnumChatFormatting . BLUE ) + ( StatCollector . translateToLocal ( "chat.colorfulmobs.blue" ) ) ) , this ) ; buttonList . add ( this . sliderB ) ; this . sliderA = new GuiSlider ( 5 , ( k + 61 ) , ( l + 165 ) , 0 , 100 , a , ( ( EnumChatFormatting . WHITE ) + ( StatCollector . translateToLocal ( "chat.colorfulmobs.alpha" ) ) ) , this ) ; buttonList . add ( this . sliderA ) ; } @ Override public void drawScreen ( int mouseX , int mouseY , float partialTicks ) { } float rotation = 0 ; public void drawEntityOnScreen ( int x , int y , float scale , EntityLivingBase entity ) { } @ Override protected void actionPerformed ( GuiButton button ) { } public void updateColor ( ) { } No newline ; at end ; of file ; }

Fix:
a = ( ( int ) ( ( obj . alpha ) * 255 ) ) ;
Buggy code:
public class IndexScanCommand implements MessageProducer { private static final IndexScanCommand . IndexScanCommandSerializer serializer = new IndexScanCommand . IndexScanCommandSerializer ( ) ; public final String keyspace ; public final String column_family ; public final IndexClause index_clause ; public final SlicePredicate predicate ; public final AbstractBounds range ; public IndexScanCommand ( String keyspace , String column_family , IndexClause index_clause , SlicePredicate predicate , AbstractBounds range ) { } <START_BUG> public Message getMessage ( int version ) { <END_BUG> DataOutputBuffer dob = new DataOutputBuffer ( ) ; try { IndexScanCommand . serializer . serialize ( this , dob ) ; } catch ( IOException e ) { throw new IOError ( e ) ; } return new Message ( FBUtilities . getLocalAddress ( ) , Verb . INDEX_SCAN , Arrays . copyOf ( dob . getData ( ) , dob . getLength ( ) ) , version ) ; } public static IndexScanCommand read ( Message message ) throws IOException { } private static class IndexScanCommandSerializer implements ICompactSerializer2 < IndexScanCommand > { public void serialize ( IndexScanCommand o , DataOutput out ) throws IOException { } public IndexScanCommand deserialize ( DataInput in ) throws IOException { } } }

Fix:
public Message getMessage ( Integer version ) {
Buggy code:
public abstract class ElasticSearch { public static Client client ( ) { } static < T extends Model > SearchRequestBuilder builder ( QueryBuilder query , Class < T > clazz ) { ModelMapper < T > mapper = ElasticSearchPlugin . getMapper ( clazz ) ; String index = mapper . getIndexName ( ) ; <START_BUG> SearchRequestBuilder builder = ElasticSearch . client ( ) . prepareSearch ( index ) . setSearchType ( QUERY_THEN_FETCH ) . setQuery ( query ) ; <END_BUG> return builder ; } public static < T extends Model > Query < T > query ( QueryBuilder query , Class < T > clazz ) { } public static < T extends Model > SearchResults < T > search ( QueryBuilder query , Class < T > clazz , AbstractFacetBuilder ... facets ) { } public static < T extends Model > SearchResults < T > searchAndHydrate ( QueryBuilder queryBuilder , Class < T > clazz , AbstractFacetBuilder ... facets ) { } private static < T extends Model > SearchResults < T > search ( QueryBuilder query , Class < T > clazz , boolean hydrate , AbstractFacetBuilder ... facets ) { } public static < T extends Model > void index ( T model ) { } }

Fix:
SearchRequestBuilder builder = ElasticSearch . client ( ) . prepareSearch ( index ) . setSearchType ( QUERY_THEN_FETCH ) . setQuery ( query . buildAsBytes ( ) ) ;
Buggy code:
public class Galk { static GalkCore core ; static PageDispatcher dispatcher ; public static void main ( String [ ] args ) throws Exception { } static void importFrom ( String fileName ) { } static class HttpJSONRequestHandler implements HttpRequestHandler { public HttpJSONRequestHandler ( ) { } private void openFile ( final HttpResponse response , String target ) { FileEntity fileContent ; File file ; file = new File ( target . substring ( 1 ) ) ; try { <START_BUG> if ( ! ( file . getCanonicalPath ( ) . startsWith ( ( ( new File ( "." ) . getCanonicalPath ( ) ) + "//resources" ) ) ) ) { <END_BUG> response . setStatusCode ( SC_FORBIDDEN ) ; return ; } } catch ( IOException e ) { e . printStackTrace ( ) ; response . setStatusCode ( SC_FORBIDDEN ) ; return ; } if ( ( file . exists ( ) ) && ( file . canRead ( ) ) ) { fileContent = new FileEntity ( file ) ; fileContent . setContentType ( Mime . getType ( target ) ) ; response . setEntity ( fileContent ) ; } else { response . setStatusCode ( SC_NOT_FOUND ) ; } } public void handle ( final HttpRequest request , final HttpResponse response , final HttpContext context ) throws HttpException , IOException { } } static class RequestListenerThread extends Thread { private final ServerSocket serversocket ; private final HttpParams params ; private final HttpService httpService ; public RequestListenerThread ( int port ) throws IOException { } @ Override public void run ( ) { } } static class WorkerThread extends Thread { private final HttpService httpservice ; private final HttpServerConnection conn ; public WorkerThread ( final HttpService httpservice , final HttpServerConnection conn ) { } @ Override public void run ( ) { } } }

Fix:
if ( ! ( file . getCanonicalPath ( ) . startsWith ( new File ( ".//resources" ) . getCanonicalPath ( ) ) ) ) {
Buggy code:
public class TestGermanAnalyzer extends BaseTokenStreamTestCase { public void testReusableTokenStream ( ) throws Exception { } public void testWithKeywordAttribute ( ) throws IOException { } public void testStemExclusionTable ( ) throws Exception { } public void testGermanSpecials ( ) throws Exception { } public void testRandomStrings ( ) throws Exception { <START_BUG> checkRandomData ( random ( ) , new GermanAnalyzer ( TEST_VERSION_CURRENT ) , ( 10000 * ( RANDOM_MULTIPLIER ) ) ) ; <END_BUG> } }

Fix:
checkRandomData ( random ( ) , new GermanAnalyzer ( TEST_VERSION_CURRENT ) , ( 1000 * ( RANDOM_MULTIPLIER ) ) ) ;
Buggy code:
public class BarrelLoader { public static class WoodRecipe { public BarrelLoader . Input input ; public BarrelLoader . Output output ; public String conditional = "all" ; @ SerializedName ( "global_limit" ) public int globalLimit ; } public static class StoneRecipe { public BarrelLoader . Input input ; public BarrelLoader . Output output ; public BarrelLoader . Heat heat = BarrelLoader . Heat . BLANK ; public String conditional = "all" ; @ SerializedName ( "global_limit" ) public int globalLimit ; } public static class MeltingRecipe { public GenericItem input ; public FluidStack output ; public BarrelLoader . Heat heat ; public boolean valid ( ) { return ( input . valid ( ) ) && ( ( output ) != null ) ; } } private static class Input { public GenericItem item ; public FluidStack fluid ; public boolean valid ( ) { return ( item . valid ( ) ) && ( ( fluid ) != null ) ; } } public static class Output { public ItemStack item ; public FluidStack fluid ; public boolean valid ( ) { <START_BUG> return ( ( ( item ) != null ) && ( ( item . getItem ( ) ) != null ) ) && ( ( fluid ) != null ) ; <END_BUG> } } private static class Heat { public static final BarrelLoader . Heat BLANK = new BarrelLoader . Heat ( ) ; public int torch = - 1 ; public int fire = - 1 ; public int lava = - 1 ; } public static void parseFile ( File file , String type ) { } private static void verifyWood ( BarrelLoader . WoodRecipe woodRecipe ) { } private static void verifyStone ( BarrelLoader . StoneRecipe stoneRecipe ) { } private static void verifyMelting ( BarrelLoader . MeltingRecipe meltingRecipe ) { } No newline ; at end ; of file ; }

Fix:
return ( ( item ) != null ) && ( ( item . getItem ( ) ) != null ) ;
Buggy code:
public class TestPrefixFilter extends LuceneTestCase { public void testPrefixFilter ( ) throws Exception { RAMDirectory directory = new RAMDirectory ( ) ; String [ ] categories = new String [ ] { "//Computers//Linux" , "//Computers//Mac//One" , "//Computers//Mac//Two" , "//Computers//Windows" } ; IndexWriter writer = new IndexWriter ( directory , new WhitespaceAnalyzer ( ) , true , MaxFieldLength . LIMITED ) ; for ( int i = 0 ; i < ( categories . length ) ; i ++ ) { Document doc = new Document ( ) ; doc . add ( new org . apache . lucene . document . Field ( "category" , categories [ i ] , Store . YES , Index . NOT_ANALYZED ) ) ; writer . addDocument ( doc ) ; } writer . close ( ) ; PrefixFilter filter = new PrefixFilter ( new Term ( "category" , "//Computers" ) ) ; Query query = new ConstantScoreQuery ( filter ) ; <START_BUG> IndexSearcher searcher = new IndexSearcher ( directory ) ; <END_BUG> ScoreDoc [ ] hits = searcher . search ( query , null , 1000 ) . scoreDocs ; assertEquals ( 4 , hits . length ) ; filter = new PrefixFilter ( new Term ( "category" , "//Computers//Mac" ) ) ; query = new ConstantScoreQuery ( filter ) ; hits = searcher . search ( query , null , 1000 ) . scoreDocs ; assertEquals ( 2 , hits . length ) ; filter = new PrefixFilter ( new Term ( "category" , "//Computers//Linux" ) ) ; query = new ConstantScoreQuery ( filter ) ; hits = searcher . search ( query , null , 1000 ) . scoreDocs ; assertEquals ( 1 , hits . length ) ; filter = new PrefixFilter ( new Term ( "category" , "//Computers//Windows" ) ) ; query = new ConstantScoreQuery ( filter ) ; hits = searcher . search ( query , null , 1000 ) . scoreDocs ; assertEquals ( 1 , hits . length ) ; filter = new PrefixFilter ( new Term ( "category" , "//Computers//ObsoleteOS" ) ) ; query = new ConstantScoreQuery ( filter ) ; hits = searcher . search ( query , null , 1000 ) . scoreDocs ; assertEquals ( 0 , hits . length ) ; filter = new PrefixFilter ( new Term ( "category" , "//Computers//AAA" ) ) ; query = new ConstantScoreQuery ( filter ) ; hits = searcher . search ( query , null , 1000 ) . scoreDocs ; assertEquals ( 0 , hits . length ) ; filter = new PrefixFilter ( new Term ( "category" , "//Computers//ZZZ" ) ) ; query = new ConstantScoreQuery ( filter ) ; hits = searcher . search ( query , null , 1000 ) . scoreDocs ; assertEquals ( 0 , hits . length ) ; filter = new PrefixFilter ( new Term ( "category" , "" ) ) ; query = new ConstantScoreQuery ( filter ) ; hits = searcher . search ( query , null , 1000 ) . scoreDocs ; assertEquals ( 4 , hits . length ) ; filter = new PrefixFilter ( new Term ( "nonexistantfield" , "//Computers" ) ) ; query = new ConstantScoreQuery ( filter ) ; hits = searcher . search ( query , null , 1000 ) . scoreDocs ; assertEquals ( 0 , hits . length ) ; } }

Fix:
IndexSearcher searcher = new IndexSearcher ( directory , true ) ;
Buggy code:
public class Send extends AbstractApiParams implements ApiParams { public static final String PARAM_SEND_ID = "send_id" ; protected String template ; protected String email ; protected Map < String , Object > vars ; protected String schedule_time ; protected Map < String , Object > options ; public Send ( ) { } public Send setEmail ( String email ) { } public Send setTemplate ( String template ) { } public Send setReplyTo ( String replyTo ) { <START_BUG> this . options . put ( "replyTo" , replyTo ) ; <END_BUG> return this ; } public Send setIsTest ( ) { } public Send setVars ( Map < String , Object > vars ) { } public Send setScheduleTime ( Date scheduleTime ) { } public Send setScheduleTime ( String scheduleTime ) { } public Type getType ( ) { } public Send setBehalfEmail ( String email ) { } public Send setOptions ( Map < String , Object > options ) { } @ Override public ApiAction getApiCall ( ) { } }

Fix:
this . options . put ( "replyto" , replyTo ) ;
Buggy code:
public class AbstractRTSService { private InjectedValue < Host > injectedHost = new InjectedValue ( ) ; private InjectedValue < SocketBinding > injectedSocketBinding = new InjectedValue ( ) ; private volatile Deployment deployment = null ; public InjectedValue < Host > getInjectedHost ( ) { } public InjectedValue < SocketBinding > getInjectedSocketBinding ( ) { } protected DeploymentInfo getDeploymentInfo ( final String name , final String contextPath , final Map < String , String > initialParameters ) { } protected void deployServlet ( final DeploymentInfo deploymentInfo ) { } protected void undeployServlet ( ) { } protected String getBaseUrl ( ) { final String address = injectedSocketBinding . getValue ( ) . getAddress ( ) . getHostAddress ( ) ; <START_BUG> final int port = injectedSocketBinding . getValue ( ) . getPort ( ) ; <END_BUG> if ( ( injectedSocketBinding . getValue ( ) . getAddress ( ) ) instanceof Inet4Address ) { return ( ( "http:////" + address ) + ":" ) + port ; } else { return ( ( "http:////[" + address ) + "]:" ) + port ; } } private ServletInfo getResteasyServlet ( ) { } private ListenerInfo getResteasyListener ( ) { } private ListenerInfo getRestATListener ( ) { } }

Fix:
final int port = injectedSocketBinding . getValue ( ) . getAbsolutePort ( ) ;
Buggy code:
public class SerialEncoderImplJOSBASE64 extends SerialEncoderImpl { @ Override public String encode ( Object obj ) { } @ Override public Object decode ( String txt ) { Object restore = null ; try { byte [ ] data = Base64 . getDecoder ( ) . decode ( txt ) ; ByteArrayInputStream bais = new ByteArrayInputStream ( data ) ; ObjectInputStream ois = new ObjectInputStream ( bais ) ; restore = ois . readObject ( ) ; } catch ( Exception ex ) { <START_BUG> throw new RuntimeException ( ( "Error<seq2seq4repair_space>in<seq2seq4repair_space>JOSBASE64<seq2seq4repair_space>deserialization<seq2seq4repair_space>of<seq2seq4repair_space>string<seq2seq4repair_space>to<seq2seq4repair_space>contactManager.<seq2seq4repair_space>Details:<seq2seq4repair_space>" + ex ) ) ; <END_BUG> } return restore ; } }

Fix:
throw new RuntimeException ( ( "Error<seq2seq4repair_space>in<seq2seq4repair_space>JOSBASE64<seq2seq4repair_space>deserialization<seq2seq4repair_space>of<seq2seq4repair_space>string<seq2seq4repair_space>to<seq2seq4repair_space>Object.<seq2seq4repair_space>Details:<seq2seq4repair_space>" + ex ) ) ;
Buggy code:
@ RestController public class BankController { private static final int FALLBACK_SCORE = 500 ; @ Value ( "${base.rate}" ) private float baseRate ; @ Value ( "${bank.name}" ) private String bankName ; @ Autowired private RestTemplate restTemplate ; @ RequestMapping ( "//quote" ) @ HystrixCommand ( commandKey = "RequestScoreFromCreditBureau" , fallbackMethod = "fallbackQuote" , commandProperties = { @ HystrixProperty ( name = "execution.isolation.thread.timeoutInMilliseconds" , value = "5000" ) } ) public Quote quote ( @ RequestParam ( "ssn" ) Long ssn , @ RequestParam ( "amount" ) Double amount , @ RequestParam ( "duration" ) Integer duration ) { <START_BUG> Integer score = restTemplate . getForObject ( "http:////credit-bureau//eval" , Integer . class , ssn ) ; <END_BUG> Double rate = ( ( baseRate ) + ( ( ( double ) ( duration // 12 ) ) // 10 ) ) + ( ( ( double ) ( 1000 - score ) ) // 1000 ) ; return new Quote ( bankName , rate , amount , duration ) ; } public Quote fallbackQuote ( @ RequestParam ( "ssn" ) Long ssn , @ RequestParam ( "amount" ) Double amount , @ RequestParam ( "duration" ) Integer duration ) { } }

Fix:
Integer score = restTemplate . getForObject ( "http:////loanbroker-credit-bureau//eval?ssn={ssn}" , Integer . class , ssn ) ;
Buggy code:
@ PowerAnnotation public class CyclopsFluid2 extends Power { private static final double a = 0.00276 ; private static final double b = 0.00529 ; private static final double c = 5.58 ; private static final double d = 0 ; private static final Cubic cubic = new Cubic ( ) ; public int getPower ( double speed , int resistance ) { <START_BUG> double power = ( ( CyclopsFluid2 . c ) * speed ) + ( ( ( ( CyclopsFluid2 . a ) * speed ) * speed ) * speed ) ; <END_BUG> return ( ( int ) ( power ) ) ; } public String description ( ) { } @ Override public int getResitanceLevels ( ) { } public double getSpeed ( int power , int resistance ) { } }

Fix:
double power = ( ( ( CyclopsFluid2 . c ) * speed ) + ( ( ( CyclopsFluid2 . b ) * speed ) * speed ) ) + ( ( ( ( CyclopsFluid2 . a ) * speed ) * speed ) * speed ) ;
Buggy code:
public class MethodExclusionMBeanInfoAssemblerTests extends AbstractJmxAssemblerTests { private static final String OBJECT_NAME = "bean:name=testBean5" ; protected String getObjectName ( ) { } protected int getExpectedOperationCount ( ) { } protected int getExpectedAttributeCount ( ) { } protected String getApplicationContextPath ( ) { } protected MBeanInfoAssembler getAssembler ( ) { } public void testSupermanIsReadOnly ( ) throws Exception { } public void testIsNotIgnoredDoesntIgnoreUnspecifiedBeanMethods ( ) throws Exception { final String beanKey = "myTestBean" ; MethodExclusionMBeanInfoAssembler assembler = new MethodExclusionMBeanInfoAssembler ( ) ; Properties ignored = new Properties ( ) ; ignored . setProperty ( beanKey , "dontExposeMe,setSuperman" ) ; assembler . setIgnoredMethodMappings ( ignored ) ; <START_BUG> Method method = JmxTestBean . class . getMethod ( "dontExposeMe" , null ) ; <END_BUG> assertFalse ( assembler . isNotIgnored ( method , beanKey ) ) ; assertTrue ( assembler . isNotIgnored ( method , "someOtherBeanKey" ) ) ; } }

Fix:
Method method = JmxTestBean . class . getMethod ( "dontExposeMe" ) ;
Buggy code:
public class WLStop extends Task { private String classpath ; private String username ; private String password ; private String serverURL ; private int delay = 0 ; public void execute ( ) throws BuildException { if ( ( ( username ) == null ) || ( ( password ) == null ) ) { throw new BuildException ( "weblogic<seq2seq4repair_space>username<seq2seq4repair_space>and<seq2seq4repair_space>password<seq2seq4repair_space>must<seq2seq4repair_space>both<seq2seq4repair_space>be<seq2seq4repair_space>set" ) ; } if ( ( serverURL ) == null ) { throw new BuildException ( "The<seq2seq4repair_space>url<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>weblogic<seq2seq4repair_space>server<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>provided." ) ; } String execClassPath = project . translatePath ( classpath ) ; Java weblogicAdmin = ( ( Java ) ( project . createTask ( "java" ) ) ) ; <START_BUG> weblogicAdmin . setFork ( "yes" ) ; <END_BUG> weblogicAdmin . setClassname ( "weblogic.Admin" ) ; String args = ( ( ( ( ( ( serverURL ) + "<seq2seq4repair_space>SHUTDOWN<seq2seq4repair_space>" ) + ( username ) ) + "<seq2seq4repair_space>" ) + ( password ) ) + "<seq2seq4repair_space>" ) + ( delay ) ; weblogicAdmin . setArgs ( args ) ; weblogicAdmin . setClasspath ( new org . apache . tools . ant . types . Path ( project , execClassPath ) ) ; weblogicAdmin . execute ( ) ; } public void setClasspath ( String s ) { } public void setUser ( String s ) { } public void setPassword ( String s ) { } public void setUrl ( String s ) { } public void setDelay ( String s ) { } }

Fix:
weblogicAdmin . setFork ( true ) ;
Buggy code:
public class ModClusterRemoveMetric implements OperationStepHandler , DescriptionProvider { static final ModClusterRemoveMetric INSTANCE = new ModClusterRemoveMetric ( ) ; @ Override public ModelNode getModelDescription ( Locale locale ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { <START_BUG> if ( ( context . getType ( ) ) == ( Type . SERVER ) ) { <END_BUG> context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final ModelNode dynamicLoadProvider = context . readResourceForUpdate ( EMPTY_ADDRESS ) . getModel ( ) . get ( DYNAMIC_LOAD_PROVIDER ) ; String type = null ; if ( dynamicLoadProvider . isDefined ( ) ) { List < Property > list = operation . asPropertyList ( ) ; Iterator < Property > it = list . iterator ( ) ; while ( it . hasNext ( ) ) { Property prop = it . next ( ) ; if ( prop . getName ( ) . equals ( "type" ) ) { type = prop . getValue ( ) . asString ( ) ; break ; } } if ( type != null ) { removeMetric ( dynamicLoadProvider , type ) ; } if ( ( ! ( dynamicLoadProvider . get ( LOAD_METRIC ) . isDefined ( ) ) ) && ( ! ( dynamicLoadProvider . get ( CUSTOM_LOAD_METRIC ) . isDefined ( ) ) ) ) { context . readResourceForUpdate ( EMPTY_ADDRESS ) . getModel ( ) . remove ( DYNAMIC_LOAD_PROVIDER ) ; } } context . completeStep ( ) ; } private void removeMetric ( ModelNode dynamicLoadProvider , String type ) { List < ModelNode > list = dynamicLoadProvider . get ( LOAD_METRIC ) . asList ( ) ; List < ModelNode > newlist = Collections . < ModelNode > emptyList ( ) ; dynamicLoadProvider . get ( LOAD_METRIC ) . set ( newlist ) ; Iterator < ModelNode > it = list . iterator ( ) ; while ( it . hasNext ( ) ) { ModelNode node = it . next ( ) ; if ( ! ( node . get ( "type" ) . asString ( ) . equals ( type ) ) ) { dynamicLoadProvider . get ( LOAD_METRIC ) . add ( node ) ; } } list = dynamicLoadProvider . get ( LOAD_METRIC ) . asList ( ) ; if ( list . isEmpty ( ) ) { dynamicLoadProvider . remove ( LOAD_METRIC ) ; } } } , MODEL ) ; } context . completeStep ( ) ; } }

Fix:
if ( context . getProcessType ( ) . isServer ( ) ) {