nus-yam/ex-repair huggingface dataset:
Buggy code:
public class InvCatalogImpl extends InvCatalog { private String createFrom ; private List < DataRootConfig > roots = new ArrayList < DataRootConfig > ( ) ; private StringBuilder log = new StringBuilder ( ) ; private boolean hasError = false ; private boolean isStatic = false ; public void subset ( InvDataset ds ) { } void findServices ( List < InvService > result , InvDataset ds ) { } public void filter ( DatasetFilter filter ) { } private DatasetFilter filter = null ; protected DatasetFilter getDatasetFilter ( ) { } private boolean mark ( DatasetFilter filter , InvDatasetImpl ds ) { } private boolean debugFilter = false ; private void delete ( InvDatasetImpl ds ) { } public InvCatalogImpl ( String name , String version , URI baseURI ) { } public InvCatalogImpl ( String name , String version , DateType expires , URI baseURI ) { } public boolean finish ( ) { } private void addDatasetIds ( InvDatasetImpl ds ) { } public void addDatasetByID ( InvDatasetImpl ds ) { <START_BUG> if ( ds . getID ( ) . startsWith ( "null" ) ) <END_BUG> System . out . printf ( "HEY<seq2seq4repair_space>addDatasetByID<seq2seq4repair_space>%s%n" , ds . getID ( ) ) ; if ( ( ds . getID ( ) ) != null ) dsHash . put ( ds . getID ( ) , ds ) ; } public void removeDatasetByID ( InvDatasetImpl ds ) { } public void addDataset ( InvDatasetImpl ds ) { } public boolean removeDataset ( InvDatasetImpl ds ) { } public boolean replaceDataset ( InvDatasetImpl remove , InvDatasetImpl add ) { } public void addProperty ( InvProperty p ) { } public void addService ( InvService s ) { } public void setDataset ( InvDatasetImpl ds ) { } public String getCreateFrom ( ) { } public void setCreateFrom ( String createFrom ) { } public void setBaseURI ( URI baseURI ) { } public URI getBaseURI ( ) { } public void setExpires ( DateType expiresDate ) { } public boolean hasFatalError ( ) { } public void appendErrorMessage ( String message , boolean isInvalid ) { } public boolean check ( StringBuilder out , boolean show ) { } public String getLog ( ) { } public String dump ( ) { } InvCatalogImpl getTopCatalog ( ) { } void setTopCatalog ( InvCatalogImpl top ) { } private InvCatalogImpl top = null ; public void writeXML ( OutputStream os ) throws IOException { } public void writeXML ( OutputStream os , boolean raw ) throws IOException { } public List < DataRootConfig > getDatasetRoots ( ) { } public void addDatasetRoot ( DataRootConfig root ) { } public boolean equals ( Object o ) { } public int hashCode ( ) { } private volatile int hashCode = 0 ; public boolean isStatic ( ) { } public void setStatic ( boolean aStatic ) { } No newline ; at end ; of file ; }

Fix:
if ( ( ( ds . getID ( ) ) != null ) && ( ds . getID ( ) . startsWith ( "null" ) ) )
Buggy code:
public class Slice implements Comparable < Slice > , Iterable < TableRecordBytes > { TableRecordInfoDigest info ; int nColumns ; short shard ; long timestamp ; int nRecords ; ColumnValueContainer [ ] containers ; Slice ( TableRecordInfoDigest info , short shard , long timestamp , ColumnValueContainer [ ] containers ) { } public short getShard ( ) { } public long getTimestamp ( ) { } public Iterator < TableRecord > readableIterator ( ) { } @ Override public Iterator < TableRecordBytes > iterator ( ) { return new Iterator < TableRecordBytes > ( ) { int i = 0 ; <START_BUG> TableRecord rec = new TableRecord ( info ) ; <END_BUG> ImmutableBytesWritable temp = new ImmutableBytesWritable ( ) ; @ Override public boolean hasNext ( ) { return ( i ) < ( nRecords ) ; } @ Override public TableRecordBytes next ( ) { for ( int col = 0 ; col < ( nColumns ) ; col ++ ) { containers [ col ] . getValueAt ( i , temp ) ; rec . setValueBytes ( col , temp ) ; } ( i ) ++ ; return rec ; } @ Override public void remove ( ) { throw new UnsupportedOperationException ( ) ; } } ; } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } @ Override public int compareTo ( Slice o ) { } }

Fix:
TableRecordBytes rec = info . createTableRecord ( ) ;
Buggy code:
public class RTFTransfer extends ByteArrayTransfer { private static RTFTransfer _instance = new RTFTransfer ( ) ; private static final String CF_RTF = "Rich<seq2seq4repair_space>Text<seq2seq4repair_space>Format" ; private static final int CF_RTFID = registerType ( RTFTransfer . CF_RTF ) ; private RTFTransfer ( ) { } public static RTFTransfer getInstance ( ) { } public void javaToNative ( Object object , TransferData transferData ) { } public Object nativeToJava ( TransferData transferData ) { if ( ( ! ( isSupportedType ( transferData ) ) ) || ( ( transferData . pIDataObject ) == 0 ) ) return null ; IDataObject data = new IDataObject ( transferData . pIDataObject ) ; data . AddRef ( ) ; STGMEDIUM stgmedium = new STGMEDIUM ( ) ; FORMATETC formatetc = transferData . formatetc ; stgmedium . tymed = COM . TYMED_HGLOBAL ; <START_BUG> transferData . result = data . GetData ( formatetc , stgmedium ) ; <END_BUG> data . Release ( ) ; if ( ( transferData . result ) != ( COM . S_OK ) ) return null ; int hMem = stgmedium . unionField ; try { int lpMultiByteStr = OS . GlobalLock ( hMem ) ; if ( lpMultiByteStr == 0 ) return null ; try { int codePage = OS . GetACP ( ) ; int cchWideChar = OS . MultiByteToWideChar ( codePage , MB_PRECOMPOSED , lpMultiByteStr , ( - 1 ) , null , 0 ) ; if ( cchWideChar == 0 ) return null ; char [ ] lpWideCharStr = new char [ cchWideChar - 1 ] ; OS . MultiByteToWideChar ( codePage , MB_PRECOMPOSED , lpMultiByteStr , ( - 1 ) , lpWideCharStr , lpWideCharStr . length ) ; return new String ( lpWideCharStr ) ; } finally { OS . GlobalUnlock ( hMem ) ; } } finally { OS . GlobalFree ( hMem ) ; } } protected int [ ] getTypeIds ( ) { } protected String [ ] getTypeNames ( ) { } boolean checkRTF ( Object object ) { } protected boolean validate ( Object object ) { } }

Fix:
transferData . result = getData ( data , formatetc , stgmedium ) ;
Buggy code:
public class LeaderImpl implements Leader { private Long id ; private int recordLength ; private char recordStatus ; private char typeOfRecord ; private char [ ] implDefined1 ; private char charCodingScheme ; private int indicatorCount ; private int subfieldCodeLength ; private int baseAddressOfData ; private char [ ] implDefined2 ; private char [ ] entryMap ; public LeaderImpl ( ) { } public LeaderImpl ( String ldr ) { } public void setRecordLength ( int recordLength ) { } public void setRecordStatus ( char recordStatus ) { } public void setTypeOfRecord ( char typeOfRecord ) { } public void setImplDefined1 ( char [ ] implDefined1 ) { } public void setCharCodingScheme ( char charCodingScheme ) { } public void setIndicatorCount ( int indicatorCount ) { } public void setSubfieldCodeLength ( int subfieldCodeLength ) { } public void setBaseAddressOfData ( int baseAddressOfData ) { } public void setImplDefined2 ( char [ ] implDefined2 ) { } public void setEntryMap ( char [ ] entryMap ) { } public int getRecordLength ( ) { } public char getRecordStatus ( ) { } public char getTypeOfRecord ( ) { } public char [ ] getImplDefined1 ( ) { } public char getCharCodingScheme ( ) { } public int getIndicatorCount ( ) { } public int getSubfieldCodeLength ( ) { } public int getBaseAddressOfData ( ) { } public char [ ] getImplDefined2 ( ) { } public char [ ] getEntryMap ( ) { } public void unmarshal ( String ldr ) { try { String s ; s = ldr . substring ( 0 , 5 ) ; if ( isInteger ( s ) ) setRecordLength ( Integer . parseInt ( s ) ) ; else setRecordLength ( 0 ) ; setRecordStatus ( ldr . charAt ( 5 ) ) ; setTypeOfRecord ( ldr . charAt ( 6 ) ) ; setImplDefined1 ( ldr . substring ( 7 , 9 ) . toCharArray ( ) ) ; setCharCodingScheme ( ldr . charAt ( 9 ) ) ; s = String . valueOf ( ldr . charAt ( 10 ) ) ; if ( isInteger ( s ) ) setIndicatorCount ( Integer . parseInt ( s ) ) ; else setIndicatorCount ( 2 ) ; <START_BUG> s = String . valueOf ( ldr . charAt ( 10 ) ) ; <END_BUG> if ( isInteger ( s ) ) setSubfieldCodeLength ( Integer . parseInt ( s ) ) ; else setSubfieldCodeLength ( 2 ) ; s = ldr . substring ( 12 , 17 ) ; if ( isInteger ( s ) ) setBaseAddressOfData ( Integer . parseInt ( s ) ) ; else setBaseAddressOfData ( 0 ) ; setImplDefined2 ( ldr . substring ( 17 , 20 ) . toCharArray ( ) ) ; setEntryMap ( ldr . substring ( 20 , 24 ) . toCharArray ( ) ) ; } catch ( NumberFormatException e ) { throw new RuntimeException ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>leader" , e ) ; } } public String marshal ( ) { } public String toString ( ) { } private boolean isInteger ( String value ) { } private static DecimalFormat format5 = new CustomDecimalFormat ( 5 ) ; public void setId ( Long id ) { } public Long getId ( ) { } }

Fix:
s = String . valueOf ( ldr . charAt ( 11 ) ) ;
Buggy code:
public class PlayControl extends AsyncTask < String , Void , String > { String control = "" ; public String toastMessage = "Can't<seq2seq4repair_space>reach<seq2seq4repair_space>server..." ; Context context ; Configurations configs = new Configurations ( ) ; @ Override protected String doInBackground ( String ... strings ) { try { <START_BUG> sendCommand ( ( ( ( ( ( "http:////" + ( configs . getIPAddress ( ) ) ) + ( configs . getPortNo ( ) ) ) + "//?" ) + ( this . control ) ) + "=True" ) ) ; <END_BUG> } catch ( IOException e ) { e . printStackTrace ( ) ; } return null ; } public PlayControl ( String control , Context context ) { } public void sendCommand ( String command ) throws IOException { } @ Override protected void onPostExecute ( String s ) { } }

Fix:
sendCommand ( ( ( ( ( "http:////" + ( configs . getIPAddress ( ) ) ) + "//?" ) + ( this . control ) ) + "=True" ) ) ;
Buggy code:
public abstract class dnsRecord { dnsName name ; short type ; short dclass ; int ttl ; int oLength ; dnsRecord ( dnsName _name , short _type , short _dclass , int _ttl ) { } static dnsRecord newRecord ( dnsName name , short type , short dclass , int ttl , int length , CountedDataInputStream in , dnsCompression c ) throws IOException { String s = dns . typeString ( type ) ; dnsRecord rec ; try { Class rrclass ; Constructor m ; <START_BUG> rrclass = Class . forName ( ( ( "dns" + s ) + "Record" ) ) ; <END_BUG> m = rrclass . getConstructor ( new Class [ ] { dnsName . class , Short . TYPE , Integer . TYPE , Integer . TYPE , CountedDataInputStream . class , dnsCompression . class } ) ; rec = ( ( dnsRecord ) ( m . newInstance ( new Object [ ] { name , new Short ( dclass ) , new Integer ( ttl ) , new Integer ( length ) , in , c } ) ) ) ; rec . oLength = length ; return rec ; } catch ( ClassNotFoundException e ) { rec = new dnsUNKRecord ( name , type , dclass , ttl , length , in , c ) ; rec . oLength = length ; return rec ; } catch ( InvocationTargetException e ) { System . out . println ( ( "new<seq2seq4repair_space>record:<seq2seq4repair_space>" + e ) ) ; System . out . println ( e . getTargetException ( ) ) ; return null ; } catch ( Exception e ) { System . out . println ( ( "new<seq2seq4repair_space>record:<seq2seq4repair_space>" + e ) ) ; return null ; } } public static dnsRecord newRecord ( dnsName name , short type , short dclass , int ttl , int length , byte [ ] data ) { } public static dnsRecord newRecord ( dnsName name , short type , short dclass , int ttl ) { } public static dnsRecord newRecord ( dnsName name , short type , short dclass ) { } public static dnsRecord fromWire ( CountedDataInputStream in , int section , dnsCompression c ) throws IOException { } public void toWire ( CountedDataOutputStream out , int section , dnsCompression c ) throws IOException { } public byte [ ] toWire ( int section ) throws IOException { } void toWireCanonical ( CountedDataOutputStream out , int section ) throws IOException { } StringBuffer toStringNoData ( ) { } public String toString ( ) { } public static dnsRecord fromString ( dnsName name , short type , short dclass , int ttl , MyStringTokenizer st , dnsName origin ) throws IOException { } public dnsName getName ( ) { } public short getType ( ) { } public short getDClass ( ) { } abstract byte [ ] rrToWire ( dnsCompression c ) throws IOException { } byte [ ] rrToWireCanonical ( ) throws IOException { } }

Fix:
rrclass = Class . forName ( ( ( "DNS.dns" + s ) + "Record" ) ) ;
Buggy code:
public class FileDocument extends PropertyDocument { File file ; public FileDocument ( File file ) { } public byte [ ] getByteContent ( ) throws IOException { } public char [ ] getCharContent ( ) throws IOException { <START_BUG> return Util . getFileCharContent ( file ) ; <END_BUG> } public String getName ( ) { } public String getStringContent ( ) throws IOException { } public String getType ( ) { } }

Fix:
return Util . getFileCharContent ( file , null ) ;
Buggy code:
public class ExtendedGraphBuilder extends BgGraphBuilder { protected ExtendedGraphBuilder ( Context context ) { } public Double yIOBMax = 16.0 ; public Double yIOBMin = 0.0 ; public Double yCOBMax = 80.0 ; public Double yCOBMin = 0.0 ; private final List < Stats > statsReadings = Stats . statsList ( numValues , ( ( start_time ) * ( fuzz ) ) ) ; private List < PointValue > iobValues = new ArrayList < > ( ) ; private ColumnChartData columnData ; private List < PointValue > cobValues = new ArrayList < PointValue > ( ) ; private List < PointValue > tempBasalValues = new ArrayList < PointValue > ( ) ; JSONArray iobFutureValues = new JSONArray ( ) ; JSONArray cobFutureValues = new JSONArray ( ) ; private List < PointValue > openAPSPredictValue = new ArrayList < PointValue > ( ) ; @ Override public List < Line > defaultLines ( ) { } public Line openAPSPredictLine ( ) { } public void getOpenAPSPredictValues ( ) { openAPSPredictValue . clear ( ) ; JSONObject openAPSSuggest = determine_basal . runOpenAPS ( context ) ; Date timeeNow = new Date ( ) ; Date in15mins = new Date ( ( ( timeeNow . getTime ( ) ) + ( 15 * 60000 ) ) ) ; Double snoozeBG = 0.0 ; try { <START_BUG> if ( ( ! ( openAPSSuggest . isNull ( "eventualBG" ) ) ) || ( ! ( openAPSSuggest . getString ( "eventualBG" ) . equals ( "NA" ) ) ) ) <END_BUG> snoozeBG = openAPSSuggest . getDouble ( "eventualBG" ) ; } catch ( JSONException e ) { Crashlytics . logException ( e ) ; e . printStackTrace ( ) ; } openAPSPredictValue . add ( new PointValue ( ( ( float ) ( ( in15mins . getTime ( ) ) // ( fuzz ) ) ) , ( ( float ) ( unitized ( snoozeBG . floatValue ( ) ) ) ) ) ) ; } public ColumnChartData iobcobFutureChart ( List < Stats > statArray ) { } public Axis ycobiobAxis ( ) { } public LineChartData basalvsTempBasalData ( ) { } public Axis basalVsTempBasalyAxis ( ) { } public List < Line > addBasalvsTempBasaLines ( ) { } public Line basalvsTempBasalLine ( ) { } public void addBasalvsTempBasalValues ( ) { } public LineChartData iobcobPastLineData ( ) { } public List < Line > iobcobPastdefaultLines ( ) { } public Line maxiobcobShowLine ( ) { } public Axis iobPastyAxis ( ) { } public Axis cobPastyAxis ( ) { } public Line iobValuesLine ( ) { } public Line cobValuesLine ( ) { } public void addIOBValues ( ) { } public void addCOBValues ( ) { } public double fitIOB2COBRange ( double value ) { } public void addfutureValues ( ) { } public Line cobFutureLine ( ) { } public Line iobFutureLine ( ) { } @ Override public Axis xAxis ( ) { } }

Fix:
if ( ( ! ( openAPSSuggest . isNull ( "eventualBG" ) ) ) && ( ! ( openAPSSuggest . getString ( "eventualBG" ) . equals ( "NA" ) ) ) )
Buggy code:
public final class TextUtils { public static final Charset CHARSET_UTF8 = Charset . forName ( "UTF-8" ) ; public static final Charset CHARSET_ASCII = Charset . forName ( "US-ASCII" ) ; public static final Collator COLLATOR = TextUtils . getCollator ( ) ; private static final Pattern PATTERN_REMOVE_NONPRINTABLE = Pattern . compile ( "\\p{Cntrl}" ) ; private TextUtils ( ) { } @ SuppressFBWarnings ( "DM_STRING_CTOR" ) public static String getMatch ( @ Nullable final String data , final Pattern pattern , final boolean trim , final int group , final String defaultValue , final boolean last ) { } public static String getMatch ( final String data , final Pattern pattern , final boolean trim , final String defaultValue ) { } public static String getMatch ( @ Nullable final String data , final Pattern pattern , final String defaultValue ) { } public static boolean matches ( final String data , final Pattern pattern ) { } public static String replaceWhitespace ( final String data ) { } public static boolean containsHtml ( final String str ) { } public static String removeControlCharacters ( final String input ) { } public static long checksum ( final String input ) { } private static Collator getCollator ( ) { } public static CharSequence trimSpanned ( final Spanned source ) { final int length = source . length ( ) ; int i = length ; while ( ( ( -- i ) >= 0 ) && ( Character . isWhitespace ( source . charAt ( i ) ) ) ) { } <START_BUG> if ( i < length ) { <END_BUG> return source . subSequence ( 0 , ( i + 1 ) ) ; } return source ; } }

Fix:
if ( i < ( length - 1 ) ) {
Buggy code:
public class Birthday implements IEventType { private final IRString rstring ; private String name ; private LocalDate date ; public Birthday ( String name , LocalDate date , IRString rstring ) { } @ Override public String getTitle ( ) { <START_BUG> return String . format ( rstring . getString ( birthday_title ) , name ) ; <END_BUG> } @ Override public LocalDate getDate ( ) { } }

Fix:
return String . format ( rstring . getStringFromId ( birthday_title ) , name ) ;
Buggy code:
@ Component public class CommandExecutor { private final Logger Log = LoggerFactory . getLogger ( getClass ( ) . getSimpleName ( ) ) ; private static final int NUM_SECONDS_TO_WAIT_FOR_SHUTDOWN = 5 ; @ Autowired private ExecutorService executorService ; @ Autowired private CyclerService cyclerService ; private Queue < CycleCommand > commandQueue ; public CommandExecutor ( ) { } public void addCommandToQueue ( CycleCommand newCommand ) { } public void run ( ) { } private void processStart ( String commandBody ) { } private void processNext ( ) { } private void processSave ( ) { final String imageFilename = cyclerService . saveCurrentImage ( ) ; if ( ( imageFilename == null ) || ( imageFilename . isEmpty ( ) ) ) { Log . error ( "Image<seq2seq4repair_space>NOT<seq2seq4repair_space>saved:<seq2seq4repair_space>null<seq2seq4repair_space>filename<seq2seq4repair_space>returned!" ) ; } else { <START_BUG> Log . info ( "Image<seq2seq4repair_space>saved:<seq2seq4repair_space>[{}]" , cyclerService . saveCurrentImage ( ) ) ; <END_BUG> } } private void processDeleteResourceCache ( ) { } private void processShutdown ( ) { } private Map < String , String > getPropertiesFromBody ( String body ) { } }

Fix:
Log . info ( "Image<seq2seq4repair_space>saved:<seq2seq4repair_space>[{}]" , imageFilename ) ;
Buggy code:
@ Controller @ EnableWebSocketMessageBroker @ ComponentScan ( basePackages = "springmvc.controller" ) public class WebSocketConfig extends AbstractWebSocketMessageBrokerConfigurer { @ Override public void configureMessageBroker ( MessageBrokerRegistry config ) { } @ Override public void registerStompEndpoints ( StompEndpointRegistry registry ) { <START_BUG> registry . addEndpoint ( "//chat" ) . withSockJS ( ) . setInterceptors ( new WebSocketConfig . HttpSessionIdHandshakeInterceptor ( ) ) ; <END_BUG> } private static final String SESSION_ATTR = "httpSession.user" ; static class HttpSessionIdHandshakeInterceptor implements HandshakeInterceptor { @ Override public boolean beforeHandshake ( ServerHttpRequest request , ServerHttpResponse response , WebSocketHandler wsHandler , Map < String , Object > attributes ) throws Exception { } public void afterHandshake ( ServerHttpRequest request , ServerHttpResponse response , WebSocketHandler wsHandler , Exception ex ) { } } }

Fix:
registry . addEndpoint ( "//ws" ) . withSockJS ( ) . setInterceptors ( new WebSocketConfig . HttpSessionIdHandshakeInterceptor ( ) ) ;
Buggy code:
@ SuppressWarnings ( "serial" ) public class DirichletProcessOperator extends SimpleMCMCOperator implements GibbsOperator { private static final boolean DEBUG = false ; private DirichletProcessPrior dpp ; private int realizationCount ; private int uniqueRealizationCount ; private double intensity ; private int mhSteps ; private Parameter categoriesParameter ; private CompoundParameter parameter ; private CompoundLikelihood likelihood ; public DirichletProcessOperator ( DirichletProcessPrior dpp , Parameter categoriesParameter , CompoundParameter parameter , CompoundLikelihood likelihood , int mhSteps , double weight ) { } public Parameter getParameter ( ) { } public Variable getVariable ( ) { } @ Override public double doOperation ( ) throws OperatorFailedException { } private void doOperate ( ) throws MathException { for ( int index = 0 ; index < ( realizationCount ) ; index ++ ) { int [ ] occupancy = new int [ uniqueRealizationCount ] ; for ( int i = 0 ; i < ( realizationCount ) ; i ++ ) { if ( i != index ) { int j = ( ( int ) ( categoriesParameter . getParameterValue ( i ) ) ) ; ( occupancy [ j ] ) ++ ; } } if ( DirichletProcessOperator . DEBUG ) { System . out . println ( "N[-index]:<seq2seq4repair_space>" ) ; Utils . printArray ( occupancy ) ; } double [ ] clusterProbs = new double [ uniqueRealizationCount ] ; for ( int i = 0 ; i < ( uniqueRealizationCount ) ; i ++ ) { double loglike = 0 ; double logprob = 0 ; if ( ( occupancy [ i ] ) == 0 ) { double candidate = 0.0 ; for ( int j = 0 ; j < ( mhSteps ) ; j ++ ) { candidate = dpp . baseModel . nextRandom ( ) [ 0 ] ; loglike = getPartialLoglike ( index , candidate ) ; } <START_BUG> loglike //= mhSteps ; <END_BUG> logprob = ( Math . log ( ( ( intensity ) // ( ( ( realizationCount ) - 1 ) + ( intensity ) ) ) ) ) + loglike ; } else { double value = dpp . getUniqueParameter ( i ) . getParameterValue ( 0 ) ; loglike = getPartialLoglike ( index , value ) ; logprob = ( ( Math . log ( occupancy [ i ] ) ) // ( ( ( realizationCount ) - 1 ) + ( intensity ) ) ) + loglike ; } clusterProbs [ i ] = logprob ; } double max = Utils . max ( clusterProbs ) ; for ( int i = 0 ; i < ( clusterProbs . length ) ; i ++ ) { clusterProbs [ i ] -= max ; } Utils . exponentiate ( clusterProbs ) ; if ( DirichletProcessOperator . DEBUG ) { System . out . println ( "P(z[index]<seq2seq4repair_space>|<seq2seq4repair_space>z[-index]):<seq2seq4repair_space>" ) ; Utils . printArray ( clusterProbs ) ; } int sampledCluster = MathUtils . randomChoicePDF ( clusterProbs ) ; categoriesParameter . setParameterValue ( index , sampledCluster ) ; if ( DirichletProcessOperator . DEBUG ) { System . out . println ( ( ( "sampled<seq2seq4repair_space>category:<seq2seq4repair_space>" + sampledCluster ) + "\n" ) ) ; } } } private double getPartialLoglike ( int index , double candidate ) { } @ Override public String getOperatorName ( ) { } @ Override public String getPerformanceSuggestion ( ) { } @ Override public int getStepCount ( ) { } }

Fix:
loglike -= Math . log ( mhSteps ) ;
Buggy code:
public abstract class AbstractComponent implements Component { static final Object INSTANCE_KEY = new Object ( ) ; private static final Object [ ] EMPTY_OBJECT_ARRAY = new Object [ 0 ] ; public static final InterceptorInstanceFactory INSTANCE_FACTORY = new InterceptorInstanceFactory ( ) { public Object createInstance ( final InterceptorFactoryContext context ) { } } ; private final Class < ? > componentClass ; private final List < ResourceInjection > resourceInjections ; private final List < ComponentLifecycle > postConstructMethods ; private final List < ComponentLifecycle > preDestroyMethods ; private final List < LifecycleInterceptorFactory > postConstructInterceptorsMethods ; private final List < LifecycleInterceptorFactory > preDestroyInterceptorsMethods ; private final List < ComponentInjector > componentInjectors ; private final Interceptor componentInterceptor ; private final Map < Method , InterceptorFactory > interceptorFactoryMap ; private volatile boolean gate ; protected AbstractComponent ( final AbstractComponentConfiguration configuration ) { } public ComponentInstance createInstance ( ) { } protected Object createObjectInstance ( ) { } protected abstract AbstractComponentInstance constructComponentInstance ( Object instance , List < Interceptor > preDestroyInterceptors , InterceptorFactoryContext context ) { } public Class < ? > getComponentClass ( ) { } protected List < Interceptor > applyInjections ( final Object instance ) { } protected void performPostConstructLifecycle ( final Object instance , InterceptorFactoryContext interceptorContext ) { } public void destroyInstance ( final ComponentInstance instance ) { } protected void createPreDestroyMethods ( final InterceptorFactoryContext context , List < Interceptor > interceptors ) { } protected void performPreDestroyLifecycle ( final ComponentInstance instance ) { } public List < ResourceInjection > getResourceInjections ( ) { } public ComponentInvocationHandler createClient ( final Class < ? > viewClass ) { } public NamespaceContextSelector getNamespaceContextSelector ( ) { } public void start ( ) { } public void stop ( ) { } Map < Method , InterceptorFactory > getInterceptorFactoryMap ( ) { } @ Override public Object createRemoteProxy ( final Class < ? > view , final ClassLoader targetClassLoader , final Interceptor clientInterceptor ) { } Interceptor getComponentInterceptor ( ) { } private static class DisinjectionInterceptor implements Interceptor { private final List < ComponentInjector . InjectionHandle > injections ; public DisinjectionInterceptor ( List < ComponentInjector . InjectionHandle > injections ) { } @ Override public Object processInvocation ( InterceptorContext context ) throws Exception { for ( ComponentInjector . InjectionHandle injectionHandle : injections ) { <START_BUG> injectionHandle . disinject ( ) ; <END_BUG> } return null ; } } }

Fix:
injectionHandle . uninject ( ) ;
Buggy code:
public class Bishop extends Piece { public Bishop ( String unicode , Color c , Cell pos ) { } public ArrayList < Cell > getLegalMoves ( Cell [ ] [ ] state ) { ArrayList < Cell > moves = new ArrayList < Cell > ( ) ; boolean moreMoves = true ; int l = ( pos . getLCoord ( ) ) + 1 ; int n = ( pos . getNCoord ( ) ) + 1 ; <START_BUG> while ( ( l < 8 ) && ( n < 8 ) ) { <END_BUG> moreMoves = addMove ( l , n , moves , state ) ; l ++ ; n ++ ; } moreMoves = true ; l = ( pos . getLCoord ( ) ) + 1 ; n = ( pos . getNCoord ( ) ) - 1 ; while ( ( moreMoves && ( l < 8 ) ) && ( n >= 0 ) ) { moreMoves = addMove ( l , n , moves , state ) ; l ++ ; n -- ; } moreMoves = true ; l = ( pos . getLCoord ( ) ) - 1 ; n = ( pos . getNCoord ( ) ) + 1 ; while ( ( moreMoves && ( l >= 0 ) ) && ( n < 8 ) ) { moreMoves = addMove ( l , n , moves , state ) ; l -- ; n ++ ; } moreMoves = true ; l = ( pos . getLCoord ( ) ) - 1 ; n = ( pos . getNCoord ( ) ) - 1 ; while ( ( moreMoves && ( l >= 0 ) ) && ( n >= 0 ) ) { moreMoves = addMove ( l , n , moves , state ) ; l -- ; n -- ; } return moves ; } private boolean addMove ( int l , int n , ArrayList < Cell > moves , Cell [ ] [ ] state ) { } }

Fix:
while ( ( moreMoves && ( l < 8 ) ) && ( n < 8 ) ) {
Buggy code:
public class ScriptCommandLauncher implements CommandLauncher { private String [ ] m_script ; public ScriptCommandLauncher ( final String script ) { } public ScriptCommandLauncher ( final String [ ] script ) { } public Process exec ( final ExecMetaData metaData ) throws IOException , ExecException { final String [ ] prefix = new String [ ( m_script . length ) + 1 ] ; for ( int i = 0 ; i < ( m_script . length ) ; i ++ ) { prefix [ i ] = m_script [ i ] ; } prefix [ m_script . length ] = metaData . getWorkingDirectory ( ) . getCanonicalPath ( ) ; final ExecMetaData newMetaData = ExecUtil . prepend ( metaData , prefix ) ; <START_BUG> final String [ ] env = ExecUtil . toNativeEnvironment ( metaData . getEnvironment ( ) ) ; <END_BUG> return Runtime . getRuntime ( ) . exec ( newMetaData . getCommand ( ) , env ) ; } }

Fix:
final String [ ] env = ExecUtil . getEnvironmentSpec ( metaData ) ;
Buggy code:
public class CustomFont { public static Font getFont ( ) { Font font = null ; try { font = Font . createFont ( Font . TRUETYPE_FONT , new File ( "Font//snell//Snell<seq2seq4repair_space>Roundhand<seq2seq4repair_space>Script.ttf" ) ) ; <START_BUG> font = font . deriveFont ( Font . BOLD , 22 ) ; <END_BUG> GraphicsEnvironment ge = GraphicsEnvironment . getLocalGraphicsEnvironment ( ) ; ge . registerFont ( font ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } catch ( FontFormatException e ) { e . printStackTrace ( ) ; } return font ; } No newline ; at end ; of file ; }

Fix:
font = font . deriveFont ( Font . BOLD , 20 ) ;
Buggy code:
public class SnipTool extends Tool { private enum SnipState { START , FIRST , SECOND , SELECTED ; } private SnipTool . SnipState state = SnipTool . SnipState . START ; private Rectangle rect ; private JButton deleteButton ; public SnipTool ( ) { } @ Override public void selected ( ) { } private void setDeleteVisibility ( boolean b ) { } @ Override public void onClick ( MouseEvent event , int x , int y ) { } public static void doAutoSnip ( ) { } private static boolean isEmptyImageRegion ( BufferedImage img , Rectangle rect ) { } @ Override public void drawTool ( Graphics g , int mouseX , int mouseY ) { ( ( Graphics2D ) ( g ) ) . setStroke ( new BasicStroke ( 2 ) ) ; Canvas c = MAIN_WINDOW . getCanvas ( ) ; super . drawTool ( g , mouseX , mouseY ) ; if ( ( rect ) != null ) { g . setColor ( Color . CYAN ) ; switch ( state ) { case FIRST : g . drawRect ( c . getScaledCoord ( rect . x ) , c . getScaledCoord ( rect . y ) , c . getScaledCoord ( ( ( mouseX - ( rect . x ) ) + 1 ) ) , c . getScaledCoord ( ( ( mouseY - ( rect . y ) ) + 1 ) ) ) ; break ; case SECOND : <START_BUG> g . drawRect ( c . getScaledCoord ( rect . x ) , c . getScaledCoord ( rect . y ) , c . getScaledCoord ( ( ( rect . width ) + 1 ) ) , c . getScaledCoord ( rect . height ) ) ; <END_BUG> break ; case START : break ; case SELECTED : g . setColor ( Color . RED ) ; g . drawRect ( c . getScaledCoord ( rect . x ) , c . getScaledCoord ( rect . y ) , c . getScaledCoord ( rect . width ) , c . getScaledCoord ( rect . height ) ) ; } } } }

Fix:
g . drawRect ( c . getScaledCoord ( rect . x ) , c . getScaledCoord ( rect . y ) , c . getScaledCoord ( rect . width ) , c . getScaledCoord ( rect . height ) ) ;
Buggy code:
public class DonationTrainEntry implements IHudEntry { public final ArrayList < String > strings = new ArrayList < > ( ) ; int position ; String format = "" ; int time = - 1 ; int amount = 0 ; private String timeoutMessage = "" ; private int timeout ; private String line = "" ; private boolean writeToFile = true ; public DonationTrainEntry ( ) { } @ Override public int getPosition ( ) { } @ Override public int getAmount ( ) { } @ Override public String getHeader ( ) { } @ Override public String getFormat ( ) { } @ Override public void addToList ( ArrayList < String > list ) { <START_BUG> list . add ( line ) ; <END_BUG> } @ Override public void updateConfig ( ) { } @ Override public String getFilename ( ) { } @ Override public boolean writeToFile ( ) { } public void resetTimeout ( ) { } public void tick ( ) { } }

Fix:
Helper . addWithEmptyLines ( list , line ) ;
Buggy code:
public class ReplyWithTemplateCommand extends ReplyCommand { public ReplyWithTemplateCommand ( ICommandReference reference ) { } public void execute ( WorkerStatusController worker ) throws Exception { } private String getTemplateBody ( ) throws IOException , Exception , CommandCancelledException { AbstractMessageFolder templateFolder = ( ( AbstractMessageFolder ) ( FolderTreeModel . getInstance ( ) . getFolder ( 107 ) ) ) ; IHeaderList list = templateFolder . getHeaderList ( ) ; ChooseTemplateDialog d = new ChooseTemplateDialog ( getFrameMediator ( ) . getView ( ) . getFrame ( ) , list ) ; Object uid = null ; if ( d . isResult ( ) ) { uid = d . getUid ( ) ; } else { throw new CommandCancelledException ( ) ; } MimeTree tree = templateFolder . getMimePartTree ( uid ) ; MimePart mp ; if ( model . isHtml ( ) ) { mp = tree . getFirstTextPart ( "html" ) ; } else { mp = tree . getFirstTextPart ( "text" ) ; } InputStream bodyStream = templateFolder . getMimePartBodyStream ( uid , mp . getAddress ( ) ) ; <START_BUG> String body = StreamUtils . readInString ( bodyStream ) . toString ( ) ; <END_BUG> bodyStream . close ( ) ; return body ; } }

Fix:
String body = StreamUtils . readCharacterStream ( bodyStream ) . toString ( ) ;
Buggy code:
public class NSApplication extends NSResponder { public NSApplication ( ) { } public NSApplication ( int id ) { } public NSApplication ( id id ) { } public void activateIgnoringOtherApps ( boolean flag ) { } public NSEvent currentEvent ( ) { } public void finishLaunching ( ) { } public void hide ( id sender ) { } public void hideOtherApplications ( id sender ) { } public boolean isRunning ( ) { <START_BUG> return ( OS . objc_msgSend ( this . id , sel_isRunning ) ) != 0 ; <END_BUG> } public NSWindow keyWindow ( ) { } public NSMenu mainMenu ( ) { } public NSEvent nextEventMatchingMask ( int mask , NSDate expiration , NSString mode , boolean deqFlag ) { } public void orderFrontStandardAboutPanel ( id sender ) { } public NSArray orderedWindows ( ) { } public void run ( ) { } public int runModalForWindow ( NSWindow theWindow ) { } public void sendEvent ( NSEvent theEvent ) { } public void setDelegate ( id anObject ) { } public static NSApplication sharedApplication ( ) { } public void stop ( id sender ) { } public void terminate ( id sender ) { } public void unhideAllApplications ( id sender ) { } public NSArray windows ( ) { } }

Fix:
return OS . objc_msgSend_bool ( this . id , sel_isRunning ) ;
Buggy code:
public class WorkingSetNewWizard extends Wizard { private WorkingSetTypePage workingSetTypePage ; private IWorkingSetPage workingSetEditPage ; private String editPageId ; private IWorkingSet workingSet ; public WorkingSetNewWizard ( ) { } public void addPages ( ) { } public boolean canFinish ( ) { } public IWizardPage getNextPage ( IWizardPage page ) { if ( ( ( workingSetTypePage ) != null ) && ( page == ( workingSetTypePage ) ) ) { String pageId = workingSetTypePage . getSelection ( ) ; if ( pageId != null ) { if ( ( ( workingSetEditPage ) == null ) || ( pageId != ( editPageId ) ) ) { WorkingSetRegistry registry = WorkbenchPlugin . getDefault ( ) . getWorkingSetRegistry ( ) ; workingSetEditPage = registry . getWorkingSetPage ( pageId ) ; <START_BUG> workingSetEditPage . setWizard ( this ) ; <END_BUG> editPageId = pageId ; } return workingSetEditPage ; } } return null ; } public IWorkingSet getSelection ( ) { } public boolean performFinish ( ) { } }

Fix:
addPage ( workingSetEditPage ) ;
Buggy code:
public class POP3HeaderCache extends AbstractHeaderCache { private static final Logger LOG = Logger . getLogger ( "org.columba.mail.pop3" ) ; protected POP3Server server ; public POP3HeaderCache ( POP3Server server ) { } public StatusObservable getObservable ( ) { } public void load ( ) throws Exception { } public void save ( ) throws Exception { } protected void loadHeader ( ColumbaHeader h ) throws Exception { } protected void saveHeader ( ColumbaHeader h ) throws Exception { } public void add ( ColumbaHeader header ) throws Exception { ColumbaHeader strippedHeader = new ColumbaHeader ( ) ; for ( int i = 0 ; i < ( POP3_HEADERFIELDS . length ) ; i ++ ) { strippedHeader . set ( CachedHeaderfields . POP3_HEADERFIELDS [ i ] , header . get ( CachedHeaderfields . POP3_HEADERFIELDS [ i ] ) ) ; } <START_BUG> super . add ( strippedHeader ) ; <END_BUG> } }

Fix:
headerList . add ( strippedHeader , strippedHeader . get ( "columba.pop3uid" ) ) ;
Buggy code:
public abstract class CBFragmentMvpRecyclerViewViewState < AD , D , V extends MvpLceView < D > , P extends MvpPresenter < V > , A extends CBAdapterRecyclerView < AD , List < AD > > > extends MvpLceViewStateFragment < RecyclerView , D , V , P > { protected A adapter ; protected View emptyView ; @ Override public void onViewCreated ( View view , Bundle savedInstanceState ) { super . onViewCreated ( view , savedInstanceState ) ; adapter = createAdapter ( ) ; if ( ( adapter ) == null ) { throw new IllegalStateException ( "Adapter<seq2seq4repair_space>is<seq2seq4repair_space>null.<seq2seq4repair_space>Did<seq2seq4repair_space>you<seq2seq4repair_space>forget<seq2seq4repair_space>to<seq2seq4repair_space>return<seq2seq4repair_space>an<seq2seq4repair_space>adapter<seq2seq4repair_space>in<seq2seq4repair_space>#createAdapter()?" ) ; } contentView . setAdapter ( adapter ) ; <START_BUG> emptyView = view . findViewById ( empty_view ) ; <END_BUG> if ( ( emptyView ) == null ) { throw new IllegalStateException ( "Empty<seq2seq4repair_space>View<seq2seq4repair_space>is<seq2seq4repair_space>null.<seq2seq4repair_space>Do<seq2seq4repair_space>you<seq2seq4repair_space>have<seq2seq4repair_space>a<seq2seq4repair_space>View<seq2seq4repair_space>with<seq2seq4repair_space>id<seq2seq4repair_space>=<seq2seq4repair_space>R.id.emptyView<seq2seq4repair_space>in<seq2seq4repair_space>your<seq2seq4repair_space>xml<seq2seq4repair_space>layout?" ) ; } RecyclerView . LayoutManager layoutManager = createRecyclerViewLayoutManager ( ) ; if ( layoutManager == null ) { throw new IllegalStateException ( ( "The<seq2seq4repair_space>RecyclerView.LayoutManager<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>specified.<seq2seq4repair_space>You<seq2seq4repair_space>have<seq2seq4repair_space>to<seq2seq4repair_space>provide<seq2seq4repair_space>a<seq2seq4repair_space>" + "RecyclerView.LayoutManager<seq2seq4repair_space>by<seq2seq4repair_space>#createRecyclerViewLayoutManager()" ) ) ; } else { contentView . setLayoutManager ( layoutManager ) ; } } @ Override protected int getLayoutRes ( ) { } @ Override public void showContent ( ) { } @ Override public void showLoading ( boolean isContentVisible ) { } @ Override public void showError ( Throwable e , boolean isContentVisible ) { } @ Override protected String getErrorMessage ( Throwable throwable , boolean isContentVisible ) { } protected LayoutManager createRecyclerViewLayoutManager ( ) { } protected abstract A createAdapter ( ) { } }

Fix:
emptyView = view . findViewById ( R . id . emptyView ) ;
Buggy code:
public class Decorations extends Canvas { String text ; Image image ; Image [ ] images = new Image [ 0 ] ; boolean minimized ; boolean maximized ; Menu menuBar ; Menu [ ] menus ; Control savedFocus ; Button defaultButton ; Button saveDefault ; int accelGroup ; Decorations ( ) { } public Decorations ( Composite parent , int style ) { } static int checkStyle ( int style ) { } protected void checkSubclass ( ) { } void _setImages ( Image [ ] images ) { } void addMenu ( Menu menu ) { } int compare ( ImageData data1 , ImageData data2 ) { } Control computeTabGroup ( ) { } Control computeTabRoot ( ) { } void createAccelGroup ( ) { } void createWidget ( int index ) { } void destroyAccelGroup ( ) { } void fixAccelGroup ( ) { } void fixDecorations ( Decorations newDecorations , Control control , Menu [ ] menus ) { } public Button getDefaultButton ( ) { } public Image getImage ( ) { } public Image [ ] getImages ( ) { } public boolean getMaximized ( ) { } public Menu getMenuBar ( ) { } public boolean getMinimized ( ) { } String getNameText ( ) { } public String getText ( ) { } public boolean isReparentable ( ) { } boolean isTabGroup ( ) { } boolean isTabItem ( ) { } Decorations menuShell ( ) { } void removeMenu ( Menu menu ) { } void releaseChildren ( boolean destroy ) { if ( ( menuBar ) != null ) { <START_BUG> menuBar . releaseChildren ( false ) ; <END_BUG> menuBar = null ; } super . releaseChildren ( destroy ) ; if ( ( menus ) != null ) { for ( int i = 0 ; i < ( menus . length ) ; i ++ ) { Menu menu = menus [ i ] ; if ( ( menu != null ) && ( ! ( menu . isDisposed ( ) ) ) ) { menu . dispose ( ) ; } } menus = null ; } } void releaseWidget ( ) { } boolean restoreFocus ( ) { } public void setDefaultButton ( Button button ) { } public void setImage ( Image image ) { } public void setImages ( Image [ ] images ) { } public void setMaximized ( boolean maximized ) { } public void setMenuBar ( Menu menu ) { } public void setMinimized ( boolean minimized ) { } void setSavedFocus ( Control control ) { } public void setText ( String string ) { } void sort ( Image [ ] images ) { } boolean traverseItem ( boolean next ) { } boolean traverseReturn ( ) { } }

Fix:
menuBar . release ( false ) ;
Buggy code:
public class DictParamServiceImpl implements IDictParamService , IDictParamWebService { @ Resource private DictParamDao dictParamDao ; @ Resource private MessageSource messageSource ; public Integer save ( DictParam dictParam ) { } public Integer save ( DictParamVo dictParam ) { DictParam po = BeanCopier . copy ( dictParam , DictParam . class ) ; <START_BUG> return this . save ( dictParam ) ; <END_BUG> } public void update ( DictParam dictParam ) { } public void update ( DictParamVo dictParam ) { } public void delete ( Integer id ) { } public DictParam load ( Integer id ) { } public DictParamVo find ( Integer id ) { } public DictParam load ( String dictType , String dictValue ) { } public IPageList listByPage ( PageParam pageParam ) { } public List < DictParam > listByType ( String dictType ) { } public List < DictParam > listByTypeAndFilter ( String dictType , String filter ) { } public List < DictParamVo > findByType ( String dictType ) { } public List < DictParamVo > findByType ( String dictType , Locale locale ) { } public List < DictParamVo > findByTypeAndFilter ( String dictType , String filter ) { } public int findMaxId ( String dictType ) { } public void doUpPosition ( Integer id ) { } public void doDownPosition ( Integer id ) { } No newline ; at end ; of file ; }

Fix:
return save ( po ) ;
Buggy code:
@ SuppressWarnings ( "serial" ) public class JESTServlet extends HttpServlet { public static final String INIT_PARA_UNIT = "persistence.unit" ; public static final String INIT_PARA_STANDALONE = "standalone" ; private String _unit ; private boolean _debug ; private OpenJPAEntityManagerFactory _emf ; protected static Localizer _loc = Localizer . forPackage ( JESTServlet . class ) ; @ Override public void init ( ServletConfig config ) throws ServletException { } @ Override public void doGet ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } protected void createPersistenceUnit ( ) throws ServletException { try { <START_BUG> System . err . println ( ( ( ( "Creating<seq2seq4repair_space>Standalone<seq2seq4repair_space>Persistent<seq2seq4repair_space>Unit<seq2seq4repair_space>" + ( _unit ) ) + ":" ) + ( _emf ) ) ) ; <END_BUG> _emf = OpenJPAPersistence . cast ( Persistence . createEntityManagerFactory ( _unit ) ) ; System . err . println ( ( ( ( "Created<seq2seq4repair_space>Standalone<seq2seq4repair_space>Persistent<seq2seq4repair_space>Unit<seq2seq4repair_space>" + ( _unit ) ) + ":" ) + ( _emf ) ) ) ; } catch ( Exception e ) { System . err . println ( ( "Can<seq2seq4repair_space>not<seq2seq4repair_space>creating<seq2seq4repair_space>Standalone<seq2seq4repair_space>Persistent<seq2seq4repair_space>Unit<seq2seq4repair_space>" + ( _unit ) ) ) ; e . printStackTrace ( ) ; throw new ServletException ( JESTServlet . _loc . get ( "no-persistence-unit-standalone" , _unit ) . toString ( ) , e ) ; } } protected boolean findPersistenceUnit ( ) { } protected void handleError ( JPAServletContext ctx , Throwable t ) throws IOException { } @ Override public void destroy ( ) { } private void debug ( HttpServletRequest r ) { } public void log ( String s ) { } }

Fix:
System . err . println ( ( "Creating<seq2seq4repair_space>Standalone<seq2seq4repair_space>Persistent<seq2seq4repair_space>Unit<seq2seq4repair_space>" + ( _unit ) ) ) ;
Buggy code:
public class EngineMain extends EngineAbstract { private static EngineMain i = new EngineMain ( ) ; public static EngineMain get ( ) { } private EngineMain ( ) { } @ Override public Plugin getPlugin ( ) { } private static final Collection < Material > preparableTools = new HashSet < > ( ) ; public static Collection < Material > getPreparableTools ( ) { } public static void registerPreparableTools ( Collection < Material > materials ) { } public static void registerPreparableTool ( Material material ) { } public static boolean isRegisteredAsPreparable ( Material material ) { } public static void unregisterPreparableTool ( Material material ) { } @ EventHandler ( priority = EventPriority . LOWEST ) public void setupSkill ( SkillRegisteredEvent event ) { } @ EventHandler ( priority = EventPriority . LOWEST ) public void setupAbility ( AbilityRegisteredEvent event ) { } @ EventHandler ( priority = EventPriority . LOW ) public void instantiatePlayerFields ( PlayerJoinEvent event ) { } public static void instantiatePlayerFields ( Object oid ) { String playerId = IdUtil . getId ( oid ) ; if ( playerId == null ) return ; MPlayer mplayer = dk . muj . derius . entity . mplayer . MPlayerColl . get ( ) . get ( playerId , true ) ; DeriusAPI . getAllSkills ( ) . forEach ( ( skill ) -> mplayer . instantiateSkill ( skill ) ) ; <START_BUG> if ( ( mplayer . getSpecialisationCooldownExpire ( ) ) == 0 ) { <END_BUG> mplayer . setSpecialisationChangeMillis ( System . currentTimeMillis ( ) ) ; } mplayer . setStamina ( 0.0 ) ; return ; } @ EventHandler ( priority = EventPriority . MONITOR ) public void setPreparedTool ( PlayerInteractEvent event ) { } }

Fix:
if ( ( mplayer . getSpecialisationChangeMillis ( ) ) == 0 ) {
Buggy code:
public class IssueManager extends BaseIssueManager implements CacheListener { private static final String ISSUE = "Issue" ; protected static final String GET_ISSUE_BY_ID = "getIssueById" ; public IssueManager ( ) throws TorqueException { } public static Issue getIssueById ( String id , String defaultCode ) { } public static Issue getIssueById ( String id ) { } public static Issue getIssueById ( Issue . FederatedId fid ) { } public static Issue getIssueByIdImpl ( Issue . FederatedId fid ) { } protected Persistent putInstanceImpl ( Persistent om ) throws TorqueException { Persistent oldOm = super . putInstanceImpl ( om ) ; Serializable obj = ( ( Serializable ) ( om ) ) ; <START_BUG> getMethodResult ( ) . remove ( obj , GET_MODULE_ATTRVALUES_MAP ) ; <END_BUG> getMethodResult ( ) . remove ( obj , GET_USER_ATTRIBUTEVALUES ) ; return oldOm ; } protected void registerAsListener ( ) { } public void addedObject ( Persistent om ) { } public void refreshedObject ( Persistent om ) { } public List getInterestedFields ( ) { } }

Fix:
getMethodResult ( ) . removeAll ( obj , GET_MODULE_ATTRVALUES_MAP ) ;