nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Message implements Cloneable { private Header header ; private List [ ] sections ; private int size ; private byte [ ] wireFormat ; private boolean frozen ; boolean TSIGsigned ; boolean TSIGverified ; public Message ( int id ) { } public Message ( ) { } public static Message newQuery ( Record r ) { } public static Message newUpdate ( Name zone ) { } Message ( DataByteInputStream in ) throws IOException { } public Message ( byte [ ] b ) throws IOException { } public void setHeader ( Header h ) { } public Header getHeader ( ) { } public void addRecord ( Record r , int section ) { } public boolean removeRecord ( Record r , int section ) { } public void removeAllRecords ( int section ) { } public boolean findRecord ( Record r , int section ) { } public boolean findRecord ( Record r ) { } public boolean findRRset ( Name name , short type , int section ) { } public boolean findRRset ( Name name , short type ) { } public Record getQuestion ( ) { } public TSIGRecord getTSIG ( ) { } public boolean isSigned ( ) { } public boolean isVerified ( ) { } public OPTRecord getOPT ( ) { } public short getRcode ( ) { } public Enumeration getSection ( int section ) { } public Record [ ] getSectionArray ( int section ) { } void toWire ( DataByteOutputStream out ) throws IOException { } public byte [ ] toWire ( ) throws IOException { } public void freeze ( ) { } public void thaw ( ) { } public int numBytes ( ) { } public String sectionToString ( int i ) { if ( i > 3 ) return null ; StringBuffer sb = new StringBuffer ( ) ; Record [ ] records = getSectionArray ( i ) ; <START_BUG> for ( int j = 0 ; i < ( records . length ) ; j ++ ) { <END_BUG> Record rec = records [ j ] ; if ( i == ( Section . QUESTION ) ) { sb . append ( ( ";;\t" + ( rec . name ) ) ) ; sb . append ( ( ",<seq2seq4repair_space>type<seq2seq4repair_space>=<seq2seq4repair_space>" + ( Type . string ( rec . type ) ) ) ) ; sb . append ( ( ",<seq2seq4repair_space>class<seq2seq4repair_space>=<seq2seq4repair_space>" + ( DClass . string ( rec . dclass ) ) ) ) ; } else sb . append ( rec ) ; sb . append ( "\n" ) ; } return sb . toString ( ) ; } public String toString ( ) { } public Object clone ( ) { } }

Fix:
for ( int j = 0 ; j < ( records . length ) ; j ++ ) {
Buggy code:
public class BatchSentCallback implements FutureCallback < Response < JsonObject > > { private static final Integer MAX_NB_OF_TRY = 5 ; private static final Long TIME_BETWEEN_TRY = 30000L ; private List < Integer > eventIds ; private JsonObject sentData ; private int currentBatchSendAttemptNb ; public BatchSentCallback ( List < Integer > eventIds , JsonObject data , int currentBatchSendAttemptNb ) { } @ Override public void onCompleted ( Exception e , Response < JsonObject > result ) { } private boolean received ( Response < JsonObject > result ) { JsonObject jsonResult = result . getResult ( ) ; <START_BUG> return ( ( jsonResult != null ) && ( ( jsonResult . get ( "received" ) ) != null ) ) && ( jsonResult . get ( "received" ) . getAsBoolean ( ) ) ; <END_BUG> } private boolean httpStatusCodeOk ( Response < JsonObject > result ) { } private void retry ( JsonObject data , int currentBatchSendAttemptNb ) { } }

Fix:
return ( ( jsonResult != null ) && ( ! ( jsonResult . get ( "received" ) . isJsonNull ( ) ) ) ) && ( jsonResult . get ( "received" ) . getAsBoolean ( ) ) ;
Buggy code:
public class DockerInfrastructureTests { private static final Logger LOG = LoggerFactory . getLogger ( DockerInfrastructureTests . class ) ; private DockerInfrastructureTests ( ) { } public static DockerInfrastructure deployAndWaitForDockerInfrastructure ( TestApplication app , Location location ) { <START_BUG> DockerInfrastructure dockerInfrastructure = app . createAndManageChild ( EntitySpec . create ( DockerInfrastructure . class ) . configure ( DOCKER_HOST_CLUSTER_MIN_SIZE , 1 ) . configure ( WEAVE_ENABLED , true ) . displayName ( "Docker<seq2seq4repair_space>Infrastructure" ) ) ; <END_BUG> DockerInfrastructureTests . LOG . info ( "Starting<seq2seq4repair_space>{}<seq2seq4repair_space>in<seq2seq4repair_space>{}" , dockerInfrastructure , location ) ; app . start ( ImmutableList . of ( location ) ) ; DockerInfrastructureTests . LOG . info ( "Waiting<seq2seq4repair_space>{}<seq2seq4repair_space>for<seq2seq4repair_space>{}<seq2seq4repair_space>to<seq2seq4repair_space>have<seq2seq4repair_space>started" , TWO_MINUTES , dockerInfrastructure ) ; EntityTestUtils . assertAttributeEqualsEventually ( ImmutableMap . of ( "timeout" , FIVE_MINUTES ) , dockerInfrastructure , SERVICE_UP , true ) ; return dockerInfrastructure ; } public static void testDeploysTrivialApplication ( TestApplication app , Location location ) { } }

Fix:
DockerInfrastructure dockerInfrastructure = app . createAndManageChild ( EntitySpec . create ( DockerInfrastructure . class ) . configure ( DOCKER_HOST_CLUSTER_MIN_SIZE , 1 ) . configure ( SDN_ENABLE , false ) . displayName ( "Docker<seq2seq4repair_space>Infrastructure" ) ) ;
Buggy code:
public abstract class Member extends SourceRefElement implements IMember { protected Member ( JavaElement parent ) { } protected static boolean areSimilarMethods ( String name1 , String [ ] params1 , String name2 , String [ ] params2 , String [ ] simpleNames1 ) { } protected static Object convertConstant ( Constant constant ) { } public static IMethod [ ] findMethods ( IMethod method , IMethod [ ] methods ) { } public String [ ] getCategories ( ) throws JavaModelException { } public IClassFile getClassFile ( ) { } public IType getDeclaringType ( ) { } public int getFlags ( ) throws JavaModelException { } public IJavaElement getHandleFromMemento ( String token , MementoTokenizer memento , WorkingCopyOwner workingCopyOwner ) { } protected char getHandleMementoDelimiter ( ) { } public Member getOuterMostLocalContext ( ) { } public ISourceRange getJavadocRange ( ) throws JavaModelException { ISourceRange range = this . getSourceRange ( ) ; if ( range == null ) return null ; IBuffer buf = null ; if ( this . isBinary ( ) ) { buf = this . getClassFile ( ) . getBuffer ( ) ; } else { ICompilationUnit compilationUnit = this . getCompilationUnit ( ) ; if ( ! ( compilationUnit . isConsistent ( ) ) ) { return null ; } buf = compilationUnit . getBuffer ( ) ; } final int start = range . getOffset ( ) ; final int length = range . getLength ( ) ; if ( ( length > 0 ) && ( ( buf . getChar ( start ) ) == '//' ) ) { IScanner scanner = ToolFactory . createScanner ( true , false , false , false ) ; scanner . setSource ( buf . getText ( start , length ) . toCharArray ( ) ) ; try { int docOffset = - 1 ; int docEnd = - 1 ; int terminal = scanner . getNextToken ( ) ; loop : while ( true ) { switch ( terminal ) { case ITerminalSymbols . TokenNameCOMMENT_JAVADOC : docOffset = scanner . getCurrentTokenStartPosition ( ) ; docEnd = ( scanner . getCurrentTokenEndPosition ( ) ) + 1 ; terminal = scanner . getNextToken ( ) ; break ; case ITerminalSymbols . TokenNameCOMMENT_LINE : case ITerminalSymbols . TokenNameCOMMENT_BLOCK : terminal = scanner . getNextToken ( ) ; continue loop ; default : break loop ; } } if ( docOffset != ( - 1 ) ) { <START_BUG> return new SourceRange ( ( docOffset + start ) , ( ( docEnd - docOffset ) + 1 ) ) ; <END_BUG> } } catch ( InvalidInputException ex ) { } } return null ; } public ISourceRange getNameRange ( ) throws JavaModelException { } public IType getType ( String typeName , int count ) { } public ITypeRoot getTypeRoot ( ) { } public boolean isBinary ( ) { } protected boolean isMainMethod ( IMethod method ) throws JavaModelException { } public boolean isReadOnly ( ) { } public String readableName ( ) { } protected void updateNameRange ( int nameStart , int nameEnd ) { } }

Fix:
return new SourceRange ( ( docOffset + start ) , ( docEnd - docOffset ) ) ;
Buggy code:
public class PropertyCache { private static final Log LOG = Log . findLog ( ) ; private Map < File , PropertyCache . PropertyCacheEntry > propFiles = Maps . newHashMap ( ) ; private final Properties ephemeralProperties = new Properties ( ) ; public ValueProvider getPropertyValue ( final AbstractDefinition < ? > definition ) throws IOException { } @ VisibleForTesting ValueProvider findCurrentValue ( final Properties props , final AbstractDefinition < ? > definition ) { } @ VisibleForTesting Properties getProperties ( final AbstractDefinition < ? > definition ) throws IOException { } public void persist ( ) throws IOException { for ( final Map . Entry < File , PropertyCache . PropertyCacheEntry > propFile : propFiles . entrySet ( ) ) { final PropertyCache . PropertyCacheEntry entry = propFile . getValue ( ) ; final File file = propFile . getKey ( ) ; if ( ( entry . isExists ( ) ) || ( entry . isCreate ( ) ) ) { Preconditions . checkNotNull ( file , "no<seq2seq4repair_space>file<seq2seq4repair_space>defined,<seq2seq4repair_space>can<seq2seq4repair_space>not<seq2seq4repair_space>persist!" ) ; final File oldFile = new File ( ( ( file . getCanonicalPath ( ) ) + ".bak" ) ) ; if ( entry . isExists ( ) ) { Preconditions . checkState ( file . exists ( ) , "File<seq2seq4repair_space>%s<seq2seq4repair_space>should<seq2seq4repair_space>exist!" , file . getCanonicalPath ( ) ) ; if ( oldFile . exists ( ) ) { <START_BUG> oldFile . delete ( ) ; <END_BUG> } } final File newFile = new File ( ( ( file . getCanonicalPath ( ) ) + ".new" ) ) ; OutputStream stream = null ; try { stream = new FileOutputStream ( newFile ) ; entry . getProps ( ) . store ( stream , "created<seq2seq4repair_space>by<seq2seq4repair_space>maven-numbers-plugin" ) ; } finally { Closeables . closeQuietly ( stream ) ; } if ( file . exists ( ) ) { if ( file . renameTo ( oldFile ) ) { if ( ! ( newFile . renameTo ( file ) ) ) { PropertyCache . LOG . warn ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>rename<seq2seq4repair_space>'%s'<seq2seq4repair_space>to<seq2seq4repair_space>'%s'!" , newFile , file ) ; } } else { PropertyCache . LOG . warn ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>rename<seq2seq4repair_space>'%s'<seq2seq4repair_space>to<seq2seq4repair_space>'%s'!" , file , oldFile ) ; } } } } } public static class PropertyCacheEntry { private final Properties props ; private final boolean exists ; private boolean create ; PropertyCacheEntry ( @ Nonnull final Properties props , final boolean exists , final boolean create ) { } public Properties getProps ( ) { } public boolean isExists ( ) { } public boolean isCreate ( ) { } public void doCreate ( ) { } @ Override public boolean equals ( final Object other ) { } @ Override public int hashCode ( ) { } @ Override public String toString ( ) { } } }

Fix:
Preconditions . checkState ( oldFile . delete ( ) , "Could<seq2seq4repair_space>not<seq2seq4repair_space>delete<seq2seq4repair_space>'%s'" , file . getCanonicalPath ( ) ) ;
Buggy code:
public class HugeBuffer extends MemoryFile { private long pos = 0 ; public HugeBuffer ( File file , int bitHint , JournalMode mode ) throws JournalException { } public int [ ] get ( int [ ] container ) { } public long [ ] get ( long [ ] container ) { int len = getInt ( ) ; if ( len == ( - 1 ) ) { return null ; } else { if ( ( container == null ) || ( len != ( container . length ) ) ) { container = new long [ len ] ; } long address = nextAddress ( ( len * 8 ) ) ; for ( int i = 0 ; i < len ; i ++ ) { <START_BUG> container [ i ] = Unsafe . getUnsafe ( ) . getInt ( address ) ; <END_BUG> address += 8 ; } return container ; } } public byte get ( ) { } public boolean getBool ( ) { } public int getInt ( ) { } public long getLong ( ) { } public long getPos ( ) { } public void setPos ( long pos ) { } public String getStr ( ) { } public void put ( CharSequence value ) { } public void put ( int [ ] values ) { } public void put ( long [ ] values ) { } public void put ( int value ) { } public void put ( byte value ) { } public void put ( long value ) { } public void put ( boolean value ) { } private long nextAddress ( int len ) { } }

Fix:
container [ i ] = Unsafe . getUnsafe ( ) . getLong ( address ) ;
Buggy code:
public class LolConfig implements LolConfiguration { @ Override public int getScreenWidth ( ) { } @ Override public int getScreenHeight ( ) { } @ Override public int getNumLevels ( ) { <START_BUG> return 88 ; <END_BUG> } @ Override public int getNumHelpScenes ( ) { } @ Override public boolean getVibration ( ) { } @ Override public boolean getUnlockMode ( ) { } @ Override public boolean showDebugBoxes ( ) { } @ Override public String getStorageKey ( ) { } @ Override public String getDefaultFontFace ( ) { } @ Override public int getDefaultFontSize ( ) { } @ Override public int getDefaultFontRed ( ) { } @ Override public int getDefaultFontGreen ( ) { } @ Override public int getDefaultFontBlue ( ) { } @ Override public String getDefaultWinText ( ) { } @ Override public String getDefaultLoseText ( ) { } @ Override public String getGameTitle ( ) { } }

Fix:
return 89 ;
Buggy code:
public class Decrypt extends Crypto { @ Override public int onStartCommand ( final Intent intent , final int flags , final int startId ) { } @ Override protected void process ( ) throws CryptoProcessException { try { status = Status . RUNNING ; if ( raw ) version = Version . CURRENT ; else readVersion ( ) ; boolean extraRandom = true ; XIV ivType = XIV . RANDOM ; switch ( version ) { case _201108 : case _201110 : ivType = XIV . BROKEN ; case _201211 : extraRandom = false ; break ; case _201302 : case _201311 : case _201406 : ivType = XIV . SIMPLE ; break ; case _201501 : case CURRENT : default : } checksum = ( ( EncryptedFileInputStream ) ( source ) ) . encryptionInit ( cipher , hash , mode , key , ivType ) ; if ( ! ( raw ) ) { if ( extraRandom ) skipRandomData ( ) ; readVerificationSum ( ) ; skipRandomData ( ) ; } readMetadata ( ) ; if ( extraRandom && ( ! ( raw ) ) ) skipRandomData ( ) ; source = ( compressed ) ? new org . tukaani . xz . XZInputStream ( source ) : source ; checksum . reset ( ) ; if ( directory ) decryptDirectory ( path ) ; else { current . size = total . size ; total . size = 1 ; if ( ( blockSize ) > 0 ) decryptStream ( ) ; else decryptFile ( ) ; } if ( ( ( version ) != ( Version . _201108 ) ) && ( ! ( raw ) ) ) { final byte [ ] check = new byte [ checksum . hashSize ( ) ] ; int err = source . read ( check ) ; final byte [ ] digest = checksum . digest ( ) ; if ( ( err < 0 ) || ( ! ( Arrays . equals ( check , digest ) ) ) ) status = Status . WARNING_CHECKSUM ; } if ( ( status ) == ( Status . RUNNING ) ) status = Status . SUCCESS ; } catch ( final CryptoProcessException e ) { status = e . code ; throw e ; } catch ( final NoSuchAlgorithmException e ) { status = Status . FAILED_UNKNOWN_ALGORITHM ; throw new CryptoProcessException ( Status . FAILED_UNKNOWN_ALGORITHM , e ) ; } catch ( final InvalidKeyException e ) { status = Status . FAILED_OTHER ; throw new CryptoProcessException ( Status . FAILED_OTHER , e ) ; } catch ( final XZFormatException e ) { status = Status . FAILED_COMPRESSION_ERROR ; <START_BUG> throw new CryptoProcessException ( Status . FAILED_IO , e ) ; <END_BUG> } catch ( final IOException e ) { status = Status . FAILED_IO ; throw new CryptoProcessException ( Status . FAILED_IO , e ) ; } finally { closeIgnoreException ( source ) ; closeIgnoreException ( output ) ; } } private void readVersion ( ) throws IOException , CryptoProcessException { } private void readVerificationSum ( ) throws IOException , CryptoProcessException { } private void readMetadata ( ) throws IOException , CryptoProcessException { } private void skipRandomData ( ) throws IOException { } private void decryptDirectory ( final String dir ) throws IOException , CryptoProcessException { } private void decryptStream ( ) throws IOException { } private void decryptFile ( ) throws IOException { } private int readAndHash ( final byte [ ] b ) throws IOException { } private int readAndHash ( final byte [ ] b , final int l ) throws IOException { } }

Fix:
throw new CryptoProcessException ( Status . FAILED_COMPRESSION_ERROR , e ) ;
Buggy code:
public class Javadoc extends Comment { public static final SimplePropertyDescriptor COMMENT_PROPERTY = new SimplePropertyDescriptor ( Javadoc . class , "comment" , String . class , ASTNode . MANDATORY ) ; public static final ChildListPropertyDescriptor TAGS_PROPERTY = new ChildListPropertyDescriptor ( Javadoc . class , "tags" , TagElement . class , ASTNode . CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS_2_0 ; private static final List PROPERTY_DESCRIPTORS_3_0 ; public static List propertyDescriptors ( int apiLevel ) { } private static final String MINIMAL_DOC_COMMENT = "//**<seq2seq4repair_space>*//" ; private String comment = Javadoc . MINIMAL_DOC_COMMENT ; private ASTNode . NodeList tags = new ASTNode . NodeList ( Javadoc . TAGS_PROPERTY ) ; Javadoc ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final Object internalGetSetObjectProperty ( SimplePropertyDescriptor property , boolean get , Object value ) { } final List internalGetChildListProperty ( ChildListPropertyDescriptor property ) { } public int getNodeType ( ) { } ASTNode clone ( AST target ) { Javadoc result = new Javadoc ( target ) ; result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <START_BUG> if ( ( this . ast . API_LEVEL ) == ( LEVEL_2_0 ) ) { <END_BUG> result . setComment ( getComment ( ) ) ; } result . tags ( ) . addAll ( ASTNode . copySubtrees ( target , tags ( ) ) ) ; return result ; } public boolean subtreeMatch ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public String getComment ( ) { } public void setComment ( String docComment ) { } public List tags ( ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
if ( ( this . ast . apiLevel ) == ( LEVEL_2_0 ) ) {
Buggy code:
@ Transactional @ Authenticated ( { LoggedIn . class , HasRole . class } ) public class ContestAnnouncementController extends Controller { private static final long PAGE_SIZE = 20 ; private final ContestService contestService ; public ContestAnnouncementController ( ContestService contestService ) { } public Result viewPublishedAnnouncements ( long contestId ) { } public Result listPublishedAnnouncements ( long contestId , long pageIndex , String orderBy , String orderDir , String filterString ) { } public Result viewAnnouncements ( long contestId ) { } public Result listAnnouncements ( long contestId , long pageIndex , String orderBy , String orderDir , String filterString ) { } @ AddCSRFToken public Result createAnnouncement ( long contestId ) { } @ RequireCSRFCheck public Result postCreateAnnouncement ( long contestId ) { } @ AddCSRFToken public Result updateAnnouncement ( long contestId , long contestAnnouncementId ) { } @ RequireCSRFCheck public Result postUpdateAnnouncement ( long contestId , long contestAnnouncementId ) { } private Result showCreateAnnouncement ( Form < ContestAnnouncementUpsertForm > form , Contest contest ) { LazyHtml content = new LazyHtml ( createAnnouncementView . render ( contest . getId ( ) , form ) ) ; content . appendLayout ( ( c ) -> heading3Layout . render ( Messages . get ( "announcement.create" ) , c ) ) ; appendSubtabsLayout ( content , contest ) ; ContestControllerUtils . getInstance ( ) . appendTabsLayout ( content , contest ) ; ControllerUtils . getInstance ( ) . appendSidebarLayout ( content ) ; <START_BUG> appendBreadcrumbsLayout ( content , contest , new InternalLink ( Messages . get ( "status.supervisor" ) , routes . ContestAnnouncementController . viewPublishedAnnouncements ( contest . getId ( ) ) ) , new InternalLink ( Messages . get ( "announcement.create" ) , routes . ContestAnnouncementController . createAnnouncement ( contest . getId ( ) ) ) ) ; <END_BUG> ControllerUtils . getInstance ( ) . appendTemplateLayout ( content , "Contest<seq2seq4repair_space>-<seq2seq4repair_space>Announcement<seq2seq4repair_space>-<seq2seq4repair_space>Create" ) ; return ControllerUtils . getInstance ( ) . lazyOk ( content ) ; } private Result showUpdateAnnouncement ( Form < ContestAnnouncementUpsertForm > form , Contest contest , ContestAnnouncement contestAnnouncement ) { } private void appendSubtabsLayout ( LazyHtml content , Contest contest ) { } private void appendBreadcrumbsLayout ( LazyHtml content , Contest contest , InternalLink ... lastLinks ) { } private boolean isAllowedToSuperviseAnnouncements ( Contest contest ) { } }

Fix:
appendBreadcrumbsLayout ( content , contest , new InternalLink ( Messages . get ( "status.supervisor" ) , routes . ContestAnnouncementController . viewAnnouncements ( contest . getId ( ) ) ) , new InternalLink ( Messages . get ( "announcement.create" ) , routes . ContestAnnouncementController . createAnnouncement ( contest . getId ( ) ) ) ) ;
Buggy code:
class ModelPitman extends RiskModelPopulationBased { private static final boolean ITERATIVE = false ; private final double numUniques ; ModelPitman ( final ARXPopulationModel model , final RiskModelEquivalenceClasses classes , final int sampleSize , final NewtonRaphsonConfiguration < ? > config , final WrappedBoolean stop ) { } private double getResult ( Vector2D result , double p ) { double t = result . x ; double a = result . y ; <START_BUG> if ( ( ( Double . isNaN ( a ) ) && ( Double . isNaN ( t ) ) ) && ( a == 0 ) ) { <END_BUG> return Double . NaN ; } double val1 = Double . NaN ; try { val1 = ( Math . exp ( ( ( Gamma . logGamma ( ( t + 1 ) ) ) - ( Gamma . logGamma ( ( t + a ) ) ) ) ) ) * ( Math . pow ( p , a ) ) ; } catch ( Exception e ) { } val1 = ( ( val1 >= 0.0 ) && ( val1 <= p ) ) ? val1 : Double . NaN ; double val2 = Double . NaN ; try { val2 = ( ( Gamma . gamma ( ( t + 1 ) ) ) // ( Gamma . gamma ( ( t + a ) ) ) ) * ( Math . pow ( p , a ) ) ; } catch ( Exception e ) { } val2 = ( ( val2 >= 0.0 ) && ( val2 <= p ) ) ? val2 : Double . NaN ; if ( ( Double . isNaN ( val1 ) ) && ( Double . isNaN ( val2 ) ) ) { return Double . NaN ; } else if ( ( ! ( Double . isNaN ( val1 ) ) ) && ( ! ( Double . isNaN ( val2 ) ) ) ) { return Math . max ( val1 , val2 ) ; } else if ( Double . isNaN ( val1 ) ) { return val2 ; } else { return val1 ; } } public double getNumUniques ( ) { } private Function < Vector2D , Pair < Vector2D , SquareMatrix2D > > getFunctions ( final int [ ] classes , final double u , final double n ) { } private Function < Vector2D , Pair < Vector2D , SquareMatrix2D > > getFunctionsIterative ( final int [ ] classes , final double u , final double n ) { } private Function < Vector2D , Pair < Vector2D , SquareMatrix2D > > getFunctionsClosed ( final int [ ] classes , final double u , final double n ) { } No newline ; at end ; of file ; }

Fix:
if ( ( ( Double . isNaN ( a ) ) || ( Double . isNaN ( t ) ) ) || ( a == 0 ) ) {
Buggy code:
public class TPUTask implements Callable < String > { private static final Logger LOG = LoggerFactory . getLogger ( TPUTask . class ) ; private final Properties config ; private final String watchFolderFile ; private final String resourceWatchFolder ; private final String serviceName ; private final int cnt ; public TPUTask ( final Properties config , final String watchFolderFile , final String resourceWatchFolder , final String serviceName , final int cnt ) { } @ Override public String call ( ) throws Exception { } private static void executeTransformation ( final String inputDataModelID , final String outputDataModelID , final Integer engineThreads , final Properties config , final String serviceName , final int cnt ) { <START_BUG> final Optional < Boolean > optionalDoExportOnTheFly = Optional . of ( Boolean . FALSE ) ; <END_BUG> final Optional < Boolean > optionalDoIngestOnTheFly = Optional . of ( Boolean . TRUE ) ; final Callable < String > transformTask = new Transform ( config , inputDataModelID , outputDataModelID , optionalDoIngestOnTheFly , optionalDoExportOnTheFly , cnt ) ; final ThreadPoolExecutor pool = new ThreadPoolExecutor ( engineThreads , engineThreads , 0L , TimeUnit . SECONDS , new LinkedBlockingQueue < > ( ) ) ; try { final List < Callable < String > > tasks = new LinkedList < > ( ) ; tasks . add ( transformTask ) ; final List < Future < String > > futureList = pool . invokeAll ( tasks ) ; final Iterator < Future < String > > iterator = futureList . iterator ( ) ; if ( iterator . hasNext ( ) ) { final Future < String > f = iterator . next ( ) ; final String message = f . get ( ) ; final String message1 = String . format ( "[%s][%d]<seq2seq4repair_space>%s" , serviceName , cnt , message ) ; TPUTask . LOG . info ( message1 ) ; } } catch ( InterruptedException | ExecutionException e ) { TPUTask . LOG . error ( "[{}][{}]<seq2seq4repair_space>something<seq2seq4repair_space>went<seq2seq4repair_space>wrong" , serviceName , cnt , e ) ; } finally { pool . shutdown ( ) ; } } }

Fix:
final Optional < Boolean > optionalDoExportOnTheFly = Optional . of ( Boolean . TRUE ) ;
Buggy code:
public class GraphActivity extends Activity { private DrawerLayout _drawerLayout ; private ListView _listView ; private ActionBarDrawerToggle _drawerListener ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_graph ) ; <START_BUG> AlarmStarter . setAlarmByHour ( this , 12345 , 2 , 0 , 0 ) ; <END_BUG> _drawerLayout = ( ( DrawerLayout ) ( findViewById ( drawer_layout ) ) ) ; _listView = ( ( ListView ) ( findViewById ( left_drawer ) ) ) ; LinearLayout contentLayout = ( ( LinearLayout ) ( findViewById ( content_Layout ) ) ) ; contentLayout . setOrientation ( VERTICAL ) ; TextView textView = new TextView ( this ) ; textView . setText ( "August<seq2seq4repair_space>02<seq2seq4repair_space>-<seq2seq4repair_space>August<seq2seq4repair_space>09" ) ; textView . setTextSize ( 25 ) ; textView . setTypeface ( DEFAULT_BOLD ) ; textView . setBackgroundColor ( Color . parseColor ( "#009788" ) ) ; textView . setTextColor ( WHITE ) ; textView . setGravity ( ( ( Gravity . CENTER_HORIZONTAL ) | ( Gravity . CENTER_VERTICAL ) ) ) ; contentLayout . addView ( textView , new LinearLayout . LayoutParams ( LayoutParams . MATCH_PARENT , 0 , 10 ) ) ; GraphView graphView = new GraphView ( this ) ; contentLayout . addView ( graphView , new LinearLayout . LayoutParams ( LayoutParams . MATCH_PARENT , 0 , 90 ) ) ; _drawerListener = new ActionBarDrawerToggle ( this , _drawerLayout , drawable . ic_drawer , string . drawer_open , string . drawer_close ) { @ Override public void onDrawerClosed ( View drawerView ) { super . onDrawerClosed ( drawerView ) ; } @ Override public void onDrawerOpened ( View drawerView ) { super . onDrawerOpened ( drawerView ) ; } } ; _drawerLayout . setDrawerListener ( _drawerListener ) ; try { getActionBar ( ) . setHomeButtonEnabled ( true ) ; getActionBar ( ) . setDisplayHomeAsUpEnabled ( true ) ; } catch ( Exception e ) { Log . e ( "action<seq2seq4repair_space>bar" , e . toString ( ) ) ; } } @ Override protected void onPostCreate ( Bundle savedInstanceState ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public void onConfigurationChanged ( Configuration newConfig ) { } }

Fix:
AlarmStarter . setAlarmByHour ( this , 12345 , 2 , 30 , 0 ) ;
Buggy code:
public class ServerDependenciesProcessor implements DeploymentUnitProcessor { private static ModuleIdentifier SUN_JDK = ModuleIdentifier . create ( "sun.jdk" ) ; private static ModuleIdentifier JAVAX_API = ModuleIdentifier . create ( "javax.api" ) ; private static ModuleIdentifier JBOSS_LOGGING = ModuleIdentifier . create ( "org.jboss.logging" ) ; @ Override public void deploy ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final ModuleSpecification moduleSpecification = deploymentUnit . getAttachment ( MODULE_SPECIFICATION ) ; final ModuleLoader moduleLoader = Module . getBootModuleLoader ( ) ; <START_BUG> moduleSpecification . addSystemDependency ( new ModuleDependency ( moduleLoader , ServerDependenciesProcessor . SUN_JDK , false , false , false ) ) ; <END_BUG> moduleSpecification . addSystemDependency ( new ModuleDependency ( moduleLoader , ServerDependenciesProcessor . JAVAX_API , false , false , false ) ) ; moduleSpecification . addSystemDependency ( new ModuleDependency ( moduleLoader , ServerDependenciesProcessor . JBOSS_LOGGING , false , false , false ) ) ; } @ Override public void undeploy ( final DeploymentUnit context ) { } }

Fix:
moduleSpecification . addSystemDependency ( new ModuleDependency ( moduleLoader , ServerDependenciesProcessor . SUN_JDK , false , false , true ) ) ;
Buggy code:
public class TrainMoveController { private Context context ; private Train train ; public static List < TrainMoveController > controllers = new ArrayList < TrainMoveController > ( ) ; public TrainMoveController ( Context context , Train train ) { } private RunnableAction beforeAction ( ) { } private RunnableAction perStationAction ( final Station station ) { } private RunnableAction afterAction ( ) { } public void refreshMoveActions ( ) { if ( train . getRoute ( ) . isEmpty ( ) ) return ; SequenceAction actionSequence = Actions . sequence ( ) ; IPositionable current = train . getPosition ( ) ; if ( ( current . getX ( ) ) == ( - 1 ) ) { current . setX ( ( ( int ) ( train . getActor ( ) . getX ( ) ) ) ) ; current . setY ( ( ( int ) ( train . getActor ( ) . getY ( ) ) ) ) ; } int routeLength = 0 ; actionSequence . addAction ( beforeAction ( ) ) ; for ( int i = 0 ; i < ( train . getRoute ( ) . size ( ) ) ; i ++ ) { Station station = train . getRoute ( ) . get ( i ) ; <START_BUG> if ( station instanceof CollisionStation ) { <END_BUG> if ( ( ( CollisionStation ) ( station ) ) . isBroken ( ) ) { break ; } } if ( i < ( ( train . getRoute ( ) . size ( ) ) - 1 ) ) { Station nextStation = train . getRoute ( ) . get ( ( i + 1 ) ) ; if ( ! ( context . getGameLogic ( ) . getMap ( ) . doesConnectionExist ( station . getName ( ) , nextStation . getName ( ) ) ) ) { break ; } } routeLength ++ ; } while ( ( ( train . getRoute ( ) . size ( ) ) - 1 ) > routeLength ) { train . getRoute ( ) . remove ( ( ( train . getRoute ( ) . size ( ) ) - 1 ) ) ; } for ( final Station station : train . getRoute ( ) ) { IPositionable next = station . getLocation ( ) ; float duration = ( getDistance ( current , next ) ) // ( train . getSpeed ( ) ) ; actionSequence . addAction ( moveTo ( ( ( next . getX ( ) ) - ( ( TrainActor . width ) // 2 ) ) , ( ( next . getY ( ) ) - ( ( TrainActor . height ) // 2 ) ) , duration ) ) ; actionSequence . addAction ( perStationAction ( station ) ) ; current = next ; } actionSequence . addAction ( afterAction ( ) ) ; train . setFinalDestination ( train . getRoute ( ) . get ( ( ( train . getRoute ( ) . size ( ) ) - 1 ) ) ) ; train . getActor ( ) . clearActions ( ) ; train . getActor ( ) . addAction ( actionSequence ) ; } private float getDistance ( IPositionable a , IPositionable b ) { } private void collisions ( Station station ) { } private List < Train > trainsToDestroy ( ) { } }

Fix:
if ( ( station instanceof CollisionStation ) && ( routeLength != 0 ) ) {
Buggy code:
public class GameResultHandler { private final LinearLayout layout ; public GameResultHandler ( LinearLayout layout ) { } public void displayGameResult ( PlayResult playResult , DbStorageHelper storageHelper ) { TextView rounds = getTextView ( layout . getContext ( ) ) ; rounds . setText ( ( "Rounds:<seq2seq4repair_space>" + ( playResult . getNumberOfGuesses ( ) ) ) ) ; layout . addView ( rounds ) ; TextView time = getTextView ( layout . getContext ( ) ) ; time . setText ( ( ( "Time:<seq2seq4repair_space>" + ( ( playResult . getTimeInMillis ( ) ) // 1000.0F ) ) + "<seq2seq4repair_space>seconds" ) ) ; layout . addView ( time ) ; TextView numberOfGames = getTextView ( layout . getContext ( ) ) ; numberOfGames . setText ( ( ( ( "Games<seq2seq4repair_space>Win//Played:<seq2seq4repair_space>" + ( storageHelper . numberOfWins ( ) ) ) + "//" ) + ( storageHelper . numberOfGames ( ) ) ) ) ; layout . addView ( numberOfGames ) ; TextView fastestTime = getTextView ( layout . getContext ( ) ) ; fastestTime . setText ( ( ( "Fastest<seq2seq4repair_space>Time:<seq2seq4repair_space>" + ( ( storageHelper . fastestTime ( ) ) // 1000.0F ) ) + "<seq2seq4repair_space>seconds." ) ) ; layout . addView ( fastestTime ) ; TextView score = getTextView ( layout . getContext ( ) ) ; <START_BUG> fastestTime . setText ( ( "Score:<seq2seq4repair_space>" + ( ( storageHelper . score ( ) ) // 1000.0F ) ) ) ; <END_BUG> layout . addView ( score ) ; } private TextView getTextView ( Context context ) { } }

Fix:
score . setText ( ( "Score:<seq2seq4repair_space>" + ( ( storageHelper . score ( ) ) // 1000.0F ) ) ) ;
Buggy code:
public class ErrorState implements State { private final State nextState ; private final String errorMessage ; private final StateValues stateValues ; private ConsoleWrapper theConsole ; public ErrorState ( ConsoleWrapper theConsole , String errorMessage ) { } public ErrorState ( ConsoleWrapper theConsole , String errorMessage , State nextState ) { } public ErrorState ( ConsoleWrapper theConsole , String errorMessage , State nextState , StateValues stateValues ) { } public State execute ( ) { boolean direct = ( theConsole . getConsole ( ) ) == null ; printf ( AddUser . NEW_LINE , direct ) ; printf ( "<seq2seq4repair_space>*<seq2seq4repair_space>" , direct ) ; printf ( DomainManagementMessages . MESSAGES . errorHeader ( ) , direct ) ; printf ( "<seq2seq4repair_space>*<seq2seq4repair_space>" , direct ) ; printf ( AddUser . NEW_LINE , direct ) ; printf ( errorMessage , direct ) ; printf ( AddUser . NEW_LINE , direct ) ; printf ( AddUser . NEW_LINE , direct ) ; if ( ( ( ( stateValues ) != null ) && ( ! ( stateValues . isInteractive ( ) ) ) ) && ( ( nextState ) == null ) ) { <START_BUG> throw new RuntimeException ( errorMessage ) ; <END_BUG> } return nextState ; } private void printf ( final String message , final boolean direct ) { } }

Fix:
throw new AddUserFailedException ( errorMessage ) ;
Buggy code:
public class CliCompiler { public static class ANTLRNoCaseStringStream extends ANTLRStringStream { public ANTLRNoCaseStringStream ( String input ) { } public int LA ( int i ) { } } public static Tree compileQuery ( String query ) { } public static String getColumnFamily ( Tree astNode , List < CfDef > cfDefs ) { <START_BUG> return CliCompiler . getColumnFamily ( astNode . getChild ( 0 ) . getText ( ) , cfDefs ) ; <END_BUG> } public static String getColumnFamily ( String cfName , List < CfDef > cfDefs ) { } public static String getKeySpace ( Tree statement , List < KsDef > keyspaces ) { } public static String getKeySpace ( String ksName , List < KsDef > keyspaces ) { } public static String getKey ( Tree astNode ) { } public static int numColumnSpecifiers ( Tree astNode ) { } public static String getColumn ( Tree astNode , int pos ) { } }

Fix:
return CliCompiler . getColumnFamily ( CliUtils . unescapeSQLString ( astNode . getChild ( 0 ) . getText ( ) ) , cfDefs ) ;
Buggy code:
public class TipOfTheDay extends EnhancedDialog { public TipOfTheDay ( View view ) { } public void ok ( ) { } public void cancel ( ) { } private JCheckBox showNextTime ; private JButton nextTip ; private JButton close ; private JEditorPane tipText ; private int currentTip = - 1 ; private void nextTip ( ) { File [ ] tips = new File ( MiscUtilities . constructPath ( jEdit . getJEditHome ( ) , "doc" , "tips" ) ) . listFiles ( ) ; if ( ( tips == null ) || ( ( tips . length ) == 0 ) ) { tipText . setText ( jEdit . getProperty ( "tip.not-found" ) ) ; return ; } int count = tips . length ; int tipToShow = currentTip ; <START_BUG> while ( tipToShow == ( currentTip ) ) <END_BUG> tipToShow = ( Math . abs ( new Random ( ) . nextInt ( ) ) ) % count ; try { tipText . setPage ( tips [ tipToShow ] . toURL ( ) ) ; } catch ( Exception e ) { Log . log ( ERROR , this , e ) ; } } class ActionHandler implements ActionListener { public void actionPerformed ( ActionEvent evt ) { } } }

Fix:
while ( ( tipToShow == ( currentTip ) ) || ( ! ( tips [ tipToShow ] . getName ( ) . endsWith ( ".html" ) ) ) )
Buggy code:
public class TransactionalSpoutBatchExecutor implements IRichBolt { public static Logger LOG = Logger . getLogger ( TransactionalSpoutBatchExecutor . class ) ; BatchOutputCollectorImpl _collector ; ITransactionalSpout _spout ; Emitter _emitter ; TreeMap < BigInteger , TransactionAttempt > _activeTransactions = new TreeMap < BigInteger , TransactionAttempt > ( ) ; public TransactionalSpoutBatchExecutor ( ITransactionalSpout spout ) { } @ Override public void prepare ( Map conf , TopologyContext context , OutputCollector collector ) { } @ Override public void execute ( Tuple input ) { TransactionAttempt attempt = ( ( TransactionAttempt ) ( input . getValue ( 0 ) ) ) ; try { if ( input . getSourceStreamId ( ) . equals ( TRANSACTION_COMMIT_STREAM_ID ) ) { if ( attempt . equals ( _activeTransactions . get ( attempt . getTransactionId ( ) ) ) ) { <START_BUG> ( ( ICommitterTransactionalSpout . ICommitterEmitter ) ( _emitter ) ) . commit ( attempt ) ; <END_BUG> _activeTransactions . remove ( attempt . getTransactionId ( ) ) ; _collector . ack ( input ) ; } else { _collector . fail ( input ) ; } } else { _emitter . emitBatch ( attempt , input . getValue ( 1 ) , _collector ) ; _activeTransactions . put ( attempt . getTransactionId ( ) , attempt ) ; _collector . ack ( input ) ; BigInteger committed = ( ( BigInteger ) ( input . getValue ( 2 ) ) ) ; if ( committed != null ) { _activeTransactions . headMap ( committed ) . clear ( ) ; _emitter . cleanupBefore ( committed ) ; } } } catch ( FailedException e ) { TransactionalSpoutBatchExecutor . LOG . warn ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>emit<seq2seq4repair_space>batch<seq2seq4repair_space>for<seq2seq4repair_space>transaction" , e ) ; _collector . fail ( input ) ; } } @ Override public void cleanup ( ) { } @ Override public void declareOutputFields ( OutputFieldsDeclarer declarer ) { } @ Override public Map < String , Object > getComponentConfiguration ( ) { } }

Fix:
( ( ICommitterTransactionalSpout . Emitter ) ( _emitter ) ) . commit ( attempt ) ;
Buggy code:
public class DatePickerTest extends WicketTestCase { private static final Logger log = LoggerFactory . getLogger ( DatePickerTest . class ) ; private TimeZone defaultTz = TimeZone . getDefault ( ) ; @ Override protected void tearDown ( ) throws Exception { } public void test1 ( ) throws Exception { } public void test2 ( ) throws Exception { } public void test3 ( ) throws Exception { } public void testJodaTimeDefaultTimeZone ( ) { } public void testDifferentDateTimeZoneConversion ( ) throws ParseException { } public void testStyleDateConverterTimeZoneDifference ( ) throws ParseException { TimeZone origJvmDef = TimeZone . getDefault ( ) ; DateTimeZone origJodaDef = DateTimeZone . getDefault ( ) ; TimeZone tzClient = TimeZone . getTimeZone ( "Etc//GMT-14" ) ; TimeZone tzServer = TimeZone . getTimeZone ( "Etc//GMT+12" ) ; TimeZone . setDefault ( tzServer ) ; DateTimeZone . setDefault ( DateTimeZone . forTimeZone ( tzServer ) ) ; Locale . setDefault ( Locale . GERMAN ) ; WebClientInfo clientInfo = ( ( WebClientInfo ) ( tester . getSession ( ) . getClientInfo ( ) ) ) ; clientInfo . getProperties ( ) . setTimeZone ( tzClient ) ; StyleDateConverter converter = new StyleDateConverter ( true ) ; Calendar cal = Calendar . getInstance ( tzClient ) ; cal . set ( 2011 , 10 , 5 , 0 , 0 , 0 ) ; cal . set ( Calendar . MILLISECOND , 0 ) ; Date dateRef = cal . getTime ( ) ; <START_BUG> Date date = converter . convertToObject ( "11//05//2011" , Locale . GERMAN ) ; <END_BUG> DatePickerTest . log . error ( ( ( ( "ref:<seq2seq4repair_space>" + ( dateRef . getTime ( ) ) ) + ";<seq2seq4repair_space>converted:<seq2seq4repair_space>" ) + ( date . getTime ( ) ) ) ) ; DatePickerTest . log . error ( ( ( ( "ref:<seq2seq4repair_space>" + dateRef ) + ";<seq2seq4repair_space>date:<seq2seq4repair_space>" ) + date ) ) ; assertEquals ( 0 , dateRef . compareTo ( date ) ) ; TimeZone . setDefault ( origJvmDef ) ; DateTimeZone . setDefault ( origJodaDef ) ; } public void testDates1 ( ) throws ParseException { } public void testDates2 ( ) throws ParseException { } public void testDates3 ( ) throws ParseException { } public Date convertDate ( final String dateStr , final Integer hours , final Integer minutes , final AM_PM amOrPm , final boolean use12HourFormat , final TimeZone tzClient ) throws ParseException { } public Date convertDateNew ( final String dateStr , final Integer hours , final Integer minutes , final AM_PM amOrPm , final boolean use12HourFormat , final TimeZone tzClient ) throws ParseException { } public Date convertDateJoda ( final String dateStr , final Integer hours , final Integer minutes , final AM_PM amOrPm , final boolean use12HourFormat , final TimeZone tzClient ) throws ParseException { } protected < T extends Page > void myTestExecution ( final Class < T > pageClass , final String filename ) throws Exception { } }

Fix:
Date date = converter . convertToObject ( "05.11.2011" , Locale . GERMAN ) ;
Buggy code:
public abstract class Node < A extends Pair , B extends Node < A , B > > { private static final Logger LOG = Logger . getLogger ( Node . class . getName ( ) ) ; protected final List < B > children = new ArrayList < > ( 0 ) ; protected final List < A > properties = new ArrayList < > ( 0 ) ; protected Object custom ; @ Nullable protected B parent ; public Node ( ) { } public Node ( Object a ) { } @ SafeVarargs public static < A extends Pair , B extends Node < A , B > > void debug ( @ NotNull final B ... l ) { } public static < A extends Pair , B extends Node < A , B > > void debugDiff ( @ NotNull Diff < B > diff ) { } @ NotNull @ Override public String toString ( ) { <START_BUG> return ( ( String ) ( custom ) ) ; <END_BUG> } public Object getValue ( @ NotNull Object key ) { } public Object getValue ( @ NotNull Object key , Object placeholder ) { } @ SafeVarargs public final void addAllProperties ( A ... properties ) { } public void addAllProperties ( @ NotNull Iterable < A > c ) { } public void addProperty ( A property ) { } @ NotNull public List < A > getProperties ( ) { } @ SafeVarargs public final void addAllNodes ( B ... nodes ) { } public void addAllNodes ( @ NotNull Iterable < B > c ) { } @ SuppressWarnings ( "unchecked" ) public void addNode ( @ NotNull B e ) { } public List < B > getNodes ( ) { } public Object getCustom ( ) { } @ Nullable public B getParent ( ) { } public boolean has ( Object identifier ) { } @ Nullable public B get ( Object identifier ) { } @ Nullable public B get ( @ NotNull Object ... path ) { } @ NotNull public String printTree ( ) { } @ NotNull public abstract Diff < B > rdiff ( B other ) { } public void removeNode ( @ NotNull B e ) { } @ NotNull public JTree toTree ( ) { } @ NotNull public DefaultMutableTreeNode toTreeNode ( ) { } }

Fix:
return ( custom ) == null ? "" : ( ( String ) ( custom ) ) ;
Buggy code:
public class AnnotationProcessor extends AbstractProcessor { private static final String SUFFIX = "$$APIINJECTOR" ; private Filer filer ; private Elements elementUtils ; private Types typeUtils ; @ Override public synchronized void init ( ProcessingEnvironment env ) { } @ Override public boolean process ( Set < ? extends TypeElement > annotations , RoundEnvironment roundEnv ) { } @ Override public Set < String > getSupportedAnnotationTypes ( ) { } private Map < TypeElement , APIClassInjector > findAndParseTargets ( RoundEnvironment env ) { } private APIClassInjector getOrCreateTargetClass ( Map < TypeElement , APIClassInjector > targetClassMap , TypeElement enclosingElement ) { APIClassInjector injector = targetClassMap . get ( enclosingElement ) ; if ( injector == null ) { String targetType = enclosingElement . getQualifiedName ( ) . toString ( ) ; String classPackage = getPackageName ( enclosingElement ) ; String className = ( getClassName ( enclosingElement , classPackage ) ) + ( AnnotationProcessor . SUFFIX ) ; TypeMirror elementType = enclosingElement . asType ( ) ; boolean isInterface = isInterface ( elementType ) ; <START_BUG> injector = new APIClassInjector ( classPackage , className , targetType ) ; <END_BUG> targetClassMap . put ( enclosingElement , injector ) ; } return injector ; } private boolean isInterface ( TypeMirror typeMirror ) { } @ Override public SourceVersion getSupportedSourceVersion ( ) { } private String getClassName ( TypeElement type , String packageName ) { } private String getPackageName ( TypeElement type ) { } private void writeLog ( String str ) { } }

Fix:
injector = new APIClassInjector ( classPackage , className , targetType , isInterface ) ;
Buggy code:
public class TCPClientSOContainer extends ClientSOContainer { int keepAlive = 0 ; public static final String DEFAULT_COMM_NAME = Client . class . getName ( ) ; public TCPClientSOContainer ( ISharedObjectContainerConfig config ) { } public TCPClientSOContainer ( ISharedObjectContainerConfig config , int ka ) { } protected ISynchAsynchConnection createConnection ( ID remoteSpace , Object data ) throws ConnectionInstantiationException { <START_BUG> debug ( ( ( ( "getClientConnection:" + remoteSpace ) + ":" ) + data ) ) ; <END_BUG> Object [ ] args = new Object [ ] { new Integer ( keepAlive ) } ; ISynchAsynchConnection conn = null ; conn = ConnectionFactory . createSynchAsynchConnection ( receiver , TCPClientSOContainer . DEFAULT_COMM_NAME , args ) ; return conn ; } public static final void main ( String [ ] args ) throws Exception { } }

Fix:
debug ( ( ( ( "createClientConnection:" + remoteSpace ) + ":" ) + data ) ) ;
Buggy code:
public class Zerochan { protected static Integer numberOfTheNyas ; protected static Integer numberNya ; protected static URL nyaURL ; protected static URL fullURL ; public static void getNumberOfTheNyas ( ) { try { URL url = new URL ( "http:////www.zerochan.net" ) ; InputStream inputStream = url . openConnection ( ) . getInputStream ( ) ; InputStreamReader inputStreamReader = new InputStreamReader ( inputStream ) ; int numCharsRead ; char [ ] charArray = new char [ 1024 ] ; StringBuffer stringBuffer = new StringBuffer ( ) ; while ( ( numCharsRead = inputStreamReader . read ( charArray ) ) > 0 ) { stringBuffer . append ( charArray , 0 , numCharsRead ) ; } String result = stringBuffer . toString ( ) ; int index = new Integer ( result . indexOf ( "240." ) ) ; String stringNumber = new String ( result . substring ( ( index + 4 ) , ( index + 10 ) ) ) ; Zerochan . numberOfTheNyas = Integer . parseInt ( stringNumber ) ; inputStream . close ( ) ; inputStreamReader . close ( ) ; } catch ( MalformedURLException e ) { e . printStackTrace ( ) ; } catch ( IOException e ) { <START_BUG> e . printStackTrace ( ) ; <END_BUG> } } protected static void generateNumberNya ( ) { } protected static void generateURLs ( ) throws MalformedURLException { } }

Fix:
System . exit ( 0 ) ;