nus-yam/ex-repair huggingface dataset:
Buggy code:
public abstract class AdaptiveStepsizeIntegrator extends AbstractIntegrator { protected double scalAbsoluteTolerance ; protected double scalRelativeTolerance ; protected double [ ] vecAbsoluteTolerance ; protected double [ ] vecRelativeTolerance ; protected int mainSetDimension ; private double initialStep ; private double minStep ; private double maxStep ; public AdaptiveStepsizeIntegrator ( final String name , final double minStep , final double maxStep , final double scalAbsoluteTolerance , final double scalRelativeTolerance ) { } public AdaptiveStepsizeIntegrator ( final String name , final double minStep , final double maxStep , final double [ ] vecAbsoluteTolerance , final double [ ] vecRelativeTolerance ) { } public void setStepSizeControl ( final double minimalStep , final double maximalStep , final double absoluteTolerance , final double relativeTolerance ) { } public void setStepSizeControl ( final double minimalStep , final double maximalStep , final double [ ] absoluteTolerance , final double [ ] relativeTolerance ) { } public void setInitialStepSize ( final double initialStepSize ) { } @ Override protected void sanityChecks ( final ExpandableStatefulODE equations , final double t ) throws DimensionMismatchException , NumberIsTooSmallException { } public double initializeStep ( final boolean forward , final int order , final double [ ] scale , final double t0 , final double [ ] y0 , final double [ ] yDot0 , final double [ ] y1 , final double [ ] yDot1 ) { } protected double filterStep ( final double h , final boolean forward , final boolean acceptSmall ) throws NumberIsTooSmallException { double filteredH = h ; if ( ( FastMath . abs ( h ) ) < ( minStep ) ) { if ( acceptSmall ) { filteredH = ( forward ) ? minStep : - ( minStep ) ; } else { <START_BUG> throw new NumberIsTooSmallException ( LocalizedFormats . MINIMAL_STEPSIZE_REACHED_DURING_INTEGRATION , minStep , FastMath . abs ( h ) , true ) ; <END_BUG> } } if ( filteredH > ( maxStep ) ) { filteredH = maxStep ; } else if ( filteredH < ( - ( maxStep ) ) ) { filteredH = - ( maxStep ) ; } return filteredH ; } @ Override public abstract void integrate ( ExpandableStatefulODE equations , double t ) throws MathIllegalArgumentException , MathIllegalStateException { } @ Override public double getCurrentStepStart ( ) { } protected void resetInternalState ( ) { } public double getMinStep ( ) { } public double getMaxStep ( ) { } }

Fix:
throw new NumberIsTooSmallException ( LocalizedFormats . MINIMAL_STEPSIZE_REACHED_DURING_INTEGRATION , FastMath . abs ( h ) , minStep , true ) ;
Buggy code:
public abstract class AbstractDecoder implements Decoder { private final int bitsCount ; private final int bytesCount ; protected AbstractDecoder ( int bitsCount ) { } protected int getBytesCount ( ) { } @ Override public int bitsCount ( ) { } @ Override public BigInteger decode ( BigInteger n ) { Preconditions . checkNotNull ( n , "the<seq2seq4repair_space>number<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>null" ) ; final byte [ ] sourceBits = n . toByteArray ( ) ; final byte [ ] finalBits ; if ( ( sourceBits . length ) < ( bytesCount ) ) { final int middleIndex = ( bytesCount ) - ( sourceBits . length ) ; finalBits = new byte [ bytesCount ] ; System . arraycopy ( sourceBits , 0 , finalBits , middleIndex , sourceBits . length ) ; <START_BUG> final byte sign = ( ( n . signum ( ) ) == ( - 1 ) ) ? ( ( byte ) ( - 128 ) ) : 0 ; <END_BUG> Arrays . fill ( finalBits , 0 , middleIndex , sign ) ; } else { finalBits = sourceBits ; } return decode ( finalBits ) ; } }

Fix:
final byte sign = ( ( n . signum ( ) ) == ( - 1 ) ) ? ( ( byte ) ( - 1 ) ) : 0 ;
Buggy code:
public class WeavingURLClassLoader extends ExtensibleURLClassLoader implements WeavingClassLoader { public static final String WEAVING_CLASS_PATH = "aj.class.path" ; public static final String WEAVING_ASPECT_PATH = "aj.aspect.path" ; private URL [ ] aspectURLs ; private WeavingAdaptor adaptor ; private boolean initializingAdaptor ; private Map generatedClasses = new HashMap ( ) ; public WeavingURLClassLoader ( ClassLoader parent ) { } public WeavingURLClassLoader ( URL [ ] urls , ClassLoader parent ) { } public WeavingURLClassLoader ( URL [ ] classURLs , URL [ ] aspectURLs , ClassLoader parent ) { } private static String getAspectPath ( ) { } private static String getClassPath ( ) { } private static URL [ ] getURLs ( String path ) { } protected void addURL ( URL url ) { } protected Class defineClass ( String name , byte [ ] b , CodeSource cs ) throws IOException { if ( ! ( initializingAdaptor ) ) { if ( ( ( adaptor ) == null ) && ( ! ( initializingAdaptor ) ) ) { DefaultWeavingContext weavingContext = new DefaultWeavingContext ( this ) { public String getClassLoaderName ( ) { return loader . getClass ( ) . getName ( ) ; } } ; <START_BUG> ClassLoaderWeavingAdaptor clwAdaptor = new ClassLoaderWeavingAdaptor ( this , weavingContext ) ; <END_BUG> initializingAdaptor = true ; clwAdaptor . initialize ( this , weavingContext ) ; initializingAdaptor = false ; adaptor = clwAdaptor ; } b = adaptor . weaveClass ( name , b ) ; } return super . defineClass ( name , b , cs ) ; } protected byte [ ] getBytes ( String name ) throws IOException { } public URL [ ] getAspectURLs ( ) { } public void acceptClass ( String name , byte [ ] bytes ) { } }

Fix:
ClassLoaderWeavingAdaptor clwAdaptor = new ClassLoaderWeavingAdaptor ( ) ;
Buggy code:
public class StaticFieldGet implements Call { @ Override public void invoke ( Stack stack ) { try { StackEffect se = ( ( StackEffect ) ( stack . pop ( ) . object ) ) ; Symbol fieldName = ( ( Symbol ) ( stack . pop ( ) . object ) ) ; <START_BUG> Symbol className = ( ( Symbol ) ( se . getInputTypes ( ) . get ( 0 ) ) ) ; <END_BUG> Field field = Class . forName ( className . symbol ) . getField ( fieldName . symbol ) ; stack . push ( new JavaType ( field . getType ( ) ) , field . get ( null ) ) ; } catch ( IllegalAccessException e ) { throw new RuntimeException ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>access<seq2seq4repair_space>a<seq2seq4repair_space>static<seq2seq4repair_space>field." , e ) ; } catch ( ClassNotFoundException e ) { throw new RuntimeException ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>access<seq2seq4repair_space>a<seq2seq4repair_space>static<seq2seq4repair_space>field." , e ) ; } catch ( NoSuchFieldException e ) { throw new RuntimeException ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>access<seq2seq4repair_space>a<seq2seq4repair_space>static<seq2seq4repair_space>field." , e ) ; } } @ Override public StackEffect getStackEffect ( TypeStack typeStack ) { } }

Fix:
Symbol className = se . getInputTypes ( ) . get ( 0 ) . toSymbol ( ) ;
Buggy code:
public class OrderLineManagerALTest { private OrderLineManagerAL orderLineManager ; private Order order ; private LoginDetails testCustomer1 ; private PaymentDetails paymentDetails ; private OrderLine orderLine ; private OrderLine orderLine1 ; private Product product ; private Product product2 ; private List < OrderLine > orderlineAL ; byte [ ] password = new byte [ ] { 1 , 2 , 3 } ; byte [ ] salt = new byte [ ] { 1 , 2 , 3 } ; @ Before public void setUp ( ) throws Exception { orderlineAL = new ArrayList < OrderLine > ( ) ; testCustomer1 = new LoginDetails ( "fooUser" , "testEmail1" , password , salt ) ; paymentDetails = new PaymentDetails ( CardType . visa , "3435634734679447" , "BOB" , "22//07//2020" , testCustomer1 ) ; orderLineManager = new OrderLineManagerAL ( ) ; <START_BUG> order = new Order ( 1 , testCustomer1 , OrderStatus . basket , paymentDetails ) ; <END_BUG> product = new Product ( 1 , "img//iomg" , "testproduct" , 25.25 , 10 , 10 , 11 , 10.5 , "test<seq2seq4repair_space>Product" , ProductCategory . accessory ) ; product2 = new Product ( 2 , "img//iomg" , "testproduct2" , 25.25 , 10 , 10 , 11 , 10.5 , "test<seq2seq4repair_space>Product2" , ProductCategory . accessory ) ; orderLine = new OrderLine ( order , product , 50 ) ; orderLine1 = new OrderLine ( order , product2 , 50 ) ; } @ Test public void testPersistProductLineOrderLine ( ) { } @ Test public void testPersistProductLineArrayListOfOrderLine ( ) { } @ Test public void testGetProductLine ( ) { } @ Test public void testUpdateOrderLine ( ) { } @ Test public void testRemoveProductLine ( ) { } }

Fix:
order = new Order ( testCustomer1 , OrderStatus . basket , paymentDetails ) ;
Buggy code:
public class ContentModificationUtils { @ Deprecated public static ContentModification addModule ( File patchDir , String patchElementID , String moduleName , ResourceItem ... resourceItems ) throws IOException { } @ Deprecated public static ContentModification addModule ( File patchDir , String patchElementID , String moduleName ) throws IOException { } public static ContentModification addModule ( File patchDir , String patchElementID , Module newModule ) throws IOException { } public static ContentModification removeModule ( String moduleName , File existingModule ) throws IOException { } @ Deprecated public static ContentModification modifyModule ( File patchDir , String patchElementID , File existingModule , ResourceItem resourceItem ) throws IOException { } @ Deprecated public static ContentModification modifyModule ( File patchDir , String patchElementID , String moduleName , byte [ ] existingHash , ResourceItem resourceItem ) throws IOException { } public static ContentModification modifyModule ( File patchDir , String patchElementID , byte [ ] existingHash , Module newModule ) throws IOException { File baseDir = newFile ( patchDir , patchElementID , MODULES ) ; File mainDir = newModule . writeToDisk ( baseDir ) ; byte [ ] newHash = hashFile ( mainDir ) ; <START_BUG> ContentModification moduleUpdated = new ContentModification ( new ModuleItem ( newModule . getName ( ) , ModuleItem . MAIN_SLOT , newHash ) , existingHash , MODIFY ) ; <END_BUG> return moduleUpdated ; } public static ContentModification addBundle ( File patchDir , String patchElementID , String bundleName ) throws IOException { } public static ContentModification removeBundle ( File existingBundle ) throws IOException { } public static ContentModification modifyBundle ( File patchDir , String patchElementID , File existingBundle , String newContent ) throws IOException { } public static ContentModification addMisc ( File patchDir , String patchElementID , String content , String ... fileSegments ) throws IOException { } public static ContentModification removeMisc ( File existingFile , String ... fileSegments ) throws IOException { } public static ContentModification modifyMisc ( File patchDir , String patchElementID , String modifiedContent , File existingFile , String ... fileSegments ) throws IOException { } public static ContentModification modifyMisc ( File patchDir , String patchElementID , String modifiedContent , byte [ ] existingHash , String ... fileSegments ) throws IOException { } }

Fix:
ContentModification moduleUpdated = new ContentModification ( new org . jboss . as . patching . metadata . ModuleItem ( newModule . getName ( ) , newModule . getSlot ( ) , newHash ) , existingHash , MODIFY ) ;
Buggy code:
public class RaAdd implements OperationStepHandler { static final RaAdd INSTANCE = new RaAdd ( ) ; protected void populateModel ( ModelNode operation , ModelNode model ) { } public void execute ( OperationContext context , ModelNode operation ) { final ModelNode subModel = context . readModelForUpdate ( EMPTY_ADDRESS ) ; populateModel ( operation , subModel ) ; final ModelNode address = operation . require ( OP_ADDR ) ; final String name = PathAddress . pathAddress ( address ) . getLastElement ( ) . getValue ( ) ; String archiveName = operation . get ( Constants . ARCHIVE . getName ( ) ) . asString ( ) ; if ( ( name . startsWith ( archiveName ) ) && ( ( name . substring ( archiveName . length ( ) ) . contains ( RA_SERVICE_NAME_SEPARATOR ) ) || ( name . equals ( archiveName ) ) ) ) { archiveName = name ; } else { Integer identifier = ConnectorServices . getResourceIdentifier ( archiveName ) ; if ( ( identifier != null ) && ( identifier != 0 ) ) { archiveName = ( archiveName + ( ConnectorServices . RA_SERVICE_NAME_SEPARATOR ) ) + identifier ; } } operation . get ( Constants . ARCHIVE . getName ( ) ) . set ( archiveName ) ; subModel . get ( Constants . ARCHIVE . getName ( ) ) . set ( archiveName ) ; final String archive = archiveName ; <START_BUG> if ( ( context . getType ( ) ) == ( Type . SERVER ) ) { <END_BUG> context . addStep ( new OperationStepHandler ( ) { public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final ServiceTarget serviceTarget = context . getServiceTarget ( ) ; final ServiceVerificationHandler verificationHandler = new ServiceVerificationHandler ( ) ; ModifiableResourceAdapter resourceAdapter = RaOperationUtil . buildResourceAdaptersObject ( context , operation ) ; final ServiceController < ? > resourceAdaptersService = context . getServiceRegistry ( false ) . getService ( RESOURCEADAPTERS_SERVICE ) ; ServiceController < ? > controller = null ; if ( resourceAdaptersService == null ) { controller = serviceTarget . addService ( RESOURCEADAPTERS_SERVICE , new ResourceAdaptersService ( ) ) . setInitialMode ( ACTIVE ) . addListener ( verificationHandler ) . install ( ) ; } ServiceName raServiceName = ServiceName . of ( RA_SERVICE , name ) ; ResourceAdapterService raService = new ResourceAdapterService ( resourceAdapter ) ; serviceTarget . addService ( raServiceName , raService ) . setInitialMode ( ACTIVE ) . addDependency ( RESOURCEADAPTERS_SERVICE , ModifiableResourceAdaptors . class , raService . getResourceAdaptersInjector ( ) ) . addListener ( verificationHandler ) . install ( ) ; context . addStep ( verificationHandler , VERIFY ) ; if ( ( context . completeStep ( ) ) == ( ResultAction . ROLLBACK ) ) { if ( controller != null ) { context . removeService ( RESOURCEADAPTERS_SERVICE ) ; } } } } , RUNTIME ) ; } context . completeStep ( ) ; } }

Fix:
if ( context . isNormalServer ( ) ) {
Buggy code:
<START_BUG> public class ContainerManagedConcurrencyInterceptor extends org . jboss . ejb3 . concurrency . impl . ContainerManagedConcurrencyInterceptor implements Interceptor { <END_BUG> private final LockableComponent lockableComponent ; public ContainerManagedConcurrencyInterceptor ( LockableComponent component ) { } @ Override protected LockableComponent getLockableComponent ( ) { } @ Override public Object processInvocation ( InterceptorContext interceptorContext ) throws Exception { return super . invoke ( interceptorContext . getInvocationContext ( ) ) ; } }

Fix:
public class ContainerManagedConcurrencyInterceptor extends org . jboss . ejb3 . concurrency . ContainerManagedConcurrencyInterceptor implements Interceptor {
Buggy code:
public class AjaxLazyLoadPanelTesterTest extends WicketTestCase { private MarkupContainer ajaxLazyLoadPanel ; public void test ( ) { final Page dummyPanelPage = new DummyPanelPage ( new TestPanelSource ( ) { private static final long serialVersionUID = 1L ; public Panel getTestPanel ( String panelId ) { AjaxLazyLoadPanel ajaxLazyLoadPanel1 = new AjaxLazyLoadPanel ( panelId ) { private static final long serialVersionUID = 1L ; @ Override public Component getLazyLoadComponent ( String markupId ) { return new Label ( markupId , "lazy<seq2seq4repair_space>panel<seq2seq4repair_space>test" ) . setRenderBodyOnly ( true ) ; } } ; ajaxLazyLoadPanel = ajaxLazyLoadPanel1 ; return ( ( Panel ) ( ajaxLazyLoadPanel ) ) ; } } ) ; tester . startPage ( dummyPanelPage ) ; <START_BUG> tester . assertLabel ( "panel:content" , "<img<seq2seq4repair_space>src=\"resources//org.apache.wicket.ajax.AbstractDefaultAjaxBehavior//indicator.gif\"//>" ) ; <END_BUG> AjaxLazyLoadPanelTester . executeAjaxLazyLoadPanel ( tester , dummyPanelPage ) ; tester . debugComponentTrees ( ) ; tester . assertLabel ( "panel:content" , "lazy<seq2seq4repair_space>panel<seq2seq4repair_space>test" ) ; String doc = tester . getLastResponseAsString ( ) ; assertNotNull ( doc ) ; } }

Fix:
tester . assertLabel ( "panel:content" , "<img<seq2seq4repair_space>src=\"resource//org.apache.wicket.ajax.AbstractDefaultAjaxBehavior//indicator.gif\"//>" ) ;
Buggy code:
public class DiskGenerator implements SupportBallGenerator < Euclidean2D , Vector2D > { public EnclosingBall < Euclidean2D , Vector2D > ballOnSupport ( final List < Vector2D > support ) { if ( ( support . size ( ) ) < 1 ) { <START_BUG> return new EnclosingBall < Euclidean2D , Vector2D > ( Vector2D . ZERO , ( - 1.0 ) ) ; <END_BUG> } else { final Vector2D vA = support . get ( 0 ) ; if ( ( support . size ( ) ) < 2 ) { return new EnclosingBall < Euclidean2D , Vector2D > ( vA , 0 , vA ) ; } else { final Vector2D vB = support . get ( 1 ) ; if ( ( support . size ( ) ) < 3 ) { return new EnclosingBall < Euclidean2D , Vector2D > ( new Vector2D ( 0.5 , vA , 0.5 , vB ) , ( 0.5 * ( vA . distance ( vB ) ) ) , vA , vB ) ; } else { final Vector2D vC = support . get ( 2 ) ; final BigFraction [ ] c2 = new BigFraction [ ] { new BigFraction ( vA . getX ( ) ) , new BigFraction ( vB . getX ( ) ) , new BigFraction ( vC . getX ( ) ) } ; final BigFraction [ ] c3 = new BigFraction [ ] { new BigFraction ( vA . getY ( ) ) , new BigFraction ( vB . getY ( ) ) , new BigFraction ( vC . getY ( ) ) } ; final BigFraction [ ] c1 = new BigFraction [ ] { c2 [ 0 ] . multiply ( c2 [ 0 ] ) . add ( c3 [ 0 ] . multiply ( c3 [ 0 ] ) ) , c2 [ 1 ] . multiply ( c2 [ 1 ] ) . add ( c3 [ 1 ] . multiply ( c3 [ 1 ] ) ) , c2 [ 2 ] . multiply ( c2 [ 2 ] ) . add ( c3 [ 2 ] . multiply ( c3 [ 2 ] ) ) } ; final BigFraction twoM11 = minor ( c2 , c3 ) . multiply ( 2 ) ; final BigFraction m12 = minor ( c1 , c3 ) ; final BigFraction m13 = minor ( c1 , c2 ) ; final BigFraction centerX = m12 . divide ( twoM11 ) ; final BigFraction centerY = m13 . divide ( twoM11 ) . negate ( ) ; final BigFraction dx = c2 [ 0 ] . subtract ( centerX ) ; final BigFraction dy = c3 [ 0 ] . subtract ( centerY ) ; final BigFraction r2 = dx . multiply ( dx ) . add ( dy . multiply ( dy ) ) ; return new EnclosingBall < Euclidean2D , Vector2D > ( new Vector2D ( centerX . doubleValue ( ) , centerY . doubleValue ( ) ) , FastMath . sqrt ( r2 . doubleValue ( ) ) , vA , vB , vC ) ; } } } } private BigFraction minor ( final BigFraction [ ] c1 , final BigFraction [ ] c2 ) { } }

Fix:
return new EnclosingBall < Euclidean2D , Vector2D > ( Vector2D . ZERO , Double . NEGATIVE_INFINITY ) ;
Buggy code:
class GuiceProxyTargetLocator implements IProxyTargetLocator { private static final long serialVersionUID = 1L ; private final Annotation bindingAnnotation ; private final boolean optional ; private final String [ ] data ; private final int argIndex ; GuiceProxyTargetLocator ( Field field , Annotation bindingAnnotation , boolean optional ) { } GuiceProxyTargetLocator ( Method method , int argIndex , Annotation bindingAnnotation , boolean optional ) { } public Object locateProxyTarget ( ) { final GuiceInjectorHolder holder = Application . get ( ) . getMetaData ( INJECTOR_KEY ) ; final Type type ; try { Class < ? > clazz = Class . forName ( data [ 0 ] ) ; if ( ( argIndex ) < 0 ) { final Field field = clazz . getDeclaredField ( data [ 1 ] ) ; type = field . getGenericType ( ) ; } else { Class < ? > [ ] paramTypes = new Class [ ( data . length ) - 2 ] ; for ( int i = 2 ; i < ( data . length ) ; i ++ ) { <START_BUG> paramTypes [ ( 2 - i ) ] = Class . forName ( data [ i ] ) ; <END_BUG> } final Method method = clazz . getDeclaredMethod ( data [ 1 ] , paramTypes ) ; type = method . getGenericParameterTypes ( ) [ argIndex ] ; } } catch ( Exception e ) { throw new WicketRuntimeException ( ( ( ( "Error<seq2seq4repair_space>accessing<seq2seq4repair_space>member:<seq2seq4repair_space>" + ( data [ 1 ] ) ) + "<seq2seq4repair_space>of<seq2seq4repair_space>class:<seq2seq4repair_space>" ) + ( data [ 0 ] ) ) , e ) ; } final Key < ? > key ; if ( ( bindingAnnotation ) == null ) { key = Key . get ( TypeLiteral . get ( type ) ) ; } else { key = Key . get ( TypeLiteral . get ( type ) , bindingAnnotation ) ; } Injector injector = holder . getInjector ( ) ; if ( optional ) { try { if ( ( injector . getBinding ( key ) ) == null ) { return null ; } } catch ( RuntimeException e ) { return null ; } } return injector . getInstance ( key ) ; } }

Fix:
paramTypes [ ( i - 2 ) ] = Class . forName ( data [ i ] ) ;
Buggy code:
public abstract class AbstractChangeTracker implements ChangeTracker { protected Collection add = null ; protected Collection rem = null ; protected Collection change = null ; private boolean _autoOff = true ; private boolean _track = false ; private Boolean _identity = null ; private int _seq = - 1 ; public AbstractChangeTracker ( ) { } public boolean getAutoOff ( ) { } public void setAutoOff ( boolean autoOff ) { } public boolean isTracking ( ) { } public void startTracking ( ) { } protected int initialSequence ( ) { } public void stopTracking ( ) { } protected void reset ( ) { } public Collection getAdded ( ) { } public Collection getRemoved ( ) { } public Collection getChanged ( ) { } protected void added ( Object val ) { } protected abstract void add ( Object val ) { } protected void removed ( Object val ) { } protected abstract void remove ( Object val ) { } protected void changed ( Object val ) { } protected abstract void change ( Object val ) { } public int getNextSequence ( ) { } public void setNextSequence ( int seq ) { } protected Set newSet ( ) { } private void setIdentity ( Object val ) { if ( ( val == null ) || ( ( _identity ) != null ) ) return ; <START_BUG> if ( ImplHelper . isManagedType ( val . getClass ( ) ) ) <END_BUG> _identity = Boolean . TRUE ; else _identity = Boolean . FALSE ; add = AbstractChangeTracker . switchStructure ( add , _identity . booleanValue ( ) ) ; rem = AbstractChangeTracker . switchStructure ( rem , _identity . booleanValue ( ) ) ; change = AbstractChangeTracker . switchStructure ( change , _identity . booleanValue ( ) ) ; } private static Collection switchStructure ( Collection cur , boolean identity ) { } }

Fix:
if ( ImplHelper . isManagedType ( null , val . getClass ( ) ) )
Buggy code:
public class RemoteSession { private Location origin ; private Socket socket ; private BufferedReader in ; private BufferedWriter out ; private Thread inThread ; private Thread outThread ; private ArrayDeque < String > inQueue = new ArrayDeque < String > ( ) ; private ArrayDeque < String > outQueue = new ArrayDeque < String > ( ) ; public boolean running = true ; public boolean pendingRemoval = false ; public CanaryRaspberryJuicePlugin plugin ; protected ArrayDeque < BlockRightClickHook > blocktHitQueue = new ArrayDeque < BlockRightClickHook > ( ) ; private int maxCommandsPerTick = 9000 ; private boolean closed = false ; private Player attachedPlayer = null ; private World currentWorld = null ; private Server currentServer = null ; public RemoteSession ( CanaryRaspberryJuicePlugin plugin , Socket socket ) throws IOException { } public void init ( ) throws IOException { } protected void startThreads ( ) { } public Location getOrigin ( ) { } public void setOrigin ( Location origin ) { } public Socket getSocket ( ) { } public Server getServer ( ) { } public World getWorld ( ) { } public void tick ( ) { } protected void handleLine ( String line ) { } protected void handleCommand ( String c , String [ ] args ) { } private void setCuboid ( Location pos1 , Location pos2 , short blockType , short data ) { } private String getBlocks ( Location pos1 , Location pos2 ) { } public Player getCurrentPlayer ( String name ) { } public Location parseRelativeBlockLocation ( String xstr , String ystr , String zstr ) { } public Location parseRelativeLocation ( String xstr , String ystr , String zstr ) { } public Location parseRelativeBlockLocation ( String xstr , String ystr , String zstr , float pitch , float yaw ) { } public Location parseRelativeLocation ( String xstr , String ystr , String zstr , float pitch , float yaw ) { } public String blockLocationToRelative ( Location loc ) { } public String locationToRelative ( Location loc ) { } public Vector3D getDirection ( Player player ) { double rotation = Math . toRadians ( player . getLocation ( ) . getRotation ( ) ) ; double pitch = Math . toRadians ( player . getLocation ( ) . getPitch ( ) ) ; double x = ( ( Math . sin ( rotation ) ) * ( Math . cos ( pitch ) ) ) * ( - 1 ) ; <START_BUG> double y = Math . sin ( pitch ) ; <END_BUG> double z = ( Math . cos ( rotation ) ) * ( Math . cos ( pitch ) ) ; return new Vector3D ( x , y , z ) ; } public void send ( Object a ) { } public void send ( String a ) { } public void close ( ) { } public void kick ( String reason ) { } public void queueBlockHit ( BlockRightClickHook hitHook ) { } private class InputThread implements Runnable { public void run ( ) { } } private class OutputThread implements Runnable { public void run ( ) { } } public static int blockFaceToNotch ( BlockFace face ) { } }

Fix:
double y = ( Math . sin ( pitch ) ) * ( - 1 ) ;
Buggy code:
public class ParseBenchmark { public ParseBenchmark ( ) { } public static void main ( String [ ] args ) { if ( ( args . length ) == 3 ) { int parser = 0 ; String file = null ; int loops = 1000 ; if ( ( args [ 0 ] ) != null ) { if ( ! ( args [ 0 ] . equals ( "jaxb" ) ) ) { parser = 1 ; } } if ( ( args [ 1 ] ) != null ) { file = args [ 1 ] ; } if ( ( args [ 2 ] ) != null ) { loops = Integer . parseInt ( args [ 2 ] ) ; } File infile = new File ( file ) ; FileInputStream fis = null ; InputStreamReader isr = null ; <START_BUG> StringBuffer buf = new StringBuffer ( ) ; <END_BUG> try { fis = new FileInputStream ( infile ) ; isr = new InputStreamReader ( fis ) ; BufferedReader br = new BufferedReader ( isr ) ; String line = null ; while ( ( line = br . readLine ( ) ) != null ) { buf . append ( line ) ; } } catch ( Exception e ) { e . printStackTrace ( ) ; } long start = 0 ; long end = 0 ; String contents = buf . toString ( ) . trim ( ) ; System . out . println ( ( ( "start<seq2seq4repair_space>test:<seq2seq4repair_space>" + loops ) + "<seq2seq4repair_space>iterations" ) ) ; System . out . println ( "content:" ) ; System . out . println ( contents ) ; if ( parser == 0 ) { } else { org . apache . jmeter . monitor . model . ObjectFactory of = org . apache . jmeter . monitor . model . ObjectFactory . getInstance ( ) ; start = System . currentTimeMillis ( ) ; for ( int idx = 0 ; idx < loops ; idx ++ ) { of . parseBytes ( contents . getBytes ( ) ) ; } end = System . currentTimeMillis ( ) ; System . out . println ( ( "elapsed<seq2seq4repair_space>Time:<seq2seq4repair_space>" + ( end - start ) ) ) ; } } else { System . out . println ( "missing<seq2seq4repair_space>paramters:" ) ; System . out . println ( "parser<seq2seq4repair_space>file<seq2seq4repair_space>iterations" ) ; System . out . println ( "example:<seq2seq4repair_space>jaxb<seq2seq4repair_space>status.xml<seq2seq4repair_space>1000" ) ; } } }

Fix:
StringBuilder buf = new StringBuilder ( ) ;
Buggy code:
public class Card { public boolean isClicked = false ; private final int cardNumber ; private final Card . Suit suit ; public Card ( int cardNumber , Card . Suit suit ) { } public enum Suit { DIAMONDS , CLUBS , HEARTS , SPADES ; } public int compareTo ( Card compare ) { } public String getAddress ( ) { <START_BUG> int num = ( this . cardNumber ) % 14 ; <END_BUG> return ( this . suit . toString ( ) . toLowerCase ( ) ) + num ; } public int getCardNumber ( ) { } public Card . Suit getSuit ( ) { } public String toString ( ) { } }

Fix:
int num = ( this . cardNumber ) % 15 ;
Buggy code:
public class WindowsViewer extends AbstractViewer { public Process openWith ( MimeHeader header , File tempFile ) { } public Process open ( MimeHeader header , File tempFile ) { } public Process openURL ( URL url ) { if ( ( OSInfo . isWin2K ( ) ) || ( OSInfo . isWinXP ( ) ) ) { Process proc = null ; try { <START_BUG> String [ ] cmd = new String [ ] { "rundll32" , "url.dll,FileProtocolHandler" , url . toString ( ) } ; <END_BUG> Runtime rt = Runtime . getRuntime ( ) ; log . fine ( ( ( ( ( ( "Executing<seq2seq4repair_space>" + ( cmd [ 0 ] ) ) + "<seq2seq4repair_space>" ) + ( cmd [ 1 ] ) ) + "<seq2seq4repair_space>" ) + ( cmd [ 2 ] ) ) ) ; proc = rt . exec ( cmd ) ; WindowsViewer . StreamGobbler errorGobbler = new WindowsViewer . StreamGobbler ( proc . getErrorStream ( ) , "ERROR" ) ; errorGobbler . start ( ) ; WindowsViewer . StreamGobbler outputGobbler = new WindowsViewer . StreamGobbler ( proc . getInputStream ( ) , "OUTPUT" ) ; outputGobbler . start ( ) ; int exitVal = proc . waitFor ( ) ; log . fine ( ( "ExitValue:<seq2seq4repair_space>" + exitVal ) ) ; } catch ( Throwable t ) { t . printStackTrace ( ) ; } } else { openDocument ( url . getPath ( ) ) ; } return null ; } public Process openWithURL ( URL url ) { } protected void openDocument ( String filename ) { } protected void openDocumentWith ( String filename ) { } class StreamGobbler extends Thread { InputStream is ; String type ; StreamGobbler ( InputStream is , String type ) { } public void run ( ) { } } }

Fix:
String [ ] cmd = new String [ ] { "rundll32" , "url.dll,FileProtocolHandler" , ( '"' + ( url . toString ( ) ) ) + '"' } ;
Buggy code:
public enum AirportClient { INSTANCE ; private AirportClient . AirportService airportService ; private AirportClient . GithubService githubService ; private FlattenOperator < File > flattenOperator = new FlattenOperator ( ) ; private AirportOperator airportOperator = new AirportOperator ( ) ; private AirportClient ( ) { } public Observable < Airport > getRawAirport ( String code ) { } public Observable < Airport > getAirport ( String code ) { } public Observable < List < Airport > > getAirports ( ) { return githubService . airports ( ) . lift ( flattenOperator ) . filter ( new rx . functions . Func1 < File , Boolean > ( ) { @ Override public Boolean call ( File file ) { return file . name . endsWith ( ".json" ) ; } } ) . map ( new rx . functions . Func1 < File , String > ( ) { @ Override public String call ( File file ) { return file . name . replace ( ".json" , "" ) ; } } ) . flatMap ( new rx . functions . Func1 < String , Observable < Airport > > ( ) { @ Override public Observable < Airport > call ( String code ) { return getRawAirport ( code ) . onErrorResumeNext ( AirportClient . < Airport > on304ReturnNullFunc ( ) ) ; } <START_BUG> } ) . filter ( new rx . functions . Func1 < Airport , Boolean > ( ) { <END_BUG> @ Override public Boolean call ( Airport airport ) { return ( airport != null ) && ( ( airport . id ) != null ) ; } } ) . toList ( ) ; } public Observable < Map < String , String > > getImages ( ) { } public interface GithubService { @ GET ( "//repos//lynnandtonic//airport-codes//contents//data" ) Observable < List < File > > airports ( ) { } @ GET ( "//repos//lynnandtonic//airport-codes//contents//data//{code}.json" ) Observable < File > airport ( @ Path ( "code" ) String code ) { } @ GET ( "//repos//lynnandtonic//airport-codes//contents//assets//images//card" ) Observable < List < File > > images ( ) { } } public interface AirportService { @ GET ( "//lynnandtonic//airport-codes//master//data//{code}.json" ) Observable < Airport > airport ( @ Path ( "code" ) String code ) { } } private class IfModifiedSinceRequestInterceptor implements RequestInterceptor { private SimpleDateFormat formatter = new SimpleDateFormat ( "EEE,<seq2seq4repair_space>dd<seq2seq4repair_space>MMM<seq2seq4repair_space>yyyy<seq2seq4repair_space>HH:mm:ss<seq2seq4repair_space>'GMT'" , Locale . US ) ; private String ifModifiedSince = getIfModifiedSinceString ( ) ; public IfModifiedSinceRequestInterceptor ( ) { } @ Override public void intercept ( RequestFacade request ) { } private String getIfModifiedSinceString ( ) { } } public static < T > rx . functions . Func1 < Throwable , Observable < T > > on304ReturnNullFunc ( ) { } }

Fix:
} , 10 ) . filter ( new rx . functions . Func1 < Airport , Boolean > ( ) {
Buggy code:
public class LoginActivity extends ActionBarActivity { private String mEmail ; private String mPassword ; private Context mContext ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_login ) ; Button login = ( ( Button ) ( findViewById ( login ) ) ) ; Button register = ( ( Button ) ( findViewById ( register ) ) ) ; Button forgot = ( ( Button ) ( findViewById ( forgot_password ) ) ) ; mContext = getApplicationContext ( ) ; final SharedPreferences prefs = getSharedPreferences ( getString ( SHARED_PREFERENCES ) , getApplicationContext ( ) . MODE_PRIVATE ) ; <START_BUG> int uid = prefs . getInt ( "uid" , ( - 1 ) ) ; <END_BUG> if ( uid != ( - 1 ) ) { final EditText email = ( ( EditText ) ( findViewById ( email ) ) ) ; email . setText ( prefs . getString ( getString ( R . string . email ) , "email" ) ) ; final EditText pw = ( ( EditText ) ( findViewById ( password ) ) ) ; pw . setText ( prefs . getString ( getString ( R . string . password ) , "password" ) ) ; } login . setOnClickListener ( new View . OnClickListener ( ) { public void onClick ( View v ) { mEmail = ( ( EditText ) ( findViewById ( email ) ) ) . getText ( ) . toString ( ) ; mPassword = ( ( EditText ) ( findViewById ( password ) ) ) . getText ( ) . toString ( ) ; LoginActivity . DownloadWebPageTask task = new LoginActivity . DownloadWebPageTask ( ) ; String url = ( ( "http:////450.atwebpages.com//login.php?email=" + ( mEmail ) ) + "&password=" ) + ( mPassword ) ; task . execute ( url ) ; } } ) ; register . setOnClickListener ( new View . OnClickListener ( ) { public void onClick ( View v ) { Intent register = new Intent ( getApplicationContext ( ) , Registration . class ) ; startActivity ( register ) ; finish ( ) ; } } ) ; forgot . setOnClickListener ( new View . OnClickListener ( ) { public void onClick ( View v ) { Intent forgot = new Intent ( getApplicationContext ( ) , ResetPassword . class ) ; startActivity ( forgot ) ; finish ( ) ; } } ) ; } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } private class DownloadWebPageTask extends AsyncTask < String , Void , String > { @ Override protected void onPreExecute ( ) { } @ Override protected String doInBackground ( String ... urls ) { } @ Override protected void onPostExecute ( String result ) { } } No newline ; at end ; of file ; }

Fix:
int uid = prefs . getInt ( "userID" , ( - 1 ) ) ;
Buggy code:
public class StatelessComponentDescription extends SessionBeanComponentDescription { public StatelessComponentDescription ( final String componentName , final String componentClassName , final EjbJarDescription ejbModuleDescription , final ServiceName deploymentUnitServiceName ) { } @ Override public ComponentConfiguration createConfiguration ( EEModuleConfiguration moduleConfiguration ) { } @ Override public boolean allowsConcurrentAccess ( ) { } @ Override public SessionBeanType getSessionBeanType ( ) { } @ Override protected void setupViewInterceptors ( ViewDescription view ) { super . setupViewInterceptors ( view ) ; view . getConfigurators ( ) . addFirst ( new ViewConfigurator ( ) { @ Override public void configure ( DeploymentPhaseContext context , ComponentConfiguration componentConfiguration , ViewDescription description , ViewConfiguration configuration ) throws DeploymentUnitProcessingException { for ( Method method : configuration . getProxyFactory ( ) . getCachedMethods ( ) ) { if ( ( ( method . getName ( ) . equals ( "hashCode" ) ) && ( ( method . getParameterTypes ( ) . length ) == 0 ) ) || ( ( ( method . getName ( ) . equals ( "equals" ) ) && ( ( method . getParameterTypes ( ) . length ) == 1 ) ) && ( ( method . getParameterTypes ( ) [ 0 ] ) == ( Object . class ) ) ) ) { <START_BUG> configuration . addViewInterceptor ( INSTANCE , SESSION_BEAN_EQUALS_HASHCODE ) ; <END_BUG> } } configuration . addViewInterceptor ( PooledInstanceInterceptor . pooled ( ) , ASSOCIATING_INTERCEPTOR ) ; } } ) ; if ( BEAN . equals ( this . getTransactionManagementType ( ) ) ) { view . getConfigurators ( ) . add ( new ViewConfigurator ( ) { @ Override public void configure ( DeploymentPhaseContext context , ComponentConfiguration componentConfiguration , ViewDescription description , ViewConfiguration configuration ) throws DeploymentUnitProcessingException { final ComponentInterceptorFactory slsbBmtInterceptorFactory = new ComponentInterceptorFactory ( ) { @ Override protected Interceptor create ( Component component , InterceptorFactoryContext context ) { if ( ( component instanceof StatelessSessionComponent ) == false ) { throw new IllegalArgumentException ( ( ( ( ( "Component<seq2seq4repair_space>" + component ) + "<seq2seq4repair_space>with<seq2seq4repair_space>component<seq2seq4repair_space>class:<seq2seq4repair_space>" ) + ( component . getComponentClass ( ) ) ) + "<seq2seq4repair_space>isn't<seq2seq4repair_space>a<seq2seq4repair_space>stateless<seq2seq4repair_space>component" ) ) ; } return new StatelessBMTInterceptor ( ( ( StatelessSessionComponent ) ( component ) ) ) ; } } ; configuration . addViewInterceptor ( slsbBmtInterceptorFactory , TRANSACTION_INTERCEPTOR ) ; } } ) ; } } }

Fix:
configuration . addViewInterceptor ( method , INSTANCE , SESSION_BEAN_EQUALS_HASHCODE ) ;
Buggy code:
public abstract class Resource implements IResourceListener { private static Log log = LogFactory . getLog ( Resource . class ) ; protected IResourceStream resourceStream ; private boolean cacheable ; protected Resource ( ) { } public abstract IResourceStream getResourceStream ( ) { } public boolean isCacheable ( ) { } public final void onResourceRequested ( ) { } public final void setCacheable ( boolean cacheable ) { } protected void invalidate ( ) { } private final void init ( ) { } private final void respond ( final Response response ) { try { final OutputStream out = response . getOutputStream ( ) ; try { Streams . copy ( resourceStream . getInputStream ( ) , out ) ; } finally { resourceStream . close ( ) ; out . flush ( ) ; } } catch ( SocketException se ) { String message = se . getMessage ( ) ; <START_BUG> if ( ( message != null ) && ( ( message . indexOf ( "Connection<seq2seq4repair_space>reset" ) ) != ( - 1 ) ) ) { <END_BUG> if ( Resource . log . isDebugEnabled ( ) ) { Resource . log . debug ( "Socket<seq2seq4repair_space>exception<seq2seq4repair_space>ignored<seq2seq4repair_space>for<seq2seq4repair_space>sending<seq2seq4repair_space>Resource<seq2seq4repair_space>response<seq2seq4repair_space>to<seq2seq4repair_space>client<seq2seq4repair_space>(ClientAbort)" , se ) ; } } else { throw new WicketRuntimeException ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>render<seq2seq4repair_space>resource<seq2seq4repair_space>stream<seq2seq4repair_space>" + ( resourceStream ) ) , se ) ; } } catch ( Exception e ) { throw new WicketRuntimeException ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>render<seq2seq4repair_space>resource<seq2seq4repair_space>stream<seq2seq4repair_space>" + ( resourceStream ) ) , e ) ; } } }

Fix:
if ( ( message != null ) && ( ( ( message . indexOf ( "Connection<seq2seq4repair_space>reset" ) ) != ( - 1 ) ) || ( ( message . indexOf ( "socket<seq2seq4repair_space>write<seq2seq4repair_space>error" ) ) != ( - 1 ) ) ) ) {
Buggy code:
public abstract class BehavioralFeature extends Feature { public boolean _isQuery ; public Vector _parameter = new Vector ( ) ; public Vector _raisedException = new Vector ( ) ; public BehavioralFeature ( ) { } public BehavioralFeature ( Name name ) { } public BehavioralFeature ( String nameStr ) { } public boolean getIsQuery ( ) { } public void setIsQuery ( boolean x ) throws PropertyVetoException { } public Classifier getReturnType ( ) { } public void setReturnType ( Classifier rt ) throws PropertyVetoException { Parameter p = findParameter ( RETURN_NAME ) ; if ( p == null ) { <START_BUG> p = new Parameter ( rt , ParameterDirectionKind . IN , Parameter . RETURN_NAME ) ; <END_BUG> addParameter ( p ) ; } else { p . setType ( rt ) ; } } public Parameter findParameter ( Name n ) { } public Vector getParameter ( ) { } public void setParameter ( Vector x ) throws PropertyVetoException { } public void addParameter ( Parameter x ) throws PropertyVetoException { } public void removeParameter ( Parameter x ) throws PropertyVetoException { } public Vector getRaisedException ( ) { } public void setRaisedException ( Vector x ) throws PropertyVetoException { } public void addRaisedException ( MMException x ) throws PropertyVetoException { } public void removeRaisedException ( MMException x ) throws PropertyVetoException { } static final long serialVersionUID = 7697916359219415113L ; }

Fix:
p = new Parameter ( rt , ParameterDirectionKind . RETURN , Parameter . RETURN_NAME ) ;
Buggy code:
public class EventStoreStartMojoTest { @ Before public void setup ( ) throws MojoExecutionException { } @ After public void tearDown ( ) throws MojoExecutionException { } @ Test public void testExecute ( ) throws MojoExecutionException { final EventStoreStartMojo testee = new EventStoreStartMojo ( ) ; testee . execute ( ) ; <START_BUG> assertThat ( true ) . isTrue ( ) ; <END_BUG> } }

Fix:
assertThat ( testee . getPidFile ( ) ) . exists ( ) ;
Buggy code:
public class Light extends Module { private String color ; private int brightness ; public Light ( ) { } public void on ( ) { } public void off ( ) { } public void toggle ( ) { } public void setColor ( String hex ) { } public void setBrightness ( int brightness ) { } public String parseActionFragment ( String fragment ) { } public String generateUrlFragment ( String idAction ) { String frag = "//hue//" ; String act = this . getActionFromId ( parseActionFragment ( idAction ) ) ; System . out . println ( act ) ; switch ( act ) { <START_BUG> case "setColorLight" : <END_BUG> frag += ( ( act + "?color=" ) + ( this . color ) ) + "&" ; break ; case "setBrightness" : frag += ( ( act + "?bri=" ) + ( this . brightness ) ) + "&" ; break ; default : frag += act + "?" ; break ; } return frag ; } public String getNameActionByCode ( String code ) { } }

Fix:
case "setColor" :
Buggy code:
final class CollectionToArrayConverter implements ConditionalGenericConverter { private final ConversionService conversionService ; public CollectionToArrayConverter ( ConversionService conversionService ) { } public Set < ConvertiblePair > getConvertibleTypes ( ) { } public boolean matches ( TypeDescriptor sourceType , TypeDescriptor targetType ) { } public Object convert ( Object source , TypeDescriptor sourceType , TypeDescriptor targetType ) { if ( source == null ) { return null ; } Collection < ? > sourceCollection = ( ( Collection < ? > ) ( source ) ) ; Object array = Array . newInstance ( targetType . getElementType ( ) , sourceCollection . size ( ) ) ; int i = 0 ; for ( Object sourceElement : sourceCollection ) { <START_BUG> Object targetElement = this . conversionService . convert ( sourceElement , sourceType . getElementTypeDescriptor ( ) , targetType . getElementTypeDescriptor ( ) ) ; <END_BUG> Array . set ( array , ( i ++ ) , targetElement ) ; } return array ; } }

Fix:
Object targetElement = this . conversionService . convert ( sourceElement , sourceType . getElementTypeDescriptor ( ) . applyIndexedObject ( sourceElement ) , targetType . getElementTypeDescriptor ( ) ) ;
Buggy code:
@ Component ( immediate = true , property = { "com.liferay.portlet.add-default-resource=true" , "com.liferay.portlet.css-class-wrapper=portlet-journal-content" , "com.liferay.portlet.display-category=category.cms" , "com.liferay.portlet.header-portlet-css=//css//main.css" , "com.liferay.portlet.icon=//icons//journal_content.png" , "com.liferay.portlet.instanceable=true" , "com.liferay.portlet.layout-cacheable=true" , "com.liferay.portlet.preferences-owned-by-group=true" , "com.liferay.portlet.private-request-attributes=false" , "com.liferay.portlet.private-session-attributes=false" , "com.liferay.portlet.render-weight=50" , "com.liferay.portlet.scopeable=true" , "com.liferay.portlet.use-default-template=true" , "javax.portlet.display-name=Web<seq2seq4repair_space>Content<seq2seq4repair_space>Display" , "javax.portlet.expiration-cache=0" , "javax.portlet.init-param.config-template=//configuration.jsp" , "javax.portlet.init-param.template-path=//" , "javax.portlet.init-param.view-template=//view.jsp" , "javax.portlet.name=" + ( JournalContentPortletKeys . JOURNAL_CONTENT ) , "javax.portlet.resource-bundle=content.Language" , "javax.portlet.security-role-ref=guest,power-user,user" , "javax.portlet.supports.mime-type=text//html" , "javax.portlet.supports.mime-type=application//vnd.wap.xhtml+xml" } , service = Portlet . class ) public class JournalContentPortlet extends MVCPortlet { @ Override public void doView ( RenderRequest renderRequest , RenderResponse renderResponse ) throws IOException , PortletException { } @ Override public void serveResource ( ResourceRequest resourceRequest , ResourceResponse resourceResponse ) throws IOException , PortletException { } @ Activate protected void activate ( ) { } protected void initLogger ( ClassLoader classLoader ) { <START_BUG> Log4JUtil . configureLog4J ( classLoader . getResource ( "META-INF//portlet-log4j.xml" ) ) ; <END_BUG> } @ Reference protected void setJournalContentSearchLocal ( JournalArticleLocalService journalArticleLocalService ) { } @ Reference ( unbind = "-" ) protected void setJournalContentWebUpgrade ( JournalContentWebUpgrade journalContentWebUpgrade ) { } protected void unsetJournalContentSearchLocal ( JournalArticleLocalService journalArticleLocalService ) { } private JournalArticleLocalService _journalArticleLocalService ; No newline ; at end ; of file ; }

Fix:
Log4JUtil . configureLog4J ( classLoader . getResource ( "META-INF//portal-log4j.xml" ) ) ;
Buggy code:
public class Initializer implements Control { private static final String PAR_PROT_INF = "inf_protocol" ; private static int pid_inf ; public Initializer ( String prefix ) { } @ Override public boolean execute ( ) { int linkableID = FastConfig . getLinkable ( Initializer . pid_inf ) ; Statistic . query_index = 0 ; Statistic . total_time = 0 ; Statistic . query_complete = 0 ; Statistic . fileChunkNum = new HashMap ( ) ; for ( int i = 0 ; i < ( Statistic . FILE_NUM ) ; i ++ ) { int chunkNum = ( r . nextInt ( 4 ) ) + 1 ; <START_BUG> fileChunkNum . put ( Integer . toString ( i ) , chunkNum ) ; <END_BUG> } for ( int i = 0 ; i < ( Network . size ( ) ) ; i ++ ) { Infrastructure inf = ( ( Infrastructure ) ( Network . get ( i ) . getProtocol ( Initializer . pid_inf ) ) ) ; inf . connectionManager = new ConnectionManager ( ) ; inf . contentStore = new HashMap ( ) ; inf . fib = new FIB ( ) ; inf . pit = new PIT ( ) ; inf . neighbors = new ArrayList ( ) ; Linkable linkable = ( ( Linkable ) ( Network . get ( i ) . getProtocol ( linkableID ) ) ) ; if ( ( linkable . degree ( ) ) > 0 ) { for ( int j = 0 ; j < ( linkable . degree ( ) ) ; j ++ ) { Node neighbour = linkable . getNeighbor ( j ) ; inf . neighbors . add ( neighbour . getIndex ( ) ) ; } } } return false ; } }

Fix:
fileChunkNum . put ( Integer . toString ( i ) , ( chunkNum * 100 ) ) ;
Buggy code:
public class SimpleRegexValidator implements PropertyValidator < String > { @ Override public boolean isValid ( String key , Object value , Value < String > parameter , StringBuilder errorMessage ) { <START_BUG> if ( Pattern . compile ( parameter . get ( ) ) . matcher ( value . toString ( ) ) . matches ( ) ) { <END_BUG> return true ; } errorMessage . append ( "Property<seq2seq4repair_space>'" ) ; errorMessage . append ( key ) ; errorMessage . append ( "'<seq2seq4repair_space>must<seq2seq4repair_space>match<seq2seq4repair_space>'" ) ; errorMessage . append ( parameter . get ( ) ) ; errorMessage . append ( "'." ) ; return false ; } }

Fix:
if ( ( value != null ) && ( Pattern . compile ( parameter . get ( ) ) . matcher ( value . toString ( ) ) . matches ( ) ) ) {
Buggy code:
} else if ( ( ch == '+' ) || ( ch == '-' ) ) { <START_BUG> location . append ( '0' ) ; <END_BUG>

Fix:
location . append ( '.' ) ;