nus-yam/ex-repair huggingface dataset:
Buggy code:
public abstract class RegistryManager implements IRegistryChangeListener { private String elementId ; private String extPtId ; private HashMap cache ; public static final int REGISTRY_CACHE_STATE_UNKNOWN = 0 ; public static final int REGISTRY_CACHE_STATE_ACTIVE = 1 ; public static final int REGISTRY_CACHE_STATE_DELETED = 2 ; public static final int REGISTRY_CACHE_STATE_MAX = 2 ; public static final String INTERNAL_REGISTRY_ADDITION = "InternalRegistryAddition" ; private int numObjects = 0 ; private class RegistryElement { private int state ; private ArrayList realObjects = null ; public RegistryElement ( Object obj ) { } public void addNewObject ( Object obj ) { } public void changeState ( int newState ) { } public ArrayList getRealObjects ( ) { } public int howManyObjects ( ) { } } public RegistryManager ( String elementId , String extPtId ) { } public RegistryManager getCache ( ) { } public Object [ ] getRegistryObjects ( ) { } public void registryChanged ( IRegistryChangeEvent event ) { } public void add ( IExtensionDelta delta ) { IExtensionPoint extPt = delta . getExtensionPoint ( ) ; IExtension ext = delta . getExtension ( ) ; <START_BUG> String pluginId = ext . getDeclaringPluginDescriptor ( ) . getUniqueIdentifier ( ) ; <END_BUG> add ( buildNewCacheObject ( delta ) , pluginId ) ; } public void add ( Object element , String pluginId ) { } public abstract Object buildNewCacheObject ( IExtensionDelta delta ) { } public abstract void postChangeProcessing ( ) { } public void remove ( String [ ] plugins ) { } public void remove ( String pluginId ) { } public void cleanRegistry ( ) { } }

Fix:
String pluginId = ext . getNamespace ( ) ;
Buggy code:
public class GenericITDsDesign extends XMLBasedAjcTestCase { private World recentWorld ; public static Test suite ( ) { } protected File getSpecFile ( ) { } private void verifyDebugString ( ResolvedMember theMember , String string ) { } public static JavaClass getClassFromDisk ( Ajc ajc , String classname ) { } public static Signature getClassSignature ( Ajc ajc , String classname ) { } public static void verifyClassSignature ( Ajc ajc , String classname , String sig ) { } public List getTypeMunger ( String classname ) { ClassPath cp = new ClassPath ( ( ( ( ajc . getSandboxDirectory ( ) ) + ( File . pathSeparator ) ) + ( System . getProperty ( "java.class.path" ) ) ) ) ; recentWorld = new org . aspectj . weaver . bcel . BcelWorld ( cp . toString ( ) ) ; ReferenceType resolvedType = ( ( ReferenceType ) ( recentWorld . resolve ( classname ) ) ) ; <START_BUG> CrosscuttingMembers cmembers = resolvedType . collectCrosscuttingMembers ( ) ; <END_BUG> List tmungers = cmembers . getTypeMungers ( ) ; return tmungers ; } private BcelTypeMunger getMungerFromLine ( String classname , int linenumber ) { } public Hashtable getMeTheFields ( String classname ) { } public void testDesignA ( ) { } public void testDesignB ( ) { } public void testDesignC ( ) { } public void testDesignD ( ) { } public void testDesignE ( ) { } public void testDesignF ( ) { } public void testDesignG ( ) { } }

Fix:
CrosscuttingMembers cmembers = resolvedType . collectCrosscuttingMembers ( true ) ;
Buggy code:
public interface FluentStatefulKnowledgeSession < T > extends FluentBase { T fireAllRules ( ) { } T insert ( Object object ) { } T setGlobal ( String identifier , Object object ) { } <START_BUG> FluentStatefulKnowledgeSession < T > set ( String name ) ; <END_BUG> }

Fix:
T set ( String name ) ;
Buggy code:
public class ProfileJava extends Profile { protected static Category cat = Category . getInstance ( ProfileJava . class ) ; private static ProfileJava _instance = null ; public static ProfileJava getInstance ( ) { } MModel _defaultModel ; private ProfileJava ( ) { } public String formatElement ( MModelElement element , MNamespace namespace ) { } protected String defaultAssocEndName ( MAssociationEnd assocEnd , MNamespace namespace ) { } protected String defaultAssocName ( MAssociation assoc , MNamespace ns ) { } protected String defaultGeneralizationName ( MGeneralization gen , MNamespace ns ) { } protected String defaultName ( MModelElement element , MNamespace namespace ) { } protected String getPathSeparator ( ) { } private void buildPath ( StringBuffer buffer , MModelElement element , String pathSep ) { } protected String getElementSeparator ( ) { } protected String getEmptyCollection ( ) { } public String formatCollection ( Iterator iter , MNamespace namespace ) { } public MModel getProfileModel ( ) { } public static MModel loadProfileModel ( ) { String defaultModelFileName = System . getProperty ( "argo.defaultModel" ) ; InputStream is = null ; if ( defaultModelFileName != null ) { try { is = new FileInputStream ( defaultModelFileName ) ; } catch ( FileNotFoundException ex ) { is = new Object ( ) . getClass ( ) . getResourceAsStream ( defaultModelFileName ) ; if ( is == null ) { ProfileJava . cat . error ( ( ( "Value<seq2seq4repair_space>of<seq2seq4repair_space>property<seq2seq4repair_space>argo.defaultModel<seq2seq4repair_space>(" + defaultModelFileName ) + ")<seq2seq4repair_space>did<seq2seq4repair_space>not<seq2seq4repair_space>correspond<seq2seq4repair_space>to<seq2seq4repair_space>an<seq2seq4repair_space>available<seq2seq4repair_space>file.\n" ) ) ; } } } if ( is == null ) { defaultModelFileName = "//org//argouml//default.xmi" ; is = new Object ( ) . getClass ( ) . getResourceAsStream ( defaultModelFileName ) ; if ( is == null ) { try { is = new FileInputStream ( defaultModelFileName . substring ( 1 ) ) ; } catch ( FileNotFoundException ex ) { ProfileJava . cat . error ( ( ( "Default<seq2seq4repair_space>model<seq2seq4repair_space>(" + defaultModelFileName ) + ")<seq2seq4repair_space>not<seq2seq4repair_space>found.\n" ) , ex ) ; } } } if ( is != null ) { try { XMIReader xmiReader = new XMIReader ( ) ; <START_BUG> MModel model = xmiReader . parse ( new InputSource ( is ) ) ; <END_BUG> if ( xmiReader . getErrors ( ) ) { throw new IOException ( ( ( "XMI<seq2seq4repair_space>file<seq2seq4repair_space>" + defaultModelFileName ) + "<seq2seq4repair_space>could<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>parsed." ) ) ; } return model ; } catch ( Exception ex ) { ProfileJava . cat . error ( ( ( "Error<seq2seq4repair_space>reading<seq2seq4repair_space>" + defaultModelFileName ) + "\n" ) , ex ) ; } } return null ; } }

Fix:
MModel model = xmiReader . parseToModel ( new InputSource ( is ) ) ;
Buggy code:
public class HelloWorld { public static void main ( String [ ] args ) { <START_BUG> if ( ( args . length ) == 1 ) { <END_BUG> System . out . printf ( "Hello<seq2seq4repair_space>there!\n" ) ; } else { System . out . printf ( "Hello<seq2seq4repair_space>there,<seq2seq4repair_space>%s!\n" , args [ ( ( args . length ) - 1 ) ] ) ; } } }

Fix:
if ( ( args . length ) == 0 ) {
Buggy code:
public class FineSessionFactory < L > implements SessionFactory < FineSessionCacheEntry < L > , L > { private final Cache < String , FineSessionCacheEntry < L > > sessionCache ; private final Cache < SessionAttributeCacheKey , MarshalledValue < Object , MarshallingContext > > attributeCache ; private final CacheInvoker invoker ; private final SessionContext context ; private final SessionAttributeMarshaller < Object , MarshalledValue < Object , MarshallingContext > > marshaller ; private final LocalContextFactory < L > localContextFactory ; public FineSessionFactory ( Cache < String , FineSessionCacheEntry < L > > sessionCache , Cache < SessionAttributeCacheKey , MarshalledValue < Object , MarshallingContext > > attributeCache , CacheInvoker invoker , SessionContext context , SessionAttributeMarshaller < Object , MarshalledValue < Object , MarshallingContext > > marshaller , LocalContextFactory < L > localContextFactory ) { } @ Override public Session < L > createSession ( String id , FineSessionCacheEntry < L > entry ) { } @ Override public ImmutableSession createImmutableSession ( String id , FineSessionCacheEntry < L > entry ) { } @ Override public FineSessionCacheEntry < L > findValue ( String id ) { <START_BUG> return this . invoker . invoke ( this . sessionCache , new LockingFindOperation < String , FineSessionCacheEntry < L > > ( id ) ) ; <END_BUG> } @ Override public FineSessionCacheEntry < L > createValue ( String id ) { } @ Override public void remove ( final String id ) { } @ Override public void evict ( final String id ) { } }

Fix:
return this . invoker . invoke ( this . sessionCache , new FindOperation < String , FineSessionCacheEntry < L > > ( id ) ) ;
Buggy code:
public class ReservationUtilsTest { private IRootResource resource1 ; private IRootResource resource2 ; @ Before public void prepareTest ( ) throws IllegalAccessException , InstantiationException , URISyntaxException { resource1 = new org . mqnaas . core . impl . RootResource ( RootResourceDescriptor . create ( new org . mqnaas . core . api . Specification ( Type . TSON ) , Arrays . asList ( new Endpoint ( new URI ( "http:////localhost:8182" ) ) ) ) ) ; <START_BUG> resource1 = new org . mqnaas . core . impl . RootResource ( RootResourceDescriptor . create ( new org . mqnaas . core . api . Specification ( Type . TSON ) , Arrays . asList ( new Endpoint ( new URI ( "http:////localhost:8183" ) ) ) ) ) ; <END_BUG> } @ Test public void periodsOverlapTest ( ) { } @ Test public void areResourcesAvailableTest ( ) { } }

Fix:
resource2 = new org . mqnaas . core . impl . RootResource ( RootResourceDescriptor . create ( new org . mqnaas . core . api . Specification ( Type . TSON ) , Arrays . asList ( new Endpoint ( new URI ( "http:////localhost:8183" ) ) ) ) ) ;
Buggy code:
public class FieldAccess extends Expression { private Expression expression = null ; private SimpleName fieldName = null ; FieldAccess ( AST ast ) { } public int getNodeType ( ) { } ASTNode clone ( AST target ) { } public boolean subtreeMatch ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public Expression getExpression ( ) { } public void setExpression ( Expression expression ) { if ( expression == null ) { throw new IllegalArgumentException ( ) ; } <START_BUG> replaceChild ( ( ( ASTNode ) ( this . expression ) ) , ( ( ASTNode ) ( expression ) ) , true ) ; <END_BUG> this . expression = expression ; } public SimpleName getName ( ) { } public void setName ( SimpleName fieldName ) { } int memSize ( ) { } public IVariableBinding resolveFieldBinding ( ) { } int treeSize ( ) { } }

Fix:
replaceChild ( this . expression , expression , true ) ;
Buggy code:
public class ServletStompEndpointRegistryTests { private ServletStompEndpointRegistry registry ; private SubProtocolWebSocketHandler webSocketHandler ; private MutableUserQueueSuffixResolver queueSuffixResolver ; @ Before public void setup ( ) { MessageChannel channel = Mockito . mock ( MessageChannel . class ) ; this . webSocketHandler = new SubProtocolWebSocketHandler ( channel ) ; this . queueSuffixResolver = new SimpleUserQueueSuffixResolver ( ) ; TaskScheduler taskScheduler = Mockito . mock ( TaskScheduler . class ) ; <START_BUG> this . registry = new ServletStompEndpointRegistry ( webSocketHandler , queueSuffixResolver , taskScheduler , false ) ; <END_BUG> } @ Test public void stompProtocolHandler ( ) { } @ Test public void handlerMapping ( ) { } }

Fix:
this . registry = new ServletStompEndpointRegistry ( webSocketHandler , queueSuffixResolver , taskScheduler ) ;
Buggy code:
public class TestStressIndexing extends LuceneTestCase { private abstract static class TimedThread extends Thread { volatile boolean failed ; int count ; private static int RUN_TIME_MSEC = atLeast ( 1000 ) ; private TestStressIndexing . TimedThread [ ] allThreads ; public abstract void doWork ( ) throws Throwable { } TimedThread ( TestStressIndexing . TimedThread [ ] threads ) { } @ Override public void run ( ) { } private boolean anyErrors ( ) { } } private class IndexerThread extends TestStressIndexing . TimedThread { IndexWriter writer ; int nextID ; public IndexerThread ( IndexWriter writer , TestStressIndexing . TimedThread [ ] threads ) { } @ Override public void doWork ( ) throws Exception { } } private static class SearcherThread extends TestStressIndexing . TimedThread { private Directory directory ; public SearcherThread ( Directory directory , TestStressIndexing . TimedThread [ ] threads ) { } @ Override public void doWork ( ) throws Throwable { } } public void runStressTest ( Directory directory , MergeScheduler mergeScheduler ) throws Exception { IndexWriter modifier = new IndexWriter ( directory , newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) ) ) . setOpenMode ( CREATE ) . setMaxBufferedDocs ( 10 ) . setMergeScheduler ( mergeScheduler ) ) ; modifier . commit ( ) ; TestStressIndexing . TimedThread [ ] threads = new TestStressIndexing . TimedThread [ 4 ] ; int numThread = 0 ; TestStressIndexing . IndexerThread indexerThread = new TestStressIndexing . IndexerThread ( modifier , threads ) ; threads [ ( numThread ++ ) ] = indexerThread ; indexerThread . start ( ) ; TestStressIndexing . IndexerThread indexerThread2 = new TestStressIndexing . IndexerThread ( modifier , threads ) ; threads [ ( numThread ++ ) ] = indexerThread2 ; indexerThread2 . start ( ) ; TestStressIndexing . SearcherThread searcherThread1 = new TestStressIndexing . SearcherThread ( directory , threads ) ; threads [ ( numThread ++ ) ] = searcherThread1 ; searcherThread1 . start ( ) ; TestStressIndexing . SearcherThread searcherThread2 = new TestStressIndexing . SearcherThread ( directory , threads ) ; threads [ ( numThread ++ ) ] = searcherThread2 ; searcherThread2 . start ( ) ; for ( int i = 0 ; i < numThread ; i ++ ) threads [ i ] . join ( ) ; <START_BUG> modifier . close ( ) ; <END_BUG> for ( int i = 0 ; i < numThread ; i ++ ) assertTrue ( ( ! ( threads [ i ] . failed ) ) ) ; } public void testStressIndexAndSearching ( ) throws Exception { } }

Fix:
modifier . shutdown ( ) ;
Buggy code:
public class ZipEntry extends java . util . zip . ZipEntry implements Cloneable { public static final int PLATFORM_UNIX = 3 ; public static final int PLATFORM_FAT = 0 ; private static final int SHORT_MASK = 65535 ; private static final int SHORT_SHIFT = 16 ; private int internalAttributes = 0 ; private int platform = ZipEntry . PLATFORM_FAT ; private long externalAttributes = 0 ; private LinkedHashMap extraFields = null ; private String name = null ; public ZipEntry ( String name ) { } public ZipEntry ( java . util . zip . ZipEntry entry ) throws ZipException { } public ZipEntry ( ZipEntry entry ) throws ZipException { } protected ZipEntry ( ) { } public Object clone ( ) { } public int getInternalAttributes ( ) { } public void setInternalAttributes ( int value ) { } public long getExternalAttributes ( ) { } public void setExternalAttributes ( long value ) { } public void setUnixMode ( int mode ) { } public int getUnixMode ( ) { } public int getPlatform ( ) { } protected void setPlatform ( int platform ) { } public void setExtraFields ( ZipExtraField [ ] fields ) { } public ZipExtraField [ ] getExtraFields ( ) { } public void addExtraField ( ZipExtraField ze ) { } public void removeExtraField ( ZipShort type ) { } public void setExtra ( byte [ ] extra ) throws RuntimeException { try { setExtraFields ( ExtraFieldUtils . parse ( extra ) ) ; } catch ( Exception e ) { <START_BUG> throw new RuntimeException ( e . getMessage ( ) ) ; <END_BUG> } } protected void setExtra ( ) { } public byte [ ] getLocalFileDataExtra ( ) { } public byte [ ] getCentralDirectoryExtra ( ) { } public void setComprSize ( long size ) { } public String getName ( ) { } public boolean isDirectory ( ) { } protected void setName ( String name ) { } public int hashCode ( ) { } public boolean equals ( Object o ) { } }

Fix:
throw new RuntimeException ( e . getMessage ( ) , e ) ;
Buggy code:
public class ColonizeFlightHandler extends AbstractFlightHandler { private static final Logger LOGGER = LoggerFactory . getLogger ( ColonizeFlightHandler . class ) ; private final BuildingDAO buildingDAO ; private final PlanetMechanics planetMechanics ; public ColonizeFlightHandler ( RoundService roundService , FlightDAO flightDAO , PlanetDAO planetDAO , HangarDAO hangarDAO , UUIDFactory uuidFactory , EventService eventService , BuildingDAO buildingDAO , DetectedFlightDAO detectedFlightDAO , PlanetMechanics planetMechanics , ShipMechanics shipMechanics ) { } @ Override public void handle ( Flight flight , long round ) { assert flight != null ; ColonizeFlightHandler . LOGGER . debug ( "Finishing<seq2seq4repair_space>colonizing<seq2seq4repair_space>flight" ) ; Optional < Planet > planet = getPlanetDAO ( ) . findWithLocation ( flight . getDestination ( ) ) ; if ( planet . isPresent ( ) ) { ColonizeFlightHandler . LOGGER . debug ( "Planet<seq2seq4repair_space>is<seq2seq4repair_space>already<seq2seq4repair_space>colonized,<seq2seq4repair_space>creating<seq2seq4repair_space>return<seq2seq4repair_space>flight" ) ; createReturnFlight ( flight , flight . getShips ( ) , flight . getCargo ( ) ) ; } else { ColonizeFlightHandler . LOGGER . debug ( "Player<seq2seq4repair_space>{}<seq2seq4repair_space>colonized<seq2seq4repair_space>new<seq2seq4repair_space>planet<seq2seq4repair_space>at<seq2seq4repair_space>{}" , flight . getPlayerId ( ) , flight . getDestination ( ) ) ; <START_BUG> Planet newPlanet = new Planet ( getUuidFactory ( ) . create ( ) , flight . getDestination ( ) , flight . getPlayerId ( ) , planetMechanics . getColonizedPlanetResources ( ) ) ; <END_BUG> getPlanetDAO ( ) . insert ( newPlanet ) ; for ( Map . Entry < BuildingType , Integer > building : planetMechanics . getColonizedPlanetBuildings ( ) . entrySet ( ) ) { Building entity = new Building ( getUuidFactory ( ) . create ( ) , building . getKey ( ) , building . getValue ( ) , newPlanet . getId ( ) ) ; buildingDAO . insert ( entity ) ; } Hangar hangar = getOrCreateHangar ( newPlanet . getId ( ) , flight . getPlayerId ( ) ) ; hangar = hangar . withShips ( flight . getShips ( ) . minus ( COLONY , 1 ) ) ; getHangarDAO ( ) . update ( hangar ) ; getDetectedFlightDAO ( ) . delete ( flight . getId ( ) ) ; getFlightDAO ( ) . delete ( flight ) ; getEventService ( ) . createPlanetColonizedEvent ( flight . getPlayerId ( ) , newPlanet . getId ( ) ) ; } } }

Fix:
Planet newPlanet = new Planet ( getUuidFactory ( ) . create ( ) , flight . getDestination ( ) , flight . getPlayerId ( ) , planetMechanics . getColonizedPlanetResources ( ) . plus ( flight . getCargo ( ) ) ) ;
Buggy code:
public class RecipeListAdapter extends SimpleCursorAdapter { private Context context ; private int layout ; private LayoutInflater layoutInflater ; private class ViewHolder { TextView id ; TextView name ; TextView rating ; TextView cooktime ; ImageView imageView ; ViewHolder ( View v ) { } } public RecipeListAdapter ( Context context , int layout , Cursor c , String [ ] from , int [ ] to , int flags ) { } @ Override public View newView ( Context ctx , Cursor cursor , ViewGroup parent ) { } @ Override public void bindView ( View v , Context ctx , Cursor c ) { int iCol_ID = c . getColumnIndex ( KEY_ID ) ; int iCol_Name = c . getColumnIndex ( KEY_NAME ) ; int iCol_Rating = c . getColumnIndex ( KEY_RATING ) ; int iCol_Time = c . getColumnIndex ( KEY_COOKTIME ) ; int iCol_Image = c . getColumnIndex ( KEY_IMGEREF ) ; String sID = c . getString ( iCol_ID ) ; String sName = c . getString ( iCol_Name ) ; <START_BUG> String sRating = ( c . getString ( iCol_Rating ) ) + "//5" ; <END_BUG> String sTime = ( c . getString ( iCol_Time ) ) + "<seq2seq4repair_space>minutes" ; String sImage = c . getString ( iCol_Image ) ; RecipeListAdapter . ViewHolder vh = ( ( RecipeListAdapter . ViewHolder ) ( v . getTag ( ) ) ) ; vh . id . setText ( sID ) ; vh . name . setText ( sName ) ; vh . rating . setText ( sRating ) ; vh . cooktime . setText ( sTime ) ; if ( sImage . equals ( "@drawable//placeholder_image" ) ) { int imageResource = context . getResources ( ) . getIdentifier ( sImage , null , context . getPackageName ( ) ) ; Drawable res = context . getResources ( ) . getDrawable ( imageResource ) ; vh . imageView . setImageDrawable ( res ) ; } else { Bitmap thumbnail = BitmapFactory . decodeFile ( sImage ) ; Log . w ( "image<seq2seq4repair_space>path<seq2seq4repair_space>from<seq2seq4repair_space>gallery" , ( sImage + "" ) ) ; vh . imageView . setImageBitmap ( thumbnail ) ; } } }

Fix:
String sRating = ( c . getString ( iCol_Rating ) ) + "//5<seq2seq4repair_space>stars" ;
Buggy code:
public class CompilerMessagesCellRenderer extends JLabel implements ListCellRenderer { public Component getListCellRendererComponent ( JList list , Object value , int index , boolean isSelected , boolean cellHasFocus ) { String label = "<no<seq2seq4repair_space>message>" ; String detail = null ; IMessage . Kind kind = IMessage . ERROR ; if ( value instanceof IMessage ) { IMessage cm = ( ( IMessage ) ( value ) ) ; label = cm . getMessage ( ) ; if ( LangUtil . isEmpty ( label ) ) { label = cm . getMessage ( ) . toString ( ) ; } kind = cm . getKind ( ) ; Throwable thrown = cm . getThrown ( ) ; if ( null != thrown ) { detail = LangUtil . renderException ( thrown ) ; } } else if ( null != value ) { label = value . toString ( ) ; } setText ( label ) ; if ( kind . equals ( WARNING ) ) { setIcon ( AjdeUIManager . getDefault ( ) . getIconRegistry ( ) . getWarningIcon ( ) ) ; } else if ( IMessage . ERROR . isSameOrLessThan ( kind ) ) { setIcon ( AjdeUIManager . getDefault ( ) . getIconRegistry ( ) . getErrorIcon ( ) ) ; } else { <START_BUG> setIcon ( null ) ; <END_BUG> } if ( isSelected ) { setBackground ( list . getSelectionBackground ( ) ) ; setForeground ( list . getSelectionForeground ( ) ) ; } else { setBackground ( list . getBackground ( ) ) ; setForeground ( list . getForeground ( ) ) ; } setEnabled ( list . isEnabled ( ) ) ; setFont ( list . getFont ( ) ) ; setOpaque ( true ) ; if ( null != detail ) { setToolTipText ( detail ) ; } return this ; } }

Fix:
setIcon ( AjdeUIManager . getDefault ( ) . getIconRegistry ( ) . getInfoIcon ( ) ) ;
Buggy code:
public class PasswGen { public static String genPasswd ( int length ) { Random rand = new Random ( ) ; byte [ ] utf8RetBytes = new byte [ length ] ; for ( int i = 0 ; i < length ; i ++ ) { int random = rand . nextInt ( 126 ) ; <START_BUG> if ( ( ( random < 32 ) && ( random > 0 ) ) || ( random == 127 ) ) { <END_BUG> i -= 1 ; } else { utf8RetBytes [ i ] = ( ( byte ) ( random ) ) ; } } try { return new String ( utf8RetBytes , "UTF-8" ) ; } catch ( UnsupportedEncodingException e ) { return "UTF-8<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist" ; } } }

Fix:
if ( ( ( ( random < 32 ) && ( random > 0 ) ) || ( random == 127 ) ) || ( random == 58 ) ) {
Buggy code:
public class ServerGroupDescription { private static final String RESOURCE_NAME = ( ServerGroupDescription . class . getPackage ( ) . getName ( ) ) + ".LocalDescriptions" ; public static ModelNode getServerGroupDescription ( final Locale locale ) { } public static ModelNode getServerGroupAdd ( final Locale locale ) { } public static ModelNode getServerGroupRemove ( final Locale locale ) { } public static ModelNode getDeploymentRemoveOperation ( Locale locale ) { } public static ModelNode getSystemPropertiesDescription ( Locale locale ) { final ResourceBundle bundle = ServerGroupDescription . getResourceBundle ( locale ) ; <START_BUG> return CommonDescriptions . getSystemPropertyDescription ( locale , bundle . getString ( "server-group.system-property" ) , false ) ; <END_BUG> } private static ResourceBundle getResourceBundle ( Locale locale ) { } }

Fix:
return CommonDescriptions . getSystemPropertyDescription ( locale , bundle . getString ( "server-group.system-property" ) , true ) ;
Buggy code:
public final class Flags { private static StringValueTable flags = new StringValueTable ( ) ; public static final byte QR = 0 ; public static final byte AA = 5 ; public static final byte TC = 6 ; public static final byte RD = 7 ; public static final byte RA = 8 ; public static final byte AD = 10 ; public static final byte CD = 11 ; public static final int DO = 32768 ; private Flags ( ) { } public static String string ( int i ) { if ( ( ( i >= 1 ) && ( i <= 4 ) ) || ( ( i >= 12 ) && ( i <= 15 ) ) ) return null ; String s = Flags . flags . getString ( i ) ; <START_BUG> return s != null ? s : new Integer ( i ) . toString ( ) ; <END_BUG> } public static byte value ( String s ) { } }

Fix:
return s != null ? s : Integer . toString ( i ) ;
Buggy code:
public final class GrailsLocaleUtils { private static final Logger LOGGER = LoggerFactory . getLogger ( GrailsLocaleUtils . class ) ; public static final String RESOURCE_BUNDLE_SEPARATOR = "\\|" ; private static final String WEB_INF_DIR = "//WEB-INF//" ; public static final String MSG_RESOURCE_BUNDLE_SUFFIX = ".properties" ; private static Pattern PLUGIN_RESOURCE_PATTERN = Pattern . compile ( "^(//plugins//([a-zA-Z0-9_\\-\\.]*)//grails-app//i18n//)" ) ; public static final Set < String > LOCALE_SUFFIXES = GrailsLocaleUtils . getAvailableLocaleSuffixes ( ) ; private GrailsLocaleUtils ( ) { } public static List < String > getAvailableLocaleSuffixesForBundle ( String messageBundlePath ) { } public static List < String > getAvailableLocaleSuffixesForBundle ( String messageBundlePath , GrailsServletContextResourceReader rsReader ) { } public static List < String > getAvailableLocaleSuffixesForBundle ( String messageBundlePath , String fileSuffix , GrailsServletContextResourceReader rsReader ) { } public static List < String > getAvailableLocaleSuffixes ( String messageBundles , String fileSuffix , GrailsServletContextResourceReader rsReader ) { } private static void addSuffixIfAvailable ( String messageBundlePath , List < String > availableLocaleSuffixes , Locale locale , String fileSuffix , GrailsServletContextResourceReader rsReader ) { String localMsgResourcePath = ( GrailsLocaleUtils . toBundleName ( messageBundlePath , locale ) ) + fileSuffix ; boolean isFileSystemResourcePath = rsReader . isFileSystemPath ( localMsgResourcePath ) ; boolean resourceFound = false ; String path = localMsgResourcePath ; if ( ! isFileSystemResourcePath ) { path = ( GrailsLocaleUtils . WEB_INF_DIR ) + localMsgResourcePath ; } InputStream is = null ; try { <START_BUG> InputStream is = rsReader . getResourceAsStream ( path ) ; <END_BUG> resourceFound = is != null ; } finally { IOUtils . close ( is ) ; } if ( resourceFound ) { String suffix = localMsgResourcePath . substring ( messageBundlePath . length ( ) ) ; if ( ( suffix . length ( ) ) > 0 ) { if ( ( suffix . length ( ) ) == ( fileSuffix . length ( ) ) ) { suffix = "" ; } else { suffix = suffix . substring ( 1 , ( ( suffix . length ( ) ) - ( fileSuffix . length ( ) ) ) ) ; } } availableLocaleSuffixes . add ( suffix ) ; } } public static String toBundleName ( String bundleBaseName , Locale locale ) { } public static Set < String > getAvailableLocaleSuffixes ( ) { } public static boolean isPluginResoucePath ( String resourcePath ) { } public static String getRealResourcePath ( String path , Map < String , String > pluginMsgPathMap ) { } }

Fix:
is = rsReader . getResourceAsStream ( path ) ;
Buggy code:
public class ShowViewMenu extends ContributionItem { private IWorkbenchWindow window ; private Comparator actionComparator = new Comparator ( ) { public int compare ( Object o1 , Object o2 ) { } } ; private Action showDlgAction = new Action ( WorkbenchMessages . getString ( "ShowView.title" ) ) { public void run ( ) { } } ; private Map actions = new HashMap ( 21 ) ; private Map openedViews = new HashMap ( ) ; private boolean dirty = true ; private IMenuListener menuListener = new IMenuListener ( ) { public void menuAboutToShow ( IMenuManager manager ) { } } ; private static Collator collator ; public ShowViewMenu ( IWorkbenchWindow window ) { } public boolean isDirty ( ) { } public boolean isDynamic ( ) { } private void fillMenu ( IMenuManager innerMgr ) { innerMgr . removeAll ( ) ; IWorkbenchPage page = window . getActivePage ( ) ; if ( page == null ) return ; if ( ( page . getPerspective ( ) ) == null ) return ; List viewIds = new ArrayList ( ( ( WorkbenchPage ) ( page ) ) . getShowViewActionIds ( ) ) ; <START_BUG> IObjectActivityManager objectManager = window . getWorkbench ( ) . getActivityManager ( PL_VIEWS , false ) ; <END_BUG> if ( objectManager != null ) { viewIds . retainAll ( objectManager . getActiveObjects ( ) ) ; } viewIds = addOpenedViews ( page , viewIds ) ; List actions = new ArrayList ( viewIds . size ( ) ) ; for ( Iterator i = viewIds . iterator ( ) ; i . hasNext ( ) ; ) { String id = ( ( String ) ( i . next ( ) ) ) ; IAction action = getAction ( id ) ; if ( action != null ) { actions . add ( action ) ; } } Collections . sort ( actions , actionComparator ) ; for ( Iterator i = actions . iterator ( ) ; i . hasNext ( ) ; ) { innerMgr . add ( ( ( IAction ) ( i . next ( ) ) ) ) ; } innerMgr . add ( new Separator ( ) ) ; innerMgr . add ( showDlgAction ) ; } private List addOpenedViews ( IWorkbenchPage page , List actions ) { } private IAction getAction ( String id ) { } private void showOther ( ) { } private ArrayList getParts ( IWorkbenchPage page ) { } public void fill ( Menu menu , int index ) { } }

Fix:
IObjectActivityManager objectManager = window . getWorkbench ( ) . getObjectActivityManager ( PL_VIEWS , false ) ;
Buggy code:
public class UntersuchObjPanel extends JPanel implements ActionListener { private static final long serialVersionUID = 1L ; private Vector < UntersuchbaresObjekt > objekte ; private JList < String > list ; private DefaultListModel < String > model ; private JButton add = new JButton ( "neu" ) ; private JButton remove = new JButton ( "entfernen" ) ; private JButton modify = new JButton ( "ändern" ) ; private JPanel dialog ; private JTextField name = new JTextField ( ) ; private JTextArea description = new JTextArea ( ) ; private Ort ort ; UntersuchObjPanel ( Ort ort ) { } @ Override public void actionPerformed ( ActionEvent e ) { Object src = e . getSource ( ) ; if ( src == ( add ) ) { name . setText ( "" ) ; description . setText ( "" ) ; int result = JOptionPane . showConfirmDialog ( this , dialog , "Untersuchb.<seq2seq4repair_space>Obj." , JOptionPane . OK_CANCEL_OPTION , JOptionPane . PLAIN_MESSAGE ) ; if ( result == ( JOptionPane . OK_OPTION ) ) { UntersuchbaresObjekt obj = new UntersuchbaresObjekt ( name . getText ( ) , description . getText ( ) ) ; objekte . add ( obj ) ; model . addElement ( obj . getName ( ) ) ; ort . addUntersuchbaresObjekt ( obj ) ; } } else if ( src == ( remove ) ) { for ( int i : list . getSelectedIndices ( ) ) { model . remove ( i ) ; ort . removeUntersuchbaresObjekt ( objekte . remove ( i ) ) ; } } else if ( src == ( modify ) ) { int index = list . getSelectedIndex ( ) ; UntersuchbaresObjekt obj = objekte . get ( index ) ; name . setText ( obj . getName ( ) ) ; <START_BUG> desription . setText ( obj . getBeschreibung ( ) ) ; <END_BUG> int result = JOptionPane . showConfirmDialog ( this , dialog , "Untersuchb.<seq2seq4repair_space>Obj." , JOptionPane . OK_CANCEL_OPTION , JOptionPane . PLAIN_MESSAGE ) ; if ( result == ( JOptionPane . OK_OPTION ) ) { obj . setName ( name . getText ( ) ) ; obj . setBeschreibung ( description . getText ( ) ) ; model . remove ( index ) ; model . add ( index , name . getText ( ) ) ; } } } }

Fix:
description . setText ( obj . getBeschreibung ( ) ) ;
Buggy code:
public class FBUtilities { private static Logger logger_ = Logger . getLogger ( FBUtilities . class ) ; public static final BigInteger TWO = new BigInteger ( "2" ) ; private static volatile InetAddress localInetAddress_ ; public static String [ ] strip ( String string , String token ) { } public static double parseDoubleOrPercent ( String value ) { } public static InetAddress getLocalAddress ( ) { } public static long absoluteFromFraction ( double fractOrAbs , long total ) { if ( fractOrAbs < 0 ) throw new UnsupportedOperationException ( ( "unexpected<seq2seq4repair_space>negative<seq2seq4repair_space>value<seq2seq4repair_space>" + fractOrAbs ) ) ; <START_BUG> if ( ( 0 < fractOrAbs ) && ( fractOrAbs < 1 ) ) { <END_BUG> return Math . max ( 1 , ( ( long ) ( fractOrAbs * total ) ) ) ; } assert ( fractOrAbs >= 1 ) || ( fractOrAbs == 0 ) ; return ( ( long ) ( fractOrAbs ) ) ; } public static Pair < BigInteger , Boolean > midpoint ( BigInteger left , BigInteger right , int sigbits ) { } public static byte [ ] toByteArray ( int i ) { } public static int byteArrayToInt ( byte [ ] bytes ) { } public static int byteArrayToInt ( byte [ ] bytes , int offset ) { } public static int compareByteArrays ( byte [ ] bytes1 , byte [ ] bytes2 ) { } public static byte [ ] xor ( byte [ ] left , byte [ ] right ) { } public static BigInteger hash ( String data ) { } public static byte [ ] hash ( String type , byte [ ] ... data ) { } public static void compressToStream ( byte [ ] input , ByteArrayOutputStream bos ) throws IOException { } public static byte [ ] decompress ( byte [ ] compressedData , int off , int len ) throws IOException , DataFormatException { } public static void writeByteArray ( byte [ ] bytes , DataOutput out ) throws IOException { } public static byte [ ] hexToBytes ( String str ) { } public static String bytesToHex ( byte ... bytes ) { } public static String mapToString ( Map < ? , ? > map ) { } public static void writeNullableString ( String key , DataOutput dos ) throws IOException { } public static String readNullableString ( DataInput dis ) throws IOException { } public static void renameWithConfirm ( String tmpFilename , String filename ) throws IOException { } public static < T extends Comparable < T > > CollatingIterator getCollatingIterator ( ) { } public static void atomicSetMax ( AtomicInteger atomic , int i ) { } public static void atomicSetMax ( AtomicLong atomic , long i ) { } public static void serialize ( TSerializer serializer , TBase struct , DataOutput out ) throws IOException { } public static void deserialize ( TDeserializer deserializer , TBase struct , DataInput in ) throws IOException { } public static void sortSampledKeys ( List < DecoratedKey > keys , Range range ) { } public static boolean equals ( Object a , Object b ) { } public static int encodedUTF8Length ( String st ) { } public static byte [ ] toByteArray ( long n ) { } }

Fix:
if ( ( 0 < fractOrAbs ) && ( fractOrAbs <= 1 ) ) {
Buggy code:
public class Module extends BaseModule implements Persistent { private static final NumberKey ROOT_ID = new NumberKey ( "0" ) ; public Issue getNewIssue ( ScarabUser user ) throws Exception { } public Attribute [ ] getAttributes ( Criteria criteria ) throws Exception { } public Attribute [ ] getAllAttributes ( ) throws Exception { } public void save ( ) throws Exception { if ( isNew ( ) ) { RModuleUser relation = new RModuleUser ( ) ; if ( ( getOwnerId ( ) ) == null ) { throw new ScarabException ( ( "Can't<seq2seq4repair_space>save<seq2seq4repair_space>a<seq2seq4repair_space>project<seq2seq4repair_space>without" + "first<seq2seq4repair_space>assigning<seq2seq4repair_space>an<seq2seq4repair_space>owner." ) ) ; } relation . setUserId ( getOwnerId ( ) ) ; relation . setDeleted ( false ) ; <START_BUG> addRModuleUsers ( relation ) ; <END_BUG> String code = getCode ( ) ; if ( ( code == null ) || ( ( code . length ( ) ) == 0 ) ) { if ( getParentId ( ) . equals ( Module . ROOT_ID ) ) { throw new ScarabException ( ( "A<seq2seq4repair_space>top<seq2seq4repair_space>level<seq2seq4repair_space>module<seq2seq4repair_space>addition<seq2seq4repair_space>was" + "<seq2seq4repair_space>attempted<seq2seq4repair_space>without<seq2seq4repair_space>assigning<seq2seq4repair_space>a<seq2seq4repair_space>Code" ) ) ; } setCode ( getModuleRelatedByParentId ( ) . getCode ( ) ) ; Criteria criteria = new Criteria ( ModulePeer . getTableMap ( ) . getDatabaseMap ( ) . getName ( ) , 5 ) . add ( TABLE_NAME , getCode ( ) ) . add ( NEXT_ID , 1 ) . add ( QUANTITY , 1 ) ; BasePeer . doInsert ( criteria ) ; } } super . save ( ) ; } public Module doPopulate ( RunData data ) throws Exception { } public Module doPopulate ( RunData data , boolean validate ) throws Exception { } }

Fix:
addRModuleUser ( relation ) ;
Buggy code:
public interface VesselSchedulesDao { <START_BUG> public void addVesselSchedule ( VesselSchedules vesselSchedules ) ; <END_BUG> public void deleteVesselSchedule ( VesselSchedules vesselSchedules ) { } public void updateVesselSchedule ( VesselSchedules vesselSchedules ) { } public List < VesselSchedules > findAllVesselSchedules ( ) { } public VesselSchedules findVesselScheduleById ( Integer vesselScheduleId ) { } public VesselSchedules findVesselScheduleByIdVoyageNumber ( String voyageNumber ) { } public List < VesselSchedules > findVesselSchedulesByVendorId ( Integer vendorId ) { } public List < VesselSchedules > findVesselSchedulesByCriteria ( String column , String value ) { } public List < VesselSchedules > findVesselScheduleByVoyageNumber ( String voyageNumber ) { } public List < VesselSchedules > findVesselScheduleByVoyageNumberAndId ( String voyageNumber , Integer vesselScheduleId ) { } }

Fix:
public Integer addVesselSchedule ( VesselSchedules vesselSchedules ) ;
Buggy code:
public class InvocableHandlerMethod extends HandlerMethod { private HandlerMethodArgumentResolverComposite argumentResolvers = new HandlerMethodArgumentResolverComposite ( ) ; private WebDataBinderFactory dataBinderFactory ; private ParameterNameDiscoverer parameterNameDiscoverer = new LocalVariableTableParameterNameDiscoverer ( ) ; public InvocableHandlerMethod ( Object bean , Method method ) { } public InvocableHandlerMethod ( Object bean , String methodName , Class < ? > ... parameterTypes ) throws NoSuchMethodException { } public void setDataBinderFactory ( WebDataBinderFactory dataBinderFactory ) { } public void setHandlerMethodArgumentResolvers ( HandlerMethodArgumentResolverComposite argumentResolvers ) { } public void setParameterNameDiscoverer ( ParameterNameDiscoverer parameterNameDiscoverer ) { } public final Object invokeForRequest ( NativeWebRequest request , ModelAndViewContainer mavContainer , Object ... providedArgs ) throws Exception { } private Object [ ] getMethodArgumentValues ( NativeWebRequest request , ModelAndViewContainer mavContainer , Object ... providedArgs ) throws Exception { } private String getArgumentResolutionErrorMessage ( String message , int index ) { } protected String getDetailedErrorMessage ( String message ) { } private Object resolveProvidedArgument ( MethodParameter parameter , Object ... providedArgs ) { <START_BUG> if ( ( providedArgs == null ) || ( parameter . hasParameterAnnotations ( ) ) ) { <END_BUG> return null ; } for ( Object providedArg : providedArgs ) { if ( parameter . getParameterType ( ) . isInstance ( providedArg ) ) { return providedArg ; } } return null ; } private Object invoke ( Object ... args ) throws Exception { } private String getInvocationErrorMessage ( String message , Object [ ] resolvedArgs ) { } }

Fix:
if ( providedArgs == null ) {
Buggy code:
public class WizardExternalProjectImportPage extends WizardPage { private FileFilter projectFilter = new FileFilter ( ) { public boolean accept ( File pathName ) { } } ; private static String previouslyBrowsedDirectory = "" ; private Text projectNameField ; private Text locationPathField ; private Label locationLabel ; private Button browseButton ; private IProjectDescription description ; private Listener locationModifyListener = new Listener ( ) { public void handleEvent ( Event e ) { } } ; private static final int SIZING_TEXT_FIELD_WIDTH = 250 ; private static final int SIZING_INDENTATION_WIDTH = 10 ; public WizardExternalProjectImportPage ( ) { } public void createControl ( Composite parent ) { } private Listener nameModifyListener = new Listener ( ) { public void handleEvent ( Event e ) { } } ; private final void createProjectLocationGroup ( Composite parent ) { } private final void createProjectNameGroup ( Composite parent ) { } private void createUserSpecifiedProjectLocationGroup ( Composite projectGroup ) { } public IPath getLocationPath ( ) { } public IProject getProjectHandle ( ) { } public String getProjectName ( ) { } private String getProjectNameFieldValue ( ) { } private String getProjectLocationFieldValue ( ) { } private void handleLocationBrowseButtonPressed ( ) { } private boolean validatePage ( ) { } private IWorkspace getWorkspace ( ) { } private boolean checkDefaultProjectValue ( String locationFieldContents ) { } private boolean isPrefixOfRoot ( IPath locationPath ) { } private void setProjectName ( File projectFile ) { <START_BUG> if ( ( projectFile == null ) || ( ( projectNameField . getText ( ) . length ( ) ) > 0 ) ) <END_BUG> return ; IPath path = new Path ( projectFile . getPath ( ) ) ; IProjectDescription newDescription = null ; try { newDescription = getWorkspace ( ) . loadProjectDescription ( path ) ; } catch ( CoreException exception ) { } if ( newDescription == null ) { this . description = null ; this . projectNameField . setText ( "" ) ; } else { this . description = newDescription ; this . projectNameField . setText ( this . description . getName ( ) ) ; } } private File projectFile ( String locationFieldContents ) { } IProject createExistingProject ( ) { } public void setVisible ( boolean visible ) { } }

Fix:
if ( projectFile == null )
Buggy code:
public class CheckForNewMessagesCommand extends Command { IMAPFolder imapFolder ; private Action action ; public CheckForNewMessagesCommand ( Action action , ICommandReference reference ) { } public void execute ( IWorkerStatusController worker ) throws Exception { IMailFolderCommandReference r = ( ( IMailFolderCommandReference ) ( getReference ( ) ) ) ; imapFolder = ( ( IMAPFolder ) ( r . getSourceFolder ( ) ) ) ; ( ( StatusObservableImpl ) ( imapFolder . getObservable ( ) ) ) . setWorker ( worker ) ; int total = imapFolder . getMessageFolderInfo ( ) . getExists ( ) ; try { <START_BUG> imapFolder . ensureFolderIsSynced ( ) ; <END_BUG> } catch ( IOException e ) { worker . cancel ( ) ; throw new CommandCancelledException ( e ) ; } int newTotal = imapFolder . getMessageFolderInfo ( ) . getExists ( ) ; if ( newTotal != total ) { if ( ( ( org . columba . mail . folder . imap . IMAPRootFolder ) ( imapFolder . getRootFolder ( ) ) ) . getAccountItem ( ) . getImapItem ( ) . getBoolean ( "enable_sound" ) ) { Toolkit kit = Toolkit . getDefaultToolkit ( ) ; kit . beep ( ) ; } } } public void updateGUI ( ) throws Exception { } }

Fix:
imapFolder . ensureFolderIsSynced ( false ) ;
Buggy code:
public abstract class PluginSkeleton implements Plugin { protected String name = "" ; protected LoggerRepository repository ; protected boolean active ; private PropertyChangeSupport propertySupport = new PropertyChangeSupport ( this ) ; public String getName ( ) { } public void setName ( String name ) { } public LoggerRepository getLoggerRepository ( ) { } public void setLoggerRepository ( LoggerRepository repository ) { } public synchronized boolean isActive ( ) { } public boolean isEquivalent ( Plugin testPlugin ) { <START_BUG> return ( ( repository ) == ( testPlugin . getLoggerRepository ( ) ) ) && ( ( ( ( this . name ) == null ) && ( ( testPlugin . getName ( ) ) == null ) ) || ( ( ( this . name ) != null ) && ( name . equals ( testPlugin . getName ( ) ) ) ) ) ; <END_BUG> } public final void addPropertyChangeListener ( PropertyChangeListener listener ) { } public final void addPropertyChangeListener ( String propertyName , PropertyChangeListener listener ) { } public final void removePropertyChangeListener ( PropertyChangeListener listener ) { } public final void removePropertyChangeListener ( String propertyName , PropertyChangeListener listener ) { } protected final void firePropertyChange ( PropertyChangeEvent evt ) { } protected final void firePropertyChange ( String propertyName , boolean oldValue , boolean newValue ) { } protected final void firePropertyChange ( String propertyName , int oldValue , int newValue ) { } protected final void firePropertyChange ( String propertyName , Object oldValue , Object newValue ) { } }

Fix:
return ( ( ( repository ) == ( testPlugin . getLoggerRepository ( ) ) ) && ( ( ( ( this . name ) == null ) && ( ( testPlugin . getName ( ) ) == null ) ) || ( ( ( this . name ) != null ) && ( name . equals ( testPlugin . getName ( ) ) ) ) ) ) && ( this . getClass ( ) . equals ( testPlugin . getClass ( ) ) ) ;
Buggy code:
public class ResolvedBinaryType extends BinaryType { private String uniqueKey ; public ResolvedBinaryType ( JavaElement parent , String name , String uniqueKey ) { } public String getFullyQualifiedParameterizedName ( ) throws JavaModelException { <START_BUG> return getFullyQualifiedParameterizedName ( getFullyQualifiedName ( ) , this . uniqueKey ) ; <END_BUG> } public String getKey ( ) { } public boolean isResolved ( ) { } protected void toStringInfo ( int tab , StringBuffer buffer , Object info , boolean showResolvedInfo ) { } public JavaElement unresolved ( ) { } }

Fix:
return getFullyQualifiedParameterizedName ( getFullyQualifiedName ( '.' ) , this . uniqueKey ) ;
Buggy code:
public class Players implements IRepository { public boolean playerExists ( String player ) { } public String getPlayerIP ( String player ) { } public boolean getPlayerTPS ( String player ) { } public String [ ] getAltPlayer ( String uuid , String ip , boolean ignoreSelf ) { } public void insertPlayer ( GSPlayer player , String ip ) { } public void insertPlayerConvert ( String player , String uuid , Timestamp lastonline , String ip , boolean tps ) { } public void updatePlayer ( GSPlayer gsPlayer ) { } public GSPlayer loadPlayer ( String player ) { } public List < String > matchPlayers ( String player ) { } @ Override public String [ ] getTable ( ) { <START_BUG> return new String [ ] { main . Table_Players , "playername<seq2seq4repair_space>VARCHAR(100),<seq2seq4repair_space>" + ( ( ( ( ( ( "uuid<seq2seq4repair_space>VARCHAR(100)<seq2seq4repair_space>NULL," + "firstonline<seq2seq4repair_space>DATETIME<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL,<seq2seq4repair_space>" ) + "lastonline<seq2seq4repair_space>DATETIME<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL,<seq2seq4repair_space>" ) + "ipaddress<seq2seq4repair_space>VARCHAR(100),<seq2seq4repair_space>" ) + "tps<seq2seq4repair_space>TINYINT(1)<seq2seq4repair_space>DEFAULT<seq2seq4repair_space>1," ) + "newspawn<seq2seq4repair_space>TINYINT(1)<seq2seq4repair_space>DEFAULT<seq2seq4repair_space>0," ) + "CONSTRAINT<seq2seq4repair_space>pk_uuid<seq2seq4repair_space>PRIMARY<seq2seq4repair_space>KEY<seq2seq4repair_space>(uuid)" ) } ; <END_BUG> } @ Override public void registerPreparedStatements ( ConnectionHandler connection ) { } @ Override public void checkUpdate ( ) { } }

Fix:
return new String [ ] { main . Table_Players , "playername<seq2seq4repair_space>VARCHAR(100),<seq2seq4repair_space>" + ( ( ( ( ( ( "uuid<seq2seq4repair_space>VARCHAR(100)<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL," + "firstonline<seq2seq4repair_space>DATETIME<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL,<seq2seq4repair_space>" ) + "lastonline<seq2seq4repair_space>DATETIME<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL,<seq2seq4repair_space>" ) + "ipaddress<seq2seq4repair_space>VARCHAR(100),<seq2seq4repair_space>" ) + "tps<seq2seq4repair_space>TINYINT(1)<seq2seq4repair_space>DEFAULT<seq2seq4repair_space>1," ) + "newspawn<seq2seq4repair_space>TINYINT(1)<seq2seq4repair_space>DEFAULT<seq2seq4repair_space>0," ) + "CONSTRAINT<seq2seq4repair_space>pk_uuid<seq2seq4repair_space>PRIMARY<seq2seq4repair_space>KEY<seq2seq4repair_space>(uuid)" ) } ;
Buggy code:
public class StreamPumper implements Runnable { private static final int SIZE = 128 ; private InputStream is ; private OutputStream os ; private boolean finished ; private boolean closeWhenExhausted ; public StreamPumper ( InputStream is , OutputStream os , boolean closeWhenExhausted ) { } public StreamPumper ( InputStream is , OutputStream os ) { } public void run ( ) { synchronized ( this ) { finished = false ; } final byte [ ] buf = new byte [ StreamPumper . SIZE ] ; int length ; try { while ( ( length = is . read ( buf ) ) > 0 ) { os . write ( buf , 0 , length ) ; } if ( closeWhenExhausted ) { os . close ( ) ; } <START_BUG> } catch ( IOException e ) { <END_BUG> } finally { synchronized ( this ) { finished = true ; notify ( ) ; } } } public synchronized boolean isFinished ( ) { } public synchronized void waitFor ( ) throws InterruptedException { } }

Fix:
} catch ( Exception e ) {