nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Node < V > { public Node ( V object ) { } public V object ( ) { } private V _object ; void addEdge ( Edge < V > edge ) { } void removeEdge ( Edge < V > edge ) { } public Set < Edge < V > > outgoingEdges ( ) { } public Set < Edge < V > > incomingEdges ( ) { } public int nbOutgoingEdges ( ) { } public int nbIncomingEdges ( ) { } public Set < Edge < V > > edges ( ) { } public boolean isLeaf ( ) { } private Set < Edge < V > > _outgoing ; private Set < Edge < V > > _incoming ; public boolean canReach ( Node < V > other ) { return new be . kuleuven . cs . distrinet . rejuse . java . collections . SafeTransitiveClosure ( ) { public void addConnectedNodes ( Object node , Set acc ) { acc . addAll ( ( ( Node ) ( node ) ) . directSuccessorNodes ( ) ) ; } <START_BUG> } . closure ( this ) . contains ( other ) ; <END_BUG> } public String toString ( ) { } public void terminate ( ) { } public Set < Node < V > > directSuccessorNodes ( ) { } public Set < Node < V > > directPredecessorNodes ( ) { } public Set < V > directSuccessors ( ) { } public Set < V > directPredecessors ( ) { } public boolean hasDirectSuccessor ( Node < V > node ) { } public boolean hasDirectPredecessor ( Node < V > node ) { } public List < Edge < V > > directlySuccessorEdges ( Node < V > node ) { } public Node < V > bareClone ( ) { } }

Fix:
} . closureFromAll ( directSuccessorNodes ( ) ) . contains ( other ) ;
Buggy code:
public class CmdDisband extends FCommand { public CmdDisband ( ) { } @ Override public void perform ( ) { Faction faction = this . argAsFaction ( 0 , ( ( fme ) == null ? null : myFaction ) ) ; if ( faction == null ) return ; boolean isMyFaction = ( ( fme ) == null ) ? false : faction == ( myFaction ) ; if ( isMyFaction ) { if ( ! ( assertMinRole ( ADMIN ) ) ) return ; } else { if ( ! ( DISBAND_ANY . has ( sender , true ) ) ) { return ; } } if ( ! ( faction . isNormal ( ) ) ) { msg ( "<i>You<seq2seq4repair_space>cannot<seq2seq4repair_space>disband<seq2seq4repair_space>the<seq2seq4repair_space>Wilderness,<seq2seq4repair_space>SafeZone,<seq2seq4repair_space>or<seq2seq4repair_space>WarZone." ) ; return ; } if ( faction . isPermanent ( ) ) { msg ( "<i>This<seq2seq4repair_space>faction<seq2seq4repair_space>is<seq2seq4repair_space>designated<seq2seq4repair_space>as<seq2seq4repair_space>permanent,<seq2seq4repair_space>so<seq2seq4repair_space>you<seq2seq4repair_space>cannot<seq2seq4repair_space>disband<seq2seq4repair_space>it." ) ; return ; } for ( FPlayer fplayer : i . getOnline ( ) ) { String who = ( senderIsConsole ) ? "A<seq2seq4repair_space>server<seq2seq4repair_space>admin" : fme . describeTo ( fplayer ) ; if ( ( fplayer . getFaction ( ) ) == faction ) { fplayer . msg ( "<h>%s<i><seq2seq4repair_space>disbanded<seq2seq4repair_space>your<seq2seq4repair_space>faction." , who ) ; } else { fplayer . msg ( "<h>%s<i><seq2seq4repair_space>disbanded<seq2seq4repair_space>the<seq2seq4repair_space>faction<seq2seq4repair_space>%s." , who , faction . getTag ( fplayer ) ) ; } } if ( Conf . logFactionDisband ) p . log ( ( ( ( ( ( ( "The<seq2seq4repair_space>faction<seq2seq4repair_space>" + ( faction . getTag ( ) ) ) + "<seq2seq4repair_space>(" ) + ( faction . getId ( ) ) ) + ")<seq2seq4repair_space>was<seq2seq4repair_space>disbanded<seq2seq4repair_space>by<seq2seq4repair_space>" ) + ( senderIsConsole ? "console<seq2seq4repair_space>command" : fme . getName ( ) ) ) + "." ) ) ; <START_BUG> if ( Econ . shouldBeUsed ( ) ) { <END_BUG> double amount = Econ . getBalance ( faction . getAccountId ( ) ) ; Econ . transferMoney ( fme , faction , fme , amount , false ) ; if ( amount > 0.0 ) { String amountString = Econ . moneyString ( amount ) ; msg ( "<i>You<seq2seq4repair_space>have<seq2seq4repair_space>been<seq2seq4repair_space>given<seq2seq4repair_space>the<seq2seq4repair_space>disbanded<seq2seq4repair_space>faction's<seq2seq4repair_space>bank,<seq2seq4repair_space>totaling<seq2seq4repair_space>%s." , amountString ) ; p . log ( ( ( ( ( ( ( fme . getName ( ) ) + "<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>given<seq2seq4repair_space>bank<seq2seq4repair_space>holdings<seq2seq4repair_space>of<seq2seq4repair_space>" ) + amountString ) + "<seq2seq4repair_space>from<seq2seq4repair_space>disbanding<seq2seq4repair_space>" ) + ( faction . getTag ( ) ) ) + "." ) ) ; } } faction . detach ( ) ; SpoutFeatures . updateAppearances ( ) ; } }

Fix:
if ( ( Econ . shouldBeUsed ( ) ) && ( ! ( senderIsConsole ) ) ) {
Buggy code:
public final class DomainSubsystemAdd extends AbstractDomainModelUpdate < Void > { private static final long serialVersionUID = - 9076890219875153928L ; private final String profileName ; private final String namespaceUri ; public DomainSubsystemAdd ( final String profileName , final String namespaceUri ) { } public String getProfileName ( ) { } public String getNamespaceUri ( ) { } protected void applyUpdate ( final DomainModel element ) throws UpdateFailedException { } public DomainSubsystemRemove getCompensatingUpdate ( final DomainModel original ) { } protected ServerSubsystemAdd getServerModelUpdate ( ) { <START_BUG> return null ; <END_BUG> } }

Fix:
return new ServerSubsystemAdd ( namespaceUri ) ;
Buggy code:
public class ObjectBuilderModel { private final String entityName ; private final Name name ; private final List < Property > properties = Lists . newArrayList ( ) ; private final boolean isArray ; private String jsonSource ; @ SuppressWarnings ( "unchecked" ) public ObjectBuilderModel ( Name name , Object obj ) { } public Iterable < Property > getProperties ( ) { } public Iterable < Property > getObjectProperties ( ) { } public boolean getHasObjectProperties ( ) { } private Predicate < Property > onlyObjectProperties ( ) { } public Name getName ( ) { } public boolean isArray ( ) { } public String getJsonSourceStringEscaped ( ) { <START_BUG> return jsonSource . replace ( "\"" , "\\\"" ) ; <END_BUG> } }

Fix:
return jsonSource . replace ( "\\" , "\\\\" ) . replace ( "\"" , "\\\"" ) ;
Buggy code:
public class DeleteElementsOperation extends MultiOperation { protected Map fChildrenToRemove ; protected DOMFactory fFactory ; public DeleteElementsOperation ( IJavaElement [ ] elementsToDelete , boolean force ) { } protected String getMainTaskName ( ) { } protected void groupElements ( ) throws JavaModelException { fChildrenToRemove = new HashMap ( 1 ) ; int uniqueCUs = 0 ; for ( int i = 0 , length = fElementsToProcess . length ; i < length ; i ++ ) { IJavaElement e = fElementsToProcess [ i ] ; ICompilationUnit cu = getCompilationUnitFor ( e ) ; if ( cu == null ) { <START_BUG> throw new JavaModelException ( new JavaModelStatus ( JavaModelStatus . READ_ONLY , e ) ) ; <END_BUG> } else { IRegion region = ( ( IRegion ) ( fChildrenToRemove . get ( cu ) ) ) ; if ( region == null ) { region = new Region ( ) ; fChildrenToRemove . put ( cu , region ) ; uniqueCUs += 1 ; } region . add ( e ) ; } } fElementsToProcess = new IJavaElement [ uniqueCUs ] ; Iterator iter = fChildrenToRemove . keySet ( ) . iterator ( ) ; int i = 0 ; while ( iter . hasNext ( ) ) { fElementsToProcess [ ( i ++ ) ] = ( ( IJavaElement ) ( iter . next ( ) ) ) ; } } protected void processElement ( IJavaElement element ) throws JavaModelException { } protected void processElements ( ) throws JavaModelException { } protected void verify ( IJavaElement element ) throws JavaModelException { } }

Fix:
throw new JavaModelException ( new JavaModelStatus ( IJavaModelStatusConstants . READ_ONLY , e ) ) ;
Buggy code:
public class TreePopulator { private CreateTree CT ; public TreePopulator ( BukkitScheduler b ) { } public void parseChunk ( Chunk chunk ) { } private Location getSurface ( World world , int x , int z ) { x = ( ( int ) ( ( ( Math . random ( ) ) * 16 ) + x ) ) ; z = ( ( int ) ( ( ( Math . random ( ) ) * 16 ) + z ) ) ; Location loc = new Location ( world , x , 0 , z ) ; int id = 0 ; <START_BUG> for ( int y = 127 ; y > 0 ; y -- ) { <END_BUG> loc = new Location ( world , x , y , z ) ; id = loc . getBlock ( ) . getTypeId ( ) ; if ( id != 0 ) { if ( ( ( ( ( ( id == 8 ) || ( id == 19 ) ) || ( id == 10 ) ) || ( id == 11 ) ) || ( id == 51 ) ) || ( id == 7 ) ) { loc = null ; break ; } else if ( ( ( ( ( ( ( ( ( ( ( id != 17 ) && ( id != 18 ) ) && ( id != 81 ) ) && ( id != 83 ) ) && ( id != 37 ) ) && ( id != 38 ) ) && ( id != 39 ) ) && ( id != 40 ) ) && ( id != 86 ) ) && ( id != 31 ) ) && ( id != 32 ) ) { break ; } } if ( y == 1 ) { loc = null ; break ; } } return loc ; } private String getRandom ( int max , int min ) { } private boolean getRandomChance ( int percentChance ) { } }

Fix:
for ( int y = ( world . getMaxHeight ( ) ) - 1 ; y > 0 ; y -- ) {
Buggy code:
public class Director { private JKindSettings settings ; private Specification spec ; private Writer writer ; private List < String > remainingProperties = new ArrayList < > ( ) ; private List < String > validProperties = new ArrayList < > ( ) ; private List < String > invalidProperties = new ArrayList < > ( ) ; private int baseStep = 0 ; private Map < String , InductiveCounterexampleMessage > inductiveCounterexamples = new HashMap < > ( ) ; private BaseProcess baseProcess ; private InductiveProcess inductiveProcess ; private InvariantProcess invariantProcess ; private ReduceProcess reduceProcess ; private SmoothProcess smoothProcess ; private IntervalProcess intervalProcess ; private List < Process > processes = new ArrayList < > ( ) ; private List < Thread > threads = new ArrayList < > ( ) ; protected BlockingQueue < Message > incoming = new LinkedBlockingQueue < > ( ) ; public Director ( JKindSettings settings , Specification spec ) { } private Writer getWriter ( Specification spec ) { } public void run ( ) { } private boolean someThreadAlive ( ) { } private boolean someProcessFailed ( ) { } private void reportFailures ( ) { } private void printHeader ( ) { } private void startThreads ( ) { } private void registerProcess ( Process process ) { } private void processMessages ( long startTime ) { } private double getRuntime ( long startTime ) { } private void printSummary ( ) { } private Map < String , Counterexample > convertInductiveCounterexamples ( ) { } private Counterexample extractCounterexample ( int k , Model model ) { } private boolean isInternal ( String stream ) { } private Value convert ( String base , Value value ) { Type type = spec . typeMap . get ( base ) ; if ( type instanceof EnumType ) { EnumType et = ( ( EnumType ) ( type ) ) ; IntegerValue iv = ( ( IntegerValue ) ( value ) ) ; <START_BUG> return new jkind . lustre . values . EnumValue ( et . values . get ( iv . value . intValue ( ) ) ) ; <END_BUG> } return value ; } }

Fix:
return new jkind . lustre . values . EnumValue ( et . getValue ( iv . value . intValue ( ) , "" ) ) ;
Buggy code:
public class MapLookupTest { @ Test public void testEmptyMap ( ) { } @ Test public void testMap ( ) { } @ Test public void testNullMap ( ) { } @ Test public void testMainMap ( ) { MapLookup . setMainArguments ( new String [ ] { "--file" , "foo.txt" } ) ; <START_BUG> final MapLookup lookup = MapLookup . MAIN_SINGLETON ; <END_BUG> assertEquals ( null , lookup . lookup ( null ) ) ; assertEquals ( null , lookup . lookup ( "X" ) ) ; assertEquals ( "--file" , lookup . lookup ( "0" ) ) ; assertEquals ( "foo.txt" , lookup . lookup ( "1" ) ) ; assertEquals ( "foo.txt" , lookup . lookup ( "--file" ) ) ; assertEquals ( null , lookup . lookup ( "foo.txt" ) ) ; } }

Fix:
final MapLookup lookup = MainMapLookup . MAIN_SINGLETON ;
Buggy code:
public class NelderMeadTest extends TestCase { public NelderMeadTest ( String name ) { } public void testCostExceptions ( ) throws ConvergenceException { CostFunction wrong = new CostFunction ( ) { public double cost ( double [ ] x ) throws CostException { if ( ( x [ 0 ] ) < 0 ) { <START_BUG> throw new CostException ( "{0}" , new Object [ ] { "oops" } ) ; <END_BUG> } else if ( ( x [ 0 ] ) > 1 ) { throw new CostException ( new RuntimeException ( "oops" ) ) ; } else { return ( x [ 0 ] ) * ( 1 - ( x [ 0 ] ) ) ; } } } ; try { new NelderMead ( 0.9 , 1.9 , 0.4 , 0.6 ) . minimize ( wrong , 10 , new NelderMeadTest . ValueChecker ( 0.001 ) , new double [ ] { - 0.5 } , new double [ ] { 0.5 } ) ; fail ( "an<seq2seq4repair_space>exception<seq2seq4repair_space>should<seq2seq4repair_space>have<seq2seq4repair_space>been<seq2seq4repair_space>thrown" ) ; } catch ( CostException ce ) { assertNull ( ce . getCause ( ) ) ; } catch ( Exception e ) { fail ( ( "wrong<seq2seq4repair_space>exception<seq2seq4repair_space>caught:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) ) ; } try { new NelderMead ( 0.9 , 1.9 , 0.4 , 0.6 ) . minimize ( wrong , 10 , new NelderMeadTest . ValueChecker ( 0.001 ) , new double [ ] { 0.5 } , new double [ ] { 1.5 } ) ; fail ( "an<seq2seq4repair_space>exception<seq2seq4repair_space>should<seq2seq4repair_space>have<seq2seq4repair_space>been<seq2seq4repair_space>thrown" ) ; } catch ( CostException ce ) { assertNotNull ( ce . getCause ( ) ) ; } catch ( Exception e ) { fail ( ( "wrong<seq2seq4repair_space>exception<seq2seq4repair_space>caught:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) ) ; } } public void testRosenbrock ( ) throws ConvergenceException , NotPositiveDefiniteMatrixException , CostException { } public void testPowell ( ) throws ConvergenceException , CostException { } private static class ValueChecker implements ConvergenceChecker { public ValueChecker ( double threshold ) { } public boolean converged ( PointCostPair [ ] simplex ) { } private double threshold ; } public static Test suite ( ) { } private int count ; }

Fix:
throw new CostException ( "{0}" , "oops" ) ;
Buggy code:
public class GeofenceTransitionsIntentService extends IntentService { protected static final String TAG = "geofence-transitions-service" ; DestinationDatabaseHelper mHelper ; SQLiteDatabase mDatabase ; public GeofenceTransitionsIntentService ( ) { } @ Override public void onCreate ( ) { } @ Override protected void onHandleIntent ( Intent intent ) { } private String getGeofenceTransitionDetails ( Context context , int geofenceTransition , List < Geofence > triggeringGeofences ) { } private void sendNotification ( String notificationDetails ) { Intent notificationIntent = new Intent ( getApplicationContext ( ) , MainActivity . class ) ; TaskStackBuilder stackBuilder = TaskStackBuilder . create ( this ) ; stackBuilder . addParentStack ( MainActivity . class ) ; stackBuilder . addNextIntent ( notificationIntent ) ; PendingIntent notificationPendingIntent = stackBuilder . getPendingIntent ( 0 , FLAG_UPDATE_CURRENT ) ; NotificationCompat . Builder builder = new NotificationCompat . Builder ( this ) ; Uri soundUri = Uri . parse ( ( ( ( "android.resource:////" + ( getPackageName ( ) ) ) + "//" ) + ( raw . sound ) ) ) ; mHelper = new DestinationDatabaseHelper ( this ) ; mDatabase = mHelper . getReadableDatabase ( ) ; String [ ] projection = new String [ ] { AlarmSounds . COLUMN_NAME_URI } ; Cursor c = mDatabase . query ( TABLE_NAME , projection , null , null , null , null , null ) ; int colName = c . getColumnIndex ( "uri" ) ; c . moveToLast ( ) ; try { if ( ( c . getCount ( ) ) != 0 ) { soundUri = Uri . parse ( c . getString ( colName ) ) ; } } catch ( SecurityException e ) { } c . close ( ) ; <START_BUG> builder . setSmallIcon ( ic_launcher ) . setLargeIcon ( BitmapFactory . decodeResource ( getResources ( ) , ic_launcher ) ) . setColor ( RED ) . setContentTitle ( notificationDetails ) . setContentText ( "Geofence<seq2seq4repair_space>status<seq2seq4repair_space>changed" ) . setContentIntent ( notificationPendingIntent ) . setSound ( soundUri ) . setVibrate ( new long [ ] { 1000 , 500 , 1000 , 500 , 1000 , 500 , 1000 } ) ; <END_BUG> builder . setAutoCancel ( true ) ; NotificationManager mNotificationManager = ( ( NotificationManager ) ( getSystemService ( NOTIFICATION_SERVICE ) ) ) ; mNotificationManager . notify ( 0 , builder . build ( ) ) ; } private String getTransitionString ( int transitionType ) { } }

Fix:
builder . setSmallIcon ( ic_launcher ) . setLargeIcon ( BitmapFactory . decodeResource ( getResources ( ) , ic_launcher ) ) . setColor ( RED ) . setContentTitle ( notificationDetails ) . setContentText ( "Geoalarm<seq2seq4repair_space>status<seq2seq4repair_space>changed" ) . setContentIntent ( notificationPendingIntent ) . setSound ( soundUri ) . setVibrate ( new long [ ] { 1000 , 500 , 1000 , 500 , 1000 , 500 , 1000 } ) ;
Buggy code:
public class PrimeFactorGeneratorTest { @ Test public void isPrimeForPrimeNumber ( ) { } @ Test public void isPrimeForPrimeNonNumber ( ) { <START_BUG> assertFalse ( PrimeFactorGenerator . isPrime ( 4L ) ) ; <END_BUG> assertFalse ( PrimeFactorGenerator . isPrime ( 6L ) ) ; assertFalse ( PrimeFactorGenerator . isPrime ( 22L ) ) ; assertFalse ( PrimeFactorGenerator . isPrime ( 100L ) ) ; } @ Test public void getPrimeFactorListOfPerfectSquare ( ) { } @ Test public void getPrimeFactorListOfProductOfPrimes ( ) { } @ Test public void getPrimeFactorList ( ) { } @ Test public void getLargestPrimeFactor ( ) { } No newline ; at end ; of file ; }

Fix:
assertFalse ( PrimeFactorGenerator . isPrime ( 1L ) ) ;
Buggy code:
public class UKit { private static final Config kits = new Config ( UltimateFileLoader . DFkits ) ; private final ConfigSection kit ; private final String name ; private final String description ; private final List < ItemStack > items ; private final long cooldown ; public UKit ( final String name ) { } private ItemStack addEnchantments ( final ItemStack is , final List < ConfigSection > enchantments ) { } private Enchantment getEnchantment ( final ConfigSection enchantment ) { } private ItemStack getItemStack ( final Map < String , Object > item ) { final ItemStack is = ItemUtil . searchItem ( ( ( String ) ( item . get ( "type" ) ) ) ) ; if ( is == null ) { return null ; } if ( item . containsKey ( "amount" ) ) { is . setAmount ( ( ( int ) ( item . get ( "amount" ) ) ) ) ; } if ( item . containsKey ( "damage" ) ) { <START_BUG> is . setDurability ( ( ( Integer ) ( item . get ( "damage" ) ) ) . shortValue ( ) ) ; <END_BUG> } MetaItemStack ism = new MetaItemStack ( is ) ; for ( String s : item . keySet ( ) ) { if ( ( ( s . equalsIgnoreCase ( "amount" ) ) || ( s . equalsIgnoreCase ( "type" ) ) ) || ( s . equalsIgnoreCase ( "damage" ) ) ) { continue ; } ism . addStringMeta ( null , true , ( ( s + ":" ) + ( item . get ( s ) . toString ( ) . replaceAll ( "<seq2seq4repair_space>" , "_" ) ) ) ) ; } return ism . getItemStack ( ) ; } private List < ItemStack > getItemStacks ( final List < Map < ? , ? > > items ) { } private List < String > getLore ( final ConfigSection item ) { } public long getCooldown ( ) { } public long getCooldownFor ( final Player p ) { } public String getDescription ( ) { } public List < ItemStack > getItems ( ) { } public long getLastUsed ( final Player p ) { } public String getName ( ) { } public boolean hasCooldownPassedFor ( final Player p ) { } public void setLastUsed ( final Player p , final long lastUsed ) { } }

Fix:
is . setDurability ( ( ( Number ) ( item . get ( "damage" ) ) ) . shortValue ( ) ) ;
Buggy code:
public class PhongShader2 extends Shader { private static final int MAX_POINT_LIGHTS = 4 ; public static DirectionalLight directionalLight = DirectionalLight . Default ( ) ; public static PointLight [ ] pointLights = new PointLight [ ] { } ; public PhongShader2 ( ) { } public void updateUniforms ( Transform transform ) { } protected void setUniform ( String uniformName , DirectionalLight directionalLight ) { } protected void setUniform ( String uniformName , BaseLight baseLight ) { } protected void setUniform ( String uniformName , PointLight pointLight ) { setUniform ( ( uniformName + ".base" ) , pointLight . baseLight ) ; setUniformf ( ( uniformName + ".atten.constant" ) , pointLight . atten . constant ) ; setUniformf ( ( uniformName + ".atten.linear" ) , pointLight . atten . linear ) ; setUniformf ( ( uniformName + ".atten.exponent" ) , pointLight . atten . exponent ) ; setUniform3f ( ( uniformName + ".position" ) , pointLight . position ) ; <START_BUG> setUniformf ( ( uniformName + ".position" ) , pointLight . range ) ; <END_BUG> } }

Fix:
setUniformf ( ( uniformName + ".range" ) , pointLight . range ) ;
Buggy code:
public class CloneTool extends TmpLayerBrushTool { enum State { NO_SOURCE , SOURCE_DEFINED_FIRST_STROKE , CLONING ; } private CloneTool . State state = CloneTool . State . NO_SOURCE ; private boolean sampleAllLayers = false ; private CloneBrush cloneBrush ; private final RangeParam scaleParam = new RangeParam ( "" , 10 , 400 , 100 , true , NONE ) ; private final RangeParam rotationParam = new RangeParam ( "" , ( - 180 ) , 180 , 0 , true , NONE ) ; private final EnumParam < ScalingMirror > mirrorParam = new EnumParam ( "" , ScalingMirror . class ) ; protected CloneTool ( ) { } @ Override public void initSettingsPanel ( ) { settingsPanel . addCopyBrushTypeSelector ( SOFT , cloneBrush :: typeChanged ) ; addSizeSelector ( ) ; addBlendingModePanel ( ) ; settingsPanel . addSeparator ( ) ; settingsPanel . addCheckBox ( "Aligned" , true , "alignedCB" , cloneBrush :: setAligned ) ; settingsPanel . addSeparator ( ) ; settingsPanel . addCheckBox ( "Sample<seq2seq4repair_space>All<seq2seq4repair_space>Layers" , false , "sampleAllLayersCB" , ( selected ) -> sampleAllLayers = selected ) ; settingsPanel . addSeparator ( ) ; settingsPanel . addButton ( "Transform" , ( e ) -> { JPanel p = new JPanel ( new GridBagLayout ( ) ) ; GridBagHelper gbh = new GridBagHelper ( p ) ; gbh . addLabelWithControl ( "Scale<seq2seq4repair_space>(%):" , scaleParam . createGUI ( ) ) ; gbh . addLabelWithControl ( "Rotate<seq2seq4repair_space>(Degrees):" , rotationParam . createGUI ( ) ) ; gbh . addLabelWithControl ( "Mirror:" , mirrorParam . createGUI ( ) ) ; <START_BUG> new OKDialog ( PixelitorWindow . getInstance ( ) , p , "Clone<seq2seq4repair_space>Transform" , "Close" ) ; <END_BUG> } ) ; } @ Override protected void initBrushVariables ( ) { } @ Override public void mousePressed ( MouseEvent e , ImageDisplay ic ) { } @ Override public void mouseDragged ( MouseEvent e , ImageDisplay ic ) { } private void handleUndefinedSource ( ImageDisplay ic , int x , int y ) { } private void setCloningSource ( ImageDisplay ic , int x , int y ) { } @ Override protected boolean doColorPickerForwarding ( ) { } @ Override protected Symmetry getSymmetry ( ) { } }

Fix:
toolDialog = new OKDialog ( PixelitorWindow . getInstance ( ) , p , "Clone<seq2seq4repair_space>Transform" , "Close" ) ;
Buggy code:
public class EnvironmentErrorNotifier { private Context context ; public EnvironmentErrorNotifier ( Context context ) { } public void handle ( String message ) { } private void show ( String message ) { } private String getAppName ( ) { } private PendingIntent makeShowMessage ( String message ) { Intents intents = new Intents ( context ) ; Intent intent = intents . makeIntent ( ErrorDialogActivity . class ) . putExtra ( MESSAGE_INTENT_EXTRA_NAME , message ) ; <START_BUG> return intents . makePending ( intent ) ; <END_BUG> } No newline ; at end ; of file ; }

Fix:
return intents . makePending ( intent , ACTIVITY ) ;
Buggy code:
public class FlagStateManager implements Runnable { public static final int RUN_DELAY = 20 ; private WorldGuardPlugin plugin ; private Map < String , FlagStateManager . PlayerFlagState > states ; public FlagStateManager ( WorldGuardPlugin plugin ) { } public void run ( ) { } private void processHeal ( ApplicableRegionSet applicable , Player player , FlagStateManager . PlayerFlagState state ) { if ( ( player . getHealth ( ) ) <= 0 ) { return ; } long now = System . currentTimeMillis ( ) ; Integer healAmount = applicable . getFlag ( HEAL_AMOUNT ) ; Integer healDelay = applicable . getFlag ( HEAL_DELAY ) ; Integer minHealth = applicable . getFlag ( MIN_HEAL ) ; Integer maxHealth = applicable . getFlag ( MAX_HEAL ) ; if ( ( ( ( healAmount == null ) || ( healDelay == null ) ) || ( healAmount == 0 ) ) || ( healDelay < 0 ) ) { return ; } if ( minHealth == null ) minHealth = 0 ; if ( maxHealth == null ) <START_BUG> maxHealth = 20 ; <END_BUG> minHealth = Math . min ( player . getMaxHealth ( ) , minHealth ) ; maxHealth = Math . min ( player . getMaxHealth ( ) , maxHealth ) ; if ( ( ( player . getHealth ( ) ) >= maxHealth ) && ( healAmount > 0 ) ) { return ; } if ( healDelay <= 0 ) { player . setHealth ( ( healAmount > 0 ? maxHealth : minHealth ) ) ; state . lastHeal = now ; } else if ( ( now - ( state . lastHeal ) ) > ( healDelay * 1000 ) ) { player . setHealth ( Math . min ( maxHealth , Math . max ( minHealth , ( ( player . getHealth ( ) ) + healAmount ) ) ) ) ; state . lastHeal = now ; } } private void processFeed ( ApplicableRegionSet applicable , Player player , FlagStateManager . PlayerFlagState state ) { } public synchronized void forget ( Player player ) { } public synchronized void forgetAll ( ) { } public synchronized FlagStateManager . PlayerFlagState getState ( Player player ) { } public static class PlayerFlagState { public long lastHeal ; public long lastFeed ; public String lastGreeting ; public String lastFarewell ; public Boolean lastExitAllowed = null ; public Boolean notifiedForLeave = false ; public Boolean notifiedForEnter = false ; public GameMode lastGameMode ; public World lastWorld ; public int lastBlockX ; public int lastBlockY ; public int lastBlockZ ; public World lastInvincibleWorld ; public int lastInvincibleX ; public int lastInvincibleY ; public int lastInvincibleZ ; public boolean wasInvincible ; } }

Fix:
maxHealth = player . getMaxHealth ( ) ;
Buggy code:
public class PrettyPrintVisitor implements AbstractExpressionVisitor < Byte , Void > { private final StringBuilder myBuilder ; private final List < String > myNames ; private int myIndent ; public PrettyPrintVisitor ( StringBuilder builder , List < String > names , int indent ) { } private void visitApps ( Abstract . Expression expr , List < Abstract . ArgumentExpression > args , byte prec ) { } @ Override public Void visitApp ( Abstract . AppExpression expr , Byte prec ) { } @ Override public Void visitDefCall ( Abstract . DefCallExpression expr , Byte prec ) { } @ Override public Void visitIndex ( Abstract . IndexExpression expr , Byte prec ) { } @ Override public Void visitLam ( Abstract . LamExpression expr , Byte prec ) { } @ Override public Void visitPi ( Abstract . PiExpression expr , Byte prec ) { } @ Override public Void visitUniverse ( Abstract . UniverseExpression expr , Byte prec ) { } @ Override public Void visitVar ( Abstract . VarExpression expr , Byte prec ) { } @ Override public Void visitInferHole ( Abstract . InferHoleExpression expr , Byte prec ) { } @ Override public Void visitError ( Abstract . ErrorExpression expr , Byte prec ) { <START_BUG> myBuilder . append ( "{!" ) ; <END_BUG> if ( ( expr . getExpr ( ) ) != null ) { expr . getExpr ( ) . accept ( this , PREC ) ; } myBuilder . append ( '}' ) ; return null ; } @ Override public Void visitTuple ( Abstract . TupleExpression expr , Byte prec ) { } @ Override public Void visitSigma ( Abstract . SigmaExpression expr , Byte prec ) { } @ Override public Void visitBinOp ( Abstract . BinOpExpression expr , Byte prec ) { } @ Override public Void visitElim ( Abstract . ElimExpression expr , Byte prec ) { } public void printIndent ( ) { } }

Fix:
myBuilder . append ( "{?" ) ;
Buggy code:
public class CommitWorkingCopyOperation extends JavaModelOperation { public CommitWorkingCopyOperation ( ICompilationUnit element , boolean force ) { } private void checkPackageDeclaration ( ICompilationUnit cu ) throws JavaModelException { } protected void executeOperation ( ) throws JavaModelException { try { beginTask ( Util . bind ( "workingCopy.commit" ) , 2 ) ; WorkingCopy copy = ( ( WorkingCopy ) ( getCompilationUnit ( ) ) ) ; ICompilationUnit original = ( ( ICompilationUnit ) ( copy . getOriginalElement ( ) ) ) ; if ( ! ( original . isOpen ( ) ) ) { original . open ( null ) ; } JavaElementDeltaBuilder deltaBuilder ; if ( Util . isExcluded ( original ) ) { deltaBuilder = null ; } else { deltaBuilder = new JavaElementDeltaBuilder ( original ) ; } IBuffer originalBuffer = original . getBuffer ( ) ; if ( originalBuffer == null ) return ; char [ ] originalContents = originalBuffer . getCharacters ( ) ; boolean hasSaved = false ; try { IBuffer copyBuffer = copy . getBuffer ( ) ; if ( copyBuffer == null ) return ; originalBuffer . setContents ( copyBuffer . getCharacters ( ) ) ; original . save ( fMonitor , fForce ) ; <START_BUG> this . setAttribute ( "hasModifiedResource" , "true" ) ; <END_BUG> hasSaved = true ; } finally { if ( ! hasSaved ) { originalBuffer . setContents ( originalContents ) ; } } copy . updateTimeStamp ( ( ( CompilationUnit ) ( original ) ) ) ; copy . makeConsistent ( this ) ; worked ( 1 ) ; if ( deltaBuilder != null ) { deltaBuilder . buildDeltas ( ) ; if ( ( deltaBuilder . delta ) != null ) { addDelta ( deltaBuilder . delta ) ; } } worked ( 1 ) ; } finally { done ( ) ; } } protected ICompilationUnit getCompilationUnit ( ) { } public IJavaModelStatus verify ( ) { } }

Fix:
this . setAttribute ( JavaModelOperation . HAS_MODIFIED_RESOURCE_ATTR , JavaModelOperation . TRUE ) ;
Buggy code:
public class AttributeGroup extends org . tigris . scarab . om . BaseAttributeGroup implements Persistent { private static final String GET_ATTRIBUTES = "getAttributes" ; private static final String GET_R_ATTRIBUTE_ATTRGROUP = "getRAttributeAttributeGroup" ; public boolean isGlobal ( ) throws TorqueException { } public ScarabModule getScarabModule ( ) { } public void setScarabModule ( ScarabModule module ) { } public void setModule ( Module me ) throws TorqueException { } public Module getModule ( ) throws TorqueException { } public List getAttributes ( ) throws Exception { } public int getHighestOrderedAttribute ( ) throws Exception { } public RAttributeAttributeGroup getRAttributeAttributeGroup ( Attribute attribute ) throws Exception { } public void delete ( ScarabUser user , Module module ) throws Exception { } public void addAttribute ( Attribute attribute ) throws Exception { IssueType issueType = getIssueType ( ) ; Module module = getModule ( ) ; RAttributeAttributeGroup raag = addRAttributeAttributeGroup ( attribute ) ; raag . save ( ) ; getAttributes ( ) . add ( attribute ) ; if ( isGlobal ( ) ) { issueType . addRIssueTypeAttribute ( attribute ) ; <START_BUG> List options = attribute . getAttributeOptions ( ) ; <END_BUG> for ( int j = 0 ; j < ( options . size ( ) ) ; j ++ ) { AttributeOption option = ( ( AttributeOption ) ( options . get ( j ) ) ) ; List roos = option . getROptionOptionsRelatedByOption2Id ( ) ; ROptionOption roo = ( ( ROptionOption ) ( roos . get ( 0 ) ) ) ; RIssueTypeOption rio = new RIssueTypeOption ( ) ; rio . setIssueTypeId ( issueType . getIssueTypeId ( ) ) ; rio . setOptionId ( option . getOptionId ( ) ) ; rio . setOrder ( roo . getPreferredOrder ( ) ) ; rio . setWeight ( roo . getWeight ( ) ) ; rio . save ( ) ; } } else { module . addRModuleAttribute ( issueType , attribute ) ; List options = attribute . getAttributeOptions ( ) ; for ( int j = 0 ; j < ( options . size ( ) ) ; j ++ ) { AttributeOption option = ( ( AttributeOption ) ( options . get ( j ) ) ) ; List roos = option . getROptionOptionsRelatedByOption2Id ( ) ; ROptionOption roo = ( ( ROptionOption ) ( roos . get ( 0 ) ) ) ; RModuleOption rmo = new RModuleOption ( ) ; rmo . setModuleId ( getModuleId ( ) ) ; rmo . setIssueTypeId ( issueType . getIssueTypeId ( ) ) ; rmo . setOptionId ( option . getOptionId ( ) ) ; rmo . setDisplayValue ( option . getName ( ) ) ; rmo . setOrder ( roo . getPreferredOrder ( ) ) ; rmo . setWeight ( roo . getWeight ( ) ) ; rmo . save ( ) ; IssueType templateType = IssueTypeManager . getInstance ( issueType . getTemplateId ( ) , false ) ; RModuleOption rmo2 = module . addRModuleOption ( templateType , option ) ; rmo2 . save ( ) ; } } } public void deleteAttribute ( Attribute attribute , ScarabUser user , Module module ) throws Exception { } private RAttributeAttributeGroup addRAttributeAttributeGroup ( Attribute attribute ) throws Exception { } public AttributeGroup copyGroup ( ) throws Exception { } }

Fix:
List options = attribute . getAttributeOptions ( false ) ;
Buggy code:
public class TextBuddyTest { @ Test public void testExcecuteCommand ( ) { TextBuddy . checkFileExist ( ) ; <START_BUG> TextBuddy . executeCommand ( "search<seq2seq4repair_space>software" ) ; <END_BUG> } }

Fix:
TextBuddy . executeCommand ( "search<seq2seq4repair_space>chr" ) ;
Buggy code:
public class NewMainActivity extends Activity { protected WakeLock mWakeLock ; @ Override public void onCreate ( Bundle savedInstanceState ) { } private void callInitUv ( ) { } private void callWatermark ( ) { } private void callNoteSpec ( ) { } private void callRemoveAds ( ) { } public void rateUs ( ) { } private void callShare ( ) { } private void callHelp ( ) { } private void setupGridView ( ) { GridView gridView = ( ( GridView ) ( findViewById ( gridview ) ) ) ; gridView . setAdapter ( new MenuGridViewAdapter ( this ) ) ; gridView . setOnItemClickListener ( new AdapterView . OnItemClickListener ( ) { @ Override public void onItemClick ( AdapterView < ? > parent , View v , int position , long id ) { switch ( position ) { case 0 : callInitUv ( ) ; break ; case 1 : callWatermark ( ) ; break ; case 2 : callNoteSpec ( ) ; break ; case 3 : callRemoveAds ( ) ; break ; case 4 : callHelp ( ) ; break ; <START_BUG> case 6 : <END_BUG> callShare ( ) ; break ; } } } ) ; } @ Override public void onDestroy ( ) { } @ Override protected void onPause ( ) { } @ Override public void onBackPressed ( ) { } }

Fix:
case 5 :
Buggy code:
public class GUI_Ausgabe extends JFrame { private static final long serialVersionUID = 1L ; private JPanel contentPane ; static JTable table1 ; static JLabel lblPreis ; private JCheckBox chckbxSpeichern ; public static void FensterErstellen ( ) { } public GUI_Ausgabe ( ) { } public void auflisten ( ) { } public void dokumentspeichern ( ) { File rechnung = new File ( ( ( FileSystemView . getFileSystemView ( ) . getHomeDirectory ( ) . getAbsolutePath ( ) ) + "\\rechnung.txt" ) ) ; if ( ! ( rechnung . exists ( ) ) ) { try { rechnung . createNewFile ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } try { FileWriter fw = new FileWriter ( rechnung ) ; fw . write ( "Name\t\tStückzahl\t\tPreis" ) ; fw . write ( System . lineSeparator ( ) ) ; fw . write ( "---------------------------------------------------------------" ) ; fw . write ( System . lineSeparator ( ) ) ; for ( int i = 0 ; i < ( GUI_Ausgabe . table1 . getRowCount ( ) ) ; i ++ ) { <START_BUG> fw . write ( ( ( String ) ( ( ( ( ( GUI_Ausgabe . table1 . getValueAt ( i , 0 ) ) + "\t\t" ) + ( GUI_Ausgabe . table1 . getValueAt ( i , 1 ) ) ) + "\t\t" ) + ( GUI_Ausgabe . table1 . getValueAt ( i , 2 ) ) ) ) ) ; <END_BUG> fw . write ( System . lineSeparator ( ) ) ; } fw . close ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } }

Fix:
fw . write ( ( ( String ) ( ( ( ( ( GUI_Ausgabe . table1 . getValueAt ( i , 0 ) ) + "\t\t" ) + ( GUI_Ausgabe . table1 . getValueAt ( i , 1 ) ) ) + "\t\t\t" ) + ( GUI_Ausgabe . table1 . getValueAt ( i , 2 ) ) ) ) ) ;
Buggy code:
public class RestTemplateIntegrationTests { private RestTemplate template ; private static Server jettyServer ; private static String helloWorld = "Héllo<seq2seq4repair_space>Wörld" ; private static final String URI = "http:////localhost:8889" ; @ BeforeClass public static void startJettyServer ( ) throws Exception { } @ Before public void createTemplate ( ) { } @ AfterClass public static void stopJettyServer ( ) throws Exception { } @ Test public void getString ( ) { } @ Test public void getNoResponse ( ) { } @ Test public void postForLocation ( ) throws URISyntaxException { } @ Test public void postForObject ( ) throws URISyntaxException { } @ Test ( expected = HttpClientErrorException . class ) public void notFound ( ) { } @ Test ( expected = HttpServerErrorException . class ) public void serverError ( ) { } @ Test public void optionsForAllow ( ) throws URISyntaxException { } @ Test public void uri ( ) throws InterruptedException , URISyntaxException { <START_BUG> String result = template . getForObject ( ( ( RestTemplateIntegrationTests . URI ) + "//uri//{query}" ) , String . class , "Zrich" ) ; <END_BUG> assertEquals ( "Invalid<seq2seq4repair_space>request<seq2seq4repair_space>URI" , "//uri//Z%FCrich" , result ) ; } private static class ErrorServlet extends GenericServlet { private final int sc ; private ErrorServlet ( int sc ) { } @ Override public void service ( ServletRequest request , ServletResponse response ) throws IOException , ServletException { } } private static class GetServlet extends HttpServlet { private final byte [ ] buf ; private final String contentType ; private GetServlet ( byte [ ] buf , String contentType ) { } @ Override protected void doGet ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } } private static class PostServlet extends HttpServlet { private final String s ; private final String location ; private final byte [ ] buf ; private final String contentType ; private PostServlet ( String s , String location , byte [ ] buf , String contentType ) { } @ Override protected void doPost ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } } private static class UriServlet extends HttpServlet { @ Override protected void doGet ( HttpServletRequest req , HttpServletResponse resp ) throws IOException , ServletException { } } }

Fix:
String result = template . getForObject ( ( ( RestTemplateIntegrationTests . URI ) + "//uri//{query}" ) , String . class , "Zürich" ) ;
Buggy code:
public class CheckBox extends FormComponent < Boolean > implements IOnChangeListener { private static final long serialVersionUID = 1L ; public CheckBox ( MarkupContainer parent , final String id ) { } public CheckBox ( MarkupContainer parent , final String id , IModel < Boolean > model ) { } public void onSelectionChanged ( ) { } protected void onSelectionChanged ( Boolean newSelection ) { } protected boolean wantOnSelectionChangedNotifications ( ) { } @ Override protected boolean getStatelessHint ( ) { } @ Override protected final void onComponentTag ( final ComponentTag tag ) { checkComponentTag ( tag , "input" ) ; checkComponentTagAttribute ( tag , "type" , "checkbox" ) ; final String value = getValue ( ) ; if ( value != null ) { try { if ( Strings . isTrue ( value ) ) { tag . put ( "checked" , "checked" ) ; } else { tag . remove ( "checked" ) ; } } catch ( StringValueConversionException e ) { throw new wicket . WicketRuntimeException ( ( ( "Invalid<seq2seq4repair_space>boolean<seq2seq4repair_space>value<seq2seq4repair_space>\"" + value ) + "\"" ) , e ) ; } } if ( wantOnSelectionChangedNotifications ( ) ) { final CharSequence url = urlFor ( INTERFACE ) ; Form form = findParent ( Form . class ) ; if ( form != null ) { tag . put ( "onclick" , form . getJsForInterfaceUrl ( url ) ) ; } else { <START_BUG> tag . put ( "onclick" , ( ( ( ( "location.href='" + url ) + "&" ) + ( getInputName ( ) ) ) + "='<seq2seq4repair_space>+<seq2seq4repair_space>this.checked;" ) ) ; <END_BUG> } } super . onComponentTag ( tag ) ; } @ Override protected final boolean supportsPersistence ( ) { } @ Override protected Boolean convertValue ( String [ ] value ) { } }

Fix:
tag . put ( "onclick" , ( ( ( ( "window.location.href='" + url ) + "&" ) + ( getInputName ( ) ) ) + "='<seq2seq4repair_space>+<seq2seq4repair_space>this.checked;" ) ) ;
Buggy code:
public class ProfileController { private HashMap < String , Integer > profileNames ; private Profile profile ; private final RetroMachines game ; public static final int MAX_PROFILE_NUMBER = 5 ; public final List < OnProfileChangedListener > profileChangeListeners ; public ProfileController ( RetroMachines game ) { } public HashMap < String , Integer > getProfileNameIdMap ( ) { } public void deleteProfile ( String name ) { } public boolean canUserBeCreated ( String username ) { <START_BUG> if ( ( profileNames . size ( ) ) == ( ProfileController . MAX_PROFILE_NUMBER ) ) { <END_BUG> return false ; } for ( String name : profileNames . keySet ( ) ) { if ( name . equals ( username ) ) { return false ; } } return true ; } public void createProfile ( String name ) { } public String getProfileName ( ) { } public Profile getProfile ( ) { } public void changeActiveProfile ( String profileName ) { } public void addProfileChangedListener ( OnProfileChangedListener listener ) { } public void removeProfileChangedListener ( OnProfileChangedListener listener ) { } public boolean loadLastProfile ( ) { } private void updateLastUsedProfile ( ) { } private void notifyProfileListeners ( ) { } public String [ ] getAllProfiles ( ) { } }

Fix:
if ( ( ( ( profileNames . size ( ) ) == ( ProfileController . MAX_PROFILE_NUMBER ) ) || ( username == null ) ) || ( username . equals ( "" ) ) ) {
Buggy code:
public class ApacheFileWatcherService implements IFileWatcherService , IClusterAddedListener { private IBeanService beanService ; private IClusterManagementService clusterManagementService ; private List < DefaultFileMonitor > fileMonitors ; private List < PieFile > modifiedFiles ; public void setBeanService ( IBeanService beanService ) { } public void setClusterManagementService ( IClusterManagementService clusterManagementService ) { } public void init ( ) { } @ Override public void addPieFileToModifiedList ( PieFile pieFile ) { } @ Override public boolean removePieFileFromModifiedList ( PieFile file ) { } @ Override public void watchDir ( File file ) throws IOException { } @ Override public void handleObject ( ClusterAddedEvent event ) { try { PieUser user = this . beanService . getBean ( PieShareAppBeanNames . getPieUser ( ) ) ; PieShareConfiguration configuration = user . getPieShareConfiguration ( ) ; this . watchDir ( configuration . getWorkingDir ( ) ) ; <START_BUG> FileListRequestMessage msg = new FileListRequestMessage ( ) ; <END_BUG> msg . getAddress ( ) . setClusterName ( user . getCloudName ( ) ) ; msg . getAddress ( ) . setChannelId ( user . getUserName ( ) ) ; this . clusterManagementService . sendMessage ( msg ) ; } catch ( ClusterManagmentServiceException ex ) { PieLogger . error ( this . getClass ( ) , "File<seq2seq4repair_space>error." , ex ) ; } catch ( IOException ex ) { PieLogger . error ( this . getClass ( ) , "File<seq2seq4repair_space>error." , ex ) ; } } @ Override public void shutdown ( ) { } }

Fix:
FileListRequestMessage msg = this . beanService . getBean ( PieShareAppBeanNames . getFileListRequestMessage ( ) ) ;
Buggy code:
public class TestArabicAnalyzer extends BaseTokenStreamTestCase { public void testResourcesAvailable ( ) { } public void testBasicFeatures ( ) throws Exception { } public void testReusableTokenStream ( ) throws Exception { } public void testEnglishInput ( ) throws Exception { } public void testCustomStopwords ( ) throws Exception { } public void testWithStemExclusionSet ( ) throws IOException { } public void testRandomStrings ( ) throws Exception { <START_BUG> checkRandomData ( random ( ) , new ArabicAnalyzer ( TEST_VERSION_CURRENT ) , ( 10000 * ( RANDOM_MULTIPLIER ) ) ) ; <END_BUG> } }

Fix:
checkRandomData ( random ( ) , new ArabicAnalyzer ( TEST_VERSION_CURRENT ) , ( 1000 * ( RANDOM_MULTIPLIER ) ) ) ;
Buggy code:
public class ConnectionFactory implements TestListener { private static TopicConnectionFactory factory = null ; private static QueueConnectionFactory qfactory = null ; static Logger log = LoggingManager . getLoggerForClass ( ) ; protected ConnectionFactory ( ) { } public void testStarted ( String test ) { } public void testEnded ( String test ) { } public void testEnded ( ) { } public void testStarted ( ) { } public void testIterationStart ( LoopIterationEvent event ) { } public static synchronized TopicConnectionFactory getTopicConnectionFactory ( Context ctx , String fac ) { while ( ( ConnectionFactory . factory ) == null ) { try { Object objfac = ctx . lookup ( fac ) ; if ( objfac instanceof TopicConnectionFactory ) { ConnectionFactory . factory = ( ( TopicConnectionFactory ) ( objfac ) ) ; } } catch ( NamingException e ) { <START_BUG> ConnectionFactory . log . error ( e . getMessage ( ) ) ; <END_BUG> } } return ConnectionFactory . factory ; } public static synchronized QueueConnectionFactory getQueueConnectionFactory ( Context ctx , String fac ) { } public static synchronized TopicConnection getTopicConnection ( ) { } public static QueueConnection getQueueConnection ( Context ctx , String queueConn ) { } }

Fix:
ConnectionFactory . log . error ( e . getCause ( ) . toString ( ) ) ;
Buggy code:
public class MinerFulMinerStarter extends AbstractMinerFulStarter { @ Override public Options setupOptions ( ) { } public static void main ( String [ ] args ) { } public static LogParser deriveLogParserFromLogFile ( InputCmdParameters inputParams , MinerFulCmdParameters minerFulParams ) { LogParser logParser = null ; switch ( inputParams . inputLanguage ) { case xes : ClassificationType evtClassi = MinerFulLauncher . fromInputParamToXesLogClassificationType ( inputParams . eventClassification ) ; try { logParser = new minerful . logparser . XesLogParser ( inputParams . inputFile , evtClassi ) ; } catch ( Exception e1 ) { e1 . printStackTrace ( ) ; } <START_BUG> logParser . getEventEncoderDecoder ( ) . excludeThese ( minerFulParams . activitiesToExcludeFromResult ) ; <END_BUG> System . gc ( ) ; break ; case strings : try { logParser = new minerful . logparser . StringLogParser ( inputParams . inputFile , ClassificationType . NAME ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; System . exit ( 1 ) ; } break ; default : throw new UnsupportedOperationException ( ( ( "This<seq2seq4repair_space>encoding<seq2seq4repair_space>(" + ( inputParams . inputLanguage ) ) + ")<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>supported<seq2seq4repair_space>yet" ) ) ; } return logParser ; } public ProcessModel mine ( LogParser logParser , MinerFulCmdParameters minerFulParams , SystemCmdParameters systemParams , PostProcessingCmdParameters postParams , Character [ ] alphabet ) { } public ProcessModel mine ( LogParser logParser , MinerFulCmdParameters minerFulParams , SystemCmdParameters systemParams , PostProcessingCmdParameters postPrarams , TaskCharArchive taskCharArchive ) { } private GlobalStatsTable computeKB ( LogParser logParser , MinerFulCmdParameters minerFulParams , TaskCharArchive taskCharArchive , GlobalStatsTable globalStatsTable ) { } private ConstraintsBag queryForConstraints ( LogParser logParser , MinerFulCmdParameters minerFulParams , PostProcessingCmdParameters postPrarams , TaskCharArchive taskCharArchive , GlobalStatsTable globalStatsTable , ConstraintsBag bag ) { } private ProcessModel pruneConstraints ( ProcessModel processModel , MinerFulCmdParameters minerFulParams , PostProcessingCmdParameters postPrarams ) { } No newline ; at end ; of file ; }

Fix:
logParser . excludeTasksByName ( minerFulParams . activitiesToExcludeFromResult ) ;
Buggy code:
public class DefaultPageManagerProvider implements IPageManagerProvider { protected final Application application ; public DefaultPageManagerProvider ( Application application ) { } public IPageManager get ( IPageManagerContext pageManagerContext ) { } protected IPageStore newPageStore ( IDataStore dataStore ) { } protected IDataStore newDataStore ( ) { } IStoreSettings getStoreSettings ( ) { <START_BUG> return Application . get ( ) . getStoreSettings ( ) ; <END_BUG> } }

Fix:
return application . getStoreSettings ( ) ;