nus-yam/ex-repair huggingface dataset:
Buggy code:
public class BayesFeatureDriver { private static final Logger log = LoggerFactory . getLogger ( BayesFeatureDriver . class ) ; private BayesFeatureDriver ( ) { } public static void main ( String [ ] args ) throws IOException { } public static void runJob ( String input , String output , int gramSize ) throws IOException { JobClient client = new JobClient ( ) ; JobConf conf = new JobConf ( BayesFeatureDriver . class ) ; conf . setOutputKeyClass ( Text . class ) ; conf . setOutputValueClass ( DoubleWritable . class ) ; FileInputFormat . setInputPaths ( conf , new Path ( input ) ) ; Path outPath = new Path ( output ) ; FileOutputFormat . setOutputPath ( conf , outPath ) ; conf . setNumMapTasks ( 100 ) ; conf . setMapperClass ( BayesFeatureMapper . class ) ; conf . setInputFormat ( KeyValueTextInputFormat . class ) ; conf . setCombinerClass ( BayesFeatureReducer . class ) ; conf . setReducerClass ( BayesFeatureReducer . class ) ; conf . setOutputFormat ( BayesFeatureOutputFormat . class ) ; conf . set ( "io.serializations" , "org.apache.hadoop.io.serializer.JavaSerialization,org.apache.hadoop.io.serializer.WritableSerialization" ) ; <START_BUG> FileSystem dfs = FileSystem . get ( conf ) ; <END_BUG> if ( dfs . exists ( outPath ) ) dfs . delete ( outPath , true ) ; DefaultStringifier < Integer > intStringifier = new DefaultStringifier < Integer > ( conf , Integer . class ) ; String gramSizeString = intStringifier . toString ( gramSize ) ; BayesFeatureDriver . log . info ( "{}" , intStringifier . fromString ( gramSizeString ) ) ; conf . set ( "bayes.gramSize" , gramSizeString ) ; client . setConf ( conf ) ; JobClient . runJob ( conf ) ; } }

Fix:
FileSystem dfs = FileSystem . get ( outPath . toUri ( ) , conf ) ;
Buggy code:
public class ObjectActionContributorReader extends RegistryReader { private ObjectActionContributorManager manager ; protected void processObjectContribution ( IConfigurationElement element ) { } protected boolean readElement ( IConfigurationElement element ) { String tagName = element . getName ( ) ; if ( tagName . equals ( TAG_OBJECT_CONTRIBUTION ) ) { processObjectContribution ( element ) ; return true ; } <START_BUG> if ( tagName . equals ( TAG_CONTRIBUTION_TYPE ) ) { <END_BUG> return true ; } return false ; } public void readPopupContributors ( ObjectActionContributorManager mng ) { } public void setManager ( ObjectActionContributorManager mng ) { } }

Fix:
if ( tagName . equals ( TAG_VIEWER_CONTRIBUTION ) ) {
Buggy code:
public class ContactsDatabase { private Map < Long , Contact > map = Collections . synchronizedMap ( new HashMap < Long , Contact > ( ) ) ; private List < Contact > fnameIdx = Collections . synchronizedList ( new ArrayList < Contact > ( ) ) ; private List < Contact > lnameIdx = Collections . synchronizedList ( new ArrayList < Contact > ( ) ) ; private List < Contact > fnameDescIdx = Collections . synchronizedList ( new ArrayList < Contact > ( ) ) ; private List < Contact > lnameDescIdx = Collections . synchronizedList ( new ArrayList < Contact > ( ) ) ; public ContactsDatabase ( int count ) { } public Contact get ( long id ) { } protected void add ( final Contact contact ) { } public List find ( int first , int count , String sortProperty , boolean sortAsc ) { } protected List getIndex ( String prop , boolean asc ) { } public int getCount ( ) { } public void save ( final Contact contact ) { } public void delete ( final Contact contact ) { <START_BUG> Contact c = ( ( Contact ) ( map . remove ( new Long ( contact . getId ( ) ) ) ) ) ; <END_BUG> fnameIdx . remove ( contact ) ; lnameIdx . remove ( contact ) ; fnameDescIdx . remove ( contact ) ; lnameDescIdx . remove ( contact ) ; contact . setId ( 0 ) ; } private void updateIndecies ( ) { } }

Fix:
map . remove ( new Long ( contact . getId ( ) ) ) ;
Buggy code:
public class PostfixExpression extends CompoundAssignment { public PostfixExpression ( Expression l , Expression e , int op , int pos ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { int pc = codeStream . position ; lhs . generatePostIncrement ( currentScope , codeStream , this , valueRequired ) ; if ( valueRequired ) { codeStream . generateImplicitConversion ( implicitConversion ) ; } <START_BUG> codeStream . recordPositionsFrom ( pc , this ) ; <END_BUG> } public String operatorToString ( ) { } public boolean restrainUsageToNumericTypes ( ) { } public String toStringExpressionNoParenthesis ( ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope scope ) { } }

Fix:
codeStream . recordPositionsFrom ( pc , this . sourceStart ) ;
Buggy code:
public class LagDetector extends Thread { private long incr = ( LagDetector . MAX_SLEEP ) // ( LagDetector . DIV ) ; private long totalLag ; private int count ; private boolean running ; public static final long MAX_SLEEP = 500 ; private static final long DIV = 3 ; public LagDetector ( ) { } public float getAveLag ( ) { } public float getLagRatio ( ) { } public void stopRunning ( ) { } public void run ( ) { running = true ; long time ; totalLag = 0 ; count = 0 ; while ( running ) { time = System . currentTimeMillis ( ) ; try { Thread . sleep ( incr ) ; <START_BUG> } catch ( InterruptedException e ) { <END_BUG> } time = ( System . currentTimeMillis ( ) ) - time ; totalLag += time - ( incr ) ; ( count ) ++ ; } } }

Fix:
} catch ( Exception e ) {
Buggy code:
public class BTNStage extends Stage { private static final boolean DEBUG_NO_COLLIDE = false ; private BTNGame game ; private BTNGameScreen screen ; public BTNStage ( BTNGame game ) { } public BTNStage ( Viewport viewport , BTNGame game , BTNGameScreen screen ) { } @ Override public void draw ( ) { } @ Override public void act ( float delta ) { } @ Override public boolean touchDown ( int screenX , int screenY , int pointer , int button ) { } @ Override public boolean keyDown ( int keyCode ) { if ( ( keyCode == ( Keys . BACKSPACE ) ) || ( keyCode == ( Keys . BACK ) ) ) { game . setScreen ( new com . bopthenazi . views . screens . BTNMenuScreen ( game ) ) ; } <START_BUG> if ( keyCode == ( Keys . P ) ) { <END_BUG> screen . showPauseScreen ( ) ; } if ( keyCode == ( Keys . G ) ) { screen . generate ( ) ; } if ( keyCode == ( Keys . E ) ) { screen . doEndGame ( ) ; } if ( keyCode == ( Keys . R ) ) { screen . resetScore ( ) ; } if ( keyCode == ( Keys . A ) ) { screen . addLife ( ) ; } if ( keyCode == ( Keys . X ) ) { screen . setMode ( MODE_APOCALYPSE ) ; } return super . keyDown ( keyCode ) ; } }

Fix:
if ( ( keyCode == ( Keys . P ) ) || ( keyCode == ( Keys . ESCAPE ) ) ) {
Buggy code:
public class ManifestTest extends BuildFileTest { public static final String EXPANDED_MANIFEST = "src//etc//testcases//taskdefs//manifests//META-INF//MANIFEST.MF" ; public static final String LONG_LINE = "AReallyLongLineToTestLineBreakingInManifests-ACapabilityWhich" + ( ( "IsSureToLeadToHundredsOfQuestionsAboutWhyAntMungesManifests" + "OfCourseTheAnswerIsThatIsWhatTheSpecRequiresAndIfAnythingHas" ) + "AProblemWithThatItIsNotABugInAnt" ) ; public ManifestTest ( String name ) { } public void setUp ( ) { } public void tearDown ( ) { } public void test1 ( ) throws IOException , ManifestException { } public void test2 ( ) throws IOException , ManifestException { } public void test3 ( ) { } public void test4 ( ) { } public void test5 ( ) { } public void test6 ( ) { } public void test7 ( ) { } public void test8 ( ) throws IOException , ManifestException { } public void test9 ( ) { } public void test10 ( ) { } public void test11 ( ) { } public void test12 ( ) { } public void test13 ( ) { } public void test14 ( ) throws IOException , ManifestException { } public void testLongLine ( ) throws IOException , ManifestException { } public void testOrder1 ( ) throws IOException , ManifestException { } public void testOrder2 ( ) throws IOException , ManifestException { } public void testNoFile ( ) { } public void testReplace ( ) throws IOException , ManifestException { } public void testUpdate ( ) throws IOException , ManifestException { } public void testFrom ( ) { } private Manifest getManifest ( String filename ) throws IOException , ManifestException { <START_BUG> FileReader r = new FileReader ( filename ) ; <END_BUG> try { return new Manifest ( r ) ; } finally { r . close ( ) ; } } }

Fix:
FileReader r = new FileReader ( new File ( System . getProperty ( "root" ) , filename ) ) ;
Buggy code:
public class XSNamedMapImpl implements XSNamedMap { public static final XSNamedMap EMPTY_MAP = new XSNamedMap ( ) { public int getLength ( ) { } public XSObject itemByName ( String namespace , String localName ) { } public XSObject item ( int index ) { } } ; String [ ] fNamespaces ; int fNSNum ; SymbolHash [ ] fMaps ; XSObject [ ] fArray = null ; int fLength = - 1 ; QName fName = new QName ( ) ; public XSNamedMapImpl ( String namespace , SymbolHash map ) { } public XSNamedMapImpl ( String [ ] namespaces , SymbolHash [ ] maps , int num ) { } public XSNamedMapImpl ( XSObject [ ] array , int length ) { } public synchronized int getLength ( ) { } public XSObject itemByName ( String namespace , String localName ) { } public synchronized XSObject item ( int index ) { } final boolean isEqual ( String one , String two ) { <START_BUG> return ( one == two ) || ( ( one != null ) && ( one . equals ( two ) ) ) ; <END_BUG> } }

Fix:
return one != null ? one . equals ( two ) : two == null ;
Buggy code:
public class PagingResultObjectProvider extends SelectResultObjectProvider { private final ClassMapping [ ] _mappings ; private final Object [ ] _page ; private final int [ ] _idxs ; private final BitSet [ ] _paged ; private int _pos = - 1 ; private int _pagePos = - 1 ; public static BitSet getPagedFields ( Select sel , ClassMapping mapping , JDBCStore store , JDBCFetchState fetchState , int eagerMode , long size ) { JDBCFetchConfiguration fetch = fetchState . getJDBCFetchConfiguration ( ) ; if ( ( size == ( Long . MAX_VALUE ) ) || ( ! ( sel . getAutoDistinct ( ) ) ) ) { if ( ! ( sel . isLRS ( ) ) ) return null ; if ( ( fetch . getFetchBatchSize ( ) ) < 0 ) return null ; } eagerMode = Math . min ( eagerMode , fetch . getEagerFetchMode ( ) ) ; if ( eagerMode != ( fetch . EAGER_PARALLEL ) ) return null ; FieldMapping [ ] fms = mapping . getDefinedFieldMappings ( ) ; BitSet paged = null ; for ( int i = 0 ; i < ( fms . length ) ; i ++ ) { <START_BUG> if ( ( fetchState != null ) && ( ! ( fetchState . requiresSelect ( fms [ i ] , false ) ) ) ) <END_BUG> continue ; if ( ( ( fms [ i ] . supportsSelect ( sel , sel . EAGER_PARALLEL , null , store , fetch ) ) > 0 ) && ( ( fms [ i ] . isEagerSelectToMany ( ) ) || ( ( fms [ i ] . supportsSelect ( sel , sel . EAGER_OUTER , null , store , fetch ) ) == 0 ) ) ) { if ( paged == null ) paged = new BitSet ( ) ; paged . set ( fms [ i ] . getIndex ( ) ) ; } } return paged ; } public PagingResultObjectProvider ( SelectExecutor sel , ClassMapping mapping , JDBCStore store , JDBCFetchState fetchState , BitSet paged , long size ) { } public PagingResultObjectProvider ( SelectExecutor sel , ClassMapping [ ] mappings , JDBCStore store , JDBCFetchState fetchState , BitSet [ ] paged , long size ) { } public int getPageSize ( ) { } public void open ( ) throws SQLException { } public boolean next ( ) throws SQLException { } public boolean absolute ( int pos ) throws SQLException { } public Object getResultObject ( ) throws SQLException { } private boolean inPage ( ) { } private void fillPage ( ) throws SQLException { } private void loadEagerFields ( ) throws SQLException { } private void executeEagerSelects ( ) throws SQLException { } private void executeEagerSelects ( ClassMapping mapping , BitSet paged , int start , int end ) throws SQLException { } private void inContains ( Select sel , SQLBuffer buf , ClassMapping mapping , Column [ ] pks , int start , int end ) { } private void orContains ( Select sel , SQLBuffer buf , ClassMapping mapping , Column [ ] pks , int start , int end ) { } }

Fix:
if ( ( fetchState != null ) && ( ! ( fetchState . requiresFetch ( fms [ i ] ) ) ) )
Buggy code:
public class RuntimeVaultReader extends AbstractVaultReader { private static final Pattern VAULT_PATTERN = Pattern . compile ( "VAULT::.*::.*::.*" ) ; private volatile SecurityVault vault ; public RuntimeVaultReader ( ) { } protected void createVault ( final String fqn , final Map < String , Object > options ) throws VaultReaderException { } protected void destroyVault ( ) { } public String retrieveFromVault ( final String password ) throws SecurityException { } private String getValueAsString ( String vaultString ) throws SecurityVaultException { } public boolean isVaultFormat ( String str ) { } private char [ ] getValue ( String vaultString ) throws SecurityVaultException { String [ ] tokens = tokens ( vaultString ) ; <START_BUG> return vault . retrieve ( tokens [ 1 ] , tokens [ 2 ] , tokens [ 3 ] . getBytes ( ) ) ; <END_BUG> } private String [ ] tokens ( String vaultString ) { } }

Fix:
return vault . retrieve ( tokens [ 1 ] , tokens [ 2 ] , tokens [ 3 ] . getBytes ( CHARSET ) ) ;
Buggy code:
public class Model implements Iterable < Literal > { public List < Literal > literals = new ArrayList < Literal > ( ) ; public void addLiteral ( Literal literal ) { } @ Override public String toString ( ) { String out = "" ; for ( Literal s : literals ) { <START_BUG> out = ( out + "<seq2seq4repair_space>" ) + ( s . getLiteral ( ) ) ; <END_BUG> } return out ; } @ Override public Iterator < Literal > iterator ( ) { } }

Fix:
out = ( ( ( ( out + "<seq2seq4repair_space>" ) + ( s . getLiteral ( ) ) ) + "<seq2seq4repair_space>Valuated<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( s . isLiteral_positivity ( ) ) ) + "\n" ;
Buggy code:
public abstract class P4Base extends org . apache . tools . ant . Task { protected Perl5Util util = null ; protected String shell ; protected String P4Port = "" ; protected String P4Client = "" ; protected String P4User = "" ; protected String P4View = "" ; protected boolean failOnError = true ; protected String P4Opts = "" ; protected String P4CmdOpts = "" ; public void setPort ( String P4Port ) { } public void setClient ( String P4Client ) { } public void setUser ( String P4User ) { } public void setGlobalopts ( String P4Opts ) { } public void setView ( String P4View ) { } public void setCmdopts ( String P4CmdOpts ) { } public void setFailonerror ( boolean fail ) { } public void init ( ) { } protected void execP4Command ( String command ) throws BuildException { } protected void execP4Command ( String command , P4Handler handler ) throws BuildException { try { Commandline commandline = new Commandline ( ) ; commandline . setExecutable ( "p4" ) ; if ( ( ( P4Port ) != null ) && ( ( P4Port . length ( ) ) != 0 ) ) { commandline . createArgument ( ) . setValue ( P4Port ) ; } if ( ( ( P4User ) != null ) && ( ( P4User . length ( ) ) != 0 ) ) { commandline . createArgument ( ) . setValue ( P4User ) ; } if ( ( ( P4Client ) != null ) && ( ( P4Client . length ( ) ) != 0 ) ) { commandline . createArgument ( ) . setValue ( P4Client ) ; } if ( ( ( P4Opts ) != null ) && ( ( P4Opts . length ( ) ) != 0 ) ) { <START_BUG> commandline . createArgument ( ) . setValue ( P4Opts ) ; <END_BUG> } commandline . createArgument ( ) . setLine ( command ) ; log ( commandline . describeCommand ( ) , MSG_VERBOSE ) ; if ( handler == null ) { handler = new SimpleP4OutputHandler ( this ) ; } Execute exe = new Execute ( handler , null ) ; exe . setAntRun ( getProject ( ) ) ; exe . setCommandline ( commandline . getCommandline ( ) ) ; try { exe . execute ( ) ; } catch ( IOException e ) { throw new BuildException ( e ) ; } finally { try { handler . stop ( ) ; } catch ( Exception e ) { log ( e . toString ( ) , MSG_ERR ) ; } } } catch ( Exception e ) { String failMsg = "Problem<seq2seq4repair_space>exec'ing<seq2seq4repair_space>P4<seq2seq4repair_space>command:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ; if ( failOnError ) { throw new BuildException ( failMsg ) ; } else { log ( failMsg , MSG_ERR ) ; } } } }

Fix:
commandline . createArgument ( ) . setLine ( P4Opts ) ;
Buggy code:
public class RenderAsXML extends SamplerResultTab implements ResultRenderer { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static final byte [ ] XML_PFX = new byte [ ] { '<' , '?' , 'x' , 'm' , 'l' , '<seq2seq4repair_space>' } ; public RenderAsXML ( ) { } public void renderResult ( SampleResult sampleResult ) { } private void showRenderXMLResponse ( SampleResult res ) { } private static class DOMTreePanel extends JPanel { private static final long serialVersionUID = 6871690021183779153L ; private JTree domJTree ; public DOMTreePanel ( Document document ) { } private Node getFirstElement ( Node parent ) { } private static class DomTreeRenderer extends DefaultTreeCellRenderer { private static final long serialVersionUID = 240210061375790195L ; @ Override public Component getTreeCellRendererComponent ( JTree tree , Object value , boolean sel , boolean expanded , boolean leaf , int row , boolean phasFocus ) { } private String getHTML ( String str , String separator , int maxChar ) { <START_BUG> StringBuffer strBuf = new StringBuffer ( "<html><body<seq2seq4repair_space>bgcolor=\"yellow\"><b>" ) ; <END_BUG> char [ ] chars = str . toCharArray ( ) ; for ( int i = 0 ; i < ( chars . length ) ; i ++ ) { if ( ( ( i % maxChar ) == 0 ) && ( i != 0 ) ) { strBuf . append ( separator ) ; } strBuf . append ( encode ( chars [ i ] ) ) ; } strBuf . append ( "<//b><//body><//html>" ) ; return strBuf . toString ( ) ; } private String encode ( char c ) { } } } private static void showErrorMessageDialog ( String message , String title , int messageType ) { } @ Override public String toString ( ) { } }

Fix:
StringBuilder strBuf = new StringBuilder ( "<html><body<seq2seq4repair_space>bgcolor=\"yellow\"><b>" ) ;
Buggy code:
public class Sprite { private int xSplit = 1 ; private int ySplit = 1 ; private int x = 0 ; private int y = 0 ; private int w ; private int h ; public Image image ; private Vector2 bRight ; public int timeStretch = 1 ; public float sizeOffset = 0 ; public Sprite ( final Image image , final int xTiles , final int yTiles ) { } public void nextFrame ( ) { } public void setFrame ( final int frame ) { <START_BUG> y = frame % ( ySplit ) ; <END_BUG> } public void setCylcle ( final int cycle ) { } public void set ( final int x , final int y ) { } public void draw ( Graphics g , final Vector2 posO , final Vector2 dimO ) { } }

Fix:
x = frame % ( xSplit ) ;
Buggy code:
class AdviceSignatureImpl extends CodeSignatureImpl implements AdviceSignature { Class returnType ; AdviceSignatureImpl ( int modifiers , String name , Class declaringType , Class [ ] parameterTypes , String [ ] parameterNames , Class [ ] exceptionTypes , Class returnType ) { } AdviceSignatureImpl ( String stringRep ) { } public Class getReturnType ( ) { } String toString ( StringMaker sm ) { StringBuffer buf = new StringBuffer ( "ADVICE:<seq2seq4repair_space>" ) ; buf . append ( sm . makeModifiersString ( getModifiers ( ) ) ) ; if ( sm . includeArgs ) buf . append ( sm . makeTypeName ( getReturnType ( ) ) ) ; if ( sm . includeArgs ) buf . append ( "<seq2seq4repair_space>" ) ; <START_BUG> buf . append ( sm . makePrimaryTypeName ( getDeclaringType ( ) ) ) ; <END_BUG> buf . append ( "." ) ; buf . append ( getName ( ) ) ; sm . addSignature ( buf , getParameterTypes ( ) ) ; sm . addThrows ( buf , getExceptionTypes ( ) ) ; return buf . toString ( ) ; } }

Fix:
buf . append ( sm . makePrimaryTypeName ( getDeclaringType ( ) , getDeclaringTypeName ( ) ) ) ;
Buggy code:
public class MultiEditorPane extends JPanel implements MouseListener , ChangeListener { protected Object _target ; protected JTabbedPane _tabs = new JTabbedPane ( JTabbedPane . BOTTOM ) ; protected Editor _ed ; protected Vector _tabPanels = new Vector ( ) ; protected Component _lastTab ; public MultiEditorPane ( StatusBar sb ) { } public Dimension getPreferredSize ( ) { } public Dimension getMinimumSize ( ) { } public void setTarget ( Object target ) { int firstEnabled = - 1 ; boolean jumpToFirstEnabledTab = false ; int currentTab = _tabs . getSelectedIndex ( ) ; if ( ( _target ) == target ) return ; _target = target ; for ( int i = 0 ; i < ( _tabPanels . size ( ) ) ; i ++ ) { JPanel tab = ( ( JPanel ) ( _tabPanels . elementAt ( i ) ) ) ; if ( tab instanceof TabModelTarget ) { TabModelTarget tabMT = ( ( TabModelTarget ) ( tab ) ) ; tabMT . setTarget ( _target ) ; boolean shouldEnable = tabMT . shouldBeEnabled ( ) ; _tabs . setEnabledAt ( i , shouldEnable ) ; if ( shouldEnable && ( firstEnabled == ( - 1 ) ) ) firstEnabled = i ; if ( ( currentTab == i ) && ( ! shouldEnable ) ) { jumpToFirstEnabledTab = true ; } } } if ( jumpToFirstEnabledTab && ( firstEnabled != ( - 1 ) ) ) _tabs . setSelectedIndex ( firstEnabled ) ; <START_BUG> setVisible ( ( firstEnabled != ( - 1 ) ) ) ; <END_BUG> } public Object getTarget ( ) { } public int getIndexOfNamedTab ( String tabName ) { } public void selectTabNamed ( String tabName ) { } public void selectNextTab ( ) { } public void select ( Object o ) { } public void stateChanged ( ChangeEvent e ) { } public void mousePressed ( MouseEvent me ) { } public void mouseReleased ( MouseEvent me ) { } public void mouseEntered ( MouseEvent me ) { } public void mouseExited ( MouseEvent me ) { } public void mouseClicked ( MouseEvent me ) { } public void mySingleClick ( int tab ) { } public void myDoubleClick ( int tab ) { } }

Fix:
_tabs . setVisible ( ( firstEnabled != ( - 1 ) ) ) ;
Buggy code:
public class ZoneAdapter extends BaseAdapter { private Context context ; HashMap < Integer , WorkoutConstraints > workoutConstraints ; public ZoneAdapter ( Context context , HashMap < Integer , WorkoutConstraints > workoutConstraints ) { } @ Override public int getCount ( ) { } @ Override public WorkoutConstraints getItem ( int position ) { } @ Override public View getView ( int position , View convertView , ViewGroup parent ) { LayoutInflater inflater = ( ( LayoutInflater ) ( context . getSystemService ( LAYOUT_INFLATER_SERVICE ) ) ) ; View listView ; if ( convertView == null ) { listView = new View ( context ) ; listView = inflater . inflate ( layout_zone_list , parent , false ) ; TextView txtViewZoneHeader = ( ( TextView ) ( listView . findViewById ( txtViewZoneLine1 ) ) ) ; TextView txtViewZoneDetails = ( ( TextView ) ( listView . findViewById ( txtViewZoneLine2 ) ) ) ; WorkoutConstraints currentConstraint = getItem ( position ) ; <START_BUG> txtViewZoneHeader . setText ( ( "Zone<seq2seq4repair_space>" + ( currentConstraint . getZone ( ) ) ) ) ; <END_BUG> txtViewZoneDetails . setText ( ( ( ( "Power<seq2seq4repair_space>-<seq2seq4repair_space>" + ( DisplayHelper . getFTPPercentageDisplayRange ( currentConstraint . getMinPower ( ) , currentConstraint . getMaxPower ( ) ) ) ) + "<seq2seq4repair_space>HR<seq2seq4repair_space>-<seq2seq4repair_space>" ) + ( DisplayHelper . getHRPercentageDisplayRange ( currentConstraint . getMinHR ( ) , currentConstraint . getMaxHR ( ) ) ) ) ) ; } else { listView = ( ( View ) ( convertView ) ) ; } return listView ; } @ Override public long getItemId ( int position ) { } }

Fix:
txtViewZoneHeader . setText ( ( ( ( "Zone<seq2seq4repair_space>" + ( currentConstraint . getZone ( ) ) ) + "<seq2seq4repair_space>-<seq2seq4repair_space>" ) + ( currentConstraint . getDescription ( ) ) ) ) ;
Buggy code:
public class CSVParser implements Iterable < CSVRecord > { private final Lexer lexer ; private final Map < String , Integer > headerMap ; private long recordNumber ; private final CSVFormat format ; private final List < String > record = new ArrayList < String > ( ) ; private final Token reusableToken = new Token ( ) ; public CSVParser ( final Reader input ) throws IOException { } public CSVParser ( final Reader input , final CSVFormat format ) throws IOException { } public CSVParser ( final String input , final CSVFormat format ) throws IOException { } public Map < String , Integer > getHeaderMap ( ) { } public long getCurrentLineNumber ( ) { } public long getRecordNumber ( ) { } CSVRecord nextRecord ( ) throws IOException { CSVRecord result = null ; record . clear ( ) ; StringBuilder sb = null ; do { reusableToken . reset ( ) ; lexer . nextToken ( reusableToken ) ; switch ( reusableToken . type ) { case Type . TOKEN : this . addRecordValue ( ) ; break ; case EORECORD : this . addRecordValue ( ) ; break ; case EOF : if ( reusableToken . isReady ) { this . addRecordValue ( ) ; } break ; case INVALID : throw new IOException ( ( ( "(line<seq2seq4repair_space>" + ( getCurrentLineNumber ( ) ) ) + ")<seq2seq4repair_space>invalid<seq2seq4repair_space>parse<seq2seq4repair_space>sequence" ) ) ; case COMMENT : if ( sb == null ) { sb = new StringBuilder ( ) ; } else { <START_BUG> sb . append ( "\n" ) ; <END_BUG> } sb . append ( reusableToken . content ) ; reusableToken . type = Type . TOKEN ; break ; } } while ( ( reusableToken . type ) == ( Type . TOKEN ) ) ; if ( ! ( record . isEmpty ( ) ) ) { ( recordNumber ) ++ ; final String comment = ( sb == null ) ? null : sb . toString ( ) ; result = new CSVRecord ( record . toArray ( new String [ record . size ( ) ] ) , headerMap , comment , this . recordNumber ) ; } return result ; } private void addRecordValue ( ) { } public List < CSVRecord > getRecords ( ) throws IOException { } private Map < String , Integer > initializeHeader ( ) throws IOException { } public Iterator < CSVRecord > iterator ( ) { } }

Fix:
sb . append ( LF ) ;
Buggy code:
public class CFlowStack { private Hashtable stacks = new Hashtable ( ) ; private Thread cached_thread ; private Stack cached_stack ; private int change_count = 0 ; private static final int COLLECT_AT = 20000 ; private static final int MIN_COLLECT_AT = 100 ; private synchronized Stack getThreadStack ( ) { } public void push ( Object obj ) { } public void pushInstance ( Object obj ) { } public void push ( Object [ ] obj ) { } public void pop ( ) { } public Object peek ( ) { } public Object get ( int index ) { } public Object peekInstance ( ) { } public CFlow peekCFlow ( ) { } public CFlow peekTopCFlow ( ) { Stack stack = getThreadStack ( ) ; if ( stack . isEmpty ( ) ) return null ; <START_BUG> return ( ( CFlow ) ( stack . get ( 0 ) ) ) ; <END_BUG> } public boolean isValid ( ) { } }

Fix:
return ( ( CFlow ) ( stack . elementAt ( 0 ) ) ) ;
Buggy code:
public class ListStreamsFunction extends ActionBaseFunction { private static final long serialVersionUID = 3580834398296372380L ; public ListStreamsFunction ( StreamOperationService streamOperationService , String zookeeperHost ) { } @ Override protected String getStartOperationCommand ( ) { } @ Override protected String getStopOperationCommand ( ) { } @ Override protected boolean startAction ( StratioStreamingMessage message ) throws RequestValidationException { List < StratioStreamingMessage > existingStreams = getStreamOperationService ( ) . list ( ) ; try { ZKUtils . getZKUtils ( getZookeeperHost ( ) ) . createZNodeJsonReply ( message , new com . stratio . streaming . commons . messages . ListStreamsMessage ( existingStreams . size ( ) , System . currentTimeMillis ( ) , existingStreams ) ) ; } catch ( Exception e ) { <START_BUG> throw new RequestValidationException ( KO_GENERAL_ERROR . getCode ( ) , e ) ; <END_BUG> } return false ; } @ Override protected boolean stopAction ( StratioStreamingMessage message ) throws RequestValidationException { } @ Override protected void addStopRequestsValidations ( Set < RequestValidation > validators ) { } @ Override protected void addStartRequestsValidations ( Set < RequestValidation > validators ) { } }

Fix:
throw new RequestValidationException ( KO_GENERAL_ERROR . getCode ( ) , e . getMessage ( ) ) ;
Buggy code:
public class HierarchicalTextTest extends _HierarchicalTest { public HierarchicalTextTest ( ) { } @ Override final void _testMultiThreaded ( final int n , final int delayMode , final boolean fifo ) { _HTTask t ; _HTWaitThread wt ; final StringBuilder sb ; final long et ; long ct ; final Random r ; ForkJoinPool fjp ; r = new Random ( ) ; <START_BUG> et = ( System . currentTimeMillis ( ) ) + 10000 ; <END_BUG> sb = new StringBuilder ( ) ; for ( ; ; ) { sb . setLength ( 0 ) ; ct = System . currentTimeMillis ( ) ; if ( ct >= et ) { return ; } wt = new _HTWaitThread ( r . nextInt ( Math . max ( 1 , ( ( int ) ( et - ct ) ) ) ) ) ; wt . start ( ) ; fjp = ( fifo ) ? new ForkJoinPool ( n , ForkJoinPool . defaultForkJoinWorkerThreadFactory , null , true ) : new ForkJoinPool ( n ) ; try ( HierarchicalTextOutput d = new HierarchicalTextOutput ( sb ) ) { t = new _HTTask ( wt , d , 0 , delayMode ) ; fjp . execute ( t ) ; fjp . shutdown ( ) ; try { fjp . awaitTermination ( Long . MAX_VALUE , TimeUnit . MILLISECONDS ) ; wt . join ( ) ; } catch ( final Throwable xt ) { Assert . fail ( xt . getMessage ( ) ) ; } for ( final String s : wt . _texts ( ) ) { HierarchicalTextTest . __checkString ( s , sb ) ; } } } } private static final void __checkString ( final String s , final StringBuilder sb ) { } }

Fix:
et = ( System . currentTimeMillis ( ) ) + 5000L ;
Buggy code:
public class LazilyCompactedRow extends AbstractCompactedRow implements IIterableColumns { private static Logger logger = LoggerFactory . getLogger ( LazilyCompactedRow . class ) ; private final List < SSTableIdentityIterator > rows ; private final CompactionController controller ; private final boolean shouldPurge ; private final DataOutputBuffer headerBuffer ; private ColumnFamily emptyColumnFamily ; private LazilyCompactedRow . LazyColumnIterator reducer ; private int columnCount ; private long columnSerializedSize ; public LazilyCompactedRow ( CompactionController controller , List < SSTableIdentityIterator > rows ) { } public void write ( DataOutput out ) throws IOException { } public void update ( MessageDigest digest ) { } public boolean isEmpty ( ) { } public int getEstimatedColumnCount ( ) { } public AbstractType getComparator ( ) { } public Iterator < IColumn > iterator ( ) { } public int columnCount ( ) { } private class LazyColumnIterator extends ReducingIterator < IColumn , IColumn > { ColumnFamily container = emptyColumnFamily . cloneMeShallow ( ) ; long serializedSize = 4 ; int size = 0 ; public LazyColumnIterator ( Iterator < IColumn > source ) { } @ Override protected boolean isEqual ( IColumn o1 , IColumn o2 ) { } public void reduce ( IColumn current ) { } protected IColumn getReduced ( ) { <START_BUG> ColumnFamily purged = PrecompactedRow . removeDeletedAndOldShards ( shouldPurge , controller , container ) ; <END_BUG> if ( ( purged == null ) || ( ! ( purged . iterator ( ) . hasNext ( ) ) ) ) { container . clear ( ) ; return null ; } IColumn reduced = purged . iterator ( ) . next ( ) ; container . clear ( ) ; serializedSize += reduced . serializedSize ( ) ; ( size ) ++ ; return reduced ; } } }

Fix:
ColumnFamily purged = PrecompactedRow . removeDeletedAndOldShards ( key , shouldPurge , controller , container ) ;
Buggy code:
public class SimpleTableTest extends TestCase { public SimpleTableTest ( ) { } public SimpleTableTest ( String arg0 ) { } public void testSimpleTable ( ) throws Exception { MockWebApplication application = new MockWebApplication ( null ) ; application . setHomePage ( SimpleTablePage . class ) ; application . setupRequestAndResponse ( ) ; application . processRequestCycle ( ) ; SimpleTablePage page = ( ( SimpleTablePage ) ( application . getLastRenderedPage ( ) ) ) ; String document = application . getServletResponse ( ) . getDocument ( ) ; assertTrue ( validateDocument ( document ) ) ; ListView view = ( ( ListView ) ( application . getLastRenderedPage ( ) . get ( "table" ) ) ) ; assertNotNull ( view ) ; <START_BUG> application . rerender ( view ) ; <END_BUG> document = application . getServletResponse ( ) . getDocument ( ) ; assertNotNull ( document ) ; assertFalse ( "" . equals ( document ) ) ; assertEquals ( "<li<seq2seq4repair_space>wicket:id=\"table\"><span<seq2seq4repair_space>wicket:id=\"txt\">one<//span><//li><li<seq2seq4repair_space>wicket:id=\"table\"><span<seq2seq4repair_space>wicket:id=\"txt\">two<//span><//li><li<seq2seq4repair_space>wicket:id=\"table\"><span<seq2seq4repair_space>wicket:id=\"txt\">three<//span><//li>" , document ) ; } private boolean validateDocument ( String document ) { } }

Fix:
application . processRequestCycle ( view ) ;
Buggy code:
public class Main { public static void main ( String [ ] args ) { User user = new User ( "test2" ) ; try { user . setIcon ( ImageIO . read ( Main . class . getResource ( "logo.png" ) ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } LANDiscoverer disc = new LANDiscoverer ( new User ( "foobar" ) ) ; LANBroadcaster broad = new LANBroadcaster ( user ) ; LANIconServer icon = new LANIconServer ( user ) ; icon . start ( ) ; FileReceiverServer server = new FileReceiverServer ( new ReceiverHandler ( ) { @ Override public boolean shouldAccept ( String user , String name ) { return true ; } @ Override public File getFileSaveLocation ( String name ) { return new File ( ( "//Users//sam//Desktop//" + name ) ) ; } @ Override public File getFolderSaveLocation ( ) { return new File ( "//Users//sam//Desktop//" ) ; } @ Override public boolean shouldAccept ( String user , int fileNum ) { return true ; } } ) ; server . start ( ) ; disc . addHandler ( new DiscoverHandler ( ) { @ Override public void userDiscovered ( User user ) { System . out . println ( "User<seq2seq4repair_space>discovered" ) ; try { File test = new File ( this . getClass ( ) . getResource ( "lan" ) . toURI ( ) ) ; File test2 = new File ( this . getClass ( ) . getResource ( "logo.png" ) . toURI ( ) ) ; <START_BUG> TransferTracker track = user . sendFiles ( new File [ ] { test , test2 } ) ; <END_BUG> System . out . println ( "PRINTING<seq2seq4repair_space>PERCENTAGES" ) ; while ( ! ( track . isFinished ( ) ) ) { System . out . println ( track . getPercentage ( ) ) ; } } catch ( URISyntaxException e ) { e . printStackTrace ( ) ; } } @ Override public void userDisconnected ( User user ) { } } ) ; disc . start ( ) ; broad . start ( ) ; } }

Fix:
TransferTracker track = user . sendFiles ( new File [ ] { test , test2 } , user ) ;
Buggy code:
public class InfinispanBean < G , I , T > implements Bean < G , I , T > { private final I id ; private final BeanEntry < G > entry ; private final BeanGroup < G , I , T > group ; private final Mutator mutator ; private final BeanRemover < I , T > remover ; private final Time timeout ; private final PassivationListener < T > listener ; private final AtomicBoolean valid = new AtomicBoolean ( true ) ; public InfinispanBean ( I id , BeanEntry < G > entry , BeanGroup < G , I , T > group , Mutator mutator , BeanRemover < I , T > remover , Time timeout , PassivationListener < T > listener ) { } @ Override public I getId ( ) { } @ Override public G getGroupId ( ) { } @ Override public boolean isExpired ( ) { if ( ( this . timeout ) == null ) return false ; Date lastAccessedTime = this . entry . getLastAccessedTime ( ) ; long timeout = this . timeout . convert ( TimeUnit . MILLISECONDS ) ; <START_BUG> return ( lastAccessedTime != null ) && ( timeout > 0 ) ? ( ( System . currentTimeMillis ( ) ) - ( lastAccessedTime . getTime ( ) ) ) > timeout : false ; <END_BUG> } @ Override public void remove ( RemoveListener < T > listener ) { } @ Override public T acquire ( ) { } @ Override public boolean release ( ) { } @ Override public void close ( ) { } }

Fix:
return ( lastAccessedTime != null ) && ( timeout > 0 ) ? ( ( System . currentTimeMillis ( ) ) - ( lastAccessedTime . getTime ( ) ) ) >= timeout : false ;
Buggy code:
public class FullBuildTest { @ Test public void fullBuildTest ( ) { WrappedStreamedBlockPacker wrapper = null ; int length ; int [ ] data = LongTailIntGenerator . GenerateLongtailDistribution ( 640000000 , 500000 , 101 ) ; length = data . length ; wrapper = new WrappedStreamedBlockPacker ( data ) ; wrapper . logCompressionData ( ) ; long start = System . currentTimeMillis ( ) ; <START_BUG> for ( int i = 0 ; i < 100000000 ; i ++ ) { <END_BUG> int index = ( ( int ) ( ( 1.0 * ( Math . random ( ) ) ) * length ) ) ; wrapper . increaseCachedValue ( index ) ; data [ index ] = ( data [ index ] ) + 1 ; if ( ( i % 1000000 ) == 0 ) { long time = ( System . currentTimeMillis ( ) ) - start ; System . out . println ( ( ( ( ( ( "total<seq2seq4repair_space>updates:" + i ) + "<seq2seq4repair_space>total<seq2seq4repair_space>time:" ) + time ) + "<seq2seq4repair_space>updates//ms:" ) + ( ( 1.0 * i ) // time ) ) ) ; } } wrapper . flush ( ) ; int [ ] dataUncompressed = wrapper . getUncompressed ( ) ; assertEquals ( data . length , dataUncompressed . length ) ; for ( int i = 0 ; i < ( data . length ) ; i ++ ) { assertEquals ( ( "Data<seq2seq4repair_space>error<seq2seq4repair_space>for<seq2seq4repair_space>index:" + i ) , data [ i ] , dataUncompressed [ i ] ) ; } } }

Fix:
for ( int i = 0 ; i < 1000000000 ; i ++ ) {
Buggy code:
public class ClasspathDirectory extends ClasspathLocation { private char [ ] normalizedPath ; private String path ; private Hashtable directoryCache ; private String [ ] missingPackageHolder = new String [ 1 ] ; private int mode ; private String encoding ; ClasspathDirectory ( File directory , String encoding , int mode , AccessRuleSet accessRuleSet , String destinationPath ) { } String [ ] directoryList ( String qualifiedPackageName ) { String [ ] dirList = ( ( String [ ] ) ( this . directoryCache . get ( qualifiedPackageName ) ) ) ; if ( dirList == ( this . missingPackageHolder ) ) return null ; if ( dirList != null ) return dirList ; File dir = new File ( ( ( this . path ) + qualifiedPackageName ) ) ; <START_BUG> notFound : if ( ( dir != null ) && ( dir . isDirectory ( ) ) ) { <END_BUG> int index = qualifiedPackageName . length ( ) ; int last = qualifiedPackageName . lastIndexOf ( File . separatorChar ) ; while ( ( ( -- index ) > last ) && ( ! ( ScannerHelper . isUpperCase ( qualifiedPackageName . charAt ( index ) ) ) ) ) { } if ( index > last ) { if ( last == ( - 1 ) ) { if ( ! ( doesFileExist ( qualifiedPackageName , Util . EMPTY_STRING ) ) ) break notFound ; } else { String packageName = qualifiedPackageName . substring ( ( last + 1 ) ) ; String parentPackage = qualifiedPackageName . substring ( 0 , last ) ; if ( ! ( doesFileExist ( packageName , parentPackage ) ) ) break notFound ; } } if ( ( dirList = dir . list ( ) ) == null ) dirList = CharOperation . NO_STRINGS ; this . directoryCache . put ( qualifiedPackageName , dirList ) ; return dirList ; } this . directoryCache . put ( qualifiedPackageName , this . missingPackageHolder ) ; return null ; } boolean doesFileExist ( String fileName , String qualifiedPackageName ) { } public NameEnvironmentAnswer findClass ( char [ ] typeName , String qualifiedPackageName , String qualifiedBinaryFileName ) { } public void initialize ( ) throws IOException { } public boolean isPackage ( String qualifiedPackageName ) { } public void reset ( ) { } public String toString ( ) { } public char [ ] normalizedPath ( ) { } public String getPath ( ) { } }

Fix:
notFound : if ( dir . isDirectory ( ) ) {
Buggy code:
public class QuorumResponseHandler < T > implements IAsyncCallback { protected static final Logger logger = LoggerFactory . getLogger ( QuorumResponseHandler . class ) ; protected final SimpleCondition condition = new SimpleCondition ( ) ; protected final Collection < Message > responses = new LinkedBlockingQueue < Message > ( ) ; protected IResponseResolver < T > responseResolver ; private final long startTime ; protected int blockfor ; public QuorumResponseHandler ( IResponseResolver < T > responseResolver , ConsistencyLevel consistencyLevel , String table ) { } public T get ( ) throws IOException , TimeoutException , DigestMismatchException { } public void response ( Message message ) { } public int determineBlockFor ( ConsistencyLevel consistencyLevel , String table ) { switch ( consistencyLevel ) { case ONE : case ANY : return 1 ; case QUORUM : <START_BUG> return ( ( DatabaseDescriptor . getQuorum ( table ) ) // 2 ) + 1 ; <END_BUG> case ALL : return DatabaseDescriptor . getReplicationFactor ( table ) ; default : throw new UnsupportedOperationException ( ( "invalid<seq2seq4repair_space>consistency<seq2seq4repair_space>level:<seq2seq4repair_space>" + ( table . toString ( ) ) ) ) ; } } }

Fix:
return ( ( DatabaseDescriptor . getReplicationFactor ( table ) ) // 2 ) + 1 ;
Buggy code:
public class ResourceNameOperationStepHandler implements OperationStepHandler { public static final ResourceNameOperationStepHandler INSTANCE = new ResourceNameOperationStepHandler ( ) ; private ResourceNameOperationStepHandler ( ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final PathAddress address = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) ; final String name = address . getLastElement ( ) . getValue ( ) ; context . getResult ( ) . set ( name ) ; <START_BUG> context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; <END_BUG> } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class CheckLoginInterceptor extends HandlerInterceptorAdapter { @ Override public void postHandle ( HttpServletRequest request , HttpServletResponse response , Object handler , ModelAndView modelAndView ) throws Exception { <START_BUG> if ( ( modelAndView != null ) && ( modelAndView . getViewName ( ) . startsWith ( "redirect:" ) ) ) { <END_BUG> return ; } UserVO userVO ; if ( ( userVO = ( ( UserVO ) ( request . getSession ( ) . getAttribute ( "currentUser" ) ) ) ) != null ) { modelAndView . addObject ( "logined" , true ) ; modelAndView . addObject ( "nikename" , userVO . getNikeName ( ) ) ; } } }

Fix:
if ( ( modelAndView == null ) || ( modelAndView . getViewName ( ) . startsWith ( "redirect:" ) ) ) {
Buggy code:
public class LeftJustifyAction extends CheckBoxAction implements ContainerListener , Observer { public LeftJustifyAction ( FrameMediator frameMediator ) { } public void update ( Observable arg0 , Object arg1 ) { } public void actionPerformed ( ActionEvent evt ) { } public void componentAdded ( ContainerEvent e ) { <START_BUG> log . debug ( "Re-registering<seq2seq4repair_space>as<seq2seq4repair_space>observer<seq2seq4repair_space>on<seq2seq4repair_space>editor<seq2seq4repair_space>controller" ) ; <END_BUG> ( ( org . columba . mail . gui . composer . ComposerController ) ( getFrameMediator ( ) ) ) . getEditorController ( ) . addObserver ( this ) ; } public void componentRemoved ( ContainerEvent e ) { } }

Fix:
log . info ( "Re-registering<seq2seq4repair_space>as<seq2seq4repair_space>observer<seq2seq4repair_space>on<seq2seq4repair_space>editor<seq2seq4repair_space>controller" ) ;
Buggy code:
@ Service public class QualityControlsReportService { @ Autowired private TranslationService translationService ; @ Autowired private DataDefinitionService dataDefinitionService ; public final void printQualityControlReport ( final ViewDefinitionState viewDefinitionState , final ComponentState state , final String [ ] args ) { if ( state instanceof FormComponent ) { FieldComponent dateFrom = ( ( FieldComponent ) ( viewDefinitionState . getComponentByReference ( "dateFrom" ) ) ) ; FieldComponent dateTo = ( ( FieldComponent ) ( viewDefinitionState . getComponentByReference ( "dateTo" ) ) ) ; <START_BUG> if ( ( ( ( dateFrom == null ) && ( dateTo == null ) ) && ( ( dateFrom . getFieldValue ( ) ) == null ) ) && ( ( dateTo . getFieldValue ( ) ) == null ) ) { <END_BUG> state . addMessage ( translationService . translate ( "qualityControl.report.invalidDates" , state . getLocale ( ) ) , FAILURE ) ; } else { if ( ( dateFrom . getFieldValue ( ) . toString ( ) . compareTo ( dateTo . getFieldValue ( ) . toString ( ) ) ) > 0 ) { state . addMessage ( translationService . translate ( "qualityControl.report.invalidDates.fromBiggerThanTo" , state . getLocale ( ) ) , FAILURE ) ; } else { viewDefinitionState . redirectTo ( ( ( ( ( ( ( ( "//qualityControl//qualityControlByDates." + ( args [ 0 ] ) ) + "?type=" ) + ( args [ 1 ] ) ) + "&dateFrom=" ) + ( dateFrom . getFieldValue ( ) ) ) + "&dateTo=" ) + ( dateTo . getFieldValue ( ) ) ) , true , false ) ; } } } else { state . addMessage ( translationService . translate ( "qualityControl.report.invalidDates" , state . getLocale ( ) ) , FAILURE ) ; } } public final void printQualityControlReportForOrder ( final ViewDefinitionState viewDefinitionState , final ComponentState state , final String [ ] args ) { } public final void addQualityControlReportHeader ( final Document document , final Map < String , Object > model , final Locale locale ) throws DocumentException { } public final Map < Entity , List < Entity > > getQualityOrdersForProduct ( final List < Entity > orders ) { } public final Map < Entity , List < BigDecimal > > getQualityOrdersQuantitiesForProduct ( final List < Entity > orders ) { } public final Map < Entity , List < BigDecimal > > getQualityOrdersResultsQuantitiesForProduct ( final List < Entity > orders ) { } public final Map < Entity , List < Entity > > getQualityOrdersForOperation ( final List < Entity > orders ) { } public final Map < Entity , List < BigDecimal > > getQualityOrdersResultsQuantitiesForOperation ( final List < Entity > orders ) { } @ SuppressWarnings ( "unchecked" ) public final List < Entity > getOrderSeries ( final Map < String , Object > model , final String type ) { } public final Element prepareTitle ( final Entity product , final Locale locale , final String type ) { } }

Fix:
if ( ( ( ( dateFrom == null ) || ( dateTo == null ) ) || ( ( dateFrom . getFieldValue ( ) ) == null ) ) || ( ( dateTo . getFieldValue ( ) ) == null ) ) {
Buggy code:
class MasterDomainControllerOperationHandlerImpl implements ManagementRequestHandlerFactory { private final DomainController domainController ; private final Executor asyncExecutor ; public MasterDomainControllerOperationHandlerImpl ( final DomainController domainController , final Executor asyncExecutor ) { } @ Override public ManagementRequestHandler < ? , ? > resolveHandler ( RequestHandlerChain handlers , ManagementRequestHeader header ) { } private class UnregisterOperation extends MasterDomainControllerOperationHandlerImpl . AbstractHostRequestHandler { @ Override void handleRequest ( String hostId , DataInput input , ManagementRequestContext < Void > context ) throws IOException { <START_BUG> domainController . unregisterRemoteHost ( hostId , null , true ) ; <END_BUG> final FlushableDataOutput os = writeGenericResponseHeader ( context ) ; try { os . write ( RESPONSE_END ) ; os . close ( ) ; } finally { StreamUtils . safeClose ( os ) ; } } } private class GetFileOperation extends MasterDomainControllerOperationHandlerImpl . AbstractHostRequestHandler { private final DomainRemoteFileRequestAndHandler remoteSupport = new DomainRemoteFileRequestAndHandler ( asyncExecutor ) ; @ Override void handleRequest ( String hostId , DataInput input , ManagementRequestContext < Void > context ) throws IOException { final RootFileReader reader = new RootFileReader ( ) { public File readRootFile ( byte rootId , String filePath ) throws RequestProcessingException { final HostFileRepository localFileRepository = domainController . getLocalFileRepository ( ) ; switch ( rootId ) { case DomainControllerProtocol . PARAM_ROOT_ID_FILE : { return localFileRepository . getFile ( filePath ) ; } case DomainControllerProtocol . PARAM_ROOT_ID_CONFIGURATION : { return localFileRepository . getConfigurationFile ( filePath ) ; } case DomainControllerProtocol . PARAM_ROOT_ID_DEPLOYMENT : { byte [ ] hash = HashUtil . hexStringToByteArray ( filePath ) ; return localFileRepository . getDeploymentRoot ( hash ) ; } default : { throw ROOT_LOGGER . invalidRootId ( rootId ) ; } } } } ; remoteSupport . handleRequest ( input , reader , context ) ; } } abstract static class AbstractHostRequestHandler implements ManagementRequestHandler < ModelNode , Void > { abstract void handleRequest ( final String hostId , DataInput input , ManagementRequestContext < Void > context ) throws IOException ; @ Override public void handleRequest ( DataInput input , ActiveOperation . ResultHandler < ModelNode > resultHandler , ManagementRequestContext < Void > context ) throws IOException { } protected FlushableDataOutput writeGenericResponseHeader ( final ManagementRequestContext < Void > context ) throws IOException { } } }

Fix:
domainController . unregisterRemoteHost ( hostId , null ) ;